PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.7
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.7
16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 All 506 releases
jetpack / build / scripts / init / index.min.js

index.min.js in Jetpack – WP Security, Backup, Speed, & Growth 16.3-a.7, at build/scripts/init/index.min.js

1 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function(){(()=>{var h=/^[^/]+\/widgets\//,c;function w(){return{manifests:new Map(),downloads:new Map(),active:0,queue:[]};}function T(e){let t=e;return!!t&&t.manifests instanceof Map&&t.downloads instanceof Map&&typeof t.active=="number"&&Array.isArray(t.queue);}function y(){let e=window,t=e.__jetpackWpBuildI18nCatalogs;if(t===void 0){let a=w();return e.__jetpackWpBuildI18nCatalogs=a,a;}return T(t)?t:(c||(l("Shared catalog state on window has an unrecognized shape; downloads will not be deduped across module copies."),c=w()),c);}function I(e,t,a){return new Promise(n=>{let o=()=>{e.active++;let r=!1,s=()=>{r||(r=!0,clearTimeout(i),C(e));},i=setTimeout(()=>{l(`Catalog download for ${t} has held a slot for 30000ms; releasing it so queued downloads can proceed.`),s();},3e4);i.unref?.(),n(a().finally(s));};e.active<6?o():e.queue.push(o);});}function C(e){e.active--;let t=e.queue.shift();t&&t();}function v(e,t,a,n){let o=`${a}|${n}`,r=t.downloads.get(o);return r||(r=I(t,n,()=>e.downloadI18n(n,a,"plugin")).catch(s=>{let i=u(s);p(i)||l(`Failed to load "${a}" catalog (${n}): ${i}`);}),t.downloads.set(o,r)),r;}function l(e){console.warn(`[jetpack-i18n] ${e}`);}function u(e){return e instanceof Error?e.message:String(e);}function p(e){let t=/^HTTP request failed: (\d+)\b/.exec(e);return t!==null&&t[1]==="404";}async function L(e){let t=await fetch(e,{cache:"no-cache"});if(!t.ok)throw new Error(`HTTP request failed: ${t.status} ${t.statusText}`);let a=await t.json();return Array.isArray(a?.bundles)?a.bundles.filter(n=>typeof n=="string"):[];}function _(e){let t=new URL("../../i18n-manifest.json",e);return t.search=new URL(e).search,t;}function $(e,t,a){let n=e.manifests.get(t);return n||(n=L(a).catch(o=>{let r=u(o);return p(r)||l(`Failed to load the i18n manifest for "${t}": ${r}`),[];}).then(o=>new Set(o)),e.manifests.set(t,n)),n;}async function m(e,t,a=5e3){let n=window.wp?.jpI18nLoader;if(!n||typeof n.downloadI18n!="function"){l(`wp.jpI18nLoader unavailable; "${e}" strings will render untranslated.`);return;}if(n.state?.locale==="en_US")return;let o=y(),r=async()=>{let d=$(o,e,_(t)),f=[];for(let g of await d)h.test(g)||f.push(v(n,o,e,g));await Promise.all(f);},s,i=!1;try{await Promise.race([r().finally(()=>{i=!0;}),new Promise(d=>{s=setTimeout(d,a);})]);}catch(d){l(`Unexpected failure loading "${e}" catalogs: ${u(d)}`);return;}finally{clearTimeout(s);}i||l(`"${e}" catalog downloads still pending after ${a}ms; rendering may start untranslated.`);}function S(){globalThis.jetpackConfig={consumer_slug:"jetpack"};}var M={};async function j(){S(),await m("jetpack",M.url);}})();})();//# sourceMappingURL=index.min.js.map