!function(p){var g=wp.customize;AstTypography={init:function(){AstTypography._initFonts()},_initFonts:function(){p(".customize-control-ast-font-family select").each(function(e){if(void 0!==astra.customizer){var c=astra.customizer.settings.google_fonts,t=p(this).data("name");p(this).html(c),p("select[data-name='"+t+"'] option[value='inherit']").text(p(this).data("inherit"));var s=p(this).data("value");p(this).val(s)}}),p(".customize-control-ast-font-family select").each(AstTypography._initFont),p(".customize-control-ast-font-family select, .customize-control-ast-font-variant select").selectWoo(),p(".customize-control-ast-font-variant select").on("select2:unselecting",function(e){var c=p(this).data("customize-setting-link");(e.params.args.data.id||"")&&(p(this).find('option[value="'+e.params.args.data.id+'"]').removeAttr("selected"),null===p(this).val()&&g(c).set(""))})},_initFont:function(){var e=p(this),c=e.data("customize-setting-link"),t=e.data("connected-control"),s=e.data("connected-variant");void 0!==t&&(g(c).bind(AstTypography._fontSelectChange),AstTypography._setFontWeightOptions.apply(g(c),[!0])),void 0!==s&&(g(c).bind(AstTypography._fontSelectChange),AstTypography._setFontVarianttOptions.apply(g(c),[!0]))},_fontSelectChange:function(){var e=g.control(this.id).container.find("select").data("connected-variant");AstTypography._setFontWeightOptions.apply(this,[!1]),void 0!==e&&AstTypography._setFontVarianttOptions.apply(this,[!1])},_cleanGoogleFonts:function(e){if(!e.includes(","))return e;var c=e.split(","),t=new RegExp("'","gi"),s=c[0].replace(t,"");return void 0!==AstFontFamilies.google[s]&&(e=s),e},_getWeightObject:function(e){var c=["400","600"];return"inherit"==e?c=["100","200","300","400","500","600","700","800","900"]:void 0!==AstFontFamilies.system[e]?c=AstFontFamilies.system[e].weights:void 0!==AstFontFamilies.google[e]?(c=AstFontFamilies.google[e][0],c=Object.keys(c).map(function(e){return c[e]})):void 0!==AstFontFamilies.custom[e]&&(c=AstFontFamilies.custom[e].weights),c},_setFontWeightOptions:function(e){var c=0,t=g.control(this.id).container.find("select"),s=this(),a="",l=t.data("connected-control"),r=g.control(l).container.find("select"),o=r.data("inherit"),n=e?r.val():"400",i=["400","600"],h="",v=astraTypo;"inherit"==s&&(n=e?r.val():"inherit");s=AstTypography._cleanGoogleFonts(s),i=AstTypography._getWeightObject(s);for(i=p.merge(["inherit"],i),v.inherit=o;c"+v[i[c]]+"");r.html(h),e||(g(l).set(""),g(l).set(n))},_setFontVarianttOptions:function(e){var c=0,t=g.control(this.id).container.find("select"),s=this(),a="",l=t.data("connected-variant"),r=g.control(l).container.find("select"),o=g.control(l).container.find(".ast-font-variant-hidden-value"),n="",i="",h=r.data("inherit"),v=astraTypo,p=o.val().split(",");"Google"==(t.find('option[value="'+t.val()+'"]').closest("optgroup").attr("label")||"")?r.parent().removeClass("ast-hide"):r.parent().addClass("ast-hide");s=AstTypography._cleanGoogleFonts(s);var d=AstTypography._getWeightObject(s);v.inherit=h;for(c=0;c"+v[d[c]]+""}r.html(i),e||g(l).set("")}},p(function(){AstTypography.init()})}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=function(e,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(c),c}:t(jQuery)}(function(h){var e=function(){if(h&&h.fn&&h.fn.select2&&h.fn.select2.amd)var e=h.fn.select2.amd;var c,t,s,d,l,r,m,g,u,w,z,f,a,o,b;function M(e,c){return a.call(e,c)}function n(e,c){var t,s,a,l,r,o,n,i,h,v,p,d=c&&c.split("/"),m=z.map,g=m&&m["*"]||{};if(e){for(r=(e=e.split("/")).length-1,z.nodeIdCompat&&b.test(e[r])&&(e[r]=e[r].replace(b,"")),"."===e[0].charAt(0)&&d&&(e=d.slice(0,d.length-1).concat(e)),h=0;h":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return c[e]})},e.entityDecode=function(e){var c=document.createElement("textarea");return c.innerHTML=e,c.value},e.appendMany=function(e,c){if("1.7"===l.fn.jquery.substr(0,3)){var t=l();l.map(c,function(e){t=t.add(e)}),c=t}e.append(c)},e.isTouchscreen=function(){return void 0===e._isTouchscreenCache&&(e._isTouchscreenCache="ontouchstart"in document.documentElement),e._isTouchscreenCache},e}),e.define("select2/results",["jquery","./utils"],function(d,e){function s(e,c,t){this.$element=e,this.data=t,this.options=c,s.__super__.constructor.call(this)}return e.Extend(s,e.Observable),s.prototype.render=function(){var e=d('
    ');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},s.prototype.clear=function(){this.$results.empty()},s.prototype.displayMessage=function(e){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var t=d(''),s=this.options.get("translations").get(e.message);t.append(c(s(e.args))),t[0].className+=" select2-results__message",this.$results.append(t)},s.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},s.prototype.append=function(e){this.hideLoading();var c=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var t=0;t",{class:"select2-results__options select2-results__options--nested",role:"listbox"});p.append(n),l.attr("role","list"),l.append(r),l.append(p)}else this.template(e,c);return d.data(c,"data",e),c},s.prototype.bind=function(c,e){var n=this,t=c.id+"-results";this.$results.attr("id",t),c.on("results:all",function(e){n.clear(),n.append(e.data),c.isOpen()&&(n.setClasses(),n.highlightFirstItem())}),c.on("results:append",function(e){n.append(e.data),c.isOpen()&&n.setClasses()}),c.on("query",function(e){n.hideMessages(),n.showLoading(e)}),c.on("select",function(){c.isOpen()&&(n.setClasses(),n.highlightFirstItem())}),c.on("unselect",function(){c.isOpen()&&(n.setClasses(),n.highlightFirstItem())}),c.on("open",function(){n.$results.attr("aria-expanded","true"),n.$results.attr("aria-hidden","false"),n.setClasses(),n.ensureHighlightVisible()}),c.on("close",function(){n.$results.attr("aria-expanded","false"),n.$results.attr("aria-hidden","true"),n.$results.removeAttr("aria-activedescendant")}),c.on("results:toggle",function(){var e=n.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),c.on("results:select",function(){var e=n.getHighlightedResults();if(0!==e.length){var c=e.data("data");"true"==e.attr("data-selected")?n.trigger("close",{}):n.trigger("select",{data:c})}}),c.on("results:previous",function(){var e=n.getHighlightedResults(),c=n.$results.find("[data-selected]"),t=c.index(e);if(0!==t){var s=t-1;0===e.length&&(s=0);var a=c.eq(s);a.trigger("mouseenter");var l=n.$results.offset().top,r=a.offset().top,o=n.$results.scrollTop()+(r-l);0===s?n.$results.scrollTop(0):r-l<0&&n.$results.scrollTop(o)}}),c.on("results:next",function(){var e=n.getHighlightedResults(),c=n.$results.find("[data-selected]"),t=c.index(e)+1;if(!(t>=c.length)){var s=c.eq(t);s.trigger("mouseenter");var a=n.$results.offset().top+n.$results.outerHeight(!1),l=s.offset().top+s.outerHeight(!1),r=n.$results.scrollTop()+l-a;0===t?n.$results.scrollTop(0):athis.$results.outerHeight()||l<0)&&this.$results.scrollTop(a)}},s.prototype.template=function(e,c){var t=this.options.get("templateResult"),s=this.options.get("escapeMarkup"),a=t(e,c);null==a?c.style.display="none":"string"==typeof a?c.innerHTML=s(a):d(c).append(a)},s}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(s,e,a){function t(e,c){this.$element=e,this.options=c,t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.render=function(){var e=s('');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e},t.prototype.bind=function(e,c){var t=this,s=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){t.trigger("focus",e)}),this.$selection.on("blur",function(e){t._handleBlur(e)}),this.$selection.on("keydown",function(e){t.trigger("keypress",e),e.which===a.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){t.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){t.update(e.data)}),e.on("open",function(){t.$selection.attr("aria-expanded","true"),t.$selection.attr("aria-owns",s),t._attachCloseHandler(e)}),e.on("close",function(){t.$selection.attr("aria-expanded","false"),t.$selection.removeAttr("aria-activedescendant"),t.$selection.removeAttr("aria-owns"),window.setTimeout(function(){t.$selection.focus()},1),t._detachCloseHandler(e)}),e.on("enable",function(){t.$selection.attr("tabindex",t._tabindex)}),e.on("disable",function(){t.$selection.attr("tabindex","-1")})},t.prototype._handleBlur=function(e){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||s.contains(c.$selection[0],document.activeElement)||c.trigger("blur",e)},1)},t.prototype._attachCloseHandler=function(e){s(document.body).on("mousedown.select2."+e.id,function(e){var c=s(e.target),t=c.closest(".select2");s(".select2.select2-container--open").each(function(){var e=s(this);this!=t[0]&&(e.data("element").select2("close"),setTimeout(function(){e.find("*:focus").blur(),c.focus()},1))})})},t.prototype._detachCloseHandler=function(e){s(document.body).off("mousedown.select2."+e.id)},t.prototype.position=function(e,c){c.find(".selection").append(e)},t.prototype.destroy=function(){this._detachCloseHandler(this.container)},t.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},t}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,c,a,t){function l(){l.__super__.constructor.apply(this,arguments)}return a.Extend(l,c),l.prototype.render=function(){var e=l.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(''),e},l.prototype.bind=function(c,e){var t=this;l.__super__.bind.apply(this,arguments);var s=c.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",s),this.$selection.attr("role","combobox"),this.$selection.on("mousedown",function(e){1===e.which&&t.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("keydown",function(e){!c.isOpen()&&48<=e.which&&e.which<=90&&c.open()}),this.$selection.on("blur",function(e){}),c.on("focus",function(e){c.isOpen()||t.$selection.focus()}),c.on("selection:update",function(e){t.update(e.data)})},l.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},l.prototype.display=function(e,c){var t=this.options.get("templateSelection");return this.options.get("escapeMarkup")(t(e,c))},l.prototype.selectionContainer=function(){return e("")},l.prototype.update=function(e){if(0!==e.length){var c=e[0],t=this.$selection.find(".select2-selection__rendered"),s=a.entityDecode(this.display(c,t));t.empty().text(s),t.prop("title",c.title||c.text)}else this.clear()},l}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(s,e,o){function a(e,c){a.__super__.constructor.apply(this,arguments)}return o.Extend(a,e),a.prototype.render=function(){var e=a.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('
      '),e},a.prototype.bind=function(c,e){var t=this;a.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){t.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!t.options.get("disabled")){var c=s(this).parent().data("data");t.trigger("unselect",{originalEvent:e,data:c})}}),this.$selection.on("keydown",function(e){!c.isOpen()&&48<=e.which&&e.which<=90&&c.open()}),c.on("focus",function(){t.focusOnSearch()})},a.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},a.prototype.display=function(e,c){var t=this.options.get("templateSelection");return this.options.get("escapeMarkup")(t(e,c))},a.prototype.selectionContainer=function(){return s('
    • ')},a.prototype.focusOnSearch=function(){var e=this;void 0!==e.$search&&setTimeout(function(){e._keyUpPrevented=!0,e.$search.focus()},1)},a.prototype.update=function(e){if(this.clear(),0!==e.length){for(var c=[],t=0;t