{"version":3,"sources":["webpack:///./src/components/UI/Loader.vue?d215","webpack:///./src/components/UI/Loader.vue","webpack:///./src/components/UI/Loader.vue?05d4","webpack:///./src/components/UI/Loader.vue?d4ac","webpack:///./node_modules/client-website-ts-library/types/Context.ts","webpack:///./src/views/AgentProfileAppraisal.vue?74d5","webpack:///./src/components/UI/Loader.vue?d2c4","webpack:///./node_modules/client-website-ts-library/plugins/view/index.ts","webpack:///./src/views/AgentProfileAppraisal.vue?a3b0","webpack:///./src/views/AgentProfileAppraisal.vue","webpack:///./src/views/AgentProfileAppraisal.vue?711c","webpack:///./src/views/AgentProfileAppraisal.vue?e408"],"names":["render","_vm","this","_h","$createElement","_c","_self","directives","name","rawName","value","expression","staticClass","staticRenderFns","Loader","Vue","__decorate","Prop","Component","component","ContextItemType","ViewBase","constructor","prolistAnalyticsService","ServiceManager","Get","ServiceType","Analytics","headService","Require","Head","updateAnalytics","evt","obj","getAnalyticsEvent","call","getAnalyticsData","AnalyticsPageView","$route","path","undefined","triggerAnalyticsEvent","event","GetAll","forEach","adapter","Record","triggerCustomAnalyticsEvent","updateHead","result","head","bind","Promise","then","meta","Update","UpdateWithStatic","View","mounted","requestAnimationFrame","AsyncView","$on","attrs","profile","formData","_e","AgentProfile","Mixins","resolveId","id","params","length","updateAgent","API","Slugs","Resolve","resolved","Type","Id","stripHtml","html","el","document","createElement","innerHTML","innerText","about","AboutAgent","substring","title","FullName","Position","description","image","Photo","Preview","Url","Profiles","$emit","Items","EnquiryTargetProfile","ClientWebsiteId","Config","Website","WebsiteId","Settings","WebsiteLevel","AnalyticsEventObject","FromProfile","components","Masthead","Form"],"mappings":"kHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,WAAW,CAAC,CAACC,KAAK,OAAOC,QAAQ,SAASC,MAAOT,EAAW,QAAEU,WAAW,YAAYC,YAAY,YACv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C,IAAIuB,EAAQpF,KAAK6E,UAAU7E,KAAK6D,QAAQwB,YAMxC,OAJID,EAAMf,OAAS,MACjBe,EAAWA,EAAME,UAAU,EAAG,KAAtB,OAGH,CACLC,MAAO,sBAAsBvF,KAAK6D,QAAQ2B,cAAcxF,KAAK6D,QAAQ4B,WACrEC,YAAaN,EACbO,MAAO3F,KAAK6D,QAAQ+B,MAAQ5F,KAAK6D,QAAQ+B,MAAMC,QAAQC,SAAMxD,GAIjEgC,YAAYH,GACVnE,KAAK8D,SAAW,KAEhBS,OAAIwB,SAASxE,IAAI4C,GAAIhB,KAAMU,IACzB7D,KAAK6D,QAAUA,EAEf7D,KAAKgG,MAAM,cAEXhG,KAAK8D,SAAW,CACdmC,MAAO,CAAC,CACNtB,KAAMzD,OAAgBgF,qBACtBtB,GAAIf,EAAQe,KAEduB,gBAAiBC,OAAOC,QAAQzB,GAChC0B,UAAWF,OAAOC,QAAQE,SAAUD,UACpCE,aAAcJ,OAAOC,QAAQE,SAAUC,gBAK7ChD,UACExD,KAAKkE,YAGPhC,mBACE,OAAqB,OAAjBlC,KAAK6D,QAAyB,KAE3B4C,OAAqBC,YAAY1G,KAAK6D,WAxE5BG,EAAYlD,EAAA,CANhCE,eAAU,CACT2F,WAAY,CACVC,gBACAC,gBAGiB7C,WClC2X,I,wBCQ5Y/C,EAAY,eACd,EACAnB,EACAa,GACA,EACA,KACA,WACA,MAIa,aAAAM,E","file":"js/chunk-4b724ba0.d1fd15dd.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.loading),expression:\"loading\"}],staticClass:\"loader\"})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\r\nimport { Component, Vue, Prop } from 'vue-property-decorator';\r\n\r\n@Component\r\nexport default class Loader extends Vue {\r\n @Prop()\r\n private readonly loading!: boolean;\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Loader.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Loader.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Loader.vue?vue&type=template&id=1c9cce74&scoped=true&\"\nimport script from \"./Loader.vue?vue&type=script&lang=ts&\"\nexport * from \"./Loader.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./Loader.vue?vue&type=style&index=0&id=1c9cce74&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1c9cce74\",\n null\n \n)\n\nexport default component.exports","import { WebsiteLevel } from \"./WebsiteConfig\";\r\n\r\nenum ContextItemType\r\n{\r\n None,\r\n Listing,\r\n Profile,\r\n Office,\r\n EnquiryTargetProfile,\r\n Franchise,\r\n CustomData,\r\n}\r\n\r\ninterface ContextItem {\r\n Type: ContextItemType;\r\n Id: string;\r\n}\r\n\r\ninterface CustomContextItem extends ContextItem {\r\n Key: string;\r\n Value: string;\r\n}\r\n\r\ninterface Context {\r\n ClientWebsiteId: string;\r\n WebsiteId?: string;\r\n WebsiteLevel?: WebsiteLevel;\r\n Items: ContextItem[];\r\n}\r\n\r\nexport { ContextItemType, ContextItem, Context, CustomContextItem }\r\n","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AgentProfileAppraisal.vue?vue&type=style&index=0&id=0081aeed&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AgentProfileAppraisal.vue?vue&type=style&index=0&id=0081aeed&scoped=true&lang=css&\"","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Loader.vue?vue&type=style&index=0&id=1c9cce74&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Loader.vue?vue&type=style&index=0&id=1c9cce74&scoped=true&lang=css&\"","import Vue from \"vue\";\r\nimport { Component } from \"vue-property-decorator\";\r\nimport { AnalyticsEvent, AnalyticsEventObject, AnalyticsPageView, IAnalyticsAdapter, PROListAnalyticsAdapter } from \"../../services/Analytics\";\r\nimport { HeadService } from \"../../services/HeadService\";\r\nimport { ServiceManager, ServiceType } from \"../../services/ServiceManager\";\r\nimport { RouteMeta } from \"../meta\";\r\n\r\ninterface ViewBase {\r\n getAnalyticsEvent?(): AnalyticsEvent | null;\r\n getAnalyticsData?(): AnalyticsEventObject | null;\r\n head?(): RouteMeta | Promise | null;\r\n}\r\n\r\n@Component\r\nclass ViewBase extends Vue {\r\n protected prolistAnalyticsService = ServiceManager.Get(ServiceType.Analytics, 'PROListAnalyticsAdapter');\r\n protected headService = ServiceManager.Require(ServiceType.Head)!;\r\n\r\n public updateAnalytics() {\r\n let evt: AnalyticsEvent | null = null;\r\n let obj: AnalyticsEventObject | null = null;\r\n\r\n if (typeof this.getAnalyticsEvent !== 'undefined') {\r\n evt = this.getAnalyticsEvent.call(this);\r\n } else if(typeof this.getAnalyticsData !== 'undefined') {\r\n obj = this.getAnalyticsData.call(this);\r\n }\r\n\r\n if (evt === null) evt = new AnalyticsPageView(this.$route.path, this.$route.name || '', obj || undefined);\r\n\r\n this.triggerAnalyticsEvent(evt);\r\n }\r\n\r\n public triggerAnalyticsEvent(event: AnalyticsEvent) {\r\n ServiceManager.GetAll(ServiceType.Analytics).forEach((adapter) => {\r\n adapter.Record(event);\r\n });\r\n }\r\n\r\n public triggerCustomAnalyticsEvent(event: AnalyticsEvent) {\r\n if (this.prolistAnalyticsService !== null) this.prolistAnalyticsService.Record(event);\r\n }\r\n\r\n protected updateHead() {\r\n if ('head' in this) {\r\n const result = this.head!.bind(this)();\r\n\r\n if(result instanceof Promise) {\r\n result.then((meta: RouteMeta | null) => {\r\n this.headService.Update(meta);\r\n });\r\n } else {\r\n this.headService.Update(result as RouteMeta | null);\r\n }\r\n } else {\r\n this.headService.UpdateWithStatic(this.$route.path);\r\n }\r\n }\r\n}\r\n\r\n@Component\r\nclass View extends ViewBase {\r\n public mounted() {\r\n requestAnimationFrame(() => {\r\n this.updateHead();\r\n this.updateAnalytics();\r\n });\r\n }\r\n}\r\n\r\n@Component\r\nclass AsyncView extends ViewBase {\r\n public mounted() {\r\n this.$on('updateView', () => {\r\n requestAnimationFrame(() => {\r\n this.updateHead();\r\n this.updateAnalytics();\r\n });\r\n });\r\n }\r\n}\r\n\r\nexport {\r\n View,\r\n AsyncView\r\n}\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Page',[(_vm.profile)?[_c('SiteMasthead',{attrs:{\"thin\":\"true\",\"title\":(\"Get an Appraisal with \" + (_vm.profile.FullName))}}),_c('ContentRow',{attrs:{\"noPaddingTop\":true}},[_c('ContentContainer',[_c('SectionTitle'),(_vm.formData)?_c('Form',{attrs:{\"context\":_vm.formData,\"type\":\"Generic.AppraisalRequestForm\"}}):_vm._e()],1)],1)]:_vm._e()],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Mixins } from 'vue-property-decorator';\r\nimport { Profile, ListingStatus, WebsiteLevel, Context } from 'client-website-ts-library/types';\r\nimport { API, Config } from 'client-website-ts-library/services';\r\nimport { AsyncView, RouteMeta } from 'client-website-ts-library/plugins';\r\n\r\nimport Masthead from '@/components/Common/Masthead.vue';\r\nimport { AnalyticsEventObject } from 'client-website-ts-library/services/Analytics';\r\nimport Form from '@/components/Forms/Form.vue';\r\nimport { ContextItemType } from 'client-website-ts-library/types/Context';\r\n\r\n@Component({\r\n components: {\r\n Masthead,\r\n Form,\r\n },\r\n})\r\nexport default class AgentProfile extends Mixins(AsyncView) {\r\n private profile: Profile | null = null;\r\n\r\n private formData: Context | null = null;\r\n\r\n resolveId() {\r\n const { id } = this.$route.params;\r\n\r\n if (id.length === 36) {\r\n // If the ID is 36 long we'll treat it as a guid\r\n\r\n this.updateAgent(id);\r\n } else {\r\n API.Slugs.Resolve(id).then((resolved) => {\r\n if (resolved.Type === 'Profile') {\r\n this.updateAgent(resolved.Id);\r\n }\r\n });\r\n }\r\n }\r\n\r\n stripHtml(html: string): string {\r\n const el = document.createElement('div');\r\n\r\n el.innerHTML = html;\r\n\r\n return el.innerText;\r\n }\r\n\r\n head(): RouteMeta | null {\r\n if (this.profile === null) return null;\r\n\r\n let about = this.stripHtml(this.profile.AboutAgent);\r\n\r\n if (about.length > 156) {\r\n about = `${about.substring(0, 156)}...`;\r\n }\r\n\r\n return {\r\n title: `Get an Appraisal - ${this.profile.FullName} - ${this.profile.Position}`,\r\n description: about,\r\n image: this.profile.Photo ? this.profile.Photo.Preview.Url : undefined,\r\n };\r\n }\r\n\r\n updateAgent(id: string) {\r\n this.formData = null;\r\n\r\n API.Profiles.Get(id).then((profile) => {\r\n this.profile = profile;\r\n\r\n this.$emit('updateView');\r\n\r\n this.formData = {\r\n Items: [{\r\n Type: ContextItemType.EnquiryTargetProfile,\r\n Id: profile.Id,\r\n }],\r\n ClientWebsiteId: Config.Website.Id,\r\n WebsiteId: Config.Website.Settings!.WebsiteId,\r\n WebsiteLevel: Config.Website.Settings!.WebsiteLevel,\r\n };\r\n });\r\n }\r\n\r\n mounted() {\r\n this.resolveId();\r\n }\r\n\r\n getAnalyticsData(): AnalyticsEventObject | null {\r\n if (this.profile === null) return null;\r\n\r\n return AnalyticsEventObject.FromProfile(this.profile);\r\n }\r\n}\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AgentProfileAppraisal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AgentProfileAppraisal.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./AgentProfileAppraisal.vue?vue&type=template&id=0081aeed&scoped=true&\"\nimport script from \"./AgentProfileAppraisal.vue?vue&type=script&lang=ts&\"\nexport * from \"./AgentProfileAppraisal.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./AgentProfileAppraisal.vue?vue&type=style&index=0&id=0081aeed&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0081aeed\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}