!function(){function t(t,i){let n=wp.customize.control(t);if(void 0===n)return;let o=(i=i||n.setting.get())["font-family"]&&kirkiGoogleFonts.items[i["font-family"]],e=i.variant?i.variant.toString():"regular",a=wp.customize.control(t+"[variant]"),r=[];if(o){let t=kirkiGoogleFonts.items[i["font-family"]].variants;t.sort(function(t,i){return t<i?-1:+(t>i)}),kirkiFontVariants.complete.forEach(function(i){-1!==t.indexOf(i.value)&&r.push({value:i.value,label:i.label})})}else{let n=t.replace(/]/g,"");n=n.replace(/\[/g,"_"),r=kirkiCustomVariants[n][i["font-family"]]?kirkiCustomVariants[n][i["font-family"]]:kirkiFontVariants.standard}-1!==e.indexOf("i")?i["font-style"]="italic":i["font-style"]="normal",i["font-weight"]="regular"===e||"italic"===e?400:parseInt(e,10),a&&(1<r.length&&n.active()?a.activate():a.deactivate(),a.params.choices=r,a.formattedOptions=[],a.destroy(),r.includes(e)?a.doSelectAction("selectOption",e):a.doSelectAction("selectOption","regular")),wp.hooks.addAction("kirki.dynamicControl.initKirkiControl","kirki",function(t){a&&t.id})}function i(){_.each(kirkiTypographyControls,function(i){t(i),wp.customize(i,function(n){n.bind(function(n){t(i,n)})})})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",i):i()}();