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creator-profile.vue?c45c","webpack://agra/./app/javascript/phoenix/campaign-creator-block.vue","webpack://agra/./app/javascript/phoenix/campaign-creator-block.vue?82d6","webpack://agra/./app/javascript/components/members/profile-image.vue","webpack://agra/./app/javascript/components/members/profile-image.vue?ab36"],"sourcesContent":["<template>\n <div class=\"profile d-flex\" @click=\"$emit('click')\">\n <profile-image v-if=\"profileImage\" size=\"md\" :user=\"{profileImage, initials: profileImage.initials}\"\n :suppress-initials=\"profileImage.suppressInitials\" class=\"me-2\" />\n <div class=\"d-inline-block text-start\">\n <div class=\"small-text\">\n {{ label }}\n </div>\n\n <!-- Q: Why have a button here when the whole component is clickable?\n A: For accessibility to screenreader and keyboard navigation users -->\n <button v-if=\"campaignerContactable\" type=\"button\" :title=\"i18n.t('public.contact.contact_creator')\"\n class=\"btn btn-link unmarked-link p-0\" @click=\"$emit('click')\">\n {{ creatorDisplayName }}\n <i class=\"icon-mail\" />\n </button>\n <div v-else>\n {{ creatorDisplayName }}\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport ProfileImage from '@/components/members/profile-image'\n\nexport default {\n components: { ProfileImage },\n\n props: {\n campaignerContactable: {\n type: Boolean,\n required: true\n },\n creatorDisplayName: {\n type: String,\n required: true\n },\n label: {\n type: String,\n required: true\n },\n profileImage: {\n type: Object,\n required: false\n }\n },\n\n emits: ['click']\n}\n</script>\n","import { render } from \"./campaign-creator-profile.vue?vue&type=template&id=8a7b83ee\"\nimport script from \"./campaign-creator-profile.vue?vue&type=script&lang=js\"\nexport * from \"./campaign-creator-profile.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","<template>\n <div>\n <campaign-creator-profile :creator-display-name=\"creatorDisplayName\" :profile-image=\"profileImage\"\n :label=\"label\" :campaigner-contactable=\"campaignerContactable\"\n class=\"creator-profile\" :class=\"{contactable: campaignerContactable}\"\n @click=\"openContactFormIfEnabled\" />\n <contact-message-modal v-if=\"campaignerContactable\" ref=\"modal\" :create-path=\"contactPath\" :title=\"modalTitle\"\n :current-user=\"currentUser\" :data-processing-consent=\"dataProcessingConsent\" />\n </div>\n</template>\n\n<script>\nimport CampaignCreatorProfile from './campaign-creator-profile'\nimport ContactMessageModal from '@/components/contact-message-modal'\n\nconst CONTACT_CAMPAIGNER_URL_FRAGMENT = '#contact-campaigner'\n\nexport default {\n components: { CampaignCreatorProfile, ContactMessageModal },\n\n props: {\n campaignerContactable: {\n type: Boolean,\n required: true\n },\n contactPath: {\n type: String,\n required: false\n },\n creatorDisplayName: {\n type: String,\n required: true\n },\n currentUser: {\n type: Object,\n required: false\n },\n dataProcessingConsent: {\n type: Object,\n required: true\n },\n label: {\n type: String,\n required: true\n },\n profileImage: {\n type: Object,\n required: false\n }\n },\n\n computed: {\n modalTitle() {\n return this.i18n.t('public.contact.contact_user', {user_name: this.creatorDisplayName})\n }\n },\n\n mounted() {\n // If the URL has #contact-campaigner, automatically open the contact form on page load\n const currentUrl = new URL(window.location.href)\n if (currentUrl.hash === CONTACT_CAMPAIGNER_URL_FRAGMENT) {\n this.openContactFormIfEnabled()\n }\n },\n\n methods: {\n openContactFormIfEnabled() {\n if (this.campaignerContactable) {\n this.$refs.modal.open()\n }\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.creator-profile.contactable {\n cursor: pointer;\n\n &:hover {\n ::v-deep(.btn-link) {\n text-decoration: underline;\n }\n }\n}\n</style>\n","import { render } from \"./campaign-creator-block.vue?vue&type=template&id=3b84928a&scoped=true\"\nimport script from \"./campaign-creator-block.vue?vue&type=script&lang=js\"\nexport * from \"./campaign-creator-block.vue?vue&type=script&lang=js\"\n\nimport \"./campaign-creator-block.vue?vue&type=style&index=0&id=3b84928a&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-3b84928a\"]])\n\nexport default __exports__","<template>\n <div class=\"profile-image\" :class=\"sizeClass\">\n <img :src=\"user.profileImage.url\" :title=\"title\" :alt=\"title\">\n <div v-if=\"user.profileImage.isDefault && !suppressInitials\" class=\"initials\">\n {{ user.initials }}\n </div>\n </div>\n</template>\n\n<script>\n\nexport default {\n props: {\n user: {\n type: Object,\n required: true\n },\n title: {\n type: String,\n required: false,\n default: ''\n },\n size: {\n type: String,\n required: false,\n default: 'sm'\n },\n suppressInitials: {\n type: Boolean,\n required: false,\n default: false\n }\n },\n computed: {\n sizeClass() {\n switch (this.size) {\n case 'xs':\n case 'sm':\n case 'md':\n case 'lg':\n return `profile-image-${this.size}`\n default:\n return ''\n }\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n .profile-image {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .initials {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n color: white;\n font-weight: bold;\n }\n\n .profile-image-xs {\n font-size: 8px;\n\n img {\n width: 20px;\n height: 20px;\n }\n }\n\n .profile-image-sm{\n font-size: 14px;\n\n img {\n width: 30px;\n height: 30px;\n }\n }\n\n .profile-image-md{\n font-size: 16px;\n\n img {\n width: 50px;\n height: 50px;\n }\n }\n\n .profile-image-lg {\n font-size: 20px;\n\n img {\n width: 70px;\n height: 70px;\n }\n }\n</style>\n","import { render } from \"./profile-image.vue?vue&type=template&id=21d986bf&scoped=true\"\nimport script from \"./profile-image.vue?vue&type=script&lang=js\"\nexport * from \"./profile-image.vue?vue&type=script&lang=js\"\n\nimport \"./profile-image.vue?vue&type=style&index=0&id=21d986bf&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-21d986bf\"]])\n\nexport default __exports__"],"names":["class","key","components","ProfileImage","props","campaignerContactable","type","Boolean","required","creatorDisplayName","String","label","profileImage","Object","emits","_createElementBlock","onClick","_cache","$event","_ctx","$emit","$props","_createBlock","_component_profile_image","size","user","initials","suppressInitials","_createCommentVNode","_createTextVNode","_createElementVNode","_hoisted_1","_hoisted_2","_toDisplayString","title","i18n","t","_hoisted_3","_hoisted_4","CampaignCreatorProfile","ContactMessageModal","contactPath","currentUser","dataProcessingConsent","computed","modalTitle","this","user_name","mounted","URL","window","location","href","hash","openContactFormIfEnabled","methods","$refs","modal","open","_createVNode","_component_campaign_creator_profile","_normalizeClass","contactable","$options","_component_contact_message_modal","ref","default","sizeClass","src","url","alt","isDefault"],"sourceRoot":""}