text: !function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return v}});var r=window.wp.i18n,n=(e,t)=>{let r,n,o=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(r=e.namespace.replace(/^\/|\/$/g,""),n=e.endpoint.replace(/^\//,""),o=n?r+"/"+n:r),delete e.namespace,delete e.endpoint,t({...e,path:o})},o=window.wp.url;const a=(e,t)=>{let{path:r,url:n,...a}=e;return{...a,url:n&&(0,o.addQueryArgs)(n,t),path:r&&(0,o.addQueryArgs)(r,t)}},s=e=>e.json?e.json():Promise.reject(e),i=e=>{const{next:t}=(e=>{if(!e)return{};const t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}})(e.headers.get("link"));return t};var c=async(e,t)=>{if(!1===e.parse)return t(e);if(!(e=>{const t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),r=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||r})(e))return t(e);const r=await v({...a(e,{per_page:100}),parse:!1}),n=await s(r);if(!Array.isArray(n))return n;let o=i(r);if(!o)return n;let c=[].concat(n);for(;o;){const t=await v({...e,path:void 0,url:o,parse:!1}),r=await s(t);c=c.concat(r),o=i(t)}return c};const d=new Set(["PATCH","PUT","DELETE"]),u="GET",p=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},l=e=>{const t={code:"invalid_json",message:(0,r.__)("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((()=>{throw t}))},h=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(p(e,t)).catch((e=>f(e,t)))};function f(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return l(e).then((e=>{const t={code:"unknown_error",message:(0,r.__)("An unknown error occurred.")};throw e||t}))}const w={Accept:"application/json, */*;q=0.1"},g={credentials:"include"},m=[(e,t)=>("string"!=typeof e.url||(0,o.hasQueryArg)(e.url,"_locale")||(e.url=(0,o.addQueryArgs)(e.url,{_locale:"user"})),"string"!=typeof e.path||(0,o.hasQueryArg)(e.path,"_locale")||(e.path=(0,o.addQueryArgs)(e.path,{_locale:"user"})),t(e)),n,(e,t)=>{const{method:r=u}=e;return d.has(r.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":r,"Content-Type":"application/json"},method:"POST"}),t(e)},c],y=e=>{if(e.status>=200&&e.status<300)return e;throw e};let P=e=>{const{url:t,path:n,data:o,parse:a=!0,...s}=e;let{body:i,headers:c}=e;return c={...w,...c},o&&(i=JSON.stringify(o),c["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,{...g,...s,body:i,headers:c}).then((e=>Promise.resolve(e).then(y).catch((e=>f(e,a))).then((e=>h(e,a)))),(e=>{if(e&&"AbortError"===e.name)throw e;throw{code:"fetch_error",message:(0,r.__)("You are probably offline.")}}))};function _(e){return m.reduceRight(((e,t)=>r=>t(r,e)),P)(e).catch((t=>"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(_.nonceEndpoint).then(y).then((e=>e.text())).then((t=>(_.nonceMiddleware.nonce=t,_(e))))))}_.use=function(e){m.unshift(e)},_.setFetchHandler=function(e){P=e},_.createNonceMiddleware=function(e){const t=(e,r)=>{const{headers:n={}}=e;for(const o in n)if("x-wp-nonce"===o.toLowerCase()&&n[o]===t.nonce)return r(e);return r({...e,headers:{...n,"X-WP-Nonce":t.nonce}})};return t.nonce=e,t},_.createPreloadingMiddleware=function(e){const t=Object.keys(e).reduce(((t,r)=>(t[(0,o.normalizePath)(r)]=e[r],t)),{});return(e,r)=>{const{parse:n=!0}=e;let a=e.path;if(!a&&e.url){const t=(0,o.getQueryArg)(e.url,"rest_route");"string"==typeof t&&(a=t)}if("string"==typeof a){const r=e.method||"GET",s=(0,o.normalizePath)(a);if("GET"===r&&t[s]){const e=t[s];return delete t[s],Promise.resolve(n?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}if("OPTIONS"===r&&t[r]&&t[r][s]){const e=t[r][s];return delete t[r][s],Promise.resolve(n?e.body:e)}}return r(e)}},_.createRootURLMiddleware=e=>(t,r)=>n(t,(t=>{let n,o=t.url,a=t.path;return"string"==typeof a&&(n=e,-1!==e.indexOf("?")&&(a=a.replace("?","&")),a=a.replace(/^\//,""),"string"==typeof n&&-1!==n.indexOf("?")&&(a=a.replace("?","&")),o=n+a),r({...t,url:o})})),_.fetchAllMiddleware=c,_.mediaUploadMiddleware=(e,t)=>{if(!function(e){const t=!!e.method&&"POST"===e.method;return(!!e.path&&-1!==e.path.indexOf("/wp/v2/media")||!!e.url&&-1!==e.url.indexOf("/wp/v2/media"))&&t}(e))return t(e);let n=0;const o=e=>(n++,t({path:`/wp/v2/media/${e}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((()=>n<5?o(e):(t({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"}),Promise.reject()))));return t({...e,parse:!1}).catch((t=>{const n=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&t.status<600&&n?o(n).catch((()=>!1!==e.parse?Promise.reject({code:"post_process",message:(0,r.__)("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t))):f(t,e.parse)})).then((t=>h(t,e.parse)))};var v=_;(window.wp=window.wp||{}).apiFetch=t.default}();