{"version":3,"sources":["webpack:///./src/views/AgentProfileAppraisal.vue?c99b","webpack:///./src/views/AgentProfileAppraisal.vue?332e","webpack:///./src/views/AgentProfileAppraisal.vue?bd68","webpack:///./src/views/AgentProfileAppraisal.vue?711c","webpack:///./src/views/AgentProfileAppraisal.vue?e408"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","_v","_s","profile","FullName","Position","formData","_e","staticRenderFns","id","$route","params","length","updateAgent","Slugs","Resolve","then","resolved","Type","Id","html","el","document","createElement","innerHTML","innerText","about","stripHtml","AboutAgent","substring","title","description","image","Photo","Preview","Url","undefined","Profiles","Get","$emit","Items","Context","EnquiryTargetProfile","ClientWebsiteId","Website","WebsiteId","Settings","WebsiteLevel","resolveId","Analytics","FromProfile","components","Masthead","Form","component"],"mappings":"kHAAA,yBAAof,EAAG,G,gECAvf,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,OAAO,CAAEJ,EAAW,QAAE,CAACI,EAAG,WAAW,CAACE,YAAY,0BAA0BC,MAAM,CAAC,MAAQ,wBAAwB,MAAQ,sCAAsC,oBAAmB,EAAK,QAAS,IAAO,CAACH,EAAG,mBAAmB,CAACE,YAAY,8BAA8B,CAACF,EAAG,MAAM,CAACE,YAAY,yBAAyB,CAACF,EAAG,MAAM,CAACE,YAAY,kCAAkC,CAACF,EAAG,KAAK,CAACE,YAAY,2BAA2B,CAACN,EAAIQ,GAAG,2BAA2BJ,EAAG,KAAK,CAACE,YAAY,uBAAuB,CAACN,EAAIQ,GAAGR,EAAIS,GAAGT,EAAIU,QAAQC,aAAaP,EAAG,KAAK,CAACE,YAAY,2BAA2B,CAACN,EAAIQ,GAAGR,EAAIS,GAAGT,EAAIU,QAAQE,oBAAoB,GAAGR,EAAG,aAAa,CAACA,EAAG,mBAAmB,CAAEJ,EAAY,SAAEI,EAAG,OAAO,CAACG,MAAM,CA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AY,GANhC,eAAU,CACTgD,WAAY,CACVC,WAAA,KACAC,OAAA,SAGiB,WCzC2X,I,wBCQ5YC,EAAY,eACd,EACA9D,EACAgB,GACA,EACA,KACA,WACA,MAIa,aAAA8C,E","file":"js/chunk-e52c5048.428b593c.js","sourcesContent":["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=8347c8a6&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=8347c8a6&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('Masthead',{staticClass:\"agent-profile__masthead\",attrs:{\"title\":\"Get an appraisal with\",\"image\":\"/assets/images/default/masthead.jpg\",\"relative-content\":true,\"darken\":true}},[_c('ContentContainer',{staticClass:\"agent-profile__header-wrap\"},[_c('div',{staticClass:\"agent-profile__header\"},[_c('div',{staticClass:\"agent-profile__header__details\"},[_c('h2',{staticClass:\"agent-profile__position\"},[_vm._v(\"Get an appraisal with\")]),_c('h1',{staticClass:\"agent-profile__name\"},[_vm._v(_vm._s(_vm.profile.FullName))]),_c('h2',{staticClass:\"agent-profile__position\"},[_vm._v(_vm._s(_vm.profile.Position))])])])])],1),_c('ContentRow',[_c('ContentContainer',[(_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\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=8347c8a6&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=8347c8a6&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 \"8347c8a6\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}