www.blitzw.in/EndlingsPage.html

129 lines
134 KiB
HTML
Raw Permalink Normal View History

2023-12-12 20:12:57 +00:00
<!doctype html> <html lang=en> <head> <meta charset=utf-8> <meta name=viewport content="width=device-width,initial-scale=1"> <title>Endlings</title> <meta name="description" content="this is where you can read endlings, my transformers animated fic"> <meta name=version content=Wren_1.7.1> <meta name=application-name content="Feather Wiki"> <style id=s>html{font-family:BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif}html,button,input,select,option,textarea{font-size:12pt;background:#fff;color:#000}html,body{margin:0;padding:0}:focus{outline:2px solid #000}*{box-sizing:border-box;position:relative;max-width:100vw}*+*,p,.ed-content>*:not(:first-child){margin:.5rem 0}main>*{padding:1rem 1.5rem 2rem}#g:not([open]),.sb .n{display:none}input,select,textarea{padding:.5rem;tab-size:4}h1,h2,h3,h4,h5,h6,.t{font-weight:700;margin:.5rem 0}h1{font-size:1.8rem}h2{font-size:1.65rem}h3,.t{font-size:1.5rem}h4{font-size:1.35rem}h5{font-size:1.2rem}h6{font-size:1.05rem}.np{max-width:8rem}button,summary:is(.np,.b){text-align:center;color:#fff;padding:5px 12px;background-color:#65a;border:0;border-radius:1rem;z-index:2}a,button,summary,.noti{cursor:pointer}a{text-decoration:none;color:#65a}:is(a,button):is(:hover,:active,:visited){opacity:.8}a.e{color:red}a.l{visibility:hidden}:is(h1,h2,h3,h4,h5,h6):hover a.l,a.l:is(:focus,:active){visibility:visible}a:is([target="_blank"],.e):after{font-size:70%;vertical-align:top;margin-left:3px}a[target=_blank]:after{content:"\29c9"}a.e:after{content:"!"}nav ul{list-style:none}ul,ol{padding:0 0 0 1rem}nav li summary{text-indent:-1rem}label{display:block}blockquote{margin-left:2rem;padding-left:1rem;border-left:3px solid #888}.uc pre{font-size:80%;padding:1em;border-radius:6px;background-color:#eee;line-height:1.5;overflow-x:auto}abbr[title]{cursor:help}.sb{background:#ddd}.w1,.w34,.w12,.w14,.r,main{width:100%}.tabs>*{border:2px solid #65A;border-bottom:0;border-radius:.5rem .5rem 0 0;margin:0}.a{background:#87C;color:#fff}@media (min-width:50rem){.r,main{display:table;border-spacing:1rem 0}.r.ns,main{border-spacing:0}.c,main>*{display:table-cell!important;vertical-align:top}.sb{width:20%;min-width:200px;max-width:500px;height:100vh;overflow-y:auto}.sb .n{display:unset}.sbt{display:none}.w34{width:75%}.w12{width:50%}.w13{width:33%}.w14{width:25%}body>footer{position:absolute;inset:auto 1.5rem 0}form,.mw,#g,input,select,textarea,.ed{max-width:1000px}.tr{text-align:right}.fr{float:right}}.sr{visibility:hidden;height:0;width:0;position:absolute}.tr:not(.ml){text-align:right}.fr:not(.ml){float:right}.chg,.del{background:red}.del{opacity:.8}.h,.del{font-size:.8rem}.db{display:block}.il{display:inline}.ib{display:inline-block}.at{vertical-align:top}.pb{margin:0 0 1.5rem!important}.uc a{text-decoration:underline}.notis{position:fixed;inset:1vw 40vw auto}.noti{padding:1em;box-shadow:3px 3px 5px #555}#g,input,select,textarea,.ed,.noti{border:1px solid #000;border-radius:3px}.ed *{margin:unset}.ed-content,textarea,#g,.g{width:100%;overflow-y:auto;padding:10px;margin:0 auto}.ed-content,textarea{height:50vh;min-height:300px;max-height:600px}.ed-content nowiki{background:#EEE}:is(.ed-content,textarea,.uc) *{max-width:100%}.ed-actionbar{border-bottom:1px solid #000}.ed-button{background:transparent;color:#000;vertical-align:middle}.ed-selected{background:#ddd} </style> <style id=c>html {
font-family: arial;
font-size:125%;
}
button, summary:is(.np, .b) {
text-align: center;
color: #fff;
padding: 5px 12px;
background-color: #918151;
border: 0;
border-radius: 0;
z-index: 2;
}
a {
text-decoration: underline;
color: brown;
}
.sb {
background: #fff;
}
.tabs > * {
border: 2px solid #918151;
border-bottom-width: 2px;
border-bottom-style: solid;
border-bottom-color: brown;
border-bottom: 0;
border-radius: .5rem .5rem 0 0;
margin: 0;
2024-01-05 16:26:03 +00:00
}</style> <script id=p type=application/json>{"A":"Endlings","B":"this is where you can read endlings, my transformers animated fic","I":[{"C":"`c\\{V'%T^","A":"Book One characters","D":"book_one_characters","E":1702330996206,"F":"<p dir=\"ltr\" style=\"line-height:1.38;margin-top:0pt;margin-bottom:0pt;\" id=\"docs-internal-guid-326cc7f8-7fff-71f2-5206-1b261c1675ad\"><span style=\"font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;\"><b>Buzzer (they/them):</b> curious child (alt mode: small toy-like tank)</span></p><span style=\"font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;\"><b>Stinger (she/her and he/him):</b> easily-annoyed archivist (alt mode: waspy deery thing)</span><span style=\"font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;\"><br></span><span style=\"font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;\"><b>Galvin (it/its):</b> rabbit-like being with affinity for cute stuff (alt mode: base with weapons)</span><span style=\"font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;\"><br></span><span style=\"font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;\"><b>Krater (he/him and ve/vem): </b>former worker for Nequam (alt mode: motorcycle)</span><span style=\"font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;\"><br></span><span style=\"font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;\"><b>Nequam (he/him):</b> de facto leader with a younger sibling (alt mode: hovercraft)</span><span style=\"font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;\"><br></span><span style=\"font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;\"><b>Screech (she/her, he/him, they/them, zay/zam, ai/air):</b> nostalgic effeminate guy (alt mode: fighter jet)</span><span style=\"font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;\"><br></span><span style=\"font-size:11pt;font-family:Arial,sans-serif;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;\"><b>Blitzonok (he/him): </b>ex-Decepticon weapon (alt mode: beetle-esque jet tank)</span>","G":1704410085425,"H":"|ID!D]MD`"},{"C":"mE|h`';_4","A":"Chapter 0: The First One","D":"chapter_0-_the_first_one",
2023-12-12 19:58:08 +00:00
m=m?` title="${G(m)}"`:"",d?`<img src="${h}" alt="${g}"${m}>`:`<a href="${h}"${m}>${g}</a>`}).replace(/(<\/?[a-zA-Z]+[^>]*>)/gm,(e,d)=>(k[l]=d,`{html-${l++}}`)).replace(/^[ \t]*>+ (.*)/gm,"<blockquote>\n$1\n</blockquote>").replace(/(<\/blockquote>\n?<blockquote>)+?/g,"").replace(/^(#+) +(.*)/gm,(e,d,g)=>`<h${d.length}>${g}</h${d.length}>`).replace(/^([^\n\t ])(.*)\n====+/gm,"<h1>$1$2</h1>").replace(/^([^\n\t ])(.*)\n----+/gm,"<h2>$1$2</h2>").replace(/\n( *[-*]){3,}\n/gm,"<hr>").replace(/\[( |x)\]/g,
(e,d)=>`<input type="checkbox" disabled${"x"===d.toLowerCase()?" checked":""}>`).replace(/ +\n/gm,"<br>").replace(/^([^-\+\*\d<\t \n])([^]*?)(?:\n\n)/gm,(e,d,g)=>`<p>${d}${g}</p>
`).replace(/^([\t ]*)(?:(-|\+|\*)|(\d+(?:\)|\.))) (.*)/gm,(e,d,g,h,m)=>{d=d.replace(/ /g,"\t");e=h?"o":"u";return`${d}<${e}l><li>${m}</li></${e}l>`});for(f=/<\/li><\/(u|o)l>\n(\t+)<(u|o)l><li>(.*)<\/li><\/(u|o)l>/;a.match(f);)a=a.replace(f,function(e,d,g,h,m,p){return 0<g.length&&(g=g.substring(1),0<g.length&&(g="\n"+g)),`${g}<${h}l><li>${m}</li></${p}l></li></${d}l>`});a=a.replace(/(<\/ul>\n?[ \t]*<ul>)+?/g,"").replace(/(<\/ol>\n?[ \t]*<ol>)+?/g,"").replace(/\*\*([^\n*]+?)\*\*/g,"<strong>$1</strong>").replace(/__([^\n_]+?)__/g,
"<strong>$1</strong>").replace(/\*([^\n*]+?)\*/g,"<em>$1</em>").replace(/_([^\n_]+?)_/g,"<em>$1</em>").replace(/(?:~~)([^~]+?)(?:~~)/g,"<del>$1</del>");for(f=0;f<l;f++)a=a.replace(`{html-${f}}`,k[f]);for(f=0;f<b;f++){let {lang:e,block:d}=c[f];a=a.replace(`{code-${f}}`,`<pre><code${e?` class="language-${e}"`:""}>${G(d)}</code></pre>`)}return a.trim()}function L(){if(!(this instanceof L))return new L;this.ready=a=>{"complete"===document.readyState||"interactive"===document.readyState?a():document.addEventListener("DOMContentLoaded",
a)};this._events={ONLOAD:"DOMContentLoaded",TITLE:"DOMTitleChange",RENDER:"render",GO:"go"};this._loaded=!1;this._tree=null;this._view=()=>{};this.emitter=Fa("choo.emit");this.emit=this.emitter.emit.bind(this.emitter);this.state={events:this._events,title:document.title,query:Z()};this.emitter.prependListener(this._events.TITLE,a=>{this.state.title=document.title=a})}function Ga(a){if("Tab"===a.key){let l=this;var c=h=>{document.activeElement!==l&&l.focus();(""===h?document.execCommand("delete"):
document.execCommand("insertText",!1,h))||(l.setRangeText(h,l.selectionStart||0,l.selectionEnd||0,"end"),l.dispatchEvent(new InputEvent("input",{text:h,inputType:"insertText"})))};let {selectionStart:f,selectionEnd:e,value:d}=l,g=d.lastIndexOf("\n",f-1)+1;if(a.shiftKey){var b=d.lastIndexOf("\n",e-1)+1,k="\t"!==d.charAt(b)?e:b+1;b=l.value.slice(g,k);let h=b.replace(/(^|\n)(\t| {1,2})/g,"$1");b=b.length-h.length;l.setSelectionRange(g,k);c(h);c=(c=/\t| {1,2}/.exec(d.slice(g,f)))?c[0].length:0;l.setSelectionRange(f-
c,Math.max(f-c,e-b))}else k=d.slice(f,e),0<(null===(b=/\n/g.exec(k))||void 0===b?void 0:b.length)?(k=l.value.slice(g,e-1),b=k.replace(/^|\n/g,"$&\t"),k=b.length-k.length,l.setSelectionRange(g,e-1),c(b),l.setSelectionRange(f+1,e+k)):c("\t");a.preventDefault()}}function T(a,c,b){b=`\\s<${c} id=${b}>`;a=a.match(new RegExp(b+`.+?(?=</${c}>)`,"s"));return(null!=a?a:[]).length?a[0].replace(b.replace("\\s",""),"").trim():""}function Ha(a){return aa(this,null,function*(){let c=Object.keys(a);return c.length&&
!a[c[0]].img&&(yield Promise.all(c.map(b=>new Promise(k=>{let l=new Image;l.src=a[b];l.onload=()=>{a[b]={img:a[b],alt:"image",size:[l.width,l.height]};k()}})))),a})}function Ia(a,c=()=>{}){!confirm("Inserting images increases your wiki's file size. Continue?")||FW.upload("image/*",b=>{ba(b,(k,l,f)=>{if(k){let e=FW.hash.string(k);a.p.img[e.toString()]={alt:prompt("Alt text:",b.name),size:[l,f],img:k};c({img:k,id:e})}})})}function Ja(a,c,b=()=>{}){a.preventDefault();document.getElementById("g").close();
b(c)}function Ka(a){return a.replace(/(?:<img src=")[^"]+#([-\d]+)(?=")/g,'<img src="img:$1:img')}function La(a,c){return c?a.replace(/<img /g,"<im "):a.replace(/<im /g,"<img ")}function ba(a,c=()=>{}){let b=new FileReader;b.onload=k=>{let l=new Image;l.src=k.target.result;l.onload=()=>{let f=document.createElement("canvas"),e=l.width,d=l.height,g=prompt("Max width pixels:","400");g=null!=g&&g.length?parseInt(g):400;let h=prompt("Max height pixels:","350");h=null!=h&&h.length?parseInt(h):350;e>d?
e>g&&(d*=g/e,e=g):d>h&&(e*=h/d,d=h);f.width=e;f.height=d;f.getContext("2d").drawImage(l,0,0,e,d);c(f.toDataURL(a.type),e,d)}};b.onerror=k=>{c(null)};b.readAsDataURL(a)}function ca(a){var c=0,b;if(0===a.length)return c;for(b=0;b<a.length;b++){var k=a.charCodeAt(b);c=(c<<5)-c+k;c|=0}return c}function Ma(a){return ca(JSON.stringify(a))}function Na(a){var c;let b=null!=a?a:null;return b&&(null!=(c=null==a?void 0:a.match(/\[\[.+?(?=\]\])/g))?c:[]).forEach(k=>{var l;let f=k.replace("[[","").split("|"),
e=f[1]?f[0]:f[0].split("#")[0],d=(null!=(l=f[1])?l:f[0]).trim().split("#");f[1]||(d[0]=FW.slug(d[0]));l=FW.state.p.pages.some(g=>g.slug===d[0])||"undefined"!=typeof FW.state.views[d[0]];b=b.replace(`${k}]]`,`<a internal href="?page=${d.join("#")}"${l?"":" class=e"}>${e}</a>`)}),b}function Oa(a,c=!1){var b;let k=null!=a?a:null;return k&&(null!=(b=null==a?void 0:a.match(/img:.+?(?=:img)/g))?b:[]).forEach(l=>{id=l.replace("img:","");let f=FW.state.p.img[id];"undefined"!=typeof f&&(k=k.replace(`${l}:img`,
f.img+(c?`#${id}`:"")+`" alt="${f.alt}`))}),k}function Pa(a){var c;let b=null!=a?a:null;return b&&(null!=(c=null==a?void 0:a.match(/<a href="[^"]+">/gi))?c:[]).forEach(k=>{b=b.replace(k,k.replace(">",'target="_blank" rel="noopener noreferrer">'))}),b}function Qa(a){var c;let b=null!=a?a:null;return b&&(null!=(c=null==a?void 0:a.match(/<h\d>.+?<\/h\d>/gi))?c:[]).forEach(k=>{let l=k.match(/<h(\d)>(.+)<\/h\d>/i),f=FW.slug(l[2]);b=b.replace(k,`<h${l[1]} id=${f}>${l[2]} <a class=l href=#${f}>#</a></h${l[1]}>`)}),
b}function Ra(a,c=!1){var b;return null!=(b=c?null==a?void 0:a.replace(/&[lg]t;/g,k=>{var l;return null!=(l={"&lt;":"<","&gt;":">"}[k])?l:k}):null==a?void 0:a.replace(/[<>]/g,k=>{var l;return null!=(l={"<":"&lt;",">":"&gt;"}[k])?l:k}))?b:""}function da(a,c,b){"boolean"==typeof c?(b=c,c=void 0):b="undefined"!=typeof b?b:!1;"undefined"==typeof c&&(M=-1);c=c||[];if(Array.isArray(a)){var k=b,l;b=0;for(l=a.length;b<l;b++)a[b]=da(a[b],c,k)}else{var f;c=ea(fa(a,c));!0===b&&(c=ha(c));b=JSON.stringify(a);
l=c.length;for(f=0;f<l;f++)a=c[f],b=b.replace(new RegExp('(?:"'+a[1].replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")+'"):',"g"),'"'+a[0]+'":');a=(k=JSON.parse(b),k._=Sa(c),k)}return a}function ia(a){a=JSON.parse(JSON.stringify(a));if(Array.isArray(a)){var c;var b=0;for(c=a.length;b<c;b++)a[b]=ia(a[b])}else{var k=JSON.parse(JSON.stringify(a._));delete a._;c=JSON.stringify(a);for(b in k)"undefined"!=typeof k[b]&&(c=c.replace(new RegExp('(?:"'+b+'"):',"g"),'"'+k[b]+'":'));k=c}return k?JSON.parse(k):a}function ja(a,
c){var b,k=a.length;for(b=0;b<k;b++)if(a[b][1]===c)return!0;return!1}function ea(a){var c,b=a.length,k=[];for(c=0;c<b;c++)ja(k,a[c][1])||k.push(a[c]);return k}function Sa(a){return a.reduce((c,b)=>(c[b[0]]=b[1],c),{})}function ka(a,c,b=0){var k=[];for(c=c||71;a>=c;)k.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=_!?()*".charCodeAt(a%c+b)),a=Math.floor(a/c-1);return k.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=_!?()*".charCodeAt(a+b)),k.reverse()}
function fa(a,c){var b,k,l;for(k in a)"undefined"!=typeof a[k]&&(l=a[k],((null==l?void 0:l.constructor)===Object||Array.isArray(l))&&(c=c.concat(ea(fa(l,c)))),isNaN(Number(k))&&(ja(c,k)||(M+=1,b=[String.fromCharCode.apply(String,ka(M)),k],c.push(b))));return c}function ha(a){var c,b=a.length,k={};for(c=0;c<b;c++)k[a[c][0]]=c;for(c=0;c<b;c++){var l=a[c][1];if("undefined"!=typeof k[l])return c=k[l],M+=1,a[c][0]=String.fromCharCode.apply(String,ka(M)),k[c]=a[c][0],delete k[l],ha(a)}return a}var O=Object.defineProperty,
Ta=Object.defineProperties,Ua=Object.getOwnPropertyDescriptor,Va=Object.getOwnPropertyDescriptors,Wa=Object.getOwnPropertyNames,la=Object.getOwnPropertySymbols,ma=Object.prototype.hasOwnProperty,Xa=Object.prototype.propertyIsEnumerable,na=(a,c,b)=>c in a?O(a,c,{enumerable:!0,configurable:!0,writable:!0,value:b}):a[c]=b,H=(a,c)=>{for(var b in c||={})ma.call(c,b)&&na(a,b,c[b]);if(la)for(b of la(c))Xa.call(c,b)&&na(a,b,c[b]);return a},N=(a,c)=>Ta(a,Va(c)),I=(a,c)=>()=>(a&&(c=a(a=0)),c),D=(a,c)=>()=>
(c||a((c={exports:{}}).exports,c),c.exports),E=(a,c)=>{for(var b in c)O(a,b,{get:c[b],enumerable:!0})},Ya=(a,c,b,k)=>{if(c&&"object"==typeof c||"function"==typeof c)for(let l of Wa(c))!ma.call(a,l)&&l!==b&&O(a,l,{get:()=>c[l],enumerable:!(k=Ua(c,l))||k.enumerable});return a},P=a=>Ya(O({},"__esModule",{value:!0}),a),aa=(a,c,b)=>new Promise((k,l)=>{var f=g=>{try{d(b.next(g))}catch(h){l(h)}},e=g=>{try{d(b.throw(g))}catch(h){l(h)}},d=g=>g.done?k(g.value):Promise.resolve(g.value).then(f,e);d((b=b.apply(a,
c)).next())}),Za=D((a,c)=>{c.exports=function(b,k,l){var f=b.length;if(!(k>=f||0===l)){l=k+l>f?f-k:l;for(f-=l;k<f;++k)b[k]=b[k+l];b.length=f}}}),J=D((a,c)=>{function b(k,l){if(!k)throw Error(l||"AssertionError");}b.notEqual=function(k,l,f){b(k!=l,f)};b.notOk=function(k,l){b(!k,l)};b.equal=function(k,l,f){b(k==l,f)};b.ok=b;c.exports=b}),$a=D((a,c)=>{function b(f){this.method=(this.hasIdle=(this.hasWindow=f)&&window.requestIdleCallback)?window.requestIdleCallback.bind(window):this.setTimeout;this.scheduled=
!1;this.queue=[]}var k=J(),l="undefined"!=typeof window;b.prototype.push=function(f){k.equal(typeof f,"function","nanoscheduler.push: cb should be type function");this.queue.push(f);this.schedule()};b.prototype.schedule=function(){if(!this.scheduled){this.scheduled=!0;var f=this;this.method(function(e){for(var d;f.queue.length&&0<e.timeRemaining();)d=f.queue.shift(),d(e);f.scheduled=!1;f.queue.length&&f.schedule()})}};b.prototype.setTimeout=function(f){setTimeout(f,0,{timeRemaining:function(){return 1}})};
c.exports=function(){var f;return l?(window._nanoScheduler||(window._nanoScheduler=new b(!0)),f=window._nanoScheduler):f=new b,f}}),ab=D((a,c)=>{function b(d){function g(p){var n="end-"+h+"-"+d;e.mark(n);l.push(function(){var r=null;try{e.measure(d+" ["+h+"]",m,n),e.clearMarks(m),e.clearMarks(n)}catch(q){r=q}p&&p(r,d)})}if(f.equal(typeof d,"string","nanotiming: name should be type string"),b.disabled)return k;var h=(1E4*e.now()).toFixed()%Number.MAX_SAFE_INTEGER,m="start-"+h+"-"+d;e.mark(m);return g.uuid=
h,g}function k(d){d&&l.push(function(){d(Error("nanotiming: performance API unavailable"))})}var l=$a()(),f=J();b.disabled=!0;try{var e=window.performance;b.disabled="true"===window.localStorage.DISABLE_NANOTIMING||!e.mark}catch(d){}c.exports=b}),bb=D((a,c)=>{function b(e){if(!(this instanceof b))return new b(e);this._name=e||"nanobus";this._starListeners=[];this._listeners={}}var k=Za(),l=ab(),f=J();c.exports=b;b.prototype.emit=function(e){f.ok("string"==typeof e||"symbol"==typeof e,"nanobus.emit: eventName should be type string or symbol");
for(var d=[],g=1,h=arguments.length;g<h;g++)d.push(arguments[g]);g=l(this._name+"('"+e.toString()+"')");h=this._listeners[e];return h&&0<h.length&&this._emit(this._listeners[e],d),0<this._starListeners.length&&this._emit(this._starListeners,e,d,g.uuid),g(),this};b.prototype.on=b.prototype.addListener=function(e,d){return f.ok("string"==typeof e||"symbol"==typeof e,"nanobus.on: eventName should be type string or symbol"),f.equal(typeof d,"function","nanobus.on: listener should be type function"),"*"===
e?this._starListeners.push(d):(this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(d)),this};b.prototype.prependListener=function(e,d){return f.ok("string"==typeof e||"symbol"==typeof e,"nanobus.prependListener: eventName should be type string or symbol"),f.equal(typeof d,"function","nanobus.prependListener: listener should be type function"),"*"===e?this._starListeners.unshift(d):(this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].unshift(d)),this};b.prototype.once=function(e,
d){function g(){d.apply(h,arguments);h.removeListener(e,g)}f.ok("string"==typeof e||"symbol"==typeof e,"nanobus.once: eventName should be type string or symbol");f.equal(typeof d,"function","nanobus.once: listener should be type function");var h=this;this.on(e,g);return this};b.prototype.prependOnceListener=function(e,d){function g(){d.apply(h,arguments);h.removeListener(e,g)}f.ok("string"==typeof e||"symbol"==typeof e,"nanobus.prependOnceListener: eventName should be type string or symbol");f.equal(typeof d,
"function","nanobus.prependOnceListener: listener should be type function");var h=this;this.prependListener(e,g);return this};b.prototype.removeListener=function(e,d){function g(h,m){if(h&&(m=h.indexOf(m),-1!==m))return k(h,m,1),!0}return(f.ok("string"==typeof e||"symbol"==typeof e,"nanobus.removeListener: eventName should be type string or symbol"),f.equal(typeof d,"function","nanobus.removeListener: listener should be type function"),"*"===e)?(this._starListeners=this._starListeners.slice(),g(this._starListeners,
d)):("undefined"!=typeof this._listeners[e]&&(this._listeners[e]=this._listeners[e].slice()),g(this._listeners[e],d))};b.prototype.removeAllListeners=function(e){return e?"*"===e?this._starListeners=[]:this._listeners[e]=[]:(this._starListeners=[],this._listeners={}),this};b.prototype.listeners=function(e){e="*"!==e?this._listeners[e]:this._starListeners;var d=[];if(e)for(var g=e.length,h=0;h<g;h++)d.push(e[h]);return d};b.prototype._emit=function(e,d,g,h){if("undefined"!=typeof e&&0!==e.length)for(void 0===
g&&(g=d,d=null),d&&(void 0!==h?g=[d].concat(g,h):g=[d].concat(g)),d=e.length,h=0;h<d;h++){var m=e[h];m.apply(m,g)}}}),cb=D((a,c)=>{var b=J(),k=/(noopener|noreferrer) (noopener|noreferrer)/,l=/^[\w-_]+:/;c.exports=function(f,e){b.notEqual(typeof window,"undefined","nanohref: expected window to exist");e=e||window.document;b.equal(typeof f,"function","nanohref: cb should be type function");b.equal(typeof e,"object","nanohref: root should be type object");window.addEventListener("click",function(d){if(!(d.button&&
0!==d.button||d.ctrlKey||d.metaKey||d.altKey||d.shiftKey||d.defaultPrevented)){var g=function p(m){if(m&&m!==e)return"a"!==m.localName||void 0===m.href?p(m.parentNode):m}(d.target);!g||window.location.protocol!==g.protocol||window.location.hostname!==g.hostname||window.location.port!==g.port||g.hasAttribute("data-nanohref-ignore")||g.hasAttribute("download")||"_blank"===g.getAttribute("target")&&k.test(g.getAttribute("rel"))||l.test(g.getAttribute("href"))||(d.preventDefault(),f(g))}})}}),db=D((a,
c)=>{c.exports="onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onmouseenter onmouseleave ontouchcancel ontouchend ontouchmove ontouchstart ondragstart ondrag ondragenter ondragleave ondragover ondrop ondragend onkeydown onkeypress onkeyup onunload onabort onerror onresize onscroll onselect onchange onsubmit onreset onfocus onblur oninput onanimationend onanimationiteration onanimationstart oncontextmenu onfocusin onfocusout".split(" ")}),eb=D((a,c)=>{function b(f,e,d){f[d]!==
e[d]&&(e[d]=f[d],f[d]?e.setAttribute(d,""):e.removeAttribute(d))}var k=db(),l=k.length;c.exports=function(f,e){var d=f.nodeType,g=f.nodeName;if(1===d){for(var h=e.attributes,m=f.attributes,p=null,n,r=null,q=null,t,u=m.length-1;0<=u;--u)t=m[u],q=t.name,p=t.namespaceURI,n=t.value,p?(q=t.localName||q,r=e.getAttributeNS(p,q),r!==n&&e.setAttributeNS(p,q,n)):e.hasAttribute(q)?(r=e.getAttribute(q),r!==n&&("null"===n||"undefined"===n?e.removeAttribute(q):e.setAttribute(q,n))):e.setAttribute(q,n);for(m=h.length-
1;0<=m;--m)t=h[m],!1!==t.specified&&(q=t.name,p=t.namespaceURI,p?(q=t.localName||q,f.hasAttributeNS(p,q)||e.removeAttributeNS(p,q)):f.hasAttributeNS(null,q)||e.removeAttribute(q))}3!==d&&8!==d||e.nodeValue===f.nodeValue||(e.nodeValue=f.nodeValue);"INPUT"===g?(d=f.value,g=e.value,b(f,e,"checked"),b(f,e,"disabled"),f.indeterminate!==e.indeterminate&&(e.indeterminate=f.indeterminate),"file"!==e.type&&(d!==g&&(e.setAttribute("value",d),e.value=d),"null"===d&&(e.value="",e.removeAttribute("value")),f.hasAttributeNS(null,
"value")?"range"===e.type&&(e.value=d):e.removeAttribute("value"))):"OPTION"===g?b(f,e,"selected"):"TEXTAREA"===g&&(d=f.value,(d!==e.value&&(e.value=d),!e.firstChild||e.firstChild.nodeValue===d)||""===d&&e.firstChild.nodeValue===e.placeholder||(e.firstChild.nodeValue=d));for(d=0;d<l;d++)g=k[d],f[g]?e[g]=f[g]:e[g]&&(e[g]=void 0)}}),fb=D((a,c)=>{function b(d,g){return g?d?d.isSameNode&&d.isSameNode(g)?g:d.tagName!==g.tagName||(d.dataset?d.dataset.nanomorphComponentId:void 0)!==(g.dataset?g.dataset.nanomorphComponentId:
void 0)?d:(e(d,g),k(d,g),g):null:d}function k(d,g){for(var h,m,p,n,r=0,q=0;h=g.childNodes[q],m=d.childNodes[q-r],h||m;q++)if(m)if(h)if(l(m,h))p=b(m,h),p!==h&&(g.replaceChild(p,h),r++);else{n=null;for(var t=q;t<g.childNodes.length;t++)if(l(g.childNodes[t],m)){n=g.childNodes[t];break}n?(p=b(m,n),p!==n&&r++,g.insertBefore(p,h)):m.id||h.id?(g.insertBefore(m,h),r++):(p=b(m,h),p!==h&&(g.replaceChild(p,h),r++))}else g.appendChild(m),r++;else g.removeChild(h),q--}function l(d,g){return d.id?d.id===g.id:d.isSameNode?
d.isSameNode(g):d.tagName!==g.tagName?!1:3===d.type?d.nodeValue===g.nodeValue:!1}var f=J(),e=eb();c.exports=function(d,g,h){return f.equal(typeof d,"object","nanomorph: oldTree should be an object"),f.equal(typeof g,"object","nanomorph: newTree should be an object"),h&&h.childrenOnly?(k(g,d),d):(f.notEqual(g.nodeType,11,"nanomorph: newTree should have one root node (which is not a DocumentFragment)"),b(g,d))}}),gb=D((a,c)=>{var b=J();c.exports=function(k,l){b.equal(typeof k,"function","nanoraf: render should be a function");
b.ok("function"==typeof l||"undefined"==typeof l,"nanoraf: raf should be a function or undefined");l||=window.requestAnimationFrame;var f=!1,e=null;return function(){null===e&&!f&&(f=!0,l(function(){f=!1;for(var d=e.length,g=Array(d),h=0;h<d;h++)g[h]=e[h];k.apply(k,g);e=null}));e=arguments}}}),U,V,W=I(()=>{U=(a,c,b={})=>{function k(g,h){if(g.preventDefault(),!confirm("Permanently delete image from all pages in wiki?"))return!1;delete a.p.img[h.id];0<h.pgs.length&&(a.p.pages=a.p.pages.map(m=>(m.content&&
(m.content=m.content.replaceAll(`img:${h.id}:img`,"deleted")),m)));c(l.CHECK_CHANGED)}let {events:l}=a,{showDelete:f=!1,showUsed:e=!1,insert:d=null}=b;b=function(){let {pages:g,img:h}=a.p;return Object.keys(h).map(m=>N(H({id:m},h[m]),{pgs:e?g.filter(p=>{var n;return null==(n=p.content)?void 0:n.includes(`img:${m}:img`)}):[]}))}();return html`<section> <h1>Existing Images</h1> ${b.map(g=>html`<div class="ib at ed w14"> <div class=g> <img src=${g.img} class=w1 aria-describedby=alt> <span id=alt class=db>${g.alt} (${g.size[0]}x${g.size[1]}px)</span> <div class=pb> <button onclick=${h=>
{var m=g.img;h.preventDefault();h=new Image;h.src=m;window.open("").document.write(h.outerHTML)}}>View</button> ${f?html`<button onclick=${h=>{var m;h.preventDefault();a.p.img[g.id].alt=null!=(m=prompt("Alt text:",g.alt))?m:g.alt;c(l.CHECK_CHANGED)}}>Edit Alt</button>`:""} ${f?html`<button class=del onclick=${h=>k(h,g)}>Delete</button>`:""} ${d?html`<button onclick=${h=>d(h,g)}>Insert</button>`:""} </div> ${e?[html`<details> <summary class=b>Used in ${g.pgs.length} pages</summary> <ul> ${g.pgs.map(h=>
html`<li><a href="?page=${h.slug}">${h.name}</a></li>`)} </ul> </details>`]:""} </div> </div>`)} </section>`};V=(a,c)=>html`<dialog id=g> <form class=fr method=dialog> <button>Close</button> </form> ${U(a,()=>{},{insert:(b,k)=>FW.img.put(b,k,c)})} </dialog>`}),X,oa,pa=I(()=>{X=a=>{var c;let {img:b,pg:k,out:l,hLink:f}=FW.inject,e=[],d=0,g=(null!=(c=a.content)?c:"").replace(RegExp("(<nowiki>.*<\\/nowiki>)","gs"),(h,m)=>(e[d]=m,`{nowiki-${d++}}`));g=k(FW.img.fix(g));g="md"===a.editor?md(g):g;g=b(f(l(g)));
for(a=0;a<d;a++)g=g.replace(`{nowiki-${a}}`,e[a]);return g};oa=(a,c)=>{var b;let {help:k}=a;a=X(c);let l=k.getChildren(c,!0);return[null!=c&&c.e||null==(b=null==c?void 0:c.tags)||!b.length?"":html`<aside> <dl class="db r"> <dt class=c><b>Tagged:</b></dt> <dd class=c> ${c.tags.replace(/,/g,", ")} </dd> </dl> </aside>`,html`<article class=uc> ${a?html.raw(a):"No Page Content"} </article>`,0<l.length?html`<footer> <h2>Sub Pages</h2> <ul> ${l.map(f=>k.getChildList(f,!0))} </ul> </footer>`:null]}}),qa=
{};E(qa,{editor:()=>ra});var ra,hb=I(()=>{pa();W();ra=a=>{function c({id:f}){f=`![](img:${f}:img)`;if(document.activeElement!==l&&l.focus(),document.selection)document.selection.createRange().text=f;else if(l.selectionStart||0===l.selectionStart){var e=l.selectionStart,d=l.selectionEnd;l.value=l.value.substring(0,e)+f+l.value.substring(d,l.value.length);l.selectionStart=e+f.length;l.selectionEnd=e+f.length}else l.value+=f;k({target:l})}let b=html`<div class="ed ed-content" style=display:none></div>`,
k=f=>{a.edits.content=f.target.value;clearTimeout(a.debounce);a.debounce=setTimeout(()=>{b.innerHTML=X(N(H({},a.edits),{editor:"md"}))},500)},l=html`<textarea oninput=${k}>${a.edits.content}</textarea>`;return k({target:l}),[l,html`<button onclick=${f=>{f.preventDefault();b.style.display="none"==b.style.display?"block":"none"}}>Preview</button>`,html`<button onclick=${f=>{f.preventDefault();FW.img.upload(a,c)}}>Insert Image from File</button>`,html`<button onclick=${f=>{f.preventDefault();document.getElementById("g").showModal()}}>Add Existing Image</button>`,
b,V(a,c)]}}),sa={};E(sa,{editor:()=>ta});var ta,ib=I(()=>{W();ta=(a,c)=>{function b(h){let m=g.children[1];document.activeElement!==m&&m.focus();l("insertHTML",`<p><img src="${h.img}#${h.id}"></p>`)}let {init:k,exec:l}=ed,{src:f,edits:e}=a,{content:d}=e,g=document.querySelector("#e");f?g=html`<textarea onchange=${h=>a.edits.content=h.target.value}>${FW.img.abbr(d)}</textarea>`:(g||(g=k({element:html`<div id=e class=ed></div>`,onChange:h=>a.edits.content=h,insert:()=>FW.img.upload(a,b)}),g.isSameNode=
()=>!0),g.content.innerHTML=d.includes("<img ")?FW.inject.img(d,!0):d);return[g,html`<div class="w1 tr pb"> <button onclick=${(function(h){h.preventDefault();a.src=!f;c(a.events.RENDER)})}>${f?"Show Editor":"Show HTML"}</button> </div>`,V(a,b)]}}),jb=D((a,c)=>{c.exports=function(k){return function(l,f,e){for(var d in f)d in b&&(f[b[d]]=f[d],delete f[d]);return k(l,f,e)}};var b={class:"className",for:"htmlFor","http-equiv":"httpEquiv"}}),kb=D((a,c)=>{var b=jb();c.exports=function(l,f){function e(g){return"function"==
typeof g||"string"==typeof g||g&&"object"==typeof g||null==g?g:d("",g)}f||={};var d=f.concat||function(g,h){return String(g)+String(h)};return!1!==f.attrToProp&&(l=b(l)),function(g){function h(B){var y=[];7===m&&(m=4);for(var z=0;z<B.length;z++){var w=B.charAt(z);1===m&&"<"===w?(p.length&&y.push([1,p]),p="",m=2):">"===w&&9!==m&&10!==m&&13!==m?(2===m&&p.length?y.push([2,p]):5===m?y.push([5,p]):8===m&&p.length&&y.push([8,p]),y.push([3]),p="",m=1):13===m&&/-$/.test(p)&&"-"===w?(f.comments&&y.push([8,
p.substr(0,p.length-1)]),p="",m=1):2===m&&/^!--$/.test(p)?(f.comments&&y.push([2,p],[5,"comment"],[11]),p=w,m=13):1===m||13===m?p+=w:2===m&&"/"===w&&p.length||(2===m&&/\s/.test(w)?(p.length&&y.push([2,p]),p="",m=4):2===m?p+=w:4===m&&/[^\s"'=/]/.test(w)?(m=5,p=w):4===m&&/\s/.test(w)?(p.length&&y.push([5,p]),y.push([12])):5===m&&/\s/.test(w)?(y.push([5,p]),p="",m=6):5===m&&"="===w?(y.push([5,p],[11]),p="",m=7):5===m?p+=w:6!==m&&4!==m||"="!==w?6!==m&&4!==m||/\s/.test(w)?7===m&&'"'===w?m=10:7===m&&"'"===
w?m=9:10===m&&'"'===w?(y.push([8,p],[12]),p="",m=4):9===m&&"'"===w?(y.push([8,p],[12]),p="",m=4):7!==m||/\s/.test(w)?8===m&&/\s/.test(w)?(y.push([8,p],[12]),p="",m=4):(8===m||9===m||10===m)&&(p+=w):(m=8,z--):(y.push([12]),/[\w-]/.test(w)?(p+=w,m=5):m=4):(y.push([11]),m=7))}return 1===m&&p.length?(y.push([1,p]),p=""):8===m&&p.length?(y.push([8,p]),p=""):10===m&&p.length?(y.push([8,p]),p=""):9===m&&p.length?(y.push([8,p]),p=""):5===m&&(y.push([5,p]),p=""),y}for(var m=1,p="",n=arguments.length,r=[],
q=0;q<g.length;q++)if(q<n-1){var t=arguments[q+1],u=h(g[q]),v=m;10===v&&(v=8);9===v&&(v=8);7===v&&(v=8);4===v&&(v=5);2===v?"/"===p?(u.push([2,"/",t]),p=""):u.push([2,t]):13===v&&f.comments?p+=String(t):13!==v&&u.push([0,v,t]);r.push.apply(r,u)}else r.push.apply(r,h(g[q]));n=[null,{},[]];t=[[n,-1]];for(q=0;q<r.length;q++){v=t[t.length-1][0];u=r[q];var A=u[0];if(2===A&&/^\//.test(u[1]))u=t[t.length-1][1],1<t.length&&(t.pop(),t[t.length-1][0][2][u]=l(v[0],v[1],v[2].length?v[2]:void 0));else if(2===A)u=
[u[1],{},[]],v[2].push(u),t.push([u,v[2].length-1]);else if(5===A||0===A&&5===u[1]){u="";for(var x;q<r.length;q++)if(5===r[q][0])u=d(u,r[q][1]);else if(0===r[q][0]&&5===r[q][1])if("object"!=typeof r[q][2]||u)u=d(u,r[q][2]);else for(x in r[q][2])r[q][2].hasOwnProperty(x)&&!v[1][x]&&(v[1][x]=r[q][2][x]);else break;11===r[q][0]&&q++;for(A=q;q<r.length;q++)if(8===r[q][0]||5===r[q][0])v[1][u]?""===r[q][1]||(v[1][u]=d(v[1][u],r[q][1])):v[1][u]=e(r[q][1]);else if(0!==r[q][0]||8!==r[q][1]&&5!==r[q][1]){!u.length||
v[1][u]||q!==A||3!==r[q][0]&&12!==r[q][0]||(v[1][u]=u.toLowerCase());3===r[q][0]&&q--;break}else v[1][u]?""===r[q][2]||(v[1][u]=d(v[1][u],r[q][2])):v[1][u]=e(r[q][2])}else if(5===A)v[1][u[1]]=!0;else if(0===A&&5===u[1])v[1][u[2]]=!0;else if(3===A)k.test(v[0])&&t.length&&(u=t[t.length-1][1],t.pop(),t[t.length-1][0][2][u]=l(v[0],v[1],v[2].length?v[2]:void 0));else if(0===A&&1===u[1])void 0===u[2]||null===u[2]?u[2]="":u[2]||(u[2]=d("",u[2])),Array.isArray(u[2][0])?v[2].push.apply(v[2],u[2]):v[2].push(u[2]);
else if(1===A)v[2].push(u[1]);else if(11!==A&&12!==A)throw Error("unhandled: "+A);}if(1<n[2].length&&/^\s*$/.test(n[2][0])&&n[2].shift(),2<n[2].length||2===n[2].length&&/\S/.test(n[2][1])){if(f.createFragment)return f.createFragment(n[2]);throw Error("multiple root elements must be wrapped in an enclosing tag");}return Array.isArray(n[2][0])&&"string"==typeof n[2][0][0]&&Array.isArray(n[2][0][2])&&(n[2][0]=l(n[2][0][0],n[2][0][1],n[2][0][2])),n[2][0]}};var k=RegExp("^(area|base|basefont|bgsound|br|col|command|embed|frame|hr|img|input|isindex|keygen|link|meta|param|source|track|wbr|!--|animate|animateTransform|circle|cursor|desc|ellipse|feBlend|feColorMatrix|feComposite|feConvolveMatrix|feDiffuseLighting|feDisplacementMap|feDistantLight|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feImage|feMergeNode|feMorphology|feOffset|fePointLight|feSpecularLighting|feSpotLight|feTile|feTurbulence|font-face-format|font-face-name|font-face-uri|glyph|glyphRef|hkern|image|line|missing-glyph|mpath|path|polygon|polyline|rect|set|stop|tref|use|view|vkern)(?:[.#][a-zA-Z0-9\u007f-\uffff_:-]+)*$")}),
lb=D((a,c)=>{var b=/\n[\s]+$/,k=/^\n[\s]+/,l=/[\s]+$/,f=/^[\s]+/,e=/[\n\s]+/g,d="a abbr b bdi bdo br cite data dfn em i kbd mark q rp rt rtc ruby s amp small span strong sub sup time u var wbr".split(" "),g=["code","pre","textarea"];c.exports=function n(m,p){if(Array.isArray(p))for(var r=m.nodeName.toLowerCase(),q=!1,t,u,v=0,A=p.length;v<A;v++){var x=p[v];if(Array.isArray(x))n(m,x);else{("number"==typeof x||"boolean"==typeof x||"function"==typeof x||x instanceof Date||x instanceof RegExp)&&(x=x.toString());
var B=m.childNodes[m.childNodes.length-1];"string"==typeof x?(q=!0,B&&"#text"===B.nodeName?B.nodeValue+=x:(x=m.ownerDocument.createTextNode(x),m.appendChild(x),B=x),v===A-1&&(q=!1,-1===d.indexOf(r)&&-1===g.indexOf(r)?(t=B.nodeValue.replace(k,"").replace(l,"").replace(b,"").replace(e," "),""===t?m.removeChild(B):B.nodeValue=t):-1===g.indexOf(r)&&(u=0===v?"":" ",t=B.nodeValue.replace(k,u).replace(f," ").replace(l,"").replace(b,"").replace(e," "),B.nodeValue=t))):x&&x.nodeType&&(q&&(q=!1,-1===d.indexOf(r)&&
-1===g.indexOf(r)?(t=B.nodeValue.replace(k,"").replace(b," ").replace(e," "),""===t?m.removeChild(B):B.nodeValue=t):-1===g.indexOf(r)&&(t=B.nodeValue.replace(f," ").replace(k,"").replace(b," ").replace(e," "),B.nodeValue=t)),(B=x.nodeName)&&(r=B.toLowerCase()),m.appendChild(x))}}}}),mb=D((a,c)=>{c.exports="svg altGlyph altGlyphDef altGlyphItem animate animateColor animateMotion animateTransform circle clipPath color-profile cursor defs desc ellipse feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence filter font font-face font-face-format font-face-name font-face-src font-face-uri foreignObject g glyph glyphRef hkern image line linearGradient marker mask metadata missing-glyph mpath path pattern polygon polyline radialGradient rect set stop switch symbol text textPath title tref tspan use view vkern".split(" ")}),
nb=D((a,c)=>{c.exports="async autofocus autoplay checked controls default defaultchecked defer disabled formnovalidate hidden ismap loop multiple muted novalidate open playsinline readonly required reversed selected".split(" ")}),ob=D((a,c)=>{c.exports=["indeterminate"]}),pb=D((a,c)=>{var b=kb(),k=lb(),l=mb(),f=nb(),e=ob();c.exports=function(d){function g(p,n,r){var q;-1!==l.indexOf(p)&&(n.namespace="http://www.w3.org/2000/svg");var t=!1;n.namespace&&(t=n.namespace,delete n.namespace);var u=!1;if(n.is&&
(u=n.is,delete n.is),t)u?q=d.createElementNS(t,p,{is:u}):q=d.createElementNS(t,p);else{if("!--"===p)return d.createComment(n.comment);u?q=d.createElement(p,{is:u}):q=d.createElement(p)}for(var v in n)if(n.hasOwnProperty(v)){p=v.toLowerCase();u=n[v];if("classname"===p&&(p="class",v="class"),"htmlFor"===v&&(v="for"),-1!==f.indexOf(p))if("true"===String(u))u=p;else if("false"===String(u))continue;"on"===p.slice(0,2)||-1!==e.indexOf(p)?q[v]=u:t?"xlink:href"===v?q.setAttributeNS("http://www.w3.org/1999/xlink",
v,u):/^xmlns($|:)/i.test(v)||q.setAttributeNS(null,v,u):q.setAttribute(v,u)}return k(q,r),q}function h(p){for(var n=d.createDocumentFragment(),r=0;r<p.length;r++)null!=p[r]&&(Array.isArray(p[r])?n.appendChild(h(p[r])):("string"==typeof p[r]&&(p[r]=d.createTextNode(p[r])),n.appendChild(p[r])));return n}var m=b(g,{comments:!0,createFragment:h});return m.default=m,m.createComment=g,m}}),qb=D((a,c)=>{c.exports=pb()(document)}),rb=D((a,c)=>{c.exports=function(b){var k=document.createElement("div");k.innerHTML=
b;b=k.childNodes;return Array.isArray(b)?b:[].slice.call(b)}}),ua={};E(ua,{default:()=>va,exec:()=>C,init:()=>Y});var Q,R,S,F,C,Y,va,sb=I(()=>{Q=(a,c,b)=>a.addEventListener(c,b);R=(a,c)=>a.appendChild(c);S=a=>document.createElement(a);F=a=>document.queryCommandState(a);C=(a,c=null)=>document.execCommand(a,!1,c);Y=a=>{let c=[{icon:"\u2612",title:"Clear Formatting",result:()=>C("removeFormat")},{icon:"<b>B</b>",title:"Bold",state:()=>F("bold"),result:()=>C("bold")},{icon:"<i>I</i>",title:"Italic",state:()=>
F("italic"),result:()=>C("italic")},{icon:"<u>U</u>",title:"Underline",state:()=>F("underline"),result:()=>C("underline")},{icon:"<b>H</b>",title:"Heading",result:()=>C("formatBlock","<h2>")},{icon:"<b>H<sub>2</sub></b>",title:"Sub-Heading",result:()=>C("formatBlock","<h3>")},{icon:"\u00b6",title:"Paragraph",result:()=>C("formatBlock","<p>")},{icon:"\u21a6",title:"Align Left",state:()=>F("justifyLeft"),result:()=>C("justifyLeft")},{icon:"\u2194",title:"Align Center",state:()=>F("justifyCenter"),result:()=>
C("justifyCenter")},{icon:"\u21a4",title:"Align Right",state:()=>F("justifyRight"),result:()=>C("justifyRight")},{icon:"#",title:"Number List",result:()=>C("insertOrderedList")},{icon:"\u2022",title:"Bullet List",result:()=>C("insertUnorderedList")},{icon:"\u201c \u201d",title:"Quote",result:()=>C("formatBlock","<blockquote>")},{icon:"\u2015",title:"Separator",result:()=>C("insertHorizontalRule")},{icon:"\ud83d\udd17",title:"Link",result:()=>{let l=window.prompt("Link URL:");l&&C("createLink",l)}},
{title:"Link External Image",icon:"\ud83d\uddbc\ufe0f",result:()=>{let l=window.prompt("Image URL:");l&&C("insertImage",l)}},{title:"Insert Image from File",icon:"\ud83d\udcf8",result:a.insert},{title:"Add Existing Image",icon:"\ud83d\udcce",result:()=>document.getElementById("g").showModal()}],b=S("div");b.className="ed-actionbar";b.role="toolbar";R(a.element,b);let k=a.element.content=S("div");return k.contentEditable=!0,k.className="ed-content",k.oninput=({target:{firstChild:l}})=>{l&&3===l.nodeType?
C("formatBlock","<p>"):"<br>"===k.innerHTML&&(k.innerHTML="");a.onChange(k.innerHTML)},k.onkeydown=l=>{"Enter"===l.key&&"blockquote"===document.queryCommandValue("formatBlock")&&setTimeout(()=>C("formatBlock","<p>"),0)},R(a.element,k),c.forEach(l=>{let f=S("button");if(f.className="ed-button",f.innerHTML=l.icon,f.title=l.title,f.setAttribute("type","button"),f.onclick=()=>l.result()&&k.focus(),l.state){let e=()=>f.classList[l.state()?"add":"remove"]("ed-selected");Q(k,"keyup",e);Q(k,"mouseup",e);
Q(f,"click",e)}R(b,f)}),C("defaultParagraphSeparator","p"),a.element};va={exec:C,init:Y}}),wa={};E(wa,{default:()=>Ea});var K,xa,G,tb=I(()=>{K={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","&":"&amp;","[":"&#91;","]":"&#93;","(":"&#40;",")":"&#41;",_:"&#95;","*":"&ast;","`":"&#96;"};xa=Object.keys(K).filter(a=>"&"!=a).map(a=>K[a].replace("&"!=a?"&":"",""));G=a=>a.replace(/[<>&\(\)\[\]"']/g,c=>K[c]||c).replace(new RegExp(`&amp;(${xa.join("|")})`,"g"),"&$1")}),Fa=bb(),ub=cb(),ya=fb(),vb=gb(),Z=()=>
{let a={};return(new URLSearchParams(window.location.search)).forEach((c,b,k)=>{c=k.getAll(b);a[b]=1<c.length?c:c[0]}),a},wb={};L.prototype.start=function(){let a=()=>{let b=document.getElementById(location.hash.substring(1));return b?(null==b||b.scrollIntoView(),!0):!1};this.emitter.prependListener(this._events.GO,(b=null,k="push")=>{b&&history[k+"State"](wb,this.state.title,b);this.state.query=Z();this._loaded&&this.emit(this._events.RENDER,()=>{a()||window.scroll(0,0)})});window.onpopstate=()=>
{this.emit(this._events.GO)};ub(({href:b})=>{b!==window.location.href&&this.emit(this._events.GO,b)});var c=()=>this._view(this.state,this.emit);return this._tree=c(),this._rq=[],this._rd=null,this.emitter.prependListener(this._events.RENDER,b=>{"function"==typeof b&&this._rq.push(b);null!==this._rd&&clearTimeout(this._rd);this._rd=setTimeout(vb(()=>{var k=c();for(ya(this._tree,k);0<this._rq.length;)this._rq.shift()()}),9)}),this.ready(()=>{this.emit(this._events.ONLOAD);this._loaded=!0;a()}),this._tree};
L.prototype.mount=function(a){this.ready(()=>{var c=this.start();"string"==typeof a?this._tree=document.querySelector(a):this._tree=a;ya(this._tree,c)})};var xb=(a,c)=>{let {p:b,help:k}=a;return[html`<header> <h1>All Pages</h1> </header>`,html`<article> <p>This wiki has ${b.pages.length} page${1!==b.pages.length?"s":""}:</p> <ul> ${b.pages.filter(l=>!l.parent).map(l=>k.getChildList(l))} </ul> </article>`]};W();var yb=(a,c)=>{function b(){FW.upload("text/html",n=>{FW.xtr(n,r=>{r&&(a.p=r[0],k(r[1]),
l(r[2]),c(d.ONLOAD),c(d.CHECK_CHANGED),c(d.NOTIFY,"Wiki Loaded"))})})}function k(n){let r=document.getElementById("c");n.trim()?(a.c=n,r?r.innerHTML=n:document.head.innerHTML+=`<style id=c>${n}</style>`):(delete a.c,r&&document.head.removeChild(r))}function l(n){n.trim()?(a.j!==n&&alert("You must save & reload to run your JavaScript"),a.j=n):delete a.j}var f,e;let {events:d,p:g,c:h,j:m}=a,p=g.pages.map(n=>n.slug).join("\n");return[html`<header> <h1>Wiki Settings</h1> </header>`,html`<article class=mw> <form onsubmit=${(function(n){n.preventDefault();
n=n.currentTarget;let r=n.wTitle.value.trim();if(1>r.length)return alert("Title is required");a.p.name=r;a.p.desc=n.wDesc.value.trim();1<n.home.value.length?a.p.home=n.home.value:delete a.p.home;let q=n.wPo.value.split("\n").map(t=>t.trim());a.p.pages.sort((t,u)=>q.indexOf(t.slug)<q.indexOf(u.slug)?-1:1);k(n.wCss.value);l(n.wJs.value);n.wHead.value.trim()?a.p.head=FW.inject.esc(n.wHead.value):delete a.p.head;a.p.static=n.wOut.checked;a.p.published=n.wPub.checked;c(d.CHECK_CHANGED);c(d.NOTIFY,"Settings updated")})} class=pb> <label for=wTitle>Wiki Title</label> <input class=w1 id=wTitle value=${g.name} minlength=1 required> <label for=wDesc>Wiki Description</label> <input class=w1 id=wDesc value=${g.desc}> <label for=home>Home Page</label> <select id=home> <option value="" selected=${!g.home}>All Pages (default)</option> ${g.pages.map(n=>
html`<option selected=${n.id===g.home} value=${n.id}>${n.name} (${n.slug})</option>`)} </select> <label for=wPo>Page Order</label> <textarea id=wPo class=notab>${p}</textarea> <label for=wCss>Custom CSS</label> <textarea id=wCss>${h}</textarea> <label for=wJs>Custom JS</label> <span class=h>Only runs once on wiki load. To test, save wiki & load that file.</span> <textarea id=wJs>${m}</textarea> <label for=wHead>Custom Head</label> <span class=h>Add HTML directly to <code>${html.raw("&lt;head&gt;")}</code>. To test, save wiki & load that file. Be careful! Malformed HTML will break wiki.</span> <textarea id=wHead>${FW.inject.esc(g.head,
!0)}</textarea> <label for=wOut>Include Static HTML</label> <input id=wOut type=checkbox checked=${null!=(f=g.static)?f:!1}> <span class=h>Include your wiki content in simple HTML for non-JS browsers. Nearly doubles output size.</span> <label for=wPub>Publish</label> <input id=wPub type=checkbox checked=${null!=(e=g.published)?e:!1}> <span class=h>Hides Save, New Page, & Wiki Settings buttons. You will need to manually visit <code>?page=s</code> to unset this when set.</span> <div class=tr> <button type=submit>Update</button> </div> </form> <div class=tr> <p class="pb h"> Feather Wiki Version: Wren_1.7.1 </p> <p> <button class=del onclick=${()=>
b()}>Import & Overwrite with Other Feather Wiki file</button> </p> </div> ${U(a,c,{showDelete:!0,showUsed:!0})} </article>`]},zb=(a,c)=>{let {p:b,query:k}=a;a=b.pages.filter(l=>{var f;return null==(f=l.tags)?void 0:f.includes(k.tag)});return[html`<header> <h1>Pages Tagged <code>${k.tag}</code></h1> </header>`,html`<article> ${0<a.length?html`<ul> ${a.map(l=>html`<li><a href="?page=${l.slug}">${l.name}</a></li>`)} </ul>`:"None Found"} </article>`]};pa();var Ab=(a,c,b)=>{function k(n){n=n.target;a.edits[n.id]=
n.value;c(f.RENDER)}function l(){return FW.tidy(document.getElementById("tags").value.split(","))}let {events:f,edits:e,p:d,help:g}=a,h=g.getChildren(b).map(n=>n.id),m=!d.pages.some(n=>n.id===b.id);var {useMd:p}=e;p=[html`<div class="w1 tr"> <button onclick=${(function(n){n.preventDefault();let {useMd:r,content:q}=e;r?confirm('Convert Markdown to HTML?\n("Cancel" to go without converting)')&&(a.edits.content=md(q)):a.edits.content=FW.img.abbr(q);a.edits.useMd=!r;c(f.RENDER)})}>${p?"Use Editor":"Use Markdown"}</button> </div>`,
(p?(hb(),P(qa)):(ib(),P(sa))).editor(a,c)];return html`<form onsubmit=${(function(n){n.preventDefault();n=n.currentTarget;let r=n.name.value.trim();if(1>r.length)return alert("Page Title cannot be blank.");let q=n.slug.value.trim();if(2>q.length)return alert("Page Slug must be more than 1 character long.");let t=H({},b);t.name=r;t.slug=FW.slug(q);t.content=FW.img.fix(FW.img.abbr(a.edits.content),!0);t.tags=l().join(",");t.parent=n.parent.value;n.hide.checked?t.hide=!0:delete t.hide;e.useMd?t.editor=
"md":delete t.editor;c(f.UPDATE_PAGE,t)})}> <header> <h1>Edit Page</h1> <div class=r> <div class="c w12"> <label for=name>Page Title</label> <input id=name value=${e.name} required minlength=2 onchange=${k}> </div> <div class="c w12"> <label for=slug>Page Slug</label> <input id=slug value=${e.slug} required minlength=2 onchange=${k}> <button onclick=${(function(n){n.preventDefault();document.getElementById("slug").value=FW.slug(document.getElementById("name").value.trim())})}>Slugify Title</button> </div> </div></header> <span class=h style=float:left>Internal links (hash optional): [[Page Title]] or [[text|page_slug#heading]].</span> ${p} <footer class=r> <div class="c w13"> <label for=tags>Page Tags</label> <input id=tags value=${e.tags} placeholder="Comma, Separated, List" onchange=${k}> <select onchange=${(function(n){let r=
n.target.value;if(0<r.length){let q=l();q.includes(r)||(e.tags+=(0<q.length?",":"")+r,c(f.RENDER))}n.target.value=""})}> <option value="" selected=selected disabled=disabled>Add Existing Tag</option> ${a.t.filter(n=>!e.tags.split(",").includes(n)).map(n=>html`<option>${n}</option>`)} </select> </div> <div class="c w13"> <label for=parent>Parent</label> <select id=parent onchange=${k}> <option value="" selected=${""===e.parent}>None</option> ${d.pages.filter(n=>n.id!==(null==b?void 0:b.id)&&!h.includes(n.id)).map(n=>
html`<option selected=${n.id===e.parent} value=${n.id}>${n.name} (${n.slug})</option>`)} </select> <label>Hide Page <input type=checkbox id=hide onchange=${n=>a.edits.hide=n.target.checked} checked=${e.hide}></label> </div> <div class="c w13 tr"> <div class=pb><button type=submit>Save</button></div> ${m?"":[html`<div class=pb><button onclick=${n=>{n.preventDefault();c(f.CANCEL_EDIT)}}>Cancel</button></div>`,html`<div><button class=del onclick=${n=>{n.preventDefault();confirm("You can't undo this after saving your wiki! Delete this page?")&&
c(f.DELETE_PAGE,b.id)}}>Delete</button></div>`]} </div> </footer> </form>`},Bb=(a,c,b)=>{let {edit:k,help:l,p:f,events:e}=a,{cd:d,md:g}=b;if(k)return Ab(a,c,b);let h=l.breadcrumb(b),m=FW.date(new Date(d)),p=new Date(null!=g?g:d),n=FW.date(p);return[html`<header> ${html.raw(h.map(r=>`<a href="?page=${r.slug}">${r.name}</a> /`).join(" "))} <div class="r ns"> <h1 class=c>${b.name}</h1> ${b.e?"":html`<div class="c w14 tr"> <time datetime=${p.toISOString()}> ${m!==n?html`<abbr title="Created: ${m}">${n}</abbr>`:
n} </time> ${f.published?"":html`<button onclick=${()=>c(e.START_EDIT)}>Edit</button> `} </div>`} </div> </header>`,oa(a,b)]},Cb=(a,c)=>{a=a.help.missing();return[html`<header> <h1>Missing Pages</h1> </header>`,html`<article> <p>This wiki has ${a.length} page${1!==a.length?"s":""} referenced that don't exist:</p> <ul> ${a.map(b=>html`<li>${b}</li>`)} </ul> </article>`]},Db=a=>{var c,b,k,l;a.root=location.pathname||"/";a.sb=!1;a.sbTab="Pages";a.sbx=new Set;a.recent=[];a.edit=!1;a.edits=null;a.keep=
!1;a.src=!1;a.notis={};a.help={find:(f,e="slug")=>a.p.pages.find(d=>d[e]===f),getPage:()=>{let {query:f,help:e,p:d}=a;return!f.page&&d.home?e.find(d.home,"id"):e.find(f.page)},getParent:f=>a.p.pages.find(e=>e.id===(null==f?void 0:f.parent)),getChildren:(f,e)=>a.p.pages.filter(d=>d.parent===(null==f?void 0:f.id)&&(!e||!d.hide)),getChildList:(f,e)=>{var d;if(e&&f.hide)return"";let {getChildren:g,getChildList:h}=a.help;var m=g(f,e);let p=null==(d=a.pg)?void 0:d.slug,n=p===f.slug,r=q=>{var t;return n||
a.sbx.has(f.id)||(null!=(t=q.find(u=>u.slug===p||r(g(u,e))))?t:!1)};d=[html`<a href="?page=${f.slug}" class=${n?"a":""}>${f.name}</a>`,0<m.length?html`<ul>${m.map(q=>h(q,e))}</ul>`:""];m=e&&d[1]?html`<details open=${r(m)} onclick=${q=>a.sbx.add(f.id)} ontoggle=${q=>{q.target.open||a.sbx.delete(f.id)}}> <summary>${d[0]}</summary> ${d[1]} </details>`:d;return html`<li> ${m} </li>`},missing:()=>a.p.pages.reduce((f,e)=>{let d=document.createElement("div");d.innerHTML=FW.inject.pg(e.content);e=[...d.getElementsByClassName("e")].filter(g=>
f.every(h=>h.href!==g.href));return[...f,...e]},[]).sort(),breadcrumb:f=>{let e=[];for(f=a.help.getParent(f);f;)e.unshift(f),f=a.help.getParent(f);return e}};a.events=N(H({},a.events),{HANDLE_404:"404",CREATE_PAGE:"cp",START_EDIT:"se",CANCEL_EDIT:"ce",UPDATE_PAGE:"up",DELETE_PAGE:"dp",COLLECT_TAGS:"ct",CHECK_CHANGED:"cc",SAVE_WIKI:"sw",NOTIFY:"n",REMOVE_NOTI:"rn"});a.views={a:xb,s:yb,t:zb,p:Bb,m:Cb};a.c=null!=(b=null==(c=document.querySelector("style#c"))?void 0:c.innerHTML)?b:"";a.j=null!=(l=null==
(k=document.querySelector("script#j"))?void 0:k.innerHTML)?l:"";try{a.p=FW.json.decompress(JSON.parse(document.querySelector("script#p").innerHTML))}catch(f){a.p={name:"New Wiki",desc:"",pages:[],img:{}}}a.pg=a.help.getPage();c=a.p.pages.find(f=>{var e;return f.id===(null==(e=a.recent[0])?void 0:e.p)});return a.useMd="md"===(null==c?void 0:c.editor),a.t=[],a.prev=FW.hash.object(a.p),a.now=a.prev,a.changed=!1,a},Eb=(a,c)=>{let {events:b,help:k,root:l,views:f}=a,e=()=>c.emit(...[b.TITLE,a.p.name+(a.pg?
" | "+a.pg.name:"")]),d=()=>setTimeout(()=>document.querySelectorAll("textarea:not(.notab)").forEach(h=>h.onkeydown=Ga),300),g=()=>a.edits&&!confirm("Lose unsaved changes?");return c.on(b.ONLOAD,()=>{c.emit(...[b.HANDLE_404]);e();a.recent=a.p.pages.map(h=>{var m;return{p:h.id,t:null!=(m=h.md)?m:h.cd}}).sort((h,m)=>h.t>m.t?-1:1);c.emit(...[b.COLLECT_TAGS]);a.t.length?c.emit(...[b.RENDER]):d()}),c.on(b.RENDER,d),c.on(b.HANDLE_404,()=>{var {page:h}=a.query;if(1<(null==h?void 0:h.length)){let m=FW.slug(h);
k.find(m)||f[m]||(h=h.split("_").map(p=>p[0].toUpperCase()+p.substring(1)).join(" "),c.emit(...[b.CREATE_PAGE,h,!1]))}else 0<(null==h?void 0:h.length)&&!f[h]&&(a.pg={e:!0,name:"404",content:"<p>Page not found</p>"},c.emit(...[b.RENDER]))}),c.on(b.GO,()=>{var h;let {p:m,pg:p}=a,n=null!=(h=a.query.page)?h:null;h=(null==p?void 0:p.slug)===n||!n&&(null==p?void 0:p.id)===m.home;if(!h&&g())return history.go(-1);h||(a.edit=!1,a.edits=null,a.pg=k.getPage(),c.emit(...[b.HANDLE_404]),e())}),c.on(b.CREATE_PAGE,
(h,m=!0)=>{if(!(2>h.length||g())){a.edit=!1;a.edits=null;var {p,query:n}=a,r=()=>{let v=[];for(let A=0;9>A;A++)v.push(String.fromCharCode(Math.round(94*Math.random())+32));return v.join("")};do var q=r();while(0<=p.pages.findIndex(v=>v.id===q));r=0;var t=FW.slug(h);do{var u=t+(0<r?"_"+r:"");r++}while(p.pages.some(v=>v.slug===u));h={id:q,name:h,slug:u,cd:Date.now()};a.showNewPageField=!1;m?(a.p.pages.push(h),a.recent.unshift({p:h.id,t:h.cd}),c.emit(...[b.CHECK_CHANGED]),c.emit(...[b.GO,l+"?page="+
u,n.page!==u?"replace":"push"])):a.pg=h;c.emit(...[b.START_EDIT])}}),c.on(b.START_EDIT,()=>{var h,m,p,n,r;let {pg:q}=a;a.edit=!0;let t={name:null!=(h=q.name)?h:"",slug:null!=(m=q.slug)?m:"",content:FW.img.fix(null!=(p=q.content)?p:""),tags:null!=(n=q.tags)?n:"",parent:null!=(r=q.parent)?r:"",hide:!!q.hide};t.useMd="md"===q.editor||!t.content&&a.useMd;a.edits=t;a.src=!1;c.emit(...[b.RENDER])}),c.on(b.CANCEL_EDIT,()=>{g()||(a.edit=!1,a.edits=null,c.emit(...[b.RENDER]))}),c.on(b.UPDATE_PAGE,h=>{let {p:m}=
a;if(m.pages.some(n=>n.slug===h.slug&&n.id!==h.id))return alert('A page with the slug "'+h.slug+'" already exists!');let p=m.pages.findIndex(n=>n.id===h.id);Object.keys(h).forEach(n=>{1>h[n].length&&delete h[n]});h.md=Date.now();-1<p?m.pages[p]=h:m.pages.push(h);a.recent=[{p:h.id,t:h.md},...a.recent.filter(n=>n.p!==h.id)];a.edit=!1;a.edits=null;a.useMd="md"===h.editor;c.emit(...[b.COLLECT_TAGS]);a.pg=k.getPage();c.emit(...[b.CHECK_CHANGED])}),c.on(b.DELETE_PAGE,h=>{a.p.pages=a.p.pages.map(m=>(m.parent===
h&&delete m.parent,m)).filter(m=>m.id!==h);a.recent=a.recent.filter(m=>m.p!==h);a.edit=!1;a.edits=null;c.emit(...[b.COLLECT_TAGS]);delete a.pg;c.emit(...[b.GO,l]);c.emit(...[b.CHECK_CHANGED])}),c.on(b.COLLECT_TAGS,()=>{a.t=FW.tidy(a.p.pages.reduce((h,m)=>{var p,n;return[...h,...(null!=(n=null==(p=m.tags)?void 0:p.split(","))?n:[])]},[]))}),c.on(b.CHECK_CHANGED,h=>{a.now=FW.hash.object(a.p);a.changed=a.prev!==a.now;c.emit(...[b.RENDER,h])}),c.on(b.NOTIFY,(h,m=5E3,p="background:#ddd; color:#000")=>
{let n=Date.now();h=html`<div class=noti style=${p} id=${n} onclick=${()=>c.emit(...[b.REMOVE_NOTI,n])} title="Click to close"> <span role=alert>${h}</span><span class=fr>\u00d7</span> </div>`;a.notis[n]=h;0<m&&setTimeout(()=>c.emit(...[b.REMOVE_NOTI,n]),m);document.querySelector(".notis").appendChild(h)}),c.on(b.REMOVE_NOTI,h=>{let m=a.notis[h];null==m||m.parentNode.removeChild(m);delete a.notis[h]}),c.on(b.SAVE_WIKI,()=>{var h=FW.gen(a);let {p:m}=a,p=document.createElement("a");p.setAttribute("href",
"data:text/html;charset=utf-8,"+encodeURIComponent(h));h=/\/$/.test(l)?"index.html":decodeURI(l.substring(l.lastIndexOf("/")+1));p.setAttribute("download",h);document.body.appendChild(p);p.click();document.body.removeChild(p);a.prev=FW.hash.object(m);c.emit(...[b.CHECK_CHANGED])}),c},za=(a,c)=>{function b(z){z.preventDefault();z=z.currentTarget.np.value.trim();if(2>z.length)return alert("Enter more than 1 character to create a new page.");c(p.CREATE_PAGE,z.trim())}function k(z){a.sbTab=z.target.innerText;
c(p.RENDER)}var l,f;let {help:e,pg:d,p:g,t:h,recent:m,events:p,query:n,changed:r,sb:q,sbTab:t,views:u,notis:v}=a,A=!g.published||"s"===n.page,x=g.pages.filter(z=>!z.parent),B=m.map(z=>g.pages.find(w=>w.id===z.p)),y=d?u.p(a,c,d):(null!=(f=u[null!=(l=n.page)?l:"a"])?f:()=>{})(a,c);n.tag&&(y=u.t(a,c));l=[r?html`<div>Wiki has changed!</div>`:""];return l=[...l,html`<div><button class=${r?"chg":""} title="Download wiki in its current state" onclick=${()=>c(p.SAVE_WIKI)}>Save Wiki</button></div>`],html`<body> <main> <div class=sb> <span class=db><a href=? class=t>${g.name}</a></span> ${g.desc?
html`<p class=pb>${g.desc}</p>`:""} ${A?l:""} <button class=sbt onclick=${()=>{a.sb=!a.sb;c(p.RENDER)}}>${q?"Hide":"Show"} Menu</button> <nav class=${q?"":"n"}> ${A?[html`<p><a href="?page=s">Wiki Settings</a></p>`,html`<details class=pb ontoggle=${()=>document.getElementById("np").focus()}> <summary class=np>New Page</summary> <form onsubmit=${b}> <label class=sr for=np>New Page Title</label> <input id=np placeholder="New Page Title" autocomplete=off> <button type=submit>Create</button> </form> </details>`]:
""} <div class=tabs> <button class=${"Pages"===t&&"a"} onclick=${k}>Pages</button> ${0<h.length?html`<button class=${"Tags"===t&&"a"} onclick=${k}>Tags</button>`:""} <button class=${"Recent"===t&&"a"} onclick=${k}>Recent</button> </div> ${"Pages"===t?html`<ul> ${x.map(z=>e.getChildList(z,!0))} <li><a href="?page=a">All Pages</a></li> ${0<e.missing().length?html`<li><a href="?page=m">Missing Pages</a></li>`:""} </ul>`:""} ${"Tags"===t?html`<ul> ${h.map(z=>html`<li><a href="?tag=${z}">${z}</a></li>`)} </ul>`:
""} ${"Recent"===t?html`<ul style=padding:0> ${B.map(z=>{var w;return html`<li> <a href="?page=${z.slug}">${z.name}</a> <p class=h style=margin:0>${FW.date(new Date(null!=(w=z.md)?w:z.cd))}</p> </li>`})} </ul>`:""} </nav> </div> <section>${y}</section> </main> <footer> <span class=fr>Powered by <a href=https://feather.wiki title="Version: Wren_1.7.1" target=_blank rel="noopener noreferrer">Feather Wiki</a></span> </footer> <div class=notis> ${Object.values(v)} </div> </body>`},Aa={};E(Aa,{abbr:()=>
Ka,fix:()=>La,put:()=>Ja,resizeImage:()=>ba,upload:()=>Ia});var Ba={};E(Ba,{object:()=>Ma,string:()=>ca});var Ca={};E(Ca,{esc:()=>Ra,hLink:()=>Qa,img:()=>Oa,out:()=>Pa,pg:()=>Na});var Da={};E(Da,{compress:()=>da,decompress:()=>ia});var M=-1;window.html=qb();html.raw=rb();window.ed=(sb(),P(ua)).default;window.md=(tb(),P(wa)).default;window.FW=L();FW.slug=a=>null==a?void 0:a.toLowerCase().replace(/\s/g,"_").replace(/[\x00-\x2F\x3A-\x40[\\\]^`\x7B-\x7F]/g,"-");FW.date=a=>a.toLocaleString();FW.tidy=a=>
a.map(c=>c.trim()).filter((c,b,k)=>c.length&&k.indexOf(c)===b).sort();FW.xtr=function(a,c=()=>{}){let b=new FileReader;b.onload=k=>aa(this,null,function*(){let l=k.target.result;var f=T(l,"script","p type=application/json");if(!f.length||"{"!==f[0])return alert("Could not find Feather Wiki data.");f=FW.json.decompress(JSON.parse(f));f.img=yield Ha(f.img);c([f,T(l,"style","c"),T(l,"script","j")])});b.onerror=function(k){c(null)};b.readAsText(a)};FW.gen=function(a){function c(f){return html`<section> ${k.pages.map(e=>
{let d=a.views.p(f,"",e);return d[0].querySelector("h1").id="page="+e.slug,html`<article> ${d[0]} <div class=uc>${html.raw(d[1][1].innerHTML)}</div> </article>`})} </section>`}let {c:b,p:k,j:l}=a;return`<!doctype html> <html lang=en> <head> <meta charset=utf-8> <meta name=viewport content="width=device-width,initial-scale=1"> <title>${k.name}</title> ${k.desc?`<meta name="description" content="${k.desc.replace(/"/g,'\\"')}">`:""} <meta name=version content=Wren_1.7.1> <meta name=application-name content="Feather Wiki"> <style id=s>${document.getElementById("s").innerHTML}</style> ${b?
`<style id=c>${b}</style>`:""} <script id=p type=application/json>${JSON.stringify(FW.json.compress(k))}<\/script> <script id=a>${document.getElementById("a").innerHTML}<\/script> ${FW.inject.esc(k.head,!0)} </head> <body> ${(function(){let f=N(H({},a),{edit:!1,sb:!0,sbx:new Set,pg:void 0,query:{page:"a"},p:N(H({},k),{published:!0})}),e=za(f);if(e.querySelector(".sb .tabs").remove(),k.static){let d=e.querySelector("main>section");d.parentElement.replaceChild(c(f),d);e.querySelector(".sb>nav>ul>li:last-child,.sbt").remove()}return e.querySelectorAll("a").forEach(d=>
{d.classList.remove("a");d.href=d.href.includes("#")?d.href.replace(/.+(#.+)$/,"$1"):d.href.includes("page=")?d.href.replace(/.+(page=.+)(&.+)*?$/,k.static?"#$1":"?$1"):d.href.replace(location.toString().split("?")[0],"")}),e.querySelector("main").outerHTML})()} <footer><a href=https://src.feather.wiki/#versions>JavaScript required to edit</a></footer> ${l?`<script id=j>${l}<\/script>`:""} </body> </html>`};FW.img=Aa;FW.hash=Ba;FW.inject=Ca;FW.json=Da;FW.upload=(a,c)=>{a=html`<input type=file accept=${a} onchange=${b=>
2024-01-05 16:26:03 +00:00
{b=b.target.files;0<b.length&&c(b[0])}}>`;document.body.appendChild(a);a.click();document.body.removeChild(a)};FW.ready(()=>{Db(FW.state);Eb(FW.state,FW.emitter)});FW._view=za;FW.mount("body");window.addEventListener("beforeunload",a=>{if(FW.state.changed)return a.preventDefault(),a.returnValue="Lose unsaved changes?"},{capture:!0})})(); </script> </head> <body> <main> <div class="sb"> <span class="db"><a href="?" class="t">Endlings</a></span> <p class="pb">this is where you can read endlings, my transformers animated fic</p> <button class="sbt">Hide Menu</button> <nav class=""> <ul> <li> <a href="?page=content_warning" class="">Content Warning</a></li><li> <details open="[object Object]"> <summary><a href="?page=book_one" class="">Book One</a></summary> <ul><li> <a href="?page=book_one_characters" class="">Book One characters</a></li><li> <a href="?page=chapter_0-_the_first_one" class="">Chapter 0: The First One</a></li><li> <a href="?page=chapter_1-_broken_world" class="">Chapter 1: Broken World</a></li></ul></details></li> <li><a href="?page=a">All Pages</a></li></ul></nav></div> <section><header> <h1>All Pages</h1></header><article> <p>This wiki has 5 pages:</p> <ul> <li> <a href="?page=content_warning" class="">Content Warning</a></li><li> <a href="?page=book_one" class="">Book One</a><ul><li> <a href="?page=book_one_characters" class="">Book One characters</a></li><li> <a href="?page=chapter_0-_the_first_one" class="">Chapter 0: The First One</a></li><li> <a href="?page=chapter_1-_broken_world" class="">Chapter 1: Broken World</a></li></ul></li></ul></article></section></main> <footer><a href=https://src.feather.wiki/#versions>JavaScript required to edit</a></footer> </body> </html>