{"version":3,"sources":["webpack:///./src/components/UI/Loader.vue?eb29","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/components/UI/Loader.vue?b05e","webpack:///./node_modules/client-website-ts-library/plugins/view/index.ts","webpack:///./src/views/AgentProfileAppraisal.vue?bbed","webpack:///./src/views/AgentProfileAppraisal.vue?d038","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","component","ContextItemType","prolistAnalyticsService","ServiceManager","Get","Analytics","headService","Require","Head","evt","obj","getAnalyticsEvent","call","getAnalyticsData","$route","path","undefined","triggerAnalyticsEvent","event","GetAll","forEach","adapter","Record","result","head","bind","Promise","then","meta","Update","UpdateWithStatic","View","requestAnimationFrame","updateHead","updateAnalytics","AsyncView","$on","attrs","profile","formData","_e","id","params","length","updateAgent","Slugs","Resolve","resolved","Type","Id","html","el","document","createElement","innerHTML","innerText","about","stripHtml","AboutAgent","substring","title","FullName","Position","description","image","Photo","Preview","Url","Profiles","$emit","Items","Context","EnquiryTargetProfile","ClientWebsiteId","Website","WebsiteId","Settings","WebsiteLevel","resolveId","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,YACvMC,EAAkB,G,oVCOtB,IAAqB,EAArB,cAAoC,SAEhC,GADC,kB,8BADgB,EAAM,GAD1B,QACoB,WCR8X,I,wBCQ/YC,EAAY,e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B,MAAQ7E,KAAKkD,QAAQ2B,MAAMC,QAAQC,SAAMnD,GAIjE,YAAYyB,GACVrD,KAAKmD,SAAW,KAEhB,OAAI6B,SAAShE,IAAIqC,GAAId,KAAMW,IACzBlD,KAAKkD,QAAUA,EAEflD,KAAKiF,MAAM,cAEXjF,KAAKmD,SAAW,CACd+B,MAAO,CAAC,CACNtB,KAAMuB,EAAA,KAAgBC,qBACtBvB,GAAIX,EAAQW,KAEdwB,gBAAiB,OAAOC,QAAQzB,GAChC0B,UAAW,OAAOD,QAAQE,SAAUD,UACpCE,aAAc,OAAOH,QAAQE,SAAUC,gBAK7C,UACEzF,KAAK0F,YAGP,mBACE,OAAqB,OAAjB1F,KAAKkD,QAAyB,KAE3BjC,EAAA,KAAqB0E,YAAY3F,KAAKkD,WAxE5B,EAAY,GANhC,eAAU,CACT0C,WAAY,CACVC,WAAA,KACAC,OAAA,SAGiB,WCjC2X,I,wBCQ5YlF,EAAY,eACd,EACAd,EACAa,GACA,EACA,KACA,WACA,MAIa,aAAAC,E","file":"js/chunk-2868102f.4c428856.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\nimport { Component, Vue, Prop } from 'vue-property-decorator';\n\n@Component\nexport default class Loader extends Vue {\n @Prop()\n private readonly loading!: boolean;\n}\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=b15215d2&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=b15215d2&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 \"b15215d2\",\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!./Loader.vue?vue&type=style&index=0&id=b15215d2&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=b15215d2&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","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=1f9cc2aa&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=1f9cc2aa&scoped=true&lang=css&\"","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\":\"Variations.CPO.Redlynch.SalesAppraisalRequestForm\"}}):_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\nimport { Component, Mixins } from 'vue-property-decorator';\nimport { Profile, ListingStatus, WebsiteLevel, Context } from 'client-website-ts-library/types';\nimport { API, Config } from 'client-website-ts-library/services';\nimport { AsyncView, RouteMeta } from 'client-website-ts-library/plugins';\n\nimport Masthead from '@/components/Common/Masthead.vue';\nimport { AnalyticsEventObject } from 'client-website-ts-library/services/Analytics';\nimport Form from '@/components/Forms/Form.vue';\nimport { ContextItemType } from 'client-website-ts-library/types/Context';\n\n@Component({\n components: {\n Masthead,\n Form,\n },\n})\nexport default class AgentProfile extends Mixins(AsyncView) {\n private profile: Profile | null = null;\n\n private formData: Context | null = null;\n\n resolveId() {\n const { id } = this.$route.params;\n\n if (id.length === 36) {\n // If the ID is 36 long we'll treat it as a guid\n\n this.updateAgent(id);\n } else {\n API.Slugs.Resolve(id).then((resolved) => {\n if (resolved.Type === 'Profile') {\n this.updateAgent(resolved.Id);\n }\n });\n }\n }\n\n stripHtml(html: string): string {\n const el = document.createElement('div');\n\n el.innerHTML = html;\n\n return el.innerText;\n }\n\n head(): RouteMeta | null {\n if (this.profile === null) return null;\n\n let about = this.stripHtml(this.profile.AboutAgent);\n\n if (about.length > 156) {\n about = `${about.substring(0, 156)}...`;\n }\n\n return {\n title: `Get an Appraisal - ${this.profile.FullName} - ${this.profile.Position}`,\n description: about,\n image: this.profile.Photo ? this.profile.Photo.Preview.Url : undefined,\n };\n }\n\n updateAgent(id: string) {\n this.formData = null;\n\n API.Profiles.Get(id).then((profile) => {\n this.profile = profile;\n\n this.$emit('updateView');\n\n this.formData = {\n Items: [{\n Type: ContextItemType.EnquiryTargetProfile,\n Id: profile.Id,\n }],\n ClientWebsiteId: Config.Website.Id,\n WebsiteId: Config.Website.Settings!.WebsiteId,\n WebsiteLevel: Config.Website.Settings!.WebsiteLevel,\n };\n });\n }\n\n mounted() {\n this.resolveId();\n }\n\n getAnalyticsData(): AnalyticsEventObject | null {\n if (this.profile === null) return null;\n\n return AnalyticsEventObject.FromProfile(this.profile);\n }\n}\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=1f9cc2aa&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=1f9cc2aa&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 \"1f9cc2aa\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}