/** vim: et:ts=4:sw=4:sts=4 * @license RequireJS 2.1.18 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/jrburke/requirejs for details */ /* ==================================================================== | | Amber Smalltalk | http://amber-lang.net | ====================================================================== ====================================================================== | | Copyright (c) 2010-2014 | Nicolas Petton | | Copyright (c) 2012-2014 | The Amber team https://github.com/amber-smalltalk?tab=members | Amber contributors https://github.com/amber-smalltalk/amber/graphs/contributors | | Amber is released under the MIT license | | Permission is hereby granted, free of charge, to any person obtaining | a copy of this software and associated documentation files (the | 'Software'), to deal in the Software without restriction, including | without limitation the rights to use, copy, modify, merge, publish, | distribute, sublicense, and/or sell copies of the Software, and to | permit persons to whom the Software is furnished to do so, subject to | the following conditions: | | The above copyright notice and this permission notice shall be | included in all copies or substantial portions of the Software. | | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ==================================================================== */ // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: http://codemirror.net/LICENSE /*! * jQuery JavaScript Library v2.1.4 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2015-04-28T16:01Z */ /*! * Sizzle CSS Selector Engine v2.2.0-pre * http://sizzlejs.com/ * * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2014-12-16 */ /*! jQuery UI - v1.11.4 - 2015-03-11 * http://jqueryui.com * Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ /*! * jQuery UI Core 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/category/ui-core/ */ /*! * jQuery UI Widget 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/jQuery.widget/ */ /*! * jQuery UI Mouse 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/mouse/ */ /*! * jQuery UI Position 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/position/ */ /*! * jQuery UI Accordion 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/accordion/ */ /*! * jQuery UI Menu 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/menu/ */ /*! * jQuery UI Autocomplete 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/autocomplete/ */ /*! * jQuery UI Button 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/button/ */ /*! * jQuery UI Datepicker 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/datepicker/ */ /*! * jQuery UI Draggable 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/draggable/ */ /*! * jQuery UI Resizable 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/resizable/ */ /*! * jQuery UI Dialog 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/dialog/ */ /*! * jQuery UI Droppable 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/droppable/ */ /*! * jQuery UI Effects 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/category/effects-core/ */ /*! * jQuery Color Animations v2.1.2 * https://github.com/jquery/jquery-color * * Copyright 2014 jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * Date: Wed Jan 16 08:47:09 2013 -0600 */ /*! * jQuery UI Effects Blind 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/blind-effect/ */ /*! * jQuery UI Effects Bounce 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/bounce-effect/ */ /*! * jQuery UI Effects Clip 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/clip-effect/ */ /*! * jQuery UI Effects Drop 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/drop-effect/ */ /*! * jQuery UI Effects Explode 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/explode-effect/ */ /*! * jQuery UI Effects Fade 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/fade-effect/ */ /*! * jQuery UI Effects Fold 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/fold-effect/ */ /*! * jQuery UI Effects Highlight 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/highlight-effect/ */ /*! * jQuery UI Effects Size 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/size-effect/ */ /*! * jQuery UI Effects Scale 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/scale-effect/ */ /*! * jQuery UI Effects Puff 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/puff-effect/ */ /*! * jQuery UI Effects Pulsate 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/pulsate-effect/ */ /*! * jQuery UI Effects Shake 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/shake-effect/ */ /*! * jQuery UI Effects Slide 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/slide-effect/ */ /*! * jQuery UI Effects Transfer 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/transfer-effect/ */ /*! * jQuery UI Progressbar 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/progressbar/ */ /*! * jQuery UI Selectable 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/selectable/ */ /*! * jQuery UI Selectmenu 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/selectmenu */ /*! * jQuery UI Slider 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/slider/ */ /*! * jQuery UI Sortable 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/sortable/ */ /*! * jQuery UI Spinner 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/spinner/ */ /*! * jQuery UI Tabs 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/tabs/ */ /*! * jQuery UI Tooltip 1.11.4 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/tooltip/ */ var requirejs,require,define;(function(global){function isFunction(e){return ostring.call(e)==="[object Function]"}function isArray(e){return ostring.call(e)==="[object Array]"}function each(e,t){if(e){var n;for(n=0;n-1;n-=1)if(e[n]&&t(e[n],n,e))break}}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var n;for(n in e)if(hasProp(e,n)&&t(e[n],n))break}function mixin(e,t,n,r){return t&&eachProp(t,function(t,i){if(n||!hasProp(e,i))r&&typeof t=="object"&&t&&!isArray(t)&&!isFunction(t)&&!(t instanceof RegExp)?(e[i]||(e[i]={}),mixin(e[i],t,n,r)):e[i]=t}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,n,r){var i=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return i.requireType=e,i.requireModules=r,n&&(i.originalError=n),i}function newContext(e){function m(e){var t,n;for(t=0;t0&&(e.splice(t-1,2),t-=2)}}}function g(e,t,n){var r,i,s,u,a,f,l,c,h,p,d,v,g=t&&t.split("/"),y=o.map,b=y&&y["*"];e&&(e=e.split("/"),l=e.length-1,o.nodeIdCompat&&jsSuffixRegExp.test(e[l])&&(e[l]=e[l].replace(jsSuffixRegExp,"")),e[0].charAt(0)==="."&&g&&(v=g.slice(0,g.length-1),e=v.concat(e)),m(e),e=e.join("/"));if(n&&y&&(g||b)){s=e.split("/");e:for(u=s.length;u>0;u-=1){f=s.slice(0,u).join("/");if(g)for(a=g.length;a>0;a-=1){i=getOwn(y,g.slice(0,a).join("/"));if(i){i=getOwn(i,f);if(i){c=i,h=u;break e}}}!p&&b&&getOwn(b,f)&&(p=getOwn(b,f),d=u)}!c&&p&&(c=p,h=d),c&&(s.splice(0,h,c),e=s.join("/"))}return r=getOwn(o.pkgs,e),r?r:e}function y(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===r.contextName)return t.parentNode.removeChild(t),!0})}function b(e){var t=getOwn(o.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),r.require.undef(e),r.makeRequire(null,{skipMap:!0})([e]),!0}function w(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function E(e,t,n,i){var s,o,u,a,f=null,l=t?t.name:null,h=e,p=!0,m="";return e||(p=!1,e="_@r"+(d+=1)),a=w(e),f=a[0],e=a[1],f&&(f=g(f,l,i),o=getOwn(c,f)),e&&(f?o&&o.normalize?m=o.normalize(e,function(e){return g(e,l,i)}):m=e.indexOf("!")===-1?g(e,l,i):e:(m=g(e,l,i),a=w(m),f=a[0],m=a[1],n=!0,s=r.nameToUrl(m))),u=f&&!o&&!n?"_unnormalized"+(v+=1):"",{prefix:f,name:m,parentMap:t,unnormalized:!!u,url:s,originalName:h,isDefine:p,id:(f?f+"!"+m:m)+u}}function S(e){var t=e.id,n=getOwn(u,t);return n||(n=u[t]=new r.Module(e)),n}function x(e,t,n){var r=e.id,i=getOwn(u,r);hasProp(c,r)&&(!i||i.defineEmitComplete)?t==="defined"&&n(c[r]):(i=S(e),i.error&&t==="error"?n(i.error):i.on(t,n))}function T(e,t){var n=e.requireModules,r=!1;t?t(e):(each(n,function(t){var n=getOwn(u,t);n&&(n.error=e,n.events.error&&(r=!0,n.emit("error",e)))}),r||req.onError(e))}function N(){globalDefQueue.length&&(apsp.apply(l,[l.length,0].concat(globalDefQueue)),globalDefQueue=[])}function C(e){delete u[e],delete a[e]}function k(e,t,n){var r=e.map.id;e.error?e.emit("error",e.error):(t[r]=!0,each(e.depMaps,function(r,i){var s=r.id,o=getOwn(u,s);o&&!e.depMatched[i]&&!n[s]&&(getOwn(t,s)?(e.defineDep(i,c[s]),e.check()):k(o,t,n))}),n[r]=!0)}function L(){var e,n,i=o.waitSeconds*1e3,u=i&&r.startTime+i<(new Date).getTime(),f=[],l=[],c=!1,h=!0;if(t)return;t=!0,eachProp(a,function(e){var t=e.map,r=t.id;if(!e.enabled)return;t.isDefine||l.push(e);if(!e.error)if(!e.inited&&u)b(r)?(n=!0,c=!0):(f.push(r),y(r));else if(!e.inited&&e.fetched&&t.isDefine){c=!0;if(!t.prefix)return h=!1}});if(u&&f.length)return e=makeError("timeout","Load timeout for modules: "+f,null,f),e.contextName=r.contextName,T(e);h&&each(l,function(e){k(e,{},{})}),(!u||n)&&c&&(isBrowser||isWebWorker)&&!s&&(s=setTimeout(function(){s=0,L()},50)),t=!1}function A(e){hasProp(c,e[0])||S(E(e[0],null,!0)).init(e[1],e[2])}function O(e,t,n,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(n,t,!1)}function M(e){var t=e.currentTarget||e.srcElement;return O(t,r.onScriptLoad,"load","onreadystatechange"),O(t,r.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function _(){var e;N();while(l.length){e=l.shift();if(e[0]===null)return T(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));A(e)}}var t,n,r,i,s,o={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},u={},a={},f={},l=[],c={},h={},p={},d=1,v=1;return i={require:function(e){return e.require?e.require:e.require=r.makeRequire(e.map)},exports:function(e){e.usingExports=!0;if(e.map.isDefine)return e.exports?c[e.map.id]=e.exports:e.exports=c[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(o.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},n=function(e){this.events=getOwn(f,e.id)||{},this.map=e,this.shim=getOwn(o.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},n.prototype={init:function(e,t,n,r){r=r||{};if(this.inited)return;this.factory=t,n?this.on("error",n):this.events.error&&(n=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=n,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check()},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(this.fetched)return;this.fetched=!0,r.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();r.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))},load:function(){var e=this.map.url;h[e]||(h[e]=!0,r.load(this.map.id,e))},check:function(){if(!this.enabled||this.enabling)return;var e,t,n=this.map.id,i=this.depExports,s=this.exports,o=this.factory;if(!this.inited)this.fetch();else if(this.error)this.emit("error",this.error);else if(!this.defining){this.defining=!0;if(this.depCount<1&&!this.defined){if(isFunction(o)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{s=r.execCb(n,o,i,s)}catch(u){e=u}else s=r.execCb(n,o,i,s);this.map.isDefine&&s===undefined&&(t=this.module,t?s=t.exports:this.usingExports&&(s=this.exports));if(e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",T(this.error=e)}else s=o;this.exports=s,this.map.isDefine&&!this.ignore&&(c[n]=s,req.onResourceLoad&&req.onResourceLoad(r,this.map,this.depMaps)),C(n),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}},callPlugin:function(){var e=this.map,t=e.id,n=E(e.prefix);this.depMaps.push(n),x(n,"defined",bind(this,function(n){var i,s,a,f=getOwn(p,this.map.id),l=this.map.name,c=this.map.parentMap?this.map.parentMap.name:null,h=r.makeRequire(e.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){n.normalize&&(l=n.normalize(l,function(e){return g(e,c,!0)})||""),s=E(e.prefix+"!"+l,this.map.parentMap),x(s,"defined",bind(this,function(e){this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),a=getOwn(u,s.id),a&&(this.depMaps.push(s),this.events.error&&a.on("error",bind(this,function(e){this.emit("error",e)})),a.enable());return}if(f){this.map.url=r.nameToUrl(f),this.load();return}i=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),i.error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(u,function(e){e.map.id.indexOf(t+"_unnormalized")===0&&C(e.map.id)}),T(e)}),i.fromText=bind(this,function(n,s){var u=e.name,a=E(u),f=useInteractive;s&&(n=s),f&&(useInteractive=!1),S(a),hasProp(o.config,t)&&(o.config[u]=o.config[t]);try{req.exec(n)}catch(l){return T(makeError("fromtexteval","fromText eval for "+t+" failed: "+l,l,[t]))}f&&(useInteractive=!0),this.depMaps.push(a),r.completeLoad(u),h([u],i)}),n.load(e.name,h,i,o)})),r.enable(n,this),this.pluginMaps[n.id]=n},enable:function(){a[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var n,s,o;if(typeof e=="string"){e=E(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,o=getOwn(i,e.id);if(o){this.depExports[t]=o(this);return}this.depCount+=1,x(e,"defined",bind(this,function(e){if(this.undefed)return;this.defineDep(t,e),this.check()})),this.errback?x(e,"error",bind(this,this.errback)):this.events.error&&x(e,"error",bind(this,function(e){this.emit("error",e)}))}n=e.id,s=u[n],!hasProp(i,n)&&s&&!s.enabled&&r.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(u,e.id);t&&!t.enabled&&r.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var n=this.events[e];n||(n=this.events[e]=[]),n.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),e==="error"&&delete this.events[e]}},r={config:o,contextName:e,registry:u,defined:c,urlFetched:h,defQueue:l,Module:n,makeModuleMap:E,nextTick:req.nextTick,onError:T,configure:function(e){e.baseUrl&&e.baseUrl.charAt(e.baseUrl.length-1)!=="/"&&(e.baseUrl+="/");var t=o.shim,n={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){n[t]?(o[t]||(o[t]={}),mixin(o[t],e,!0,!0)):o[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(p[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,n){isArray(e)&&(e={deps:e}),(e.exports||e.init)&&!e.exportsFn&&(e.exportsFn=r.makeShimExports(e)),t[n]=e}),o.shim=t),e.packages&&each(e.packages,function(e){var t,n;e=typeof e=="string"?{name:e}:e,n=e.name,t=e.location,t&&(o.paths[n]=e.location),o.pkgs[n]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(u,function(e,t){!e.inited&&!e.map.unnormalized&&(e.map=E(t,null,!0))}),(e.deps||e.callback)&&r.require(e.deps||[],e.callback)},makeShimExports:function(e){function t(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}return t},makeRequire:function(t,n){function s(o,a,f){var l,h,p;return n.enableBuildCallback&&a&&isFunction(a)&&(a.__requireJsBuild=!0),typeof o=="string"?isFunction(a)?T(makeError("requireargs","Invalid require call"),f):t&&hasProp(i,o)?i[o](u[t.id]):req.get?req.get(r,o,t,s):(h=E(o,t,!1,!0),l=h.id,hasProp(c,l)?c[l]:T(makeError("notloaded",'Module name "'+l+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(_(),r.nextTick(function(){_(),p=S(E(null,t)),p.skipMap=n.skipMap,p.init(o,a,f,{enabled:!0}),L()}),s)}return n=n||{},mixin(s,{isBrowser:isBrowser,toUrl:function(e){var n,i=e.lastIndexOf("."),s=e.split("/")[0],o=s==="."||s==="..";return i!==-1&&(!o||i>1)&&(n=e.substring(i,e.length),e=e.substring(0,i)),r.nameToUrl(g(e,t&&t.id,!0),n,!0)},defined:function(e){return hasProp(c,E(e,t,!1,!0).id)},specified:function(e){return e=E(e,t,!1,!0).id,hasProp(c,e)||hasProp(u,e)}}),t||(s.undef=function(e){N();var n=E(e,t,!0),r=getOwn(u,e);r.undefed=!0,y(e),delete c[e],delete h[n.url],delete f[e],eachReverse(l,function(t,n){t[0]===e&&l.splice(n,1)}),r&&(r.events.defined&&(f[e]=r.events),C(e))}),s},enable:function(e){var t=getOwn(u,e.id);t&&S(e).enable()},completeLoad:function(e){var t,n,r,i=getOwn(o.shim,e)||{},s=i.exports;N();while(l.length){n=l.shift();if(n[0]===null){n[0]=e;if(t)break;t=!0}else n[0]===e&&(t=!0);A(n)}r=getOwn(u,e);if(!t&&!hasProp(c,e)&&r&&!r.inited){if(o.enforceDefine&&(!s||!getGlobal(s))){if(b(e))return;return T(makeError("nodefine","No define call for "+e,null,[e]))}A([e,i.deps||[],i.exportsFn])}L()},nameToUrl:function(e,t,n){var i,s,u,a,f,l,c,h=getOwn(o.pkgs,e);h&&(e=h),c=getOwn(p,e);if(c)return r.nameToUrl(c,t,n);if(req.jsExtRegExp.test(e))f=e+(t||"");else{i=o.paths,s=e.split("/");for(u=s.length;u>0;u-=1){a=s.slice(0,u).join("/"),l=getOwn(i,a);if(l){isArray(l)&&(l=l[0]),s.splice(0,u,l);break}}f=s.join("/"),f+=t||(/^data\:|\?/.test(f)||n?"":".js"),f=(f.charAt(0)==="/"||f.match(/^[\w\+\.\-]+:/)?"":o.baseUrl)+f}return o.urlArgs?f+((f.indexOf("?")===-1?"?":"&")+o.urlArgs):f},load:function(e,t){req.load(r,e,t)},execCb:function(e,t,n,r){return t.apply(r,n)},onScriptLoad:function(e){if(e.type==="load"||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=M(e);r.completeLoad(t.id)}},onScriptError:function(e){var t=M(e);if(!b(t.id))return T(makeError("scripterror","Script error for: "+t.id,e,[t.id]))}},r.require=r.makeRequire(),r}function getInteractiveScript(){return interactiveScript&&interactiveScript.readyState==="interactive"?interactiveScript:(eachReverse(scripts(),function(e){if(e.readyState==="interactive")return interactiveScript=e}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.18",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,apsp=ap.splice,isBrowser=typeof window!="undefined"&&typeof navigator!="undefined"&&!!window.document,isWebWorker=!isBrowser&&typeof importScripts!="undefined",readyRegExp=isBrowser&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera=typeof opera!="undefined"&&opera.toString()==="[object Opera]",contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if(typeof define!="undefined")return;if(typeof requirejs!="undefined"){if(isFunction(requirejs))return;cfg=requirejs,requirejs=undefined}typeof require!="undefined"&&!isFunction(require)&&(cfg=require,require=undefined),req=requirejs=function(e,t,n,r){var i,s,o=defContextName;return!isArray(e)&&typeof e!="string"&&(s=e,isArray(t)?(e=t,t=n,n=r):e=[]),s&&s.context&&(o=s.context),i=getOwn(contexts,o),i||(i=contexts[o]=req.s.newContext(o)),s&&i.configure(s),i.require(e,t,n)},req.config=function(e){return req(e)},req.nextTick=typeof setTimeout!="undefined"?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,n){var r=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return r.type=e.scriptType||"text/javascript",r.charset="utf-8",r.async=!0,r},req.load=function(e,t,n){var r=e&&e.config||{},i;if(isBrowser)return i=req.createNode(r,t,n),i.setAttribute("data-requirecontext",e.contextName),i.setAttribute("data-requiremodule",t),i.attachEvent&&!(i.attachEvent.toString&&i.attachEvent.toString().indexOf("[native code")<0)&&!isOpera?(useInteractive=!0,i.attachEvent("onreadystatechange",e.onScriptLoad)):(i.addEventListener("load",e.onScriptLoad,!1),i.addEventListener("error",e.onScriptError,!1)),i.src=n,currentlyAddingScript=i,baseElement?head.insertBefore(i,baseElement):head.appendChild(i),currentlyAddingScript=null,i;if(isWebWorker)try{importScripts(n),e.completeLoad(t)}catch(s){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+n,s,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){head||(head=e.parentNode),dataMain=e.getAttribute("data-main");if(dataMain)return mainScript=dataMain,cfg.baseUrl||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(e,t,n){var r,i;typeof e!="string"&&(n=t,t=e,e=null),isArray(t)||(n=t,t=null),!t&&isFunction(n)&&(t=[],n.length&&(n.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(e,n){t.push(n)}),t=(n.length===1?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(r=currentlyAddingScript||getInteractiveScript(),r&&(e||(e=r.getAttribute("data-requiremodule")),i=contexts[r.getAttribute("data-requirecontext")])),(i?i.defQueue:globalDefQueue).push([e,t,n])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)})(this),define("node_modules/requirejs/require",function(){});var require;require||(require={config:function(e){require=e}}),require.config({paths:{typeahead:"bower_components/typeahead.js/dist/typeahead.jquery","helios/showdown":"bower_components/showdown/src/showdown",requireJS:"node_modules/requirejs/require","require-css":"bower_components/require-css",jquery:"bower_components/jquery/dist/jquery","jquery-ui":"bower_components/jquery-ui/jquery-ui",codemirror:"bower_components/codemirror",bootstrap:"bower_components/bootstrap/dist",mousetrap:"bower_components/mousetrap/mousetrap","jquery.blockUI":"bower_components/blockui/jquery.blockUI",helios:"bower_components/helios/src","helios/resources":"bower_components/helios/resources","helios/index":"bower_components/helios/index","amber-ide-starter-dialog":"bower_components/amber-ide-starter-dialog/lib/idestarter","amber/web":"bower_components/amber-contrib-web/src","amber/legacy":"bower_components/amber-contrib-legacy/src","amber/legacy/resources":"bower_components/amber-contrib-legacy/resources","amber/jquery":"bower_components/amber-contrib-jquery/src",amber:"bower_components/amber/support",amber_core:"bower_components/amber/src","amber-trysmalltalk":"src"},shim:{typeahead:{deps:["jquery"],exports:"jQuery.fn.typeahead"},"jquery-ui":{deps:["jquery","jquery"]},"codemirror/lib/codemirror":{deps:["css!codemirror/lib/codemirror","css!codemirror/lib/codemirror"]},"bootstrap/js/bootstrap":{deps:["jquery","css!bootstrap/css/bootstrap"]},"ensure-console":{exports:"console"}},map:{"*":{css:"require-css/css","00comment":"These are backward compatibility pointers.","amber-contrib-web/Web":"amber/web/Web","amber_core/Web":"amber/web/Web","amber_core/Canvas":"amber/web/Web","amber-attic/Benchfib":"amber/legacy/Benchfib","amber-attic/Examples":"amber/legacy/Examples","amber-attic/IDE":"amber/legacy/IDE","amber-contrib-jquery/Wrappers-JQuery":"amber/jquery/Wrappers-JQuery","amber_core/Kernel-ImportExport":"amber_core/Platform-ImportExport"}}}),require.config({map:{"*":{app:"deploy"}}}),define("config",function(){}),typeof console=="undefined"&&(this.console={log:function(){},warn:function(){},info:function(){},debug:function(){},error:function(){}}),define("amber/browser-compatibility",function(){}),define("amber/boot",["require","./browser-compatibility"],function(e){function t(e,t,n){function s(e,t,n){for(var r=Object.keys(n||e),i=r.length,s=0;s>"+e.selector+" from different class "+t.className);l(e),delete t.fn.prototype[e.jsSelector],delete t.methods[e.selector],h(t,e),c(t,e)},t.allSelectors=function(){return u.selectors}}function d(e,t){Array.prototype.addElement=function(e){if(typeof e=="undefined")return;this.indexOf(e)==-1&&this.push(e)},Array.prototype.removeElement=function(e){var t=this.indexOf(e);t!==-1&&this.splice(t,1)}}function v(e,t){e.ensure("classInit"),e.ensure("classes");var n=!1;t.initialize=function(){if(n)return;t.classes().forEach(function(e){t.init(e)}),S(),t.classes().forEach(function(e){e._initialize()}),n=!0},this.initialized=function(){return n},this.__init__=function(){t.addPackage("Kernel-Methods"),t.wrapClassName("Number","Kernel-Objects",Number,r.Object),t.wrapClassName("BlockClosure","Kernel-Methods",Function,r.Object),t.wrapClassName("Boolean","Kernel-Objects",Boolean,r.Object),t.wrapClassName("Date","Kernel-Objects",Date,r.Object),t.addPackage("Kernel-Collections"),t.addClass("Collection",r.Object,null,"Kernel-Collections"),t.addClass("IndexableCollection",r.Collection,null,"Kernel-Collections"),t.addClass("SequenceableCollection",r.IndexableCollection,null,"Kernel-Collections"),t.addClass("CharacterArray",r.SequenceableCollection,null,"Kernel-Collections"),t.wrapClassName("String","Kernel-Collections",String,r.CharacterArray),t.wrapClassName("Array","Kernel-Collections",Array,r.SequenceableCollection),t.wrapClassName("RegularExpression","Kernel-Collections",RegExp,r.Object),t.addPackage("Kernel-Exceptions"),t.wrapClassName("Error","Kernel-Exceptions",Error,r.Object),t.alias(r.Array,"OrderedCollection"),t.alias(r.Date,"Time")}}function m(e,t){var n=0;t.nextId=function(){return n+=1,n},t.readJSObject=function(e){var n=e.constructor===Object,i=e.constructor===Array,s=n?r.Dictionary._new():i?[]:e;for(var o in e)n&&s._at_put_(o,t.readJSObject(e[o])),i&&(s[o]=t.readJSObject(e[o]));return s},t.assert=function(e){if(typeof e=="boolean")return e;if(e!=null&&typeof e=="object"){e=e.valueOf();if(typeof e=="boolean")return e}r.NonBooleanReceiver._new()._object_(e)._signal()},t.reservedWords=["break","case","catch","continue","debugger","default","delete","do","else","finally","for","function","if","in","instanceof","new","return","switch","this","throw","try","typeof","var","void","while","with","arguments","class","const","enum","export","extends","import","super","implements","interface","let","package","private","protected","public","static","yield"],t.globalJsVariables=["window","document","process","global"]}function g(e,t){function u(e,t){this.sendIdx={},this.homeContext=e,this.setup=t||function(){},this.supercall=!1}function f(e,t){try{return l(e,t)}catch(n){throw d(n),a=null,n.amberHandled=!0,n}}function l(e,t){var n=a;a=new u(a,t);var r=e(a);return a=n,r}function c(e){var n=r.JavaScriptException._on_(e);try{n._signal()}catch(i){}var s=t.getThisContext();return p(e)&&h(s),n._context_(s),n}function h(e){var t=e,n=0;while(n<100)t&&(t=t.homeContext),n++;t&&(t.homeContext=undefined)}function p(e){return e instanceof RangeError}function d(e){e.smalltalkError||(e=c(e)),r.ErrorHandler._handleError_(e)}e.ensure("selectorConversion");var i=e.ensure("root"),s=i.nil,o=i.Object;n(u,o),this.__init__=function(){t.addPackage("Kernel-Methods"),t.wrapClassName("MethodContext","Kernel-Methods",u,r.Object,!1),u.prototype.locals={},u.prototype.receiver=null,u.prototype.selector=null,u.prototype.lookupClass=null,u.prototype.fill=function(e,t,n,r){this.receiver=e,this.selector=t,this.locals=n||{},this.lookupClass=r,this.homeContext&&(this.homeContext.evaluatedSelector=t)},u.prototype.fillBlock=function(e,t,n){this.locals=e||{},this.outerContext=t,this.index=n||0},u.prototype.init=function(){var e=this.homeContext;e&&e.init(),this.setup(this)},u.prototype.method=function(){var e,n=this.lookupClass||this.receiver.klass;while(!e&&n)e=n.methods[t.js2st(this.selector)],n=n.superclass;return e}};var a=null;t.withContext=function(e,t){return a?l(e,t):f(e,t)},t.getThisContext=function(){return a?(a.init(),a):s}}function y(e,t){function i(e,t,n){return e._doesNotUnderstand_(r.Message._new()._selector_(t)._arguments_([].slice.call(n)))}function s(e,n,s){if(e.klass!=null&&!e.allowJavaScriptCalls)return i(e,n,s);var u=t.st2prop(n);return u in e?o(e,u,s):i(r.JSObjectProxy._on_(e),n,s)}function o(e,t,r){var i=e[t];return typeof i=="function"&&!/^[A-Z]/.test(t)?i.apply(e,r||[]):r.length>0?(e[t]=r[0],n):i}e.ensure("selectorConversion");var n=e.ensure("root").nil;t.send=function(e,r,i,o){var u;return e==null&&(e=n),u=o?o.fn.prototype[r]:e.klass&&e[r],u?u.apply(e,i||[]):s(e,t.js2st(r),i)},t.accessJavaScript=o,this.messageNotUnderstood=s}function b(e,t){function n(e){return e.replace(/^_/,"").replace(/_/g,":")}function r(e){return e.replace(/^_/,"").replace(/_and/g,"&").replace(/_or/g,"|").replace(/_plus/g,"+").replace(/_minus/g,"-").replace(/_star/g,"*").replace(/_slash/g,"/").replace(/_backslash/g,"\\").replace(/_tild/g,"~").replace(/_gt/g,">").replace(/_lt/g,"<").replace(/_eq/g,"=").replace(/_comma/g,",").replace(/_at/g,"@")}t.st2js=function(e){var t="_"+e;return t=t.replace(/:/g,"_"),t=t.replace(/[\&]/g,"_and"),t=t.replace(/[\|]/g,"_or"),t=t.replace(/[+]/g,"_plus"),t=t.replace(/-/g,"_minus"),t=t.replace(/[*]/g,"_star"),t=t.replace(/[\/]/g,"_slash"),t=t.replace(/[\\]/g,"_backslash"),t=t.replace(/[\~]/g,"_tild"),t=t.replace(/>/g,"_gt"),t=t.replace(/",protocol:"converting",fn:function(e){function n(){return $globals.Association||(typeof Association=="undefined"?nil:Association)}var t=this,r;return r=$recv(n())._key_value_(t,e),r},messageSends:["key:value:"]}),$globals.Object),$core.addMethod($core.method({selector:"asJSON",protocol:"converting",fn:function(){function n(){return $globals.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}var e=this,t,r;return t=$recv(n())._new(),$recv($recv(e._class())._allInstanceVariableNames())._do_(function(n){return $recv(t)._at_put_(n,$recv(e._instVarAt_(n))._asJSON())}),r=t,r},messageSends:["new","do:","allInstanceVariableNames","class","at:put:","asJSON","instVarAt:"]}),$globals.Object),$core.addMethod($core.method({selector:"asJSONString",protocol:"converting",fn:function(){function t(){return $globals.JSON||(typeof JSON=="undefined"?nil:JSON)}var e=this,n;return n=$recv(t())._stringify_(e._asJSON()),n},messageSends:["stringify:","asJSON"]}),$globals.Object),$core.addMethod($core.method({selector:"asJavascript",protocol:"converting",fn:function(){var e=this,t;return t=e._asString(),t},messageSends:["asString"]}),$globals.Object),$core.addMethod($core.method({selector:"basicAt:",protocol:"accessing",fn:function(e){var t=this;return t[e]},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"basicAt:put:",protocol:"accessing",fn:function(e,t){var n=this;return n[e]=t},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"basicDelete:",protocol:"accessing",fn:function(e){var t=this;return delete t[e],e},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"basicPerform:",protocol:"message handling",fn:function(e){var t=this,n;return n=t._basicPerform_withArguments_(e,[]),n},messageSends:["basicPerform:withArguments:"]}),$globals.Object),$core.addMethod($core.method({selector:"basicPerform:withArguments:",protocol:"message handling",fn:function(e,t){var n=this;return n[e].apply(n,t)},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"browse",protocol:"browsing",fn:function(){function t(){return $globals.Finder||(typeof Finder=="undefined"?nil:Finder)}var e=this;return $recv(t())._findClass_(e._class()),e},messageSends:["findClass:","class"]}),$globals.Object),$core.addMethod($core.method({selector:"copy",protocol:"copying",fn:function(){var e=this,t;return t=$recv(e._shallowCopy())._postCopy(),t},messageSends:["postCopy","shallowCopy"]}),$globals.Object),$core.addMethod($core.method({selector:"deepCopy",protocol:"copying",fn:function(){var e=this,t=e.klass._new();return Object.keys(e).forEach(function(n){/^@.+/.test(n)&&(t[n]=e[n]._deepCopy())}),t},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"deprecatedAPI",protocol:"error handling",fn:function(){var e=this,t,n,r,i,s,o,u,a;return t=console,n=$core.getThisContext()._home(),r=$recv(n)._asString(),i=$recv(r).__comma(" is deprecated! (in "),s=$recv($core.getThisContext()._home())._home(),o=$recv(s)._asString(),u=$recv(i).__comma(o),a=$recv(u).__comma(")"),$recv(t)._warn_(a),e},messageSends:["warn:",",","asString","home"]}),$globals.Object),$core.addMethod($core.method({selector:"deprecatedAPI:",protocol:"error handling",fn:function(e){var t=this,n,r,i,s,o,u,a,f;return n=console,r=$core.getThisContext()._home(),i=$recv(r)._asString(),s=$recv(i).__comma(" is deprecated! (in "),o=$recv($core.getThisContext()._home())._home(),u=$recv(o)._asString(),a=$recv(s).__comma(u),f=$recv(a).__comma(")"),$recv(n)._warn_(f),$recv(console)._warn_(e),t},messageSends:["warn:",",","asString","home"]}),$globals.Object),$core.addMethod($core.method({selector:"error:",protocol:"error handling",fn:function(e){function n(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}var t=this;return $recv(n())._signal_(e),t},messageSends:["signal:"]}),$globals.Object),$core.addMethod($core.method({selector:"halt",protocol:"error handling",fn:function(){function t(){return $globals.Halt||(typeof Halt=="undefined"?nil:Halt)}var e=this;return $recv(t())._signal(),e},messageSends:["signal"]}),$globals.Object),$core.addMethod($core.method({selector:"in:",protocol:"evaluating",fn:function(e){var t=this,n;return n=$recv(e)._value_(t),n},messageSends:["value:"]}),$globals.Object),$core.addMethod($core.method({selector:"isBehavior",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"isBoolean",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"isClass",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"isCompiledMethod",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"isImmutable",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"isMemberOf:",protocol:"testing",fn:function(e){var t=this,n;return n=$recv(t._class()).__eq(e),n},messageSends:["=","class"]}),$globals.Object),$core.addMethod($core.method({selector:"isMetaclass",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"isNumber",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"isPackage",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"isParseFailure",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"isString",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"isSymbol",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"postCopy",protocol:"copying",fn:function(){var e=this;return e},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"putOn:",protocol:"streaming",fn:function(e){var t=this;return $recv(e)._nextPut_(t),t},messageSends:["nextPut:"]}),$globals.Object),$core.addMethod($core.method({selector:"respondsTo:",protocol:"testing",fn:function(e){var t=this,n;return n=$recv(t._class())._canUnderstand_(e),n},messageSends:["canUnderstand:","class"]}),$globals.Object),$core.addMethod($core.method({selector:"shallowCopy",protocol:"copying",fn:function(){var e=this,t=e.klass._new();return Object.keys(e).forEach(function(n){/^@.+/.test(n)&&(t[n]=e[n])}),t},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"shouldNotImplement",protocol:"error handling",fn:function(){var e=this;return e._error_("This method should not be implemented in ".__comma($recv(e._class())._name())),e},messageSends:["error:",",","name","class"]}),$globals.Object),$core.addMethod($core.method({selector:"size",protocol:"accessing",fn:function(){var e=this;return e._error_("Object not indexable"),e},messageSends:["error:"]}),$globals.Object),$core.addMethod($core.method({selector:"subclassResponsibility",protocol:"error handling",fn:function(){var e=this;return e._error_("This method is a responsibility of a subclass"),e},messageSends:["error:"]}),$globals.Object),$core.addMethod($core.method({selector:"throw:",protocol:"error handling",fn:function(e){var t=this;throw e},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"value",protocol:"evaluating",fn:function(){var e=this;return e.valueOf()},messageSends:[]}),$globals.Object),$core.addMethod($core.method({selector:"accessorProtocolWith:",protocol:"helios",fn:function(e){var t=this;return $recv(e)._accessorProtocolForObject(),t},messageSends:["accessorProtocolForObject"]}),$globals.Object.klass),$core.addMethod($core.method({selector:"accessorsSourceCodesWith:",protocol:"helios",fn:function(e){var t=this;return $recv(e)._accessorsForObject(),t},messageSends:["accessorsForObject"]}),$globals.Object.klass),$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){var e=this;return e},messageSends:[]}),$globals.Object.klass),$core.addMethod($core.method({selector:"initializeProtocolWith:",protocol:"helios",fn:function(e){var t=this;return $recv(e)._initializeProtocolForObject(),t},messageSends:["initializeProtocolForObject"]}),$globals.Object.klass),$core.addMethod($core.method({selector:"initializeSourceCodesWith:",protocol:"helios",fn:function(e){var t=this;return $recv(e)._initializeForObject(),t},messageSends:["initializeForObject"]}),$globals.Object.klass),$core.addClass("Boolean",$globals.Object,[],"Kernel-Objects"),$core.addMethod($core.method({selector:"&",protocol:"controlling",fn:function(e){var t=this;return t==1?e:!1},messageSends:[]}),$globals.Boolean),$core.addMethod($core.method({selector:"==",protocol:"comparing",fn:function(e){var t=this;return e!=null&&t.valueOf()===(typeof e=="boolean"?e:e.valueOf())},messageSends:[]}),$globals.Boolean),$core.addMethod($core.method({selector:"and:",protocol:"controlling",fn:function(e){var t=this,n,r;return n=t.__eq(!0),r=$recv(n)._ifTrue_ifFalse_(e,function(){return!1}),r},messageSends:["ifTrue:ifFalse:","="]}),$globals.Boolean),$core.addMethod($core.method({selector:"asBit",protocol:"converting",fn:function(){var e=this,t;return $core.assert(e)?t=1:t=0,t},messageSends:["ifTrue:ifFalse:"]}),$globals.Boolean),$core.addMethod($core.method({selector:"asJSON",protocol:"converting",fn:function(){var e=this;return e},messageSends:[]}),$globals.Boolean),$core.addMethod($core.method({selector:"asString",protocol:"converting",fn:function(){var e=this;return e.toString()},messageSends:[]}),$globals.Boolean),$core.addMethod($core.method({selector:"deepCopy",protocol:"copying",fn:function(){var e=this;return e},messageSends:[]}),$globals.Boolean),$core.addMethod($core.method({selector:"ifFalse:",protocol:"controlling",fn:function(e){var t=this,n;return n=t._ifTrue_ifFalse_(function(){},e),n},messageSends:["ifTrue:ifFalse:"]}),$globals.Boolean),$core.addMethod($core.method({selector:"ifFalse:ifTrue:",protocol:"controlling",fn:function(e,t){var n=this,r;return r=n._ifTrue_ifFalse_(t,e),r},messageSends:["ifTrue:ifFalse:"]}),$globals.Boolean),$core.addMethod($core.method({selector:"ifTrue:",protocol:"controlling",fn:function(e){var t=this,n;return n=t._ifTrue_ifFalse_(e,function(){}),n},messageSends:["ifTrue:ifFalse:"]}),$globals.Boolean),$core.addMethod($core.method({selector:"ifTrue:ifFalse:",protocol:"controlling",fn:function(e,t){var n=this;return n==1?e._value():t._value()},messageSends:[]}),$globals.Boolean),$core.addMethod($core.method({selector:"isBoolean",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.Boolean),$core.addMethod($core.method({selector:"isImmutable",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.Boolean),$core.addMethod($core.method({selector:"not",protocol:"controlling",fn:function(){var e=this,t;return t=e.__eq(!1),t},messageSends:["="]}),$globals.Boolean),$core.addMethod($core.method({selector:"or:",protocol:"controlling",fn:function(e){var t=this,n,r;return n=t.__eq(!0),r=$recv(n)._ifTrue_ifFalse_(function(){return!0},e),r},messageSends:["ifTrue:ifFalse:","="]}),$globals.Boolean),$core.addMethod($core.method({selector:"printOn:",protocol:"printing",fn:function(e){var t=this;return $recv(e)._nextPutAll_(t._asString()),t},messageSends:["nextPutAll:","asString"]}),$globals.Boolean),$core.addMethod($core.method({selector:"shallowCopy",protocol:"copying",fn:function(){var e=this;return e},messageSends:[]}),$globals.Boolean),$core.addMethod($core.method({selector:"|",protocol:"controlling",fn:function(e){var t=this;return t==1?!0:e},messageSends:[]}),$globals.Boolean),$core.addClass("Date",$globals.Object,[],"Kernel-Objects"),$core.addMethod($core.method({selector:"+",protocol:"arithmetic",fn:function(e){var t=this;return t+e},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"-",protocol:"arithmetic",fn:function(e){var t=this;return t-e},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"<",protocol:"comparing",fn:function(e){var t=this;return t",protocol:"comparing",fn:function(e){var t=this;return t>e},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:">=",protocol:"comparing",fn:function(e){var t=this;return t>=e},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"asDateString",protocol:"converting",fn:function(){var e=this;return e.toDateString()},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"asLocaleString",protocol:"converting",fn:function(){var e=this;return e.toLocaleString()},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"asMilliseconds",protocol:"converting",fn:function(){var e=this,t;return t=e._time(),t},messageSends:["time"]}),$globals.Date),$core.addMethod($core.method({selector:"asNumber",protocol:"converting",fn:function(){var e=this,t;return t=e._asMilliseconds(),t},messageSends:["asMilliseconds"]}),$globals.Date),$core.addMethod($core.method({selector:"asString",protocol:"converting",fn:function(){var e=this;return e.toString()},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"asTimeString",protocol:"converting",fn:function(){var e=this;return e.toTimeString()},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"day",protocol:"accessing",fn:function(){var e=this,t;return t=e._dayOfWeek(),t},messageSends:["dayOfWeek"]}),$globals.Date),$core.addMethod($core.method({selector:"day:",protocol:"accessing",fn:function(e){var t=this;return t._dayOfWeek_(e),t},messageSends:["dayOfWeek:"]}),$globals.Date),$core.addMethod($core.method({selector:"dayOfMonth",protocol:"accessing",fn:function(){var e=this;return e.getDate()},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"dayOfMonth:",protocol:"accessing",fn:function(e){var t=this;return t.setDate(e),t},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"dayOfWeek",protocol:"accessing",fn:function(){var e=this;return e.getDay()+1},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"dayOfWeek:",protocol:"accessing",fn:function(e){var t=this;return t.setDay(e-1)},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"hours",protocol:"accessing",fn:function(){var e=this;return e.getHours()},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"hours:",protocol:"accessing",fn:function(e){var t=this;return t.setHours(e),t},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"milliseconds",protocol:"accessing",fn:function(){var e=this;return e.getMilliseconds()},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"milliseconds:",protocol:"accessing",fn:function(e){var t=this;return t.setMilliseconds(e),t},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"minutes",protocol:"accessing",fn:function(){var e=this;return e.getMinutes()},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"minutes:",protocol:"accessing",fn:function(e){var t=this;return t.setMinutes(e),t},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"month",protocol:"accessing",fn:function(){var e=this;return e.getMonth()+1},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"month:",protocol:"accessing",fn:function(e){var t=this;return t.setMonth(e-1),t},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"printOn:",protocol:"printing",fn:function(e){var t=this;return $recv(e)._nextPutAll_(t._asString()),t},messageSends:["nextPutAll:","asString"]}),$globals.Date),$core.addMethod($core.method({selector:"seconds",protocol:"accessing",fn:function(){var e=this;return e.getSeconds()},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"seconds:",protocol:"accessing",fn:function(e){var t=this;return t.setSeconds(e),t},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"time",protocol:"accessing",fn:function(){var e=this;return e.getTime()},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"time:",protocol:"accessing",fn:function(e){var t=this;return t.setTime(e),t},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"year",protocol:"accessing",fn:function(){var e=this;return e.getFullYear()},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"year:",protocol:"accessing",fn:function(e){var t=this;return t.setFullYear(e),t},messageSends:[]}),$globals.Date),$core.addMethod($core.method({selector:"classTag",protocol:"accessing",fn:function(){var e=this;return"magnitude"},messageSends:[]}),$globals.Date.klass),$core.addMethod($core.method({selector:"fromMilliseconds:",protocol:"instance creation",fn:function(e){var t=this,n;return n=t._new_(e),n},messageSends:["new:"]}),$globals.Date.klass),$core.addMethod($core.method({selector:"fromSeconds:",protocol:"instance creation",fn:function(e){var t=this,n;return n=t._fromMilliseconds_($recv(e).__star(1e3)),n},messageSends:["fromMilliseconds:","*"]}),$globals.Date.klass),$core.addMethod($core.method({selector:"fromString:",protocol:"instance creation",fn:function(e){var t=this,n;return n=t._new_(e),n},messageSends:["new:"]}),$globals.Date.klass),$core.addMethod($core.method({selector:"millisecondsToRun:",protocol:"instance creation",fn:function(e){function r(){return $globals.Date||(typeof Date=="undefined"?nil:Date)}var t=this,n,i;return n=$recv(r())._now(),$recv(e)._value(),i=$recv($recv(r())._now()).__minus(n),i},messageSends:["now","value","-"]}),$globals.Date.klass),$core.addMethod($core.method({selector:"new:",protocol:"instance creation",fn:function(e){var t=this;return new Date(e)},messageSends:[]}),$globals.Date.klass),$core.addMethod($core.method({selector:"now",protocol:"instance creation",fn:function(){var e=this,t;return t=e._today(),t},messageSends:["today"]}),$globals.Date.klass),$core.addMethod($core.method({selector:"today",protocol:"instance creation",fn:function(){var e=this,t;return t=e._new(),t},messageSends:["new"]}),$globals.Date.klass),$core.addClass("Number",$globals.Object,[],"Kernel-Objects"),$core.addMethod($core.method({selector:"&",protocol:"converting",fn:function(e){var t=this;return t&e},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"*",protocol:"arithmetic",fn:function(e){var t=this;return t*e},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"**",protocol:"mathematical functions",fn:function(e){var t=this,n;return n=t._raisedTo_(e),n},messageSends:["raisedTo:"]}),$globals.Number),$core.addMethod($core.method({selector:"+",protocol:"arithmetic",fn:function(e){var t=this;return t+e},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"-",protocol:"arithmetic",fn:function(e){var t=this;return t-e},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"/",protocol:"arithmetic",fn:function(e){var t=this;return t/e},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"//",protocol:"arithmetic",fn:function(e){var t=this,n;return n=$recv(t.__slash(e))._floor(),n},messageSends:["floor","/"]}),$globals.Number),$core.addMethod($core.method({selector:"<",protocol:"comparing",fn:function(e){var t=this;return t",protocol:"comparing",fn:function(e){var t=this;return t>e},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:">=",protocol:"comparing",fn:function(e){var t=this;return t>=e},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"@",protocol:"converting",fn:function(e){function n(){return $globals.Point||(typeof Point=="undefined"?nil:Point)}var t=this,r;return r=$recv(n())._x_y_(t,e),r},messageSends:["x:y:"]}),$globals.Number),$core.addMethod($core.method({selector:"\\\\",protocol:"arithmetic",fn:function(e){var t=this;return t%e},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"abs",protocol:"arithmetic",fn:function(){var e=this;return Math.abs(e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"arcCos",protocol:"mathematical functions",fn:function(){var e=this;return Math.acos(e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"arcSin",protocol:"mathematical functions",fn:function(){var e=this;return Math.asin(e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"arcTan",protocol:"mathematical functions",fn:function(){var e=this;return Math.atan(e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"asJSON",protocol:"converting",fn:function(){var e=this;return e},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"asJavascript",protocol:"converting",fn:function(){var e=this,t;return t=$recv("(".__comma(e._printString())).__comma(")"),t},messageSends:[",","printString"]}),$globals.Number),$core.addMethod($core.method({selector:"asNumber",protocol:"converting",fn:function(){var e=this;return e},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"asPoint",protocol:"converting",fn:function(){function t(){return $globals.Point||(typeof Point=="undefined"?nil:Point)}var e=this,n;return n=$recv(t())._x_y_(e,e),n},messageSends:["x:y:"]}),$globals.Number),$core.addMethod($core.method({selector:"asString",protocol:"converting",fn:function(){var e=this;return String(e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"atRandom",protocol:"converting",fn:function(){function t(){return $globals.Random||(typeof Random=="undefined"?nil:Random)}var e=this,n;return n=$recv($recv($recv($recv($recv(t())._new())._next()).__star(e))._truncated()).__plus(1),n},messageSends:["+","truncated","*","next","new"]}),$globals.Number),$core.addMethod($core.method({selector:"ceiling",protocol:"converting",fn:function(){var e=this;return Math.ceil(e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"copy",protocol:"copying",fn:function(){var e=this;return e},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"cos",protocol:"mathematical functions",fn:function(){var e=this;return Math.cos(e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"deepCopy",protocol:"copying",fn:function(){var e=this,t;return t=e._copy(),t},messageSends:["copy"]}),$globals.Number),$core.addMethod($core.method({selector:"even",protocol:"testing",fn:function(){var e=this,t;return t=0..__eq(e.__backslash_backslash(2)),t},messageSends:["=","\\\\"]}),$globals.Number),$core.addMethod($core.method({selector:"floor",protocol:"converting",fn:function(){var e=this;return Math.floor(e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"isImmutable",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"isNumber",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"isZero",protocol:"testing",fn:function(){var e=this,t;return t=e.__eq(0),t},messageSends:["="]}),$globals.Number),$core.addMethod($core.method({selector:"ln",protocol:"mathematical functions",fn:function(){var e=this;return Math.log(e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"log",protocol:"mathematical functions",fn:function(){var e=this;return Math.log(e)/Math.LN10},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"log:",protocol:"mathematical functions",fn:function(e){var t=this;return Math.log(t)/Math.log(e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"max:",protocol:"arithmetic",fn:function(e){var t=this;return Math.max(t,e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"min:",protocol:"arithmetic",fn:function(e){var t=this;return Math.min(t,e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"negated",protocol:"arithmetic",fn:function(){var e=this,t;return t=0..__minus(e),t},messageSends:["-"]}),$globals.Number),$core.addMethod($core.method({selector:"negative",protocol:"testing",fn:function(){var e=this,t;return t=e.__lt(0),t},messageSends:["<"]}),$globals.Number),$core.addMethod($core.method({selector:"odd",protocol:"testing",fn:function(){var e=this,t;return t=$recv(e._even())._not(),t},messageSends:["not","even"]}),$globals.Number),$core.addMethod($core.method({selector:"positive",protocol:"testing",fn:function(){var e=this,t;return t=e.__gt_eq(0),t},messageSends:[">="]}),$globals.Number),$core.addMethod($core.method({selector:"printOn:",protocol:"printing",fn:function(e){var t=this;return $recv(e)._nextPutAll_(t._asString()),t},messageSends:["nextPutAll:","asString"]}),$globals.Number),$core.addMethod($core.method({selector:"printShowingDecimalPlaces:",protocol:"printing",fn:function(e){var t=this;return t.toFixed(e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"raisedTo:",protocol:"mathematical functions",fn:function(e){var t=this;return Math.pow(t,e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"rounded",protocol:"converting",fn:function(){var e=this;return Math.round(e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"sign",protocol:"mathematical functions",fn:function(){var e=this,t,n;return t=e._isZero(),$core.assert(t)?0:(n=e._positive(),$core.assert(n)?1:-1)},messageSends:["ifTrue:","isZero","ifTrue:ifFalse:","positive"]}),$globals.Number),$core.addMethod($core.method({selector:"sin",protocol:"mathematical functions",fn:function(){var e=this;return Math.sin(e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"sqrt",protocol:"mathematical functions",fn:function(){var e=this;return Math.sqrt(e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"squared",protocol:"mathematical functions",fn:function(){var e=this,t;return t=e.__star(e),t},messageSends:["*"]}),$globals.Number),$core.addMethod($core.method({selector:"tan",protocol:"mathematical functions",fn:function(){var e=this;return Math.tan(e)},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"timesRepeat:",protocol:"enumerating",fn:function(e){var t=this,n;return n=1,$recv(function(){return $recv(n).__gt(t)})._whileFalse_(function(){return $recv(e)._value(),n=$recv(n).__plus(1),n}),t},messageSends:["whileFalse:",">","value","+"]}),$globals.Number),$core.addMethod($core.method({selector:"to:",protocol:"converting",fn:function(e){function o(){return $globals.Array||(typeof Array=="undefined"?nil:Array)}var t=this,n,r,i,s,u;return r=t._truncated(),i=$recv($recv(e)._truncated()).__plus(1),s=1,n=$recv(o())._new(),$recv($recv(i).__minus(r))._timesRepeat_(function(){return $recv(n)._at_put_(s,r),s=$recv(s).__plus(1),s,r=$recv(r).__plus(1),r}),u=n,u},messageSends:["truncated","+","new","timesRepeat:","-","at:put:"]}),$globals.Number),$core.addMethod($core.method({selector:"to:by:",protocol:"converting",fn:function(e,t){function o(){return $globals.Array||(typeof Array=="undefined"?nil:Array)}var n=this,r,i,s,u,a,f;return i=n,r=$recv(o())._new(),s=1,u=$recv(t).__eq(0),$core.assert(u)&&n._error_("step must be non-zero"),a=$recv(t).__lt(0),$core.assert(a)?$recv(function(){return $recv(i).__gt_eq(e)})._whileTrue_(function(){return $recv(r)._at_put_(s,i),s=$recv(s).__plus(1),s,i=$recv(i).__plus(t),i}):$recv(function(){return $recv(i).__lt_eq(e)})._whileTrue_(function(){return $recv(r)._at_put_(s,i),s=$recv(s).__plus(1),s,i=$recv(i).__plus(t),i}),f=r,f},messageSends:["new","ifTrue:","=","error:","ifTrue:ifFalse:","<","whileTrue:",">=","at:put:","+","<="]}),$globals.Number),$core.addMethod($core.method({selector:"to:by:do:",protocol:"enumerating",fn:function(e,t,n){var r=this,i,s,o;return i=r,s=$recv(t).__eq(0),$core.assert(s)&&r._error_("step must be non-zero"),o=$recv(t).__lt(0),$core.assert(o)?$recv(function(){return $recv(i).__gt_eq(e)})._whileTrue_(function(){return $recv(n)._value_(i),i=$recv(i).__plus(t),i}):$recv(function(){return $recv(i).__lt_eq(e)})._whileTrue_(function(){return $recv(n)._value_(i),i=$recv(i).__plus(t),i}),r},messageSends:["ifTrue:","=","error:","ifTrue:ifFalse:","<","whileTrue:",">=","value:","+","<="]}),$globals.Number),$core.addMethod($core.method({selector:"to:do:",protocol:"enumerating",fn:function(e,t){var n=this,r;return r=n,$recv(function(){return $recv(r).__lt_eq(e)})._whileTrue_(function(){return $recv(t)._value_(r),r=$recv(r).__plus(1),r}),n},messageSends:["whileTrue:","<=","value:","+"]}),$globals.Number),$core.addMethod($core.method({selector:"truncated",protocol:"converting",fn:function(){var e=this;return e>=0?Math.floor(e):Math.floor(e*-1)*-1},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"|",protocol:"converting",fn:function(e){var t=this;return t|e},messageSends:[]}),$globals.Number),$core.addMethod($core.method({selector:"classTag",protocol:"accessing",fn:function(){var e=this;return"magnitude"},messageSends:[]}),$globals.Number.klass),$core.addMethod($core.method({selector:"e",protocol:"instance creation",fn:function(){var e=this;return Math.E},messageSends:[]}),$globals.Number.klass),$core.addMethod($core.method({selector:"pi",protocol:"instance creation",fn:function(){var e=this;return Math.PI},messageSends:[]}),$globals.Number.klass),$core.addClass("Point",$globals.Object,["x","y"],"Kernel-Objects"),$core.addMethod($core.method({selector:"*",protocol:"arithmetic",fn:function(e){function n(){return $globals.Point||(typeof Point=="undefined"?nil:Point)}var t=this,r,i,s,o,u,a,f;return r=t._x(),i=$recv(e)._asPoint(),s=$recv(i)._x(),o=$recv(r).__star(s),u=t._y(),a=$recv(u).__star($recv($recv(e)._asPoint())._y()),f=$recv(n())._x_y_(o,a),f},messageSends:["x:y:","*","x","asPoint","y"]}),$globals.Point),$core.addMethod($core.method({selector:"+",protocol:"arithmetic",fn:function(e){function n(){return $globals.Point||(typeof Point=="undefined"?nil:Point)}var t=this,r,i,s,o,u,a,f;return r=t._x(),i=$recv(e)._asPoint(),s=$recv(i)._x(),o=$recv(r).__plus(s),u=t._y(),a=$recv(u).__plus($recv($recv(e)._asPoint())._y()),f=$recv(n())._x_y_(o,a),f},messageSends:["x:y:","+","x","asPoint","y"]}),$globals.Point),$core.addMethod($core.method({selector:"-",protocol:"arithmetic",fn:function(e){function n(){return $globals.Point||(typeof Point=="undefined"?nil:Point)}var t=this,r,i,s,o,u,a,f;return r=t._x(),i=$recv(e)._asPoint(),s=$recv(i)._x(),o=$recv(r).__minus(s),u=t._y(),a=$recv(u).__minus($recv($recv(e)._asPoint())._y()),f=$recv(n())._x_y_(o,a),f},messageSends:["x:y:","-","x","asPoint","y"]}),$globals.Point),$core.addMethod($core.method({selector:"/",protocol:"arithmetic",fn:function(e){function n(){return $globals.Point||(typeof Point=="undefined"?nil:Point)}var t=this,r,i,s,o,u,a,f;return r=t._x(),i=$recv(e)._asPoint(),s=$recv(i)._x(),o=$recv(r).__slash(s),u=t._y(),a=$recv(u).__slash($recv($recv(e)._asPoint())._y()),f=$recv(n())._x_y_(o,a),f},messageSends:["x:y:","/","x","asPoint","y"]}),$globals.Point),$core.addMethod($core.method({selector:"<",protocol:"comparing",fn:function(e){var t=this,n,r,i,s;return n=t._x(),r=$recv(n).__lt($recv(e)._x()),s=$recv(r)._and_(function(){return i=t._y(),$recv(i).__lt($recv(e)._y())}),s},messageSends:["and:","<","x","y"]}),$globals.Point),$core.addMethod($core.method({selector:"<=",protocol:"comparing",fn:function(e){var t=this,n,r,i,s;return n=t._x(),r=$recv(n).__lt_eq($recv(e)._x()),s=$recv(r)._and_(function(){return i=t._y(),$recv(i).__lt_eq($recv(e)._y())}),s},messageSends:["and:","<=","x","y"]}),$globals.Point),$core.addMethod($core.method({selector:"=",protocol:"comparing",fn:function(e){var t=this,n,r,i,s,o,u,a;return n=$recv(e)._class(),r=$recv(n).__eq(t._class()),a=$recv(r)._and_(function(){return i=$recv(e)._x(),s=$recv(i).__eq(t._x()),o=$recv(e)._y(),u=$recv(o).__eq(t._y()),$recv(s).__and(u)}),a},messageSends:["and:","=","class","&","x","y"]}),$globals.Point),$core.addMethod($core.method({selector:">",protocol:"comparing",fn:function(e){var t=this,n,r,i,s;return n=t._x(),r=$recv(n).__gt($recv(e)._x()),s=$recv(r)._and_(function(){return i=t._y(),$recv(i).__gt($recv(e)._y())}),s},messageSends:["and:",">","x","y"]}),$globals.Point),$core.addMethod($core.method({selector:">=",protocol:"comparing",fn:function(e){var t=this,n,r,i,s;return n=t._x(),r=$recv(n).__gt_eq($recv(e)._x()),s=$recv(r)._and_(function(){return i=t._y(),$recv(i).__gt_eq($recv(e)._y())}),s},messageSends:["and:",">=","x","y"]}),$globals.Point),$core.addMethod($core.method({selector:"asPoint",protocol:"converting",fn:function(){var e=this;return e},messageSends:[]}),$globals.Point),$core.addMethod($core.method({selector:"dist:",protocol:"transforming",fn:function(e){var t=this,n,r,i,s,o;return n=$recv($recv(e)._x()).__minus(t["@x"]),r=$recv($recv(e)._y()).__minus(t["@y"]),i=$recv(n).__star(n),s=$recv(i).__plus($recv(r).__star(r)),o=$recv(s)._sqrt(),o},messageSends:["-","x","y","sqrt","+","*"]}),$globals.Point),$core.addMethod($core.method({selector:"printOn:",protocol:"printing",fn:function(e){var t=this,n;return $recv(t["@x"])._printOn_(e),$recv(e)._nextPutAll_("@"),n=$recv($recv(t["@y"])._notNil())._and_(function(){return $recv(t["@y"])._negative()}),$core.assert(n)&&$recv(e)._space(),$recv(t["@y"])._printOn_(e),t},messageSends:["printOn:","nextPutAll:","ifTrue:","and:","notNil","negative","space"]}),$globals.Point),$core.addMethod($core.method({selector:"translateBy:",protocol:"transforming",fn:function(e){var t=this,n,r;return n=$recv($recv(e)._x()).__plus(t["@x"]),r=$recv(n).__at($recv($recv(e)._y()).__plus(t["@y"])),r},messageSends:["@","+","x","y"]}),$globals.Point),$core.addMethod($core.method({selector:"x",protocol:"accessing",fn:function(){var e=this,t;return t=e["@x"],t},messageSends:[]}),$globals.Point),$core.addMethod($core.method({selector:"x:",protocol:"accessing",fn:function(e){var t=this;return t["@x"]=e,t},messageSends:[]}),$globals.Point),$core.addMethod($core.method({selector:"y",protocol:"accessing",fn:function(){var e=this,t;return t=e["@y"],t},messageSends:[]}),$globals.Point),$core.addMethod($core.method({selector:"y:",protocol:"accessing",fn:function(e){var t=this;return t["@y"]=e,t},messageSends:[]}),$globals.Point),$core.addMethod($core.method({selector:"classTag",protocol:"accessing",fn:function(){var e=this;return"magnitude"},messageSends:[]}),$globals.Point.klass),$core.addMethod($core.method({selector:"x:y:",protocol:"instance creation",fn:function(e,t){var n=this,r,i,s;return r=n._new(),$recv(r)._x_(e),$recv(r)._y_(t),i=$recv(r)._yourself(),s=i,s},messageSends:["x:","new","y:","yourself"]}),$globals.Point.klass),$core.addClass("Random",$globals.Object,[],"Kernel-Objects"),$core.addMethod($core.method({selector:"next",protocol:"accessing",fn:function(){var e=this;return Math.random()},messageSends:[]}),$globals.Random),$core.addMethod($core.method({selector:"next:",protocol:"accessing",fn:function(e){var t=this,n;return n=$recv(1.._to_(e))._collect_(function(e){return t._next()}),n},messageSends:["collect:","to:","next"]}),$globals.Random),$core.addClass("UndefinedObject",$globals.Object,[],"Kernel-Objects"),$core.addMethod($core.method({selector:"asJSON",protocol:"converting",fn:function(){var e=this,t;return t=null,t},messageSends:[]}),$globals.UndefinedObject),$core.addMethod($core.method({selector:"deepCopy",protocol:"copying",fn:function(){var e=this;return e},messageSends:[]}),$globals.UndefinedObject),$core.addMethod($core.method({selector:"ifNil:",protocol:"testing",fn:function(e){var t=this,n;return n=t._ifNil_ifNotNil_(e,function(){}),n},messageSends:["ifNil:ifNotNil:"]}),$globals.UndefinedObject),$core.addMethod($core.method({selector:"ifNil:ifNotNil:",protocol:"testing",fn:function(e,t){var n=this,r;return r=$recv(e)._value(),r},messageSends:["value"]}),$globals.UndefinedObject),$core.addMethod($core.method({selector:"ifNotNil:",protocol:"testing",fn:function(e){var t=this;return t},messageSends:[]}),$globals.UndefinedObject),$core.addMethod($core.method({selector:"ifNotNil:ifNil:",protocol:"testing",fn:function(e,t){var n=this,r;return r=$recv(t)._value(),r},messageSends:["value"]}),$globals.UndefinedObject),$core.addMethod($core.method({selector:"isImmutable",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.UndefinedObject),$core.addMethod($core.method({selector:"isNil",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.UndefinedObject),$core.addMethod($core.method({selector:"notNil",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.UndefinedObject),$core.addMethod($core.method({selector:"printOn:",protocol:"printing",fn:function(e){var t=this;return $recv(e)._nextPutAll_("nil"),t},messageSends:["nextPutAll:"]}),$globals.UndefinedObject),$core.addMethod($core.method({selector:"shallowCopy",protocol:"copying",fn:function(){var e=this;return e},messageSends:[]}),$globals.UndefinedObject),$core.addMethod($core.method({selector:"subclass:instanceVariableNames:",protocol:"class creation",fn:function(e,t){var n=this,r;return r=n._subclass_instanceVariableNames_package_(e,t,nil),r},messageSends:["subclass:instanceVariableNames:package:"]}),$globals.UndefinedObject),$core.addMethod($core.method({selector:"subclass:instanceVariableNames:category:",protocol:"class creation",fn:function(e,t,n){var r=this,i;return i=r._subclass_instanceVariableNames_package_(e,t,n),i},messageSends:["subclass:instanceVariableNames:package:"]}),$globals.UndefinedObject),$core.addMethod($core.method({selector:"subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",protocol:"class creation",fn:function(e,t,n,r,i){var s=this,o;return o=s._subclass_instanceVariableNames_package_(e,t,i),o},messageSends:["subclass:instanceVariableNames:package:"]}),$globals.UndefinedObject),$core.addMethod($core.method({selector:"subclass:instanceVariableNames:package:",protocol:"class creation",fn:function(e,t,n){function i(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}var r=this,s;return s=$recv($recv(i())._new())._superclass_subclass_instanceVariableNames_package_(r,$recv(e)._asString(),t,n),s},messageSends:["superclass:subclass:instanceVariableNames:package:","new","asString"]}),$globals.UndefinedObject),$core.addMethod($core.method({selector:"new",protocol:"instance creation",fn:function(){var e=this;return e._error_("You cannot create new instances of UndefinedObject. Use nil"),e},messageSends:["error:"]}),$globals.UndefinedObject.klass)}),define("amber_core/Kernel-Classes",["amber/boot","amber_core/Kernel-Objects"],function($boot){"use strict";var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;$core.addPackage("Kernel-Classes"),$core.packages["Kernel-Classes"].innerEval=function(expr){return eval(expr)},$core.packages["Kernel-Classes"].transport={type:"amd",amdNamespace:"amber_core"},$core.addClass("Behavior",$globals.Object,[],"Kernel-Classes"),$core.addMethod($core.method({selector:">>",protocol:"accessing",fn:function(e){var t=this,n;return n=t._methodAt_(e),n},messageSends:["methodAt:"]}),$globals.Behavior),$core.addMethod($core.method({selector:"addCompiledMethod:",protocol:"compiling",fn:function(e){function i(){return $globals.MethodAdded||(typeof MethodAdded=="undefined"?nil:MethodAdded)}function s(){return $globals.MethodModified||(typeof MethodModified=="undefined"?nil:MethodModified)}function o(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}var t=this,n,r,u,a,f,l,c,h,p,d,v,m,g,y;return n=$recv(t._methodDictionary())._at_ifAbsent_($recv(e)._selector(),function(){return nil}),u=t._protocols(),a=$recv(e)._protocol(),f=$recv(u)._includes_(a),$core.assert(f)||(l=t._organization(),c=$recv(e)._protocol(),$recv(l)._addElement_(c)),t._basicAddCompiledMethod_(e),h=n,(y=h)==null||y.isNil?h:t._removeProtocolIfEmpty_($recv(n)._protocol()),p=n,(y=p)==null||y.isNil?(d=$recv(i())._new(),$recv(d)._method_(e),v=$recv(d)._yourself(),r=v):(m=$recv(s())._new(),$recv(m)._oldMethod_(n),$recv(m)._method_(e),g=$recv(m)._yourself(),r=g),$recv($recv(o())._current())._announce_(r),t},messageSends:["at:ifAbsent:","methodDictionary","selector","ifFalse:","includes:","protocols","protocol","addElement:","organization","basicAddCompiledMethod:","ifNotNil:","removeProtocolIfEmpty:","ifNil:ifNotNil:","method:","new","yourself","oldMethod:","announce:","current"]}),$globals.Behavior),$core.addMethod($core.method({selector:"allInstanceVariableNames",protocol:"accessing",fn:function(){var e=this,t,n,r,i;return t=$recv(e._instanceVariableNames())._copy(),n=e._superclass(),(i=n)==null||i.isNil?n:$recv(t)._addAll_($recv(e._superclass())._allInstanceVariableNames()),r=t,r},messageSends:["copy","instanceVariableNames","ifNotNil:","superclass","addAll:","allInstanceVariableNames"]}),$globals.Behavior),$core.addMethod($core.method({selector:"allSelectors",protocol:"accessing",fn:function(){var e=this,t,n,r,i;return t=e._allSuperclasses(),n=e._selectors(),i=$recv(t)._inject_into_(n,function(e,t){return $recv(e)._addAll_($recv(t)._selectors()),r=$recv(e)._yourself(),r}),i},messageSends:["inject:into:","allSuperclasses","selectors","addAll:","yourself"]}),$globals.Behavior),$core.addMethod($core.method({selector:"allSubclasses",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e._subclasses(),n=1,$recv(function(){return $recv(n).__gt($recv(t)._size())})._whileFalse_(function(){return $recv(t)._addAll_($recv($recv(t)._at_(n))._subclasses()),n=$recv(n).__plus(1),n}),r=t,r},messageSends:["subclasses","whileFalse:",">","size","addAll:","at:","+"]}),$globals.Behavior),$core.addMethod($core.method({selector:"allSubclassesDo:",protocol:"enumerating",fn:function(e){var t=this;return $recv(t._allSubclasses())._do_(function(t){return $recv(e)._value_(t)}),t},messageSends:["do:","allSubclasses","value:"]}),$globals.Behavior),$core.addMethod($core.method({selector:"allSuperclasses",protocol:"accessing",fn:function(){function t(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}var e=this,n,r,i,s,o,u,a;return n=e._superclass(),(a=n)==null||a.isNil?(r=[],r):(n,i=e._superclass(),s=$recv(t())._with_(i),$recv(s)._addAll_($recv(e._superclass())._allSuperclasses()),o=$recv(s)._yourself(),u=o,u)},messageSends:["ifNil:","superclass","addAll:","with:","allSuperclasses","yourself"]}),$globals.Behavior),$core.addMethod($core.method({selector:"basicAddCompiledMethod:",protocol:"private",fn:function(e){var t=this;return $core.addMethod(e,t),t},messageSends:[]}),$globals.Behavior),$core.addMethod($core.method({selector:"basicNew",protocol:"instance creation",fn:function(){var e=this;return new e.fn},messageSends:[]}),$globals.Behavior),$core.addMethod($core.method({selector:"basicRemoveCompiledMethod:",protocol:"private",fn:function(e){var t=this;return $core.removeMethod(e,t),t},messageSends:[]}),$globals.Behavior),$core.addMethod($core.method({selector:"canUnderstand:",protocol:"testing",fn:function(e){var t=this,n,r,i;return i=$recv(t._includesSelector_($recv(e)._asString()))._or_(function(){return n=t._superclass(),r=$recv(n)._notNil(),$recv(r)._and_(function(){return $recv(t._superclass())._canUnderstand_(e)})}),i},messageSends:["or:","includesSelector:","asString","and:","notNil","superclass","canUnderstand:"]}),$globals.Behavior),$core.addMethod($core.method({selector:"comment",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e._basicAt_("comment"),(r=t)==null||r.isNil?n="":n=t,n},messageSends:["ifNil:","basicAt:"]}),$globals.Behavior),$core.addMethod($core.method({selector:"comment:",protocol:"accessing",fn:function(e){function n(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}function r(){return $globals.ClassCommentChanged||(typeof ClassCommentChanged=="undefined"?nil:ClassCommentChanged)}var t=this,i,s;return t._basicAt_put_("comment",e),i=$recv(r())._new(),$recv(i)._theClass_(t),s=$recv(i)._yourself(),$recv($recv(n())._current())._announce_(s),t},messageSends:["basicAt:put:","announce:","current","theClass:","new","yourself"]}),$globals.Behavior),$core.addMethod($core.method({selector:"compile:protocol:",protocol:"compiling",fn:function(e,t){function r(){return $globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}var n=this,i;return i=$recv($recv(r())._new())._install_forClass_protocol_(e,n,t),i},messageSends:["install:forClass:protocol:","new"]}),$globals.Behavior),$core.addMethod($core.method({selector:"definition",protocol:"accessing",fn:function(){var e=this;return""},messageSends:[]}),$globals.Behavior),$core.addMethod($core.method({selector:"includesBehavior:",protocol:"testing",fn:function(e){var t=this,n;return n=$recv(t.__eq_eq(e))._or_(function(){return t._inheritsFrom_(e)}),n},messageSends:["or:","==","inheritsFrom:"]}),$globals.Behavior),$core.addMethod($core.method({selector:"includesSelector:",protocol:"testing",fn:function(e){var t=this,n;return n=$recv(t._methodDictionary())._includesKey_(e),n},messageSends:["includesKey:","methodDictionary"]}),$globals.Behavior),$core.addMethod($core.method({selector:"inheritsFrom:",protocol:"testing",fn:function(e){var t=this,n,r,i,s,o;return n=t._superclass(),(o=n)==null||o.isNil?!1:(n,r=t._superclass(),i=$recv(e).__eq_eq(r),s=$recv(i)._or_(function(){return $recv(t._superclass())._inheritsFrom_(e)}),s)},messageSends:["ifNil:","superclass","or:","==","inheritsFrom:"]}),$globals.Behavior),$core.addMethod($core.method({selector:"instanceVariableNames",protocol:"accessing",fn:function(){var e=this;return e.iVarNames},messageSends:[]}),$globals.Behavior),$core.addMethod($core.method({selector:"isBehavior",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.Behavior),$core.addMethod($core.method({selector:"javascriptConstructor",protocol:"accessing",fn:function(){var e=this;return e.fn},messageSends:[]}),$globals.Behavior),$core.addMethod($core.method({selector:"javascriptConstructor:",protocol:"accessing",fn:function(e){var t=this;return $core.setClassConstructor(t,e),t},messageSends:[]}),$globals.Behavior),$core.addMethod($core.method({selector:"lookupSelector:",protocol:"accessing",fn:function(e){var t=this,n,r,i,s={};try{return n=t,$recv(function(){return $recv(n).__eq(nil)})._whileFalse_(function(){r=$recv(n)._includesSelector_(e);if($core.assert(r))throw i=$recv(n)._methodAt_(e),s=[i];return n=$recv(n)._superclass(),n}),nil}catch(o){if(o===s)return o[0];throw o}},messageSends:["whileFalse:","=","ifTrue:","includesSelector:","methodAt:","superclass"]}),$globals.Behavior),$core.addMethod($core.method({selector:"methodAt:",protocol:"accessing",fn:function(e){var t=this,n;return n=$recv(t._methodDictionary())._at_(e),n},messageSends:["at:","methodDictionary"]}),$globals.Behavior),$core.addMethod($core.method({selector:"methodDictionary",protocol:"accessing",fn:function(){var e=this,t=$globals.HashedCollection._new(),n=e.methods;return Object.keys(n).forEach(function(e){n[e].selector&&t._at_put_(n[e].selector,n[e])}),t},messageSends:[]}),$globals.Behavior),$core.addMethod($core.method({selector:"methodTemplate",protocol:"accessing",fn:function(){function t(){return $globals.String||(typeof String=="undefined"?nil:String)}var e=this,n,r,i,s,o,u,a,f,l,c;return c=$recv(t())._streamContents_(function(e){return $recv(e)._nextPutAll_("messageSelectorAndArgumentNames"),n=$recv(t())._lf(),r=$recv(t())._tab(),i=$recv(n).__comma(r),$recv(e)._nextPutAll_(i),$recv(e)._nextPutAll_('"comment stating purpose of message"'),s=$recv(t())._lf(),o=$recv(t())._lf(),u=$recv(s).__comma(o),a=$recv(t())._tab(),f=$recv(u).__comma(a),$recv(e)._nextPutAll_(f),$recv(e)._nextPutAll_("| temporary variable names |"),$recv(e)._nextPutAll_($recv($recv(t())._lf()).__comma($recv(t())._tab())),l=$recv(e)._nextPutAll_("statements"),l}),c},messageSends:["streamContents:","nextPutAll:",",","lf","tab"]}),$globals.Behavior),$core.addMethod($core.method({selector:"methods",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._methodDictionary())._values(),t},messageSends:["values","methodDictionary"]}),$globals.Behavior),$core.addMethod($core.method({selector:"methodsInProtocol:",protocol:"accessing",fn:function(e){var t=this,n;return n=$recv(t._methods())._select_(function(t){return $recv($recv(t)._protocol()).__eq(e)}),n},messageSends:["select:","methods","=","protocol"]}),$globals.Behavior),$core.addMethod($core.method({selector:"name",protocol:"accessing",fn:function(){var e=this;return e.className||nil},messageSends:[]}),$globals.Behavior),$core.addMethod($core.method({selector:"new",protocol:"instance creation",fn:function(){var e=this,t;return t=$recv(e._basicNew())._initialize(),t},messageSends:["initialize","basicNew"]}),$globals.Behavior),$core.addMethod($core.method({selector:"organization",protocol:"accessing",fn:function(){var e=this,t;return t=e._basicAt_("organization"),t},messageSends:["basicAt:"]}),$globals.Behavior),$core.addMethod($core.method({selector:"ownMethods",protocol:"accessing",fn:function(){function t(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}var e=this,n,r;return r=$recv($recv(e._ownProtocols())._inject_into_($recv(t())._new(),function(t,n){return $recv(t).__comma(e._methodsInProtocol_(n))}))._sorted_(function(e,t){return n=$recv(e)._selector(),$recv(n).__lt_eq($recv(t)._selector())}),r},messageSends:["sorted:","inject:into:","ownProtocols","new",",","methodsInProtocol:","<=","selector"]}),$globals.Behavior),$core.addMethod($core.method({selector:"ownProtocols",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._protocols())._reject_(function(e){return $recv(e)._match_("^\\*")}),t},messageSends:["reject:","protocols","match:"]}),$globals.Behavior),$core.addMethod($core.method({selector:"packageOfProtocol:",protocol:"accessing",fn:function(e){function n(){return $globals.Package||(typeof Package=="undefined"?nil:Package)}var t=this,r,i,s;return r=$recv(e)._beginsWith_("*"),$core.assert(r)?(s=$recv(n())._named_ifAbsent_($recv(e)._allButFirst(),function(){return nil}),s):(i=t._package(),i)},messageSends:["ifFalse:","beginsWith:","package","named:ifAbsent:","allButFirst"]}),$globals.Behavior),$core.addMethod($core.method({selector:"protocols",protocol:"accessing",fn:function(){var e=this,t;return t=$recv($recv(e._organization())._elements())._sorted(),t},messageSends:["sorted","elements","organization"]}),$globals.Behavior),$core.addMethod($core.method({selector:"protocolsDo:",protocol:"enumerating",fn:function(e){function r(){return $globals.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}function i(){return $globals.Array||(typeof Array=="undefined"?nil:Array)}var t=this,n;return n=$recv(r())._new(),$recv(t._methodDictionary())._valuesDo_(function(e){return $recv($recv(n)._at_ifAbsentPut_($recv(e)._protocol(),function(){return $recv(i())._new()}))._add_(e)}),$recv(t._protocols())._do_(function(t){return $recv(e)._value_value_(t,$recv(n)._at_(t))}),t},messageSends:["new","valuesDo:","methodDictionary","add:","at:ifAbsentPut:","protocol","do:","protocols","value:value:","at:"]}),$globals.Behavior),$core.addMethod($core.method({selector:"prototype",protocol:"accessing",fn:function(){var e=this;return e.fn.prototype},messageSends:[]}),$globals.Behavior),$core.addMethod($core.method({selector:"recompile",protocol:"compiling",fn:function(){function t(){return $globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}var e=this,n;return n=$recv($recv(t())._new())._recompile_(e),n},messageSends:["recompile:","new"]}),$globals.Behavior),$core.addMethod($core.method({selector:"removeCompiledMethod:",protocol:"compiling",fn:function(e){function n(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}function r(){return $globals.MethodRemoved||(typeof MethodRemoved=="undefined"?nil:MethodRemoved)}var t=this,i,s;return t._basicRemoveCompiledMethod_(e),t._removeProtocolIfEmpty_($recv(e)._protocol()),i=$recv(r())._new(),$recv(i)._method_(e),s=$recv(i)._yourself(),$recv($recv(n())._current())._announce_(s),t},messageSends:["basicRemoveCompiledMethod:","removeProtocolIfEmpty:","protocol","announce:","current","method:","new","yourself"]}),$globals.Behavior),$core.addMethod($core.method({selector:"removeProtocolIfEmpty:",protocol:"accessing",fn:function(e){var t=this;return $recv(t._methods())._detect_ifNone_(function(t){return $recv($recv(t)._protocol()).__eq(e)},function(){return $recv(t._organization())._removeElement_(e)}),t},messageSends:["detect:ifNone:","methods","=","protocol","removeElement:","organization"]}),$globals.Behavior),$core.addMethod($core.method({selector:"selectors",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._methodDictionary())._keys(),t},messageSends:["keys","methodDictionary"]}),$globals.Behavior),$core.addMethod($core.method({selector:"subclasses",protocol:"accessing",fn:function(){var e=this;return e._subclassResponsibility(),e},messageSends:["subclassResponsibility"]}),$globals.Behavior),$core.addMethod($core.method({selector:"superclass",protocol:"accessing",fn:function(){var e=this;return e.superclass||nil},messageSends:[]}),$globals.Behavior),$core.addMethod($core.method({selector:"theMetaClass",protocol:"accessing",fn:function(){var e=this;return e._subclassResponsibility(),e},messageSends:["subclassResponsibility"]}),$globals.Behavior),$core.addMethod($core.method({selector:"theNonMetaClass",protocol:"accessing",fn:function(){var e=this;return e._subclassResponsibility(),e},messageSends:["subclassResponsibility"]}),$globals.Behavior),$core.addMethod($core.method({selector:"withAllSubclasses",protocol:"accessing",fn:function(){function t(){return $globals.Array||(typeof Array=="undefined"?nil:Array)}var e=this,n,r,i;return n=$recv(t())._with_(e),$recv(n)._addAll_(e._allSubclasses()),r=$recv(n)._yourself(),i=r,i},messageSends:["addAll:","with:","allSubclasses","yourself"]}),$globals.Behavior),$core.addClass("Class",$globals.Behavior,[],"Kernel-Classes"),$core.addMethod($core.method({selector:"asJavascript",protocol:"converting",fn:function(){var e=this,t;return t="$globals.".__comma(e._name()),t},messageSends:[",","name"]}),$globals.Class),$core.addMethod($core.method({selector:"browse",protocol:"browsing",fn:function(){function t(){return $globals.Finder||(typeof Finder=="undefined"?nil:Finder)}var e=this;return $recv(t())._findClass_(e),e},messageSends:["findClass:"]}),$globals.Class),$core.addMethod($core.method({selector:"category",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e._package(),(r=t)==null||r.isNil?n="Unclassified":n=$recv(e._package())._name(),n},messageSends:["ifNil:ifNotNil:","package","name"]}),$globals.Class),$core.addMethod($core.method({selector:"classTag",protocol:"accessing",fn:function(){var e=this;return"class"},messageSends:[]}),$globals.Class),$core.addMethod($core.method({selector:"definition",protocol:"accessing",fn:function(){function t(){return $globals.String||(typeof String=="undefined"?nil:String)}var e=this,n,r,i,s,o,u,a;return a=$recv(t())._streamContents_(function(a){return $recv(a)._nextPutAll_($recv(e._superclass())._asString()),$recv(a)._nextPutAll_(" subclass: #"),$recv(a)._nextPutAll_(e._name()),n=$recv(t())._lf(),r=$recv(t())._tab(),i=$recv(n).__comma(r),$recv(a)._nextPutAll_(i),s=$recv(a)._nextPutAll_("instanceVariableNames: '"),s,$recv(e._instanceVariableNames())._do_separatedBy_(function(e){return $recv(a)._nextPutAll_(e)},function(){return $recv(a)._nextPutAll_(" ")}),o=$recv("'".__comma($recv(t())._lf())).__comma($recv(t())._tab()),$recv(a)._nextPutAll_(o),$recv(a)._nextPutAll_("package: '"),$recv(a)._nextPutAll_(e._category()),u=$recv(a)._nextPutAll_("'"),u}),a},messageSends:["streamContents:","nextPutAll:","asString","superclass","name",",","lf","tab","do:separatedBy:","instanceVariableNames","category"]}),$globals.Class),$core.addMethod($core.method({selector:"isClass",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.Class),$core.addMethod($core.method({selector:"package",protocol:"accessing",fn:function(){var e=this,t;return t=e._basicAt_("pkg"),t},messageSends:["basicAt:"]}),$globals.Class),$core.addMethod($core.method({selector:"package:",protocol:"accessing",fn:function(e){function r(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}function i(){return $globals.ClassMoved||(typeof ClassMoved=="undefined"?nil:ClassMoved)}var t=this,n,s,o,u,a,f;return s=t._package(),o=$recv(s).__eq(e),$core.assert(o)?t:(n=t._package(),t._basicAt_put_("pkg",e),u=$recv(n)._organization(),$recv(u)._removeElement_(t),$recv($recv(e)._organization())._addElement_(t),a=$recv(i())._new(),$recv(a)._theClass_(t),$recv(a)._oldPackage_(n),f=$recv(a)._yourself(),$recv($recv(r())._current())._announce_(f),t)},messageSends:["ifTrue:","=","package","basicAt:put:","removeElement:","organization","addElement:","announce:","current","theClass:","new","oldPackage:","yourself"]}),$globals.Class),$core.addMethod($core.method({selector:"printOn:",protocol:"printing",fn:function(e){var t=this;return $recv(e)._nextPutAll_(t._name()),t},messageSends:["nextPutAll:","name"]}),$globals.Class),$core.addMethod($core.method({selector:"rename:",protocol:"accessing",fn:function(e){function n(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}var t=this;return $recv($recv(n())._new())._renameClass_to_(t,e),t},messageSends:["renameClass:to:","new"]}),$globals.Class),$core.addMethod($core.method({selector:"subclass:instanceVariableNames:",protocol:"class creation",fn:function(e,t){var n=this,r;return r=n._subclass_instanceVariableNames_package_(e,t,nil),r},messageSends:["subclass:instanceVariableNames:package:"]}),$globals.Class),$core.addMethod($core.method({selector:"subclass:instanceVariableNames:category:",protocol:"class creation",fn:function(e,t,n){var r=this,i;return i=r._subclass_instanceVariableNames_package_(e,t,n),i},messageSends:["subclass:instanceVariableNames:package:"]}),$globals.Class),$core.addMethod($core.method({selector:"subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",protocol:"class creation",fn:function(e,t,n,r,i){var s=this,o;return o=s._subclass_instanceVariableNames_package_(e,t,i),o},messageSends:["subclass:instanceVariableNames:package:"]}),$globals.Class),$core.addMethod($core.method({selector:"subclass:instanceVariableNames:package:",protocol:"class creation",fn:function(e,t,n){function i(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}var r=this,s;return s=$recv($recv(i())._new())._superclass_subclass_instanceVariableNames_package_(r,$recv(e)._asString(),t,n),s},messageSends:["superclass:subclass:instanceVariableNames:package:","new","asString"]}),$globals.Class),$core.addMethod($core.method({selector:"subclasses",protocol:"accessing",fn:function(){var e=this;return e.subclasses._copy()},messageSends:[]}),$globals.Class),$core.addMethod($core.method({selector:"theMetaClass",protocol:"accessing",fn:function(){var e=this,t;return t=e._class(),t},messageSends:["class"]}),$globals.Class),$core.addMethod($core.method({selector:"theNonMetaClass",protocol:"accessing",fn:function(){var e=this;return e},messageSends:[]}),$globals.Class),$core.addClass("Metaclass",$globals.Behavior,[],"Kernel-Classes"),$core.addMethod($core.method({selector:"asJavascript",protocol:"converting",fn:function(){var e=this,t;return t=$recv("$globals.".__comma($recv(e._instanceClass())._name())).__comma(".klass"),t},messageSends:[",","name","instanceClass"]}),$globals.Metaclass),$core.addMethod($core.method({selector:"definition",protocol:"accessing",fn:function(){function t(){return $globals.String||(typeof String=="undefined"?nil:String)}var e=this,n,r;return r=$recv(t())._streamContents_(function(t){return $recv(t)._nextPutAll_(e._asString()),n=$recv(t)._nextPutAll_(" instanceVariableNames: '"),n,$recv(e._instanceVariableNames())._do_separatedBy_(function(e){return $recv(t)._nextPutAll_(e)},function(){return $recv(t)._nextPutAll_(" ")}),$recv(t)._nextPutAll_("'")}),r},messageSends:["streamContents:","nextPutAll:","asString","do:separatedBy:","instanceVariableNames"]}),$globals.Metaclass),$core.addMethod($core.method({selector:"instanceClass",protocol:"accessing",fn:function(){var e=this;return e.instanceClass},messageSends:[]}),$globals.Metaclass),$core.addMethod($core.method({selector:"instanceVariableNames:",protocol:"accessing",fn:function(e){function n(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}var t=this;return $recv($recv(n())._new())._class_instanceVariableNames_(t,e),t},messageSends:["class:instanceVariableNames:","new"]}),$globals.Metaclass),$core.addMethod($core.method({selector:"isMetaclass",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.Metaclass),$core.addMethod($core.method({selector:"package",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._instanceClass())._package(),t},messageSends:["package","instanceClass"]}),$globals.Metaclass),$core.addMethod($core.method({selector:"printOn:",protocol:"printing",fn:function(e){var t=this,n;return $recv(e)._nextPutAll_($recv(t._instanceClass())._name()),n=$recv(e)._nextPutAll_(" class"),t},messageSends:["nextPutAll:","name","instanceClass"]}),$globals.Metaclass),$core.addMethod($core.method({selector:"subclasses",protocol:"accessing",fn:function(){var e=this,t;return t=$recv($recv($recv(e._instanceClass())._subclasses())._select_(function(e){return $recv($recv(e)._isMetaclass())._not()}))._collect_(function(e){return $recv(e)._theMetaClass()}),t},messageSends:["collect:","select:","subclasses","instanceClass","not","isMetaclass","theMetaClass"]}),$globals.Metaclass),$core.addMethod($core.method({selector:"theMetaClass",protocol:"accessing",fn:function(){var e=this;return e},messageSends:[]}),$globals.Metaclass),$core.addMethod($core.method({selector:"theNonMetaClass",protocol:"accessing",fn:function(){var e=this,t;return t=e._instanceClass(),t},messageSends:["instanceClass"]}),$globals.Metaclass),$core.addClass("ClassBuilder",$globals.Object,[],"Kernel-Classes"),$core.addMethod($core.method({selector:"addSubclassOf:named:instanceVariableNames:package:",protocol:"class definition",fn:function(e,t,n,r){function u(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}function a(){return $globals.Package||(typeof Package=="undefined"?nil:Package)}var i=this,s,o,f,l,c,h,p;s=$recv($recv(u())._globals())._at_(t),o=$recv(a())._named_(r),f=s;if((p=f)==null||p.isNil)f;else{$recv(s)._package_(o),l=$recv($recv(s)._superclass()).__eq_eq(e);if(!$core.assert(l))return c=i._migrateClassNamed_superclass_instanceVariableNames_package_(t,e,n,r),c}return h=i._basicAddSubclassOf_named_instanceVariableNames_package_(e,t,n,r),h},messageSends:["at:","globals","named:","ifNotNil:","package:","ifFalse:","==","superclass","migrateClassNamed:superclass:instanceVariableNames:package:","basicAddSubclassOf:named:instanceVariableNames:package:"]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"basicAddSubclassOf:named:instanceVariableNames:package:",protocol:"private",fn:function(e,t,n,r){var i=this;return $core.addClass(t,e,n,r),$globals[t]},messageSends:[]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"basicClass:instanceVariableNames:",protocol:"private",fn:function(e,t){var n=this;return n._basicClass_instanceVariables_(e,n._instanceVariableNamesFor_(t)),n},messageSends:["basicClass:instanceVariables:","instanceVariableNamesFor:"]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"basicClass:instanceVariables:",protocol:"private",fn:function(e,t){var n=this,r;return r=$recv(e)._isMetaclass(),$core.assert(r)||n._error_($recv($recv(e)._name()).__comma(" is not a metaclass")),$recv(e)._basicAt_put_("iVarNames",t),n},messageSends:["ifFalse:","isMetaclass","error:",",","name","basicAt:put:"]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"basicRemoveClass:",protocol:"private",fn:function(e){var t=this;return $core.removeClass(e),t},messageSends:[]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"basicRenameClass:to:",protocol:"private",fn:function(e,t){var n=this;return $globals[t]=e,delete $globals[e.className],e.className=t,n},messageSends:[]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"basicSwapClassNames:with:",protocol:"private",fn:function(e,t){var n=this,r=e.className;return e.className=t.className,t.className=r,n},messageSends:[]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"class:instanceVariableNames:",protocol:"class definition",fn:function(e,t){function r(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}function i(){return $globals.ClassDefinitionChanged||(typeof ClassDefinitionChanged=="undefined"?nil:ClassDefinitionChanged)}var n=this,s,o;return n._basicClass_instanceVariableNames_(e,t),n._setupClass_(e),s=$recv(i())._new(),$recv(s)._theClass_(e),o=$recv(s)._yourself(),$recv($recv(r())._current())._announce_(o),n},messageSends:["basicClass:instanceVariableNames:","setupClass:","announce:","current","theClass:","new","yourself"]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"copyClass:named:",protocol:"copying",fn:function(e,t){function i(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}function s(){return $globals.ClassAdded||(typeof ClassAdded=="undefined"?nil:ClassAdded)}var n=this,r,o,u,a;return r=n._addSubclassOf_named_instanceVariableNames_package_($recv(e)._superclass(),t,$recv(e)._instanceVariableNames(),$recv($recv(e)._package())._name()),n._copyClass_to_(e,r),o=$recv(s())._new(),$recv(o)._theClass_(r),u=$recv(o)._yourself(),$recv($recv(i())._current())._announce_(u),a=r,a},messageSends:["addSubclassOf:named:instanceVariableNames:package:","superclass","instanceVariableNames","name","package","copyClass:to:","announce:","current","theClass:","new","yourself"]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"copyClass:to:",protocol:"copying",fn:function(e,t){function r(){return $globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}var n=this,i,s,o,u,a,f,l,c,h;return $recv(t)._comment_($recv(e)._comment()),i=$recv(e)._methodDictionary(),$recv(i)._valuesDo_(function(e){return s=$recv(r())._new(),o=$recv(e)._source(),u=$recv(e)._protocol(),$recv(s)._install_forClass_protocol_(o,t,u)}),a=$recv(t)._class(),f=$recv(e)._class(),l=$recv(f)._instanceVariableNames(),n._basicClass_instanceVariables_(a,l),c=$recv(e)._class(),h=$recv(c)._methodDictionary(),$recv(h)._valuesDo_(function(e){return $recv($recv(r())._new())._install_forClass_protocol_($recv(e)._source(),$recv(t)._class(),$recv(e)._protocol())}),n._setupClass_(t),n},messageSends:["comment:","comment","valuesDo:","methodDictionary","install:forClass:protocol:","new","source","protocol","basicClass:instanceVariables:","class","instanceVariableNames","setupClass:"]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"installMethod:forClass:protocol:",protocol:"method definition",fn:function(e,t,n){var r=this;return $recv(e)._protocol_(n),$recv(t)._addCompiledMethod_(e),e},messageSends:["protocol:","addCompiledMethod:"]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"instanceVariableNamesFor:",protocol:"accessing",fn:function(e){var t=this,n;return n=$recv($recv(e)._tokenize_(" "))._reject_(function(e){return $recv(e)._isEmpty()}),n},messageSends:["reject:","tokenize:","isEmpty"]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"migrateClass:superclass:",protocol:"class migration",fn:function(e,t){var n=this,r,i;return r=$recv(e)._name(),i=n._migrateClassNamed_superclass_instanceVariableNames_package_(r,t,$recv(e)._instanceVariableNames(),$recv($recv(e)._package())._name()),i},messageSends:["migrateClassNamed:superclass:instanceVariableNames:package:","name","instanceVariableNames","package"]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"migrateClassNamed:superclass:instanceVariableNames:package:",protocol:"class migration",fn:function(e,t,n,r){function a(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}function f(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}function l(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}function c(){return $globals.ClassMigrated||(typeof ClassMigrated=="undefined"?nil:ClassMigrated)}var i=this,s,o,u,h,p,d,v,m;return u="new*".__comma(e),s=$recv($recv(a())._globals())._at_(e),o=i._addSubclassOf_named_instanceVariableNames_package_(t,u,n,r),i._basicSwapClassNames_with_(s,o),$recv(function(){return i._copyClass_to_(s,o)})._on_do_(f(),function(e){return i._basicSwapClassNames_with_(s,o),h=i._basicRemoveClass_(o),h,$recv(e)._resignal()}),i._rawRenameClass_to_(s,u),p=i._rawRenameClass_to_(o,e),$recv($recv(s)._subclasses())._do_(function(e){return i._migrateClass_superclass_(e,o)}),i._basicRemoveClass_(s),d=$recv(c())._new(),$recv(d)._theClass_(o),$recv(d)._oldClass_(s),v=$recv(d)._yourself(),$recv($recv(l())._current())._announce_(v),m=o,m},messageSends:[",","at:","globals","addSubclassOf:named:instanceVariableNames:package:","basicSwapClassNames:with:","on:do:","copyClass:to:","basicRemoveClass:","resignal","rawRenameClass:to:","do:","subclasses","migrateClass:superclass:","announce:","current","theClass:","new","oldClass:","yourself"]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"rawRenameClass:to:",protocol:"private",fn:function(e,t){var n=this;return $globals[t]=e,n},messageSends:[]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"renameClass:to:",protocol:"class migration",fn:function(e,t){function r(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}function i(){return $globals.ClassRenamed||(typeof ClassRenamed=="undefined"?nil:ClassRenamed)}var n=this,s,o;return n._basicRenameClass_to_(e,t),$recv(e)._recompile(),s=$recv(i())._new(),$recv(s)._theClass_(e),o=$recv(s)._yourself(),$recv($recv(r())._current())._announce_(o),n},messageSends:["basicRenameClass:to:","recompile","announce:","current","theClass:","new","yourself"]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"setupClass:",protocol:"public",fn:function(e){var t=this;return $core.init(e),t},messageSends:[]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"superclass:subclass:",protocol:"class definition",fn:function(e,t){var n=this,r;return r=n._superclass_subclass_instanceVariableNames_package_(e,t,"",nil),r},messageSends:["superclass:subclass:instanceVariableNames:package:"]}),$globals.ClassBuilder),$core.addMethod($core.method({selector:"superclass:subclass:instanceVariableNames:package:",protocol:"class definition",fn:function(e,t,n,r){function o(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}function u(){return $globals.ClassAdded||(typeof ClassAdded=="undefined"?nil:ClassAdded)}var i=this,s,a,f,l,c,h,p;return a=i._instanceVariableNamesFor_(n),(p=r)==null||p.isNil?f="unclassified":f=r,s=i._addSubclassOf_named_instanceVariableNames_package_(e,t,a,f),i._setupClass_(s),l=$recv(u())._new(),$recv(l)._theClass_(s),c=$recv(l)._yourself(),$recv($recv(o())._current())._announce_(c),h=s,h},messageSends:["addSubclassOf:named:instanceVariableNames:package:","instanceVariableNamesFor:","ifNil:","setupClass:","announce:","current","theClass:","new","yourself"]}),$globals.ClassBuilder),$core.addClass("ClassSorterNode",$globals.Object,["theClass","level","nodes"],"Kernel-Classes"),$core.addMethod($core.method({selector:"getNodesFrom:",protocol:"accessing",fn:function(e){function i(){return $globals.ClassSorterNode||(typeof ClassSorterNode=="undefined"?nil:ClassSorterNode)}var t=this,n,r,s;return n=[],r=[],$recv(e)._do_(function(e){return s=$recv($recv(e)._superclass()).__eq(t._theClass()),$core.assert(s)?$recv(n)._add_(e):$recv(r)._add_(e)}),t["@nodes"]=$recv(n)._collect_(function(e){return $recv(i())._on_classes_level_(e,r,$recv(t._level()).__plus(1))}),t},messageSends:["do:","ifTrue:ifFalse:","=","superclass","theClass","add:","collect:","on:classes:level:","+","level"]}),$globals.ClassSorterNode),$core.addMethod($core.method({selector:"level",protocol:"accessing",fn:function(){var e=this,t;return t=e["@level"],t},messageSends:[]}),$globals.ClassSorterNode),$core.addMethod($core.method({selector:"level:",protocol:"accessing",fn:function(e){var t=this;return t["@level"]=e,t},messageSends:[]}),$globals.ClassSorterNode),$core.addMethod($core.method({selector:"nodes",protocol:"accessing",fn:function(){var e=this,t;return t=e["@nodes"],t},messageSends:[]}),$globals.ClassSorterNode),$core.addMethod($core.method({selector:"theClass",protocol:"accessing",fn:function(){var e=this,t;return t=e["@theClass"],t},messageSends:[]}),$globals.ClassSorterNode),$core.addMethod($core.method({selector:"theClass:",protocol:"accessing",fn:function(e){var t=this;return t["@theClass"]=e,t},messageSends:[]}),$globals.ClassSorterNode),$core.addMethod($core.method({selector:"traverseClassesWith:",protocol:"visiting",fn:function(e){var t=this,n,r,i;return n=t._theClass(),$recv(e)._add_(n),$recv($recv(t._nodes())._sorted_(function(e,t){return r=$recv(e)._theClass(),i=$recv(r)._name(),$recv(i).__lt_eq($recv($recv(t)._theClass())._name())}))._do_(function(t){return $recv(t)._traverseClassesWith_(e)}),t},messageSends:["add:","theClass","do:","sorted:","nodes","<=","name","traverseClassesWith:"]}),$globals.ClassSorterNode),$core.addMethod($core.method({selector:"on:classes:level:",protocol:"instance creation",fn:function(e,t,n){var r=this,i,s,o;return i=r._new(),$recv(i)._theClass_(e),$recv(i)._level_(n),$recv(i)._getNodesFrom_(t),s=$recv(i)._yourself(),o=s,o},messageSends:["theClass:","new","level:","getNodesFrom:","yourself"]}),$globals.ClassSorterNode.klass)}),define("amber_core/Kernel-Methods",["amber/boot","amber_core/Kernel-Objects"],function($boot){"use strict";var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;$core.addPackage("Kernel-Methods"),$core.packages["Kernel-Methods"].innerEval=function(expr){return eval(expr)},$core.packages["Kernel-Methods"].transport={type:"amd",amdNamespace:"amber_core"},$core.addClass("BlockClosure",$globals.Object,[],"Kernel-Methods"),$core.addMethod($core.method({selector:"applyTo:arguments:",protocol:"evaluating",fn:function(e,t){var n=this;return n.apply(e,t)},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"asCompiledMethod:",protocol:"converting",fn:function(e){var t=this;return $core.method({selector:e,fn:t})},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"compiledSource",protocol:"accessing",fn:function(){var e=this;return e.toString()},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"currySelf",protocol:"converting",fn:function(){var e=this;return function(){var t=[this];return t.push.apply(t,arguments),e.apply(null,t)}},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"ensure:",protocol:"evaluating",fn:function(e){var t=this;try{return t._value()}finally{e._value()}return t},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"fork",protocol:"timeout/interval",fn:function(){function t(){return $globals.ForkPool||(typeof ForkPool=="undefined"?nil:ForkPool)}var e=this;return $recv($recv(t())._default())._fork_(e),e},messageSends:["fork:","default"]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"new",protocol:"evaluating",fn:function(){var e=this;return new e},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"newValue:",protocol:"evaluating",fn:function(e){var t=this,n;return n=t._newWithValues_([e]),n},messageSends:["newWithValues:"]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"newValue:value:",protocol:"evaluating",fn:function(e,t){var n=this,r;return r=n._newWithValues_([e,t]),r},messageSends:["newWithValues:"]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"newValue:value:value:",protocol:"evaluating",fn:function(e,t,n){var r=this,i;return i=r._newWithValues_([e,t,n]),i},messageSends:["newWithValues:"]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"newWithValues:",protocol:"evaluating",fn:function(e){var t=this,n=Object.create(t.prototype),r=t.apply(n,e);return typeof r=="object"?r:n},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"numArgs",protocol:"accessing",fn:function(){var e=this;return e.length},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"on:do:",protocol:"error handling",fn:function(e,t){function r(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var n=this,i,s;return s=n._tryCatch_(function(n){var s;return s=$recv(r())._asSmalltalkException_(n),s,i=$recv(s)._isKindOf_(e),$core.assert(i)?$recv(t)._value_(s):$recv(s)._resignal()}),s},messageSends:["tryCatch:","asSmalltalkException:","ifTrue:ifFalse:","isKindOf:","value:","resignal"]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"receiver",protocol:"accessing",fn:function(){var e=this;return nil},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"timeToRun",protocol:"evaluating",fn:function(){function t(){return $globals.Date||(typeof Date=="undefined"?nil:Date)}var e=this,n;return n=$recv(t())._millisecondsToRun_(e),n},messageSends:["millisecondsToRun:"]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"tryCatch:",protocol:"error handling",fn:function(e){var t=this;try{return t._value()}catch(n){if(Array.isArray(n)&&n.length===1)throw n;return e._value_(n)}return t},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"value",protocol:"evaluating",fn:function(){var e=this;return e()},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"value:",protocol:"evaluating",fn:function(e){var t=this;return t(e)},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"value:value:",protocol:"evaluating",fn:function(e,t){var n=this;return n(e,t)},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"value:value:value:",protocol:"evaluating",fn:function(e,t,n){var r=this;return r(e,t,n)},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"valueWithInterval:",protocol:"timeout/interval",fn:function(e){var t=this,n=setInterval(t,e);return $globals.Timeout._on_(n)},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"valueWithPossibleArguments:",protocol:"evaluating",fn:function(e){var t=this;return t.apply(null,e)},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"valueWithTimeout:",protocol:"timeout/interval",fn:function(e){var t=this,n=setTimeout(t,e);return $globals.Timeout._on_(n)},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"whileFalse",protocol:"controlling",fn:function(){var e=this;return e._whileFalse_(function(){}),e},messageSends:["whileFalse:"]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"whileFalse:",protocol:"controlling",fn:function(e){var t=this;while(!$core.assert(t._value()))e._value();return t},messageSends:[]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"whileTrue",protocol:"controlling",fn:function(){var e=this;return e._whileTrue_(function(){}),e},messageSends:["whileTrue:"]}),$globals.BlockClosure),$core.addMethod($core.method({selector:"whileTrue:",protocol:"controlling",fn:function(e){var t=this;while($core.assert(t._value()))e._value();return t},messageSends:[]}),$globals.BlockClosure),$core.addClass("CompiledMethod",$globals.Object,[],"Kernel-Methods"),$core.addMethod($core.method({selector:"arguments",protocol:"accessing",fn:function(){var e=this;return e.args||[]},messageSends:[]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"browse",protocol:"browsing",fn:function(){function t(){return $globals.Finder||(typeof Finder=="undefined"?nil:Finder)}var e=this;return $recv(t())._findMethod_(e),e},messageSends:["findMethod:"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"category",protocol:"accessing",fn:function(){var e=this,t;return t=e._protocol(),t},messageSends:["protocol"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"defaultProtocol",protocol:"defaults",fn:function(){var e=this;return"as yet unclassified"},messageSends:[]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"fn",protocol:"accessing",fn:function(){var e=this,t;return t=e._basicAt_("fn"),t},messageSends:["basicAt:"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"fn:",protocol:"accessing",fn:function(e){var t=this;return t._basicAt_put_("fn",e),t},messageSends:["basicAt:put:"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"isCompiledMethod",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"isOverridden",protocol:"testing",fn:function(){var e=this,t,n,r={};try{return t=e._selector(),$recv(e._methodClass())._allSubclassesDo_(function(e){n=$recv(e)._includesSelector_(t);if($core.assert(n))throw r=[!0]}),!1}catch(i){if(i===r)return i[0];throw i}},messageSends:["selector","allSubclassesDo:","methodClass","ifTrue:","includesSelector:"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"isOverride",protocol:"testing",fn:function(){var e=this,t,n,r,i,s;return n=e._methodClass(),t=$recv(n)._superclass(),r=t,(s=r)==null||s.isNil?!1:(r,i=$recv($recv($recv(e._methodClass())._superclass())._lookupSelector_(e._selector()))._notNil(),i)},messageSends:["superclass","methodClass","ifNil:","notNil","lookupSelector:","selector"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"messageSends",protocol:"accessing",fn:function(){var e=this,t;return t=e._basicAt_("messageSends"),t},messageSends:["basicAt:"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"methodClass",protocol:"accessing",fn:function(){var e=this,t;return t=e._basicAt_("methodClass"),t},messageSends:["basicAt:"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"package",protocol:"accessing",fn:function(){var e=this,t,n,r;t=e._methodClass();if((r=t)==null||r.isNil)n=t;else{var i;i=r,n=$recv(i)._packageOfProtocol_(e._protocol())}return n},messageSends:["ifNotNil:","methodClass","packageOfProtocol:","protocol"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"protocol",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e._basicAt_("protocol"),(r=t)==null||r.isNil?n=e._defaultProtocol():n=t,n},messageSends:["ifNil:","basicAt:","defaultProtocol"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"protocol:",protocol:"accessing",fn:function(e){function r(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}function i(){return $globals.MethodMoved||(typeof MethodMoved=="undefined"?nil:MethodMoved)}var t=this,n,s,o,u,a;n=t._protocol(),t._basicAt_put_("protocol",e),s=$recv(i())._new(),$recv(s)._method_(t),$recv(s)._oldProtocol_(n),o=$recv(s)._yourself(),$recv($recv(r())._current())._announce_(o),u=t._methodClass();if((a=u)==null||a.isNil)u;else{var f;f=a,$recv($recv(f)._organization())._addElement_(e),$recv(f)._removeProtocolIfEmpty_(n)}return t},messageSends:["protocol","basicAt:put:","announce:","current","method:","new","oldProtocol:","yourself","ifNotNil:","methodClass","addElement:","organization","removeProtocolIfEmpty:"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"referencedClasses",protocol:"accessing",fn:function(){var e=this,t;return t=e._basicAt_("referencedClasses"),t},messageSends:["basicAt:"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"selector",protocol:"accessing",fn:function(){var e=this,t;return t=e._basicAt_("selector"),t},messageSends:["basicAt:"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"selector:",protocol:"accessing",fn:function(e){var t=this;return t._basicAt_put_("selector",e),t},messageSends:["basicAt:put:"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"sendTo:arguments:",protocol:"evaluating",fn:function(e,t){var n=this,r;return r=$recv(n._fn())._applyTo_arguments_(e,t),r},messageSends:["applyTo:arguments:","fn"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"source",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e._basicAt_("source"),(r=t)==null||r.isNil?n="":n=t,n},messageSends:["ifNil:","basicAt:"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"source:",protocol:"accessing",fn:function(e){var t=this;return t._basicAt_put_("source",e),t},messageSends:["basicAt:put:"]}),$globals.CompiledMethod),$core.addClass("ForkPool",$globals.Object,["poolSize","maxPoolSize","queue","worker"],"Kernel-Methods"),$core.addMethod($core.method({selector:"addWorker",protocol:"private",fn:function(){var e=this;return $recv(e["@worker"])._valueWithTimeout_(0),e["@poolSize"]=$recv(e["@poolSize"]).__plus(1),e},messageSends:["valueWithTimeout:","+"]}),$globals.ForkPool),$core.addMethod($core.method({selector:"defaultMaxPoolSize",protocol:"defaults",fn:function(){var e=this,t;return t=$recv(e._class())._defaultMaxPoolSize(),t},messageSends:["defaultMaxPoolSize","class"]}),$globals.ForkPool),$core.addMethod($core.method({selector:"fork:",protocol:"actions",fn:function(e){var t=this,n;return n=$recv(t["@poolSize"]).__lt(t._maxPoolSize()),$core.assert(n)&&t._addWorker(),$recv(t["@queue"])._nextPut_(e),t},messageSends:["ifTrue:","<","maxPoolSize","addWorker","nextPut:"]}),$globals.ForkPool),$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){function t(){return $globals.Queue||(typeof Queue=="undefined"?nil:Queue)}var e=this;return $globals.ForkPool.superclass.fn.prototype._initialize.apply($recv(e),[]),e["@poolSize"]=0,e["@queue"]=$recv(t())._new(),e["@worker"]=e._makeWorker(),e},messageSends:["initialize","new","makeWorker"]}),$globals.ForkPool),$core.addMethod($core.method({selector:"makeWorker",protocol:"initialization",fn:function(){function n(){return $globals.Object||(typeof Object=="undefined"?nil:Object)}var e=this,t,r,i;return t=$recv(n())._new(),i=function(){var n;e["@poolSize"]=$recv(e["@poolSize"]).__minus(1),e["@poolSize"],n=$recv(e["@queue"])._nextIfAbsent_(function(){return t}),n,r=$recv(n).__eq_eq(t);if(!$core.assert(r))return $recv(function(){return $recv(n)._value()})._ensure_(function(){return e._addWorker()})},i},messageSends:["new","-","nextIfAbsent:","ifFalse:","==","ensure:","value","addWorker"]}),$globals.ForkPool),$core.addMethod($core.method({selector:"maxPoolSize",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@maxPoolSize"],(r=t)==null||r.isNil?n=e._defaultMaxPoolSize():n=t,n},messageSends:["ifNil:","defaultMaxPoolSize"]}),$globals.ForkPool),$core.addMethod($core.method({selector:"maxPoolSize:",protocol:"accessing",fn:function(e){var t=this;return t["@maxPoolSize"]=e,t},messageSends:[]}),$globals.ForkPool),$globals.ForkPool.klass.iVarNames=["default"],$core.addMethod($core.method({selector:"default",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@default"],(r=t)==null||r.isNil?(e["@default"]=e._new(),n=e["@default"]):n=t,n},messageSends:["ifNil:","new"]}),$globals.ForkPool.klass),$core.addMethod($core.method({selector:"defaultMaxPoolSize",protocol:"accessing",fn:function(){var e=this;return 100},messageSends:[]}),$globals.ForkPool.klass),$core.addMethod($core.method({selector:"resetDefault",protocol:"accessing",fn:function(){var e=this;return e["@default"]=nil,e},messageSends:[]}),$globals.ForkPool.klass),$core.addClass("Message",$globals.Object,["selector","arguments"],"Kernel-Methods"),$core.addMethod($core.method({selector:"arguments",protocol:"accessing",fn:function(){var e=this,t;return t=e["@arguments"],t},messageSends:[]}),$globals.Message),$core.addMethod($core.method({selector:"arguments:",protocol:"accessing",fn:function(e){var t=this;return t["@arguments"]=e,t},messageSends:[]}),$globals.Message),$core.addMethod($core.method({selector:"printOn:",protocol:"printing",fn:function(e){var t=this,n;return $globals.Message.superclass.fn.prototype._printOn_.apply($recv(t),[e]),$recv(e)._nextPutAll_("("),$recv(e)._nextPutAll_(t._selector()),n=$recv(e)._nextPutAll_(")"),t},messageSends:["printOn:","nextPutAll:","selector"]}),$globals.Message),$core.addMethod($core.method({selector:"selector",protocol:"accessing",fn:function(){var e=this,t;return t=e["@selector"],t},messageSends:[]}),$globals.Message),$core.addMethod($core.method({selector:"selector:",protocol:"accessing",fn:function(e){var t=this;return t["@selector"]=e,t},messageSends:[]}),$globals.Message),$core.addMethod($core.method({selector:"sendTo:",protocol:"actions",fn:function(e){var t=this,n;return n=$recv(e)._perform_withArguments_(t._selector(),t._arguments()),n},messageSends:["perform:withArguments:","selector","arguments"]}),$globals.Message),$core.addMethod($core.method({selector:"selector:arguments:",protocol:"instance creation",fn:function(e,t){var n=this,r,i,s;return r=n._new(),$recv(r)._selector_(e),$recv(r)._arguments_(t),i=$recv(r)._yourself(),s=i,s},messageSends:["selector:","new","arguments:","yourself"]}),$globals.Message.klass),$core.addClass("MessageSend",$globals.Object,["receiver","message"],"Kernel-Methods"),$core.addMethod($core.method({selector:"arguments",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e["@message"])._arguments(),t},messageSends:["arguments"]}),$globals.MessageSend),$core.addMethod($core.method({selector:"arguments:",protocol:"accessing",fn:function(e){var t=this;return $recv(t["@message"])._arguments_(e),t},messageSends:["arguments:"]}),$globals.MessageSend),$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){function t(){return $globals.Message||(typeof Message=="undefined"?nil:Message)}var e=this;return $globals.MessageSend.superclass.fn.prototype._initialize.apply($recv(e),[]),e["@message"]=$recv(t())._new(),e},messageSends:["initialize","new"]}),$globals.MessageSend),$core.addMethod($core.method({selector:"printOn:",protocol:"printing",fn:function(e){var t=this,n;return $globals.MessageSend.superclass.fn.prototype._printOn_.apply($recv(t),[e]),$recv(e)._nextPutAll_("("),$recv(e)._nextPutAll_(t._receiver()),$recv(e)._nextPutAll_(" >> "),$recv(e)._nextPutAll_(t._selector()),n=$recv(e)._nextPutAll_(")"),t},messageSends:["printOn:","nextPutAll:","receiver","selector"]}),$globals.MessageSend),$core.addMethod($core.method({selector:"receiver",protocol:"accessing",fn:function(){var e=this,t;return t=e["@receiver"],t},messageSends:[]}),$globals.MessageSend),$core.addMethod($core.method({selector:"receiver:",protocol:"accessing",fn:function(e){var t=this;return t["@receiver"]=e,t},messageSends:[]}),$globals.MessageSend),$core.addMethod($core.method({selector:"selector",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e["@message"])._selector(),t},messageSends:["selector"]}),$globals.MessageSend),$core.addMethod($core.method({selector:"selector:",protocol:"accessing",fn:function(e){var t=this;return $recv(t["@message"])._selector_(e),t},messageSends:["selector:"]}),$globals.MessageSend),$core.addMethod($core.method({selector:"value",protocol:"evaluating",fn:function(){var e=this,t;return t=$recv(e["@message"])._sendTo_(e._receiver()),t},messageSends:["sendTo:","receiver"]}),$globals.MessageSend),$core.addMethod($core.method({selector:"value:",protocol:"evaluating",fn:function(e){var t=this,n,r,i;return n=t["@message"],$recv(n)._arguments_([e]),r=$recv(n)._sendTo_(t._receiver()),i=r,i},messageSends:["arguments:","sendTo:","receiver"]}),$globals.MessageSend),$core.addMethod($core.method({selector:"value:value:",protocol:"evaluating",fn:function(e,t){var n=this,r,i,s;return r=n["@message"],$recv(r)._arguments_([e,t]),i=$recv(r)._sendTo_(n._receiver()),s=i,s},messageSends:["arguments:","sendTo:","receiver"]}),$globals.MessageSend),$core.addMethod($core.method({selector:"value:value:value:",protocol:"evaluating",fn:function(e,t,n){var r=this,i,s,o;return i=r["@message"],$recv(i)._arguments_([e,t,n]),s=$recv(i)._sendTo_(r._receiver()),o=s,o},messageSends:["arguments:","sendTo:","receiver"]}),$globals.MessageSend),$core.addMethod($core.method({selector:"valueWithPossibleArguments:",protocol:"evaluating",fn:function(e){var t=this,n;return t._arguments_(e),n=t._value(),n},messageSends:["arguments:","value"]}),$globals.MessageSend),$core.addClass("MethodContext",$globals.Object,[],"Kernel-Methods"),$core.addMethod($core.method({selector:"asString",protocol:"converting",fn:function(){var e=this,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m;t=e._isBlockContext();if($core.assert(t))n="a block (in ".__comma($recv(e._methodContext())._asString()),m=$recv(n).__comma(")");else{var g;g=$recv(e._method())._methodClass(),g,r=g,i=e._receiver(),s=$recv(i)._class(),o=$recv(r).__eq(s),$core.assert(o)?(u=e._receiver(),a=$recv(u)._class(),f=$recv(a)._name(),l=$recv(f).__comma(" >> "),c=e._selector(),m=$recv(l).__comma(c)):(h=$recv($recv(e._receiver())._class())._name(),p=$recv(h).__comma("("),d=$recv(p).__comma($recv(g)._name()),v=$recv(d).__comma(") >> "),m=$recv(v).__comma(e._selector()))}return m},messageSends:["ifTrue:ifFalse:","isBlockContext",",","asString","methodContext","methodClass","method","=","class","receiver","name","selector"]}),$globals.MethodContext),$core.addMethod($core.method({selector:"basicReceiver",protocol:"accessing",fn:function(){var e=this;return e.receiver},messageSends:[]}),$globals.MethodContext),$core.addMethod($core.method({selector:"evaluatedSelector",protocol:"accessing",fn:function(){var e=this;return e.evaluatedSelector},messageSends:[]}),$globals.MethodContext),$core.addMethod($core.method({selector:"findContextSuchThat:",protocol:"accessing",fn:function(e){var t=this,n,r,i,s={};try{return n=t,$recv(function(){return $recv(n)._isNil()})._whileFalse_(function(){r=$recv(e)._value_(n);if($core.assert(r))throw i=n,s=[i];return n=$recv(n)._outerContext(),n}),nil}catch(o){if(o===s)return o[0];throw o}},messageSends:["whileFalse:","isNil","ifTrue:","value:","outerContext"]}),$globals.MethodContext),$core.addMethod($core.method({selector:"home",protocol:"accessing",fn:function(){var e=this;return e.homeContext},messageSends:[]}),$globals.MethodContext),$core.addMethod($core.method({selector:"index",protocol:"accessing",fn:function(){var e=this;return e.index||0},messageSends:[]}),$globals.MethodContext),$core.addMethod($core.method({selector:"isBlockContext",protocol:"testing",fn:function(){var e=this,t;return t=$recv(e._selector())._isNil(),t},messageSends:["isNil","selector"]}),$globals.MethodContext),$core.addMethod($core.method({selector:"locals",protocol:"accessing",fn:function(){var e=this;return e.locals||{}},messageSends:[]}),$globals.MethodContext),$core.addMethod($core.method({selector:"method",protocol:"accessing",fn:function(){var e=this,t,n,r,i,s,o,u,a,f,l,c,h,p,d;s=e._methodContext();if((d=s)==null||d.isNil)return nil;s,o=e._methodContext(),u=$recv(o)._receiver(),r=$recv(u)._class(),a=r,f=e._methodContext(),l=$recv(f)._selector(),t=$recv(a)._lookupSelector_(l),c=e._outerContext();if((d=c)==null||d.isNil)i=!1;else{var v;v=d,i=$recv(v)._supercall()}return h=i,$core.assert(h)?p=$recv($recv($recv(t)._methodClass())._superclass())._lookupSelector_($recv(e._methodContext())._selector()):p=t,p},messageSends:["ifNil:","methodContext","class","receiver","lookupSelector:","selector","ifNil:ifNotNil:","outerContext","supercall","ifFalse:ifTrue:","superclass","methodClass"]}),$globals.MethodContext),$core.addMethod($core.method({selector:"methodContext",protocol:"accessing",fn:function(){var e=this,t,n,r,i;t=e._isBlockContext();if(!$core.assert(t))return e;n=e._outerContext();if((i=n)==null||i.isNil)r=n;else{var s;s=i,r=$recv(s)._methodContext()}return r},messageSends:["ifFalse:","isBlockContext","ifNotNil:","outerContext","methodContext"]}),$globals.MethodContext),$core.addMethod($core.method({selector:"outerContext",protocol:"accessing",fn:function(){var e=this;return e.outerContext||e.homeContext},messageSends:[]}),$globals.MethodContext),$core.addMethod($core.method({selector:"printOn:",protocol:"printing",fn:function(e){var t=this,n;return $globals.MethodContext.superclass.fn.prototype._printOn_.apply($recv(t),[e]),$recv(e)._nextPutAll_("("),$recv(e)._nextPutAll_(t._asString()),n=$recv(e)._nextPutAll_(")"),t},messageSends:["printOn:","nextPutAll:","asString"]}),$globals.MethodContext),$core.addMethod($core.method({selector:"receiver",protocol:"accessing",fn:function(){var e=this,t,n,r;return n=$recv(e._isBlockContext())._and_(function(){return t=e._outerContext(),$recv(t)._notNil()}),$core.assert(n)?r=$recv(e._outerContext())._receiver():r=e._basicReceiver(),r},messageSends:["ifTrue:ifFalse:","and:","isBlockContext","notNil","outerContext","receiver","basicReceiver"]}),$globals.MethodContext),$core.addMethod($core.method({selector:"selector",protocol:"accessing",fn:function(){var e=this;return e.selector?$core.js2st(e.selector):nil},messageSends:[]}),$globals.MethodContext),$core.addMethod($core.method({selector:"sendIndexAt:",protocol:"accessing",fn:function(e){var t=this;return t.sendIdx[e]||0},messageSends:[]}),$globals.MethodContext),$core.addMethod($core.method({selector:"sendIndexes",protocol:"accessing",fn:function(){var e=this;return e.sendIdx},messageSends:[]}),$globals.MethodContext),$core.addMethod($core.method({selector:"supercall",protocol:"accessing",fn:function(){var e=this;return e.supercall==1},messageSends:[]}),$globals.MethodContext),$core.addClass("NativeFunction",$globals.Object,[],"Kernel-Methods"),$core.addMethod($core.method({selector:"constructor:",protocol:"instance creation",fn:function(aString){var self=this;self._deprecatedAPI_("Use constructorNamed:");var nativeFunc=eval(aString);return new nativeFunc},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"constructor:value:",protocol:"instance creation",fn:function(aString,anObject){var self=this;self._deprecatedAPI_("Use constructorNamed:value:");var nativeFunc=eval(aString);return new nativeFunc(anObject)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"constructor:value:value:",protocol:"instance creation",fn:function(aString,anObject,anObject2){var self=this;self._deprecatedAPI_("Use constructorNamed:value:value:");var nativeFunc=eval(aString);return new nativeFunc(anObject,anObject2)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"constructor:value:value:value:",protocol:"instance creation",fn:function(aString,anObject,anObject2,anObject3){var self=this;self._deprecatedAPI_("Use constructorNamed:value:value:value");var nativeFunc=eval(aString);return new nativeFunc(anObject,anObject2,anObject3)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"constructorNamed:",protocol:"instance creation",fn:function(e){var t=this,n=(new Function("return this"))()[e];return new n},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"constructorNamed:value:",protocol:"instance creation",fn:function(e,t){var n=this,r=(new Function("return this"))()[e];return new r(t)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"constructorNamed:value:value:",protocol:"instance creation",fn:function(e,t,n){var r=this,i=(new Function("return this"))()[e];return new i(t,n)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"constructorNamed:value:value:value:",protocol:"instance creation",fn:function(e,t,n,r){var i=this,s=(new Function("return this"))()[e];return new s(t,n,r)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"constructorOf:",protocol:"instance creation",fn:function(e){var t=this;return new e},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"constructorOf:value:",protocol:"instance creation",fn:function(e,t){var n=this;return new e(t)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"constructorOf:value:value:",protocol:"instance creation",fn:function(e,t,n){var r=this;return new e(t,n)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"constructorOf:value:value:value:",protocol:"instance creation",fn:function(e,t,n,r){var i=this;return new e(t,n,r)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"exists:",protocol:"testing",fn:function(e){function n(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var t=this,r;return r=$recv(n())._existsJsGlobal_(e),r},messageSends:["existsJsGlobal:"]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"functionNamed:",protocol:"function calling",fn:function(e){var t=this,n=(new Function("return this"))()[e];return n()},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"functionNamed:value:",protocol:"function calling",fn:function(e,t){var n=this,r=(new Function("return this"))()[e];return r(t)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"functionNamed:value:value:",protocol:"function calling",fn:function(e,t,n){var r=this,i=(new Function("return this"))()[e];return i(t,n)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"functionNamed:value:value:value:",protocol:"function calling",fn:function(e,t,n,r){var i=this,s=(new Function("return this"))()[e];return s(t,n,r)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"functionNamed:valueWithArgs:",protocol:"function calling",fn:function(e,t){var n=this,r=(new Function("return this"))()[e];return Function.prototype.apply.call(r,null,t)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"functionOf:",protocol:"function calling",fn:function(e){var t=this;return e()},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"functionOf:value:",protocol:"function calling",fn:function(e,t){var n=this;return e(t)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"functionOf:value:value:",protocol:"function calling",fn:function(e,t,n){var r=this;return e(t,n)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"functionOf:value:value:value:",protocol:"function calling",fn:function(e,t,n,r){var i=this;return e(t,n,r)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"functionOf:valueWithArgs:",protocol:"function calling",fn:function(e,t){var n=this;return Function.prototype.apply.call(e,null,t)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"methodOf:this:",protocol:"method calling",fn:function(e,t){var n=this;return Function.prototype.call.call(e,t)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"methodOf:this:value:",protocol:"method calling",fn:function(e,t,n){var r=this;return Function.prototype.call.call(e,t,n)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"methodOf:this:value:value:",protocol:"method calling",fn:function(e,t,n,r){var i=this;return Function.prototype.call.call(e,t,n,r)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"methodOf:this:value:value:value:",protocol:"method calling",fn:function(e,t,n,r,i){var s=this;return Function.prototype.call.call(e,t,n,r,i)},messageSends:[]}),$globals.NativeFunction.klass),$core.addMethod($core.method({selector:"methodOf:this:valueWithArgs:",protocol:"method calling",fn:function(e,t,n){var r=this;return Function.prototype.apply.call(e,t,n)},messageSends:[]}),$globals.NativeFunction.klass),$core.addClass("Timeout",$globals.Object,["rawTimeout"],"Kernel-Methods"),$core.addMethod($core.method({selector:"clearInterval",protocol:"timeout/interval",fn:function(){var e=this,t=e["@rawTimeout"];return clearInterval(t),e},messageSends:[]}),$globals.Timeout),$core.addMethod($core.method({selector:"clearTimeout",protocol:"timeout/interval",fn:function(){var e=this,t=e["@rawTimeout"];return clearTimeout(t),e},messageSends:[]}),$globals.Timeout),$core.addMethod($core.method({selector:"rawTimeout:",protocol:"accessing",fn:function(e){var t=this;return t["@rawTimeout"]=e,t},messageSends:[]}),$globals.Timeout),$core.addMethod($core.method({selector:"on:",protocol:"instance creation",fn:function(e){var t=this,n,r,i;return n=t._new(),$recv(n)._rawTimeout_(e),r=$recv(n)._yourself(),i=r,i},messageSends:["rawTimeout:","new","yourself"]}),$globals.Timeout.klass)}),define("amber_core/Kernel-Collections",["amber/boot","amber_core/Kernel-Objects"],function($boot){"use strict";var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;$core.addPackage("Kernel-Collections"),$core.packages["Kernel-Collections"].innerEval=function(expr){return eval(expr)},$core.packages["Kernel-Collections"].transport={type:"amd",amdNamespace:"amber_core"},$core.addClass("Association",$globals.Object,["key","value"],"Kernel-Collections"),$core.addMethod($core.method({selector:"=",protocol:"comparing",fn:function(e){var t=this,n,r,i,s,o,u;return n=t._class(),r=$recv(n).__eq($recv(e)._class()),u=$recv(r)._and_(function(){return i=t._key(),s=$recv(i).__eq($recv(e)._key()),$recv(s)._and_(function(){return o=t._value(),$recv(o).__eq($recv(e)._value())})}),u},messageSends:["and:","=","class","key","value"]}),$globals.Association),$core.addMethod($core.method({selector:"key",protocol:"accessing",fn:function(){var e=this,t;return t=e["@key"],t},messageSends:[]}),$globals.Association),$core.addMethod($core.method({selector:"key:",protocol:"accessing",fn:function(e){var t=this;return t["@key"]=e,t},messageSends:[]}),$globals.Association),$core.addMethod($core.method({selector:"printOn:",protocol:"printing",fn:function(e){var t=this;return $recv(t._key())._printOn_(e),$recv(e)._nextPutAll_(" -> "),$recv(t._value())._printOn_(e),t},messageSends:["printOn:","key","nextPutAll:","value"]}),$globals.Association),$core.addMethod($core.method({selector:"value",protocol:"accessing",fn:function(){var e=this,t;return t=e["@value"],t},messageSends:[]}),$globals.Association),$core.addMethod($core.method({selector:"value:",protocol:"accessing",fn:function(e){var t=this;return t["@value"]=e,t},messageSends:[]}),$globals.Association),$core.addMethod($core.method({selector:"key:value:",protocol:"instance creation",fn:function(e,t){var n=this,r,i,s;return r=n._new(),$recv(r)._key_(e),$recv(r)._value_(t),i=$recv(r)._yourself(),s=i,s},messageSends:["key:","new","value:","yourself"]}),$globals.Association.klass),$core.addClass("BucketStore",$globals.Object,["buckets","hashBlock"],"Kernel-Collections"),$core.addMethod($core.method({selector:"bucketOfElement:",protocol:"accessing",fn:function(e){var t=this,n=t["@hashBlock"](e);if(!n)return null;var r=t["@buckets"],i=r[n];return i||(i=r[n]=t._newBucket()),i},messageSends:[]}),$globals.BucketStore),$core.addMethod($core.method({selector:"do:",protocol:"enumerating",fn:function(e){var t=this,n=t["@buckets"],r=Object.keys(n);for(var i=0;i=0?n["@values"][r]:t._value()},messageSends:[]}),$globals.Dictionary),$core.addMethod($core.method({selector:"at:put:",protocol:"accessing",fn:function(e,t){var n=this,r=n._positionOfKey_(e);if(r===-1){var i=n["@keys"];r=i.length,i.push(e)}return n["@values"][r]=t},messageSends:[]}),$globals.Dictionary),$core.addMethod($core.method({selector:"includesKey:",protocol:"testing",fn:function(e){var t=this;return t._positionOfKey_(e)>=0},messageSends:[]}),$globals.Dictionary),$core.addMethod($core.method({selector:"indexOf:ifAbsent:",protocol:"accessing",fn:function(e,t){var n=this,r,i,s;return r=$recv(n["@values"])._indexOf_ifAbsent_(e,function(){return 0}),i=$recv(r).__eq(0),$core.assert(i)?s=$recv(t)._value():s=$recv(n["@keys"])._at_(r),s},messageSends:["indexOf:ifAbsent:","ifTrue:ifFalse:","=","value","at:"]}),$globals.Dictionary),$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){var e=this;return $globals.Dictionary.superclass.fn.prototype._initialize.apply($recv(e),[]),e["@keys"]=[],e["@values"]=[],e},messageSends:["initialize"]}),$globals.Dictionary),$core.addMethod($core.method({selector:"keys",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e["@keys"])._copy(),t},messageSends:["copy"]}),$globals.Dictionary),$core.addMethod($core.method({selector:"keysAndValuesDo:",protocol:"enumerating",fn:function(e){var t=this,n;return n=$recv(t["@keys"])._with_do_(t["@values"],e),n},messageSends:["with:do:"]}),$globals.Dictionary),$core.addMethod($core.method({selector:"keysDo:",protocol:"enumerating",fn:function(e){var t=this,n;return n=$recv(t["@keys"])._do_(e),n},messageSends:["do:"]}),$globals.Dictionary),$core.addMethod($core.method({selector:"positionOfKey:",protocol:"private",fn:function(e){var t=this,n=t["@keys"];for(var r=0;r=1&&e<=n.length?n[e-1]:t._value()},messageSends:[]}),$globals.Array),$core.addMethod($core.method({selector:"at:ifPresent:ifAbsent:",protocol:"accessing",fn:function(e,t,n){var r=this;return e>=1&&e<=r.length?t._value_(r[e-1]):n._value()},messageSends:[]}),$globals.Array),$core.addMethod($core.method({selector:"at:put:",protocol:"accessing",fn:function(e,t){var n=this;return n[e-1]=t},messageSends:[]}),$globals.Array),$core.addMethod($core.method({selector:"collect:",protocol:"enumerating",fn:function(e){var t=this;return t.map(function(t){return e._value_(t)})},messageSends:[]}),$globals.Array),$core.addMethod($core.method({selector:"join:",protocol:"enumerating",fn:function(e){var t=this;return t.join(e)},messageSends:[]}),$globals.Array),$core.addMethod($core.method({selector:"numericallyIndexable",protocol:"private",fn:function(){var e=this;return e},messageSends:[]}),$globals.Array),$core.addMethod($core.method({selector:"printOn:",protocol:"printing",fn:function(e){var t=this;return $globals.Array.superclass.fn.prototype._printOn_.apply($recv(t),[e]),$recv(e)._nextPutAll_(" ("),t._do_separatedBy_(function(t){return $recv(t)._printOn_(e)},function(){return $recv(e)._nextPutAll_(" ")}),$recv(e)._nextPutAll_(")"),t},messageSends:["printOn:","nextPutAll:","do:separatedBy:"]}),$globals.Array),$core.addMethod($core.method({selector:"remove:ifAbsent:",protocol:"adding/removing",fn:function(e,t){var n=this,r,i,s;return r=n._indexOf_ifAbsent_(e,function(){return 0}),i=$recv(r).__eq(0),$core.assert(i)?s=$recv(t)._value():(n._removeIndex_(r),s=e),s},messageSends:["indexOf:ifAbsent:","ifFalse:ifTrue:","=","removeIndex:","value"]}),$globals.Array),$core.addMethod($core.method({selector:"removeAll",protocol:"adding/removing",fn:function(){var e=this;return e.length=0,e},messageSends:[]}),$globals.Array),$core.addMethod($core.method({selector:"removeFrom:to:",protocol:"adding/removing",fn:function(e,t){var n=this;return n.splice(e-1,t-e+1),n},messageSends:[]}),$globals.Array),$core.addMethod($core.method({selector:"removeIndex:",protocol:"adding/removing",fn:function(e){var t=this;return t.splice(e-1,1),t},messageSends:[]}),$globals.Array),$core.addMethod($core.method({selector:"removeLast",protocol:"adding/removing",fn:function(){var e=this;return e.pop()},messageSends:[]}),$globals.Array),$core.addMethod($core.method({selector:"reversed",protocol:"converting",fn:function(){var e=this;return e._copy().reverse()},messageSends:[]}),$globals.Array),$core.addMethod($core.method({selector:"select:",protocol:"enumerating",fn:function(e){var t=this,n=t.klass._new();for(var r=0;r",protocol:"comparing",fn:function(e){var t=this;return String(t)>e._asString()},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:">=",protocol:"comparing",fn:function(e){var t=this;return String(t)>=e._asString()},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"asJSON",protocol:"converting",fn:function(){var e=this;return e},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"asJavaScriptMethodName",protocol:"converting",fn:function(){var e=this;return $core.st2js(e)},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"asJavascript",protocol:"converting",fn:function(){var e=this;return e.search(/^[a-zA-Z0-9_:.$ ]*$/)==-1?'"'+e.replace(/[\x00-\x1f"\\\x7f-\x9f]/g,function(e){var t=e.charCodeAt(0);return"\\x"+("0"+t.toString(16)).slice(-2)})+'"':'"'+e+'"'},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"asLowercase",protocol:"converting",fn:function(){var e=this;return e.toLowerCase()},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"asMutator",protocol:"converting",fn:function(){var e=this,t,n;return t=$recv(e._last()).__eq(":"),$core.assert(t)?e:(n=e.__comma(":"),n)},messageSends:["ifFalse:","=","last",","]}),$globals.String),$core.addMethod($core.method({selector:"asNumber",protocol:"converting",fn:function(){var e=this;return Number(e)},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"asRegexp",protocol:"converting",fn:function(){function t(){return $globals.RegularExpression||(typeof RegularExpression=="undefined"?nil:RegularExpression)}var e=this,n;return n=$recv(t())._fromString_(e),n},messageSends:["fromString:"]}),$globals.String),$core.addMethod($core.method({selector:"asString",protocol:"converting",fn:function(){var e=this;return e},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"asSymbol",protocol:"converting",fn:function(){var e=this;return e},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"asUppercase",protocol:"converting",fn:function(){var e=this;return e.toUpperCase()},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"asciiValue",protocol:"accessing",fn:function(){var e=this;return e.charCodeAt(0)},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"at:ifAbsent:",protocol:"accessing",fn:function(e,t){var n=this;return String(n)[e-1]||t._value()},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"at:ifPresent:ifAbsent:",protocol:"accessing",fn:function(e,t,n){var r=this,i=String(r)[e-1];return i?t._value_(i):n._value()},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"capitalized",protocol:"converting",fn:function(){var e=this,t,n;return t=e._isEmpty(),$core.assert(t)?n=e:n=$recv($recv(e._first())._asUppercase()).__comma(e._allButFirst()),n},messageSends:["ifTrue:ifFalse:","isEmpty",",","asUppercase","first","allButFirst"]}),$globals.String),$core.addMethod($core.method({selector:"charCodeAt:",protocol:"accessing",fn:function(e){var t=this;return t.charCodeAt(e-1)},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"copyFrom:to:",protocol:"copying",fn:function(e,t){var n=this;return n.substring(e-1,t)},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"crlfSanitized",protocol:"converting",fn:function(){function t(){return $globals.String||(typeof String=="undefined"?nil:String)}var e=this,n;return n=$recv(e._lines())._join_($recv(t())._lf()),n},messageSends:["join:","lines","lf"]}),$globals.String),$core.addMethod($core.method({selector:"deepCopy",protocol:"copying",fn:function(){var e=this,t;return t=e._shallowCopy(),t},messageSends:["shallowCopy"]}),$globals.String),$core.addMethod($core.method({selector:"escaped",protocol:"converting",fn:function(){var e=this;return escape(e)},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"includesSubString:",protocol:"testing",fn:function(e){var t=this;return t.indexOf(e)!=-1},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"isCapitalized",protocol:"testing",fn:function(){var e=this,t,n,r;return t=e._first(),n=$recv(t)._asUppercase(),r=$recv(n).__eq_eq(e._first()),r},messageSends:["==","asUppercase","first"]}),$globals.String),$core.addMethod($core.method({selector:"isImmutable",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"isString",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"isVowel",protocol:"testing",fn:function(){var e=this,t;return t=$recv($recv(e._size()).__eq(1))._and_(function(){return"aeiou"._includes_(e._asLowercase())}),t},messageSends:["and:","=","size","includes:","asLowercase"]}),$globals.String),$core.addMethod($core.method({selector:"join:",protocol:"split join",fn:function(e){function n(){return $globals.String||(typeof String=="undefined"?nil:String)}var t=this,r;return r=$recv(n())._streamContents_(function(n){return $recv(e)._do_separatedBy_(function(e){return $recv(n)._nextPutAll_($recv(e)._asString())},function(){return $recv(n)._nextPutAll_(t)})}),r},messageSends:["streamContents:","do:separatedBy:","nextPutAll:","asString"]}),$globals.String),$core.addMethod($core.method({selector:"lineIndicesDo:",protocol:"split join",fn:function(e){function a(){return $globals.String||(typeof String=="undefined"?nil:String)}var t=this,n,r,i,s,o,u,f,l,c,h,p,d,v,m,g,y,b,w={};try{return i=1,s=t._size(),n=$recv(a())._cr(),u=t._indexOf_startingAt_(n,1),r=$recv(a())._lf(),o=t._indexOf_startingAt_(r,1),$recv(function(){return $recv(i).__lt_eq(s)})._whileTrue_(function(){f=$recv(o).__eq(0),l=$recv(f)._and_(function(){return $recv(u).__eq(0)});if($core.assert(l))throw $recv(e)._value_value_value_(i,s,s),w=[t];return c=$recv(u).__eq(0),p=$recv(c)._or_(function(){return h=0..__lt(o),$recv(h)._and_(function(){return $recv(o).__lt(u)})}),$core.assert(p)?(d=i,v=$recv(o).__minus(1),$recv(e)._value_value_value_(d,v,o),i=1..__plus(o),i,o=t._indexOf_startingAt_(r,i),o):(m=1..__plus(u),g=$recv(m).__eq(o),$core.assert(g)?(y=i,b=$recv(u).__minus(1),$recv(e)._value_value_value_(y,b,o),i=1..__plus(o),i,u=t._indexOf_startingAt_(n,i),u,o=t._indexOf_startingAt_(r,i),o):($recv(e)._value_value_value_(i,$recv(u).__minus(1),u),i=1..__plus(u),i,u=t._indexOf_startingAt_(n,i),u))}),t}catch(E){if(E===w)return E[0];throw E}},messageSends:["size","cr","indexOf:startingAt:","lf","whileTrue:","<=","ifTrue:","and:","=","value:value:value:","ifTrue:ifFalse:","or:","<","-","+"]}),$globals.String),$core.addMethod($core.method({selector:"lineNumber:",protocol:"split join",fn:function(e){var t=this,n,r,i,s,o={};try{return n=0,t._lineIndicesDo_(function(u,a,f){n=$recv(n).__plus(1),r=n,i=$recv(r).__eq(e);if($core.assert(i))throw s=t._copyFrom_to_(u,a),o=[s]}),nil}catch(u){if(u===o)return u[0];throw u}},messageSends:["lineIndicesDo:","ifTrue:","=","+","copyFrom:to:"]}),$globals.String),$core.addMethod($core.method({selector:"lines",protocol:"split join",fn:function(){function n(){return $globals.Array||(typeof Array=="undefined"?nil:Array)}var e=this,t,r;return t=$recv(n())._new(),e._linesDo_(function(e){return $recv(t)._add_(e)}),r=t,r},messageSends:["new","linesDo:","add:"]}),$globals.String),$core.addMethod($core.method({selector:"linesDo:",protocol:"split join",fn:function(e){var t=this;return t._lineIndicesDo_(function(n,r,i){return $recv(e)._value_(t._copyFrom_to_(n,r))}),t},messageSends:["lineIndicesDo:","value:","copyFrom:to:"]}),$globals.String),$core.addMethod($core.method({selector:"match:",protocol:"regular expressions",fn:function(e){var t=this;return t.search(e)!=-1},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"matchesOf:",protocol:"regular expressions",fn:function(e){var t=this;return t.match(e)},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"numericallyIndexable",protocol:"private",fn:function(){var e=this;return String(e)},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"printNl",protocol:"printing",fn:function(){var e=this;return console.log(e),e},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"printOn:",protocol:"printing",fn:function(e){var t=this,n;return $recv(e)._nextPutAll_("'"),$recv(e)._nextPutAll_(t),n=$recv(e)._nextPutAll_("'"),t},messageSends:["nextPutAll:"]}),$globals.String),$core.addMethod($core.method({selector:"replace:with:",protocol:"regular expressions",fn:function(e,t){function r(){return $globals.RegularExpression||(typeof RegularExpression=="undefined"?nil:RegularExpression)}var n=this,i;return i=n._replaceRegexp_with_($recv(r())._fromString_flag_(e,"g"),t),i},messageSends:["replaceRegexp:with:","fromString:flag:"]}),$globals.String),$core.addMethod($core.method({selector:"replaceRegexp:with:",protocol:"regular expressions",fn:function(e,t){var n=this;return n.replace(e,t)},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"reversed",protocol:"converting",fn:function(){var e=this;return e.split("").reverse().join("")},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"shallowCopy",protocol:"copying",fn:function(){var e=this,t;return t=$recv(e._class())._fromString_(e),t},messageSends:["fromString:","class"]}),$globals.String),$core.addMethod($core.method({selector:"size",protocol:"accessing",fn:function(){var e=this;return e.length},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"subStrings:",protocol:"split join",fn:function(e){var t=this,n;return n=t._tokenize_(e),n},messageSends:["tokenize:"]}),$globals.String),$core.addMethod($core.method({selector:"tokenize:",protocol:"split join",fn:function(e){var t=this;return t.split(e)},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"trimBoth",protocol:"regular expressions",fn:function(){var e=this,t;return t=e._trimBoth_("\\s"),t},messageSends:["trimBoth:"]}),$globals.String),$core.addMethod($core.method({selector:"trimBoth:",protocol:"regular expressions",fn:function(e){var t=this,n;return n=$recv(t._trimLeft_(e))._trimRight_(e),n},messageSends:["trimRight:","trimLeft:"]}),$globals.String),$core.addMethod($core.method({selector:"trimLeft",protocol:"regular expressions",fn:function(){var e=this,t;return t=e._trimLeft_("\\s"),t},messageSends:["trimLeft:"]}),$globals.String),$core.addMethod($core.method({selector:"trimLeft:",protocol:"regular expressions",fn:function(e){function n(){return $globals.RegularExpression||(typeof RegularExpression=="undefined"?nil:RegularExpression)}var t=this,r,i,s;return r=$recv("^[".__comma(e)).__comma("]+"),i=$recv(n())._fromString_flag_(r,"g"),s=t._replaceRegexp_with_(i,""),s},messageSends:["replaceRegexp:with:","fromString:flag:",","]}),$globals.String),$core.addMethod($core.method({selector:"trimRight",protocol:"regular expressions",fn:function(){var e=this,t;return t=e._trimRight_("\\s"),t},messageSends:["trimRight:"]}),$globals.String),$core.addMethod($core.method({selector:"trimRight:",protocol:"regular expressions",fn:function(e){function n(){return $globals.RegularExpression||(typeof RegularExpression=="undefined"?nil:RegularExpression)}var t=this,r,i,s;return r=$recv("[".__comma(e)).__comma("]+$"),i=$recv(n())._fromString_flag_(r,"g"),s=t._replaceRegexp_with_(i,""),s},messageSends:["replaceRegexp:with:","fromString:flag:",","]}),$globals.String),$core.addMethod($core.method({selector:"unescaped",protocol:"converting",fn:function(){var e=this;return unescape(e)},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"uriComponentDecoded",protocol:"converting",fn:function(){var e=this;return decodeURIComponent(e)},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"uriComponentEncoded",protocol:"converting",fn:function(){var e=this;return encodeURIComponent(e)},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"uriDecoded",protocol:"converting",fn:function(){var e=this;return decodeURI(e)},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"uriEncoded",protocol:"converting",fn:function(){var e=this;return encodeURI(e)},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"value:",protocol:"evaluating",fn:function(e){var t=this,n;return n=$recv(e)._perform_(t),n},messageSends:["perform:"]}),$globals.String),$core.addMethod($core.method({selector:"cr",protocol:"accessing",fn:function(){var e=this;return"\r"},messageSends:[]}),$globals.String.klass),$core.addMethod($core.method({selector:"crlf",protocol:"accessing",fn:function(){var e=this;return"\r\n"},messageSends:[]}),$globals.String.klass),$core.addMethod($core.method({selector:"esc",protocol:"accessing",fn:function(){var e=this,t;return t=e._fromCharCode_(27),t},messageSends:["fromCharCode:"]}),$globals.String.klass),$core.addMethod($core.method({selector:"fromCharCode:",protocol:"instance creation",fn:function(e){var t=this;return String.fromCharCode(e)},messageSends:[]}),$globals.String.klass),$core.addMethod($core.method({selector:"fromString:",protocol:"instance creation",fn:function(e){var t=this;return String(e)},messageSends:[]}),$globals.String.klass),$core.addMethod($core.method({selector:"lf",protocol:"accessing",fn:function(){var e=this;return"\n"},messageSends:[]}),$globals.String.klass),$core.addMethod($core.method({selector:"random",protocol:"random",fn:function(){var e=this;return(Math.random()*.6875+.3125).toString(32).slice(2)},messageSends:[]}),$globals.String.klass),$core.addMethod($core.method({selector:"randomNotIn:",protocol:"random",fn:function(e){var t=this,n,r;return $recv(function(){return n=t._random(),n,$recv(e)._includesSubString_(n)})._whileTrue(),r=n,r},messageSends:["whileTrue","random","includesSubString:"]}),$globals.String.klass),$core.addMethod($core.method({selector:"space",protocol:"accessing",fn:function(){var e=this;return" "},messageSends:[]}),$globals.String.klass),$core.addMethod($core.method({selector:"streamClass",protocol:"accessing",fn:function(){function t(){return $globals.StringStream||(typeof StringStream=="undefined"?nil:StringStream)}var e=this;return t()},messageSends:[]}),$globals.String.klass),$core.addMethod($core.method({selector:"tab",protocol:"accessing",fn:function(){var e=this;return" "},messageSends:[]}),$globals.String.klass),$core.addMethod($core.method({selector:"value:",protocol:"instance creation",fn:function(e){var t=this;return String.fromCharCode(e)},messageSends:[]}),$globals.String.klass),$core.addClass("Set",$globals.Collection,["defaultBucket","slowBucketStores","fastBuckets","size"],"Kernel-Collections"),$core.addMethod($core.method({selector:"=",protocol:"comparing",fn:function(e){var t=this,n,r,i,s,o,u={};try{return n=t._class(),r=$recv(n).__eq($recv(e)._class()),$core.assert(r)?(i=t._size(),s=$recv(i).__eq($recv(e)._size()),$core.assert(s)?(t._do_(function(t){o=$recv(e)._includes_(t);if(!$core.assert(o))throw u=[!1]}),!0):!1):!1}catch(a){if(a===u)return a[0];throw a}},messageSends:["ifFalse:","=","class","size","do:","includes:"]}),$globals.Set),$core.addMethod($core.method({selector:"add:",protocol:"adding/removing",fn:function(e){var t=this,n,r,i,s;n=t._bucketsOfElement_(e),r=$recv(n)._second();if((s=r)==null||s.isNil){var o,u;o=$recv(n)._first(),o,u=$recv(n)._third(),u,$recv(u)._indexOf_ifAbsent_(o,function(){return $recv(u)._add_(o),t["@size"]=$recv(t["@size"]).__plus(1),t["@size"]}),i=o}else{var a;a=s,i=t._add_in_($recv(n)._first(),a)}return i},messageSends:["bucketsOfElement:","ifNil:ifNotNil:","second","first","third","indexOf:ifAbsent:","add:","+","add:in:"]}),$globals.Set),$core.addMethod($core.method({selector:"add:in:",protocol:"private",fn:function(e,t){var n=this;return e in t.store?!1:(n["@size"]++,t.store[e]=!0)},messageSends:[]}),$globals.Set),$core.addMethod($core.method({selector:"bucketsOfElement:",protocol:"private",fn:function(e){var t=this,n,r,i=e==null?e=nil:e.valueOf();if((n=typeof i)==="object"){if(e!==nil)return r=null,t["@slowBucketStores"].some(function(t){return r=t._bucketOfElement_(e)}),[e,null,r||t["@defaultBucket"]];i=null,n="boolean"}return[i,t["@fastBuckets"][n]]},messageSends:[]}),$globals.Set),$core.addMethod($core.method({selector:"classNameOf:",protocol:"private",fn:function(e){var t=this;return e.klass!=null&&e.klass.className},messageSends:[]}),$globals.Set),$core.addMethod($core.method({selector:"collect:",protocol:"enumerating",fn:function(e){var t=this,n,r;return n=$recv(t._class())._new(),t._do_(function(t){return $recv(n)._add_($recv(e)._value_(t))}),r=n,r},messageSends:["new","class","do:","add:","value:"]}),$globals.Set),$core.addMethod($core.method({selector:"detect:ifNone:",protocol:"enumerating",fn:function(e,t){var n=this,r,i,s={};try{return n._do_(function(t){r=$recv(e)._value_(t);if($core.assert(r))throw s=[t]}),i=$recv(t)._value(),i}catch(o){if(o===s)return o[0];throw o}},messageSends:["do:","ifTrue:","value:","value"]}),$globals.Set),$core.addMethod($core.method({selector:"do:",protocol:"enumerating",fn:function(e){var t=this,n,r,i;n=t["@fastBuckets"],r=Object.keys(n);for(i=0;i","value","new","first","at:put:","+"]}),$globals.Queue),$core.addMethod($core.method({selector:"nextPut:",protocol:"accessing",fn:function(e){var t=this;return $recv(t["@write"])._add_(e),t},messageSends:["add:"]}),$globals.Queue),$core.addClass("RegularExpression",$globals.Object,[],"Kernel-Collections"),$core.addMethod($core.method({selector:"compile:",protocol:"evaluating",fn:function(e){var t=this;return t.compile(e)},messageSends:[]}),$globals.RegularExpression),$core.addMethod($core.method({selector:"exec:",protocol:"evaluating",fn:function(e){var t=this;return t.exec(e)||nil},messageSends:[]}),$globals.RegularExpression),$core.addMethod($core.method({selector:"test:",protocol:"evaluating",fn:function(e){var t=this;return t.test(e)},messageSends:[]}),$globals.RegularExpression),$core.addMethod($core.method({selector:"fromString:",protocol:"instance creation",fn:function(e){var t=this,n;return n=t._fromString_flag_(e,""),n},messageSends:["fromString:flag:"]}),$globals.RegularExpression.klass),$core.addMethod($core.method({selector:"fromString:flag:",protocol:"instance creation",fn:function(e,t){var n=this;return new RegExp(e,t)},messageSends:[]}),$globals.RegularExpression.klass)}),define("amber_core/Kernel-Infrastructure",["amber/boot","amber_core/Kernel-Objects","amber_core/Kernel-Collections"],function($boot){"use strict";var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;$core.addPackage("Kernel-Infrastructure"),$core.packages["Kernel-Infrastructure"].innerEval=function(expr){return eval(expr)},$core.packages["Kernel-Infrastructure"].transport={type:"amd",amdNamespace:"amber_core"},$core.addClass("JSObjectProxy",$globals.ProtoObject,["jsObject"],"Kernel-Infrastructure"),$core.addMethod($core.method({selector:"=",protocol:"comparing",fn:function(e){function n(){return $globals.JSObjectProxy||(typeof JSObjectProxy=="undefined"?nil:JSObjectProxy)}var t=this,r,i,s;return r=$recv(e)._class(),i=$recv(r).__eq_eq(t._class()),$core.assert(i)?(s=$recv(n())._compareJSObjectOfProxy_withProxy_(t,e),s):!1},messageSends:["ifFalse:","==","class","compareJSObjectOfProxy:withProxy:"]}),$globals.JSObjectProxy),$core.addMethod($core.method({selector:"asJSON",protocol:"enumerating",fn:function(){var e=this,t;return t=e["@jsObject"],t},messageSends:[]}),$globals.JSObjectProxy),$core.addMethod($core.method({selector:"at:",protocol:"accessing",fn:function(e){var t=this;return t["@jsObject"][e]},messageSends:[]}),$globals.JSObjectProxy),$core.addMethod($core.method({selector:"at:ifAbsent:",protocol:"accessing",fn:function(e,t){var n=this,r=n["@jsObject"];return e in r?r[e]:t._value()},messageSends:[]}),$globals.JSObjectProxy),$core.addMethod($core.method({selector:"at:ifPresent:",protocol:"accessing",fn:function(e,t){var n=this,r=n["@jsObject"];return e in r?t._value_(r[e]):nil},messageSends:[]}),$globals.JSObjectProxy),$core.addMethod($core.method({selector:"at:ifPresent:ifAbsent:",protocol:"accessing",fn:function(e,t,n){var r=this,i=r["@jsObject"];return e in i?t._value_(i[e]):n._value()},messageSends:[]}),$globals.JSObjectProxy),$core.addMethod($core.method({selector:"at:put:",protocol:"accessing",fn:function(e,t){var n=this;return n["@jsObject"][e]=t},messageSends:[]}),$globals.JSObjectProxy),$core.addMethod($core.method({selector:"doesNotUnderstand:",protocol:"proxy",fn:function(e){function n(){return $globals.JSObjectProxy||(typeof JSObjectProxy=="undefined"?nil:JSObjectProxy)}var t=this,r,i,s;r=$recv(n())._lookupProperty_ofProxy_($recv($recv(e)._selector())._asJavaScriptPropertyName(),t);if((s=r)==null||s.isNil)i=$globals.JSObjectProxy.superclass.fn.prototype._doesNotUnderstand_.apply($recv(t),[e]);else{var o;o=s,i=$recv(n())._forwardMessage_withArguments_ofProxy_(o,$recv(e)._arguments(),t)}return i},messageSends:["ifNil:ifNotNil:","lookupProperty:ofProxy:","asJavaScriptPropertyName","selector","doesNotUnderstand:","forwardMessage:withArguments:ofProxy:","arguments"]}),$globals.JSObjectProxy),$core.addMethod($core.method({selector:"in:",protocol:"accessing",fn:function(e){var t=this,n;return n=$recv(e)._value_(t["@jsObject"]),n},messageSends:["value:"]}),$globals.JSObjectProxy),$core.addMethod($core.method({selector:"jsObject",protocol:"accessing",fn:function(){var e=this,t;return t=e["@jsObject"],t},messageSends:[]}),$globals.JSObjectProxy),$core.addMethod($core.method({selector:"keysAndValuesDo:",protocol:"enumerating",fn:function(e){var t=this,n=t["@jsObject"];for(var r in n)e._value_value_(r,n[r]);return t},messageSends:[]}),$globals.JSObjectProxy),$core.addMethod($core.method({selector:"printOn:",protocol:"printing",fn:function(e){var t=this;return $recv(e)._nextPutAll_(t._printString()),t},messageSends:["nextPutAll:","printString"]}),$globals.JSObjectProxy),$core.addMethod($core.method({selector:"printString",protocol:"printing",fn:function(){var e=this,t=e["@jsObject"];return t.toString?t.toString():Object.prototype.toString.call(t)},messageSends:[]}),$globals.JSObjectProxy),$core.addMethod($core.method({selector:"putOn:",protocol:"streaming",fn:function(e){var t=this;return $recv(e)._nextPutJSObject_(t["@jsObject"]),t},messageSends:["nextPutJSObject:"]}),$globals.JSObjectProxy),$core.addMethod($core.method({selector:"addObjectVariablesTo:ofProxy:",protocol:"proxy",fn:function(e,t){var n=this,r=t["@jsObject"];for(var i in r)e._at_put_(i,r[i]);return n},messageSends:[]}),$globals.JSObjectProxy.klass),$core.addMethod($core.method({selector:"compareJSObjectOfProxy:withProxy:",protocol:"proxy",fn:function(e,t){var n=this,r=t.klass?t["@jsObject"]:t;return e["@jsObject"]===r},messageSends:[]}),$globals.JSObjectProxy.klass),$core.addMethod($core.method({selector:"forwardMessage:withArguments:ofProxy:",protocol:"proxy",fn:function(e,t,n){var r=this;return $core.accessJavaScript(n._jsObject(),e,t)},messageSends:[]}),$globals.JSObjectProxy.klass),$core.addMethod($core.method({selector:"jsObject:ofProxy:",protocol:"proxy",fn:function(e,t){var n=this;return t["@jsObject"]=e,n},messageSends:[]}),$globals.JSObjectProxy.klass),$core.addMethod($core.method({selector:"lookupProperty:ofProxy:",protocol:"proxy",fn:function(e,t){var n=this;return e in t._jsObject()?e:nil},messageSends:[]}),$globals.JSObjectProxy.klass),$core.addMethod($core.method({selector:"on:",protocol:"instance creation",fn:function(e){var t=this,n,r;return n=t._new(),t._jsObject_ofProxy_(e,n),r=n,r},messageSends:["new","jsObject:ofProxy:"]}),$globals.JSObjectProxy.klass),$core.addClass("Organizer",$globals.Object,[],"Kernel-Infrastructure"),$core.addMethod($core.method({selector:"addElement:",protocol:"accessing",fn:function(e){var t=this;return t.elements.addElement(e),t},messageSends:[]}),$globals.Organizer),$core.addMethod($core.method({selector:"elements",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._basicAt_("elements"))._copy(),t},messageSends:["copy","basicAt:"]}),$globals.Organizer),$core.addMethod($core.method({selector:"removeElement:",protocol:"accessing",fn:function(e){var t=this;return t.elements.removeElement(e),t},messageSends:[]}),$globals.Organizer),$core.addClass("ClassOrganizer",$globals.Organizer,[],"Kernel-Infrastructure"),$core.addMethod($core.method({selector:"addElement:",protocol:"accessing",fn:function(e){function n(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}function r(){return $globals.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}var t=this,i,s;return $globals.ClassOrganizer.superclass.fn.prototype._addElement_.apply($recv(t),[e]),i=$recv(r())._new(),$recv(i)._protocol_(e),$recv(i)._theClass_(t._theClass()),s=$recv(i)._yourself(),$recv($recv(n())._current())._announce_(s),t},messageSends:["addElement:","announce:","current","protocol:","new","theClass:","theClass","yourself"]}),$globals.ClassOrganizer),$core.addMethod($core.method({selector:"removeElement:",protocol:"accessing",fn:function(e){function n(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}function r(){return $globals.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}var t=this,i,s;return $globals.ClassOrganizer.superclass.fn.prototype._removeElement_.apply($recv(t),[e]),i=$recv(r())._new(),$recv(i)._protocol_(e),$recv(i)._theClass_(t._theClass()),s=$recv(i)._yourself(),$recv($recv(n())._current())._announce_(s),t},messageSends:["removeElement:","announce:","current","protocol:","new","theClass:","theClass","yourself"]}),$globals.ClassOrganizer),$core.addMethod($core.method({selector:"theClass",protocol:"accessing",fn:function(){var e=this;return e.theClass},messageSends:[]}),$globals.ClassOrganizer),$core.addClass("PackageOrganizer",$globals.Organizer,[],"Kernel-Infrastructure"),$core.addClass("Package",$globals.Object,["transport","imports","dirty"],"Kernel-Infrastructure"),$core.addMethod($core.method({selector:"basicImports",protocol:"private",fn:function(){var e=this;return e.imports||[]},messageSends:[]}),$globals.Package),$core.addMethod($core.method({selector:"basicName:",protocol:"private",fn:function(e){var t=this;return t.pkgName=e,t},messageSends:[]}),$globals.Package),$core.addMethod($core.method({selector:"basicTransport",protocol:"private",fn:function(){var e=this;return e.transport},messageSends:[]}),$globals.Package),$core.addMethod($core.method({selector:"beClean",protocol:"accessing",fn:function(){function t(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}function n(){return $globals.PackageClean||(typeof PackageClean=="undefined"?nil:PackageClean)}var e=this,r,i;return e["@dirty"]=!1,r=$recv(n())._new(),$recv(r)._package_(e),i=$recv(r)._yourself(),$recv($recv(t())._current())._announce_(i),e},messageSends:["announce:","current","package:","new","yourself"]}),$globals.Package),$core.addMethod($core.method({selector:"beDirty",protocol:"accessing",fn:function(){function t(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}function n(){return $globals.PackageDirty||(typeof PackageDirty=="undefined"?nil:PackageDirty)}var e=this,r,i;return e["@dirty"]=!0,r=$recv(n())._new(),$recv(r)._package_(e),i=$recv(r)._yourself(),$recv($recv(t())._current())._announce_(i),e},messageSends:["announce:","current","package:","new","yourself"]}),$globals.Package),$core.addMethod($core.method({selector:"classTemplate",protocol:"accessing",fn:function(){function t(){return $globals.String||(typeof String=="undefined"?nil:String)}var e=this,n,r,i,s,o,u,a;return a=$recv(t())._streamContents_(function(a){return $recv(a)._nextPutAll_("Object"),$recv(a)._nextPutAll_(" subclass: #NameOfSubclass"),n=$recv(t())._lf(),r=$recv(t())._tab(),i=$recv(n).__comma(r),$recv(a)._nextPutAll_(i),s=$recv(a)._nextPutAll_("instanceVariableNames: ''"),s,o=$recv("'".__comma($recv(t())._lf())).__comma($recv(t())._tab()),$recv(a)._nextPutAll_(o),$recv(a)._nextPutAll_("package: '"),$recv(a)._nextPutAll_(e._name()),u=$recv(a)._nextPutAll_("'"),u}),a},messageSends:["streamContents:","nextPutAll:",",","lf","tab","name"]}),$globals.Package),$core.addMethod($core.method({selector:"classes",protocol:"classes",fn:function(){var e=this,t;return t=$recv(e._organization())._elements(),t},messageSends:["elements","organization"]}),$globals.Package),$core.addMethod($core.method({selector:"definition",protocol:"accessing",fn:function(){function t(){return $globals.String||(typeof String=="undefined"?nil:String)}var e=this,n,r,i,s,o,u,a,f,l,c,h,p;return p=$recv(t())._streamContents_(function(p){return n=$recv(e._class())._name(),$recv(p)._nextPutAll_(n),r=$recv(t())._lf(),i=$recv(t())._tab(),s=$recv(r).__comma(i),$recv(p)._nextPutAll_(s),$recv(p)._nextPutAll_("named: "),o="'".__comma(e._name()),u=$recv(o).__comma("'"),$recv(p)._nextPutAll_(u),a=$recv(t())._lf(),f=$recv(t())._tab(),l=$recv(a).__comma(f),$recv(p)._nextPutAll_(l),$recv(p)._nextPutAll_("imports: "),$recv(p)._nextPutAll_(e._importsDefinition()),c=$recv($recv(t())._lf()).__comma($recv(t())._tab()),$recv(p)._nextPutAll_(c),$recv(p)._nextPutAll_("transport: ("),h=$recv(p)._nextPutAll_($recv($recv(e._transport())._definition()).__comma(")")),h}),p},messageSends:["streamContents:","nextPutAll:","name","class",",","lf","tab","importsDefinition","definition","transport"]}),$globals.Package),$core.addMethod($core.method({selector:"imports",protocol:"accessing",fn:function(){var e=this,t,n,r;t=e["@imports"];if((r=t)==null||r.isNil){var i;i=e._importsFromJson_(e._basicImports()),i,e._imports_(i),n=e["@imports"]}else n=t;return n},messageSends:["ifNil:","importsFromJson:","basicImports","imports:"]}),$globals.Package),$core.addMethod($core.method({selector:"imports:",protocol:"accessing",fn:function(e){var t=this;return t._validateImports_(e),t["@imports"]=$recv(e)._asSet(),t},messageSends:["validateImports:","asSet"]}),$globals.Package),$core.addMethod($core.method({selector:"importsAsJson",protocol:"converting",fn:function(){var e=this,t,n;return n=$recv(e._sortedImportsAsArray())._collect_(function(e){return t=$recv(e)._isString(),$core.assert(t)?e:$recv($recv($recv(e)._key()).__comma("=")).__comma($recv(e)._value())}),n},messageSends:["collect:","sortedImportsAsArray","ifTrue:ifFalse:","isString",",","key","value"]}),$globals.Package),$core.addMethod($core.method({selector:"importsDefinition",protocol:"accessing",fn:function(){function t(){return $globals.String||(typeof String=="undefined"?nil:String)}var e=this,n;return n=$recv(t())._streamContents_(function(t){return $recv(t)._nextPutAll_("{"),$recv(e._sortedImportsAsArray())._do_separatedBy_(function(e){return $recv(t)._nextPutAll_($recv(e)._importsString())},function(){return $recv(t)._nextPutAll_(". ")}),$recv(t)._nextPutAll_("}")}),n},messageSends:["streamContents:","nextPutAll:","do:separatedBy:","sortedImportsAsArray","importsString"]}),$globals.Package),$core.addMethod($core.method({selector:"importsFromJson:",protocol:"converting",fn:function(e){var t=this,n,r;return r=$recv(e)._collect_(function(e){var t;return t=$recv(e)._tokenize_("="),t,n=$recv($recv(t)._size()).__eq(1),$core.assert(n)?$recv(t)._first():$recv($recv(t)._first()).__minus_gt($recv(t)._second())}),r},messageSends:["collect:","tokenize:","ifTrue:ifFalse:","=","size","first","->","second"]}),$globals.Package),$core.addMethod($core.method({selector:"isDirty",protocol:"testing",fn:function(){var e=this,t,n,r;return t=e["@dirty"],(r=t)==null||r.isNil?n=!1:n=t,n},messageSends:["ifNil:"]}),$globals.Package),$core.addMethod($core.method({selector:"isPackage",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.Package),$core.addMethod($core.method({selector:"loadDependencies",protocol:"dependencies",fn:function(){var e=this,t,n,r,i,s;return t=e._loadDependencyClasses(),r=$recv($recv(t)._collect_(function(e){return $recv(e)._package()}))._asSet(),$recv(r)._remove_ifAbsent_(e,function(){}),i=$recv(r)._yourself(),s=i,s},messageSends:["loadDependencyClasses","remove:ifAbsent:","asSet","collect:","package","yourself"]}),$globals.Package),$core.addMethod($core.method({selector:"loadDependencyClasses",protocol:"dependencies",fn:function(){function n(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var e=this,t,r,i,s,o,u,a,f;return t="*".__comma(e._name()),r=e._classes(),i=$recv(r)._collect_(function(e){return $recv(e)._superclass()}),s=$recv(i)._asSet(),$recv(s)._remove_ifAbsent_(nil,function(){}),$recv(s)._addAll_($recv($recv(n())._classes())._select_(function(e){return o=$recv(e)._protocols(),u=$recv(o).__comma($recv($recv(e)._class())._protocols()),$recv(u)._includes_(t)})),a=$recv(s)._yourself(),f=a,f},messageSends:[",","name","remove:ifAbsent:","asSet","collect:","classes","superclass","addAll:","select:","includes:","protocols","class","yourself"]}),$globals.Package),$core.addMethod($core.method({selector:"name",protocol:"accessing",fn:function(){var e=this;return e.pkgName},messageSends:[]}),$globals.Package),$core.addMethod($core.method({selector:"name:",protocol:"accessing",fn:function(e){var t=this;return t._basicName_(e),t._beDirty(),t},messageSends:["basicName:","beDirty"]}),$globals.Package),$core.addMethod($core.method({selector:"organization",protocol:"accessing",fn:function(){var e=this,t;return t=e._basicAt_("organization"),t},messageSends:["basicAt:"]}),$globals.Package),$core.addMethod($core.method({selector:"printOn:",protocol:"printing",fn:function(e){var t=this,n;return $globals.Package.superclass.fn.prototype._printOn_.apply($recv(t),[e]),$recv(e)._nextPutAll_(" ("),$recv(e)._nextPutAll_(t._name()),n=$recv(e)._nextPutAll_(")"),t},messageSends:["printOn:","nextPutAll:","name"]}),$globals.Package),$core.addMethod($core.method({selector:"setupClasses",protocol:"classes",fn:function(){function t(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}var e=this,n,r;return n=e._classes(),$recv(n)._do_(function(e){return $recv($recv(t())._new())._setupClass_(e)}),r=$recv(n)._do_(function(e){return $recv(e)._initialize()}),e},messageSends:["do:","classes","setupClass:","new","initialize"]}),$globals.Package),$core.addMethod($core.method({selector:"sortedClasses",protocol:"classes",fn:function(){var e=this,t;return t=$recv(e._class())._sortedClasses_(e._classes()),t},messageSends:["sortedClasses:","class","classes"]}),$globals.Package),$core.addMethod($core.method({selector:"sortedImportsAsArray",protocol:"private",fn:function(){var e=this,t,n,r,i,s,o,u,a;return a=$recv($recv(e._imports())._asArray())._sorted_(function(e,a){return t=$recv(e)._isString(),n=$recv(t)._not(),r=$recv(a)._isString(),i=$recv(n).__and(r),$recv(i)._or_(function(){return s=$recv(e)._isString(),o=$recv(s).__eq($recv(a)._isString()),$recv(o)._and_(function(){return u=$recv(e)._value(),$recv(u).__lt_eq($recv(a)._value())})})}),a},messageSends:["sorted:","asArray","imports","or:","&","not","isString","and:","=","<=","value"]}),$globals.Package),$core.addMethod($core.method({selector:"transport",protocol:"accessing",fn:function(){function t(){return $globals.PackageTransport||(typeof PackageTransport=="undefined"?nil:PackageTransport)}var e=this,n,r,i,s,o;return n=e["@transport"],(o=n)==null||o.isNil?(r=$recv(t())._fromJson_(e._basicTransport()),$recv(r)._package_(e),i=$recv(r)._yourself(),e["@transport"]=i,s=e["@transport"]):s=n,s},messageSends:["ifNil:","package:","fromJson:","basicTransport","yourself"]}),$globals.Package),$core.addMethod($core.method({selector:"transport:",protocol:"accessing",fn:function(e){var t=this;return t["@transport"]=e,$recv(e)._package_(t),t},messageSends:["package:"]}),$globals.Package),$core.addMethod($core.method({selector:"validateImports:",protocol:"validation",fn:function(e){var t=this,n,r,i,s,o,u;return $recv(e)._do_(function(e){n=$recv(e)._isString();if(!$core.assert(n)){r=$recv(e)._respondsTo_("key"),$core.assert(r)||t._error_("Imports must be Strings or Associations"),i=$recv(e)._key(),s=$recv(i)._isString(),o=$recv(s).__and($recv($recv(e)._value())._isString()),$core.assert(o)||t._error_("Key and value must be Strings"),u=$recv($recv(e)._key())._match_("^[a-zA-Z][a-zA-Z0-9]*$");if(!$core.assert(u))return t._error_("Keys must be identifiers")}}),t},messageSends:["do:","ifFalse:","isString","respondsTo:","error:","&","key","value","match:"]}),$globals.Package),$globals.Package.klass.iVarNames=["defaultCommitPathJs","defaultCommitPathSt"],$core.addMethod($core.method({selector:"named:",protocol:"accessing",fn:function(e){function n(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var t=this,r;return r=$recv(n())._packageAt_ifAbsent_(e,function(){return $recv(n())._createPackage_(e)}),r},messageSends:["packageAt:ifAbsent:","createPackage:"]}),$globals.Package.klass),$core.addMethod($core.method({selector:"named:ifAbsent:",protocol:"accessing",fn:function(e,t){function r(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var n=this,i;return i=$recv(r())._packageAt_ifAbsent_(e,t),i},messageSends:["packageAt:ifAbsent:"]}),$globals.Package.klass),$core.addMethod($core.method({selector:"named:imports:transport:",protocol:"accessing",fn:function(e,t,n){var r=this,i,s;return i=r._named_(e),$recv(i)._imports_(t),$recv(i)._transport_(n),s=i,s},messageSends:["named:","imports:","transport:"]}),$globals.Package.klass),$core.addMethod($core.method({selector:"named:transport:",protocol:"accessing",fn:function(e,t){var n=this,r,i;return r=n._named_(e),$recv(r)._transport_(t),i=r,i},messageSends:["named:","transport:"]}),$globals.Package.klass),$core.addMethod($core.method({selector:"sortedClasses:",protocol:"sorting",fn:function(e){function o(){return $globals.ClassSorterNode||(typeof ClassSorterNode=="undefined"?nil:ClassSorterNode)}function u(){return $globals.Array||(typeof Array=="undefined"?nil:Array)}var t=this,n,r,i,s,a,f,l,c;return n=[],r=[],$recv(e)._do_(function(t){return a=$recv(e)._includes_($recv(t)._superclass()),$core.assert(a)?$recv(r)._add_(t):$recv(n)._add_(t)}),i=$recv(n)._collect_(function(e){return $recv(o())._on_classes_level_(e,r,0)}),i=$recv(i)._sorted_(function(e,t){return f=$recv(e)._theClass(),l=$recv(f)._name(),$recv(l).__lt_eq($recv($recv(t)._theClass())._name())}),s=$recv(u())._new(),$recv(i)._do_(function(e){return $recv(e)._traverseClassesWith_(s)}),c=s,c},messageSends:["do:","ifFalse:ifTrue:","includes:","superclass","add:","collect:","on:classes:level:","sorted:","<=","name","theClass","new","traverseClassesWith:"]}),$globals.Package.klass),$core.addClass("PackageStateObserver",$globals.Object,[],"Kernel-Infrastructure"),$core.addMethod($core.method({selector:"announcer",protocol:"accessing",fn:function(){function t(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}var e=this,n;return n=$recv(t())._current(),n},messageSends:["current"]}),$globals.PackageStateObserver),$core.addMethod($core.method({selector:"observeSystem",protocol:"actions",fn:function(){function t(){return $globals.PackageAdded||(typeof PackageAdded=="undefined"?nil:PackageAdded)}function n(){return $globals.ClassAnnouncement||(typeof ClassAnnouncement=="undefined"?nil:ClassAnnouncement)}function r(){return $globals.MethodAnnouncement||(typeof MethodAnnouncement=="undefined"?nil:MethodAnnouncement)}function i(){return $globals.ProtocolAnnouncement||(typeof ProtocolAnnouncement=="undefined"?nil:ProtocolAnnouncement)}var e=this,s,o;return s=e._announcer(),$recv(s)._on_send_to_(t(),"onPackageAdded:",e),$recv(s)._on_send_to_(n(),"onClassModification:",e),$recv(s)._on_send_to_(r(),"onMethodModification:",e),o=$recv(s)._on_send_to_(i(),"onProtocolModification:",e),e},messageSends:["on:send:to:","announcer"]}),$globals.PackageStateObserver),$core.addMethod($core.method({selector:"onClassModification:",protocol:"reactions",fn:function(e){var t=this,n,r;n=$recv(e)._theClass();if((r=n)==null||r.isNil)n;else{var i;i=r,$recv($recv(i)._package())._beDirty()}return t},messageSends:["ifNotNil:","theClass","beDirty","package"]}),$globals.PackageStateObserver),$core.addMethod($core.method({selector:"onMethodModification:",protocol:"reactions",fn:function(e){var t=this,n,r;n=$recv($recv(e)._method())._package();if((r=n)==null||r.isNil)n;else{var i;i=r,$recv(i)._beDirty()}return t},messageSends:["ifNotNil:","package","method","beDirty"]}),$globals.PackageStateObserver),$core.addMethod($core.method({selector:"onPackageAdded:",protocol:"reactions",fn:function(e){var t=this;return $recv($recv(e)._package())._beDirty(),t},messageSends:["beDirty","package"]}),$globals.PackageStateObserver),$core.addMethod($core.method({selector:"onProtocolModification:",protocol:"reactions",fn:function(e){var t=this,n,r;n=$recv(e)._package();if((r=n)==null||r.isNil)n;else{var i;i=r,$recv(i)._beDirty()}return t},messageSends:["ifNotNil:","package","beDirty"]}),$globals.PackageStateObserver),$globals.PackageStateObserver.klass.iVarNames=["current"],$core.addMethod($core.method({selector:"current",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@current"],(r=t)==null||r.isNil?(e["@current"]=e._new(),n=e["@current"]):n=t,n},messageSends:["ifNil:","new"]}),$globals.PackageStateObserver.klass),$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){var e=this;return $recv(e._current())._observeSystem(),e},messageSends:["observeSystem","current"]}),$globals.PackageStateObserver.klass),$core.addClass("Setting",$globals.Object,["key","value","defaultValue"],"Kernel-Infrastructure"),$core.addMethod($core.method({selector:"defaultValue",protocol:"accessing",fn:function(){var e=this,t;return t=e["@defaultValue"],t},messageSends:[]}),$globals.Setting),$core.addMethod($core.method({selector:"defaultValue:",protocol:"accessing",fn:function(e){var t=this;return t["@defaultValue"]=e,t},messageSends:[]}),$globals.Setting),$core.addMethod($core.method({selector:"key",protocol:"accessing",fn:function(){var e=this,t;return t=e["@key"],t},messageSends:[]}),$globals.Setting),$core.addMethod($core.method({selector:"key:",protocol:"accessing",fn:function(e){var t=this;return t["@key"]=e,t},messageSends:[]}),$globals.Setting),$core.addMethod($core.method({selector:"value",protocol:"accessing",fn:function(){function t(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var e=this,n;return n=$recv($recv(t())._settings())._at_ifAbsent_(e._key(),function(){return e._defaultValue()}),n},messageSends:["at:ifAbsent:","settings","key","defaultValue"]}),$globals.Setting),$core.addMethod($core.method({selector:"value:",protocol:"accessing",fn:function(e){function n(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var t=this,r;return r=$recv($recv(n())._settings())._at_put_(t._key(),e),r},messageSends:["at:put:","settings","key"]}),$globals.Setting),$core.addMethod($core.method({selector:"at:ifAbsent:",protocol:"instance creation",fn:function(e,t){var n=this,r,i,s;return r=$globals.Setting.klass.superclass.fn.prototype._new.apply($recv(n),[]),$recv(r)._key_(e),$recv(r)._defaultValue_(t),i=$recv(r)._yourself(),s=i,s},messageSends:["key:","new","defaultValue:","yourself"]}),$globals.Setting.klass),$core.addMethod($core.method({selector:"new",protocol:"instance creation",fn:function(){var e=this;return e._shouldNotImplement(),e},messageSends:["shouldNotImplement"]}),$globals.Setting.klass),$core.addClass("SmalltalkImage",$globals.Object,[],"Kernel-Infrastructure"),$core.addMethod($core.method({selector:"addGlobalJsVariable:",protocol:"globals",fn:function(e){var t=this;return $recv(t._globalJsVariables())._add_(e),t},messageSends:["add:","globalJsVariables"]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"amdRequire",protocol:"accessing amd",fn:function(){var e=this,t;return t=$recv(e._core())._at_("amdRequire"),t},messageSends:["at:","core"]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"asSmalltalkException:",protocol:"error handling",fn:function(e){function n(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}function r(){return $globals.JavaScriptException||(typeof JavaScriptException=="undefined"?nil:JavaScriptException)}var t=this,i,s;return i=$recv(t._isSmalltalkObject_(e))._and_(function(){return $recv(e)._isKindOf_(n())}),$core.assert(i)?s=e:s=$recv(r())._on_(e),s},messageSends:["ifTrue:ifFalse:","and:","isSmalltalkObject:","isKindOf:","on:"]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"basicCreatePackage:",protocol:"private",fn:function(e){var t=this;return $core.addPackage(e)},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"basicParse:",protocol:"private",fn:function(e){function n(){return $globals.SmalltalkParser||(typeof SmalltalkParser=="undefined"?nil:SmalltalkParser)}var t=this,r;return r=$recv(n())._parse_(e),r},messageSends:["parse:"]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"basicRegisterPackage:",protocol:"private",fn:function(e){var t=this;return $core.packages[e.pkgName]=e,t},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"cancelOptOut:",protocol:"accessing",fn:function(e){var t=this;return delete e.klass,t},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"classes",protocol:"classes",fn:function(){var e=this;return $core.classes()},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"core",protocol:"accessing",fn:function(){var e=this;return $core},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"createPackage:",protocol:"packages",fn:function(e){function i(){return $globals.PackageAdded||(typeof PackageAdded=="undefined"?nil:PackageAdded)}function s(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}var t=this,n,r,o,u,a;return n=t._basicCreatePackage_(e),o=$recv(i())._new(),$recv(o)._package_(n),u=$recv(o)._yourself(),r=u,$recv($recv(s())._current())._announce_(r),a=n,a},messageSends:["basicCreatePackage:","package:","new","yourself","announce:","current"]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"defaultAmdNamespace",protocol:"accessing amd",fn:function(){var e=this,t;return t="transport.defaultAmdNamespace"._settingValue(),t},messageSends:["settingValue"]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"defaultAmdNamespace:",protocol:"accessing amd",fn:function(e){var t=this;return"transport.defaultAmdNamespace"._settingValue_(e),t},messageSends:["settingValue:"]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"deleteClass:",protocol:"private",fn:function(e){var t=this;return $core.removeClass(e),t},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"deleteGlobalJsVariable:",protocol:"globals",fn:function(e){var t=this;return $recv(t._globalJsVariables())._remove_ifAbsent_(e,function(){}),t},messageSends:["remove:ifAbsent:","globalJsVariables"]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"deletePackage:",protocol:"private",fn:function(e){var t=this;return delete $core.packages[e],t},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"existsJsGlobal:",protocol:"testing",fn:function(e){function n(){return $globals.Platform||(typeof Platform=="undefined"?nil:Platform)}var t=this,r;return r=$recv($recv(n())._globals())._at_ifPresent_ifAbsent_(e,function(){return!0},function(){return!1}),r},messageSends:["at:ifPresent:ifAbsent:","globals"]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"globalJsVariables",protocol:"globals",fn:function(){var e=this;return $core.globalJsVariables},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"globals",protocol:"accessing",fn:function(){var e=this;return $globals},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"includesKey:",protocol:"accessing",fn:function(e){var t=this;return $core.hasOwnProperty(e)},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"isSmalltalkObject:",protocol:"testing",fn:function(e){var t=this;return e.klass!=null},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"optOut:",protocol:"accessing",fn:function(e){var t=this;return e.klass=null,t},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"packageAt:",protocol:"packages",fn:function(e){var t=this;return $core.packages[e]},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"packageAt:ifAbsent:",protocol:"packages",fn:function(e,t){var n=this,r,i;return r=n._packageAt_(e),i=$recv(r)._ifNil_(t),i},messageSends:["ifNil:","packageAt:"]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"packages",protocol:"packages",fn:function(){var e=this;return Object.keys($core.packages).map(function(e){return $core.packages[e]})},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"parse:",protocol:"accessing",fn:function(e){var t=this,n,r,i,s;return $recv(function(){return n=t._basicParse_(e),n})._tryCatch_(function(n){return $recv(t._parseError_parsing_(n,e))._signal()}),r=n,$recv(r)._source_(e),i=$recv(r)._yourself(),s=i,s},messageSends:["tryCatch:","basicParse:","signal","parseError:parsing:","source:","yourself"]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"parseError:parsing:",protocol:"error handling",fn:function(e,t){function r(){return $globals.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}var n=this,i,s,o,u,a,f,l,c,h;return i=$recv(r())._new(),s=$recv(e)._basicAt_("line"),o="Parse error on line ".__comma(s),u=$recv(o).__comma(" column "),a=$recv(e)._basicAt_("column"),f=$recv(u).__comma(a),l=$recv(f).__comma(" : Unexpected character "),c=$recv(l).__comma($recv(e)._basicAt_("found")),h=$recv(i)._messageText_(c),h},messageSends:["messageText:","new",",","basicAt:"]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"pseudoVariableNames",protocol:"accessing",fn:function(){var e=this,t;return t=["self","super","nil","true","false","thisContext"],t},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"readJSObject:",protocol:"accessing",fn:function(e){var t=this;return $core.readJSObject(e)},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"removeClass:",protocol:"classes",fn:function(e){function n(){return $globals.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}function r(){return $globals.ClassRemoved||(typeof ClassRemoved=="undefined"?nil:ClassRemoved)}var t=this,i,s,o;return i=$recv(e)._isMetaclass(),$core.assert(i)&&t._error_($recv($recv(e)._asString()).__comma(" is a Metaclass and cannot be removed!")),t._deleteClass_(e),s=$recv(r())._new(),$recv(s)._theClass_(e),o=$recv(s)._yourself(),$recv($recv(n())._current())._announce_(o),t},messageSends:["ifTrue:","isMetaclass","error:",",","asString","deleteClass:","announce:","current","theClass:","new","yourself"]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"removePackage:",protocol:"packages",fn:function(e){var t=this,n;return n=t._packageAt_ifAbsent_(e,function(){return t._error_("Missing package: ".__comma(e))}),$recv($recv(n)._classes())._do_(function(e){return t._removeClass_(e)}),t._deletePackage_(e),t},messageSends:["packageAt:ifAbsent:","error:",",","do:","classes","removeClass:","deletePackage:"]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"renamePackage:to:",protocol:"packages",fn:function(e,t){var n=this,r,i,s,o;return r=n._packageAt_ifAbsent_(e,function(){return i="Missing package: ".__comma(e),n._error_(i)}),s=n._packageAt_(t),(o=s)==null||o.isNil?s:n._error_("Already exists a package called: ".__comma(t)),$recv(r)._name_(t),n._basicRegisterPackage_(r),n._deletePackage_(e),n},messageSends:["packageAt:ifAbsent:","error:",",","ifNotNil:","packageAt:","name:","basicRegisterPackage:","deletePackage:"]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"reservedWords",protocol:"accessing",fn:function(){var e=this;return $core.reservedWords},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"settings",protocol:"accessing",fn:function(){function t(){return $globals.SmalltalkSettings||(typeof SmalltalkSettings=="undefined"?nil:SmalltalkSettings)}var e=this;return t()},messageSends:[]}),$globals.SmalltalkImage),$core.addMethod($core.method({selector:"version",protocol:"accessing",fn:function(){var e=this;return"0.14.16"},messageSends:[]}),$globals.SmalltalkImage),$globals.SmalltalkImage.klass.iVarNames=["current"],$core.addMethod($core.method({selector:"current",protocol:"instance creation",fn:function(){var e=this,t,n,r;return t=e["@current"],(r=t)==null||r.isNil?(e["@current"]=$globals.SmalltalkImage.klass.superclass.fn.prototype._new.apply($recv(e),[]),n=e["@current"]):(e._deprecatedAPI(),n=e["@current"]),n},messageSends:["ifNil:ifNotNil:","new","deprecatedAPI"]}),$globals.SmalltalkImage.klass),$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){var e=this,t;return t=e._current(),$recv($recv(t)._globals())._at_put_("Smalltalk",t),e},messageSends:["current","at:put:","globals"]}),$globals.SmalltalkImage.klass),$core.addMethod($core.method({selector:"new",protocol:"instance creation",fn:function(){var e=this;return e._shouldNotImplement(),e},messageSends:["shouldNotImplement"]}),$globals.SmalltalkImage.klass),$core.addMethod($core.method({selector:"importsString",protocol:"*Kernel-Infrastructure",fn:function(){var e=this,t,n,r;return t=$recv(e._key())._importsString(),n=$recv(t).__comma(" -> "),r=$recv(n).__comma($recv(e._value())._importsString()),r},messageSends:[",","importsString","key","value"]}),$globals.Association),$core.addMethod($core.method({selector:"asJavaScriptPropertyName",protocol:"*Kernel-Infrastructure",fn:function(){var e=this;return $core.st2prop(e)},messageSends:[]}),$globals.String),$core.addMethod($core.method({selector:"asSetting",protocol:"*Kernel-Infrastructure",fn:function(){function t(){return $globals.Setting||(typeof Setting=="undefined"?nil:Setting)}var e=this,n;return n=$recv(t())._at_ifAbsent_(e,nil),n},messageSends:["at:ifAbsent:"]}),$globals.String),$core.addMethod($core.method({selector:"asSettingIfAbsent:",protocol:"*Kernel-Infrastructure",fn:function(e){function n(){return $globals.Setting||(typeof Setting=="undefined"?nil:Setting)}var t=this,r;return r=$recv(n())._at_ifAbsent_(t,e),r},messageSends:["at:ifAbsent:"]}),$globals.String),$core.addMethod($core.method({selector:"importsString",protocol:"*Kernel-Infrastructure",fn:function(){var e=this,t;return t=$recv("'".__comma(e._replace_with_("'","''"))).__comma("'"),t},messageSends:[",","replace:with:"]}),$globals.String),$core.addMethod($core.method({selector:"settingValue",protocol:"*Kernel-Infrastructure",fn:function(){var e=this,t;return t=$recv(e._asSetting())._value(),t},messageSends:["value","asSetting"]}),$globals.String),$core.addMethod($core.method({selector:"settingValue:",protocol:"*Kernel-Infrastructure",fn:function(e){var t=this,n;return n=$recv(t._asSetting())._value_(e),n},messageSends:["value:","asSetting"]}),$globals.String),$core.addMethod($core.method({selector:"settingValueIfAbsent:",protocol:"*Kernel-Infrastructure",fn:function(e){var t=this,n;return n=$recv(t._asSettingIfAbsent_(e))._value(),n},messageSends:["value","asSettingIfAbsent:"]}),$globals.String)}),define("amber_core/Kernel-Exceptions",["amber/boot","amber_core/Kernel-Objects"],function($boot){"use strict";var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;$core.addPackage("Kernel-Exceptions"),$core.packages["Kernel-Exceptions"].innerEval=function(expr){return eval(expr)},$core.packages["Kernel-Exceptions"].transport={type:"amd",amdNamespace:"amber_core"},$core.addClass("Error",$globals.Object,["messageText"],"Kernel-Exceptions"),$core.addMethod($core.method({selector:"beHandled",protocol:"accessing",fn:function(){var e=this;return e.amberHandled=!0,e},messageSends:[]}),$globals.Error),$core.addMethod($core.method({selector:"beUnhandled",protocol:"accessing",fn:function(){var e=this;return e.amberHandled=!1,e},messageSends:[]}),$globals.Error),$core.addMethod($core.method({selector:"context",protocol:"accessing",fn:function(){var e=this;return e.context},messageSends:[]}),$globals.Error),$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){var e=this;return e._messageText_("Errorclass: ".__comma($recv(e._class())._name())),e},messageSends:["messageText:",",","name","class"]}),$globals.Error),$core.addMethod($core.method({selector:"isSmalltalkError",protocol:"testing",fn:function(){var e=this;return e.smalltalkError===!0},messageSends:[]}),$globals.Error),$core.addMethod($core.method({selector:"jsStack",protocol:"accessing",fn:function(){var e=this;return e.stack},messageSends:[]}),$globals.Error),$core.addMethod($core.method({selector:"messageText",protocol:"accessing",fn:function(){var e=this,t;return t=e["@messageText"],t},messageSends:[]}),$globals.Error),$core.addMethod($core.method({selector:"messageText:",protocol:"accessing",fn:function(e){var t=this;return t["@messageText"]=e,t},messageSends:[]}),$globals.Error),$core.addMethod($core.method({selector:"resignal",protocol:"signaling",fn:function(){var e=this;throw e.amberHandled=!1,e},messageSends:[]}),$globals.Error),$core.addMethod($core.method({selector:"signal",protocol:"signaling",fn:function(){var e=this;throw e.amberHandled=!1,e.context=$core.getThisContext(),e.smalltalkError=!0,e},messageSends:[]}),$globals.Error),$core.addMethod($core.method({selector:"signal:",protocol:"signaling",fn:function(e){var t=this;return t._messageText_(e),t._signal(),t},messageSends:["messageText:","signal"]}),$globals.Error),$core.addMethod($core.method({selector:"signalerContext",protocol:"accessing",fn:function(){var e=this,t;return t=e._signalerContextFrom_(e._context()),t},messageSends:["signalerContextFrom:","context"]}),$globals.Error),$core.addMethod($core.method({selector:"signalerContextFrom:",protocol:"accessing",fn:function(e){var t=this,n,r,i,s;return s=$recv(e)._findContextSuchThat_(function(e){return n=$recv(e)._receiver(),r=$recv(n).__eq_eq(t),i=$recv(r)._or_(function(){return $recv($recv(e)._receiver()).__eq_eq(t._class())}),$recv(i)._not()}),s},messageSends:["findContextSuchThat:","not","or:","==","receiver","class"]}),$globals.Error),$core.addMethod($core.method({selector:"wasHandled",protocol:"testing",fn:function(){var e=this;return e.amberHandled||!1},messageSends:[]}),$globals.Error),$core.addMethod($core.method({selector:"classTag",protocol:"accessing",fn:function(){var e=this;return"exception"},messageSends:[]}),$globals.Error.klass),$core.addMethod($core.method({selector:"signal",protocol:"instance creation",fn:function(){var e=this,t;return t=$recv(e._new())._signal(),t},messageSends:["signal","new"]}),$globals.Error.klass),$core.addMethod($core.method({selector:"signal:",protocol:"instance creation",fn:function(e){var t=this,n;return n=$recv(t._new())._signal_(e),n},messageSends:["signal:","new"]}),$globals.Error.klass),$core.addClass("Halt",$globals.Error,[],"Kernel-Exceptions"),$core.addMethod($core.method({selector:"messageText",protocol:"accessing",fn:function(){var e=this;return"Halt encountered"},messageSends:[]}),$globals.Halt),$core.addMethod($core.method({selector:"signalerContextFrom:",protocol:"accessing",fn:function(e){var t=this,n,r,i,s;return s=$recv(e)._findContextSuchThat_(function(e){return n=$recv(e)._receiver(),r=$recv(n).__eq_eq(t),i=$recv(r)._or_(function(){return $recv($recv($recv(e)._receiver()).__eq_eq(t._class()))._or_(function(){return $recv($recv($recv(e)._method())._selector()).__eq("halt")})}),$recv(i)._not()}),s},messageSends:["findContextSuchThat:","not","or:","==","receiver","class","=","selector","method"]}),$globals.Halt),$core.addClass("JavaScriptException",$globals.Error,["exception"],"Kernel-Exceptions"),$core.addMethod($core.method({selector:"context:",protocol:"accessing",fn:function(e){var t=this;return t.context=e,t},messageSends:[]}),$globals.JavaScriptException),$core.addMethod($core.method({selector:"exception",protocol:"accessing",fn:function(){var e=this,t;return t=e["@exception"],t},messageSends:[]}),$globals.JavaScriptException),$core.addMethod($core.method({selector:"exception:",protocol:"accessing",fn:function(e){var t=this;return t["@exception"]=e,t},messageSends:[]}),$globals.JavaScriptException),$core.addMethod($core.method({selector:"messageText",protocol:"accessing",fn:function(){var e=this;return"JavaScript exception: "+e["@exception"].toString()},messageSends:[]}),$globals.JavaScriptException),$core.addMethod($core.method({selector:"on:",protocol:"instance creation",fn:function(e){var t=this,n,r,i;return n=t._new(),$recv(n)._exception_(e),r=$recv(n)._yourself(),i=r,i},messageSends:["exception:","new","yourself"]}),$globals.JavaScriptException.klass),$core.addMethod($core.method({selector:"on:context:",protocol:"instance creation",fn:function(e,t){var n=this,r,i,s;return r=n._new(),$recv(r)._exception_(e),$recv(r)._context_(t),i=$recv(r)._yourself(),s=i,s},messageSends:["exception:","new","context:","yourself"]}),$globals.JavaScriptException.klass),$core.addClass("MessageNotUnderstood",$globals.Error,["message","receiver"],"Kernel-Exceptions"),$core.addMethod($core.method({selector:"message",protocol:"accessing",fn:function(){var e=this,t;return t=e["@message"],t},messageSends:[]}),$globals.MessageNotUnderstood),$core.addMethod($core.method({selector:"message:",protocol:"accessing",fn:function(e){var t=this;return t["@message"]=e,t},messageSends:[]}),$globals.MessageNotUnderstood),$core.addMethod($core.method({selector:"messageText",protocol:"accessing",fn:function(){var e=this,t;return t=$recv($recv($recv(e._receiver())._asString()).__comma(" does not understand #")).__comma($recv(e._message())._selector()),t},messageSends:[",","asString","receiver","selector","message"]}),$globals.MessageNotUnderstood),$core.addMethod($core.method({selector:"receiver",protocol:"accessing",fn:function(){var e=this,t;return t=e["@receiver"],t},messageSends:[]}),$globals.MessageNotUnderstood),$core.addMethod($core.method({selector:"receiver:",protocol:"accessing",fn:function(e){var t=this;return t["@receiver"]=e,t},messageSends:[]}),$globals.MessageNotUnderstood),$core.addClass("NonBooleanReceiver",$globals.Error,["object"],"Kernel-Exceptions"),$core.addMethod($core.method({selector:"object",protocol:"accessing",fn:function(){var e=this,t;return t=e["@object"],t},messageSends:[]}),$globals.NonBooleanReceiver),$core.addMethod($core.method({selector:"object:",protocol:"accessing",fn:function(e){var t=this;return t["@object"]=e,t},messageSends:[]}),$globals.NonBooleanReceiver)}),define("amber_core/Kernel-Announcements",["amber/boot","amber_core/Kernel-Objects"],function($boot){"use strict";var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;$core.addPackage("Kernel-Announcements"),$core.packages["Kernel-Announcements"].innerEval=function(expr){return eval(expr)},$core.packages["Kernel-Announcements"].transport={type:"amd",amdNamespace:"amber_core"},$core.addClass("AnnouncementSubscription",$globals.Object,["valuable","announcementClass"],"Kernel-Announcements"),$core.addMethod($core.method({selector:"announcementClass",protocol:"accessing",fn:function(){var e=this,t;return t=e["@announcementClass"],t},messageSends:[]}),$globals.AnnouncementSubscription),$core.addMethod($core.method({selector:"announcementClass:",protocol:"accessing",fn:function(e){var t=this;return t["@announcementClass"]=e,t},messageSends:[]}),$globals.AnnouncementSubscription),$core.addMethod($core.method({selector:"deliver:",protocol:"announcing",fn:function(e){var t=this,n;return n=t._handlesAnnouncement_(e),$core.assert(n)&&$recv(t._valuable())._value_(e),t},messageSends:["ifTrue:","handlesAnnouncement:","value:","valuable"]}),$globals.AnnouncementSubscription),$core.addMethod($core.method({selector:"handlesAnnouncement:",protocol:"announcing",fn:function(e){function n(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var t=this,r,i,s,o,u;r=$recv(n())._globals(),i=$recv(t._announcementClass())._name(),s=$recv(r)._at_(i);if((u=s)==null||u.isNil)return!1;var a;return a=u,o=$recv($recv($recv(n())._globals())._at_($recv($recv($recv(e)._class())._theNonMetaClass())._name()))._includesBehavior_(a),o},messageSends:["ifNil:ifNotNil:","at:","globals","name","announcementClass","includesBehavior:","theNonMetaClass","class"]}),$globals.AnnouncementSubscription),$core.addMethod($core.method({selector:"receiver",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._valuable())._receiver(),t},messageSends:["receiver","valuable"]}),$globals.AnnouncementSubscription),$core.addMethod($core.method({selector:"valuable",protocol:"accessing",fn:function(){var e=this,t;return t=e["@valuable"],t},messageSends:[]}),$globals.AnnouncementSubscription),$core.addMethod($core.method({selector:"valuable:",protocol:"accessing",fn:function(e){var t=this;return t["@valuable"]=e,t},messageSends:[]}),$globals.AnnouncementSubscription),$core.addClass("AnnouncementValuable",$globals.Object,["valuable","receiver"],"Kernel-Announcements"),$core.addMethod($core.method({selector:"receiver",protocol:"accessing",fn:function(){var e=this,t;return t=e["@receiver"],t},messageSends:[]}),$globals.AnnouncementValuable),$core.addMethod($core.method({selector:"receiver:",protocol:"accessing",fn:function(e){var t=this;return t["@receiver"]=e,t},messageSends:[]}),$globals.AnnouncementValuable),$core.addMethod($core.method({selector:"valuable",protocol:"accessing",fn:function(){var e=this,t;return t=e["@valuable"],t},messageSends:[]}),$globals.AnnouncementValuable),$core.addMethod($core.method({selector:"valuable:",protocol:"accessing",fn:function(e){var t=this;return t["@valuable"]=e,t},messageSends:[]}),$globals.AnnouncementValuable),$core.addMethod($core.method({selector:"value",protocol:"evaluating",fn:function(){var e=this,t;return t=$recv(e._valuable())._value(),t},messageSends:["value","valuable"]}),$globals.AnnouncementValuable),$core.addMethod($core.method({selector:"value:",protocol:"evaluating",fn:function(e){var t=this,n;return n=$recv(t._valuable())._value_(e),n},messageSends:["value:","valuable"]}),$globals.AnnouncementValuable),$core.addClass("Announcer",$globals.Object,["registry","subscriptions"],"Kernel-Announcements"),$core.addMethod($core.method({selector:"announce:",protocol:"announcing",fn:function(e){var t=this;return $recv(t["@subscriptions"])._do_(function(t){return $recv(t)._deliver_(e)}),t},messageSends:["do:","deliver:"]}),$globals.Announcer),$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){function t(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}var e=this;return $globals.Announcer.superclass.fn.prototype._initialize.apply($recv(e),[]),e["@subscriptions"]=$recv(t())._new(),e},messageSends:["initialize","new"]}),$globals.Announcer),$core.addMethod($core.method({selector:"on:do:",protocol:"subscribing",fn:function(e,t){var n=this;return n._on_do_for_(e,t,nil),n},messageSends:["on:do:for:"]}),$globals.Announcer),$core.addMethod($core.method({selector:"on:do:for:",protocol:"subscribing",fn:function(e,t,n){function i(){return $globals.AnnouncementSubscription||(typeof AnnouncementSubscription=="undefined"?nil:AnnouncementSubscription)}function s(){return $globals.AnnouncementValuable||(typeof AnnouncementValuable=="undefined"?nil:AnnouncementValuable)}var r=this,o,u,a,f,l,c,h,p;return o=r["@subscriptions"],u=$recv(i())._new(),a=u,f=$recv(s())._new(),$recv(f)._valuable_(t),$recv(f)._receiver_(n),l=$recv(f)._yourself(),c=l,$recv(a)._valuable_(c),$recv(u)._announcementClass_(e),h=$recv(u)._yourself(),p=h,$recv(o)._add_(p),r},messageSends:["add:","valuable:","new","receiver:","yourself","announcementClass:"]}),$globals.Announcer),$core.addMethod($core.method({selector:"on:doOnce:",protocol:"subscribing",fn:function(e,t){function i(){return $globals.AnnouncementSubscription||(typeof AnnouncementSubscription=="undefined"?nil:AnnouncementSubscription)}var n=this,r,s,o;return s=$recv(i())._new(),$recv(s)._announcementClass_(e),o=$recv(s)._yourself(),r=o,$recv(r)._valuable_(function(e){return $recv(n["@subscriptions"])._remove_(r),$recv(t)._value_(e)}),$recv(n["@subscriptions"])._add_(r),n},messageSends:["announcementClass:","new","yourself","valuable:","remove:","value:","add:"]}),$globals.Announcer),$core.addMethod($core.method({selector:"on:send:to:",protocol:"subscribing",fn:function(e,t,n){function i(){return $globals.AnnouncementSubscription||(typeof AnnouncementSubscription=="undefined"?nil:AnnouncementSubscription)}function s(){return $globals.MessageSend||(typeof MessageSend=="undefined"?nil:MessageSend)}var r=this,o,u,a,f,l,c,h,p;return o=r["@subscriptions"],u=$recv(i())._new(),a=u,f=$recv(s())._new(),$recv(f)._receiver_(n),$recv(f)._selector_(t),l=$recv(f)._yourself(),c=l,$recv(a)._valuable_(c),$recv(u)._announcementClass_(e),h=$recv(u)._yourself(),p=h,$recv(o)._add_(p),r},messageSends:["add:","valuable:","new","receiver:","selector:","yourself","announcementClass:"]}),$globals.Announcer),$core.addMethod($core.method({selector:"unsubscribe:",protocol:"subscribing",fn:function(e){var t=this;return t["@subscriptions"]=$recv(t["@subscriptions"])._reject_(function(t){return $recv($recv(t)._receiver()).__eq(e)}),t},messageSends:["reject:","=","receiver"]}),$globals.Announcer),$core.addClass("SystemAnnouncer",$globals.Announcer,[],"Kernel-Announcements"),$globals.SystemAnnouncer.klass.iVarNames=["current"],$core.addMethod($core.method({selector:"current",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@current"],(r=t)==null||r.isNil?(e["@current"]=$globals.SystemAnnouncer.klass.superclass.fn.prototype._new.apply($recv(e),[]),n=e["@current"]):n=t,n},messageSends:["ifNil:","new"]}),$globals.SystemAnnouncer.klass),$core.addMethod($core.method({selector:"new",protocol:"instance creation",fn:function(){var e=this;return e._shouldNotImplement(),e},messageSends:["shouldNotImplement"]}),$globals.SystemAnnouncer.klass),$core.addClass("SystemAnnouncement",$globals.Object,[],"Kernel-Announcements"),$core.addMethod($core.method({selector:"classTag",protocol:"accessing",fn:function(){var e=this;return"announcement"},messageSends:[]}),$globals.SystemAnnouncement.klass),$core.addClass("ClassAnnouncement",$globals.SystemAnnouncement,["theClass"],"Kernel-Announcements"),$core.addMethod($core.method({selector:"theClass",protocol:"accessing",fn:function(){var e=this,t;return t=e["@theClass"],t},messageSends:[]}),$globals.ClassAnnouncement),$core.addMethod($core.method({selector:"theClass:",protocol:"accessing",fn:function(e){var t=this;return t["@theClass"]=e,t},messageSends:[]}),$globals.ClassAnnouncement),$core.addClass("ClassAdded",$globals.ClassAnnouncement,[],"Kernel-Announcements"),$core.addClass("ClassCommentChanged",$globals.ClassAnnouncement,[],"Kernel-Announcements"),$core.addClass("ClassDefinitionChanged",$globals.ClassAnnouncement,[],"Kernel-Announcements"),$core.addClass("ClassMigrated",$globals.ClassAnnouncement,["oldClass"],"Kernel-Announcements"),$core.addMethod($core.method({selector:"oldClass",protocol:"accessing",fn:function(){var e=this,t;return t=e["@oldClass"],t},messageSends:[]}),$globals.ClassMigrated),$core.addMethod($core.method({selector:"oldClass:",protocol:"accessing",fn:function(e){var t=this;return t["@oldClass"]=e,t},messageSends:[]}),$globals.ClassMigrated),$core.addClass("ClassMoved",$globals.ClassAnnouncement,["oldPackage"],"Kernel-Announcements"),$core.addMethod($core.method({selector:"oldPackage",protocol:"accessing",fn:function(){var e=this,t;return t=e["@oldPackage"],t},messageSends:[]}),$globals.ClassMoved),$core.addMethod($core.method({selector:"oldPackage:",protocol:"accessing",fn:function(e){var t=this;return t["@oldPackage"]=e,t},messageSends:[]}),$globals.ClassMoved),$core.addClass("ClassRemoved",$globals.ClassAnnouncement,[],"Kernel-Announcements"),$core.addClass("ClassRenamed",$globals.ClassAnnouncement,[],"Kernel-Announcements"),$core.addClass("MethodAnnouncement",$globals.SystemAnnouncement,["method"],"Kernel-Announcements"),$core.addMethod($core.method({selector:"method",protocol:"accessing",fn:function(){var e=this,t;return t=e["@method"],t},messageSends:[]}),$globals.MethodAnnouncement),$core.addMethod($core.method({selector:"method:",protocol:"accessing",fn:function(e){var t=this;return t["@method"]=e,t},messageSends:[]}),$globals.MethodAnnouncement),$core.addClass("MethodAdded",$globals.MethodAnnouncement,[],"Kernel-Announcements"),$core.addClass("MethodModified",$globals.MethodAnnouncement,["oldMethod"],"Kernel-Announcements"),$core.addMethod($core.method({selector:"oldMethod",protocol:"accessing",fn:function(){var e=this,t;return t=e["@oldMethod"],t},messageSends:[]}),$globals.MethodModified),$core.addMethod($core.method({selector:"oldMethod:",protocol:"accessing",fn:function(e){var t=this;return t["@oldMethod"]=e,t},messageSends:[]}),$globals.MethodModified),$core.addClass("MethodMoved",$globals.MethodAnnouncement,["oldProtocol"],"Kernel-Announcements"),$core.addMethod($core.method({selector:"oldProtocol",protocol:"accessing",fn:function(){var e=this,t;return t=e["@oldProtocol"],t},messageSends:[]}),$globals.MethodMoved),$core.addMethod($core.method({selector:"oldProtocol:",protocol:"accessing",fn:function(e){var t=this;return t["@oldProtocol"]=e,t},messageSends:[]}),$globals.MethodMoved),$core.addClass("MethodRemoved",$globals.MethodAnnouncement,[],"Kernel-Announcements"),$core.addClass("PackageAnnouncement",$globals.SystemAnnouncement,["package"],"Kernel-Announcements"),$core.addMethod($core.method({selector:"package",protocol:"accessing",fn:function(){var e=this,t;return t=e["@package"],t},messageSends:[]}),$globals.PackageAnnouncement),$core.addMethod($core.method({selector:"package:",protocol:"accessing",fn:function(e){var t=this;return t["@package"]=e,t},messageSends:[]}),$globals.PackageAnnouncement),$core.addClass("PackageAdded",$globals.PackageAnnouncement,[],"Kernel-Announcements"),$core.addClass("PackageClean",$globals.PackageAnnouncement,[],"Kernel-Announcements"),$core.addClass("PackageDirty",$globals.PackageAnnouncement,[],"Kernel-Announcements"),$core.addClass("PackageRemoved",$globals.PackageAnnouncement,[],"Kernel-Announcements"),$core.addClass("ProtocolAnnouncement",$globals.SystemAnnouncement,["theClass","protocol"],"Kernel-Announcements"),$core.addMethod($core.method({selector:"package",protocol:"accessing",fn:function(){var e=this,t,n,r;t=e._theClass();if((r=t)==null||r.isNil)n=t;else{var i;i=r,n=$recv(i)._packageOfProtocol_(e._protocol())}return n},messageSends:["ifNotNil:","theClass","packageOfProtocol:","protocol"]}),$globals.ProtocolAnnouncement),$core.addMethod($core.method({selector:"protocol",protocol:"accessing",fn:function(){var e=this,t;return t=e["@protocol"],t},messageSends:[]}),$globals.ProtocolAnnouncement),$core.addMethod($core.method({selector:"protocol:",protocol:"accessing",fn:function(e){var t=this;return t["@protocol"]=e,t},messageSends:[]}),$globals.ProtocolAnnouncement),$core.addMethod($core.method({selector:"theClass",protocol:"accessing",fn:function(){var e=this,t;return t=e["@theClass"],t},messageSends:[]}),$globals.ProtocolAnnouncement),$core.addMethod($core.method({selector:"theClass:",protocol:"accessing",fn:function(e){var t=this;return t["@theClass"]=e,t},messageSends:[]}),$globals.ProtocolAnnouncement),$core.addClass("ProtocolAdded",$globals.ProtocolAnnouncement,[],"Kernel-Announcements"),$core.addClass("ProtocolRemoved",$globals.ProtocolAnnouncement,[],"Kernel-Announcements")}),define("amber_core/Platform-Services",["amber/boot","amber_core/Kernel-Objects","amber_core/Kernel-Collections","amber_core/Kernel-Methods","amber_core/Kernel-Infrastructure"],function($boot){"use strict";var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;$core.addPackage("Platform-Services"),$core.packages["Platform-Services"].innerEval=function(expr){return eval(expr)},$core.packages["Platform-Services"].transport={type:"amd",amdNamespace:"amber_core"},$core.addClass("ConsoleErrorHandler",$globals.Object,[],"Platform-Services"),$core.addMethod($core.method({selector:"handleError:",protocol:"error handling",fn:function(e){var t=this,n,r;return n=$recv(e)._context(),(r=n)==null||r.isNil?n:t._logErrorContext_($recv(e)._context()),t._logError_(e),t},messageSends:["ifNotNil:","context","logErrorContext:","logError:"]}),$globals.ConsoleErrorHandler),$core.addMethod($core.method({selector:"log:",protocol:"private",fn:function(e){var t=this;return $recv(console)._log_(e),t},messageSends:["log:"]}),$globals.ConsoleErrorHandler),$core.addMethod($core.method({selector:"logContext:",protocol:"private",fn:function(e){var t=this,n,r;return n=$recv(e)._home(),(r=n)==null||r.isNil?n:t._logContext_($recv(e)._home()),t._log_($recv(e)._asString()),t},messageSends:["ifNotNil:","home","logContext:","log:","asString"]}),$globals.ConsoleErrorHandler),$core.addMethod($core.method({selector:"logError:",protocol:"private",fn:function(e){var t=this;return t._log_($recv(e)._messageText()),t},messageSends:["log:","messageText"]}),$globals.ConsoleErrorHandler),$core.addMethod($core.method({selector:"logErrorContext:",protocol:"private",fn:function(e){var t=this,n,r;return(r=e)==null||r.isNil?e:(n=$recv(e)._home(),(r=n)==null||r.isNil?n:t._logContext_($recv(e)._home())),t},messageSends:["ifNotNil:","home","logContext:"]}),$globals.ConsoleErrorHandler),$globals.ConsoleErrorHandler.klass.iVarNames=["current"],$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){function t(){return $globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}var e=this;return $recv(t())._registerIfNone_(e._new()),e},messageSends:["registerIfNone:","new"]}),$globals.ConsoleErrorHandler.klass),$core.addClass("ConsoleTranscript",$globals.Object,["textarea"],"Platform-Services"),$core.addMethod($core.method({selector:"clear",protocol:"printing",fn:function(){var e=this;return e},messageSends:[]}),$globals.ConsoleTranscript),$core.addMethod($core.method({selector:"cr",protocol:"printing",fn:function(){var e=this;return e},messageSends:[]}),$globals.ConsoleTranscript),$core.addMethod($core.method({selector:"open",protocol:"actions",fn:function(){var e=this;return e},messageSends:[]}),$globals.ConsoleTranscript),$core.addMethod($core.method({selector:"show:",protocol:"printing",fn:function(e){var t=this;return console.log(String($recv(e)._asString())),t},messageSends:[]}),$globals.ConsoleTranscript),$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){function t(){return $globals.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}var e=this;return $recv(t())._registerIfNone_(e._new()),e},messageSends:["registerIfNone:","new"]}),$globals.ConsoleTranscript.klass),$core.addClass("InterfacingObject",$globals.Object,[],"Platform-Services"),$core.addMethod($core.method({selector:"ajax:",protocol:"actions",fn:function(e){function n(){return $globals.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}var t=this,r;return t._deprecatedAPI(),r=$recv(n())._ajax_(e),r},messageSends:["deprecatedAPI","ajax:"]}),$globals.InterfacingObject),$core.addMethod($core.method({selector:"alert:",protocol:"actions",fn:function(e){function n(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}var t=this,r;return r=$recv(n())._alert_(e),r},messageSends:["alert:"]}),$globals.InterfacingObject),$core.addMethod($core.method({selector:"confirm:",protocol:"actions",fn:function(e){function n(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}var t=this,r;return r=$recv(n())._confirm_(e),r},messageSends:["confirm:"]}),$globals.InterfacingObject),$core.addMethod($core.method({selector:"prompt:",protocol:"actions",fn:function(e){function n(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}var t=this,r;return r=$recv(n())._prompt_(e),r},messageSends:["prompt:"]}),$globals.InterfacingObject),$core.addMethod($core.method({selector:"prompt:default:",protocol:"actions",fn:function(e,t){function r(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}var n=this,i;return i=$recv(r())._prompt_default_(e,t),i},messageSends:["prompt:default:"]}),$globals.InterfacingObject),$core.addClass("Environment",$globals.InterfacingObject,[],"Platform-Services"),$core.addMethod($core.method({selector:"addInstVarNamed:to:",protocol:"compiling",fn:function(e,t){var n=this,r,i,s,o,u;return r=n._classBuilder(),i=$recv(t)._superclass(),s=$recv(t)._name(),o=$recv($recv(t)._instanceVariableNames())._copy(),$recv(o)._add_(e),u=$recv(o)._yourself(),$recv(r)._addSubclassOf_named_instanceVariableNames_package_(i,s,u,$recv($recv(t)._package())._name()),n},messageSends:["addSubclassOf:named:instanceVariableNames:package:","classBuilder","superclass","name","add:","copy","instanceVariableNames","yourself","package"]}),$globals.Environment),$core.addMethod($core.method({selector:"allSelectors",protocol:"accessing",fn:function(){function t(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var e=this,n;return n=$recv($recv(t())._core())._allSelectors(),n},messageSends:["allSelectors","core"]}),$globals.Environment),$core.addMethod($core.method({selector:"availableClassNames",protocol:"accessing",fn:function(){function t(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var e=this,n;return n=$recv($recv(t())._classes())._collect_(function(e){return $recv(e)._name()}),n},messageSends:["collect:","classes","name"]}),$globals.Environment),$core.addMethod($core.method({selector:"availablePackageNames",protocol:"accessing",fn:function(){function t(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var e=this,n;return n=$recv($recv(t())._packages())._collect_(function(e){return $recv(e)._name()}),n},messageSends:["collect:","packages","name"]}),$globals.Environment),$core.addMethod($core.method({selector:"availableProtocolsFor:",protocol:"accessing",fn:function(e){var t=this,n,r,i,s;return n=$recv(e)._protocols(),r=$recv(e)._superclass(),(s=r)==null||s.isNil?r:$recv(n)._addAll_(t._availableProtocolsFor_($recv(e)._superclass())),i=$recv($recv($recv(n)._asSet())._asArray())._sort(),i},messageSends:["protocols","ifNotNil:","superclass","addAll:","availableProtocolsFor:","sort","asArray","asSet"]}),$globals.Environment),$core.addMethod($core.method({selector:"classBuilder",protocol:"accessing",fn:function(){function t(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}var e=this,n;return n=$recv(t())._new(),n},messageSends:["new"]}),$globals.Environment),$core.addMethod($core.method({selector:"classNamed:",protocol:"accessing",fn:function(e){function n(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var t=this,r,i,s;return r=$recv($recv(n())._globals())._at_($recv(e)._asSymbol()),(s=r)==null||s.isNil?i=t._error_("Invalid class name"):i=r,i},messageSends:["ifNil:","at:","globals","asSymbol","error:"]}),$globals.Environment),$core.addMethod($core.method({selector:"classes",protocol:"accessing",fn:function(){function t(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var e=this,n;return n=$recv(t())._classes(),n},messageSends:["classes"]}),$globals.Environment),$core.addMethod($core.method({selector:"commitPackage:onSuccess:onError:",protocol:"actions",fn:function(e,t,n){var r=this;return $recv($recv(e)._transport())._commitOnSuccess_onError_(t,n),r},messageSends:["commitOnSuccess:onError:","transport"]}),$globals.Environment),$core.addMethod($core.method({selector:"compileClassComment:for:",protocol:"compiling",fn:function(e,t){var n=this;return $recv(t)._comment_(e),n},messageSends:["comment:"]}),$globals.Environment),$core.addMethod($core.method({selector:"compileClassDefinition:",protocol:"compiling",fn:function(e){function n(){return $globals.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}function r(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}var t=this;return $recv(function(){return t._evaluate_for_(e,$recv(n())._new())})._on_do_(r(),function(e){return t._alert_($recv(e)._messageText())}),t},messageSends:["on:do:","evaluate:for:","new","alert:","messageText"]}),$globals.Environment),$core.addMethod($core.method({selector:"compileMethod:for:protocol:",protocol:"compiling",fn:function(e,t,n){var r=this,i;return i=$recv(t)._compile_protocol_(e,n),i},messageSends:["compile:protocol:"]}),$globals.Environment),$core.addMethod($core.method({selector:"copyClass:to:",protocol:"actions",fn:function(e,t){function r(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}function i(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}var n=this,s,o,u;return s=$recv($recv(r())._globals())._at_(t),(u=s)==null||u.isNil?s:(o=$recv("A class named ".__comma(t)).__comma(" already exists"),n._error_(o)),$recv($recv(i())._new())._copyClass_named_(e,t),n},messageSends:["ifNotNil:","at:","globals","error:",",","copyClass:named:","new"]}),$globals.Environment),$core.addMethod($core.method({selector:"doItReceiver",protocol:"accessing",fn:function(){function t(){return $globals.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}var e=this,n;return n=$recv(t())._new(),n},messageSends:["new"]}),$globals.Environment),$core.addMethod($core.method({selector:"evaluate:for:",protocol:"evaluating",fn:function(e,t){function r(){return $globals.Evaluator||(typeof Evaluator=="undefined"?nil:Evaluator)}var n=this,i;return i=$recv(r())._evaluate_for_(e,t),i},messageSends:["evaluate:for:"]}),$globals.Environment),$core.addMethod($core.method({selector:"evaluate:on:do:",protocol:"error handling",fn:function(e,t,n){var r=this,i;return $recv(e)._tryCatch_(function(e){return i=$recv(e)._isKindOf_(r._classNamed_($recv(t)._name())),$core.assert(i)?$recv(n)._value_(e):$recv(e)._resignal()}),r},messageSends:["tryCatch:","ifTrue:ifFalse:","isKindOf:","classNamed:","name","value:","resignal"]}),$globals.Environment),$core.addMethod($core.method({selector:"inspect:",protocol:"actions",fn:function(e){function n(){return $globals.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}var t=this;return $recv(n())._inspect_(e),t},messageSends:["inspect:"]}),$globals.Environment),$core.addMethod($core.method({selector:"moveClass:toPackage:",protocol:"actions",fn:function(e,t){function i(){return $globals.Package||(typeof Package=="undefined"?nil:Package)}var n=this,r,s,o,u;return r=$recv(i())._named_(t),s=r,(u=s)==null||u.isNil?n._error_("Invalid package name"):s,o=$recv(r).__eq_eq($recv(e)._package()),$core.assert(o)?n:($recv(e)._package_(r),n)},messageSends:["named:","ifNil:","error:","ifTrue:","==","package","package:"]}),$globals.Environment),$core.addMethod($core.method({selector:"moveMethod:toClass:",protocol:"actions",fn:function(e,t){var n=this,r,i,s,o,u,a;return r=n._classNamed_(t),i=r,s=$recv(e)._methodClass(),o=$recv(i).__eq_eq(s),$core.assert(o)?n:(u=$recv(e)._methodClass(),a=$recv(u)._isMetaclass(),$core.assert(a)&&(r=$recv(r)._class(),r),$recv(r)._compile_protocol_($recv(e)._source(),$recv(e)._protocol()),$recv($recv(e)._methodClass())._removeCompiledMethod_(e),n)},messageSends:["classNamed:","ifTrue:","==","methodClass","isMetaclass","class","compile:protocol:","source","protocol","removeCompiledMethod:"]}),$globals.Environment),$core.addMethod($core.method({selector:"moveMethod:toProtocol:",protocol:"actions",fn:function(e,t){var n=this;return $recv(e)._protocol_(t),n},messageSends:["protocol:"]}),$globals.Environment),$core.addMethod($core.method({selector:"packages",protocol:"accessing",fn:function(){function t(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var e=this,n;return n=$recv(t())._packages(),n},messageSends:["packages"]}),$globals.Environment),$core.addMethod($core.method({selector:"registerErrorHandler:",protocol:"services",fn:function(e){function n(){return $globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}var t=this;return $recv(n())._register_(e),t},messageSends:["register:"]}),$globals.Environment),$core.addMethod($core.method({selector:"registerFinder:",protocol:"services",fn:function(e){function n(){return $globals.Finder||(typeof Finder=="undefined"?nil:Finder)}var t=this;return $recv(n())._register_(e),t},messageSends:["register:"]}),$globals.Environment),$core.addMethod($core.method({selector:"registerInspector:",protocol:"services",fn:function(e){function n(){return $globals.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}var t=this;return $recv(n())._register_(e),t},messageSends:["register:"]}),$globals.Environment),$core.addMethod($core.method({selector:"registerProgressHandler:",protocol:"services",fn:function(e){function n(){return $globals.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}var t=this;return $recv(n())._register_(e),t},messageSends:["register:"]}),$globals.Environment),$core.addMethod($core.method({selector:"registerTranscript:",protocol:"services",fn:function(e){function n(){return $globals.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}var t=this;return $recv(n())._register_(e),t},messageSends:["register:"]}),$globals.Environment),$core.addMethod($core.method({selector:"removeClass:",protocol:"actions",fn:function(e){function n(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var t=this;return $recv(n())._removeClass_(e),t},messageSends:["removeClass:"]}),$globals.Environment),$core.addMethod($core.method({selector:"removeMethod:",protocol:"actions",fn:function(e){var t=this;return $recv($recv(e)._methodClass())._removeCompiledMethod_(e),t},messageSends:["removeCompiledMethod:","methodClass"]}),$globals.Environment),$core.addMethod($core.method({selector:"removeProtocol:from:",protocol:"actions",fn:function(e,t){var n=this;return $recv($recv(t)._methodsInProtocol_(e))._do_(function(e){return $recv(t)._removeCompiledMethod_(e)}),n},messageSends:["do:","methodsInProtocol:","removeCompiledMethod:"]}),$globals.Environment),$core.addMethod($core.method({selector:"renameClass:to:",protocol:"actions",fn:function(e,t){function r(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}function i(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}var n=this,s,o,u;return s=$recv($recv(r())._globals())._at_(t),(u=s)==null||u.isNil?s:(o=$recv("A class named ".__comma(t)).__comma(" already exists"),n._error_(o)),$recv($recv(i())._new())._renameClass_to_(e,t),n},messageSends:["ifNotNil:","at:","globals","error:",",","renameClass:to:","new"]}),$globals.Environment),$core.addMethod($core.method({selector:"renamePackage:to:",protocol:"actions",fn:function(e,t){function r(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var n=this,i,s,o;return i=$recv($recv(r())._globals())._at_(t),(o=i)==null||o.isNil?i:(s=$recv("A package named ".__comma(t)).__comma(" already exists"),n._error_(s)),$recv(r())._renamePackage_to_(e,t),n},messageSends:["ifNotNil:","at:","globals","error:",",","renamePackage:to:"]}),$globals.Environment),$core.addMethod($core.method({selector:"renameProtocol:to:in:",protocol:"actions",fn:function(e,t,n){var r=this;return $recv($recv(n)._methodsInProtocol_(e))._do_(function(e){return $recv(e)._protocol_(t)}),r},messageSends:["do:","methodsInProtocol:","protocol:"]}),$globals.Environment),$core.addMethod($core.method({selector:"setClassCommentOf:to:",protocol:"actions",fn:function(e,t){var n=this;return $recv(e)._comment_(t),n},messageSends:["comment:"]}),$globals.Environment),$core.addMethod($core.method({selector:"systemAnnouncer",protocol:"accessing",fn:function(){function t(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var e=this,n;return n=$recv($recv($recv(t())._globals())._at_("SystemAnnouncer"))._current(),n},messageSends:["current","at:","globals"]}),$globals.Environment),$core.addClass("NullProgressHandler",$globals.Object,[],"Platform-Services"),$core.addMethod($core.method({selector:"do:on:displaying:",protocol:"progress handling",fn:function(e,t,n){var r=this;return $recv(t)._do_(e),r},messageSends:["do:"]}),$globals.NullProgressHandler),$globals.NullProgressHandler.klass.iVarNames=["current"],$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){function t(){return $globals.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}var e=this;return $recv(t())._registerIfNone_(e._new()),e},messageSends:["registerIfNone:","new"]}),$globals.NullProgressHandler.klass),$core.addClass("PlatformInterface",$globals.Object,[],"Platform-Services"),$core.addMethod($core.method({selector:"ajax:",protocol:"actions",fn:function(e){function n(){return $globals.JQuery||(typeof JQuery=="undefined"?nil:JQuery)}var t=this,r,i;return t._deprecatedAPI_("Use Platform newXhr or dedicated library."),(i=n())==null||i.isNil?r=t._error_("JQuery wrapper not loaded, cannot do AJAX."):r=$recv($recv(n())._current())._ajax_(e),r},messageSends:["deprecatedAPI:","ifNotNil:ifNil:","ajax:","current","error:"]}),$globals.PlatformInterface.klass),$core.addMethod($core.method({selector:"alert:",protocol:"actions",fn:function(e){function n(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}var t=this,r;return t._deprecatedAPI_("Use Terminal alert:"),r=$recv(n())._alert_(e),r},messageSends:["deprecatedAPI:","alert:"]}),$globals.PlatformInterface.klass),$core.addMethod($core.method({selector:"confirm:",protocol:"actions",fn:function(e){function n(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}var t=this,r;return t._deprecatedAPI_("Use Terminal confirm:"),r=$recv(n())._confirm_(e),r},messageSends:["deprecatedAPI:","confirm:"]}),$globals.PlatformInterface.klass),$core.addMethod($core.method({selector:"existsGlobal:",protocol:"actions",fn:function(e){function n(){return $globals.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}var t=this,r;return t._deprecatedAPI_("Use Smalltalk existsJsGlobal:"),r=$recv($recv(n())._globals())._at_ifPresent_ifAbsent_(e,function(){return!0},function(){return!1}),r},messageSends:["deprecatedAPI:","at:ifPresent:ifAbsent:","globals"]}),$globals.PlatformInterface.klass),$core.addMethod($core.method({selector:"globals",protocol:"accessing",fn:function(){function t(){return $globals.Platform||(typeof Platform=="undefined"?nil:Platform)}var e=this,n;return e._deprecatedAPI_("Use Platform globals"),n=$recv(t())._globals(),n},messageSends:["deprecatedAPI:","globals"]}),$globals.PlatformInterface.klass),$core.addMethod($core.method({selector:"newXhr",protocol:"actions",fn:function(){function t(){return $globals.Platform||(typeof Platform=="undefined"?nil:Platform)}var e=this,n;return e._deprecatedAPI_("Use Platform newXhr"),n=$recv(t())._newXhr(),n},messageSends:["deprecatedAPI:","newXhr"]}),$globals.PlatformInterface.klass),$core.addMethod($core.method({selector:"prompt:",protocol:"actions",fn:function(e){function n(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}var t=this,r;return t._deprecatedAPI_("Use Terminal prompt:"),r=$recv(n())._prompt_(e),r},messageSends:["deprecatedAPI:","prompt:"]}),$globals.PlatformInterface.klass),$core.addMethod($core.method({selector:"prompt:default:",protocol:"actions",fn:function(e,t){function r(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}var n=this,i;return n._deprecatedAPI_("Use Terminal prompt:default:"),i=$recv(r())._prompt_default_(e,t),i},messageSends:["deprecatedAPI:","prompt:default:"]}),$globals.PlatformInterface.klass),$core.addClass("Service",$globals.Object,[],"Platform-Services"),$globals.Service.klass.iVarNames=["current"],$core.addMethod($core.method({selector:"current",protocol:"accessing",fn:function(){var e=this,t;return t=e["@current"],t},messageSends:[]}),$globals.Service.klass),$core.addMethod($core.method({selector:"new",protocol:"instance creation",fn:function(){var e=this;return e._shouldNotImplement(),e},messageSends:["shouldNotImplement"]}),$globals.Service.klass),$core.addMethod($core.method({selector:"register:",protocol:"registration",fn:function(e){var t=this;return t["@current"]=e,t},messageSends:[]}),$globals.Service.klass),$core.addMethod($core.method({selector:"registerIfNone:",protocol:"registration",fn:function(e){var t=this,n,r;return n=t._current(),(r=n)==null||r.isNil?t._register_(e):n,t},messageSends:["ifNil:","current","register:"]}),$globals.Service.klass),$core.addClass("ErrorHandler",$globals.Service,[],"Platform-Services"),$core.addMethod($core.method({selector:"handleError:",protocol:"error handling",fn:function(e){var t=this;return t._handleUnhandledError_(e),t},messageSends:["handleUnhandledError:"]}),$globals.ErrorHandler.klass),$core.addMethod($core.method({selector:"handleUnhandledError:",protocol:"error handling",fn:function(e){var t=this,n,r;return n=$recv(e)._wasHandled(),$core.assert(n)?t:(r=$recv(t._current())._handleError_(e),r)},messageSends:["ifTrue:","wasHandled","handleError:","current"]}),$globals.ErrorHandler.klass),$core.addClass("Finder",$globals.Service,[],"Platform-Services"),$core.addMethod($core.method({selector:"findClass:",protocol:"finding",fn:function(e){var t=this,n;return n=$recv(t._current())._findClass_(e),n},messageSends:["findClass:","current"]}),$globals.Finder.klass),$core.addMethod($core.method({selector:"findMethod:",protocol:"finding",fn:function(e){var t=this,n;return n=$recv(t._current())._findMethod_(e),n},messageSends:["findMethod:","current"]}),$globals.Finder.klass),$core.addMethod($core.method({selector:"findString:",protocol:"finding",fn:function(e){var t=this,n;return n=$recv(t._current())._findString_(e),n},messageSends:["findString:","current"]}),$globals.Finder.klass),$core.addClass("Inspector",$globals.Service,[],"Platform-Services"),$core.addMethod($core.method({selector:"inspect:",protocol:"inspecting",fn:function(e){var t=this,n;return n=$recv(t._current())._inspect_(e),n},messageSends:["inspect:","current"]}),$globals.Inspector.klass),$core.addClass("Platform",$globals.Service,[],"Platform-Services"),$core.addMethod($core.method({selector:"globals",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._current())._globals(),t},messageSends:["globals","current"]}),$globals.Platform.klass),$core.addMethod($core.method({selector:"newXhr",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._current())._newXhr(),t},messageSends:["newXhr","current"]}),$globals.Platform.klass),$core.addClass("ProgressHandler",$globals.Service,[],"Platform-Services"),$core.addMethod($core.method({selector:"do:on:displaying:",protocol:"progress handling",fn:function(e,t,n){var r=this;return $recv(r._current())._do_on_displaying_(e,t,n),r},messageSends:["do:on:displaying:","current"]}),$globals.ProgressHandler.klass),$core.addClass("Terminal",$globals.Service,[],"Platform-Services"),$core.addMethod($core.method({selector:"alert:",protocol:"dialogs",fn:function(e){var t=this,n;return n=$recv(t._current())._alert_(e),n},messageSends:["alert:","current"]}),$globals.Terminal.klass),$core.addMethod($core.method({selector:"confirm:",protocol:"dialogs",fn:function(e){var t=this,n;return n=$recv(t._current())._confirm_(e),n},messageSends:["confirm:","current"]}),$globals.Terminal.klass),$core.addMethod($core.method({selector:"prompt:",protocol:"dialogs",fn:function(e){var t=this,n;return n=$recv(t._current())._prompt_(e),n},messageSends:["prompt:","current"]}),$globals.Terminal.klass),$core.addMethod($core.method({selector:"prompt:default:",protocol:"dialogs",fn:function(e,t){var n=this,r;return r=$recv(n._current())._prompt_default_(e,t),r},messageSends:["prompt:default:","current"]}),$globals.Terminal.klass),$core.addClass("Transcript",$globals.Service,[],"Platform-Services"),$core.addMethod($core.method({selector:"clear",protocol:"printing",fn:function(){var e=this;return $recv(e._current())._clear(),e},messageSends:["clear","current"]}),$globals.Transcript.klass),$core.addMethod($core.method({selector:"cr",protocol:"printing",fn:function(){function t(){return $globals.String||(typeof String=="undefined"?nil:String)}var e=this;return $recv(e._current())._show_($recv(t())._cr()),e},messageSends:["show:","current","cr"]}),$globals.Transcript.klass),$core.addMethod($core.method({selector:"inspect:",protocol:"printing",fn:function(e){var t=this;return t._show_(e),t},messageSends:["show:"]}),$globals.Transcript.klass),$core.addMethod($core.method({selector:"open",protocol:"instance creation",fn:function(){var e=this;return $recv(e._current())._open(),e},messageSends:["open","current"]}),$globals.Transcript.klass),$core.addMethod($core.method({selector:"show:",protocol:"printing",fn:function(e){var t=this;return $recv(t._current())._show_(e),t},messageSends:["show:","current"]}),$globals.Transcript.klass),$core.addMethod($core.method({selector:"inspectOn:",protocol:"*Platform-Services",fn:function(e){function r(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}var t=this,n,i;return n=$recv(r())._new(),$recv(n)._at_put_("#self",t),$recv(n)._at_put_("#keys",t._keys()),t._keysAndValuesDo_(function(e,t){return $recv(n)._at_put_(e,t)}),$recv(e)._setLabel_(t._printString()),i=$recv(e)._setVariables_(n),t},messageSends:["new","at:put:","keys","keysAndValuesDo:","setLabel:","printString","setVariables:"]}),$globals.AssociativeCollection),$core.addMethod($core.method({selector:"inspectOn:",protocol:"*Platform-Services",fn:function(e){function r(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}var t=this,n,i;return n=$recv(r())._new(),$recv(n)._at_put_("#self",t),t._withIndexDo_(function(e,t){return $recv(n)._at_put_(t,e)}),$recv(e)._setLabel_(t._printString()),i=$recv(e)._setVariables_(n),t},messageSends:["new","at:put:","withIndexDo:","setLabel:","printString","setVariables:"]}),$globals.Collection),$core.addMethod($core.method({selector:"inspectOn:",protocol:"*Platform-Services",fn:function(e){function r(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}var t=this,n,i;return n=$recv(r())._new(),$recv(n)._at_put_("#self",t),$recv(n)._at_put_("#year",t._year()),$recv(n)._at_put_("#month",t._month()),$recv(n)._at_put_("#day",t._day()),$recv(n)._at_put_("#hours",t._hours()),$recv(n)._at_put_("#minutes",t._minutes()),$recv(n)._at_put_("#seconds",t._seconds()),$recv(n)._at_put_("#milliseconds",t._milliseconds()),$recv(e)._setLabel_(t._printString()),i=$recv(e)._setVariables_(n),t},messageSends:["new","at:put:","year","month","day","hours","minutes","seconds","milliseconds","setLabel:","printString","setVariables:"]}),$globals.Date),$core.addMethod($core.method({selector:"inspectOn:",protocol:"*Platform-Services",fn:function(e){function r(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}function i(){return $globals.JSObjectProxy||(typeof JSObjectProxy=="undefined"?nil:JSObjectProxy)}var t=this,n;return n=$recv(r())._new(),$recv(n)._at_put_("#self",t._jsObject()),$recv(e)._setLabel_(t._printString()),$recv(i())._addObjectVariablesTo_ofProxy_(n,t),$recv(e)._setVariables_(n),t},messageSends:["new","at:put:","jsObject","setLabel:","printString","addObjectVariablesTo:ofProxy:","setVariables:"]}),$globals.JSObjectProxy),$core.addMethod($core.method({selector:"inspectOn:",protocol:"*Platform-Services",fn:function(e){function r(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}var t=this,n,i;return n=$recv(r())._new(),$recv(n)._at_put_("#self",t),$recv(n)._at_put_("#home",t._home()),$recv(n)._at_put_("#receiver",t._receiver()),$recv(n)._at_put_("#selector",t._selector()),$recv(n)._at_put_("#locals",t._locals()),$recv($recv(t._class())._instanceVariableNames())._do_(function(e){return $recv(n)._at_put_(e,t._instVarAt_(e))}),$recv(e)._setLabel_(t._printString()),i=$recv(e)._setVariables_(n),t},messageSends:["new","at:put:","home","receiver","selector","locals","do:","instanceVariableNames","class","instVarAt:","setLabel:","printString","setVariables:"]}),$globals.MethodContext),$core.addMethod($core.method({selector:"inspectOn:",protocol:"*Platform-Services",fn:function(e){function r(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}var t=this,n,i;return n=$recv(r())._new(),$recv(n)._at_put_("#self",t),$recv($recv(t._class())._allInstanceVariableNames())._do_(function(e){return $recv(n)._at_put_(e,t._instVarAt_(e))}),$recv(e)._setLabel_(t._printString()),i=$recv(e)._setVariables_(n),t},messageSends:["new","at:put:","do:","allInstanceVariableNames","class","instVarAt:","setLabel:","printString","setVariables:"]}),$globals.Object),$core.addMethod($core.method({selector:"do:displayingProgress:",protocol:"*Platform-Services",fn:function(e,t){function r(){return $globals.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}var n=this;return $recv(r())._do_on_displaying_(e,n,t),n},messageSends:["do:on:displaying:"]}),$globals.SequenceableCollection),$core.addMethod($core.method({selector:"inspectOn:",protocol:"*Platform-Services",fn:function(e){function i(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}var t=this,n,r,s;return n=$recv(i())._new(),$recv(n)._at_put_("#self",t),r=1,t._do_(function(e){return $recv(n)._at_put_(r,e),r=$recv(r).__plus(1),r}),$recv(e)._setLabel_(t._printString()),s=$recv(e)._setVariables_(n),t},messageSends:["new","at:put:","do:","+","setLabel:","printString","setVariables:"]}),$globals.Set),$core.addMethod($core.method({selector:"inspectOn:",protocol:"*Platform-Services",fn:function(e){var t=this,n,r,i,s,o,u;return $globals.String.superclass.fn.prototype._inspectOn_.apply($recv(t),[e]),r=t._printString(),i=$recv(r)._size(),s=$recv(i).__gt(30),$core.assert(s)?(o=t._printString(),u=$recv(o)._copyFrom_to_(1,30),n=$recv(u).__comma("...'"),n):(n=t._printString(),n),$recv(e)._setLabel_(n),t},messageSends:["inspectOn:","ifTrue:ifFalse:",">","size","printString",",","copyFrom:to:","setLabel:"]}),$globals.String)}),define("amber_core/Platform-Browser",["amber/boot","amber_core/Kernel-Objects"],function($boot){"use strict";var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;$core.addPackage("Platform-Browser"),$core.packages["Platform-Browser"].innerEval=function(expr){return eval(expr)},$core.packages["Platform-Browser"].transport={type:"amd",amdNamespace:"amber_core"},$core.addClass("BrowserPlatform",$globals.Object,[],"Platform-Browser"),$core.addMethod($core.method({selector:"globals",protocol:"accessing",fn:function(){var e=this,t;return t=window,t},messageSends:[]}),$globals.BrowserPlatform),$core.addMethod($core.method({selector:"newXhr",protocol:"accessing",fn:function(){function t(){return $globals.XMLHttpRequest||(typeof XMLHttpRequest=="undefined"?nil:XMLHttpRequest)}function n(){return $globals.NativeFunction||(typeof NativeFunction=="undefined"?nil:NativeFunction)}var e=this,r,i;return(i=t())!=null&&!i.isNil?(r=$recv(n())._constructorOf_(t()),r):(e._error_("XMLHttpRequest not available."),e)},messageSends:["ifNotNil:ifNil:","constructorOf:","error:"]}),$globals.BrowserPlatform),$core.addMethod($core.method({selector:"initialize",protocol:"testing",fn:function(){function t(){return $globals.Platform||(typeof Platform=="undefined"?nil:Platform)}var e=this,n;return n=e._isFeasible(),$core.assert(n)&&$recv(t())._registerIfNone_(e._new()),e},messageSends:["ifTrue:","isFeasible","registerIfNone:","new"]}),$globals.BrowserPlatform.klass),$core.addMethod($core.method({selector:"isFeasible",protocol:"testing",fn:function(){var e=this;return typeof window!="undefined"},messageSends:[]}),$globals.BrowserPlatform.klass),$core.addClass("BrowserTerminal",$globals.Object,[],"Platform-Browser"),$core.addMethod($core.method({selector:"alert:",protocol:"actions",fn:function(e){var t=this,n;return n=$recv(window)._alert_(e),n},messageSends:["alert:"]}),$globals.BrowserTerminal),$core.addMethod($core.method({selector:"confirm:",protocol:"actions",fn:function(e){var t=this,n;return n=$recv(window)._confirm_(e),n},messageSends:["confirm:"]}),$globals.BrowserTerminal),$core.addMethod($core.method({selector:"prompt:",protocol:"actions",fn:function(e){var t=this,n;return n=$recv(window)._prompt_(e),n},messageSends:["prompt:"]}),$globals.BrowserTerminal),$core.addMethod($core.method({selector:"prompt:default:",protocol:"actions",fn:function(e,t){var n=this,r;return r=$recv(window)._prompt_default_(e,t),r},messageSends:["prompt:default:"]}),$globals.BrowserTerminal),$core.addMethod($core.method({selector:"initialize",protocol:"testing",fn:function(){function t(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}var e=this,n;return n=e._isFeasible(),$core.assert(n)&&$recv(t())._registerIfNone_(e._new()),e},messageSends:["ifTrue:","isFeasible","registerIfNone:","new"]}),$globals.BrowserTerminal.klass),$core.addMethod($core.method({selector:"isFeasible",protocol:"testing",fn:function(){var e=this;return typeof window!="undefined"},messageSends:[]}),$globals.BrowserTerminal.klass),$core.addMethod($core.method({selector:"postMessageTo:",protocol:"*Platform-Browser",fn:function(e){var t=this,n;return n=t._postMessageTo_origin_(e,"*"),n},messageSends:["postMessageTo:origin:"]}),$globals.Object),$core.addMethod($core.method({selector:"postMessageTo:origin:",protocol:"*Platform-Browser",fn:function(e,t){var n=this;return e.postMessage(n,t)},messageSends:[]}),$globals.Object)}),define("amber/deploy",["./helpers","amber_core/Kernel-Objects","amber_core/Kernel-Classes","amber_core/Kernel-Methods","amber_core/Kernel-Collections","amber_core/Kernel-Infrastructure","amber_core/Kernel-Exceptions","amber_core/Kernel-Announcements","amber_core/Platform-Services","amber_core/Platform-Browser"],function(e){return e}),define("amber/parser",["./boot"],function(e){var t=e.globals,n=e.nil;t.SmalltalkParser=function(){function e(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function r(e,t,n,r,i,s){this.message=e,this.expected=t,this.found=n,this.offset=r,this.line=i,this.column=s,this.name="SyntaxError"}function i(e){function Jn(){return e.substring(qn,In)}function Kn(){return qn}function Qn(){return er(qn).line}function Gn(){return er(qn).column}function Yn(e){throw nr(null,[{type:"other",description:e}],qn)}function Zn(e){throw nr(e,null,qn)}function er(t){function n(t,n,r){var i,s;for(i=n;it&&(Rn=0,Un={line:1,column:1,seenCR:!1}),n(Un,Rn,t),Rn=t),Un}function tr(e){if(Inzn&&(zn=In,Wn=[]),Wn.push(e)}function nr(t,n,i){function s(e){var t=1;e.sort(function(e,t){return e.descriptiont.description?1:0});while(t1?r.slice(0,-1).join(", ")+" or "+r[e.length-1]:r[0],s=t?'"'+n(t)+'"':"end of input","Expected "+i+" but "+s+" found."}var u=er(i),a=iIn?(r=e.charAt(In),In++):(r=s,Xn===0&&tr(F)),r!==s?(qn=t,n=I(r),t=n):(In=t,t=f)):(In=t,t=f),Vn[i]={nextPos:In,result:t},t)}function pr(){var t,n,r,i=In*60+10,o=Vn[i];return o?(In=o.nextPos,o.result):(t=In,e.charCodeAt(In)===35?(n=q,In++):(n=s,Xn===0&&tr(R)),n!==s?(r=dr(),r!==s?(qn=t,n=U(r),t=n):(In=t,t=f)):(In=t,t=f),Vn[i]={nextPos:In,result:t},t)}function dr(){var e,t,n,r=In*60+11,i=Vn[r];return i?(In=i.nextPos,i.result):(e=In,t=fr(),t===s&&(t=Mr(),t===s&&(t=In,n=cr(),n!==s&&(qn=t,n=z(n)),t=n)),t!==s&&(qn=e,t=W(t)),e=t,Vn[r]={nextPos:In,result:e},e)}function vr(){var e,t,n=In*60+12,r=Vn[n];return r?(In=r.nextPos,r.result):(e=In,t=mr(),t===s&&(t=gr(),t===s&&(t=yr(),t===s&&(t=br()))),t!==s&&(qn=e,t=X(t)),e=t,Vn[n]={nextPos:In,result:e},e)}function mr(){var t,n,r,i,o,u=In*60+13,a=Vn[u];return a?(In=a.nextPos,a.result):(t=In,n=In,r=yr(),r===s&&(r=br()),r!==s?(e.charCodeAt(In)===101?(i=V,In++):(i=s,Xn===0&&tr($)),i!==s?(o=br(),o!==s?(r=[r,i,o],n=r):(In=n,n=f)):(In=n,n=f)):(In=n,n=f),n!==s&&(qn=t,n=J(n)),t=n,Vn[u]={nextPos:In,result:t},t)}function gr(){var t,n,r,i,o,u=In*60+14,a=Vn[u];if(a)return In=a.nextPos,a.result;t=In,e.charCodeAt(In)===45?(n=Q,In++):(n=s,Xn===0&&tr(G)),n===s&&(n=K);if(n!==s){e.substr(In,3)===Y?(r=Y,In+=3):(r=s,Xn===0&&tr(Z));if(r!==s){i=[],et.test(e.charAt(In))?(o=e.charAt(In),In++):(o=s,Xn===0&&tr(tt));if(o!==s)while(o!==s)i.push(o),et.test(e.charAt(In))?(o=e.charAt(In),In++):(o=s,Xn===0&&tr(tt));else i=f;i!==s?(qn=t,n=nt(n,i),t=n):(In=t,t=f)}else In=t,t=f}else In=t,t=f;return Vn[u]={nextPos:In,result:t},t}function yr(){var t,n,r,i,o,u,a=In*60+15,l=Vn[a];if(l)return In=l.nextPos,l.result;t=In,e.charCodeAt(In)===45?(n=Q,In++):(n=s,Xn===0&&tr(G)),n===s&&(n=K);if(n!==s){r=[],rt.test(e.charAt(In))?(i=e.charAt(In),In++):(i=s,Xn===0&&tr(it));if(i!==s)while(i!==s)r.push(i),rt.test(e.charAt(In))?(i=e.charAt(In),In++):(i=s,Xn===0&&tr(it));else r=f;if(r!==s){e.charCodeAt(In)===46?(i=st,In++):(i=s,Xn===0&&tr(ot));if(i!==s){o=[],rt.test(e.charAt(In))?(u=e.charAt(In),In++):(u=s,Xn===0&&tr(it));if(u!==s)while(u!==s)o.push(u),rt.test(e.charAt(In))?(u=e.charAt(In),In++):(u=s,Xn===0&&tr(it));else o=f;o!==s?(qn=t,n=ut(n,r,o),t=n):(In=t,t=f)}else In=t,t=f}else In=t,t=f}else In=t,t=f;return Vn[a]={nextPos:In,result:t},t}function br(){var t,n,r,i,o=In*60+16,u=Vn[o];if(u)return In=u.nextPos,u.result;t=In,e.charCodeAt(In)===45?(n=Q,In++):(n=s,Xn===0&&tr(G)),n===s&&(n=K);if(n!==s){r=[],rt.test(e.charAt(In))?(i=e.charAt(In),In++):(i=s,Xn===0&&tr(it));if(i!==s)while(i!==s)r.push(i),rt.test(e.charAt(In))?(i=e.charAt(In),In++):(i=s,Xn===0&&tr(it));else r=f;r!==s?(qn=t,n=at(n,r),t=n):(In=t,t=f)}else In=t,t=f;return Vn[o]={nextPos:In,result:t},t}function wr(){var t,n,r,i=In*60+17,o=Vn[i];return o?(In=o.nextPos,o.result):(t=In,e.substr(In,2)===ft?(n=ft,In+=2):(n=s,Xn===0&&tr(lt)),n!==s?(r=Sr(),r!==s?(qn=t,n=U(r),t=n):(In=t,t=f)):(In=t,t=f),Vn[i]={nextPos:In,result:t},t)}function Er(){var t,n,r,i=In*60+18,o=Vn[i];return o?(In=o.nextPos,o.result):(t=In,e.charCodeAt(In)===40?(n=ct,In++):(n=s,Xn===0&&tr(ht)),n!==s?(r=Sr(),r!==s?(qn=t,n=U(r),t=n):(In=t,t=f)):(In=t,t=f),Vn[i]={nextPos:In,result:t},t)}function Sr(){var t,n,r,i,o,u=In*60+19,a=Vn[u];if(a)return In=a.nextPos,a.result;t=In,n=[],r=In,i=or(),i!==s?(o=Cr(),o===s&&(o=Er(),o===s&&(o=dr())),o!==s?(qn=r,i=pt(o),r=i):(In=r,r=f)):(In=r,r=f);while(r!==s)n.push(r),r=In,i=or(),i!==s?(o=Cr(),o===s&&(o=Er(),o===s&&(o=dr())),o!==s?(qn=r,i=pt(o),r=i):(In=r,r=f)):(In=r,r=f);return n!==s?(r=or(),r!==s?(e.charCodeAt(In)===41?(i=dt,In++):(i=s,Xn===0&&tr(vt)),i!==s?(qn=t,n=mt(n),t=n):(In=t,t=f)):(In=t,t=f)):(In=t,t=f),Vn[u]={nextPos:In,result:t},t}function xr(){var t,n,r,i,o,u,a,l=In*60+20,c=Vn[l];return c?(In=c.nextPos,c.result):(t=In,e.charCodeAt(In)===123?(n=gt,In++):(n=s,Xn===0&&tr(yt)),n!==s?(r=or(),r!==s?(i=jr(),i===s&&(i=K),i!==s?(o=or(),o!==s?(e.charCodeAt(In)===46?(u=st,In++):(u=s,Xn===0&&tr(ot)),u===s&&(u=K),u!==s?(e.charCodeAt(In)===125?(a=bt,In++):(a=s,Xn===0&&tr(wt)),a!==s?(qn=t,n=Et(i),t=n):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)):(In=t,t=f),Vn[l]={nextPos:In,result:t},t)}function Tr(){var t,n,r,i,o,u,a=In*60+21,l=Vn[a];return l?(In=l.nextPos,l.result):(t=In,e.substr(In,2)===St?(n=St,In+=2):(n=s,Xn===0&&tr(xt)),n!==s?(r=or(),r!==s?(i=ai(),i===s&&(i=K),i!==s?(o=or(),o!==s?(e.charCodeAt(In)===125?(u=bt,In++):(u=s,Xn===0&&tr(wt)),u!==s?(qn=t,n=Tt(i),t=n):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)):(In=t,t=f),Vn[a]={nextPos:In,result:t},t)}function Nr(){var t,n,r,i=In*60+22,o=Vn[i];return o?(In=o.nextPos,o.result):(t=In,n=In,e.substr(In,4)===Nt?(r=Nt,In+=4):(r=s,Xn===0&&tr(Ct)),r!==s&&(qn=n,r=kt()),n=r,n===s&&(n=In,e.substr(In,5)===Lt?(r=Lt,In+=5):(r=s,Xn===0&&tr(At)),r!==s&&(qn=n,r=Ot()),n=r,n===s&&(n=In,e.substr(In,3)===Mt?(r=Mt,In+=3):(r=s,Xn===0&&tr(_t)),r!==s&&(qn=n,r=Dt()),n=r)),n!==s&&(qn=t,n=Pt(n)),t=n,Vn[i]={nextPos:In,result:t},t)}function Cr(){var e,t=In*60+23,n=Vn[t];return n?(In=n.nextPos,n.result):(e=Nr(),e===s&&(e=vr(),e===s&&(e=wr(),e===s&&(e=cr(),e===s&&(e=pr(),e===s&&(e=hr()))))),Vn[t]={nextPos:In,result:e},e)}function kr(){var e,t=In*60+24,n=Vn[t];return n?(In=n.nextPos,n.result):(e=Tr(),e===s&&(e=xr(),e===s&&(e=Vr())),Vn[t]={nextPos:In,result:e},e)}function Lr(){var e,t=In*60+25,n=Vn[t];return n?(In=n.nextPos,n.result):(e=kr(),e===s&&(e=Cr()),Vn[t]={nextPos:In,result:e},e)}function Ar(){var e,t,n=In*60+26,r=Vn[n];return r?(In=r.nextPos,r.result):(e=In,t=ur(),t!==s&&(qn=e,t=Ht(t)),e=t,Vn[n]={nextPos:In,result:e},e)}function Or(){var e,t,n,r,i,o=In*60+27,u=Vn[o];return u?(In=u.nextPos,u.result):(e=In,t=or(),t!==s?(n=ar(),n!==s?(r=or(),r!==s?(i=Zr(),i!==s?(qn=e,t=Bt(n,i),e=t):(In=e,e=f)):(In=e,e=f)):(In=e,e=f)):(In=e,e=f),Vn[o]={nextPos:In,result:e},e)}function Mr(){var t,n,r,i=In*60+28,o=Vn[i];if(o)return In=o.nextPos,o.result;t=In,n=[],jt.test(e.charAt(In))?(r=e.charAt(In),In++):(r=s,Xn===0&&tr(Ft));if(r!==s)while(r!==s)n.push(r),jt.test(e.charAt(In))?(r=e.charAt(In),In++):(r=s,Xn===0&&tr(Ft));else n=f;return n!==s&&(qn=t,n=It(n)),t=n,Vn[i]={nextPos:In,result:t},t}function _r(){var e,t,n,r,i,o,u,a=In*60+29,l=Vn[a];if(l)return In=l.nextPos,l.result;e=In,t=[],n=In,r=or(),r!==s?(i=ar(),i!==s?(o=or(),o!==s?(u=ur(),u!==s?(qn=n,r=Bt(i,u),n=r):(In=n,n=f)):(In=n,n=f)):(In=n,n=f)):(In=n,n=f);if(n!==s)while(n!==s)t.push(n),n=In,r=or(),r!==s?(i=ar(),i!==s?(o=or(),o!==s?(u=ur(),u!==s?(qn=n,r=Bt(i,u),n=r):(In=n,n=f)):(In=n,n=f)):(In=n,n=f)):(In=n,n=f);else t=f;return t!==s&&(qn=e,t=qt(t)),e=t,Vn[a]={nextPos:In,result:e},e}function Dr(){var e,t,n,r,i,o=In*60+30,u=Vn[o];return u?(In=u.nextPos,u.result):(e=In,t=or(),t!==s?(n=Mr(),n!==s?(r=or(),r!==s?(i=ur(),i!==s?(qn=e,t=Rt(n,i),e=t):(In=e,e=f)):(In=e,e=f)):(In=e,e=f)):(In=e,e=f),Vn[o]={nextPos:In,result:e},e)}function Pr(){var e,t,n,r=In*60+31,i=Vn[r];return i?(In=i.nextPos,i.result):(e=In,t=or(),t!==s?(n=ur(),n!==s?(qn=e,t=Ut(n),e=t):(In=e,e=f)):(In=e,e=f),Vn[r]={nextPos:In,result:e},e)}function Hr(){var e,t=In*60+32,n=Vn[t];return n?(In=n.nextPos,n.result):(e=Fr(),e===s&&(e=ri(),e===s&&(e=ti(),e===s&&(e=Zr()))),Vn[t]={nextPos:In,result:e},e)}function Br(){var t,n,r,i,o,u=In*60+33,a=Vn[u];return a?(In=a.nextPos,a.result):(t=In,n=or(),n!==s?(e.charCodeAt(In)===46?(r=st,In++):(r=s,Xn===0&&tr(ot)),r!==s?(i=or(),i!==s?(o=Hr(),o!==s?(qn=t,n=zt(o),t=n):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)):(In=t,t=f),Vn[u]={nextPos:In,result:t},t)}function jr(){var e,t,n,r,i=In*60+34,o=Vn[i];if(o)return In=o.nextPos,o.result;e=In,t=Hr();if(t!==s){n=[],r=Br();while(r!==s)n.push(r),r=Br();n!==s?(qn=e,t=Wt(t,n),e=t):(In=e,e=f)}else In=e,e=f;return Vn[i]={nextPos:In,result:e},e}function Fr(){var t,n,r,i,o,u,a=In*60+35,l=Vn[a];return l?(In=l.nextPos,l.result):(t=In,n=Ar(),n!==s?(r=or(),r!==s?(e.substr(In,2)===Xt?(i=Xt,In+=2):(i=s,Xn===0&&tr(Vt)),i!==s?(o=or(),o!==s?(u=Hr(),u!==s?(qn=t,n=$t(n,u),t=n):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)):(In=t,t=f),Vn[a]={nextPos:In,result:t},t)}function Ir(){var t,n,r,i,o,u,a=In*60+36,l=Vn[a];return l?(In=l.nextPos,l.result):(t=In,e.charCodeAt(In)===94?(n=Jt,In++):(n=s,Xn===0&&tr(Kt)),n!==s?(r=or(),r!==s?(i=Hr(),i!==s?(o=or(),o!==s?(e.charCodeAt(In)===46?(u=st,In++):(u=s,Xn===0&&tr(ot)),u===s&&(u=K),u!==s?(qn=t,n=Qt(i),t=n):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)):(In=t,t=f),Vn[a]={nextPos:In,result:t},t)}function qr(){var t,n,r,i,o,u,a=In*60+37,l=Vn[a];if(l)return In=l.nextPos,l.result;t=In,e.charCodeAt(In)===124?(n=Gt,In++):(n=s,Xn===0&&tr(Yt));if(n!==s){r=[],i=In,o=or(),o!==s?(u=ur(),u!==s?(qn=i,o=Zt(u),i=o):(In=i,i=f)):(In=i,i=f);while(i!==s)r.push(i),i=In,o=or(),o!==s?(u=ur(),u!==s?(qn=i,o=Zt(u),i=o):(In=i,i=f)):(In=i,i=f);r!==s?(i=or(),i!==s?(e.charCodeAt(In)===124?(o=Gt,In++):(o=s,Xn===0&&tr(Yt)),o!==s?(qn=t,n=en(r),t=n):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)}else In=t,t=f;return Vn[a]={nextPos:In,result:t},t}function Rr(){var t,n,r,i,o,u,a,l=In*60+38,c=Vn[l];if(c)return In=c.nextPos,c.result;t=In,n=[],r=In,i=or(),i!==s?(e.charCodeAt(In)===58?(o=E,In++):(o=s,Xn===0&&tr(S)),o!==s?(u=or(),u!==s?(a=ur(),a!==s?(qn=r,i=tn(a),r=i):(In=r,r=f)):(In=r,r=f)):(In=r,r=f)):(In=r,r=f);if(r!==s)while(r!==s)n.push(r),r=In,i=or(),i!==s?(e.charCodeAt(In)===58?(o=E,In++):(o=s,Xn===0&&tr(S)),o!==s?(u=or(),u!==s?(a=ur(),a!==s?(qn=r,i=tn(a),r=i):(In=r,r=f)):(In=r,r=f)):(In=r,r=f)):(In=r,r=f);else n=f;return n!==s?(r=or(),r!==s?(e.charCodeAt(In)===124?(i=Gt,In++):(i=s,Xn===0&&tr(Yt)),i!==s?(qn=t,n=nn(n),t=n):(In=t,t=f)):(In=t,t=f)):(In=t,t=f),Vn[l]={nextPos:In,result:t},t}function Ur(){var t,n,r,i,o,u,a=In*60+39,l=Vn[a];return l?(In=l.nextPos,l.result):(t=In,e.charCodeAt(In)===40?(n=ct,In++):(n=s,Xn===0&&tr(ht)),n!==s?(r=or(),r!==s?(i=Hr(),i!==s?(o=or(),o!==s?(e.charCodeAt(In)===41?(u=dt,In++):(u=s,Xn===0&&tr(vt)),u!==s?(qn=t,n=zt(i),t=n):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)):(In=t,t=f),Vn[a]={nextPos:In,result:t},t)}function zr(){var t,n,r,i,o,u,a,l,c=In*60+40,h=Vn[c];if(h)return In=h.nextPos,h.result;t=In,n=Ir();if(n!==s){r=[],e.charCodeAt(In)===46?(i=st,In++):(i=s,Xn===0&&tr(ot));while(i!==s)r.push(i),e.charCodeAt(In)===46?(i=st,In++):(i=s,Xn===0&&tr(ot));r!==s?(qn=t,n=rn(n),t=n):(In=t,t=f)}else In=t,t=f;if(t===s){t=In,n=jr();if(n!==s){r=or();if(r!==s){i=[],e.charCodeAt(In)===46?(o=st,In++):(o=s,Xn===0&&tr(ot));if(o!==s)while(o!==s)i.push(o),e.charCodeAt(In)===46?(o=st,In++):(o=s,Xn===0&&tr(ot));else i=f;if(i!==s){o=or();if(o!==s){u=Ir();if(u!==s){a=[],e.charCodeAt(In)===46?(l=st,In++):(l=s,Xn===0&&tr(ot));while(l!==s)a.push(l),e.charCodeAt(In)===46?(l=st,In++):(l=s,Xn===0&&tr(ot));a!==s?(qn=t,n=sn(n,u),t=n):(In=t,t=f)}else In=t,t=f}else In=t,t=f}else In=t,t=f}else In=t,t=f}else In=t,t=f;if(t===s){t=In,n=jr(),n===s&&(n=K);if(n!==s){r=[],e.charCodeAt(In)===46?(i=st,In++):(i=s,Xn===0&&tr(ot));while(i!==s)r.push(i),e.charCodeAt(In)===46?(i=st,In++):(i=s,Xn===0&&tr(ot));r!==s?(qn=t,n=on(n),t=n):(In=t,t=f)}else In=t,t=f}}return Vn[c]={nextPos:In,result:t},t}function Wr(){var e,t=In*60+41,n=Vn[t];return n?(In=n.nextPos,n.result):(e=ii(),e===s&&(e=Xr()),Vn[t]={nextPos:In,result:e},e)}function Xr(){var e,t,n,r,i,o=In*60+42,u=Vn[o];return u?(In=u.nextPos,u.result):(e=In,t=qr(),t===s&&(t=K),t!==s?(n=or(),n!==s?(r=zr(),r===s&&(r=K),r!==s?(i=or(),i!==s?(qn=e,t=un(t,r),e=t):(In=e,e=f)):(In=e,e=f)):(In=e,e=f)):(In=e,e=f),Vn[o]={nextPos:In,result:e},e)}function Vr(){var t,n,r,i,o,u,a,l=In*60+43,c=Vn[l];return c?(In=c.nextPos,c.result):(t=In,e.charCodeAt(In)===91?(n=an,In++):(n=s,Xn===0&&tr(fn)),n!==s?(r=Rr(),r===s&&(r=K),r!==s?(i=or(),i!==s?(o=Wr(),o===s&&(o=K),o!==s?(u=or(),u!==s?(e.charCodeAt(In)===93?(a=ln,In++):(a=s,Xn===0&&tr(cn)),a!==s?(qn=t,n=hn(r,o),t=n):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)):(In=t,t=f),Vn[l]={nextPos:In,result:t},t)}function $r(){var e,t=In*60+44,n=Vn[t];return n?(In=n.nextPos,n.result):(e=Lr(),e===s&&(e=Ar(),e===s&&(e=Ur())),Vn[t]={nextPos:In,result:e},e)}function Jr(){var t,n,r,i,o,u=In*60+45,a=Vn[u];return a?(In=a.nextPos,a.result):(t=In,n=or(),n!==s?(r=ur(),r!==s?(i=In,Xn++,e.charCodeAt(In)===58?(o=E,In++):(o=s,Xn===0&&tr(S)),Xn--,o===s?i=pn:(In=i,i=f),i!==s?(qn=t,n=dn(r),t=n):(In=t,t=f)):(In=t,t=f)):(In=t,t=f),Vn[u]={nextPos:In,result:t},t)}function Kr(){var e,t,n,r,i,o=In*60+46,u=Vn[o];return u?(In=u.nextPos,u.result):(e=In,t=Jr(),t!==s?(n=or(),n!==s?(r=Kr(),r===s&&(r=K),r!==s?(i=or(),i!==s?(qn=e,t=vn(t,r),e=t):(In=e,e=f)):(In=e,e=f)):(In=e,e=f)):(In=e,e=f),Vn[o]={nextPos:In,result:e},e)}function Qr(){var e,t,n,r,i=In*60+47,o=Vn[i];return o?(In=o.nextPos,o.result):(e=In,t=$r(),t!==s?(n=or(),n!==s?(r=Kr(),r===s&&(r=K),r!==s?(qn=e,t=mn(t,r),e=t):(In=e,e=f)):(In=e,e=f)):(In=e,e=f),Vn[i]={nextPos:In,result:e},e)}function Gr(){var e,t,n,r,i,o=In*60+48,u=Vn[o];return u?(In=u.nextPos,u.result):(e=In,t=or(),t!==s?(n=Mr(),n!==s?(r=or(),r!==s?(i=Qr(),i===s&&(i=$r()),i!==s?(qn=e,t=gn(n,i),e=t):(In=e,e=f)):(In=e,e=f)):(In=e,e=f)):(In=e,e=f),Vn[o]={nextPos:In,result:e},e)}function Yr(){var e,t,n,r=In*60+49,i=Vn[r];return i?(In=i.nextPos,i.result):(e=In,t=Gr(),t!==s?(n=Yr(),n===s&&(n=K),n!==s?(qn=e,t=yn(t,n),e=t):(In=e,e=f)):(In=e,e=f),Vn[r]={nextPos:In,result:e},e)}function Zr(){var e,t,n,r=In*60+50,i=Vn[r];return i?(In=i.nextPos,i.result):(e=In,t=Qr(),t!==s?(n=Yr(),n===s&&(n=K),n!==s?(qn=e,t=mn(t,n),e=t):(In=e,e=f)):(In=e,e=f),Vn[r]={nextPos:In,result:e},e)}function ei(){var e,t,n,r=In*60+51,i=Vn[r];if(i)return In=i.nextPos,i.result;e=In,t=[],n=Or();if(n!==s)while(n!==s)t.push(n),n=Or();else t=f;return t!==s&&(qn=e,t=bn(t)),e=t,Vn[r]={nextPos:In,result:e},e}function ti(){var e,t,n,r=In*60+52,i=Vn[r];return i?(In=i.nextPos,i.result):(e=In,t=Zr(),t!==s?(n=ei(),n!==s?(qn=e,t=wn(t,n),e=t):(In=e,e=f)):(In=e,e=f),Vn[r]={nextPos:In,result:e},e)}function ni(){var e,t=In*60+53,n=Vn[t];return n?(In=n.nextPos,n.result):(e=Gr(),e===s&&(e=Jr(),e===s&&(e=ei())),Vn[t]={nextPos:In,result:e},e)}function ri(){var t,n,r,i,o,u,a,l,c,h=In*60+54,p=Vn[h];if(p)return In=p.nextPos,p.result;t=In,n=or();if(n!==s){r=ti(),r===s&&(r=Zr());if(r!==s){i=[],o=In,u=or(),u!==s?(e.charCodeAt(In)===59?(a=En,In++):(a=s,Xn===0&&tr(Sn)),a!==s?(l=or(),l!==s?(c=ni(),c!==s?(qn=o,u=xn(c),o=u):(In=o,o=f)):(In=o,o=f)):(In=o,o=f)):(In=o,o=f);if(o!==s)while(o!==s)i.push(o),o=In,u=or(),u!==s?(e.charCodeAt(In)===59?(a=En,In++):(a=s,Xn===0&&tr(Sn)),a!==s?(l=or(),l!==s?(c=ni(),c!==s?(qn=o,u=xn(c),o=u):(In=o,o=f)):(In=o,o=f)):(In=o,o=f)):(In=o,o=f);else i=f;i!==s?(qn=t,n=Tn(r,i),t=n):(In=t,t=f)}else In=t,t=f}else In=t,t=f;return Vn[h]={nextPos:In,result:t},t}function ii(){var t,n,r,i,o,u=In*60+55,a=Vn[u];if(a)return In=a.nextPos,a.result;t=In,e.charCodeAt(In)===60?(n=Nn,In++):(n=s,Xn===0&&tr(Cn));if(n!==s){r=[],i=In,e.substr(In,2)===kn?(o=kn,In+=2):(o=s,Xn===0&&tr(Ln)),o!==s&&(qn=i,o=An()),i=o,i===s&&(On.test(e.charAt(In))?(i=e.charAt(In),In++):(i=s,Xn===0&&tr(Mn)));while(i!==s)r.push(i),i=In,e.substr(In,2)===kn?(o=kn,In+=2):(o=s,Xn===0&&tr(Ln)),o!==s&&(qn=i,o=An()),i=o,i===s&&(On.test(e.charAt(In))?(i=e.charAt(In),In++):(i=s,Xn===0&&tr(Mn)));r!==s?(e.charCodeAt(In)===62?(i=_n,In++):(i=s,Xn===0&&tr(Dn)),i!==s?(qn=t,n=Pn(r),t=n):(In=t,t=f)):(In=t,t=f)}else In=t,t=f;return Vn[u]={nextPos:In,result:t},t}function si(){var e,t,n,r,i,o=In*60+56,u=Vn[o];return u?(In=u.nextPos,u.result):(e=In,t=_r(),t===s&&(t=Dr(),t===s&&(t=Pr())),t!==s?(n=or(),n!==s?(r=Wr(),r===s&&(r=K),r!==s?(i=or(),i!==s?(qn=e,t=Hn(t,r),e=t):(In=e,e=f)):(In=e,e=f)):(In=e,e=f)):(In=e,e=f),Vn[o]={nextPos:In,result:e},e)}function oi(){var e,t,n,r=In*60+57,i=Vn[r];return i?(In=i.nextPos,i.result):(e=In,t=Zr(),t!==s?(qn=In,n=Bn(t),n?n=pn:n=f,n!==s?(qn=e,t=jn(t),e=t):(In=e,e=f)):(In=e,e=f),Vn[r]={nextPos:In,result:e},e)}function ui(){var t,n,r,i,o,u=In*60+58,a=Vn[u];return a?(In=a.nextPos,a.result):(t=In,n=or(),n!==s?(e.charCodeAt(In)===46?(r=st,In++):(r=s,Xn===0&&tr(ot)),r!==s?(i=or(),i!==s?(o=oi(),o!==s?(qn=t,n=zt(o),t=n):(In=t,t=f)):(In=t,t=f)):(In=t,t=f)):(In=t,t=f),Vn[u]={nextPos:In,result:t},t)}function ai(){var e,t,n,r,i=In*60+59,o=Vn[i];if(o)return In=o.nextPos,o.result;e=In,t=oi();if(t!==s){n=[],r=ui();while(r!==s)n.push(r),r=ui();n!==s?(qn=e,t=Fn(t,n),e=t):(In=e,e=f)}else In=e,e=f;return Vn[i]={nextPos:In,result:e},e}var i=arguments.length>1?arguments[1]:{},s={},o={start:rr},u=rr,a=[],f=s,l=/^[ \t\x0B\f\xA0\uFEFF\n\r\u2028\u2029]/,c={type:"class",value:"[ \\t\\x0B\\f\\xA0\\uFEFF\\n\\r\\u2028\\u2029]",description:"[ \\t\\x0B\\f\\xA0\\uFEFF\\n\\r\\u2028\\u2029]"},h='"',p={type:"literal",value:'"',description:'"\\""'},d=/^[^"]/,v={type:"class",value:'[^"]',description:'[^"]'},m=/^[a-zA-Z]/,g={type:"class",value:"[a-zA-Z]",description:"[a-zA-Z]"},y=/^[a-zA-Z0-9]/,b={type:"class",value:"[a-zA-Z0-9]",description:"[a-zA-Z0-9]"},w=function(e,t){return e+t.join("")},E=":",S={type:"literal",value:":",description:'":"'},x=function(e,t){return e+t},T=/^[a-zA-Z0-9:]/,N={type:"class",value:"[a-zA-Z0-9:]",description:"[a-zA-Z0-9:]"},C=/^[A-Z]/,k={type:"class",value:"[A-Z]",description:"[A-Z]"},L="'",A={type:"literal",value:"'",description:'"\'"'},O="''",M={type:"literal",value:"''",description:"\"''\""},_=function(){return"'"},D=/^[^']/,P={type:"class",value:"[^']",description:"[^']"},H=function(e){return t.ValueNode._new()._position_(Qn().__at(Gn()))._source_(Jn())._value_(e.join(""))},B="$",j={type:"literal",value:"$",description:'"$"'},F={type:"any",description:"any character"},I=function(e){return t.ValueNode._new()._position_(Qn().__at(Gn()))._source_(Jn())._value_(e)},q="#",R={type:"literal",value:"#",description:'"#"'},U=function(e){return e},z=function(e){return e._value()},W=function(e){return t.ValueNode._new()._position_(Qn().__at(Gn()))._source_(Jn())._value_(e)},X=function(e){return t.ValueNode._new()._position_(Qn().__at(Gn()))._source_(Jn())._value_(e)},V="e",$={type:"literal",value:"e",description:'"e"'},J=function(e){return parseFloat(e.join(""))},K=null,Q="-",G={type:"literal",value:"-",description:'"-"'},Y="16r",Z={type:"literal",value:"16r",description:'"16r"'},et=/^[0-9a-fA-F]/,tt={type:"class",value:"[0-9a-fA-F]",description:"[0-9a-fA-F]"},nt=function(e,t){return parseInt((e||"")+t.join(""),16)},rt=/^[0-9]/,it={type:"class",value:"[0-9]",description:"[0-9]"},st=".",ot={type:"literal",value:".",description:'"."'},ut=function(e,t,n){return parseFloat((e||"")+t.join("")+"."+n.join(""),10)},at=function(e,t){return parseInt((e||"")+t.join(""),10)},ft="#(",lt={type:"literal",value:"#(",description:'"#("'},ct="(",ht={type:"literal",value:"(",description:'"("'},pt=function(e){return e._value()},dt=")",vt={type:"literal",value:")",description:'")"'},mt=function(e){return t.ValueNode._new()._position_(Qn().__at(Gn()))._source_(Jn())._value_(e)},gt="{",yt={type:"literal",value:"{",description:'"{"'},bt="}",wt={type:"literal",value:"}",description:'"}"'},Et=function(e){return t.DynamicArrayNode._new()._position_(Qn().__at(Gn()))._source_(Jn())._nodes_(e||[])},St="#{",xt={type:"literal",value:"#{",description:'"#{"'},Tt=function(e){return t.DynamicDictionaryNode._new()._position_(Qn().__at(Gn()))._source_(Jn())._nodes_(e||[])},Nt="true",Ct={type:"literal",value:"true",description:'"true"'},kt=function(){return!0},Lt="false",At={type:"literal",value:"false",description:'"false"'},Ot=function(){return!1},Mt="nil",_t={type:"literal",value:"nil",description:'"nil"'},Dt=function(){return n},Pt=function(e){return t.ValueNode._new()._position_(Qn().__at(Gn()))._source_(Jn())._value_(e)},Ht=function(e){return t.VariableNode._new()._position_(Qn().__at(Gn()))._source_(Jn())._value_(e)},Bt=function(e,t){return{key:e,arg:t}},jt=/^[\\+*\/=><,@%~|&\-]/,Ft={type:"class",value:"[\\\\+*\\/=><,@%~|&\\-]",description:"[\\\\+*\\/=><,@%~|&\\-]"},It=function(e){return e.join("")},qt=function(e){var t=[],n=[],r=0;for(r=0;r>",Ln={type:"literal",value:">>",description:'">>"'},An=function(){return">"},On=/^[^>]/,Mn={type:"class",value:"[^>]",description:"[^>]"},_n=">",Dn={type:"literal",value:">",description:'">"'},Pn=function(e){return t.JSStatementNode._new()._position_(Qn().__at(Gn()))._source_(e.join(""))},Hn=function(e,n){return t.MethodNode._new()._position_(Qn().__at(Gn()))._source_(Jn())._selector_(e[0])._arguments_(e[1])._nodes_([n])},Bn=function(e){return e._selector()==="->"},jn=function(e){return[e._receiver(),e._arguments()[0]]},Fn=function(e,t){return e.concat.apply(e,t)},In=0,qn=0,Rn=0,Un={line:1,column:1,seenCR:!1},zn=0,Wn=[],Xn=0,Vn={},$n;if("startRule"in i){if(!(i.startRule in o))throw new Error("Can't start parsing from rule \""+i.startRule+'".');u=o[i.startRule]}$n=u();if($n!==s&&In===e.length)return $n;throw $n!==s&&In>excludeStart("ide", pragmas.excludeIdeData);'),$recv(t)._lf(),$recv(t)._nextPutAll_(n._jsClassNameFor_(e)),$recv(t)._nextPutAll_(".comment="),$recv(t)._nextPutAll_($recv($recv($recv(e)._comment())._crlfSanitized())._asJavascript()),$recv(t)._nextPutAll_(";"),$recv(t)._lf(),h=$recv(t)._nextPutAll_('//>>excludeEnd("ide");'),h),$recv(t)._lf(),n},messageSends:["lf","nextPutAll:",",","classNameFor:","jsClassNameFor:","superclass","do:separatedBy:","instanceVariableNames","category","ifTrue:","notEmpty","comment","asJavascript","crlfSanitized"]}),$globals.Exporter),$core.addMethod($core.method({selector:"exportMetaDefinitionOf:on:",protocol:"output",fn:function(e,t){function r(){return $globals.String||(typeof String=="undefined"?nil:String)}var n=this,i,s,o,u,a,f,l,c;return $recv(t)._lf(),i=$recv(e)._class(),s=$recv(i)._instanceVariableNames(),o=$recv(s)._isEmpty(),$core.assert(o)||(u=$recv(e)._class(),a=n._jsClassNameFor_(u),$recv(t)._nextPutAll_(a),f=$recv(t)._nextPutAll_(".iVarNames = ["),f,$recv($recv($recv(e)._class())._instanceVariableNames())._do_separatedBy_(function(e){return l="'".__comma(e),c=$recv(l).__comma("'"),$recv(t)._nextPutAll_(c)},function(){return $recv(t)._nextPutAll_(",")}),$recv(t)._nextPutAll_("];".__comma($recv(r())._lf()))),n},messageSends:["lf","ifFalse:","isEmpty","instanceVariableNames","class","nextPutAll:","jsClassNameFor:","do:separatedBy:",","]}),$globals.Exporter),$core.addMethod($core.method({selector:"exportMethod:on:",protocol:"output",fn:function(e,t){var n=this,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b;return $recv(t)._nextPutAll_("$core.addMethod("),$recv(t)._lf(),$recv(t)._nextPutAll_("$core.method({"),$recv(t)._lf(),r=$recv($recv(e)._selector())._asJavascript(),i="selector: ".__comma(r),s=$recv(i).__comma(","),$recv(t)._nextPutAll_(s),$recv(t)._lf(),o="protocol: '".__comma($recv(e)._protocol()),u=$recv(o).__comma("',"),$recv(t)._nextPutAll_(u),$recv(t)._lf(),a="fn: ".__comma($recv($recv(e)._fn())._compiledSource()),f=$recv(a).__comma(","),$recv(t)._nextPutAll_(f),$recv(t)._lf(),$recv(t)._nextPutAll_('//>>excludeStart("ide", pragmas.excludeIdeData);'),$recv(t)._lf(),l=$recv($recv(e)._arguments())._asJavascript(),c="args: ".__comma(l),h=$recv(c).__comma(","),$recv(t)._nextPutAll_(h),$recv(t)._lf(),p=$recv($recv(e)._source())._asJavascript(),d="source: ".__comma(p),v=$recv(d).__comma(","),$recv(t)._nextPutAll_(v),$recv(t)._lf(),m=$recv($recv(e)._referencedClasses())._asJavascript(),g="referencedClasses: ".__comma(m),y=$recv(g).__comma(","),$recv(t)._nextPutAll_(y),$recv(t)._lf(),$recv(t)._nextPutAll_('//>>excludeEnd("ide");'),$recv(t)._lf(),$recv(t)._nextPutAll_("messageSends: ".__comma($recv($recv(e)._messageSends())._asJavascript())),$recv(t)._lf(),$recv(t)._nextPutAll_("}),"),$recv(t)._lf(),$recv(t)._nextPutAll_(n._jsClassNameFor_($recv(e)._methodClass())),$recv(t)._nextPutAll_(");"),$recv(t)._lf(),b=$recv(t)._lf(),n},messageSends:["nextPutAll:","lf",",","asJavascript","selector","protocol","compiledSource","fn","arguments","source","referencedClasses","messageSends","jsClassNameFor:","methodClass"]}),$globals.Exporter),$core.addMethod($core.method({selector:"exportPackage:on:",protocol:"output",fn:function(e,t){var n=this,r,i;return n._exportPackagePrologueOf_on_(e,t),n._exportPackageDefinitionOf_on_(e,t),n._exportPackageContextOf_on_(e,t),n._exportPackageImportsOf_on_(e,t),r=n._exportPackageTransportOf_on_(e,t),$recv($recv(e)._sortedClasses())._do_(function(e){return n._exportDefinitionOf_on_(e,t),i=$recv(e)._ownMethods(),$recv(i)._do_(function(e){return n._exportMethod_on_(e,t)}),n._exportMetaDefinitionOf_on_(e,t),$recv($recv($recv(e)._class())._ownMethods())._do_(function(e){return n._exportMethod_on_(e,t)})}),$recv(n._extensionMethodsOfPackage_(e))._do_(function(e){return n._exportMethod_on_(e,t)}),n._exportPackageEpilogueOf_on_(e,t),n},messageSends:["exportPackagePrologueOf:on:","exportPackageDefinitionOf:on:","exportPackageContextOf:on:","exportPackageImportsOf:on:","exportPackageTransportOf:on:","do:","sortedClasses","exportDefinitionOf:on:","ownMethods","exportMethod:on:","exportMetaDefinitionOf:on:","class","extensionMethodsOfPackage:","exportPackageEpilogueOf:on:"]}),$globals.Exporter),$core.addMethod($core.method({selector:"exportPackageContextOf:on:",protocol:"output",fn:function(e,t){var n=this,r;return $recv(t)._nextPutAll_("$core.packages["),$recv(t)._nextPutAll_($recv($recv(e)._name())._asJavascript()),$recv(t)._nextPutAll_("].innerEval = "),$recv(t)._nextPutAll_("function (expr) { return eval(expr); }"),$recv(t)._nextPutAll_(";"),r=$recv(t)._lf(),n},messageSends:["nextPutAll:","asJavascript","name","lf"]}),$globals.Exporter),$core.addMethod($core.method({selector:"exportPackageDefinitionOf:on:",protocol:"output",fn:function(e,t){var n=this,r,i;return $recv(t)._nextPutAll_("$core.addPackage("),r=$recv("'".__comma($recv(e)._name())).__comma("');"),$recv(t)._nextPutAll_(r),i=$recv(t)._lf(),n},messageSends:["nextPutAll:",",","name","lf"]}),$globals.Exporter),$core.addMethod($core.method({selector:"exportPackageEpilogueOf:on:",protocol:"output",fn:function(e,t){var n=this;return n._subclassResponsibility(),n},messageSends:["subclassResponsibility"]}),$globals.Exporter),$core.addMethod($core.method({selector:"exportPackageImportsOf:on:",protocol:"output",fn:function(e,t){var n=this,r,i;return $recv($recv(e)._importsAsJson())._ifNotEmpty_(function(n){return $recv(t)._nextPutAll_("$core.packages["),r=$recv($recv(e)._name())._asJavascript(),$recv(t)._nextPutAll_(r),$recv(t)._nextPutAll_("].imports = "),$recv(t)._nextPutAll_($recv(n)._asJavascript()),$recv(t)._nextPutAll_(";"),i=$recv(t)._lf(),i}),n},messageSends:["ifNotEmpty:","importsAsJson","nextPutAll:","asJavascript","name","lf"]}),$globals.Exporter),$core.addMethod($core.method({selector:"exportPackagePrologueOf:on:",protocol:"output",fn:function(e,t){var n=this;return n._subclassResponsibility(),n},messageSends:["subclassResponsibility"]}),$globals.Exporter),$core.addMethod($core.method({selector:"exportPackageTransportOf:on:",protocol:"output",fn:function(e,t){var n=this,r;return $recv(t)._nextPutAll_("$core.packages["),$recv(t)._nextPutAll_($recv($recv(e)._name())._asJavascript()),$recv(t)._nextPutAll_("].transport = "),$recv(t)._nextPutAll_($recv($recv(e)._transport())._asJSONString()),$recv(t)._nextPutAll_(";"),r=$recv(t)._lf(),n},messageSends:["nextPutAll:","asJavascript","name","asJSONString","transport","lf"]}),$globals.Exporter),$core.addMethod($core.method({selector:"jsClassNameFor:",protocol:"convenience",fn:function(e){var t=this,n,r,i;return n=$recv(e)._isMetaclass(),$core.assert(n)?r=$recv(t._jsClassNameFor_($recv(e)._instanceClass())).__comma(".klass"):(i=e)==null||i.isNil?r="null":r="$globals.".__comma($recv(e)._name()),r},messageSends:["ifTrue:ifFalse:","isMetaclass",",","jsClassNameFor:","instanceClass","ifNil:ifNotNil:","name"]}),$globals.Exporter),$core.addMethod($core.method({selector:"ownMethodsOfClass:",protocol:"accessing",fn:function(e){var t=this,n,r;return r=$recv($recv($recv($recv(e)._methodDictionary())._values())._sorted_(function(e,t){return n=$recv(e)._selector(),$recv(n).__lt_eq($recv(t)._selector())}))._reject_(function(e){return $recv($recv(e)._protocol())._match_("^\\*")}),r},messageSends:["reject:","sorted:","values","methodDictionary","<=","selector","match:","protocol"]}),$globals.Exporter),$core.addMethod($core.method({selector:"ownMethodsOfMetaClass:",protocol:"accessing",fn:function(e){var t=this,n;return n=t._ownMethodsOfClass_($recv(e)._class()),n},messageSends:["ownMethodsOfClass:","class"]}),$globals.Exporter),$core.addClass("AmdExporter",$globals.Exporter,["namespace"],"Platform-ImportExport"),$core.addMethod($core.method({selector:"amdNamesOfPackages:",protocol:"private",fn:function(e){var t=this,n,r;return r=$recv($recv(e)._select_(function(e){return n=t._amdNamespaceOfPackage_(e),$recv(n)._notNil()}))._collect_(function(e){return $recv($recv(t._amdNamespaceOfPackage_(e)).__comma("/")).__comma($recv(e)._name())}),r},messageSends:["collect:","select:","notNil","amdNamespaceOfPackage:",",","name"]}),$globals.AmdExporter),$core.addMethod($core.method({selector:"amdNamespaceOfPackage:",protocol:"private",fn:function(e){var t=this,n,r,i,s;return n=$recv(e)._transport(),r=$recv(n)._type(),i=$recv(r).__eq("amd"),$core.assert(i)?s=$recv($recv(e)._transport())._namespace():s=nil,s},messageSends:["ifTrue:ifFalse:","=","type","transport","namespace"]}),$globals.AmdExporter),$core.addMethod($core.method({selector:"exportPackageEpilogueOf:on:",protocol:"output",fn:function(e,t){var n=this,r;return $recv(t)._nextPutAll_("});"),r=$recv(t)._lf(),n},messageSends:["nextPutAll:","lf"]}),$globals.AmdExporter),$core.addMethod($core.method({selector:"exportPackagePrologueOf:on:",protocol:"output",fn:function(e,t){function u(){return $globals.String||(typeof String=="undefined"?nil:String)}var n=this,r,i,s,o,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N;return s="",o="",r=n._importsForOutput_(e),i=n._amdNamesOfPackages_($recv(e)._loadDependencies()),a=$recv(r)._value(),$recv(a)._ifNotEmpty_(function(){return f=$recv(u())._lf(),l=$recv(f).__comma('//>>excludeStart("imports", pragmas.excludeImports);'),c=$recv(u())._lf(),s=$recv(l).__comma(c),s,h=$recv(u())._lf(),p=$recv(h).__comma('//>>excludeEnd("imports");'),d=$recv(u())._lf(),o=$recv(p).__comma(d),o}),$recv(t)._nextPutAll_('define("'),$recv(t)._nextPutAll_(n._amdNamespaceOfPackage_(e)),$recv(t)._nextPutAll_("/"),$recv(t)._nextPutAll_($recv(e)._name()),$recv(t)._nextPutAll_('", '),v=["amber/boot",":1:"].__comma($recv(r)._value()),m=$recv(v).__comma([":2:"]),g=$recv(m).__comma(i),y=$recv(g)._asJavascript(),b=$recv(y)._replace_with_(",\\s*[\"']:1:[\"']",s),w=$recv(b)._replace_with_(",\\s*[\"']:2:[\"']",o),$recv(t)._nextPutAll_(w),$recv(t)._nextPutAll_(", function("),E=$recv(["$boot",":1:"].__comma($recv(r)._key())).__comma([":2:"]),S=$recv(E)._join_(","),x=$recv(S)._replace_with_(",\\s*:1:",s),T=$recv(x)._replace_with_(",\\s*:2:",o),$recv(t)._nextPutAll_(T),$recv(t)._nextPutAll_('){"use strict";'),$recv(t)._lf(),$recv(t)._nextPutAll_("var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;"),N=$recv(t)._lf(),n},messageSends:["importsForOutput:","amdNamesOfPackages:","loadDependencies","ifNotEmpty:","value",",","lf","nextPutAll:","amdNamespaceOfPackage:","name","replace:with:","asJavascript","join:","key"]}),$globals.AmdExporter),$core.addMethod($core.method({selector:"importsForOutput:",protocol:"private",fn:function(e){var t=this,n,r,i,s,o;return n=[],r=[],i=[],$recv($recv(e)._imports())._do_(function(e){return s=$recv(e)._isString(),$core.assert(s)?$recv(r)._add_(e):($recv(n)._add_($recv(e)._value()),$recv(i)._add_($recv(e)._key()))}),o=$recv(i).__minus_gt($recv(n).__comma(r)),o},messageSends:["do:","imports","ifTrue:ifFalse:","isString","add:","value","key","->",","]}),$globals.AmdExporter),$core.addClass("ChunkParser",$globals.Object,["stream","last"],"Platform-ImportExport"),$core.addMethod($core.method({selector:"last",protocol:"accessing",fn:function(){var e=this,t;return t=e["@last"],t},messageSends:[]}),$globals.ChunkParser),$core.addMethod($core.method({selector:"nextChunk",protocol:"reading",fn:function(){var e=this,t,n,r,i,s,o,u,a={};try{return n=""._writeStream(),$recv(function(){return t=$recv(e["@stream"])._next(),t,$recv(t)._notNil()})._whileTrue_(function(){i=$recv(t).__eq("!");if($core.assert(i)){s=$recv($recv(e["@stream"])._peek()).__eq("!");if(!$core.assert(s))throw e["@last"]=$recv($recv(n)._contents())._trimBoth(),o=e["@last"],a=[o];$recv(e["@stream"])._next()}return $recv(n)._nextPut_(t)}),e["@last"]=nil,u=e["@last"],u}catch(f){if(f===a)return f[0];throw f}},messageSends:["writeStream","whileTrue:","next","notNil","ifTrue:","=","ifTrue:ifFalse:","peek","trimBoth","contents","nextPut:"]}),$globals.ChunkParser),$core.addMethod($core.method({selector:"stream:",protocol:"accessing",fn:function(e){var t=this;return t["@stream"]=e,t},messageSends:[]}),$globals.ChunkParser),$core.addMethod($core.method({selector:"on:",protocol:"instance creation",fn:function(e){var t=this,n;return n=$recv(t._new())._stream_(e),n},messageSends:["stream:","new"]}),$globals.ChunkParser.klass),$core.addClass("ClassCommentReader",$globals.Object,["class"],"Platform-ImportExport"),$core.addMethod($core.method({selector:"class:",protocol:"accessing",fn:function(e){var t=this;return t["@class"]=e,t},messageSends:[]}),$globals.ClassCommentReader),$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){var e=this;return $globals.ClassCommentReader.superclass.fn.prototype._initialize.apply($recv(e),[]),e},messageSends:["initialize"]}),$globals.ClassCommentReader),$core.addMethod($core.method({selector:"scanFrom:",protocol:"fileIn",fn:function(e){var t=this,n,r;return n=$recv(e)._nextChunk(),r=$recv(n)._isEmpty(),$core.assert(r)||t._setComment_(n),t},messageSends:["nextChunk","ifFalse:","isEmpty","setComment:"]}),$globals.ClassCommentReader),$core.addMethod($core.method({selector:"setComment:",protocol:"private",fn:function(e){var t=this;return $recv(t["@class"])._comment_(e),t},messageSends:["comment:"]}),$globals.ClassCommentReader),$core.addClass("ClassProtocolReader",$globals.Object,["class","category"],"Platform-ImportExport"),$core.addMethod($core.method({selector:"class:category:",protocol:"accessing",fn:function(e,t){var n=this;return n["@class"]=e,n["@category"]=t,n},messageSends:[]}),$globals.ClassProtocolReader),$core.addMethod($core.method({selector:"compileMethod:",protocol:"private",fn:function(e){function n(){return $globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}var t=this;return $recv($recv(n())._new())._install_forClass_protocol_(e,t["@class"],t["@category"]),t},messageSends:["install:forClass:protocol:","new"]}),$globals.ClassProtocolReader),$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){var e=this;return $globals.ClassProtocolReader.superclass.fn.prototype._initialize.apply($recv(e),[]),e},messageSends:["initialize"]}),$globals.ClassProtocolReader),$core.addMethod($core.method({selector:"scanFrom:",protocol:"fileIn",fn:function(e){function r(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}var t=this,n;return $recv(function(){return n=$recv(e)._nextChunk(),n,$recv(n)._isEmpty()})._whileFalse_(function(){return t._compileMethod_(n)}),$recv($recv(r())._new())._setupClass_(t["@class"]),t},messageSends:["whileFalse:","nextChunk","isEmpty","compileMethod:","setupClass:","new"]}),$globals.ClassProtocolReader),$core.addClass("ExportMethodProtocol",$globals.Object,["name","theClass"],"Platform-ImportExport"),$core.addMethod($core.method({selector:"methods",protocol:"accessing",fn:function(){var e=this,t,n;return n=$recv($recv(e._theClass())._methodsInProtocol_(e._name()))._sorted_(function(e,n){return t=$recv(e)._selector(),$recv(t).__lt_eq($recv(n)._selector())}),n},messageSends:["sorted:","methodsInProtocol:","theClass","name","<=","selector"]}),$globals.ExportMethodProtocol),$core.addMethod($core.method({selector:"name",protocol:"accessing",fn:function(){var e=this,t;return t=e["@name"],t},messageSends:[]}),$globals.ExportMethodProtocol),$core.addMethod($core.method({selector:"name:",protocol:"accessing",fn:function(e){var t=this;return t["@name"]=e,t},messageSends:[]}),$globals.ExportMethodProtocol),$core.addMethod($core.method({selector:"theClass",protocol:"accessing",fn:function(){var e=this,t;return t=e["@theClass"],t},messageSends:[]}),$globals.ExportMethodProtocol),$core.addMethod($core.method({selector:"theClass:",protocol:"accessing",fn:function(e){var t=this;return t["@theClass"]=e,t},messageSends:[]}),$globals.ExportMethodProtocol),$core.addMethod($core.method({selector:"name:theClass:",protocol:"instance creation",fn:function(e,t){var n=this,r,i,s;return r=n._new(),$recv(r)._name_(e),$recv(r)._theClass_(t),i=$recv(r)._yourself(),s=i,s},messageSends:["name:","new","theClass:","yourself"]}),$globals.ExportMethodProtocol.klass),$core.addClass("Importer",$globals.Object,["lastSection","lastChunk"],"Platform-ImportExport"),$core.addMethod($core.method({selector:"import:",protocol:"fileIn",fn:function(e){function o(){return $globals.ChunkParser||(typeof ChunkParser=="undefined"?nil:ChunkParser)}function u(){return $globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}function a(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}var t=this,n,r,i,s,f,l;return i=$recv(o())._on_(e),s=!1,t["@lastSection"]="n/a, not started",t["@lastChunk"]=nil,$recv(function(){return $recv(function(){return n=$recv(i)._nextChunk(),n,$recv(n)._isNil()})._whileFalse_(function(){f=$recv(n)._isEmpty();if($core.assert(f))return s=!0,s;t["@lastSection"]=n,t["@lastSection"],r=$recv($recv(u())._new())._evaluateExpression_(n),r,l=s;if($core.assert(l))return s=!1,s,$recv(r)._scanFrom_(i)}),t["@lastSection"]="n/a, finished",t["@lastSection"]})._on_do_(a(),function(e){return t["@lastChunk"]=$recv(i)._last(),t["@lastChunk"],$recv(e)._resignal()}),t},messageSends:["on:","on:do:","whileFalse:","nextChunk","isNil","ifTrue:ifFalse:","isEmpty","evaluateExpression:","new","ifTrue:","scanFrom:","last","resignal"]}),$globals.Importer),$core.addMethod($core.method({selector:"lastChunk",protocol:"accessing",fn:function(){var e=this,t;return t=e["@lastChunk"],t},messageSends:[]}),$globals.Importer),$core.addMethod($core.method({selector:"lastSection",protocol:"accessing",fn:function(){var e=this,t;return t=e["@lastSection"],t},messageSends:[]}),$globals.Importer),$core.addClass("PackageCommitError",$globals.Error,[],"Platform-ImportExport"),$core.addClass("PackageHandler",$globals.InterfacingObject,[],"Platform-ImportExport"),$core.addMethod($core.method({selector:"ajaxPutAt:data:onSuccess:onError:",protocol:"private",fn:function(e,t,n,r){function o(){return $globals.Platform||(typeof Platform=="undefined"?nil:Platform)}var i=this,s,u,a,f,l;return s=$recv(o())._newXhr(),$recv(s)._open_url_async_("PUT",e,!0),$recv(s)._onreadystatechange_(function(){u=$recv($recv(s)._readyState()).__eq(4);if($core.assert(u))return a=$recv(s)._status(),f=$recv(a).__gt_eq(200),l=$recv(f)._and_(function(){return $recv($recv(s)._status()).__lt(300)}),$recv(l)._ifTrue_ifFalse_(n,r)}),$recv(s)._send_(t),i},messageSends:["newXhr","open:url:async:","onreadystatechange:","ifTrue:","=","readyState","ifTrue:ifFalse:","and:",">=","status","<","send:"]}),$globals.PackageHandler),$core.addMethod($core.method({selector:"chunkContentsFor:",protocol:"accessing",fn:function(e){function n(){return $globals.String||(typeof String=="undefined"?nil:String)}var t=this,r;return r=$recv(n())._streamContents_(function(n){return $recv(t._chunkExporter())._exportPackage_on_(e,n)}),r},messageSends:["streamContents:","exportPackage:on:","chunkExporter"]}),$globals.PackageHandler),$core.addMethod($core.method({selector:"chunkExporter",protocol:"factory",fn:function(){var e=this,t;return t=$recv(e._chunkExporterClass())._new(),t},messageSends:["new","chunkExporterClass"]}),$globals.PackageHandler),$core.addMethod($core.method({selector:"chunkExporterClass",protocol:"accessing",fn:function(){function t(){return $globals.ChunkExporter||(typeof ChunkExporter=="undefined"?nil:ChunkExporter)}var e=this;return t()},messageSends:[]}),$globals.PackageHandler),$core.addMethod($core.method({selector:"commit:",protocol:"committing",fn:function(e){function n(){return $globals.PackageCommitError||(typeof PackageCommitError=="undefined"?nil:PackageCommitError)}var t=this,r,i,s,o;return t._commit_onSuccess_onError_(e,function(){},function(e){return r=$recv(n())._new(),i=r,s=$recv('Commiting failed with reason: "'.__comma($recv(e)._responseText())).__comma('"'),$recv(i)._messageText_(s),o=$recv(r)._signal(),o}),t},messageSends:["commit:onSuccess:onError:","messageText:","new",",","responseText","signal"]}),$globals.PackageHandler),$core.addMethod($core.method({selector:"commit:onSuccess:onError:",protocol:"committing",fn:function(e,t,n){var r=this;return r._commitJsFileFor_onSuccess_onError_(e,function(){return r._commitStFileFor_onSuccess_onError_(e,function(){return $recv(e)._beClean(),$recv(t)._value()},n)},n),r},messageSends:["commitJsFileFor:onSuccess:onError:","commitStFileFor:onSuccess:onError:","beClean","value"]}),$globals.PackageHandler),$core.addMethod($core.method({selector:"commitJsFileFor:onSuccess:onError:",protocol:"committing",fn:function(e,t,n){var r=this,i,s;return i=$recv($recv(r._commitPathJsFor_(e)).__comma("/")).__comma($recv(e)._name()),s=$recv(i).__comma(".js"),r._ajaxPutAt_data_onSuccess_onError_(s,r._contentsFor_(e),t,n),r},messageSends:["ajaxPutAt:data:onSuccess:onError:",",","commitPathJsFor:","name","contentsFor:"]}),$globals.PackageHandler),$core.addMethod($core.method({selector:"commitPathJsFor:",protocol:"accessing",fn:function(e){var t=this;return t._subclassResponsibility(),t},messageSends:["subclassResponsibility"]}),$globals.PackageHandler),$core.addMethod($core.method({selector:"commitPathStFor:",protocol:"accessing",fn:function(e){var t=this;return t._subclassResponsibility(),t},messageSends:["subclassResponsibility"]}),$globals.PackageHandler),$core.addMethod($core.method({selector:"commitStFileFor:onSuccess:onError:",protocol:"committing",fn:function(e,t,n){var r=this,i,s;return i=$recv($recv(r._commitPathStFor_(e)).__comma("/")).__comma($recv(e)._name()),s=$recv(i).__comma(".st"),r._ajaxPutAt_data_onSuccess_onError_(s,r._chunkContentsFor_(e),t,n),r},messageSends:["ajaxPutAt:data:onSuccess:onError:",",","commitPathStFor:","name","chunkContentsFor:"]}),$globals.PackageHandler),$core.addMethod($core.method({selector:"contentsFor:",protocol:"accessing",fn:function(e){function n(){return $globals.String||(typeof String=="undefined"?nil:String)}var t=this,r;return r=$recv(n())._streamContents_(function(n){return $recv(t._exporter())._exportPackage_on_(e,n)}),r},messageSends:["streamContents:","exportPackage:on:","exporter"]}),$globals.PackageHandler),$core.addMethod($core.method({selector:"exporter",protocol:"factory",fn:function(){var e=this,t;return t=$recv(e._exporterClass())._new(),t},messageSends:["new","exporterClass"]}),$globals.PackageHandler),$core.addMethod($core.method({selector:"exporterClass",protocol:"accessing",fn:function(){var e=this;return e._subclassResponsibility(),e},messageSends:["subclassResponsibility"]}),$globals.PackageHandler),$core.addMethod($core.method({selector:"load:",protocol:"loading",fn:function(e){var t=this;return t._subclassResponsibility(),t},messageSends:["subclassResponsibility"]}),$globals.PackageHandler),$core.addMethod($core.method({selector:"onCommitError:",protocol:"error handling",fn:function(e){function n(){return $globals.PackageCommitError||(typeof PackageCommitError=="undefined"?nil:PackageCommitError)}var t=this,r,i,s,o;return r=$recv(n())._new(),i=r,s=$recv('Commiting failed with reason: "'.__comma($recv(e)._responseText())).__comma('"'),$recv(i)._messageText_(s),o=$recv(r)._signal(),t},messageSends:["messageText:","new",",","responseText","signal"]}),$globals.PackageHandler),$core.addClass("AmdPackageHandler",$globals.PackageHandler,[],"Platform-ImportExport"),$core.addMethod($core.method({selector:"commitPathJsFor:",protocol:"accessing",fn:function(e){var t=this,n;return n=t._toUrl_(t._namespaceFor_(e)),n},messageSends:["toUrl:","namespaceFor:"]}),$globals.AmdPackageHandler),$core.addMethod($core.method({selector:"commitPathStFor:",protocol:"accessing",fn:function(e){var t=this,n,r,i,s,o;return i=$recv(t._namespaceFor_(e)).__comma("/_source"),n=t._toUrl_(i),r=t._commitPathJsFor_(e),s=$recv(n).__eq($recv(r).__comma("/_source")),$core.assert(s)?o=r:o=n,o},messageSends:["toUrl:",",","namespaceFor:","commitPathJsFor:","ifTrue:ifFalse:","="]}),$globals.AmdPackageHandler),$core.addMethod($core.method({selector:"exporterClass",protocol:"accessing",fn:function(){function t(){return $globals.AmdExporter||(typeof AmdExporter=="undefined"?nil:AmdExporter)}var e=this;return t()},messageSends:[]}),$globals.AmdPackageHandler),$core.addMethod($core.method({selector:"load:",protocol:"loading",fn:function(e){function n(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}function r(){return $globals.Array||(typeof Array=="undefined"?nil:Array)}var t=this,i,s,o,u;i=$recv(n())._amdRequire();if((u=i)==null||u.isNil)t._error_("AMD loader not present");else{var a;a=u,s=$recv($recv(t._namespaceFor_(e)).__comma("/")).__comma($recv(e)._name()),o=$recv(r())._with_(s),$recv(a)._value_(o)}return t},messageSends:["ifNil:ifNotNil:","amdRequire","error:","value:","with:",",","namespaceFor:","name"]}),$globals.AmdPackageHandler),$core.addMethod($core.method({selector:"namespaceFor:",protocol:"committing",fn:function(e){var t=this,n;return n=$recv($recv(e)._transport())._namespace(),n},messageSends:["namespace","transport"]}),$globals.AmdPackageHandler),$core.addMethod($core.method({selector:"toUrl:",protocol:"private",fn:function(e){function n(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var t=this,r,i,s;r=$recv(n())._amdRequire();if((s=r)==null||s.isNil)i=t._error_("AMD loader not present");else{var o;o=s,i=$recv($recv(o)._basicAt_("toUrl"))._value_(e)}return i},messageSends:["ifNil:ifNotNil:","amdRequire","error:","value:","basicAt:"]}),$globals.AmdPackageHandler),$core.addMethod($core.method({selector:"defaultNamespace",protocol:"commit paths",fn:function(){function t(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var e=this,n;return n=$recv(t())._defaultAmdNamespace(),n},messageSends:["defaultAmdNamespace"]}),$globals.AmdPackageHandler.klass),$core.addMethod($core.method({selector:"defaultNamespace:",protocol:"commit paths",fn:function(e){function n(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var t=this;return $recv(n())._defaultAmdNamespace_(e),t},messageSends:["defaultAmdNamespace:"]}),$globals.AmdPackageHandler.klass),$core.addClass("PackageTransport",$globals.Object,["package"],"Platform-ImportExport"),$core.addMethod($core.method({selector:"asJSON",protocol:"converting",fn:function(){var e=this,t;return t=$globals.HashedCollection._newFromPairs_(["type",e._type()]),t},messageSends:["type"]}),$globals.PackageTransport),$core.addMethod($core.method({selector:"commit",protocol:"committing",fn:function(){var e=this;return $recv(e._commitHandler())._commit_(e._package()),e},messageSends:["commit:","commitHandler","package"]}),$globals.PackageTransport),$core.addMethod($core.method({selector:"commitHandler",protocol:"factory",fn:function(){var e=this,t;return t=$recv(e._commitHandlerClass())._new(),t},messageSends:["new","commitHandlerClass"]}),$globals.PackageTransport),$core.addMethod($core.method({selector:"commitHandlerClass",protocol:"accessing",fn:function(){var e=this;return e._subclassResponsibility(),e},messageSends:["subclassResponsibility"]}),$globals.PackageTransport),$core.addMethod($core.method({selector:"commitOnSuccess:onError:",protocol:"committing",fn:function(e,t){var n=this;return $recv(n._commitHandler())._commit_onSuccess_onError_(n._package(),e,t),n},messageSends:["commit:onSuccess:onError:","commitHandler","package"]}),$globals.PackageTransport),$core.addMethod($core.method({selector:"definition",protocol:"accessing",fn:function(){var e=this;return""},messageSends:[]}),$globals.PackageTransport),$core.addMethod($core.method({selector:"load",protocol:"loading",fn:function(){var e=this;return $recv(e._commitHandler())._load_(e._package()),e},messageSends:["load:","commitHandler","package"]}),$globals.PackageTransport),$core.addMethod($core.method({selector:"package",protocol:"accessing",fn:function(){var e=this,t;return t=e["@package"],t},messageSends:[]}),$globals.PackageTransport),$core.addMethod($core.method({selector:"package:",protocol:"accessing",fn:function(e){var t=this;return t["@package"]=e,t},messageSends:[]}),$globals.PackageTransport),$core.addMethod($core.method({selector:"setupFromJson:",protocol:"initialization",fn:function(e){var t=this;return t},messageSends:[]}),$globals.PackageTransport),$core.addMethod($core.method({selector:"type",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._class())._type(),t},messageSends:["type","class"]}),$globals.PackageTransport),$globals.PackageTransport.klass.iVarNames=["registry"],$core.addMethod($core.method({selector:"classRegisteredFor:",protocol:"accessing",fn:function(e){var t=this,n;return n=$recv(t["@registry"])._at_(e),n},messageSends:["at:"]}),$globals.PackageTransport.klass),$core.addMethod($core.method({selector:"defaultType",protocol:"accessing",fn:function(){function t(){return $globals.AmdPackageTransport||(typeof AmdPackageTransport=="undefined"?nil:AmdPackageTransport)}var e=this,n;return n=$recv(t())._type(),n},messageSends:["type"]}),$globals.PackageTransport.klass),$core.addMethod($core.method({selector:"for:",protocol:"instance creation",fn:function(e){var t=this,n;return n=$recv(t._classRegisteredFor_(e))._new(),n},messageSends:["new","classRegisteredFor:"]}),$globals.PackageTransport.klass),$core.addMethod($core.method({selector:"fromJson:",protocol:"instance creation",fn:function(e){var t=this,n,r,i,s,o;return(o=e)==null||o.isNil?(n=t._for_(t._defaultType()),n):(e,r=t._for_($recv(e)._type()),$recv(r)._setupFromJson_(e),i=$recv(r)._yourself(),s=i,s)},messageSends:["ifNil:","for:","defaultType","setupFromJson:","type","yourself"]}),$globals.PackageTransport.klass),$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){function t(){return $globals.PackageTransport||(typeof PackageTransport=="undefined"?nil:PackageTransport)}var e=this,n;return $globals.PackageTransport.klass.superclass.fn.prototype._initialize.apply($recv(e),[]),n=e.__eq_eq(t()),$core.assert(n)?(e["@registry"]=$globals.HashedCollection._newFromPairs_([]),e["@registry"]):e._register(),e},messageSends:["initialize","ifTrue:ifFalse:","==","register"]}),$globals.PackageTransport.klass),$core.addMethod($core.method({selector:"register",protocol:"registration",fn:function(){function t(){return $globals.PackageTransport||(typeof PackageTransport=="undefined"?nil:PackageTransport)}var e=this;return $recv(t())._register_(e),e},messageSends:["register:"]}),$globals.PackageTransport.klass),$core.addMethod($core.method({selector:"register:",protocol:"registration",fn:function(e){var t=this,n,r;return n=$recv(e)._type(),(r=n)==null||r.isNil?n:$recv(t["@registry"])._at_put_($recv(e)._type(),e),t},messageSends:["ifNotNil:","type","at:put:"]}),$globals.PackageTransport.klass),$core.addMethod($core.method({selector:"type",protocol:"accessing",fn:function(){var e=this;return nil},messageSends:[]}),$globals.PackageTransport.klass),$core.addClass("AmdPackageTransport",$globals.PackageTransport,["namespace"],"Platform-ImportExport"),$core.addMethod($core.method({selector:"asJSON",protocol:"converting",fn:function(){var e=this,t,n,r;return t=$globals.AmdPackageTransport.superclass.fn.prototype._asJSON.apply($recv(e),[]),$recv(t)._at_put_("amdNamespace",e._namespace()),n=$recv(t)._yourself(),r=n,r},messageSends:["at:put:","asJSON","namespace","yourself"]}),$globals.AmdPackageTransport),$core.addMethod($core.method({selector:"commitHandlerClass",protocol:"accessing",fn:function(){function t(){return $globals.AmdPackageHandler||(typeof AmdPackageHandler=="undefined"?nil:AmdPackageHandler)}var e=this;return t()},messageSends:[]}),$globals.AmdPackageTransport),$core.addMethod($core.method({selector:"defaultNamespace",protocol:"defaults",fn:function(){function t(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var e=this,n;return n=$recv(t())._defaultAmdNamespace(),n},messageSends:["defaultAmdNamespace"]}),$globals.AmdPackageTransport),$core.addMethod($core.method({selector:"definition",protocol:"accessing",fn:function(){function t(){return $globals.String||(typeof String=="undefined"?nil:String)}var e=this,n,r,i;return i=$recv(t())._streamContents_(function(t){return $recv(t)._nextPutAll_($recv(e._class())._name()),$recv(t)._nextPutAll_(" namespace: "),n=$recv("'".__comma(e._namespace())).__comma("'"),r=$recv(t)._nextPutAll_(n),r}),i},messageSends:["streamContents:","nextPutAll:","name","class",",","namespace"]}),$globals.AmdPackageTransport),$core.addMethod($core.method({selector:"namespace",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@namespace"],(r=t)==null||r.isNil?n=e._defaultNamespace():n=t,n},messageSends:["ifNil:","defaultNamespace"]}),$globals.AmdPackageTransport),$core.addMethod($core.method({selector:"namespace:",protocol:"accessing",fn:function(e){var t=this;return t["@namespace"]=e,t},messageSends:[]}),$globals.AmdPackageTransport),$core.addMethod($core.method({selector:"printOn:",protocol:"printing",fn:function(e){var t=this,n;return $globals.AmdPackageTransport.superclass.fn.prototype._printOn_.apply($recv(t),[e]),$recv(e)._nextPutAll_(" (AMD Namespace: "),$recv(e)._nextPutAll_(t._namespace()),n=$recv(e)._nextPutAll_(")"),t},messageSends:["printOn:","nextPutAll:","namespace"]}),$globals.AmdPackageTransport),$core.addMethod($core.method({selector:"setPath:",protocol:"actions",fn:function(e){var t=this;return $recv($recv(require)._basicAt_("config"))._value_($globals.HashedCollection._newFromPairs_(["paths",$globals.HashedCollection._newFromPairs_([t._namespace(),e])])),t},messageSends:["value:","basicAt:","namespace"]}),$globals.AmdPackageTransport),$core.addMethod($core.method({selector:"setupFromJson:",protocol:"initialization",fn:function(e){var t=this;return t._namespace_($recv(e)._at_("amdNamespace")),t},messageSends:["namespace:","at:"]}),$globals.AmdPackageTransport),$core.addMethod($core.method({selector:"namespace:",protocol:"instance creation",fn:function(e){var t=this,n,r,i;return n=t._new(),$recv(n)._namespace_(e),r=$recv(n)._yourself(),i=r,i},messageSends:["namespace:","new","yourself"]}),$globals.AmdPackageTransport.klass),$core.addMethod($core.method({selector:"type",protocol:"accessing",fn:function(){var e=this;return"amd"},messageSends:[]}),$globals.AmdPackageTransport.klass),$core.addMethod($core.method({selector:"commentStamp",protocol:"*Platform-ImportExport",fn:function(){function t(){return $globals.ClassCommentReader||(typeof ClassCommentReader=="undefined"?nil:ClassCommentReader)}var e=this,n,r,i;return n=$recv(t())._new(),$recv(n)._class_(e),r=$recv(n)._yourself(),i=r,i},messageSends:["class:","new","yourself"]}),$globals.Behavior),$core.addMethod($core.method({selector:"commentStamp:prior:",protocol:"*Platform-ImportExport",fn:function(e,t){var n=this,r;return r=n._commentStamp(),r},messageSends:["commentStamp"]}),$globals.Behavior),$core.addMethod($core.method({selector:"methodsFor:",protocol:"*Platform-ImportExport",fn:function(e){function n(){return $globals.ClassProtocolReader||(typeof ClassProtocolReader=="undefined"?nil:ClassProtocolReader)}var t=this,r,i,s;return r=$recv(n())._new(),$recv(r)._class_category_(t,e),i=$recv(r)._yourself(),s=i,s},messageSends:["class:category:","new","yourself"]}),$globals.Behavior),$core.addMethod($core.method({selector:"methodsFor:stamp:",protocol:"*Platform-ImportExport",fn:function(e,t){var n=this,r;return r=n._methodsFor_(e),r},messageSends:["methodsFor:"]}),$globals.Behavior),$core.addMethod($core.method({selector:"commit",protocol:"*Platform-ImportExport",fn:function(){var e=this,t;return t=$recv(e._transport())._commit(),t},messageSends:["commit","transport"]}),$globals.Package),$core.addMethod($core.method({selector:"load",protocol:"*Platform-ImportExport",fn:function(){var e=this,t;return t=$recv(e._transport())._load(),t},messageSends:["load","transport"]}),$globals.Package),$core.addMethod($core.method({selector:"loadFromNamespace:",protocol:"*Platform-ImportExport",fn:function(e){var t=this,n,r,i;return n=t._transport(),$recv(n)._namespace_(e),r=$recv(n)._load(),i=r,i},messageSends:["namespace:","transport","load"]}),$globals.Package),$core.addMethod($core.method({selector:"load:",protocol:"*Platform-ImportExport",fn:function(e){var t=this;return $recv(t._named_(e))._load(),t},messageSends:["load","named:"]}),$globals.Package.klass),$core.addMethod($core.method({selector:"load:fromNamespace:",protocol:"*Platform-ImportExport",fn:function(e,t){var n=this;return $recv(n._named_(e))._loadFromNamespace_(t),n},messageSends:["loadFromNamespace:","named:"]}),$globals.Package.klass)}),define("amber_core/Compiler-Exceptions",["amber/boot","amber_core/Kernel-Exceptions","amber_core/Kernel-Objects"],function($boot){"use strict";var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;$core.addPackage("Compiler-Exceptions"),$core.packages["Compiler-Exceptions"].innerEval=function(expr){return eval(expr)},$core.packages["Compiler-Exceptions"].transport={type:"amd",amdNamespace:"amber_core"},$core.addClass("CompilerError",$globals.Error,[],"Compiler-Exceptions"),$core.addClass("ParseError",$globals.CompilerError,[],"Compiler-Exceptions"),$core.addClass("SemanticError",$globals.CompilerError,[],"Compiler-Exceptions"),$core.addClass("InliningError",$globals.SemanticError,[],"Compiler-Exceptions"),$core.addClass("InvalidAssignmentError",$globals.SemanticError,["variableName"],"Compiler-Exceptions"),$core.addMethod($core.method({selector:"messageText",protocol:"accessing",fn:function(){var e=this,t;return t=" Invalid assignment to variable: ".__comma(e._variableName()),t},messageSends:[",","variableName"]}),$globals.InvalidAssignmentError),$core.addMethod($core.method({selector:"variableName",protocol:"accessing",fn:function(){var e=this,t;return t=e["@variableName"],t},messageSends:[]}),$globals.InvalidAssignmentError),$core.addMethod($core.method({selector:"variableName:",protocol:"accessing",fn:function(e){var t=this;return t["@variableName"]=e,t},messageSends:[]}),$globals.InvalidAssignmentError),$core.addClass("ShadowingVariableError",$globals.SemanticError,["variableName"],"Compiler-Exceptions"),$core.addMethod($core.method({selector:"messageText",protocol:"accessing",fn:function(){var e=this,t;return t=$recv("Variable shadowing error: ".__comma(e._variableName())).__comma(" is already defined"),t},messageSends:[",","variableName"]}),$globals.ShadowingVariableError),$core.addMethod($core.method({selector:"variableName",protocol:"accessing",fn:function(){var e=this,t;return t=e["@variableName"],t},messageSends:[]}),$globals.ShadowingVariableError),$core.addMethod($core.method({selector:"variableName:",protocol:"accessing",fn:function(e){var t=this;return t["@variableName"]=e,t},messageSends:[]}),$globals.ShadowingVariableError),$core.addClass("UnknownVariableError",$globals.SemanticError,["variableName"],"Compiler-Exceptions"),$core.addMethod($core.method({selector:"messageText",protocol:"accessing",fn:function(){var e=this,t;return t=$recv("Unknown Variable error: ".__comma(e._variableName())).__comma(" is not defined"),t},messageSends:[",","variableName"]}),$globals.UnknownVariableError),$core.addMethod($core.method({selector:"variableName",protocol:"accessing",fn:function(){var e=this,t;return t=e["@variableName"],t},messageSends:[]}),$globals.UnknownVariableError),$core.addMethod($core.method({selector:"variableName:",protocol:"accessing",fn:function(e){var t=this;return t["@variableName"]=e,t},messageSends:[]}),$globals.UnknownVariableError),$core.addClass("RethrowErrorHandler",$globals.Object,[],"Compiler-Exceptions"),$core.addMethod($core.method({selector:"basicSignal:",protocol:"error handling",fn:function(e){var t=this;throw e},messageSends:[]}),$globals.RethrowErrorHandler),$core.addMethod($core.method({selector:"handleError:",protocol:"error handling",fn:function(e){var t=this;return t._basicSignal_(e),t},messageSends:["basicSignal:"]}),$globals.RethrowErrorHandler)}),define("amber_core/Compiler-Core",["amber/boot","amber_core/Kernel-Objects","amber_core/Platform-Services","amber_core/Kernel-Collections"],function($boot){"use strict";var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;$core.addPackage("Compiler-Core"),$core.packages["Compiler-Core"].innerEval=function(expr){return eval(expr)},$core.packages["Compiler-Core"].transport={type:"amd",amdNamespace:"amber_core"},$core.addClass("AbstractCodeGenerator",$globals.Object,["currentClass","currentPackage","source"],"Compiler-Core"),$core.addMethod($core.method({selector:"classNameFor:",protocol:"accessing",fn:function(e){var t=this,n,r,i,s;return n=$recv(e)._isMetaclass(),$core.assert(n)?(r=$recv($recv(e)._instanceClass())._name(),s=$recv(r).__comma(".klass")):(i=$recv(e)._isNil(),$core.assert(i)?s="nil":s=$recv(e)._name()),s},messageSends:["ifTrue:ifFalse:","isMetaclass",",","name","instanceClass","isNil"]}),$globals.AbstractCodeGenerator),$core.addMethod($core.method({selector:"compileNode:",protocol:"compiling",fn:function(e){var t=this;return t._subclassResponsibility(),t},messageSends:["subclassResponsibility"]}),$globals.AbstractCodeGenerator),$core.addMethod($core.method({selector:"currentClass",protocol:"accessing",fn:function(){var e=this,t;return t=e["@currentClass"],t},messageSends:[]}),$globals.AbstractCodeGenerator),$core.addMethod($core.method({selector:"currentClass:",protocol:"accessing",fn:function(e){var t=this;return t["@currentClass"]=e,t},messageSends:[]}),$globals.AbstractCodeGenerator),$core.addMethod($core.method({selector:"currentPackage",protocol:"accessing",fn:function(){var e=this,t;return t=e["@currentPackage"],t},messageSends:[]}),$globals.AbstractCodeGenerator),$core.addMethod($core.method({selector:"currentPackage:",protocol:"accessing",fn:function(e){var t=this;return t["@currentPackage"]=e,t},messageSends:[]}),$globals.AbstractCodeGenerator),$core.addMethod($core.method({selector:"pseudoVariables",protocol:"accessing",fn:function(){function t(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var e=this,n;return n=$recv(t())._pseudoVariableNames(),n},messageSends:["pseudoVariableNames"]}),$globals.AbstractCodeGenerator),$core.addMethod($core.method({selector:"source",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@source"],(r=t)==null||r.isNil?n="":n=t,n},messageSends:["ifNil:"]}),$globals.AbstractCodeGenerator),$core.addMethod($core.method({selector:"source:",protocol:"accessing",fn:function(e){var t=this;return t["@source"]=e,t},messageSends:[]}),$globals.AbstractCodeGenerator),$core.addClass("CodeGenerator",$globals.AbstractCodeGenerator,[],"Compiler-Core"),$core.addMethod($core.method({selector:"compileNode:",protocol:"compiling",fn:function(e){var t=this,n,r,i,s,o;return $recv(t._semanticAnalyzer())._visit_(e),n=$recv(t._translator())._visit_(e),i=t._irTranslator(),$recv(i)._currentClass_(t._currentClass()),$recv(i)._visit_(n),s=$recv(i)._contents(),o=s,o},messageSends:["visit:","semanticAnalyzer","translator","currentClass:","irTranslator","currentClass","contents"]}),$globals.CodeGenerator),$core.addMethod($core.method({selector:"irTranslator",protocol:"compiling",fn:function(){function t(){return $globals.IRJSTranslator||(typeof IRJSTranslator=="undefined"?nil:IRJSTranslator)}var e=this,n;return n=$recv(t())._new(),n},messageSends:["new"]}),$globals.CodeGenerator),$core.addMethod($core.method({selector:"semanticAnalyzer",protocol:"compiling",fn:function(){function t(){return $globals.SemanticAnalyzer||(typeof SemanticAnalyzer=="undefined"?nil:SemanticAnalyzer)}var e=this,n,r,i;return n=$recv(t())._on_(e._currentClass()),$recv(n)._thePackage_(e._currentPackage()),r=$recv(n)._yourself(),i=r,i},messageSends:["thePackage:","on:","currentClass","currentPackage","yourself"]}),$globals.CodeGenerator),$core.addMethod($core.method({selector:"translator",protocol:"compiling",fn:function(){function t(){return $globals.IRASTTranslator||(typeof IRASTTranslator=="undefined"?nil:IRASTTranslator)}var e=this,n,r,i;return n=$recv(t())._new(),$recv(n)._source_(e._source()),$recv(n)._theClass_(e._currentClass()),r=$recv(n)._yourself(),i=r,i},messageSends:["source:","new","source","theClass:","currentClass","yourself"]}),$globals.CodeGenerator),$core.addClass("Compiler",$globals.Object,["currentClass","currentPackage","source","unknownVariables","codeGeneratorClass"],"Compiler-Core"),$core.addMethod($core.method({selector:"codeGeneratorClass",protocol:"accessing",fn:function(){function t(){return $globals.InliningCodeGenerator||(typeof InliningCodeGenerator=="undefined"?nil:InliningCodeGenerator)}var e=this,n,r,i;return n=e["@codeGeneratorClass"],(i=n)==null||i.isNil?r=t():r=n,r},messageSends:["ifNil:"]}),$globals.Compiler),$core.addMethod($core.method({selector:"codeGeneratorClass:",protocol:"accessing",fn:function(e){var t=this;return t["@codeGeneratorClass"]=e,t},messageSends:[]}),$globals.Compiler),$core.addMethod($core.method({selector:"compile:forClass:protocol:",protocol:"compiling",fn:function(e,t,n){var r=this,i,s;return r._source_(e),i=r._compileNode_forClass_package_(r._parse_(e),t,$recv(t)._packageOfProtocol_(n)),s=i,s},messageSends:["source:","compileNode:forClass:package:","parse:","packageOfProtocol:"]}),$globals.Compiler),$core.addMethod($core.method({selector:"compileExpression:on:",protocol:"compiling",fn:function(e,t){var n=this,r,i;return r=$recv("xxxDoIt ^ [ ".__comma(e)).__comma(" ] value"),i=n._compile_forClass_protocol_(r,$recv(t)._class(),"**xxxDoIt"),i},messageSends:["compile:forClass:protocol:",",","class"]}),$globals.Compiler),$core.addMethod($core.method({selector:"compileNode:",protocol:"compiling",fn:function(e){var t=this,n,r,i,s,o;return n=$recv(t._codeGeneratorClass())._new(),i=n,$recv(i)._source_(t._source()),$recv(i)._currentClass_(t._currentClass()),s=$recv(i)._currentPackage_(t._currentPackage()),r=$recv(n)._compileNode_(e),t._unknownVariables_([]),o=r,o},messageSends:["new","codeGeneratorClass","source:","source","currentClass:","currentClass","currentPackage:","currentPackage","compileNode:","unknownVariables:"]}),$globals.Compiler),$core.addMethod($core.method({selector:"compileNode:forClass:package:",protocol:"compiling",fn:function(e,t,n){var r=this,i,s;return r._currentClass_(t),r._currentPackage_(n),i=r._compileNode_(e),s=i,s},messageSends:["currentClass:","currentPackage:","compileNode:"]}),$globals.Compiler),$core.addMethod($core.method({selector:"currentClass",protocol:"accessing",fn:function(){var e=this,t;return t=e["@currentClass"],t},messageSends:[]}),$globals.Compiler),$core.addMethod($core.method({selector:"currentClass:",protocol:"accessing",fn:function(e){var t=this;return t["@currentClass"]=e,t},messageSends:[]}),$globals.Compiler),$core.addMethod($core.method({selector:"currentPackage",protocol:"accessing",fn:function(){var e=this,t;return t=e["@currentPackage"],t},messageSends:[]}),$globals.Compiler),$core.addMethod($core.method({selector:"currentPackage:",protocol:"accessing",fn:function(e){var t=this;return t["@currentPackage"]=e,t},messageSends:[]}),$globals.Compiler),$core.addMethod($core.method({selector:"eval:",protocol:"compiling",fn:function(aString){var self=this;return eval(aString)},messageSends:[]}),$globals.Compiler),$core.addMethod($core.method({selector:"eval:forPackage:",protocol:"compiling",fn:function(aString,aPackage){var self=this;return aPackage&&aPackage.innerEval?aPackage.innerEval(aString):eval(aString)},messageSends:[]}),$globals.Compiler),$core.addMethod($core.method({selector:"evaluateExpression:",protocol:"compiling",fn:function(e){function n(){return $globals.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}var t=this,r;return r=t._evaluateExpression_on_(e,$recv(n())._new()),r},messageSends:["evaluateExpression:on:","new"]}),$globals.Compiler),$core.addMethod($core.method({selector:"evaluateExpression:on:",protocol:"compiling",fn:function(e,t){var n=this,r,i,s,o;return i=n._eval_(n._compileExpression_on_(e,t)),$recv(i)._protocol_("**xxxDoIt"),s=$recv(t)._class(),$recv(s)._addCompiledMethod_(i),r=$recv(t)._xxxDoIt(),$recv($recv(t)._class())._removeCompiledMethod_(i),o=r,o},messageSends:["eval:","compileExpression:on:","protocol:","addCompiledMethod:","class","xxxDoIt","removeCompiledMethod:"]}),$globals.Compiler),$core.addMethod($core.method({selector:"install:forClass:protocol:",protocol:"compiling",fn:function(e,t,n){function s(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}var r=this,i,o;return i=r._eval_forPackage_(r._compile_forClass_protocol_(e,t,n),$recv(t)._packageOfProtocol_(n)),o=$recv($recv(s())._new())._installMethod_forClass_protocol_(i,t,n),o},messageSends:["eval:forPackage:","compile:forClass:protocol:","packageOfProtocol:","installMethod:forClass:protocol:","new"]}),$globals.Compiler),$core.addMethod($core.method({selector:"parse:",protocol:"compiling",fn:function(e){function n(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var t=this,r;return r=$recv(n())._parse_(e),r},messageSends:["parse:"]}),$globals.Compiler),$core.addMethod($core.method({selector:"parseExpression:",protocol:"compiling",fn:function(e){var t=this,n,r;return n=$recv("doIt ^ [ ".__comma(e)).__comma(" ] value"),r=t._parse_(n),r},messageSends:["parse:",","]}),$globals.Compiler),$core.addMethod($core.method({selector:"recompile:",protocol:"compiling",fn:function(e){var t=this,n;return $recv($recv($recv(e)._methodDictionary())._values())._do_displayingProgress_(function(n){return t._install_forClass_protocol_($recv(n)._source(),e,$recv(n)._protocol())},"Recompiling ".__comma($recv(e)._name())),n=$recv(e)._isMetaclass(),$core.assert(n)||t._recompile_($recv(e)._class()),t},messageSends:["do:displayingProgress:","values","methodDictionary","install:forClass:protocol:","source","protocol",",","name","ifFalse:","isMetaclass","recompile:","class"]}),$globals.Compiler),$core.addMethod($core.method({selector:"recompileAll",protocol:"compiling",fn:function(){function t(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var e=this;return $recv($recv(t())._classes())._do_displayingProgress_(function(t){return e._recompile_(t)},"Compiling all classes..."),e},messageSends:["do:displayingProgress:","classes","recompile:"]}),$globals.Compiler),$core.addMethod($core.method({selector:"source",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@source"],(r=t)==null||r.isNil?n="":n=t,n},messageSends:["ifNil:"]}),$globals.Compiler),$core.addMethod($core.method({selector:"source:",protocol:"accessing",fn:function(e){var t=this;return t["@source"]=e,t},messageSends:[]}),$globals.Compiler),$core.addMethod($core.method({selector:"unknownVariables",protocol:"accessing",fn:function(){var e=this,t;return t=e["@unknownVariables"],t},messageSends:[]}),$globals.Compiler),$core.addMethod($core.method({selector:"unknownVariables:",protocol:"accessing",fn:function(e){var t=this;return t["@unknownVariables"]=e,t},messageSends:[]}),$globals.Compiler),$core.addMethod($core.method({selector:"recompile:",protocol:"compiling",fn:function(e){var t=this;return $recv(t._new())._recompile_(e),t},messageSends:["recompile:","new"]}),$globals.Compiler.klass),$core.addMethod($core.method({selector:"recompileAll",protocol:"compiling",fn:function(){function t(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var e=this;return $recv($recv(t())._classes())._do_(function(t){return e._recompile_(t)}),e},messageSends:["do:","classes","recompile:"]}),$globals.Compiler.klass),$core.addClass("DoIt",$globals.Object,[],"Compiler-Core"),$core.addClass("Evaluator",$globals.InterfacingObject,[],"Compiler-Core"),$core.addMethod($core.method({selector:"evaluate:context:",protocol:"evaluating",fn:function(e,t){function s(){return $globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}function o(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}function u(){return $globals.AISemanticAnalyzer||(typeof AISemanticAnalyzer=="undefined"?nil:AISemanticAnalyzer)}var n=this,r,i,a,f,l,c,h={};try{return r=$recv(s())._new(),$recv(function(){return i=$recv(r)._parseExpression_(e),i})._on_do_(o(),function(e){throw a=n._alert_($recv(e)._messageText()),h=[a]}),f=$recv(u())._on_($recv($recv(t)._receiver())._class()),$recv(f)._context_(t),l=$recv(f)._visit_(i),c=$recv(t)._evaluateNode_(i),c}catch(p){if(p===h)return p[0];throw p}},messageSends:["new","on:do:","parseExpression:","alert:","messageText","context:","on:","class","receiver","visit:","evaluateNode:"]}),$globals.Evaluator),$core.addMethod($core.method({selector:"evaluate:for:",protocol:"evaluating",fn:function(e,t){var n=this,r;return r=$recv(t)._evaluate_on_(e,n),r},messageSends:["evaluate:on:"]}),$globals.Evaluator),$core.addMethod($core.method({selector:"evaluate:receiver:",protocol:"evaluating",fn:function(e,t){function i(){return $globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}function s(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}var n=this,r,o,u,a={};try{return r=$recv(i())._new(),$recv(function(){return $recv(r)._parseExpression_(e)})._on_do_(s(),function(e){throw o=n._alert_($recv(e)._messageText()),a=[o]}),u=$recv(r)._evaluateExpression_on_(e,t),u}catch(f){if(f===a)return f[0];throw f}},messageSends:["new","on:do:","parseExpression:","alert:","messageText","evaluateExpression:on:"]}),$globals.Evaluator),$core.addMethod($core.method({selector:"evaluate:for:",protocol:"instance creation",fn:function(e,t){var n=this,r;return r=$recv(n._new())._evaluate_for_(e,t),r},messageSends:["evaluate:for:","new"]}),$globals.Evaluator.klass),$core.addClass("NodeVisitor",$globals.Object,[],"Compiler-Core"),$core.addMethod($core.method({selector:"visit:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._accept_(t),n},messageSends:["accept:"]}),$globals.NodeVisitor),$core.addMethod($core.method({selector:"visitAll:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._collect_(function(e){return t._visit_(e)}),n},messageSends:["collect:","visit:"]}),$globals.NodeVisitor),$core.addMethod($core.method({selector:"visitAssignmentNode:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitNode_(e),n},messageSends:["visitNode:"]}),$globals.NodeVisitor),$core.addMethod($core.method({selector:"visitBlockNode:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitNode_(e),n},messageSends:["visitNode:"]}),$globals.NodeVisitor),$core.addMethod($core.method({selector:"visitBlockSequenceNode:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitSequenceNode_(e),n},messageSends:["visitSequenceNode:"]}),$globals.NodeVisitor),$core.addMethod($core.method({selector:"visitCascadeNode:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitNode_(e),n},messageSends:["visitNode:"]}),$globals.NodeVisitor),$core.addMethod($core.method({selector:"visitDynamicArrayNode:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitNode_(e),n},messageSends:["visitNode:"]}),$globals.NodeVisitor),$core.addMethod($core.method({selector:"visitDynamicDictionaryNode:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitNode_(e),n},messageSends:["visitNode:"]}),$globals.NodeVisitor),$core.addMethod($core.method({selector:"visitJSStatementNode:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitNode_(e),n},messageSends:["visitNode:"]}),$globals.NodeVisitor),$core.addMethod($core.method({selector:"visitMethodNode:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitNode_(e),n},messageSends:["visitNode:"]}),$globals.NodeVisitor),$core.addMethod($core.method({selector:"visitNode:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitAll_($recv(e)._nodes()),n},messageSends:["visitAll:","nodes"]}),$globals.NodeVisitor),$core.addMethod($core.method({selector:"visitReturnNode:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitNode_(e),n},messageSends:["visitNode:"]}),$globals.NodeVisitor),$core.addMethod($core.method({selector:"visitSendNode:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitNode_(e),n},messageSends:["visitNode:"]}),$globals.NodeVisitor),$core.addMethod($core.method({selector:"visitSequenceNode:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitNode_(e),n},messageSends:["visitNode:"]}),$globals.NodeVisitor),$core.addMethod($core.method({selector:"visitValueNode:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitNode_(e),n},messageSends:["visitNode:"]}),$globals.NodeVisitor),$core.addMethod($core.method({selector:"visitVariableNode:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitNode_(e),n},messageSends:["visitNode:"]}),$globals.NodeVisitor),$core.addMethod($core.method({selector:"asVariableName",protocol:"*Compiler-Core",fn:function(){function t(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var e=this,n,r;return n=$recv($recv(t())._reservedWords())._includes_(e),$core.assert(n)?r=e.__comma("_"):r=e,r},messageSends:["ifTrue:ifFalse:","includes:","reservedWords",","]}),$globals.String)}),define("amber_core/Compiler-AST",["amber/boot","amber_core/Kernel-Objects","amber_core/Kernel-Methods"],function($boot){"use strict";var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;$core.addPackage("Compiler-AST"),$core.packages["Compiler-AST"].innerEval=function(expr){return eval(expr)},$core.packages["Compiler-AST"].transport={type:"amd",amdNamespace:"amber_core"},$core.addClass("Node",$globals.Object,["parent","position","source","nodes","shouldBeInlined","shouldBeAliased"],"Compiler-AST"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitNode_(t),n},messageSends:["visitNode:"]}),$globals.Node),$core.addMethod($core.method({selector:"addNode:",protocol:"accessing",fn:function(e){var t=this;return $recv(t._nodes())._add_(e),$recv(e)._parent_(t),t},messageSends:["add:","nodes","parent:"]}),$globals.Node),$core.addMethod($core.method({selector:"allNodes",protocol:"accessing",fn:function(){var e=this,t,n,r;return n=e._nodes(),t=$recv(n)._asSet(),$recv(e._nodes())._do_(function(e){return $recv(t)._addAll_($recv(e)._allNodes())}),r=t,r},messageSends:["asSet","nodes","do:","addAll:","allNodes"]}),$globals.Node),$core.addMethod($core.method({selector:"inPosition:",protocol:"testing",fn:function(e){var t=this,n;return n=$recv($recv(t._positionStart()).__lt_eq(e))._and_(function(){return $recv(t._positionEnd()).__gt_eq(e)}),n},messageSends:["and:","<=","positionStart",">=","positionEnd"]}),$globals.Node),$core.addMethod($core.method({selector:"isAssignmentNode",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"isBlockNode",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"isBlockSequenceNode",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"isCascadeNode",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"isImmutable",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"isJSStatementNode",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"isLastChild",protocol:"testing",fn:function(){var e=this,t;return t=$recv($recv($recv(e._parent())._nodes())._last()).__eq(e),t},messageSends:["=","last","nodes","parent"]}),$globals.Node),$core.addMethod($core.method({selector:"isNavigationNode",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"isNode",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"isReferenced",protocol:"testing",fn:function(){var e=this,t,n,r,i;return t=e._parent(),n=$recv(t)._isSequenceNode(),r=$recv(n)._or_(function(){return $recv(e._parent())._isAssignmentNode()}),i=$recv(r)._not(),i},messageSends:["not","or:","isSequenceNode","parent","isAssignmentNode"]}),$globals.Node),$core.addMethod($core.method({selector:"isReturnNode",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"isSendNode",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"isSequenceNode",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"isValueNode",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"isVariableNode",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"method",protocol:"accessing",fn:function(){var e=this,t,n,r;t=e._parent();if((r=t)==null||r.isNil)n=t;else{var i;i=r,n=$recv(i)._method()}return n},messageSends:["ifNotNil:","parent","method"]}),$globals.Node),$core.addMethod($core.method({selector:"navigationNodeAt:ifAbsent:",protocol:"accessing",fn:function(e,t){var n=this,r,i,s,o,u,a={};try{return r=$recv(n._allNodes())._select_(function(t){return $recv($recv(t)._isNavigationNode())._and_(function(){return $recv(t)._inPosition_(e)})}),$recv(r)._ifEmpty_(function(){throw i=$recv(t)._value(),a=[i]}),u=$recv($recv($recv(r)._asArray())._sort_(function(t,n){return s=$recv(t)._positionStart(),o=$recv(s)._dist_(e),$recv(o).__lt_eq($recv($recv(n)._positionStart())._dist_(e))}))._first(),u}catch(f){if(f===a)return f[0];throw f}},messageSends:["select:","allNodes","and:","isNavigationNode","inPosition:","ifEmpty:","value","first","sort:","asArray","<=","dist:","positionStart"]}),$globals.Node),$core.addMethod($core.method({selector:"nextChild",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e._nodes(),n=$recv(t)._isEmpty(),$core.assert(n)?r=e:r=$recv($recv(e._nodes())._first())._nextChild(),r},messageSends:["ifTrue:ifFalse:","isEmpty","nodes","nextChild","first"]}),$globals.Node),$core.addMethod($core.method({selector:"nextNode",protocol:"accessing",fn:function(){var e=this,t,n,r;t=e._parent();if((r=t)==null||r.isNil)n=t;else{var i;i=r,n=$recv(i)._nextNode_(e)}return n},messageSends:["ifNotNil:","parent","nextNode:"]}),$globals.Node),$core.addMethod($core.method({selector:"nextNode:",protocol:"accessing",fn:function(e){var t=this,n,r,i,s={};try{return r=t._nodes(),n=$recv(r)._at_ifAbsent_($recv($recv(t._nodes())._indexOf_(e)).__plus(1),function(){throw s=[t]}),i=$recv(n)._nextChild(),i}catch(o){if(o===s)return o[0];throw o}},messageSends:["at:ifAbsent:","nodes","+","indexOf:","nextChild"]}),$globals.Node),$core.addMethod($core.method({selector:"nodes",protocol:"accessing",fn:function(){function t(){return $globals.Array||(typeof Array=="undefined"?nil:Array)}var e=this,n,r,i;return n=e["@nodes"],(i=n)==null||i.isNil?(e["@nodes"]=$recv(t())._new(),r=e["@nodes"]):r=n,r},messageSends:["ifNil:","new"]}),$globals.Node),$core.addMethod($core.method({selector:"nodes:",protocol:"building",fn:function(e){var t=this;return t["@nodes"]=e,$recv(e)._do_(function(e){return $recv(e)._parent_(t)}),t},messageSends:["do:","parent:"]}),$globals.Node),$core.addMethod($core.method({selector:"parent",protocol:"accessing",fn:function(){var e=this,t;return t=e["@parent"],t},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"parent:",protocol:"accessing",fn:function(e){var t=this;return t["@parent"]=e,t},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"position",protocol:"accessing",fn:function(){var e=this,t,n,r,i;t=e["@position"];if((i=t)==null||i.isNil){n=e._parent();if((i=n)==null||i.isNil)r=n;else{var s;s=i,r=$recv(s)._position()}}else r=t;return r},messageSends:["ifNil:","ifNotNil:","parent","position"]}),$globals.Node),$core.addMethod($core.method({selector:"position:",protocol:"accessing",fn:function(e){var t=this;return t["@position"]=e,t},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"positionEnd",protocol:"accessing",fn:function(){var e=this,t,n,r,i,s,o,u;return t=e._positionStart(),n=e._source(),r=$recv(n)._lines(),i=$recv(r)._size(),s=$recv(i).__minus(1),o=$recv(s).__at($recv($recv($recv($recv(e._source())._lines())._last())._size()).__minus(1)),u=$recv(t).__plus(o),u},messageSends:["+","positionStart","@","-","size","lines","source","last"]}),$globals.Node),$core.addMethod($core.method({selector:"positionStart",protocol:"accessing",fn:function(){var e=this,t;return t=e._position(),t},messageSends:["position"]}),$globals.Node),$core.addMethod($core.method({selector:"postCopy",protocol:"copying",fn:function(){var e=this;return $globals.Node.superclass.fn.prototype._postCopy.apply($recv(e),[]),$recv(e._nodes())._do_(function(t){return $recv(t)._parent_(e)}),e},messageSends:["postCopy","do:","nodes","parent:"]}),$globals.Node),$core.addMethod($core.method({selector:"requiresSmalltalkContext",protocol:"testing",fn:function(){var e=this,t;return t=$recv($recv(e._nodes())._detect_ifNone_(function(e){return $recv(e)._requiresSmalltalkContext()},function(){return nil}))._notNil(),t},messageSends:["notNil","detect:ifNone:","nodes","requiresSmalltalkContext"]}),$globals.Node),$core.addMethod($core.method({selector:"shouldBeAliased",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@shouldBeAliased"],(r=t)==null||r.isNil?n=!1:n=t,n},messageSends:["ifNil:"]}),$globals.Node),$core.addMethod($core.method({selector:"shouldBeAliased:",protocol:"accessing",fn:function(e){var t=this;return t["@shouldBeAliased"]=e,t},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"shouldBeInlined",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@shouldBeInlined"],(r=t)==null||r.isNil?n=!1:n=t,n},messageSends:["ifNil:"]}),$globals.Node),$core.addMethod($core.method({selector:"shouldBeInlined:",protocol:"accessing",fn:function(e){var t=this;return t["@shouldBeInlined"]=e,t},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"size",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._source())._size(),t},messageSends:["size","source"]}),$globals.Node),$core.addMethod($core.method({selector:"source",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@source"],(r=t)==null||r.isNil?n="":n=t,n},messageSends:["ifNil:"]}),$globals.Node),$core.addMethod($core.method({selector:"source:",protocol:"accessing",fn:function(e){var t=this;return t["@source"]=e,t},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"stopOnStepping",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"subtreeNeedsAliasing",protocol:"testing",fn:function(){var e=this,t;return t=$recv($recv(e._shouldBeAliased())._or_(function(){return e._shouldBeInlined()}))._or_(function(){return $recv(e._nodes())._anySatisfy_(function(e){return $recv(e)._subtreeNeedsAliasing()})}),t},messageSends:["or:","shouldBeAliased","shouldBeInlined","anySatisfy:","nodes","subtreeNeedsAliasing"]}),$globals.Node),$core.addClass("AssignmentNode",$globals.Node,["left","right"],"Compiler-AST"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitAssignmentNode_(t),n},messageSends:["visitAssignmentNode:"]}),$globals.AssignmentNode),$core.addMethod($core.method({selector:"isAssignmentNode",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.AssignmentNode),$core.addMethod($core.method({selector:"left",protocol:"accessing",fn:function(){var e=this,t;return t=e["@left"],t},messageSends:[]}),$globals.AssignmentNode),$core.addMethod($core.method({selector:"left:",protocol:"accessing",fn:function(e){var t=this;return t["@left"]=e,$recv(e)._parent_(t),t},messageSends:["parent:"]}),$globals.AssignmentNode),$core.addMethod($core.method({selector:"nodes",protocol:"accessing",fn:function(){function t(){return $globals.Array||(typeof Array=="undefined"?nil:Array)}var e=this,n;return n=$recv(t())._with_with_(e._left(),e._right()),n},messageSends:["with:with:","left","right"]}),$globals.AssignmentNode),$core.addMethod($core.method({selector:"right",protocol:"accessing",fn:function(){var e=this,t;return t=e["@right"],t},messageSends:[]}),$globals.AssignmentNode),$core.addMethod($core.method({selector:"right:",protocol:"accessing",fn:function(e){var t=this;return t["@right"]=e,$recv(e)._parent_(t),t},messageSends:["parent:"]}),$globals.AssignmentNode),$core.addMethod($core.method({selector:"shouldBeAliased",protocol:"testing",fn:function(){var e=this,t,n;return t=$globals.AssignmentNode.superclass.fn.prototype._shouldBeAliased.apply($recv(e),[]),n=$recv(t)._or_(function(){return e._isReferenced()}),n},messageSends:["or:","shouldBeAliased","isReferenced"]}),$globals.AssignmentNode),$core.addClass("BlockNode",$globals.Node,["parameters","scope"],"Compiler-AST"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitBlockNode_(t),n},messageSends:["visitBlockNode:"]}),$globals.BlockNode),$core.addMethod($core.method({selector:"isBlockNode",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.BlockNode),$core.addMethod($core.method({selector:"nextChild",protocol:"accessing",fn:function(){var e=this;return e},messageSends:[]}),$globals.BlockNode),$core.addMethod($core.method({selector:"nextNode:",protocol:"accessing",fn:function(e){var t=this;return t},messageSends:[]}),$globals.BlockNode),$core.addMethod($core.method({selector:"parameters",protocol:"accessing",fn:function(){function t(){return $globals.Array||(typeof Array=="undefined"?nil:Array)}var e=this,n,r,i;return n=e["@parameters"],(i=n)==null||i.isNil?(e["@parameters"]=$recv(t())._new(),r=e["@parameters"]):r=n,r},messageSends:["ifNil:","new"]}),$globals.BlockNode),$core.addMethod($core.method({selector:"parameters:",protocol:"accessing",fn:function(e){var t=this;return t["@parameters"]=e,t},messageSends:[]}),$globals.BlockNode),$core.addMethod($core.method({selector:"scope",protocol:"accessing",fn:function(){var e=this,t;return t=e["@scope"],t},messageSends:[]}),$globals.BlockNode),$core.addMethod($core.method({selector:"scope:",protocol:"accessing",fn:function(e){var t=this;return t["@scope"]=e,t},messageSends:[]}),$globals.BlockNode),$core.addMethod($core.method({selector:"subtreeNeedsAliasing",protocol:"testing",fn:function(){var e=this,t;return t=$recv(e._shouldBeAliased())._or_(function(){return e._shouldBeInlined()}),t},messageSends:["or:","shouldBeAliased","shouldBeInlined"]}),$globals.BlockNode),$core.addClass("CascadeNode",$globals.Node,["receiver"],"Compiler-AST"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitCascadeNode_(t),n},messageSends:["visitCascadeNode:"]}),$globals.CascadeNode),$core.addMethod($core.method({selector:"isCascadeNode",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.CascadeNode),$core.addMethod($core.method({selector:"receiver",protocol:"accessing",fn:function(){var e=this,t;return t=e["@receiver"],t},messageSends:[]}),$globals.CascadeNode),$core.addMethod($core.method({selector:"receiver:",protocol:"accessing",fn:function(e){var t=this;return t["@receiver"]=e,t},messageSends:[]}),$globals.CascadeNode),$core.addClass("DynamicArrayNode",$globals.Node,[],"Compiler-AST"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitDynamicArrayNode_(t),n},messageSends:["visitDynamicArrayNode:"]}),$globals.DynamicArrayNode),$core.addClass("DynamicDictionaryNode",$globals.Node,[],"Compiler-AST"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitDynamicDictionaryNode_(t),n},messageSends:["visitDynamicDictionaryNode:"]}),$globals.DynamicDictionaryNode),$core.addClass("JSStatementNode",$globals.Node,[],"Compiler-AST"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitJSStatementNode_(t),n},messageSends:["visitJSStatementNode:"]}),$globals.JSStatementNode),$core.addMethod($core.method({selector:"isJSStatementNode",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.JSStatementNode),$core.addMethod($core.method({selector:"requiresSmalltalkContext",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.JSStatementNode),$core.addClass("MethodNode",$globals.Node,["selector","arguments","source","scope","classReferences","sendIndexes","superSends"],"Compiler-AST"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitMethodNode_(t),n},messageSends:["visitMethodNode:"]}),$globals.MethodNode),$core.addMethod($core.method({selector:"arguments",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@arguments"],(r=t)==null||r.isNil?n=[]:n=t,n},messageSends:["ifNil:"]}),$globals.MethodNode),$core.addMethod($core.method({selector:"arguments:",protocol:"accessing",fn:function(e){var t=this;return t["@arguments"]=e,t},messageSends:[]}),$globals.MethodNode),$core.addMethod($core.method({selector:"classReferences",protocol:"accessing",fn:function(){var e=this,t;return t=e["@classReferences"],t},messageSends:[]}),$globals.MethodNode),$core.addMethod($core.method({selector:"classReferences:",protocol:"accessing",fn:function(e){var t=this;return t["@classReferences"]=e,t},messageSends:[]}),$globals.MethodNode),$core.addMethod($core.method({selector:"messageSends",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._sendIndexes())._keys(),t},messageSends:["keys","sendIndexes"]}),$globals.MethodNode),$core.addMethod($core.method({selector:"method",protocol:"accessing",fn:function(){var e=this;return e},messageSends:[]}),$globals.MethodNode),$core.addMethod($core.method({selector:"scope",protocol:"accessing",fn:function(){var e=this,t;return t=e["@scope"],t},messageSends:[]}),$globals.MethodNode),$core.addMethod($core.method({selector:"scope:",protocol:"accessing",fn:function(e){var t=this;return t["@scope"]=e,t},messageSends:[]}),$globals.MethodNode),$core.addMethod($core.method({selector:"selector",protocol:"accessing",fn:function(){var e=this,t;return t=e["@selector"],t},messageSends:[]}),$globals.MethodNode),$core.addMethod($core.method({selector:"selector:",protocol:"accessing",fn:function(e){var t=this;return t["@selector"]=e,t},messageSends:[]}),$globals.MethodNode),$core.addMethod($core.method({selector:"sendIndexes",protocol:"accessing",fn:function(){var e=this,t;return t=e["@sendIndexes"],t},messageSends:[]}),$globals.MethodNode),$core.addMethod($core.method({selector:"sendIndexes:",protocol:"accessing",fn:function(e){var t=this;return t["@sendIndexes"]=e,t},messageSends:[]}),$globals.MethodNode),$core.addMethod($core.method({selector:"sequenceNode",protocol:"accessing",fn:function(){var e=this,t,n={};try{return $recv(e._nodes())._do_(function(e){t=$recv(e)._isSequenceNode();if($core.assert(t))throw n=[e]}),nil}catch(r){if(r===n)return r[0];throw r}},messageSends:["do:","nodes","ifTrue:","isSequenceNode"]}),$globals.MethodNode),$core.addMethod($core.method({selector:"source",protocol:"accessing",fn:function(){var e=this,t;return t=e["@source"],t},messageSends:[]}),$globals.MethodNode),$core.addMethod($core.method({selector:"source:",protocol:"accessing",fn:function(e){var t=this;return t["@source"]=e,t},messageSends:[]}),$globals.MethodNode),$core.addMethod($core.method({selector:"superSends",protocol:"accessing",fn:function(){var e=this,t;return t=e["@superSends"],t},messageSends:[]}),$globals.MethodNode),$core.addMethod($core.method({selector:"superSends:",protocol:"accessing",fn:function(e){var t=this;return t["@superSends"]=e,t},messageSends:[]}),$globals.MethodNode),$core.addClass("ReturnNode",$globals.Node,["scope"],"Compiler-AST"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitReturnNode_(t),n},messageSends:["visitReturnNode:"]}),$globals.ReturnNode),$core.addMethod($core.method({selector:"isReturnNode",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.ReturnNode),$core.addMethod($core.method({selector:"nonLocalReturn",protocol:"testing",fn:function(){var e=this,t;return t=$recv($recv(e._scope())._isMethodScope())._not(),t},messageSends:["not","isMethodScope","scope"]}),$globals.ReturnNode),$core.addMethod($core.method({selector:"scope",protocol:"accessing",fn:function(){var e=this,t;return t=e["@scope"],t},messageSends:[]}),$globals.ReturnNode),$core.addMethod($core.method({selector:"scope:",protocol:"accessing",fn:function(e){var t=this;return t["@scope"]=e,t},messageSends:[]}),$globals.ReturnNode),$core.addClass("SendNode",$globals.Node,["selector","arguments","receiver","superSend","index"],"Compiler-AST"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitSendNode_(t),n},messageSends:["visitSendNode:"]}),$globals.SendNode),$core.addMethod($core.method({selector:"arguments",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@arguments"],(r=t)==null||r.isNil?(e["@arguments"]=[],n=e["@arguments"]):n=t,n},messageSends:["ifNil:"]}),$globals.SendNode),$core.addMethod($core.method({selector:"arguments:",protocol:"accessing",fn:function(e){var t=this;return t["@arguments"]=e,$recv(e)._do_(function(e){return $recv(e)._parent_(t)}),t},messageSends:["do:","parent:"]}),$globals.SendNode),$core.addMethod($core.method({selector:"cascadeNodeWithMessages:",protocol:"accessing",fn:function(e){function r(){return $globals.SendNode||(typeof SendNode=="undefined"?nil:SendNode)}function i(){return $globals.CascadeNode||(typeof CascadeNode=="undefined"?nil:CascadeNode)}function s(){return $globals.Array||(typeof Array=="undefined"?nil:Array)}var t=this,n,o,u,a,f,l;return o=$recv(r())._new(),$recv(o)._selector_(t._selector()),$recv(o)._arguments_(t._arguments()),u=$recv(o)._yourself(),n=u,a=$recv(i())._new(),$recv(a)._receiver_(t._receiver()),$recv(a)._nodes_($recv($recv(s())._with_(n)).__comma(e)),f=$recv(a)._yourself(),l=f,l},messageSends:["selector:","new","selector","arguments:","arguments","yourself","receiver:","receiver","nodes:",",","with:"]}),$globals.SendNode),$core.addMethod($core.method({selector:"index",protocol:"accessing",fn:function(){var e=this,t;return t=e["@index"],t},messageSends:[]}),$globals.SendNode),$core.addMethod($core.method({selector:"index:",protocol:"accessing",fn:function(e){var t=this;return t["@index"]=e,t},messageSends:[]}),$globals.SendNode),$core.addMethod($core.method({selector:"isCascadeSendNode",protocol:"testing",fn:function(){var e=this,t;return t=$recv(e._parent())._isCascadeNode(),t},messageSends:["isCascadeNode","parent"]}),$globals.SendNode),$core.addMethod($core.method({selector:"isNavigationNode",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.SendNode),$core.addMethod($core.method({selector:"isSendNode",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.SendNode),$core.addMethod($core.method({selector:"navigationLink",protocol:"accessing",fn:function(){var e=this,t;return t=e._selector(),t},messageSends:["selector"]}),$globals.SendNode),$core.addMethod($core.method({selector:"nodes",protocol:"accessing",fn:function(){function t(){return $globals.Array||(typeof Array=="undefined"?nil:Array)}var e=this,n,r,i,s,o,u,a;return n=e._receiver(),(a=n)==null||a.isNil?(r=e._arguments(),i=$recv(r)._copy(),i):(n,s=$recv(t())._with_(e._receiver()),$recv(s)._addAll_(e._arguments()),o=$recv(s)._yourself(),u=o,u)},messageSends:["ifNil:","receiver","copy","arguments","addAll:","with:","yourself"]}),$globals.SendNode),$core.addMethod($core.method({selector:"receiver",protocol:"accessing",fn:function(){var e=this,t;return t=e["@receiver"],t},messageSends:[]}),$globals.SendNode),$core.addMethod($core.method({selector:"receiver:",protocol:"accessing",fn:function(e){var t=this,n;return t["@receiver"]=e,n=$recv(e)._isNode(),$core.assert(n)&&$recv(e)._parent_(t),t},messageSends:["ifTrue:","isNode","parent:"]}),$globals.SendNode),$core.addMethod($core.method({selector:"requiresSmalltalkContext",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.SendNode),$core.addMethod($core.method({selector:"selector",protocol:"accessing",fn:function(){var e=this,t;return t=e["@selector"],t},messageSends:[]}),$globals.SendNode),$core.addMethod($core.method({selector:"selector:",protocol:"accessing",fn:function(e){var t=this;return t["@selector"]=e,t},messageSends:[]}),$globals.SendNode),$core.addMethod($core.method({selector:"shouldBeAliased",protocol:"testing",fn:function(){var e=this,t,n,r;return t=$recv($recv($recv(e._method())._sendIndexes())._at_(e._selector()))._size(),n=$globals.SendNode.superclass.fn.prototype._shouldBeAliased.apply($recv(e),[]),r=$recv(n)._or_(function(){return $recv(e._isReferenced())._and_(function(){return $recv($recv($recv(t).__gt(1))._and_(function(){return $recv(e._index()).__lt(t)}))._or_(function(){return e._superSend()})})}),r},messageSends:["size","at:","sendIndexes","method","selector","or:","shouldBeAliased","and:","isReferenced",">","<","index","superSend"]}),$globals.SendNode),$core.addMethod($core.method({selector:"stopOnStepping",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.SendNode),$core.addMethod($core.method({selector:"superSend",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@superSend"],(r=t)==null||r.isNil?n=!1:n=t,n},messageSends:["ifNil:"]}),$globals.SendNode),$core.addMethod($core.method({selector:"superSend:",protocol:"accessing",fn:function(e){var t=this;return t["@superSend"]=e,t},messageSends:[]}),$globals.SendNode),$core.addMethod($core.method({selector:"valueForReceiver:",protocol:"accessing",fn:function(e){function n(){return $globals.SendNode||(typeof SendNode=="undefined"?nil:SendNode)}var t=this,r,i,s,o,u,a,f;return r=$recv(n())._new(),$recv(r)._position_(t._position()),$recv(r)._source_(t._source()),i=r,s=t._receiver(),(f=s)==null||f.isNil?o=e:o=$recv(t._receiver())._valueForReceiver_(e),$recv(i)._receiver_(o),$recv(r)._selector_(t._selector()),$recv(r)._arguments_(t._arguments()),u=$recv(r)._yourself(),a=u,a},messageSends:["position:","new","position","source:","source","receiver:","ifNil:ifNotNil:","receiver","valueForReceiver:","selector:","selector","arguments:","arguments","yourself"]}),$globals.SendNode),$core.addClass("SequenceNode",$globals.Node,["temps","scope"],"Compiler-AST"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitSequenceNode_(t),n},messageSends:["visitSequenceNode:"]}),$globals.SequenceNode),$core.addMethod($core.method({selector:"asBlockSequenceNode",protocol:"converting",fn:function(){function t(){return $globals.BlockSequenceNode||(typeof BlockSequenceNode=="undefined"?nil:BlockSequenceNode)}var e=this,n,r,i;return n=$recv(t())._new(),$recv(n)._position_(e._position()),$recv(n)._source_(e._source()),$recv(n)._nodes_(e._nodes()),$recv(n)._temps_(e._temps()),r=$recv(n)._yourself(),i=r,i},messageSends:["position:","new","position","source:","source","nodes:","nodes","temps:","temps","yourself"]}),$globals.SequenceNode),$core.addMethod($core.method({selector:"isSequenceNode",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.SequenceNode),$core.addMethod($core.method({selector:"scope",protocol:"accessing",fn:function(){var e=this,t;return t=e["@scope"],t},messageSends:[]}),$globals.SequenceNode),$core.addMethod($core.method({selector:"scope:",protocol:"accessing",fn:function(e){var t=this;return t["@scope"]=e,t},messageSends:[]}),$globals.SequenceNode),$core.addMethod($core.method({selector:"temps",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@temps"],(r=t)==null||r.isNil?n=[]:n=t,n},messageSends:["ifNil:"]}),$globals.SequenceNode),$core.addMethod($core.method({selector:"temps:",protocol:"accessing",fn:function(e){var t=this;return t["@temps"]=e,t},messageSends:[]}),$globals.SequenceNode),$core.addClass("BlockSequenceNode",$globals.SequenceNode,[],"Compiler-AST"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitBlockSequenceNode_(t),n},messageSends:["visitBlockSequenceNode:"]}),$globals.BlockSequenceNode),$core.addMethod($core.method({selector:"isBlockSequenceNode",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.BlockSequenceNode),$core.addClass("ValueNode",$globals.Node,["value"],"Compiler-AST"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitValueNode_(t),n},messageSends:["visitValueNode:"]}),$globals.ValueNode),$core.addMethod($core.method({selector:"isImmutable",protocol:"testing",fn:function(){var e=this,t;return t=$recv(e._value())._isImmutable(),t},messageSends:["isImmutable","value"]}),$globals.ValueNode),$core.addMethod($core.method({selector:"isValueNode",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.ValueNode),$core.addMethod($core.method({selector:"value",protocol:"accessing",fn:function(){var e=this,t;return t=e["@value"],t},messageSends:[]}),$globals.ValueNode),$core.addMethod($core.method({selector:"value:",protocol:"accessing",fn:function(e){var t=this;return t["@value"]=e,t},messageSends:[]}),$globals.ValueNode),$core.addClass("VariableNode",$globals.ValueNode,["assigned","binding"],"Compiler-AST"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitVariableNode_(t),n},messageSends:["visitVariableNode:"]}),$globals.VariableNode),$core.addMethod($core.method({selector:"alias",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._binding())._alias(),t},messageSends:["alias","binding"]}),$globals.VariableNode),$core.addMethod($core.method({selector:"assigned",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@assigned"],(r=t)==null||r.isNil?n=!1:n=t,n},messageSends:["ifNil:"]}),$globals.VariableNode),$core.addMethod($core.method({selector:"assigned:",protocol:"accessing",fn:function(e){var t=this;return t["@assigned"]=e,t},messageSends:[]}),$globals.VariableNode),$core.addMethod($core.method({selector:"beAssigned",protocol:"accessing",fn:function(){var e=this;return $recv(e._binding())._validateAssignment(),e["@assigned"]=!0,e},messageSends:["validateAssignment","binding"]}),$globals.VariableNode),$core.addMethod($core.method({selector:"binding",protocol:"accessing",fn:function(){var e=this,t;return t=e["@binding"],t},messageSends:[]}),$globals.VariableNode),$core.addMethod($core.method({selector:"binding:",protocol:"accessing",fn:function(e){var t=this;return t["@binding"]=e,t},messageSends:[]}),$globals.VariableNode),$core.addMethod($core.method({selector:"isArgument",protocol:"testing",fn:function(){var e=this,t;return t=$recv(e._binding())._isArgVar(),t},messageSends:["isArgVar","binding"]}),$globals.VariableNode),$core.addMethod($core.method({selector:"isImmutable",protocol:"testing",fn:function(){var e=this,t;return t=$recv(e._binding())._isImmutable(),t},messageSends:["isImmutable","binding"]}),$globals.VariableNode),$core.addMethod($core.method({selector:"isNavigationNode",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.VariableNode),$core.addMethod($core.method({selector:"isVariableNode",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.VariableNode),$core.addMethod($core.method({selector:"navigationLink",protocol:"accessing",fn:function(){var e=this,t;return t=e._value(),t},messageSends:["value"]}),$globals.VariableNode),$core.addMethod($core.method({selector:"ast",protocol:"*Compiler-AST",fn:function(){function t(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var e=this,n,r;return n=e._source(),$recv(n)._ifEmpty_(function(){return e._error_("Method source is empty")}),r=$recv(t())._parse_(e._source()),r},messageSends:["ifEmpty:","source","error:","parse:"]}),$globals.CompiledMethod),$core.addMethod($core.method({selector:"isNode",protocol:"*Compiler-AST",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Object)}),define("amber_core/Compiler-Semantic",["amber/boot","amber_core/Kernel-Objects","amber_core/Compiler-Core"],function($boot){"use strict";var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;$core.addPackage("Compiler-Semantic"),$core.packages["Compiler-Semantic"].innerEval=function(expr){return eval(expr)},$core.packages["Compiler-Semantic"].transport={type:"amd",amdNamespace:"amber_core"},$core.addClass("LexicalScope",$globals.Object,["node","instruction","temps","args","outerScope","blockIndex"],"Compiler-Semantic"),$core.addMethod($core.method({selector:"addArg:",protocol:"adding",fn:function(e){function n(){return $globals.ArgVar||(typeof ArgVar=="undefined"?nil:ArgVar)}var t=this,r;return r=t._args(),$recv(r)._at_put_(e,$recv(n())._on_(e)),$recv($recv(t._args())._at_(e))._scope_(t),t},messageSends:["at:put:","args","on:","scope:","at:"]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"addTemp:",protocol:"adding",fn:function(e){function n(){return $globals.TempVar||(typeof TempVar=="undefined"?nil:TempVar)}var t=this,r;return r=t._temps(),$recv(r)._at_put_(e,$recv(n())._on_(e)),$recv($recv(t._temps())._at_(e))._scope_(t),t},messageSends:["at:put:","temps","on:","scope:","at:"]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"alias",protocol:"accessing",fn:function(){var e=this,t;return t="$ctx".__comma($recv(e._scopeLevel())._asString()),t},messageSends:[",","asString","scopeLevel"]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"allVariableNames",protocol:"accessing",fn:function(){var e=this,t,n;return t=$recv(e._args())._keys(),n=$recv(t).__comma($recv(e._temps())._keys()),n},messageSends:[",","keys","args","temps"]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"args",protocol:"accessing",fn:function(){function t(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}var e=this,n,r,i;return n=e["@args"],(i=n)==null||i.isNil?(e["@args"]=$recv(t())._new(),r=e["@args"]):r=n,r},messageSends:["ifNil:","new"]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"bindingFor:",protocol:"accessing",fn:function(e){var t=this,n,r,i,s,o;return n=t._pseudoVars(),r=$recv(e)._value(),o=$recv(n)._at_ifAbsent_(r,function(){return i=t._args(),s=$recv(e)._value(),$recv(i)._at_ifAbsent_(s,function(){return $recv(t._temps())._at_ifAbsent_($recv(e)._value(),function(){return nil})})}),o},messageSends:["at:ifAbsent:","pseudoVars","value","args","temps"]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"blockIndex",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@blockIndex"],(r=t)==null||r.isNil?n=0:n=t,n},messageSends:["ifNil:"]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"blockIndex:",protocol:"accessing",fn:function(e){var t=this;return t["@blockIndex"]=e,t},messageSends:[]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"canInlineNonLocalReturns",protocol:"testing",fn:function(){var e=this,t;return t=$recv(e._isInlined())._and_(function(){return $recv(e._outerScope())._canInlineNonLocalReturns()}),t},messageSends:["and:","isInlined","canInlineNonLocalReturns","outerScope"]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"instruction",protocol:"accessing",fn:function(){var e=this,t;return t=e["@instruction"],t},messageSends:[]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"instruction:",protocol:"accessing",fn:function(e){var t=this;return t["@instruction"]=e,t},messageSends:[]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"isBlockScope",protocol:"testing",fn:function(){var e=this,t;return t=$recv(e._isMethodScope())._not(),t},messageSends:["not","isMethodScope"]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"isInlined",protocol:"testing",fn:function(){var e=this,t,n,r;return t=e._instruction(),n=$recv(t)._notNil(),r=$recv(n)._and_(function(){return $recv(e._instruction())._isInlined()}),r},messageSends:["and:","notNil","instruction","isInlined"]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"isMethodScope",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"lookupVariable:",protocol:"accessing",fn:function(e){var t=this,n,r,i,s,o;return n=t._bindingFor_(e),r=n,(o=r)==null||o.isNil?(i=t._outerScope(),(o=i)==null||o.isNil?n=i:n=$recv(t._outerScope())._lookupVariable_(e),n):r,s=n,s},messageSends:["bindingFor:","ifNil:","ifNotNil:","outerScope","lookupVariable:"]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"methodScope",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e._outerScope(),(r=t)==null||r.isNil?n=t:n=$recv(e._outerScope())._methodScope(),n},messageSends:["ifNotNil:","outerScope","methodScope"]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"node",protocol:"accessing",fn:function(){var e=this,t;return t=e["@node"],t},messageSends:[]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"node:",protocol:"accessing",fn:function(e){var t=this;return t["@node"]=e,t},messageSends:[]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"outerScope",protocol:"accessing",fn:function(){var e=this,t;return t=e["@outerScope"],t},messageSends:[]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"outerScope:",protocol:"accessing",fn:function(e){var t=this;return t["@outerScope"]=e,t},messageSends:[]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"pseudoVars",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._methodScope())._pseudoVars(),t},messageSends:["pseudoVars","methodScope"]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"scopeLevel",protocol:"accessing",fn:function(){var e=this,t,n,r,i,s,o;return t=e._outerScope(),(o=t)==null||o.isNil?1:(t,n=e._isInlined(),$core.assert(n)?(r=e._outerScope(),i=$recv(r)._scopeLevel(),i):(s=$recv($recv(e._outerScope())._scopeLevel()).__plus(1),s))},messageSends:["ifNil:","outerScope","ifTrue:","isInlined","scopeLevel","+"]}),$globals.LexicalScope),$core.addMethod($core.method({selector:"temps",protocol:"accessing",fn:function(){function t(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}var e=this,n,r,i;return n=e["@temps"],(i=n)==null||i.isNil?(e["@temps"]=$recv(t())._new(),r=e["@temps"]):r=n,r},messageSends:["ifNil:","new"]}),$globals.LexicalScope),$core.addClass("MethodLexicalScope",$globals.LexicalScope,["iVars","pseudoVars","unknownVariables","localReturn","nonLocalReturns"],"Compiler-Semantic"),$core.addMethod($core.method({selector:"addIVar:",protocol:"adding",fn:function(e){function n(){return $globals.InstanceVar||(typeof InstanceVar=="undefined"?nil:InstanceVar)}var t=this,r;return r=t._iVars(),$recv(r)._at_put_(e,$recv(n())._on_(e)),$recv($recv(t._iVars())._at_(e))._scope_(t),t},messageSends:["at:put:","iVars","on:","scope:","at:"]}),$globals.MethodLexicalScope),$core.addMethod($core.method({selector:"addNonLocalReturn:",protocol:"adding",fn:function(e){var t=this;return $recv(t._nonLocalReturns())._add_(e),t},messageSends:["add:","nonLocalReturns"]}),$globals.MethodLexicalScope),$core.addMethod($core.method({selector:"allVariableNames",protocol:"accessing",fn:function(){var e=this,t,n;return t=$globals.MethodLexicalScope.superclass.fn.prototype._allVariableNames.apply($recv(e),[]),n=$recv(t).__comma($recv(e._iVars())._keys()),n},messageSends:[",","allVariableNames","keys","iVars"]}),$globals.MethodLexicalScope),$core.addMethod($core.method({selector:"bindingFor:",protocol:"accessing",fn:function(e){var t=this,n,r,i;return n=$globals.MethodLexicalScope.superclass.fn.prototype._bindingFor_.apply($recv(t),[e]),(i=n)==null||i.isNil?r=$recv(t._iVars())._at_ifAbsent_($recv(e)._value(),function(){return nil}):r=n,r},messageSends:["ifNil:","bindingFor:","at:ifAbsent:","iVars","value"]}),$globals.MethodLexicalScope),$core.addMethod($core.method({selector:"canInlineNonLocalReturns",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.MethodLexicalScope),$core.addMethod($core.method({selector:"hasLocalReturn",protocol:"testing",fn:function(){var e=this,t;return t=e._localReturn(),t},messageSends:["localReturn"]}),$globals.MethodLexicalScope),$core.addMethod($core.method({selector:"hasNonLocalReturn",protocol:"testing",fn:function(){var e=this,t;return t=$recv(e._nonLocalReturns())._notEmpty(),t},messageSends:["notEmpty","nonLocalReturns"]}),$globals.MethodLexicalScope),$core.addMethod($core.method({selector:"iVars",protocol:"accessing",fn:function(){function t(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}var e=this,n,r,i;return n=e["@iVars"],(i=n)==null||i.isNil?(e["@iVars"]=$recv(t())._new(),r=e["@iVars"]):r=n,r},messageSends:["ifNil:","new"]}),$globals.MethodLexicalScope),$core.addMethod($core.method({selector:"isMethodScope",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.MethodLexicalScope),$core.addMethod($core.method({selector:"localReturn",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@localReturn"],(r=t)==null||r.isNil?n=!1:n=t,n},messageSends:["ifNil:"]}),$globals.MethodLexicalScope),$core.addMethod($core.method({selector:"localReturn:",protocol:"accessing",fn:function(e){var t=this;return t["@localReturn"]=e,t},messageSends:[]}),$globals.MethodLexicalScope),$core.addMethod($core.method({selector:"methodScope",protocol:"accessing",fn:function(){var e=this;return e},messageSends:[]}),$globals.MethodLexicalScope),$core.addMethod($core.method({selector:"nonLocalReturns",protocol:"accessing",fn:function(){function t(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}var e=this,n,r,i;return n=e["@nonLocalReturns"],(i=n)==null||i.isNil?(e["@nonLocalReturns"]=$recv(t())._new(),r=e["@nonLocalReturns"]):r=n,r},messageSends:["ifNil:","new"]}),$globals.MethodLexicalScope),$core.addMethod($core.method({selector:"pseudoVars",protocol:"accessing",fn:function(){function t(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}function n(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}function r(){return $globals.PseudoVar||(typeof PseudoVar=="undefined"?nil:PseudoVar)}var e=this,i,s,o,u,a;return i=e["@pseudoVars"],(a=i)==null||a.isNil?(e["@pseudoVars"]=$recv(t())._new(),e["@pseudoVars"],$recv($recv(n())._pseudoVariableNames())._do_(function(t){return s=$recv(r())._on_(t),$recv(s)._scope_(e._methodScope()),o=$recv(s)._yourself(),$recv(e["@pseudoVars"])._at_put_(t,o)})):i,u=e["@pseudoVars"],u},messageSends:["ifNil:","new","do:","pseudoVariableNames","at:put:","scope:","on:","methodScope","yourself"]}),$globals.MethodLexicalScope),$core.addMethod($core.method({selector:"removeNonLocalReturn:",protocol:"adding",fn:function(e){var t=this;return $recv(t._nonLocalReturns())._remove_ifAbsent_(e,function(){}),t},messageSends:["remove:ifAbsent:","nonLocalReturns"]}),$globals.MethodLexicalScope),$core.addMethod($core.method({selector:"unknownVariables",protocol:"accessing",fn:function(){function t(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}var e=this,n,r,i;return n=e["@unknownVariables"],(i=n)==null||i.isNil?(e["@unknownVariables"]=$recv(t())._new(),r=e["@unknownVariables"]):r=n,r},messageSends:["ifNil:","new"]}),$globals.MethodLexicalScope),$core.addClass("ScopeVar",$globals.Object,["scope","name"],"Compiler-Semantic"),$core.addMethod($core.method({selector:"alias",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._name())._asVariableName(),t},messageSends:["asVariableName","name"]}),$globals.ScopeVar),$core.addMethod($core.method({selector:"isArgVar",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.ScopeVar),$core.addMethod($core.method({selector:"isClassRefVar",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.ScopeVar),$core.addMethod($core.method({selector:"isImmutable",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.ScopeVar),$core.addMethod($core.method({selector:"isInstanceVar",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.ScopeVar),$core.addMethod($core.method({selector:"isPseudoVar",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.ScopeVar),$core.addMethod($core.method({selector:"isTempVar",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.ScopeVar),$core.addMethod($core.method({selector:"isUnknownVar",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.ScopeVar),$core.addMethod($core.method({selector:"name",protocol:"accessing",fn:function(){var e=this,t;return t=e["@name"],t},messageSends:[]}),$globals.ScopeVar),$core.addMethod($core.method({selector:"name:",protocol:"accessing",fn:function(e){var t=this;return t["@name"]=e,t},messageSends:[]}),$globals.ScopeVar),$core.addMethod($core.method({selector:"scope",protocol:"accessing",fn:function(){var e=this,t;return t=e["@scope"],t},messageSends:[]}),$globals.ScopeVar),$core.addMethod($core.method({selector:"scope:",protocol:"accessing",fn:function(e){var t=this;return t["@scope"]=e,t},messageSends:[]}),$globals.ScopeVar),$core.addMethod($core.method({selector:"validateAssignment",protocol:"testing",fn:function(){function t(){return $globals.InvalidAssignmentError||(typeof InvalidAssignmentError=="undefined"?nil:InvalidAssignmentError)}var e=this,n,r,i;return n=$recv(e._isArgVar())._or_(function(){return e._isPseudoVar()}),$core.assert(n)&&(r=$recv(t())._new(),$recv(r)._variableName_(e._name()),i=$recv(r)._signal(),i),e},messageSends:["ifTrue:","or:","isArgVar","isPseudoVar","variableName:","new","name","signal"]}),$globals.ScopeVar),$core.addMethod($core.method({selector:"on:",protocol:"instance creation",fn:function(e){var t=this,n,r,i;return n=t._new(),$recv(n)._name_(e),r=$recv(n)._yourself(),i=r,i},messageSends:["name:","new","yourself"]}),$globals.ScopeVar.klass),$core.addClass("AliasVar",$globals.ScopeVar,["node"],"Compiler-Semantic"),$core.addMethod($core.method({selector:"node",protocol:"accessing",fn:function(){var e=this,t;return t=e["@node"],t},messageSends:[]}),$globals.AliasVar),$core.addMethod($core.method({selector:"node:",protocol:"accessing",fn:function(e){var t=this;return t["@node"]=e,t},messageSends:[]}),$globals.AliasVar),$core.addClass("ArgVar",$globals.ScopeVar,[],"Compiler-Semantic"),$core.addMethod($core.method({selector:"isArgVar",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.ArgVar),$core.addMethod($core.method({selector:"isImmutable",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.ArgVar),$core.addClass("ClassRefVar",$globals.ScopeVar,[],"Compiler-Semantic"),$core.addMethod($core.method({selector:"alias",protocol:"accessing",fn:function(){var e=this,t;return t=$recv("$".__comma(e._name())).__comma("()"),t},messageSends:[",","name"]}),$globals.ClassRefVar),$core.addMethod($core.method({selector:"isClassRefVar",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.ClassRefVar),$core.addMethod($core.method({selector:"isImmutable",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.ClassRefVar),$core.addClass("InstanceVar",$globals.ScopeVar,[],"Compiler-Semantic"),$core.addMethod($core.method({selector:"alias",protocol:"testing",fn:function(){var e=this,t;return t=$recv('self["@'.__comma(e._name())).__comma('"]'),t},messageSends:[",","name"]}),$globals.InstanceVar),$core.addMethod($core.method({selector:"isInstanceVar",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.InstanceVar),$core.addClass("PseudoVar",$globals.ScopeVar,[],"Compiler-Semantic"),$core.addMethod($core.method({selector:"alias",protocol:"accessing",fn:function(){var e=this,t;return t=e._name(),t},messageSends:["name"]}),$globals.PseudoVar),$core.addMethod($core.method({selector:"isImmutable",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.PseudoVar),$core.addMethod($core.method({selector:"isPseudoVar",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.PseudoVar),$core.addClass("TempVar",$globals.ScopeVar,[],"Compiler-Semantic"),$core.addMethod($core.method({selector:"isTempVar",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.TempVar),$core.addClass("UnknownVar",$globals.ScopeVar,[],"Compiler-Semantic"),$core.addMethod($core.method({selector:"isUnknownVar",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.UnknownVar),$core.addClass("SemanticAnalyzer",$globals.NodeVisitor,["currentScope","blockIndex","thePackage","theClass","classReferences","messageSends","superSends"],"Compiler-Semantic"),$core.addMethod($core.method({selector:"classReferences",protocol:"accessing",fn:function(){function t(){return $globals.Set||(typeof Set=="undefined"?nil:Set)}var e=this,n,r,i;return n=e["@classReferences"],(i=n)==null||i.isNil?(e["@classReferences"]=$recv(t())._new(),r=e["@classReferences"]):r=n,r},messageSends:["ifNil:","new"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"errorShadowingVariable:",protocol:"error handling",fn:function(e){function n(){return $globals.ShadowingVariableError||(typeof ShadowingVariableError=="undefined"?nil:ShadowingVariableError)}var t=this,r,i;return r=$recv(n())._new(),$recv(r)._variableName_(e),i=$recv(r)._signal(),t},messageSends:["variableName:","new","signal"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"errorUnknownVariable:",protocol:"error handling",fn:function(e){function r(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}function i(){return $globals.UnknownVariableError||(typeof UnknownVariableError=="undefined"?nil:UnknownVariableError)}var t=this,n,s,o,u,a,f;return n=$recv(e)._value(),s=$recv($recv($recv($recv(r())._globalJsVariables())._includes_(n))._not())._and_(function(){return t._isVariableUndefined_inPackage_(n,t._thePackage())}),$core.assert(s)?(o=$recv(i())._new(),u=o,a=$recv(e)._value(),$recv(u)._variableName_(a),f=$recv(o)._signal(),f):$recv($recv($recv(t["@currentScope"])._methodScope())._unknownVariables())._add_($recv(e)._value()),t},messageSends:["value","ifTrue:ifFalse:","and:","not","includes:","globalJsVariables","isVariableUndefined:inPackage:","thePackage","variableName:","new","signal","add:","unknownVariables","methodScope"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"isVariableUndefined:inPackage:",protocol:"testing",fn:function(e,t){function r(){return $globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}var n=this,i,s,o,u,a;if((a=t)==null||a.isNil)t;else{var f;f=$recv($recv($recv(t)._imports())._reject_("isString"))._collect_("key"),f,i=$recv(f)._includes_(e);if($core.assert(i))return!1}return s=$recv(r())._new(),o=$recv("typeof ".__comma(e)).__comma(' == "undefined"'),u=$recv(s)._eval_(o),u},messageSends:["ifNotNil:","collect:","reject:","imports","ifTrue:","includes:","eval:","new",","]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"messageSends",protocol:"accessing",fn:function(){function t(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}var e=this,n,r,i;return n=e["@messageSends"],(i=n)==null||i.isNil?(e["@messageSends"]=$recv(t())._new(),r=e["@messageSends"]):r=n,r},messageSends:["ifNil:","new"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"newBlockScope",protocol:"factory",fn:function(){function t(){return $globals.LexicalScope||(typeof LexicalScope=="undefined"?nil:LexicalScope)}var e=this,n;return n=e._newScopeOfClass_(t()),n},messageSends:["newScopeOfClass:"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"newMethodScope",protocol:"factory",fn:function(){function t(){return $globals.MethodLexicalScope||(typeof MethodLexicalScope=="undefined"?nil:MethodLexicalScope)}var e=this,n;return n=e._newScopeOfClass_(t()),n},messageSends:["newScopeOfClass:"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"newScopeOfClass:",protocol:"factory",fn:function(e){var t=this,n,r,i;return n=$recv(e)._new(),$recv(n)._outerScope_(t["@currentScope"]),r=$recv(n)._yourself(),i=r,i},messageSends:["outerScope:","new","yourself"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"nextBlockIndex",protocol:"private",fn:function(){var e=this,t,n,r;return t=e["@blockIndex"],(r=t)==null||r.isNil?(e["@blockIndex"]=0,e["@blockIndex"]):t,e["@blockIndex"]=$recv(e["@blockIndex"]).__plus(1),n=e["@blockIndex"],n},messageSends:["ifNil:","+"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"popScope",protocol:"scope",fn:function(){var e=this,t,n;return t=e["@currentScope"],(n=t)==null||n.isNil?t:(e["@currentScope"]=$recv(e["@currentScope"])._outerScope(),e["@currentScope"]),e},messageSends:["ifNotNil:","outerScope"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"pushScope:",protocol:"scope",fn:function(e){var t=this;return $recv(e)._outerScope_(t["@currentScope"]),t["@currentScope"]=e,t},messageSends:["outerScope:"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"superSends",protocol:"accessing",fn:function(){function t(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}var e=this,n,r,i;return n=e["@superSends"],(i=n)==null||i.isNil?(e["@superSends"]=$recv(t())._new(),r=e["@superSends"]):r=n,r},messageSends:["ifNil:","new"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"theClass",protocol:"accessing",fn:function(){var e=this,t;return t=e["@theClass"],t},messageSends:[]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"theClass:",protocol:"accessing",fn:function(e){var t=this;return t["@theClass"]=e,t},messageSends:[]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"thePackage",protocol:"accessing",fn:function(){var e=this,t;return t=e["@thePackage"],t},messageSends:[]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"thePackage:",protocol:"accessing",fn:function(e){var t=this;return t["@thePackage"]=e,t},messageSends:[]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"validateVariableScope:",protocol:"scope",fn:function(e){var t=this,n,r;return n=$recv(t["@currentScope"])._lookupVariable_(e),(r=n)==null||r.isNil?n:t._errorShadowingVariable_(e),t},messageSends:["ifNotNil:","lookupVariable:","errorShadowingVariable:"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"visitAssignmentNode:",protocol:"visiting",fn:function(e){var t=this;return $globals.SemanticAnalyzer.superclass.fn.prototype._visitAssignmentNode_.apply($recv(t),[e]),$recv($recv(e)._left())._beAssigned(),t},messageSends:["visitAssignmentNode:","beAssigned","left"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"visitBlockNode:",protocol:"visiting",fn:function(e){var t=this;return t._pushScope_(t._newBlockScope()),$recv(e)._scope_(t["@currentScope"]),$recv(t["@currentScope"])._node_(e),$recv(t["@currentScope"])._blockIndex_(t._nextBlockIndex()),$recv($recv(e)._parameters())._do_(function(e){return t._validateVariableScope_(e),$recv(t["@currentScope"])._addArg_(e)}),$globals.SemanticAnalyzer.superclass.fn.prototype._visitBlockNode_.apply($recv(t),[e]),t._popScope(),t},messageSends:["pushScope:","newBlockScope","scope:","node:","blockIndex:","nextBlockIndex","do:","parameters","validateVariableScope:","addArg:","visitBlockNode:","popScope"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"visitCascadeNode:",protocol:"visiting",fn:function(e){var t=this,n,r,i;return $globals.SemanticAnalyzer.superclass.fn.prototype._visitCascadeNode_.apply($recv(t),[e]),n=$recv(e)._nodes(),r=$recv(n)._first(),i=$recv(r)._superSend(),$core.assert(i)&&$recv($recv(e)._nodes())._do_(function(e){return $recv(e)._superSend_(!0)}),t},messageSends:["visitCascadeNode:","ifTrue:","superSend","first","nodes","do:","superSend:"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"visitMethodNode:",protocol:"visiting",fn:function(e){var t=this,n;return t._pushScope_(t._newMethodScope()),$recv(e)._scope_(t["@currentScope"]),$recv(t["@currentScope"])._node_(e),$recv($recv(t._theClass())._allInstanceVariableNames())._do_(function(e){return $recv(t["@currentScope"])._addIVar_(e)}),$recv($recv(e)._arguments())._do_(function(e){return t._validateVariableScope_(e),$recv(t["@currentScope"])._addArg_(e)}),$globals.SemanticAnalyzer.superclass.fn.prototype._visitMethodNode_.apply($recv(t),[e]),$recv(e)._classReferences_(t._classReferences()),$recv(e)._sendIndexes_(t._messageSends()),n=$recv(e)._superSends_($recv(t._superSends())._keys()),t._popScope(),t},messageSends:["pushScope:","newMethodScope","scope:","node:","do:","allInstanceVariableNames","theClass","addIVar:","arguments","validateVariableScope:","addArg:","visitMethodNode:","classReferences:","classReferences","sendIndexes:","messageSends","superSends:","keys","superSends","popScope"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"visitReturnNode:",protocol:"visiting",fn:function(e){var t=this,n;return $recv(e)._scope_(t["@currentScope"]),n=$recv(t["@currentScope"])._isMethodScope(),$core.assert(n)?$recv(t["@currentScope"])._localReturn_(!0):$recv($recv(t["@currentScope"])._methodScope())._addNonLocalReturn_(t["@currentScope"]),$globals.SemanticAnalyzer.superclass.fn.prototype._visitReturnNode_.apply($recv(t),[e]),t},messageSends:["scope:","ifTrue:ifFalse:","isMethodScope","localReturn:","addNonLocalReturn:","methodScope","visitReturnNode:"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"visitSendNode:",protocol:"visiting",fn:function(e){function n(){return $globals.Set||(typeof Set=="undefined"?nil:Set)}function r(){return $globals.IRSendInliner||(typeof IRSendInliner=="undefined"?nil:IRSendInliner)}var t=this,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S;i=$recv(e)._receiver(),s=$recv(i)._value(),o=$recv(s).__eq("super");if($core.assert(o))$recv(e)._superSend_(!0),u=$recv(e)._receiver(),$recv(u)._value_("self"),a=t._superSends(),f=$recv(e)._selector(),$recv(a)._at_ifAbsentPut_(f,function(){return $recv(n())._new()}),l=t._superSends(),c=$recv(e)._selector(),h=$recv(l)._at_(c),$recv(h)._add_(e);else{p=$recv(r())._inlinedSelectors(),d=$recv(e)._selector(),v=$recv(p)._includes_(d);if($core.assert(v)){$recv(e)._shouldBeInlined_(!0),m=$recv(e)._receiver();if((S=m)==null||S.isNil)m;else{var x;x=S,$recv(x)._shouldBeAliased_(!0)}}}return g=t._messageSends(),y=$recv(e)._selector(),$recv(g)._at_ifAbsentPut_(y,function(){return $recv(n())._new()}),b=t._messageSends(),w=$recv(e)._selector(),E=$recv(b)._at_(w),$recv(E)._add_(e),$recv(e)._index_($recv($recv(t._messageSends())._at_($recv(e)._selector()))._size()),$globals.SemanticAnalyzer.superclass.fn.prototype._visitSendNode_.apply($recv(t),[e]),t},messageSends:["ifTrue:ifFalse:","=","value","receiver","superSend:","value:","at:ifAbsentPut:","superSends","selector","new","add:","at:","ifTrue:","includes:","inlinedSelectors","shouldBeInlined:","ifNotNil:","shouldBeAliased:","messageSends","index:","size","visitSendNode:"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"visitSequenceNode:",protocol:"visiting",fn:function(e){var t=this;return $recv($recv(e)._temps())._do_(function(e){return t._validateVariableScope_(e),$recv(t["@currentScope"])._addTemp_(e)}),$globals.SemanticAnalyzer.superclass.fn.prototype._visitSequenceNode_.apply($recv(t),[e]),t},messageSends:["do:","temps","validateVariableScope:","addTemp:","visitSequenceNode:"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"visitVariableNode:",protocol:"visiting",fn:function(e){function r(){return $globals.ClassRefVar||(typeof ClassRefVar=="undefined"?nil:ClassRefVar)}function i(){return $globals.UnknownVar||(typeof UnknownVar=="undefined"?nil:UnknownVar)}var t=this,n,s,o,u,a,f,l,c,h,p,d,v,m;return n=$recv(t["@currentScope"])._lookupVariable_(e),s=n,(m=s)==null||m.isNil?(o=$recv(e)._value(),u=$recv(o)._isCapitalized(),$core.assert(u)?(a=$recv(r())._new(),f=a,l=$recv(e)._value(),$recv(f)._name_(l),c=$recv(a)._yourself(),n=c,n,h=t._classReferences(),p=$recv(e)._value(),$recv(h)._add_(p)):(t._errorUnknownVariable_(e),d=$recv(i())._new(),$recv(d)._name_($recv(e)._value()),v=$recv(d)._yourself(),n=v,n)):s,$recv(e)._binding_(n),t},messageSends:["lookupVariable:","ifNil:","ifTrue:ifFalse:","isCapitalized","value","name:","new","yourself","add:","classReferences","errorUnknownVariable:","binding:"]}),$globals.SemanticAnalyzer),$core.addMethod($core.method({selector:"on:",protocol:"instance creation",fn:function(e){var t=this,n,r,i;return n=t._new(),$recv(n)._theClass_(e),r=$recv(n)._yourself(),i=r,i},messageSends:["theClass:","new","yourself"]}),$globals.SemanticAnalyzer.klass)}),define("amber_core/Compiler-IR",["amber/boot","amber_core/Compiler-Core","amber_core/Kernel-Objects","amber_core/Kernel-Methods"],function($boot){"use strict";var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;$core.addPackage("Compiler-IR"),$core.packages["Compiler-IR"].innerEval=function(expr){return eval(expr)},$core.packages["Compiler-IR"].transport={type:"amd",amdNamespace:"amber_core"},$core.addClass("IRASTTranslator",$globals.NodeVisitor,["source","theClass","method","sequence","nextAlias"],"Compiler-IR"),$core.addMethod($core.method({selector:"alias:",protocol:"visiting",fn:function(e){function r(){return $globals.IRVariable||(typeof IRVariable=="undefined"?nil:IRVariable)}function i(){return $globals.AliasVar||(typeof AliasVar=="undefined"?nil:AliasVar)}function s(){return $globals.IRAssignment||(typeof IRAssignment=="undefined"?nil:IRAssignment)}var t=this,n,o,u,a,f,l,c,h,p,d,v,m,g;return o=$recv(e)._isImmutable(),$core.assert(o)?(u=t._visit_(e),u):(a=$recv(r())._new(),f=a,l=$recv(i())._new(),c=$recv(l)._name_("$".__comma(t._nextAlias())),$recv(f)._variable_(c),h=$recv(a)._yourself(),n=h,p=t._sequence(),d=$recv(s())._new(),$recv(d)._add_(n),$recv(d)._add_(t._visit_(e)),v=$recv(d)._yourself(),m=v,$recv(p)._add_(m),$recv($recv(t._method())._internalVariables())._add_(n),g=n,g)},messageSends:["ifTrue:","isImmutable","visit:","variable:","new","name:",",","nextAlias","yourself","add:","sequence","internalVariables","method"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"aliasTemporally:",protocol:"visiting",fn:function(e){function i(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}var t=this,n,r,s,o,u,a,f;return n=0,$recv(e)._withIndexDo_(function(e,t){s=$recv(e)._subtreeNeedsAliasing();if($core.assert(s))return n=t,n}),r=$recv(i())._new(),$recv(e)._withIndexDo_(function(e,i){return o=r,u=$recv(i).__lt_eq(n),$core.assert(u)?a=t._alias_(e):a=t._visit_(e),$recv(o)._add_(a)}),f=r,f},messageSends:["withIndexDo:","ifTrue:","subtreeNeedsAliasing","new","add:","ifTrue:ifFalse:","<=","alias:","visit:"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"method",protocol:"accessing",fn:function(){var e=this,t;return t=e["@method"],t},messageSends:[]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"method:",protocol:"accessing",fn:function(e){var t=this;return t["@method"]=e,t},messageSends:[]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"nextAlias",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@nextAlias"],(r=t)==null||r.isNil?(e["@nextAlias"]=0,e["@nextAlias"]):t,e["@nextAlias"]=$recv(e["@nextAlias"]).__plus(1),n=$recv(e["@nextAlias"])._asString(),n},messageSends:["ifNil:","+","asString"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"sequence",protocol:"accessing",fn:function(){var e=this,t;return t=e["@sequence"],t},messageSends:[]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"sequence:",protocol:"accessing",fn:function(e){var t=this;return t["@sequence"]=e,t},messageSends:[]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"source",protocol:"accessing",fn:function(){var e=this,t;return t=e["@source"],t},messageSends:[]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"source:",protocol:"accessing",fn:function(e){var t=this;return t["@source"]=e,t},messageSends:[]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"theClass",protocol:"accessing",fn:function(){var e=this,t;return t=e["@theClass"],t},messageSends:[]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"theClass:",protocol:"accessing",fn:function(e){var t=this;return t["@theClass"]=e,t},messageSends:[]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"visitAssignmentNode:",protocol:"visiting",fn:function(e){function s(){return $globals.IRAssignment||(typeof IRAssignment=="undefined"?nil:IRAssignment)}var t=this,n,r,i,o,u,a,f,l;return r=t._visit_($recv(e)._right()),n=t._visit_($recv(e)._left()),o=t._sequence(),u=$recv(s())._new(),$recv(u)._add_(n),$recv(u)._add_(r),a=$recv(u)._yourself(),f=a,$recv(o)._add_(f),l=n,l},messageSends:["visit:","right","left","add:","sequence","new","yourself"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"visitBlockNode:",protocol:"visiting",fn:function(e){function r(){return $globals.IRClosure||(typeof IRClosure=="undefined"?nil:IRClosure)}function i(){return $globals.IRTempDeclaration||(typeof IRTempDeclaration=="undefined"?nil:IRTempDeclaration)}var t=this,n,s,o,u,a,f,l,c,h,p;return s=$recv(r())._new(),$recv(s)._arguments_($recv(e)._parameters()),$recv(s)._requiresSmalltalkContext_($recv(e)._requiresSmalltalkContext()),o=s,u=$recv(e)._scope(),$recv(o)._scope_(u),a=$recv(s)._yourself(),n=a,f=$recv(e)._scope(),l=$recv(f)._temps(),$recv(l)._do_(function(t){return c=$recv(i())._new(),$recv(c)._name_($recv(t)._name()),$recv(c)._scope_($recv(e)._scope()),h=$recv(c)._yourself(),$recv(n)._add_(h)}),$recv($recv(e)._nodes())._do_(function(e){return $recv(n)._add_(t._visit_(e))}),p=n,p},messageSends:["arguments:","new","parameters","requiresSmalltalkContext:","requiresSmalltalkContext","scope:","scope","yourself","do:","temps","add:","name:","name","nodes","visit:"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"visitBlockSequenceNode:",protocol:"visiting",fn:function(e){function n(){return $globals.IRBlockSequence||(typeof IRBlockSequence=="undefined"?nil:IRBlockSequence)}function r(){return $globals.IRBlockReturn||(typeof IRBlockReturn=="undefined"?nil:IRBlockReturn)}var t=this,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E;return i=$recv(n())._new(),E=t._withSequence_do_(i,function(){return s=$recv(e)._nodes(),$recv(s)._ifNotEmpty_(function(){return o=$recv(e)._nodes(),u=$recv(o)._allButLast(),$recv(u)._do_(function(e){return a=t._sequence(),f=t._visitOrAlias_(e),$recv(a)._add_(f)}),l=$recv(e)._nodes(),c=$recv(l)._last(),h=$recv(c)._isReturnNode(),$core.assert(h)?$recv(t._sequence())._add_(t._visitOrAlias_($recv($recv(e)._nodes())._last())):(p=t._sequence(),d=$recv(r())._new(),v=d,m=$recv(e)._nodes(),g=$recv(m)._last(),y=t._visitOrAlias_(g),$recv(v)._add_(y),b=$recv(d)._yourself(),w=b,$recv(p)._add_(w))})}),E},messageSends:["withSequence:do:","new","ifNotEmpty:","nodes","do:","allButLast","add:","sequence","visitOrAlias:","ifFalse:ifTrue:","isReturnNode","last","yourself"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"visitCascadeNode:",protocol:"visiting",fn:function(e){function i(){return $globals.VariableNode||(typeof VariableNode=="undefined"?nil:VariableNode)}var t=this,n,r,s,o,u,a,f,l;return s=$recv(e)._receiver(),o=$recv(s)._isImmutable(),$core.assert(o)?(r=$recv(e)._receiver(),r):(n=t._alias_($recv(e)._receiver()),n,r=$recv($recv(i())._new())._binding_($recv(n)._variable()),r),u=$recv(e)._nodes(),$recv(u)._do_(function(e){return $recv(e)._receiver_(r)}),a=$recv(e)._nodes(),f=$recv(a)._allButLast(),$recv(f)._do_(function(e){return $recv(t._sequence())._add_(t._visit_(e))}),l=t._alias_($recv($recv(e)._nodes())._last()),l},messageSends:["ifTrue:ifFalse:","isImmutable","receiver","alias:","binding:","new","variable","do:","nodes","receiver:","allButLast","add:","sequence","visit:","last"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"visitDynamicArrayNode:",protocol:"visiting",fn:function(e){function r(){return $globals.IRDynamicArray||(typeof IRDynamicArray=="undefined"?nil:IRDynamicArray)}var t=this,n,i;return n=$recv(r())._new(),$recv(t._aliasTemporally_($recv(e)._nodes()))._do_(function(e){return $recv(n)._add_(e)}),i=n,i},messageSends:["new","do:","aliasTemporally:","nodes","add:"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"visitDynamicDictionaryNode:",protocol:"visiting",fn:function(e){function r(){return $globals.IRDynamicDictionary||(typeof IRDynamicDictionary=="undefined"?nil:IRDynamicDictionary)}var t=this,n,i;return n=$recv(r())._new(),$recv(t._aliasTemporally_($recv(e)._nodes()))._do_(function(e){return $recv(n)._add_(e)}),i=n,i},messageSends:["new","do:","aliasTemporally:","nodes","add:"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"visitJSStatementNode:",protocol:"visiting",fn:function(e){function n(){return $globals.IRVerbatim||(typeof IRVerbatim=="undefined"?nil:IRVerbatim)}var t=this,r,i,s;return r=$recv(n())._new(),$recv(r)._source_($recv($recv(e)._source())._crlfSanitized()),i=$recv(r)._yourself(),s=i,s},messageSends:["source:","new","crlfSanitized","source","yourself"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"visitMethodNode:",protocol:"visiting",fn:function(e){function n(){return $globals.IRMethod||(typeof IRMethod=="undefined"?nil:IRMethod)}function r(){return $globals.IRTempDeclaration||(typeof IRTempDeclaration=="undefined"?nil:IRTempDeclaration)}function i(){return $globals.IRReturn||(typeof IRReturn=="undefined"?nil:IRReturn)}function s(){return $globals.IRVariable||(typeof IRVariable=="undefined"?nil:IRVariable)}function o(){return $globals.IRVerbatim||(typeof IRVerbatim=="undefined"?nil:IRVerbatim)}var t=this,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H;return u=$recv(n())._new(),$recv(u)._source_($recv(t._source())._crlfSanitized()),$recv(u)._theClass_(t._theClass()),$recv(u)._arguments_($recv(e)._arguments()),$recv(u)._selector_($recv(e)._selector()),$recv(u)._sendIndexes_($recv(e)._sendIndexes()),$recv(u)._superSends_($recv(e)._superSends()),$recv(u)._requiresSmalltalkContext_($recv(e)._requiresSmalltalkContext()),$recv(u)._classReferences_($recv(e)._classReferences()),a=u,f=$recv(e)._scope(),$recv(a)._scope_(f),l=$recv(u)._yourself(),c=l,t._method_(c),h=$recv(e)._scope(),p=$recv(h)._temps(),$recv(p)._do_(function(n){return d=t._method(),v=$recv(r())._new(),$recv(v)._name_($recv(n)._name()),m=v,g=$recv(e)._scope(),$recv(m)._scope_(g),y=$recv(v)._yourself(),b=y,$recv(d)._add_(b)}),$recv($recv(e)._nodes())._do_(function(e){return w=t._method(),$recv(w)._add_(t._visit_(e))}),E=$recv(e)._scope(),S=$recv(E)._hasLocalReturn(),$core.assert(S)||(x=t._method(),T=x,N=$recv(i())._new(),C=N,k=$recv(s())._new(),$recv(k)._variable_($recv($recv($recv(e)._scope())._pseudoVars())._at_("self")),L=$recv(k)._yourself(),A=L,$recv(C)._add_(A),O=$recv(N)._yourself(),M=O,$recv(T)._add_(M),_=$recv(o())._new(),$recv(_)._source_(""),D=$recv(_)._yourself(),P=$recv(x)._add_(D),P),H=t._method(),H},messageSends:["method:","source:","new","crlfSanitized","source","theClass:","theClass","arguments:","arguments","selector:","selector","sendIndexes:","sendIndexes","superSends:","superSends","requiresSmalltalkContext:","requiresSmalltalkContext","classReferences:","classReferences","scope:","scope","yourself","do:","temps","add:","method","name:","name","nodes","visit:","ifFalse:","hasLocalReturn","variable:","at:","pseudoVars"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"visitOrAlias:",protocol:"visiting",fn:function(e){var t=this,n,r;return n=$recv(e)._shouldBeAliased(),$core.assert(n)?r=t._alias_(e):r=t._visit_(e),r},messageSends:["ifTrue:ifFalse:","shouldBeAliased","alias:","visit:"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"visitReturnNode:",protocol:"visiting",fn:function(e){function r(){return $globals.IRNonLocalReturn||(typeof IRNonLocalReturn=="undefined"?nil:IRNonLocalReturn)}function i(){return $globals.IRReturn||(typeof IRReturn=="undefined"?nil:IRReturn)}var t=this,n,s,o;return s=$recv(e)._nonLocalReturn(),$core.assert(s)?n=$recv(r())._new():n=$recv(i())._new(),$recv(n)._scope_($recv(e)._scope()),$recv($recv(e)._nodes())._do_(function(e){return $recv(n)._add_(t._alias_(e))}),o=n,o},messageSends:["ifTrue:ifFalse:","nonLocalReturn","new","scope:","scope","do:","nodes","add:","alias:"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"visitSendNode:",protocol:"visiting",fn:function(e){function o(){return $globals.IRSend||(typeof IRSend=="undefined"?nil:IRSend)}var t=this,n,r,i,s,u,a,f,l;return n=$recv(o())._new(),u=n,$recv(u)._selector_($recv(e)._selector()),a=$recv(u)._index_($recv(e)._index()),f=$recv(e)._superSend(),$core.assert(f)&&$recv(n)._classSend_($recv(t._theClass())._superclass()),r=t._aliasTemporally_($recv([$recv(e)._receiver()]).__comma($recv(e)._arguments())),i=$recv(r)._first(),s=$recv(r)._allButFirst(),$recv(n)._add_(i),$recv(s)._do_(function(e){return $recv(n)._add_(e)}),l=n,l},messageSends:["new","selector:","selector","index:","index","ifTrue:","superSend","classSend:","superclass","theClass","aliasTemporally:",",","receiver","arguments","first","allButFirst","add:","do:"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"visitSequenceNode:",protocol:"visiting",fn:function(e){function n(){return $globals.IRSequence||(typeof IRSequence=="undefined"?nil:IRSequence)}var t=this,r,i;return i=t._withSequence_do_($recv(n())._new(),function(){return $recv($recv(e)._nodes())._do_(function(e){var n;n=t._visitOrAlias_(e),n,r=$recv(n)._isVariable();if(!$core.assert(r))return $recv(t._sequence())._add_(n)})}),i},messageSends:["withSequence:do:","new","do:","nodes","visitOrAlias:","ifFalse:","isVariable","add:","sequence"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"visitValueNode:",protocol:"visiting",fn:function(e){function n(){return $globals.IRValue||(typeof IRValue=="undefined"?nil:IRValue)}var t=this,r,i,s;return r=$recv(n())._new(),$recv(r)._value_($recv(e)._value()),i=$recv(r)._yourself(),s=i,s},messageSends:["value:","new","value","yourself"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"visitVariableNode:",protocol:"visiting",fn:function(e){function n(){return $globals.IRVariable||(typeof IRVariable=="undefined"?nil:IRVariable)}var t=this,r,i,s;return r=$recv(n())._new(),$recv(r)._variable_($recv(e)._binding()),i=$recv(r)._yourself(),s=i,s},messageSends:["variable:","new","binding","yourself"]}),$globals.IRASTTranslator),$core.addMethod($core.method({selector:"withSequence:do:",protocol:"accessing",fn:function(e,t){var n=this,r;return r=n._sequence(),n._sequence_(e),$recv(t)._value(),n._sequence_(r),e},messageSends:["sequence","sequence:","value"]}),$globals.IRASTTranslator),$core.addClass("IRInstruction",$globals.Object,["parent","instructions"],"Compiler-IR"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRInstruction_(t),n},messageSends:["visitIRInstruction:"]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"add:",protocol:"building",fn:function(e){var t=this,n;return $recv(e)._parent_(t),n=$recv(t._instructions())._add_(e),n},messageSends:["parent:","add:","instructions"]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"canBeAssigned",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"instructions",protocol:"accessing",fn:function(){function t(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}var e=this,n,r,i;return n=e["@instructions"],(i=n)==null||i.isNil?(e["@instructions"]=$recv(t())._new(),r=e["@instructions"]):r=n,r},messageSends:["ifNil:","new"]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"isClosure",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"isInlined",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"isLocalReturn",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"isMethod",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"isReturn",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"isSend",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"isSequence",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"isTempDeclaration",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"isVariable",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"method",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._parent())._method(),t},messageSends:["method","parent"]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"needsBoxingAsReceiver",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"parent",protocol:"accessing",fn:function(){var e=this,t;return t=e["@parent"],t},messageSends:[]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"parent:",protocol:"accessing",fn:function(e){var t=this;return t["@parent"]=e,t},messageSends:[]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"remove",protocol:"building",fn:function(){var e=this;return $recv(e._parent())._remove_(e),e},messageSends:["remove:","parent"]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"remove:",protocol:"building",fn:function(e){var t=this;return $recv(t._instructions())._remove_(e),t},messageSends:["remove:","instructions"]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"replace:with:",protocol:"building",fn:function(e,t){var n=this,r;return $recv(t)._parent_(n),r=n._instructions(),$recv(r)._at_put_($recv(n._instructions())._indexOf_(e),t),n},messageSends:["parent:","at:put:","instructions","indexOf:"]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"replaceWith:",protocol:"building",fn:function(e){var t=this;return $recv(t._parent())._replace_with_(t,e),t},messageSends:["replace:with:","parent"]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"scope",protocol:"accessing",fn:function(){var e=this,t,n,r;t=e._parent();if((r=t)==null||r.isNil)n=t;else{var i;i=r,n=$recv(i)._scope()}return n},messageSends:["ifNotNil:","parent","scope"]}),$globals.IRInstruction),$core.addMethod($core.method({selector:"on:",protocol:"instance creation",fn:function(e){var t=this,n,r,i;return n=t._new(),$recv(n)._builder_(e),r=$recv(n)._yourself(),i=r,i},messageSends:["builder:","new","yourself"]}),$globals.IRInstruction.klass),$core.addClass("IRAssignment",$globals.IRInstruction,[],"Compiler-IR"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRAssignment_(t),n},messageSends:["visitIRAssignment:"]}),$globals.IRAssignment),$core.addClass("IRDynamicArray",$globals.IRInstruction,[],"Compiler-IR"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRDynamicArray_(t),n},messageSends:["visitIRDynamicArray:"]}),$globals.IRDynamicArray),$core.addClass("IRDynamicDictionary",$globals.IRInstruction,[],"Compiler-IR"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRDynamicDictionary_(t),n},messageSends:["visitIRDynamicDictionary:"]}),$globals.IRDynamicDictionary),$core.addClass("IRScopedInstruction",$globals.IRInstruction,["scope"],"Compiler-IR"),$core.addMethod($core.method({selector:"scope",protocol:"accessing",fn:function(){var e=this,t;return t=e["@scope"],t},messageSends:[]}),$globals.IRScopedInstruction),$core.addMethod($core.method({selector:"scope:",protocol:"accessing",fn:function(e){var t=this;return t["@scope"]=e,t},messageSends:[]}),$globals.IRScopedInstruction),$core.addClass("IRClosureInstruction",$globals.IRScopedInstruction,["arguments","requiresSmalltalkContext"],"Compiler-IR"),$core.addMethod($core.method({selector:"arguments",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@arguments"],(r=t)==null||r.isNil?n=[]:n=t,n},messageSends:["ifNil:"]}),$globals.IRClosureInstruction),$core.addMethod($core.method({selector:"arguments:",protocol:"accessing",fn:function(e){var t=this;return t["@arguments"]=e,t},messageSends:[]}),$globals.IRClosureInstruction),$core.addMethod($core.method({selector:"locals",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=$recv(e._arguments())._copy(),$recv(t)._addAll_($recv(e._tempDeclarations())._collect_(function(e){return $recv(e)._name()})),n=$recv(t)._yourself(),r=n,r},messageSends:["addAll:","copy","arguments","collect:","tempDeclarations","name","yourself"]}),$globals.IRClosureInstruction),$core.addMethod($core.method({selector:"requiresSmalltalkContext",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@requiresSmalltalkContext"],(r=t)==null||r.isNil?n=!1:n=t,n},messageSends:["ifNil:"]}),$globals.IRClosureInstruction),$core.addMethod($core.method({selector:"requiresSmalltalkContext:",protocol:"accessing",fn:function(e){var t=this;return t["@requiresSmalltalkContext"]=e,t},messageSends:[]}),$globals.IRClosureInstruction),$core.addMethod($core.method({selector:"scope:",protocol:"accessing",fn:function(e){var t=this;return $globals.IRClosureInstruction.superclass.fn.prototype._scope_.apply($recv(t),[e]),$recv(e)._instruction_(t),t},messageSends:["scope:","instruction:"]}),$globals.IRClosureInstruction),$core.addMethod($core.method({selector:"tempDeclarations",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._instructions())._select_(function(e){return $recv(e)._isTempDeclaration()}),t},messageSends:["select:","instructions","isTempDeclaration"]}),$globals.IRClosureInstruction),$core.addClass("IRClosure",$globals.IRClosureInstruction,[],"Compiler-IR"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRClosure_(t),n},messageSends:["visitIRClosure:"]}),$globals.IRClosure),$core.addMethod($core.method({selector:"isClosure",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.IRClosure),$core.addMethod($core.method({selector:"sequence",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._instructions())._last(),t},messageSends:["last","instructions"]}),$globals.IRClosure),$core.addClass("IRMethod",$globals.IRClosureInstruction,["theClass","source","selector","classReferences","sendIndexes","superSends","requiresSmalltalkContext","internalVariables"],"Compiler-IR"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRMethod_(t),n},messageSends:["visitIRMethod:"]}),$globals.IRMethod),$core.addMethod($core.method({selector:"classReferences",protocol:"accessing",fn:function(){var e=this,t;return t=e["@classReferences"],t},messageSends:[]}),$globals.IRMethod),$core.addMethod($core.method({selector:"classReferences:",protocol:"accessing",fn:function(e){var t=this;return t["@classReferences"]=e,t},messageSends:[]}),$globals.IRMethod),$core.addMethod($core.method({selector:"internalVariables",protocol:"accessing",fn:function(){function t(){return $globals.Set||(typeof Set=="undefined"?nil:Set)}var e=this,n,r,i;return n=e["@internalVariables"],(i=n)==null||i.isNil?(e["@internalVariables"]=$recv(t())._new(),r=e["@internalVariables"]):r=n,r},messageSends:["ifNil:","new"]}),$globals.IRMethod),$core.addMethod($core.method({selector:"isMethod",protocol:"accessing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.IRMethod),$core.addMethod($core.method({selector:"messageSends",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._sendIndexes())._keys(),t},messageSends:["keys","sendIndexes"]}),$globals.IRMethod),$core.addMethod($core.method({selector:"method",protocol:"accessing",fn:function(){var e=this;return e},messageSends:[]}),$globals.IRMethod),$core.addMethod($core.method({selector:"selector",protocol:"accessing",fn:function(){var e=this,t;return t=e["@selector"],t},messageSends:[]}),$globals.IRMethod),$core.addMethod($core.method({selector:"selector:",protocol:"accessing",fn:function(e){var t=this;return t["@selector"]=e,t},messageSends:[]}),$globals.IRMethod),$core.addMethod($core.method({selector:"sendIndexes",protocol:"accessing",fn:function(){var e=this,t;return t=e["@sendIndexes"],t},messageSends:[]}),$globals.IRMethod),$core.addMethod($core.method({selector:"sendIndexes:",protocol:"accessing",fn:function(e){var t=this;return t["@sendIndexes"]=e,t},messageSends:[]}),$globals.IRMethod),$core.addMethod($core.method({selector:"source",protocol:"accessing",fn:function(){var e=this,t;return t=e["@source"],t},messageSends:[]}),$globals.IRMethod),$core.addMethod($core.method({selector:"source:",protocol:"accessing",fn:function(e){var t=this;return t["@source"]=e,t},messageSends:[]}),$globals.IRMethod),$core.addMethod($core.method({selector:"superSends",protocol:"accessing",fn:function(){var e=this,t;return t=e["@superSends"],t},messageSends:[]}),$globals.IRMethod),$core.addMethod($core.method({selector:"superSends:",protocol:"accessing",fn:function(e){var t=this;return t["@superSends"]=e,t},messageSends:[]}),$globals.IRMethod),$core.addMethod($core.method({selector:"theClass",protocol:"accessing",fn:function(){var e=this,t;return t=e["@theClass"],t},messageSends:[]}),$globals.IRMethod),$core.addMethod($core.method({selector:"theClass:",protocol:"accessing",fn:function(e){var t=this;return t["@theClass"]=e,t},messageSends:[]}),$globals.IRMethod),$core.addClass("IRReturn",$globals.IRScopedInstruction,[],"Compiler-IR"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRReturn_(t),n},messageSends:["visitIRReturn:"]}),$globals.IRReturn),$core.addMethod($core.method({selector:"canBeAssigned",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.IRReturn),$core.addMethod($core.method({selector:"isBlockReturn",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.IRReturn),$core.addMethod($core.method({selector:"isLocalReturn",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.IRReturn),$core.addMethod($core.method({selector:"isNonLocalReturn",protocol:"testing",fn:function(){var e=this,t;return t=$recv(e._isLocalReturn())._not(),t},messageSends:["not","isLocalReturn"]}),$globals.IRReturn),$core.addMethod($core.method({selector:"isReturn",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.IRReturn),$core.addMethod($core.method({selector:"scope",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@scope"],(r=t)==null||r.isNil?n=$recv(e._parent())._scope():n=t,n},messageSends:["ifNil:","scope","parent"]}),$globals.IRReturn),$core.addClass("IRBlockReturn",$globals.IRReturn,[],"Compiler-IR"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRBlockReturn_(t),n},messageSends:["visitIRBlockReturn:"]}),$globals.IRBlockReturn),$core.addMethod($core.method({selector:"isBlockReturn",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.IRBlockReturn),$core.addClass("IRNonLocalReturn",$globals.IRReturn,[],"Compiler-IR"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRNonLocalReturn_(t),n},messageSends:["visitIRNonLocalReturn:"]}),$globals.IRNonLocalReturn),$core.addMethod($core.method({selector:"isLocalReturn",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.IRNonLocalReturn),$core.addClass("IRTempDeclaration",$globals.IRScopedInstruction,["name"],"Compiler-IR"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRTempDeclaration_(t),n},messageSends:["visitIRTempDeclaration:"]}),$globals.IRTempDeclaration),$core.addMethod($core.method({selector:"isTempDeclaration",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.IRTempDeclaration),$core.addMethod($core.method({selector:"name",protocol:"accessing",fn:function(){var e=this,t;return t=e["@name"],t},messageSends:[]}),$globals.IRTempDeclaration),$core.addMethod($core.method({selector:"name:",protocol:"accessing",fn:function(e){var t=this;return t["@name"]=e,t},messageSends:[]}),$globals.IRTempDeclaration),$core.addClass("IRSend",$globals.IRInstruction,["selector","classSend","index"],"Compiler-IR"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRSend_(t),n},messageSends:["visitIRSend:"]}),$globals.IRSend),$core.addMethod($core.method({selector:"classSend",protocol:"accessing",fn:function(){var e=this,t;return t=e["@classSend"],t},messageSends:[]}),$globals.IRSend),$core.addMethod($core.method({selector:"classSend:",protocol:"accessing",fn:function(e){var t=this;return t["@classSend"]=e,t},messageSends:[]}),$globals.IRSend),$core.addMethod($core.method({selector:"index",protocol:"accessing",fn:function(){var e=this,t;return t=e["@index"],t},messageSends:[]}),$globals.IRSend),$core.addMethod($core.method({selector:"index:",protocol:"accessing",fn:function(e){var t=this;return t["@index"]=e,t},messageSends:[]}),$globals.IRSend),$core.addMethod($core.method({selector:"isSend",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.IRSend),$core.addMethod($core.method({selector:"selector",protocol:"accessing",fn:function(){var e=this,t;return t=e["@selector"],t},messageSends:[]}),$globals.IRSend),$core.addMethod($core.method({selector:"selector:",protocol:"accessing",fn:function(e){var t=this;return t["@selector"]=e,t},messageSends:[]}),$globals.IRSend),$core.addClass("IRSequence",$globals.IRInstruction,[],"Compiler-IR"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRSequence_(t),n},messageSends:["visitIRSequence:"]}),$globals.IRSequence),$core.addMethod($core.method({selector:"isSequence",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.IRSequence),$core.addClass("IRBlockSequence",$globals.IRSequence,[],"Compiler-IR"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRBlockSequence_(t),n},messageSends:["visitIRBlockSequence:"]}),$globals.IRBlockSequence),$core.addClass("IRValue",$globals.IRInstruction,["value"],"Compiler-IR"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRValue_(t),n},messageSends:["visitIRValue:"]}),$globals.IRValue),$core.addMethod($core.method({selector:"needsBoxingAsReceiver",protocol:"testing",fn:function(){var e=this;return!1},messageSends:[]}),$globals.IRValue),$core.addMethod($core.method({selector:"value",protocol:"accessing",fn:function(){var e=this,t;return t=e["@value"],t},messageSends:[]}),$globals.IRValue),$core.addMethod($core.method({selector:"value:",protocol:"accessing",fn:function(e){var t=this;return t["@value"]=e,t},messageSends:[]}),$globals.IRValue),$core.addClass("IRVariable",$globals.IRInstruction,["variable"],"Compiler-IR"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRVariable_(t),n},messageSends:["visitIRVariable:"]}),$globals.IRVariable),$core.addMethod($core.method({selector:"isVariable",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.IRVariable),$core.addMethod($core.method({selector:"needsBoxingAsReceiver",protocol:"testing",fn:function(){var e=this,t;return t=$recv($recv(e._variable())._isPseudoVar())._not(),t},messageSends:["not","isPseudoVar","variable"]}),$globals.IRVariable),$core.addMethod($core.method({selector:"variable",protocol:"accessing",fn:function(){var e=this,t;return t=e["@variable"],t},messageSends:[]}),$globals.IRVariable),$core.addMethod($core.method({selector:"variable:",protocol:"accessing",fn:function(e){var t=this;return t["@variable"]=e,t},messageSends:[]}),$globals.IRVariable),$core.addClass("IRVerbatim",$globals.IRInstruction,["source"],"Compiler-IR"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRVerbatim_(t),n},messageSends:["visitIRVerbatim:"]}),$globals.IRVerbatim),$core.addMethod($core.method({selector:"source",protocol:"accessing",fn:function(){var e=this,t;return t=e["@source"],t},messageSends:[]}),$globals.IRVerbatim),$core.addMethod($core.method({selector:"source:",protocol:"accessing",fn:function(e){var t=this;return t["@source"]=e,t},messageSends:[]}),$globals.IRVerbatim),$core.addClass("IRVisitor",$globals.Object,[],"Compiler-IR"),$core.addMethod($core.method({selector:"visit:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._accept_(t),n},messageSends:["accept:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRAssignment:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRInstruction_(e),n},messageSends:["visitIRInstruction:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRBlockReturn:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRReturn_(e),n},messageSends:["visitIRReturn:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRBlockSequence:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRSequence_(e),n},messageSends:["visitIRSequence:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRClosure:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRInstruction_(e),n},messageSends:["visitIRInstruction:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRDynamicArray:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRInstruction_(e),n},messageSends:["visitIRInstruction:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRDynamicDictionary:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRInstruction_(e),n},messageSends:["visitIRInstruction:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRInlinedClosure:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRClosure_(e),n},messageSends:["visitIRClosure:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRInlinedSequence:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRSequence_(e),n},messageSends:["visitIRSequence:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRInstruction:",protocol:"visiting",fn:function(e){var t=this;return $recv($recv(e)._instructions())._do_(function(e){return t._visit_(e)}),e},messageSends:["do:","instructions","visit:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRMethod:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRInstruction_(e),n},messageSends:["visitIRInstruction:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRNonLocalReturn:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRInstruction_(e),n},messageSends:["visitIRInstruction:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRNonLocalReturnHandling:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRInstruction_(e),n},messageSends:["visitIRInstruction:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRReturn:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRInstruction_(e),n},messageSends:["visitIRInstruction:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRSend:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRInstruction_(e),n},messageSends:["visitIRInstruction:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRSequence:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRInstruction_(e),n},messageSends:["visitIRInstruction:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRTempDeclaration:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRInstruction_(e),n},messageSends:["visitIRInstruction:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRValue:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRInstruction_(e),n},messageSends:["visitIRInstruction:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRVariable:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRInstruction_(e),n},messageSends:["visitIRInstruction:"]}),$globals.IRVisitor),$core.addMethod($core.method({selector:"visitIRVerbatim:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._visitIRInstruction_(e),n},messageSends:["visitIRInstruction:"]}),$globals.IRVisitor),$core.addClass("IRJSTranslator",$globals.IRVisitor,["stream","currentClass"],"Compiler-IR"),$core.addMethod($core.method({selector:"contents",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._stream())._contents(),t},messageSends:["contents","stream"]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"currentClass",protocol:"accessing",fn:function(){var e=this,t;return t=e["@currentClass"],t},messageSends:[]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"currentClass:",protocol:"accessing",fn:function(e){var t=this;return t["@currentClass"]=e,t},messageSends:[]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){function t(){return $globals.JSStream||(typeof JSStream=="undefined"?nil:JSStream)}var e=this;return $globals.IRJSTranslator.superclass.fn.prototype._initialize.apply($recv(e),[]),e["@stream"]=$recv(t())._new(),e},messageSends:["initialize","new"]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"stream",protocol:"accessing",fn:function(){var e=this,t;return t=e["@stream"],t},messageSends:[]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"stream:",protocol:"accessing",fn:function(e){var t=this;return t["@stream"]=e,t},messageSends:[]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"visitIRAssignment:",protocol:"visiting",fn:function(e){var t=this,n,r;return n=$recv(e)._instructions(),r=$recv(n)._first(),t._visit_(r),$recv(t._stream())._nextPutAssignment(),t._visit_($recv($recv(e)._instructions())._last()),t},messageSends:["visit:","first","instructions","nextPutAssignment","stream","last"]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"visitIRClosure:",protocol:"visiting",fn:function(e){var t=this,n,r;return n=t._stream(),$recv(n)._nextPutClosureWith_arguments_(function(){return r=t._stream(),$recv(r)._nextPutVars_($recv($recv(e)._tempDeclarations())._collect_(function(e){return $recv($recv(e)._name())._asVariableName()})),$recv(t._stream())._nextPutBlockContextFor_during_(e,function(){return $globals.IRJSTranslator.superclass.fn.prototype._visitIRClosure_.apply($recv(t),[e])})},$recv(e)._arguments()),t},messageSends:["nextPutClosureWith:arguments:","stream","nextPutVars:","collect:","tempDeclarations","asVariableName","name","nextPutBlockContextFor:during:","visitIRClosure:","arguments"]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"visitIRDynamicArray:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._stream(),$recv(n)._nextPutAll_("["),$recv($recv(e)._instructions())._do_separatedBy_(function(e){return t._visit_(e)},function(){return $recv(t._stream())._nextPutAll_(",")}),$recv(t["@stream"])._nextPutAll_("]"),t},messageSends:["nextPutAll:","stream","do:separatedBy:","instructions","visit:"]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"visitIRDynamicDictionary:",protocol:"visiting",fn:function(e){var t=this,n,r;return n=t._stream(),$recv(n)._nextPutAll_("$globals.HashedCollection._newFromPairs_(["),$recv($recv(e)._instructions())._do_separatedBy_(function(e){return t._visit_(e)},function(){return r=t._stream(),$recv(r)._nextPutAll_(",")}),$recv(t._stream())._nextPutAll_("])"),t},messageSends:["nextPutAll:","stream","do:separatedBy:","instructions","visit:"]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"visitIRMethod:",protocol:"visiting",fn:function(e){var t=this,n,r,i,s,o,u,a,f,l,c;return n=t._stream(),$recv(n)._nextPutMethodDeclaration_with_(e,function(){return r=t._stream(),$recv(r)._nextPutFunctionWith_arguments_(function(){return i=t._stream(),s=$recv($recv(e)._tempDeclarations())._collect_(function(e){return $recv($recv(e)._name())._asVariableName()}),$recv(i)._nextPutVars_(s),$recv($recv(e)._classReferences())._do_(function(e){return o=t._stream(),$recv(o)._nextPutClassRefFunction_(e)}),u=t._stream(),$recv(u)._nextPutContextFor_during_(e,function(){return a=$recv(e)._internalVariables(),f=$recv(a)._notEmpty(),$core.assert(f)&&(l=t._stream(),$recv(l)._nextPutVars_($recv($recv($recv(e)._internalVariables())._asSet())._collect_(function(e){return $recv($recv(e)._variable())._alias()}))),c=$recv($recv(e)._scope())._hasNonLocalReturn(),$core.assert(c)?$recv(t._stream())._nextPutNonLocalReturnHandlingWith_(function(){return $globals.IRJSTranslator.superclass.fn.prototype._visitIRMethod_.apply($recv(t),[e])}):$globals.IRJSTranslator.superclass.fn.prototype._visitIRMethod_.apply($recv(t),[e])})},$recv(e)._arguments())}),t},messageSends:["nextPutMethodDeclaration:with:","stream","nextPutFunctionWith:arguments:","nextPutVars:","collect:","tempDeclarations","asVariableName","name","do:","classReferences","nextPutClassRefFunction:","nextPutContextFor:during:","ifTrue:","notEmpty","internalVariables","asSet","alias","variable","ifTrue:ifFalse:","hasNonLocalReturn","scope","nextPutNonLocalReturnHandlingWith:","visitIRMethod:","arguments"]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"visitIRNonLocalReturn:",protocol:"visiting",fn:function(e){var t=this;return $recv(t._stream())._nextPutNonLocalReturnWith_(function(){return $globals.IRJSTranslator.superclass.fn.prototype._visitIRNonLocalReturn_.apply($recv(t),[e])}),t},messageSends:["nextPutNonLocalReturnWith:","stream","visitIRNonLocalReturn:"]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"visitIRReturn:",protocol:"visiting",fn:function(e){var t=this;return $recv(t._stream())._nextPutReturnWith_(function(){return $globals.IRJSTranslator.superclass.fn.prototype._visitIRReturn_.apply($recv(t),[e])}),t},messageSends:["nextPutReturnWith:","stream","visitIRReturn:"]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"visitIRSend:",protocol:"visiting",fn:function(e){var t=this,n,r,i,s;return n=$recv($recv($recv($recv(e)._method())._sendIndexes())._at_($recv(e)._selector()))._size(),r=$recv(e)._classSend(),(s=r)==null||s.isNil?t._visitSend_(e):t._visitSuperSend_(e),i=$recv($recv(n).__gt(1))._and_(function(){return $recv($recv(e)._index()).__lt(n)}),$core.assert(i)&&$recv(t._stream())._nextPutSendIndexFor_(e),t},messageSends:["size","at:","sendIndexes","method","selector","ifNil:ifNotNil:","classSend","visitSend:","visitSuperSend:","ifTrue:","and:",">","<","index","nextPutSendIndexFor:","stream"]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"visitIRSequence:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._stream(),$recv(n)._nextPutSequenceWith_(function(){return $recv($recv(e)._instructions())._do_(function(e){return $recv(t._stream())._nextPutStatementWith_(t._visit_(e))})}),t},messageSends:["nextPutSequenceWith:","stream","do:","instructions","nextPutStatementWith:","visit:"]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"visitIRTempDeclaration:",protocol:"visiting",fn:function(e){var t=this;return t},messageSends:[]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"visitIRValue:",protocol:"visiting",fn:function(e){var t=this;return $recv(t._stream())._nextPutAll_($recv($recv(e)._value())._asJavascript()),t},messageSends:["nextPutAll:","stream","asJavascript","value"]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"visitIRVariable:",protocol:"visiting",fn:function(e){var t=this,n,r,i,s;return n=$recv(e)._variable(),r=$recv(n)._name(),i=$recv(r).__eq("thisContext"),$core.assert(i)?(s=t._stream(),$recv(s)._nextPutAll_("$core.getThisContext()")):$recv(t._stream())._nextPutAll_($recv($recv(e)._variable())._alias()),t},messageSends:["ifTrue:ifFalse:","=","name","variable","nextPutAll:","stream","alias"]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"visitIRVerbatim:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._stream(),$recv(n)._nextPutStatementWith_(function(){return $recv(t._stream())._nextPutAll_($recv(e)._source())}),t},messageSends:["nextPutStatementWith:","stream","nextPutAll:","source"]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"visitReceiver:",protocol:"visiting",fn:function(e){var t=this,n,r,i;return n=$recv(e)._needsBoxingAsReceiver(),$core.assert(n)?(i=t._stream(),$recv(i)._nextPutAll_("$recv("),t._visit_(e),$recv(t._stream())._nextPutAll_(")"),t):(r=t._visit_(e),r)},messageSends:["ifFalse:","needsBoxingAsReceiver","visit:","nextPutAll:","stream"]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"visitSend:",protocol:"visiting",fn:function(e){var t=this,n,r,i,s,o;return n=$recv(e)._instructions(),r=$recv(n)._first(),t._visitReceiver_(r),i=t._stream(),s=$recv(".".__comma($recv($recv(e)._selector())._asJavaScriptMethodName())).__comma("("),$recv(i)._nextPutAll_(s),$recv($recv($recv(e)._instructions())._allButFirst())._do_separatedBy_(function(e){return t._visit_(e)},function(){return o=t._stream(),$recv(o)._nextPutAll_(",")}),$recv(t._stream())._nextPutAll_(")"),t},messageSends:["visitReceiver:","first","instructions","nextPutAll:","stream",",","asJavaScriptMethodName","selector","do:separatedBy:","allButFirst","visit:"]}),$globals.IRJSTranslator),$core.addMethod($core.method({selector:"visitSuperSend:",protocol:"visiting",fn:function(e){var t=this,n,r,i,s,o,u,a,f,l,c,h,p,d,v;return n=t._stream(),$recv(n)._nextPutAll_("("),$recv(n)._lf(),$recv(n)._nextPutAll_('//>>excludeStart("ctx", pragmas.excludeDebugContexts);'),$recv(n)._lf(),r=n,i=$recv(e)._scope(),s=$recv(i)._alias(),o=$recv(s).__comma(".supercall = true, "),$recv(r)._nextPutAll_(o),$recv(n)._lf(),$recv(n)._nextPutAll_('//>>excludeEnd("ctx");'),$recv(n)._lf(),$recv(n)._nextPutAll_($recv(t._currentClass())._asJavascript()),$recv(n)._nextPutAll_(".superclass.fn.prototype."),u=n,a=$recv($recv($recv(e)._selector())._asJavaScriptMethodName()).__comma(".apply("),$recv(u)._nextPutAll_(a),f=$recv(n)._nextPutAll_("$recv("),l=$recv(e)._instructions(),c=$recv(l)._first(),t._visit_(c),h=t._stream(),$recv(h)._nextPutAll_("), ["),$recv($recv($recv(e)._instructions())._allButFirst())._do_separatedBy_(function(e){return t._visit_(e)},function(){return p=t._stream(),$recv(p)._nextPutAll_(",")}),d=t._stream(),$recv(d)._nextPutAll_("]));"),$recv(d)._lf(),$recv(d)._nextPutAll_('//>>excludeStart("ctx", pragmas.excludeDebugContexts);'),$recv(d)._lf(),$recv(d)._nextPutAll_($recv($recv($recv(e)._scope())._alias()).__comma(".supercall = false;")),$recv(d)._lf(),v=$recv(d)._nextPutAll_('//>>excludeEnd("ctx");'),t},messageSends:["nextPutAll:","stream","lf",",","alias","scope","asJavascript","currentClass","asJavaScriptMethodName","selector","visit:","first","instructions","do:separatedBy:","allButFirst"]}),$globals.IRJSTranslator),$core.addClass("JSStream",$globals.Object,["stream"],"Compiler-IR"),$core.addMethod($core.method({selector:"contents",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e["@stream"])._contents(),t},messageSends:["contents"]}),$globals.JSStream),$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){var e=this;return $globals.JSStream.superclass.fn.prototype._initialize.apply($recv(e),[]),e["@stream"]=""._writeStream(),e},messageSends:["initialize","writeStream"]}),$globals.JSStream),$core.addMethod($core.method({selector:"lf",protocol:"streaming",fn:function(){var e=this;return $recv(e["@stream"])._lf(),e},messageSends:["lf"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPut:",protocol:"streaming",fn:function(e){var t=this;return $recv(t["@stream"])._nextPut_(e),t},messageSends:["nextPut:"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutAll:",protocol:"streaming",fn:function(e){var t=this;return $recv(t["@stream"])._nextPutAll_(e),t},messageSends:["nextPutAll:"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutAssignment",protocol:"streaming",fn:function(){var e=this;return $recv(e["@stream"])._nextPutAll_("="),e},messageSends:["nextPutAll:"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutBlockContextFor:during:",protocol:"streaming",fn:function(e,t){var n=this,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C;return r=$recv(e)._requiresSmalltalkContext(),$core.assert(r)?(n._nextPutAll_('//>>excludeStart("ctx", pragmas.excludeDebugContexts);'),n._lf(),s=$recv(e)._scope(),o=$recv(s)._alias(),u="return $core.withContext(function(".__comma(o),a=$recv(u).__comma(") {"),n._nextPutAll_(a),n._lf(),n._nextPutAll_('//>>excludeEnd("ctx");'),f=n._lf(),$recv(t)._value(),n._nextPutAll_('//>>excludeStart("ctx", pragmas.excludeDebugContexts);'),n._lf(),l=$recv(e)._scope(),c=$recv(l)._alias(),h="}, function(".__comma(c),p=$recv(h).__comma(") {"),n._nextPutAll_(p),d=$recv(e)._scope(),v=$recv(d)._alias(),m=$recv(v).__comma(".fillBlock({"),g=n._nextPutAll_(m),$recv($recv(e)._locals())._do_separatedBy_(function(e){return y=$recv(e)._asVariableName(),n._nextPutAll_(y),n._nextPutAll_(":"),b=n._nextPutAll_($recv(e)._asVariableName()),b},function(){return n._nextPutAll_(",")}),n._nextPutAll_("},"),w=$recv(e)._scope(),E=$recv(w)._outerScope(),S=$recv(E)._alias(),x=$recv(S).__comma(","),T=$recv(x).__comma($recv($recv($recv(e)._scope())._blockIndex())._asString()),N=$recv(T).__comma(")});"),n._nextPutAll_(N),n._lf(),C=n._nextPutAll_('//>>excludeEnd("ctx");'),n):(i=$recv(t)._value(),i)},messageSends:["ifFalse:","requiresSmalltalkContext","value","nextPutAll:","lf",",","alias","scope","do:separatedBy:","locals","asVariableName","outerScope","asString","blockIndex"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutClassRefFunction:",protocol:"streaming",fn:function(e){var t=this,n,r;return n=t["@stream"],$recv(n)._nextPutAll_("function $"),$recv(n)._nextPutAll_(e),$recv(n)._nextPutAll_("(){return $globals."),$recv(n)._nextPutAll_(e),$recv(n)._nextPutAll_("||(typeof "),$recv(n)._nextPutAll_(e),$recv(n)._nextPutAll_('=="undefined"?nil:'),$recv(n)._nextPutAll_(e),$recv(n)._nextPutAll_(")}"),r=$recv(n)._lf(),t},messageSends:["nextPutAll:","lf"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutClosureWith:arguments:",protocol:"streaming",fn:function(e,t){var n=this,r,i,s,o;return $recv(n["@stream"])._nextPutAll_("(function("),$recv(t)._do_separatedBy_(function(e){return $recv(n["@stream"])._nextPutAll_($recv(e)._asVariableName())},function(){return $recv(n["@stream"])._nextPut_(",")}),r=n["@stream"],$recv(r)._nextPutAll_("){"),i=$recv(r)._lf(),$recv(e)._value(),s=n["@stream"],$recv(s)._lf(),o=$recv(s)._nextPutAll_("})"),n},messageSends:["nextPutAll:","do:separatedBy:","asVariableName","nextPut:","lf","value"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutContextFor:during:",protocol:"streaming",fn:function(e,t){var n=this,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E;return r=$recv(e)._requiresSmalltalkContext(),$core.assert(r)?(n._nextPutAll_('//>>excludeStart("ctx", pragmas.excludeDebugContexts);'),n._lf(),s=$recv(e)._scope(),o=$recv(s)._alias(),u="return $core.withContext(function(".__comma(o),a=$recv(u).__comma(") {"),n._nextPutAll_(a),n._lf(),n._nextPutAll_('//>>excludeEnd("ctx");'),f=n._lf(),$recv(t)._value(),n._nextPutAll_('//>>excludeStart("ctx", pragmas.excludeDebugContexts);'),n._lf(),l=$recv(e)._scope(),c=$recv(l)._alias(),h="}, function(".__comma(c),p=$recv(h).__comma(") {"),d=$recv(p).__comma($recv($recv(e)._scope())._alias()),n._nextPutAll_(d),v=$recv($recv(e)._selector())._asJavascript(),m=".fill(self,".__comma(v),g=$recv(m).__comma(",{"),y=n._nextPutAll_(g),$recv($recv(e)._locals())._do_separatedBy_(function(e){return b=$recv(e)._asVariableName(),n._nextPutAll_(b),n._nextPutAll_(":"),w=n._nextPutAll_($recv(e)._asVariableName()),w},function(){return n._nextPutAll_(",")}),n._nextPutAll_("},"),n._nextPutAll_($recv($recv(e)._theClass())._asJavascript()),n._nextPutAll_(")});"),n._lf(),E=n._nextPutAll_('//>>excludeEnd("ctx");'),n):(i=$recv(t)._value(),i)},messageSends:["ifFalse:","requiresSmalltalkContext","value","nextPutAll:","lf",",","alias","scope","asJavascript","selector","do:separatedBy:","locals","asVariableName","theClass"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutFunctionWith:arguments:",protocol:"streaming",fn:function(e,t){var n=this,r,i,s,o,u,a;return $recv(n["@stream"])._nextPutAll_("fn: function("),$recv(t)._do_separatedBy_(function(e){return $recv(n["@stream"])._nextPutAll_($recv(e)._asVariableName())},function(){return $recv(n["@stream"])._nextPut_(",")}),r=n["@stream"],$recv(r)._nextPutAll_("){"),i=$recv(r)._lf(),s=n["@stream"],$recv(s)._nextPutAll_("var self=this;"),o=$recv(s)._lf(),$recv(e)._value(),u=n["@stream"],$recv(u)._lf(),a=$recv(u)._nextPutAll_("}"),n},messageSends:["nextPutAll:","do:separatedBy:","asVariableName","nextPut:","lf","value"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutIf:with:",protocol:"streaming",fn:function(e,t){var n=this,r,i;return $recv(n["@stream"])._nextPutAll_("if("),$recv(e)._value(),r=n["@stream"],$recv(r)._nextPutAll_("){"),i=$recv(r)._lf(),$recv(t)._value(),$recv(n["@stream"])._nextPutAll_("}"),n},messageSends:["nextPutAll:","value","lf"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutIfElse:with:with:",protocol:"streaming",fn:function(e,t,n){var r=this,i,s,o,u;return $recv(r["@stream"])._nextPutAll_("if("),$recv(e)._value(),i=r["@stream"],$recv(i)._nextPutAll_("){"),s=$recv(i)._lf(),$recv(t)._value(),o=r["@stream"],$recv(o)._nextPutAll_("} else {"),u=$recv(o)._lf(),$recv(n)._value(),$recv(r["@stream"])._nextPutAll_("}"),r},messageSends:["nextPutAll:","value","lf"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutMethodDeclaration:with:",protocol:"streaming",fn:function(e,t){function r(){return $globals.String||(typeof String=="undefined"?nil:String)}var n=this,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A;return i=n["@stream"],$recv(i)._nextPutAll_("$core.method({"),$recv(i)._lf(),s=i,o=$recv($recv(e)._selector())._asJavascript(),u="selector: ".__comma(o),a=$recv(u).__comma(","),$recv(s)._nextPutAll_(a),$recv(i)._lf(),f=i,l=$recv($recv(e)._source())._asJavascript(),c="source: ".__comma(l),h=$recv(c).__comma(","),$recv(f)._nextPutAll_(h),p=$recv(i)._lf(),$recv(t)._value(),d=n["@stream"],v=d,m=$recv(r())._lf(),g=",".__comma(m),y=$recv(g).__comma("messageSends: "),$recv(v)._nextPutAll_(y),b=d,w=$recv($recv(e)._messageSends())._asArray(),E=$recv(w)._asJavascript(),S=$recv(E).__comma(","),$recv(b)._nextPutAll_(S),$recv(d)._lf(),x=d,T=$recv($recv($recv($recv(e)._arguments())._collect_(function(e){return $recv(e)._value()}))._asArray())._asJavascript(),N="args: ".__comma(T),C=$recv(N).__comma(","),$recv(x)._nextPutAll_(C),$recv(d)._lf(),k=$recv(d)._nextPutAll_("referencedClasses: ["),$recv($recv(e)._classReferences())._do_separatedBy_(function(e){return $recv(n["@stream"])._nextPutAll_($recv(e)._asJavascript())},function(){return $recv(n["@stream"])._nextPutAll_(",")}),L=n["@stream"],$recv(L)._nextPutAll_("]"),A=$recv(L)._nextPutAll_("})"),n},messageSends:["nextPutAll:","lf",",","asJavascript","selector","source","value","asArray","messageSends","collect:","arguments","do:separatedBy:","classReferences"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutNonLocalReturnHandlingWith:",protocol:"streaming",fn:function(e){var t=this,n,r,i,s;return n=t["@stream"],$recv(n)._nextPutAll_("var $early={};"),$recv(n)._lf(),$recv(n)._nextPutAll_("try {"),r=$recv(n)._lf(),$recv(e)._value(),i=t["@stream"],$recv(i)._nextPutAll_("}"),$recv(i)._lf(),$recv(i)._nextPutAll_("catch(e) {if(e===$early)return e[0]; throw e}"),s=$recv(i)._lf(),t},messageSends:["nextPutAll:","lf","value"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutNonLocalReturnWith:",protocol:"streaming",fn:function(e){var t=this;return $recv(t["@stream"])._nextPutAll_("throw $early=["),$recv(e)._value(),$recv(t["@stream"])._nextPutAll_("]"),t},messageSends:["nextPutAll:","value"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutReturn",protocol:"streaming",fn:function(){var e=this;return $recv(e["@stream"])._nextPutAll_("return "),e},messageSends:["nextPutAll:"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutReturnWith:",protocol:"streaming",fn:function(e){var t=this;return t._nextPutReturn(),$recv(e)._value(),t},messageSends:["nextPutReturn","value"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutSendIndexFor:",protocol:"streaming",fn:function(e){var t=this,n;return t._nextPutAll_(";"),t._lf(),t._nextPutAll_('//>>excludeStart("ctx", pragmas.excludeDebugContexts);'),t._lf(),t._nextPutAll_($recv($recv(e)._scope())._alias()),t._nextPutAll_(".sendIdx["),t._nextPutAll_($recv($recv(e)._selector())._asJavascript()),t._nextPutAll_("]="),t._nextPutAll_($recv($recv(e)._index())._asString()),t._nextPutAll_(";"),t._lf(),n=t._nextPutAll_('//>>excludeEnd("ctx")'),t},messageSends:["nextPutAll:","lf","alias","scope","asJavascript","selector","asString","index"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutSequenceWith:",protocol:"streaming",fn:function(e){var t=this;return $recv(e)._value(),t},messageSends:["value"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutStatementWith:",protocol:"streaming",fn:function(e){var t=this,n,r;return $recv(e)._value(),n=t["@stream"],$recv(n)._nextPutAll_(";"),r=$recv(n)._lf(),t},messageSends:["value","nextPutAll:","lf"]}),$globals.JSStream),$core.addMethod($core.method({selector:"nextPutVars:",protocol:"streaming",fn:function(e){var t=this,n,r,i={};try{return $recv(e)._ifEmpty_(function(){throw i=[t]}),$recv(t["@stream"])._nextPutAll_("var "),$recv(e)._do_separatedBy_(function(e){return $recv(t["@stream"])._nextPutAll_(e)},function(){return $recv(t["@stream"])._nextPutAll_(",")}),n=t["@stream"],$recv(n)._nextPutAll_(";"),r=$recv(n)._lf(),t}catch(s){if(s===i)return s[0];throw s}},messageSends:["ifEmpty:","nextPutAll:","do:separatedBy:","lf"]}),$globals.JSStream),$core.addMethod($core.method({selector:"appendToInstruction:",protocol:"*Compiler-IR",fn:function(e){var t=this;return $recv(e)._appendBlock_(t),t},messageSends:["appendBlock:"]}),$globals.BlockClosure)}),define("amber_core/Compiler-Inlining",["amber/boot","amber_core/Compiler-IR","amber_core/Kernel-Objects","amber_core/Compiler-Core"],function($boot){"use strict";var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;$core.addPackage("Compiler-Inlining"),$core.packages["Compiler-Inlining"].innerEval=function(expr){return eval(expr)},$core.packages["Compiler-Inlining"].transport={type:"amd",amdNamespace:"amber_core"},$core.addClass("IRInlinedAssignment",$globals.IRAssignment,[],"Compiler-Inlining"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRInlinedAssignment_(t),n},messageSends:["visitIRInlinedAssignment:"]}),$globals.IRInlinedAssignment),$core.addMethod($core.method({selector:"isInlined",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.IRInlinedAssignment),$core.addClass("IRInlinedClosure",$globals.IRClosure,[],"Compiler-Inlining"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this;return $recv(e)._visitIRInlinedClosure_(t),t},messageSends:["visitIRInlinedClosure:"]}),$globals.IRInlinedClosure),$core.addMethod($core.method({selector:"isInlined",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.IRInlinedClosure),$core.addClass("IRInlinedReturn",$globals.IRReturn,[],"Compiler-Inlining"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this,n;return n=$recv(e)._visitIRInlinedReturn_(t),n},messageSends:["visitIRInlinedReturn:"]}),$globals.IRInlinedReturn),$core.addMethod($core.method({selector:"isInlined",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.IRInlinedReturn),$core.addClass("IRInlinedSend",$globals.IRSend,[],"Compiler-Inlining"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this;return $recv(e)._visitInlinedSend_(t),t},messageSends:["visitInlinedSend:"]}),$globals.IRInlinedSend),$core.addMethod($core.method({selector:"internalVariables",protocol:"accessing",fn:function(){var e=this,t;return t=[],t},messageSends:[]}),$globals.IRInlinedSend),$core.addMethod($core.method({selector:"isInlined",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.IRInlinedSend),$core.addClass("IRInlinedIfFalse",$globals.IRInlinedSend,[],"Compiler-Inlining"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this;return $recv(e)._visitIRInlinedIfFalse_(t),t},messageSends:["visitIRInlinedIfFalse:"]}),$globals.IRInlinedIfFalse),$core.addClass("IRInlinedIfNilIfNotNil",$globals.IRInlinedSend,[],"Compiler-Inlining"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this;return $recv(e)._visitIRInlinedIfNilIfNotNil_(t),t},messageSends:["visitIRInlinedIfNilIfNotNil:"]}),$globals.IRInlinedIfNilIfNotNil),$core.addMethod($core.method({selector:"internalVariables",protocol:"accessing",fn:function(){function t(){return $globals.Array||(typeof Array=="undefined"?nil:Array)}var e=this,n;return n=$recv(t())._with_(e._receiverInternalVariable()),n},messageSends:["with:","receiverInternalVariable"]}),$globals.IRInlinedIfNilIfNotNil),$core.addMethod($core.method({selector:"receiverInternalVariable",protocol:"accessing",fn:function(){function t(){return $globals.IRVariable||(typeof IRVariable=="undefined"?nil:IRVariable)}function n(){return $globals.AliasVar||(typeof AliasVar=="undefined"?nil:AliasVar)}var e=this,r,i,s;return r=$recv(t())._new(),$recv(r)._variable_($recv($recv(n())._new())._name_(e._receiverInternalVariableName())),i=$recv(r)._yourself(),s=i,s},messageSends:["variable:","new","name:","receiverInternalVariableName","yourself"]}),$globals.IRInlinedIfNilIfNotNil),$core.addMethod($core.method({selector:"receiverInternalVariableName",protocol:"accessing",fn:function(){var e=this;return"$receiver"},messageSends:[]}),$globals.IRInlinedIfNilIfNotNil),$core.addClass("IRInlinedIfTrue",$globals.IRInlinedSend,[],"Compiler-Inlining"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this;return $recv(e)._visitIRInlinedIfTrue_(t),t},messageSends:["visitIRInlinedIfTrue:"]}),$globals.IRInlinedIfTrue),$core.addClass("IRInlinedIfTrueIfFalse",$globals.IRInlinedSend,[],"Compiler-Inlining"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this;return $recv(e)._visitIRInlinedIfTrueIfFalse_(t),t},messageSends:["visitIRInlinedIfTrueIfFalse:"]}),$globals.IRInlinedIfTrueIfFalse),$core.addClass("IRInlinedSequence",$globals.IRBlockSequence,[],"Compiler-Inlining"),$core.addMethod($core.method({selector:"accept:",protocol:"visiting",fn:function(e){var t=this;return $recv(e)._visitIRInlinedSequence_(t),t},messageSends:["visitIRInlinedSequence:"]}),$globals.IRInlinedSequence),$core.addMethod($core.method({selector:"isInlined",protocol:"testing",fn:function(){var e=this;return!0},messageSends:[]}),$globals.IRInlinedSequence),$core.addClass("IRInliner",$globals.IRVisitor,[],"Compiler-Inlining"),$core.addMethod($core.method({selector:"assignmentInliner",protocol:"factory",fn:function(){function t(){return $globals.IRAssignmentInliner||(typeof IRAssignmentInliner=="undefined"?nil:IRAssignmentInliner)}var e=this,n,r,i;return n=$recv(t())._new(),$recv(n)._translator_(e),r=$recv(n)._yourself(),i=r,i},messageSends:["translator:","new","yourself"]}),$globals.IRInliner),$core.addMethod($core.method({selector:"returnInliner",protocol:"factory",fn:function(){function t(){return $globals.IRReturnInliner||(typeof IRReturnInliner=="undefined"?nil:IRReturnInliner)}var e=this,n,r,i;return n=$recv(t())._new(),$recv(n)._translator_(e),r=$recv(n)._yourself(),i=r,i},messageSends:["translator:","new","yourself"]}),$globals.IRInliner),$core.addMethod($core.method({selector:"sendInliner",protocol:"factory",fn:function(){function t(){return $globals.IRSendInliner||(typeof IRSendInliner=="undefined"?nil:IRSendInliner)}var e=this,n,r,i;return n=$recv(t())._new(),$recv(n)._translator_(e),r=$recv(n)._yourself(),i=r,i},messageSends:["translator:","new","yourself"]}),$globals.IRInliner),$core.addMethod($core.method({selector:"shouldInlineAssignment:",protocol:"testing",fn:function(e){var t=this,n,r,i,s;return s=$recv($recv($recv(e)._isInlined())._not())._and_(function(){return n=$recv(e)._instructions(),r=$recv(n)._last(),i=$recv(r)._isSend(),$recv(i)._and_(function(){return t._shouldInlineSend_($recv($recv(e)._instructions())._last())})}),s},messageSends:["and:","not","isInlined","isSend","last","instructions","shouldInlineSend:"]}),$globals.IRInliner),$core.addMethod($core.method({selector:"shouldInlineReturn:",protocol:"testing",fn:function(e){var t=this,n,r,i,s;return s=$recv($recv($recv(e)._isInlined())._not())._and_(function(){return n=$recv(e)._instructions(),r=$recv(n)._first(),i=$recv(r)._isSend(),$recv(i)._and_(function(){return t._shouldInlineSend_($recv($recv(e)._instructions())._first())})}),s},messageSends:["and:","not","isInlined","isSend","first","instructions","shouldInlineSend:"]}),$globals.IRInliner),$core.addMethod($core.method({selector:"shouldInlineSend:",protocol:"testing",fn:function(e){function n(){return $globals.IRSendInliner||(typeof IRSendInliner=="undefined"?nil:IRSendInliner)}var t=this,r;return r=$recv($recv($recv(e)._isInlined())._not())._and_(function(){return $recv(n())._shouldInline_(e)}),r},messageSends:["and:","not","isInlined","shouldInline:"]}),$globals.IRInliner),$core.addMethod($core.method({selector:"transformNonLocalReturn:",protocol:"visiting",fn:function(e){function r(){return $globals.IRReturn||(typeof IRReturn=="undefined"?nil:IRReturn)}var t=this,n,i,s,o,u,a,f,l,c,h;return i=$recv(e)._scope(),s=$recv(i)._canInlineNonLocalReturns(),$core.assert(s)?(o=$recv(e)._scope(),u=$recv(o)._methodScope(),a=$recv(e)._scope(),$recv(u)._removeNonLocalReturn_(a),f=$recv(r())._new(),$recv(f)._scope_($recv(e)._scope()),l=$recv(f)._yourself(),n=l,n,$recv($recv(e)._instructions())._do_(function(e){return $recv(n)._add_(e)}),$recv(e)._replaceWith_(n),c=n,c):(h=$globals.IRInliner.superclass.fn.prototype._visitIRNonLocalReturn_.apply($recv(t),[e]),h)},messageSends:["ifTrue:","canInlineNonLocalReturns","scope","removeNonLocalReturn:","methodScope","scope:","new","yourself","do:","instructions","add:","replaceWith:","visitIRNonLocalReturn:"]}),$globals.IRInliner),$core.addMethod($core.method({selector:"visitIRAssignment:",protocol:"visiting",fn:function(e){var t=this,n,r;return n=t._shouldInlineAssignment_(e),$core.assert(n)?r=$recv(t._assignmentInliner())._inlineAssignment_(e):r=$globals.IRInliner.superclass.fn.prototype._visitIRAssignment_.apply($recv(t),[e]),r},messageSends:["ifTrue:ifFalse:","shouldInlineAssignment:","inlineAssignment:","assignmentInliner","visitIRAssignment:"]}),$globals.IRInliner),$core.addMethod($core.method({selector:"visitIRNonLocalReturn:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._transformNonLocalReturn_(e),n},messageSends:["transformNonLocalReturn:"]}),$globals.IRInliner),$core.addMethod($core.method({selector:"visitIRReturn:",protocol:"visiting",fn:function(e){var t=this,n,r;return n=t._shouldInlineReturn_(e),$core.assert(n)?r=$recv(t._returnInliner())._inlineReturn_(e):r=$globals.IRInliner.superclass.fn.prototype._visitIRReturn_.apply($recv(t),[e]),r},messageSends:["ifTrue:ifFalse:","shouldInlineReturn:","inlineReturn:","returnInliner","visitIRReturn:"]}),$globals.IRInliner),$core.addMethod($core.method({selector:"visitIRSend:",protocol:"visiting",fn:function(e){var t=this,n,r;return n=t._shouldInlineSend_(e),$core.assert(n)?r=$recv(t._sendInliner())._inlineSend_(e):r=$globals.IRInliner.superclass.fn.prototype._visitIRSend_.apply($recv(t),[e]),r},messageSends:["ifTrue:ifFalse:","shouldInlineSend:","inlineSend:","sendInliner","visitIRSend:"]}),$globals.IRInliner),$core.addClass("IRInliningJSTranslator",$globals.IRJSTranslator,[],"Compiler-Inlining"),$core.addMethod($core.method({selector:"visitIRInlinedAssignment:",protocol:"visiting",fn:function(e){var t=this;return t._visit_($recv($recv(e)._instructions())._last()),t},messageSends:["visit:","last","instructions"]}),$globals.IRInliningJSTranslator),$core.addMethod($core.method({selector:"visitIRInlinedClosure:",protocol:"visiting",fn:function(e){var t=this;return $recv(t._stream())._nextPutVars_($recv($recv(e)._tempDeclarations())._collect_(function(e){return $recv($recv(e)._name())._asVariableName()})),$recv($recv(e)._instructions())._do_(function(e){return t._visit_(e)}),t},messageSends:["nextPutVars:","stream","collect:","tempDeclarations","asVariableName","name","do:","instructions","visit:"]}),$globals.IRInliningJSTranslator),$core.addMethod($core.method({selector:"visitIRInlinedIfFalse:",protocol:"visiting",fn:function(e){var t=this,n,r,i,s;return n=t._stream(),$recv(n)._nextPutIf_with_(function(){return r=t._stream(),$recv(r)._nextPutAll_("!$core.assert("),i=$recv(e)._instructions(),s=$recv(i)._first(),t._visit_(s),$recv(t._stream())._nextPutAll_(")")},function(){return t._visit_($recv($recv(e)._instructions())._last())}),t},messageSends:["nextPutIf:with:","stream","nextPutAll:","visit:","first","instructions","last"]}),$globals.IRInliningJSTranslator),$core.addMethod($core.method({selector:"visitIRInlinedIfNilIfNotNil:",protocol:"visiting",fn:function(e){var t=this,n,r,i,s,o,u,a;return n=t._stream(),$recv(n)._nextPutIfElse_with_with_(function(){return r=t._stream(),i=$recv("(".__comma($recv(e)._receiverInternalVariableName())).__comma(" = "),$recv(r)._nextPutAll_(i),s=$recv(e)._instructions(),o=$recv(s)._first(),t._visit_(o),$recv(t._stream())._nextPutAll_(") == null || $receiver.isNil")},function(){return u=$recv(e)._instructions(),a=$recv(u)._second(),t._visit_(a)},function(){return t._visit_($recv($recv(e)._instructions())._third())}),t},messageSends:["nextPutIfElse:with:with:","stream","nextPutAll:",",","receiverInternalVariableName","visit:","first","instructions","second","third"]}),$globals.IRInliningJSTranslator),$core.addMethod($core.method({selector:"visitIRInlinedIfTrue:",protocol:"visiting",fn:function(e){var t=this,n,r,i,s;return n=t._stream(),$recv(n)._nextPutIf_with_(function(){return r=t._stream(),$recv(r)._nextPutAll_("$core.assert("),i=$recv(e)._instructions(),s=$recv(i)._first(),t._visit_(s),$recv(t._stream())._nextPutAll_(")")},function(){return t._visit_($recv($recv(e)._instructions())._last())}),t},messageSends:["nextPutIf:with:","stream","nextPutAll:","visit:","first","instructions","last"]}),$globals.IRInliningJSTranslator),$core.addMethod($core.method({selector:"visitIRInlinedIfTrueIfFalse:",protocol:"visiting",fn:function(e){var t=this,n,r,i,s,o,u;return n=t._stream(),$recv(n)._nextPutIfElse_with_with_(function(){return r=t._stream(),$recv(r)._nextPutAll_("$core.assert("),i=$recv(e)._instructions(),s=$recv(i)._first(),t._visit_(s),$recv(t._stream())._nextPutAll_(")")},function(){return o=$recv(e)._instructions(),u=$recv(o)._second(),t._visit_(u)},function(){return t._visit_($recv($recv(e)._instructions())._third())}),t},messageSends:["nextPutIfElse:with:with:","stream","nextPutAll:","visit:","first","instructions","second","third"]}),$globals.IRInliningJSTranslator),$core.addMethod($core.method({selector:"visitIRInlinedNonLocalReturn:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._stream(),$recv(n)._nextPutStatementWith_(function(){return t._visit_($recv($recv(e)._instructions())._last())}),$recv(t._stream())._nextPutNonLocalReturnWith_(function(){}),t},messageSends:["nextPutStatementWith:","stream","visit:","last","instructions","nextPutNonLocalReturnWith:"]}),$globals.IRInliningJSTranslator),$core.addMethod($core.method({selector:"visitIRInlinedReturn:",protocol:"visiting",fn:function(e){var t=this;return t._visit_($recv($recv(e)._instructions())._last()),t},messageSends:["visit:","last","instructions"]}),$globals.IRInliningJSTranslator),$core.addMethod($core.method({selector:"visitIRInlinedSequence:",protocol:"visiting",fn:function(e){var t=this;return $recv($recv(e)._instructions())._do_(function(e){return $recv(t._stream())._nextPutStatementWith_(function(){return t._visit_(e)})}),t},messageSends:["do:","instructions","nextPutStatementWith:","stream","visit:"]}),$globals.IRInliningJSTranslator),$core.addClass("IRSendInliner",$globals.Object,["send","translator"],"Compiler-Inlining"),$core.addMethod($core.method({selector:"ifFalse:",protocol:"inlining",fn:function(e){function n(){return $globals.IRInlinedIfFalse||(typeof IRInlinedIfFalse=="undefined"?nil:IRInlinedIfFalse)}var t=this,r;return r=t._inlinedSend_with_($recv(n())._new(),e),r},messageSends:["inlinedSend:with:","new"]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"ifFalse:ifTrue:",protocol:"inlining",fn:function(e,t){var n=this,r;return r=n._perform_withArguments_("ifTrue:ifFalse:",[t,e]),r},messageSends:["perform:withArguments:"]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"ifNil:",protocol:"inlining",fn:function(e){function n(){return $globals.IRInlinedIfNilIfNotNil||(typeof IRInlinedIfNilIfNotNil=="undefined"?nil:IRInlinedIfNilIfNotNil)}function r(){return $globals.IRClosure||(typeof IRClosure=="undefined"?nil:IRClosure)}function i(){return $globals.IRBlockSequence||(typeof IRBlockSequence=="undefined"?nil:IRBlockSequence)}var t=this,s,o,u,a,f,l,c,h,p;return s=$recv(n())._new(),o=$recv(r())._new(),$recv(o)._scope_($recv($recv(e)._scope())._copy()),u=o,a=$recv(i())._new(),$recv(a)._add_($recv($recv(t._send())._instructions())._first()),f=$recv(a)._yourself(),l=f,$recv(u)._add_(l),c=$recv(o)._yourself(),h=c,p=t._inlinedSend_with_with_(s,e,h),p},messageSends:["inlinedSend:with:with:","new","scope:","copy","scope","add:","first","instructions","send","yourself"]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"ifNil:ifNotNil:",protocol:"inlining",fn:function(e,t){function r(){return $globals.IRInlinedIfNilIfNotNil||(typeof IRInlinedIfNilIfNotNil=="undefined"?nil:IRInlinedIfNilIfNotNil)}var n=this,i;return i=n._inlinedSend_with_with_($recv(r())._new(),e,t),i},messageSends:["inlinedSend:with:with:","new"]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"ifNotNil:",protocol:"inlining",fn:function(e){function n(){return $globals.IRInlinedIfNilIfNotNil||(typeof IRInlinedIfNilIfNotNil=="undefined"?nil:IRInlinedIfNilIfNotNil)}function r(){return $globals.IRClosure||(typeof IRClosure=="undefined"?nil:IRClosure)}function i(){return $globals.IRBlockSequence||(typeof IRBlockSequence=="undefined"?nil:IRBlockSequence)}var t=this,s,o,u,a,f,l,c,h,p;return s=$recv(n())._new(),o=$recv(r())._new(),$recv(o)._scope_($recv($recv(e)._scope())._copy()),u=o,a=$recv(i())._new(),$recv(a)._add_($recv($recv(t._send())._instructions())._first()),f=$recv(a)._yourself(),l=f,$recv(u)._add_(l),c=$recv(o)._yourself(),h=c,p=t._inlinedSend_with_with_(s,h,e),p},messageSends:["inlinedSend:with:with:","new","scope:","copy","scope","add:","first","instructions","send","yourself"]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"ifNotNil:ifNil:",protocol:"inlining",fn:function(e,t){function r(){return $globals.IRInlinedIfNilIfNotNil||(typeof IRInlinedIfNilIfNotNil=="undefined"?nil:IRInlinedIfNilIfNotNil)}var n=this,i;return i=n._inlinedSend_with_with_($recv(r())._new(),t,e),i},messageSends:["inlinedSend:with:with:","new"]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"ifTrue:",protocol:"inlining",fn:function(e){function n(){return $globals.IRInlinedIfTrue||(typeof IRInlinedIfTrue=="undefined"?nil:IRInlinedIfTrue)}var t=this,r;return r=t._inlinedSend_with_($recv(n())._new(),e),r},messageSends:["inlinedSend:with:","new"]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"ifTrue:ifFalse:",protocol:"inlining",fn:function(e,t){function r(){return $globals.IRInlinedIfTrueIfFalse||(typeof IRInlinedIfTrueIfFalse=="undefined"?nil:IRInlinedIfTrueIfFalse)}var n=this,i;return i=n._inlinedSend_with_with_($recv(r())._new(),e,t),i},messageSends:["inlinedSend:with:with:","new"]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"inlineClosure:",protocol:"inlining",fn:function(e){function s(){return $globals.IRTempDeclaration||(typeof IRTempDeclaration=="undefined"?nil:IRTempDeclaration)}function o(){return $globals.IRAssignment||(typeof IRAssignment=="undefined"?nil:IRAssignment)}function u(){return $globals.IRVariable||(typeof IRVariable=="undefined"?nil:IRVariable)}function a(){return $globals.AliasVar||(typeof AliasVar=="undefined"?nil:AliasVar)}var t=this,n,r,i,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j,F,I,q,R,U,z,W,X;return n=t._inlinedClosure(),f=n,l=f,c=$recv(e)._scope(),$recv(l)._scope_(c),h=$recv(f)._parent_($recv(e)._parent()),$recv($recv(e)._tempDeclarations())._do_(function(e){return $recv(n)._add_(e)}),r=t._inlinedSequence(),$recv($recv(e)._arguments())._do_(function(e){return p=n,d=$recv(s())._new(),$recv(d)._name_(e),v=$recv(d)._yourself(),m=v,$recv(p)._add_(m),g=r,y=$recv(o())._new(),b=y,w=$recv(u())._new(),E=$recv(a())._new(),S=E,x=$recv(n)._scope(),$recv(S)._scope_(x),$recv(E)._name_(e),T=$recv(E)._yourself(),N=T,C=$recv(w)._variable_(N),$recv(b)._add_(C),k=y,L=$recv(u())._new(),A=$recv(a())._new(),$recv(A)._scope_($recv(n)._scope()),$recv(A)._name_("$receiver"),O=$recv(A)._yourself(),M=O,_=$recv(L)._variable_(M),$recv(k)._add_(_),D=$recv(y)._yourself(),P=D,$recv(g)._add_(P)}),$recv(n)._add_(r),H=$recv(e)._instructions(),B=$recv(H)._last(),i=$recv(B)._instructions(),$recv(i)._ifNotEmpty_(function(){return $recv($recv(i)._allButLast())._do_(function(e){return $recv(r)._add_(e)}),j=$recv(i)._last(),F=$recv(j)._isReturn(),q=$recv(F)._and_(function(){return I=$recv(i)._last(),$recv(I)._isBlockReturn()}),$core.assert(q)?(R=r,U=$recv(i)._last(),z=$recv(U)._instructions(),W=$recv(z)._first(),$recv(R)._add_(W)):$recv(r)._add_($recv(i)._last())}),X=n,X},messageSends:["inlinedClosure","scope:","scope","parent:","parent","do:","tempDeclarations","add:","inlinedSequence","arguments","name:","new","yourself","variable:","instructions","last","ifNotEmpty:","allButLast","ifTrue:ifFalse:","and:","isReturn","isBlockReturn","first"]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"inlineSend:",protocol:"inlining",fn:function(e){var t=this,n,r,i;return t._send_(e),n=t._send(),r=$recv(n)._selector(),i=t._perform_withArguments_(r,$recv($recv(t._send())._instructions())._allButFirst()),i},messageSends:["send:","perform:withArguments:","selector","send","allButFirst","instructions"]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"inlinedClosure",protocol:"factory",fn:function(){function t(){return $globals.IRInlinedClosure||(typeof IRInlinedClosure=="undefined"?nil:IRInlinedClosure)}var e=this,n;return n=$recv(t())._new(),n},messageSends:["new"]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"inlinedSend:with:",protocol:"inlining",fn:function(e,t){var n=this,r,i,s,o,u,a,f,l;return i=$recv(t)._isClosure(),$core.assert(i)||n._inliningError_("Message argument should be a block"),s=$recv($recv($recv(t)._arguments())._size()).__eq(0),$core.assert(s)||n._inliningError_("Inlined block should have zero argument"),r=$recv(n._translator())._visit_(n._inlineClosure_(t)),o=n._send(),u=$recv(o)._instructions(),a=$recv(u)._first(),$recv(e)._add_(a),f=$recv(e)._add_(r),$recv(n._send())._replaceWith_(e),l=$recv($recv(e)._method())._internalVariables(),$recv(l)._addAll_($recv(e)._internalVariables()),e},messageSends:["ifFalse:","isClosure","inliningError:","=","size","arguments","visit:","translator","inlineClosure:","add:","first","instructions","send","replaceWith:","addAll:","internalVariables","method"]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"inlinedSend:with:with:",protocol:"inlining",fn:function(e,t,n){var r=this,i,s,o,u,a,f,l,c,h,p,d;return o=$recv(t)._isClosure(),$core.assert(o)||r._inliningError_("Message argument should be a block"),u=$recv(n)._isClosure(),$core.assert(u)||r._inliningError_("Message argument should be a block"),a=r._translator(),f=r._inlineClosure_(t),i=$recv(a)._visit_(f),s=$recv(r._translator())._visit_(r._inlineClosure_(n)),l=r._send(),c=$recv(l)._instructions(),h=$recv(c)._first(),$recv(e)._add_(h),$recv(e)._add_(i),p=$recv(e)._add_(s),$recv(r._send())._replaceWith_(e),d=$recv($recv(e)._method())._internalVariables(),$recv(d)._addAll_($recv(e)._internalVariables()),e},messageSends:["ifFalse:","isClosure","inliningError:","visit:","translator","inlineClosure:","add:","first","instructions","send","replaceWith:","addAll:","internalVariables","method"]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"inlinedSequence",protocol:"factory",fn:function(){function t(){return $globals.IRInlinedSequence||(typeof IRInlinedSequence=="undefined"?nil:IRInlinedSequence)}var e=this,n;return n=$recv(t())._new(),n},messageSends:["new"]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"inliningError:",protocol:"error handling",fn:function(e){function n(){return $globals.InliningError||(typeof InliningError=="undefined"?nil:InliningError)}var t=this;return $recv(n())._signal_(e),t},messageSends:["signal:"]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"send",protocol:"accessing",fn:function(){var e=this,t;return t=e["@send"],t},messageSends:[]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"send:",protocol:"accessing",fn:function(e){var t=this;return t["@send"]=e,t},messageSends:[]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"translator",protocol:"accessing",fn:function(){var e=this,t;return t=e["@translator"],t},messageSends:[]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"translator:",protocol:"accessing",fn:function(e){var t=this;return t["@translator"]=e,t},messageSends:[]}),$globals.IRSendInliner),$core.addMethod($core.method({selector:"inlinedSelectors",protocol:"accessing",fn:function(){var e=this,t;return t=["ifTrue:","ifFalse:","ifTrue:ifFalse:","ifFalse:ifTrue:","ifNil:","ifNotNil:","ifNil:ifNotNil:","ifNotNil:ifNil:"],t},messageSends:[]}),$globals.IRSendInliner.klass),$core.addMethod($core.method({selector:"shouldInline:",protocol:"accessing",fn:function(e){var t=this,n,r,i={};try{return n=$recv(t._inlinedSelectors())._includes_($recv(e)._selector()),$core.assert(n)?($recv($recv($recv(e)._instructions())._allButFirst())._do_(function(e){r=$recv(e)._isClosure();if(!$core.assert(r))throw i=[!1]}),!0):!1}catch(s){if(s===i)return s[0];throw s}},messageSends:["ifFalse:","includes:","inlinedSelectors","selector","do:","allButFirst","instructions","isClosure"]}),$globals.IRSendInliner.klass),$core.addClass("IRAssignmentInliner",$globals.IRSendInliner,["assignment"],"Compiler-Inlining"),$core.addMethod($core.method({selector:"assignment",protocol:"accessing",fn:function(){var e=this,t;return t=e["@assignment"],t},messageSends:[]}),$globals.IRAssignmentInliner),$core.addMethod($core.method({selector:"assignment:",protocol:"accessing",fn:function(e){var t=this;return t["@assignment"]=e,t},messageSends:[]}),$globals.IRAssignmentInliner),$core.addMethod($core.method({selector:"inlineAssignment:",protocol:"inlining",fn:function(e){function r(){return $globals.IRInlinedAssignment||(typeof IRInlinedAssignment=="undefined"?nil:IRInlinedAssignment)}var t=this,n,i,s;return t._assignment_(e),n=$recv(r())._new(),i=$recv(e)._instructions(),$recv(i)._do_(function(e){return $recv(n)._add_(e)}),$recv(e)._replaceWith_(n),t._inlineSend_($recv($recv(n)._instructions())._last()),s=n,s},messageSends:["assignment:","new","do:","instructions","add:","replaceWith:","inlineSend:","last"]}),$globals.IRAssignmentInliner),$core.addMethod($core.method({selector:"inlineClosure:",protocol:"inlining",fn:function(e){function i(){return $globals.IRAssignment||(typeof IRAssignment=="undefined"?nil:IRAssignment)}var t=this,n,r,s,o,u,a,f,l,c,h,p;return n=$globals.IRAssignmentInliner.superclass.fn.prototype._inlineClosure_.apply($recv(t),[e]),s=$recv(n)._instructions(),o=$recv(s)._last(),r=$recv(o)._instructions(),$recv(r)._ifNotEmpty_(function(){u=$recv(r)._last(),a=$recv(u)._canBeAssigned();if($core.assert(a))return f=$recv(r)._last(),l=$recv(i())._new(),$recv(l)._add_($recv($recv(t._assignment())._instructions())._first()),$recv(l)._add_($recv($recv(r)._last())._copy()),c=$recv(l)._yourself(),h=c,$recv(f)._replaceWith_(h)}),p=n,p},messageSends:["inlineClosure:","instructions","last","ifNotEmpty:","ifTrue:","canBeAssigned","replaceWith:","add:","new","first","assignment","copy","yourself"]}),$globals.IRAssignmentInliner),$core.addClass("IRReturnInliner",$globals.IRSendInliner,[],"Compiler-Inlining"),$core.addMethod($core.method({selector:"inlineClosure:",protocol:"inlining",fn:function(e){function i(){return $globals.IRReturn||(typeof IRReturn=="undefined"?nil:IRReturn)}var t=this,n,r,s,o,u,a,f,l,c;return n=$globals.IRReturnInliner.superclass.fn.prototype._inlineClosure_.apply($recv(t),[e]),s=$recv($recv(n)._instructions())._last(),r=$recv(s)._instructions(),$recv(r)._ifNotEmpty_(function(){o=$recv(r)._last(),u=$recv(o)._isReturn();if(!$core.assert(u))return a=$recv(r)._last(),f=$recv(i())._new(),$recv(f)._add_($recv($recv(r)._last())._copy()),l=$recv(f)._yourself(),$recv(a)._replaceWith_(l)}),c=n,c},messageSends:["inlineClosure:","instructions","last","ifNotEmpty:","ifFalse:","isReturn","replaceWith:","add:","new","copy","yourself"]}),$globals.IRReturnInliner),$core.addMethod($core.method({selector:"inlineReturn:",protocol:"inlining",fn:function(e){var t=this,n,r,i;return n=t._inlinedReturn(),r=$recv(e)._instructions(),$recv(r)._do_(function(e){return $recv(n)._add_(e)}),$recv(e)._replaceWith_(n),t._inlineSend_($recv($recv(n)._instructions())._last()),i=n,i},messageSends:["inlinedReturn","do:","instructions","add:","replaceWith:","inlineSend:","last"]}),$globals.IRReturnInliner),$core.addMethod($core.method({selector:"inlinedReturn",protocol:"factory",fn:function(){function t(){return $globals.IRInlinedReturn||(typeof IRInlinedReturn=="undefined"?nil:IRInlinedReturn)}var e=this,n;return n=$recv(t())._new(),n},messageSends:["new"]}),$globals.IRReturnInliner),$core.addClass("InliningCodeGenerator",$globals.CodeGenerator,[],"Compiler-Inlining"),$core.addMethod($core.method({selector:"compileNode:",protocol:"compiling",fn:function(e){var t=this,n,r,i,s,o;return $recv(t._semanticAnalyzer())._visit_(e),n=$recv(t._translator())._visit_(e),$recv(t._inliner())._visit_(n),i=t._irTranslator(),$recv(i)._currentClass_(t._currentClass()),$recv(i)._visit_(n),s=$recv(i)._contents(),o=s,o},messageSends:["visit:","semanticAnalyzer","translator","inliner","currentClass:","irTranslator","currentClass","contents"]}),$globals.InliningCodeGenerator),$core.addMethod($core.method({selector:"inliner",protocol:"compiling",fn:function(){function t(){return $globals.IRInliner||(typeof IRInliner=="undefined"?nil:IRInliner)}var e=this,n;return n=$recv(t())._new(),n},messageSends:["new"]}),$globals.InliningCodeGenerator),$core.addMethod($core.method({selector:"irTranslator",protocol:"compiling",fn:function(){function t(){return $globals.IRInliningJSTranslator||(typeof IRInliningJSTranslator=="undefined"?nil:IRInliningJSTranslator)}var e=this,n;return n=$recv(t())._new(),n},messageSends:["new"]}),$globals.InliningCodeGenerator)}),define("amber_core/Compiler-Interpreter",["amber/boot","amber_core/Kernel-Methods","amber_core/Compiler-Semantic","amber_core/Kernel-Objects","amber_core/Compiler-Core","amber_core/Kernel-Exceptions","amber_core/Compiler-AST"],function($boot){"use strict";var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;$core.addPackage("Compiler-Interpreter"),$core.packages["Compiler-Interpreter"].innerEval=function(expr){return eval(expr)},$core.packages["Compiler-Interpreter"].transport={type:"amd",amdNamespace:"amber_core"},$core.addClass("AIBlockClosure",$globals.BlockClosure,["node","outerContext"],"Compiler-Interpreter"),$core.addMethod($core.method({selector:"applyTo:arguments:",protocol:"evaluating",fn:function(e,t){var n=this;return n._interpreterError(),n},messageSends:["interpreterError"]}),$globals.AIBlockClosure),$core.addMethod($core.method({selector:"compiledSource",protocol:"accessing",fn:function(){var e=this;return"[ AST Block closure ]"},messageSends:[]}),$globals.AIBlockClosure),$core.addMethod($core.method({selector:"currySelf",protocol:"converting",fn:function(){var e=this;return e._interpreterError(),e},messageSends:["interpreterError"]}),$globals.AIBlockClosure),$core.addMethod($core.method({selector:"initializeWithContext:node:",protocol:"initialization",fn:function(e,t){var n=this;return n["@node"]=t,n["@outerContext"]=e,n},messageSends:[]}),$globals.AIBlockClosure),$core.addMethod($core.method({selector:"interpreterError",protocol:"error handling",fn:function(){function t(){return $globals.ASTInterpreterError||(typeof ASTInterpreterError=="undefined"?nil:ASTInterpreterError)}var e=this;return $recv(t())._signal_("Method cannot be interpreted by the interpreter."),e},messageSends:["signal:"]}),$globals.AIBlockClosure),$core.addMethod($core.method({selector:"numArgs",protocol:"accessing",fn:function(){var e=this,t;return t=$recv($recv(e["@node"])._temps())._size(),t},messageSends:["size","temps"]}),$globals.AIBlockClosure),$core.addMethod($core.method({selector:"value",protocol:"evaluating",fn:function(){var e=this,t;return t=e._valueWithPossibleArguments_([]),t},messageSends:["valueWithPossibleArguments:"]}),$globals.AIBlockClosure),$core.addMethod($core.method({selector:"value:",protocol:"evaluating",fn:function(e){var t=this,n;return n=t._valueWithPossibleArguments_([e]),n},messageSends:["valueWithPossibleArguments:"]}),$globals.AIBlockClosure),$core.addMethod($core.method({selector:"value:value:",protocol:"evaluating",fn:function(e,t){var n=this,r;return r=n._valueWithPossibleArguments_([e,t]),r},messageSends:["valueWithPossibleArguments:"]}),$globals.AIBlockClosure),$core.addMethod($core.method({selector:"value:value:value:",protocol:"evaluating",fn:function(e,t,n){var r=this,i;return i=r._valueWithPossibleArguments_([e,t,n]),i},messageSends:["valueWithPossibleArguments:"]}),$globals.AIBlockClosure),$core.addMethod($core.method({selector:"valueWithPossibleArguments:",protocol:"evaluating",fn:function(e){var t=this,n,r,i,s,o,u,a,f;return n=$recv(t["@outerContext"])._newInnerContext(),i=$recv($recv($recv(t["@node"])._nodes())._first())._copy(),$recv(i)._parent_(nil),s=$recv(i)._yourself(),r=s,$recv($recv(r)._temps())._do_(function(e){return $recv(n)._defineLocal_(e)}),$recv($recv(t["@node"])._parameters())._withIndexDo_(function(t,r){return $recv(n)._defineLocal_(t),$recv(n)._localAt_put_(t,$recv(e)._at_ifAbsent_(r,function(){return nil}))}),o=$recv(n)._interpreter(),$recv(o)._node_($recv(r)._nextChild()),u=$recv(o)._proceed(),a=$recv(t["@outerContext"])._interpreter(),$recv(a)._setNonLocalReturnFromContext_(n),f=$recv($recv(n)._interpreter())._pop(),f},messageSends:["newInnerContext","parent:","copy","first","nodes","yourself","do:","temps","defineLocal:","withIndexDo:","parameters","localAt:put:","at:ifAbsent:","node:","interpreter","nextChild","proceed","setNonLocalReturnFromContext:","pop"]}),$globals.AIBlockClosure),$core.addMethod($core.method({selector:"forContext:node:",protocol:"instance creation",fn:function(e,t){var n=this,r,i,s;return r=n._new(),$recv(r)._initializeWithContext_node_(e,t),i=$recv(r)._yourself(),s=i,s},messageSends:["initializeWithContext:node:","new","yourself"]}),$globals.AIBlockClosure.klass),$core.addClass("AIContext",$globals.MethodContext,["outerContext","innerContext","pc","locals","selector","index","sendIndexes","evaluatedSelector","ast","interpreter","supercall"],"Compiler-Interpreter"),$core.addMethod($core.method({selector:"arguments",protocol:"interpreting",fn:function(){var e=this,t;return t=$recv($recv(e._ast())._arguments())._collect_(function(t){return e._localAt_ifAbsent_(t,function(){return e._error_("Argument not in context")})}),t},messageSends:["collect:","arguments","ast","localAt:ifAbsent:","error:"]}),$globals.AIContext),$core.addMethod($core.method({selector:"ast",protocol:"interpreting",fn:function(){var e=this,t,n,r,i,s,o;t=e._isBlockContext();if($core.assert(t)){n=e._outerContext();if((o=n)==null||o.isNil)r=n;else{var u;u=o,r=$recv(u)._ast()}return r}return i=e["@ast"],(o=i)==null||o.isNil?e._initializeAST():i,s=e["@ast"],s},messageSends:["ifTrue:","isBlockContext","ifNotNil:","outerContext","ast","ifNil:","initializeAST"]}),$globals.AIContext),$core.addMethod($core.method({selector:"basicLocalAt:",protocol:"private",fn:function(e){var t=this,n;return n=$recv(t._locals())._at_(e),n},messageSends:["at:","locals"]}),$globals.AIContext),$core.addMethod($core.method({selector:"basicLocalAt:put:",protocol:"private",fn:function(e,t){var n=this;return $recv(n._locals())._at_put_(e,t),n},messageSends:["at:put:","locals"]}),$globals.AIContext),$core.addMethod($core.method({selector:"basicReceiver",protocol:"interpreting",fn:function(){var e=this,t;return t=e._localAt_("self"),t},messageSends:["localAt:"]}),$globals.AIContext),$core.addMethod($core.method({selector:"defineLocal:",protocol:"accessing",fn:function(e){var t=this;return $recv(t._locals())._at_put_(e,nil),t},messageSends:["at:put:","locals"]}),$globals.AIContext),$core.addMethod($core.method({selector:"evaluate:on:",protocol:"evaluating",fn:function(e,t){var n=this,r;return r=$recv(t)._evaluate_context_(e,n),r},messageSends:["evaluate:context:"]}),$globals.AIContext),$core.addMethod($core.method({selector:"evaluateNode:",protocol:"evaluating",fn:function(e){function n(){return $globals.ASTInterpreter||(typeof ASTInterpreter=="undefined"?nil:ASTInterpreter)}var t=this,r,i,s;return r=$recv(n())._new(),$recv(r)._context_(t),$recv(r)._node_($recv(e)._nextChild()),$recv(r)._proceed(),i=$recv(r)._result(),s=i,s},messageSends:["context:","new","node:","nextChild","proceed","result"]}),$globals.AIContext),$core.addMethod($core.method({selector:"evaluatedSelector",protocol:"accessing",fn:function(){var e=this,t;return t=e["@evaluatedSelector"],t},messageSends:[]}),$globals.AIContext),$core.addMethod($core.method({selector:"evaluatedSelector:",protocol:"accessing",fn:function(e){var t=this;return t["@evaluatedSelector"]=e,t},messageSends:[]}),$globals.AIContext),$core.addMethod($core.method({selector:"index",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@index"],(r=t)==null||r.isNil?n=0:n=t,n},messageSends:["ifNil:"]}),$globals.AIContext),$core.addMethod($core.method({selector:"index:",protocol:"accessing",fn:function(e){var t=this;return t["@index"]=e,t},messageSends:[]}),$globals.AIContext),$core.addMethod($core.method({selector:"initializeAST",protocol:"initialization",fn:function(){function t(){return $globals.SemanticAnalyzer||(typeof SemanticAnalyzer=="undefined"?nil:SemanticAnalyzer)}var e=this,n;return n=e._method(),e["@ast"]=$recv(n)._ast(),$recv($recv(t())._on_($recv(e._method())._methodClass()))._visit_(e["@ast"]),e},messageSends:["ast","method","visit:","on:","methodClass"]}),$globals.AIContext),$core.addMethod($core.method({selector:"initializeFromMethodContext:",protocol:"initialization",fn:function(e){var t=this,n,r,i,s,o;t._evaluatedSelector_($recv(e)._evaluatedSelector()),t._index_($recv(e)._index()),t._sendIndexes_($recv(e)._sendIndexes()),t._receiver_($recv(e)._receiver()),t._supercall_($recv(e)._supercall()),n=t._selector_($recv(e)._selector()),r=$recv(e)._outerContext();if((o=r)==null||o.isNil)r;else{var u;u=o,i=$recv(u)._methodContext(),(o=i)==null||o.isNil?i:t._outerContext_($recv(t._class())._fromMethodContext_($recv(e)._outerContext())),s=$recv(e)._locals(),$recv(s)._keysAndValuesDo_(function(e,n){return $recv(t._locals())._at_put_(e,n)})}return t},messageSends:["evaluatedSelector:","evaluatedSelector","index:","index","sendIndexes:","sendIndexes","receiver:","receiver","supercall:","supercall","selector:","selector","ifNotNil:","outerContext","methodContext","outerContext:","fromMethodContext:","class","keysAndValuesDo:","locals","at:put:"]}),$globals.AIContext),$core.addMethod($core.method({selector:"initializeInterpreter",protocol:"initialization",fn:function(){function t(){return $globals.ASTInterpreter||(typeof ASTInterpreter=="undefined"?nil:ASTInterpreter)}var e=this,n,r,i,s;return n=$recv(t())._new(),$recv(n)._context_(e),r=$recv(n)._yourself(),e["@interpreter"]=r,i=e._innerContext(),(s=i)==null||s.isNil?i:e._setupInterpreter_(e["@interpreter"]),e},messageSends:["context:","new","yourself","ifNotNil:","innerContext","setupInterpreter:"]}),$globals.AIContext),$core.addMethod($core.method({selector:"initializeLocals",protocol:"initialization",fn:function(){function t(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}var e=this;return e["@locals"]=$recv(t())._new(),$recv(e["@locals"])._at_put_("thisContext",e),e},messageSends:["new","at:put:"]}),$globals.AIContext),$core.addMethod($core.method({selector:"innerContext",protocol:"accessing",fn:function(){var e=this,t;return t=e["@innerContext"],t},messageSends:[]}),$globals.AIContext),$core.addMethod($core.method({selector:"innerContext:",protocol:"accessing",fn:function(e){var t=this;return t["@innerContext"]=e,t},messageSends:[]}),$globals.AIContext),$core.addMethod($core.method({selector:"interpreter",protocol:"interpreting",fn:function(){var e=this,t,n,r;return t=e["@interpreter"],(r=t)==null||r.isNil?e._initializeInterpreter():t,n=e["@interpreter"],n},messageSends:["ifNil:","initializeInterpreter"]}),$globals.AIContext),$core.addMethod($core.method({selector:"interpreter:",protocol:"interpreting",fn:function(e){var t=this;return t["@interpreter"]=e,t},messageSends:[]}),$globals.AIContext),$core.addMethod($core.method({selector:"isTopContext",protocol:"testing",fn:function(){var e=this,t;return t=$recv(e._innerContext())._isNil(),t},messageSends:["isNil","innerContext"]}),$globals.AIContext),$core.addMethod($core.method({selector:"localAt:",protocol:"accessing",fn:function(e){var t=this,n,r;return n=t._lookupContextForLocal_(e),r=$recv(n)._basicLocalAt_(e),r},messageSends:["lookupContextForLocal:","basicLocalAt:"]}),$globals.AIContext),$core.addMethod($core.method({selector:"localAt:ifAbsent:",protocol:"accessing",fn:function(e,t){var n=this,r,i,s,o={};try{return r=n._lookupContextForLocal_ifNone_(e,function(){throw i=$recv(t)._value(),o=[i]}),s=$recv(r)._basicLocalAt_(e),s}catch(u){if(u===o)return u[0];throw u}},messageSends:["lookupContextForLocal:ifNone:","value","basicLocalAt:"]}),$globals.AIContext),$core.addMethod($core.method({selector:"localAt:put:",protocol:"accessing",fn:function(e,t){var n=this,r;return r=n._lookupContextForLocal_(e),$recv(r)._basicLocalAt_put_(e,t),n},messageSends:["lookupContextForLocal:","basicLocalAt:put:"]}),$globals.AIContext),$core.addMethod($core.method({selector:"locals",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@locals"],(r=t)==null||r.isNil?e._initializeLocals():t,n=e["@locals"],n},messageSends:["ifNil:","initializeLocals"]}),$globals.AIContext),$core.addMethod($core.method({selector:"lookupContextForLocal:",protocol:"private",fn:function(e){var t=this,n;return n=t._lookupContextForLocal_ifNone_(e,function(){return t._variableNotFound()}),n},messageSends:["lookupContextForLocal:ifNone:","variableNotFound"]}),$globals.AIContext),$core.addMethod($core.method({selector:"lookupContextForLocal:ifNone:",protocol:"private",fn:function(e,t){var n=this,r,i;return i=$recv(n._locals())._at_ifPresent_ifAbsent_(e,function(){return n},function(){return r=n._outerContext(),$recv(r)._ifNil_ifNotNil_(t,function(t){return $recv(t)._lookupContextForLocal_(e)})}),i},messageSends:["at:ifPresent:ifAbsent:","locals","ifNil:ifNotNil:","outerContext","lookupContextForLocal:"]}),$globals.AIContext),$core.addMethod($core.method({selector:"newInnerContext",protocol:"factory",fn:function(){var e=this,t,n,r;return t=$recv(e._class())._new(),$recv(t)._outerContext_(e),n=$recv(t)._yourself(),r=n,r},messageSends:["outerContext:","new","class","yourself"]}),$globals.AIContext),$core.addMethod($core.method({selector:"outerContext",protocol:"accessing",fn:function(){var e=this,t;return t=e["@outerContext"],t},messageSends:[]}),$globals.AIContext),$core.addMethod($core.method({selector:"outerContext:",protocol:"accessing",fn:function(e){var t=this,n,r;t["@outerContext"]=e,n=t["@outerContext"];if((r=n)==null||r.isNil)n;else{var i;i=r,$recv(i)._innerContext_(t)}return t},messageSends:["ifNotNil:","innerContext:"]}),$globals.AIContext),$core.addMethod($core.method({selector:"receiver:",protocol:"interpreting",fn:function(e){var t=this;return $recv(t._locals())._at_put_("self",e),t},messageSends:["at:put:","locals"]}),$globals.AIContext),$core.addMethod($core.method({selector:"selector",protocol:"accessing",fn:function(){var e=this,t;return t=e["@selector"],t},messageSends:[]}),$globals.AIContext),$core.addMethod($core.method({selector:"selector:",protocol:"accessing",fn:function(e){var t=this;return t["@selector"]=e,t},messageSends:[]}),$globals.AIContext),$core.addMethod($core.method({selector:"sendIndexAt:",protocol:"accessing",fn:function(e){var t=this,n;return n=$recv(t._sendIndexes())._at_ifAbsent_(e,function(){return 0}),n},messageSends:["at:ifAbsent:","sendIndexes"]}),$globals.AIContext),$core.addMethod($core.method({selector:"sendIndexes",protocol:"accessing",fn:function(){function t(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}var e=this,n,r,i;return n=e["@sendIndexes"],(i=n)==null||i.isNil?r=$recv(t())._new():r=n,r},messageSends:["ifNil:","new"]}),$globals.AIContext),$core.addMethod($core.method({selector:"sendIndexes:",protocol:"accessing",fn:function(e){var t=this;return t["@sendIndexes"]=e,t},messageSends:[]}),$globals.AIContext),$core.addMethod($core.method({selector:"setupInterpreter:",protocol:"interpreting",fn:function(e){function r(){return $globals.ASTPCNodeVisitor||(typeof ASTPCNodeVisitor=="undefined"?nil:ASTPCNodeVisitor)}var t=this,n,i,s,o,u,a,f,l,c,h;i=$recv(r())._new(),$recv(i)._selector_(t._evaluatedSelector()),$recv(i)._context_(t),s=i,o=t._ast(),$recv(s)._visit_(o),u=$recv(i)._currentNode(),n=u,a=$recv(t._ast())._sequenceNode();if((h=a)==null||h.isNil)a;else{var p;p=h,$recv($recv(p)._temps())._do_(function(e){return t._defineLocal_(e)})}return $recv(e)._node_(n),f=t._innerContext(),l=$recv(f)._arguments(),c=$recv(l)._reversed(),$recv(c)._do_(function(t){return $recv(e)._push_(t)}),$recv(e)._push_($recv(t._innerContext())._receiver()),t},messageSends:["selector:","new","evaluatedSelector","context:","visit:","ast","currentNode","ifNotNil:","sequenceNode","do:","temps","defineLocal:","node:","reversed","arguments","innerContext","push:","receiver"]}),$globals.AIContext),$core.addMethod($core.method({selector:"supercall",protocol:"interpreting",fn:function(){var e=this,t,n,r;return t=e["@supercall"],(r=t)==null||r.isNil?n=!1:n=t,n},messageSends:["ifNil:"]}),$globals.AIContext),$core.addMethod($core.method({selector:"supercall:",protocol:"interpreting",fn:function(e){var t=this;return t["@supercall"]=e,t},messageSends:[]}),$globals.AIContext),$core.addMethod($core.method({selector:"variableNotFound",protocol:"error handling",fn:function(){var e=this;return e._error_("Variable missing"),e},messageSends:["error:"]}),$globals.AIContext),$core.addMethod($core.method({selector:"fromMethodContext:",protocol:"instance creation",fn:function(e){var t=this,n,r,i;return n=t._new(),$recv(n)._initializeFromMethodContext_(e),r=$recv(n)._yourself(),i=r,i},messageSends:["initializeFromMethodContext:","new","yourself"]}),$globals.AIContext.klass),$core.addClass("AISemanticAnalyzer",$globals.SemanticAnalyzer,["context"],"Compiler-Interpreter"),$core.addMethod($core.method({selector:"context",protocol:"accessing",fn:function(){var e=this,t;return t=e["@context"],t},messageSends:[]}),$globals.AISemanticAnalyzer),$core.addMethod($core.method({selector:"context:",protocol:"accessing",fn:function(e){var t=this;return t["@context"]=e,t},messageSends:[]}),$globals.AISemanticAnalyzer),$core.addMethod($core.method({selector:"visitVariableNode:",protocol:"visiting",fn:function(e){function n(){return $globals.ASTContextVar||(typeof ASTContextVar=="undefined"?nil:ASTContextVar)}var t=this,r,i={};try{return $recv(t._context())._localAt_ifAbsent_($recv(e)._value(),function(){throw r=$globals.AISemanticAnalyzer.superclass.fn.prototype._visitVariableNode_.apply($recv(t),[e]),i=[r]}),$recv(e)._binding_($recv(n())._new()),t}catch(s){if(s===i)return s[0];throw s}},messageSends:["localAt:ifAbsent:","context","value","visitVariableNode:","binding:","new"]}),$globals.AISemanticAnalyzer),$core.addClass("ASTContextVar",$globals.ScopeVar,["context"],"Compiler-Interpreter"),$core.addMethod($core.method({selector:"context",protocol:"accessing",fn:function(){var e=this,t;return t=e["@context"],t},messageSends:[]}),$globals.ASTContextVar),$core.addMethod($core.method({selector:"context:",protocol:"accessing",fn:function(e){var t=this;return t["@context"]=e,t},messageSends:[]}),$globals.ASTContextVar),$core.addClass("ASTDebugger",$globals.Object,["interpreter","context","result"],"Compiler-Interpreter"),$core.addMethod($core.method({selector:"atEnd",protocol:"testing",fn:function(){var e=this,t,n,r;return t=e._context(),(r=t)==null||r.isNil?!0:(t,n=$recv($recv(e._interpreter())._atEnd())._and_(function(){return $recv(e._context())._isTopContext()}),n)},messageSends:["ifNil:","context","and:","atEnd","interpreter","isTopContext"]}),$globals.ASTDebugger),$core.addMethod($core.method({selector:"context",protocol:"accessing",fn:function(){var e=this,t;return t=e["@context"],t},messageSends:[]}),$globals.ASTDebugger),$core.addMethod($core.method({selector:"context:",protocol:"accessing",fn:function(e){var t=this;return t["@context"]=e,t},messageSends:[]}),$globals.ASTDebugger),$core.addMethod($core.method({selector:"flushInnerContexts",protocol:"actions",fn:function(){var e=this,t,n;t=e._context();if((n=t)==null||n.isNil)t;else{var r;r=n,$recv(r)._innerContext_(nil)}return e},messageSends:["ifNotNil:","context","innerContext:"]}),$globals.ASTDebugger),$core.addMethod($core.method({selector:"interpreter",protocol:"accessing",fn:function(){var e=this,t,n,r;t=e._context();if((r=t)==null||r.isNil)n=t;else{var i;i=r,n=$recv(i)._interpreter()}return n},messageSends:["ifNotNil:","context","interpreter"]}),$globals.ASTDebugger),$core.addMethod($core.method({selector:"method",protocol:"accessing",fn:function(){var e=this,t;return t=$recv(e._context())._method(),t},messageSends:["method","context"]}),$globals.ASTDebugger),$core.addMethod($core.method({selector:"node",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e._interpreter(),(r=t)==null||r.isNil?n=t:n=$recv(e._interpreter())._node(),n},messageSends:["ifNotNil:","interpreter","node"]}),$globals.ASTDebugger),$core.addMethod($core.method({selector:"onStep",protocol:"private",fn:function(){var e=this,t,n,r,i,s,o,u;t=e._interpreter(),e["@result"]=$recv(t)._result(),n=e._interpreter(),r=$recv(n)._atEnd();if($core.assert(r)){i=$recv(e._context())._outerContext();if((u=i)==null||u.isNil)i;else{var a;a=u,e._context_(a)}s=e._interpreter(),o=$recv(s)._atEnd(),$core.assert(o)||$recv(e._interpreter())._skip()}return e._flushInnerContexts(),e},messageSends:["result","interpreter","ifTrue:","atEnd","ifNotNil:","outerContext","context","context:","ifFalse:","skip","flushInnerContexts"]}),$globals.ASTDebugger),$core.addMethod($core.method({selector:"proceed",protocol:"stepping",fn:function(){var e=this;return $recv(function(){return e._atEnd()})._whileFalse_(function(){return e._stepOver()}),e},messageSends:["whileFalse:","atEnd","stepOver"]}),$globals.ASTDebugger),$core.addMethod($core.method({selector:"restart",protocol:"stepping",fn:function(){var e=this;return $recv(e._interpreter())._restart(),e._flushInnerContexts(),e},messageSends:["restart","interpreter","flushInnerContexts"]}),$globals.ASTDebugger),$core.addMethod($core.method({selector:"result",protocol:"accessing",fn:function(){var e=this,t;return t=e["@result"],t},messageSends:[]}),$globals.ASTDebugger),$core.addMethod($core.method({selector:"stepInto",protocol:"stepping",fn:function(){var e=this;return e._shouldBeImplemented(),e},messageSends:["shouldBeImplemented"]}),$globals.ASTDebugger),$core.addMethod($core.method({selector:"stepOver",protocol:"stepping",fn:function(){var e=this,t,n;return t=$recv(e._context())._isTopContext(),$core.assert(t)?$recv(e._interpreter())._stepOver():(n=e._interpreter(),$recv(n)._skip()),e._onStep(),e},messageSends:["ifFalse:ifTrue:","isTopContext","context","skip","interpreter","stepOver","onStep"]}),$globals.ASTDebugger),$core.addMethod($core.method({selector:"context:",protocol:"instance creation",fn:function(e){var t=this,n,r,i;return n=t._new(),$recv(n)._context_(e),r=$recv(n)._yourself(),i=r,i},messageSends:["context:","new","yourself"]}),$globals.ASTDebugger.klass),$core.addClass("ASTInterpreter",$globals.NodeVisitor,["node","context","stack","returnValue","returned","forceAtEnd"],"Compiler-Interpreter"),$core.addMethod($core.method({selector:"assign:to:",protocol:"private",fn:function(e,t){var n=this,r,i,s,o;return r=$recv($recv(e)._binding())._isInstanceVar(),$core.assert(r)?(i=n._context(),s=$recv(i)._receiver(),o=$recv(e)._value(),$recv(s)._instVarAt_put_(o,t)):$recv(n._context())._localAt_put_($recv(e)._value(),t),n},messageSends:["ifTrue:ifFalse:","isInstanceVar","binding","instVarAt:put:","receiver","context","value","localAt:put:"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"atEnd",protocol:"testing",fn:function(){var e=this,t,n;return t=e["@forceAtEnd"],$core.assert(t)?!0:(n=$recv(e._hasReturned())._or_(function(){return $recv(e._node())._isNil()}),n)},messageSends:["ifTrue:","or:","hasReturned","isNil","node"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"context",protocol:"accessing",fn:function(){var e=this,t;return t=e["@context"],t},messageSends:[]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"context:",protocol:"accessing",fn:function(e){var t=this;return t["@context"]=e,t},messageSends:[]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"eval:",protocol:"private",fn:function(e){function i(){return $globals.String||(typeof String=="undefined"?nil:String)}function s(){return $globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}var t=this,n,r,o,u,a,f,l;return n=$recv(i())._streamContents_(function(n){return $recv(n)._nextPutAll_("0,(function("),o=t._context(),u=$recv(o)._locals(),a=$recv(u)._keys(),$recv(a)._do_separatedBy_(function(e){return $recv(n)._nextPutAll_(e)},function(){return $recv(n)._nextPutAll_(",")}),$recv(n)._nextPutAll_("){ return (function() {"),$recv(n)._nextPutAll_(e),f=$recv(n)._nextPutAll_("})()})"),f}),r=$recv($recv(s())._new())._eval_(n),l=$recv(r)._valueWithPossibleArguments_($recv($recv(t._context())._locals())._values()),l},messageSends:["streamContents:","nextPutAll:","do:separatedBy:","keys","locals","context","eval:","new","valueWithPossibleArguments:","values"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"hasReturned",protocol:"testing",fn:function(){var e=this,t,n,r;return t=e["@returned"],(r=t)==null||r.isNil?n=!1:n=t,n},messageSends:["ifNil:"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"initialize",protocol:"initialization",fn:function(){var e=this;return $globals.ASTInterpreter.superclass.fn.prototype._initialize.apply($recv(e),[]),e["@forceAtEnd"]=!1,e},messageSends:["initialize"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"interpret",protocol:"interpreting",fn:function(){var e=this;return e._visit_(e._node()),e},messageSends:["visit:","node"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"interpret:",protocol:"interpreting",fn:function(e){var t=this;return t._node_(e),t._interpret(),t},messageSends:["node:","interpret"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"messageFromSendNode:arguments:",protocol:"private",fn:function(e,t){function r(){return $globals.Message||(typeof Message=="undefined"?nil:Message)}var n=this,i,s,o;return i=$recv(r())._new(),$recv(i)._selector_($recv(e)._selector()),$recv(i)._arguments_(t),s=$recv(i)._yourself(),o=s,o},messageSends:["selector:","new","selector","arguments:","yourself"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"messageNotUnderstood:receiver:",protocol:"private",fn:function(e,t){function r(){return $globals.MessageNotUnderstood||(typeof MessageNotUnderstood=="undefined"?nil:MessageNotUnderstood)}var n=this,i,s;return i=$recv(r())._new(),$recv(i)._meesage_(e),$recv(i)._receiver_(t),s=$recv(i)._signal(),n},messageSends:["meesage:","new","receiver:","signal"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"next",protocol:"interpreting",fn:function(){var e=this;return e._node_($recv(e._node())._nextNode()),e},messageSends:["node:","nextNode","node"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"node",protocol:"accessing",fn:function(){var e=this,t;return t=e["@node"],t},messageSends:[]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"node:",protocol:"accessing",fn:function(e){var t=this;return t["@node"]=e,t},messageSends:[]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"peek",protocol:"stack",fn:function(){var e=this,t,n,r={};try{return t=e._stack(),$recv(t)._ifEmpty_(function(){throw r=[nil]}),n=$recv(e._stack())._last(),n}catch(i){if(i===r)return i[0];throw i}},messageSends:["ifEmpty:","stack","last"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"pop",protocol:"stack",fn:function(){var e=this,t,n;return t=e._peek(),$recv(e._stack())._removeLast(),n=t,n},messageSends:["peek","removeLast","stack"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"proceed",protocol:"interpreting",fn:function(){var e=this;return $recv(function(){return e._atEnd()})._whileFalse_(function(){return e._step()}),e},messageSends:["whileFalse:","atEnd","step"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"push:",protocol:"stack",fn:function(e){var t=this,n;return n=$recv(t._stack())._add_(e),n},messageSends:["add:","stack"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"restart",protocol:"interpreting",fn:function(){var e=this;return e._node_($recv($recv(e._context())._ast())._nextChild()),e},messageSends:["node:","nextChild","ast","context"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"result",protocol:"accessing",fn:function(){var e=this,t,n;return t=e._hasReturned(),$core.assert(t)?n=e._returnValue():n=$recv(e._context())._receiver(),n},messageSends:["ifTrue:ifFalse:","hasReturned","returnValue","receiver","context"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"returnValue",protocol:"accessing",fn:function(){var e=this,t;return t=e["@returnValue"],t},messageSends:[]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"returnValue:",protocol:"accessing",fn:function(e){var t=this;return t["@returnValue"]=e,t},messageSends:[]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"sendMessage:to:superSend:",protocol:"private",fn:function(e,t,n){var r=this,i,s,o,u,a,f,l,c,h={};try{return $core.assert(n)?(o=$recv(t)._class(),u=$recv(o)._superclass(),(c=u)==null||c.isNil?(a=r._messageNotUnderstood_receiver_(e,t),a):(u,i=$recv($recv($recv($recv(t)._class())._superclass())._methodDictionary())._at_ifAbsent_($recv(e)._selector(),function(){throw f=r._messageNotUnderstood_receiver_(e,t),h=[f]}),l=$recv(i)._sendTo_arguments_(t,$recv(e)._arguments()),l)):(s=$recv(e)._sendTo_(t),s)}catch(p){if(p===h)return p[0];throw p}},messageSends:["ifFalse:","sendTo:","ifNil:","superclass","class","messageNotUnderstood:receiver:","at:ifAbsent:","methodDictionary","selector","sendTo:arguments:","arguments"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"setNonLocalReturnFromContext:",protocol:"interpreting",fn:function(e){var t=this,n,r;return n=$recv(e)._interpreter(),r=$recv(n)._hasReturned(),$core.assert(r)&&(t["@returned"]=!0,t["@returned"],t._returnValue_($recv($recv(e)._interpreter())._returnValue())),t},messageSends:["ifTrue:","hasReturned","interpreter","returnValue:","returnValue"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"skip",protocol:"interpreting",fn:function(){var e=this;return e._next(),e},messageSends:["next"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"stack",protocol:"accessing",fn:function(){function t(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}var e=this,n,r,i;return n=e["@stack"],(i=n)==null||i.isNil?(e["@stack"]=$recv(t())._new(),r=e["@stack"]):r=n,r},messageSends:["ifNil:","new"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"step",protocol:"interpreting",fn:function(){var e=this,t;return e._interpret(),t=e._next(),e},messageSends:["interpret","next"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"stepOver",protocol:"interpreting",fn:function(){var e=this,t,n;return e._step(),$recv(function(){return t=e._node(),n=$recv(t)._isNil(),$recv(n)._or_(function(){return $recv(e._node())._isSteppingNode()})})._whileFalse_(function(){return e._step()}),e},messageSends:["step","whileFalse:","or:","isNil","node","isSteppingNode"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"visit:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._hasReturned(),$core.assert(n)||$globals.ASTInterpreter.superclass.fn.prototype._visit_.apply($recv(t),[e]),t},messageSends:["ifFalse:","hasReturned","visit:"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"visitAssignmentNode:",protocol:"visiting",fn:function(e){var t=this,n;return n=t._pop(),t._pop(),t._push_(n),t._assign_to_($recv(e)._left(),n),t},messageSends:["pop","push:","assign:to:","left"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"visitBlockNode:",protocol:"visiting",fn:function(e){function r(){return $globals.AIBlockClosure||(typeof AIBlockClosure=="undefined"?nil:AIBlockClosure)}var t=this,n;return n=$recv(r())._forContext_node_(t._context(),e),t._push_(n),t},messageSends:["forContext:node:","context","push:"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"visitBlockSequenceNode:",protocol:"visiting",fn:function(e){var t=this;return $globals.ASTInterpreter.superclass.fn.prototype._visitBlockSequenceNode_.apply($recv(t),[e]),t["@forceAtEnd"]=!0,t},messageSends:["visitBlockSequenceNode:"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"visitDynamicArrayNode:",protocol:"visiting",fn:function(e){var t=this,n;return n=[],$recv($recv(e)._nodes())._do_(function(e){return $recv(n)._addFirst_(t._pop())}),t._push_(n),t},messageSends:["do:","nodes","addFirst:","pop","push:"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"visitDynamicDictionaryNode:",protocol:"visiting",fn:function(e){function r(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}function i(){return $globals.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}var t=this,n;return n=$recv(r())._new(),$recv($recv(e)._nodes())._do_(function(e){return $recv(n)._add_(t._pop())}),t._push_($recv(i())._newFromPairs_($recv(n)._reversed())),t},messageSends:["new","do:","nodes","add:","pop","push:","newFromPairs:","reversed"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"visitJSStatementNode:",protocol:"visiting",fn:function(e){var t=this;return t["@returned"]=!0,t._returnValue_(t._eval_($recv(e)._source())),t},messageSends:["returnValue:","eval:","source"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"visitNode:",protocol:"visiting",fn:function(e){var t=this;return t},messageSends:[]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"visitReturnNode:",protocol:"visiting",fn:function(e){var t=this;return t["@returned"]=!0,t._returnValue_(t._pop()),t},messageSends:["returnValue:","pop"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"visitSendNode:",protocol:"visiting",fn:function(e){var t=this,n,r,i,s,o;return r=$recv($recv(e)._arguments())._collect_(function(e){return t._pop()}),n=t._pop(),i=t._messageFromSendNode_arguments_(e,$recv(r)._reversed()),s=t._sendMessage_to_superSend_(i,n,$recv(e)._superSend()),o=$recv($recv(e)._isCascadeSendNode())._and_(function(){return $recv($recv(e)._isLastChild())._not()}),$core.assert(o)?t._push_(n):t._push_(s),t},messageSends:["collect:","arguments","pop","messageFromSendNode:arguments:","reversed","sendMessage:to:superSend:","superSend","ifTrue:ifFalse:","and:","isCascadeSendNode","not","isLastChild","push:"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"visitSequenceNode:",protocol:"visiting",fn:function(e){var t=this;return $recv($recv(e)._temps())._do_(function(e){return $recv(t._context())._defineLocal_(e)}),t},messageSends:["do:","temps","defineLocal:","context"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"visitValueNode:",protocol:"visiting",fn:function(e){var t=this;return t._push_($recv(e)._value()),t},messageSends:["push:","value"]}),$globals.ASTInterpreter),$core.addMethod($core.method({selector:"visitVariableNode:",protocol:"visiting",fn:function(e){function n(){return $globals.Platform||(typeof Platform=="undefined"?nil:Platform)}function r(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}var t=this,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w;return i=$recv(e)._binding(),s=$recv(i)._isUnknownVar(),$core.assert(s)?(o=$recv(n())._globals(),u=$recv(e)._value(),a=$recv(o)._at_ifAbsent_(u,function(){return t._error_("Unknown variable")}),f=t._push_(a),f):(l=$recv($recv(e)._binding())._isInstanceVar(),$core.assert(l)?(c=t._context(),h=$recv(c)._receiver(),p=$recv(e)._value(),w=$recv(h)._instVarAt_(p)):(d=t._context(),v=$recv(e)._value(),w=$recv(d)._localAt_ifAbsent_(v,function(){m=$recv(e)._value(),g=$recv(m)._isCapitalized();if($core.assert(g))return y=$recv(r())._globals(),b=$recv(e)._value(),$recv(y)._at_ifAbsent_(b,function(){return $recv($recv(n())._globals())._at_($recv(e)._value())})})),t._push_(w),t)},messageSends:["ifTrue:","isUnknownVar","binding","push:","at:ifAbsent:","globals","value","error:","ifTrue:ifFalse:","isInstanceVar","instVarAt:","receiver","context","localAt:ifAbsent:","isCapitalized","at:"]}),$globals.ASTInterpreter),$core.addClass("ASTInterpreterError",$globals.Error,[],"Compiler-Interpreter"),$core.addClass("ASTPCNodeVisitor",$globals.NodeVisitor,["context","index","selector","currentNode"],"Compiler-Interpreter"),$core.addMethod($core.method({selector:"context",protocol:"accessing",fn:function(){var e=this,t;return t=e["@context"],t},messageSends:[]}),$globals.ASTPCNodeVisitor),$core.addMethod($core.method({selector:"context:",protocol:"accessing",fn:function(e){var t=this;return t["@context"]=e,t},messageSends:[]}),$globals.ASTPCNodeVisitor),$core.addMethod($core.method({selector:"currentNode",protocol:"accessing",fn:function(){var e=this,t;return t=e["@currentNode"],t},messageSends:[]}),$globals.ASTPCNodeVisitor),$core.addMethod($core.method({selector:"increaseIndex",protocol:"accessing",fn:function(){var e=this;return e["@index"]=$recv(e._index()).__plus(1),e},messageSends:["+","index"]}),$globals.ASTPCNodeVisitor),$core.addMethod($core.method({selector:"index",protocol:"accessing",fn:function(){var e=this,t,n,r;return t=e["@index"],(r=t)==null||r.isNil?(e["@index"]=0,n=e["@index"]):n=t,n},messageSends:["ifNil:"]}),$globals.ASTPCNodeVisitor),$core.addMethod($core.method({selector:"selector",protocol:"accessing",fn:function(){var e=this,t;return t=e["@selector"],t},messageSends:[]}),$globals.ASTPCNodeVisitor),$core.addMethod($core.method({selector:"selector:",protocol:"accessing",fn:function(e){var t=this;return t["@selector"]=e,t},messageSends:[]}),$globals.ASTPCNodeVisitor),$core.addMethod($core.method({selector:"visitJSStatementNode:",protocol:"visiting",fn:function(e){var t=this;return t["@currentNode"]=e,t},messageSends:[]}),$globals.ASTPCNodeVisitor),$core.addMethod($core.method({selector:"visitSendNode:",protocol:"visiting",fn:function(e){var t=this,n,r,i,s,o,u;return r=t._context(),i=t._selector(),n=$recv(r)._sendIndexAt_(i),$globals.ASTPCNodeVisitor.superclass.fn.prototype._visitSendNode_.apply($recv(t),[e]),s=t._selector(),o=$recv(s).__eq($recv(e)._selector()),$core.assert(o)&&(u=$recv(t._index()).__eq(n),$core.assert(u)&&(t["@currentNode"]=e,t["@currentNode"]),t._increaseIndex()),t},messageSends:["sendIndexAt:","context","selector","visitSendNode:","ifTrue:","=","index","increaseIndex"]}),$globals.ASTPCNodeVisitor),$core.addMethod($core.method({selector:"isSteppingNode",protocol:"*Compiler-Interpreter",fn:function(){var e=this;return!0},messageSends:[]}),$globals.AssignmentNode),$core.addMethod($core.method({selector:"isSteppingNode",protocol:"*Compiler-Interpreter",fn:function(){var e=this;return!0},messageSends:[]}),$globals.BlockNode),$core.addMethod($core.method({selector:"isSteppingNode",protocol:"*Compiler-Interpreter",fn:function(){var e=this;return!0},messageSends:[]}),$globals.DynamicArrayNode),$core.addMethod($core.method({selector:"isSteppingNode",protocol:"*Compiler-Interpreter",fn:function(){var e=this;return!0},messageSends:[]}),$globals.DynamicDictionaryNode),$core.addMethod($core.method({selector:"isSteppingNode",protocol:"*Compiler-Interpreter",fn:function(){var e=this;return!0},messageSends:[]}),$globals.JSStatementNode),$core.addMethod($core.method({selector:"isSteppingNode",protocol:"*Compiler-Interpreter",fn:function(){var e=this;return!1},messageSends:[]}),$globals.Node),$core.addMethod($core.method({selector:"isSteppingNode",protocol:"*Compiler-Interpreter",fn:function(){var e=this;return!0},messageSends:[]}),$globals.SendNode)}),define("amber/lang",["./helpers","./deploy","./parser","amber_core/Platform-ImportExport","amber_core/Compiler-Exceptions","amber_core/Compiler-Core","amber_core/Compiler-AST","amber_core/Compiler-Semantic","amber_core/Compiler-IR","amber_core/Compiler-Inlining","amber_core/Compiler-Interpreter"],function(e){return e}),define("require-css/normalize",[],function(){function s(e,i,s){if(e.match(r)||e.match(n))return e;e=t(e);var a=s.match(n),f=i.match(n);return f&&(!a||a[1]!=f[1]||a[2]!=f[2])?o(e,i):u(o(e,i),s)}function o(e,t){e.substr(0,2)=="./"&&(e=e.substr(2));if(e.match(r)||e.match(n))return e;var i=t.split("/"),s=e.split("/");i.pop();while(curPart=s.shift())curPart==".."?i.pop():i.push(curPart);return i.join("/")}function u(e,t){var n=t.split("/");n.pop(),t=n.join("/")+"/",i=0;while(t.substr(i,1)==e.substr(i,1))i++;while(t.substr(i,1)!="/")i--;t=t.substr(i+1),e=e.substr(i+1),n=t.split("/");var r=e.split("/");out="";while(n.shift())out+="../";while(curPart=r.shift())out+=curPart+"/";return out.substr(0,out.length-1)}var e=/([^:])\/+/g,t=function(t){return t.replace(e,"$1/")},n=/[^\:\/]*:\/\/([^\/])*/,r=/^(\/|data:)/,a=function(e,n,r){n=t(n),r=t(r);var i=/@import\s*("([^"]*)"|'([^']*)')|url\s*\((?!#)\s*(\s*"([^"]*)"|'([^']*)'|[^\)]*\s*)\s*\)/ig,o,u,e;while(o=i.exec(e)){u=o[3]||o[2]||o[5]||o[6]||o[4];var a;a=s(u,n,r);var f=o[5]||o[6]?1:0;e=e.substr(0,i.lastIndex-u.length-f-1)+a+e.substr(i.lastIndex-f-1),i.lastIndex=i.lastIndex+(a.length-u.length)}return e};return a.convertURIBase=s,a.absoluteURI=o,a.relativeURI=u,a}),define("require-css/css",[],function(){if(typeof window=="undefined")return{load:function(e,t,n){n()}};var e=document.getElementsByTagName("head")[0],t=window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)|AndroidWebKit\/([^ ;]*)/)||0,n=!1,r=!0;t[1]||t[7]?n=parseInt(t[1])<6||parseInt(t[7])<=9:t[2]||t[8]?r=!1:t[4]&&(n=parseInt(t[4])<18);var i={};i.pluginBuilder="./css-builder";var s,o,u=function(){s=document.createElement("style"),e.appendChild(s),o=s.styleSheet||s.sheet},a=0,f=[],l,c=function(e){a++,a==32&&(u(),a=0),o.addImport(e),s.onload=function(){h()}},h=function(){l();var e=f.shift();if(!e){l=null;return}l=e[1],c(e[0])},p=function(e,t){(!o||!o.addImport)&&u();if(o&&o.addImport)l?f.push([e,t]):(c(e),l=t);else{s.textContent='@import "'+e+'";';var n=setInterval(function(){try{s.sheet.cssRules,clearInterval(n),t()}catch(e){}},10)}},d=function(t,n){var i=document.createElement("link");i.type="text/css",i.rel="stylesheet";if(r)i.onload=function(){i.onload=function(){},setTimeout(n,7)};else var s=setInterval(function(){for(var e=0;et.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function H(e){var t=$o(e.gutters,"CodeMirror-linenumbers");t==-1&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function B(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Zt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+tn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function j(e,t,n){this.cm=n;var s=this.vert=iu("div",[iu("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=iu("div",[iu("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(s),e(o),No(s,"scroll",function(){s.clientHeight&&t(s.scrollTop,"vertical")}),No(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedOverlay=!1,r&&i<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function F(){}function I(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&cu(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new S.scrollbarModel[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),No(t,"mousedown",function(){e.state.focused&&setTimeout(Go(or,e),0)}),t.setAttribute("not-content","true")},function(t,n){n=="horizontal"?Nr(e,t):Tr(e,t)},e),e.display.scrollbars.addClass&&hu(e.display.wrapper,e.display.scrollbars.addClass)}function q(e,t){t||(t=B(e));var n=e.display.barWidth,r=e.display.barHeight;R(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Z(e),R(e,B(e)),n=e.display.barWidth,r=e.display.barHeight}function R(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function U(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Yt(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,s=eo(t,r),o=eo(t,i);if(n&&n.ensure){var u=n.ensure.from.line,a=n.ensure.to.line;u=o&&(s=eo(t,to(Ks(t,a))-e.wrapper.clientHeight),o=a)}return{from:s,to:Math.max(o,s+1)}}function z(e){var t=e.display,n=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;var r=V(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,s=r+"px";for(var o=0;o=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&er(e)==0)return!1;W(e)&&(Qn(e),t.dims=tt(e));var i=r.first+r.size,s=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFromo&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),E&&(s=ls(e.doc,s),o=cs(e.doc,o));var u=s!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Zn(e,s,o),n.viewOffset=to(Ks(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var a=er(e);if(!u&&a==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var f=fu();return a>4&&(n.lineDiv.style.display="none"),nt(e,n.updateLineNumbers,t.dims),a>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,f&&fu()!=f&&f.offsetHeight&&f.focus(),ou(n.cursorDiv),ou(n.selectionDiv),n.gutters.style.height=0,u&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Jt(e,400)),n.updateLineNumbers=null,!0}function Q(e,t){var n=t.force,r=t.viewport;for(var i=!0;;i=!1){if(i&&e.options.lineWrapping&&t.oldDisplayWidth!=nn(e))n=!0;else{n=!1,r&&r.top!=null&&(r={top:Math.min(e.doc.height+Zt(e.display)-rn(e),r.top)}),t.visible=U(e.display,e.doc,r);if(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}if(!K(e,t))break;Z(e);var s=B(e);Wt(e),Y(e,s),q(e,s)}t.signal(e,"update",e);if(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo}function G(e,t){var n=new $(e,t);if(K(e,n)){Z(e),Q(e,n);var r=B(e);Wt(e),Y(e,r),q(e,r),n.finish()}}function Y(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";var n=t.docHeight+e.display.barHeight;e.display.heightForcer.style.top=n+"px",e.display.gutters.style.height=Math.max(n+tn(e),t.clientHeight)+"px"}function Z(e){var t=e.display,n=t.lineDiv.offsetTop;for(var s=0;s.001||l<-0.001){Ys(o.line,u),et(o.line);if(o.rest)for(var c=0;c-1&&(d=!1),rt(e,h,l,n)),d&&(ou(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(X(e.options,l)))),u=h.node.nextSibling}l+=h.size}while(u)u=a(u)}function rt(e,t,n,r){for(var i=0;i=0){var o=bt(s.from(),i.from()),u=yt(s.to(),i.to()),a=s.empty()?i.from()==i.head:s.from()==s.head;r<=t&&--t,e.splice(--r,2,new Et(a?u:o,a?o:u))}}return new wt(e,t)}function xt(e,t){return new wt([new Et(e,t||e)],0)}function Tt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Nt(e,t){if(t.linen?vt(n,Ks(e,n).text.length):Ct(t,Ks(e,t.line).text.length)}function Ct(e,t){var n=e.ch;return n==null||n>t?vt(e.line,t):n<0?vt(e.line,0):e}function kt(e,t){return t>=e.first&&t=s.ch:f.to>s.ch))){if(r){ko(l,"beforeCursorEnter");if(l.explicitlyCleared){if(!u.markedSpans)break;--a;continue}}if(!l.atomic)continue;var c=l.find(o<0?-1:1);if(mt(c,s)==0){c.ch+=o,c.ch<0?c.line>e.first?c=Nt(e,vt(c.line-1)):c=null:c.ch>u.text.length&&(c.line3&&(f(d,s.top,null,s.bottom),d=u,s.bottomc.bottom||p.bottom==c.bottom&&p.right>c.right)c=p;d0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Jt(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)return;var n=+(new Date)+e.options.workTime,r=Ni(t.mode,Gt(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(s){if(t.frontier>=e.display.viewFrom){var o=s.styles,u=Cs(e,s,r,!0);s.styles=u.styles;var a=s.styleClasses,f=u.classes;f?s.styleClasses=f:a&&(s.styleClasses=null);var l=!o||o.length!=s.styles.length||a!=f&&(!a||!f||a.bgClass!=f.bgClass||a.textClass!=f.textClass);for(var c=0;!l&&cn)return Jt(e,e.options.workDelay),!0}),i.length&&Un(e,function(){for(var t=0;to;--u){if(u<=s.first)return s.first;var a=Ks(s,u-1);if(a.stateAfter&&(!n||u<=s.frontier))return u;var f=Ro(a.text,null,e.options.tabSize);if(i==null||r>f)i=u-1,r=f}return i}function Gt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var s=Qt(e,t,n),o=s>r.first&&Ks(r,s-1).stateAfter;return o?o=Ni(r.mode,o):o=Ci(r.mode),r.iter(s,t,function(n){Ls(e,n.text,o);var u=s==t-1||s%5==0||s>=i.viewFrom&&s2&&s.push((a.bottom+f.top)/2-n.top)}}s.push(n.bottom-n.top)}}function on(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function un(e,t){t=as(t);var n=Zs(t),r=e.display.externalMeasured=new Vn(e.doc,t,n);r.lineN=n;var i=r.built=_s(e,r);return r.text=i.pre,uu(e.display.lineMeasure,i.pre),r}function an(e,t,n,r){return cn(e,ln(e,t),n,r)}function fn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tn)f=p-h,a=f-1,n>=p&&(l="right");if(a!=null){u=o[c+2],h==p&&s==(u.insertLeft?"left":"right")&&(l=s);if(s=="left"&&a==0)while(c&&o[c-2]==o[c-3]&&o[c-1].insertLeft)u=o[(c-=3)+2],l="left";if(s=="right"&&a==p-h)while(c0&&(l=s="right");var v;e.options.lineWrapping&&(v=u.getClientRects()).length>1?d=v[s=="right"?v.length-1:0]:d=u.getBoundingClientRect()}if(r&&i<9&&!a&&(!d||!d.left&&!d.right)){var m=u.parentNode.getClientRects()[0];m?d={left:m.left,right:m.left+On(e.display),top:m.top,bottom:m.bottom}:d=hn}var g=d.top-t.rect.top,y=d.bottom-t.rect.top,b=(g+y)/2,w=t.view.measure.heights;for(var c=0;cn.from?o(e-1):o(e,r)}r=r||Ks(e.doc,t.line),i||(i=ln(e,r));var a=no(r),f=t.ch;if(!a)return o(f);var l=Iu(a,f),c=u(f,l);return Fu!=null&&(c.other=u(f,Fu)),c}function Tn(e,t){var n=0,t=Nt(e.doc,t);e.options.lineWrapping||(n=On(e.display)*t.ch);var r=Ks(e.doc,t.line),i=to(r)+Yt(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Nn(e,t,n,r){var i=vt(e,t);return i.xRel=r,n&&(i.outside=!0),i}function Cn(e,t,n){var r=e.doc;n+=e.display.viewOffset;if(n<0)return Nn(r.first,0,!0,-1);var i=eo(r,n),s=r.first+r.size-1;if(i>s)return Nn(r.first+r.size-1,Ks(r,s).text.length,!0,1);t<0&&(t=0);var o=Ks(r,i);for(;;){var u=kn(e,o,i,t,n),a=os(o),f=a&&a.find(0,!0);if(!a||!(u.ch>f.from.ch||u.ch==f.from.ch&&u.xRel>0))return u;i=Zs(o=f.to.line)}}function kn(e,t,n,r,i){function f(r){var i=xn(e,vt(n,r),"line",t,a);return o=!0,s>i.bottom?i.left-u:sm)return Nn(n,p,g,1);for(;;){if(l?p==h||p==Ru(t,h,1):p-h<=1){var y=r1?1:0);return w}var E=Math.ceil(c/2),S=h+E;if(l){S=h;for(var x=0;xr){p=S,m=T;if(g=o)m+=1e3;c=E}else h=S,d=T,v=o,c-=E}}function An(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Ln==null){Ln=iu("pre");for(var t=0;t<49;++t)Ln.appendChild(document.createTextNode("x")),Ln.appendChild(iu("br"));Ln.appendChild(document.createTextNode("x"))}uu(e.measure,Ln);var n=Ln.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),ou(e.measure),n||1}function On(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=iu("span","xxxxxxxxxx"),n=iu("pre",[t]);uu(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Dn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,id:++_n},Mn?Mn.ops.push(e.curOp):e.curOp.ownsGroup=Mn={ops:[e.curOp],delayedCallbacks:[]}}function Pn(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new $(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Fn(e){e.updatedDisplay=e.mustUpdate&&K(e.cm,e.update)}function In(e){var t=e.cm,n=t.display;e.updatedDisplay&&Z(t),e.barMeasure=B(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=an(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+tn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-nn(t)));if(e.updatedDisplay||e.selectionChanged)e.newSelectionNodes=Ut(t)}function qn(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0;if(t>=i.viewTo)E&&ls(e.doc,t)i.viewFrom?Qn(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Qn(e);else if(t<=i.viewFrom){var s=Yn(e,n,n+r,1);s?(i.view=i.view.slice(s.index),i.viewFrom=s.lineN,i.viewTo+=r):Qn(e)}else if(n>=i.viewTo){var s=Yn(e,t,t,-1);s?(i.view=i.view.slice(0,s.index),i.viewTo=s.lineN):Qn(e)}else{var o=Yn(e,t,t,-1),u=Yn(e,n,n+r,1);o&&u?(i.view=i.view.slice(0,o.index).concat($n(e,o.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=r):Qn(e)}var a=i.externalMeasured;a&&(n=i.lineN&&t=r.viewTo)return;var s=r.view[Gn(e,t)];if(s.node==null)return;var o=s.changes||(s.changes=[]);$o(o,n)==-1&&o.push(n)}function Qn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Gn(e,t){if(t>=e.display.viewTo)return null;t-=e.display.viewFrom;if(t<0)return null;var n=e.display.view;for(var r=0;r0){if(i==o.length-1)return null;s=a+o[i].size-t,i++}else s=a-t;t+=s,n+=s}while(ls(e.doc,n)!=n){if(i==(r<0?0:o.length-1))return null;n+=r*o[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Zn(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=$n(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=$n(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Gn(e,n)))),r.viewTo=n}function er(e){var t=e.display.view,n=0;for(var r=0;r=9&&e.display.inputHasSelection===o||v&&/[\uf700-\uf7ff]/.test(o))return sr(e),!1;var u=!e.curOp;u&&Dn(e),e.display.shift=!1,o.charCodeAt(0)==8203&&s.sel==e.display.selForContextMenu&&!n&&(n="​");var a=0,f=Math.min(n.length,o.length);while(a1&&(rr&&rr.join("\n")==l?h=s.sel.ranges.length%rr.length==0&&Jo(rr,xu):c.length==s.sel.ranges.length&&(h=Jo(c,function(e){return[e]})));for(var p=s.sel.ranges.length-1;p>=0;p--){var d=s.sel.ranges[p],m=d.from(),g=d.to();a-1){ci(e,E.line,"smart");break}}else w.electricInput&&w.electricInput.test(Ks(s,E.line).text.slice(0,E.ch))&&ci(e,E.line,"smart")}}return fi(e),e.curOp.updateInput=y,e.curOp.typing=!0,o.length>1e3||o.indexOf("\n")>-1?t.value=e.display.prevInput="":e.display.prevInput=o,u&&Hn(e),e.state.pasteIncoming=e.state.cutIncoming=!1,!0}function sr(e,t){if(e.display.contextMenuPending)return;var n,s,o=e.doc;if(e.somethingSelected()){e.display.prevInput="";var u=o.sel.primary();n=Nu&&(u.to().line-u.from().line>100||(s=e.getSelection()).length>1e3);var a=n?"-":s||e.getSelection();e.display.input.value=a,e.state.focused&&Vo(e.display.input),r&&i>=9&&(e.display.inputHasSelection=a)}else t||(e.display.prevInput=e.display.input.value="",r&&i>=9&&(e.display.inputHasSelection=null));e.display.inaccurateSelection=n}function or(e){if(e.options.readOnly!="nocursor"&&(!d||fu()!=e.display.input))try{e.display.input.focus()}catch(t){}}function ur(e){e.state.focused||(or(e),Rr(e))}function ar(e){return e.options.readOnly||e.doc.cantEdit}function fr(e){function n(t){Mo(e,t)||So(t)}function o(n){if(e.somethingSelected())rr=e.getSelections(),t.inaccurateSelection&&(t.prevInput="",t.inaccurateSelection=!1,t.input.value=rr.join("\n"),Vo(t.input));else{var r=[],i=[];for(var s=0;s=9&&e.display.inputHasSelection&&(e.display.inputHasSelection=null),ir(e)}),No(t.input,"keydown",zn(e,jr)),No(t.input,"keypress",zn(e,qr)),No(t.input,"focus",Go(Rr,e)),No(t.input,"blur",Go(Ur,e)),e.options.dragDrop&&(No(t.scroller,"dragstart",function(t){xr(e,t)}),No(t.scroller,"dragenter",n),No(t.scroller,"dragover",n),No(t.scroller,"drop",zn(e,Sr))),No(t.scroller,"paste",function(n){if(cr(t,n))return;e.state.pasteIncoming=!0,or(e),nr(e)}),No(t.input,"paste",function(){if(s&&!e.state.fakedLastChar&&!(new Date-e.state.lastMiddleDown<200)){var n=t.input.selectionStart,r=t.input.selectionEnd;t.input.value+="$",t.input.selectionEnd=r,t.input.selectionStart=n,e.state.fakedLastChar=!0}e.state.pasteIncoming=!0,nr(e)}),No(t.input,"cut",o),No(t.input,"copy",o),l&&No(t.sizer,"mouseup",function(){fu()==t.input&&t.input.blur(),or(e)})}function lr(e){var t=e.display;if(t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth)return;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}function cr(e,t){for(var n=xo(t);n!=e.wrapper;n=n.parentNode)if(!n||n.nodeType==1&&n.getAttribute("cm-ignore-events")=="true"||n.parentNode==e.sizer&&n!=e.mover)return!0}function hr(e,t,n,r){var i=e.display;if(!n&&xo(t).getAttribute("not-content")=="true")return null;var s,o,u=i.lineSpace.getBoundingClientRect();try{s=t.clientX-u.left,o=t.clientY-u.top}catch(t){return null}var a=Cn(e,s,o),f;if(r&&a.xRel==1&&(f=Ks(e.doc,a.line).text).length==a.ch){var l=Ro(f,f.length,e.options.tabSize)-f.length;a=vt(a.line,Math.max(0,Math.round((s-en(e.display).left)/On(e.display))-l))}return a}function pr(e){if(Mo(this,e))return;var t=this,n=t.display;n.shift=e.shiftKey;if(cr(n,e)){s||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100));return}if(wr(t,e))return;var r=hr(t,e);window.focus();switch(To(e)){case 1:r?mr(t,e,r):xo(e)==n.scroller&&bo(e);break;case 2:s&&(t.state.lastMiddleDown=+(new Date)),r&&Ot(t.doc,r),setTimeout(Go(or,t),20),bo(e);break;case 3:b&&zr(t,e)}}function mr(e,t,n){setTimeout(Go(ur,e),0);var r=+(new Date),i;vr&&vr.time>r-400&&mt(vr.pos,n)==0?i="triple":dr&&dr.time>r-400&&mt(dr.pos,n)==0?(i="double",vr={time:r,pos:n}):(i="single",dr={time:r,pos:n});var s=e.doc.sel,o=v?t.metaKey:t.ctrlKey,u;e.options.dragDrop&&yu&&!ar(e)&&i=="single"&&(u=s.contains(n))>-1&&!s.ranges[u].empty()?gr(e,t,n,o):yr(e,t,n,i,o)}function gr(e,t,n,o){var u=e.display,a=zn(e,function(f){s&&(u.scroller.draggable=!1),e.state.draggingText=!1,Co(document,"mouseup",a),Co(u.scroller,"drop",a),Math.abs(t.clientX-f.clientX)+Math.abs(t.clientY-f.clientY)<10&&(bo(f),o||Ot(e.doc,n),or(e),r&&i==9&&setTimeout(function(){document.body.focus(),or(e)},20))});s&&(u.scroller.draggable=!0),e.state.draggingText=a,u.scroller.dragDrop&&u.scroller.dragDrop(),No(document,"mouseup",a),No(u.scroller,"drop",a)}function yr(e,t,n,r,i){function d(t){if(mt(p,t)==0)return;p=t;if(r=="rect"){var i=[],s=e.options.tabSize,l=Ro(Ks(o,n.line).text,n.ch,s),c=Ro(Ks(o,t.line).text,t.ch,s),h=Math.min(l,c),d=Math.max(l,c);for(var v=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));v<=m;v++){var g=Ks(o,v).text,y=Uo(g,h,s);h==d?i.push(new Et(vt(v,y),vt(v,y))):g.length>y&&i.push(new Et(vt(v,y),vt(v,Uo(g,d,s))))}i.length||i.push(new Et(n,n)),Bt(o,St(f.ranges.slice(0,a).concat(i),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=u,w=b.anchor,E=t;if(r!="single"){if(r=="double")var S=e.findWordAt(t);else var S=new Et(vt(t.line,0),Nt(o,vt(t.line+1,0)));mt(S.anchor,w)>0?(E=S.head,w=bt(b.from(),S.anchor)):(E=S.anchor,w=yt(b.to(),S.head))}var i=f.ranges.slice(0);i[a]=new Et(Nt(o,w),E),Bt(o,St(i,a),Fo)}}function g(t){var n=++m,i=hr(e,t,!0,r=="rect");if(!i)return;if(mt(i,p)!=0){ur(e),d(i);var u=U(s,o);(i.line>=u.to||i.linev.bottom?20:0;a&&setTimeout(zn(e,function(){if(m!=n)return;s.scroller.scrollTop+=a,g(t)}),50)}}function y(t){m=Infinity,bo(t),or(e),Co(document,"mousemove",b),Co(document,"mouseup",w),o.history.lastSelOrigin=null}var s=e.display,o=e.doc;bo(t);var u,a,f=o.sel,l=f.ranges;i&&!t.shiftKey?(a=o.sel.contains(n),a>-1?u=l[a]:u=new Et(n,n)):u=o.sel.primary();if(t.altKey)r="rect",i||(u=new Et(n,n)),n=hr(e,t,!0,!0),a=-1;else if(r=="double"){var c=e.findWordAt(n);e.display.shift||o.extend?u=At(o,u,c.anchor,c.head):u=c}else if(r=="triple"){var h=new Et(vt(n.line,0),Nt(o,vt(n.line+1,0)));e.display.shift||o.extend?u=At(o,u,h.anchor,h.head):u=h}else u=At(o,u,n);i?a==-1?(a=l.length,Bt(o,St(l.concat([u]),a),{scroll:!1,origin:"*mouse"})):l.length>1&&l[a].empty()&&r=="single"?(Bt(o,St(l.slice(0,a).concat(l.slice(a+1)),0)),f=o.sel):_t(o,a,u,Fo):(a=0,Bt(o,new wt([u],0),Fo),f=o.sel);var p=n,v=s.wrapper.getBoundingClientRect(),m=0,b=zn(e,function(e){To(e)?g(e):y(e)}),w=zn(e,y);No(document,"mousemove",b),No(document,"mouseup",w)}function br(e,t,n,r,i){try{var s=t.clientX,o=t.clientY}catch(t){return!1}if(s>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&bo(t);var u=e.display,a=u.lineDiv.getBoundingClientRect();if(o>a.bottom||!Do(e,n))return Eo(t);o-=a.top-u.viewOffset;for(var f=0;f=s){var c=eo(e.doc,o),h=e.options.gutters[f];return i(e,n,e,c,h,t),Eo(t)}}}function wr(e,t){return br(e,t,"gutterClick",!0,Ao)}function Sr(e){var t=this;if(Mo(t,e)||cr(t.display,e))return;bo(e),r&&(Er=+(new Date));var n=hr(t,e,!0),i=e.dataTransfer.files;if(!n||ar(t))return;if(i&&i.length&&window.FileReader&&window.File){var s=i.length,o=Array(s),u=0,a=function(e,r){var i=new FileReader;i.onload=zn(t,function(){o[r]=i.result;if(++u==s){n=Nt(t.doc,n);var e={from:n,to:n,text:xu(o.join("\n")),origin:"paste"};Gr(t.doc,e),Ht(t.doc,xt(n,Xr(e)))}}),i.readAsText(e)};for(var f=0;f-1){t.state.draggingText(e),setTimeout(Go(or,t),20);return}try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&(v?!e.metaKey:!e.ctrlKey))var l=t.listSelections();jt(t.doc,xt(n,n));if(l)for(var f=0;ff.clientWidth||o&&f.scrollHeight>f.clientHeight))return;if(o&&v&&s)e:for(var l=n.target,c=u.view;l!=f;l=l.parentNode)for(var h=0;h=9&&(t.display.inputHasSelection=null),nr(t)}function Rr(e){if(e.options.readOnly=="nocursor")return;e.state.focused||(ko(e,"focus",e),e.state.focused=!0,hu(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(sr(e),s&&setTimeout(Go(sr,e,!0),0))),tr(e),$t(e)}function Ur(e){e.state.focused&&(ko(e,"blur",e),e.state.focused=!1,cu(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function zr(e,t){function h(){if(n.input.selectionStart!=null){var t=e.somethingSelected(),r=n.input.value="​"+(t?n.input.value:"");n.prevInput=t?"":"​",n.input.selectionStart=1,n.input.selectionEnd=r.length,n.selForContextMenu=e.doc.sel}}function p(){n.contextMenuPending=!1,n.inputDiv.style.position="relative",n.input.style.cssText=l,r&&i<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),tr(e);if(n.input.selectionStart!=null){(!r||r&&i<9)&&h();var t=0,s=function(){n.selForContextMenu==e.doc.sel&&n.input.selectionStart==0?zn(e,ki.selectAll)(e):t++<10?n.detectingSelectAll=setTimeout(s,500):sr(e)};n.detectingSelectAll=setTimeout(s,200)}}if(Mo(e,t,"contextmenu"))return;var n=e.display;if(cr(n,t)||Wr(e,t))return;var o=hr(e,t),u=n.scroller.scrollTop;if(!o||a)return;var f=e.options.resetSelectionOnContextMenu;f&&e.doc.sel.contains(o)==-1&&zn(e,Bt)(e.doc,xt(o),jo);var l=n.input.style.cssText;n.inputDiv.style.position="absolute",n.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(t.clientY-5)+"px; left: "+(t.clientX-5)+"px; z-index: 1000; background: "+(r?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";if(s)var c=window.scrollY;or(e),s&&window.scrollTo(null,c),sr(e),e.somethingSelected()||(n.input.value=n.prevInput=" "),n.contextMenuPending=!0,n.selForContextMenu=e.doc.sel,clearTimeout(n.detectingSelectAll),r&&i>=9&&h();if(b){So(t);var d=function(){Co(window,"mouseup",d),setTimeout(p,20)};No(window,"mouseup",d)}else setTimeout(p,50)}function Wr(e,t){return Do(e,"gutterContextMenu")?br(e,t,"gutterContextMenu",!1,ko):!1}function Vr(e,t){if(mt(e,t.from)<0)return e;if(mt(e,t.to)<=0)return Xr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Xr(t).ch-t.to.ch),vt(n,r)}function $r(e,t){var n=[];for(var r=0;r=0;--i)Yr(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else Yr(e,t)}function Yr(e,t){if(t.text.length==1&&t.text[0]==""&&mt(t.from,t.to)==0)return;var n=$r(e,t);uo(e,t,n,e.cm?e.cm.curOp.id:NaN),ti(e,t,n,Ki(e,t));var r=[];$s(e,function(e,n){!n&&$o(r,e.history)==-1&&(yo(e.history,t),r.push(e.history)),ti(e,t,null,Ki(e,t))})}function Zr(e,t,n){if(e.cm&&e.cm.state.suppressEdits)return;var r=e.history,i,s=e.sel,o=t=="undo"?r.done:r.undone,u=t=="undo"?r.undone:r.done;for(var a=0;a=0;--a){var c=i.changes[a];c.origin=t;if(l&&!Qr(e,c,!1)){o.length=0;return}f.push(io(e,c));var h=a?$r(e,c):Xo(o);ti(e,c,h,Gi(e,c)),!a&&e.cm&&e.cm.scrollIntoView({from:c.from,to:Xr(c)});var p=[];$s(e,function(e,t){!t&&$o(p,e.history)==-1&&(yo(e.history,c),p.push(e.history)),ti(e,c,null,Gi(e,c))})}}function ei(e,t){if(t==0)return;e.first+=t,e.sel=new wt(Jo(e.sel.ranges,function(e){return new Et(vt(e.anchor.line+t,e.anchor.ch),vt(e.head.line+t,e.head.ch))}),e.sel.primIndex);if(e.cm){Jn(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())return;if(t.from.lines&&(t={from:t.from,to:vt(s,Ks(e,s).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Qs(e,t.from,t.to),n||(n=$r(e,t)),e.cm?ni(e.cm,t,r):qs(e,t,r),jt(e,n,jo)}function ni(e,t,n){var r=e.doc,i=e.display,s=t.from,o=t.to,u=!1,a=s.line;e.options.lineWrapping||(a=Zs(as(Ks(r,s.line))),r.iter(a,o.line+1,function(e){if(e==i.maxLine)return u=!0,!0})),r.sel.contains(t.from,t.to)>-1&&_o(e),qs(r,t,n,k(e)),e.options.lineWrapping||(r.iter(a,s.line+t.text.length,function(e){var t=D(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,u=!1)}),u&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,s.line),Jt(e,400);var f=t.text.length-(o.line-s.line)-1;t.full?Jn(e):s.line==o.line&&t.text.length==1&&!Is(e.doc,t)?Kn(e,s.line,"text"):Jn(e,s.line,o.line+1,f);var l=Do(e,"changes"),c=Do(e,"change");if(c||l){var h={from:s,to:o,text:t.text,removed:t.removed,origin:t.origin};c&&Ao(e,"change",e,h),l&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function ri(e,t,n,r,i){r||(r=n);if(mt(r,n)<0){var s=r;r=n,n=s}typeof t=="string"&&(t=xu(t)),Gr(e,{from:n,to:r,text:t,origin:i})}function ii(e,t){if(Mo(e,"scrollCursorIntoView"))return;var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1);if(i!=null&&!h){var s=iu("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-Yt(e.display))+"px; height: "+(t.bottom-t.top+tn(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(s),s.scrollIntoView(i),e.display.lineSpace.removeChild(s)}}function si(e,t,n,r){r==null&&(r=0);for(var i=0;i<5;i++){var s=!1,o=xn(e,t),u=!n||n==t?o:xn(e,n),a=ui(e,Math.min(o.left,u.left),Math.min(o.top,u.top)-r,Math.max(o.left,u.left),Math.max(o.bottom,u.bottom)+r),f=e.doc.scrollTop,l=e.doc.scrollLeft;a.scrollTop!=null&&(Tr(e,a.scrollTop),Math.abs(e.doc.scrollTop-f)>1&&(s=!0)),a.scrollLeft!=null&&(Nr(e,a.scrollLeft),Math.abs(e.doc.scrollLeft-l)>1&&(s=!0));if(!s)break}return o}function oi(e,t,n,r,i){var s=ui(e,t,n,r,i);s.scrollTop!=null&&Tr(e,s.scrollTop),s.scrollLeft!=null&&Nr(e,s.scrollLeft)}function ui(e,t,n,r,i){var s=e.display,o=An(e.display);n<0&&(n=0);var u=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:s.scroller.scrollTop,a=rn(e),f={};i-n>a&&(i=n+a);var l=e.doc.height+Zt(s),c=nl-o;if(nu+a){var p=Math.min(n,(h?l:i)-a);p!=u&&(f.scrollTop=p)}var d=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:s.scroller.scrollLeft,v=nn(e)-(e.options.fixedGutter?s.gutters.offsetWidth:0),m=r-t>v;return m&&(r=t+v),t<10?f.scrollLeft=0:tv+d-3&&(f.scrollLeft=r+(m?0:10)-v),f}function ai(e,t,n){(t!=null||n!=null)&&li(e),t!=null&&(e.curOp.scrollLeft=(e.curOp.scrollLeft==null?e.doc.scrollLeft:e.curOp.scrollLeft)+t),n!=null&&(e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+n)}function fi(e){li(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?vt(t.line,t.ch-1):t,r=vt(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function li(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Tn(e,t.from),r=Tn(e,t.to),i=ui(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function ci(e,t,n,r){var i=e.doc,s;n==null&&(n="add"),n=="smart"&&(i.mode.indent?s=Gt(e,t):n="prev");var o=e.options.tabSize,u=Ks(i,t),a=Ro(u.text,null,o);u.stateAfter&&(u.stateAfter=null);var f=u.text.match(/^\s*/)[0],l;if(!r&&!/\S/.test(u.text))l=0,n="not";else if(n=="smart"){l=i.mode.indent(s,u.text.slice(f.length),u.text);if(l==Bo||l>150){if(!r)return;n="prev"}}n=="prev"?t>i.first?l=Ro(Ks(i,t-1).text,null,o):l=0:n=="add"?l=a+e.options.indentUnit:n=="subtract"?l=a-e.options.indentUnit:typeof n=="number"&&(l=a+n),l=Math.max(0,l);var c="",h=0;if(e.options.indentWithTabs)for(var p=Math.floor(l/o);p;--p)h+=o,c+=" ";h=0;t--)ri(e.doc,"",r[t].from,r[t].to,"+delete");fi(e)})}function di(e,t,n,r,i){function l(){var t=s+n;return t=e.first+e.size?f=!1:(s=t,a=Ks(e,t))}function c(e){var t=(i?Ru:Uu)(a,o,n,!0);if(t==null){if(!!e||!l())return f=!1;i?o=(n<0?Du:_u)(a):o=n<0?a.text.length:0}else o=t;return!0}var s=t.line,o=t.ch,u=n,a=Ks(e,s),f=!0;if(r=="char")c();else if(r=="column")c(!0);else if(r=="word"||r=="group"){var h=null,p=r=="group",d=e.cm&&e.cm.getHelper(t,"wordChars");for(var v=!0;;v=!1){if(n<0&&!c(!v))break;var m=a.text.charAt(o)||"\n",g=eu(m,d)?"w":p&&m=="\n"?"n":!p||/\s/.test(m)?null:"p";p&&!v&&!g&&(g="s");if(h&&h!=g){n<0&&(n=1,c());break}g&&(h=g);if(n>0&&!c(!v))break}}var y=Rt(e,vt(s,o),u,!0);return f||(y.hitSide=!0),y}function vi(e,t,n,r){var i=e.doc,s=t.left,o;if(r=="page"){var u=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);o=t.top+n*(u-(n<0?1.5:.5)*An(e.display))}else r=="line"&&(o=n>0?t.bottom+3:t.top-3);for(;;){var a=Cn(e,s,o);if(!a.outside)break;if(n<0?o<=0:o>=i.height){a.hitSide=!0;break}o+=n*5}return a}function yi(e,t,n,r){S.defaults[e]=t,n&&(gi[e]=r?function(e,t,r){r!=bi&&n(e,t,r)}:n)}function Ai(e){var t=e.split(/-(?!$)/),e=t[t.length-1],n,r,i,s;for(var o=0;o0||o==0&&s.clearWhenEmpty!==!1)return s;s.replacedWith&&(s.collapsed=!0,s.widgetNode=iu("span",[s.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(s.widgetNode.insertLeft=!0));if(s.collapsed){if(us(e,t.line,t,n,s)||t.line!=n.line&&us(e,n.line,t,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");E=!0}s.addToHistory&&uo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var u=t.line,a=e.cm,f;e.iter(u,n.line+1,function(e){a&&s.collapsed&&!a.options.lineWrapping&&as(e)==a.display.maxLine&&(f=!0),s.collapsed&&u!=t.line&&Ys(e,0),Vi(e,new zi(s,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u}),s.collapsed&&e.iter(t.line,n.line+1,function(t){hs(e,t)&&Ys(t,0)}),s.clearOnEnter&&No(s,"beforeCursorEnter",function(){s.clear()}),s.readOnly&&(w=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),s.collapsed&&(s.id=++Bi,s.atomic=!0);if(a){f&&(a.curOp.updateMaxLine=!0);if(s.collapsed)Jn(a,t.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var l=t.line;l<=n.line;l++)Kn(a,l,"text");s.atomic&&It(a.doc),Ao(a,"markerAdded",a,s)}return s}function Ii(e,t,n,r,i){r=Qo(r),r.shared=!1;var s=[ji(e,t,n,r,i)],o=s[0],u=r.widgetNode;return $s(e,function(e){u&&(r.widgetNode=u.cloneNode(!0)),s.push(ji(e,Nt(e,t),Nt(e,n),r,i));for(var a=0;a=t:s.to>t);(i||(i=[])).push(new zi(o,s.from,a?null:s.to))}}return i}function Ji(e,t,n){if(e)for(var r=0,i;r=t:s.to>t);if(u||s.from==t&&o.type=="bookmark"&&(!n||s.marker.insertLeft)){var a=s.from==null||(o.inclusiveLeft?s.from<=t:s.from0&&u)for(var c=0;c0)continue;var l=[a,1],c=mt(f.from,u.from),h=mt(f.to,u.to);(c<0||!o.inclusiveLeft&&!c)&&l.push({from:f.from,to:u.from}),(h>0||!o.inclusiveRight&&!h)&&l.push({from:u.to,to:f.to}),i.splice.apply(i,l),a+=l.length-1}}return i}function Zi(e){var t=e.markedSpans;if(!t)return;for(var n=0;n=0&&c<=0||l<=0&&c>=0)continue;if(l<=0&&(mt(f.to,n)>0||a.marker.inclusiveRight&&i.inclusiveLeft)||l>=0&&(mt(f.from,r)<0||a.marker.inclusiveLeft&&i.inclusiveRight))return!0}}function as(e){var t;while(t=ss(e))e=t.find(-1,!0).line;return e}function fs(e){var t,n;while(t=os(e))e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function ls(e,t){var n=Ks(e,t),r=as(n);return n==r?t:Zs(r)}function cs(e,t){if(t>e.lastLine())return t;var n=Ks(e,t),r;if(!hs(e,n))return t;while(r=os(n))n=r.find(1,!0).line;return Zs(n)+1}function hs(e,t){var n=E&&t.markedSpans;if(n)for(var r,i=0;it.start)return s}throw new Error("Mode "+e.name+" failed to advance stream.")}function Ts(e,t,n,r){function i(e){return{start:l.start,end:l.pos,string:l.current(),type:u||null,state:e?Ni(s.mode,f):f}}var s=e.doc,o=s.mode,u;t=Nt(s,t);var a=Ks(s,t.line),f=Gt(e,t.line,n),l=new Pi(a.text,e.options.tabSize),c;r&&(c=[]);while((r||l.pose.options.maxHighlightLength?(u=!1,o&&Ls(e,t,r,l.pos),l.pos=t.length,c=null):c=Es(xs(n,l,r,h),s);if(h){var p=h[0].name;p&&(c="m-"+(c?p+" "+c:p))}if(!u||f!=c){while(ae&&i.splice(a,1,e,i[a+1],r),a+=2,f=Math.min(e,r)}if(!t)return;if(u.opaque)i.splice(n,a-n,e,"cm-overlay "+t),a=n+2;else for(;na&&c.from<=a)break}if(c.to>=f)return e(n,r,i,s,o,u);e(n,r.slice(0,c.to-a),i,s,null,u),s=null,r=r.slice(c.to-a),a=c.to}}}function js(e,t,n,r){var i=!r&&n.widgetNode;i&&(e.map.push(e.pos,e.pos+t,i),e.content.appendChild(i)),e.pos+=t}function Fs(e,t,n){var r=e.markedSpans,i=e.text,s=0;if(!r){for(var o=1;oa)?(w.to!=null&&h>w.to&&(h=w.to,d=""),E.className&&(p+=" "+E.className),E.css&&(c=E.css),E.startStyle&&w.from==a&&(v+=" "+E.startStyle),E.endStyle&&w.to==h&&(d+=" "+E.endStyle),E.title&&!m&&(m=E.title),E.collapsed&&(!g||rs(g.marker,E)<0)&&(g=w)):w.from>a&&h>w.from&&(h=w.from),E.type=="bookmark"&&w.from==a&&E.widgetNode&&y.push(E)}if(g&&(g.from||0)==a){js(t,(g.to==null?u+1:g.to)-a,g.marker,g.from==null);if(g.to==null)return}if(!g&&y.length)for(var b=0;b=u)break;var S=Math.min(u,h);for(;;){if(f){var x=a+f.length;if(!g){var T=x>S?f.slice(0,S-a):f;t.addToken(t,T,l?l+p:p,v,a+T.length==h?d:"",m,c)}if(x>=S){f=f.slice(S-a),a=S;break}a=x,v=""}f=i.slice(s,s=n[o++]),l=Ms(n[o++],t.cm.options)}}}function Is(e,t){return t.from.ch==0&&t.to.ch==0&&Xo(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function qs(e,t,n,r){function i(e){return n?n[e]:null}function s(e,n,i){bs(e,n,i,r),Ao(e,"change",e,t)}function o(e,t){for(var n=e,s=[];n1&&e.remove(u.line+1,d-1),e.insert(u.line+1,v)}Ao(e,"change",e,t)}function Rs(e){this.lines=e,this.parent=null;for(var t=0,n=0;t=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],s=i.chunkSize();if(t1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Xo(e.done)}function uo(e,t,n,r){var i=e.history;i.undone.length=0;var s=+(new Date),o;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||t.origin.charAt(0)=="*"))&&(o=oo(i,i.lastOp==r))){var u=Xo(o.changes);mt(t.from,t.to)==0&&mt(t.from,u.to)==0?u.to=Xr(t):o.changes.push(io(e,t))}else{var a=Xo(i.done);(!a||!a.ranges)&&lo(e.sel,i.done),o={changes:[io(e,t)],generation:i.generation},i.done.push(o);while(i.done.length>i.undoDepth)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,u||ko(e,"historyAdded")}function ao(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function fo(e,t,n,r){var i=e.history,s=r&&r.origin;n==i.lastSelOp||s&&i.lastSelOrigin==s&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==s||ao(e,s,Xo(i.done),t))?i.done[i.done.length-1]=t:lo(t,i.done),i.lastSelTime=+(new Date),i.lastSelOrigin=s,i.lastSelOp=n,r&&r.clearRedo!==!1&&so(i.undone)}function lo(e,t){var n=Xo(t);n&&n.ranges&&n.equals(e)||t.push(e)}function co(e,t,n,r){var i=t["spans_"+e.id],s=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[s]=n.markedSpans),++s})}function ho(e){if(!e)return null;for(var t=0,n;t-1&&(Xo(u)[c]=f[c],delete f[c])}}return i}function mo(e,t,n,r){n0}function Po(e){e.prototype.on=function(e,t){No(this,e,t)},e.prototype.off=function(e,t){Co(this,e,t)}}function qo(){this.id=null}function Uo(e,t,n){for(var r=0,i=0;;){var s=e.indexOf(" ",r);s==-1&&(s=e.length);var o=s-r;if(s==e.length||i+o>=t)return r+Math.min(o,t-i);i+=s-r,i+=n-i%n,r=s+1;if(i>=t)return r}}function Wo(e){while(zo.length<=e)zo.push(Xo(zo)+" ");return zo[e]}function Xo(e){return e[e.length-1]}function $o(e,t){for(var n=0;n-1&&Zo(e)?!0:t.test(e):Zo(e)}function tu(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function ru(e){return e.charCodeAt(0)>=768&&nu.test(e)}function iu(e,t,n,r){var i=document.createElement(e);n&&(i.className=n),r&&(i.style.cssText=r);if(typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var s=0;s0;--t)e.removeChild(e.firstChild);return e}function uu(e,t){return ou(e).appendChild(t)}function fu(){return document.activeElement}function lu(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function pu(e,t){var n=e.split(" ");for(var r=0;r2&&!(r&&i<8))}return bu?iu("span","​"):iu("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px")}function Su(e){if(Eu!=null)return Eu;var t=uu(e,document.createTextNode("AخA")),n=su(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=su(t,1,2).getBoundingClientRect();return Eu=r.right-n.right<3}function ku(e){if(Cu!=null)return Cu;var t=uu(e,iu("span","x")),n=t.getBoundingClientRect(),r=su(t,0,1).getBoundingClientRect();return Cu=Math.abs(n.left-r.left)>1}function Au(e,t,n,r){if(!e)return r(t,n,"ltr");var i=!1;for(var s=0;st||t==n&&o.to==t)r(Math.max(o.from,t),Math.min(o.to,n),o.level==1?"rtl":"ltr"),i=!0}i||r(t,n,"ltr")}function Ou(e){return e.level%2?e.to:e.from}function Mu(e){return e.level%2?e.from:e.to}function _u(e){var t=no(e);return t?Ou(t[0]):0}function Du(e){var t=no(e);return t?Mu(Xo(t)):e.text.length}function Pu(e,t){var n=Ks(e.doc,t),r=as(n);r!=n&&(t=Zs(r));var i=no(r),s=i?i[0].level%2?Du(r):_u(r):0;return vt(t,s)}function Hu(e,t){var n,r=Ks(e.doc,t);while(n=os(r))r=n.find(1,!0).line,t=null;var i=no(r),s=i?i[0].level%2?_u(r):Du(r):r.text.length;return vt(t==null?Zs(r):t,s)}function Bu(e,t){var n=Pu(e,t.line),r=Ks(e.doc,n.line),i=no(r);if(!i||i[0].level==0){var s=Math.max(0,r.text.search(/\S/)),o=t.line==n.line&&t.ch<=s&&t.ch;return vt(n.line,o?0:s)}return n}function ju(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:tt)return n;if(i.from==t||i.to==t){if(r!=null)return ju(e,i.level,e[r].level)?(i.from!=i.to&&(Fu=r),n):(i.from!=i.to&&(Fu=n),r);r=n}}return r}function qu(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&ru(e.text.charAt(t)));return t}function Ru(e,t,n,r){var i=no(e);if(!i)return Uu(e,t,n,r);var s=Iu(i,t),o=i[s],u=qu(e,t,o.level%2?-n:n,r);for(;;){if(u>o.from&&u0==o.level%2?o.to:o.from);o=i[s+=n];if(!o)return null;n>0==o.level%2?u=qu(e,o.to,-1,r):u=qu(e,o.from,1,r)}}function Uu(e,t,n,r){var i=t+n;if(r)while(i>0&&ru(e.text.charAt(i)))i+=n;return i<0||i>e.text.length?null:i}var e=/gecko\/\d/i.test(navigator.userAgent),t=/MSIE \d/.test(navigator.userAgent),n=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),r=t||n,i=r&&(t?document.documentMode||6:n[1]),s=/WebKit\//.test(navigator.userAgent),o=s&&/Qt\/\d+\.\d+/.test(navigator.userAgent),u=/Chrome\//.test(navigator.userAgent),a=/Opera\//.test(navigator.userAgent),f=/Apple Computer/.test(navigator.vendor),l=/KHTML\//.test(navigator.userAgent),c=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),h=/PhantomJS/.test(navigator.userAgent),p=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),d=p||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),v=p||/Mac/.test(navigator.platform),m=/win/i.test(navigator.platform),g=a&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);g&&(g=Number(g[1])),g&&g>=15&&(a=!1,s=!0);var y=v&&(o||a&&(g==null||g<12.11)),b=e||r&&i>=9,w=!1,E=!1;j.prototype=Qo({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var s=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+s+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&e.clientHeight>0&&(r==0&&this.overlayHack(),this.checkedOverlay=!0),{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e)},overlayHack:function(){var e=v&&!c?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=e;var t=this,n=function(e){xo(e)!=t.vert&&xo(e)!=t.horiz&&zn(t.cm,pr)(e)};No(this.vert,"mousedown",n),No(this.horiz,"mousedown",n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},j.prototype),F.prototype=Qo({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},F.prototype),S.scrollbarModel={"native":j,"null":F},$.prototype.signal=function(e,t){Do(e,t)&&this.events.push(arguments)},$.prototype.finish=function(){for(var e=0;e=0&&mt(e,r.to())<=0)return n}return-1}},Et.prototype={from:function(){return bt(this.anchor,this.head)},to:function(){return yt(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var hn={left:0,right:0,top:0,bottom:0},Ln,Mn=null,_n=0,rr=null,dr,vr,Er=0,Cr=0,kr=null;r?kr=-0.53:e?kr=15:u?kr=-0.7:f&&(kr=-1/3);var Lr=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}};S.wheelEventPixels=function(e){var t=Lr(e);return t.x*=kr,t.y*=kr,t};var _r=new qo,Br=null,Xr=S.changeEnd=function(e){return e.text?vt(e.from.line+e.text.length-1,Xo(e.text).length+(e.text.length==1?e.from.ch:0)):e.to};S.prototype={constructor:S,focus:function(){window.focus(),or(this),nr(this)},setOption:function(e,t){var n=this.options,r=n[e];if(n[e]==t&&e!="mode")return;n[e]=t,gi.hasOwnProperty(e)&&zn(this,gi[e])(this,t,r)},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Di(e))},removeKeyMap:function(e){var t=this.state.keyMaps;for(var n=0;n0&&_t(this.doc,r,new Et(s,f[r].to()),jo)}else i.head.line>n&&(ci(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&fi(this))}}),getTokenAt:function(e,t){return Ts(this,e,t)},getLineTokens:function(e,t){return Ts(this,vt(e),t,!0)},getTokenTypeAt:function(e){e=Nt(this.doc,e);var t=ks(this,Ks(this.doc,e.line)),n=0,r=(t.length-1)/2,i=e.ch,s;if(i==0)s=t[2];else for(;;){var o=n+r>>1;if((o?t[o*2-1]:0)>=i)r=o;else{if(!(t[o*2+1]r&&(e=r,n=!0);var i=Ks(this.doc,e);return wn(this,i,{top:0,left:0},t||"page").top+(n?this.doc.height-to(i):0)},defaultTextHeight:function(){return An(this.display)},defaultCharWidth:function(){return On(this.display)},setGutterMarker:Wn(function(e,t,n){return hi(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&tu(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Wn(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Kn(t,r,"gutter"),tu(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),addLineWidget:Wn(function(e,t,n){return gs(this,e,t,n)}),removeLineWidget:function(e){e.clear()},lineInfo:function(e){if(typeof e=="number"){if(!kt(this.doc,e))return null;var t=e;e=Ks(this.doc,e);if(!e)return null}else{var t=Zs(e);if(t==null)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var s=this.display;e=xn(this,Nt(this.doc,e));var o=e.bottom,u=e.left;t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),s.sizer.appendChild(t);if(r=="over")o=e.top;else if(r=="above"||r=="near"){var a=Math.max(s.wrapper.clientHeight,this.doc.height),f=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(r=="above"||e.bottom+t.offsetHeight>a)&&e.top>t.offsetHeight?o=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=a&&(o=e.bottom),u+t.offsetWidth>f&&(u=f-t.offsetWidth)}t.style.top=o+"px",t.style.left=t.style.right="",i=="right"?(u=s.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):(i=="left"?u=0:i=="middle"&&(u=(s.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&oi(this,u,o,u+t.offsetWidth,o+t.offsetHeight)},triggerOnKeyDown:Wn(jr),triggerOnKeyPress:Wn(qr),triggerOnKeyUp:Ir,execCommand:function(e){if(ki.hasOwnProperty(e))return ki[e](this)},findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var s=0,o=Nt(this.doc,e);s0&&u(n.charAt(r-1)))--r;while(i.5)&&L(this),ko(this,"refresh",this)}),swapDoc:Wn(function(e){var t=this.doc;return t.cm=null,Js(this,e),gn(this),sr(this),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Ao(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Po(S);var mi=S.defaults={},gi=S.optionHandlers={},bi=S.Init={toString:function(){return"CodeMirror.Init"}};yi("value","",function(e,t){e.setValue(t)},!0),yi("mode",null,function(e,t){e.doc.modeOption=t,T(e)},!0),yi("indentUnit",2,T,!0),yi("indentWithTabs",!1),yi("smartIndent",!0),yi("tabSize",4,function(e){N(e),gn(e),Jn(e)},!0),yi("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t){e.options.specialChars=new RegExp(t.source+(t.test(" ")?"":"| "),"g"),e.refresh()},!0),yi("specialCharPlaceholder",Ds,function(e){e.refresh()},!0),yi("electricChars",!0),yi("rtlMoveVisually",!m),yi("wholeLineUpdateBefore",!0),yi("theme","default",function(e){A(e),O(e)},!0),yi("keyMap","default",function(e,t,n){var r=Di(t),i=n!=S.Init&&Di(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),yi("extraKeys",null),yi("lineWrapping",!1,C,!0),yi("gutters",[],function(e){H(e.options),O(e)},!0),yi("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?V(e.display)+"px":"0",e.refresh()},!0),yi("coverGutterNextToScrollbar",!1,function(e){q(e)},!0),yi("scrollbarStyle","native",function(e){I(e),q(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),yi("lineNumbers",!1,function(e){H(e.options),O(e)},!0),yi("firstLineNumber",1,O,!0),yi("lineNumberFormatter",function(e){return e},O,!0),yi("showCursorWhenSelecting",!1,Wt,!0),yi("resetSelectionOnContextMenu",!0),yi("readOnly",!1,function(e,t){t=="nocursor"?(Ur(e),e.display.input.blur(),e.display.disabled=!0):(e.display.disabled=!1,t||sr(e))}),yi("disableInput",!1,function(e,t){t||sr(e)},!0),yi("dragDrop",!0),yi("cursorBlinkRate",530),yi("cursorScrollMargin",0),yi("cursorHeight",1,Wt,!0),yi("singleCursorHeightPerLine",!0,Wt,!0),yi("workTime",100),yi("workDelay",100),yi("flattenSpans",!0,N,!0),yi("addModeClass",!1,N,!0),yi("pollInterval",100),yi("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),yi("historyEventDelay",1250),yi("viewportMargin",10,function(e){e.refresh()},!0),yi("maxHighlightLength",1e4,N,!0),yi("moveInputWithCursor",!0,function(e,t){t||(e.display.inputDiv.style.top=e.display.inputDiv.style.left=0)}),yi("tabindex",null,function(e,t){e.display.input.tabIndex=t||""}),yi("autofocus",null);var wi=S.modes={},Ei=S.mimeModes={};S.defineMode=function(e,t){!S.defaults.mode&&e!="null"&&(S.defaults.mode=e),arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),wi[e]=t},S.defineMIME=function(e,t){Ei[e]=t},S.resolveMode=function(e){if(typeof e=="string"&&Ei.hasOwnProperty(e))e=Ei[e];else if(e&&typeof e.name=="string"&&Ei.hasOwnProperty(e.name)){var t=Ei[e.name];typeof t=="string"&&(t={name:t}),e=Ko(t,e),e.name=t.name}else if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return S.resolveMode("application/xml");return typeof e=="string"?{name:e}:e||{name:"null"}},S.getMode=function(e,t){var t=S.resolveMode(t),n=wi[t.name];if(!n)return S.getMode(e,"text/plain");var r=n(e,t);if(Si.hasOwnProperty(t.name)){var i=Si[t.name];for(var s in i){if(!i.hasOwnProperty(s))continue;r.hasOwnProperty(s)&&(r["_"+s]=r[s]),r[s]=i[s]}}r.name=t.name,t.helperType&&(r.helperType=t.helperType);if(t.modeProps)for(var s in t.modeProps)r[s]=t.modeProps[s];return r},S.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),S.defineMIME("text/plain","null");var Si=S.modeExtensions={};S.extendMode=function(e,t){var n=Si.hasOwnProperty(e)?Si[e]:Si[e]={};Qo(t,n)},S.defineExtension=function(e,t){S.prototype[e]=t},S.defineDocExtension=function(e,t){Ws.prototype[e]=t},S.defineOption=yi;var xi=[];S.defineInitHook=function(e){xi.push(e)};var Ti=S.helpers={};S.registerHelper=function(e,t,n){Ti.hasOwnProperty(e)||(Ti[e]=S[e]={_global:[]}),Ti[e][t]=n},S.registerGlobalHelper=function(e,t,n,r){S.registerHelper(e,t,r),Ti[e]._global.push({pred:n,val:r})};var Ni=S.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},Ci=S.startState=function(e,t,n){return e.startState?e.startState(t,n):!0};S.innerMode=function(e,t){while(e.innerMode){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var ki=S.commands={selectAll:function(e){e.setSelection(vt(e.firstLine(),0),vt(e.lastLine()),jo)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),jo)},killLine:function(e){pi(e,function(t){if(t.empty()){var n=Ks(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new vt(i.line,i.ch+1),e.replaceRange(s.charAt(i.ch-1)+s.charAt(i.ch-2),vt(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=Ks(e.doc,i.line-1).text;o&&e.replaceRange(s.charAt(0)+"\n"+o.charAt(o.length-1),vt(i.line-1,o.length-1),vt(i.line,1),"+transpose")}}n.push(new Et(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){Un(e,function(){var t=e.listSelections().length;for(var n=0;n=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||undefined},next:function(){if(this.post},eatSpace:function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}var r=function(e){return n?e.toLowerCase():e},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var Hi=S.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e};Po(Hi),Hi.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;t&&Dn(e);if(Do(this,"clear")){var n=this.find();n&&Ao(this,"clear",n.from,n.to)}var r=null,i=null;for(var s=0;se.display.maxLineLength&&(e.display.maxLine=a,e.display.maxLineLength=f,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Jn(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&It(e.doc)),e&&Ao(e,"markerCleared",e,this),t&&Hn(e),this.parent&&this.parent.clear()},Hi.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);var n,r;for(var i=0;i1||!(this.children[0]instanceof Rs))){var u=[];this.collapse(u),this.children=[new Rs(u)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){while(i.lines.length>50){var o=i.lines.splice(i.lines.length-25,25),u=new Rs(o);i.height-=u.height,this.children.splice(r+1,0,u),u.parent=this}this.maybeSpill()}break}e-=s}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Us(t);if(!e.parent){var r=new Us(e.children);r.parent=e,e.children=[r,n],e=r}else{e.size-=n.size,e.height-=n.height;var i=$o(e.parent.children,e);e.parent.children.splice(i+1,0,n)}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,n){for(var r=0;r=0;s--)Gr(this,r[s]);u?Ht(this,u):this.cm&&fi(this.cm)}),undo:Xn(function(){Zr(this,"undo")}),redo:Xn(function(){Zr(this,"redo")}),undoSelection:Xn(function(){Zr(this,"undo",!0)}),redoSelection:Xn(function(){Zr(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){var e=this.history,t=0,n=0;for(var r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Nt(this,e),t=Nt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(s){var o=s.markedSpans;if(o)for(var u=0;ua.to||a.from==null&&i!=e.line||i==t.line&&a.from>t.ch)&&(!n||n(a.marker))&&r.push(a.marker.parent||a.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=i,++n}),Nt(this,vt(n,t))},indexFromPos:function(e){e=Nt(this,e);var t=e.ch;return e.linet&&(t=e.from),e.to!=null&&e.to=t)return o+(t-s);o+=u-s,o+=n-o%n,s=u+1}},zo=[""],Vo=function(e){e.select()};p?Vo=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:r&&(Vo=function(e){try{e.select()}catch(t){}});var Yo=/[\u00df\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Zo=S.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Yo.test(e))},nu=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,su;document.createRange?su=function(e,t,n){var r=document.createRange();return r.setEnd(e,n),r.setStart(e,t),r}:su=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var au=S.contains=function(e,t){if(e.contains)return e.contains(t);while(t=t.parentNode){t.nodeType==11&&(t=t.host);if(t==e)return!0}};r&&i<11&&(fu=function(){try{return document.activeElement}catch(e){return document.body}});var cu=S.rmClass=function(e,t){var n=e.className,r=lu(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},hu=S.addClass=function(e,t){var n=e.className;lu(t).test(n)||(e.className+=(n?" ":"")+t)},vu=!1,yu=function(){if(r&&i<9)return!1;var e=iu("div");return"draggable"in e||"dragDrop"in e}(),bu,Eu,xu=S.splitLines="\n\nb".split(/\n/).length!=3?function(e){var t=0,n=[],r=e.length;while(t<=r){var i=e.indexOf("\n",t);i==-1&&(i=e.length);var s=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),o=s.indexOf("\r");o!=-1?(n.push(s.slice(0,o)),t+=o+1):(n.push(s),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Tu=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Nu=function(){var e=iu("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Cu=null,Lu={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};S.keyNames=Lu,function(){for(var e=0;e<10;e++)Lu[e+48]=Lu[e+96]=String(e);for(var e=65;e<=90;e++)Lu[e]=String.fromCharCode(e);for(var e=1;e<=12;e++)Lu[e+111]=Lu[e+63235]="F"+e}();var Fu,zu=function(){function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1773?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":n==8204?"b":"L"}function f(e,t,n){this.level=e,this.from=t,this.to=n}var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,s=/[LRr]/,o=/[Lb1n]/,u=/[1n]/,a="L";return function(e){if(!r.test(e))return!1;var t=e.length,l=[];for(var c=0,h;c0){var T=S.bottom-S.top,N=m.top-(m.bottom-S.top);if(N-T>0)l.style.top=(y=m.top-T)+"px",b=!1;else if(T>E){l.style.height=E-5+"px",l.style.top=(y=m.bottom-S.top)+"px";var C=f.getCursor();i.from.ch!=C.ch&&(m=f.cursorCoords(C),l.style.left=(g=m.left)+"px",S=l.getBoundingClientRect())}}var k=S.right-w;k>0&&(S.right-S.left>w&&(l.style.width=w-5+"px",k-=S.right-S.left-w),l.style.left=(g=m.left-k)+"px"),f.addKeyMap(this.keyMap=u(r,{moveFocus:function(e,t){s.changeActive(s.selectedHint+e,t)},setFocus:function(e){s.changeActive(e)},menuSize:function(){return s.screenAmount()},length:c.length,close:function(){r.close()},pick:function(){s.pick()},data:i}));if(r.options.closeOnUnfocus){var L;f.on("blur",this.onBlur=function(){L=setTimeout(function(){r.close()},100)}),f.on("focus",this.onFocus=function(){clearTimeout(L)})}var A=f.getScrollInfo();return f.on("scroll",this.onScroll=function(){var e=f.getScrollInfo(),t=f.getWrapperElement().getBoundingClientRect(),n=y+A.top-e.top,i=n-(window.pageYOffset||(document.documentElement||document.body).scrollTop);b||(i+=l.offsetHeight);if(i<=t.top||i>=t.bottom)return r.close();l.style.top=n+"px",l.style.left=g+A.left-e.left+"px"}),e.on(l,"dblclick",function(e){var t=a(l,e.target||e.srcElement);t&&t.hintId!=null&&(s.changeActive(t.hintId),s.pick())}),e.on(l,"click",function(e){var t=a(l,e.target||e.srcElement);t&&t.hintId!=null&&(s.changeActive(t.hintId),r.options.completeOnSingleClick&&s.pick())}),e.on(l,"mousedown",function(){setTimeout(function(){f.focus()},20)}),e.signal(i,"select",c[0],l.firstChild),!0}var t="CodeMirror-hint",n="CodeMirror-hint-active";e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)};var r=0;e.defineExtension("showHint",function(t){if(this.listSelections().length>1||this.somethingSelected())return;this.state.completionActive&&this.state.completionActive.close();var n=this.state.completionActive=new s(this,t),r=n.options.hint;if(!r)return;return e.signal(this,"startCompletion",this),i(r,this,n.options,function(e){n.showHints(e)})}),s.prototype={close:function(){if(!this.active())return;this.cm.state.completionActive=null,this.widget&&this.widget.close(),this.onClose&&this.onClose(),e.signal(this.cm,"endCompletion",this.cm)},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n];r.hint?r.hint(this.cm,t,r):this.cm.replaceRange(o(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),this.close()},showHints:function(e){if(!e||!e.list.length||!this.active())return this.close();this.options.completeSingle&&e.list.length==1?this.pick(e,0):this.showWidget(e)},showWidget:function(t){function h(){if(s)return;s=!0,r.close(),r.cm.off("cursorActivity",m),t&&e.signal(t,"close")}function p(){if(s)return;e.signal(t,"update"),i(r.options.hint,r.cm,r.options,d)}function d(e){t=e;if(s)return;if(!t||!t.list.length)return h();r.widget&&r.widget.close(),r.widget=new f(r,t)}function v(){n&&(c(n),n=0)}function m(){v();var e=r.cm.getCursor(),t=r.cm.getLine(e.line);e.line!=u.line||t.length-e.ch!=a-u.ch||e.ch=this.data.list.length?t=r?this.data.list.length-1:0:t<0&&(t=r?0:this.data.list.length-1);if(this.selectedHint==t)return;var i=this.hints.childNodes[this.selectedHint];i.className=i.className.replace(" "+n,""),i=this.hints.childNodes[this.selectedHint=t],i.className+=" "+n,i.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=i.offsetTop+i.offsetHeight-this.hints.clientHeight+3),e.signal(this.data,"select",this.data.list[this.selectedHint],i)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},e.registerHelper("hint","auto",function(t,n){var r=t.getHelpers(t.getCursor(),"hint"),i;if(r.length)for(var s=0;s,]/,closeOnUnfocus:!0,completeOnSingleClick:!1,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)}),function(e){typeof exports=="object"&&typeof module=="object"?e(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define("codemirror/mode/smalltalk/smalltalk",["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("smalltalk",function(e){var t=/[+\-\/\\*~<>=@%|&?!.,:;^]/,n=/true|false|nil|self|super|thisContext/,r=function(e,t){this.next=e,this.parent=t},i=function(e,t,n){this.name=e,this.context=t,this.eos=n},s=function(){this.context=new r(o,null),this.expectVariable=!0,this.indentation=0,this.userIndentationDelta=0};s.prototype.userIndent=function(t){this.userIndentationDelta=t>0?t/e.indentUnit-this.indentation:0};var o=function(e,s,o){var c=new i(null,s,!1),h=e.next();return h==='"'?c=u(e,new r(u,s)):h==="'"?c=a(e,new r(a,s)):h==="#"?e.peek()==="'"?(e.next(),c=f(e,new r(f,s))):e.eatWhile(/[^\s.{}\[\]()]/)?c.name="string-2":c.name="meta":h==="$"?(e.next()==="<"&&(e.eatWhile(/[^\s>]/),e.next()),c.name="string-2"):h==="|"&&o.expectVariable?c.context=new r(l,s):/[\[\]{}()]/.test(h)?(c.name="bracket",c.eos=/[\[{(]/.test(h),h==="["?o.indentation++:h==="]"&&(o.indentation=Math.max(0,o.indentation-1))):t.test(h)?(e.eatWhile(t),c.name="operator",c.eos=h!==";"):/\d/.test(h)?(e.eatWhile(/[\w\d]/),c.name="number"):/[\w_]/.test(h)?(e.eatWhile(/[\w\d_]/),c.name=o.expectVariable?n.test(e.current())?"keyword":"variable":null):c.eos=o.expectVariable,c},u=function(e,t){return e.eatWhile(/[^"]/),new i("comment",e.eat('"')?t.parent:t,!0)},a=function(e,t){return e.eatWhile(/[^']/),new i("string",e.eat("'")?t.parent:t,!1)},f=function(e,t){return e.eatWhile(/[^']/),new i("string-2",e.eat("'")?t.parent:t,!1)},l=function(e,t){var n=new i(null,t,!1),r=e.next();return r==="|"?(n.context=t.parent,n.eos=!0):(e.eatWhile(/[^|]/),n.name="variable"),n};return{startState:function(){return new s},token:function(e,t){t.userIndent(e.indentation());if(e.eatSpace())return null;var n=t.context.next(e,t.context,t);return t.context=n.context,t.expectVariable=n.eos,n.name},blankLine:function(e){e.userIndent(0)},indent:function(t,n){var r=t.context.next===o&&n&&n.charAt(0)==="]"?-1:t.userIndentationDelta;return(t.indentation+r)*e.indentUnit},electricChars:"]"}}),e.defineMIME("text/x-stsrc",{name:"smalltalk"})}),define("require-css/css!amber/legacy/resources/amber",[],function(){}),define("require-css/css!codemirror/addon/hint/show-hint",[],function(){}),define("require-css/css!codemirror/theme/ambiance",[],function(){}),function(e,t){typeof module=="object"&&typeof module.exports=="object"?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}(typeof window!="undefined"?window:this,function(window,noGlobal){function isArraylike(e){var t="length"in e&&e.length,n=jQuery.type(e);return n==="function"||jQuery.isWindow(e)?!1:e.nodeType===1&&t?!0:n==="array"||t===0||typeof t=="number"&&t>0&&t-1 in e}function winnow(e,t,n){if(jQuery.isFunction(t))return jQuery.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return jQuery.grep(e,function(e){return e===t!==n});if(typeof t=="string"){if(risSimple.test(t))return jQuery.filter(t,e,n);t=jQuery.filter(t,e)}return jQuery.grep(e,function(e){return indexOf.call(t,e)>=0!==n})}function sibling(e,t){while((e=e[t])&&e.nodeType!==1);return e}function createOptions(e){var t=optionsCache[e]={};return jQuery.each(e.match(rnotwhite)||[],function(e,n){t[n]=!0}),t}function completed(){document.removeEventListener("DOMContentLoaded",completed,!1),window.removeEventListener("load",completed,!1),jQuery.ready()}function Data(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=jQuery.expando+Data.uid++}function dataAttr(e,t,n){var r;if(n===undefined&&e.nodeType===1){r="data-"+t.replace(rmultiDash,"-$1").toLowerCase(),n=e.getAttribute(r);if(typeof n=="string"){try{n=n==="true"?!0:n==="false"?!1:n==="null"?null:+n+""===n?+n:rbrace.test(n)?jQuery.parseJSON(n):n}catch(i){}data_user.set(e,t,n)}else n=undefined}return n}function returnTrue(){return!0}function returnFalse(){return!1}function safeActiveElement(){try{return document.activeElement}catch(e){}}function manipulationTarget(e,t){return jQuery.nodeName(e,"table")&&jQuery.nodeName(t.nodeType!==11?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function disableScript(e){return e.type=(e.getAttribute("type")!==null)+"/"+e.type,e}function restoreScript(e){var t=rscriptTypeMasked.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function setGlobalEval(e,t){var n=0,r=e.length;for(;n")).appendTo(t.documentElement),t=iframe[0].contentDocument,t.write(),t.close(),n=actualDisplay(e,t),iframe.detach();elemdisplay[e]=n}return n}function curCSS(e,t,n){var r,i,s,o,u=e.style;return n=n||getStyles(e),n&&(o=n.getPropertyValue(t)||n[t]),n&&(o===""&&!jQuery.contains(e.ownerDocument,e)&&(o=jQuery.style(e,t)),rnumnonpx.test(o)&&rmargin.test(t)&&(r=u.width,i=u.minWidth,s=u.maxWidth,u.minWidth=u.maxWidth=u.width=o,o=n.width,u.width=r,u.minWidth=i,u.maxWidth=s)),o!==undefined?o+"":o}function addGetHookIf(e,t){return{get:function(){if(e()){delete this.get;return}return(this.get=t).apply(this,arguments)}}}function vendorPropName(e,t){if(t in e)return t;var n=t[0].toUpperCase()+t.slice(1),r=t,i=cssPrefixes.length;while(i--){t=cssPrefixes[i]+n;if(t in e)return t}return r}function setPositiveNumber(e,t,n){var r=rnumsplit.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function augmentWidthOrHeight(e,t,n,r,i){var s=n===(r?"border":"content")?4:t==="width"?1:0,o=0;for(;s<4;s+=2)n==="margin"&&(o+=jQuery.css(e,n+cssExpand[s],!0,i)),r?(n==="content"&&(o-=jQuery.css(e,"padding"+cssExpand[s],!0,i)),n!=="margin"&&(o-=jQuery.css(e,"border"+cssExpand[s]+"Width",!0,i))):(o+=jQuery.css(e,"padding"+cssExpand[s],!0,i),n!=="padding"&&(o+=jQuery.css(e,"border"+cssExpand[s]+"Width",!0,i)));return o}function getWidthOrHeight(e,t,n){var r=!0,i=t==="width"?e.offsetWidth:e.offsetHeight,s=getStyles(e),o=jQuery.css(e,"boxSizing",!1,s)==="border-box";if(i<=0||i==null){i=curCSS(e,t,s);if(i<0||i==null)i=e.style[t];if(rnumnonpx.test(i))return i;r=o&&(support.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+augmentWidthOrHeight(e,t,n||(o?"border":"content"),r,s)+"px"}function showHide(e,t){var n,r,i,s=[],o=0,u=e.length;for(;o=0&&n=0},isPlainObject:function(e){return jQuery.type(e)!=="object"||e.nodeType||jQuery.isWindow(e)?!1:e.constructor&&!hasOwn.call(e.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return e==null?e+"":typeof e=="object"||typeof e=="function"?class2type[toString.call(e)]||"object":typeof e},globalEval:function(code){var script,indirect=eval;code=jQuery.trim(code),code&&(code.indexOf("use strict")===1?(script=document.createElement("script"),script.text=code,document.head.appendChild(script).parentNode.removeChild(script)):indirect(code))},camelCase:function(e){return e.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,s=e.length,o=isArraylike(e);if(n)if(o)for(;ir.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function at(e){return e[w]=!0,e}function ft(e){var t=p.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function lt(e,t){var n=e.split("|"),i=e.length;while(i--)r.attrHandle[n[i]]=t}function ct(e,t){var n=t&&e,r=n&&e.nodeType===1&&t.nodeType===1&&(~t.sourceIndex||L)-(~e.sourceIndex||L);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ht(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function dt(e){return at(function(t){return t=+t,at(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function vt(e){return e&&typeof e.getElementsByTagName!="undefined"&&e}function mt(){}function gt(e){var t=0,n=e.length,r="";for(;t1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function wt(e,t,n){var r=0,i=t.length;for(;r-1&&(s[f]=!(o[f]=c))}}else g=Et(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):D.apply(o,g)})}function xt(e){var t,n,i,s=e.length,o=r.relative[e[0].type],u=o||r.relative[" "],a=o?1:0,l=yt(function(e){return e===t},u,!0),c=yt(function(e){return H(t,e)>-1},u,!0),h=[function(e,n,r){var i=!o&&(r||n!==f)||((t=n).nodeType?l(e,n,r):c(e,n,r));return t=null,i}];for(;a1&&bt(h),a>1&>(e.slice(0,a-1).concat({value:e[a-2].type===" "?"*":""})).replace(z,"$1"),n,a0,i=e.length>0,s=function(s,o,u,a,l){var c,h,d,v=0,m="0",g=s&&[],y=[],b=f,w=s||i&&r.find.TAG("*",l),E=S+=b==null?1:Math.random()||.1,x=w.length;l&&(f=o!==p&&o);for(;m!==x&&(c=w[m])!=null;m++){if(i&&c){h=0;while(d=e[h++])if(d(c,o,u)){a.push(c);break}l&&(S=E)}n&&((c=!d&&c)&&v--,s&&g.push(c))}v+=m;if(n&&m!==v){h=0;while(d=t[h++])d(g,y,o,u);if(s){if(v>0)while(m--)!g[m]&&!y[m]&&(y[m]=M.call(a));y=Et(y)}D.apply(a,y),l&&!s&&y.length>0&&v+t.length>1&&ot.uniqueSort(a)}return l&&(S=E,f=b),g};return n?at(s):s}var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w="sizzle"+1*new Date,E=e.document,S=0,x=0,T=ut(),N=ut(),C=ut(),k=function(e,t){return e===t&&(c=!0),0},L=1<<31,A={}.hasOwnProperty,O=[],M=O.pop,_=O.push,D=O.push,P=O.slice,H=function(e,t){var n=0,r=e.length;for(;n+~]|"+j+")"+j+"*"),V=new RegExp("="+j+"*([^\\]'\"]*?)"+j+"*\\]","g"),$=new RegExp(R),J=new RegExp("^"+I+"$"),K={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+q),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),bool:new RegExp("^(?:"+B+")$","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/[+~]/,tt=/'|\\/g,nt=new RegExp("\\\\([\\da-f]{1,6}"+j+"?|("+j+")|.)","ig"),rt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)},it=function(){h()};try{D.apply(O=P.call(E.childNodes),E.childNodes),O[E.childNodes.length].nodeType}catch(st){D={apply:O.length?function(e,t){_.apply(e,P.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}n=ot.support={},s=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},h=ot.setDocument=function(e){var t,i,o=e?e.ownerDocument||e:E;if(o===p||o.nodeType!==9||!o.documentElement)return p;p=o,d=o.documentElement,i=o.defaultView,i&&i!==i.top&&(i.addEventListener?i.addEventListener("unload",it,!1):i.attachEvent&&i.attachEvent("onunload",it)),v=!s(o),n.attributes=ft(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ft(function(e){return e.appendChild(o.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Y.test(o.getElementsByClassName),n.getById=ft(function(e){return d.appendChild(e).id=w,!o.getElementsByName||!o.getElementsByName(w).length}),n.getById?(r.find.ID=function(e,t){if(typeof t.getElementById!="undefined"&&v){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},r.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){return e.getAttribute("id")===t}}):(delete r.find.ID,r.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){var n=typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id");return n&&n.value===t}}),r.find.TAG=n.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!="undefined")return t.getElementsByTagName(e);if(n.qsa)return t.querySelectorAll(e)}:function(e,t){var n,r=[],i=0,s=t.getElementsByTagName(e);if(e==="*"){while(n=s[i++])n.nodeType===1&&r.push(n);return r}return s},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(v)return t.getElementsByClassName(e)},g=[],m=[];if(n.qsa=Y.test(o.querySelectorAll))ft(function(e){d.appendChild(e).innerHTML=""+"",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+j+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+j+"*(?:value|"+B+")"),e.querySelectorAll("[id~="+w+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||m.push(".#.+[+~]")}),ft(function(e){var t=o.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+j+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")});return(n.matchesSelector=Y.test(y=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ft(function(e){n.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),g.push("!=",R)}),m=m.length&&new RegExp(m.join("|")),g=g.length&&new RegExp(g.join("|")),t=Y.test(d.compareDocumentPosition),b=t||Y.test(d.contains)?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!r&&r.nodeType===1&&!!(n.contains?n.contains(r):e.compareDocumentPosition&&e.compareDocumentPosition(r)&16)}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},k=t?function(e,t){if(e===t)return c=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,r&1||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===o||e.ownerDocument===E&&b(E,e)?-1:t===o||t.ownerDocument===E&&b(E,t)?1:l?H(l,e)-H(l,t):0:r&4?-1:1)}:function(e,t){if(e===t)return c=!0,0;var n,r=0,i=e.parentNode,s=t.parentNode,u=[e],a=[t];if(!i||!s)return e===o?-1:t===o?1:i?-1:s?1:l?H(l,e)-H(l,t):0;if(i===s)return ct(e,t);n=e;while(n=n.parentNode)u.unshift(n);n=t;while(n=n.parentNode)a.unshift(n);while(u[r]===a[r])r++;return r?ct(u[r],a[r]):u[r]===E?-1:a[r]===E?1:0},o},ot.matches=function(e,t){return ot(e,null,null,t)},ot.matchesSelector=function(e,t){(e.ownerDocument||e)!==p&&h(e),t=t.replace(V,"='$1']");if(n.matchesSelector&&v&&(!g||!g.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&e.document.nodeType!==11)return r}catch(i){}return ot(t,p,null,[e]).length>0},ot.contains=function(e,t){return(e.ownerDocument||e)!==p&&h(e),b(e,t)},ot.attr=function(e,t){(e.ownerDocument||e)!==p&&h(e);var i=r.attrHandle[t.toLowerCase()],s=i&&A.call(r.attrHandle,t.toLowerCase())?i(e,t,!v):undefined;return s!==undefined?s:n.attributes||!v?e.getAttribute(t):(s=e.getAttributeNode(t))&&s.specified?s.value:null},ot.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ot.uniqueSort=function(e){var t,r=[],i=0,s=0;c=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(k);if(c){while(t=e[s++])t===e[s]&&(i=r.push(s));while(i--)e.splice(r[i],1)}return l=null,e},i=ot.getText=function(e){var t,n="",r=0,s=e.nodeType;if(!s)while(t=e[r++])n+=i(t);else if(s===1||s===9||s===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(s===3||s===4)return e.nodeValue;return n},r=ot.selectors={cacheLength:50,createPseudo:at,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(nt,rt),e[3]=(e[3]||e[4]||e[5]||"").replace(nt,rt),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1].slice(0,3)==="nth"?(e[3]||ot.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd")),e[5]=+(e[7]+e[8]||e[3]==="odd")):e[3]&&ot.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&$.test(n)&&(t=o(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(nt,rt).toLowerCase();return e==="*"?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+j+")"+e+"("+j+"|$)"))&&T(e,function(e){return t.test(typeof e.className=="string"&&e.className||typeof e.getAttribute!="undefined"&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ot.attr(r,e);return i==null?t==="!=":t?(i+="",t==="="?i===n:t==="!="?i!==n:t==="^="?n&&i.indexOf(n)===0:t==="*="?n&&i.indexOf(n)>-1:t==="$="?n&&i.slice(-n.length)===n:t==="~="?(" "+i.replace(U," ")+" ").indexOf(n)>-1:t==="|="?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var s=e.slice(0,3)!=="nth",o=e.slice(-4)!=="last",u=t==="of-type";return r===1&&i===0?function(e){return!!e.parentNode}:function(t,n,a){var f,l,c,h,p,d,v=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),y=!a&&!u;if(m){if(s){while(v){c=t;while(c=c[v])if(u?c.nodeName.toLowerCase()===g:c.nodeType===1)return!1;d=v=e==="only"&&!d&&"nextSibling"}return!0}d=[o?m.firstChild:m.lastChild];if(o&&y){l=m[w]||(m[w]={}),f=l[e]||[],p=f[0]===S&&f[1],h=f[0]===S&&f[2],c=p&&m.childNodes[p];while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if(c.nodeType===1&&++h&&c===t){l[e]=[S,p,h];break}}else if(y&&(f=(t[w]||(t[w]={}))[e])&&f[0]===S)h=f[1];else while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if((u?c.nodeName.toLowerCase()===g:c.nodeType===1)&&++h){y&&((c[w]||(c[w]={}))[e]=[S,h]);if(c===t)break}return h-=i,h===r||h%r===0&&h/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||ot.error("unsupported pseudo: "+e);return i[w]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?at(function(e,n){var r,s=i(e,t),o=s.length;while(o--)r=H(e,s[o]),e[r]=!(n[r]=s[o])}):function(e){return i(e,0,n)}):i}},pseudos:{not:at(function(e){var t=[],n=[],r=u(e.replace(z,"$1"));return r[w]?at(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),t[0]=null,!n.pop()}}),has:at(function(e){return function(t){return ot(e,t).length>0}}),contains:at(function(e){return e=e.replace(nt,rt),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:at(function(e){return J.test(e||"")||ot.error("unsupported lang: "+e),e=e.replace(nt,rt).toLowerCase(),function(t){var n;do if(n=v?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||n.indexOf(e+"-")===0;while((t=t.parentNode)&&t.nodeType===1);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return G.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},text:function(e){var t;return e.nodeName.toLowerCase()==="input"&&e.type==="text"&&((t=e.getAttribute("type"))==null||t.toLowerCase()==="text")},first:dt(function(){return[0]}),last:dt(function(e,t){return[t-1]}),eq:dt(function(e,t,n){return[n<0?n+t:n]}),even:dt(function(e,t){var n=0;for(;n=0;)e.push(r);return e}),gt:dt(function(e,t,n){var r=n<0?n+t:n;for(;++r2&&(l=f[0]).type==="ID"&&n.getById&&t.nodeType===9&&v&&r.relative[f[1].type]){t=(r.find.ID(l.matches[0].replace(nt,rt),t)||[])[0];if(!t)return i;p&&(t=t.parentNode),e=e.slice(f.shift().value.length)}a=K.needsContext.test(e)?0:f.length;while(a--){l=f[a];if(r.relative[c=l.type])break;if(h=r.find[c])if(s=h(l.matches[0].replace(nt,rt),et.test(f[0].type)&&vt(t.parentNode)||t)){f.splice(a,1),e=s.length&>(f);if(!e)return D.apply(i,s),i;break}}}return(p||u(e,d))(s,t,!v,i,et.test(e)&&vt(t.parentNode)||t),i},n.sortStable=w.split("").sort(k).join("")===w,n.detectDuplicates=!!c,h(),n.sortDetached=ft(function(e){return e.compareDocumentPosition(p.createElement("div"))&1}),ft(function(e){return e.innerHTML="",e.firstChild.getAttribute("href")==="#"})||lt("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,t.toLowerCase()==="type"?1:2)}),(!n.attributes||!ft(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),e.firstChild.getAttribute("value")===""}))&<("value",function(e,t,n){if(!n&&e.nodeName.toLowerCase()==="input")return e.defaultValue}),ft(function(e){return e.getAttribute("disabled")==null})||lt(B,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),ot}(window);jQuery.find=Sizzle,jQuery.expr=Sizzle.selectors,jQuery.expr[":"]=jQuery.expr.pseudos,jQuery.unique=Sizzle.uniqueSort,jQuery.text=Sizzle.getText,jQuery.isXMLDoc=Sizzle.isXML,jQuery.contains=Sizzle.contains;var rneedsContext=jQuery.expr.match.needsContext,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,risSimple=/^.[^:#\[\.,]*$/;jQuery.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),t.length===1&&r.nodeType===1?jQuery.find.matchesSelector(r,e)?[r]:[]:jQuery.find.matches(e,jQuery.grep(t,function(e){return e.nodeType===1}))},jQuery.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if(typeof e!="string")return this.pushStack(jQuery(e).filter(function(){for(t=0;t1?jQuery.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(winnow(this,e||[],!1))},not:function(e){return this.pushStack(winnow(this,e||[],!0))},is:function(e){return!!winnow(this,typeof e=="string"&&rneedsContext.test(e)?jQuery(e):e||[],!1).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(e,t){var n,r;if(!e)return this;if(typeof e=="string"){e[0]==="<"&&e[e.length-1]===">"&&e.length>=3?n=[null,e,null]:n=rquickExpr.exec(e);if(n&&(n[1]||!t)){if(n[1]){t=t instanceof jQuery?t[0]:t,jQuery.merge(this,jQuery.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:document,!0));if(rsingleTag.test(n[1])&&jQuery.isPlainObject(t))for(n in t)jQuery.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return r=document.getElementById(n[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=document,this.selector=e,this}return!t||t.jquery?(t||rootjQuery).find(e):this.constructor(t).find(e)}return e.nodeType?(this.context=this[0]=e,this.length=1,this):jQuery.isFunction(e)?typeof rootjQuery.ready!="undefined"?rootjQuery.ready(e):e(jQuery):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),jQuery.makeArray(e,this))};init.prototype=jQuery.fn,rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:!0,contents:!0,next:!0,prev:!0};jQuery.extend({dir:function(e,t,n){var r=[],i=n!==undefined;while((e=e[t])&&e.nodeType!==9)if(e.nodeType===1){if(i&&jQuery(e).is(n))break;r.push(e)}return r},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}}),jQuery.fn.extend({has:function(e){var t=jQuery(e,this),n=t.length;return this.filter(function(){var e=0;for(;e-1:n.nodeType===1&&jQuery.find.matchesSelector(n,e))){s.push(n);break}return this.pushStack(s.length>1?jQuery.unique(s):s)},index:function(e){return e?typeof e=="string"?indexOf.call(jQuery(e),this[0]):indexOf.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),jQuery(e,t))))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),jQuery.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return jQuery.dir(e,"parentNode")},parentsUntil:function(e,t,n){return jQuery.dir(e,"parentNode",n)},next:function(e){return sibling(e,"nextSibling")},prev:function(e){return sibling(e,"previousSibling")},nextAll:function(e){return jQuery.dir(e,"nextSibling")},prevAll:function(e){return jQuery.dir(e,"previousSibling")},nextUntil:function(e,t,n){return jQuery.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return jQuery.dir(e,"previousSibling",n)},siblings:function(e){return jQuery.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return jQuery.sibling(e.firstChild)},contents:function(e){return e.contentDocument||jQuery.merge([],e.childNodes)}},function(e,t){jQuery.fn[e]=function(n,r){var i=jQuery.map(this,t,n);return e.slice(-5)!=="Until"&&(r=n),r&&typeof r=="string"&&(i=jQuery.filter(r,i)),this.length>1&&(guaranteedUnique[e]||jQuery.unique(i),rparentsprev.test(e)&&i.reverse()),this.pushStack(i)}});var rnotwhite=/\S+/g,optionsCache={};jQuery.Callbacks=function(e){e=typeof e=="string"?optionsCache[e]||createOptions(e):jQuery.extend({},e);var t,n,r,i,s,o,u=[],a=!e.once&&[],f=function(c){t=e.memory&&c,n=!0,o=i||0,i=0,s=u.length,r=!0;for(;u&&o-1)u.splice(n,1),r&&(n<=s&&s--,n<=o&&o--)}),this},has:function(e){return e?jQuery.inArray(e,u)>-1:!!u&&!!u.length},empty:function(){return u=[],s=0,this},disable:function(){return u=a=t=undefined,this},disabled:function(){return!u},lock:function(){return a=undefined,t||l.disable(),this},locked:function(){return!a},fireWith:function(e,t){return u&&(!n||a)&&(t=t||[],t=[e,t.slice?t.slice():t],r?a.push(t):f(t)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!n}};return l},jQuery.extend({Deferred:function(e){var t=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return jQuery.Deferred(function(n){jQuery.each(t,function(t,s){var o=jQuery.isFunction(e[t])&&e[t];i[s[1]](function(){var e=o&&o.apply(this,arguments);e&&jQuery.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s[0]+"With"](this===r?n.promise():this,o?[e]:arguments)})}),e=null}).promise()},promise:function(e){return e!=null?jQuery.extend(e,r):r}},i={};return r.pipe=r.then,jQuery.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=function(){return i[s[0]+"With"](this===i?r:this,arguments),this},i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=slice.call(arguments),r=n.length,i=r!==1||e&&jQuery.isFunction(e.promise)?r:0,s=i===1?e:jQuery.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?slice.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t0)return;readyList.resolveWith(document,[jQuery]),jQuery.fn.triggerHandler&&(jQuery(document).triggerHandler("ready"),jQuery(document).off("ready"))}}),jQuery.ready.promise=function(e){return readyList||(readyList=jQuery.Deferred(),document.readyState==="complete"?setTimeout(jQuery.ready):(document.addEventListener("DOMContentLoaded",completed,!1),window.addEventListener("load",completed,!1))),readyList.promise(e)},jQuery.ready.promise();var access=jQuery.access=function(e,t,n,r,i,s,o){var u=0,a=e.length,f=n==null;if(jQuery.type(n)==="object"){i=!0;for(u in n)jQuery.access(e,t,u,n[u],!0,s,o)}else if(r!==undefined){i=!0,jQuery.isFunction(r)||(o=!0),f&&(o?(t.call(e,r),t=null):(f=t,t=function(e,t,n){return f.call(jQuery(e),n)}));if(t)for(;u1,null,!0)},removeData:function(e){return this.each(function(){data_user.remove(this,e)})}}),jQuery.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=data_priv.get(e,t),n&&(!r||jQuery.isArray(n)?r=data_priv.access(e,t,jQuery.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=jQuery.queue(e,t),r=n.length,i=n.shift(),s=jQuery._queueHooks(e,t),o=function(){jQuery.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return data_priv.get(e,n)||data_priv.access(e,n,{empty:jQuery.Callbacks("once memory").add(function(){data_priv.remove(e,[t+"queue",n])})})}}),jQuery.fn.extend({queue:function(e,t){var n=2;return typeof e!="string"&&(t=e,e="fx",n--),arguments.lengthx",support.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue})();var strundefined=typeof undefined;support.focusinBubbles="onfocusin"in window;var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;jQuery.event={global:{},add:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=data_priv.get(e);if(!m)return;n.handler&&(s=n,n=s.handler,i=s.selector),n.guid||(n.guid=jQuery.guid++),(a=m.events)||(a=m.events={}),(o=m.handle)||(o=m.handle=function(t){return typeof jQuery!==strundefined&&jQuery.event.triggered!==t.type?jQuery.event.dispatch.apply(e,arguments):undefined}),t=(t||"").match(rnotwhite)||[""],f=t.length;while(f--){u=rtypenamespace.exec(t[f])||[],p=v=u[1],d=(u[2]||"").split(".").sort();if(!p)continue;c=jQuery.event.special[p]||{},p=(i?c.delegateType:c.bindType)||p,c=jQuery.event.special[p]||{},l=jQuery.extend({type:p,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&jQuery.expr.match.needsContext.test(i),namespace:d.join(".")},s),(h=a[p])||(h=a[p]=[],h.delegateCount=0,(!c.setup||c.setup.call(e,r,d,o)===!1)&&e.addEventListener&&e.addEventListener(p,o,!1)),c.add&&(c.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,l):h.push(l),jQuery.event.global[p]=!0}},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=data_priv.hasData(e)&&data_priv.get(e);if(!m||!(a=m.events))return;t=(t||"").match(rnotwhite)||[""],f=t.length;while(f--){u=rtypenamespace.exec(t[f])||[],p=v=u[1],d=(u[2]||"").split(".").sort();if(!p){for(p in a)jQuery.event.remove(e,p+t[f],n,r,!0);continue}c=jQuery.event.special[p]||{},p=(r?c.delegateType:c.bindType)||p,h=a[p]||[],u=u[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=h.length;while(s--)l=h[s],(i||v===l.origType)&&(!n||n.guid===l.guid)&&(!u||u.test(l.namespace))&&(!r||r===l.selector||r==="**"&&l.selector)&&(h.splice(s,1),l.selector&&h.delegateCount--,c.remove&&c.remove.call(e,l));o&&!h.length&&((!c.teardown||c.teardown.call(e,d,m.handle)===!1)&&jQuery.removeEvent(e,p,m.handle),delete a[p])}jQuery.isEmptyObject(a)&&(delete m.handle,data_priv.remove(e,"events"))},trigger:function(e,t,n,r){var i,s,o,u,a,f,l,c=[n||document],h=hasOwn.call(e,"type")?e.type:e,p=hasOwn.call(e,"namespace")?e.namespace.split("."):[];s=o=n=n||document;if(n.nodeType===3||n.nodeType===8)return;if(rfocusMorph.test(h+jQuery.event.triggered))return;h.indexOf(".")>=0&&(p=h.split("."),h=p.shift(),p.sort()),a=h.indexOf(":")<0&&"on"+h,e=e[jQuery.expando]?e:new jQuery.Event(h,typeof e=="object"&&e),e.isTrigger=r?2:3,e.namespace=p.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=undefined,e.target||(e.target=n),t=t==null?[e]:jQuery.makeArray(t,[e]),l=jQuery.event.special[h]||{};if(!r&&l.trigger&&l.trigger.apply(n,t)===!1)return;if(!r&&!l.noBubble&&!jQuery.isWindow(n)){u=l.delegateType||h,rfocusMorph.test(u+h)||(s=s.parentNode);for(;s;s=s.parentNode)c.push(s),o=s;o===(n.ownerDocument||document)&&c.push(o.defaultView||o.parentWindow||window)}i=0;while((s=c[i++])&&!e.isPropagationStopped())e.type=i>1?u:l.bindType||h,f=(data_priv.get(s,"events")||{})[e.type]&&data_priv.get(s,"handle"),f&&f.apply(s,t),f=a&&s[a],f&&f.apply&&jQuery.acceptData(s)&&(e.result=f.apply(s,t),e.result===!1&&e.preventDefault());return e.type=h,!r&&!e.isDefaultPrevented()&&(!l._default||l._default.apply(c.pop(),t)===!1)&&jQuery.acceptData(n)&&a&&jQuery.isFunction(n[h])&&!jQuery.isWindow(n)&&(o=n[a],o&&(n[a]=null),jQuery.event.triggered=h,n[h](),jQuery.event.triggered=undefined,o&&(n[a]=o)),e.result},dispatch:function(e){e=jQuery.event.fix(e);var t,n,r,i,s,o=[],u=slice.call(arguments),a=(data_priv.get(this,"events")||{})[e.type]||[],f=jQuery.event.special[e.type]||{};u[0]=e,e.delegateTarget=this;if(f.preDispatch&&f.preDispatch.call(this,e)===!1)return;o=jQuery.event.handlers.call(this,e,a),t=0;while((i=o[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((s=i.handlers[n++])&&!e.isImmediatePropagationStopped())if(!e.namespace_re||e.namespace_re.test(s.namespace))e.handleObj=s,e.data=s.data,r=((jQuery.event.special[s.origType]||{}).handle||s.handler).apply(i.elem,u),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation())}return f.postDispatch&&f.postDispatch.call(this,e),e.result},handlers:function(e,t){var n,r,i,s,o=[],u=t.delegateCount,a=e.target;if(u&&a.nodeType&&(!e.button||e.type!=="click"))for(;a!==this;a=a.parentNode||this)if(a.disabled!==!0||e.type!=="click"){r=[];for(n=0;n=0:jQuery.find(i,this,null,[a]).length),r[i]&&r.push(s);r.length&&o.push({elem:a,handlers:r})}return u]*)\/>/gi,rtagName=/<([\w:]+)/,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/^$|\/(?:java|ecma)script/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*\s*$/g,wrapMap={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option,wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead,wrapMap.th=wrapMap.td,jQuery.extend({clone:function(e,t,n){var r,i,s,o,u=e.cloneNode(!0),a=jQuery.contains(e.ownerDocument,e);if(!support.noCloneChecked&&(e.nodeType===1||e.nodeType===11)&&!jQuery.isXMLDoc(e)){o=getAll(u),s=getAll(e);for(r=0,i=s.length;r0&&setGlobalEval(o,!a&&getAll(e,"script")),u},buildFragment:function(e,t,n,r){var i,s,o,u,a,f,l=t.createDocumentFragment(),c=[],h=0,p=e.length;for(;h")+u[2],f=u[0];while(f--)s=s.lastChild;jQuery.merge(c,s.childNodes),s=l.firstChild,s.textContent=""}}l.textContent="",h=0;while(i=c[h++]){if(r&&jQuery.inArray(i,r)!==-1)continue;a=jQuery.contains(i.ownerDocument,i),s=getAll(l.appendChild(i),"script"),a&&setGlobalEval(s);if(n){f=0;while(i=s[f++])rscriptType.test(i.type||"")&&n.push(i)}}return l},cleanData:function(e){var t,n,r,i,s=jQuery.event.special,o=0;for(;(n=e[o])!==undefined;o++){if(jQuery.acceptData(n)){i=n[data_priv.expando];if(i&&(t=data_priv.cache[i])){if(t.events)for(r in t.events)s[r]?jQuery.event.remove(n,r):jQuery.removeEvent(n,r,t.handle);data_priv.cache[i]&&delete data_priv.cache[i]}}delete data_user.cache[n[data_user.expando]]}}}),jQuery.fn.extend({text:function(e){return access(this,function(e){return e===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9)this.textContent=e})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=manipulationTarget(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=manipulationTarget(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?jQuery.filter(e,this):this,i=0;for(;(n=r[i])!=null;i++)!t&&n.nodeType===1&&jQuery.cleanData(getAll(n)),n.parentNode&&(t&&jQuery.contains(n.ownerDocument,n)&&setGlobalEval(getAll(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++)e.nodeType===1&&(jQuery.cleanData(getAll(e,!1)),e.textContent="");return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return jQuery.clone(this,e,t)})},html:function(e){return access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&t.nodeType===1)return t.innerHTML;if(typeof e=="string"&&!rnoInnerhtml.test(e)&&!wrapMap[(rtagName.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(rxhtmlTag,"<$1>");try{for(;n1&&typeof h=="string"&&!support.checkClone&&rchecked.test(h))return this.each(function(n){var r=l.eq(n);p&&(e[0]=h.call(this,n,r.html())),r.domManip(e,t)});if(f){n=jQuery.buildFragment(e,this[0].ownerDocument,!1,this),r=n.firstChild,n.childNodes.length===1&&(n=r);if(r){i=jQuery.map(getAll(n,"script"),disableScript),s=i.length;for(;a1)},show:function(){return showHide(this,!0)},hide:function(){return showHide(this)},toggle:function(e){return typeof e=="boolean"?e?this.show():this.hide():this.each(function(){isHidden(this)?jQuery(this).show():jQuery(this).hide()})}}),jQuery.Tween=Tween,Tween.prototype={constructor:Tween,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(jQuery.cssNumber[n]?"":"px")},cur:function(){var e=Tween.propHooks[this.prop];return e&&e.get?e.get(this):Tween.propHooks._default.get(this)},run:function(e){var t,n=Tween.propHooks[this.prop];return this.options.duration?this.pos=t=jQuery.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=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):Tween.propHooks._default.set(this),this}},Tween.prototype.init.prototype=Tween.prototype,Tween.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=jQuery.css(e.elem,e.prop,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){jQuery.fx.step[e.prop]?jQuery.fx.step[e.prop](e):e.elem.style&&(e.elem.style[jQuery.cssProps[e.prop]]!=null||jQuery.cssHooks[e.prop])?jQuery.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},jQuery.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},jQuery.fx=Tween.prototype.init,jQuery.fx.step={};var fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i"),rrun=/queueHooks$/,animationPrefilters=[defaultPrefilter],tweeners={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=rfxnum.exec(t),s=i&&i[3]||(jQuery.cssNumber[e]?"":"px"),o=(jQuery.cssNumber[e]||s!=="px"&&+r)&&rfxnum.exec(jQuery.css(n.elem,e)),u=1,a=20;if(o&&o[3]!==s){s=s||o[3],i=i||[],o=+r||1;do u=u||".5",o/=u,jQuery.style(n.elem,e,o+s);while(u!==(u=n.cur()/r)&&u!==1&&--a)}return i&&(o=n.start=+o||+r||0,n.unit=s,n.end=i[1]?o+(i[1]+1)*i[2]:+i[2]),n}]};jQuery.Animation=jQuery.extend(Animation,{tweener:function(e,t){jQuery.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r1)},removeAttr:function(e){return this.each(function(){jQuery.removeAttr(this,e)})}}),jQuery.extend({attr:function(e,t,n){var r,i,s=e.nodeType;if(!e||s===3||s===8||s===2)return;if(typeof e.getAttribute===strundefined)return jQuery.prop(e,t,n);if(s!==1||!jQuery.isXMLDoc(e))t=t.toLowerCase(),r=jQuery.attrHooks[t]||(jQuery.expr.match.bool.test(t)?boolHook:nodeHook);if(n===undefined)return r&&"get"in r&&(i=r.get(e,t))!==null?i:(i=jQuery.find.attr(e,t),i==null?undefined:i);if(n!==null)return r&&"set"in r&&(i=r.set(e,n,t))!==undefined?i:(e.setAttribute(t,n+""),n);jQuery.removeAttr(e,t)},removeAttr:function(e,t){var n,r,i=0,s=t&&t.match(rnotwhite);if(s&&e.nodeType===1)while(n=s[i++])r=jQuery.propFix[n]||n,jQuery.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!support.radioValue&&t==="radio"&&jQuery.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),boolHook={set:function(e,t,n){return t===!1?jQuery.removeAttr(e,n):e.setAttribute(n,n),n}},jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(e,t){var n=attrHandle[t]||jQuery.find.attr;attrHandle[t]=function(e,t,r){var i,s;return r||(s=attrHandle[t],attrHandle[t]=i,i=n(e,t,r)!=null?t.toLowerCase():null,attrHandle[t]=s),i}});var rfocusable=/^(?:input|select|textarea|button)$/i;jQuery.fn.extend({prop:function(e,t){return access(this,jQuery.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[jQuery.propFix[e]||e]})}}),jQuery.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,s,o=e.nodeType;if(!e||o===3||o===8||o===2)return;return s=o!==1||!jQuery.isXMLDoc(e),s&&(t=jQuery.propFix[t]||t,i=jQuery.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&(r=i.get(e,t))!==null?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||rfocusable.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),support.optSelected||(jQuery.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this});var rclass=/[\t\r\n\f]/g;jQuery.fn.extend({addClass:function(e){var t,n,r,i,s,o,u=typeof e=="string"&&e,a=0,f=this.length;if(jQuery.isFunction(e))return this.each(function(t){jQuery(this).addClass(e.call(this,t,this.className))});if(u){t=(e||"").match(rnotwhite)||[];for(;a=0)r=r.replace(" "+i+" "," ");o=e?jQuery.trim(r):"",n.className!==o&&(n.className=o)}}}return this},toggleClass:function(e,t){var n=typeof e;return typeof t=="boolean"&&n==="string"?t?this.addClass(e):this.removeClass(e):jQuery.isFunction(e)?this.each(function(n){jQuery(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var t,r=0,i=jQuery(this),s=e.match(rnotwhite)||[];while(t=s[r++])i.hasClass(t)?i.removeClass(t):i.addClass(t)}else if(n===strundefined||n==="boolean")this.className&&data_priv.set(this,"__className__",this.className),this.className=this.className||e===!1?"":data_priv.get(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1}});var rreturn=/\r/g;jQuery.fn.extend({val:function(e){var t,n,r,i=this[0];if(!arguments.length){if(i)return t=jQuery.valHooks[i.type]||jQuery.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,typeof n=="string"?n.replace(rreturn,""):n==null?"":n);return}return r=jQuery.isFunction(e),this.each(function(n){var i;if(this.nodeType!==1)return;r?i=e.call(this,n,jQuery(this).val()):i=e,i==null?i="":typeof i=="number"?i+="":jQuery.isArray(i)&&(i=jQuery.map(i,function(e){return e==null?"":e+""})),t=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!t||!("set"in t)||t.set(this,i,"value")===undefined)this.value=i})}}),jQuery.extend({valHooks:{option:{get:function(e){var t=jQuery.find.attr(e,"value");return t!=null?t:jQuery.trim(jQuery.text(e))}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0)n=!0}return n||(e.selectedIndex=-1),s}}}}),jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(e,t){if(jQuery.isArray(t))return e.checked=jQuery.inArray(jQuery(e).val(),t)>=0}},support.checkOn||(jQuery.valHooks[this].get=function(e){return e.getAttribute("value")===null?"on":e.value})}),jQuery.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){jQuery.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),jQuery.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},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 arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)}});var nonce=jQuery.now(),rquery=/\?/;jQuery.parseJSON=function(e){return JSON.parse(e+"")},jQuery.parseXML=function(e){var t,n;if(!e||typeof e!="string")return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&jQuery.error("Invalid XML: "+e),t};var rhash=/#.*$/,rts=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rurl=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,prefilters={},transports={},allTypes="*/".concat("*"),ajaxLocation=window.location.href,ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[];jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ajaxLocation,type:"GET",isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ajaxExtend(ajaxExtend(e,jQuery.ajaxSettings),t):ajaxExtend(jQuery.ajaxSettings,e)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(e,t){function S(e,t,s,u){var f,m,g,b,E,S=t;if(y===2)return;y=2,o&&clearTimeout(o),n=undefined,i=u||"",w.readyState=e>0?4:0,f=e>=200&&e<300||e===304,s&&(b=ajaxHandleResponses(l,w,s)),b=ajaxConvert(l,b,w,f);if(f)l.ifModified&&(E=w.getResponseHeader("Last-Modified"),E&&(jQuery.lastModified[r]=E),E=w.getResponseHeader("etag"),E&&(jQuery.etag[r]=E)),e===204||l.type==="HEAD"?S="nocontent":e===304?S="notmodified":(S=b.state,m=b.data,g=b.error,f=!g);else{g=S;if(e||!S)S="error",e<0&&(e=0)}w.status=e,w.statusText=(t||S)+"",f?p.resolveWith(c,[m,S,w]):p.rejectWith(c,[w,S,g]),w.statusCode(v),v=undefined,a&&h.trigger(f?"ajaxSuccess":"ajaxError",[w,l,f?m:g]),d.fireWith(c,[w,S]),a&&(h.trigger("ajaxComplete",[w,l]),--jQuery.active||jQuery.event.trigger("ajaxStop"))}typeof e=="object"&&(t=e,e=undefined),t=t||{};var n,r,i,s,o,u,a,f,l=jQuery.ajaxSetup({},t),c=l.context||l,h=l.context&&(c.nodeType||c.jquery)?jQuery(c):jQuery.event,p=jQuery.Deferred(),d=jQuery.Callbacks("once memory"),v=l.statusCode||{},m={},g={},y=0,b="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(y===2){if(!s){s={};while(t=rheaders.exec(i))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return t==null?null:t},getAllResponseHeaders:function(){return y===2?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return y||(e=g[n]=g[n]||e,m[e]=t),this},overrideMimeType:function(e){return y||(l.mimeType=e),this},statusCode:function(e){var t;if(e)if(y<2)for(t in e)v[t]=[v[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||b;return n&&n.abort(t),S(0,t),this}};p.promise(w).complete=d.add,w.success=w.done,w.error=w.fail,l.url=((e||l.url||ajaxLocation)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//"),l.type=t.method||t.type||l.method||l.type,l.dataTypes=jQuery.trim(l.dataType||"*").toLowerCase().match(rnotwhite)||[""],l.crossDomain==null&&(u=rurl.exec(l.url.toLowerCase()),l.crossDomain=!(!u||u[1]===ajaxLocParts[1]&&u[2]===ajaxLocParts[2]&&(u[3]||(u[1]==="http:"?"80":"443"))===(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?"80":"443")))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=jQuery.param(l.data,l.traditional)),inspectPrefiltersOrTransports(prefilters,l,t,w);if(y===2)return w;a=jQuery.event&&l.global,a&&jQuery.active++===0&&jQuery.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!rnoContent.test(l.type),r=l.url,l.hasContent||(l.data&&(r=l.url+=(rquery.test(r)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=rts.test(r)?r.replace(rts,"$1_="+nonce++):r+(rquery.test(r)?"&":"?")+"_="+nonce++)),l.ifModified&&(jQuery.lastModified[r]&&w.setRequestHeader("If-Modified-Since",jQuery.lastModified[r]),jQuery.etag[r]&&w.setRequestHeader("If-None-Match",jQuery.etag[r])),(l.data&&l.hasContent&&l.contentType!==!1||t.contentType)&&w.setRequestHeader("Content-Type",l.contentType),w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):l.accepts["*"]);for(f in l.headers)w.setRequestHeader(f,l.headers[f]);if(!l.beforeSend||l.beforeSend.call(c,w,l)!==!1&&y!==2){b="abort";for(f in{success:1,error:1,complete:1})w[f](l[f]);n=inspectPrefiltersOrTransports(transports,l,t,w);if(!n)S(-1,"No Transport");else{w.readyState=1,a&&h.trigger("ajaxSend",[w,l]),l.async&&l.timeout>0&&(o=setTimeout(function(){w.abort("timeout")},l.timeout));try{y=1,n.send(m,S)}catch(E){if(!(y<2))throw E;S(-1,E)}}return w}return w.abort()},getJSON:function(e,t,n){return jQuery.get(e,t,n,"json")},getScript:function(e,t){return jQuery.get(e,undefined,t,"script")}}),jQuery.each(["get","post"],function(e,t){jQuery[t]=function(e,n,r,i){return jQuery.isFunction(n)&&(i=i||r,r=n,n=undefined),jQuery.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),jQuery._evalUrl=function(e){return jQuery.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},jQuery.fn.extend({wrapAll:function(e){var t;return jQuery.isFunction(e)?this.each(function(t){jQuery(this).wrapAll(e.call(this,t))}):(this[0]&&(t=jQuery(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return jQuery.isFunction(e)?this.each(function(t){jQuery(this).wrapInner(e.call(this,t))}):this.each(function(){var t=jQuery(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=jQuery.isFunction(e);return this.each(function(n){jQuery(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){jQuery.nodeName(this,"body")||jQuery(this).replaceWith(this.childNodes)}).end()}}),jQuery.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},jQuery.expr.filters.visible=function(e){return!jQuery.expr.filters.hidden(e)};var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;jQuery.param=function(e,t){var n,r=[],i=function(e,t){t=jQuery.isFunction(t)?t():t==null?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};t===undefined&&(t=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional);if(jQuery.isArray(e)||e.jquery&&!jQuery.isPlainObject(e))jQuery.each(e,function(){i(this.name,this.value)});else for(n in e)buildParams(n,e[n],t,i);return r.join("&").replace(r20,"+")},jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=jQuery.prop(this,"elements");return e?jQuery.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(e)&&(this.checked||!rcheckableType.test(e))}).map(function(e,t){var n=jQuery(this).val();return n==null?null:jQuery.isArray(n)?jQuery.map(n,function(e){return{name:t.name,value:e.replace(rCRLF,"\r\n")}}):{name:t.name,value:n.replace(rCRLF,"\r\n")}}).get()}}),jQuery.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var xhrId=0,xhrCallbacks={},xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();window.attachEvent&&window.attachEvent("onunload",function(){for(var e in xhrCallbacks)xhrCallbacks[e]()}),support.cors=!!xhrSupported&&"withCredentials"in xhrSupported,support.ajax=xhrSupported=!!xhrSupported,jQuery.ajaxTransport(function(e){var t;if(support.cors||xhrSupported&&!e.crossDomain)return{send:function(n,r){var i,s=e.xhr(),o=++xhrId;s.open(e.type,e.url,e.async,e.username,e.password);if(e.xhrFields)for(i in e.xhrFields)s[i]=e.xhrFields[i];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),!e.crossDomain&&!n["X-Requested-With"]&&(n["X-Requested-With"]="XMLHttpRequest");for(i in n)s.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete xhrCallbacks[o],t=s.onload=s.onerror=null,e==="abort"?s.abort():e==="error"?r(s.status,s.statusText):r(xhrSuccessStatus[s.status]||s.status,s.statusText,typeof s.responseText=="string"?{text:s.responseText}:undefined,s.getAllResponseHeaders()))}},s.onload=t(),s.onerror=t("error"),t=xhrCallbacks[o]=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(u){if(t)throw u}},abort:function(){t&&t()}}}),jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return jQuery.globalEval(e),e}}}),jQuery.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),jQuery.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=jQuery("