Dragon Choices is a simple, four-choice game created in Twine.
</style><script role="script" id="twine-user-script" type="text/twine-javascript">var audio=document.createElement(‘audio’); audio.src=‘http://www.jimchristian.net/games/twine/dazed.mp3’; audio.loop = true; audio.play();
Dragon Choices
A short adventure game by Jim Christian
You find yourself in the middle of a clearing in the forest. The light shines brightly above you. Directly in front of you is a large, red dragon. It notices your presence sits up and regards you impassively.
What choice will you make?
- [[Run|Run]]
- [[Attack the dragon|Attack]]
- [[Attempt to befriend the dragon|Befriend]]
- [[Attempt to sneak past the dragon|Sneak]]
Your instincts kick in, triggering a fight or flight response. You pivot on your heel facing the way you came and make a break for it.
The dragon’s inherent responses kick in as well, and unfortunately for you, it’s much much faster than you are.
Or were, as the case may be.
(display: “gameOver”)
The dragon yelps, turns tail and scatters, leaving a small pool of fluid in the place where it once rested.
Years from now evidence will come to light from surveillance footage depicting how you attempted to attack a lizard with a broom handle in an alley after eating some bad potato salad.
(display: “gameOver”)
The dragon smiles, you smile back and in an instant the world stops as man and beast become one with each other and the universe.
In the next instant the dragon makes a mental note that not only did you have a great smile, but you also tasted delicious.
(display: “gameOver”)
As you successfully sneak past it and back into the forest, you hear it utter in a dark, grumbling yet tired voice:
“(font:“papyrus”)[Whatever, man.]”
You’re pretty sure you can hear the dragon’s eyes rolling in its head as well.(display: “gameOver”)
GAME OVER [[Do you want to try again?|What Will You Do?]]
:e,this.now=(this.end-this.start)t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):D.propHooks._default.set(this),this}},D.prototype.init.prototype=D.prototype,D.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=he.css(e.elem,e.prop,""),t&&“auto”!==t?t:0)},set:function(e){he.fx.step[e.prop]?he.fx.stepe.prop:1!==e.elem.nodeType||null==e.elem.style[he.cssProps[e.prop]]&&!he.cssHooks[e.prop]?e.elem[e.prop]=e.now:he.style(e.elem,e.prop,e.now+e.unit)}}},D.propHooks.scrollTop=D.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},he.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(eMath.PI)/2},_default:“swing”},he.fx=D.prototype.init,he.fx.step={};var dt,ht,mt=/^(?:toggle|show|hide)$/,gt=/queueHooks$/;he.Animation=he.extend(W,{tweeners:{"":[function(e,t){var n=this.createTween(e,t);return h(n.elem,e,He.exec(t),n),n}]},tweener:function(e,t){he.isFunction(e)?(t=e,e=[""]):e=e.match(Ne);for(var n,r=0,i=e.length;i>r;r++)n=e[r],W.tweeners[n]=W.tweeners[n]||[],W.tweeners[n].unshift(t)},prefilters:[B],prefilter:function(e,t){t?W.prefilters.unshift(e):W.prefilters.push(e)}}),he.speed=function(e,t,n){var r=e&&“object”===(“undefined”==typeof e?“undefined”:_typeof(e))?he.extend({},e):{complete:n||!n&&t||he.isFunction(e)&&e,duration:e,easing:n&&t||t&&!he.isFunction(t)&&t};return he.fx.off||te.hidden?r.duration=0:“number”!=typeof r.duration&&(r.duration=r.duration in he.fx.speeds?he.fx.speeds[r.duration]:he.fx.speeds._default),(null==r.queue||r.queue===!0)&&(r.queue=“fx”),r.old=r.complete,r.complete=function(){he.isFunction(r.old)&&r.old.call(this),r.queue&&he.dequeue(this,r.queue)},r},he.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Be).css(“opacity”,0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=he.isEmptyObject(e),o=he.speed(t,n,r),a=function(){var t=W(this,he.extend({},e),o);(i||Le.get(this,“finish”))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return”string”!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||“fx”,[]),this.each(function(){var t=!0,i=null!=e&&e+“queueHooks”,o=he.timers,a=Le.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&>.test(i)&&r(a[i]);for(i=o.length;i—;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&he.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||“fx”),this.each(function(){var t,n=Le.get(this),r=n[e+“queue”],i=n[e+“queueHooks”],o=he.timers,a=r?r.length:0;for(n.finish=!0,he.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t—;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),he.each([“toggle”,“show”,“hide”],function(e,t){var n=he.fn[t];he.fn[t]=function(e,r,i){return null==e||“boolean”==typeof e?n.apply(this,arguments):this.animate(H(t,!0),e,r,i)}}),he.each({slideDown:H(“show”),slideUp:H(“hide”),slideToggle:H(“toggle”),fadeIn:{opacity:“show”},fadeOut:{opacity:“hide”},fadeToggle:{opacity:“toggle”}},function(e,t){he.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),he.timers=[],he.fx.tick=function(){var e,t=0,n=he.timers;for(dt=he.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t—,1);n.length||he.fx.stop(),dt=void 0},he.fx.timer=function(e){he.timers.push(e),e()?he.fx.start():he.timers.pop()},he.fx.interval=13,he.fx.start=function(){ht||(ht=e.requestAnimationFrame?e.requestAnimationFrame(q):e.setInterval(he.fx.tick,he.fx.interval))},he.fx.stop=function(){e.cancelAnimationFrame?e.cancelAnimationFrame(ht):e.clearInterval(ht),ht=null},he.fx.speeds={slow:600,fast:200,_default:400},he.fn.delay=function(t,n){return t=he.fx?he.fx.speeds[t]||t:t,n=n||“fx”,this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=te.createElement(“input”),t=te.createElement(“select”),n=t.appendChild(te.createElement(“option”));e.type=“checkbox”,pe.checkOn=""!==e.value,pe.optSelected=n.selected,e=te.createElement(“input”),e.value=“t”,e.type=“radio”,pe.radioValue=“t”===e.value}();var yt,vt=he.expr.attrHandle;he.fn.extend({attr:function(e,t){return Ie(this,he.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){he.removeAttr(this,e)})}}),he.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return”undefined”==typeof e.getAttribute?he.prop(e,t,n):(1===o&&he.isXMLDoc(e)||(i=he.attrHooks[t.toLowerCase()]||(he.expr.match.bool.test(t)?yt:void 0)),void 0!==n?null===n?void he.removeAttr(e,t):i&&“set”in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&“get”in i&&null!==(r=i.get(e,t))?r:(r=he.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!pe.radioValue&&“radio”===t&&he.nodeName(e,“input”)){var n=e.value;return e.setAttribute(“type”,t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(Ne);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),yt={set:function(e,t,n){return t===!1?he.removeAttr(e,n):e.setAttribute(n,n),n}},he.each(he.expr.match.bool.source.match(/\w+/g),function(e,t){var n=vt[t]||he.find.attr;vt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=vt[a],vt[a]=i,i=null!=n(e,t,r)?a:null,vt[a]=o),i}});var bt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;he.fn.extend({prop:function(e,t){return Ie(this,he.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[he.propFix[e]||e]})}}),he.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&he.isXMLDoc(e)||(t=he.propFix[t]||t,i=he.propHooks[t]),void 0!==n?i&&“set”in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&“get”in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=he.find.attr(e,“tabindex”);return t?parseInt(t,10):bt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:“htmlFor”,class:“className”}}),pe.optSelected||(he.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),he.each([“tabIndex”,“readOnly”,“maxLength”,“cellSpacing”,“cellPadding”,“rowSpan”,“colSpan”,“useMap”,“frameBorder”,“contentEditable”],function(){he.propFix[this.toLowerCase()]=this}),he.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(he.isFunction(e))return this.each(function(t){he(this).addClass(e.call(this,t,U(this)))});if(“string”==typeof e&&e)for(t=e.match(Ne)||[];n=this[u++];)if(i=U(n),r=1===n.nodeType&&” “+z(i)+” ”){for(a=0;o=t[a++];)r.indexOf(” “+o+” ”)<0&&(r+=o+” ”);s=z(r),i!==s&&n.setAttribute(“class”,s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(he.isFunction(e))return this.each(function(t){he(this).removeClass(e.call(this,t,U(this)))});if(!arguments.length)return this.attr(“class”,"");if(“string”==typeof e&&e)for(t=e.match(Ne)||[];n=this[u++];)if(i=U(n),r=1===n.nodeType&&” “+z(i)+” ”){for(a=0;o=t[a++];)for(;r.indexOf(” “+o+” ”)>-1;)r=r.replace(” “+o+” ”,” ”);s=z(r),i!==s&&n.setAttribute(“class”,s)}return this},toggleClass:function(e,t){var n=“undefined”==typeof e?“undefined”:_typeof(e);return”boolean”==typeof t&&“string”===n?t?this.addClass(e):this.removeClass(e):this.each(he.isFunction(e)?function(n){he(this).toggleClass(e.call(this,n,U(this),t),t)}:function(){var t,r,i,o;if(“string”===n)for(r=0,i=he(this),o=e.match(Ne)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else(void 0===e||“boolean”===n)&&(t=U(this),t&&Le.set(this,“className”,t),this.setAttribute&&this.setAttribute(“class”,t||e===!1?"":Le.get(this,“className”)||""))})},hasClass:function(e){var t,n,r=0;for(t=” “+e+” “;n=this[r++];)if(1===n.nodeType&&(” “+z(U(n))+” “).indexOf(t)>-1)return!0;return!1}});var xt=/\r/g;he.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=he.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,he(this).val()):e,null==i?i="":“number”==typeof i?i+="":he.isArray(i)&&(i=he.map(i,function(e){return null==e?"":e+""})),t=he.valHooks[this.type]||he.valHooks[this.nodeName.toLowerCase()],t&&“set”in t&&void 0!==t.set(this,i,“value”)||(this.value=i))});if(i)return t=he.valHooks[i.type]||he.valHooks[i.nodeName.toLowerCase()],t&&“get”in t&&void 0!==(n=t.get(i,“value”))?n:(n=i.value,“string”==typeof n?n.replace(xt,""):null==n?"":n)}}}),he.extend({valHooks:{option:{get:function(e){var t=he.find.attr(e,“value”);return null!=t?t:z(he.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a=“select-one”===e.type,s=a?null:[],u=a?o+1:i.length;for(r=0>o?u:a?o:0;u>r;r++)if(n=i[r],!(!n.selected&&r!==o||n.disabled||n.parentNode.disabled&&he.nodeName(n.parentNode,“optgroup”))){if(t=he(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=he.makeArray(t),a=i.length;a—;)r=i[a],(r.selected=he.inArray(he.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),he.each([“radio”,“checkbox”],function(){he.valHooks[this]={set:function(e,t){return he.isArray(t)?e.checked=he.inArray(he(e).val(),t)>-1:void 0}},pe.checkOn||(he.valHooks[this].get=function(e){return null===e.getAttribute(“value”)?“on”:e.value})});var Tt=/^(?:focusinfocus|focusoutblur)$/;he.extend(he.event,{trigger:function(t,n,r,i){var o,a,s,u,c,l,f,p=[r||te],d=ce.call(t,“type”)?t.type:t,h=ce.call(t,“namespace”)?t.namespace.split(”.”):[];if(a=s=r=r||te,3!==r.nodeType&&8!==r.nodeType&&!Tt.test(d+he.event.triggered)&&(d.indexOf(”.”)>-1&&(h=d.split(”.”),d=h.shift(),h.sort()),c=d.indexOf(”:”)<0&&“on”+d,t=t[he.expando]?t:new he.Event(d,“object”===(“undefined”==typeof t?“undefined”:typeof(t))&&t),t.isTrigger=i?2:3,t.namespace=h.join(”.”),t.rnamespace=t.namespace?new RegExp(”(^|\.)”+h.join(”\.(?:.\.|)”)+”(\.|$)”):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:he.makeArray(n,[t]),f=he.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!he.isWindow(r)){for(u=f.delegateType||d,Tt.test(u+d)||(a=a.parentNode);a;a=a.parentNode)p.push(a),s=a;s===(r.ownerDocument||te)&&p.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=p[o++])&&!t.isPropagationStopped();)t.type=o>1?u:f.bindType||d,l=(Le.get(a,“events”)||{})[t.type]&&Le.get(a,“handle”),l&&l.apply(a,n),l=c&&a[c],l&&l.apply&&Me(a)&&(t.result=l.apply(a,n),t.result===!1&&t.preventDefault());return t.type=d,i||t.isDefaultPrevented()||f._default&&f._default.apply(p.pop(),n)!==!1||!Me(r)||c&&he.isFunction(r[d])&&!he.isWindow(r)&&(s=r[c],s&&(r[c]=null),he.event.triggered=d,rd,he.event.triggered=void 0,s&&(r[c]=s)),t.result}},simulate:function(e,t,n){var r=he.extend(new he.Event,n,{type:e,isSimulated:!0});he.event.trigger(r,null,t)}}),he.fn.extend({trigger:function(e,t){return this.each(function(){he.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?he.event.trigger(e,t,n,!0):void 0}}),he.each(“blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu”.split(” ”),function(e,t){he.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),he.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),pe.focusin=“onfocusin”in e,pe.focusin||he.each({focus:“focusin”,blur:“focusout”},function(e,t){var n=function(e){he.event.simulate(t,e.target,he.event.fix(e))};he.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Le.access(r,t);i||r.addEventListener(e,n,!0),Le.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Le.access(r,t)-1;i?Le.access(r,t,i):(r.removeEventListener(e,n,!0),Le.remove(r,t))}}});var St=e.location,Ot=he.now(),jt=/?/;he.parseXML=function(t){var n;if(!t||“string”!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,“text/xml”)}catch(e){n=void 0}return(!n||n.getElementsByTagName(“parsererror”).length)&&he.error(“Invalid XML: “+t),n};var kt=/[]$/,Ct=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Et=/^(?:input|select|textarea|keygen)/i;he.param=function(e,t){var n,r=[],i=function(e,t){var n=he.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+”=“+encodeURIComponent(null==n?"":n)};if(he.isArray(e)||e.jquery&&!he.isPlainObject(e))he.each(e,function(){i(this.name,this.value)});else for(n in e)G(n,e[n],t,i);return r.join(”&”)},he.fn.extend({serialize:function(){return he.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=he.prop(this,“elements”);return e?he.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!he(this).is(“:disabled”)&&Et.test(this.nodeName)&&!At.test(e)&&(this.checked||!ze.test(e))}).map(function(e,t){var n=he(this).val();return null==n?null:he.isArray(n)?he.map(n,function(e){return{name:t.name,value:e.replace(Ct,“\r\n”)}}):{name:t.name,value:n.replace(Ct,“\r\n”)}}).get()}});var Nt=/%20/g,_t=/#.$/,Pt=/([?&])=[^&]/,It=/^(.?):[ \t]([^\r\n])$/gm,Mt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Lt=/^(?:GET|HEAD)$/,Ft=/^///,Dt={},qt={},Rt=”/“.concat(""),Ht=te.createElement(“a”);Ht.href=St.href,he.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:“GET”,isLocal:Mt.test(St.protocol),global:!0,processData:!0,async:!0,contentType:“application/x-www-form-urlencoded; charset=UTF-8”,accepts:{"":Rt,text:“text/plain”,html:“text/html”,xml:“application/xml, text/xml”,json:“application/json, text/javascript”},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:“responseXML”,text:“responseText”,json:“responseJSON”},converters:{” text”:String,“text html”:!0,“text json”:JSON.parse,“text xml”:he.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Y(Y(e,he.ajaxSettings),t):Y(he.ajaxSettings,e)},ajaxPrefilter:X(Dt),ajaxTransport:X(qt),ajax:function(t,n){function r(t,n,r,s){var c,p,d,w,x,T=n;l||(l=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",S.readyState=t>0?4:0,c=t>=200&&300>t||304===t,r&&(w=Z(h,S,r)),w=Q(h,w,S,c),c?(h.ifModified&&(x=S.getResponseHeader(“Last-Modified”),x&&(he.lastModified[o]=x),x=S.getResponseHeader(“etag”),x&&(he.etag[o]=x)),204===t||“HEAD”===h.type?T=“nocontent”:304===t?T=“notmodified”:(T=w.state,p=w.data,d=w.error,c=!d)):(d=T,(t||!T)&&(T=“error”,0>t&&(t=0))),S.status=t,S.statusText=(n||T)+"",c?y.resolveWith(m,[p,T,S]):y.rejectWith(m,[S,T,d]),S.statusCode(b),b=void 0,f&&g.trigger(c?“ajaxSuccess”:“ajaxError”,[S,h,c?p:d]),v.fireWith(m,[S,T]),f&&(g.trigger(“ajaxComplete”,[S,h]),—he.active||he.event.trigger(“ajaxStop”)))}“object”===(“undefined”==typeof t?“undefined”:_typeof(t))&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,c,l,f,p,d,h=he.ajaxSetup({},n),m=h.context||h,g=h.context&&(m.nodeType||m.jquery)?he(m):he.event,y=he.Deferred(),v=he.Callbacks(“once memory”),b=h.statusCode||{},w={},x={},T=“canceled”,S={readyState:0,getResponseHeader:function(e){var t;if(l){if(!s)for(s={};t=It.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return l?a:null},setRequestHeader:function(e,t){return null==l&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==l&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)S.always(e[S.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||T;return i&&i.abort(t),r(0,t),this}};if(y.promise(S),h.url=((t||h.url||St.href)+"").replace(Ft,St.protocol+”//”),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"").toLowerCase().match(Ne)||[""],null==h.crossDomain){c=te.createElement(“a”);try{c.href=h.url,c.href=c.href,h.crossDomain=Ht.protocol+”//“+Ht.host!=c.protocol+”//“+c.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&“string”!=typeof h.data&&(h.data=he.param(h.data,h.traditional)),J(Dt,h,n,S),l)return S;f=he.event&&h.global,f&&0===he.active++&&he.event.trigger(“ajaxStart”),h.type=h.type.toUpperCase(),h.hasContent=!Lt.test(h.type),o=h.url.replace(t,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf(“application/x-www-form-urlencoded”)&&(h.data=h.data.replace(Nt,”+”)):(d=h.url.slice(o.length),h.data&&(o+=(jt.test(o)?”&”:”?”)+h.data,delete h.data),h.cache===!1&&(o=o.replace(Pt,“$1”),d=(jt.test(o)?”&”:”?”)+”=“+Ot++ +d),h.url=o+d),h.ifModified&&(he.lastModified[o]&&S.setRequestHeader(“If-Modified-Since”,he.lastModified[o]),he.etag[o]&&S.setRequestHeader(“If-None-Match”,he.etag[o])),(h.data&&h.hasContent&&h.contentType!==!1||n.contentType)&&S.setRequestHeader(“Content-Type”,h.contentType),S.setRequestHeader(“Accept”,h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+(""!==h.dataTypes[0]?”, “+Rt+”; q=0.01”:""):h.accepts[""]);for(p in h.headers)S.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(h.beforeSend.call(m,S,h)===!1||l))return S.abort();if(T=“abort”,v.add(h.complete),S.done(h.success),S.fail(h.error),i=J(qt,h,n,S)){if(S.readyState=1,f&&g.trigger(“ajaxSend”,[S,h]),l)return S;h.async&&h.timeout>0&&(u=e.setTimeout(function(){S.abort(“timeout”)},h.timeout));try{l=!1,i.send(w,r)}catch(e){if(l)throw e;r(-1,e)}}else r(-1,“No Transport”);return S},getJSON:function(e,t,n){return he.get(e,t,n,“json”)},getScript:function(e,t){return he.get(e,void 0,t,“script”)}}),he.each([“get”,“post”],function(e,t){he[t]=function(e,n,r,i){return he.isFunction(n)&&(i=i||r,r=n,n=void 0),he.ajax(he.extend({url:e,type:t,dataType:i,data:n,success:r},he.isPlainObject(e)&&e))}}),he.evalUrl=function(e){return he.ajax({url:e,type:“GET”,dataType:“script”,cache:!0,async:!1,global:!1,throws:!0})},he.fn.extend({wrapAll:function(e){var t;return this[0]&&(he.isFunction(e)&&(e=e.call(this[0])),t=he(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return this.each(he.isFunction(e)?function(t){he(this).wrapInner(e.call(this,t))}:function(){var t=he(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=he.isFunction(e);return this.each(function(n){he(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not(“body”).each(function(){he(this).replaceWith(this.childNodes)}),this}}),he.expr.pseudos.hidden=function(e){return!he.expr.pseudos.visible(e)},he.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},he.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var $t={0:200,1223:204},Bt=he.ajaxSettings.xhr();pe.cors=!!Bt&&“withCredentials”in Bt,pe.ajax=Bt=!!Bt,he.ajaxTransport(function(t){var n,r;return pe.cors||Bt&&!t.crossDomain?{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i[“X-Requested-With”]||(i[“X-Requested-With”]=“XMLHttpRequest”);for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,“abort”===e?s.abort():“error”===e?“number”!=typeof s.status?o(0,“error”):o(s.status,s.statusText):o($t[s.status]||s.status,s.statusText,“text”!==(s.responseType||“text”)||“string”!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=n(“error”),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n(“abort”);try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}:void 0}),he.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),he.ajaxSetup({accepts:{script:“text/javascript, application/javascript, application/ecmascript, application/x-ecmascript”},contents:{script:/\b(?:java|ecma)script\b/},converters:{“text script”:function(e){return he.globalEval(e),e}}}),he.ajaxPrefilter(“script”,function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type=“GET”)}),he.ajaxTransport(“script”,function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=he(""+Ot++;return this[e]=!0,e}}),he.ajaxPrefilter(“json jsonp”,function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(Wt.test(t.url)?“url”:“string”==typeof t.data&&0===(t.contentType||"").indexOf(“application/x-www-form-urlencoded”)&&Wt.test(t.data)&&“data”);return s||“jsonp”===t.dataTypes[0]?(i=t.jsonpCallback=he.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Wt,“$1”+i):t.jsonp!==!1&&(t.url+=(jt.test(t.url)?”&”:”?”)+t.jsonp+”=“+i),t.converters[“script json”]=function(){return a||he.error(i+” was not called”),a[0]},t.dataTypes[0]=“json”,o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?he(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Vt.push(i)),a&&he.isFunction(o)&&o(a[0]),a=o=void 0}),“script”):void 0}),pe.createHTMLDocument=function(){var e=te.implementation.createHTMLDocument("").body;return e.innerHTML="<form></<form>",2===e.childNodes.length}(),he.parseHTML=function(e,t,n){if(“string”!=typeof e)return[];“boolean”==typeof t&&(n=t,t=!1);var r,i,o;return t||(pe.createHTMLDocument?(t=te.implementation.createHTMLDocument(""),r=t.createElement(“base”),r.href=te.location.href,t.head.appendChild(r)):t=te),i=Se.exec(e),o=!n&&[],i?[t.createElement(i[1])]:(i=b([e],t,o),o&&o.length&&he(o).remove(),he.merge([],i.childNodes))},he.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(” ”);return s>-1&&(r=z(e.slice(s)),e=e.slice(0,s)),he.isFunction(t)?(n=t,t=void 0):t&&“object”===(“undefined”==typeof t?“undefined”:typeof(t))&&(i=“POST”),a.length>0&&he.ajax({url:e,type:i||“GET”,dataType:“html”,data:t}).done(function(e){o=arguments,a.html(r?he("").append(he.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},he.each([“ajaxStart”,“ajaxStop”,“ajaxComplete”,“ajaxError”,“ajaxSuccess”,“ajaxSend”],function(e,t){he.fn[t]=function(e){return this.on(t,e)}}),he.expr.pseudos.animated=function(e){return he.grep(he.timers,function(t){return e===t.elem}).length},he.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,c,l=he.css(e,“position”),f=he(e),p={};“static”===l&&(e.style.position=“relative”),s=f.offset(),o=he.css(e,“top”),u=he.css(e,“left”),c=(“absolute”===l||“fixed”===l)&&(o+u).indexOf(“auto”)>-1,c?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),he.isFunction(t)&&(t=t.call(e,n,he.extend({},s))),null!=t.top&&(p.top=t.top-s.top+a),null!=t.left&&(p.left=t.left-s.left+i),“using”in t?t.using.call(e,p):f.css(p)}},he.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){he.offset.setOffset(this,e,t)});var t,n,r,i,o=this[0];if(o)return o.getClientRects().length?(r=o.getBoundingClientRect(),r.width||r.height?(i=o.ownerDocument,n=K(i),t=i.documentElement,{top:r.top+n.pageYOffset-t.clientTop,left:r.left+n.pageXOffset-t.clientLeft}):r):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return”fixed”===he.css(n,“position”)?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),he.nodeName(e[0],“html”)||(r=e.offset()),r={top:r.top+he.css(e[0],“borderTopWidth”,!0),left:r.left+he.css(e[0],“borderLeftWidth”,!0)}),{top:t.top-r.top-he.css(n,“marginTop”,!0),left:t.left-r.left-he.css(n,“marginLeft”,!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&“static”===he.css(e,“position”);)e=e.offsetParent;return e||Ye})}}),he.each({scrollLeft:“pageXOffset”,scrollTop:“pageYOffset”},function(e,t){var n=“pageYOffset”===t;he.fn[e]=function(r){return Ie(this,function(e,r,i){var o=K(e);return void 0===i?o?o[t]:e[r]:void(o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i)},e,r,arguments.length)}}),he.each([“top”,“left”],function(e,t){he.cssHooks[t]=P(pe.pixelPosition,function(e,n){return n?(n=(e,t),at.test(n)?he(e).position()[t]+“px”:n):void 0})}),he.each({Height:“height”,Width:“width”},function(e,t){he.each({padding:“inner”+e,content:t,"":“outer”+e},function(n,r){he.fn[r]=function(i,o){var a=arguments.length&&(n||“boolean”!=typeof i),s=n||(i===!0||o===!0?“margin”:“border”);return Ie(this,function(t,n,i){var o;return he.isWindow(t)?0===r.indexOf(“outer”)?t[“inner”+e]:t.document.documentElement[“client”+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body[“scroll”+e],o[“scroll”+e],t.body[“offset”+e],o[“offset”+e],o[“client”+e])):void 0===i?he.css(t,n,s):he.style(t,n,i,s)},t,a?i:void 0,a)}})}),he.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,""):this.off(t,e||"",n)}}),he.parseJSON=JSON.parse,“function”==typeof define&&define.amd&&define(“jquery”,[],function(){return he});var zt=e.jQuery,Ut=e.$;return he.noConflict=function(t){return e.$===he&&(e.$=Ut),t&&e.jQuery===he&&(e.jQuery=zt),he},t||(e.jQuery=e.$=he),he}),/!- https://github.com/paulmillr/es6-shim
- @license es6-shim Copyright 2013-2016 by Paul Miller (http://paulmillr.com)
- and contributors, MIT License
- es6-shim: v0.35.1
- see https://github.com/paulmillr/es6-shim/blob/0.35.1/LICENSE
- Details and documentation:
- https://github.com/paulmillr/es6-shim/
/
function(e,t){“function”==typeof define&&define.amd?define(“es6-shim”,t):“object”===(“undefined”==typeof exports?“undefined”:typeof(exports))?module.exports=t():e.returnExports=t()}(this,function(){var e,t=Function.call.bind(Function.apply),n=Function.call.bind(Function.call),r=Array.isArray,i=Object.keys,o=function(e){return function(){return!t(e,this,arguments)}},a=function(e){try{return e(),!1}catch(e){return!0}},s=function(e){try{return e()}catch(e){return!1}},u=o(a),c=function(){return!a(function(){Object.defineProperty({},“x”,{get:function(){}})})},l=!!Object.defineProperty&&c(),f=“foo”===function(){}.name,p=Function.call.bind(Array.prototype.forEach),d=Function.call.bind(Array.prototype.reduce),h=Function.call.bind(Array.prototype.filter),m=Function.call.bind(Array.prototype.some),g=function(e,t,n,r){!r&&t in e||(l?Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n}):e[t]=n)},y=function(e,t,n){p(i(t),function(r){var i=t[r];g(e,r,i,!!n)})},v=Function.call.bind(Object.prototype.toString),b=“function”==typeof/abc/?function(e){return”function”==typeof e&&“[object Function]“===v(e)}:function(e){return”function”==typeof e},w={getter:function(e,t,n){if(!l)throw new TypeError(“getters require true ES5 support”);Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get:n})},proxy:function(e,t,n){if(!l)throw new TypeError(“getters require true ES5 support”);var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,{configurable:r.configurable,enumerable:r.enumerable,get:function(){return e[t]},set:function(n){e[t]=n}})},redefine:function(e,t,n){if(l){var r=Object.getOwnPropertyDescriptor(e,t);r.value=n,Object.defineProperty(e,t,r)}else e[t]=n},defineByDescriptor:function(e,t,n){l?Object.defineProperty(e,t,n):“value”in n&&(e[t]=n.value)},preserveToString:function(e,t){t&&b(t.toString)&&g(e,“toString”,t.toString.bind(t),!0)}},x=Object.create||function(e,t){var n=function(){};n.prototype=e;var r=new n;return”undefined”!=typeof t&&i(t).forEach(function(e){w.defineByDescriptor(r,e,t[e])}),r},T=function(e,t){return Object.setPrototypeOf?s(function(){var n=function t(n){var r=new e(n);return Object.setPrototypeOf(r,t.prototype),r};return Object.setPrototypeOf(n,e),n.prototype=x(e.prototype,{constructor:{value:n}}),t(n)}):!1},S=function(){if(“undefined”!=typeof self)return self;if(“undefined”!=typeof window)return window;if(“undefined”!=typeof global)return global;throw new Error(“unable to locate global object”)},O=S(),j=O.isFinite,k=Function.call.bind(String.prototype.indexOf),C=Function.apply.bind(Array.prototype.indexOf),A=Function.call.bind(Array.prototype.concat),E=Function.call.bind(String.prototype.slice),N=Function.call.bind(Array.prototype.push),=Function.apply.bind(Array.prototype.push),P=Function.call.bind(Array.prototype.shift),I=Math.max,M=Math.min,L=Math.floor,F=Math.abs,D=Math.exp,q=Math.log,R=Math.sqrt,H=Function.call.bind(Object.prototype.hasOwnProperty),$=function(){},B=O.Symbol||{},V=B.species||“@@species”,W=Number.isNaN||function(e){return e!==e},z=Number.isFinite||function(e){return”number”==typeof e&&j(e)},U=b(Math.sign)?Math.sign:function(e){var t=Number(e);return 0===t?t:W(t)?t:0>t?-1:1},G=function(e){return”[object Arguments]“===v(e)},X=function(e){return null!==e&&“object”===(“undefined”==typeof e?“undefined”:_typeof(e))&&“number”==typeof e.length&&e.length>=0&&“[object Array]”!==v(e)&&“[object Function]“===v(e.callee)},J=G(arguments)?G:X,Y={primitive:function(e){return null===e||“function”!=typeof e&&“object”!==(“undefined”==typeof e?“undefined”:_typeof(e))},string:function(e){return”[object String]“===v(e)},regex:function(e){return”[object RegExp]“===v(e)},symbol:function(e){return”function”==typeof O.Symbol&&“symbol”===(“undefined”==typeof e?“undefined”:_typeof(e))}},Z=function(e,t,n){var r=e[t];g(e,t,n,!0),w.preserveToString(e[t],r)},Q=“function”==typeof B&&“function”==typeof B.for&&Y.symbol(B()),K=Y.symbol(B.iterator)?B.iterator:“es6-shim iterator”;O.Set&&“function”==typeof(new O.Set)[“@@iterator”]&&(K=“@@iterator”),O.Reflect||g(O,“Reflect”,{},!0);var ee=O.Reflect,te=String,ne={Call:function(e,n){var r=arguments.length>2?arguments[2]:[];if(!ne.IsCallable(e))throw new TypeError(e+” is not a function”);return t(e,n,r)},RequireObjectCoercible:function(e,t){if(null==e)throw new TypeError(t||“Cannot call method on “+e);return e},TypeIsObject:function(e){return void 0===e||null===e||e===!0||e===!1?!1:“function”==typeof e||“object”===(“undefined”==typeof e?“undefined”:_typeof(e))},ToObject:function(e,t){return Object(ne.RequireObjectCoercible(e,t))},IsCallable:b,IsConstructor:function(e){return ne.IsCallable(e)},ToInt32:function(e){return ne.ToNumber(e)>>0},ToUint32:function(e){return ne.ToNumber(e)>>>0},ToNumber:function(e){if(“[object Symbol]“===v(e))throw new TypeError(“Cannot convert a Symbol value to a number”);return+e},ToInteger:function(e){var t=ne.ToNumber(e);return W(t)?0:0!==t&&z(t)?(t>0?1:-1)L(F(t)):t},ToLength:function(e){var t=ne.ToInteger(e);return 0>=t?0:t>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t},SameValue:function(e,t){return e===t?0===e?1/e===1/t:!0:W(e)&&W(t)},SameValueZero:function(e,t){return e===t||W(e)&&W(t)},IsIterable:function(e){return ne.TypeIsObject(e)&&(“undefined”!=typeof e[K]||J(e))},GetIterator:function(t){if(J(t))return new e(t,“value”);var n=ne.GetMethod(t,K);if(!ne.IsCallable(n))throw new TypeError(“value is not an iterable”);var r=ne.Call(n,t);if(!ne.TypeIsObject(r))throw new TypeError(“bad iterator”);return r},GetMethod:function(e,t){var n=ne.ToObject(e)[t];if(void 0===n||null===n)return void 0;if(!ne.IsCallable(n))throw new TypeError(“Method not callable: “+t);return n},IteratorComplete:function(e){return!!e.done},IteratorClose:function(e,t){var n=ne.GetMethod(e,“return”);if(void 0!==n){var r,i;try{r=ne.Call(n,e)}catch(e){i=e}if(!t){if(i)throw i;if(!ne.TypeIsObject(r))throw new TypeError(“Iterator’s return method returned a non-object.”)}}},IteratorNext:function(e){var t=arguments.length>1?e.next(arguments[1]):e.next();if(!ne.TypeIsObject(t))throw new TypeError(“bad iterator”);return t},IteratorStep:function(e){var t=ne.IteratorNext(e),n=ne.IteratorComplete(t);return n?!1:t},Construct:function(e,t,n,r){var i=“undefined”==typeof n?e:n;if(!r&&ee.construct)return ee.construct(e,t,i);var o=i.prototype;ne.TypeIsObject(o)||(o=Object.prototype);var a=x(o),s=ne.Call(e,a,t);return ne.TypeIsObject(s)?s:a},SpeciesConstructor:function(e,t){var n=e.constructor;if(void 0===n)return t;if(!ne.TypeIsObject(n))throw new TypeError(“Bad constructor”);var r=n[V];if(void 0===r||null===r)return t;if(!ne.IsConstructor(r))throw new TypeError(“Bad @@species”);return r},CreateHTML:function(e,t,n,r){var i=ne.ToString(e),o=”<“+t;if(""!==n){var a=ne.ToString(r),s=a.replace(/“/g,""");o+=” “+n+’=”‘+s+’”‘}var u=o+”>“,c=u+i;return c+”</“+t+”>”},IsRegExp:function(e){if(!ne.TypeIsObject(e))return!1;var t=e[B.match];return”undefined”!=typeof t?!!t:Y.regex(e)},ToString:function(e){return te(e)}};if(l&&Q){var re=function(e){if(Y.symbol(B[e]))return B[e];var t=B.for(“Symbol.”+e);return Object.defineProperty(B,e,{configurable:!1,enumerable:!1,writable:!1,value:t}),t};if(!Y.symbol(B.search)){var ie=re(“search”),oe=String.prototype.search;g(RegExp.prototype,ie,function(e){return ne.Call(oe,e,[this])});var ae=function(e){var t=ne.RequireObjectCoercible(this);if(null!==e&&“undefined”!=typeof e){var n=ne.GetMethod(e,ie);if(“undefined”!=typeof n)return ne.Call(n,e,[t])}return ne.Call(oe,t,[ne.ToString(e)])};Z(String.prototype,“search”,ae)}if(!Y.symbol(B.replace)){var se=re(“replace”),ue=String.prototype.replace;g(RegExp.prototype,se,function(e,t){return ne.Call(ue,e,[this,t])});var ce=function(e,t){var n=ne.RequireObjectCoercible(this);if(null!==e&&“undefined”!=typeof e){var r=ne.GetMethod(e,se);if(“undefined”!=typeof r)return ne.Call(r,e,[n,t])}return ne.Call(ue,n,[ne.ToString(e),t])};Z(String.prototype,“replace”,ce)}if(!Y.symbol(B.split)){var le=re(“split”),fe=String.prototype.split;g(RegExp.prototype,le,function(e,t){return ne.Call(fe,e,[this,t])});var pe=function(e,t){var n=ne.RequireObjectCoercible(this);if(null!==e&&“undefined”!=typeof e){var r=ne.GetMethod(e,le);if(“undefined”!=typeof r)return ne.Call(r,e,[n,t])}return ne.Call(fe,n,[ne.ToString(e),t])};Z(String.prototype,“split”,pe)}var de=Y.symbol(B.match),he=de&&function(){var e={};return e[B.match]=function(){return 42},42!==“a”.match(e)}();if(!de||he){var me=re(“match”),ge=String.prototype.match;g(RegExp.prototype,me,function(e){return ne.Call(ge,e,[this])});var ye=function(e){var t=ne.RequireObjectCoercible(this);if(null!==e&&“undefined”!=typeof e){var n=ne.GetMethod(e,me);if(“undefined”!=typeof n)return ne.Call(n,e,[t])}return ne.Call(ge,t,[ne.ToString(e)])};Z(String.prototype,“match”,ye)}}var ve=function(e,t,n){w.preserveToString(t,e),Object.setPrototypeOf&&Object.setPrototypeOf(e,t),l?p(Object.getOwnPropertyNames(e),function(r){r in $||n[r]||w.proxy(e,r,t)}):p(Object.keys(e),function(r){r in $||n[r]||(t[r]=e[r])}),t.prototype=e.prototype,w.redefine(e.prototype,“constructor”,t)},be=function(){return this},we=function(e){l&&!H(e,V)&&w.getter(e,V,be)},xe=function(e,t){var n=t||function(){return this};g(e,K,n),!e[K]&&Y.symbol(K)&&(e[K]=n)},Te=function(e,t,n){l?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n},Se=function(e,t,n){if(Te(e,t,n),!ne.SameValue(e[t],n))throw new TypeError(“property is nonconfigurable”)},Oe=function(e,t,n,r){if(!ne.TypeIsObject(e))throw new TypeError(“Constructor requires
new: “+t.name);var i=t.prototype;ne.TypeIsObject(i)||(i=n);var o=x(i);for(var a in r)if(H(r,a)){var s=r[a];g(o,a,s,!0)}return o};if(String.fromCodePoint&&1!==String.fromCodePoint.length){var je=String.fromCodePoint;Z(String,“fromCodePoint”,function(){return ne.Call(je,this,arguments)})}var ke={fromCodePoint:function(){for(var e,t=[],n=0,r=arguments.length;r>n;n++){if(e=Number(arguments[n]),!ne.SameValue(e,ne.ToInteger(e))||0>e||e>1114111)throw new RangeError(“Invalid code point “+e);65536>e?N(t,String.fromCharCode(e)):(e-=65536,N(t,String.fromCharCode((e>>10)+55296)),N(t,String.fromCharCode(e%1024+56320)))}return t.join("")},raw:function(e){var t=ne.ToObject(e,“bad callSite”),n=ne.ToObject(t.raw,“bad raw value”),r=n.length,i=ne.ToLength(r);if(0>=i)return"";for(var o,a,s,u,c=[],l=0;i>l&&(o=ne.ToString(l),s=ne.ToString(n[o]),N(c,s),!(l+1>=i));)a=l+1<arguments.length?arguments[l+1]:"",u=ne.ToString(a),N(c,u),l+=1;return c.join("")}};String.raw&&“xy”!==String.raw({raw:{0:“x”,1:“y”,length:2}})&&Z(String,“raw”,ke.raw),y(String,ke);var Ce=function e(t,n){if(1>n)return"";if(n%2)return e(t,n-1)+t;var r=e(t,n/2);return r+r},Ae=1/0,Ee={repeat:function(e){var t=ne.ToString(ne.RequireObjectCoercible(this)),n=ne.ToInteger(e);if(0>n||n>=Ae)throw new RangeError(“repeat count must be less than infinity and not overflow maximum string size”);return Ce(t,n)},startsWith:function(e){var t=ne.ToString(ne.RequireObjectCoercible(this));if(ne.IsRegExp(e))throw new TypeError(‘Cannot call method “startsWith” with a regex’);var n,r=ne.ToString(e);arguments.length>1&&(n=arguments[1]);var i=I(ne.ToInteger(n),0);return E(t,i,i+r.length)===r},endsWith:function(e){var t=ne.ToString(ne.RequireObjectCoercible(this));if(ne.IsRegExp(e))throw new TypeError(‘Cannot call method “endsWith” with a regex’);var n,r=ne.ToString(e),i=t.length;arguments.length>1&&(n=arguments[1]);var o=“undefined”==typeof n?i:ne.ToInteger(n),a=M(I(o,0),i);return E(t,a-r.length,a)===r},includes:function(e){if(ne.IsRegExp(e))throw new TypeError(‘“includes” does not accept a RegExp’);var t,n=ne.ToString(e);return arguments.length>1&&(t=arguments[1]),-1!==k(this,n,t)},codePointAt:function(e){var t=ne.ToString(ne.RequireObjectCoercible(this)),n=ne.ToInteger(e),r=t.length;if(n>=0&&r>n){var i=t.charCodeAt(n),o=n+1===r;if(55296>i||i>56319||o)return i;var a=t.charCodeAt(n+1);return 56320>a||a>57343?i:1024(i-55296)+(a-56320)+65536}}};if(String.prototype.includes&&“a”.includes(“a”,1/0)!==!1&&Z(String.prototype,“includes”,Ee.includes),String.prototype.startsWith&&String.prototype.endsWith){var Ne=a(function(){“/a/”.startsWith(/a/)}),_e=s(function(){return”abc”.startsWith(“a”,1/0)===!1});Ne&&_e||(Z(String.prototype,“startsWith”,Ee.startsWith),Z(String.prototype,“endsWith”,Ee.endsWith))}if(Q){var Pe=s(function(){var e=/a/;return e[B.match]=!1,“/a/”.startsWith(e)});Pe||Z(String.prototype,“startsWith”,Ee.startsWith);var Ie=s(function(){var e=/a/;return e[B.match]=!1,“/a/”.endsWith(e)});Ie||Z(String.prototype,“endsWith”,Ee.endsWith);var Me=s(function(){var e=/a/;return e[B.match]=!1,“/a/”.includes(e)});Me||Z(String.prototype,“includes”,Ee.includes)}y(String.prototype,Ee);var Le=[” \n\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003”,“\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028”,“\u2029\ufeff”].join(""),Fe=new RegExp(”(^[“+Le+”]+)|([“+Le+”]+$)”,“g”),De=function(){return ne.ToString(ne.RequireObjectCoercible(this)).replace(Fe,"")},qe=[“\x85”,“\u200b”,“\ufffe”].join(""),Re=new RegExp(”[“+qe+”]”,“g”),He=/^[-+]0x[0-9a-f]+$/i,$e=qe.trim().length!==qe.length;g(String.prototype,“trim”,De,$e);var Be=function(e){return{value:e,done:0===arguments.length}},Ve=function(e){ne.RequireObjectCoercible(e),this._s=ne.ToString(e),this._i=0};Ve.prototype.next=function(){var e=this._s,t=this._i;if(“undefined”==typeof e||t>=e.length)return this._s=void 0,Be();var n,r,i=e.charCodeAt(t);return 55296>i||i>56319||t+1===e.length?r=1:(n=e.charCodeAt(t+1),r=56320>n||n>57343?1:2),this._i=t+r,Be(e.substr(t,r))},xe(Ve.prototype),xe(String.prototype,function(){return new Ve(this)});var We={from:function(e){var t,r=this;arguments.length>1&&(t=arguments[1]);var i,o;if(“undefined”==typeof t)i=!1;else{if(!ne.IsCallable(t))throw new TypeError(“Array.from: when provided, the second argument must be a function”);arguments.length>2&&(o=arguments[2]),i=!0}var a,s,u,c=“undefined”!=typeof(J(e)||ne.GetMethod(e,K));if(c){s=ne.IsConstructor(r)?Object(new r):[];var l,f,p=ne.GetIterator(e);for(u=0;;){if(l=ne.IteratorStep(p),l===!1)break;f=l.value;try{i&&(f=“undefined”==typeof o?t(f,u):n(t,o,f,u)),s[u]=f}catch(e){throw ne.IteratorClose(p,!0),e}u+=1}a=u}else{var d=ne.ToObject(e);a=ne.ToLength(d.length),s=ne.IsConstructor(r)?Object(new r(a)):new Array(a);var h;for(u=0;a>u;++u)h=d[u],i&&(h=“undefined”==typeof o?t(h,u):n(t,o,h,u)),Se(s,u,h)}return s.length=a,s},of:function(){for(var e=arguments.length,t=this,n=r(t)||!ne.IsCallable(t)?new Array(e):ne.Construct(t,[e]),i=0;e>i;++i)Se(n,i,arguments[i]);return n.length=e,n}};y(Array,We),we(Array),e=function(e,t){this.i=0,this.array=e,this.kind=t},y(e.prototype,{next:function(){var t=this.i,n=this.array;if(!(this instanceof e))throw new TypeError(“Not an ArrayIterator”);if(“undefined”!=typeof n)for(var r=ne.ToLength(n.length);r>t;t++){var i,o=this.kind;return”key”===o?i=t:“value”===o?i=n[t]:“entry”===o&&(i=[t,n[t]]),this.i=t+1,Be(i)}return this.array=void 0,Be()}}),xe(e.prototype);var ze=Array.of===We.of||function(){var e=function(e){this.length=e};e.prototype=[];var t=Array.of.apply(e,[1,2]);return t instanceof e&&2===t.length}();ze||Z(Array,“of”,We.of);var Ue={copyWithin:function(e,t){var n,r=ne.ToObject(this),i=ne.ToLength(r.length),o=ne.ToInteger(e),a=ne.ToInteger(t),s=0>o?I(i+o,0):M(o,i),u=0>a?I(i+a,0):M(a,i);arguments.length>2&&(n=arguments[2]);var c=“undefined”==typeof n?i:ne.ToInteger(n),l=0>c?I(i+c,0):M(c,i),f=M(l-u,i-s),p=1;for(s>u&&u+f>s&&(p=-1,u+=f-1,s+=f-1);f>0;)u in r?r[s]=r[u]:delete r[s],u+=p,s+=p,f-=1;return r},fill:function(e){var t;arguments.length>1&&(t=arguments[1]);var n;arguments.length>2&&(n=arguments[2]);var r=ne.ToObject(this),i=ne.ToLength(r.length);t=ne.ToInteger(“undefined”==typeof t?0:t),n=ne.ToInteger(“undefined”==typeof n?i:n);for(var o=0>t?I(i+t,0):M(t,i),a=0>n?i+n:n,s=o;i>s&&a>s;++s)r[s]=e;return r},find:function(e){var t=ne.ToObject(this),r=ne.ToLength(t.length);if(!ne.IsCallable(e))throw new TypeError(“Array#find: predicate must be a function”);for(var i,o=arguments.length>1?arguments[1]:null,a=0;r>a;a++)if(i=t[a],o){if(n(e,o,i,a,t))return i}else if(e(i,a,t))return i},findIndex:function(e){var t=ne.ToObject(this),r=ne.ToLength(t.length);if(!ne.IsCallable(e))throw new TypeError(“Array#findIndex: predicate must be a function”);for(var i=arguments.length>1?arguments[1]:null,o=0;r>o;o++)if(i){if(n(e,i,t[o],o,t))return o}else if(e(t[o],o,t))return o;return-1},keys:function(){return new e(this,“key”)},values:function(){return new e(this,“value”)},entries:function(){return new e(this,“entry”)}};if(Array.prototype.keys&&!ne.IsCallable([1].keys().next)&&delete Array.prototype.keys,Array.prototype.entries&&!ne.IsCallable([1].entries().next)&&delete Array.prototype.entries,Array.prototype.keys&&Array.prototype.entries&&!Array.prototype.values&&Array.prototype[K]&&(y(Array.prototype,{values:Array.prototype[K]}),Y.symbol(B.unscopables)&&(Array.prototype[B.unscopables].values=!0)),f&&Array.prototype.values&&“values”!==Array.prototype.values.name){var Ge=Array.prototype.values;Z(Array.prototype,“values”,function(){return ne.Call(Ge,this,arguments)}),g(Array.prototype,K,Array.prototype.values,!0)}y(Array.prototype,Ue),1/[!0].indexOf(!0,-0)<0&&g(Array.prototype,“indexOf”,function(){var e=C(this,arguments);return 0===e&&0>1/e?0:e},!0),xe(Array.prototype,function(){return this.values()}),Object.getPrototypeOf&&xe(Object.getPrototypeOf([].values()));var Xe=function(){return s(function(){return 0===Array.from({length:-1}).length})}(),Je=function(){var e=Array.from([0].entries());return 1===e.length&&r(e[0])&&0===e[0][0]&&0===e[0][1]}();Xe&&Je||Z(Array,“from”,We.from);var Ye=function(){return s(function(){return Array.from([0],void 0)})}();if(!Ye){var Ze=Array.from;Z(Array,“from”,function(e){return arguments.length>1&&“undefined”!=typeof arguments[1]?ne.Call(Ze,this,arguments):n(Ze,this,e)})}var Qe=-(Math.pow(2,32)-1),Ke=function(e,t){var r={length:Qe};return r[t?(r.length>>>0)-1:0]=!0,s(function(){return n(e,r,function(){throw new RangeError(“should not reach here”)},[]),!0})};if(!Ke(Array.prototype.forEach)){var et=Array.prototype.forEach;Z(Array.prototype,“forEach”,function(){return ne.Call(et,this.length>=0?this:[],arguments)},!0)}if(!Ke(Array.prototype.map)){var tt=Array.prototype.map;Z(Array.prototype,“map”,function(){return ne.Call(tt,this.length>=0?this:[],arguments)},!0)}if(!Ke(Array.prototype.filter)){var nt=Array.prototype.filter;Z(Array.prototype,“filter”,function(){return ne.Call(nt,this.length>=0?this:[],arguments)},!0)}if(!Ke(Array.prototype.some)){var rt=Array.prototype.some;Z(Array.prototype,“some”,function(){return ne.Call(rt,this.length>=0?this:[],arguments)},!0)}if(!Ke(Array.prototype.every)){var it=Array.prototype.every;Z(Array.prototype,“every”,function(){return ne.Call(it,this.length>=0?this:[],arguments)},!0)}if(!Ke(Array.prototype.reduce)){var ot=Array.prototype.reduce;Z(Array.prototype,“reduce”,function(){return ne.Call(ot,this.length>=0?this:[],arguments)},!0)}if(!Ke(Array.prototype.reduceRight,!0)){var at=Array.prototype.reduceRight;Z(Array.prototype,“reduceRight”,function(){return ne.Call(at,this.length>=0?this:[],arguments)},!0)}var st=8!==Number(“0o10”),ut=2!==Number(“0b10”),ct=m(qe,function(e){return 0===Number(e+0+e)});if(st||ut||ct){var lt=Number,ft=/^0b[01]+$/i,pt=/^0o[0-7]+$/i,dt=ft.test.bind(ft),ht=pt.test.bind(pt),mt=function(e){var t;if(“function”==typeof e.valueOf&&(t=e.valueOf(),Y.primitive(t)))return t;if(“function”==typeof e.toString&&(t=e.toString(),Y.primitive(t)))return t;throw new TypeError(“No default value”)},gt=Re.test.bind(Re),yt=He.test.bind(He),vt=function(){var e=function(t){var n;n=arguments.length>0?Y.primitive(t)?t:mt(t,“number”):0,“string”==typeof n&&(n=ne.Call(De,n),dt(n)?n=parseInt(E(n,2),2):ht(n)?n=parseInt(E(n,2),8):(gt(n)||yt(n))&&(n=0/0));var r=this,i=s(function(){return lt.prototype.valueOf.call(r),!0});return r instanceof e&&!i?new lt(n):lt(n)};return e}();ve(lt,vt,{}),y(vt,{NaN:lt.NaN,MAX_VALUE:lt.MAX_VALUE,MIN_VALUE:lt.MIN_VALUE,NEGATIVE_INFINITY:lt.NEGATIVE_INFINITY,POSITIVE_INFINITY:lt.POSITIVE_INFINITY}),Number=vt,w.redefine(O,“Number”,vt)}var bt=Math.pow(2,53)-1;y(Number,{MAX_SAFE_INTEGER:bt,MIN_SAFE_INTEGER:-bt,EPSILON:2.220446049250313e-16,parseInt:O.parseInt,parseFloat:O.parseFloat,isFinite:z,isInteger:function(e){return z(e)&&ne.ToInteger(e)===e},isSafeInteger:function(e){return Number.isInteger(e)&&F(e)<=Number.MAX_SAFE_INTEGER},isNaN:W}),g(Number,“parseInt”,O.parseInt,Number.parseInt!==O.parseInt),[,1].find(function(e,t){return 0===t})||Z(Array.prototype,“find”,Ue.find),0!==[,1].findIndex(function(e,t){return 0===t})&&Z(Array.prototype,“findIndex”,Ue.findIndex);var wt=Function.bind.call(Function.bind,Object.prototype.propertyIsEnumerable),xt=function(e,t){l&&wt(e,t)&&Object.defineProperty(e,t,{enumerable:!1})},Tt=function(){for(var e=Number(this),t=arguments.length,n=t-e,r=new Array(0>n?0:n),i=e;t>i;++i)r[i-e]=arguments[i];return r},St=function(e){return function(t,n){return t[n]=e[n],t}},Ot=function(e,t){var n,r=i(Object(t));return ne.IsCallable(Object.getOwnPropertySymbols)&&(n=h(Object.getOwnPropertySymbols(Object(t)),wt(t))),d(A(r,n||[]),St(t),e)},jt={assign:function(e){var t=ne.ToObject(e,“Cannot convert undefined or null to object”);return d(ne.Call(Tt,1,arguments),Ot,t)},is:function(e,t){return ne.SameValue(e,t)}},kt=Object.assign&&Object.preventExtensions&&function(){var e=Object.preventExtensions({1:2});try{Object.assign(e,“xy”)}catch(t){return”y”===e[1]}}();if(kt&&Z(Object,“assign”,jt.assign),y(Object,jt),l){var Ct={setPrototypeOf:function(e,t){var r,i=function(e,t){if(!ne.TypeIsObject(e))throw new TypeError(“cannot set prototype on a non-object”);if(null!==t&&!ne.TypeIsObject(t))throw new TypeError(“can only set prototype to an object or null”+t)},o=function(e,t){return i(e,t),n(r,e,t),e};try{r=e.getOwnPropertyDescriptor(e.prototype,t).set,n(r,{},null)}catch(n){if(e.prototype!=={}[t])return;r=function(e){this[t]=e},o.polyfill=o(o({},null),e.prototype)instanceof e}return o}(Object,“proto”)};y(Object,Ct)}Object.setPrototypeOf&&Object.getPrototypeOf&&null!==Object.getPrototypeOf(Object.setPrototypeOf({},null))&&null===Object.getPrototypeOf(Object.create(null))&&!function(){var e=Object.create(null),t=Object.getPrototypeOf,n=Object.setPrototypeOf;Object.getPrototypeOf=function(n){var r=t(n);return r===e?null:r},Object.setPrototypeOf=function(t,r){var i=null===r?e:r;return n(t,i)},Object.setPrototypeOf.polyfill=!1}();var At=!a(function(){Object.keys(“foo”)});if(!At){var Et=Object.keys;Z(Object,“keys”,function(e){return Et(ne.ToObject(e))}),i=Object.keys}var Nt=a(function(){Object.keys(/a/g)});if(Nt){var _t=Object.keys;Z(Object,“keys”,function(e){if(Y.regex(e)){var t=[];for(var n in e)H(e,n)&&N(t,n);return t}return _t(e)}),i=Object.keys}if(Object.getOwnPropertyNames){var Pt=!a(function(){Object.getOwnPropertyNames(“foo”)});if(!Pt){var It=“object”===(“undefined”==typeof window?“undefined”:typeof(window))?Object.getOwnPropertyNames(window):[],Mt=Object.getOwnPropertyNames;Z(Object,“getOwnPropertyNames”,function(e){var t=ne.ToObject(e);if(“[object Window]“===v(t))try{return Mt(t)}catch(e){return A([],It)}return Mt(t)})}}if(Object.getOwnPropertyDescriptor){var Lt=!a(function(){Object.getOwnPropertyDescriptor(“foo”,“bar”)});if(!Lt){var Ft=Object.getOwnPropertyDescriptor;Z(Object,“getOwnPropertyDescriptor”,function(e,t){return Ft(ne.ToObject(e),t)})}}if(Object.seal){var Dt=!a(function(){Object.seal(“foo”)});if(!Dt){var qt=Object.seal;Z(Object,“seal”,function(e){return ne.TypeIsObject(e)?qt(e):e})}}if(Object.isSealed){var Rt=!a(function(){Object.isSealed(“foo”)});if(!Rt){var Ht=Object.isSealed;Z(Object,“isSealed”,function(e){return ne.TypeIsObject(e)?Ht(e):!0})}}if(Object.freeze){var $t=!a(function(){Object.freeze(“foo”)});if(!$t){var Bt=Object.freeze;Z(Object,“freeze”,function(e){return ne.TypeIsObject(e)?Bt(e):e})}}if(Object.isFrozen){var Vt=!a(function(){Object.isFrozen(“foo”)});if(!Vt){var Wt=Object.isFrozen;Z(Object,“isFrozen”,function(e){return ne.TypeIsObject(e)?Wt(e):!0})}}if(Object.preventExtensions){var zt=!a(function(){Object.preventExtensions(“foo”)});if(!zt){var Ut=Object.preventExtensions;Z(Object,“preventExtensions”,function(e){return ne.TypeIsObject(e)?Ut(e):e})}}if(Object.isExtensible){var Gt=!a(function(){Object.isExtensible(“foo”)});if(!Gt){var Xt=Object.isExtensible;Z(Object,“isExtensible”,function(e){return ne.TypeIsObject(e)?Xt(e):!1})}}if(Object.getPrototypeOf){var Jt=!a(function(){Object.getPrototypeOf(“foo”)});if(!Jt){var Yt=Object.getPrototypeOf;Z(Object,“getPrototypeOf”,function(e){return Yt(ne.ToObject(e))})}}var Zt=l&&function(){var e=Object.getOwnPropertyDescriptor(RegExp.prototype,“flags”);return e&&ne.IsCallable(e.get)}();if(l&&!Zt){var Qt=function(){if(!ne.TypeIsObject(this))throw new TypeError(“Method called on incompatible type: must be an object.”);var e="";return this.global&&(e+=“g”),this.ignoreCase&&(e+=“i”),this.multiline&&(e+=“m”),this.unicode&&(e+=“u”),this.sticky&&(e+=“y”),e};w.getter(RegExp.prototype,“flags”,Qt)}var Kt=l&&s(function(){return”/a/i”===String(new RegExp(/a/g,“i”))}),en=Q&&l&&function(){var e=/./;return e[B.match]=!1,RegExp(e)===e}(),tn=s(function(){return”/abc/“===RegExp.prototype.toString.call({source:“abc”})}),nn=tn&&s(function(){return”/a/b”===RegExp.prototype.toString.call({source:“a”,flags:“b”})});if(!tn||!nn){var rn=RegExp.prototype.toString;g(RegExp.prototype,“toString”,function(){var e=ne.RequireObjectCoercible(this);if(Y.regex(e))return n(rn,e);var t=te(e.source),r=te(e.flags);return”/“+t+”/“+r},!0),w.preserveToString(RegExp.prototype.toString,rn)}if(l&&(!Kt||en)){var on=Object.getOwnPropertyDescriptor(RegExp.prototype,“flags”).get,an=Object.getOwnPropertyDescriptor(RegExp.prototype,“source”)||{},sn=function(){return this.source},un=ne.IsCallable(an.get)?an.get:sn,cn=RegExp,ln=function(){return function e(t,n){var r=ne.IsRegExp(t),i=this instanceof e;if(!i&&r&&“undefined”==typeof n&&t.constructor===e)return t;var o=t,a=n;return Y.regex(t)?(o=ne.Call(un,t),a=“undefined”==typeof n?ne.Call(on,t):n,new e(o,a)):(r&&(o=t.source,a=“undefined”==typeof n?t.flags:n),new cn(t,n))}}();ve(cn,ln,{$input:!0}),RegExp=ln,w.redefine(O,“RegExp”,ln)}if(l){var fn={input:”$“,lastMatch:”$&“,lastParen:”$+“,leftContext:”$`“,rightContext:”$’”};p(i(fn),function(e){e in RegExp&&!(fn[e]in RegExp)&&w.getter(RegExp,fn[e],function(){return RegExp[e]})})}we(RegExp);var pn=1/Number.EPSILON,dn=function(e){return e+pn-pn},hn=Math.pow(2,-23),mn=Math.pow(2,127)(2-hn),gn=Math.pow(2,-126),yn=Math.E,vn=Math.LOG2E,bn=Math.LOG10E,wn=Number.prototype.clz;delete Number.prototype.clz;var xn={acosh:function(e){var t=Number(e);return W(t)||1>e?0/0:1===t?0:t===1/0?t:q(t/yn+R(t+1)R(t-1)/yn)+1},asinh:function e(t){var n=Number(t);return 0!==n&&j(n)?0>n?-e(-n):q(n+R(nn+1)):n},atanh:function(e){var t=Number(e);return W(t)||-1>t||t>1?0/0:-1===t?-(1/0):1===t?1/0:0===t?t:.5q((1+t)/(1-t))},cbrt:function(e){var t=Number(e);if(0===t)return t;var n,r=0>t;return r&&(t=-t),t===1/0?n=1/0:(n=D(q(t)/3),n=(t/(nn)+2n)/3),r?-n:n},clz32:function(e){var t=Number(e),n=ne.ToUint32(t);return 0===n?32:wn?ne.Call(wn,n):31-L(q(n+.5)vn)},cosh:function(e){var t=Number(e);return 0===t?1:W(t)?0/0:j(t)?(0>t&&(t=-t),t>21?D(t)/2:(D(t)+D(-t))/2):1/0},expm1:function(e){var t=Number(e);if(t===-(1/0))return-1;if(!j(t)||0===t)return t;if(F(t)>.5)return D(t)-1;for(var n=t,r=0,i=1;r+n!==r;)r+=n,i+=1,n=t/i;return r},hypot:function(){for(var e=0,t=0,n=0;n<arguments.length;++n){var r=F(Number(arguments[n]));r>t?(e=t/r*(t/r),e+=1,t=r):e+=r>0?r/t*(r/t):r}return t===1/0?1/0:tR(e)},log2:function(e){return q(e)vn},log10:function(e){return q(e)bn},log1p:function(e){var t=Number(e);return-1>t||W(t)?0/0:0===t||t===1/0?t:-1===t?-(1/0):1+t-1===0?t:t(q(1+t)/(1+t-1))},sign:U,sinh:function(e){var t=Number(e);return j(t)&&0!==t?F(t)<1?(Math.expm1(t)-Math.expm1(-t))/2:(D(t-1)-D(-t-1))yn/2:t},tanh:function(e){var t=Number(e);return W(t)||0===t?t:t>=20?1:-20>=t?-1:(Math.expm1(t)-Math.expm1(-t))/(D(t)+D(-t))},trunc:function(e){var t=Number(e);return 0>t?-L(-t):L(t)},imul:function(e,t){var n=ne.ToUint32(e),r=ne.ToUint32(t),i=n>>>16&65535,o=65535&n,a=r>>>16&65535,s=65535&r;return os+(is+oa<<16>>>0)|0},fround:function(e){var t=Number(e);if(0===t||t===1/0||t===-(1/0)||W(t))return t;var n=U(t),r=F(t);if(gn>r)return ndn(r/gn/hn)gnhn;var i=(1+hn/Number.EPSILON)r,o=i-(i-r);return o>mn||W(o)?n(1/0):no}};y(Math,xn),g(Math,“log1p”,xn.log1p,-1e-17!==Math.log1p(-1e-17)),g(Math,“asinh”,xn.asinh,Math.asinh(-1e7)!==-Math.asinh(1e7)),g(Math,“tanh”,xn.tanh,-2e-17!==Math.tanh(-2e-17)),g(Math,“acosh”,xn.acosh,Math.acosh(Number.MAX_VALUE)===1/0),g(Math,“cbrt”,xn.cbrt,Math.abs(1-Math.cbrt(1e-300)/1e-100)/Number.EPSILON>8),g(Math,“sinh”,xn.sinh,-2e-17!==Math.sinh(-2e-17));var Tn=Math.expm1(10);g(Math,“expm1”,xn.expm1,Tn>22025.465794806718||22025.465794806718>Tn);var Sn=Math.round,On=0===Math.round(.5-Number.EPSILON/4)&&1===Math.round(-.5+Number.EPSILON/3.99),jn=pn+1,kn=2pn-1,Cn=[jn,kn].every(function(e){return Math.round(e)===e});g(Math,“round”,function(e){var t=L(e),n=-1===t?-0:t+1;return.5>e-t?t:n},!On||!Cn),w.preserveToString(Math.round,Sn);var An=Math.imul;-5!==Math.imul(4294967295,5)&&(Math.imul=xn.imul,w.preserveToString(Math.imul,An)),2!==Math.imul.length&&Z(Math,“imul”,function(){return ne.Call(An,Math,arguments)});var En=function(){var e=O.setTimeout;if(“function”==typeof e||“object”===(“undefined”==typeof e?“undefined”:_typeof(e))){ne.IsPromise=function(e){return ne.TypeIsObject(e)?“undefined”==typeof e._promise?!1:!0:!1};var t,r=function(e){if(!ne.IsConstructor(e))throw new TypeError(“Bad promise constructor”);var t=this,n=function(e,n){if(void 0!==t.resolve||void 0!==t.reject)throw new TypeError(“Bad Promise implementation!”);t.resolve=e,t.reject=n};if(t.resolve=void 0,t.reject=void 0,t.promise=new e(n),!ne.IsCallable(t.resolve)||!ne.IsCallable(t.reject))throw new TypeError(“Bad promise constructor”)};“undefined”!=typeof window&&ne.IsCallable(window.postMessage)&&(t=function(){var e=[],t=“zero-timeout-message”,n=function(n){N(e,n),window.postMessage(t,"")},r=function(n){if(n.source===window&&n.data===t){if(n.stopPropagation(),0===e.length)return;var r=P(e);r()}};return window.addEventListener(“message”,r,!0),n});var i,o,a=function(){var e=O.Promise,t=e&&e.resolve&&e.resolve();return t&&function(e){return t.then(e)}},s=ne.IsCallable(O.setImmediate)?O.setImmediate:“object”===(“undefined”==typeof process?“undefined”:_typeof(process))&&process.nextTick?process.nextTick:a()||(ne.IsCallable(t)?t():function(t){e(t,0)}),u=function(e){return e},c=function(e){throw e},l=0,f=1,p=2,d=0,h=1,m=2,g={},v=function(e,t,n){s(function(){b(e,t,n)})},b=function(e,t,n){var r,i;if(t===g)return e(n);try{r=e(n),i=t.resolve}catch(e){r=e,i=t.reject}i(r)},w=function(e,t){var n=e._promise,r=n.reactionLength;if(r>0&&(v(n.fulfillReactionHandler0,n.reactionCapability0,t),n.fulfillReactionHandler0=void 0,n.rejectReactions0=void 0,n.reactionCapability0=void 0,r>1))for(var i=1,o=0;r>i;i++,o+=3)v(n[o+d],n[o+m],t),e[o+d]=void 0,e[o+h]=void 0,e[o+m]=void 0;n.result=t,n.state=f,n.reactionLength=0},x=function(e,t){var n=e._promise,r=n.reactionLength;if(r>0&&(v(n.rejectReactionHandler0,n.reactionCapability0,t),n.fulfillReactionHandler0=void 0,n.rejectReactions0=void 0,n.reactionCapability0=void 0,r>1))for(var i=1,o=0;r>i;i++,o+=3)v(n[o+h],n[o+m],t),e[o+d]=void 0,e[o+h]=void 0,e[o+m]=void 0;n.result=t,n.state=p,n.reactionLength=0},T=function(e){var t=!1,n=function(n){var r;if(!t){if(t=!0,n===e)return x(e,new TypeError(“Self resolution”));if(!ne.TypeIsObject(n))return w(e,n);try{r=n.then}catch(t){return x(e,t)}return ne.IsCallable(r)?void s(function(){j(e,n,r)}):w(e,n)}},r=function(n){return t?void 0:(t=!0,x(e,n))};return{resolve:n,reject:r}},S=function(e,t,r,i){e===o?n(e,t,r,i,g):n(e,t,r,i)},j=function(e,t,n){var r=T(e),i=r.resolve,o=r.reject;try{S(n,t,i,o)}catch(e){o(e)}},k=function(){var e=function(t){if(!(this instanceof e))throw new TypeError(‘Constructor Promise requires “new”’);
if(this&&this._promise)throw new TypeError(“Bad construction”);if(!ne.IsCallable(t))throw new TypeError(“not a valid resolver”);var n=Oe(this,e,i,{_promise:{result:void 0,state:l,reactionLength:0,fulfillReactionHandler0:void 0,rejectReactionHandler0:void 0,reactionCapability0:void 0}}),r=T(n),o=r.reject;try{t(r.resolve,o)}catch(e){o(e)}return n};return e}();i=k.prototype;var C=function(e,t,n,r){var i=!1;return function(o){if(!i&&(i=!0,t[e]=o,0===—r.count)){var a=n.resolve;a(t)}}},A=function(e,t,n){for(var r,i,o=e.iterator,a=[],s={count:1},u=0;;){try{if(r=ne.IteratorStep(o),r===!1){e.done=!0;break}i=r.value}catch(t){throw e.done=!0,t}a[u]=void 0;var c=t.resolve(i),l=C(u,a,n,s);s.count+=1,S(c.then,c,l,n.reject),u+=1}if(0===—s.count){var f=n.resolve;f(a)}return n.promise},E=function(e,t,n){for(var r,i,o,a=e.iterator;;){try{if(r=ne.IteratorStep(a),r===!1){e.done=!0;break}i=r.value}catch(t){throw e.done=!0,t}o=t.resolve(i),S(o.then,o,n.resolve,n.reject)}return n.promise};return y(k,{all:function(e){var t=this;if(!ne.TypeIsObject(t))throw new TypeError(“Promise is not object”);var n,i,o=new r(t);try{return n=ne.GetIterator(e),i={iterator:n,done:!1},A(i,t,o)}catch(e){var a=e;if(i&&!i.done)try{ne.IteratorClose(n,!0)}catch(e){a=e}var s=o.reject;return s(a),o.promise}},race:function(e){var t=this;if(!ne.TypeIsObject(t))throw new TypeError(“Promise is not object”);var n,i,o=new r(t);try{return n=ne.GetIterator(e),i={iterator:n,done:!1},E(i,t,o)}catch(e){var a=e;if(i&&!i.done)try{ne.IteratorClose(n,!0)}catch(e){a=e}var s=o.reject;return s(a),o.promise}},reject:function(e){var t=this;if(!ne.TypeIsObject(t))throw new TypeError(“Bad promise constructor”);var n=new r(t),i=n.reject;return i(e),n.promise},resolve:function(e){var t=this;if(!ne.TypeIsObject(t))throw new TypeError(“Bad promise constructor”);if(ne.IsPromise(e)){var n=e.constructor;if(n===t)return e}var i=new r(t),o=i.resolve;return o(e),i.promise}}),y(i,{catch:function(e){return this.then(null,e)},then:function(e,t){var n=this;if(!ne.IsPromise(n))throw new TypeError(“not a promise”);var i,o=ne.SpeciesConstructor(n,k),a=arguments.length>2&&arguments[2]===g;i=a&&o===k?g:new r(o);var s,y=ne.IsCallable(e)?e:u,b=ne.IsCallable(t)?t:c,w=n._promise;if(w.state===l){if(0===w.reactionLength)w.fulfillReactionHandler0=y,w.rejectReactionHandler0=b,w.reactionCapability0=i;else{var x=3*(w.reactionLength-1);w[x+d]=y,w[x+h]=b,w[x+m]=i}w.reactionLength+=1}else if(w.state===f)s=w.result,v(y,i,s);else{if(w.state!==p)throw new TypeError(“unexpected Promise state”);s=w.result,v(b,i,s)}return i.promise}}),g=new r(k),o=i.then,k}}();if(O.Promise&&(delete O.Promise.accept,delete O.Promise.defer,delete O.Promise.prototype.chain),“function”==typeof En){y(O,{Promise:En});var Nn=T(O.Promise,function(e){return e.resolve(42).then(function(){})instanceof e}),_n=!a(function(){O.Promise.reject(42).then(null,5).then(null,$)}),Pn=a(function(){O.Promise.call(3,$)}),In=function(e){var t=e.resolve(5);t.constructor={};var n=e.resolve(t);try{n.then(null,$).then(null,$)}catch(e){return!0}return t===n}(O.Promise),Mn=l&&function(){var e=0,t=Object.defineProperty({},“then”,{get:function(){e+=1}});return Promise.resolve(t),1===e}(),Ln=function e(t){var n=new Promise(t);t(3,function(){}),this.then=n.then,this.constructor=e};Ln.prototype=Promise.prototype,Ln.all=Promise.all;var Fn=s(function(){return!!Ln.all([1,2])});if(Nn&&_n&&Pn&&!In&&Mn&&!Fn||(Promise=En,Z(O,“Promise”,En)),1!==Promise.all.length){var Dn=Promise.all;Z(Promise,“all”,function(){return ne.Call(Dn,this,arguments)})}if(1!==Promise.race.length){var qn=Promise.race;Z(Promise,“race”,function(){return ne.Call(qn,this,arguments)})}if(1!==Promise.resolve.length){var Rn=Promise.resolve;Z(Promise,“resolve”,function(){return ne.Call(Rn,this,arguments)})}if(1!==Promise.reject.length){var Hn=Promise.reject;Z(Promise,“reject”,function(){return ne.Call(Hn,this,arguments)})}xt(Promise,“all”),xt(Promise,“race”),xt(Promise,“resolve”),xt(Promise,“reject”),we(Promise)}var $n=function(e){var t=i(d(e,function(e,t){return e[t]=!0,e},{}));return e.join(”:”)===t.join(”:”)},Bn=$n([“z”,“a”,“bb”]),Vn=$n([“z”,1,“a”,“3”,2]);if(l){var Wn=function(e){return Bn?“undefined”==typeof e||null===e?”^“+ne.ToString(e):“string”==typeof e?”$“+e:“number”==typeof e?Vn?e:“n”+e:“boolean”==typeof e?“b”+e:null:null},zn=function(){return Object.create?Object.create(null):{}},Un=function(e,t,i){if(r(i)||Y.string(i))p(i,function(e){if(!ne.TypeIsObject(e))throw new TypeError(“Iterator value “+e+” is not an entry object”);t.set(e[0],e[1])});else if(i instanceof e)n(e.prototype.forEach,i,function(e,n){t.set(n,e)});else{var o,a;if(null!==i&&“undefined”!=typeof i){if(a=t.set,!ne.IsCallable(a))throw new TypeError(“bad map”);o=ne.GetIterator(i)}if(“undefined”!=typeof o)for(;;){var s=ne.IteratorStep(o);if(s===!1)break;var u=s.value;try{if(!ne.TypeIsObject(u))throw new TypeError(“Iterator value “+u+” is not an entry object”);n(a,t,u[0],u[1])}catch(e){throw ne.IteratorClose(o,!0),e}}}},Gn=function(e,t,i){if(r(i)||Y.string(i))p(i,function(e){t.add(e)});else if(i instanceof e)n(e.prototype.forEach,i,function(e){t.add(e)});else{var o,a;if(null!==i&&“undefined”!=typeof i){if(a=t.add,!ne.IsCallable(a))throw new TypeError(“bad set”);o=ne.GetIterator(i)}if(“undefined”!=typeof o)for(;;){var s=ne.IteratorStep(o);if(s===!1)break;var u=s.value;try{n(a,t,u)}catch(e){throw ne.IteratorClose(o,!0),e}}}},Xn={Map:function(){var e={},t=function(e,t){this.key=e,this.value=t,this.next=null,this.prev=null};t.prototype.isRemoved=function(){return this.key===e};var r=function(e){return!!e._es6map},i=function(e,t){if(!ne.TypeIsObject(e)||!r(e))throw new TypeError(“Method Map.prototype.”+t+” called on incompatible receiver “+ne.ToString(e))},o=function(e,t){i(e,“[[MapIterator]]”),this.head=e._head,this.i=this.head,this.kind=t};o.prototype={next:function(){var e=this.i,t=this.kind,n=this.head;if(“undefined”==typeof this.i)return Be();for(;e.isRemoved()&&e!==n;)e=e.prev;for(var r;e.next!==n;)if(e=e.next,!e.isRemoved())return r=“key”===t?e.key:“value”===t?e.value:[e.key,e.value],this.i=e,Be(r);return this.i=void 0,Be()}},xe(o.prototype);var a,s=function e(){if(!(this instanceof e))throw new TypeError(‘Constructor Map requires “new”’);if(this&&this._es6map)throw new TypeError(“Bad construction”);var n=Oe(this,e,a,{_es6map:!0,_head:null,_storage:zn(),_size:0}),r=new t(null,null);return r.next=r.prev=r,n._head=r,arguments.length>0&&Un(e,n,arguments[0]),n};return a=s.prototype,w.getter(a,“size”,function(){if(“undefined”==typeof this._size)throw new TypeError(“size method called on incompatible Map”);return this._size}),y(a,{get:function(e){i(this,“get”);var t=Wn(e);if(null!==t){var n=this._storage[t];return n?n.value:void 0}for(var r=this._head,o=r;(o=o.next)!==r;)if(ne.SameValueZero(o.key,e))return o.value},has:function(e){i(this,“has”);var t=Wn(e);if(null!==t)return”undefined”!=typeof this._storage[t];for(var n=this._head,r=n;(r=r.next)!==n;)if(ne.SameValueZero(r.key,e))return!0;return!1},set:function(e,n){i(this,“set”);var r,o=this._head,a=o,s=Wn(e);if(null!==s){if(“undefined”!=typeof this._storage[s])return this._storage[s].value=n,this;r=this._storage[s]=new t(e,n),a=o.prev}for(;(a=a.next)!==o;)if(ne.SameValueZero(a.key,e))return a.value=n,this;return r=r||new t(e,n),ne.SameValue(-0,e)&&(r.key=0),r.next=this._head,r.prev=this._head.prev,r.prev.next=r,r.next.prev=r,this._size+=1,this},delete:function(t){i(this,“delete”);var n=this._head,r=n,o=Wn(t);if(null!==o){if(“undefined”==typeof this._storage[o])return!1;r=this._storage[o].prev,delete this._storage[o]}for(;(r=r.next)!==n;)if(ne.SameValueZero(r.key,t))return r.key=r.value=e,r.prev.next=r.next,r.next.prev=r.prev,this._size-=1,!0;return!1},clear:function(){i(this,“clear”),this._size=0,this._storage=zn();for(var t=this._head,n=t,r=n.next;(n=r)!==t;)n.key=n.value=e,r=n.next,n.next=n.prev=t;t.next=t.prev=t},keys:function(){return i(this,“keys”),new o(this,“key”)},values:function(){return i(this,“values”),new o(this,“value”)},entries:function(){return i(this,“entries”),new o(this,“key+value”)},forEach:function(e){i(this,“forEach”);for(var t=arguments.length>1?arguments[1]:null,r=this.entries(),o=r.next();!o.done;o=r.next())t?n(e,t,o.value[1],o.value[0],this):e(o.value[1],o.value[0],this)}}),xe(a,a.entries),s}(),Set:function(){var e,t=function(e){return e._es6set&&“undefined”!=typeof e._storage},r=function(e,n){if(!ne.TypeIsObject(e)||!t(e))throw new TypeError(“Set.prototype.”+n+” called on incompatible receiver “+ne.ToString(e))},o=function t(){if(!(this instanceof t))throw new TypeError(‘Constructor Set requires “new”’);if(this&&this._es6set)throw new TypeError(“Bad construction”);var n=Oe(this,t,e,{_es6set:!0,“[[SetData]]“:null,_storage:zn()});if(!n._es6set)throw new TypeError(“bad set”);return arguments.length>0&&Gn(t,n,arguments[0]),n};e=o.prototype;var a=function(e){var t=e;if(“^null”===t)return null;if(“^undefined”===t)return void 0;var n=t.charAt(0);return”$“===n?E(t,1):“n”===n?+E(t,1):“b”===n?“btrue”===t:+t},s=function(e){if(!e[“[[SetData]]”]){var t=e[“[[SetData]]”]=new Xn.Map;p(i(e._storage),function(e){var n=a(e);t.set(n,n)}),e[“[[SetData]]”]=t}e._storage=null};return w.getter(o.prototype,“size”,function(){return r(this,“size”),this._storage?i(this._storage).length:(s(this),this[“[[SetData]]“].size)}),y(o.prototype,{has:function(e){r(this,“has”);var t;return this._storage&&null!==(t=Wn(e))?!!this._storage[t]:(s(this),this[“[[SetData]]“].has(e))},add:function(e){r(this,“add”);var t;return this._storage&&null!==(t=Wn(e))?(this._storage[t]=!0,this):(s(this),this[“[[SetData]]“].set(e,e),this)},delete:function(e){r(this,“delete”);var t;if(this._storage&&null!==(t=Wn(e))){var n=H(this._storage,t);return delete this._storage[t]&&n}return s(this),this[“[[SetData]]“].delete(e)},clear:function(){r(this,“clear”),this._storage&&(this.storage=zn()),this[“[[SetData]]”]&&this[“[[SetData]]“].clear()},values:function(){return r(this,“values”),s(this),this[“[[SetData]]“].values()},entries:function(){return r(this,“entries”),s(this),this[“[[SetData]]“].entries()},forEach:function(e){r(this,“forEach”);var t=arguments.length>1?arguments[1]:null,i=this;s(i),this[“[[SetData]]“].forEach(function(r,o){t?n(e,t,o,o,i):e(o,o,i)})}}),g(o.prototype,“keys”,o.prototype.values,!0),xe(o.prototype,o.prototype.values),o}()};if(O.Map||O.Set){var Jn=s(function(){return 2===new Map([[1,2]]).get(1)});if(!Jn){var Yn=O.Map;O.Map=function e(){if(!(this instanceof e))throw new TypeError(‘Constructor Map requires “new”’);var t=new Yn;return arguments.length>0&&Un(e,t,arguments[0]),delete t.constructor,Object.setPrototypeOf(t,O.Map.prototype),t},O.Map.prototype=x(Yn.prototype),g(O.Map.prototype,“constructor”,O.Map,!0),w.preserveToString(O.Map,Yn)}var Zn=new Map,Qn=function(){var e=new Map([[1,0],[2,0],[3,0],[4,0]]);return e.set(-0,e),e.get(0)===e&&e.get(-0)===e&&e.has(0)&&e.has(-0)}(),Kn=Zn.set(1,2)===Zn;if(!Qn||!Kn){var er=Map.prototype.set;Z(Map.prototype,“set”,function(e,t){return n(er,this,0===e?0:e,t),this})}if(!Qn){var tr=Map.prototype.get,nr=Map.prototype.has;y(Map.prototype,{get:function(e){return n(tr,this,0===e?0:e)},has:function(e){return n(nr,this,0===e?0:e)}},!0),w.preserveToString(Map.prototype.get,tr),w.preserveToString(Map.prototype.has,nr)}var rr=new Set,ir=function(e){return e.delete(0),e.add(-0),!e.has(0)}(rr),or=rr.add(1)===rr;if(!ir||!or){var ar=Set.prototype.add;Set.prototype.add=function(e){return n(ar,this,0===e?0:e),this},w.preserveToString(Set.prototype.add,ar)}if(!ir){var sr=Set.prototype.has;Set.prototype.has=function(e){return n(sr,this,0===e?0:e)},w.preserveToString(Set.prototype.has,sr);var ur=Set.prototype.delete;Set.prototype.delete=function(e){return n(ur,this,0===e?0:e)},w.preserveToString(Set.prototype.delete,ur)}var cr=T(O.Map,function(e){var t=new e([]);return t.set(42,42),t instanceof e}),lr=Object.setPrototypeOf&&!cr,fr=function(){try{return!(O.Map()instanceof O.Map)}catch(e){return e instanceof TypeError}}();if(0!==O.Map.length||lr||!fr){var pr=O.Map;O.Map=function e(){if(!(this instanceof e))throw new TypeError(‘Constructor Map requires “new”’);var t=new pr;return arguments.length>0&&Un(e,t,arguments[0]),delete t.constructor,Object.setPrototypeOf(t,e.prototype),t},O.Map.prototype=pr.prototype,g(O.Map.prototype,“constructor”,O.Map,!0),w.preserveToString(O.Map,pr)}var dr=T(O.Set,function(e){var t=new e([]);return t.add(42,42),t instanceof e}),hr=Object.setPrototypeOf&&!dr,mr=function(){try{return!(O.Set()instanceof O.Set)}catch(e){return e instanceof TypeError}}();if(0!==O.Set.length||hr||!mr){var gr=O.Set;O.Set=function e(){if(!(this instanceof e))throw new TypeError(‘Constructor Set requires “new”’);var t=new gr;return arguments.length>0&&Gn(e,t,arguments[0]),delete t.constructor,Object.setPrototypeOf(t,e.prototype),t},O.Set.prototype=gr.prototype,g(O.Set.prototype,“constructor”,O.Set,!0),w.preserveToString(O.Set,gr)}var yr=new O.Map,vr=!s(function(){return yr.keys().next().done});if((“function”!=typeof O.Map.prototype.clear||0!==(new O.Set).size||0!==yr.size||“function”!=typeof O.Map.prototype.keys||“function”!=typeof O.Set.prototype.keys||“function”!=typeof O.Map.prototype.forEach||“function”!=typeof O.Set.prototype.forEach||u(O.Map)||u(O.Set)||“function”!=typeof yr.keys().next||vr||!cr)&&y(O,{Map:Xn.Map,Set:Xn.Set},!0),O.Set.prototype.keys!==O.Set.prototype.values&&g(O.Set.prototype,“keys”,O.Set.prototype.values,!0),xe(Object.getPrototypeOf((new O.Map).keys())),xe(Object.getPrototypeOf((new O.Set).keys())),f&&“has”!==O.Set.prototype.has.name){var br=O.Set.prototype.has;Z(O.Set.prototype,“has”,function(e){return n(br,this,e)})}}y(O,Xn),we(O.Map),we(O.Set)}var wr=function(e){if(!ne.TypeIsObject(e))throw new TypeError(“target must be an object”)},xr={apply:function(){return ne.Call(ne.Call,null,arguments)},construct:function(e,t){if(!ne.IsConstructor(e))throw new TypeError(“First argument must be a constructor.”);var n=arguments.length>2?arguments[2]:e;if(!ne.IsConstructor(n))throw new TypeError(“new.target must be a constructor.”);return ne.Construct(e,t,n,“internal”)},deleteProperty:function(e,t){if(wr(e),l){var n=Object.getOwnPropertyDescriptor(e,t);if(n&&!n.configurable)return!1}return delete e[t]},has:function(e,t){return wr(e),t in e}};Object.getOwnPropertyNames&&Object.assign(xr,{ownKeys:function(e){wr(e);var t=Object.getOwnPropertyNames(e);return ne.IsCallable(Object.getOwnPropertySymbols)&&(t,Object.getOwnPropertySymbols(e)),t}});var Tr=function(e){return!a(e)};if(Object.preventExtensions&&Object.assign(xr,{isExtensible:function(e){return wr(e),Object.isExtensible(e)},preventExtensions:function(e){return wr(e),Tr(function(){Object.preventExtensions(e)})}}),l){var Sr=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);if(!r){var i=Object.getPrototypeOf(e);return null===i?void 0:Sr(i,t,n)}return”value”in r?r.value:r.get?ne.Call(r.get,n):void 0},Or=function(e,t,r,i){var o=Object.getOwnPropertyDescriptor(e,t);if(!o){var a=Object.getPrototypeOf(e);if(null!==a)return Or(a,t,r,i);o={value:void 0,writable:!0,enumerable:!0,configurable:!0}}if(“value”in o){if(!o.writable)return!1;if(!ne.TypeIsObject(i))return!1;var s=Object.getOwnPropertyDescriptor(i,t);return s?ee.defineProperty(i,t,{value:r}):ee.defineProperty(i,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}return o.set?(n(o.set,i,r),!0):!1};Object.assign(xr,{defineProperty:function(e,t,n){return wr(e),Tr(function(){Object.defineProperty(e,t,n)})},getOwnPropertyDescriptor:function(e,t){return wr(e),Object.getOwnPropertyDescriptor(e,t)},get:function(e,t){wr(e);var n=arguments.length>2?arguments[2]:e;return Sr(e,t,n)},set:function(e,t,n){wr(e);var r=arguments.length>3?arguments[3]:e;return Or(e,t,n,r)}})}if(Object.getPrototypeOf){var jr=Object.getPrototypeOf;xr.getPrototypeOf=function(e){return wr(e),jr(e)}}if(Object.setPrototypeOf&&xr.getPrototypeOf){var kr=function(e,t){for(var n=t;n;){if(e===n)return!0;n=xr.getPrototypeOf(n)}return!1};Object.assign(xr,{setPrototypeOf:function(e,t){if(wr(e),null!==t&&!ne.TypeIsObject(t))throw new TypeError(“proto must be an object or null”);return t===ee.getPrototypeOf(e)?!0:ee.isExtensible&&!ee.isExtensible(e)?!1:kr(e,t)?!1:(Object.setPrototypeOf(e,t),!0)}})}var Cr=function(e,t){if(ne.IsCallable(O.Reflect[e])){var n=s(function(){return O.Reflecte,O.Reflecte,O.Reflecte,!0});n&&Z(O.Reflect,e,t)}else g(O.Reflect,e,t)};Object.keys(xr).forEach(function(e){Cr(e,xr[e])});var Ar=O.Reflect.getPrototypeOf;if(f&&Ar&&“getPrototypeOf”!==Ar.name&&Z(O.Reflect,“getPrototypeOf”,function(e){return n(Ar,O.Reflect,e)}),O.Reflect.setPrototypeOf&&s(function(){return O.Reflect.setPrototypeOf(1,{}),!0})&&Z(O.Reflect,“setPrototypeOf”,xr.setPrototypeOf),O.Reflect.defineProperty&&(s(function(){var e=!O.Reflect.defineProperty(1,“test”,{value:1}),t=“function”!=typeof Object.preventExtensions||!O.Reflect.defineProperty(Object.preventExtensions({}),“test”,{});return e&&t})||Z(O.Reflect,“defineProperty”,xr.defineProperty)),O.Reflect.construct&&(s(function(){var e=function(){};return O.Reflect.construct(function(){},[],e)instanceof e})||Z(O.Reflect,“construct”,xr.construct)),“Invalid Date”!==String(new Date(0/0))){var Er=Date.prototype.toString,Nr=function(){var e=+this;return e!==e?”Invalid Date”:ne.Call(Er,this)};Z(Date.prototype,“toString”,Nr)}var _r={anchor:function(e){return ne.CreateHTML(this,“a”,“name”,e)},big:function(){return ne.CreateHTML(this,“big”,"","")},blink:function(){return ne.CreateHTML(this,“blink”,"","")},bold:function(){return ne.CreateHTML(this,“b”,"","")},fixed:function(){return ne.CreateHTML(this,“tt”,"","")},fontcolor:function(e){return ne.CreateHTML(this,“font”,“color”,e)},fontsize:function(e){return ne.CreateHTML(this,“font”,“size”,e)},italics:function(){return ne.CreateHTML(this,“i”,"","")},link:function(e){return ne.CreateHTML(this,“a”,“href”,e)},small:function(){return ne.CreateHTML(this,“small”,"","")},strike:function(){return ne.CreateHTML(this,“strike”,"","")},sub:function(){return ne.CreateHTML(this,“sub”,"","")},sup:function(){return ne.CreateHTML(this,“sup”,"","")}};p(Object.keys(_r),function(e){var t=String.prototype[e],r=!1;if(ne.IsCallable(t)){var i=n(t,"",’ ” ’),o=A([],i.match(/“/g)).length;r=i!==i.toLowerCase()||o>2}else r=!0;r&&Z(String.prototype,e,_r[e])});var Pr=function(){if(!Q)return!1;var e=“object”===(“undefined”==typeof JSON?“undefined”:typeof(JSON))&&“function”==typeof JSON.stringify?JSON.stringify:null;if(!e)return!1;if(“undefined”!=typeof e(B()))return!0;if(“[null]”!==e([B()]))return!0;var t={a:B()};return t[B()]=!0,”{}”!==e(t)?!0:!1}(),Ir=s(function(){return Q?”{}“===JSON.stringify(Object(B()))&&”[{}]“===JSON.stringify([Object(B())]):!0});if(Pr||!Ir){var Mr=JSON.stringify;Z(JSON,“stringify”,function(e){if(“symbol”!==(“undefined”==typeof e?“undefined”:typeof(e))){var t;arguments.length>1&&(t=arguments[1]);var i=[e];if(r(t))i.push(t);else{var o=ne.IsCallable(t)?t:null,a=function(e,t){var r=o?n(o,this,e,t):t;return”symbol”!==(“undefined”==typeof r?“undefined”:typeof(r))?Y.symbol(r)?St({})(r):r:void 0};i.push(a)}return arguments.length>2&&i.push(arguments[2]),Mr.apply(this,i)}})}return O}),define(“jqueryplugins”,[“jquery”],function(e){e.prototype.extend({popAttr:function(e){var t=this.attr(e);return this.removeAttr(e),t},popData:function(e){var t=this.data(e);return this.removeData(e),t},tag:function(){return this[0]&&this[0].tagName&&this[0].tagName.toLowerCase()},textNodes:function(){return 1===this.length&&this[0]instanceof Text?[this[0]]:Array.from(this.add(this.contents().add(this.find("").contents())).filter(function(){return this instanceof Text})).sort(function(e,t){return 2&e.compareDocumentPosition(t)?1:-1})},findAndFilter:function(e){return this.filter(e).add(this.find(e))}})}),function(){function e(){for(var e=0;e<arguments.length;e++)for(var t in arguments[e])this[t]=arguments[e][t]}function t(e,t){e.childAt=e.childAt||{};for(var n=t.start;n<t.end;n+=1)e.childAt[n]=t}function n(e,t,n,r){return!(e.canFollow&&!(e.canFollow.indexOf(n&&n.type)>-1)||e.cannotFollow&&(-1!==e.cannotFollow.indexOf(n&&n.type)||e.cannotFollow.indexOf(“text”)>-1&&r)||e.peek&&e.peek.toLowerCase()!==t.slice(0,e.peek.length).toLowerCase())}function r(e){for(var t=e.innerText,r=[],o=0,s=o,u=t.length,c=null;u>o;){for(var l=t.slice(o),f=(r.length?r[0]:e).innerMode,p=0,d=f.length;d>p;p+=1){var h=a[f[p]];if(n(h,l,c,o>s)&&h.pattern.test(l)){var m=h.pattern.exec(l),g=h.fn(m),y=!1,v=0;if(g.matches){for(;v<r.length;v+=1){var b=r[v].type;if(b in g.matches){y=!0;break}0===b.indexOf(“verbatim”)&&(b=“verbatimOpener”),g.cannotCross&&g.cannotCross.indexOf(b)>-1&&(v=r.length-1)}if(v>=r.length&&!g.isFront)continue}o>s&&e.addChild({type:“text”,text:t.slice(s,o),innerMode:f}),c=e.addChild(g),o+=c.text.length,s=o,y&&(i(e,c,r[v]),r=r.slice(v+1)),c.isFrontToken()&&r.unshift(c);break}}p===d&&(o+=1,null===c&&(c={type:“text”}))}for(o>s&&e.addChild({type:“text”,text:t.slice(s,o),innerMode:(r.length?r[0]:e).innerMode});r.length>0;)r.shift().demote();return e}function i(e,n,r){var i=e.children.indexOf(n),o=e.children.indexOf(r);n.children=e.children.splice(o+1,i-(o+1)),n.children.forEach(function(e){t(n,e)}),n.type=n.matches[r.type],n.innerText="";for(var a=0,s=n.children.length;s>a;a++)n.innerText+=n.children[a].text;n.start=r.start,n.text=r.text+n.innerText+n.text,Object.keys(r).forEach(function(e){Object.hasOwnProperty.call(n,e)||(n[e]=r[e])}),n.isFront&&(n.isFront=!1),e.children.splice(o,1),t(e,n)}var o=void 0,a={};e.prototype={constructor:e,addChild:function(n){var i=this.lastChildEnd(),o=new e({start:i,end:n.text&&i+n.text.length,children:[]},n);return o.innerText&&r(o),this.children.push(o),t(this,o),o},lastChild:function(){return this.children?this.children[this.children.length-1]||null:null},lastChildEnd:function(){var e=this.lastChild();return e?e.end:this.start+Math.max(0,this.text.indexOf(this.innerText))},tokenAt:function(e){if(e<this.start||e>=this.end)return null;if(this.childAt)return this.childAt[e]&&this.childAt[e].tokenAt(e)||this;if(this.children.length)for(var t=0;t<this.children.length;t+=1){var n=this.children[t].tokenAt(e);if(n)return n}return this},pathAt:function(e){if(e<this.start||e>=this.end)return[];if(this.childAt)return(this.childAt[e]&&this.childAt[e].pathAt(e)||[]).concat(this);var t=[];if(this.children.length)for(var n=0;n<this.children.length;n+=1){var r=this.children[n].pathAt(e);if(r.length){t.concat(r);break}}return t.concat(this)},nearestTokenAt:function(e){return e<this.start||e>=this.end?null:this.children?this.children.reduce(function(t,n){return t||(e>=n.start&&e<n.end?n:null)},null):this},everyLeaf:function(e){return this.children&&0!==this.children.length?this.children.reduce(function(t,n){return n.everyLeaf(e)&&t},!0):!!e(this)},isWhitespace:function(){return this.everyLeaf(function(e){return”whitespace”===e.type||!e.text.trim()})},isFrontToken:function(){return this.isFront},isBackToken:function(){return”matches”in this},demote:function(){this.type=“text”},error:function(e){this.type=“error”,this.message=e},toString:function(){var e=this.type+”(“+this.start+“\u2192”+this.end+”)“;return this.children&&this.children.length>0&&(e+=”[“+this.children+”]”),e}},o={lex:function(t,n){return r(new e({type:“root”,start:n||0,end:t.length,text:t,innerText:t,children:[],childAt:{},innerMode:o.modes.start}))},rules:a,modes:{}},“object”===(“undefined”==typeof module?“undefined”:_typeof(module))?module.exports=o:“function”==typeof define&&define.amd?define(“lexer”,[],function(){return o}):this&&this.loaded?(this.modules||(this.modules={}),this.modules.Lexer=o):this.TwineLexer=o}.call(eval(“this”)||(“undefined”!=typeof global?global:window)),function(){function e(t){return t&&“object”===(“undefined”==typeof t?“undefined”:_typeof(t))?(Object.keys(t).forEach(function(n){t[n]=e(t[n])}),t):(t+"").replace(/[-[]/{}()*+?.\^$|]/g,”\$&”)}function t(){return”[^“+Array.apply(0,arguments).map(e).join("")+”]“}function n(e){return function(){return”(“+e+Array.apply(0,arguments).join(”|”)+”)“}}var r=void 0,i=n(”?:”),o=n(”?!”),a=n(”?=”),s=”[ \f\t\v\u00a0\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]“,u=s.replace("",”+”),c=“\b”,l=“\\\n\\?|\n\\“,f=“\n(?!\\)“,p=”[\w\-\u00c0-\u00de\u00df-\u00ff\u0150\u0170\u0151\u0171\uD800-\uDFFF]“,d=p.replace(”\-”,""),h=i(“\n”,”$”),m=”(“+i(l,”[^\n]”)+”+)“,g=”\“,y=s+”(“+g+”+)“+u+m+h,v=”(?:0\.)“,b=s+”(“+v+”+)“+u+m+h,w=s+”-{3,}“+s+h,x=s+”(#{1,6})“+s+m+h,T=s+”(==+>|<=+|=+><=+|<==+>)“+s+h,S=s+”(=+\|+|\|+=+|=+\|+=+|\|=+\|)“+s+h,O={opener:”\[\[(?!\[)“,text:”(“+t(”]”)+”)“,rightSeparator:i(”\->”,”\|”),leftSeparator:”<\-“,closer:”\]\]“,legacySeparator:”\|“,legacyText:”(“+i(”[^\|\]]”,”\]“+o(”\]”))+”+)”},j=d+""+d.replace(“\w”,“a-zA-Z”)+d+”*“,k=”\$(“+j+”)“,C=“‘s”+u+”(“+j+”)“,A=”(“+j+”)“+u+“of”+c+o(“it”+c),E=“‘s”+u,N=“of”+c,=i(“it”,“time”)+c,P=“its”+u+”(“+j+”)“,I=“its”+u,M=”(“+j+”)“+u+“of”+u+“it”+c,L=“of”+c+u+“it”+c,F={opener:”\(“,name:”(“+i(p+”+“,k)+”):“+o(”\/”),closer:”\)”},D=”<<[^>\s]+\s*(?:\\.|’(?:[^’\\]\\.)[^’\\]’|”(?:[^”\\]\\.)[^”\\]”|[^’”\\>]|>(?!>))>>“,q=i(”=<”,”=>”,“[gl]te?”+c,“n?eq”+c,“isnot”+c,“are”+c,“x”+c),R={name:“[a-zA-Z][\w\-]“,attrs:”(?:”[^”]”|’[^’]’|[^’”>])*?”},H=”\|(“+p+”+)(>|\))”,$=”(<|\()(“+p+”+)\|“,B=”(“+j+”)“+c,V=“\b(\d+(?:\.\d+)?(?:[eE][+\-]?\d+)?)”+o(“m?s”)+c;O.main=O.opener+i(O.text+O.rightSeparator,O.text.replace("",”?”)+O.leftSeparator)+O.text,r={upperLetter:“[A-Z\u00c0-\u00de\u0150\u0170]“,lowerLetter:“[a-z0-9\-\u00df-\u00ff\u0151\u0171]“,anyLetter:p,anyLetterStrict:d,whitespace:u,escapedLine:l,br:f,commentFront:"",tag:”<\/?”+R.name+R.attrs+”>“,tagPeek:”<“,scriptStyleTag:”<(“+i(“script”,“style”)+”)“+R.attrs+”>[^]?<\/\1>“,scriptStyleTagOpener:”<“,url:”(“+i(“https?”,“mailto”,“javascript”,“ftp”,“data”)+”:\/\/[^\s<]+[^<.,:;”’)\]\s])“,bullet:g,hr:w,heading:x,align:T,column:S,bulleted:y,numbered:b,strikeOpener:e(”~~”),italicOpener:e(”//”),boldOpener:e(”””),supOpener:e(”^^”),strongFront:e(""),strongBack:e(""),emFront:e(""),emBack:e(""),verbatimOpener:“+",collapsedFront:"{",collapsedBack:"}",hookAppendedFront:"\\[",hookPrependedFront:H+"\\[",hookFront:"\\[",hookBack:"\\]"+o($),hookAppendedBack:"\\]"+$,passageLink:O.main+O.closer,passageLinkPeek:"[[",legacyLink:O.opener+O.legacyText+O.legacySeparator+O.legacyText+O.closer,legacyLinkPeek:"[[",simpleLink:O.opener+O.legacyText+O.closer,simpleLinkPeek:"[[",macroFront:F.opener+a(F.name),macroFrontPeek:"(",macroName:F.name,groupingFront:"\\("+o(F.name),groupingFrontPeek:"(",groupingBack:"\\)",twine1Macro:D,twine1MacroPeek:"<<",property:C,propertyPeek:"'s",belongingProperty:A,possessiveOperator:E,belongingOperator:N,belongingOperatorPeek:"of",itsOperator:I,itsOperatorPeek:"its",belongingItOperator:L,belongingItOperatorPeek:"of",variable:k,variablePeek:"$",tempVariable:B,tempVariablePeek:"_",hookRef:"\\?("+p+"+)\\b",hookRefPeek:"?",cssTime:"(\\d+\\.?\\d*|\\d*\\.?\\d+)(m?s)"+c,colour:i(i("Red","Orange","Yellow","Lime","Green","Cyan","Aqua","Blue","Navy","Purple","Fuchsia","Magenta","White","Gray","Grey","Black"),"#[\\dA-Fa-f]{3}(?:[\\dA-Fa-f]{3})?"),number:V,boolean:i("true","false")+c,identifier:_,itsProperty:P,itsPropertyPeek:"its",belongingItProperty:M,escapedStringChar:"\\\\[^\\n]",singleStringOpener:"'",doubleStringOpener:'"',is:"is"+o(u+"not",u+"in",u+"<",u+">")+c,isNot:"is"+u+"not"+c,and:"and"+c,or:"or"+c,not:"not"+c,inequality:"((?:is(?:"+u+"not)?"+s+")*)("+i("<(?!=)","<=",">(?!=)",">=")+")",isIn:"is"+u+"in"+c,contains:"contains"+c,addition:e("+")+o("="),subtraction:e("-")+o("="),multiplication:e("*")+o("="),division:i("/","%")+o("="),comma:",",spread:"\\.\\.\\."+o("\\."),to:i("to"+c,"="),into:"into"+c,making:"making"+c,where:"where"+c,via:"via"+c,with:"with"+c,each:"each"+c,augmentedAssign:i("\\+","\\-","\\*","\\/","%")+"=",incorrectOperator:q},"object"===("undefined"==typeof module?"undefined":_typeof(module))?module.exports=r:"function"==typeof define&&define.amd?define("patterns",[],function(){return r}):this&&this.loaded?(this.modules||(this.modules={}),this.modules.Patterns=r):this.Patterns=r}.call(eval("this")||("undefined"!=typeof global?global:window)),function(){function e(e){function t(e){return e=e||"innerText",function(t){var n=t.reduceRight(function(e,t,n){return e||(n?t:"")},""),r={};return r[e]=n,r}}function r(e,t){var n={};return n[e]=t,function(){return{isFront:!0,matches:n,cannotCross:["verbatimOpener"]}}}function i(e,t){return Object.keys(t).forEach(function(n){var r=t[n].fn;t[n].fn=function(t){var i=r(t);return i.text||(i.text=t[0]),i.type||(i.type=n),i.innerMode||(i.innerMode=e),i}}),t}var o=Object.bind(0,null),a=[],s=[],u=i(a,{hr:{fn:o},bulleted:{fn:function(e){return{depth:e[1].length,innerText:e[2]}}},numbered:{fn:function(e){return{depth:e[1].length/2,innerText:e[2]}}},heading:{fn:function(e){return{depth:e[1].length,innerText:e[2]}}},align:{fn:function(e){var t=void 0,n=e[1],r=n.indexOf("><");return~r?(t=Math.round(r/(n.length-2)*50),25===t&&(t="center")):"<"===n[0]&&">"===n.slice(-1)?t="justify":n.indexOf(">")>-1?t="right":n.indexOf("<")>-1&&(t="left"),{align:t}}},column:{fn:function(e){var t=void 0,n=e[1],r=n.indexOf("|");return r&&r<n.length-1?t="center":"|"===n[0]&&"|"===n.slice(-1)?t="none":r===n.length-1?t="right":r||(t="left"),{column:t,width:/\|+/.exec(n)[0].length,marginLeft:/^=*/.exec(n)[0].length,marginRight:/=*$/.exec(n)[0].length}}}});Object.keys(u).forEach(function(e){u[e].canFollow=[null,"br","hr","bulleted","numbered","heading","align"],u[e].cannotFollow=["text"]});var c=i(a,{twine1Macro:{fn:function(){return{type:"error",message:"Harlowe macros use a different syntax to Twine 1 and SugarCube macros."}}},emBack:{fn:function(){return{matches:{emFront:"em"},cannotCross:["verbatimOpener"]}}},strongBack:{fn:function(){return{matches:{strongFront:"strong"},cannotCross:["verbatimOpener"]}}},strongFront:{fn:function(){return{isFront:!0}}},emFront:{fn:function(){return{isFront:!0}}},boldOpener:{fn:r("boldOpener","bold")},italicOpener:{fn:r("italicOpener","italic")},strikeOpener:{fn:r("strikeOpener","strike")},supOpener:{fn:r("supOpener","sup")},commentFront:{fn:function(){return{isFront:!0}}},commentBack:{fn:function(){return{matches:{commentFront:"comment"}}}},scriptStyleTag:{fn:o},tag:{fn:o},url:{fn:o},hookPrependedFront:{fn:function(e){return{name:e[1],hidden:")"===e[2],isFront:!0,tagPosition:"prepended"}}},hookFront:{fn:function(){return{isFront:!0}}},hookBack:{fn:function(){return{matches:{hookPrependedFront:"hook",hookFront:"hook"},cannotCross:["verbatimOpener"]}}},hookAppendedBack:{fn:function(e){return{name:e[2],hidden:"("===e[1],tagPosition:"appended",matches:{hookFront:"hook"},cannotCross:["verbatimOpener"]}}},verbatimOpener:{fn:function(e){var t=e[0].length,n={};return n["verbatim"+t]="verbatim",{type:"verbatim"+t,isFront:!0,matches:n}}},collapsedFront:{fn:function(){return{isFront:!0}}},collapsedBack:{fn:function(){return{matches:{collapsedFront:"collapsed"},cannotCross:["verbatimOpener"]}}},escapedLine:{fn:o},legacyLink:{fn:function(e){return{type:"twineLink",innerText:e[1],passage:e[2]}}},br:{fn:o}}),l=i(s,{macroFront:{fn:function(e){return{isFront:!0,name:e[1]}}},groupingBack:{fn:function(){return{matches:{groupingFront:"grouping",macroFront:"macro"},cannotCross:["singleStringOpener","doubleStringOpener"]}}},passageLink:{fn:function(e){var t=e[1],n=e[2],r=e[3];return{type:"twineLink",innerText:n?r:t,passage:t?r:n}}},simpleLink:{fn:function(e){return{type:"twineLink",innerText:e[1],passage:e[1]}}},variable:{fn:t("name")},tempVariable:{fn:t("name")}}),f=i(s,Object.assign({macroName:{canFollow:["macroFront"],fn:function(e){return e[2]?{isMethodCall:!0,innerText:e[2]}:{isMethodCall:!1}}},groupingFront:{fn:function(){return{isFront:!0}}},property:{fn:t("name"),canFollow:["variable","hookRef","property","tempVariable","colour","itsProperty","belongingItProperty","macro","grouping","string","boolean","number"]},possessiveOperator:{ fn:o},itsProperty:{cannotFollow:["text"],fn:t("name")},itsOperator:{cannotFollow:["text"],fn:o},belongingItProperty:{cannotFollow:["text"],fn:t("name")},belongingItOperator:{cannotFollow:["text"],fn:o},belongingProperty:{cannotFollow:["text"],fn:t("name")},belongingOperator:{cannotFollow:["text"],fn:o},escapedStringChar:{fn:function(){return{type:"text"}}},singleStringOpener:{fn:function(){return{isFront:!0,matches:{singleStringOpener:"string"}}}},doubleStringOpener:{fn:function(){return{isFront:!0,matches:{doubleStringOpener:"string"}}}},hookRef:{fn:t("name")},cssTime:{fn:function(e){return{value:+e[1]*("s"===e[2].toLowerCase()?1e3:1)}}},colour:{cannotFollow:["text"],fn:function(e){var t,n=e[0].toLowerCase(),r={red:"e61919",orange:"e68019",yellow:"e5e619",lime:"80e619",green:"19e619",cyan:"19e5e6",aqua:"19e5e6",blue:"197fe6",navy:"1919e6",purple:"7f19e6",fuchsia:"e619e5",magenta:"e619e5",white:"fff",black:"000",gray:"888",grey:"888"};return t=Object.hasOwnProperty.call(r,n)?"#"+r[n]:n,{colour:t}}},number:{fn:function(e){return{value:parseFloat(e[0])}}},addition:{fn:o},subtraction:{fn:o},multiplication:{fn:o},division:{fn:o},inequality:{fn:function(e){return{operator:e[2],negate:e[1].indexOf("not")>-1}}},augmentedAssign:{fn:function(e){return{operator:e[0][0]}}},identifier:{fn:t("name"),cannotFollow:["text"]},whitespace:{fn:o,cannotFollow:"text"},incorrectOperator:{fn:function(e){var t={"=>":">=","=<":"<=",gte:">=",lte:"<=",gt:">",lt:"<",eq:"is",isnot:"is not",neq:"is not",are:"is",x:"*"}[e[0].toLowerCase()];return{type:"error",message:"Please say "+(t?"'"+t+"'":"something else")+" instead of '"+e[0]+"'."}},cannotFollow:"text"}},["boolean","is","to","into","where","via","with","making","each","and","or","not","isNot","contains","isIn"].reduce(function(e,t){return e[t]={fn:o,cannotFollow:["text"]},e},{}),["comma","spread","addition","subtraction","multiplication","division"].reduce(function(e,t){return e[t]={fn:o},e},{})));a.push.apply(a,_toConsumableArray(Object.keys(u)).concat(_toConsumableArray(Object.keys(l)),_toConsumableArray(Object.keys(c)))),s.push.apply(s,_toConsumableArray(Object.keys(l)).concat(_toConsumableArray(Object.keys(f))));var p=Object.assign({},u,c,l,f);return Object.keys(p).forEach(function(e){var t=n[e];p[e].pattern="string"!=typeof t?t:new RegExp("^(?:"+t+")","i"),n[e+"Peek"]&&(p[e].peek=n[e+"Peek"])}),Object.assign(e.rules,p),e.modes.start=e.modes.markup=a,e.modes.macro=s,e}function t(t){return Object.freeze({lex:e(t).lex,Patterns:n})}var n=void 0;Object.assign=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},"object"===("undefined"==typeof module?"undefined":_typeof(module))?(n=require("./patterns"),module.exports=t(require("./lexer"))):"function"==typeof define&&define.amd?define("markup",["lexer","patterns"],function(e,r){return n=r,t(e)}):this&&this.loaded&&this.modules?(n=this.modules.Patterns,this.modules.Markup=t(this.modules.Lexer)):(n=this.Patterns,this.TwineMarkup=t(this.TwineLexer))}.call(eval("this")||("undefined"!=typeof global?global:window)),define("utils/selectors",[],function(){return Object.freeze({passage:"tw-passage",story:"tw-story",sidebar:"tw-sidebar",internalLink:"tw-link",brokenLink:"tw-broken-link",hook:"tw-hook",enchantment:"tw-enchantment",expression:"tw-expression",script:"[role=script]",stylesheet:"[role=stylesheet]",storyData:"tw-storydata",passageData:"tw-passagedata",collapsed:"tw-collapsed"})}),define("utils/polyfills",[],function(){var e=Array.prototype;"function"!=typeof e.includes&&(e.includes=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!Number.isNaN(t)&&Number.isFinite(n)&&"undefined"!=typeof t)return e.indexOf.call(this,t,n)>-1;var r=Object(this),i=parseInt(r.length);if(0>=i)return!1;for(var o=n>=0?n:Math.max(0,i+n);i>o;){if(Object.is(t,r[o]))return!0;o+=1}return!1})}),define("utils",["jquery","markup","utils/selectors","utils/polyfills"],function(e,t,n){function r(t,n){var r=o[n];if(!r[t]){var i=e("").appendTo(document.body).attr("data-t8n",t).addClass(n);r[t]=c.cssTimeUnit(i.css("animation-duration"))+c.cssTimeUnit(i.css("animation-delay")),i.remove()}return r[t]}var i={configurable:0,writable:0},o={"transition-in":Object.create(null),"transition-out":Object.create(null)},a="audio,blockquote,canvas,div,h1,h2,h3,h4,h5,hr,ol,p,pre,table,ul,video,tw-align,tw-story,tw-passage".split(","),s="a,b,i,em,strong,sup,sub,abbr,acronym,s,strike,del,big,small,script,img,button,input,tw-link,tw-broken-link,tw-verbatim,tw-collapsed,tw-error".split(","),u=["audio"],c=void 0,l=void 0;return c={lockProperty:function(e,t,n){var r=Object.create(i);return n&&(r.value=n),Object.defineProperty(e,t,r),e},toJSLiteral:function(e){return e instanceof Map?"(new Map("+c.toJSLiteral([].concat(_toConsumableArray(e.entries())))+"))":e instanceof Set?"(new Set("+c.toJSLiteral([].concat(_toConsumableArray(e.values())))+"))":JSON.stringify(e)},cssTimeUnit:function(e){return e=e.toLowerCase(),"ms"===e.slice(-2)?+e.slice(0,-2)||0:"s"===e.slice(-1)?1e3*+e.slice(0,-1)||0:0},nth:function(e){var t=(+e+"").slice(-1);return e+("1"===t?"st":"2"===t?"nd":"3"===t?"rd":"th")},plural:function(e,t){return e+" "+t+(e>1?"s":"")},andList:function(e){return 1===e.length?e[0]:e.slice(0,-1).join(", ")+" and "+e[e.length-1]},realWhitespace:"[ \\n\\r\\f\\t\\v\\u00a0\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000]",anyRealLetter:"[\\dA-Za-z\\u00c0-\\u00de\\u00df-\\u00ff\\u0150\\u0170\\u0151\\u0171\\uD800-\\uDFFF]",unescape:function(e){return e.replace(/&(?:amp|lt|gt|quot|nbsp|zwnj|#39|#96);/g,function(e){return{"&":"&",">":">","<":"<",""":'"',"'":"'"," ":String.fromCharCode(160),"":String.fromCharCode(8204)}[e]})},escape:function(e){return e.replace(/[&><"']/g,function(e){return{"&":"&",">":">","<":"<",'"':""","'":"'"}[e]})},insensitiveName:function(e){return(e+"").toLowerCase().replace(/-|_/g,"")},childrenProbablyInline:function(e){var t=[];return Array.prototype.every.call(e.find("*"),function(e){return e.hidden||/none|inline/.test(e.style.display)?!0:a.includes(e.tagName.toLowerCase())||/none|inline/.test(e.style.display)?!1:s.includes(e.tagName.toLowerCase())?!0:(t.push(e),!0)})&&t.every(function(e){return/none|inline/.test(e.style.display)})},transitionReplace:function(t,r,i){var o=t.closest(n.hook);o.length>0&&(t=o);var a=e("<tw-transition-container>").css("position","relative");a.insertBefore(t.first());var s=void 0;r&&(s=e("<tw-transition-container>").appendTo(a),r.appendTo(s));var u=e("<tw-transition-container>").css("position","absolute").prependTo(a);t.detach().appendTo(u),c.transitionOut(u,i),r&&c.transitionIn(s,i,function(){s.unwrap().children().first().unwrap()})},transitionOut:function(e,t,n){function i(){e.remove()}var o=c.childrenProbablyInline(e),a=e.length>1||!o||!["tw-hook","tw-passage"].includes(e.tag());a&&(e=e.wrapAll("<tw-transition-container>").parent()),e.attr("data-t8n",t).addClass("transition-out"),c.childrenProbablyInline(e)&&e.css("display","inline-block"),"number"==typeof n&&e.css("animation-duration",n+"ms");var s=n||r(t,"transition-out");s?window.setTimeout(i,s):i()},transitionIn:function(e,t,n){function i(){var t=0===e.findAndFilter(u.join(",")).length;a&&t?e.contents().unwrap():e.removeClass("transition-in").removeAttr("data-t8n")}var o=c.childrenProbablyInline(e),a=e.length>1||!o||!["tw-hook","tw-passage"].includes(e.tag());a&&(e=e.wrapAll("<tw-transition-container>").parent()),e.attr("data-t8n",t).addClass("transition-in"),"number"==typeof n&&e.css("animation-duration",n+"ms"),c.childrenProbablyInline(e)&&e.css("display","inline-block");var s=n||r(t,"transition-in");s?window.setTimeout(i,s):i()},$:function(t,n){return e(t,n||c.storyElement).not(".transition-out, .transition-out *")},impossible:function(e,t){window.console&&console.error(e+"(): "+t)},assertMustHave:function(e,t){if(window.console)for(var n=0;n<t.length;n+=1)t[n]in e||console.error("Assertion failed: object lacks property "+t[n])},assertOnlyHas:function(e,t){if(window.console)for(var n in e)t.includes(n)||console.error("Assertion failed: object had unexpected property '"+n+"'!")},get storyElement(){return l}},e(function(){return l=e(n.story)}),Object.freeze(c)}),define("passages",["jquery","utils","utils/selectors"],function(e,t,n){function r(e){return Object.assign(new Map([["source",i(e.html())],["tags",(e.attr("tags")||"").split(/\s/)||[]],["name",e.attr("name")]]),{TwineScript_TypeName:"passage datamap",TwineScript_ObjectName:"a passage datamap"})}var i=t.unescape,o=Object.assign(new Map,{TwineScript_ObjectName:"the Passages datamap",getTagged:function(e){var t=[];return this.forEach(function(n){var r=n instanceof Map&&n.get("tags");Array.isArray(r)&&r.includes(e)&&t.push(n)}),t.sort(function(e,t){return e.get("name")>t.get("name")})},create:r});return e(function(){Array.from(e(n.storyData+" > "+n.passageData)).forEach(function(t){t=e(t),o.set(t.attr("name"),new r(t))})}),o}),define("datatypes/hookset",["jquery","utils","utils/selectors","markup"],function(e,t,n,r){function i(e,t,n){var r=e.textContent.length;if(!(t>=r)){var i=void 0,o=[i=0===t?e:e.splitText(t)];return n&&(0>=n&&(n=r-n),r>n&&o.push(i.splitText(n-t))),o}}function o(e,t){var n=[],r="",a=[];if(!e.length||!t)return a;for(;e.length>0;){n.push(e[0]),r+=e[0].textContent,e.shift();var s=r.indexOf(t);if(s>-1){for(var u,c=r.length-(s+t.length);s>=n[0].textContent.length;)s-=n[0].textContent.length,n.shift();if(1===n.length){var l=i(n[0],s,s+t.length);a.push(l[0]),l[1]&&e.unshift(l[1]);break}a.push(i(n[0],s,n[0].length)[0]),(u=a).push.apply(u,_toConsumableArray(n.slice(1,-1)));var f=i(n[n.length-1],0,n[n.length-1].textContent.length-c);a.push(f[0]),f[1]&&e.unshift(f[1]),a=a.filter(Boolean);break}}return[a].concat(_toConsumableArray(o(e,t)))}function a(t,n,r){var i=o(n.textNodes(),t),a=e();return i.forEach(function(t){a=a.add(e(t).wrapAll(r))}),a.parent()}function s(e){e=t.insensitiveName(e).replace(/\?/g,"").replace(/"/g,""");var r=n.hook+'[name="'+e+'"]';return r+={page:", tw-story",passage:", tw-passage",sidebar:", tw-sidebar",link:", tw-link, .enchantment-link"}[e]||""}function u(n){var r=n.dom,i=e();this.prev&&(i=i.add(u.call(this.prev,{dom:r})));var o=function(t,n){return Array.isArray(n)?n.reduce(function(e,n){return e.add(t.get(n))},e()):e(t.get(n))};if(this.selector){var c=void 0;c=this.selector.match("^"+f.hookRef+"$")?r.add(r.parentsUntil(t.storyElement.parent())).findAndFilter(s(this.selector)):a(this.selector,r,"<tw-pseudo-hook>"),i=i.add(this.properties.length?this.properties.reduce(o,c):c)}return this.base&&(i=i.add(this.properties.reduce(o,u.call(this.base,{dom:r})))),i}function c(e){var n=e.dom;t.$("tw-pseudo-hook",n).contents().unwrap().parent().each(function(){this.normalize()})}function l(e){if(!e)return[];var n=e.selector,r=e.base,i=e.properties,o=e.prev;return[JSON.stringify([t.insensitiveName(n)||"",l(r),[].concat(_toConsumableArray(i)).sort()])].concat(_toConsumableArray(l(o))).sort()}var f=r.Patterns,p=Object.freeze({forEach:function(t,n){var r=u.call(this,t).each(function(t){n(e(this),t)});return c.call(this,t),r},get TwineScript_ObjectName(){return this.properties.length>0||this.prev?"a complex hook name":this.selector+" (a hook name)"},TwineScript_TypeName:"a hook name (like ?this)",TwineScript_Unstorable:!0,"TwineScript_+":function(e){var t=e.TwineScript_Clone();return t.prev=this,t},TwineScript_is:function(e){return l(this)+""==l(e)+""},TwineScript_GetElement:function(e){return p.create(void 0,this,[e],void 0)},TwineScript_Clone:function(){return p.create(this.selector,this.base,this.properties,this.prev)},create:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return Object.assign(Object.create(this||p),{selector:e,base:t,properties:n,prev:r})},from:function(e){return p.isPrototypeOf(e)?e:p.create(e)}});return p}),define("internaltypes/twineerror",["jquery","utils"],function(e,t){var n=t.impossible,r=t.escape,i={syntax:"The markup seems to contain a mistake.",saving:"I tried to save or load the game, but I couldn't do it.",operation:"I tried to perform an operation on some data, but the data's type was incorrect.",macrocall:"I tried to use a macro, but its call wasn't written correctly.",datatype:"I tried to use a macro, but was given the wrong type of data to it.",keyword:"I was given a keyword in a way that I didn't understand.",infinite:"I almost ended up doing the same thing over and over, forever.",property:"I tried to access a value in a string/array/datamap, but I couldn't find it.",unimplemented:"I currently don't have this particular feature. I'm sorry.",javascript:"This error message was reported by your browser's Javascript engine. I don't understand it either, but it usually means that an expression was badly written."},o={create:function(e,t,r){return t||n("TwineError.create","called with only 1 string."),r||e in i||n("TwineError.create","no error explanation given"),Object.assign(Object.create(this),{type:e,message:t,explanation:r})},fromError:function(e){return o.create("javascript","\u2615 "+e.message)},containsError:function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return t.reduce(function(e,t){return e?e:t instanceof Error?t:o.isPrototypeOf(t)?t:Array.isArray(t)?o.containsError.apply(o,_toConsumableArray(t)):!1},!1)},createWarning:function(e,t){return Object.assign(this.create(e,t),{warning:!0})},render:function(t){t=t||"";var n=e("<tw-error class='"+("javascript"===this.type?"javascript ":"")+(this.warning?"warning":"error")+"' title='"+r(t)+"'>"+r(this.message)+"</tw-error>"),o=e("<tw-error-explanation>").text(this.explanation||i[this.type]).hide(),a=e("<tw-error-explanation-button tabindex=0>").html("►");return a.on("click",function(){o.toggle(),a.children(".folddown-arrowhead").css("transform","rotate("+(o.is(":visible")?"90deg":"0deg")+")")}),n.append(a).append(o),n}};return o}),define("utils/operationutils",["utils","datatypes/hookset","internaltypes/twineerror"],function(e,t,n){function r(e){return!!e&&("object"===("undefined"==typeof e?"undefined":_typeof(e))||"function"==typeof e)}function i(e){return Array.isArray(e)?"array":e instanceof Map?"datamap":e instanceof Set?"dataset":"string"==typeof e?"string":e&&"object"===("undefined"==typeof e?"undefined":_typeof(e))?"object":""}function o(e,t){if(e instanceof Map||g("isValidDatamapName","called with non-Map"),"string"!=typeof t&&"number"!=typeof t)return n.create("property","Only strings and numbers can be used as data names for "+l(e)+", not "+l(t)+".");var r="string"==typeof t?+t:""+t;return!Number.isNaN(r)&&e.has(r)?n.create("property","You mustn't use both "+l(t)+" and "+l(r)+" as data names in the same datamap."):!0}function a(e,t){if(null===t)return void 0===e;if(t.innerType){if("optional"===t.pattern||"zero or more"===t.pattern)return void 0===e?!0:a(e,t.innerType);if("either"===t.pattern)return t.innerType.some(function(t){return a(e,t)});if("lambda"===t.pattern&&a(e,t.innerType))return"string"!=typeof t.clauses&&g("singleTypeCheck","lambda signature had non-string clauses"),t.clauses.includes("where")==="where"in e&&t.clauses.includes("making")==="making"in e&&t.clauses.includes("via")==="via"in e&&t.clauses.includes("with")==="with"in e;if("wrapped"===t.pattern)return a(e,t.innerType)}return void 0!==t&&void 0===e?!1:"anything"!==t.TwineScript_TypeName||void 0===e||e.TwineScript_Unstorable?t===String?"string"==typeof e:t===Boolean?"boolean"==typeof e:t===parseInt?"number"==typeof e&&!Number.isNaN(e)&&!(e+"").includes("."):t===Number?"number"==typeof e&&!Number.isNaN(e):t===Array?Array.isArray(e):t===Map||t===Set?e instanceof t:Object.isPrototypeOf.call(t,e):!0}function s(e){return"string"==typeof e||Array.isArray(e)||t.isPrototypeOf(e)}function u(e){if(!r(e))return e;if("function"==typeof e.TwineScript_Clone)return e.TwineScript_Clone();if(Array.isArray(e))return[].concat(_toConsumableArray(e));if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if("function"==typeof e)return Object.assign(e.bind(),e);switch(Object.getPrototypeOf(e)){case Object.prototype:return Object.assign({},e);case null:return Object.assign(Object.create(null),e)}return g("OperationUtils.clone","The value "+(e.toSource?e.toSource():e)+" cannot be cloned!"),e}function c(e,t,n){return"string"==typeof t&&r(n)&&"TwineScript_ToString"in n?e(t,n.TwineScript_ToString()):"string"==typeof n&&r(t)&&"TwineScript_ToString"in t?e(t.TwineScript_ToString(),n):!1}function l(e){return r(e)&&"TwineScript_ObjectName"in e?e.TwineScript_ObjectName:Array.isArray(e)?"an array":e instanceof Map?"a datamap":e instanceof Set?"a dataset":"boolean"==typeof e?"the boolean value '"+e+"'":"string"==typeof e||"number"==typeof e?"the "+("undefined"==typeof e?"undefined":_typeof(e))+" "+y(e):void 0===e?"an empty variable":"...whatever this is"}function f(e){return e.innerType?"either"===e.pattern?(Array.isArray(e.innerType)||g("typeName",'"either" pattern had non-array inner type'),e.innerType.map(f).join(" or ")):"optional"===e.pattern?"(an optional) "+f(e.innerType):f(e.innerType):e===String||e===Number||e===Boolean?"a "+_typeof(e()):e===parseInt?"a non-fractional number":e===Map?"a datamap":e===Set?"a dataset":e===Array?"an array":r(e)&&"TwineScript_TypeName"in e?e.TwineScript_TypeName:l(e)}function p(e,t){return"object"!==("undefined"==typeof e?"undefined":_typeof(e))&&"object"!==("undefined"==typeof t?"undefined":_typeof(t))?e===t:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:e.every(function(e,n){return p(t[n],e)}):e instanceof Map&&t instanceof Map?p(Array.from(e.entries()).sort(),Array.from(t.entries()).sort()):e instanceof Set&&t instanceof Set?p([].concat(_toConsumableArray(e)),[].concat(_toConsumableArray(t))):e&&"function"==typeof e.TwineScript_is?e.TwineScript_is(t):e&&"object"===("undefined"==typeof e?"undefined":_typeof(e))&&t&&"object"===("undefined"==typeof t?"undefined":_typeof(t))&&Object.getPrototypeOf(e)===Object.prototype&&Object.getPrototypeOf(t)===Object.prototype?p(Object.getOwnPropertyNames(e).map(function(t){return[t,e[t]]}),Object.getOwnPropertyNames(t).map(function(e){return[e,t[e]]})):Object.is(e,t)}function d(e,t){if(e){if("string"==typeof e)return e.includes(t);if(Array.isArray(e))return e.some(function(e){return p(e,t)});if(e instanceof Set||e instanceof Map)return Array.from(e.keys()).some(function(e){return p(e,t)})}return n.create("operation",l(e)+" cannot contain any values, let alone "+l(t))}function h(e,t,r){if(!t||!r)return n.create("macrocall","The sub"+i(e)+" index values must not be 0 or NaN.");if(0>t&&(t=e.length+t+1),0>r&&(r=e.length+r+1),t>r)return h(e,r,t);var o="string"==typeof e;o&&(e=Array.from(e));var a=e.slice(t>0?t-1:t,r).map(u);return o?a.join(""):a}function m(e){return n.containsError(e)?e:e&&"function"==typeof e.TwineScript_Print?e.TwineScript_Print():e instanceof Map?(e=Array.from(e.entries()),n.containsError(e)?e:e.reduce(function(e,t){var n=_slicedToArray(t,2),r=n[0],i=n[1];return e+"<tr><td>”+m(r)+“</td><td>”+m(i)+“</td></tr>"},"<table class=datamap>")+"</table>"):e instanceof Set?Array.from(e.values()).map(m)+"":Array.isArray(e)?e.map(m)+"":r(e)?n.create("unimplemented","I don't know how to print this value yet."):e+""}var g=e.impossible,y=e.toJSLiteral,v=Object.freeze({isObject:r,singleTypeCheck:a,isValidDatamapName:o,collectionType:i,isSequential:s,clone:u,coerceToString:c,objectName:l,typeName:f,is:p,contains:d,subset:h,printBuiltinValue:m,numericIndex:/^(?:[1-9]\d*|0)$/,unique:function(e,t,n){return!n.slice(t+1).some(function(t){return p(e,t)})}});return v}),define("twinescript/compiler",["utils"],function(e){function t(e,t){for(var n=0;n<e.length;n+=1)if(t.includes(e[n].type))return n;return 0/0}function n(e,n){return e.length-1-t.apply(void 0,[[].concat(_toConsumableArray(e)).reverse(),n])}function r(e,r){var i=[];return e.length?([["error"],["comma"],["spread"],["to"],["into"],{rightAssociative:["where","via"]},{rightAssociative:["with","making","each"]},["augmentedAssign"],["and","or"],["is","isNot"],["contains","isIn"],["inequality"],["addition","subtraction"],["multiplication","division"],["not"],["belongingProperty"],["belongingOperator","belongingItOperator"],{rightAssociative:["property"]},{rightAssociative:["itsProperty"]},["belongingItProperty"],{rightAssociative:["possessiveOperator","itsOperator"]},["twineLink"],["macro"],["grouping"]]["most"===r?"reverse":"valueOf"]().some(function(r){var o=void 0;return o=r.rightAssociative?n(e,r.rightAssociative):t(e,r),!Number.isNaN(o)&&o>-1?(i=[e[o],o],!0):void 0}),i):i}function i(e){if("inequality"===e.type){var t=e.operator;return e.negate?{">":"<=","<":">=",">=":"<","<=":">"}[t]:t}return e.type}function o(e){var t=i(e);return{">":"<","<":">",">=":"<=","<=":">=",contains:"isIn",isIn:"contains",is:"isNot",isNot:"is"}[t]}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isVarRef,c=t.whitespaceError,l=t.elidedComparison;if(e=[].concat(e),!e.length)return n&&c?"TwineError.create('operation',"+s(c)+")":"";var f=e[0];if(1===e.length){if("identifier"===f.type)return n?"VarRef.create(Operations.Identifiers,"+s(f.text)+")":" Operations.Identifiers."+f.text.toLowerCase()+" ";if("variable"===f.type)return"VarRef.create(State.variables,"+s(f.name)+")"+(n?"":".get()");if("tempVariable"===f.type)return"VarRef.create(section.stack[0].tempVariables,"+s(f.name)+")"+(n?"":".get()");if("hookRef"===f.type)return" HookSet.create('?"+f.name+"') ";if("string"===f.type)return f.text.replace(/\n/g,"\\n");if("colour"===f.type)return"Colour.create("+s(f.colour)+")";if("root"===f.type)return a(f.children);if("whitespace"===f.type&&n&&c)return"TwineError.create('operation',"+s(c)+")"}var p=void 0,d=r(e,"least"),h=_slicedToArray(d,2);f=h[0],p=h[1];var m=(f||{}).type,g=function(e){return{isVarRef:!0,whitespaceError:"I need usable data to be on the "+e+' of "'+f.text+'".'}},y=void 0,v=void 0,b=void 0,w=void 0,x=void 0,T=void 0,S=!0,O=!0,j=!1;if(m){if("error"===m)return"TwineError.create('syntax',"+s(f.message)+")";if("comma"===m)b=",",O=!1;else if("spread"===m)b="Operations.makeSpreader(",v=a(e.slice(p+1))+")",S=!1;else if("to"===m)x="to",v=a(e.slice(p+1),g("right")),y="Operations.setIt("+a(e.slice(0,p),g("left"))+")";else if("into"===m)x="into",v=a(e.slice(0,p),g("left")),y="Operations.setIt("+a(e.slice(p+1),g("right"))+")";else if("where"===m||"via"===m)y="Lambda.create("+(a(e.slice(0,p),{isVarRef:!0,whitespaceError:null}).trim()||"undefined")+",",b=s(f.type)+",",v=s(a(e.slice(p+1)))+")";else if("with"===m||"making"===m||"each"===m){var k=e.slice(p+1);![2,3].includes(k.length)||"whitespace"!==k[0].type||"tempVariable"!==k[1].type||k[2]&&"whitespace"!==k[2].type?(y="TwineError.create('operation','I need a temporary variable to the right of \\'",b=f.type,v="\\'.')"):"each"===m?(y="Lambda.create(",b=a(k,g("right")).trim(),v=",'where','true')"):(y="Lambda.create("+(a(e.slice(0,p),{isVarRef:!0,whitespaceError:null}).trim()||"undefined")+",",b=s(f.type)+",",v=s(k[1].name)+")")}else if("augmentedAssign"===m)x=f.operator,y=a(e.slice(0,p),g("left")),v="Operations['"+x+"']("+(a(e.slice(0,p))+","+a(e.slice(p+1)))+")";else if("and"===m||"or"===m){var C=function(){var t=function e(t){var n=r(t,"least"),i=_slicedToArray(n,2),o=i[0],a=i[1];if(o)return["inequality","is","isNot","isIn","contains"].includes(o.type)?o:["and","or"].includes(o.type)?e(t.slice(0,a))||e(t.slice(a+1)):void 0},u=t(e.slice(0,p)),c=t(e.slice(p+1)),d="TwineError.create('operation', 'This use of \"is not\" and \""+m+"\" is grammatically ambiguous','Maybe try rewriting this as \"__ is not __ "+m+" __ is not __\"') ";if(w=f.type,l===f.type)w="",y=a(e.slice(0,p),{isVarRef:n,elidedComparison:l}).trim(),b=",",v=a(e.slice(p+1),{elidedComparison:l}).trim();else if(u&&!c){var h=r(e.slice(0,p),"least"),g=_slicedToArray(h,1),x=g[0],T=s(i(x));if("isNot"===x.type)return{v:d};v="Operations.elidedComparisonOperator("+s(f.type)+","+T+","+a(e.slice(p+1),{elidedComparison:m})+")"}else if(!u&&c){var S=c,O=e.indexOf(S),j=s(o(S));if("isNot"===S.type)return{v:d};v="Operations.elidedComparisonOperator("+s(f.type)+","+j+","+a(e.slice(0,p),{elidedComparison:m})+")",y=a([].concat(_toConsumableArray(e.slice(O+1)),[Object.assign(Object.create(S),_defineProperty({},"inequality"===S.type?"operator":"type",o(S)))],_toConsumableArray(e.slice(p+1,O))))}}();if("object"===("undefined"==typeof C?"undefined":_typeof(C)))return C.v}else if("is"===m||"isNot"===m||"contains"===m||"isIn"===m||"inequality"===m)j=!0,w=i(f);else if("addition"===m||"subtraction"===m)w=f.text,y=a(e.slice(0,p)),y.trim()||(y="0");else if("multiplication"===m||"division"===m)w=f.text;else if("not"===m)b=" ",v="Operations.not("+a(e.slice(p+1))+")",S=!1;else if("belongingProperty"===m)v="VarRef.create("+a(e.slice(p+1),g("right"))+","+s(f.name)+")"+(n?"":".get()"),b=" ",S=O=!1;else if("belongingOperator"===m||"belongingItOperator"===m)f.type.includes("It")?(v="Operations.Identifiers.it",O=!1):v=a(e.slice(p+1),g("right")),T="belonging";else if("property"===m)y="VarRef.create("+a(e.slice(0,p),g("left"))+","+s(f.name)+")"+(n?"":".get()"),b=" ",S=O=!1;else if("itsProperty"===m||"belongingItProperty"===m)y="VarRef.create(Operations.Identifiers.it,"+s(f.name)+").get()",b=" ",S=O=!1;else if("possessiveOperator"===m||"itsOperator"===m)f.type.includes("it")&&(y="Operations.Identifiers.it",S=!1),T="possessive";else if("twineLink"===m)b='Macros.run("link-goto", [section,'+s(f.innerText)+","+s(f.passage)+"])",S=O=!1;else if("macro"===m){var A=f.children[0];"macroName"!==A.type&&u("Compiler.compile","macro token had no macroName child token"),b="Macros.run("+(A.isMethodCall?a(A.children):'"'+f.name+'"')+", [section,"+a(f.children.slice(1))+"])",S=O=!1}else"grouping"===m&&(b="("+a(f.children,{isVarRef:n})+")",S=O=!1)}else;return p>-1?(w&&(n=!1),y=y||a(e.slice(0,p),{isVarRef:n}).trim(),v=v||a(e.slice(p+1)).trim(),j&&!y&&(y=" Operations.Identifiers.it "),S&&!y||O&&!v?"TwineError.create('operation','I need some code to be "+(S?"left ":"")+(S&&O?"and ":"")+(O?"right ":"")+'of "'+f.text+"\"')":b?y+b+v:x?"Operations.makeAssignmentRequest("+[y,v,s(x)]+")":T?"VarRef.create("+("belonging"===T?v:y)+",{computed:true,value:"+("belonging"===T?y:v)+"})"+(n?"":".get()"):w?" Operations["+s(w)+"]("+y+","+v+") ":""):1===e.length?(("value"in e[0]?e[0].value:e[0].text)+"").trim()||" ":e.reduce(function(e,t){return e+a(t,{isVarRef:n})},"")}var s=e.toJSLiteral,u=e.impossible;return a}),define("renderer",["utils","markup","twinescript/compiler","internaltypes/twineerror"],function(e,t,n,r){function i(e,t){return"<"+t+">"+e+"</"+t+">"}function o(e,t){var n=l.render(e.children);return n&&i(n,t)}var a=e.escape,s=e.impossible,u=e.toJSLiteral,c=e.insensitiveName,l=void 0,f="text-align: center; max-width:50%; ";return l={options:{},exec:function(){var e=void 0,n=void 0;return function(r){return"string"!=typeof r?(s("Renderer.exec","source was not a string, but "+("undefined"==typeof r?"undefined":_typeof(r))),""):r===e?n:(e=r,n=l.render(t.lex(r).children))}}(),render:function e(s){var p="",d=[];if(!s)return p;for(var h=s.length,m=0;h>m;m+=1){var g=s[m];switch(g.type){case"error":p+=r.create("syntax",g.message).render(a(g.text))[0].outerHTML;break;case"numbered":case"bulleted":var y="numbered"===g.type?"ol":"ul";p+="<"+y+">";for(var v=1;h>m&&s[m]&&s[m].type===g.type;)p+=("<"+y+">").repeat(Math.max(0,s[m].depth-v)),p+=("</"+y+">").repeat(Math.max(0,v-s[m].depth)),v=s[m].depth,p+=o(s[m],"li"),m+=1;m-=1,p+=("</"+y+">").repeat(v+1);break;case"align":for(;g&&"align"===g.type;){var b=g,w=b.align,x=m+=1;if("left"===w){m-=1;break}for(;h>m&&s[m]&&"align"!==s[m].type;)m+=1;var T=e(s.slice(x,m)),S="";switch(w){case"center":S+=f+"margin-left: auto; margin-right: auto;";break;case"justify":case"right":S+="text-align: "+w+";";break;default:+w&&(S+=f+"margin-left: "+w+"%;")}p+="<tw-align "+(S?'style="'+S+'"':"")+(l.options.debug?' title="'+g.text+'"':"")+">"+T+"</tw-align>\n",g=s[m]}break;case"column":for(var O=[];g&&"column"===g.type;){var j=g,k=j.column,C=m+=1;if("none"===k){m-=1;break}for(;h>m&&s[m]&&"column"!==s[m].type;)m+=1;O.push({text:g.text,type:k,body:e(s.slice(C,m)),width:g.width,marginLeft:g.marginLeft,marginRight:g.marginRight}),g=s[m]}O.length&&!function(){var e=O.reduce(function(e,t){return e+t.width},0);p+="<tw-columns>"+O.map(function(t){return"<tw-column type="+t.type+' style="width:'+t.width/e*100+"%; margin-left: "+t.marginLeft+"em; margin-right: "+t.marginRight+'em;" '+(l.options.debug?' title="'+t.text+'"':"")+">"+t.body+"</tw-column>\n"}).join("")+"</tw-columns>"}();break;case"heading":p+=o(g,"h"+g.depth);break;case"br":(!d.length||/td|th/.test(d[0]))&&(p+=" ");break;case"hr":p+="---";break;case"escapedLine":case"comment":break;case"inlineUrl":p+='<a class="link" href="'+a(g.text)+'">'+g.text+"</a>";break;case"scriptStyleTag":case"tag":var A=g.text.toLowerCase();/^<\/?(?:table|thead|tbody|tr|tfoot|td|th)\b/.test(A)&&d[g.text.startsWith("</")?"shift":"unshift"](A),p+=g.text.startsWith("</")?g.text:g.text.replace(/>$/," data-raw>");break;case"sub":case"sup":case"strong":case"em":p+=o(g,g.type);break;case"strike":p+=o(g,"s");break;case"bold":p+=o(g,"b");break;case"italic":p+=o(g,"i");break;case"twineLink":var E=t.lex("(link-goto:"+u(g.innerText)+","+u(g.passage)+")");p+=e(E.children);break;case"hook":p+="<tw-hook "+(g.hidden?"hidden ":"")+(g.name?'name="'+c(g.name)+'"':"")+(l.options.debug&&g.name?' title="Hook: ?'+g.name+'"':"")+' source="'+a(g.innerText)+'"></tw-hook>';break;case"verbatim":p+=i(a(g.innerText).replace(/\n/g," "),"tw-verbatim");break;case"collapsed":p+=o(g,"tw-collapsed");break;case"variable":case"tempVariable":case"macro":p+='<tw-expression type="'+g.type+'" name="'+a(g.name||g.text)+'"'+(l.options.debug?' title="'+a(g.text)+'"':"")+' js="'+a(n(g))+'"></tw-expression>';break;default:p+=g.children&&g.children.length?e(g.children):g.text}}return p}},Object.freeze(l)}),define("internaltypes/changedescriptor",["jquery","utils","renderer","datatypes/hookset"],function(e,t,n,r){var i=t.assertOnlyHas,o=t.impossible,a=t.transitionIn,s=n.exec,u=void 0,c={source:"",innerSource:"",enabled:!0,target:null,append:"append",newTargets:null,transition:"instant",transitionTime:null,loopVars:null,styles:null,attr:null,data:null,section:null,summary:function(){var e=this;return["source","innerSource","enabled","target","append","newTargets","transition","transitionTime"].filter(function(t){return e.hasOwnProperty(t)}).concat([this.attr.length&&"attr",this.styles.length&&"styles",Object.keys(this.loopVars).length&&"loopVars",Object.keys(this.data).length&&"data"].filter(Boolean))},create:function(e,t){var n=Object.assign(Object.create(this),{attr:[].concat(this.attr||[]),styles:[].concat(this.styles||[]),loopVars:this.loopVars||{},data:this.data||{}},e);return t&&t.run(n),n},update:function(){var e=this,t=this.section,n=this.newTargets,i=this.target,o=function(t){Array.isArray(e.styles)&&e.styles.length>0&&setTimeout(function(){return t.css(Object.assign.apply(Object,_toConsumableArray([{}].concat(e.styles))))}),e.attr&&e.attr.forEach(function(e){return t.attr(e)}),e.data&&t.data(e.data)};Array.isArray(n)&&n.length&&(i=n.map(function(e){return e.target})),[].concat(i).forEach(function(e){r.isPrototypeOf(e)?e.forEach(t,o):o(e)})},render:function(){var t=this,n=this.source,l=this.transition,f=this.transitionTime,p=this.enabled,d=this.section,h=this.newTargets,m=this.target,g=this.append;if(i(this,u),!p||void 0!==m.popAttr("hidden"))return c.create({target:m,data:{hiddenSource:n}}).update(),e();if(Array.isArray(h)&&h.length&&(m=h),!m)return o("ChangeDescriptor.render","ChangeDescriptor has source but not a target!"),e();var y=e(),v=function(e){return function(n){y=y.add(t.create({target:n,append:e, newTargets:null}).render())}};if([].concat(m).forEach(function t(n,i,o){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:g;r.isPrototypeOf(n)?n.forEach(d,v(a)):n.jquery&&n.length>1?Array.from(n).map(e).forEach(v(a)):n.target&&n.append&&t(n.target,i,o,n.append)}),y.length||Array.isArray(m)||r.isPrototypeOf(m))return y;if(!(g in m)){if("replace"!==g)return o("Section.render","The target doesn't have a '"+g+"' method."),e();m.empty(),g="append"}return y=e(n&&e.parseHTML(s(n),document,!0)),m[g](y.length?y:void 0),this.update(),l&&a("replace"===g?m:y,l,f),y}};return u=Object.keys(c),Object.seal(c)}),define("datatypes/changercommand",["utils","utils/operationutils","internaltypes/changedescriptor"],function(e,t,n){var r=e.impossible,i=t.is,o={},a={changer:!0,TwineScript_TypeName:"a changer command",TwineScript_Print:function(){return"[A ’“+this.macroName+”’ command]"},summary:function(){var e=n.create();return this.run(e),e.summary()},create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Array.isArray(t)||r("ChangerCommand.create","params was not an array"),Object.assign(Object.create(this),{macroName:e,params:t,next:n,TwineScript_ObjectName:"a ("+e+":) command"})},"TwineScript_+":function(e){for(var t=this.TwineScript_Clone(),n=t;n.next;)n=n.next;return n.next=e,t},TwineScript_is:function(e){return a.isPrototypeOf(e)?this.macroName===e.macroName&&i(this.params,e.params)&&i(this.next,e.next):void 0},TwineScript_Clone:function(){return this.create(this.macroName,this.params,this.next)},run:function(e){o[this.macroName].apply(o,[e].concat(_toConsumableArray(this.params))),this.next&&this.next.run(e)},register:function(e,t){o[e]=t}};return Object.freeze(a)}),define("state",["utils","passages","datatypes/changercommand","internaltypes/twineerror","utils/operationutils"],function(e,t,n,r,i){function o(e){p=(l[f]||c).create(e)}var a=e.impossible,s=i.objectName,u={TwineScript_ObjectName:"this story's variables",TwineScript_VariableStore:!0},c={passage:"",variables:u,create:function(e,t){var n=Object.create(c);return n.passage=e||"",n.variables=Object.assign(Object.create(this.variables),t),n}},l=[],f=-1,p=c.create(),d=void 0,h={forward:[],back:[],load:[]},m=Object.assign({get passage(){return p.passage},get variables(){return p.variables},get pastLength(){return f},get futureLength(){return l.length-1-f},passageNameVisited:function(e){var n=0;if(!t.get(e))return 0;for(var r=0;f>=r;r++)n+=+(e===l[r].passage);return n},passageNameLastVisited:function(e){if(!t.get(e))return 1/0;if(e===p.passage)return 0;for(var n=f;n>0;n--)if(l[n].passage===e)return f-n+1;return 1/0},pastPassageNames:function(){for(var e=[],t=f-1;t>=0;t--)e.unshift(l[t].passage);return e},play:function(e){p||a("State.play","present is undefined!"),p.passage=e,l=l.slice(0,f+1).concat(p),f+=1,o(e),h.forward.forEach(function(t){return t(e)})},rewind:function(e){var t=1,n=!1;if(e)if("string"==typeof e){if(t=this.passageNameLastVisited(e),t===1/0)return}else"number"==typeof e&&(t=e);for(;t>0&&f>0;t--)n=!0,f-=1;return n&&(o(l[f].passage),h.back.forEach(function(e){return e()})),n},fastForward:function(e){var t=1,n=!1;for("number"==typeof e&&(t=e);t>0&&l.length>0;t--)n=!0,f+=1;return n&&(o(l[f].passage),h.forward.forEach(function(e){return e(l[f].passage,"fastForward")})),n},on:function(e,t){return e in h?("function"!=typeof t||h[e].includes(t)||h[e].push(t),m):void a("State.on","invalid event name")},reset:function(){window.jasmine&&(l=[],f=-1,p=c.create(),d=void 0,h.load.forEach(function(e){return e(l)}))}},function(){function e(t){return"number"==typeof t||"boolean"==typeof t||"string"==typeof t||null===t||Array.isArray(t)&&t.every(e)||t instanceof Set&&Array.from(t).every(e)||t instanceof Map&&Array.from(t.values()).every(e)||n.isPrototypeOf(t)}function t(e,t){return t instanceof Set?{"(dataset:)":Array.from(t)}:t instanceof Map?{"(datamap:)":Array.from(t)}:n.isPrototypeOf(t)?{changer:{name:t.macroName,params:t.params,next:t.next}}:t}function i(e,t){if(t&&"object"===("undefined"==typeof t?"undefined":_typeof(t))){if(Array.isArray(t["(dataset:)"]))return new Set(t["(dataset:)"]);if(Array.isArray(t["(datamap:)"]))return new Map(t["(datamap:)"]);if(t.changer&&"object"===_typeof(t.changer)){var r=t.changer,i=r.name,o=r.params,a=r.next;return n.create(i,o,a)}}return t}function a(){var n=l.slice(0,f+1),i=n.map(function(t){return Object.keys(t.variables).filter(function(n){return t.variables[n]&&!e(t.variables[n])}).map(function(e){return[e,t.variables[e]]})});if(d||(d=i.reduce(function(e,t,n){var r=_slicedToArray(t,2),i=r[0],o=r[1];return e||i&&[i,o,n+1]},void 0)),d){var o=d,a=_slicedToArray(o,3),u=a[0],c=a[1],p=a[2];return r.create("saving","The variable $"+u+" holds "+s(c)+" (which is, or contains, a complex data value) on turn "+p+"; the game can no longer be saved.")}try{return JSON.stringify(n,t)}catch(e){return!1}}function p(e){var t=void 0,n=u;try{t=JSON.parse(e,i)}catch(e){return!1}return Array.isArray(t)?(t=t.map(function(e){return"object"===("undefined"==typeof e?"undefined":_typeof(e))&&e.hasOwnProperty("passage")&&e.hasOwnProperty("variables")?(e.variables=Object.assign(Object.create(n),e.variables),n=e.variables,Object.assign(Object.create(c),e)):!1})).includes(!1)?!1:(l=t,h.load.forEach(function(e){return e(l)}),f=l.length-1,void o(l[f].passage)):!1}return{serialise:a,deserialise:p}}());return Object.seal(c),Object.freeze(m)}),define("datatypes/colour",["jquery"],function(e){function t(t){if(t in s)return s[t];var n=e("<p>").css("background-color",t).css("background-color");return n=n.startsWith("rgb")?n.match(/\d+/g).reduce(function(e,t,n){return e["rgb"[n]]=+t,e},{}):{r:192,g:192,b:192},s[t]=n,n}function n(e){return"string"!=typeof e?e:(e=e.replace("#",""),e=e.replace(o,"$1$1$2$2$3$3"),{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16)})}function r(e){var t=e.r,n=e.g,r=e.b,i=e.a;t/=255,n/=255,r/=255;var o=Math.max(t,n,r),a=Math.min(t,n,r),s=(o+a)/2,u=o-a;if(o===a)return{h:0,s:0,l:s};var c=void 0;switch(o){case t:c=(n-r)/u+(r>n?6:0);break;case n:c=(r-t)/u+2;break;case r:c=(t-n)/u+4}c=Math.round(60*c);var l=s>.5?u/(2-o-a):u/(o+a);return{h:c,s:l,l:s,a:i}}function i(e){function t(e){return 0>e&&(e+=1),e>1&&(e-=1),1/6>e?u+6*(s-u)*e:.5>e?s:2/3>e?u+(s-u)*(2/3-e)*6:u}var n=e.h,r=e.s,i=e.l,o=e.a;if(0===r){var a=Math.floor(255*i);return{r:a,g:a,b:a}}n/=360;var s=.5>i?i*(1+r):i+r-i*r,u=2*i-s;return{r:Math.floor(255*t(n+1/3)),g:Math.floor(255*t(n)),b:Math.floor(255*t(n-1/3)),a:o}}var o=/^([\da-fA-F])([\da-fA-F])([\da-fA-F])$/,a=/^([\da-fA-F])([\da-fA-F])([\da-fA-F])([\da-fA-F])([\da-fA-F])([\da-fA-F])$/,s=Object.create(null),u=Object.freeze({TwineScript_TypeName:"a colour",TwineScript_ObjectName:"a colour","TwineScript_+":function(e){var t=this,n=e;return u.create({r:Math.min(Math.round(.6*(t.r+n.r)),255),g:Math.min(Math.round(.6*(t.g+n.g)),255),b:Math.min(Math.round(.6*(t.b+n.b)),255),a:(t.a+n.a)/2})},TwineScript_Print:function(){return"<tw-colour style='background-color:rgba("+[this.r,this.g,this.b,this.a].join(",")+");'>"},TwineScript_is:function(e){return u.isPrototypeOf(e)&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a},TwineScript_Clone:function(){return u.create(this)},toRGBAString:function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.a+")"},get h(){return r(this).h},get s(){return r(this).s},get l(){return r(this).l},create:function(e){return"string"==typeof e?this.create(u.isHexString(e)?n(e):t(e)):!("h"in e&&"s"in e&&"l"in e)||"r"in e||"g"in e||"b"in e?("a"in e&&"number"==typeof e.a||(e.a=1),Object.assign(Object.create(this),e)):this.create(i(e))},isHexString:function(e){return"string"==typeof e&&"#"===e[0]&&(e.slice(1).match(o)||e.slice(1).match(a))},isCSS3Function:function(e){return"string"==typeof e&&/^(?:rgb|hsl)a?\(\s*\d+\s*,\s*\d+%?\s*,\s*\d+%?(?:,\s*\d+(?:\.\d+)?\s*)?\)$/.test(e)}});return u}),define("internaltypes/varref",["state","internaltypes/twineerror","utils","utils/operationutils","datatypes/hookset","datatypes/colour"],function(e,t,n,r,i,o){function a(e,n){var r=void 0;if(e instanceof Map&&(r=t.containsError(j(e,n))))return r;if(w(e)){var o=void 0;if("number"==typeof n){if(0===n)return t.create("property","You can't access elements at position 0 of "+x(e)+".","Only positive and negative position values exist.");n>0&&(n-=1)}else if("string"==typeof n&&(o=/(\d+)(?:st|[nr]d|th)last/i.exec(n)))n=-o[1]+"";else if("string"==typeof n&&(o=/(\d+)(?:st|[nr]d|th)/i.exec(n)))n=o[1]-1+"";else if("last"===n)n=-1;else if(!["length","any","all"].includes(n)||i.isPrototypeOf(e))return t.create("property","You can only access position strings/numbers ('4th', 'last', '2ndlast', (2), etc.)"+(i.isPrototypeOf(e)?"":", 'length', 'any' and 'all'")+" of "+x(e)+", not "+x(n)+".")}else if(e instanceof Set){if(!["length","any","all"].includes(n))return t.create("property","You can only get the 'length', 'any' and 'all' of a "+x(e)+".","To check contained values, use the 'contains' operator.");"length"===n&&(n="size")}else if("number"==typeof e||"boolean"==typeof e)return t.create("property","You can't get data values from "+x(e)+".");return n}function s(e,n){var r=n.reduce(function(r,i,o){i.computed&&(i=i.value),k.isPrototypeOf(i)&&(i=i.get()),i=Array.isArray(i)?i.map(function(t){return a(e,t)}):a(e,i);var s=void 0;return(s=t.containsError(r,i))?s:(o<n.length-1&&(e=g(e,i)),r.push(i),r)},[]);return{compiledPropertyChain:r,deepestObject:e}}function u(e,t){return 0>t-0&&Math.abs(t)<=e.length?e.length+(t-0):t}function c(e,t){var n={any:"'any' value of ",all:"'all' values of "}[t];return{determiner:t,array:[].concat(_toConsumableArray(e)),TwineScript_ObjectName:n+x(e),TwineScript_TypeName:n+"a data structure",TwineScript_Unstorable:!0,TwineScript_Print:function(){return"[“+this.TwineScript_TypeName+“]"}}}function l(e,t){if(void 0===e)return e;if(e instanceof Map)return e.get(t);if(w(e)&&(t=u(e,t)),"any"===t||"all"===t)return c(e,t);if(e.TwineScript_GetElement&&Number.isFinite(+t))return e.TwineScript_GetElement(t);var n=e[t];return"function"!=typeof n?n:void 0}function f(e){return e.computed?"string"==typeof e.value?"('"+e.value+"')":"("+e.value+")":"'"+e+"'"}function p(e,n){if(Array.isArray(n))return n.map(function(t){return p(e,t)});if(i.isPrototypeOf(e))return t.create("operation","I can't modify "+x(e),"You should alter hooks indirectly using macros like (replace:) or (enchant:).");if(e instanceof Set)return t.create("operation","I can't modify "+x(e),"You should use an (array:) if you need to modify the data inside this dataset.");if(o.isPrototypeOf(e))return t.create("operation","I can't modify the components of "+x(e));if(e instanceof Map)return!0;if(w(e)){if(["length","any","all"].includes(n))return t.create("operation","I can't forcibly alter the '"+n+"' of "+x(e)+".");if(+n!==(0|n))return t.create("property",x(e)+" can only have position keys ('3rd', '1st', (5), etc.), not "+f(n)+".")}return e.TwineScript_Identifiers&&n in e?t.create("keyword","I can't alter the value of the '"+n+"' identifier.","You can only alter data in variables and hooks, not fixed identifiers."):"number"==typeof e||"boolean"==typeof e?t.create("operation","You can't alter the data values of "+x(e)+"."):!0}function d(e,t,n){var r=t;e instanceof Map?e.set(t,n):(w(e)&&(t=u(e,t)),e.TwineScript_Set?e.TwineScript_Set(t):e[t]=n),A.set.forEach(function(t){return t(e,r,n)})}function h(e,t){var n=t;w(e)&&(t=u(e,t)),Array.isArray(e)&&O.exec(t)?e.splice(t,1):e instanceof Map||e instanceof Set?e.delete(t):delete e[t],A.delete.forEach(function(t){return t(e,n)})}function m(e){function t(){return e}return{get:t,set:t,delete:t,varref:!0}}function g(n,r,o){if(Array.isArray(r))return i.isPrototypeOf(n)?n.TwineScript_GetElement(r):r.map(function(e){return g(n,e,e)})["string"==typeof n?"join":"valueOf"]("");"string"==typeof n&&(n=[].concat(_toConsumableArray(n)));var a=l(n,r);return void 0===a?n===e.variables?C:n.TwineScript_VariableStore?t.create("property","There isn't a temp variable named _"+o+" in this place.","Temp variables only exist inside the same passage and hook in which they're (set:)."):t.create("property","I can't find a "+f(o)+" data name in "+x(n)):a}function y(e,n){var r=this,i=this.compiledPropertyChain.reduce(function(e,t){var n=void 0;return n=0===e.length?r.object:g.apply(void 0,_toConsumableArray(e[e.length-1])),e.push([n,t])&&e},[]).reduceRight(e,n);return t.containsError(i)?i:void 0}var v=n.impossible,b=r.isObject,w=r.isSequential,x=r.objectName,T=r.typeName,S=r.clone,O=r.numericIndex,j=r.isValidDatamapName,k=void 0,C=0,A={set:[],delete:[]};return k=Object.freeze({varref:!0,get:function(){return g(this.deepestObject,this.compiledPropertyChain.slice(-1)[0],this.propertyChain.slice(-1)[0])},set:function(e){return!this.object||this.object.TwineScript_VariableStore||this.object.TwineScript_Identifiers?y.call(this,function(e,n,r){var i=_slicedToArray(n,2),o=i[0],a=i[1],s=void 0;if(s=t.containsError(e,o,a)||t.containsError(p(o,a)))return s;if(e&&e.TwineScript_Unstorable)return t.create("operation",T(e)+" can't be stored.");if(r>0&&(o=S(o)),"string"==typeof o){var u=function(){if("string"!=typeof e||e.length!==(Array.isArray(a)?a.length:1))return{v:t.create("datatype","I can't put this non-string value, "+x(e)+", in a string.")};o=[].concat(_toConsumableArray(o));var n=[].concat(_toConsumableArray(e));[].concat(a).forEach(function(e){0>0+e&&(e=o.length+(0+e)),o=[].concat(_toConsumableArray(o.slice(0,e)),[n.shift()],_toConsumableArray(o.slice(e+1)))}),o=o.join("")}();if("object"===("undefined"==typeof u?"undefined":_typeof(u)))return u.v}else b(o)&&(Array.isArray(a)&&w(e)?("string"==typeof e&&(e=[].concat(_toConsumableArray(e))),a.map(function(t,n){return[t,e[n]]}).forEach(function(e){var t=_slicedToArray(e,2),n=t[0],r=t[1];return d(o,n,r)})):d(o,a,e));return o},e):t.create("macrocall","I can't (set:) "+x(this)+", if the "+(x(this.object).match(/ (.+$)/)||["","value"])[1]+" isn't stored in a variable.","Modifying data structures that aren't in variables won't change the game state at all.")},delete:function(){return y.call(this,function(e,n,r){var i=_slicedToArray(n,2),o=i[0],a=i[1],s=void 0;if(s=t.containsError(e,o,a)||t.containsError(p(o,a)))return s;if(r>0&&(o=S(o)),null===e){var c="string"==typeof o;c&&(o=[].concat(_toConsumableArray(o))),Array.isArray(a)?(w(o)&&(a=[].concat(_toConsumableArray(new Set(a))),a.sort(function(e,t){return u(o,t)-u(o,e)})),a.forEach(function(e){return h(o,e)})):h(o,a),c&&(o=o.join(""))}else d(o,a,e);return o},null)},create:function(e,n){var r=void 0;if(r=t.containsError(e))return m(r);n=[].concat(n),k.isPrototypeOf(e)&&(n=e.propertyChain.concat(n),e=e.object);var i=s(e,n),o=i.compiledPropertyChain,a=i.deepestObject;return(r=t.containsError(o,a))?m(r):Object.assign(Object.create(k),{object:e,propertyChain:n,compiledPropertyChain:o,deepestObject:a})},get TwineScript_ObjectName(){var t=this,n=function(n,r){return r||t.object!==e.variables&&!t.object.TwineScript_VariableStore?f(n):n};return(this.object===e.variables?"$":this.object.TwineScript_VariableStore?"_":x(this.object)+"'s ")+(1===this.propertyChain.length?n(this.propertyChain[0]):this.propertyChain.reduce(function(e,t,r){return e+"'s "+n(t,r)}))+(this.object.TwineScript_VariableStore?" in "+this.object.TwineScript_VariableStoreName:"")},on:function(e,t){return e in A?("function"!=typeof t||A[e].includes(t)||A[e].push(t),k):void v("VarRef.on","invalid event name")}})}),define("utils/naturalsort",[],function(){return function(e){return function t(n,r){var i,o,a,s,u=/(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi,c=/(^[ ]*|[ ]*$)/g,l=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,f=/^0x[0-9a-f]+$/i,p=/^0/,d=function(e){return t.insensitive&&(""+e).toLowerCase()||""+e},h=d(n).replace(c,"")||"",m=d(r).replace(c,"")||"",g=h.replace(u,"\x00$1\x00").replace(/\0$/,"").replace(/^\0/,"").split("\x00"),y=m.replace(u,"\x00$1\x00").replace(/\0$/,"").replace(/^\0/,"").split("\x00"),v=parseInt(h.match(f))||1!==g.length&&h.match(l)&&Date.parse(h),b=parseInt(m.match(f))||v&&m.match(l)&&Date.parse(m)||null;if(e&&window.Intl&&window.Intl.Collator&&(a=window.Intl.Collator(e)),b){if(b>v)return-1;if(v>b)return 1}for(var w=0,x=Math.max(g.length,y.length);x>w;w++){if(i=!(g[w]||"").match(p)&&parseFloat(g[w])||g[w]||0,o=!(y[w]||"").match(p)&&parseFloat(y[w])||y[w]||0,isNaN(i)!==isNaN(o))return isNaN(i)?1:-1;if(("undefined"==typeof i?"undefined":_typeof(i))!==("undefined"==typeof o?"undefined":_typeof(o)))i+="",o+="";else if("string"==typeof i&&a&&(s=a.compare(i,o),0!==s))return s;if(o>i)return-1;if(i>o)return 1}return 0}}}),define("internaltypes/varscope",[],function(){return{TwineScript_ObjectName:"the temporary variables",TwineScript_VariableStore:!0}}),define("datatypes/lambda",["utils","utils/operationutils","internaltypes/varscope","internaltypes/twineerror"],function(e,t,n,r){var i=e.toJSLiteral,o=e.insensitiveName,a=(e.plural,t.typeName,t.objectName,t.singleTypeCheck,Object.freeze({lambda:!0,TwineScript_TypeName:"a lambda",TwineScript_ObjectName:function(){return'a "'+("making"in this?"making ... ":"")+("with"in this?"with ... ":"")+("where"in this?"where ... ":"")+("via"in this?"via ... ":"")+'" lambda'},TwineScript_Print:function(){return"[A lambda]`”},TwineScript_is:function(e){return e===this},TypeSignature:function(e){return{pattern:“lambda”,innerType:a,clauses:e}},create:function(e,t,i){var s=void 0;if(r.containsError(e))return e;if(a.isPrototypeOf(e)){if(t in e&&(“where”!==t||“true”!==e[t]))return r.create(“syntax”,“This lambda has two ’“+t+”’ clauses.”);s=e}else{if(void 0!==e&&(!e||!e.varref||!n.isPrototypeOf(e.object)||e.propertyChain.length>1))return r.create(“syntax”,“This lambda needs to start with a single temporary variable.”);s=Object.create(this),s.loop=e?e.propertyChain[0]:""}s[t]=i;var u=[s.making,s.with,s.loop].filter(function(e,t,n){return e&&n.indexOf(o(e))!==t});return u.length?r.create(“syntax”,“This lambda has two variables named ’“+u[0]+”’.”,“Lambdas should have all-unique parameter names.”):s},apply:function(e,t){var o=t.loop,a=t.with,s=t.making,u=t.fail,c=t.pass,l=t.ignoreVia,f=Object.create(n);[[this.loop,o],[this.with,a],[this.making,s]].forEach(function(e){var t=_slicedToArray(e,2),n=t[0],r=t[1];return n&&(f[n]=r)}),e.stack.unshift(Object.assign(Object.create(null),{tempVariables:f})),e.eval(“Operations”).initialiseIt(!o||this.with||this.making?r.create(“operation”,“I can’t use ‘it’, or an implied ‘it’, in “+this.TwineScript_ObjectName()):o);var p=!l&&this.via,d=e.eval(“where”in this?”Operations.where(“+this.where+”,”+(p||i(c))+”,“+i(u)+”)“:p||i(c));return e.stack.shift(),d},filter:function(e,t){var n=this;return t.reduce(function(t,i){var o=void 0;if(o=r.containsError(t))return o;var a=n.apply(e,{loop:i,pass:!0,fail:!1,ignoreVia:!0});return(o=r.containsError(a))?o:t.concat(a?[i]:[])},[])}}));return a}),define(“macros”,[“jquery”,“utils/naturalsort”,“utils”,“utils/operationutils”,“datatypes/changercommand”,“datatypes/lambda”,“datatypes/hookset”,“internaltypes/twineerror”],function(e,t,n,r,i,o,a,s){function u(e){return function(n){n=n.reduce(function(e,n){if(n&&n.spreader===!0){var r=n.value;if(Array.isArray(r)||“string”==typeof r)for(var i=0;i<r.length;i++)e.push(r[i]);else r instanceof Set?e.push.apply(e,_toConsumableArray(Array.from(r).sort(t(“en”)))):e.push(s.create(“operation”,“I can’t spread out “+g(r)+”, because it is not a string, dataset, or array.”))}else e.push(n);return e},[]);var r=s.containsError(n);return r?r:e.apply(void 0,_toConsumableArray(n))}}function c(e,t,n){n=[].concat(n||[]),e=”(”+(Array.isArray(e)&&e.length>1?e[0]:e)+”:)“;var r=void 0;return r=n.length>0?”The “+e+” macro must only be given “+n.map(y).reduce(function(e,t,n,r){return e+(0===n?"":n<r.length-1?”, ”:”, and ”)+t},"")+(n.length>1?”, in that order”:”.”):“The macro must not be given any data - just write “+e+”.“,function(i){for(var a=arguments.length,u=Array(a>1?a-1:0),c=1;a>c;c++)u[c-1]=arguments[c];for(var l=void 0,f=(function(t){var i=n[t],a=u[t];return t>=n.length&&!l?{v:s.create(“datatype”,u.length-n.length+” too many values were given to this “+e+” macro.”,r)}:(i||(i=l),!i.innerType||“rest”!==i.pattern&&“zero or more”!==i.pattern||(l=i.innerType,“rest”===i.pattern&&(i=i.innerType)),v(a,i)?void 0:void 0===a?{v:s.create(“datatype”,“The “+e+” macro needs “+d(n.length-t,“more value”)+”.“,r)}:a&&a.TwineScript_Unstorable&&(i===b.TypeSignature.Any||i.innerType&&i.innerType===b.TypeSignature.Any)?{v:s.create(“datatype”,e+“‘s “+p(t+1)+” value, “+g(a)+”, is not valid data for this macro.”,r)}:a&&o.isPrototypeOf(a)&&“lambda”===i.pattern?{v:s.create(“datatype”,e+“‘s “+p(t+1)+” value (a lambda) should have “+h([“where”,“making”,“via”,“with”].filter(function(e){return i.clauses.includes(e)}).map(function(e){return”a ’“+e+”’ clause”}))+”, not “+h([“where”,“making”,“via”,“with”].filter(function(e){return e in a}).map(function(e){return”a ’“+e+”’ clause”}))+”.”)}:{v:s.create(“datatype”,e+“‘s “+p(t+1)+” value is “+g(a)+”, but should be “+y(i)+”.“,i.message||r)})}),m=0,w=Math.max(u.length,n.length);w>m;m+=1){var x=f(m,w);if(“object”===(“undefined”==typeof x?“undefined”:_typeof(x)))return x.v}return t.apply(void 0,[i].concat(u))}}function l(e,t){Array.isArray(e)?e.forEach(function(e){return m(w,f(e),t)}):m(w,f(e),t)}var f=n.insensitiveName,p=n.nth,d=n.plural,h=n.andList,m=n.lockProperty,g=r.objectName,y=r.typeName,v=r.singleTypeCheck,b=void 0,w={};return b={has:function(e){return e=f(e),w.hasOwnProperty(e)},get:function(e){return e=f(e),w.hasOwnProperty(e)&&w[e]},add:function e(t,n,r){return l(t,u(c(t,n,r))),e},addChanger:function e(t,n,r,o){return l(t,u(c(t,n,o))),i.register(Array.isArray(t)?t[0]:t,r),e},TypeSignature:{optional:function(e){return{pattern:“optional”,innerType:e}},zeroOrMore:function(e){return{pattern:“zero or more”,innerType:e}},either:function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return{pattern:“either”,innerType:t}},rest:function(e){return{pattern:“rest”,innerType:e}},wrapped:function(e,t){return{pattern:“wrapped”,innerType:e,message:t}},Any:{TwineScript_TypeName:“anything”}},run:function(e,t){return s.containsError(e)?e:b.has(e)?b.get(e)(t):s.create(“macrocall”,“I can’t run the macro ’“+e+”’ because it doesn’t exist.”,“Did you mean to run a macro? If you have a word written like (this:), it is regarded as a macro name.”)}},Object.freeze(b)}),define(“datatypes/assignmentrequest”,[“utils”],function(e){var t=e.assertMustHave,n=Object.freeze({assignmentRequest:!0,TwineScript_TypeName:“a ‘to’ or ‘into’ expression”,TwineScript_ObjectName:“a ‘to’ or ‘into’ expression”,TwineScript_Unstorable:!0,create:function(e,n,r){return t(e,[“varref”]),Object.assign(Object.create(this),{dest:e,src:n,operator:r})}});return n}),define(“twinescript/operations”,[“state”,“datatypes/colour”,“datatypes/assignmentrequest”,“utils/operationutils”,“internaltypes/twineerror”],function(e,t,n,r,i){function o(e,t,n,r){return n=n||“do this to”,function(o,a){1===t.length&&(a=o);var s=void 0;return(s=i.containsError(o,a))?s:(“undefined”==typeof o?“undefined”:_typeof(o))!==e||(“undefined”==typeof a?“undefined”:_typeof(a))!==e?i.create(“operation”,“I can only “+n+” “+e+“s, not “+m((“undefined”==typeof o?“undefined”:_typeof(o))!==e?o:a)+”.“,r):t(o,a)}}function a(e){return function(t,n){var r=void 0;return(r=i.containsError(t,n))?r:t&&t.varref?i.create(“operation”,“I can’t give an expression a new value.”):(“undefined”==typeof t?“undefined”:_typeof(t))!==(“undefined”==typeof n?“undefined”:_typeof(n))||c(t)!==c(n)?l(e,t,n)||i.create(“operation”,m(t)+” isn’t the same type of data as “+m(n)):e(t,n)}}function s(e){var t=function t(n,r){var o=void 0;if(o=i.containsError(n,r))return o;if(y=n,n.determiner){var a=function(){var e=“all”===n.determiner;return{v:n.array.reduce(function(n,o){var a=void 0,s=t(o,r);return(a=i.containsError(n,s))?a:e?n&&s:n||s},e)}}();if(“object”===(“undefined”==typeof a?“undefined”:_typeof(a)))return a.v}else if(r.determiner){var s=function(){var e=“all”===r.determiner;return{v:r.array.reduce(function(r,o){var a=void 0,s=t(n,o);return(a=i.containsError(r,s))?a:e?r&&s:r||s},e)}}();if(“object”===(“undefined”==typeof s?“undefined”:_typeof(s)))return s.v}return e(n,r)};return t}var u=r.isObject,c=r.collectionType,l=r.coerceToString,f=r.is,p=r.clone,d=r.unique,h=r.contains,m=(r.typeName,r.objectName),g=void 0,y=0,v=“If one of these values is a number, you may want to write a check that it ‘is not 0’. Also, if one is a string, you may want to write a check that it ‘is not "" ’.“;return g={create:function(e){var t=Object.create(this);return t.Identifiers={TwineScript_Identifiers:!0,get it(){return y},get time(){return Date.now()-e.timestamp}},t},elidedComparisonOperator:function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;n>i;i++)r[i-2]=arguments[i];return r.reduce(function(n,r){return”boolean”==typeof r?r:ge},“and”===e)},and:o(“boolean”,a(function(e,t){return e&&t}),“use ‘and’ to join”,v),or:o(“boolean”,a(function(e,t){return e||t}),“use ‘or’ to join”,v),not:o(“boolean”,function(e){return!e},“use ‘not’ to invert”,v),”+“:a(function(e,t){if(Array.isArray(e))return[].concat(_toConsumableArray(e),_toConsumableArray(t));var n=void 0;return e instanceof Map?(n=new Map(e),t.forEach(function(e,t){return n.set(t,e)}),n):e instanceof Set?new Set([].concat(_toConsumableArray(e),toConsumableArray(t)).filter(d).map(p)):“function”==typeof e[“TwineScript+”]?e”TwineScript_+”:“string|number|boolean”.includes(“undefined”==typeof e?“undefined”:_typeof(e))?e+t:i.create(“operation”,“I can’t use + on “+m(e)+”.”)}),”-“:a(function(e,t){if(Array.isArray(e))return e.filter(function(e){return!t.some(function(t){return f(e,t)})});if(e instanceof Set){var n=function(){var n=[].concat(_toConsumableArray(t));return{v:new Set([].concat(_toConsumableArray(e)).filter(function(e){return!n.some(function(t){return f(e,t)})}))}}();if(“object”===(“undefined”==typeof n?“undefined”:_typeof(n)))return n.v}return”string”==typeof e?e.split(t).join(""):“number”==typeof e?e-t:i.create(“operation”,“I can’t use - on “+m(e)+”.”)}),"":o(“number”,a(function(e,t){return e*t}),“multiply”),”/“:o(“number”,a(function(e,t){return 0===t?i.create(“operation”,“I can’t divide “+m(e)+” by zero.”):e/t}),“divide”),”%“:o(“number”,a(function(e,t){return 0===t?i.create(“operation”,“I can’t modulo “+m(e)+” by zero.”):e%t}),“modulus”),”<“:s(o(“number”,a(function(e,t){return t>e}),“do < to”)),”>“:s(o(“number”,a(function(e,t){return e>t}),“do > to”)),”<=“:s(o(“number”,a(function(e,t){return t>=e}),“do <= to”)),”>=“:s(o(“number”,a(function(e,t){return e>=t}),“do >= to”)),is:s(f),isNot:s(function(e,t){return!g.is(e,t)}),contains:s(h),isIn:s(function(e,t){return h(t,e)}),where:function(e,t,n){var r=void 0;return(r=i.containsError(e))?r:“boolean”!=typeof e?i.create(“operation”,“This lambda’s ‘where’ clause must evaluate to true or false, not “+m(e)+”.”):e?t:n},makeSpreader:function(e){return{value:e,spreader:!0}},makeAssignmentRequest:function(e,t,r){var o=i.containsError(e,t);return o?o:u(e)&&“varref”in e?n.create(e,t,r):i.create(“operation”,“I can’t store a new value inside “+m(e)+”.”)},setIt:function(e){return i.containsError(e)?e:e.varref?(y=e.get(),e):i.create(“operation”,“I can’t put a new value into “+m(e)+”.”)},initialiseIt:function(e){y=e}},Object.freeze(g)}),define(“twinescript/environ”,[“macros”,“state”,“utils”,“datatypes/colour”,“datatypes/hookset”,“datatypes/lambda”,“internaltypes/varref”,“internaltypes/twineerror”,“twinescript/operations”],function(Macros,State,Utils,Colour,HookSet,Lambda,VarRef,TwineError,OperationsProto){return function(section){“object”===(“undefined”==typeof section?“undefined”:_typeof(section))&§ion||Utils.impossible(“TwineScript.environ”,“no Section argument was given!”);var Operations=OperationsProto.create(section);return section.eval=function(){try{for(var _len5=arguments.length,args=Array(_len5),_key5=0;_len5>_key5;_key5++)args[_key5]=arguments[_key5];return eval(args.join(""))}catch(e){return e}},section}}),define(“internaltypes/twinenotifier”,[“jquery”,“utils”],function(e,t){var n=t.impossible,r={create:function(e){return e||n(“TwineNotifier.create”,“called with only 1 string.”),Object.assign(Object.create(r),{message:e})},render:function(){return e("
var i=b(t);e(i).parents(“tw-collapsed”).length||(i=null),t.findAndFilter(“br:not([data-raw])“).filter(n).replaceWith(document.createTextNode(” ”));var o=t.textNodes(),a=0;o.reduce(function(e,t){return n(t)?(t.textContent=t.textContent.replace(/\s+/g,” ”),” ”!==t.textContent[0]||e&&e.textContent&&!(e.textContent.search(/\s$/)>-1)||(t.textContent=t.textContent.slice(1)),t):document.createTextNode(“A”)},r),[].concat(_toConsumableArray(o)).reverse().every(function(e){return n(e)?e.textContent.match(/^\s*$/)?(a+=e.textContent.length,e.textContent="",!0):(e.textContent=e.textContent.replace(/\s+$/,function(e){return a+=e.length,""}),!1):!1}),a>0&&i&&(o[o.length-1].textContent+=” ”),t[0]&&j()&&t[0].normalize()}function x(e,t){var r=this,i=e.popAttr(“source”)||"";t=void 0===t?20:t;var o=function o(){r.inDOM()&&(r.renderInto(i,e,{append:“replace”}),e.find(n.expression+“[name=‘stop’]“).length||r.inDOM()&&setTimeout(o,t))};setTimeout(o,t)}var T=s.printBuiltinValue,S=s.objectName,O=void 0,j=function(){var t=void 0;return function(){if(void 0!==t)return t;var n=e("
");return n[0].normalize?(n.append(document.createTextNode(“0-”),document.createTextNode(“2”),document.createTextNode(""))[0].normalize(),t=1===n.contents().length):t=!1}}();return O={create:function(n){n instanceof e&&1===n.length||t.impossible(“Section.create”,“called with no DOM element”);var r=Object.assign(Object.create(this),{timestamp:Date.now(),dom:n||t.storyElement,stack:[],enchantments:[]});return r=i(r)},inDOM:function(){return e(t.storyElement).find(this.dom).length>0},evaluateTwineMarkup:function(t){var n=e("
");this.renderInto(t,n);var r=void 0;return(r=n.find(“tw-error”)).length>0?r:n.text()},renderInto:function(t,r){for(var i=this,o=f.create({target:r,source:t,section:this}),a=arguments.length,s=Array(a>2?a-2:0),u=2;a>u;u++)s[u-2]=arguments[u];s.forEach(function(e){e.changer?e.run(o):Object.assign(o,e)}),r=o.target,this.stack.length>=50&&d.create(“infinite”,“Printing this expression may have trapped me in an infinite loop.”).render(r.attr(“title”)).replaceAll(r);var c=function(t,o){var a=t.render();i.stack.unshift(o);var s=i;a.findAndFilter(n.hook+”,“+n.expression).each(function(){var t=e(this);switch(t.tag()){case n.hook:if(t.attr(“hidden”)&&(t.removeAttr(“hidden”),t.data(“hiddenSource”,t.popAttr(“source”))),t.attr(“source”)&&s.renderInto(t.popAttr(“source”),t),t.find(“[earlyexit]“).length)return!1;break;case n.expression:if(t.attr(“js”)){var r=y.call(s,t);return”earlyexit”===r?(a.attr(“earlyexit”,!0),!1):r}}}),a.length&&r instanceof e&&r.is(n.hook)&&r.parents(“tw-collapsed”).length>0&&w(a),a.findAndFilter(n.collapsed).each(function(){w(e(this))}),i.stack.shift()},l=Object.create(this.stack.length?this.stack[0].tempVariables:p),h=r&&r.tag();return l.TwineScript_VariableStoreName=h===n.hook?r.attr(“name”)?”?”+r.attr(“name”):“an unnamed hook”:h===n.expression?“a “+r.attr(“type”)+” expression”:h===n.passage?“this passage”:“an unknown scope”,Object.keys(o.loopVars).length?!function(){for(var e=Object.assign({},o.loopVars),t=Math.min.apply(Math,_toConsumableArray(Object.keys(e).map(function(t){return e[t].length})));t>0;t-=1)c(o,{tempVariables:Object.keys(e).reduce(function(t,n){return t[n]=e[n].shift(),t},Object.create(l))})}():c(o,{tempVariables:l}),0===this.stack.length&&this.updateEnchantments(),o.enabled},updateEnchantments:function(){this.enchantments.forEach(function(e){e.disenchant(),e.enchantScope()})}},Object.preventExtensions(O)}),define(“engine”,[“jquery”,“utils”,“utils/selectors”,“state”,“section”,“passages”],function(e,t,n,r,i,o){function a(){var t=e("