`;function g(L){L.preventDefault();var u=L.currentTarget.np.value.trim();if(u.length<2)return alert("Enter more than 1 character to create a new page.");t(s.CREATE_PAGE,u.trim())}function A(){e.sb=!e.sb,t(s.RENDER)}function M(L){e.sbTab=L.target.innerText,t(s.RENDER)}};function Ne(e,t=()=>{}){var r=new FileReader;r.onload=i=>ce(this,null,function*(){var n=i.target.result,a=pe(n,"script",'p"? type="?application/json');if(!a.length||a[0]!=="{")return alert("Could not find Feather Wiki data.");var l=FW.json.decompress(JSON.parse(a));l.img=yield Ot(l.img),t([l,pe(n,"style","c"),FW.parseJs(pe(n,"script","j"))])}),r.onerror=function(i){t(null)},r.readAsText(e)}function pe(e,t,r){var i=`\\s<${t} id="?${r}"?>`,n=e.match(new RegExp(i+`.+?(?=)`,"s"));return(n!=null?n:[]).length?n[0].replace(new RegExp(i),"").trim():""}function Ot(e){return ce(this,null,function*(){var t=Object.keys(e);return t.length&&!e[t[0]].img&&(yield Promise.all(t.map(r=>new Promise(i=>{var n=new Image;n.src=e[r],n.onload=()=>{e[r]={img:e[r],alt:"image",size:[n.width,n.height]},i()}})))),e})}function Be(e){var{c:t,p:r,j:i}=e;return` ${r.name} ${r.desc?``:""} ${a()} ${t?``:""} ${l()} ${i?`
Feather Wiki

A tiny tool for simple, self-contained wikis!

All Pages