File: //srv/htdocs/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-blaze/build/editor.js
(()=>{var e={6941(e,t,n){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let s=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(s++,"%c"===e&&(i=s))}),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(3212)(t);const{formatters:s}=e.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},3212(e,t,n){e.exports=function(e){function t(e){let n,i,r,o=null;function c(...e){if(!c.enabled)return;const s=c,i=Number(new Date),r=i-(n||i);s.diff=r,s.prev=n,s.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,i)=>{if("%%"===n)return"%";o++;const r=t.formatters[i];if("function"==typeof r){const t=e[o];n=r.call(s,t),e.splice(o,1),o--}return n}),t.formatArgs.call(s,e);(s.log||t.log).apply(s,e)}return c.namespace=e,c.useColors=t.useColors(),c.color=t.selectColor(e),c.extend=s,c.destroy=t.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,r=t.enabled(e)),r),set:e=>{o=e}}),"function"==typeof t.init&&t.init(c),c}function s(e,n){const s=t(this.namespace+(void 0===n?":":n)+e);return s.log=this.log,s}function i(e,t){let n=0,s=0,i=-1,r=0;for(;n<e.length;)if(s<t.length&&(t[s]===e[n]||"*"===t[s]))"*"===t[s]?(i=s,r=n,s++):(n++,s++);else{if(-1===i)return!1;s=i+1,r++,n=r}for(;s<t.length&&"*"===t[s];)s++;return s===t.length}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(i(e,n))return!1;for(const n of t.names)if(i(e,n))return!0;return!1},t.humanize=n(4997),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},3132(){},70(){},4997(e){var t=1e3,n=60*t,s=60*n,i=24*s,r=7*i,o=365.25*i;function c(e,t,n,s){var i=t>=1.5*n;return Math.round(e/n)+" "+s+(i?"s":"")}e.exports=function(e,a){a=a||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!c)return;var a=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*o;case"weeks":case"week":case"w":return a*r;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*s;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===u&&isFinite(e))return a.long?function(e){var r=Math.abs(e);if(r>=i)return c(e,r,i,"day");if(r>=s)return c(e,r,s,"hour");if(r>=n)return c(e,r,n,"minute");if(r>=t)return c(e,r,t,"second");return e+" ms"}(e):function(e){var r=Math.abs(e);if(r>=i)return Math.round(e/i)+"d";if(r>=s)return Math.round(e/s)+"h";if(r>=n)return Math.round(e/n)+"m";if(r>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},372(e,t,n){"use strict";n.d(t,{A:()=>a});var s=n(6941);const i=n.n(s)()("dops:analytics");let r,o;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const c={initialize:function(e,t,n){c.setUser(e,t),c.setSuperProps(n),c.identifyUser()},setGoogleAnalyticsEnabled:function(e,t=null){this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){o={ID:e,username:t}},setSuperProps:function(e){r=e},assignSuperProps:function(e){r=Object.assign(r||{},e)},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);i("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),i('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);c.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);i("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),i('Built stat "%s" in group "%s"',t,e);return n}(e,t);c.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){c.tracks.recordPageView(e),c.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,s,i,r,o){c.ga.recordPurchase(e,t,n,s,i,r,o)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(!t.blog_id&&"object"==typeof window.jpTracksContext&&window.jpTracksContext.blog_id&&(t.blog_id=window.jpTracksContext.blog_id),r&&(i("- Super Props: %o",r),t=Object.assign(t,r)),i('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):i('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};c.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){c.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){i("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};c.ga.initialized||(o&&(e={userId:"u-"+o.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),c.ga.initialized=!0)},recordPageView:function(e,t){c.ga.initialize(),i("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,s){c.ga.initialize();let r="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(r+=" [Option Label: "+n+"]"),void 0!==s&&(r+=" [Option Value: "+s+"]"),i(r),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,s)},recordPurchase:function(e,t,n,s,i,r,o){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:s,currency:o}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:i,quantity:r}),window.ga("ecommerce:send")}},identifyUser:function(){o&&window._tkq.push(["identifyUser",o.ID,o.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}},a=c},5932(e,t,n){"use strict";n.d(t,{Ay:()=>l});var s=n(6439),i=n(3832);function r(e){class t extends Error{constructor(...t){super(...t),this.name=e}}return t}const o=r("JsonParseError"),c=r("JsonParseAfterRedirectError"),a=r("Api404Error"),u=r("Api404AfterRedirectError"),d=r("FetchNetworkError");const l=new function(e,t){let n=e,r=e,o={"X-WP-Nonce":t},c={credentials:"same-origin",headers:o},a={method:"post",credentials:"same-origin",headers:Object.assign({},o,{"Content-type":"application/json"})},u=function(e){const t=e.split("?"),n=t.length>1?t[1]:"",s=n.length?n.split("&"):[];return s.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+s.join("&")};const d={setApiRoot(e){n=e},setWpcomOriginApiUrl(e){r=e},setApiNonce(e){o={"X-WP-Nonce":e},c={credentials:"same-origin",headers:o},a={method:"post",credentials:"same-origin",headers:Object.assign({},o,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{u=e},registerSite:(e,t,i)=>{const r={};return(0,s.jetpackConfigHas)("consumer_slug")&&(r.plugin_slug=(0,s.jetpackConfigGet)("consumer_slug")),null!==t&&(r.redirect_uri=t),i&&(r.from=i),g(`${n}jetpack/v4/connection/register`,a,{body:JSON.stringify(r)}).then(p).then(h)},fetchAuthorizationUrl:e=>l((0,i.addQueryArgs)(`${n}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),c).then(p).then(h),fetchSiteConnectionData:()=>l(`${n}jetpack/v4/connection/data`,c).then(h),fetchSiteConnectionStatus:()=>l(`${n}jetpack/v4/connection`,c).then(h),fetchSiteConnectionTest:()=>l(`${n}jetpack/v4/connection/test`,c).then(p).then(h),fetchUserConnectionData:()=>l(`${n}jetpack/v4/connection/data`,c).then(h),fetchUserTrackingSettings:()=>l(`${n}jetpack/v4/tracking/settings`,c).then(p).then(h),updateUserTrackingSettings:e=>g(`${n}jetpack/v4/tracking/settings`,a,{body:JSON.stringify(e)}).then(p).then(h),disconnectSite:()=>g(`${n}jetpack/v4/connection`,a,{body:JSON.stringify({isActive:!1})}).then(p).then(h),fetchConnectUrl:()=>l(`${n}jetpack/v4/connection/url`,c).then(p).then(h),unlinkUser:(e=!1,t={})=>{const s={linked:!1,force:!!e};return t.disconnectAllUsers&&(s["disconnect-all-users"]=!0),g(`${n}jetpack/v4/connection/user`,a,{body:JSON.stringify(s)}).then(p).then(h)},reconnect:()=>g(`${n}jetpack/v4/connection/reconnect`,a).then(p).then(h),fetchConnectedPlugins:()=>l(`${n}jetpack/v4/connection/plugins`,c).then(p).then(h),setHasSeenWCConnectionModal:()=>g(`${n}jetpack/v4/seen-wc-connection-modal`,a).then(p).then(h),fetchModules:()=>l(`${n}jetpack/v4/module/all`,c).then(p).then(h),fetchModule:e=>l(`${n}jetpack/v4/module/${e}`,c).then(p).then(h),activateModule:e=>g(`${n}jetpack/v4/module/${e}/active`,a,{body:JSON.stringify({active:!0})}).then(p).then(h),deactivateModule:e=>g(`${n}jetpack/v4/module/${e}/active`,a,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>g(`${n}jetpack/v4/module/${e}`,a,{body:JSON.stringify(t)}).then(p).then(h),updateSettings:e=>g(`${n}jetpack/v4/settings`,a,{body:JSON.stringify(e)}).then(p).then(h),getProtectCount:()=>l(`${n}jetpack/v4/module/protect/data`,c).then(p).then(h),resetOptions:e=>g(`${n}jetpack/v4/options/${e}`,a,{body:JSON.stringify({reset:!0})}).then(p).then(h),activateVaultPress:()=>g(`${n}jetpack/v4/plugins`,a,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(p).then(h),getVaultPressData:()=>l(`${n}jetpack/v4/module/vaultpress/data`,c).then(p).then(h),installPlugin:(e,t)=>{const s={slug:e,status:"active"};return t&&(s.source=t),g(`${n}jetpack/v4/plugins`,a,{body:JSON.stringify(s)}).then(p).then(h)},activateAkismet:()=>g(`${n}jetpack/v4/plugins`,a,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(p).then(h),getAkismetData:()=>l(`${n}jetpack/v4/module/akismet/data`,c).then(p).then(h),checkAkismetKey:()=>l(`${n}jetpack/v4/module/akismet/key/check`,c).then(p).then(h),checkAkismetKeyTyped:e=>g(`${n}jetpack/v4/module/akismet/key/check`,a,{body:JSON.stringify({api_key:e})}).then(p).then(h),getFeatureTypeStatus:e=>l(`${n}jetpack/v4/feature/${e}`,c).then(p).then(h),fetchStatsData:e=>l(function(e){let t=`${n}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),c).then(p).then(h).then(C),getPluginUpdates:()=>l(`${n}jetpack/v4/updates/plugins`,c).then(p).then(h),getPlans:()=>l(`${n}jetpack/v4/plans`,c).then(p).then(h),fetchSettings:()=>l(`${n}jetpack/v4/settings`,c).then(p).then(h),updateSetting:e=>g(`${n}jetpack/v4/settings`,a,{body:JSON.stringify(e)}).then(p).then(h),fetchSiteData:()=>l(`${n}jetpack/v4/site`,c).then(p).then(h).then(e=>JSON.parse(e.data)),fetchSiteFeatures:()=>l(`${n}jetpack/v4/site/features`,c).then(p).then(h).then(e=>JSON.parse(e.data)),fetchSiteProducts:()=>l(`${n}jetpack/v4/site/products`,c).then(p).then(h),fetchSitePurchases:()=>l(`${n}jetpack/v4/site/purchases`,c).then(p).then(h).then(e=>JSON.parse(e.data)),fetchSiteBenefits:()=>l(`${n}jetpack/v4/site/benefits`,c).then(p).then(h).then(e=>JSON.parse(e.data)),fetchSiteDiscount:()=>l(`${n}jetpack/v4/site/discount`,c).then(p).then(h).then(e=>e.data),fetchSetupQuestionnaire:()=>l(`${n}jetpack/v4/setup/questionnaire`,c).then(p).then(h),fetchRecommendationsData:()=>l(`${n}jetpack/v4/recommendations/data`,c).then(p).then(h),fetchRecommendationsProductSuggestions:()=>l(`${n}jetpack/v4/recommendations/product-suggestions`,c).then(p).then(h),fetchRecommendationsUpsell:()=>l(`${n}jetpack/v4/recommendations/upsell`,c).then(p).then(h),fetchRecommendationsConditional:()=>l(`${n}jetpack/v4/recommendations/conditional`,c).then(p).then(h),saveRecommendationsData:e=>g(`${n}jetpack/v4/recommendations/data`,a,{body:JSON.stringify({data:e})}).then(p),fetchProducts:()=>l(`${n}jetpack/v4/products`,c).then(p).then(h),fetchRewindStatus:()=>l(`${n}jetpack/v4/rewind`,c).then(p).then(h).then(e=>JSON.parse(e.data)),fetchScanStatus:()=>l(`${n}jetpack/v4/scan`,c).then(p).then(h).then(e=>JSON.parse(e.data)),dismissJetpackNotice:e=>g(`${n}jetpack/v4/notice/${e}`,a,{body:JSON.stringify({dismissed:!0})}).then(p).then(h),fetchPluginsData:()=>l(`${n}jetpack/v4/plugins`,c).then(p).then(h),fetchIntroOffers:()=>l(`${n}jetpack/v4/intro-offers`,c).then(p).then(h),fetchVerifySiteGoogleStatus:e=>l(null!==e?`${n}jetpack/v4/verify-site/google/${e}`:`${n}jetpack/v4/verify-site/google`,c).then(p).then(h),verifySiteGoogle:e=>g(`${n}jetpack/v4/verify-site/google`,a,{body:JSON.stringify({keyring_id:e})}).then(p).then(h),submitSurvey:e=>g(`${n}jetpack/v4/marketing/survey`,a,{body:JSON.stringify(e)}).then(p).then(h),saveSetupQuestionnaire:e=>g(`${n}jetpack/v4/setup/questionnaire`,a,{body:JSON.stringify(e)}).then(p).then(h),updateLicensingError:e=>g(`${n}jetpack/v4/licensing/error`,a,{body:JSON.stringify(e)}).then(p).then(h),updateLicenseKey:e=>g(`${n}jetpack/v4/licensing/set-license`,a,{body:JSON.stringify({license:e})}).then(p).then(h),getUserLicensesCounts:()=>l(`${n}jetpack/v4/licensing/user/counts`,c).then(p).then(h),getUserLicenses:()=>l(`${n}jetpack/v4/licensing/user/licenses`,c).then(p).then(h),updateLicensingActivationNoticeDismiss:e=>g(`${n}jetpack/v4/licensing/user/activation-notice-dismiss`,a,{body:JSON.stringify({last_detached_count:e})}).then(p).then(h),updateRecommendationsStep:e=>g(`${n}jetpack/v4/recommendations/step`,a,{body:JSON.stringify({step:e})}).then(p),confirmIDCSafeMode:()=>g(`${n}jetpack/v4/identity-crisis/confirm-safe-mode`,a).then(p),startIDCFresh:e=>g(`${n}jetpack/v4/identity-crisis/start-fresh`,a,{body:JSON.stringify({redirect_uri:e})}).then(p).then(h),migrateIDC:()=>g(`${n}jetpack/v4/identity-crisis/migrate`,a).then(p),attachLicenses:e=>g(`${n}jetpack/v4/licensing/attach-licenses`,a,{body:JSON.stringify({licenses:e})}).then(p).then(h),fetchSearchPlanInfo:()=>l(`${r}jetpack/v4/search/plan`,c).then(p).then(h),fetchSearchSettings:()=>l(`${r}jetpack/v4/search/settings`,c).then(p).then(h),updateSearchSettings:e=>g(`${r}jetpack/v4/search/settings`,a,{body:JSON.stringify(e)}).then(p).then(h),fetchSearchStats:()=>l(`${r}jetpack/v4/search/stats`,c).then(p).then(h),fetchWafSettings:()=>l(`${n}jetpack/v4/waf`,c).then(p).then(h),updateWafSettings:e=>g(`${n}jetpack/v4/waf`,a,{body:JSON.stringify(e)}).then(p).then(h),fetchWordAdsSettings:()=>l(`${n}jetpack/v4/wordads/settings`,c).then(p).then(h),updateWordAdsSettings:e=>g(`${n}jetpack/v4/wordads/settings`,a,{body:JSON.stringify(e)}),fetchSearchPricing:()=>l(`${r}jetpack/v4/search/pricing`,c).then(p).then(h),fetchMigrationStatus:()=>l(`${n}jetpack/v4/migration/status`,c).then(p).then(h),fetchBackupUndoEvent:()=>l(`${n}jetpack/v4/site/backup/undo-event`,c).then(p).then(h),fetchBackupPreflightStatus:()=>l(`${n}jetpack/v4/site/backup/preflight`,c).then(p).then(h)};function l(e,t){return fetch(u(e),t)}function g(e,t,n){return fetch(e,Object.assign({},t,n)).catch(f)}function C(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}Object.assign(this,d)};function p(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise(()=>{throw e.redirected?new u(e.redirected):new a}):e.json().catch(e=>g(e)).then(t=>{const n=new Error(`${t.message} (Status ${e.status})`);throw n.response=t,n.name="ApiError",n})}function h(e){return e.json().catch(t=>g(t,e.redirected,e.url))}function g(e,t,n){throw t?new c(n):new o}function f(){throw new d}},6439(e,t,n){let s={};try{s=n(226)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),s={missingConfig:!0}}const i=e=>Object.hasOwn(s,e);e.exports={jetpackConfigHas:i,jetpackConfigGet:e=>{if(!i(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return s[e]}}},4882(e,t,n){"use strict";n.d(t,{A:()=>u});var s=n(5932),i=n(7999),r=n(7143),o=n(1609),c=n(4293);const a=window?.JP_CONNECTION_INITIAL_STATE||(0,i.getScriptData)()?.connection||{};function u({registrationNonce:e=a.registrationNonce,apiRoot:t=a.apiRoot,apiNonce:n=a.apiNonce,redirectUri:i,autoTrigger:u,from:d,skipUserConnection:l,skipPricingPage:p}={}){const{registerSite:h,connectUser:g,refreshConnectedPlugins:f}=(0,r.useDispatch)(c.a),C=(0,r.useSelect)(e=>e(c.a).getRegistrationError(),[]),{siteIsRegistering:m,userIsConnecting:y,userConnectionData:w,connectedPlugins:v,connectionErrors:k,connectionHealthErrors:S,isRegistered:j,isUserConnected:b,hasConnectedOwner:_,isOfflineMode:E}=(0,r.useSelect)(e=>{const t=e(c.a).getConnectionStatus();return{siteIsRegistering:e(c.a).getSiteIsRegistering(),userIsConnecting:e(c.a).getUserIsConnecting(),userConnectionData:e(c.a).getUserConnectionData()||{},connectedPlugins:e(c.a).getConnectedPlugins(),connectionErrors:e(c.a).getConnectionErrors(),connectionHealthErrors:e(c.a).getConnectionHealthErrors?.()??{},isOfflineMode:e(c.a).getIsOfflineMode(),isRegistered:t.isRegistered??!1,isUserConnected:t.isUserConnected??!1,hasConnectedOwner:t.hasConnectedOwner??!1}},[]),O=()=>l?i?(window.location.href=i,Promise.resolve(i)):Promise.resolve():g({from:d,redirectUri:i,skipPricingPage:p}),A=t=>(t&&t.preventDefault(),j?O():h({registrationNonce:e,redirectUri:i,from:d}).then(()=>O()));return(0,o.useEffect)(()=>{s.Ay.setApiRoot(t),s.Ay.setApiNonce(n)},[t,n]),(0,o.useEffect)(()=>{!u||m||y||A()},[]),{handleRegisterSite:A,handleConnectUser:O,refreshConnectedPlugins:f,isRegistered:j,isUserConnected:b,siteIsRegistering:m,userIsConnecting:y,registrationError:C,userConnectionData:w,hasConnectedOwner:_,connectedPlugins:v,connectionErrors:k,connectionHealthErrors:S,isOfflineMode:E}}},4750(e,t,n){"use strict";n.d(t,{A:()=>r});var s=n(7723);const __=s.__;function i(e){if(!e||"string"!=typeof e)return{};const t=e.indexOf(" :");if(-1===t)return{};const n=e.slice(0,t).trim(),s=e.slice(t+2).trim(),i={};return s&&(i.action_url=s),n&&(i.action_label=n),i}function r(e){const t={};for(const n of function(e){if(!e||"object"!=typeof e)return[];const t=e;return t.code?[{code:t.code,message:t.message??"",data:t.data||{}},...(Array.isArray(t.additional_errors)?t.additional_errors:[]).map(e=>({code:e.code??"",message:e.message??"",data:e.data||{}}))]:[]}(e))n.code.startsWith("failed_")&&(t[n.code]={0:{error_code:n.code,error_message:n.message||__("A connection check failed.","jetpack-blaze"),error_type:"connection_health",error_data:i(n.data.resolution)}});return t}},3935(e,t,n){"use strict";n.d(t,{A1:()=>l,Ay:()=>O,DO:()=>d,Ij:()=>u,Kl:()=>C,LW:()=>p,MU:()=>y,XY:()=>h,ZO:()=>a,dz:()=>g,gH:()=>f,j4:()=>m,v_:()=>c});var s=n(5932),i=n(1455),r=n.n(i),o=n(4750);const c="SET_CONNECTION_STATUS",a="SET_CONNECTION_STATUS_IS_FETCHING",u="SET_SITE_IS_REGISTERING",d="SET_USER_IS_CONNECTING",l="SET_REGISTRATION_ERROR",p="CLEAR_REGISTRATION_ERROR",h="SET_AUTHORIZATION_URL",g="DISCONNECT_USER_SUCCESS",f="SET_CONNECTED_PLUGINS",C="SET_CONNECTION_ERRORS",m="SET_CONNECTION_HEALTH_ERRORS",y="SET_IS_OFFLINE_MODE",w=e=>({type:c,connectionStatus:e}),v=e=>({type:u,isRegistering:e}),k=e=>({type:d,isConnecting:e}),S=e=>({type:l,registrationError:e}),j=()=>({type:p}),b=e=>({type:h,authorizationUrl:e}),_=e=>({type:f,connectedPlugins:e}),E=e=>({type:m,connectionHealthErrors:e});const O={setConnectionStatus:w,setConnectionStatusIsFetching:e=>({type:a,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:v,setUserIsConnecting:k,setRegistrationError:S,clearRegistrationError:j,setAuthorizationUrl:b,registerSite:function*({registrationNonce:e,redirectUri:t,from:n=""}){yield j(),yield v(!0);try{const s=yield{type:"REGISTER_SITE",registrationNonce:e,redirectUri:t,from:n};return yield w({isRegistered:!0}),yield b(s.authorizeUrl),yield v(!1),Promise.resolve(s)}catch(e){return yield S(e),yield v(!1),Promise.reject(e)}},connectUser:function*({from:e,redirectFunc:t,redirectUri:n,skipPricingPage:s}={}){yield k(!0),yield{type:"CONNECT_USER",from:e,redirectFunc:t,redirectUri:n,skipPricingPage:s}},disconnectUserSuccess:()=>({type:g}),setConnectedPlugins:_,refreshConnectedPlugins:()=>async({dispatch:e})=>await new Promise(t=>s.Ay.fetchConnectedPlugins().then(n=>{e(_(n)),t(n)})),setConnectionErrors:e=>({type:C,connectionErrors:e}),setConnectionHealthErrors:E,runConnectionHealthCheck:()=>async({dispatch:e})=>{try{return await r()({path:"/jetpack/v4/connection/test"}),e(E({})),{}}catch(t){const n=(0,o.A)(t);return e(E(n)),n}},setIsOfflineMode:e=>({type:y,isOfflineMode:e})}},7938(e,t,n){"use strict";function s(e){return window.location.assign(e)}n.d(t,{d:()=>s})},2494(e,t,n){"use strict";n.d(t,{A:()=>c});var s=n(5932),i=n(7143),r=n(7938),o=n(4660);const c={FETCH_AUTHORIZATION_URL:({redirectUri:e})=>s.Ay.fetchAuthorizationUrl(e),REGISTER_SITE:({redirectUri:e,from:t})=>s.Ay.registerSite(null,e,t),CONNECT_USER:(0,i.createRegistryControl)(({resolveSelect:e})=>({from:t,redirectFunc:n,redirectUri:s,skipPricingPage:i}={})=>new Promise((c,a)=>{e(o.A).getAuthorizationUrl(s).then(e=>{const s=n||(e=>(0,r.d)(e)),o=new URL(e);i&&o.searchParams.set("skip_pricing","true"),t&&o.searchParams.set("from",encodeURIComponent(t));const a=o.toString();s(a),c(a)}).catch(e=>{a(e)})}))}},5051(e,t,n){"use strict";n.d(t,{A:()=>r});var s=n(7143),i=n(3935);const r=(0,s.combineReducers)({connectionStatus:(e={},t)=>{switch(t.type){case i.v_:return{...e,...t.connectionStatus};case i.dz:return{...e,isUserConnected:!1}}return e},connectionStatusIsFetching:(e=!1,t)=>t.type===i.ZO?t.isFetching:e,siteIsRegistering:(e=!1,t)=>t.type===i.Ij?t.isRegistering:e,userIsConnecting:(e=!1,t)=>t.type===i.DO?t.isConnecting:e,registrationError:(e,t)=>{switch(t.type){case i.LW:return!1;case i.A1:return t.registrationError;default:return e}},authorizationUrl:(e,t)=>t.type===i.XY?t.authorizationUrl:e,userConnectionData:(e,t)=>(t.type,e),connectedPlugins:(e={},t)=>t.type===i.gH?t.connectedPlugins:e,connectionErrors:(e={},t)=>t.type===i.Kl?t.connectionErrors:e,connectionHealthErrors:(e={},t)=>t.type===i.j4?t.connectionHealthErrors:e,isOfflineMode:(e=!1,t)=>t.type===i.MU?t.isConnecting:e})},8019(e,t,n){"use strict";n.d(t,{A:()=>o});var s=n(7143),i=n(3935),r=n(4660);const o={...{getAuthorizationUrl:{isFulfilled:(e,...t)=>{const n=Boolean(e.authorizationUrl),i=(0,s.select)(r.A).hasFinishedResolution("getAuthorizationUrl",t);return n&&!i&&(0,s.dispatch)(r.A).finishResolution("getAuthorizationUrl",t),n},*fulfill(e){const t=yield i.Ay.fetchAuthorizationUrl(e);yield i.Ay.setAuthorizationUrl(t.authorizeUrl)}}}}},2676(e,t,n){"use strict";n.d(t,{A:()=>s});const s={...{getConnectionStatus:e=>e.connectionStatus||{},getConnectionStatusIsFetching:()=>!1,getSiteIsRegistering:e=>e.siteIsRegistering||!1,getUserIsConnecting:e=>e.userIsConnecting||!1,getRegistrationError:e=>e.registrationError||!1,getAuthorizationUrl:e=>e.authorizationUrl||!1,getUserConnectionData:e=>e.userConnectionData||!1,getConnectedPlugins:e=>e.connectedPlugins||[],getConnectionErrors:e=>e.connectionErrors||[],getConnectionHealthErrors:e=>e.connectionHealthErrors||{},getIsOfflineMode:e=>e.isOfflineMode||!1,getWpcomUser:e=>e?.userConnectionData?.currentUser?.wpcomUser,getBlogId:e=>e?.userConnectionData?.currentUser?.blogId}}},8734(e,t,n){"use strict";n.d(t,{A:()=>r});var s=n(7143);class i{static store=null;static mayBeInit(e,t){null===i.store&&(i.store=(0,s.createReduxStore)(e,t),(0,s.register)(i.store))}}const r=i},4660(e,t,n){"use strict";n.d(t,{A:()=>s});const s="jetpack-connection"},4293(e,t,n){"use strict";n.d(t,{a:()=>d.A});var s=n(7999),i=n(3935),r=n(2494),o=n(5051),c=n(8019),a=n(2676),u=n(8734),d=n(4660);const l=window.JP_CONNECTION_INITIAL_STATE||(0,s.getScriptData)()?.connection;l||console.error("Jetpack Connection package: Initial state is missing. Check documentation to see how to use the Connection composer package to set up the initial state."),u.A.mayBeInit(d.A,{__experimentalUseThunks:!0,reducer:o.A,actions:i.Ay,selectors:a.A,resolvers:c.A,controls:r.A,initialState:l||{}})},5985(e,t,n){"use strict";n.d(t,{st:()=>s.A});n(4815),n(1409),n(2034),n(5595),n(3265);var s=n(3489);n(9581),n(8406),n(6923),n(335),n(7687),n(9061),n(5929),n(5765)},5765(e,t,n){"use strict";n(8490)},335(e,t,n){"use strict";n(6087)},4815(e,t,n){"use strict";n(7999)},3489(e,t,n){"use strict";n.d(t,{A:()=>a});var s=n(372),i=n(4882),r=n(6087);const{tracks:o}=s.A,{recordEvent:c}=o,a=({pageViewEventName:e=null,pageViewNamespace:t="jetpack",pageViewSuffix:n="page_view",pageViewEventProperties:a={}}={})=>{const[u,d]=(0,r.useState)(!1),{isUserConnected:l,isRegistered:p,userConnectionData:h={}}=(0,i.A)(),{wpcomUser:{login:g,ID:f}={},blogId:C}=h.currentUser||{},m=(0,r.useCallback)(async(e,t={})=>{l&&f&&g&&c(e,t)},[l,f,g]);return(0,r.useEffect)(()=>{l&&f&&g&&C&&s.A.initialize(f,g,{blog_id:C})},[C,f,g,l]),(0,r.useEffect)(()=>{const s=e?`${t}_${e}_${n}`:null;p&&s&&(u||(m(s,a),d(!0)))},[u,t,e,n,p,a,m]),{recordEvent:m,tracks:o}}},9581(e,t,n){"use strict";n(7143),n(6087)},6923(e,t,n){"use strict";n(7687),n(7143),n(6087)},8406(e,t,n){"use strict";n(6087)},5929(e,t,n){"use strict";n(7143),n(2619),n(3265),n(9581)},9520(e,t,n){"use strict";n(7999);var s=n(6941),i=n.n(s);window,i()("shared-extension-utils:connection")},9061(e,t,n){"use strict";n(9520)},3265(e,t,n){"use strict";n(7999);var s=n(7723);n(3832),n(4815);const __=s.__;__("Upgrade your plan to use video covers","jetpack-blaze"),__("Upgrade your plan to upload audio","jetpack-blaze")},2034(e,t,n){"use strict";n(2279)},1409(e,t,n){"use strict";n(7999)},5595(e,t,n){"use strict";n(9491),n(3132),n(790)},1784(e,t,n){"use strict";n.d(t,{A:()=>r});var s=n(6427),i=n(790);function r(){return(0,i.jsx)(s.SVG,{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsxs)(s.G,{clipPath:"url(#clip0_4728_49296)",children:[(0,i.jsx)("circle",{cx:"12",cy:"12",r:"12",fill:"#D9D9D9"}),(0,i.jsx)("circle",{cx:"12",cy:"12",r:"12",fill:"black"}),(0,i.jsx)(s.Path,{d:"M14.8665 6.68544C14.7139 6.50468 14.4652 6.43826 14.2436 6.52015C14.0224 6.60204 13.875 6.81412 13.875 7.05149V8.71684C13.875 9.02893 13.6226 9.2829 13.3125 9.2829C13.0024 9.2829 12.75 9.02893 12.75 8.71684V4.72989C12.75 4.56762 12.681 4.41365 12.5602 4.3061C12.4354 4.19515 12.3622 4.13288 12.3622 4.13288C12.1537 3.95627 11.8485 3.95552 11.6389 4.13175C11.4086 4.32572 6 8.9327 6 13.434C6 16.7632 8.69175 19.472 12 19.472C15.3082 19.472 18 16.7632 18 13.434C18 10.9267 16.296 8.38022 14.8665 6.68544ZM12.0728 18.5274C11.508 18.544 10.9699 18.3259 10.5259 17.9742C8.3535 16.2537 10.3856 13.4982 11.4469 12.3106C11.7435 11.9789 12.2584 11.9807 12.555 12.3125C13.2742 13.1178 14.4375 14.6416 14.4375 16.0756C14.4375 17.4059 13.3853 18.4885 12.0728 18.5274Z",fill:"white"})]})})}},226(e){"use strict";e.exports={consumer_slug:"jetpack-blaze"}},7999(e){"use strict";e.exports=window.JetpackScriptDataModule},7687(e){"use strict";e.exports=window.JetpackSharedStores},1609(e){"use strict";e.exports=window.React},790(e){"use strict";e.exports=window.ReactJSXRuntime},1455(e){"use strict";e.exports=window.wp.apiFetch},6427(e){"use strict";e.exports=window.wp.components},9491(e){"use strict";e.exports=window.wp.compose},7143(e){"use strict";e.exports=window.wp.data},8490(e){"use strict";e.exports=window.wp.domReady},3656(e){"use strict";e.exports=window.wp.editor},6087(e){"use strict";e.exports=window.wp.element},2619(e){"use strict";e.exports=window.wp.hooks},7723(e){"use strict";e.exports=window.wp.i18n},2279(e){"use strict";e.exports=window.wp.plugins},5573(e){"use strict";e.exports=window.wp.primitives},3832(e){"use strict";e.exports=window.wp.url},3109(e,t,n){"use strict";n.d(t,{A:()=>i});var s=n(6087),i=(0,s.forwardRef)(({icon:e,size:t=24,...n},i)=>(0,s.cloneElement)(e,{width:t,height:t,...n,ref:i}))},1866(e,t,n){"use strict";n.d(t,{A:()=>r});var s=n(5573),i=n(790),r=(0,i.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,i.jsx)(s.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})})}},t={};function n(s){var i=t[s];if(void 0!==i)return i.exports;var r=t[s]={exports:{}};return e[s](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(5985),t=n(6427),s=n(9491),i=n(7143),r=n(3656),o=n(6087),c=n(7723),a=n(3109),u=n(1866),d=n(2279),l=(n(70),n(1784)),p=n(790);const __=c.__,h=()=>{const{blazeUrlTemplate:n}=window?.blazeInitialState||{},{tracks:c}=(0,e.st)(),d=(0,o.useCallback)(()=>c.recordEvent("jetpack_editor_blaze_publish_click"),[c]),{isPostPublished:h,isPublishingPost:g,postId:f,postType:C,postVisibility:m}=(0,i.useSelect)(e=>({isPostPublished:e(r.store).isCurrentPostPublished(),isPublishingPost:e(r.store).isPublishingPost(),postId:e(r.store).getCurrentPostId(),postType:e(r.store).getCurrentPostType(),postVisibility:e(r.store).getEditedPostVisibility()})),y=(0,s.usePrevious)(g),w={name:"blaze-panel",title:__("Promote with Blaze","jetpack-blaze"),className:"blaze-panel",icon:(0,p.jsx)(l.A,{}),initialOpen:!0},v=n.link.replace("__POST_ID__",f),k=(0,o.useCallback)(()=>!!["page","post","product"].includes(C)&&!(!h||"password"===m||"private"===m),[C,h,m]);if((0,o.useEffect)(()=>{y&&!g&&k()&&h&&c.recordEvent("jetpack_editor_blaze_post_publish_panel_view")},[c,g,h,y,k]),!k())return null;const S={page:__("Blaze this page","jetpack-blaze"),post:__("Blaze this post","jetpack-blaze"),product:__("Blaze this product","jetpack-blaze")}[C]??__("Blaze this post","jetpack-blaze");return(0,p.jsxs)(r.PluginPostPublishPanel,{...w,children:[(0,p.jsx)(t.PanelRow,{children:(0,p.jsx)("p",{children:__("Reach a larger audience boosting the content to the WordPress.com community of blogs and sites.","jetpack-blaze")})}),(0,p.jsx)("div",{role:"link",className:"post-publish-panel__postpublish-buttons",tabIndex:0,onClick:d,onKeyDown:d,children:(0,p.jsxs)(t.Button,{variant:"secondary",href:v,target:"_top",children:[S,n.external&&(0,p.jsx)(a.A,{icon:u.A,className:"blaze-panel-outbound-link__external_icon"})]})})]})};(0,d.getPlugin)("jetpack-blaze")||(0,d.registerPlugin)("jetpack-blaze",{render:h})})()})();