This repository has been archived by the owner on May 10, 2022. It is now read-only.
forked from tweecode/jonah
-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.html
70 lines (62 loc) · 31.8 KB
/
header.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!--
Melville is based on Jonah 2.1, which is based on:
TiddlyWiki 1.2.39 by Jeremy Ruston, (jeremy [at] osmosoft [dot] com)
Published under a BSD open source license
Copyright (c) Osmosoft Limited 2005
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
Neither the name of the Osmosoft Limited nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
-->
<title>Melville</title>
<meta name="viewport" content="width=device-width">
<style>
/*! melville */
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}html{overflow-y:scroll}body{font-size:16px;line-height:1.625;font-family:cambria,georgia,sans-serif;color:#444}::-moz-selection{background:#fde5f3;text-shadow:none}::selection{background:#fde5f3;text-shadow:none}h1,h2,h3,h4,h5,h6,b,strong,.title{font-weight:normal;color:#000}h1{margin:0;font-size:35px;line-height:1.4857142}h2,.title{margin:0;font-size:23px;line-height:1.5}h3{margin:0;font-style:italic;font-size:19px;line-height:1.368421}ul{list-style-type:square}img{max-width:100%;height:auto}a{color:#118feb;text-decoration:none;-webkit-transition:color 250ms ease-in-out;-moz-transition:color 250ms ease-in-out;-ms-transition:color 250ms ease-in-out;-o-transition:color 250ms ease-in-out;transition:color 250ms ease-in-out}a:hover{color:#0b63a3}.brokenLink,.brokenLink:hover{color:#c33}#passages,.passage{margin:26px 0}#footer{margin:0;padding:26px 0 0;font-size:13px;line-height:1.25;color:#888}.marked{margin-right:1em;background-color:hotpink}.disabled{color:#888}#floater{position:fixed;top:0;right:0;padding:0 1em;border-left:1px solid #dedede;border-bottom:1px solid #dedede;text-align:center;font-size:13px;line-height:1.25;background-color:#fff;-webkit-box-shadow:0 0 4px rgba(0,0,0,0.2);box-shadow:0 0 4px rgba(0,0,0,0.2)}#floater p{margin:8px 0}#content1{width:650px;max-width:90%;margin:0 auto;padding:26px 0}.toolbar{visibility:hidden;font-size:13px;line-height:1.25}.toolbar a{margin-left:1em;font-weight:normal}.selected .toolbar{visibility:visible}.passage ul,.passage ol{margin:13px 0 26px;padding:0 0 0 1.625em}.passage table{margin:13px}.passage th,.passage td,.passage tr,.passage caption{padding:0.2em}.passage hr{display:block;height:1px;border:0;border-top:1px solid #dedede;margin:13px 0 12px;padding:0}.footer,#saveTest,#storeArea,#copyright{display:none}#messageArea{display:none;text-align:center;background-color:hotpink}
</style>
<script>(function(){
function $(a){return"use strict",typeof a=="string"?document.getElementById(a):a}function clone(a){"use strict";var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function insertText(a,b){return"use strict",a.appendChild(document.createTextNode(b))}function insertElement(a,b,c,d,e){"use strict";var f=document.createElement(b);return c&&(f.id=c),d&&(f.className=d),e&&insertText(f,e),a&&a.appendChild(f),f}function removeChildren(a){"use strict";while(a.hasChildNodes())a.removeChild(a.firstChild)}function addStyle(a){"use strict";var b;document.createStyleSheet?document.getElementsByTagName("head")[0].insertAdjacentHTML("beforeEnd"," <style>"+a+"</style>"):(b=document.createElement("style"),b.type="text/css",b.appendChild(document.createTextNode(a)),document.getElementsByTagName("head")[0].appendChild(b))}function Wikifier(a,b){"use strict",this.source=b,this.output=a,this.nextMatch=0,this.assembleFormatterMatches(Wikifier.formatters),this.subWikify(this.output)}function throwError(a,b){"use strict",new Wikifier(a,"'' @@ "+b+" @@ ''")}function fade(a,b){function g(){c+=.05*e,h(d,Math.easeInOut(c));if(e===1&&c>=1||e===-1&&c<=0)console.log("swapping fader proxy out"),a.style.visibility=b.fade==="in"?"visible":"hidden",d.parentNode.replaceChild(a,d),window.clearInterval(f),b.onComplete&&b.onComplete()}function h(a,b){var c=Math.floor(b*100);a.style.zoom=1,a.style.filter="alpha(opacity="+c+")",a.style.opacity=b}"use strict";var c,d=a.cloneNode(!0),e=b.fade==="in"?1:-1,f;a.parentNode.replaceChild(d,a),b.fade==="in"?(c=0,d.style.visibility="visible"):c=1,h(d,c),f=window.setInterval(g,25)}function scrollWindowTo(a){function h(){c+=.1,window.scrollTo(0,b+f*e*Math.easeInOut(c)),c>=1&&window.clearInterval(g)}function i(a){var b=j(a),c=b+a.offsetHeight,d=window.scrollY?window.scrollY:document.body.scrollTop,e=window.innerHeight?window.innerHeight:document.body.clientHeight,f=d+e;return b<d?b:c>f?a.offsetHeight<e?b-(e-a.offsetHeight)+20:b:b}function j(a){var b=0;while(a.offsetParent)b+=a.offsetTop,a=a.offsetParent;return b}"use strict";var b=window.scrollY?window.scrollY:document.body.scrollTop,c=0,d,e,f,g;d=i(a),e=Math.abs(b-d),f=b>d?-1:1,g=window.setInterval(h,25)}function History(){"use strict",this.history=[{passage:null,variables:{}}]}function Passage(a,b,c){"use strict",this.title=a,b?(this.id=c,this.initialText=this.text=Passage.unescapeLineBreaks(b.firstChild?b.firstChild.nodeValue:""),this.tags=b.getAttribute("tags"),typeof this.tags=="string"?this.tags=this.tags.readBracketedList():this.tags=[]):(this.initialText=this.text="@@This passage does not exist.@@",this.tags=[])}function Tale(){"use strict";var a,b,c;this.passages={},document.normalize&&document.normalize(),a=$("storeArea").childNodes;for(var d=0;d<a.length;d++)c=a[d],c.getAttribute&&(b=c.getAttribute("tiddler")),b&&(this.passages[b]=new Passage(b,c,d))}function setPageElement(a,b,c){"use strict";var d=$(a);d&&(removeChildren(d),tale.has(b)?new Wikifier(d,tale.get(b).text):new Wikifier(d,c))}var version={major:2,minor:0,revision:0,date:new Date("July 30, 2007"),extensions:{}},tale,state,macros={};Math.easeInOut=function(a){return"use strict",1-(Math.cos(a*Math.PI)+1)/2},String.prototype.readMacroParams=function(){"use strict";var a=new RegExp("(?:\\s*)(?:(?:\"([^\"]*)\")|(?:'([^']*)')|(?:\\[\\[([^\\]]*)\\]\\])|([^\"'\\s]\\S*))","mg"),b=[],c;do c=a.exec(this),c&&(c[1]?b.push(c[1]):c[2]?b.push(c[2]):c[3]?b.push(c[3]):c[4]&&b.push(c[4]));while(c);return b},String.prototype.readBracketedList=function(){"use strict";var a="\\[\\[([^\\]]+)\\]\\]",b="[^\\s$]+",c="(?:"+a+")|("+b+")",d=new RegExp(c,"mg"),e=[],f;do f=d.exec(this),f&&(f[1]?e.push(f[1]):f[2]&&e.push(f[2]));while(f);return e},String.prototype.trim=function(){return"use strict",this.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},Wikifier.prototype.assembleFormatterMatches=function(a){"use strict";var b=[];this.formatters=[];for(var c=0;c<a.length;c++)b.push("("+a[c].match+")"),this.formatters.push(a[c]);this.formatterRegExp=new RegExp(b.join("|"),"mg")},Wikifier.prototype.subWikify=function(a,b){"use strict";var c,d,e,f,g;c=this.output,this.output=a,d=b?new RegExp("("+b+")","mg"):null;do{this.formatterRegExp.lastIndex=this.nextMatch,d&&(d.lastIndex=this.nextMatch),e=this.formatterRegExp.exec(this.source),f=d?d.exec(this.source):null;if(f&&(!e||f.index<=e.index)){f.index>this.nextMatch&&this.outputText(this.output,this.nextMatch,f.index),this.matchStart=f.index,this.matchLength=f[1].length,this.matchText=f[1],this.nextMatch=f.index+f[1].length,this.output=c;return}if(e){e.index>this.nextMatch&&this.outputText(this.output,this.nextMatch,e.index),this.matchStart=e.index,this.matchLength=e[0].length,this.matchText=e[0],this.nextMatch=this.formatterRegExp.lastIndex,g=-1;for(var h=1;h<e.length;h++)e[h]&&(g=h-1);g!==-1&&this.formatters[g].handler(this)}}while(f||e);this.nextMatch<this.source.length&&(this.outputText(this.output,this.nextMatch,this.source.length),this.nextMatch=this.source.length),this.output=c},Wikifier.prototype.outputText=function(a,b,c){"use strict",insertText(a,this.source.substring(b,c))},Wikifier.prototype.fullArgs=function(){"use strict";var a=this.source.indexOf(" ",this.matchStart),b=this.source.indexOf(">>",this.matchStart);return Wikifier.parse(this.source.slice(a,b))},Wikifier.parse=function(a){"use strict";var b=a.replace(/\$/g,"state.history[0].variables.");return b=b.replace(/\beq\b/gi," == "),b=b.replace(/\bneq\b/gi," != "),b=b.replace(/\bgt\b/gi," > "),b=b.replace(/\beq\b/gi," == "),b=b.replace(/\bneq\b/gi," != "),b=b.replace(/\bgt\b/gi," > "),b=b.replace(/\bgte\b/gi," >= "),b=b.replace(/\blt\b/gi," < "),b=b.replace(/\blte\b/gi," <= "),b=b.replace(/\band\b/gi," && "),b=b.replace(/\bor\b/gi," || "),b=b.replace(/\bnot\b/gi," ! "),b},Wikifier.formatHelpers={charFormatHelper:function(a){"use strict";var b=insertElement(a.output,this.element);a.subWikify(b,this.terminator)},inlineCssHelper:function(a){"use strict";var b=[],c="(?:("+Wikifier.textPrimitives.anyLetter+"+)\\(([^\\)\\|\\n]+)(?:\\):))|(?:("+Wikifier.textPrimitives.anyLetter+"+):([^;\\|\\n]+);)",d=new RegExp(c,"mg"),e=!1,f,g;do{d.lastIndex=a.nextMatch,f=d.exec(a.source),g=f&&f.index===a.nextMatch;if(g){var h,i;e=!0,f[1]?(h=f[1].unDash(),i=f[2]):(h=f[3].unDash(),i=f[4]),h==="bgcolor"&&(h="backgroundColor"),b.push({style:h,value:i}),a.nextMatch=f.index+f[0].length}}while(g);return b},monospacedByLineHelper:function(a){"use strict";var b=new RegExp(this.lookahead,"mg"),c,d;b.lastIndex=a.matchStart,c=b.exec(a.source),c&&c.index===a.matchStart&&(d=c[1],navigator.userAgent.indexOf("msie")!==-1&&navigator.userAgent.indexOf("opera")===-1&&(d=d.replace(/\n/g,"\r")),insertElement(a.output,"pre",null,null,d),a.nextMatch=c.index+c[0].length)}},Wikifier.formatters=[{name:"table",match:"^\\|(?:[^\\n]*)\\|(?:[fhc]?)$",lookahead:"^\\|([^\\n]*)\\|([fhc]?)$",rowTerminator:"\\|(?:[fhc]?)$\\n?",cellPattern:"(?:\\|([^\\n\\|]*)\\|)|(\\|[fhc]?$\\n?)",cellTerminator:"(?:\\x20*)\\|",rowTypes:{c:"caption",h:"thead","":"tbody",f:"tfoot"},handler:function(a){"use strict";var b=insertElement(a.output,"table"),c=new RegExp(this.lookahead,"mg"),d=null,e,f,g,h=[],i=0,j,k;a.nextMatch=a.matchStart;do c.lastIndex=a.nextMatch,j=c.exec(a.source),k=j&&j.index===a.nextMatch,k&&(e=j[2],e!==d&&(f=insertElement(b,this.rowTypes[e])),d=e,d==="c"?(i===0?f.setAttribute("align","top"):f.setAttribute("align","bottom"),a.nextMatch=a.nextMatch+1,a.subWikify(f,this.rowTerminator)):(g=insertElement(f,"tr"),this.rowHandler(a,g,h)),i++);while(k)},rowHandler:function(a,b,c){"use strict";var d=0,e=1,f=new RegExp(this.cellPattern,"mg"),g,h,i,j,k,l,m,n,o;do{f.lastIndex=a.nextMatch,g=f.exec(a.source),h=g&&g.index===a.nextMatch;if(h){if(g[1]==="~")i=c[d],i&&(i.rowCount++,i.element.setAttribute("rowSpan",i.rowCount),i.element.setAttribute("rowspan",i.rowCount),i.element.valign="center"),a.nextMatch=g.index+g[0].length-1;else if(g[1]===">")e++,a.nextMatch=g.index+g[0].length-1;else{if(g[2]){a.nextMatch=g.index+g[0].length;break}j=!1,k=!1,a.nextMatch++,l=Wikifier.formatHelpers.inlineCssHelper(a);while(a.source.substr(a.nextMatch,1)===" ")j=!0,a.nextMatch++;a.source.substr(a.nextMatch,1)==="!"?(m=insertElement(b,"th"),a.nextMatch++):m=insertElement(b,"td"),c[d]={rowCount:1,element:m},n=1,o=m,e>1&&(m.setAttribute("colSpan",e),m.setAttribute("colspan",e),e=1);for(var p=0;p<l.length;p++)m.style[l[p].style]=l[p].value;a.subWikify(m,this.cellTerminator),a.matchText.substr(a.matchText.length-2,1)===" "&&(k=!0),j&&k?m.align="center":j?m.align="right":k&&(m.align="left"),a.nextMatch=a.nextMatch-1}d++}}while(h)}},{name:"rule",match:"^----$\\n?",handler:function(a){"use strict",insertElement(a.output,"hr")}},{name:"emdash",match:"--",handler:function(a){"use strict";var b=insertElement(a.output,"span");b.innerHTML="—"}},{name:"heading",match:"^!{1,5}",terminator:"\\n",handler:function(a){"use strict";var b=insertElement(a.output,"h"+a.matchLength);a.subWikify(b,this.terminator)}},{name:"monospacedByLine",match:"^\\{\\{\\{\\n",lookahead:"^\\{\\{\\{\\n((?:^[^\\n]*\\n)+?)(^\\}\\}\\}$\\n?)",handler:Wikifier.formatHelpers.monospacedByLineHelper},{name:"monospacedByLineForPlugin",match:"^//\\{\\{\\{\\n",lookahead:"^//\\{\\{\\{\\n\\n*((?:^[^\\n]*\\n)+?)(\\n*^//\\}\\}\\}$\\n?)",handler:Wikifier.formatHelpers.monospacedByLineHelper},{name:"wikifyCommentForPlugin",match:"^/\\*\\*\\*\\n",terminator:"^\\*\\*\\*/\\n",handler:function(a){"use strict",a.subWikify(a.output,this.terminator)}},{name:"quoteByBlock",match:"^<<<\\n",terminator:"^<<<\\n",handler:function(a){"use strict";var b=insertElement(a.output,"blockquote");a.subWikify(b,this.terminator)}},{name:"quoteByLine",match:"^>+",terminator:"\\n",element:"blockquote",handler:function(a){"use strict";var b=new RegExp(this.match,"mg"),c=[a.output],d=0,e=a.matchLength,f,g,h;do{if(e>d)for(f=d;f<e;f++)c.push(insertElement(c[c.length-1],this.element));else if(e<d)for(f=d;f>e;f--)c.pop();d=e,a.subWikify(c[c.length-1],this.terminator),insertElement(c[c.length-1],"br"),b.lastIndex=a.nextMatch,g=b.exec(a.source),h=g&&g.index===a.nextMatch,h&&(e=g[0].length,a.nextMatch+=g[0].length)}while(h)}},{name:"list",match:"^(?:(?:\\*+)|(?:#+))",lookahead:"^(?:(\\*+)|(#+))",terminator:"\\n",outerElement:"ul",itemElement:"li",handler:function(a){"use strict";var b=new RegExp(this.lookahead,"mg"),c=null,d=0,e,f,g,h,i,j,k;a.nextMatch=a.matchStart,h=[a.output];do{b.lastIndex=a.nextMatch,i=b.exec(a.source),j=i&&i.index===a.nextMatch;if(j){i[1]&&(e="ul"),i[2]&&(e="ol"),f=i[0].length,a.nextMatch+=i[0].length;if(f>d)for(g=d;g<f;g++)h.push(insertElement(h[h.length-1],e));else if(f<d)for(g=d;g>f;g--)h.pop();else f===d&&e!==c&&(h.pop(),h.push(insertElement(h[h.length-1],e)));d=f,c=e,k=insertElement(h[h.length-1],"li"),a.subWikify(k,this.terminator)}}while(j)}},{name:"prettyLink",match:"\\[\\[",lookahead:"\\[\\[([^\\|\\]]*?)(?:(\\]\\])|(\\|(.*?)\\]\\]))",terminator:"\\|",handler:function(a){"use strict";var b=new RegExp(this.lookahead,"mg"),c,d,e;b.lastIndex=a.matchStart,c=b.exec(a.source),c&&c.index===a.matchStart&&c[2]?(d=Wikifier.createInternalLink(a.output,c[1]),a.outputText(d,a.nextMatch,a.nextMatch+c[1].length),a.nextMatch+=c[1].length+2):c&&c.index===a.matchStart&&c[3]&&(tale.has(c[4])?e=Wikifier.createInternalLink(a.output,c[4]):e=Wikifier.createExternalLink(a.output,c[4]),a.outputText(e,a.nextMatch,a.nextMatch+c[1].length),a.nextMatch=c.index+c[0].length)}},{name:"urlLink",match:"(?:http|https|mailto|ftp):[^\\s'\"]+(?:/|\\b)",handler:function(a){"use strict";var b=Wikifier.createExternalLink(a.output,a.matchText);a.outputText(b,a.matchStart,a.nextMatch)}},{name:"image",match:"\\[(?:[<]{0,1})(?:[>]{0,1})[Ii][Mm][Gg]\\[",lookahead:"\\[([<]{0,1})([>]{0,1})[Ii][Mm][Gg]\\[(?:([^\\|\\]]+)\\|)?([^\\[\\]\\|]+)\\](?:\\[([^\\]]*)\\]?)?(\\])",handler:function(a){"use strict";var b=new RegExp(this.lookahead,"mg"),c,d,e;b.lastIndex=a.matchStart,c=b.exec(a.source),c&&c.index===a.matchStart&&(d=a.output,c[5]&&(tale.has(c[5])?d=Wikifier.createInternalLink(a.output,c[5]):d=Wikifier.createExternalLink(a.output,c[5])),e=insertElement(d,"img"),c[1]?e.align="left":c[2]&&(e.align="right"),c[3]&&(e.title=c[3]),e.src=c[4],a.nextMatch=c.index+c[0].length)}},{name:"macro",match:"<<",lookahead:"<<([^>\\s]+)(?:\\s*)([^>]*)>>",handler:function(a){"use strict";var b=new RegExp(this.lookahead,"mg"),c,d,e;b.lastIndex=a.matchStart,c=b.exec(a.source);if(c&&c.index===a.matchStart&&c[1]){d=c[2].readMacroParams(),a.nextMatch=c.index+c[0].length;try{e=macros[c[1]],e&&e.handler?e.handler(a.output,c[1],d,a):insertElement(a.output,"span",null,"marked","macro not found: "+c[1])}catch(f){throwError(a.output,"Error executing macro "+c[1]+": "+f.toString())}}}},{name:"html",match:"<[Hh][Tt][Mm][Ll]>",lookahead:"<[Hh][Tt][Mm][Ll]>((?:.|\\n)*?)</[Hh][Tt][Mm][Ll]>",handler:function(a){"use strict";var b=new RegExp(this.lookahead,"mg"),c,d;b.lastIndex=a.matchStart,c=b.exec(a.source),c&&c.index===a.matchStart&&(d=insertElement(a.output,"span"),d.innerHTML=c[1],a.nextMatch=c.index+c[0].length)}},{name:"commentByBlock",match:"/%",lookahead:"/%((?:.|\\n)*?)%/",handler:function(a){"use strict";var b=new RegExp(this.lookahead,"mg"),c;b.lastIndex=a.matchStart,c=b.exec(a.source),c&&c.index===a.matchStart&&(a.nextMatch=c.index+c[0].length)}},{name:"boldByChar",match:"''",terminator:"''",element:"strong",handler:Wikifier.formatHelpers.charFormatHelper},{name:"strikeByChar",match:"==",terminator:"==",element:"strike",handler:Wikifier.formatHelpers.charFormatHelper},{name:"underlineByChar",match:"__",terminator:"__",element:"u",handler:Wikifier.formatHelpers.charFormatHelper},{name:"italicByChar",match:"//",terminator:"//",element:"em",handler:Wikifier.formatHelpers.charFormatHelper},{name:"subscriptByChar",match:"~~",terminator:"~~",element:"sub",handler:Wikifier.formatHelpers.charFormatHelper},{name:"superscriptByChar",match:"\\^\\^",terminator:"\\^\\^",element:"sup",handler:Wikifier.formatHelpers.charFormatHelper},{name:"monospacedByChar",match:"\\{\\{\\{",lookahead:"\\{\\{\\{((?:.|\\n)*?)\\}\\}\\}",handler:function(a){"use strict";var b=new RegExp(this.lookahead,"mg"),c,d;b.lastIndex=a.matchStart,c=b.exec(a.source),c&&c.index===a.matchStart&&(d=insertElement(a.output,"code",null,null,c[1]),a.nextMatch=c.index+c[0].length)}},{name:"styleByChar",match:"@@",terminator:"@@",lookahead:"(?:([^\\(@]+)\\(([^\\)]+)(?:\\):))|(?:([^:@]+):([^;]+);)",handler:function(a){"use strict";var b=insertElement(a.output,"span",null,null,null),c=Wikifier.formatHelpers.inlineCssHelper(a);if(c.length===0)b.className="marked";else for(var d=0;d<c.length;d++)b.style[c[d].style]=c[d].value;a.subWikify(b,this.terminator)}},{name:"lineBreak",match:"\\n",handler:function(a){"use strict",insertElement(a.output,"br")}}],Wikifier.textPrimitives={anyDigit:"[0-9]",anyNumberChar:"[0-9\\.E]",urlPattern:"(?:http|https|mailto|ftp):[^\\s'\"]+(?:/|\\b)"},Wikifier.createInternalLink=function(a,b){"use strict";var c=insertElement(a,"a",b);return c.href="#_",tale.has(b)?c.className="internalLink":c.className="brokenLink",c.onclick=function(){return state.display(b,c),!1},a&&a.appendChild(c),c},Wikifier.createExternalLink=function(a,b){"use strict";var c=insertElement(a,"a");return c.href=b,c.className="externalLink",c.target="_blank",a&&a.appendChild(c),c},(new RegExp("[\u0150\u0170]","g")).test("\u0150")?(Wikifier.textPrimitives.upperLetter="[A-Z\u00c0-\u00de\u0150\u0170]",Wikifier.textPrimitives.lowerLetter="[a-z\u00df-\u00ff_0-9\\-\u0151\u0171]",Wikifier.textPrimitives.anyLetter="[A-Za-z\u00c0-\u00de\u00df-\u00ff_0-9\\-\u0150\u0170\u0151\u0171]"):(Wikifier.textPrimitives.upperLetter="[A-Z\u00c0-\u00de]",Wikifier.textPrimitives.lowerLetter="[a-z\u00df-\u00ff_0-9\\-]",Wikifier.textPrimitives.anyLetter="[A-Za-z\u00c0-\u00de\u00df-\u00ff_0-9\\-]"),History.prototype.init=function(){"use strict";var a;if(!this.restore())if(tale.has("StartPassages")){console.log("showing StartPassages",tale.get("StartPassages").text.readBracketedList()),a=tale.get("StartPassages").text.readBracketedList();for(var b=0;b<a.length;b++)this.display(a[b],null,"quietly")}else console.log("no StartPassages, showing Start"),this.display("Start",null,"quietly")},History.prototype.close=function(a){"use strict";var b=$("passage"+a.title);console.log('closing "'+a.title+'"'),b&&b.parentNode.removeChild(b)},History.prototype.display=function(a,b,c){"use strict",console.log('displaying "'+a+'" '+(c||"")+" from ",b);var d=b,e=$("passage"+a),f,g,h,i;while(d&&d.className.indexOf("passage")===-1)if(d.parentNode.className)d=d.parentNode;else break;if(e){scrollWindowTo(e);return}return f=tale.get(a),this.history.unshift({passage:f,variables:clone(this.history[0].variables)}),g=f.render(),i=function(){c!=="offscreen"&&(d?$("passages").insertBefore(g,d.nextSibling):$("passages").appendChild(g),c!=="quietly"&&(scrollWindowTo(g),fade(g,{fade:"in"})));if(c==="quietly"||c==="offscreen")g.style.visibility="visible"},h=g.getElementsByTagName("img")[0],h?h.onload=function(){i()}:i(),g},History.prototype.restart=function(){"use strict",window.location.hash=""},History.prototype.save=function(a){"use strict";var b="";for(var c=0;c<this.history.length;c++)if(this.history[c].passage&&this.history[c].passage.id){b+=this.history[c].passage.id.toString(36)+".";if(this.history[c].passage.id===a.id)break}return"#"+b.substr(0,b.length-1)},History.prototype.restore=function(){"use strict";var a,b,c;try{if(window.location.hash==="")return!1;a=window.location.hash.replace("#","").split("."),b=[];for(var d=a.length-1;d>=0;d--){c=parseInt(a[d],36);if(!tale.has(c))return!1;console.log("restoring id "+c),b.unshift(this.display(c,null,"offscreen"))}return $("passages").appendChild(b[0]),!0}catch(e){return console.log("restore failed",e),!1}},History.prototype.rewindTo=function(a){function c(){var c;while(b.history[0].passage.title!==a.title)b.close(b.history.shift().passage);b.history[0].variables=clone(b.history[1].variables),a.reset(),c=$("passage"+a.title).childNodes;for(var d=0;d<c.length;d++)c[d].className==="body"&&(removeChildren(c[d]),new Wikifier(c[d],a.text));fade($("passages"),{fade:"in"})}"use strict",console.log('rewinding to "'+a.title+'"');var b=this;fade($("passages"),{fade:"out",onComplete:c})},version.extensions.choiceMacro={major:1,minor:2,revision:0},macros.choice={handler:function(a,b,c){"use strict";var d=document.createElement("a");d.href="#_",d.className="internalLink choice",c[1]?d.innerHTML=c[1]:d.innerHTML=c[0],d.onclick=function(){return macros.choice.activate(d,c[0]),!1},a.appendChild(d)},activate:function(a,b){"use strict";var c=a.parentNode,d=[],e,f,g;while(c.className.indexOf("body")===-1)c=c.parentNode;e=c.parentNode.id.substr(7),f=c.getElementsByTagName("a");for(var h=0;h<f.length;h++)f[h]!==a&&f[h].className.indexOf("choice")!==-1&&(g=document.createElement("span"),g.innerHTML=f[h].innerHTML,g.className="disabled",f[h].parentNode.insertBefore(g,f[h].nextSibling),d.push(f[h]));for(var i=0;i<d.length;i++)d[i].parentNode.removeChild(d[i]);tale.get(e).text="<html>"+c.childNodes[0].innerHTML+"</html>",state.display(b,a)}},version.extensions.displayMacro={major:1,minor:0,revision:0},macros.display={handler:function(a,b,c){"use strict",console.log('<<display>>ing "'+c[0]+'"'),new Wikifier(a,tale.get(c[0]).text),console.log('<<display>> of "'+c[0]+'" complete')}},version.extensions.actionsMacro={major:1,minor:2,revision:0},macros.actions={handler:function(a,b,c){"use strict";var d=insertElement(a,"ul"),e,f,g;state.history[0].variables["actions clicked"]||(state.history[0].variables["actions clicked"]={}),g=function(){this.onclick=function(){state.history[0].variables["actions clicked"][this.id]=!0,state.display(this.id,this)}};for(var h=0;h<c.length;h++){if(state.history[0].variables["actions clicked"][c[h]])continue;e=insertElement(d,"li"),f=Wikifier.createInternalLink(e,c[h]),insertText(f,c[h]),g.call(f)}}},version.extensions.printMacro={major:1,minor:1,revision:0},macros.print={handler:function(place,macroName,params,parser){"use strict";var output;try{output=eval(parser.fullArgs()),output&&new Wikifier(place,output.toString())}catch(e){throwError(place,"bad expression: "+e.message)}}},version.extensions.setMacro={major:1,minor:1,revision:0},macros.set={handler:function(a,b,c,d){"use strict",macros.set.run(d.fullArgs())},run:function(expression){"use strict";try{return eval(Wikifier.parse(expression))}catch(e){console.log("bad expression: "+e.message)}}},version.extensions.ifMacros={major:1,minor:0,revision:0},macros["if"]={handler:function(place,macroName,params,parser){"use strict";var condition=parser.fullArgs(),srcOffset=parser.source.indexOf(">>",parser.matchStart)+2,src=parser.source.slice(srcOffset),endPos=-1,trueClause="",falseClause="";for(var i=0,nesting=1,currentClause=!0;i<src.length;i++){if(src.substr(i,9)==="<<endif>>"){nesting--;if(nesting===0){endPos=srcOffset+i+9;break}}src.substr(i,8)==="<<else>>"&&nesting===1&&(currentClause="false",i+=8),src.substr(i,5)==="<<if "&&nesting++,currentClause===!0?trueClause+=src.charAt(i):falseClause+=src.charAt(i)}try{eval(condition)?new Wikifier(place,trueClause.trim()):new Wikifier(place,falseClause.trim()),endPos!==-1?parser.nextMatch=endPos:throwError(place,"can't find matching endif")}catch(e){throwError(place,"bad condition: "+e.message)}}},macros["else"]=macros.endif={handler:function(){"use strict"}},version.extensions.rememberMacro={major:1,minor:1,revision:0},macros.remember={handler:function(place,macroName,params,parser){"use strict";var statement=parser.fullArgs(),expire=new Date,variable,value,variableSigil;macros.set.run(statement),variableSigil=Wikifier.parse("$"),variableSigil=variableSigil.replace("[","\\["),variableSigil=variableSigil.replace("]","\\]"),variable=statement.match(new RegExp(variableSigil+"(\\w+)","i"))[1],value=eval(Wikifier.parse("$"+variable));switch(typeof value){case"string":value='"'+value.replace(/"/g,'\\"')+'"';break;case"number":break;case"boolean":break;default:throwError(place,"can't remember $"+variable+" ("+typeof value+")");return}expire.setYear(expire.getFullYear()+1),document.cookie=macros.remember.prefix+variable+"="+value+"; expires="+expire.toGMTString()},init:function(){"use strict";var cookies,bits,statement;tale.has("StoryTitle")?macros.remember.prefix=tale.get("StoryTitle").text+"_":macros.remember.prefix="__melville_",cookies=document.cookie.split(";");for(var i=0;i<cookies.length;i++)bits=cookies[i].split("="),bits[0].trim().indexOf(this.prefix)===0&&(statement=cookies[i].replace(this.prefix,"$"),eval(Wikifier.parse(statement)))}},version.extensions.SilentlyMacro={major:1,minor:0,revision:0},macros.silently={handler:function(a,b,c,d){"use strict";var e=insertElement(null,"div"),f=d.source.indexOf(">>",d.matchStart)+2,g=d.source.slice(f),h=-1,i="";for(var j=0;j<g.length;j++)g.substr(j,15)==="<<endsilently>>"?h=f+j+15:i+=g.charAt(j);h!==-1?(new Wikifier(e,i),d.nextMatch=h):throwError(a,"can't find matching endsilently")}},macros.endsilently={handler:function(){"use strict"}},Passage.prototype.render=function(){"use strict";var a=insertElement(null,"div","passage"+this.title,"passage"),b,c,d,e;a.style.visibility="hidden",b=insertElement(a,"div","","title",this.title),c=insertElement(b,"span","","toolbar");for(var f=0;f<Passage.toolbarItems.length;f++)d=insertElement(c,"a"),insertText(d,Passage.toolbarItems[f].label(a)),d.passage=this,Passage.toolbarItems[f].href?d.href=Passage.toolbarItems[f].href(a):d.href="#_",d.title=Passage.toolbarItems[f].tooltip(a),d.onclick=Passage.toolbarItems[f].activate;return e=insertElement(a,"div","","body"),new Wikifier(e,this.text),a.onmouseover=function(){a.className+=" selected"},a.onmouseout=function(){a.className=a.className.replace(" selected","")},a},Passage.prototype.reset=function(){"use strict",console.log('resetting "'+this.title+'"'),this.text=this.initialText},Passage.toolbarItems=[{label:function(){return"use strict","bookmark"},tooltip:function(){return"use strict","Bookmark this point in the story"},href:function(a){return"use strict",state.save(a)},activate:function(){"use strict"}},{label:function(){return"use strict","rewind to here"},tooltip:function(){return"use strict","Rewind the story to here"},activate:function(){"use strict",state.rewindTo(this.passage)}}],Passage.unescapeLineBreaks=function(a){return"use strict",a&&a!==""?a.replace(/\\n/mg,"\n").replace(/\\/mg,"\\").replace(/\r/mg,""):""},Tale.prototype.has=function(a){"use strict";if(typeof a=="string")return this.passages[a]!==null&&typeof this.passages[a]!="undefined";for(var b in this.passages)if(this.passages[b].id===a)return!0;return!1},Tale.prototype.get=function(a){"use strict";if(typeof a=="string")return this.passages[a]||new Passage(a);for(var b in this.passages)if(this.passages[b].id===a)return this.passages[b]},Tale.prototype.lookup=function(a,b,c){"use strict";var d=[];for(var e in this.passages)if(this.passages.hasOwnProperty(e)){var f=this.passages[e];for(var g=0;g<f[a].length;g++)f[a][g]===b&&d.push(f)}return c||(c="title"),d.sort(function(a,b){return a[c]===b[c]?0:a[c]<b[c]?-1:1}),d},Tale.prototype.reset=function(){"use strict",console.log("resetting all passages");for(var a in this.passages)this.passages.hasOwnProperty(a)&&this.passages[a].reset()},window.onload=function(){"use strict";var styles,scripts;tale=new Tale,setPageElement("storyMenu","StoryMenu",""),setPageElement("storyTitle","StoryTitle","Untitled Story"),setPageElement("storySubtitle","StorySubtitle",""),setPageElement("storyAuthor","StoryAuthor",""),tale.has("StoryTitle")&&(document.title=tale.get("StoryTitle").text,tale.has("StorySubtitle")&&(document.title+=": "+tale.get("StorySubtitle").text));for(var macro in macros)typeof macro.init=="function"&¯o.init();styles=tale.lookup("tags","stylesheet");for(var i=0;i<styles.length;i++)addStyle(styles[i].text);scripts=tale.lookup("tags","script");for(var n=0;n<scripts.length;n++)try{eval(scripts[n].text)}catch(e){window.alert("There is a technical problem with this story ("+scripts[n].title+": "+e.message+"). You may be able "+"to continue reading, but all parts of the story may not "+"work properly.")}state=new History,state.init(),$("restartStory").onclick=function(){return state.restart(),!1},console.log("init complete",tale,state)};
})();</script>
</head>
<body>
<div id="floater">
<div class="container">
<div id="storyMenu"></div>
<p><a id="restartStory" href="#_">Restart Story</a></p>
</div>
</div>
<div id="content1">
<div id="content2">
<div id="header"></div>
<div id="titleLine"></div>
<h1><span id="storyTitle"></span></h1>
<h2><span id="storySubtitle"></span></h2>
<h3><span id="storyAuthor"></span></h3>
<div id="passages"></div>
<p id="footer">
This story was created with <a class="externalLink" href="http://gimcrackd.com/etc/src/">Twee</a> and is powered by <a class="externalLink" href="http://www.tiddlywiki.com/">TiddlyWiki</a>.
</p>
</div>
</div>
<div id="storeArea">