(()=>{"use strict";function e(e){if(!e||!e.dataset.id||e.dataset.process)return;e.dataset.process=!0;const t=e.querySelector(".ninjadraw-image");if(!t)return;const a=NinjaDrawImageBlock,n=e.dataset.id;fetch(`${a.api.public_url}/images/${n}`).then(e=>e.json()).then(a=>{t.innerHTML=a.image,e.classList.add("ninjadraw-ready"),delete e.dataset.process})}document.addEventListener("DOMContentLoaded",()=>{const t=document.querySelectorAll(".ninjadraw");for(const a of t)e(a)})})();