(()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&defineproperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>call(e,t),r:e=>{"undefined"!=typeof Symbol&&tostringtag&&defineproperty(e,tostringtag,{value:"Module"}),defineproperty(e,"__esModule",{value:!0})}},t={};e.r(t);const o=apifetch;var n=e.n(o);let r="",a=0;try{const e=getitem("storeApiNonce"),t=e?parse(e):{};r=(null==t?void 0:nonce)||"",a=(null==t?void 0:timestamp)||0}catch{}const c=(e,t)=>{e!==r&&(a&&t{const t=headers||{};return headers={...t,Nonce:r},e};n().use(((e,t)=>{var o,n;return(e=>{const t=url||path;return!(!t||!method||"GET"===method)&&null!==/wc\/store\/v1\//.exec(t)})(e)&&(e=i(e),isarray(null===(o=e)||void 0===o||null===(n=data)||void 0===n?void 0:requests)&&(requests=map(i))),t(e,t)})),n().setNonce=e=>{const t="function"==typeof(null==e?void 0:get)?get("Nonce"):nonce,o="function"==typeof(null==e?void 0:get)?get("Nonce-Timestamp"):e["Nonce-Timestamp"];t&&c(t,o)},c(storeapinonce,storeapinoncetimestamp),(wc=wc||{}).wcBlocksMiddleware=t})();