window.yoast=window.yoast||{},window.yoast.socialMetadataForms=function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=498)}({0:function(e,t){e.exports=window.yoast.propTypes},1:function(e,t){e.exports=window.wp.element},16:function(e,t){e.exports=window.yoast.replacementVariableEditor},2:function(e,t){e.exports=window.lodash},22:function(e,t){e.exports=window.yoast.redux},3:function(e,t){e.exports=window.React},4:function(e,t){e.exports=window.wp.i18n},498:function(e,t,i){"use strict";i.r(t),i.d(t,"socialReducer",(function(){return T})),i.d(t,"SocialMetadataPreviewForm",(function(){return q})),i.d(t,"actions",(function(){return n})),i.d(t,"selectorsFactory",(function(){return S}));var n={};i.r(n),i.d(n,"SET_SOCIAL_TITLE",(function(){return o})),i.d(n,"SET_SOCIAL_DESCRIPTION",(function(){return r})),i.d(n,"SET_SOCIAL_IMAGE_URL",(function(){return a})),i.d(n,"SET_SOCIAL_IMAGE_TYPE",(function(){return c})),i.d(n,"SET_SOCIAL_IMAGE_ID",(function(){return s})),i.d(n,"SET_SOCIAL_IMAGE",(function(){return l})),i.d(n,"CLEAR_SOCIAL_IMAGE",(function(){return d})),i.d(n,"setSocialPreviewTitle",(function(){return u})),i.d(n,"setSocialPreviewDescription",(function(){return p})),i.d(n,"setSocialPreviewImageUrl",(function(){return m})),i.d(n,"setSocialPreviewImageType",(function(){return g})),i.d(n,"setSocialPreviewImageId",(function(){return f})),i.d(n,"setSocialPreviewImage",(function(){return b})),i.d(n,"clearSocialPreviewImage",(function(){return h}));const o="SET_SOCIAL_TITLE",r="SET_SOCIAL_DESCRIPTION",a="SET_SOCIAL_IMAGE_URL",c="SET_SOCIAL_IMAGE_TYPE",s="SET_SOCIAL_IMAGE_ID",l="SET_SOCIAL_IMAGE",d="CLEAR_SOCIAL_IMAGE",u=(e,t)=>({type:o,platform:t,title:e}),p=(e,t)=>({type:r,platform:t,description:e}),m=(e,t)=>({type:a,platform:t,imageUrl:e}),g=(e,t)=>({type:c,platform:t,imageType:e}),f=(e,t)=>({type:s,platform:t,imageId:e}),b=(e,t)=>({type:l,platform:t,image:e}),h=e=>({type:d,platform:e});var v=i(2),S=e=>{const t={getFacebookData:t=>Object(v.get)(t,e+".facebook",{}),getFacebookTitle:e=>t.getFacebookData(e).title,getFacebookDescription:e=>t.getFacebookData(e).description,getFacebookImageUrl:e=>t.getFacebookData(e).image.url,getFacebookImageType:e=>t.getFacebookData(e).image.type,getTwitterData:t=>Object(v.get)(t,e+".twitter",{}),getTwitterTitle:e=>t.getTwitterData(e).title,getTwitterDescription:e=>t.getTwitterData(e).description,getTwitterImageUrl:e=>t.getTwitterData(e).image.url,getTwitterImageType:e=>t.getTwitterData(e).image.type};return t},E=i(22);const I={title:"",description:"",warnings:[],image:{bytes:null,type:null,height:null,width:null,url:"",id:null,alt:""}};function w(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case o:return{...e,title:t.title};case r:return{...e,description:t.description};case l:return{...e,image:{...t.image}};case a:return{...e,image:{...e.image,url:t.imageUrl}};case c:return{...e,image:{...e.image,type:t.imageType}};case s:return{...e,image:{...e.image,id:t.imageId}};case d:return{...e,image:{bytes:null,type:null,height:null,width:null,url:"",id:null,alt:""}};default:return e}}function y(e,t){return(i,n)=>{const{platform:o}=n;return void 0===i?I:o!==t?i:e(i,n)}}var T=Object(E.combineReducers)({facebook:y(w,"facebook"),twitter:y(w,"twitter")}),O=i(1),_=i(4),R=i(9),A=i(16),C=i(6),j=i(0),x=i.n(j),D=i(3),M=i(5),L=i.n(M),P=i(8);const k=e=>e?C.colors.$color_snippet_focus:C.colors.$color_snippet_hover,F=L.a.div`
	position: relative;`,V=L.a.div`
	display: ${e=>e.isActive||e.isHovered?"block":"none"};

	::before {
		position: absolute;
		top: -2px;
		${Object(R.getDirectionalStyle)("left","right")}: -25px;
		width: 24px;
		height: 24px;
		background-image: url(
		${e=>Object(R.getDirectionalStyle)(Object(C.angleRight)(k(e.isActive)),Object(C.angleLeft)(k(e.isActive)))}
		);
		color: ${e=>k(e.isActive)};
		background-size: 24px;
		background-repeat: no-repeat;
		background-position: center;
		content: "";
	}
`;V.propTypes={isActive:x.a.bool,isHovered:x.a.bool},V.defaultProps={isActive:!1,isHovered:!1};const H=(U=P.ImageSelect,function e(t){e.propTypes={isActive:x.a.bool.isRequired,isHovered:x.a.bool.isRequired};const{isActive:i,isHovered:n,...o}=t;return Object(O.createElement)(F,null,Object(O.createElement)(V,{isActive:i,isHovered:n}),Object(O.createElement)(U,o))});var U;class G extends D.Component{constructor(e){super(e),this.onImageEnter=e.onMouseHover.bind(this,"image"),this.onTitleEnter=e.onMouseHover.bind(this,"title"),this.onDescriptionEnter=e.onMouseHover.bind(this,"description"),this.onLeave=e.onMouseHover.bind(this,""),this.onImageSelectBlur=e.onSelect.bind(this,""),this.onSelectTitleEditor=this.onSelectEditor.bind(this,"title"),this.onSelectDescriptionEditor=this.onSelectEditor.bind(this,"description"),this.onDeselectEditor=this.onSelectEditor.bind(this,""),this.onTitleEditorRef=this.onSetEditorRef.bind(this,"title"),this.onDescriptionEditorRef=this.onSetEditorRef.bind(this,"description")}onSelectEditor(e){this.props.onSelect(e)}onSetEditorRef(e,t){this.props.setEditorRef(e,t)}render(){const{socialMediumName:e,onSelectImageClick:t,onRemoveImageClick:i,title:n,titleInputPlaceholder:o,description:r,descriptionInputPlaceholder:a,onTitleChange:c,onDescriptionChange:s,onReplacementVariableSearchChange:l,hoveredField:d,activeField:u,isPremium:p,replacementVariables:m,recommendedReplacementVariables:g,imageWarnings:f,imageUrl:b,imageAltText:h,idSuffix:v}=this.props,S=!!b,E=Object(_.sprintf)(Object(_.__)("%s image","wordpress-seo"),e),I=Object(_.sprintf)(Object(_.__)("%s title","wordpress-seo"),e),w=Object(_.sprintf)(Object(_.__)("%s description","wordpress-seo"),e),y=e.toLowerCase();return Object(O.createElement)(D.Fragment,null,Object(O.createElement)(H,{label:E,onClick:t,onRemoveImageClick:i,warnings:f,imageSelected:S,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave,isActive:"image"===u,isHovered:"image"===d,imageUrl:b,imageAltText:h,hasPreview:!p,imageUrlInputId:Object(R.join)([y,"url-input",v]),selectImageButtonId:Object(R.join)([y,"select-button",v]),replaceImageButtonId:Object(R.join)([y,"replace-button",v]),removeImageButtonId:Object(R.join)([y,"remove-button",v])}),Object(O.createElement)(A.ReplacementVariableEditor,{onChange:c,content:n,placeholder:o,replacementVariables:m,recommendedReplacementVariables:g,type:"title",fieldId:Object(R.join)([y,"title-input",v]),label:I,onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onSearchChange:l,isActive:"title"===u,isHovered:"title"===d,withCaret:!0,onFocus:this.onSelectTitleEditor,onBlur:this.onDeselectEditor,editorRef:this.onTitleEditorRef}),Object(O.createElement)(A.ReplacementVariableEditor,{onChange:s,content:r,placeholder:a,replacementVariables:m,recommendedReplacementVariables:g,type:"description",fieldId:Object(R.join)([y,"description-input",v]),label:w,onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onSearchChange:l,isActive:"description"===u,isHovered:"description"===d,withCaret:!0,onFocus:this.onSelectDescriptionEditor,onBlur:this.onDeselectEditor,editorRef:this.onDescriptionEditorRef}))}}G.propTypes={socialMediumName:x.a.oneOf(["Twitter","Facebook"]).isRequired,onSelectImageClick:x.a.func.isRequired,onRemoveImageClick:x.a.func.isRequired,title:x.a.string.isRequired,description:x.a.string.isRequired,onTitleChange:x.a.func.isRequired,onDescriptionChange:x.a.func.isRequired,onReplacementVariableSearchChange:x.a.func,isPremium:x.a.bool,hoveredField:x.a.string,activeField:x.a.string,onSelect:x.a.func,replacementVariables:A.replacementVariablesShape,recommendedReplacementVariables:x.a.arrayOf(x.a.string),imageWarnings:x.a.array,imageUrl:x.a.string,imageAltText:x.a.string,titleInputPlaceholder:x.a.string,descriptionInputPlaceholder:x.a.string,setEditorRef:x.a.func,onMouseHover:x.a.func,idSuffix:x.a.string},G.defaultProps={replacementVariables:[],recommendedReplacementVariables:[],imageWarnings:[],hoveredField:"",activeField:"",onSelect:()=>{},onReplacementVariableSearchChange:null,imageUrl:"",imageAltText:"",titleInputPlaceholder:"",descriptionInputPlaceholder:"",isPremium:!1,setEditorRef:()=>{},onMouseHover:()=>{},idSuffix:""};var q=G},5:function(e,t){e.exports=window.yoast.styledComponents},6:function(e,t){e.exports=window.yoast.styleGuide},8:function(e,t){e.exports=window.yoast.componentsNew},9:function(e,t){e.exports=window.yoast.helpers}});