window.yoast=window.yoast||{},window.yoast.socialMetadataForms=function(e){var t={};function i(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},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=492)}({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},3:function(e,t){e.exports=window.React},4:function(e,t){e.exports=window.wp.i18n},492: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 o})),i.d(t,"selectorsFactory",(function(){return E}));var o={};i.r(o),i.d(o,"SET_SOCIAL_TITLE",(function(){return n})),i.d(o,"SET_SOCIAL_DESCRIPTION",(function(){return r})),i.d(o,"SET_SOCIAL_IMAGE_URL",(function(){return a})),i.d(o,"SET_SOCIAL_IMAGE_TYPE",(function(){return c})),i.d(o,"SET_SOCIAL_IMAGE_ID",(function(){return s})),i.d(o,"SET_SOCIAL_IMAGE",(function(){return l})),i.d(o,"CLEAR_SOCIAL_IMAGE",(function(){return d})),i.d(o,"setSocialPreviewTitle",(function(){return u})),i.d(o,"setSocialPreviewDescription",(function(){return p})),i.d(o,"setSocialPreviewImageUrl",(function(){return m})),i.d(o,"setSocialPreviewImageType",(function(){return g})),i.d(o,"setSocialPreviewImageId",(function(){return f})),i.d(o,"setSocialPreviewImage",(function(){return b})),i.d(o,"clearSocialPreviewImage",(function(){return h}));const n="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:n,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),E=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},I=i(55);const S={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]:S,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case n: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,o)=>{const{platform:n}=o;return void 0===i?S:n!==t?i:e(i,o)}}var T=Object(I.combineReducers)({facebook:y(w,"facebook"),twitter:y(w,"twitter")}),O=i(1),_=i(4),A=i(8),R=i(16),j=i(6),C=i(0),x=i.n(C),D=i(3),M=i(5),L=i.n(M),P=i(7);const k=e=>e?j.colors.$color_snippet_focus:j.colors.$color_snippet_hover,F=L.a.div`
	position: relative;`,H=L.a.div`
	display: ${e=>e.isActive||e.isHovered?"block":"none"};

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