!function(){var t={942(t,e){var n;
/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/!function(){"use strict";var o={}.hasOwnProperty;function a(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=i(t,r(n)))}return t}function r(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return a.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var n in t)o.call(t,n)&&t[n]&&(e=i(e,n));return e}function i(t,e){return e?t?t+" "+e:t+e:t}t.exports?(a.default=a,t.exports=a):void 0===(n=function(){return a}.apply(e,[]))||(t.exports=n)}()}},e={};function n(o){var a=e[o];if(void 0!==a)return a.exports;var r=e[o]={exports:{}};return t[o](r,r.exports,n),r.exports}!function(){"use strict";var t=window.wp.element,e=window.wp.hooks,o=(n(942),window.wp.i18n);let a={project_id:"",fonts:[]};var r=function(){const[e,n]=(0,t.useState)(!1),[r,i]=(0,t.useState)(!1),[c,l]=(0,t.useState)(a),[s,u]=(0,t.useState)(null),[p,f]=(0,t.useState)(!1);return(0,t.useEffect)(function(){!async function(){const t=new FormData;t.append("action","blocksy_get_adobe_typekit_settings");try{const e=await fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});if(200===e.status){const{success:t,data:n}=await e.json();t&&(a=n.settings,l(n.settings))}}catch(t){}}()},[]),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"ct-extension-options ct-adobe-fonts-options"},(0,t.createElement)("h4",null,(0,o.__)("Adobe Fonts Settings","blocksy-companion")),(0,t.createElement)("p",{dangerouslySetInnerHTML:{__html:(0,o.sprintf)((0,o.__)('Once you insert your %sProject ID%s and click the "Fetch Fonts" button, your fonts will become available in all theme’s typography options.',"blocksy-companion"),'<a href="https://fonts.adobe.com/my_fonts?browse_mode=all#web_projects-section" target="_blank">',"</a>")}}),(0,t.createElement)("form",{onSubmit:function(t){t.preventDefault(),!s&&!c.project_id||null!==s&&!s||(f(!1),i(!0),wp.ajax.send({url:`${wp.ajax.settings.url}?action=blocksy_update_adobe_typekit_settings`,contentType:"application/json",data:JSON.stringify({project_id:s||c.project_id})}).then(function({settings:t}){a=t,l(t),i(!1)}).fail(function(t){console.error(t),f(!0),i(!1)}))}},(0,t.createElement)("div",{className:"ct-option-input"},(0,t.createElement)("input",{type:"text",placeholder:(0,o.__)("Project ID","blocksy-companion"),value:null===s?c.project_id:s,onChange:function(t){return u(t.target.value)}}),r&&(0,t.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},(0,t.createElement)("g",{transform:"translate(50,50)"},(0,t.createElement)("g",{transform:"scale(1)"},(0,t.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),(0,t.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},(0,t.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))),(0,t.createElement)("button",{className:"ct-button-primary"},(0,o.__)("Fetch Fonts","blocksy-companion"))),p&&(0,t.createElement)("span",{className:"ct-option-description"},(0,o.__)("Please enter a valid Project ID to get all fonts.","blocksy-companion")),c.fonts&&c.fonts.length>0&&(0,t.createElement)("div",{className:"ct-project-fonts"},(0,t.createElement)("h4",null,(0,o.__)("Available Fonts","blocksy-companion")),(0,t.createElement)("ul",null,c.fonts.map(function({name:e,variations:n},a){return(0,t.createElement)("li",null,(0,t.createElement)("span",null,e),(0,t.createElement)("i",null,(0,o.__)("Variations","blocksy-companion"),": ",n.map(function(t){return function(t,e=!1){return function(t){return{n1:"Thin 100",i1:"Thin 100 Italic",n2:"Extra-Light 200",i2:"Extra-Light 200 Italic",n3:"Light 300",i3:"Light 300 Italic",n4:"Regular 400",i4:t?"Italic":"Regular 400 Italic",n5:"Medium 500",i5:"Medium 500 Italic",n6:"Semi-Bold 600",i6:"Semi-Bold 600 Italic",n7:"Bold 700",i7:"Bold 700 Italic",n8:"Extra-Bold 800",i8:"Extra-Bold 800 Italic",n9:"Ultra-Bold 900",i9:"Ultra-Bold 900 Italic"}}(e)[t]}(t)}).join(", ")))})))))};(0,e.addFilter)("blocksy.extensions.current_extension_content","blocksy",function(e,{extension:n,onExtsSync:o}){return"adobe-typekit"!==n.name?e:{...e,content:(0,t.createElement)(r,{extension:n,onExtsSync:o})}})}()}();