!function(){var t={hideWeight:function(t){""==t.trim()?this.container.hide():this.container.show()},changeStyle:function(t){wp.customize.control("".concat(this.params.extras.id,"[style]"),(function(e){var i,o=jQuery(".customize-control-typography-input",e.container);o.find("option").each((function(){jQuery(this).remove()}));var n=_.isUndefined(CustomizeTypographyObject.googleFonts[t.trim()])?{}:CustomizeTypographyObject.googleFonts[t.trim()].variants;i=Object.keys(n).reduce((function(e,i){return e.push({id:i,text:CustomizeTypographyObject.googleFonts[t.trim()].variants[i]}),e}),[]),o.select2({data:i,placeholder:e.params.placeholder,multiple:!0}).val(e.setting.get()).trigger("change")}))},ready:function(){var t=this;jQuery(".customize-control-typography-input",this.container).select2({placeholder:this.params.placeholder}),this.id=="".concat(this.params.extras.id,"[family]")&&wp.customize(this.id,(function(e){t.changeStyle(e.get()),e.bind((function(e){t.changeStyle(e)}))})),this.id=="".concat(this.params.extras.id,"[style]")&&wp.customize("".concat(this.params.extras.id,"[family]"),(function(e){t.hideWeight(e.get()),e.bind((function(e){t.hideWeight(e)}))}))}};wp.customize.controlConstructor.typography=wp.customize.Control.extend(t)}();