/*! js-cookie v3.0.5 | MIT */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,function(){"use strict";function e(e){for(var t=1;t{"use strict";var r={7437:(r,t,e)=>{e.d(t,{Dq:()=>n});const c="granted",a="denied";function n(r){if(!["analytics","advertising"].includes(r))throw new Error("Unrecognised cookie consent type "+r);const t=(e=`wccom_cookie_consent_${r}`,document.cookie.split("; ").find((r=>r.startsWith(e+"=")))?.split("=")[1]);var e;if(a===t)return!1;if("advertising"===r&&c!==t){if(document.body.classList.contains("gdpr"))return!1;if(document.body.classList.contains("us-cookie-banner"))return!1;if(navigator?.globalPrivacyControl)return!1}return!0}const o={canTrackUser:n};window.wccom=window.wccom||{},window.wccom=Object.assign(window.wccom,o)}},t={};function e(c){var a=t[c];if(void 0!==a)return a.exports;var n=t[c]={exports:{}};return r[c](n,n.exports,e),n.exports}e.d=(r,t)=>{for(var c in t)e.o(t,c)&&!e.o(r,c)&&Object.defineProperty(r,c,{enumerable:!0,get:t[c]})},e.o=(r,t)=>Object.prototype.hasOwnProperty.call(r,t);var c,a,n=e(7437);window.wccom=window.wccom||{},wccom.fireTracksEvent=function(r,t,e){r.match(/^[a-z_][a-z0-9_]*$/),window?.localStorage?.getItem("wccom-tracks-debug");const c=()=>{void 0===t&&(t={}),wccom.fillReferer(t),t.current_url=window.location.href;const e=new FormData;e.append("action","woothemes_tracks_ajax"),e.append("event_name",r);for(const r of Object.keys(t))e.append("properties["+r+"]",t[r]);if(navigator.sendBeacon){const r=navigator.sendBeacon(wteVars.ajaxurl,e);if(wccom.isFiringFirstTrack=!1,r)return void(wccom.hasFiredFirstTrack=!0)}const c={action:"woothemes_tracks_ajax",event_name:r,properties:t};jQuery.post(wteVars.ajaxurl,c).done((function(){wccom.hasFiredFirstTrack=!0,wccom.isFiringFirstTrack=!1})).fail((function(){wccom.isFiringFirstTrack=!1}))};(e||(0,n.Dq)("analytics"))&&wccom.canFireTrack()?(wccom.hasFiredFirstTrack||(wccom.isFiringFirstTrack=!0),c()):wccom.addTrackCallback(c)},wccom.waitUntilCanSendTracks=function(){return new Promise((r=>{setTimeout((function t(){(0,n.Dq)("analytics")&&wccom.canFireTrack()?r():setTimeout(t,250)}),0)}))},wccom.addTrackCallback=(c=[],a=null,function(r){"function"==typeof r&&(c.push(r),a||(a=wccom.waitUntilCanSendTracks()).then((()=>(c.forEach((r=>r())),void(c=[])))))}),wccom.hasFiredFirstTrack=!1,wccom.isFiringFirstTrack=!1,wccom.isTrackIdSet=function(){return Boolean(function(){let r="";const t=("; "+document.cookie).split("; woo_tk_ai=");return 2===t.length&&(r=t.pop().split(";").shift()),r}())},wccom.canFireTrack=function(){const r="1"===wteVars.authenticated;return wccom.isTrackIdSet()||r||!wccom.hasFiredFirstTrack&&!wccom.isFiringFirstTrack},wccom.fillReferer=function(r){void 0!==r._via_ref&&""!==r._via_ref||(r._via_ref=""!==document.referrer?document.referrer:window.location.href)},jQuery((function(){jQuery("#subscription-download").on("click",(function(){var r=jQuery(this).data("product-name");wccom.fireTracksEvent("subscription_download",{product_name:r})})),jQuery("#normal-download").on("click",(function(){var r=jQuery(this).data("product-name");wccom.fireTracksEvent("normal_download",{product_name:r})})),jQuery("#wc-install-button").on("click",(function(){wccom.fireTracksEvent("woocommerce_install")})),jQuery("#theme_demo_link").on("click",(function(){var r;r=jQuery(this).data("theme-name"),wccom.fireTracksEvent("demo_link_clicked",{product_name:r})})),jQuery("#theme_buynow_link").on("click",(function(){var r;r=jQuery(this).data("theme-name"),wccom.fireTracksEvent("buy_now_link_clicked",{product_name:r})})),jQuery(document).on("wtTracksRecord",(function(r){wccom.fireTracksEvent(r.detail.name,r.detail.props)})),jQuery(".wccom-breadcrumb a").on("click",(function(r){var t={label:r.delegateTarget.text,href:r.delegateTarget.href,url:document.location.href};wccom.fireTracksEvent("bread_crumb_clicked",t)})),jQuery(document).on("click",".single_add_to_cart_button",(function(r){var t=r.currentTarget.dataset.tracksPosition,e=r.currentTarget.dataset.tracksIs_paid,c=r.currentTarget.dataset.tracksIs_freemium,a=r.currentTarget.dataset.tracksFreemium_type,n=r.currentTarget.dataset.tracksIs_trending,o=r.currentTarget.dataset.tracksSource,i=r.currentTarget.dataset.tracksProductId,s=r.currentTarget.dataset.tracksIsBusinessService,u=r.currentTarget.dataset.tracksSubscription_plan,d=r.currentTarget.dataset.tracksPage_type,m=r.currentTarget.dataset.tracksUsed_currency,w={position:t,is_paid:e,is_trending:n,is_freemium:c,is_business_service:s,product_id:i,source:o};void 0!==a&&(w.freemium_type=a),void 0!==u&&(w.subscription_plan=u),void 0!==d&&(w.page_type=d),void 0!==m&&(w.used_currency=m);var l=new URLSearchParams(window.location.search).get("utm_source");l&&(w.utm_source=l),wccom.fireTracksEvent("add_to_cart_button_clicked",w)})),jQuery('a[href*="add-cart-item="]').on("click",(function(r){var t=r.delegateTarget.href.split("add-cart-item=")[1].replace(/[^\d]/g,"");t&&wccom.fireTracksEvent("add_cart_item_button_clicked",{product_id:parseInt(t,10)})})),jQuery(document).on("click","[data-tracks]",(function(r){var t=r.currentTarget.dataset.tracks,e={};if(t){for(var c in r.currentTarget.dataset)r.currentTarget.dataset.hasOwnProperty(c)&&"tracks"===c.substring(0,6)&&"tracks"!==c&&"tracksView"!==c&&(e[c.substring(6).toLowerCase()]=r.currentTarget.dataset[c]);e.url?.includes("/wp-admin/")&&(e.url=document.location.href),wccom.fireTracksEvent(t,e)}})),jQuery("body").on("click",".wc-block-cart__submit-button",(function(){wccom.fireTracksEvent("cart_continue_button_clicked")}));var r=document.querySelectorAll("[data-tracks-view]");if(0{var t={1445:()=>{jQuery(document).ready((function(t){var e={action:"maybe_set_gtm_cookie",is_admin:wccom_plugins_params.is_admin};jQuery.post(wccom_plugins_params.ajax_url,e,(function(t){dataLayer.push({user_type:t})})),t(".single_add_to_cart_button, .single-product form.cart button.is-primary").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"add to basket",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t("form.cart > button.single_docs_button").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"add to basket",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t("a.wccom-bundle-button","a.wccom-mock-bundle-button").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"add to basket",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t("#theme_buynow_link").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"add to basket",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t("#theme_demo_link").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"view demo",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t(".all-themes-pricing .button").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"add to basket",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName,eventValue:""})})),t(".woocommerce-cart .graphflow-recommendations a").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"view recommendation",eventAction:"cart",eventLabel:t(this).attr("title"),eventValue:""})})),t(".single-product .graphflow-recommendations a").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"view recommendation",eventAction:"product",eventLabel:t(this).attr("title"),eventValue:""})})),t("div.product-type-external .cart a.button").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"view external product",eventAction:wccom_plugins_params.productCategory,eventLabel:wccom_plugins_params.productName})})),t("#wc_introduction .wc_learn_more").on("click",(function(){dataLayer.push({event:"gtm_click",eventCategory:"Overview",eventAction:"WooCommerce",eventLabel:"Overview Video",eventValue:""})})),t(".main-search .title").on("click","a",(function(){var e=t(this).parents(".results-group"),o=t(this).parents(".results-item").index();(10{!function(){function t(t){const e=[].slice.call(t.currentTarget.classList),o={properties:{}};e.forEach((function(t){const e=t.split("__");if(t.includes("wccom-tracks-name"))o.name=e[1];else{const t=e[1],c=e[2];t&&c&&(o.properties[t]=c)}})),o.name&&((wccom||{}).fireTracksEvent||function(){})(o.name,o.properties)}function e(t){const e={properties:{}},o=t.currentTarget.dataset,c="wccomTracks";for(const t in o)if(c===t)e.name=o[t];else if(t.includes(c)){const c=t.slice(11).toLowerCase().replace(/([A-Z])/g,(function(t){return`_${t.toLowerCase()}`}));e.properties[c]=o[t]}e.name&&((wccom||{}).fireTracksEvent||function(){})(e.name,e.properties)}document.addEventListener("DOMContentLoaded",(function(){[].slice.call(document.getElementsByClassName("wccom-tracks")).forEach((function(e){e.addEventListener("click",t)})),[].slice.call(document.querySelectorAll("[data-wccom-tracks]")).forEach((function(t){t.addEventListener("click",e)}))}))}()}},e={};function o(c){var n=e[c];if(void 0!==n)return n.exports;var r=e[c]={exports:{}};return t[c](r,r.exports,o),r.exports}(()=>{"use strict";o(6112);const t={isValidUrl(t){try{const e=["http:","https:"],o=new URL(t);return!!e.includes(o.protocol)&&(!(!t.startsWith(o.protocol+"//")||t.startsWith(o.protocol+"///"))&&/^([a-z0-9]+(-+[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(o.hostname))}catch(t){return!1}},parseUrl(t=window.location.href,e=!1){const o=t.split("?");return e&&(o[0]=o[0].split("#")[0]),o[1]?{url:o[0],params:this.queryStringToObject(o[1])}:{url:o[0],params:{}}},queryStringToObject:t=>(t||window.location.search).replace(/(^\?)/,"").split("&").map(function(t){return this[(t=t.split("="))[0]]=t[1],this}.bind({}))[0],objectToQueryString:t=>Object.keys(t).map((e=>t[e]?e+"="+t[e]:e)).join("&"),getLoginUrl(){const{pathname:t,search:e,hash:o}=window.location;let c=`/sso?next=${encodeURIComponent(`${t}${e}${o}`)}`;try{const t=window.sessionStorage.getItem("wccom_landing_referrer");t&&(c+=`&original_referrer=${encodeURIComponent(t)}`)}catch(t){}return c},maybeResizeImage(e,o){const c=t.parseUrl(e).params,n=parseInt(c.w);return c&&"number"==typeof o&&Number.isInteger(n)?t.fixedImageSize(e,n,parseInt(n*o),"resize"):e},fixedImageSize(e,o,c,n="fit"){if(!["fit","resize"].includes(n))return e;const r=t.parseUrl(e),a=r.params;return"object"!=typeof a?e:(["w","h","resize","crop","fit"].forEach((t=>delete a[t])),a[n]=o+","+c,r.url+"?"+this.objectToQueryString(a))},setViewportHeightCSSProperty(){const t=.01*window.innerHeight;document.documentElement.style.setProperty("--vh",`${t}px`)},uuidv4:()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),randomId:()=>Math.random().toString(36).replace(/[^a-z]+/g,"").substr(2,10),countWords:t=>t.split(/\s+/).filter((t=>""!==t)).length,elementInView(t){const e=document.querySelector(t);if(!e||null===e.offsetParent)return!1;const o=e.getBoundingClientRect();return 0<=o.top&&0<=o.left&&o.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&o.right<=(window.innerWidth||document.documentElement.clientWidth)},checkTrapContainerVisibility(t){const e=t.map((t=>new Promise((e=>{const o=window.setInterval((()=>{"hidden"!==window.getComputedStyle(t).visibility&&(e(),window.clearInterval(o))}),25)}))));return Promise.all(e)},roundedMonthlyPrice:(t,e=12)=>Math.ceil(t/e*100)/100,getUserLocation(){const t=(new Date).getTime();return fetch("https://public-api.wordpress.com/geo/?v="+t).then((t=>t.ok?t.json():t.body().then((t=>{throw new Error(t)})))).catch((()=>null))}},e=t;function c(t){return document.cookie.split("; ").find((e=>e.startsWith(t+"=")))?.split("=")[1]}function n(t,e,o){let c="";if(o){const t=new Date;t.setTime(t.getTime()+864e5*o),c=`expires=${t.toUTCString()}; `}document.cookie=`${t}=${e}; ${c}Path=/; SameSite=None; Secure`}function r(t){document.cookie=`${t}=; Path=/; Max-Age=-99999;`}jQuery((function(){window.dataLayer=window.dataLayer||[];const t="WCCOM_Data_Layer_Geo_v2",o=c(t),r=t=>{"undefined"!=typeof wccomGTMEE&&t&&(wccomGTMEE.geolocation={countryShort:t.country_short,countryLong:t.country_long,region:t.region,city:t.city},dataLayer.push({event:"geolocation",geolocation:wccomGTMEE.geolocation}))};"undefined"!=typeof wccomGTMEE&&wccomGTMEE.productView&&dataLayer.push({event:"visitor interaction",interaction_name:"view product page",ecommerce:{detail:{products:[{category:wccomGTMEE.product.category,brand:wccomGTMEE.product.brand,name:wccomGTMEE.product.name,id:wccomGTMEE.product.sku,variant:wccomGTMEE.product.revenueType}]}}}),"undefined"!=typeof wccomGTMEE&&wccomGTMEE.orderReceivedView&&dataLayer.push({event:"visitor interaction",interaction_name:"transaction confirmation",net_revenue:wccomGTMEE.order.netRevenue,ecommerce:{currencyCode:wccomGTMEE.currencyCode,purchase:{actionField:{id:wccomGTMEE.order.number,affiliation:wccomGTMEE.order.methodOfPayment,revenue:wccomGTMEE.order.total,tax:wccomGTMEE.order.tax,shipping:wccomGTMEE.order.shippingTotal,coupon:wccomGTMEE.order.coupon},products:wccomGTMEE.order.products}}}),"undefined"!=typeof wccomGTMEE&&wccomGTMEE.checkoutView&&setTimeout((function(){jQuery.fn.commenceCheckoutDLPush()}),0),o?r(JSON.parse(decodeURIComponent(o))):e.getUserLocation().then((e=>{e&&(n(t,encodeURIComponent(JSON.stringify(e)),1),r(e))})).catch((()=>{dataLayer.push({event:"geolocation",geolocation:{}})})),jQuery(".wccom-product-box a.single_add_to_cart_button").not(".wccom-product-single--in-app .wccom-product-box a.single_add_to_cart_button").not(".wccom-product-box--is-free a.single_add_to_cart_button").not(".wccom-product-box--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"buy now"})})),jQuery(".wccom-product-sticky-bottom-bar a.single_add_to_cart_button").not(".wccom-product-single--in-app .wccom-product-sticky-bottom-bar a.single_add_to_cart_button").not(".wccom-product-sticky-bottom-bar--is-free a.single_add_to_cart_button").not(".wccom-product-sticky-bottom-bar--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"buy now sticky mobile"})})),jQuery(".wccom-product-box--is-free a.single_add_to_cart_button").not(".wccom-product-box--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"free download"})})),jQuery(".wccom-product-sticky-bottom-bar--is-free a.single_add_to_cart_button").not(".wccom-product-sticky-bottom-bar--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"free download sticky mobile"})})),jQuery(".wccom-product-sticky-top-bar--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"external sticky"})})),jQuery(".wccom-product-box--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"external"})})),jQuery(".wccom-product-sticky-bottom-bar--is-external a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"external sticky mobile"})})),jQuery(".wccom-product-single--in-app .wccom-product-sticky-top-bar a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"in-app sticky"})})),jQuery(".wccom-product-single--in-app .wccom-product-box a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"in-app"})})),jQuery(".wccom-product-single--in-app .wccom-product-sticky-bottom-bar a.single_add_to_cart_button").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"in-app sticky mobile"})})),jQuery(".sf-downloads a.download").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"get woocommerce storefront bottom"})})),jQuery(".storefront-heading a.download").on("click",(function(){jQuery.fn.addToCartDLPush({add_to_cart_btn:"get woocommerce storefront top"})})),jQuery(document).on("click",".woocommerce-cart-form a.remove",(function(t){if("undefined"!=typeof wccomGTMEE&&wccomGTMEE.cart){t.preventDefault();var e=jQuery(this).attr("data-product_id");dataLayer.push({event:"visitor interaction",interaction_name:"remove from cart",remove_btn:"remove product",ecommerce:{remove:{products:[{category:wccomGTMEE.cart[e].category,brand:wccomGTMEE.cart[e].brand,name:wccomGTMEE.cart[e].name,id:wccomGTMEE.cart[e].id,variant:wccomGTMEE.cart[e].variant,price:wccomGTMEE.cart[e].price,quantity:wccomGTMEE.cart[e].quantity}]}}}),delete wccomGTMEE.cart[e]}})),jQuery(document).on("click",'.woocommerce-cart-form :input[name="update_cart"]',(function(){if("undefined"!=typeof wccomGTMEE&&wccomGTMEE.cartKeys){var t=wccomGTMEE.cartKeys,e=jQuery(".woocommerce-cart-form"),o=jQuery.fn.formToJSON(e);jQuery.each(t,(function(t,e){var c=e;o["cart["+t+"][qty]"]&&(o["cart["+t+"][qty]"]>e.quantity?(c.quantity=o["cart["+t+"][qty]"]-c.quantity,dataLayer.push({event:"visitor interaction",interaction_name:"add to cart",add_to_cart_btn:"update cart",ecommerce:{add:{products:[{product:c}]}}})):0===parseInt(o["cart["+t+"][qty]"])?dataLayer.push({event:"visitor interaction",interaction_name:"remove from cart",remove_btn:"update cart",ecommerce:{remove:{products:[{product:c}]}}}):o["cart["+t+"][qty]"]{if("undefined"==typeof gtag)return;const o=("string"==typeof e.productCategory?e.productCategory.split("/"):[]).reduce(((t,e,o)=>(t[0===o?"item_category":`item_category${o+1}`]=e,t)),{});let c="woocommerce";e.isTheme?c="themes":e.isPlugin&&(c="plugins");const n=0===Number(e.currentPrice)?"free product":"paid product";gtag("event","add_to_store",{items:[{item_id:String(e.productId),item_name:e.productName,...o,item_brand:c,item_variant:n}]})})),"undefined"!=typeof vendorGoogleAnalyticsTagId&&(0,a.addAction)("wccom_buy_now_button_clicked","wccom",(()=>{"undefined"!=typeof gtag&>ag("event","wccom_buy_now_button_click",{send_to:vendorGoogleAnalyticsTagId})})),window.addEventListener("DOMContentLoaded",(function(){const t="irclickid",e=new URLSearchParams(window.location.search).get(t),o=`${t}-expiration`;if(e&&wccom.canTrackUser("analytics")&&e!==c(t)){const c=(new Date).getTime()+2592e6;n(t,e,30),n(o,c,30),r("wccom-refer-affiliate-id")}})),window.addEventListener("DOMContentLoaded",(function(){(0,a.addFilter)("wccom_nux_installation_url","wccom-refer/impact-radius",(t=>{const e=c("irclickid");if(e){const o=new URL(t);return o.searchParams.set("irclickid",e),o.toString()}return t}))})),function(t){/(\?|&)ref=\d+/.test(window.location.search)&&(window.location.search=window.location.search.replace(/(\?|&)ref=/i,"$1aff="));const e=wccom&&wccom.fireTracksEvent||function(){};jQuery((function(){if(window.URLSearchParams){var t=new window.URLSearchParams(window.location.search);if(t.get("aff")&&null===t.get("utm_source")&&null===t.get("utm_medium")&&null===t.get("utm_campaign")){var o={affiliate_id:t.get("aff"),campaign_id:t.get("cid"),sub_id:t.get("sid")};e("refer_visit",o)}}})),t(document).on("referral_tracked",(function(t,o){var c,n,a,i=o.responseJSON||{};if(o.success)c=o.data.affiliate_id,n=o.data.campaign_id,a=o.data.sub_id,i=o.data;else{if(!o.affiliate_id)return i.refer_message=o.message,void e("refer_visit_response_fail",i);i.affiliate_id=c}e("refer_visit_response",i);var d=new window.URLSearchParams(window.location.search);if(null!==d.get("utm_source")||null!==d.get("utm_medium")||null!==d.get("utm_campaign"))return c&&(i.affiliate_id=c),void e("refer_visit_illegal_utm_params_usage",i);var u="wccom-refer-affiliate-id="+c+";",s=new Date;s.setTime(s.getTime()+2592e6);var m=" expires="+s.toGMTString()+";",l=" path=/;";document.cookie=u+m+l,r("irclickid");var p={};n&&String(n).match(/^\d+$/)&&(p.campaignId=n),a&&(p.subId=String(a).substring(0,255));var _="wccom-refer-affiliate-meta="+JSON.stringify(p)+";";document.cookie=_+m+l})),t(document).on("referral_tracked_error",(function(t,o){var c=o.responseJSON||{};c.status=o.status||"",e("refer_visit_response_error",c)}))}(jQuery),o(1445)})()})();; (()=>{"use strict";const e=function(e){this.token=e;const t=(e,t,n,s)=>{if(s&&!this.token)throw new Error("Authorization token is required for this request");const o={method:t,headers:{"Content-type":"application/json",Accept:"application/json"}};return s&&(o.headers.Authorization=`Bearer ${this.token}`),["GET","HEAD"].includes(t)?0Promise.all([e.status,e.json()])))};this.checkSSR=e=>t("support-flags/ssr-troubleshooting","POST",{ssr:e},!1)};!function(){var t=null,n=!1,s=!0;const o=new e(wccomZendeskChat.wpcomAccessToken);function c(e){return!(!wccomZendeskChat.isHomePage||!e.page.includes("home-page"))||void 0!==e[wccomZendeskChat.objectType]&&function(e,t,n){return void 0!==n[t]&&(n[t].includes(e)||n[t].includes(0))}(parseInt(wccomZendeskChat.objectID,10),wccomZendeskChat.objectType,e)}function a(e,t){const[n,s]=e.split(":"),o=new Date(t);return o.setUTCHours(n,s,0,0),o.getTime()/1e3}function i(e){const[t,n]=e.split(":");return 3600*t+60*n}function d(e,t,n){const s=e.getTime()/1e3;return s>=t&&s{const[t,n]=e;window.zE("messenger:set","conversationFields",[{id:t,value:n}])})),t&&0h(e,t)),250)}function p(e){const{width:t,height:n,top:s}=e.getBoundingClientRect();return 64===n&&64===t&&window.innerHeight===s+64+16}function k(){if(!t)return;let e=t;for(;e.parentElement&&e.parentElement!==document.body;)e=e.parentElement;e.classList.add("wccom-zendesk-chat-widget-wrapper")}function l(){null!==t&&(768<=window.innerWidth||!n?t.classList.remove("wccom-zendesk-chat-widget_has-sticky-bottom-bar"):t.classList.add("wccom-zendesk-chat-widget_has-sticky-bottom-bar"))}document.addEventListener("DOMContentLoaded",(function(){wccomZendeskChat?.supportEnabled&&u()&&!r(wccomZendeskChat?.supportPages)&&c({page:wccomZendeskChat.supportPages})&&window.addEventListener("message",(function(e){e.origin===window.location.origin&&("loadSupportChat"===e.data?.action&&(s=!1,w(wccomZendeskChat.snippetId,wccomZendeskChat.supportSnippetURL)),"openSupportChat"===e.data?.action&&h(e.data.zendeskFields,e.data.zendeskTags))})),function(){if(!wccomZendeskChat?.enabled||!u()||!wccomZendeskChat.startTime||!wccomZendeskChat.endTime||r(wccomZendeskChat?.days)||r(wccomZendeskChat?.documents)&&r(wccomZendeskChat?.documentCategories)&&r(wccomZendeskChat?.pages)&&r(wccomZendeskChat?.products))return;const e=/^([01][0-9]|2[0-3]):([0-5][0-9])$/;e.test(wccomZendeskChat.startTime)&&e.test(wccomZendeskChat.endTime)&&(wccomZendeskChat?.supportEnabled&&!r(wccomZendeskChat?.supportPages)&&c({page:wccomZendeskChat.supportPages})||c({documentation:wccomZendeskChat.documents,page:wccomZendeskChat.pages,product:wccomZendeskChat.products,archive:wccomZendeskChat.documentCategories})&&function(e,t,n,s){const o=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],c=n.getUTCDay();if(r=t,i(e)<=i(r)){const i=o[c];return!!s.includes(i)&&d(n,a(e,n),a(t,n))}var r;const u=(new Date).setTime(n.getTime()-864e5);if(d(n,a(e,u),a(t,n))){const e=o[0<(m=c)&&6>=m?m-1:7-(m%7+1)];return s.includes(e)}var m;const w=(new Date).setTime(n.getTime()+864e5);if(d(n,a(e,n),a(t,w))){const e=function(e){return 0<=e&&6>e?e+1:7-(e%7+1)}(c),t=o[e];return s.includes(t)}return!1}(wccomZendeskChat.startTime,wccomZendeskChat.endTime,new Date,wccomZendeskChat.days)&&o.getChatAvailabilityStatus(!!wccomZendeskChat.wpcomAccessToken).then((e=>{e&&(function(){let e=null;const n=setInterval((()=>{const s=document.querySelectorAll("body iframe");for(const o of s)if(p(o)){(t=o).classList.add("wccom-zendesk-chat-widget"),k(),clearInterval(n),clearTimeout(e),l();break}}),1e3);e=setTimeout((()=>clearInterval(n)),6e4)}(),document.addEventListener("wccom-product-sticky-bottom-bar-toggle",(e=>{n=e?.detail?.isStickyBarVisible,l()})),window.addEventListener("resize",l),w(wccomZendeskChat.snippetId,wccomZendeskChat.snippetURL))})))}()}))}()})();;