(function(a){function n(a,e,h){var b=function(){},v=b.prototype=new a.constructor;e.$$scope=v;e.$$base_module=a.base;v.base=e;v.constructor=b;v.constants=[];h&&z.cdecl(a,h,e)}function q(a,e){var h=b(null,e,a);return l(a,h)}function l(a,e){function h(){}var b=function(){};b.prototype=a.constructor.prototype;h.prototype=new b;b=new h;f(b,h,a,e.prototype);b.$$alloc=e;return b.$$proto.$$class=b}function f(a,e,h,b){a.$$id=z.uid();a.$$proto=b;a.constructor=e;h===v?(a.$$is_module=!0,a.$$class=v):(a.$$is_class= !0,a.$$class=B);a.$$super=h;a.$$parent=h;a.$$inc=[]}function k(){function a(){}var e=function(){};e.prototype=v.constructor.prototype;a.prototype=new e;e=new a;f(e,a,v,{});return e}function d(a){var e=a.$$class,h="#>",b=z.boot(e,function(){});b.$$name=h;b.$$proto=a;b.$$class=e.$$class;b.$$scope=e.$$scope;b.$$parent=e;b.$$is_singleton=!0;b.$$singleton_of=a;return a.$$meta=b}function c(){var a,e,b,v,g,B,m,I;if(4===arguments.length)for(a=arguments[0],e=arguments[1],b= arguments[2],v=arguments[3],g=a.$$bridge.$ancestors(),B=0,I=g.length;B";b=new v;f(b,v,h,e.prototype);b.$$alloc=e;b.$$name=a;e.prototype.$$class=b;z[a]=b;z.constants.push(a);return b}function x(a,e){for(var h=a.$$scope.constants,b=e.$$scope,v=b.constants,g=0,B=h.length;g $inspect $coerce_to!".split(" "));return function(f){f=l(f,"Opal");var k=f.$$scope;a.defs(f,"$bridge",function(d,c){return a.bridge(d,c)});a.defs(f,"$type_error",function(a,c,b,f){var l;null==b&&(b=n);null==f&&(f=n);return(l=!1!==b&&b!==n?f:b)===n||l.$$is_boolean&&1!=l?k.get("TypeError").$new("no implicit conversion of "+ a.$class()+" into "+c):k.get("TypeError").$new("can't convert "+a.$class()+" into "+c+" ("+a.$class()+"#"+b+" gives "+f.$class())});a.defs(f,"$coerce_to",function(a,c,b){var f;if((f=c["$==="](a))!==n&&(!f.$$is_boolean||1==f))return a;((f=a["$respond_to?"](b))===n||f.$$is_boolean&&1!=f)&&this.$raise(this.$type_error(a,c));return a.$__send__(b)});a.defs(f,"$coerce_to!",function(a,c,b){var f,k=n,k=this.$coerce_to(a,c,b);((f=c["$==="](k))===n||f.$$is_boolean&&1!=f)&&this.$raise(this.$type_error(a,c,b, k));return k});a.defs(f,"$coerce_to?",function(a,c,b){var f,k=n;if((f=a["$respond_to?"](b))===n||f.$$is_boolean&&1!=f)return n;k=this.$coerce_to(a,c,b);if((f=k["$nil?"]())!==n&&(!f.$$is_boolean||1==f))return n;((f=c["$==="](k))===n||f.$$is_boolean&&1!=f)&&this.$raise(this.$type_error(a,c,b,k));return k});a.defs(f,"$try_convert",function(a,c,b){var f;return(f=c["$==="](a))===n||f.$$is_boolean&&1!=f?(f=a["$respond_to?"](b))===n||f.$$is_boolean&&1!=f?n:a.$__send__(b):a});a.defs(f,"$compare",function(a, c){var b,f=n,f=a["$<=>"](c);(b=f===n)===n||b.$$is_boolean&&1!=b||this.$raise(k.get("ArgumentError"),"comparison of "+a.$class()+" with "+c.$class()+" failed");return f});a.defs(f,"$destructure",function(a){return 1==a.length?a[0]:a.$$is_array?a:q.call(a)});a.defs(f,"$respond_to?",function(a,c){return null!=a&&a.$$class?a["$respond_to?"](c):!1});a.defs(f,"$inspect",function(a){return void 0===a?"undefined":null===a?"null":a.$$class?a.$inspect():a.toString()});a.defs(f,"$instance_variable_name!",function(a){var c; a=k.get("Opal")["$coerce_to!"](a,k.get("String"),"to_str");((c=/^@[a-zA-Z_][a-zA-Z0-9_]*?$/.test(a))===n||c.$$is_boolean&&1!=c)&&this.$raise(k.get("NameError").$new("'"+a+"' is not allowed as an instance variable name",a));return a})}(a.base)}; Opal.modules["corelib/module"]=function(a){a.dynamic_require_severity="warning";var n=a.nil,q=a.slice,l=a.klass;a.add_stubs("$equal? $< $attr_reader $attr_writer $coerce_to! $raise $new $=~ $inject $const_get $split $const_missing $to_str $=== $to_proc $lambda $bind $call $class $append_features $included $name $to_s $__id__".split(" "));return function(f,$super){function d(){}var c=d=l(f,$super,"Module",d),b=c.$$scope,D,x,y,t;a.defs(c,"$new",D=function(){var b=D.$$p||n;D.$$p=null;var d=a.boot(a.Module, function(){});d.$$name=n;d.$$class=a.Module;d.$$dep=[];d.$$is_module=!0;d.$$proto={};a.create_scope(a.Module.$$scope,d);if(b!==n){var g=b.$$s;b.$$s=null;b.call(d);b.$$s=g}return d});a.defn(c,"$===",function(b){var d;return(d=null==b)===n||d.$$is_boolean&&1!=d?a.is_a(b,this):!1});a.defn(c,"$<",function(a){var b=this;if(b===a)return!1;for(;b;){if(b===a)return!0;b=b.$$parent}return!1});a.defn(c,"$<=",function(a){var b;return!1!==(b=this["$equal?"](a))&&b!==n?b:"number"===typeof this&&"number"===typeof a? thisb&&(b=0);for(var d=Array(b),g=0;gb&&(b=0);for(var d=Array(b),g=0;gb&&(b=0);for(var d=Array(b),g=0;gd.length||"@@"!==d.slice(0,2))===n||c.$$is_boolean&&1!=c||this.$raise(b.get("NameError").$new("class vars should start with @@",d));var g=a.cvars[d.slice(2)];(c=null==g)===n||c.$$is_boolean&&1!=c||this.$raise(b.get("NameError").$new("uninitialized class variable @@a in",d));return g});a.defn(c,"$class_variable_set",function(d,c){var g;d=b.get("Opal")["$coerce_to!"](d,b.get("String"),"to_str");(g=3>d.length||"@@"!==d.slice(0, 2))===n||g.$$is_boolean&&1!=g||this.$raise(b.get("NameError"));return a.cvars[d.slice(2)]=c});a.defn(c,"$constants",function(){return this.$$scope.constants.slice(0)});a.defn(c,"$const_defined?",function(d,c){var g;null==c&&(c=!0);((g=d["$=~"](/^[A-Z]\w*$/))===n||g.$$is_boolean&&1!=g)&&this.$raise(b.get("NameError").$new("wrong constant name "+d,d));g=[this.$$scope];if(c||this===a.Object)for(var m=this.$$super;m!==a.BasicObject;)g.push(m.$$scope),m=m.$$super;for(var m=0,u=g.length;mb&&(b=0);for(var d=Array(b),g=0;ga&&(a=0);for(var b=Array(a),g=0;gd&&(d=0);for(var g=Array(d),m=0;mb&&(b=0);for(var d=Array(b),g=0;g"});return(a.defn(c,"$undef_method",function(){var b=arguments.length-0;0>b&&(b=0);for(var d=Array(b),g=0;gb&&(b=0);for(var d=Array(b),c=0;cc&&(c=0);for(var g=Array(c),m=0;mb&&(b=0);for(var d=Array(b),g=0;gd&&(d=0);for(var g=Array(d),m=0;m $print $format $puts $<= $empty? $exception $kind_of? $respond_to_missing? $try_convert! $expand_path $join $start_with? $sym $arg $include".split(" "));(function(b){b= f(b,"Kernel");var c=b.$$scope,x,y,t,p,r,g,m,u,A;a.defn(b,"$method_missing",x=function(a){var h=arguments.length-1;0>h&&(h=0);for(var e=Array(h),b=0;b",function(a){this.$$comparable=!0;return(a=this["$=="](a))&&a!==q?0:q});a.defn(b,"$method",function(a){var h=this["$"+a];h&&!h.$$stub||this.$raise(c.get("NameError").$new("undefined method `"+a+"' for class `"+this.$class()+"'",a));return c.get("Method").$new(this,h,a)});a.defn(b,"$methods",function(b){null==b&&(b=!0);var h=[],e;for(e in this)"$"==e[0]&&"function"===typeof this[e]&&(0!=b&&b!==q||a.hasOwnProperty.call(this,e))&&void 0===this[e].$$stub&&h.push(e.substr(1));return h}); a.alias(b,"public_methods","methods");a.defn(b,"$Array",function(a){var h;if(a===q)return[];if(a.$$is_array)return a;h=c.get("Opal")["$coerce_to?"](a,c.get("Array"),"to_ary");if(h!==q)return h;h=c.get("Opal")["$coerce_to?"](a,c.get("Array"),"to_a");return h!==q?h:[a]});a.defn(b,"$at_exit",y=function(){var a,h=y.$$p||q;null==k.__at_exit__&&(k.__at_exit__=q);y.$$p=null;!1!==(a=k.__at_exit__)&&a!==q?a:k.__at_exit__=[];return k.__at_exit__["$<<"](h)});a.defn(b,"$caller",function(){return[]});a.defn(b, "$class",function(){return this.$$class});a.defn(b,"$copy_instance_variables",function(a){for(var h in a)"$"!==h.charAt(0)&&(this[h]=a[h])});a.defn(b,"$copy_singleton_methods",function(b){var h;if(b.hasOwnProperty("$$meta")){var e=a.get_singleton_class(b).$$proto,g=a.get_singleton_class(this).$$proto;for(h in e)"$"===h.charAt(0)&&e.hasOwnProperty(h)&&(g[h]=e[h])}for(h in b)"$"===h.charAt(0)&&"$"!==h.charAt(1)&&b.hasOwnProperty(h)&&(this[h]=b[h])});a.defn(b,"$clone",function(){var a=q,a=this.$class().$allocate(); a.$copy_instance_variables(this);a.$copy_singleton_methods(this);a.$initialize_clone(this);return a});a.defn(b,"$initialize_clone",function(a){return this.$initialize_copy(a)});a.defn(b,"$define_singleton_method",t=function(a,h){var e,b,g=t.$$p||q;t.$$p=null;return(e=(b=this.$singleton_class()).$define_method,e.$$p=g.$to_proc(),e).call(b,a,h)});a.defn(b,"$dup",function(){var a=q,a=this.$class().$allocate();a.$copy_instance_variables(this);a.$initialize_dup(this);return a});a.defn(b,"$initialize_dup", function(a){return this.$initialize_copy(a)});a.defn(b,"$enum_for",p=function(b){var h,e,g=p.$$p||q,d=arguments.length-1;0>d&&(d=0);for(var m=Array(d),u=0;ua&&(a=0);for(var h=Array(a),e=0;e=A.length&&O.$raise(c.get("ArgumentError"),"too few arguments");return A[a]}function g(){switch(W){case -1:O.$raise(c.get("ArgumentError"),"unnumbered("+da+") mixed with numbered");case -2:O.$raise(c.get("ArgumentError"),"unnumbered("+da+") mixed with named")}W=da++;return b(W-1)}function d(a){0< W&&O.$raise(c.get("ArgumentError"),"numbered("+a+") after unnumbered("+W+")");-2===W&&O.$raise(c.get("ArgumentError"),"numbered("+a+") after named");1>a&&O.$raise(c.get("ArgumentError"),"invalid index - "+a+"$");W=-1;return b(a-1)}function m(){return void 0===S?g():S}function I(e){var h;for(h="";;p++){p===r&&O.$raise(c.get("ArgumentError"),"malformed format string - %*[0-9]");if(48>a.charCodeAt(p)||57u&&(u=0);for(var A=Array(u),f=0;f":"}",n="",p++;;p++){p===r&&O.$raise(c.get("ArgumentError"),"malformed name - unmatched parenthesis");if(a.charAt(p)===t)if(0"===t)continue a;else{l=S.toString();-1!==y&&(l=l.slice(0,y));if(G&2)for(;l.lengthx&&(G|=2,x=-x);continue a;case ".":G&128&&O.$raise(c.get("ArgumentError"),"precision given twice");G|=192;y=0;p++;if("*"===a.charAt(p)){p++;y=v("precision");0>y&&(G&=-65);continue a}y=I("precision");continue a;case "d":case "i":case "u":n=O.$Integer(m());if(0<=n){for(l=n.toString();l.length< y;)l="0"+l;if(G&2){if(G&4||G&16)l=(G&4?"+":" ")+l;for(;l.length>>0).toString(K).replace(Z,aa);l.lengtht||t>=(-1===y?6:y)||(l=n.toPrecision(-1===y?G&1?6:void 0:y))}if(G&2){if(G&4||G&16)l=(G&4?"+":" ")+l;for(;l.lengtht||t>=(-1===y?6:y)||(l=(-n).toPrecision(-1===y?G&1?6:void 0:y))}if(G&2)for(l="-"+l;l.lengthh||36=h?h-1:"9a-"+String.fromCharCode(97+(h-11)));(new RegExp("^\\s*[+-]?["+g+"]+\\s*$")).test(b)||e.$raise(c.get("ArgumentError"),'invalid value for Integer(): "'+a+'"');b=parseInt(b,h);isNaN(b)&&e.$raise(c.get("ArgumentError"),'invalid value for Integer(): "'+a+'"');return b});a.defn(b,"$Float",function(a){var h;a===q&&this.$raise(c.get("TypeError"),"can't convert nil into Float");if(a.$$is_string){h=a.toString();h=h.replace(/(\d)_(?=\d)/g,"$1");if(/^\s*[-+]?0[xX][0-9a-fA-F]+\s*$/.test(h))return this.$Integer(h); /^\s*[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?\s*$/.test(h)||this.$raise(c.get("ArgumentError"),'invalid value for Float(): "'+a+'"');return parseFloat(h)}return c.get("Opal")["$coerce_to!"](a,c.get("Float"),"to_f")});a.defn(b,"$Hash",function(a){var h,e;return(h=!1!==(e=a["$nil?"]())&&e!==q?e:a["$=="]([]))===q||h.$$is_boolean&&1!=h?(h=c.get("Hash")["$==="](a))===q||h.$$is_boolean&&1!=h?c.get("Opal")["$coerce_to!"](a,c.get("Hash"),"to_hash"):a:d([],{})});a.defn(b,"$is_a?",function(b){b.$$is_class||b.$$is_module|| this.$raise(c.get("TypeError"),"class or module required");return a.is_a(this,b)});a.alias(b,"kind_of?","is_a?");a.defn(b,"$lambda",r=function(){var a=r.$$p||q;r.$$p=null;a.$$is_lambda=!0;return a});a.defn(b,"$load",function(b){b=c.get("Opal")["$coerce_to!"](b,c.get("String"),"to_str");return a.load(b)});a.defn(b,"$loop",g=function(){var a=g.$$p||q;for(g.$$p=null;;)if(a()===l)return l.$v});a.defn(b,"$nil?",function(){return!1});a.alias(b,"object_id","__id__");a.defn(b,"$printf",function(){var b=arguments.length- 0;0>b&&(b=0);for(var h=Array(b),e=0;e"](0))&&this.$print(this.$format.apply(this,a.to_a(h)));return q});a.defn(b,"$proc",m=function(){var a=m.$$p||q;m.$$p=null;!1!==a&&a!==q||this.$raise(c.get("ArgumentError"),"tried to create Proc object without a block");a.$$is_lambda=!1;return a});a.defn(b,"$puts",function(){var b;null==k.stdout&&(k.stdout=q);var h=arguments.length-0;0>h&&(h=0);for(var e=Array(h),g=0;ge&&(e=0);for(var g=Array(e),d=0;dh&&(h=0);for(var e=Array(h),g=0;ge&&(e=0);for(var g=Array(e),d=0;da&&this.$raise(c.get("ArgumentError"),"time interval must be positive");for(var b=new Date;new Date-b<=1E3*a;);return a});a.alias(b,"sprintf","format");a.alias(b,"srand","rand");a.defn(b,"$String",function(a){var b;return!1!==(b=c.get("Opal")["$coerce_to?"](a,c.get("String"),"to_str"))&&b!==q?b:c.get("Opal")["$coerce_to!"](a,c.get("String"),"to_s")});a.defn(b,"$tap",u=function(){var b=u.$$p||q;u.$$p= null;return a.yield1(b,this)===l?l.$v:this});a.defn(b,"$to_proc",function(){return this});a.defn(b,"$to_s",function(){return"#<"+this.$class()+":0x"+this.$__id__().$to_s(16)+">"});a.defn(b,"$catch",A=function(b){var h,e=A.$$p||q,g=q;A.$$p=null;try{return h=a.yieldX(e,[]),h}catch(d){if(a.rescue(d,[c.get("UncaughtThrowError")])){g=d;try{return g.$sym()["$=="](b)?g.$arg():this.$raise()}finally{a.gvars["!"]=a.exceptions.pop()||a.nil}}else throw d;}});a.defn(b,"$throw",function(){var a=arguments.length- 0;0>a&&(a=0);for(var b=Array(a),e=0;e $length $inspect".split(" "));(function(f,$super){function d(){}var c=d=q(f,$super,"Exception",d);c.$$proto.message=n;a.defs(c,"$new",function(){var a=arguments.length-0;0>a&&(a=0);for(var d=Array(a),c=0;cb&&(b=0);for(var d=Array(b),c=0;ca&&(a=0);for(var d=Array(a),c=0;c":this.$class().$to_s()});return(a.defn(c,"$to_s",function(){var a,d;return!1!==(a=(d=this.message,!1!==d&&d!==n?this.message.$to_s():d))&&a!==n?a:this.$class().$to_s()}),n)&&"to_s"})(a.base, Error);(function(a,$super){function d(){}d=q(a,$super,"ScriptError",d);return n})(a.base,a.get("Exception"));(function(a,$super){function d(){}d=q(a,$super,"SyntaxError",d);return n})(a.base,a.get("ScriptError"));(function(a,$super){function d(){}d=q(a,$super,"LoadError",d);return n})(a.base,a.get("ScriptError"));(function(a,$super){function d(){}d=q(a,$super,"NotImplementedError",d);return n})(a.base,a.get("ScriptError"));(function(a,$super){function d(){}d=q(a,$super,"SystemExit",d);return n})(a.base, a.get("Exception"));(function(a,$super){function d(){}d=q(a,$super,"NoMemoryError",d);return n})(a.base,a.get("Exception"));(function(a,$super){function d(){}d=q(a,$super,"SignalException",d);return n})(a.base,a.get("Exception"));(function(a,$super){function d(){}d=q(a,$super,"Interrupt",d);return n})(a.base,a.get("Exception"));(function(a,$super){function d(){}d=q(a,$super,"SecurityError",d);return n})(a.base,a.get("Exception"));(function(a,$super){function d(){}d=q(a,$super,"StandardError",d);return n})(a.base, a.get("Exception"));(function(a,$super){function d(){}d=q(a,$super,"ZeroDivisionError",d);return n})(a.base,a.get("StandardError"));(function(a,$super){function d(){}d=q(a,$super,"NameError",d);return n})(a.base,a.get("StandardError"));(function(a,$super){function d(){}d=q(a,$super,"NoMethodError",d);return n})(a.base,a.get("NameError"));(function(a,$super){function d(){}d=q(a,$super,"RuntimeError",d);return n})(a.base,a.get("StandardError"));(function(a,$super){function d(){}d=q(a,$super,"LocalJumpError", d);return n})(a.base,a.get("StandardError"));(function(a,$super){function d(){}d=q(a,$super,"TypeError",d);return n})(a.base,a.get("StandardError"));(function(a,$super){function d(){}d=q(a,$super,"ArgumentError",d);return n})(a.base,a.get("StandardError"));(function(a,$super){function d(){}d=q(a,$super,"IndexError",d);return n})(a.base,a.get("StandardError"));(function(a,$super){function d(){}d=q(a,$super,"StopIteration",d);return n})(a.base,a.get("IndexError"));(function(a,$super){function d(){} d=q(a,$super,"KeyError",d);return n})(a.base,a.get("IndexError"));(function(a,$super){function d(){}d=q(a,$super,"RangeError",d);return n})(a.base,a.get("StandardError"));(function(a,$super){function d(){}d=q(a,$super,"FloatDomainError",d);return n})(a.base,a.get("RangeError"));(function(a,$super){function d(){}d=q(a,$super,"IOError",d);return n})(a.base,a.get("StandardError"));(function(a,$super){function d(){}d=q(a,$super,"SystemCallError",d);return n})(a.base,a.get("StandardError"));(function(f){f= l(f,"Errno").$$scope;(function(f,$super){function c(){}var b=c=q(f,$super,"EINVAL",c),l;return(a.defs(b,"$new",l=function(){l.$$p=null;return a.find_super_dispatcher(this,"new",l,null,c).apply(this,["Invalid argument"])}),n)&&"new"})(f.base,f.get("SystemCallError"))})(a.base);(function(f,$super){function d(){}var c=d=q(f,$super,"UncaughtThrowError",d),b;c.$$proto.sym=n;c.$attr_reader("sym","arg");return(a.defn(c,"$initialize",b=function(d){b.$$p=null;this.sym=d["$[]"](0);var c=d.$length();if("number"=== typeof c?1"](1))this.arg=d["$[]"](1);return a.find_super_dispatcher(this,"initialize",b,null).apply(this,["uncaught throw "+this.sym.$inspect()])}),n)&&"initialize"})(a.base,a.get("ArgumentError"));(function(f,$super){function d(){}var c=d=q(f,$super,"NameError",d),b;c.$attr_reader("name");return(a.defn(c,"$initialize",b=function(d,c){null==c&&(c=n);b.$$p=null;a.find_super_dispatcher(this,"initialize",b,null).apply(this,[d]);return this.name=c}),n)&&"initialize"})(a.base,null);return function(f, $super){function d(){}var c=d=q(f,$super,"NoMethodError",d),b;c.$attr_reader("args");return(a.defn(c,"$initialize",b=function(d,c,f){null==f&&(f=[]);b.$$p=null;a.find_super_dispatcher(this,"initialize",b,null).apply(this,[d,c]);return this.args=f}),n)&&"initialize"}(a.base,null)}; Opal.modules["corelib/constants"]=function(a){a.dynamic_require_severity="warning";a.cdecl(a,"RUBY_PLATFORM","opal");a.cdecl(a,"RUBY_ENGINE","opal");a.cdecl(a,"RUBY_VERSION","2.1.5");a.cdecl(a,"RUBY_ENGINE_VERSION","0.9.0.beta2");a.cdecl(a,"RUBY_RELEASE_DATE","2015-11-06");a.cdecl(a,"RUBY_PATCHLEVEL",0);a.cdecl(a,"RUBY_REVISION",0);a.cdecl(a,"RUBY_COPYRIGHT","opal - Copyright (C) 2013-2015 Adam Beynon");return a.cdecl(a,"RUBY_DESCRIPTION","opal "+a.get("RUBY_ENGINE_VERSION")+" ("+a.get("RUBY_RELEASE_DATE")+ " revision "+a.get("RUBY_REVISION")+")")};Opal.modules["opal/base"]=function(a){a.dynamic_require_severity="warning";var n=a.top;a.add_stubs(["$require"]);n.$require("corelib/runtime");n.$require("corelib/helpers");n.$require("corelib/module");n.$require("corelib/class");n.$require("corelib/basic_object");n.$require("corelib/kernel");n.$require("corelib/error");return n.$require("corelib/constants")}; Opal.modules["corelib/nil"]=function(a){a.dynamic_require_severity="warning";var n=a.nil,q=a.klass;a.add_stubs("$raise $class $new $> $length $Rational".split(" "));(function(l,$super){function k(){}var d=k=q(l,$super,"NilClass",k),c=d.$$scope;d.$$proto.$$meta=d;a.defn(d,"$!",function(){return!0});a.defn(d,"$&",function(a){return!1});a.defn(d,"$|",function(a){return!1!==a&&a!==n});a.defn(d,"$^",function(a){return!1!==a&&a!==n});a.defn(d,"$==",function(a){return a===n});a.defn(d,"$dup",function(){return this.$raise(c.get("TypeError"), "can't dup "+this.$class())});a.defn(d,"$clone",function(){return this.$raise(c.get("TypeError"),"can't clone "+this.$class())});a.defn(d,"$inspect",function(){return"nil"});a.defn(d,"$nil?",function(){return!0});a.defn(d,"$singleton_class",function(){return c.get("NilClass")});a.defn(d,"$to_a",function(){return[]});a.defn(d,"$to_h",function(){return a.hash()});a.defn(d,"$to_i",function(){return 0});a.alias(d,"to_f","to_i");a.defn(d,"$to_s",function(){return""});a.defn(d,"$to_c",function(){return c.get("Complex").$new(0, 0)});a.defn(d,"$rationalize",function(){var a=arguments.length-0;0>a&&(a=0);for(var d=Array(a),k=0;k"](1))&&this.$raise(c.get("ArgumentError"));return this.$Rational(0,1)});return(a.defn(d,"$to_r",function(){return this.$Rational(0,1)}),n)&&"to_r"})(a.base,null);return a.cdecl(a,"NIL",n)}; Opal.modules["corelib/boolean"]=function(a){a.dynamic_require_severity="warning";var n=a.nil,q=a.klass;a.add_stubs(["$raise","$class"]);(function(l,$super){function k(){}var d=k=q(l,$super,"Boolean",k),c=d.$$proto,b=d.$$scope;c.$$is_boolean=!0;c.$$meta=d;a.defn(d,"$__id__",function(){return this.valueOf()?2:0});a.alias(d,"object_id","__id__");a.defn(d,"$!",function(){return 1!=this});a.defn(d,"$&",function(a){return 1==this?!1!==a&&a!==n:!1});a.defn(d,"$|",function(a){return 1==this?!0:!1!==a&&a!== n});a.defn(d,"$^",function(a){return 1==this?!1===a||a===n:!1!==a&&a!==n});a.defn(d,"$==",function(a){return 1==this===a.valueOf()});a.alias(d,"equal?","==");a.alias(d,"eql?","==");a.defn(d,"$singleton_class",function(){return b.get("Boolean")});a.defn(d,"$to_s",function(){return 1==this?"true":"false"});a.defn(d,"$dup",function(){return this.$raise(b.get("TypeError"),"can't dup "+this.$class())});return(a.defn(d,"$clone",function(){return this.$raise(b.get("TypeError"),"can't clone "+this.$class())}), n)&&"clone"})(a.base,Boolean);a.cdecl(a,"TrueClass",a.get("Boolean"));a.cdecl(a,"FalseClass",a.get("Boolean"));a.cdecl(a,"TRUE",!0);return a.cdecl(a,"FALSE",!1)}; Opal.modules["corelib/comparable"]=function(a){function n(a,d){return"number"===typeof a&&"number"===typeof d?a>d:a["$>"](d)}function q(a,d){return"number"===typeof a&&"number"===typeof d?a $< $equal? $<=> $normalize $raise $class".split(" "));return function(k){k=f(k,"Comparable");var d=k.$$scope;a.defs(k,"$normalize",function(a){var b;return(b=d.get("Integer")["$==="](a))===l||b.$$is_boolean&&1!=b?n(a, 0)?1:q(a,0)?-1:0:a});a.defn(k,"$==",function(c){var b,f=l;try{return(b=this["$equal?"](c))===l||b.$$is_boolean&&1!=b?this["$<=>"]==a.Kernel["$<=>"]?!1:this.$$comparable?(delete this.$$comparable,!1):(b=f=this["$<=>"](c))===l||b.$$is_boolean&&1!=b?!1:0==d.get("Comparable").$normalize(f):!0}catch(k){if(a.rescue(k,[d.get("StandardError")]))try{return!1}finally{a.gvars["!"]=a.exceptions.pop()||a.nil}else throw k;}});a.defn(k,"$>",function(a){var b,f=l;((b=f=this["$<=>"](a))===l||b.$$is_boolean&&1!=b)&& this.$raise(d.get("ArgumentError"),"comparison of "+this.$class()+" with "+a.$class()+" failed");return 0=",function(a){var b,f=l;((b=f=this["$<=>"](a))===l||b.$$is_boolean&&1!=b)&&this.$raise(d.get("ArgumentError"),"comparison of "+this.$class()+" with "+a.$class()+" failed");return 0<=d.get("Comparable").$normalize(f)});a.defn(k,"$<",function(a){var b,f=l;((b=f=this["$<=>"](a))===l||b.$$is_boolean&&1!=b)&&this.$raise(d.get("ArgumentError"),"comparison of "+ this.$class()+" with "+a.$class()+" failed");return 0>d.get("Comparable").$normalize(f)});a.defn(k,"$<=",function(a){var b,f=l;((b=f=this["$<=>"](a))===l||b.$$is_boolean&&1!=b)&&this.$raise(d.get("ArgumentError"),"comparison of "+this.$class()+" with "+a.$class()+" failed");return 0>=d.get("Comparable").$normalize(f)});a.defn(k,"$between?",function(a,b){return q(this,a)||n(this,b)?!1:!0})}(a.base)}; Opal.modules["corelib/regexp"]=function(a){a.dynamic_require_severity="warning";var n=a.nil,q=a.slice,l=a.klass,f=a.gvars;a.add_stubs("$nil? $[] $raise $escape $options $to_str $new $join $coerce_to! $! $match $coerce_to? $begin $coerce_to $call $=~ $attr_reader $=== $inspect $to_a".split(" "));(function(a,$super){function c(){}c=l(a,$super,"RegexpError",c);return n})(a.base,a.get("StandardError"));(function(k,$super){function c(){}var b=c=l(k,$super,"Regexp",c),D=b.$$proto,x=b.$$scope,y;a.cdecl(x, "IGNORECASE",1);a.cdecl(x,"MULTILINE",4);D.$$is_regexp=!0;(function(b){var c=b.$$scope,k;a.defn(b,"$allocate",k=function(){var b=q.call(arguments,0),m=k.$$p,c=n;k.$$p=null;c=a.find_super_dispatcher(this,"allocate",k,m).apply(this,b);c.uninitialized=!0;return c});a.defn(b,"$escape",function(a){return a.replace(/([-[\]\/{}()*+?.^$\\| ])/g,"\\$1").replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r").replace(/[\f]/g,"\\f").replace(/[\t]/g,"\\t")});a.defn(b,"$last_match",function(a){var b;null==f["~"]&&(f["~"]= n);null==a&&(a=n);return(b=a["$nil?"]())===n||b.$$is_boolean&&1!=b?f["~"]["$[]"](a):f["~"]});a.alias(b,"quote","escape");a.defn(b,"$union",function(){var a=arguments.length-0;0>a&&(a=0);for(var b=Array(a),u=0;ub&&(b+=a.length,0>b))return f["~"]=n;var g=this.source,m="g";this.multiline&&(g=g.replace(".","[\\s\\S]"),m+="m");for(m=new RegExp(g,m+(this.ignoreCase?"i":""));;){g=m.exec(a);if(null===g)return f["~"]= n;if(g.index>=b)return f["~"]=x.get("MatchData").$new(m,g),c===n?f["~"]:c.$call(f["~"]);m.lastIndex=g.index+1}});a.defn(b,"$~",function(){null==f._&&(f._=n);return this["$=~"](f._)});a.defn(b,"$source",function(){return this.source});a.defn(b,"$options",function(){this.uninitialized&&this.$raise(x.get("TypeError"),"uninitialized Regexp");var a=0;this.multiline&&(a|=x.get("MULTILINE"));this.ignoreCase&&(a|=x.get("IGNORECASE"));return a});a.defn(b,"$casefold?",function(){return this.ignoreCase});return a.alias(b, "to_s","source")})(a.base,RegExp);return function(k,$super){function c(){}var b=c=l(k,$super,"MatchData",c),q=b.$$scope;b.$$proto.matches=n;b.$attr_reader("post_match","pre_match","regexp","string");a.defn(b,"$initialize",function(a,b){f["~"]=this;this.regexp=a;this.begin=b.index;this.string=b.input;this.pre_match=b.input.slice(0,b.index);this.post_match=b.input.slice(b.index+b[0].length);this.matches=[];for(var c=0,p=b.length;cc&&(c=0);for(var f=Array(c),p=0;p"});a.defn(b,"$length",function(){return this.matches.length});a.alias(b,"size","length");a.defn(b,"$to_a",function(){return this.matches});a.defn(b,"$to_s",function(){return this.matches[0]});return(a.defn(b,"$values_at",function(){var a=arguments.length-0;0>a&&(a=0);for(var b=Array(a),c=0;cf&&(f+=this.matches.length,0>f)){c.push(n);continue}c.push(this.matches[f])}return c}),n)&&"values_at"}(a.base,null)}; Opal.modules["corelib/string"]=function(a){function n(a,b){return"number"===typeof a&&"number"===typeof b?a/b:a["$/"](b)}function q(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}a.dynamic_require_severity="warning";var l=a.top,f=a.nil,k=a.breaker,d=a.slice,c=a.klass,b=a.gvars;a.add_stubs("$require $include $coerce_to? $coerce_to $raise $=== $format $to_s $respond_to? $to_str $<=> $== $=~ $new $empty? $ljust $ceil $/ $+ $rjust $floor $to_a $each_char $to_proc $coerce_to! $copy_singleton_methods $initialize_clone $initialize_dup $enum_for $size $chomp $[] $to_i $class $each_line $match $captures $proc $shift $__send__ $succ $escape".split(" ")); l.$require("corelib/comparable");l.$require("corelib/regexp");(function(l,$super){function y(){}function t(a){function e(a){var b="",h,v=a.length,d,B;for(h=0;hd&&p.$raise(g.get("ArgumentError"),'invalid range "'+B+"-"+d+'" in string transliteration');for(B+=1;Ba&&this.$raise(g.get("ArgumentError"),"negative argument");if(0===a)return"";var e="",b=this.toString();for(268435456<=b.length*a&&this.$raise(g.get("RangeError"),"multiply count must not overflow maximum string size");;){1===(a&1)&&(e+=b);a>>>=1;if(0=== a)break;b+=b}return e});a.defn(p,"$+",function(a){a=g.get("Opal").$coerce_to(a,g.get("String"),"to_str");return this+a.$to_s()});a.defn(p,"$<=>",function(a){var e;if((e=a["$respond_to?"]("to_str"))===f||e.$$is_boolean&&1!=e)return a=a["$<=>"](this),a===f?f:0a?1:0;a=a.$to_str().$to_s();return this>a?1:thish)return f;0>a&&(a+=h);0>e&&(e+=h);d||(e+=1);e-=a;0>e&&(e=0);return this.substr(a,e)}if(a.$$is_string)return null!=e&&this.$raise(g.get("TypeError")),-1!== this.indexOf(a)?a:f;if(a.$$is_regexp){h=this.match(a);if(null===h)return b["~"]=f;b["~"]=g.get("MatchData").$new(a,h);if(null==e)return h[0];e=g.get("Opal").$coerce_to(e,g.get("Integer"),"to_int");return 0>e&&-ea&&(a+=h);if(null==e)return a>=h||0>a?f:this.substr(a,1);e=g.get("Opal").$coerce_to(e,g.get("Integer"),"to_int");return 0>e||a>h||0>a?f:this.substr(a,e)});a.alias(p,"byteslice","[]");a.defn(p, "$capitalize",function(){return this.charAt(0).toUpperCase()+this.substr(1).toLowerCase()});a.defn(p,"$casecmp",function(a){var e=this;a=g.get("Opal").$coerce_to(a,g.get("String"),"to_str").$to_s();var b=/^[\x00-\x7F]*$/;b.test(e)&&b.test(a)&&(e=e.toLowerCase(),a=a.toLowerCase());return e["$<=>"](a)});a.defn(p,"$center",function(a,e){var b;null==e&&(e=" ");a=g.get("Opal").$coerce_to(a,g.get("Integer"),"to_int");e=g.get("Opal").$coerce_to(e,g.get("String"),"to_str").$to_s();(b=e["$empty?"]())===f|| b.$$is_boolean&&1!=b||this.$raise(g.get("ArgumentError"),"zero width padding");if((b=a<=this.length)!==f&&(!b.$$is_boolean||1==b))return this;b=this.$ljust(n(q(a,this.length),2).$ceil(),e);return this.$rjust(n(q(a,this.length),2).$floor(),e)+b.slice(this.length)});a.defn(p,"$chars",m=function(){var a,e=m.$$p||f;m.$$p=null;return!1===e||e===f?this.$each_char().$to_a():(a=this.$each_char,a.$$p=e.$to_proc(),a).call(this)});a.defn(p,"$chomp",function(a){var e;null==b["/"]&&(b["/"]=f);null==a&&(a=b["/"]); if((e=a===f||0===this.length)!==f&&(!e.$$is_boolean||1==e))return this;a=g.get("Opal")["$coerce_to!"](a,g.get("String"),"to_str").$to_s();return"\n"===a?this.replace(/\r?\n?$/,""):""===a?this.replace(/(\r?\n)+$/,""):this.length>a.length&&this.substr(this.length-a.length,a.length)===a?this.substr(0,this.length-a.length):this});a.defn(p,"$chop",function(){var a=this.length;return 1>=a?"":"\n"===this.charAt(a-1)&&"\r"===this.charAt(a-2)?this.substr(0,a-2):this.substr(0,a-1)});a.defn(p,"$chr",function(){return this.charAt(0)}); a.defn(p,"$clone",function(){var a=f,a=this.slice();a.$copy_singleton_methods(this);a.$initialize_clone(this);return a});a.defn(p,"$dup",function(){var a=f,a=this.slice();a.$initialize_dup(this);return a});a.defn(p,"$count",function(){var a=arguments.length-0;0>a&&(a=0);for(var e=Array(a),b=0;ba&&(a=0);for(var e=Array(a),b=0;ba&&(a=0);for(var e=Array(a),b=0;b= h.length&&this.substr(this.length-h.length,h.length)==h)return!0}return!1});a.alias(p,"eql?","==");a.alias(p,"equal?","===");a.defn(p,"$gsub",z=function(a,e){var h=this,d=z.$$p||f;z.$$p=null;if(void 0===e&&d===f)return h.$enum_for("gsub",a);var m="",c=f,w=0,u,A;a.$$is_regexp?a=new RegExp(a.source,"gm"+(a.ignoreCase?"i":"")):(a=g.get("Opal").$coerce_to(a,g.get("String"),"to_str"),a=new RegExp(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gm"));for(;;){u=a.exec(h);if(null===u){b["~"]=f;m+=h.slice(w);break}c= g.get("MatchData").$new(a,u);void 0===e?A=d(u[0]):e.$$is_hash?A=e["$[]"](u[0]).$to_s():(e.$$is_string||(e=g.get("Opal").$coerce_to(e,g.get("String"),"to_str")),A=e.replace(/([\\]+)([0-9+&`'])/g,function(a,e,b){if(0===e.length%2)return a;switch(b){case "+":for(a=u.length-1;0e&&(e+=this.length,0>e))return f;if(a.$$is_regexp)for(d=new RegExp(a.source,"gm"+(a.ignoreCase?"i":""));;){h=d.exec(this);if(null===h){b["~"]=f;h=-1;break}if(h.index>=e){b["~"]=g.get("MatchData").$new(d,h);h=h.index;break}d.lastIndex=h.index+1}else a=g.get("Opal").$coerce_to(a,g.get("String"),"to_str"),h=0===a.length&&e>this.length?-1:this.indexOf(a,e);return-1===h?f:h});a.defn(p, "$inspect",function(){var a={"\u0007":"\\a","\u001b":"\\e","\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\x0B":"\\v",'"':'\\"',"\\":"\\\\"};return'"'+this.replace(/[\\\"\x00-\x1f\x7f-\x9f\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,function(e){return a[e]||"\\u"+("0000"+e.charCodeAt(0).toString(16).toUpperCase()).slice(-4)}).replace(/\#[\$\@\{]/g,"\\$&")+'"'});a.defn(p,"$intern",function(){return this});a.defn(p,"$lines",h=function(a){var e, v=h.$$p||f,g=f;null==b["/"]&&(b["/"]=f);null==a&&(a=b["/"]);h.$$p=null;g=(e=this.$each_line,e.$$p=v.$to_proc(),e).call(this,a);return!1!==v&&v!==f?this:g.$to_a()});a.defn(p,"$length",function(){return this.length});a.defn(p,"$ljust",function(a,e){var b;null==e&&(e=" ");a=g.get("Opal").$coerce_to(a,g.get("Integer"),"to_int");e=g.get("Opal").$coerce_to(e,g.get("String"),"to_str").$to_s();(b=e["$empty?"]())===f||b.$$is_boolean&&1!=b||this.$raise(g.get("ArgumentError"),"zero width padding");if((b=a<= this.length)!==f&&(!b.$$is_boolean||1==b))return this;b=-1;var h="";for(a-=this.length;++b=g||65<=g&&90>=g||97<=g&&122>=g)switch(g){case 57:h=!0;g=48;break;case 90:h=!0;g=65;break;case 122:h=!0;g=97;break;default:h=!1,g+=1}else-1===b?255===g?(h=!0,g=0):(h=!1,g+=1):h=!0;e=e.slice(0,a)+String.fromCharCode(g)+e.slice(a+1);if(h&&(0===a||a===b)){switch(g){case 65:break; case 97:break;default:g+=1}e=0===a?String.fromCharCode(g)+e:e.slice(0,a)+String.fromCharCode(g)+e.slice(a);h=!1}if(!h)break}return e});a.defn(p,"$oct",function(){var a;a=this;var e=8;if(/^\s*_/.test(a))return 0;a=a.replace(/^(\s*[+-]?)(0[bodx]?)(.+)$/i,function(a,b,h,g){switch(g.charAt(0)){case "+":case "-":return a;case "0":if("x"===g.charAt(1)&&"0x"===h)return a}switch(h){case "0b":e=2;break;case "0":case "0o":e=8;break;case "0d":e=10;break;case "0x":e=16}return b+g});a=parseInt(a.replace(/_(?!_)/g, ""),e);return isNaN(a)?0:a});a.defn(p,"$ord",function(){return this.charCodeAt(0)});a.defn(p,"$partition",function(a){var e;a.$$is_regexp?(e=a.exec(this),null===e?e=-1:(g.get("MatchData").$new(a,e),a=e[0],e=e.index)):(a=g.get("Opal").$coerce_to(a,g.get("String"),"to_str"),e=this.indexOf(a));return-1===e?[this,"",""]:[this.slice(0,e),this.slice(e,e+a.length),this.slice(e+a.length)]});a.defn(p,"$reverse",function(){return this.split("").reverse().join("")});a.defn(p,"$rindex",function(a,e){var h,d, m;if(void 0===e)e=this.length;else if(e=g.get("Opal").$coerce_to(e,g.get("Integer"),"to_int"),0>e&&(e+=this.length,0>e))return f;if(a.$$is_regexp){h=null;for(d=new RegExp(a.source,"gm"+(a.ignoreCase?"i":""));;){m=d.exec(this);if(null===m||m.index>e)break;h=m;d.lastIndex=h.index+1}null===h?(b["~"]=f,h=-1):(g.get("MatchData").$new(d,h),h=h.index)}else a=g.get("Opal").$coerce_to(a,g.get("String"),"to_str"),h=this.lastIndexOf(a,e);return-1===h?f:h});a.defn(p,"$rjust",function(a,e){var b;null==e&&(e=" "); a=g.get("Opal").$coerce_to(a,g.get("Integer"),"to_int");e=g.get("Opal").$coerce_to(e,g.get("String"),"to_str").$to_s();(b=e["$empty?"]())===f||b.$$is_boolean&&1!=b||this.$raise(g.get("ArgumentError"),"zero width padding");if((b=a<=this.length)!==f&&(!b.$$is_boolean||1==b))return this;b=Math.floor(a-this.length);var h=Array(Math.floor(b/e.length)+1).join(e);return h+e.slice(0,b-h.length)+this});a.defn(p,"$rpartition",function(a){var e,b,h;if(a.$$is_regexp){e=null;for(b=new RegExp(a.source,"gm"+(a.ignoreCase? "i":""));;){h=b.exec(this);if(null===h)break;e=h;b.lastIndex=e.index+1}null===e?e=-1:(g.get("MatchData").$new(b,e),a=e[0],e=e.index)}else a=g.get("Opal").$coerce_to(a,g.get("String"),"to_str"),e=this.lastIndexOf(a);return-1===e?["","",this]:[this.slice(0,e),this.slice(e,e+a.length),this.slice(e+a.length)]});a.defn(p,"$rstrip",function(){return this.replace(/[\s\u0000]*$/,"")});a.defn(p,"$scan",w=function(a){var e=w.$$p||f;w.$$p=null;var h=[],d=f,m;a.$$is_regexp?a=new RegExp(a.source,"gm"+(a.ignoreCase? "i":"")):(a=g.get("Opal").$coerce_to(a,g.get("String"),"to_str"),a=new RegExp(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gm"));for(;null!=(m=a.exec(this));)d=g.get("MatchData").$new(a,m),e===f?1==m.length?h.push(m[0]):h.push(d.$captures()):1==m.length?e(m[0]):e.call(this,d.$captures()),a.lastIndex===m.index&&(a.lastIndex+=1);b["~"]=d;return e!==f?this:h});a.alias(p,"size","length");a.alias(p,"slice","[]");a.defn(p,"$split",function(a,e){var h;null==b[";"]&&(b[";"]=f);if(0===this.length)return[];if(void 0=== e)e=0;else if(e=g.get("Opal")["$coerce_to!"](e,g.get("Integer"),"to_int"),1===e)return[this];if(void 0===a||a===f)a=!1!==(h=b[";"])&&h!==f?h:" ";h=[];var d=this.toString(),m=0,c,w;a.$$is_regexp?a=new RegExp(a.source,"gm"+(a.ignoreCase?"i":"")):(a=g.get("Opal").$coerce_to(a,g.get("String"),"to_str").$to_s()," "===a?(a=/\s+/gm,d=d.replace(/^\s+/,"")):a=new RegExp(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gm"));h=d.split(a);if(1===h.length&&h[0]===d)return h;for(;-1!==(w=h.indexOf(void 0));)h.splice(w, 1);if(0===e){for(;""===h[h.length-1];)--h.length;return h}c=a.exec(d);if(0>e){if(null!==c&&""===c[0]&&-1===a.source.indexOf("(?="))for(w=0;wa&&(a=0);for(var e=Array(a),b=0;ba&&(a=0);for(var e=Array(a),b=0;b=a?e:e&Math.pow(2,a)-1});a.defn(p,"$swapcase",function(){var a=this.replace(/([a-z]+)|([A-Z]+)/g,function(a,e,b){return e?a.toUpperCase():a.toLowerCase()});return this.constructor===String?a:this.$class().$new(a)});a.defn(p,"$to_f",function(){if("_"===this.charAt(0))return 0;var a=parseFloat(this.replace(/_/g,""));return isNaN(a)||Infinity==a||-Infinity==a?0:a});a.defn(p,"$to_i", function(a){null==a&&(a=10);var e=this.toLowerCase(),b=g.get("Opal").$coerce_to(a,g.get("Integer"),"to_int");(1===b||0>b||36h&&this.$raise(g.get("ArgumentError"),'invalid range "'+String.fromCharCode(d)+"-"+String.fromCharCode(h)+'" in string transliteration');for(d+=1;dh&&this.$raise(g.get("ArgumentError"),'invalid range "'+String.fromCharCode(d)+"-"+String.fromCharCode(h)+'" in string transliteration');for(d+=1;dh&&this.$raise(g.get("ArgumentError"),'invalid range "'+String.fromCharCode(d)+"-"+String.fromCharCode(h)+'" in string transliteration');for(d+=1;dh&&this.$raise(g.get("ArgumentError"),'invalid range "'+String.fromCharCode(d)+ "-"+String.fromCharCode(h)+'" in string transliteration');for(d+=1;d $* $nil? $coerce_to $try_convert $< $+ $- $ceil $/ $size $=== $<< $[] $[]= $inspect $__send__ $compare $<=> $proc $call $to_a $lambda $sort! $map! $first $zip".split(" "));return function(k){k=f(k,"Enumerable");var d=k.$$scope,c,b,D,x,y,t,p,r,g,m,u, A,z,h,e,w,E,C,M,I,v,B,O,L,F,P,N,ma,T,U,V,J,Q,K,R;a.defn(k,"$all?",c=function(){var e,b=c.$$p||n;c.$$p=null;var h=!0;this.$each.$$p=b!==n?function(){var d=a.yieldX(b,arguments);if(d===q)return h=q.$v,q;if((e=d)===n||e.$$is_boolean&&0==e)return h=!1,q}:function(a){if(1==arguments.length&&((e=a)===n||e.$$is_boolean&&0==e))return h=!1,q};this.$each();return h});a.defn(k,"$any?",b=function(){var e,h=b.$$p||n;b.$$p=null;var d=!1;this.$each.$$p=h!==n?function(){var b=a.yieldX(h,arguments);if(b===q)return d= q.$v,q;if((e=b)!==n&&(!e.$$is_boolean||1==e))return d=!0,q}:function(a){if(1!=arguments.length||(e=a)!==n&&(!e.$$is_boolean||1==e))return d=!0,q};this.$each();return d});a.defn(k,"$chunk",D=function(e){var b,h,g,m=D.$$p||n;D.$$p=null;!1!==m&&m!==n||d.get("Kernel").$raise(d.get("ArgumentError"),"no block given");return(b=(h=a.get("Enumerator")).$new,b.$$p=(g=function(b){function h(){0"](0))?(a=a.$enumerator_size(),"number"===typeof a&&"number"===typeof e?a*e:a["$*"](e)):0},h.$$s=this,h),b).call(this,"cycle",e);if((b=e["$nil?"]())===n||b.$$is_boolean&&1!=b)if(e=d.get("Opal")["$coerce_to!"](e,d.get("Integer"),"to_int"),(b=0>=e)!==n&&(!b.$$is_boolean||1==b))return n;var m,c=[],v,B;this.$each.$$p=function(){var e=d.get("Opal").$destructure(arguments);if(a.yield1(g,e)===q)return m=q.$v,q;c.push(e)};this.$each();if(void 0!==m)return m;if(0===c.length)return n; if(e===n)for(;;)for(b=0,v=c.length;ba)===n||e.$$is_boolean&&1!=e||this.$raise(d.get("ArgumentError"),"attempt to drop negative size");var b=[],h=0;this.$each.$$p=function(){a<=h&&b.push(d.get("Opal").$destructure(arguments));h++};this.$each();return b});a.defn(k,"$drop_while",g=function(){var e,b=g.$$p||n;g.$$p=null;if(b===n)return this.$enum_for("drop_while");var h=[],m=!0;this.$each.$$p=function(){var g=d.get("Opal").$destructure(arguments); if(m){var c=a.yield1(b,g);if(c===q)return h=q.$v,q;if((e=c)===n||e.$$is_boolean&&0==e)m=!1,h.push(g)}else h.push(g)};this.$each();return h});a.defn(k,"$each_cons",m=function(e){var b,h,g=m.$$p||n;m.$$p=null;(b=1!=arguments.length)===n||b.$$is_boolean&&1!=b||this.$raise(d.get("ArgumentError"),"wrong number of arguments ("+arguments.length+" for 1)");e=d.get("Opal").$try_convert(e,d.get("Integer"),"to_int");(b=0>=e)===n||b.$$is_boolean&&1!=b||this.$raise(d.get("ArgumentError"),"invalid size");if(g=== n)return(b=this.$enum_for,b.$$p=(h=function(){var a,b,d=n,d=(h.$$s||this).$enumerator_size();return(a=d["$nil?"]())===n||a.$$is_boolean&&1!=a?(a=!1!==(b=d["$=="](0))&&b!==n?b:"number"===typeof d&&"number"===typeof e?d e&&c.shift();if(c.length==e&&a.yield1(g,c.slice(0,e))==q)return v=q.$v,q};this.$each();return v});a.defn(k,"$each_entry",u=function(){u.$$p=null;return this.$raise(d.get("NotImplementedError"))});a.defn(k,"$each_slice",A=function(e){var b,h,g=A.$$p||n;A.$$p=null;e=d.get("Opal").$coerce_to(e,d.get("Integer"),"to_int");(b=0>=e)===n||b.$$is_boolean&&1!=b||this.$raise(d.get("ArgumentError"),"invalid slice size");if(g===n)return(b=this.$enum_for,b.$$p=(h=function(){var a=h.$$s||this,b;if((b=a["$respond_to?"]("size"))=== n||b.$$is_boolean&&1!=b)return n;a=a.$size();return("number"===typeof a&&"number"===typeof e?a/e:a["$/"](e)).$ceil()},h.$$s=this,h),b).call(this,"each_slice",e);var m,c=[];this.$each.$$p=function(){var b=d.get("Opal").$destructure(arguments);c.push(b);if(c.length===e){if(a.yield1(g,c)===q)return m=q.$v,q;c=[]}};this.$each();return void 0!==m?m:0g&&(g=0);for(var m=Array(g),c=0;c< g;c++)m[c]=arguments[c+0];z.$$p=null;if(h===n)return(e=this.$enum_for,e.$$p=(b=function(){return(b.$$s||this).$enumerator_size()},b.$$s=this,b),e).apply(this,["each_with_index"].concat(a.to_a(m)));var v,B=0;this.$each.$$p=function(){var a=d.get("Opal").$destructure(arguments);if(h(a,B)===q)return v=q.$v,q;B++};this.$each.apply(this,m);return void 0!==v?v:this});a.defn(k,"$each_with_object",h=function(a){var e,b,g=h.$$p||n;h.$$p=null;if(g===n)return(e=this.$enum_for,e.$$p=(b=function(){return(b.$$s|| this).$enumerator_size()},b.$$s=this,b),e).call(this,"each_with_object",a);var m;this.$each.$$p=function(){var e=d.get("Opal").$destructure(arguments);if(g(e,a)===q)return m=q.$v,q};this.$each();return void 0!==m?m:a});a.defn(k,"$entries",function(){var a=arguments.length-0;0>a&&(a=0);for(var e=Array(a),b=0;ba)===n||e.$$is_boolean&&1!=e||this.$raise(d.get("ArgumentError"), "attempt to take negative size");if((e=0==a)!==n&&(!e.$$is_boolean||1==e))return[];var h=0;a=d.get("Opal").$coerce_to(a,d.get("Integer"),"to_int");this.$each.$$p=function(){b.push(d.get("Opal").$destructure(arguments));if(a<=++h)return q}}else b=n,this.$each.$$p=function(){b=d.get("Opal").$destructure(arguments);return q};this.$each();return b});a.alias(k,"flat_map","collect_concat");a.defn(k,"$grep",E=function(e){var b,h=E.$$p||n;E.$$p=null;var g=[];this.$each.$$p=h!==n?function(){var m=d.get("Opal").$destructure(arguments), c=e["$==="](m);if((b=c)!==n&&(!b.$$is_boolean||1==b)){c=a.yield1(h,m);if(c===q)return g=q.$v,q;g.push(c)}}:function(){var a=d.get("Opal").$destructure(arguments);(b=e["$==="](a))===n||b.$$is_boolean&&1!=b||g.push(a)};this.$each();return g});a.defn(k,"$group_by",C=function(){var e,b,h,g,m=C.$$p||n,c=n;C.$$p=null;if(m===n)return(e=this.$enum_for,e.$$p=(b=function(){return(b.$$s||this).$enumerator_size()},b.$$s=this,b),e).call(this,"group_by");var c=d.get("Hash").$new(),v;this.$each.$$p=function(){var b= d.get("Opal").$destructure(arguments),B=a.yield1(m,b);if(B===q)return v=q.$v,q;(e=B,h=c,!1!==(g=h["$[]"](e))&&g!==n?g:h["$[]="](e,[]))["$<<"](b)};this.$each();return void 0!==v?v:c});a.defn(k,"$include?",function(a){var e=!1;this.$each.$$p=function(){if(d.get("Opal").$destructure(arguments)["$=="](a))return e=!0,q};this.$each();return e});a.defn(k,"$inject",M=function(e,b){var h=M.$$p||n;M.$$p=null;var g=e;h!==n&&void 0===b?this.$each.$$p=function(){var e=d.get("Opal").$destructure(arguments);if(void 0!== g&&(e=a.yieldX(h,[g,e]),e===q))return g=q.$v,q;g=e}:(void 0===b&&(d.get("Symbol")["$==="](e)||this.$raise(d.get("TypeError"),""+e.$inspect()+" is not a Symbol"),b=e,g=void 0),this.$each.$$p=function(){var a=d.get("Opal").$destructure(arguments);g=void 0===g?a:g.$__send__(b,a)});this.$each();return void 0==g?n:g});a.defn(k,"$lazy",function(){var e,b,h;return(e=(b=d.get("Enumerator").$$scope.get("Lazy")).$new,e.$$p=(h=function(e,b){var h;null==e&&(e=n);b=l.call(arguments,1);return(h=e).$yield.apply(h, a.to_a(b))},h.$$s=this,h),e).call(b,this,this.$enumerator_size())});a.defn(k,"$enumerator_size",function(){var a;return(a=this["$respond_to?"]("size"))===n||a.$$is_boolean&&1!=a?n:this.$size()});a.alias(k,"map","collect");a.defn(k,"$max",I=function(){var a=this,e=I.$$p||n;I.$$p=null;var b;a.$each.$$p=e!==n?function(){var h=d.get("Opal").$destructure(arguments);if(void 0===b)b=h;else{var g=e(h,b);if(g===q)return b=q.$v,q;g===n&&a.$raise(d.get("ArgumentError"),"comparison failed");0"](m)&&(g=e,m=b)}};this.$each(); return void 0===g?n:g});a.alias(k,"member?","include?");a.defn(k,"$min",B=function(){var a=this,e=B.$$p||n;B.$$p=null;var b;a.$each.$$p=e!==n?function(){var h=d.get("Opal").$destructure(arguments);if(void 0===b)b=h;else{var g=e(h,b);if(g===q)return b=q.$v,q;g===n&&a.$raise(d.get("ArgumentError"),"comparison failed");0>g&&(b=h)}}:function(){var a=d.get("Opal").$destructure(arguments);void 0===b?b=a:0>d.get("Opal").$compare(a,b)&&(b=a)};a.$each();return void 0===b?n:b});a.defn(k,"$min_by",O=function(){var e, b,h=O.$$p||n;O.$$p=null;if(!1===h||h===n)return(e=this.$enum_for,e.$$p=(b=function(){return(b.$$s||this).$enumerator_size()},b.$$s=this,b),e).call(this,"min_by");var g,m;this.$each.$$p=function(){var e=d.get("Opal").$destructure(arguments),b=a.yield1(h,e);if(void 0===g)g=e,m=b;else{if(b===q)return g=q.$v,q;0>b["$<=>"](m)&&(g=e,m=b)}};this.$each();return void 0===g?n:g});a.defn(k,"$minmax",L=function(){var a,e,b,h=this,g=L.$$p||n;L.$$p=null;!1!==(a=g)&&a!==n?a:g=(e=h.$proc,e.$$p=(b=function(a,e){null== a&&(a=n);null==e&&(e=n);return a["$<=>"](e)},b.$$s=h,b),e).call(h);var m=n,c=n,v=!0;h.$each.$$p=function(){var a=d.get("Opal").$destructure(arguments);if(v)m=c=a,v=!1;else{var e=g.$call(m,a);e===n?h.$raise(d.get("ArgumentError"),"comparison failed"):0e&&(c=a)}};h.$each();return[m,c]});a.defn(k,"$minmax_by",F=function(){F.$$p=null;return this.$raise(d.get("NotImplementedError"))});a.defn(k,"$none?",P=function(){var e, b=P.$$p||n;P.$$p=null;var h=!0;this.$each.$$p=b!==n?function(){var g=a.yieldX(b,arguments);if(g===q)return h=q.$v,q;if((e=g)!==n&&(!e.$$is_boolean||1==e))return h=!1,q}:function(){if((e=d.get("Opal").$destructure(arguments))!==n&&(!e.$$is_boolean||1==e))return h=!1,q};this.$each();return h});a.defn(k,"$one?",N=function(){var e,b=N.$$p||n;N.$$p=null;var h=!1;this.$each.$$p=b!==n?function(){var g=a.yieldX(b,arguments);if(g===q)return h=q.$v,q;if((e=g)!==n&&(!e.$$is_boolean||1==e)){if(!0===h)return h= !1,q;h=!0}}:function(){if((e=d.get("Opal").$destructure(arguments))!==n&&(!e.$$is_boolean||1==e)){if(!0===h)return h=!1,q;h=!0}};this.$each();return h});a.defn(k,"$partition",ma=function(){var e,b,h=ma.$$p||n;ma.$$p=null;if(h===n)return(e=this.$enum_for,e.$$p=(b=function(){return(b.$$s||this).$enumerator_size()},b.$$s=this,b),e).call(this,"partition");var g=[],m=[];this.$each.$$p=function(){var b=d.get("Opal").$destructure(arguments),c=a.yield1(h,b);if(c===q)return q;(e=c)===n||e.$$is_boolean&&1!= e?m.push(b):g.push(b)};this.$each();return[g,m]});a.alias(k,"reduce","inject");a.defn(k,"$reject",T=function(){var e,b,h=T.$$p||n;T.$$p=null;if(h===n)return(e=this.$enum_for,e.$$p=(b=function(){return(b.$$s||this).$enumerator_size()},b.$$s=this,b),e).call(this,"reject");var g=[];this.$each.$$p=function(){var b=d.get("Opal").$destructure(arguments),m=a.yield1(h,b);if(m===q)return g=q.$v,q;((e=m)===n||e.$$is_boolean&&0==e)&&g.push(b)};this.$each();return g});a.defn(k,"$reverse_each",U=function(){var e, b,h=U.$$p||n;U.$$p=null;if(h===n)return(e=this.$enum_for,e.$$p=(b=function(){return(b.$$s||this).$enumerator_size()},b.$$s=this,b),e).call(this,"reverse_each");var g=[];this.$each.$$p=function(){g.push(arguments)};this.$each();for(e=g.length-1;0<=e;e--)a.yieldX(h,g[e]);return g});a.alias(k,"select","find_all");a.defn(k,"$slice_before",V=function(e){var b,h,g,m=V.$$p||n;V.$$p=null;(b=void 0===e&&m===n||1"](e)},e.$$s=this,e),a).call(this));return h.sort(b)});a.defn(k,"$sort_by",Q=function(){var a,e,b,h,g,m,c,v=Q.$$p||n,B=n;Q.$$p=null;if(v===n)return(a=this.$enum_for,a.$$p=(e=function(){return(e.$$s|| this).$enumerator_size()},e.$$s=this,e),a).call(this,"sort_by");B=(a=this.$map,a.$$p=(b=function(){var a=n,a=d.get("Opal").$destructure(arguments);return[v.$call(a),a]},b.$$s=this,b),a).call(this);(a=(h=B)["$sort!"],a.$$p=(g=function(a,e){null==a&&(a=n);null==e&&(e=n);return a[0]["$<=>"](e[0])},g.$$s=this,g),a).call(h);return(a=(m=B)["$map!"],a.$$p=(c=function(a){null==a&&(a=n);return a[1]},c.$$s=this,c),a).call(m)});a.defn(k,"$take",function(a){return this.$first(a)});a.defn(k,"$take_while",K=function(){var e, b=K.$$p||n;K.$$p=null;if(!1===b||b===n)return this.$enum_for("take_while");var h=[];this.$each.$$p=function(){var g=d.get("Opal").$destructure(arguments),m=a.yield1(b,g);if(m===q)return h=q.$v,q;if((e=m)===n||e.$$is_boolean&&0==e)return q;h.push(g)};this.$each();return h});a.alias(k,"to_a","entries");a.defn(k,"$zip",R=function(){var e,b=arguments.length-0;0>b&&(b=0);for(var h=Array(b),g=0;ge&&(e=0);for(var g=Array(e),d=0;dd&&(d=0);for(var c=Array(d),u=0;u")});(function(b,$super){function h(){}var e=h=c(b,$super,"Generator",h),g=e.$$scope,d,m;e.$$proto.block=f;e.$include(g.get("Enumerable"));a.defn(e,"$initialize",d=function(){var a=d.$$p||f;d.$$p=null;!1!==a&&a!==f||this.$raise(g.get("LocalJumpError"),"no block given"); return this.block=a});return(a.defn(e,"$each",m=function(){var e,b,h=m.$$p||f,d=f,d=arguments.length-0;0>d&&(d=0);for(var c=Array(d),u=0;ue&&(e=0);for(var b=Array(e),h=0;he&&(e=0);for(var b=Array(e),h=0;hd&&(d=0);for(var m=Array(d),c=0;c"}),f)&&"inspect"}(p.base,y)}(a.base,null)}; Opal.modules["corelib/numeric"]=function(a){function n(a,d){return"number"===typeof a&&"number"===typeof d?a-d:a["$-"](d)}function q(a,d){return"number"===typeof a&&"number"===typeof d?a*d:a["$*"](d)}function l(a,d){return"number"===typeof a&&"number"===typeof d?a".split(" ")); k.$require("corelib/comparable");return function(b,$super){function k(){}var y=k=c(b,$super,"Numeric",k),t=y.$$scope;y.$include(t.get("Comparable"));a.defn(y,"$coerce",function(a){var b;return(b=a["$instance_of?"](this.$class()))===d||b.$$is_boolean&&1!=b?[this.$Float(a),this.$Float(this)]:[a,this]});a.defn(y,"$__coerced__",function(b,c){var g,m=d,u=d,A=d;try{g=a.to_ary(c.$coerce(this)),m=null==g[0]?d:g[0],u=null==g[1]?d:g[1]}catch(f){try{A=b,"+"["$==="](A)||"-"["$==="](A)||"*"["$==="](A)||"/"["$==="](A)|| "%"["$==="](A)||"&"["$==="](A)||"|"["$==="](A)||"^"["$==="](A)||"**"["$==="](A)?this.$raise(t.get("TypeError"),""+c.$class()+" can't be coerce into Numeric"):(">"["$==="](A)||">="["$==="](A)||"<"["$==="](A)||"<="["$==="](A)||"<=>"["$==="](A))&&this.$raise(t.get("ArgumentError"),"comparison of "+this.$class()+" with "+c.$class()+" failed")}finally{a.gvars["!"]=a.exceptions.pop()||a.nil}}return m.$__send__(b,u)});a.defn(y,"$<=>",function(a){var b;return(b=this["$equal?"](a))===d||b.$$is_boolean&&1!= b?d:0});a.defn(y,"$[]",function(a){var b=d,g=d;a=t.get("Opal")["$coerce_to!"](a,t.get("Integer"),"to_int");b=2["$**"](30)["$-@"]();g=n(2["$**"](30),1);return ag?0:(this>>a)%2});a.defn(y,"$+@",function(){return this});a.defn(y,"$-@",function(){return n(0,this)});a.defn(y,"$%",function(a){return n(this,q(a,this.$div(a)))});a.defn(y,"$abs",function(){return l(this,0)?this["$-@"]():this});a.defn(y,"$abs2",function(){return q(this,this)});a.defn(y,"$angle",function(){return l(this,0)?t.get("Math").$$scope.get("PI"): 0});a.alias(y,"arg","angle");a.defn(y,"$ceil",function(){return this.$to_f().$ceil()});a.defn(y,"$conj",function(){return this});a.alias(y,"conjugate","conj");a.defn(y,"$denominator",function(){return this.$to_r().$denominator()});a.defn(y,"$div",function(a){a["$=="](0)&&this.$raise(t.get("ZeroDivisionError"),"divided by o");return f(this,a).$floor()});a.defn(y,"$divmod",function(a){return[this.$div(a),this["$%"](a)]});a.defn(y,"$fdiv",function(a){return f(this.$to_f(),a)});a.defn(y,"$floor",function(){return this.$to_f().$floor()}); a.defn(y,"$i",function(){return this.$Complex(0,this)});a.defn(y,"$imag",function(){return 0});a.alias(y,"imaginary","imag");a.defn(y,"$integer?",function(){return!1});a.alias(y,"magnitude","abs");a.alias(y,"modulo","%");a.defn(y,"$nonzero?",function(){var a;return(a=this["$zero?"]())===d||a.$$is_boolean&&1!=a?this:d});a.defn(y,"$numerator",function(){return this.$to_r().$numerator()});a.alias(y,"phase","arg");a.defn(y,"$polar",function(){return[this.$abs(),this.$arg()]});a.defn(y,"$quo",function(a){return f(t.get("Opal")["$coerce_to!"](this, t.get("Rational"),"to_r"),a)});a.defn(y,"$real",function(){return this});a.defn(y,"$real?",function(){return!0});a.defn(y,"$rect",function(){return[this,0]});a.alias(y,"rectangular","rect");a.defn(y,"$round",function(a){return this.$to_f().$round(a)});a.defn(y,"$to_c",function(){return this.$Complex(this,0)});a.defn(y,"$to_int",function(){return this.$to_i()});a.defn(y,"$truncate",function(){return this.$to_f().$truncate()});a.defn(y,"$zero?",function(){return this["$=="](0)});a.defn(y,"$positive?", function(){return"number"===typeof this?0"](0)});a.defn(y,"$negative?",function(){return l(this,0)});a.defn(y,"$dup",function(){return this.$raise(t.get("TypeError"),"can't dup "+this.$class())});return(a.defn(y,"$clone",function(){return this.$raise(t.get("TypeError"),"can't clone "+this.$class())}),d)&&"clone"}(a.base,null)}; Opal.modules["corelib/array"]=function(a){function n(a,d){return"number"===typeof a&&"number"===typeof d?a>d:a["$>"](d)}a.dynamic_require_severity="warning";var q=a.top,l=a.nil,f=a.breaker,k=a.klass,d=a.hash2,c=a.gvars;a.add_stubs("$require $include $raise $=== $to_a $respond_to? $to_ary $coerce_to $initialize $to_proc $coerce_to? $join $to_str $class $clone $hash $<=> $== $object_id $inspect $enum_for $coerce_to! $> $* $enumerator_size $empty? $copy_singleton_methods $initialize_clone $initialize_dup $replace $size $eql? $length $begin $end $exclude_end? $flatten $__id__ $[] $to_s $new $! $delete_if $each $reverse $rotate $rand $at $keep_if $shuffle! $dup $< $sort $!= $times $[]= $<< $kind_of? $last $first $upto".split(" ")); q.$require("corelib/enumerable");q.$require("corelib/numeric");return function(b,$super){function q(){}function y(a,e){return a===e||0===e?1:0e?y(a-1,e-1)+y(a-1,e):0}var t=q=k(b,$super,"Array",q),p=t.$$proto,r=t.$$scope,g,m,u,A,z,h,e,w,E,C,M,I,v,B,O,L,F,P,N,ma,T,U,V,J,Q,K,R,Z,aa;p.length=l;t.$include(r.get("Enumerable"));p.$$is_array=!0;a.defs(t,"$[]",function(){var a=arguments.length-0;0>a&&(a=0);for(var e=Array(a),b=0;ba)===l||b.$$is_boolean&&1!=b||this.$raise(r.get("ArgumentError"),"negative array size");this.splice(0,this.length);var d;if(h===l)for(b=0;bg&&(g=0);for(var d=Array(g),c=0;ca)===l||e.$$is_boolean&&1!=e||this.$raise(r.get("ArgumentError"),"negative argument");e=[];for(var b=0;b",function(a){var e;if((e=r.get("Array")["$==="](a))===l||e.$$is_boolean&&1!=e){if((e=a["$respond_to?"]("to_ary"))===l||e.$$is_boolean&&1!=e)return l; a=a.$to_ary().$to_a()}else a=a.$to_a();if(this.$hash()===a.$hash())return 0;e=Math.min(this.length,a.length);for(var b=0;b"](a[b]);if(0!==h)return h}return this.length["$<=>"](a.length)});a.defn(t,"$==",function(a){function e(a,h){var g,d,m,c;if(!h.$$is_array)return r.get("Opal")["$respond_to?"](h,"to_ary")?h["$=="](a):!1;h=h.$to_a();if(a.length!==h.length)return!1;b[a.$object_id()]=!0;g=0;for(d=a.length;gg&&(g+=b,0>g)||g>b)return l;if(0>d&&(d+=b,0>d))return[];h||(d+=1);return this.slice(g,d)}a=r.get("Opal").$coerce_to(a,r.get("Integer"),"to_int");if(0>a&&(a+=b,0>a))return l; if(void 0===e)return a>=b||0>a?l:this[a];e=r.get("Opal").$coerce_to(e,r.get("Integer"),"to_int");return 0>e||a>b||0>a?l:this.slice(a,a+e)});a.defn(t,"$[]=",function(a,e,b){var h,g=l,d=l,m;m=this.length;if((h=r.get("Range")["$==="](a))===l||h.$$is_boolean&&1!=h){(h=void 0===b)===l||h.$$is_boolean&&1!=h?(d=e,e=b,g=(h=r.get("Array")["$==="](e))===l||h.$$is_boolean&&1!=h?(h=e["$respond_to?"]("to_ary"))===l||h.$$is_boolean&&1!=h?[e]:e.$to_ary().$to_a():e.$to_a()):d=1;a=r.get("Opal").$coerce_to(a,r.get("Integer"), "to_int");d=r.get("Opal").$coerce_to(d,r.get("Integer"),"to_int");0>a&&(h=a,a+=m,0>a&&this.$raise(r.get("IndexError"),"index "+h+" too small for array; minimum "+-this.length));0>d&&this.$raise(r.get("IndexError"),"negative length ("+d+")");if(a>m)for(;mb&&(b+=m,0>b&&this.$raise(r.get("RangeError"),""+a.$inspect()+" out of range"));0>d&&(d+=m);h||(d+=1);if(b>m)for(;md?this.splice.apply(this,[b,0].concat(g)):this.splice.apply(this,[b,d-b].concat(g))}return e});a.defn(t,"$assoc",function(a){for(var e=0,b=this.length,h;ea&&(a+=this.length);return 0>a||a>=this.length?l:this[a]});a.defn(t,"$bsearch",u=function(){var a=u.$$p||l;u.$$p=null;if(a===l)return this.$enum_for("bsearch");for(var e=0,b=this.length,h,g,d,m=!1,c=l;ed}else this.$raise(r.get("TypeError"),"wrong argument type "+d.$class()+" (must be numeric, true, false or nil)"); m?b=h:e=h+1}return c});a.defn(t,"$cycle",A=function(e){var b,h,g,d=A.$$p||l;null==e&&(e=l);A.$$p=null;if(d===l)return(b=this.$enum_for,b.$$p=(h=function(){var a=h.$$s||this;if(e["$=="](l))return r.get("Float").$$scope.get("INFINITY");e=r.get("Opal")["$coerce_to!"](e,r.get("Integer"),"to_int");return n(e,0)?(a=a.$enumerator_size(),"number"===typeof a&&"number"===typeof e?a*e:a["$*"](e)):0},h.$$s=this,h),b).call(this,"cycle",e);if((b=!1!==(g=this["$empty?"]())&&g!==l?g:e["$=="](0))!==l&&(!b.$$is_boolean|| 1==b))return l;var m;if(e===l)for(;;)for(b=0,g=this.length;b=e)return this;for(;0a&&(a+=this.length);if(0>a||a>=this.length)return l;var e=this[a];this.splice(a,1);return e});a.defn(t,"$delete_if",E=function(){var a,e,b=E.$$p||l;E.$$p=null;if(b===l)return(a=this.$enum_for,a.$$p=(e=function(){return(e.$$s||this).$size()},e.$$s=this,e),a).call(this,"delete_if");a=0;for(var h=this.length,g;aa&&this.$raise(r.get("ArgumentError"));return this.slice(a)});a.defn(t,"$each",C=function(){var e,b,h=C.$$p||l;C.$$p=null;if(h===l)return(e=this.$enum_for,e.$$p=(b=function(){return(b.$$s||this).$size()},b.$$s=this,b),e).call(this,"each");e=0;for(var g=this.length;ea&&(a+=this.length);if(0<=a&&am&&(m=0);g=Array(m);for(h=0;hm)===l||e.$$is_boolean&&1!=e||(m+=this.length),(e=0>m)===l||e.$$is_boolean&&1!=e||(m=0),!1!==g&&g!==l){g=r.get("Opal").$coerce_to(g,r.get("Integer"),"to_int");if((e=0==g)!==l&&(!e.$$is_boolean|| 1==e))return this;g+=m}else g=this.length;else m=0,g=this.length;else{!1!==g&&g!==l&&this.$raise(r.get("TypeError"),"length invalid with range");m=r.get("Opal").$coerce_to(h.$begin(),r.get("Integer"),"to_int");(e=0>m)===l||e.$$is_boolean&&1!=e||(m+=this.length);(e=0>m)===l||e.$$is_boolean&&1!=e||this.$raise(r.get("RangeError"),""+h.$inspect()+" out of range");g=r.get("Opal").$coerce_to(h.$end(),r.get("Integer"),"to_int");(e=0>g)===l||e.$$is_boolean&&1!=e||(g+=this.length);if((e=h["$exclude_end?"]())=== l||e.$$is_boolean&&1!=e)g+=1;if((e=g<=m)!==l&&(!e.$$is_boolean||1==e))return this}if((e=m>this.length)!==l&&(!e.$$is_boolean||1==e))for(h=this.length;hthis.length)===l||e.$$is_boolean&&1!=e||(this.length=g);if(!1!==b&&b!==l)for(;ma&&this.$raise(r.get("ArgumentError"), "negative array size");return this.slice(0,a)});a.defn(t,"$flatten",function(a){function e(a,h){var g=[],d,m,c,v;a=a.$to_a();d=0;for(m=a.length;de&&(e=0);for(var b=Array(e),h=0;ha&&(a+=this.length+1,0>a&&this.$raise(r.get("IndexError"),""+a+" is out of bounds"));if(a>this.length)for(e=this.length;ea&&this.$raise(r.get("ArgumentError"),"negative array size");a>this.length&&(a=this.length);return this.slice(this.length-a,this.length)});a.defn(t,"$length",function(){return this.length});a.alias(t,"map", "collect");a.alias(t,"map!","collect!");a.defn(t,"$permutation",L=function(e){var b,h,g,d=this,m=L.$$p||l,c=l,v=l;L.$$p=null;if(m===l)return(b=(h=d).$enum_for,b.$$p=(g=function(){return(g.$$s||this).$size()},g.$$s=d,g),b).call(h,"permutation",e);var B,u;e=void 0===e?d.length:r.get("Opal").$coerce_to(e,r.get("Integer"),"to_int");if(!(0>e||d.lengtha)===l||e.$$is_boolean&& 1!=e||this.$raise(r.get("ArgumentError"),"negative array size");return(e=0===this.length)===l||e.$$is_boolean&&1!=e?(e=a>this.length)===l||e.$$is_boolean&&1!=e?this.splice(this.length-a,this.length):this.splice(0,this.length):[]});a.defn(t,"$product",F=function(){var e,b=F.$$p||l,h=arguments.length-0;0>h&&(h=0);for(var g=Array(h),d=0;d--g)break a;m[g]++}}return h||this});a.defn(t,"$push",function(){var a=arguments.length-0;0>a&&(a=0);for(var e=Array(a),b=0;b=this.length);b--){if(this[b]["$=="](a))return b}else if(e!==l)for(b= this.length-1;0<=b&&!(b>=this.length);b--){if((a=e(this[b]))===f)return f.$v;if(!1!==a&&a!==l)return b}else if(null==a)return this.$enum_for("rindex");return l});a.defn(t,"$rotate",function(a){null==a&&(a=1);a=r.get("Opal").$coerce_to(a,r.get("Integer"),"to_int");var e,b;if(1===this.length)return this.slice();if(0===this.length)return[];e=this.slice();b=a%e.length;a=e.slice(b);e=e.slice(0,b);return a.concat(e)});a.defn(t,"$rotate!",function(a){var e=l;null==a&&(a=1);if(0===this.length||1===this.length)return this; a=r.get("Opal").$coerce_to(a,r.get("Integer"),"to_int");e=this.$rotate(a);return this.$replace(e)});(function(e,$super){function b(){}var h=b=k(e,$super,"SampleRandom",b),g=h.$$scope;h.$$proto.rng=l;a.defn(h,"$initialize",function(a){return this.rng=a});return(a.defn(h,"$rand",function(a){var e,b=l,b=g.get("Opal").$coerce_to(this.rng.$rand(a),g.get("Integer"),"to_int");(e=0>b)===l||e.$$is_boolean&&1!=e||this.$raise(g.get("RangeError"),"random value must be >= 0");((e=ba:a)===l||b.$$is_boolean&&1!=b||this.$raise(r.get("ArgumentError"),"count must be greater than 0");!1!==e&&e!==l&&(g=e["$[]"]("random"));g=(b=!1!==g&&g!==l?g["$respond_to?"]("rand"):g)===l||b.$$is_boolean&&1!=b?r.get("Kernel"):r.get("SampleRandom").$new(g);if(!1===a||a===l)return this[g.$rand(this.length)];var d,m,c,v;a>this.length&&(a=this.length);switch(a){case 0:return[];case 1:return[this[g.$rand(this.length)]]; case 2:return m=g.$rand(this.length),c=g.$rand(this.length),m===c&&(c=0===m?m+1:m-1),[this[m],this[c]];default:if(3a)===l||e.$$is_boolean&&1!=e||this.$raise(r.get("ArgumentError"),"negative array size");return(e=0===this.length)===l||e.$$is_boolean&&1!=e?this.splice(0,a):[]});a.alias(t,"size","length");a.defn(t, "$shuffle",function(a){return this.$dup()["$shuffle!"](a)});a.defn(t,"$shuffle!",function(a){var e,b=this.length,h;void 0!==a&&(a=r.get("Opal")["$coerce_to?"](a,r.get("Hash"),"to_hash"),a!==l&&(a=a["$[]"]("random"),a!==l&&a["$respond_to?"]("rand")&&(e=a)));for(;b;)e?(a=e.$rand(b).$to_int(),0>a&&this.$raise(r.get("RangeError"),"random number too small "+a),a>=b&&this.$raise(r.get("RangeError"),"random number too big "+a)):a=Math.floor(Math.random()*b),h=this[--b],this[b]=this[a],this[a]=h;return this}); a.alias(t,"slice","[]");a.defn(t,"$slice!",function(a,e){0>a&&(a+=this.length);return null!=e?this.splice(a,e):0>a||a>=this.length?l:this.splice(a,1)[0]});a.defn(t,"$sort",J=function(){var a,e=this,b=J.$$p||l;J.$$p=null;if((a=1"](e)});try{return e.slice().sort(function(a,h){var g=b(a,h);if(g===f)throw f;g===l&&e.$raise(r.get("ArgumentError"),"comparison of "+a.$inspect()+" with "+h.$inspect()+" failed");return n(g, 0)?1:("number"===typeof g?0>g:g["$<"](0))?-1:0})}catch(h){if(h===f)return f.$v;throw h;}});a.defn(t,"$sort!",Q=function(){var a,e,b=Q.$$p||l;Q.$$p=null;b=b!==l?(a=(e=this.slice()).$sort,a.$$p=b.$to_proc(),a).call(e):this.slice().$sort();a=this.length=0;for(e=b.length;aa&&this.$raise(r.get("ArgumentError"));return this.slice(0,a)});a.defn(t,"$take_while",K=function(){var a=K.$$p||l;K.$$p=null;for(var e=[],b=0,h=this.length,g,d;ba&&(a=0);for(var e=Array(a),b=0;bh&&(h=0);for(var g=Array(h),d=0;dv)return v+=h.length, l;0>c&&(c+=h.length);a["$exclude_end?"]()&&c--;return cb&&(b=0);for(var h=Array(b),g=0;ga&&(a=0);for(var e=Array(a),b=0;be&&(e=0);for(var b=Array(e),h=0;h"+c.$inspect());return"{"+b.join(", ")+"}"}finally{a&&(M=void 0)}});a.defn(b,"$invert",function(){for(var e=a.hash(),b=0,h=this.keys,g=h.length,m,c;bb:a["$>"](b)}function q(a,b){return"number"===typeof a&&"number"===typeof b?a $** $new $< $to_f $== $nan? $infinite? $enum_for $+ $- $gcd $lcm $/ $frexp $to_i $ldexp $rationalize $* $<< $to_r $-@ $size $<= $>=".split(" "));c.$require("corelib/numeric");(function(c,$super){function r(){}var g=r=y(c,$super,"Number",r),m=g.$$scope,u,A,z,h,e,w,E,C,M,I;m.get("Opal").$bridge(g,Number);Number.prototype.$$is_number= !0;a.defn(g,"$coerce",function(a){if(a!==b){if(a.$$is_string)return[this.$Float(a),this];if(a["$respond_to?"]("to_f"))return[m.get("Opal")["$coerce_to!"](a,m.get("Float"),"to_f"),this];if(a.$$is_number)return[a,this]}this.$raise(m.get("TypeError"),"can't convert "+a.$class()+" into Float")});a.defn(g,"$__id__",function(){return 2*this+1});a.alias(g,"object_id","__id__");a.defn(g,"$+",function(a){return a.$$is_number?this+a:this.$__coerced__("+",a)});a.defn(g,"$-",function(a){return a.$$is_number? this-a:this.$__coerced__("-",a)});a.defn(g,"$*",function(a){return a.$$is_number?this*a:this.$__coerced__("*",a)});a.defn(g,"$/",function(a){return a.$$is_number?this/a:this.$__coerced__("/",a)});a.alias(g,"fdiv","/");a.defn(g,"$%",function(a){if(a.$$is_number){if(-Infinity==a)return a;if(0==a)this.$raise(m.get("ZeroDivisionError"),"divided by 0");else return 0>a||0>this?(this%a+a)%a:this%a}else return this.$__coerced__("%",a)});a.defn(g,"$&",function(a){return a.$$is_number?this&a:this.$__coerced__("&", a)});a.defn(g,"$|",function(a){return a.$$is_number?this|a:this.$__coerced__("|",a)});a.defn(g,"$^",function(a){return a.$$is_number?this^a:this.$__coerced__("^",a)});a.defn(g,"$<",function(a){return a.$$is_number?this",function(a){return a.$$is_number?this>a:this.$__coerced__(">",a)});a.defn(g,"$>=",function(a){return a.$$is_number?this>=a:this.$__coerced__(">=",a)});a.defn(g, "$<=>",function(e){try{return e.$$is_number?isNaN(this)||isNaN(e)?b:this>e?1:this",e)}catch(h){if(a.rescue(h,[m.get("ArgumentError")]))try{return b}finally{a.gvars["!"]=a.exceptions.pop()||a.nil}else throw h;}});a.defn(g,"$<<",function(a){a=m.get("Opal")["$coerce_to!"](a,m.get("Integer"),"to_int");return 0>-a});a.defn(g,"$>>",function(a){a=m.get("Opal")["$coerce_to!"](a,m.get("Integer"),"to_int");return 0>a:this<<-a});a.defn(g,"$[]",function(a){a= m.get("Opal")["$coerce_to!"](a,m.get("Integer"),"to_int");return am.get("Integer").$$scope.get("MAX")?0:0>this?(~this+1>>a)%2:(this>>a)%2});a.defn(g,"$+@",function(){return+this});a.defn(g,"$-@",function(){return-this});a.defn(g,"$~",function(){return~this});a.defn(g,"$**",function(a){var e,h,g;return(e=m.get("Integer")["$==="](a))===b||e.$$is_boolean&&1!=e?(e=q(this,0)?!1!==(g=m.get("Float")["$==="](a))&&g!==b?g:m.get("Rational")["$==="](a):q(this,0))===b|| e.$$is_boolean&&1!=e?(e=null!=a.$$is_number)===b||e.$$is_boolean&&1!=e?this.$__coerced__("**",a):Math.pow(this,a):m.get("Complex").$new(this,0)["$**"](a.$to_f()):(e=!1!==(h=m.get("Integer")["$==="](this)["$!"]())&&h!==b?h:n(a,0))===b||e.$$is_boolean&&1!=e?m.get("Rational").$new(this,1)["$**"](a):Math.pow(this,a)});a.defn(g,"$==",function(a){return a.$$is_number?this==Number(a):a["$respond_to?"]("==")?a["$=="](this):!1});a.defn(g,"$abs",function(){return Math.abs(this)});a.defn(g,"$abs2",function(){return Math.abs(this* this)});a.defn(g,"$angle",function(){var a;return(a=this["$nan?"]())===b||a.$$is_boolean&&1!=a?0==this?0<1/this?0:Math.PI:0>this?Math.PI:0:this});a.alias(g,"arg","angle");a.alias(g,"phase","angle");a.defn(g,"$bit_length",function(){var a;((a=m.get("Integer")["$==="](this))===b||a.$$is_boolean&&1!=a)&&this.$raise(m.get("NoMethodError").$new("undefined method `bit_length` for "+this+":Float","bit_length"));if(0===this||-1===this)return 0;a=0;for(var e=0>this?~this:this;0!=e;)a+=1,e>>>=1;return a}); a.defn(g,"$ceil",function(){return Math.ceil(this)});a.defn(g,"$chr",function(a){return String.fromCharCode(this)});a.defn(g,"$denominator",u=function(){var e=x.call(arguments,0),h,g,m=u.$$p;u.$$p=null;return(h=!1!==(g=this["$nan?"]())&&g!==b?g:this["$infinite?"]())===b||h.$$is_boolean&&1!=h?a.find_super_dispatcher(this,"denominator",u,m).apply(this,e):1});a.defn(g,"$downto",A=function(a){var e,h,g=A.$$p||b;A.$$p=null;if(g===b)return(e=this.$enum_for,e.$$p=(h=function(){var e=h.$$s||this,g;((g=m.get("Numeric")["$==="](a))=== b||g.$$is_boolean&&1!=g)&&e.$raise(m.get("ArgumentError"),"comparison of "+e.$class()+" with "+a.$class()+" failed");return n(a,e)?0:l(f(e,a),1)},h.$$s=this,h),e).call(this,"downto",a);a.$$is_number||this.$raise(m.get("ArgumentError"),"comparison of "+this.$class()+" with "+a.$class()+" failed");for(e=this;e>=a;e--)if(g(e)===D)return D.$v;return this});a.alias(g,"eql?","==");a.defn(g,"$equal?",function(a){var e;return!1!==(e=this["$=="](a))&&e!==b?e:isNaN(this)&&isNaN(a)});a.defn(g,"$even?",function(){return 0=== this%2});a.defn(g,"$floor",function(){return Math.floor(this)});a.defn(g,"$gcd",function(a){var e;((e=m.get("Integer")["$==="](a))===b||e.$$is_boolean&&1!=e)&&this.$raise(m.get("TypeError"),"not an integer");e=Math.abs(this);for(a=Math.abs(a);0=e:e["$<="](0))(h=this["$nan?"]())===b||h.$$is_boolean&&1!=h?(h=this["$infinite?"]())===b||h.$$is_boolean&&1!=h||this.$raise(m.get("FloatDomainError"),"Infinity"):this.$raise(m.get("RangeError"),"NaN");else{if(e["$=="](0))return Math.round(this);if((h=!1!==(g=this["$nan?"]())&&g!==b?g:this["$infinite?"]())!==b&&(!h.$$is_boolean||1==h))return this}h=a.to_ary(m.get("Math").$frexp(this));var d=null==h[1]?b:h[1],c=f(l(m.get("Float").$$scope.get("DIG"),2),n(d,0)?k(d, 4):f(k(d,3),1));return("number"===typeof e&&"number"===typeof c?e>=c:e["$>="](c))?this:q(e,(n(d,0)?l(k(d,3),1):k(d,4))["$-@"]())?0:Math.round(this*Math.pow(10,e))/Math.pow(10,e)}if((h=null==e)!==b&&(!h.$$is_boolean||1==h))return this;(h=(g=m.get("Float")["$==="](e),!1!==g&&g!==b?e["$infinite?"]():g))===b||h.$$is_boolean&&1!=h||this.$raise(m.get("RangeError"),"Infinity");e=m.get("Opal")["$coerce_to!"](e,m.get("Integer"),"to_int");q(e,m.get("Integer").$$scope.get("MIN"))&&this.$raise(m.get("RangeError"), "out of bounds");if((h=0<=e)!==b&&(!h.$$is_boolean||1==h))return this;e=e["$-@"]();if(.415241*e-.125>this.$size())return 0;e=Math.pow(10,e);c=Math.floor((Math.abs(c)+e/2)/e)*e;return 0>this?-c:c});a.defn(g,"$step",E=function(a,e){var h,g=E.$$p||b;null==e&&(e=1);E.$$p=null;if(!1===g||g===b)return this.$enum_for("step",a,e);(h=0==e)===b||h.$$is_boolean&&1!=h||this.$raise(m.get("ArgumentError"),"step cannot be 0");h=this;if(Infinity===a||-Infinity===a)return g(h),this;if(0= a;)g(h),h+=e;return this});a.alias(g,"succ","next");a.defn(g,"$times",C=function(){var a=C.$$p||b;C.$$p=null;if(!1===a||a===b)return this.$enum_for("times");for(var e=0;e1/this}),b)&&"negative?"})(a.base,a.get("Numeric"));a.cdecl(a,"Fixnum",a.get("Number"));(function(b,$super){function d(){}var g=d=y(b,$super,"Integer",d),m=g.$$scope;a.defs(g,"$===",function(a){return a.$$is_number? 0===a%1:!1});a.cdecl(m,"MAX",Math.pow(2,30)-1);return a.cdecl(m,"MIN",-Math.pow(2,30))})(a.base,a.get("Numeric"));return function(d,$super){function c(){}var g=c=y(d,$super,"Float",c),m=g.$$scope,u;a.defs(g,"$===",function(a){return!!a.$$is_number});a.cdecl(m,"INFINITY",Infinity);a.cdecl(m,"MAX",Number.MAX_VALUE);a.cdecl(m,"MIN",Number.MIN_VALUE);a.cdecl(m,"NAN",NaN);a.cdecl(m,"DIG",15);a.cdecl(m,"MANT_DIG",53);a.cdecl(m,"RADIX",2);return(u="undefined"!==typeof Number.EPSILON)===b||u.$$is_boolean&& 1!=u?a.cdecl(m,"EPSILON",2.220446049250313E-16):a.cdecl(m,"EPSILON",Number.EPSILON)}(a.base,a.get("Numeric"))}; Opal.modules["corelib/range"]=function(a){function n(a,d){return"number"===typeof a&&"number"===typeof d?a<=d:a["$<="](d)}function q(a,d){return"number"===typeof a&&"number"===typeof d?a $raise $include? $<= $< $enum_for $succ $! $== $=== $exclude_end? $eql? $begin $end $- $abs $to_i $inspect".split(" "));l.$require("corelib/enumerable");return function(b, $super){function l(){}var y=l=c(b,$super,"Range",l),t=y.$$proto,p=y.$$scope,r,g,m;t.begin=t.exclude=t.end=f;y.$include(p.get("Enumerable"));t.$$is_range=!0;y.$attr_reader("begin","end");a.defn(y,"$initialize",function(a,b,g){var h;null==g&&(g=!1);((h=a["$<=>"](b))===f||h.$$is_boolean&&1!=h)&&this.$raise(p.get("ArgumentError"));this.begin=a;this.end=b;return this.exclude=g});a.defn(y,"$==",function(a){return a.$$is_range?this.exclude===a.exclude&&this.begin==a.begin&&this.end==a.end:!1});a.defn(y, "$===",function(a){return this["$include?"](a)});a.defn(y,"$cover?",function(a){var b;return n(this.begin,a)?(b=this.exclude)===f||b.$$is_boolean&&1!=b?n(a,this.end):q(a,this.end):n(this.begin,a)});a.defn(y,"$each",r=function(){var b,g,d=r.$$p||f,h=f,e=f;r.$$p=null;if(d===f)return this.$enum_for("each");h=this.begin;for(e=this.end;q(h,e);){if(a.yield1(d,h)===k)return k.$v;h=h.$succ()}return(b=(g=this.exclude["$!"](),!1!==g&&g!==f?h["$=="](e):g))===f||b.$$is_boolean&&1!=b||a.yield1(d,h)!==k?this:k.$v}); a.defn(y,"$eql?",function(a){var b,g;return(b=p.get("Range")["$==="](a))===f||b.$$is_boolean&&1!=b?!1:(b=(g=this.exclude["$==="](a["$exclude_end?"]()),!1!==g&&g!==f?this.begin["$eql?"](a.$begin()):g),!1!==b&&b!==f?this.end["$eql?"](a.$end()):b)});a.defn(y,"$exclude_end?",function(){return this.exclude});a.alias(y,"first","begin");a.alias(y,"include?","cover?");a.alias(y,"last","end");a.defn(y,"$max",g=function(){var b=d.call(arguments,0),m=g.$$p,c=m||f;g.$$p=null;return c!==f?a.find_super_dispatcher(this, "max",g,m).apply(this,b):this.exclude?this.end-1:this.end});a.alias(y,"member?","cover?");a.defn(y,"$min",m=function(){var b=d.call(arguments,0),g=m.$$p,c=g||f;m.$$p=null;return c!==f?a.find_super_dispatcher(this,"min",m,g).apply(this,b):this.begin});a.alias(y,"member?","include?");a.defn(y,"$size",function(){var a,b,g=f,h=f,e=f,g=this.begin,h=this.end;(a=this.exclude)===f||a.$$is_boolean&&1!=a||(h="number"===typeof h?h-1:h["$-"](1));if((a=(b=p.get("Numeric")["$==="](g),!1!==b&&b!==f?p.get("Numeric")["$==="](h): b))===f||a.$$is_boolean&&1!=a)return f;if(q(h,g))return 0;e=p.get("Float").$$scope.get("INFINITY");return(a=!1!==(b=e["$=="](g.$abs()))&&b!==f?b:h.$abs()["$=="](e))===f||a.$$is_boolean&&1!=a?(Math.abs(h-g)+1).$to_i():e});a.defn(y,"$step",function(a){return this.$raise(p.get("NotImplementedError"))});a.defn(y,"$to_s",function(){return this.begin.$inspect()+(this.exclude?"...":"..")+this.end.$inspect()});return a.alias(y,"inspect","to_s")}(a.base,null)}; Opal.modules["corelib/proc"]=function(a){a.dynamic_require_severity="warning";var n=a.nil,q=a.breaker,l=a.slice,f=a.klass;a.add_stubs(["$raise","$coerce_to!"]);return function(k,$super){function c(){}var b=c=f(k,$super,"Proc",c),D=b.$$proto,x=b.$$scope,y,t;D.$$is_proc=!0;D.$$is_lambda=!1;a.defs(b,"$new",y=function(){var a=y.$$p||n;y.$$p=null;!1!==a&&a!==n||this.$raise(x.get("ArgumentError"),"tried to create a Proc object without a block");return a});a.defn(b,"$call",t=function(){var b=t.$$p||n,c= arguments.length-0;0>c&&(c=0);for(var g=Array(c),m=0;ma&&g.$$is_lambda&&!g.$$is_curried&&g.$raise(x.get("ArgumentError"),"wrong number of arguments ("+c+" for "+a+")");if(c>=a)return g.$call.apply(g,m);c=function(){return b.apply(null,m.concat(l.call(arguments)))};c.$$is_lambda=g.$$is_lambda; c.$$is_curried=!0;return c}var g=this;void 0===a?a=g.length:(a=x.get("Opal")["$coerce_to!"](a,x.get("Integer"),"to_int"),g.$$is_lambda&&a!==g.length&&g.$raise(x.get("ArgumentError"),"wrong number of arguments ("+a+" for "+g.length+")"));b.$$is_lambda=g.$$is_lambda;b.$$is_curried=!0;return b});a.defn(b,"$dup",function(){var a=this.$$original_proc||this,b=function(){return a.apply(this,arguments)},g;for(g in this)this.hasOwnProperty(g)&&(b[g]=this[g]);return b});return a.alias(b,"clone","dup")}(a.base, Function)}; Opal.modules["corelib/method"]=function(a){a.dynamic_require_severity="warning";var n=a.nil,q=a.slice,l=a.klass;a.add_stubs(["$attr_reader","$class","$arity","$new","$name"]);(function(f,$super){function d(){}var c=d=l(f,$super,"Method",d),b=c.$$proto,D=c.$$scope,x;b.method=b.receiver=b.owner=b.name=n;c.$attr_reader("owner","receiver","name");a.defn(c,"$initialize",function(a,b,d){this.receiver=a;this.owner=a.$class();this.name=d;return this.method=b});a.defn(c,"$arity",function(){return this.method.$arity()});a.defn(c, "$call",x=function(){var a=x.$$p||n,b=arguments.length-0;0>b&&(b=0);for(var d=Array(b),c=0;c"}),n)&&"inspect"})(a.base,null);return function(f,$super){function d(){}var c=d=l(f,$super,"UnboundMethod",d),b=c.$$proto,q=c.$$scope;b.method=b.name=b.owner=n;c.$attr_reader("owner","name");a.defn(c,"$initialize",function(a,b,d){this.owner=a;this.method=b;return this.name=d});a.defn(c,"$arity",function(){return this.method.$arity()});a.defn(c,"$bind",function(a){return q.get("Method").$new(a,this.method,this.name)});return(a.defn(c,"$inspect",function(){return"#"}),n)&&"inspect"}(a.base,null)};Opal.modules["corelib/variables"]=function(a){a.dynamic_require_severity="warning";var n=a.nil,q=a.gvars,l=a.hash2;a.add_stubs(["$new"]);q["&"]=q["~"]=q["`"]=q["'"]=n;q.LOADED_FEATURES=q['"']=a.loaded_features;q.LOAD_PATH=q[":"]=[];q["/"]="\n";q[","]=n;a.cdecl(a,"ARGV",[]);a.cdecl(a,"ARGF",a.get("Object").$new());a.cdecl(a,"ENV",l([],{}));q.VERBOSE=!1;q.DEBUG=!1;return q.SAFE=0}; Opal.modules["opal/mini"]=function(a){a.dynamic_require_severity="warning";var n=a.top;a.add_stubs(["$require"]);n.$require("opal/base");n.$require("corelib/nil");n.$require("corelib/boolean");n.$require("corelib/string");n.$require("corelib/comparable");n.$require("corelib/enumerable");n.$require("corelib/enumerator");n.$require("corelib/array");n.$require("corelib/hash");n.$require("corelib/number");n.$require("corelib/range");n.$require("corelib/proc");n.$require("corelib/method");n.$require("corelib/regexp"); return n.$require("corelib/variables")}; Opal.modules["corelib/array/inheritance"]=function(a){a.dynamic_require_severity="warning";var n=a.nil,q=a.slice,l=a.klass;a.add_stubs("$new $allocate $initialize $to_proc $__send__ $clone $respond_to? $== $eql? $inspect $hash $* $class $slice $uniq $flatten $- $+".split(" "));(function(f,$super){function d(){}var c=d=l(f,$super,"Array",d),b=c.$$scope;return(a.defs(c,"$inherited",function(a){var d=n,d=b.get("Class").$new(b.get("Array").$$scope.get("Wrapper"));a.$$proto=d.$$proto;a.$$proto.$$class= a;a.$$alloc=d.$$alloc;a.$$parent=b.get("Array").$$scope.get("Wrapper");a.$allocate=d.$allocate;a.$new=d.$new;a["$[]"]=d["$[]"]}),n)&&"inherited"})(a.base,null);return function(f,$super){function d(){}var c=d=l(f,$super,"Wrapper",d),b=c.$$proto,D=c.$$scope,x,y,t,p,r;b.literal=n;b.$$is_array=!0;a.defs(c,"$allocate",x=function(b){var m=n;null==b&&(b=[]);x.$$p=null;m=a.find_super_dispatcher(this,"allocate",x,null,d).apply(this,[]);m.literal=b;return m});a.defs(c,"$new",y=function(){var b,d,c=y.$$p||n, f=n,f=arguments.length-0;0>f&&(f=0);for(var z=Array(f),h=0;ha&&(a=0);for(var b=Array(a),d=0;df&&(f=0);for(var z=Array(f),h=0;hf&&(f=0);for(var z=Array(f),h=0;hh&&(h=0);for(var e=Array(h),m=0;ma&&(a=0);for(var b=Array(a),g=0;gh&&(h=0);for(var e=Array(h),m=0;m"});a.defn(c,"$each_byte",function(){return this.$raise(k.get("NotImplementedError"))});a.defn(c,"$getbyte",function(){return this.$raise(k.get("NotImplementedError"))});a.defn(c,"$bytesize",function(){return this.$raise(k.get("NotImplementedError"))});(function(a,$super){function b(){}b=t(a,$super,"EncodingError",b);return x})(k.base,k.get("StandardError"));return function(a,$super){function b(){}b=t(a,$super,"CompatibilityError", b);return x}(k.base,k.get("EncodingError"))})(a.base,null);(q=(l=a.get("Encoding")).$register,q.$$p=(f=function(){var b=f.$$s||this,g;a.def(b,"$each_byte",g=function(b){var d,c=g.$$p||x;g.$$p=null;for(var f=0,h=b.length;f=e)(d=a.yield1(c,e))===y?y.$v:d;else for(var e=encodeURIComponent(b.charAt(f)).substr(1).split("%"),w=0,k=e.length;w>8))===y?y.$v:d}});return(a.def(b,"$bytesize",function(){return this.$bytes().$length()}),x)&&"bytesize"},d.$$s=D,d),q).call(k,"UTF-16LE");(q=(c=a.get("Encoding")).$register, q.$$p=(b=function(){var d=b.$$s||this,g;a.def(d,"$each_byte",g=function(b){var d,c=g.$$p||x;g.$$p=null;for(var f=0,h=b.length;fc&&(c=0);for(var b=Array(c),k=0;ka)return-Math.cbrt(-a);for(var c=a,b=0;.125>c;)c*=8,b--;for(;1b;)c*=.5,b++;for(;0a&&(c=-1);a=Math.abs(a);var b=1/(1+.3275911*a);return c*(1-((((1.061405429*b+-1.453152027)*b+1.421413741)*b+-.284496736)*b+.254829592)*b*Math.exp(-a*a))};a.defn(l,"$erf",function(a){return f.get("Math").$checked("erf",f.get("Math")["$float!"](a))});if((k="undefined"!==typeof Math.erfc)===n||k.$$is_boolean&&1!=k)Math.erfc=function(a){var c=Math.abs(a),b=1/(.5*c+1),c=b*Math.exp(-c*c-1.26551223+b*(b*(b*(b*(b* (b*(b*(b*(.17087277*b+-.82215223)+1.48851587)+-1.13520398)+.27886807)+-.18628806)+.09678418)+.37409196)+1.00002368));return 0>a?2-c:c};a.defn(l,"$erfc",function(a){return f.get("Math").$checked("erfc",f.get("Math")["$float!"](a))});a.defn(l,"$exp",function(a){return f.get("Math").$checked("exp",f.get("Math")["$float!"](a))});a.defn(l,"$frexp",function(a){a=f.get("Math")["$float!"](a);if(isNaN(a))return[NaN,0];var c=Math.floor(Math.log(Math.abs(a))/Math.log(2))+1;return[a/Math.pow(2,c),c]});a.defn(l, "$gamma",function(a){a=f.get("Math")["$float!"](a);var c,b,k,l;k=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3.399464998481189E-5,4.652362892704858E-5,-9.837447530487956E-5,1.580887032249125E-4,-2.1026444172410488E-4,2.1743961811521265E-4,-1.643181065367639E-4,8.441822398385275E-5,-2.6190838401581408E-5,3.6899182659531625E-6];if(isNaN(a))return NaN;if(0===a&&0>1/a)return-Infinity;-1!==a&&-Infinity!==a||this.$raise(f.get("DomainError"),'Numerical argument is out of domain - "gamma"'); if(f.get("Integer")["$==="](a)){if(0>=a)return isFinite(a)?Infinity:NaN;if(171a)return Math.PI/(Math.sin(Math.PI*a)*f.get("Math").$gamma("number"===typeof a?1-a:1["$-"](a)));if(171.35<=a)return Infinity;if(85f.get("Math").$gamma(a)?-1:1]});a.defn(l,"$log",function(a,c){var b;(b=f.get("String")["$==="](a))===n||b.$$is_boolean&&1!=b||this.$raise(f.get("Opal").$type_error(a,f.get("Float")));if((b=null==c)===n||b.$$is_boolean&&1!=b){(b=f.get("String")["$==="](c))===n||b.$$is_boolean&&1!=b||this.$raise(f.get("Opal").$type_error(c,f.get("Float")));b=f.get("Math").$checked("log",f.get("Math")["$float!"](a)); var k=f.get("Math").$checked("log",f.get("Math")["$float!"](c));return"number"===typeof b&&"number"===typeof k?b/k:b["$/"](k)}return f.get("Math").$checked("log",f.get("Math")["$float!"](a))});if((k="undefined"!==typeof Math.log10)===n||k.$$is_boolean&&1!=k)Math.log10=function(a){return Math.log(a)/Math.LN10};a.defn(l,"$log10",function(a){var c;(c=f.get("String")["$==="](a))===n||c.$$is_boolean&&1!=c||this.$raise(f.get("Opal").$type_error(a,f.get("Float")));return f.get("Math").$checked("log10",f.get("Math")["$float!"](a))}); if((k="undefined"!==typeof Math.log2)===n||k.$$is_boolean&&1!=k)Math.log2=function(a){return Math.log(a)/Math.LN2};a.defn(l,"$log2",function(a){var c;(c=f.get("String")["$==="](a))===n||c.$$is_boolean&&1!=c||this.$raise(f.get("Opal").$type_error(a,f.get("Float")));return f.get("Math").$checked("log2",f.get("Math")["$float!"](a))});a.defn(l,"$sin",function(a){return f.get("Math").$checked("sin",f.get("Math")["$float!"](a))});if((k="undefined"!==typeof Math.sinh)===n||k.$$is_boolean&&1!=k)Math.sinh= function(a){return(Math.exp(a)-Math.exp(-a))/2};a.defn(l,"$sinh",function(a){return f.get("Math").$checked("sinh",f.get("Math")["$float!"](a))});a.defn(l,"$sqrt",function(a){return f.get("Math").$checked("sqrt",f.get("Math")["$float!"](a))});a.defn(l,"$tan",function(a){var c;a=f.get("Math")["$float!"](a);return(c=a["$infinite?"]())===n||c.$$is_boolean&&1!=c?f.get("Math").$checked("tan",f.get("Math")["$float!"](a)):f.get("Float").$$scope.get("NAN")});if((k="undefined"!==typeof Math.tanh)===n||k.$$is_boolean&& 1!=k)Math.tanh=function(a){return Infinity==a?1:-Infinity==a?-1:(Math.exp(a)-Math.exp(-a))/(Math.exp(a)+Math.exp(-a))};a.defn(l,"$tanh",function(a){return f.get("Math").$checked("tanh",f.get("Math")["$float!"](a))})}(a.base)}; Opal.modules["corelib/complex"]=function(a){function n(a,b){return"number"===typeof a&&"number"===typeof b?a*b:a["$*"](b)}function q(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}function l(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}function f(a,b){return"number"===typeof a&&"number"===typeof b?a/b:a["$/"](b)}a.dynamic_require_severity="warning";var k=a.top,d=a.nil,c=a.klass,b=a.module;a.add_stubs("$require $=== $real? $raise $new $* $cos $sin $attr_reader $class $== $real $imag $Complex $-@ $+ $__coerced__ $- $nan? $/ $conj $abs2 $quo $polar $exp $log $> $!= $divmod $** $hypot $atan2 $lcm $denominator $to_s $numerator $abs $arg $rationalize $to_f $to_i $to_r $inspect $positive? $infinite?".split(" ")); k.$require("corelib/numeric");(function(b,$super){function k(){}var t=k=c(b,$super,"Complex",k),p=t.$$proto,r=t.$$scope;p.real=p.imag=d;a.defs(t,"$rect",function(a,b){var c,f,k,h;null==b&&(b=0);((c=(f=(k=(h=r.get("Numeric")["$==="](a),!1!==h&&h!==d?a["$real?"]():h),!1!==k&&k!==d?r.get("Numeric")["$==="](b):k),!1!==f&&f!==d?b["$real?"]():f))===d||c.$$is_boolean&&1!=c)&&this.$raise(r.get("TypeError"),"not a real");return this.$new(a,b)});(function(b){return a.alias(b,"rectangular","rect")})(a.get_singleton_class(t)); a.defs(t,"$polar",function(a,b){var c,f,k,h;null==b&&(b=0);((c=(f=(k=(h=r.get("Numeric")["$==="](a),!1!==h&&h!==d?a["$real?"]():h),!1!==k&&k!==d?r.get("Numeric")["$==="](b):k),!1!==f&&f!==d?b["$real?"]():f))===d||c.$$is_boolean&&1!=c)&&this.$raise(r.get("TypeError"),"not a real");return this.$new(n(a,r.get("Math").$cos(b)),n(a,r.get("Math").$sin(b)))});t.$attr_reader("real","imag");a.defn(t,"$initialize",function(a,b){null==b&&(b=0);this.real=a;return this.imag=b});a.defn(t,"$coerce",function(a){var b, c;return(b=r.get("Complex")["$==="](a))===d||b.$$is_boolean&&1!=b?(b=(c=r.get("Numeric")["$==="](a),!1!==c&&c!==d?a["$real?"]():c))===d||b.$$is_boolean&&1!=b?this.$raise(r.get("TypeError"),""+a.$class()+" can't be coerced into Complex"):[r.get("Complex").$new(a,0),this]:[a,this]});a.defn(t,"$==",function(a){var b,c;return(b=r.get("Complex")["$==="](a))===d||b.$$is_boolean&&1!=b?(b=(c=r.get("Numeric")["$==="](a),!1!==c&&c!==d?a["$real?"]():c))===d||b.$$is_boolean&&1!=b?a["$=="](this):this.real["$=="](a)? this.imag["$=="](0):this.real["$=="](a):this.real["$=="](a.$real())?this.imag["$=="](a.$imag()):this.real["$=="](a.$real())});a.defn(t,"$-@",function(){return this.$Complex(this.real["$-@"](),this.imag["$-@"]())});a.defn(t,"$+",function(a){var b,c;return(b=r.get("Complex")["$==="](a))===d||b.$$is_boolean&&1!=b?(b=(c=r.get("Numeric")["$==="](a),!1!==c&&c!==d?a["$real?"]():c))===d||b.$$is_boolean&&1!=b?this.$__coerced__("+",a):this.$Complex(q(this.real,a),this.imag):this.$Complex(q(this.real,a.$real()), q(this.imag,a.$imag()))});a.defn(t,"$-",function(a){var b,c;return(b=r.get("Complex")["$==="](a))===d||b.$$is_boolean&&1!=b?(b=(c=r.get("Numeric")["$==="](a),!1!==c&&c!==d?a["$real?"]():c))===d||b.$$is_boolean&&1!=b?this.$__coerced__("-",a):this.$Complex(l(this.real,a),this.imag):this.$Complex(l(this.real,a.$real()),l(this.imag,a.$imag()))});a.defn(t,"$*",function(a){var b,c;return(b=r.get("Complex")["$==="](a))===d||b.$$is_boolean&&1!=b?(b=(c=r.get("Numeric")["$==="](a),!1!==c&&c!==d?a["$real?"](): c))===d||b.$$is_boolean&&1!=b?this.$__coerced__("*",a):this.$Complex(n(this.real,a),n(this.imag,a)):this.$Complex(l(n(this.real,a.$real()),n(this.imag,a.$imag())),q(n(this.real,a.$imag()),n(this.imag,a.$real())))});a.defn(t,"$/",function(a){var b,c,k,l,h;return(b=r.get("Complex")["$==="](a))===d||b.$$is_boolean&&1!=b?(b=(c=r.get("Numeric")["$==="](a),!1!==c&&c!==d?a["$real?"]():c))===d||b.$$is_boolean&&1!=b?this.$__coerced__("/",a):this.$Complex(this.real.$quo(a),this.imag.$quo(a)):(b=!1!==(c=!1!== (k=!1!==(l=(h=r.get("Number")["$==="](this.real),!1!==h&&h!==d?this.real["$nan?"]():h))&&l!==d?l:(h=r.get("Number")["$==="](this.imag),!1!==h&&h!==d?this.imag["$nan?"]():h))&&k!==d?k:(l=r.get("Number")["$==="](a.$real()),!1!==l&&l!==d?a.$real()["$nan?"]():l))&&c!==d?c:(k=r.get("Number")["$==="](a.$imag()),!1!==k&&k!==d?a.$imag()["$nan?"]():k))===d||b.$$is_boolean&&1!=b?f(n(this,a.$conj()),a.$abs2()):r.get("Complex").$new(r.get("Float").$$scope.get("NAN"),r.get("Float").$$scope.get("NAN"))});a.defn(t, "$**",function(b){var c,u,k,p,h=d,e=d,w=d,E=d,C=d,E=w=e=h=C=h=d;if(b["$=="](0))return r.get("Complex").$new(1,0);if((c=r.get("Complex")["$==="](b))===d||c.$$is_boolean&&1!=c){if((c=r.get("Integer")["$==="](b))===d||c.$$is_boolean&&1!=c){if((c=!1!==(u=r.get("Float")["$==="](b))&&u!==d?u:r.get("Rational")["$==="](b))===d||c.$$is_boolean&&1!=c)return this.$__coerced__("**",b);c=a.to_ary(this.$polar());h=null==c[0]?d:c[0];e=null==c[1]?d:c[1];return r.get("Complex").$polar(h["$**"](b),n(e,b))}if("number"=== typeof b?0"](0)){h=C=this;for(e=l(b,1);(u=e["$!="](0))!==d&&(!u.$$is_boolean||1==u);){for(;(k=(p=a.to_ary(e.$divmod(2)),w=null==p[0]?d:p[0],E=null==p[1]?d:p[1],E["$=="](0)))!==d&&(!k.$$is_boolean||1==k);)C=this.$Complex(l(n(C.$real(),C.$real()),n(C.$imag(),C.$imag())),n(n(2,C.$real()),C.$imag())),e=w;h=n(h,C);e=l(e,1)}return h}return f(r.get("Rational").$new(1,1),this)["$**"](b["$-@"]())}c=a.to_ary(this.$polar());h=null==c[0]?d:c[0];e=null==c[1]?d:c[1];w=b.$real();E=b.$imag();C=r.get("Math").$exp(l(n(w, r.get("Math").$log(h)),n(E,e)));h=q(n(e,w),n(E,r.get("Math").$log(h)));return r.get("Complex").$polar(C,h)});a.defn(t,"$abs",function(){return r.get("Math").$hypot(this.real,this.imag)});a.defn(t,"$abs2",function(){return q(n(this.real,this.real),n(this.imag,this.imag))});a.defn(t,"$angle",function(){return r.get("Math").$atan2(this.imag,this.real)});a.alias(t,"arg","angle");a.defn(t,"$conj",function(){return this.$Complex(this.real,this.imag["$-@"]())});a.alias(t,"conjugate","conj");a.defn(t,"$denominator", function(){return this.real.$denominator().$lcm(this.imag.$denominator())});a.alias(t,"divide","/");a.defn(t,"$eql?",function(a){var b,c;return b=(c=r.get("Complex")["$==="](a),!1!==c&&c!==d?this.real.$class()["$=="](this.imag.$class()):c),!1!==b&&b!==d?this["$=="](a):b});a.defn(t,"$fdiv",function(a){var b;((b=r.get("Numeric")["$==="](a))===d||b.$$is_boolean&&1!=b)&&this.$raise(r.get("TypeError"),""+a.$class()+" can't be coerced into Complex");return f(this,a)});a.defn(t,"$hash",function(){return"Complex:"+ this.real+":"+this.imag});a.alias(t,"imaginary","imag");a.defn(t,"$inspect",function(){return"("+this.$to_s()+")"});a.alias(t,"magnitude","abs");a.defn(t,"$numerator",function(){var a=d,a=this.$denominator();return this.$Complex(n(this.real.$numerator(),f(a,this.real.$denominator())),n(this.imag.$numerator(),f(a,this.imag.$denominator())))});a.alias(t,"phase","arg");a.defn(t,"$polar",function(){return[this.$abs(),this.$arg()]});a.alias(t,"quo","/");a.defn(t,"$rationalize",function(a){var b;1 $- $* $__coerced__ $+ $Rational $> $** $abs $ceil $with_precision $floor $to_s $<= $truncate $send $convert".split(" "));d.$require("corelib/numeric");(function(d,$super){function t(){}var p=t=b(d,$super,"Rational",t),r=p.$$proto,g=p.$$scope;r.num=r.den=c;a.defs(p,"$reduce",function(a,b){var d=c;a=a.$to_i();b=b.$to_i();if(b["$=="](0))this.$raise(g.get("ZeroDivisionError"), "divided by 0");else if(n(b,0))a=a["$-@"](),b=b["$-@"]();else if(b["$=="](1))return this.$new(a,b);d=a.$gcd(b);return this.$new(q(a,d),q(b,d))});a.defs(p,"$convert",function(a,b){var d,f,h;(d=!1!==(f=a["$nil?"]())&&f!==c?f:b["$nil?"]())===c||d.$$is_boolean&&1!=d||this.$raise(g.get("TypeError"),"cannot convert nil into Rational");if((d=(f=g.get("Integer")["$==="](a),!1!==f&&f!==c?g.get("Integer")["$==="](b):f))!==c&&(!d.$$is_boolean||1==d))return this.$reduce(a,b);(d=!1!==(f=!1!==(h=g.get("Float")["$==="](a))&& h!==c?h:g.get("String")["$==="](a))&&f!==c?f:g.get("Complex")["$==="](a))===c||d.$$is_boolean&&1!=d||(a=a.$to_r());(d=!1!==(f=!1!==(h=g.get("Float")["$==="](b))&&h!==c?h:g.get("String")["$==="](b))&&f!==c?f:g.get("Complex")["$==="](b))===c||d.$$is_boolean&&1!=d||(b=b.$to_r());return(d=(f=b["$equal?"](1),!1!==f&&f!==c?g.get("Integer")["$==="](a)["$!"]():f))===c||d.$$is_boolean&&1!=d?(d=(f=g.get("Numeric")["$==="](a),!1!==f&&f!==c?g.get("Numeric")["$==="](b):f))===c||d.$$is_boolean&&1!=d?this.$reduce(a, b):q(a,b):g.get("Opal")["$coerce_to!"](a,g.get("Rational"),"to_r")});p.$attr_reader("numerator","denominator");a.defn(p,"$initialize",function(a,b){this.num=a;return this.den=b});a.defn(p,"$numerator",function(){return this.num});a.defn(p,"$denominator",function(){return this.den});a.defn(p,"$coerce",function(a){var b=c,b=a;return g.get("Rational")["$==="](b)?[a,this]:g.get("Integer")["$==="](b)?[a.$to_r(),this]:g.get("Float")["$==="](b)?[a,this.$to_f()]:c});a.defn(p,"$==",function(a){var b=c,b=a; return g.get("Rational")["$==="](b)?this.num["$=="](a.$numerator())?this.den["$=="](a.$denominator()):this.num["$=="](a.$numerator()):g.get("Integer")["$==="](b)?this.num["$=="](a)?this.den["$=="](1):this.num["$=="](a):g.get("Float")["$==="](b)?this.$to_f()["$=="](a):a["$=="](this)});a.defn(p,"$<=>",function(a){var b=c,b=a;return g.get("Rational")["$==="](b)?l(f(this.num,a.$denominator()),f(this.den,a.$numerator()))["$<=>"](0):g.get("Integer")["$==="](b)?l(this.num,f(this.den,a))["$<=>"](0):g.get("Float")["$==="](b)? this.$to_f()["$<=>"](a):this.$__coerced__("<=>",a)});a.defn(p,"$+",function(a){var b=c,d=b=c;b=a;g.get("Rational")["$==="](b)?(b=k(f(this.num,a.$denominator()),f(this.den,a.$numerator())),d=f(this.den,a.$denominator()),a=this.$Rational(b,d)):a=g.get("Integer")["$==="](b)?this.$Rational(k(this.num,f(a,this.den)),this.den):g.get("Float")["$==="](b)?k(this.$to_f(),a):this.$__coerced__("+",a);return a});a.defn(p,"$-",function(a){var b=c,d=b=c;b=a;g.get("Rational")["$==="](b)?(b=l(f(this.num,a.$denominator()), f(this.den,a.$numerator())),d=f(this.den,a.$denominator()),a=this.$Rational(b,d)):a=g.get("Integer")["$==="](b)?this.$Rational(l(this.num,f(a,this.den)),this.den):g.get("Float")["$==="](b)?l(this.$to_f(),a):this.$__coerced__("-",a);return a});a.defn(p,"$*",function(a){var b=c,d=b=c;b=a;g.get("Rational")["$==="](b)?(b=f(this.num,a.$numerator()),d=f(this.den,a.$denominator()),a=this.$Rational(b,d)):a=g.get("Integer")["$==="](b)?this.$Rational(f(this.num,a),this.den):g.get("Float")["$==="](b)?f(this.$to_f(), a):this.$__coerced__("*",a);return a});a.defn(p,"$/",function(a){var b=c,d=b=c;b=a;g.get("Rational")["$==="](b)?(b=f(this.num,a.$denominator()),d=f(this.den,a.$numerator()),a=this.$Rational(b,d)):a=g.get("Integer")["$==="](b)?a["$=="](0)?q(this.$to_f(),0):this.$Rational(this.num,f(this.den,a)):g.get("Float")["$==="](b)?q(this.$to_f(),a):this.$__coerced__("/",a);return a});a.defn(p,"$**",function(a){var b,d=c,d=a;return g.get("Integer")["$==="](d)?(b=this["$=="](0)?n(a,0):this["$=="](0))===c||b.$$is_boolean&& 1!=b?("number"===typeof a?0"](0))?this.$Rational(this.num["$**"](a),this.den["$**"](a)):n(a,0)?this.$Rational(this.den["$**"](a["$-@"]()),this.num["$**"](a["$-@"]())):this.$Rational(1,1):g.get("Float").$$scope.get("INFINITY"):g.get("Float")["$==="](d)?this.$to_f()["$**"](a):g.get("Rational")["$==="](d)?a["$=="](0)?this.$Rational(1,1):a.$denominator()["$=="](1)?n(a,0)?this.$Rational(this.den["$**"](a.$numerator().$abs()),this.num["$**"](a.$numerator().$abs())):this.$Rational(this.num["$**"](a.$numerator()), this.den["$**"](a.$numerator())):(b=this["$=="](0)?n(a,0):this["$=="](0))===c||b.$$is_boolean&&1!=b?this.$to_f()["$**"](a):this.$raise(g.get("ZeroDivisionError"),"divided by 0"):this.$__coerced__("**",a)});a.defn(p,"$abs",function(){return this.$Rational(this.num.$abs(),this.den.$abs())});a.defn(p,"$ceil",function(a){null==a&&(a=0);return a["$=="](0)?q(this.num["$-@"](),this.den)["$-@"]().$ceil():this.$with_precision("ceil",a)});a.alias(p,"divide","/");a.defn(p,"$floor",function(a){null==a&&(a=0); return a["$=="](0)?q(this.num["$-@"](),this.den)["$-@"]().$floor():this.$with_precision("floor",a)});a.defn(p,"$hash",function(){return"Rational:"+this.num+":"+this.den});a.defn(p,"$inspect",function(){return"("+this.$to_s()+")"});a.alias(p,"quo","/");a.defn(p,"$rationalize",function(a){1 $to_f $nil? $> $< $strftime $year $month $day $+ $round $/ $- $copy_instance_variables $initialize_dup $is_a? $zero? $wday $utc? $mon $yday $hour $min $sec $rjust $ljust $zone $to_s $[] $cweek_cyear $isdst $<= $!= $== $ceil".split(" ")); k.$require("corelib/comparable");return function(k,$super){function t(){}function p(a,e,b,c,m,f){a=a.$$is_string?parseInt(a,10):g.get("Opal")["$coerce_to!"](a,g.get("Integer"),"to_int");if(e===d)e=1;else if(!e.$$is_number)if(e["$respond_to?"]("to_str"))switch(e=e.$to_str(),e.toLowerCase()){case "jan":e=1;break;case "feb":e=2;break;case "mar":e=3;break;case "apr":e=4;break;case "may":e=5;break;case "jun":e=6;break;case "jul":e=7;break;case "aug":e=8;break;case "sep":e=9;break;case "oct":e=10;break; case "nov":e=11;break;case "dec":e=12;break;default:e=e.$to_i()}else e=g.get("Opal")["$coerce_to!"](e,g.get("Integer"),"to_int");(1>e||12b||31c||24m||59f||60a&&e.setFullYear(a);return e}); a.defs(r,"$local",function(a,e,b,g,m,f,k,v,B,u){null==e&&(e=d);null==b&&(b=d);null==g&&(g=d);null==m&&(m=d);null==f&&(f=d);null==k&&(k=d);null==v&&(v=d);null==B&&(B=d);null==u&&(u=d);var l;10===arguments.length&&(l=c.call(arguments),a=l[5],e=l[4],b=l[3],g=l[2],m=l[1],f=l[0]);l=p(a,e,b,g,m,f);a=l[0];e=l[1];b=l[2];g=l[3];m=l[4];f=l[5];l=new Date(a,e,b,g,m,0,1E3*f);100>a&&l.setFullYear(a);return l});a.defs(r,"$gm",function(a,e,b,g,m,f,k,v,B,u){null==e&&(e=d);null==b&&(b=d);null==g&&(g=d);null==m&&(m= d);null==f&&(f=d);null==k&&(k=d);null==v&&(v=d);null==B&&(B=d);null==u&&(u=d);var l;10===arguments.length&&(l=c.call(arguments),a=l[5],e=l[4],b=l[3],g=l[2],m=l[1],f=l[0]);l=p(a,e,b,g,m,f);a=l[0];e=l[1];b=l[2];g=l[3];m=l[4];f=l[5];l=new Date(Date.UTC(a,e,b,g,m,0,1E3*f));100>a&&l.setUTCFullYear(a);l.is_utc=!0;return l});(function(b){a.alias(b,"mktime","local");return a.alias(b,"utc","gm")})(a.get_singleton_class(r));a.defs(r,"$now",function(){return this.$new()});a.defn(r,"$+",function(a){var e;(e= g.get("Time")["$==="](a))===d||e.$$is_boolean&&1!=e||this.$raise(g.get("TypeError"),"time + time?");a.$$is_number||(a=g.get("Opal")["$coerce_to!"](a,g.get("Integer"),"to_int"));a=new Date(this.getTime()+1E3*a);a.is_utc=this.is_utc;return a});a.defn(r,"$-",function(a){var e;if((e=g.get("Time")["$==="](a))!==d&&(!e.$$is_boolean||1==e))return(this.getTime()-a.getTime())/1E3;a.$$is_number||(a=g.get("Opal")["$coerce_to!"](a,g.get("Integer"),"to_int"));a=new Date(this.getTime()-1E3*a);a.is_utc=this.is_utc; return a});a.defn(r,"$<=>",function(a){var e,b=d;return(e=g.get("Time")["$==="](a))===d||e.$$is_boolean&&1!=e?(b=a["$<=>"](this),(e=b["$nil?"]())===d||e.$$is_boolean&&1!=e?("number"===typeof b?0"](0))?-1:("number"===typeof b?0>b:b["$<"](0))?1:0:d):this.$to_f()["$<=>"](a.$to_f())});a.defn(r,"$==",function(a){return this.$to_f()===a.$to_f()});a.defn(r,"$asctime",function(){return this.$strftime("%a %b %e %H:%M:%S %Y")});a.alias(r,"ctime","asctime");a.defn(r,"$day",function(){return this.is_utc? this.getUTCDate():this.getDate()});a.defn(r,"$yday",function(){var a=d,e=d,b=d,a=g.get("Time").$new(this.$year()).$to_i(),e=g.get("Time").$new(this.$year(),this.$month(),this.$day()).$to_i(),b=86400;return n(q(l(e,a),b).$round(),1)});a.defn(r,"$isdst",function(){var a=new Date(this.getFullYear(),0,1),e=new Date(this.getFullYear(),6,1);return this.getTimezoneOffset()"](a)["$zero?"]():e});a.defn(r,"$friday?",function(){return 5==this.$wday()});a.defn(r,"$hash",function(){return"Time:"+this.getTime()});a.defn(r,"$hour",function(){return this.is_utc?this.getUTCHours():this.getHours()});a.defn(r,"$inspect",function(){var a;return(a=this["$utc?"]())===d||a.$$is_boolean&&1!=a?this.$strftime("%Y-%m-%d %H:%M:%S %z"): this.$strftime("%Y-%m-%d %H:%M:%S UTC")});a.alias(r,"mday","day");a.defn(r,"$min",function(){return this.is_utc?this.getUTCMinutes():this.getMinutes()});a.defn(r,"$mon",function(){return(this.is_utc?this.getUTCMonth():this.getMonth())+1});a.defn(r,"$monday?",function(){return 1==this.$wday()});a.alias(r,"month","mon");a.defn(r,"$saturday?",function(){return 6==this.$wday()});a.defn(r,"$sec",function(){return this.is_utc?this.getUTCSeconds():this.getSeconds()});a.defn(r,"$succ",function(){var a=new Date(this.getTime()+ 1E3);a.is_utc=this.is_utc;return a});a.defn(r,"$usec",function(){return 1E3*this.getMilliseconds()});a.defn(r,"$zone",function(){var a=this.toString(),e;e=-1==a.indexOf("(")?a.match(/[A-Z]{3,4}/)[0]:a.match(/\([^)]+\)/)[0].match(/[A-Z]/g).join("");return"GMT"==e&&/(GMT\W*\d{4})/.test(a)?RegExp.$1:e});a.defn(r,"$getgm",function(){var a=new Date(this.getTime());a.is_utc=!0;return a});a.alias(r,"getutc","getgm");a.defn(r,"$gmtime",function(){this.is_utc=!0;return this});a.alias(r,"utc","gmtime");a.defn(r, "$gmt?",function(){return!0===this.is_utc});a.defn(r,"$gmt_offset",function(){return 60*-this.getTimezoneOffset()});a.defn(r,"$strftime",function(a){var e=this;return a.replace(/%([\-_#^0]*:{0,2})(\d+)?([EO]*)(.)/g,function(a,b,h,g,c){g="";var d=-1!==b.indexOf("0"),f=-1===b.indexOf("-"),k=-1!==b.indexOf("_"),l=-1!==b.indexOf("^"),p=-1!==b.indexOf("#"),r=(b.match(":")||[]).length;h=parseInt(h,10);d&&k&&(b.indexOf("0")a?"+":"-")+(10>b?"0":"");g+=b;0c?"0":"";g+=c;1=b:a["$>="](b)}function l(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}a.dynamic_require_severity="warning";var f=a.top,k=a.nil,d=a.slice,c=a.klass,b=a.hash2;a.add_stubs("$require $include $== $[] $upcase $const_set $new $unshift $each $define_struct_attribute $class_eval $to_proc $allocate $initialize $raise $<< $members $define_method $[]= $instance_eval $each_with_index $class $hash $=== $< $-@ $size $>= $include? $to_sym $coerce_to! $instance_of? $__id__ $eql? $enum_for $length $map $+ $join $inspect $each_pair $inject $flatten $to_a".split(" ")); f.$require("corelib/enumerable");return function(f,$super){function y(){}var t=y=c(f,$super,"Struct",y),p=t.$$scope,r,g,m;t.$include(p.get("Enumerable"));a.defs(t,"$new",r=function(b){var g=d.call(arguments,0),c,h,e,m=r.$$p,f=m||k,l=arguments.length-1;0>l&&(l=0);for(var n=Array(l),I=0;Ie&&(e=0);for(var h=Array(e),g=0;gh&&(h=0);for(var e=Array(h),c=0;c")});a.alias(t,"to_s","inspect");a.defn(t,"$to_h",function(){var a,g,c;return(a= (g=this.$members()).$inject,a.$$p=(c=function(a,b){var g=c.$$s||this;null==a&&(a=k);null==b&&(b=k);a["$[]="](b,g["$[]"](b));return a},c.$$s=this,c),a).call(g,b([],{}))});return(a.defn(t,"$values_at",function(){var a,b,g,h=arguments.length-0;0>h&&(h=0);for(var e=Array(h),c=0;cc&&(c=0);for(var f=Array(c),k=0;kc&&(c=0);for(var f=Array(c),k=0;ka&&(a=0);for(var b=Array(a),d=0;da&&(a=0);for(var c=Array(a),d=0;da&&(a=0);for(var g=Array(a),c=0;c"});a.defn(x,"$==",function(a){var g,c,h;return(g=this["$equal?"](a))===l||g.$$is_boolean&&1!=g?(g=a["$instance_of?"](this.$class()))===l||g.$$is_boolean&&1!=g?(g=(c=a["$is_a?"](y.get("Set")),!1!==c&&c!==l?this.$size()["$=="](a.$size()):c))===l||g.$$is_boolean&&1!=g?!1:(g=(c=a)["$all?"],g.$$p=(h=function(a){var g=h.$$s||this;null==g.hash&&(g.hash=l);null==a&&(a=l);return g.hash["$include?"](a)},h.$$s=this,h),g).call(c):this.hash["$=="](a.$instance_variable_get("@hash")): !0});a.defn(x,"$add",function(a){this.hash["$[]="](a,!0);return this});a.alias(x,"<<","add");a.defn(x,"$classify",p=function(){var g,c,d,h,e=p.$$p||l,m=l;p.$$p=null;if(e===l)return this.$enum_for("classify");m=(g=(c=y.get("Hash")).$new,g.$$p=(d=function(a,e){var h=d.$$s||this;null==a&&(a=l);null==e&&(e=l);return a["$[]="](e,h.$class().$new())},d.$$s=this,d),g).call(c);(g=this.$each,g.$$p=(h=function(h){var g;null==h&&(h=l);return m["$[]"]((g=a.yield1(e,h))===f?f.$v:g).$add(h)},h.$$s=this,h),g).call(this); return m});a.defn(x,"$collect!",r=function(){var g,c,d=r.$$p||l,h=l;r.$$p=null;if(d===l)return this.$enum_for("collect!");h=this.$class().$new();(g=this.$each,g.$$p=(c=function(e){var g;null==e&&(e=l);return h["$<<"]((g=a.yield1(d,e))===f?f.$v:g)},c.$$s=this,c),g).call(this);return this.$replace(h)});a.alias(x,"map!","collect!");a.defn(x,"$delete",function(a){this.hash.$delete(a);return this});a.defn(x,"$delete?",function(a){var g;if((g=this["$include?"](a))===l||g.$$is_boolean&&1!=g)return l;this.$delete(a); return this});a.defn(x,"$delete_if",g=function(){try{var c,d,m,h,e,f=g.$$p||l;g.$$p=null;!1!==(c=f!==l)&&c!==l?c:a.ret(this.$enum_for("delete_if"));(c=(d=(h=this.$select,h.$$p=(e=function(e){var h;null==e&&(e=l);return h=a.yield1(f,e),h},e.$$s=this,e),h).call(this)).$each,c.$$p=(m=function(a){var e=m.$$s||this;null==e.hash&&(e.hash=l);null==a&&(a=l);return e.hash.$delete(a)},m.$$s=this,m),c).call(d);return this}catch(k){if(k===a.returner)return k.$v;throw k;}});a.defn(x,"$add?",function(a){var g; return(g=this["$include?"](a))===l||g.$$is_boolean&&1!=g?this.$add(a):l});a.defn(x,"$each",m=function(){var a,g,c=m.$$p||l;m.$$p=null;if(c===l)return this.$enum_for("each");(a=(g=this.hash).$each_key,a.$$p=c.$to_proc(),a).call(g);return this});a.defn(x,"$empty?",function(){return this.hash["$empty?"]()});a.defn(x,"$eql?",function(a){var g,c;return this.hash["$eql?"]((g=a.$instance_eval,g.$$p=(c=function(){var a=c.$$s||this;null==a.hash&&(a.hash=l);return a.hash},c.$$s=this,c),g).call(a))});a.defn(x, "$clear",function(){this.hash.$clear();return this});a.defn(x,"$include?",function(a){return this.hash["$include?"](a)});a.alias(x,"member?","include?");a.defn(x,"$merge",function(a){var g,c;(g=a.$each,g.$$p=(c=function(a){var e=c.$$s||this;null==a&&(a=l);return e.$add(a)},c.$$s=this,c),g).call(a);return this});a.defn(x,"$replace",function(a){this.$clear();this.$merge(a);return this});a.defn(x,"$size",function(){return this.hash.$size()});a.alias(x,"length","size");a.defn(x,"$subtract",function(a){var g, c;(g=a.$each,g.$$p=(c=function(a){var e=c.$$s||this;null==a&&(a=l);return e.$delete(a)},c.$$s=this,c),g).call(a);return this});a.defn(x,"$|",function(a){var g;((g=a["$respond_to?"]("each"))===l||g.$$is_boolean&&1!=g)&&this.$raise(y.get("ArgumentError"),"value must be enumerable");return this.$dup().$merge(a)});a.defn(x,"$superset?",function(a){var g,c;!1!==(g=a["$is_a?"](y.get("Set")))&&g!==l?g:this.$raise(y.get("ArgumentError"),"value must be a set");return n(this.$size(),a.$size())?!1:(g=a["$all?"], g.$$p=(c=function(a){var e=c.$$s||this;null==a&&(a=l);return e["$include?"](a)},c.$$s=this,c),g).call(a)});a.alias(x,">=","superset?");a.defn(x,"$proper_superset?",function(a){var g,c;!1!==(g=a["$is_a?"](y.get("Set")))&&g!==l?g:this.$raise(y.get("ArgumentError"),"value must be a set");return q(this.$size(),a.$size())?!1:(g=a["$all?"],g.$$p=(c=function(a){var e=c.$$s||this;null==a&&(a=l);return e["$include?"](a)},c.$$s=this,c),g).call(a)});a.alias(x,">","proper_superset?");a.defn(x,"$subset?",function(a){var g, c;!1!==(g=a["$is_a?"](y.get("Set")))&&g!==l?g:this.$raise(y.get("ArgumentError"),"value must be a set");return n(a.$size(),this.$size())?!1:(g=this["$all?"],g.$$p=(c=function(h){null==h&&(h=l);return a["$include?"](h)},c.$$s=this,c),g).call(this)});a.alias(x,"<=","subset?");a.defn(x,"$proper_subset?",function(a){var g,c;!1!==(g=a["$is_a?"](y.get("Set")))&&g!==l?g:this.$raise(y.get("ArgumentError"),"value must be a set");return q(a.$size(),this.$size())?!1:(g=this["$all?"],g.$$p=(c=function(h){null== h&&(h=l);return a["$include?"](h)},c.$$s=this,c),g).call(this)});a.alias(x,"<","proper_subset?");a.alias(x,"+","|");a.alias(x,"union","|");return(a.defn(x,"$to_a",function(){return this.hash.$keys()}),l)&&"to_a"})(a.base,null);return function(c){c=d(c,"Enumerable");var b=c.$$scope,f;a.defn(c,"$to_set",f=function(c){var d,k,p=f.$$p||l,n=arguments.length-1;0>n&&(n=0);for(var g=Array(n),m=0;ma&&(a+=c.length);return 0>a||a>=c.length||null==c[a]?n:c[a]});a.defn(d,"$check",function(a){a=this.$anchor(a);a=a.exec(this.working);return null==a? this.matched=n:this.matched=a[0]});a.defn(d,"$check_until",function(a){var c=this.prev_pos,d=this.pos;a=this.$scan_until(a);a!==n&&(this.matched=a.substr(-1),this.working=this.string.substr(d));this.prev_pos=c;this.pos=d;return a});a.defn(d,"$peek",function(a){return this.working.substring(0,a)});a.defn(d,"$eos?",function(){return 0===this.working.length});a.defn(d,"$exist?",function(a){a=a.exec(this.working);return null==a?n:0==a.index?0:a.index+1});a.defn(d,"$skip",function(a){a=this.$anchor(a); a=a.exec(this.working);if(null==a)return this.matched=n;a=a[0];var c=a.length;this.matched=a;this.prev_pos=this.pos;this.pos+=c;this.working=this.working.substring(c);return c});a.defn(d,"$skip_until",function(a){a=this.$scan_until(a);if(a===n)return n;this.matched=a.substr(-1);return a.length});a.defn(d,"$get_byte",function(){var a=n;this.posg&&(g=0);for(var m= Array(g),n=0;na&&(a=0);for(var b=Array(a),c=0;cb:a["$>"](b)}function l(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}a.dynamic_require_severity="ignore";var f=a.nil,k=a.module,d=a.klass,c=a.hash2,b=a.gvars;a.add_stubs("$[]= $now $- $delete $> $+ $[] $puts $% $to_f $read_parse $convert $read_parse_convert".split(" "));return function(D){(function(k, $super){function t(){}var p=t=d(k,$super,"Timings",t),r=p.$$proto;r.timers=r.log=f;a.defn(p,"$initialize",function(){this.log=c([],{});return this.timers=c([],{})});a.defn(p,"$start",function(b){return this.timers["$[]="](b,a.get("Time").$now())});a.defn(p,"$record",function(b){return this.log["$[]="](b,n(a.get("Time").$now(),this.timers.$delete(b)))});a.defn(p,"$read_parse",function(){var a,b=f;return q(b=l(!1!==(a=this.log["$[]"]("read"))&&a!==f?a:0,!1!==(a=this.log["$[]"]("parse"))&&a!==f?a:0), 0)?b:f});a.defn(p,"$convert",function(){var a;return!1!==(a=this.log["$[]"]("convert"))&&a!==f?a:0});a.defn(p,"$read_parse_convert",function(){var a,b=f;return q(b=l(l(!1!==(a=this.log["$[]"]("read"))&&a!==f?a:0,!1!==(a=this.log["$[]"]("parse"))&&a!==f?a:0),!1!==(a=this.log["$[]"]("convert"))&&a!==f?a:0),0)?b:f});a.defn(p,"$total",function(){var a,b=f;return q(b=l(l(l(!1!==(a=this.log["$[]"]("read"))&&a!==f?a:0,!1!==(a=this.log["$[]"]("parse"))&&a!==f?a:0),!1!==(a=this.log["$[]"]("convert"))&&a!== f?a:0),!1!==(a=this.log["$[]"]("write"))&&a!==f?a:0),0)?b:f});return(a.defn(p,"$print_report",function(a,c){null==b.stdout&&(b.stdout=f);null==a&&(a=b.stdout);null==c&&(c=f);!1!==c&&c!==f&&a.$puts("Input file: "+c);a.$puts(" Time to read and parse source: "+"%05.5f"["$%"](this.$read_parse().$to_f()));a.$puts(" Time to convert document: "+"%05.5f"["$%"](this.$convert().$to_f()));return a.$puts(" Total time (read, parse and convert): "+"%05.5f"["$%"](this.$read_parse_convert().$to_f()))}),f)&&"print_report"})(k(D, "Asciidoctor").$$scope.base,null)}(a.base)}; Opal.modules["asciidoctor/core_ext/object/nil_or_empty"]=function(a){a.dynamic_require_severity="ignore";var n=a.nil,q=a.klass;a.add_stubs(["$respond_to?"]);(function(l,$super){function k(){}var d=k=q(l,$super,"NilClass",k),c;return(c=d["$respond_to?"]("nil_or_empty?"))===n||c.$$is_boolean&&1!=c?a.alias(d,"nil_or_empty?","nil?"):n})(a.base,null);(function(l,$super){function k(){}var d=k=q(l,$super,"String",k),c;return(c=d["$respond_to?"]("nil_or_empty?"))===n||c.$$is_boolean&&1!=c?a.alias(d,"nil_or_empty?", "empty?"):n})(a.base,null);(function(l,$super){function k(){}var d=k=q(l,$super,"Array",k),c;return(c=d["$respond_to?"]("nil_or_empty?"))===n||c.$$is_boolean&&1!=c?a.alias(d,"nil_or_empty?","empty?"):n})(a.base,null);(function(l,$super){function k(){}var d=k=q(l,$super,"Hash",k),c;return(c=d["$respond_to?"]("nil_or_empty?"))===n||c.$$is_boolean&&1!=c?a.alias(d,"nil_or_empty?","empty?"):n})(a.base,null);return function(l,$super){function k(){}var d=k=q(l,$super,"Numeric",k),c;return(c=d["$respond_to?"]("nil_or_empty?"))=== n||c.$$is_boolean&&1!=c?a.alias(d,"nil_or_empty?","nil?"):n}(a.base,null)};Opal.modules["asciidoctor/core_ext"]=function(a){a.dynamic_require_severity="ignore";var n=a.top,q=a.nil;a.add_stubs(["$require","$=="]);n.$require("asciidoctor/core_ext/object/nil_or_empty");if(a.get("RUBY_ENGINE")["$=="]("opal"))return q}; Opal.modules["asciidoctor/helpers"]=function(a){a.dynamic_require_severity="ignore";var n=a.nil,q=a.module,l=a.range,f=a.gvars;a.add_stubs("$require $== $=== $fail $warn $chomp $message $class $normalize_lines_from_string $normalize_lines_array $empty? $to_a $bytes $[] $map $rstrip $lines $encode $force_encoding $join $[]= $encoding $nil_or_empty? $each_line $include? $=~ $gsub $sprintf $each_byte $extname $-@ $length $basename $directory? $dirname $! $!= $mkdir_p $mkdir".split(" "));return function(k){(function(d){d= q(d,"Helpers");var c=d.$$scope;a.defs(d,"$require_library",function(b,c,d){var f=n,k=n;null==c&&(c=!0);null==d&&(d="abort");try{return this.$require(b)}catch(l){if(a.rescue(l,[a.get("LoadError")])){f=l;try{if(!1!==c&&c!==n)return c["$=="](!0)&&(c=b),k=d,"abort"["$==="](k)?this.$fail("asciidoctor: FAILED: required gem '"+c+"' is not installed. Processing aborted."):"warn"["$==="](k)?this.$warn("asciidoctor: WARNING: optional gem '"+c+"' is not installed. Functionality disabled."):n;k=d;return"abort"["$==="](k)? this.$fail("asciidoctor: FAILED: "+f.$message().$chomp(".")+". Processing aborted."):"warn"["$==="](k)?this.$warn("asciidoctor: WARNING: "+f.$message().$chomp(".")+". Functionality disabled."):n}finally{a.gvars["!"]=a.exceptions.pop()||a.nil}}else throw l;}});a.defs(d,"$normalize_lines",function(b){return b.$class()["$=="](a.get("String"))?this.$normalize_lines_from_string(b):this.$normalize_lines_array(b)});a.defs(d,"$normalize_lines_array",function(b){var d,f,k,q,p,r,g=n,m=n,u=n,A=n;if((d=b["$empty?"]())!== n&&(!d.$$is_boolean||1==d))return[];g=(m=b["$[]"](0))["$[]"](l(0,2,!1)).$bytes().$to_a();if((d=c.get("COERCE_ENCODING"))===n||d.$$is_boolean&&1!=d){if(g["$=="](c.get("BOM_BYTES_UTF_8")))b["$[]="](0,m["$[]"](l(3,-1,!1)));return(d=b.$map,d.$$p=(r=function(a){null==a&&(a=n);return a.$rstrip()},r.$$s=this,r),d).call(b)}u=a.get("Encoding").$$scope.get("UTF_8");if((A=g["$[]"](l(0,1,!1)))["$=="](c.get("BOM_BYTES_UTF_16LE")))return(d=(f=b.$join().$force_encoding(a.get("Encoding").$$scope.get("UTF_16LE"))["$[]"](l(1, -1,!1)).$encode(u).$lines()).$map,d.$$p=(k=function(a){null==a&&(a=n);return a.$rstrip()},k.$$s=this,k),d).call(f);if(A["$=="](c.get("BOM_BYTES_UTF_16BE")))return b["$[]="](0,m.$force_encoding(a.get("Encoding").$$scope.get("UTF_16BE"))["$[]"](l(1,-1,!1))),(d=b.$map,d.$$p=(q=function(b){null==b&&(b=n);return""+b.$force_encoding(a.get("Encoding").$$scope.get("UTF_16BE")).$encode(u).$rstrip()},q.$$s=this,q),d).call(b);if(g["$[]"](l(0,2,!1))["$=="](c.get("BOM_BYTES_UTF_8")))b["$[]="](0,m.$force_encoding(u)["$[]"](l(1, -1,!1)));return(d=b.$map,d.$$p=(p=function(a){null==a&&(a=n);return a.$encoding()["$=="](u)?a.$rstrip():a.$force_encoding(u).$rstrip()},p.$$s=this,p),d).call(b)});a.defs(d,"$normalize_lines_from_string",function(b){var d,f,k,q=n,p=n,r=n;if((d=b["$nil_or_empty?"]())!==n&&(!d.$$is_boolean||1==d))return[];(d=c.get("COERCE_ENCODING"))===n||d.$$is_boolean&&1!=d?b["$[]"](l(0,2,!1)).$bytes().$to_a()["$=="](c.get("BOM_BYTES_UTF_8"))&&(b=b["$[]"](l(3,-1,!1))):(q=a.get("Encoding").$$scope.get("UTF_8"),p=b["$[]"](l(0, 2,!1)).$bytes().$to_a(),(r=p["$[]"](l(0,1,!1)))["$=="](c.get("BOM_BYTES_UTF_16LE"))?b=b.$force_encoding(a.get("Encoding").$$scope.get("UTF_16LE"))["$[]"](l(1,-1,!1)).$encode(q):r["$=="](c.get("BOM_BYTES_UTF_16BE"))?b=b.$force_encoding(a.get("Encoding").$$scope.get("UTF_16BE"))["$[]"](l(1,-1,!1)).$encode(q):p["$[]"](l(0,2,!1))["$=="](c.get("BOM_BYTES_UTF_8"))?b=b.$encoding()["$=="](q)?b["$[]"](l(1,-1,!1)):b.$force_encoding(q)["$[]"](l(1,-1,!1)):b.$encoding()["$=="](q)||(b=b.$force_encoding(q)));return(d= (f=b.$each_line()).$map,d.$$p=(k=function(a){null==a&&(a=n);return a.$rstrip()},k.$$s=this,k),d).call(f)});a.defs(d,"$uriish?",function(a){var d;return d=a["$include?"](":"),!1!==d&&d!==n?a["$=~"](c.get("UriSniffRx")):d});a.defs(d,"$uri_prefix",function(a){var d,k;return(d=(k=a["$include?"](":"),!1!==k&&k!==n?a["$=~"](c.get("UriSniffRx")):k))===n||d.$$is_boolean&&1!=d?n:(d=f["~"])===n?n:d["$[]"](0)});a.cdecl(c,"REGEXP_ENCODE_URI_CHARS",/[^\w\-.!~*';:@=+$,()\[\]]/);a.defs(d,"$encode_uri",function(a){var d, k;return(d=a.$gsub,d.$$p=(k=function(){var a=k.$$s||this,b,c,d,g;return(b=(c=((g=f["~"])===n?n:g["$[]"](0)).$each_byte()).$map,b.$$p=(d=function(a){var b=d.$$s||this;null==a&&(a=n);return b.$sprintf("%%%02X",a)},d.$$s=a,d),b).call(c).$join()},k.$$s=this,k),d).call(a,c.get("REGEXP_ENCODE_URI_CHARS"))});a.defs(d,"$rootname",function(b){var c,d=n;return(c=(d=a.get("File").$extname(b))["$empty?"]())===n||c.$$is_boolean&&1!=c?b["$[]"](l(0,d.$length()["$-@"](),!0)):b});a.defs(d,"$basename",function(b,c){var d; null==c&&(c=!1);return!1!==c&&c!==n?a.get("File").$basename(b,!1!==(d=a.get("File").$extname(b))&&d!==n?d:""):a.get("File").$basename(b)});a.defs(d,"$mkdir_p",function(b){var c,d,f=n;return(c=a.get("File")["$directory?"](b))===n||c.$$is_boolean&&1!=c?(f=a.get("File").$dirname(b),(c=(d=a.get("File")["$directory?"](f=a.get("File").$dirname(b))["$!"](),!1!==d&&d!==n?f["$!="]("."):d))===n||c.$$is_boolean&&1!=c||this.$mkdir_p(f),a.get("Dir").$mkdir(b)):n})})(q(k,"Asciidoctor").$$scope.base)}(a.base)}; Opal.modules["asciidoctor/substitutors"]=function(a){function n(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}function q(a,b){return"number"===typeof a&&"number"===typeof b?a*b:a["$*"](b)}function l(a,b){return"number"===typeof a&&"number"===typeof b?a>b:a["$>"](b)}function f(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}a.dynamic_require_severity="ignore";var k=a.nil,d=a.breaker,c=a.slice,b=a.module,D=a.hash2,x=a.gvars,y=a.range;a.add_stubs("$join $keys $[] $+ $attr_reader $! $== $=== $each $has_key? $<< $empty? $* $include? $extract_passthroughs $sub_specialchars $sub_quotes $sub_attributes $split $sub_replacements $sub_macros $highlight_source $sub_callouts $sub_post_replacements $warn $restore_passthroughs $apply_subs $compat_mode $gsub $nil_or_empty? $[]= $size $unescape_brackets $resolve_pass_subs $> $- $end_with? $parse_attributes $start_with? $to_sym $attributes $document $basebackend? $to_i $convert $new $clear $convert_quoted_text $gsub! $do_replacement $tr $length $store_attribute $fetch $attribute_undefined $counter $key? $downcase $attribute_missing $unescape_bracketed_text $inject $strip $map $pop $rstrip $extensions $inline_macros? $config $process_method $regexp $instance $inline_macros $register $basename $split_simple_csv $normalize_string $!= $!~ $delete $chop $attr? $sub $chomp $encode_uri $sub_inline_xrefs $sub_inline_anchors $find $id $references $index $text $rootname $key $escape $attr $read_next_id $callouts $push $parse_quoted_text_attributes $shorthand_property_syntax $shift $concat $parse_into $parse $each_char $=~ $chr $dup $& $resolve_subs $nil? $require_library $set_attr $sub_source $resolve_lines_to_highlight $highlight $to_a $uniq $sort $option? $resolve_block_subs".split(" ")); return function(t){(function(p){p=b(p,"Substitutors");var r=p.$$scope;a.cdecl(r,"SPECIAL_CHARS",D(["&","<",">"],{"&":"&","<":"<",">":">"}));a.cdecl(r,"SPECIAL_CHARS_PATTERN",new RegExp("["+r.get("SPECIAL_CHARS").$keys().$join()+"]"));a.cdecl(r,"SUBS",D("basic normal verbatim title header pass".split(" "),{basic:["specialcharacters"],normal:"specialcharacters quotes attributes replacements macros post_replacements".split(" "),verbatim:["specialcharacters","callouts"],title:"specialcharacters quotes replacements macros attributes post_replacements".split(" "), header:["specialcharacters","attributes"],pass:[]}));a.cdecl(r,"COMPOSITE_SUBS",D(["none","normal","verbatim","specialchars"],{none:[],normal:r.get("SUBS")["$[]"]("normal"),verbatim:r.get("SUBS")["$[]"]("verbatim"),specialchars:["specialcharacters"]}));a.cdecl(r,"SUB_SYMBOLS",D("amnpqrcv".split(""),{a:"attributes",m:"macros",n:"normal",p:"post_replacements",q:"quotes",r:"replacements",c:"specialcharacters",v:"verbatim"}));a.cdecl(r,"SUB_OPTIONS",D(["block","inline"],{block:n(n(r.get("COMPOSITE_SUBS").$keys(), r.get("SUBS")["$[]"]("normal")),["callouts"]),inline:n(r.get("COMPOSITE_SUBS").$keys(),r.get("SUBS")["$[]"]("normal"))}));a.cdecl(r,"SUB_HIGHLIGHT",["coderay","pygments"]);a.cdecl(r,"PASS_START","\u0096");a.cdecl(r,"PASS_END","\u0097");a.cdecl(r,"PASS_MATCH",/\u0096(\d+)\u0097/);a.cdecl(r,"PASS_MATCH_HI",/]*>\u0096<\/span>[^\d]*(\d+)[^\d]*]*>\u0097<\/span>/);p.$attr_reader("passthroughs");a.defn(p,"$apply_subs",function(b,c,d){var f,l,h,e,w,p=k,C=k,M=k,I=k;null==this.passthroughs&& (this.passthroughs=k);null==c&&(c="normal");null==d&&(d=!1);if((f=c["$!"]())!==k&&(!f.$$is_boolean||1==f))return b;c["$=="]("normal")?c=r.get("SUBS")["$[]"]("normal"):!1!==d&&d!==k&&((f=a.get("Symbol")["$==="](c))===k||f.$$is_boolean&&1!=f?(p=[],(f=(l=c).$each,f.$$p=(h=function(a){var b;null==a&&(a=k);return(b=r.get("COMPOSITE_SUBS")["$has_key?"](a))===k||b.$$is_boolean&&1!=b?p["$<<"](a):p=n(p,r.get("COMPOSITE_SUBS")["$[]"](a))},h.$$s=this,h),f).call(l),c=p):c=!1!==(f=r.get("COMPOSITE_SUBS")["$[]"](c))&& f!==k?f:[c]);if((f=c["$empty?"]())!==k&&(!f.$$is_boolean||1==f))return b;C=(f=M=a.get("Array")["$==="](b))===k||f.$$is_boolean&&1!=f?b:q(b,r.get("EOL"));(f=I=c["$include?"]("macros"))===k||f.$$is_boolean&&1!=f||(C=this.$extract_passthroughs(C),(f=this.passthroughs["$empty?"]())===k||f.$$is_boolean&&1!=f||(I=!1));(f=(e=c).$each,f.$$p=(w=function(a){var b=w.$$s||this,e,h=k;null==a&&(a=k);h=a;return"specialcharacters"["$==="](h)?C=b.$sub_specialchars(C):"quotes"["$==="](h)?C=b.$sub_quotes(C):"attributes"["$==="](h)? C=q(b.$sub_attributes(C.$split(r.get("EOL"))),r.get("EOL")):"replacements"["$==="](h)?C=b.$sub_replacements(C):"macros"["$==="](h)?C=b.$sub_macros(C):"highlight"["$==="](h)?C=b.$highlight_source(C,c["$include?"]("callouts")):"callouts"["$==="](h)?(e=c["$include?"]("highlight"))===k||e.$$is_boolean&&1!=e?C=b.$sub_callouts(C):k:"post_replacements"["$==="](h)?C=b.$sub_post_replacements(C):b.$warn("asciidoctor: WARNING: unknown substitution type "+a)},w.$$s=this,w),f).call(e);!1!==I&&I!==k&&(C=this.$restore_passthroughs(C)); return!1!==M&&M!==k?C.$split(r.get("EOL")):C});a.defn(p,"$apply_normal_subs",function(b){var c;return this.$apply_subs((c=a.get("Array")["$==="](b))===k||c.$$is_boolean&&1!=c?b:q(b,r.get("EOL")))});a.defn(p,"$apply_title_subs",function(a){return this.$apply_subs(a,r.get("SUBS")["$[]"]("title"))});a.defn(p,"$apply_header_subs",function(a){return this.$apply_subs(a,r.get("SUBS")["$[]"]("header"))});a.defn(p,"$extract_passthroughs",function(b){var c,d,p,n,h,e,w,E,C=k,M=k,I=k,v=k;null==this.document&& (this.document=k);C=this.document.$compat_mode();(c=!1!==(d=!1!==(p=b["$include?"]("++"))&&p!==k?p:b["$include?"]("$$"))&&d!==k?d:b["$include?"]("ss:"))===k||c.$$is_boolean&&1!=c||(b=(c=(d=b).$gsub,c.$$p=(n=function(){var b=n.$$s||this,e,h=k,g=k,c=k,d=c=k,m=k,v=k,w=k,h=k;null==b.passthroughs&&(b.passthroughs=k);null==x["~"]&&(x["~"]=k);h=x["~"];g=k;if((e=(c=h["$[]"](4))["$nil_or_empty?"]())===k||e.$$is_boolean&&1!=e){if((e=!1!==C&&C!==k?c["$=="]("++"):C)!==k&&(!e.$$is_boolean||1==e))return(e=h["$[]"](2)["$nil_or_empty?"]())=== k||e.$$is_boolean&&1!=e?""+h["$[]"](1)+"["+h["$[]"](2)+"]"+h["$[]"](3)+"++"+b.$extract_passthroughs(h["$[]"](5))+"++":""+h["$[]"](1)+h["$[]"](3)+"++"+b.$extract_passthroughs(h["$[]"](5))+"++";d=h["$[]"](2);(e=a.get("RUBY_ENGINE_OPAL"))===k||e.$$is_boolean&&1!=e||d["$=="]("")&&(d=k);m=h["$[]"](3).$size();v=h["$[]"](5);w=!1;if(!1!==d&&d!==k){if(l(m,0))return""+h["$[]"](1)+"["+d+"]"+q("\\",f(m,1))+c+h["$[]"](5)+c+")";h["$[]"](1)["$=="]("\\")?(g="["+d+"]",d=k):((e=c["$=="]("++")?d["$end_with?"]("x-"): c["$=="]("++"))===k||e.$$is_boolean&&1!=e||(w=!0,d=d["$[]"](y(0,-2,!0))),d=b.$parse_attributes(d))}else if(l(m,0))return""+h["$[]"](1)+"["+d+"]"+q("\\",f(m,1))+c+h["$[]"](5)+c;h=c["$=="]("+++")?[]:["specialcharacters"];c=b.passthroughs.$size();if(!1!==d&&d!==k)if(!1!==w&&w!==k)b.passthroughs["$[]="](c,D(["text","subs","type","attributes"],{text:v,subs:r.get("SUBS")["$[]"]("normal"),type:"monospaced",attributes:d}));else b.passthroughs["$[]="](c,D(["text","subs","type","attributes"],{text:v,subs:h, type:"unquoted",attributes:d}));else b.passthroughs["$[]="](c,D(["text","subs"],{text:v,subs:h}))}else{if(h["$[]"](6)["$=="]("\\"))return h["$[]"](0)["$[]"](y(1,-1,!1));b.passthroughs["$[]="](c=b.passthroughs.$size(),D(["text","subs"],{text:b.$unescape_brackets(h["$[]"](8)),subs:(e=h["$[]"](7)["$nil_or_empty?"]())===k||e.$$is_boolean&&1!=e?b.$resolve_pass_subs(h["$[]"](7)):[]}))}return""+g+r.get("PASS_START")+c+r.get("PASS_END")},n.$$s=this,n),c).call(d,r.get("PassInlineMacroRx")));c=a.to_ary(r.get("PassInlineRx")["$[]"](C)); M=null==c[0]?k:c[0];I=null==c[1]?k:c[1];v=null==c[2]?k:c[2];(c=!1!==(p=b["$include?"](M))&&p!==k?p:(h=!1!==I&&I!==k)?b["$include?"](I):I)===k||c.$$is_boolean&&1!=c||(b=(c=(p=b).$gsub,c.$$p=(e=function(){var b=e.$$s||this,h,g=k,c=k,d=k,m=k,f=k,v=k,w=k,f=g=k;null==b.passthroughs&&(b.passthroughs=k);null==x["~"]&&(x["~"]=k);g=x["~"];c=g["$[]"](1);d=g["$[]"](2);m=(h=g["$[]"](3)["$start_with?"]("\\"))===k||h.$$is_boolean&&1!=h?k:"\\";f=g["$[]"](4);v=g["$[]"](5);(h=a.get("RUBY_ENGINE_OPAL"))===k||h.$$is_boolean&& 1!=h||d["$=="]("")&&(d=k);!1!==C&&C!==k?w=!0:(h=w=!1!==d&&d!==k?d["$end_with?"]("x-"):d)===k||h.$$is_boolean&&1!=h||(d=d["$[]"](y(0,-2,!0)));if(!1!==d&&d!==k){if((h=f["$=="]("`")?w["$!"]():f["$=="]("`"))!==k&&(!h.$$is_boolean||1==h))return""+c+"["+d+"]"+m+"`"+b.$extract_passthroughs(v)+"`";if(!1!==m&&m!==k)return""+c+"["+d+"]"+g["$[]"](3)["$[]"](y(1,-1,!1));c["$=="]("\\")?(c="["+d+"]",d=k):d=b.$parse_attributes(d)}else{if((h=f["$=="]("`")?w["$!"]():f["$=="]("`"))!==k&&(!h.$$is_boolean||1==h))return""+ c+m+"`"+b.$extract_passthroughs(v)+"`";if(!1!==m&&m!==k)return""+c+g["$[]"](3)["$[]"](y(1,-1,!1))}g=b.passthroughs.$size();if(!1!==C&&C!==k)b.passthroughs["$[]="](g,D(["text","subs","attributes","type"],{text:v,subs:["specialcharacters"],attributes:d,type:"monospaced"}));else if(!1!==d&&d!==k)if(!1!==w&&w!==k)f=f["$=="]("`")?["specialcharacters"]:r.get("SUBS")["$[]"]("normal"),b.passthroughs["$[]="](g,D(["text","subs","attributes","type"],{text:v,subs:f,attributes:d,type:"monospaced"}));else b.passthroughs["$[]="](g, D(["text","subs","attributes","type"],{text:v,subs:["specialcharacters"],attributes:d,type:"unquoted"}));else b.passthroughs["$[]="](g,D(["text","subs"],{text:v,subs:["specialcharacters"]}));return""+c+r.get("PASS_START")+g+r.get("PASS_END")},e.$$s=this,e),c).call(p,v));(c=(h=b["$include?"](":"),!1!==h&&h!==k?!1!==(w=b["$include?"]("stem:"))&&w!==k?w:b["$include?"]("math:"):h))===k||c.$$is_boolean&&1!=c||(b=(c=(h=b).$gsub,c.$$p=(E=function(){var a=E.$$s||this,b,e=k,h=k,g=k,c=k,d=e=k;null==a.document&& (a.document=k);null==a.passthroughs&&(a.passthroughs=k);null==x["~"]&&(x["~"]=k);e=x["~"];if((b=e["$[]"](0)["$start_with?"]("\\"))!==k&&(!b.$$is_boolean||1==b))return e["$[]"](0)["$[]"](y(1,-1,!1));(h=e["$[]"](1).$to_sym())["$=="]("stem")&&(h=((b=(g=a.$document().$attributes()["$[]"]("stem"))["$nil_or_empty?"]())===k||b.$$is_boolean&&1!=b?g:"asciimath").$to_sym());c=a.$unescape_brackets(e["$[]"](3));e=(b=e["$[]"](2)["$nil_or_empty?"]())===k||b.$$is_boolean&&1!=b?a.$resolve_pass_subs(e["$[]"](2)): (b=a.document["$basebackend?"]("html"))===k||b.$$is_boolean&&1!=b?[]:["specialcharacters"];a.passthroughs["$[]="](d=a.passthroughs.$size(),D(["text","subs","type"],{text:c,subs:e,type:h}));return""+r.get("PASS_START")+d+r.get("PASS_END")},E.$$s=this,E),c).call(h,r.get("StemInlineMacroRx")));return b});a.defn(p,"$restore_passthroughs",function(a,b){var c,d,f,h;null==this.passthroughs&&(this.passthroughs=k);null==b&&(b=!0);try{return(c=(d=!1!==b&&b!==k)?!1!==(f=this.passthroughs["$empty?"]())&&f!== k?f:a["$include?"](r.get("PASS_START"))["$!"]():b)===k||c.$$is_boolean&&1!=c?(c=(d=a).$gsub,c.$$p=(h=function(){var a=h.$$s||this,b,g=k,c=k,d=k,m=k;null==a.passthroughs&&(a.passthroughs=k);null==x["~"]&&(x["~"]=k);g=a.passthroughs["$[]"](x["~"]["$[]"](1).$to_i());c=(b=d=g["$[]"]("subs"))===k||b.$$is_boolean&&1!=b?g["$[]"]("text"):a.$apply_subs(g["$[]"]("text"),d);(b=m=g["$[]"]("type"))===k||b.$$is_boolean&&1!=b||(c=r.get("Inline").$new(a,"quoted",c,D(["type","attributes"],{type:m,attributes:g["$[]"]("attributes")})).$convert()); return(b=c["$include?"](r.get("PASS_START")))===k||b.$$is_boolean&&1!=b?c:a.$restore_passthroughs(c,!1)},h.$$s=this,h),c).call(d,r.get("PASS_MATCH")):a}finally{!1!==b&&b!==k&&this.passthroughs.$clear()}});a.defn(p,"$sub_specialchars",function(a){var b,c;return(b=r.get("SUPPORTS_GSUB_RESULT_HASH"))===k||b.$$is_boolean&&1!=b?(b=a.$gsub,b.$$p=(c=function(){var a;return r.get("SPECIAL_CHARS")["$[]"]((a=x["~"])===k?k:a["$[]"](0))},c.$$s=this,c),b).call(a,r.get("SPECIAL_CHARS_PATTERN")):a.$gsub(r.get("SPECIAL_CHARS_PATTERN"), r.get("SPECIAL_CHARS"))});a.alias(p,"sub_specialcharacters","sub_specialchars");a.defn(p,"$sub_quotes",function(b){var c,d,f,l,h,e=k;null==this.document&&(this.document=k);(c=a.get("RUBY_ENGINE_OPAL"))===k||c.$$is_boolean&&1!=c?(e=""+b,(c=(l=r.get("QUOTE_SUBS")["$[]"](this.document.$compat_mode())).$each,c.$$p=(h=function(a,b,g){var c=h.$$s||this,d,m,f;null==a&&(a=k);null==b&&(b=k);null==g&&(g=k);return(d=(m=e)["$gsub!"],d.$$p=(f=function(){var e=f.$$s||this;null==x["~"]&&(x["~"]=k);return e.$convert_quoted_text(x["~"], a,b)},f.$$s=c,f),d).call(m,g)},h.$$s=this,h),c).call(l)):(e=b,(c=(d=r.get("QUOTE_SUBS")["$[]"](this.document.$compat_mode())).$each,c.$$p=(f=function(a,b,h){var g=f.$$s||this,c,d,m;null==a&&(a=k);null==b&&(b=k);null==h&&(h=k);return e=(c=(d=e).$gsub,c.$$p=(m=function(){var e=m.$$s||this;null==x["~"]&&(x["~"]=k);return e.$convert_quoted_text(x["~"],a,b)},m.$$s=g,m),c).call(d,h)},f.$$s=this,f),c).call(d));return e});a.defn(p,"$sub_replacements",function(b){var c,d,f,l,h,e=k;(c=a.get("RUBY_ENGINE_OPAL"))=== k||c.$$is_boolean&&1!=c?(e=""+b,(c=(l=r.get("REPLACEMENTS")).$each,c.$$p=(h=function(a,b,g){var c=h.$$s||this,d,m,f;null==a&&(a=k);null==b&&(b=k);null==g&&(g=k);return(d=(m=e)["$gsub!"],d.$$p=(f=function(){var a=f.$$s||this;null==x["~"]&&(x["~"]=k);return a.$do_replacement(x["~"],b,g)},f.$$s=c,f),d).call(m,a)},h.$$s=this,h),c).call(l)):(e=b,(c=(d=r.get("REPLACEMENTS")).$each,c.$$p=(f=function(a,b,h){var g=f.$$s||this,c,d,m;null==a&&(a=k);null==b&&(b=k);null==h&&(h=k);return e=(c=(d=e).$gsub,c.$$p= (m=function(){var a=m.$$s||this;null==x["~"]&&(x["~"]=k);return a.$do_replacement(x["~"],b,h)},m.$$s=g,m),c).call(d,a)},f.$$s=this,f),c).call(d));return e});a.defn(p,"$do_replacement",function(a,b,c){var d,f=k,f=k;(d=(f=a["$[]"](0))["$include?"]("\\"))===k||d.$$is_boolean&&1!=d?(f=c,a="none"["$==="](f)?b:"leading"["$==="](f)?""+a["$[]"](1)+b:"bounding"["$==="](f)?""+a["$[]"](1)+b+a["$[]"](2):k):a=f.$tr("\\","");return a});a.defn(p,"$sub_attributes",function(b,c){var f,l,p,h=k,e=k,w=k,E=k;null==this.document&& (this.document=k);null==c&&(c=D([],{}));if((f=b["$nil_or_empty?"]())!==k&&(!f.$$is_boolean||1==f))return b;(f=h=a.get("String")["$==="](b))===k||f.$$is_boolean&&1!=f||(b=[b]);e=this.document.$attributes();w=k;E=[];(f=(l=b).$each,f.$$p=(p=function(b){var h=p.$$s||this,g,f,l,u,q=k,F=k;null==b&&(b=k);F=q=!1;(g=b["$include?"]("{"))===k||g.$$is_boolean&&1!=g||(b=(g=(f=b).$gsub,g.$$p=(l=function(){var b=l.$$s||this,h,g,f=k,v=k,p=k,I=k,u=k,C=k,O=k,A=k,E=k;null==b.document&&(b.document=k);null==x["~"]&&(x["~"]= k);f=x["~"];if((h=!1!==(g=f["$[]"](1)["$=="]("\\"))&&g!==k?g:f["$[]"](4)["$=="]("\\"))===k||h.$$is_boolean&&1!=h){if((h=f["$[]"](3)["$nil_or_empty?"]()["$!"]())===k||h.$$is_boolean&&1!=h)return(h=e["$key?"](E=f["$[]"](2).$downcase()))===k||h.$$is_boolean&&1!=h?(h=r.get("INTRINSIC_ATTRIBUTES")["$key?"](E))===k||h.$$is_boolean&&1!=h?function(){u=!1!==(h=w)&&h!==k?h:w=!1!==(g=c["$[]"]("attribute_missing"))&&g!==k?g:e.$fetch("attribute-missing",r.get("Compliance").$attribute_missing());if("skip"["$==="](u))return f["$[]"](0); if("drop-line"["$==="](u))return b.$warn("asciidoctor: WARNING: dropping line containing reference to missing attribute: "+E),q=!0,d.$v="",d;if("warn"["$==="](u))return b.$warn("asciidoctor: WARNING: skipping reference to missing attribute: "+E),f["$[]"](0);F=!0;return""}():r.get("INTRINSIC_ATTRIBUTES")["$[]"](E):e["$[]"](E);v=n((p=f["$[]"](3)).$length(),1);I=f["$[]"](2)["$[]"](y(v,-1,!1));return function(){u=p;if("set"["$==="](u)){C=I.$split(":");h=a.to_ary(r.get("Parser").$store_attribute(C["$[]"](0), !1!==(g=C["$[]"](1))&&g!==k?g:"",b.document));O=null==h[1]?k:h[1];if((!1===O||O===k)&&e.$fetch("attribute-undefined",r.get("Compliance").$attribute_undefined())["$=="]("drop-line"))return q=!0,d.$v="",d;F=!0;return""}if("counter"["$==="](u)||"counter2"["$==="](u))return C=I.$split(":"),A=b.document.$counter(C["$[]"](0),C["$[]"](1)),p["$=="]("counter2")?(F=!0,""):A;b.$warn("asciidoctor: WARNING: illegal attribute directive: "+f["$[]"](3));return f["$[]"](0)}()}return"{"+f["$[]"](2)+"}"},l.$$s=h,l), g).call(f,r.get("AttributeReferenceRx")));return(g=!1!==(u=q)&&u!==k?u:!1!==F&&F!==k?b["$empty?"]():F)===k||g.$$is_boolean&&1!=g?E["$<<"](b):k},p.$$s=this,p),f).call(l);return!1!==h&&h!==k?q(E,r.get("EOL")):E});a.defn(p,"$sub_macros",function(b){var d,f,l,p,h,e,w,n,C,q,I,v,B,O,L,F,P,N,t,T,U=k,V=k,J=k,Q=k,K=k,R=k;null==this.document&&(this.document=k);if((d=b["$nil_or_empty?"]())!==k&&(!d.$$is_boolean||1==d))return b;U=D([],{});U["$[]="]("square_bracket",b["$include?"]("["));U["$[]="]("round_bracket", b["$include?"]("("));U["$[]="]("colon",V=b["$include?"](":"));U["$[]="]("macroish",(d=U["$[]"]("square_bracket"),!1!==d&&d!==k?V:d));U["$[]="]("macroish_short_form",(d=(f=U["$[]"]("square_bracket"),!1!==f&&f!==k?V:f),!1!==d&&d!==k?b["$include?"](":["):d));J=this.document.$attributes()["$has_key?"]("linkattrs");Q=this.document.$attributes()["$has_key?"]("experimental");K=""+b;!1!==Q&&Q!==k&&((d=(f=U["$[]"]("macroish_short_form"),!1!==f&&f!==k?!1!==(l=K["$include?"]("kbd:"))&&l!==k?l:K["$include?"]("btn:"): f))===k||d.$$is_boolean&&1!=d||(K=(d=(f=K).$gsub,d.$$p=(p=function(){var a=p.$$s||this,b,e,h,g=k,c=k,g=g=k;null==x["~"]&&(x["~"]=k);g=x["~"];if((b=(c=g["$[]"](0))["$start_with?"]("\\"))!==k&&(!b.$$is_boolean||1==b))return c["$[]"](y(1,-1,!1));if((b=c["$start_with?"]("kbd"))===k||b.$$is_boolean&&1!=b){if((b=c["$start_with?"]("btn"))===k||b.$$is_boolean&&1!=b)return k;g=a.$unescape_bracketed_text(g["$[]"](1));return r.get("Inline").$new(a,"button",g).$convert()}g=a.$unescape_bracketed_text(g["$[]"](1)); g=g["$=="]("+")?["+"]:(b=(e=g.$split(r.get("KbdDelimiterRx"))).$inject,b.$$p=(h=function(a,b){var e;null==a&&(a=k);null==b&&(b=k);if((e=b["$end_with?"]("++"))===k||e.$$is_boolean&&1!=e)a["$<<"](b.$strip());else a["$<<"](b["$[]"](y(0,-3,!1)).$strip()),a["$<<"]("+");return a},h.$$s=a,h),b).call(e,[]);return r.get("Inline").$new(a,"kbd",k,D(["attributes"],{attributes:D(["keys"],{keys:g})})).$convert()},p.$$s=this,p),d).call(f,r.get("KbdBtnInlineMacroRx"))),(d=(l=U["$[]"]("macroish"),!1!==l&&l!==k?K["$include?"]("menu:"): l))===k||d.$$is_boolean&&1!=d||(K=(d=(l=K).$gsub,d.$$p=(h=function(){var a=h.$$s||this,b,e,g,c=k,d=k,m=c=d=k,m=c=k;null==x["~"]&&(x["~"]=k);c=x["~"];if((b=(d=c["$[]"](0))["$start_with?"]("\\"))!==k&&(!b.$$is_boolean||1==b))return d["$[]"](y(1,-1,!1));d=c["$[]"](1);c=c["$[]"](2);(b=c["$!"]())===k||b.$$is_boolean&&1!=b?(b=m=(e=c["$include?"](">"))===k||e.$$is_boolean&&1!=e?(e=c["$include?"](","))===k||e.$$is_boolean&&1!=e?k:",":">")===k||b.$$is_boolean&&1!=b?(m=[],c=c.$rstrip()):(m=(b=(e=c.$split(m)).$map, b.$$p=(g=function(a){null==a&&(a=k);return a.$strip()},g.$$s=a,g),b).call(e),c=m.$pop()):(m=[],c=k);return r.get("Inline").$new(a,"menu",k,D(["attributes"],{attributes:D(["menu","submenus","menuitem"],{menu:d,submenus:m,menuitem:c})})).$convert()},h.$$s=this,h),d).call(l,r.get("MenuInlineMacroRx"))),(d=(e=K["$include?"]('"'),!1!==e&&e!==k?K["$include?"](">"):e))===k||d.$$is_boolean&&1!=d||(K=(d=(e=K).$gsub,d.$$p=(w=function(){var b=w.$$s||this,e,h,g,d,m=k,f=k,v=f=m=m=k;null==x["~"]&&(x["~"]=k); m=x["~"];if((e=(f=m["$[]"](0))["$start_with?"]("\\"))!==k&&(!e.$$is_boolean||1==e))return f["$[]"](y(1,-1,!1));m=m["$[]"](1);e=a.to_ary((h=(g=m.$split(">")).$map,h.$$p=(d=function(a){null==a&&(a=k);return a.$strip()},d.$$s=b,d),h).call(g));m=null==e[0]?k:e[0];f=c.call(e,1);v=f.$pop();return r.get("Inline").$new(b,"menu",k,D(["attributes"],{attributes:D(["menu","submenus","menuitem"],{menu:m,submenus:f,menuitem:v})})).$convert()},w.$$s=this,w),d).call(e,r.get("MenuInlineRx"))));(d=(n=R=this.document.$extensions(), !1!==n&&n!==k?R["$inline_macros?"]():n))===k||d.$$is_boolean&&1!=d||(d=(n=R.$inline_macros()).$each,d.$$p=(C=function(a){var b=C.$$s||this,e,h,g;null==a&&(a=k);return K=(e=(h=K).$gsub,e.$$p=(g=function(){var b=g.$$s||this,e,h=k,c=k,h=k;null==x["~"]&&(x["~"]=k);h=x["~"];if((e=h["$[]"](0)["$start_with?"]("\\"))!==k&&(!e.$$is_boolean||1==e))return h["$[]"](0)["$[]"](y(1,-1,!1));c=h["$[]"](1);h=a.$config()["$[]"]("format")["$=="]("short")?D([],{}):a.$config()["$[]"]("content_model")["$=="]("attributes")? b.$parse_attributes(h["$[]"](2),!1!==(e=a.$config()["$[]"]("pos_attrs"))&&e!==k?e:[],D(["sub_input","unescape_input"],{sub_input:!0,unescape_input:!0})):D(["text"],{text:b.$unescape_bracketed_text(h["$[]"](2))});return a.$process_method()["$[]"](b,c,h)},g.$$s=b,g),e).call(h,a.$instance().$regexp())},C.$$s=this,C),d).call(n);(d=(q=U["$[]"]("macroish"),!1!==q&&q!==k?!1!==(I=K["$include?"]("image:"))&&I!==k?I:K["$include?"]("icon:"):q))===k||d.$$is_boolean&&1!=d||(K=(d=(q=K).$gsub,d.$$p=(v=function(){var a= v.$$s||this,b,e,h,g=k,c=e=k,d=k,d=g=k;null==a.document&&(a.document=k);null==x["~"]&&(x["~"]=k);g=x["~"];if((b=g["$[]"](0)["$start_with?"]("\\"))!==k&&(!b.$$is_boolean||1==b))return g["$[]"](0)["$[]"](y(1,-1,!1));e=a.$unescape_bracketed_text(g["$[]"](2));(b=g["$[]"](0)["$start_with?"]("icon:"))===k||b.$$is_boolean&&1!=b?(c="image",d=["alt","width","height"]):(c="icon",d=["size"]);g=a.$sub_attributes(g["$[]"](1));c["$=="]("icon")||a.document.$register("images",g);d=a.$parse_attributes(e,d);b="alt"; e=d;!1!==(h=e["$[]"](b))&&h!==k?h:e["$[]="](b,r.get("Helpers").$basename(g,!0).$tr("_-"," "));return r.get("Inline").$new(a,"image",k,D(["type","target","attributes"],{type:c,target:g,attributes:d})).$convert()},v.$$s=this,v),d).call(q,r.get("ImageInlineMacroRx")));(d=!1!==(I=U["$[]"]("macroish_short_form"))&&I!==k?I:U["$[]"]("round_bracket"))===k||d.$$is_boolean&&1!=d||(K=(d=(I=K).$gsub,d.$$p=(B=function(){var b=B.$$s||this,e,h,g=k,c=k,d=k,m=k,g=g=k;null==b.document&&(b.document=k);null==x["~"]&& (x["~"]=k);g=x["~"];if((e=g["$[]"](0)["$start_with?"]("\\"))!==k&&(!e.$$is_boolean||1==e))return g["$[]"](0)["$[]"](y(1,-1,!1));if((e=a.get("RUBY_ENGINE_OPAL"))!==k&&(!e.$$is_boolean||1==e)&&g["$[]"](1)["$=="](""))g["$[]="](1,k);c=0;d=k;if((e=m=g["$[]"](1))===k||e.$$is_boolean&&1!=e)d=g["$[]"](3),(e=(h=d["$start_with?"]("("),!1!==h&&h!==k?d["$end_with?"](")"):h))===k||e.$$is_boolean&&1!=e?c=2:(d=d["$[]"](y(1,-1,!0)),c=3);if((e=!1!==(h=m["$=="]("indexterm"))&&h!==k?h:c["$=="](3))===k||e.$$is_boolean&& 1!=e)return g=(e=m["$!"]())===k||e.$$is_boolean&&1!=e?b.$normalize_string(g["$[]"](2),!0):b.$normalize_string(d),b.document.$register("indexterms",[g]),r.get("Inline").$new(b,"indexterm",g,D(["type"],{type:"visible"})).$convert();g=(e=m["$!"]())===k||e.$$is_boolean&&1!=e?b.$split_simple_csv(b.$normalize_string(g["$[]"](2),!0)):b.$split_simple_csv(b.$normalize_string(d));b.document.$register("indexterms",[].concat(a.to_a(g)));return r.get("Inline").$new(b,"indexterm",k,D(["attributes"],{attributes:D(["terms"], {terms:g})})).$convert()},B.$$s=this,B),d).call(I,r.get("IndextermInlineMacroRx")));(d=(b=!1!==V&&V!==k)?K["$include?"]("://"):V)===k||d.$$is_boolean&&1!=d||(K=(d=(b=K).$gsub,d.$$p=(O=function(){var b=O.$$s||this,e,h,g,c,d=k,m=k,f=k,v=k,w=k,l=w=k,d=k;null==b.document&&(b.document=k);null==x["~"]&&(x["~"]=k);d=x["~"];if((e=d["$[]"](2)["$start_with?"]("\\"))!==k&&(!e.$$is_boolean||1==e))return""+d["$[]"](1)+d["$[]"](2)["$[]"](y(1,-1,!1))+d["$[]"](3);if((e=a.get("RUBY_ENGINE_OPAL"))!==k&&(!e.$$is_boolean|| 1==e)&&d["$[]"](3)["$=="](""))d["$[]="](3,k);if((e=(h=d["$[]"](1)["$=="]("link:"))?d["$[]"](3)["$!"]():d["$[]"](1)["$=="]("link:"))!==k&&(!e.$$is_boolean||1==e))return d["$[]"](0);m=(e=d["$[]"](1)["$!="]("link:"))===k||e.$$is_boolean&&1!=e?"":d["$[]"](1);f=d["$[]"](2);v="";if((e=!1!==(h=d["$[]"](3))&&h!==k?h:f["$!~"](r.get("UriTerminator")))===k||e.$$is_boolean&&1!=e)w=x["~"]["$[]"](0),")"["$==="](w)?(f=f["$[]"](y(0,-2,!1)),v=")"):";"["$==="](w)?(e=(h=m["$start_with?"]("<"),!1!==h&&h!==k?f["$end_with?"](">"): h))===k||e.$$is_boolean&&1!=e?(e=f["$end_with?"](");"))===k||e.$$is_boolean&&1!=e?(f=f["$[]"](y(0,-2,!1)),v=";"):(f=f["$[]"](y(0,-3,!1)),v=");"):(m=m["$[]"](y(4,-1,!1)),f=f["$[]"](y(0,-5,!1))):":"["$==="](w)&&((e=f["$end_with?"]("):"))===k||e.$$is_boolean&&1!=e?(f=f["$[]"](y(0,-2,!1)),v=":"):(f=f["$[]"](y(0,-3,!1)),v="):"));b.document.$register("links",f);w=D(["type","target"],{type:"link",target:f});l=k;if((e=d["$[]"](3)["$nil_or_empty?"]())===k||e.$$is_boolean&&1!=e){if((e=!1!==J&&J!==k?!1!==(g= d["$[]"](3)["$start_with?"]('"'))&&g!==k?g:(c=d["$[]"](3)["$include?"](","),!1!==c&&c!==k?d["$[]"](3)["$include?"]("="):c):J)===k||e.$$is_boolean&&1!=e)d=b.$sub_attributes(d["$[]"](3).$gsub("\\]","]"));else{l=b.$parse_attributes(b.$sub_attributes(d["$[]"](3).$gsub("\\]","]")),[]);if((e=l["$has_key?"]("id"))!==k&&(!e.$$is_boolean||1==e))w["$[]="]("id",l.$delete("id"));d=!1!==(e=l["$[]"](1))&&e!==k?e:""}(e=d["$end_with?"]("^"))===k||e.$$is_boolean&&1!=e||(d=d.$chop(),!1!==l&&l!==k?(e="window",h=l,!1!== (g=h["$[]"](e))&&g!==k?g:h["$[]="](e,"_blank")):l=D(["window"],{window:"_blank"}))}else d="";if((e=d["$empty?"]())!==k&&(!e.$$is_boolean||1==e))if(d=(e=b.document["$attr?"]("hide-uri-scheme"))===k||e.$$is_boolean&&1!=e?f:f.$sub(r.get("UriSniffRx"),""),!1!==l&&l!==k)l["$[]="]("role",("bare "+l["$[]"]("role")).$chomp(" "));else l=D(["role"],{role:"bare"});if(!1!==l&&l!==k)w["$[]="]("attributes",l);return""+m+r.get("Inline").$new(b,"anchor",d,w).$convert()+v},O.$$s=this,O),d).call(b,r.get("LinkInlineRx"))); (d=!1!==(L=(F=U["$[]"]("macroish"),!1!==F&&F!==k?K["$include?"]("link:"):F))&&L!==k?L:K["$include?"]("mailto:"))===k||d.$$is_boolean&&1!=d||(K=(d=(L=K).$gsub,d.$$p=(P=function(){var a=P.$$s||this,b,e,h,g=k,c=k,d=k,m=e=k,f=k,g=k;null==a.document&&(a.document=k);null==x["~"]&&(x["~"]=k);g=x["~"];if((b=g["$[]"](0)["$start_with?"]("\\"))!==k&&(!b.$$is_boolean||1==b))return g["$[]"](0)["$[]"](y(1,-1,!1));c=g["$[]"](1);d=g["$[]"](0)["$start_with?"]("mailto:");e=!1!==d&&d!==k?"mailto:"+c:c;m=D(["type","target"], {type:"link",target:e});f=k;if((b=!1!==J&&J!==k?!1!==(h=g["$[]"](2)["$start_with?"]('"'))&&h!==k?h:g["$[]"](2)["$include?"](","):J)===k||b.$$is_boolean&&1!=b)g=a.$sub_attributes(g["$[]"](2).$gsub("\\]","]"));else{f=a.$parse_attributes(a.$sub_attributes(g["$[]"](2).$gsub("\\]","]")),[]);if((b=f["$key?"]("id"))!==k&&(!b.$$is_boolean||1==b))m["$[]="]("id",f.$delete("id"));!1===d||d===k||(b=f["$key?"](2))===k||b.$$is_boolean&&1!=b||(e=m["$[]="]("target",""+e+"?subject="+r.get("Helpers").$encode_uri(f["$[]"](2))), (b=f["$key?"](3))===k||b.$$is_boolean&&1!=b||(e=m["$[]="]("target",""+e+"&body="+r.get("Helpers").$encode_uri(f["$[]"](3)))));g=f["$[]"](1)}a.document.$register("links",e);(b=g["$end_with?"]("^"))===k||b.$$is_boolean&&1!=b||(g=g.$chop(),!1!==f&&f!==k?(b="window",e=f,!1!==(h=e["$[]"](b))&&h!==k?h:e["$[]="](b,"_blank")):f=D(["window"],{window:"_blank"}));if((b=g["$empty?"]())!==k&&(!b.$$is_boolean||1==b))if(!1!==d&&d!==k)g=c;else if(g=(b=a.document["$attr?"]("hide-uri-scheme"))===k||b.$$is_boolean&& 1!=b?c:c.$sub(r.get("UriSniffRx"),""),!1!==f&&f!==k)f["$[]="]("role",("bare "+f["$[]"]("role")).$chomp(" "));else f=D(["role"],{role:"bare"});if(!1!==f&&f!==k)m["$[]="]("attributes",f);return r.get("Inline").$new(a,"anchor",g,m).$convert()},P.$$s=this,P),d).call(L,r.get("LinkInlineMacroRx")));(d=K["$include?"]("@"))===k||d.$$is_boolean&&1!=d||(K=(d=(F=K).$gsub,d.$$p=(N=function(){var a=N.$$s||this,b,e=k,h=k,e=e=k;null==a.document&&(a.document=k);null==x["~"]&&(x["~"]=k);e=x["~"];h=e["$[]"](0);if((b= e=e["$[]"](1))!==k&&(!b.$$is_boolean||1==b))return"\\"["$==="](e)?h["$[]"](y(1,-1,!1)):h;e="mailto:"+h;a.document.$register("links",e);return r.get("Inline").$new(a,"anchor",h,D(["type","target"],{type:"link",target:e})).$convert()},N.$$s=this,N),d).call(F,r.get("EmailInlineMacroRx")));(d=(t=U["$[]"]("macroish_short_form"),!1!==t&&t!==k?K["$include?"]("footnote"):t))===k||d.$$is_boolean&&1!=d||(K=(d=(t=K).$gsub,d.$$p=(T=function(){var b=T.$$s||this,e,h,g,c,d=k,m=k,f=k,v=d=k,w=k,f=k;null==b.document&& (b.document=k);null==x["~"]&&(x["~"]=k);d=x["~"];if((e=d["$[]"](0)["$start_with?"]("\\"))!==k&&(!e.$$is_boolean||1==e))return d["$[]"](0)["$[]"](y(1,-1,!1));d["$[]"](1)["$=="]("footnote")?(m=k,f=b.$restore_passthroughs(b.$sub_inline_xrefs(b.$sub_inline_anchors(b.$normalize_string(d["$[]"](2),!0))),!1),d=b.document.$counter("footnote-number"),b.document.$register("footnotes",r.get("Document").$$scope.get("Footnote").$new(d,m,f)),w=v=k):(e=a.to_ary(d["$[]"](2).$split(",",2)),m=null==e[0]?k:e[0],f=null== e[1]?k:e[1],m=m.$strip(),(e=f["$nil_or_empty?"]())===k||e.$$is_boolean&&1!=e?(f=b.$restore_passthroughs(b.$sub_inline_xrefs(b.$sub_inline_anchors(b.$normalize_string(f,!0))),!1),d=b.document.$counter("footnote-number"),b.document.$register("footnotes",r.get("Document").$$scope.get("Footnote").$new(d,m,f)),v="ref",w=k):((e=f=(h=(g=b.document.$references()["$[]"]("footnotes")).$find,h.$$p=(c=function(a){null==a&&(a=k);return a.$id()["$=="](m)},c.$$s=b,c),h).call(g))===k||e.$$is_boolean&&1!=e?(d=k,f= m):(d=f.$index(),f=f.$text()),w=m,m=k,v="xref"));return r.get("Inline").$new(b,"footnote",f,D(["attributes","id","target","type"],{attributes:D(["index"],{index:d}),id:m,target:w,type:v})).$convert()},T.$$s=this,T),d).call(t,r.get("FootnoteInlineMacroRx")));return this.$sub_inline_xrefs(this.$sub_inline_anchors(K,U),U)});a.defn(p,"$sub_inline_anchors",function(b,c){var d,f,l,h,e,w,p;null==c&&(c=k);(d=(f=!1!==(l=c["$!"]())&&l!==k?l:c["$[]"]("square_bracket"),!1!==f&&f!==k?b["$include?"]("[[["):f))=== k||d.$$is_boolean&&1!=d||(b=(d=(f=b).$gsub,d.$$p=(h=function(){var a=h.$$s||this,b,e=k,g=e=k;null==x["~"]&&(x["~"]=k);e=x["~"];if((b=e["$[]"](0)["$start_with?"]("\\"))!==k&&(!b.$$is_boolean||1==b))return e["$[]"](0)["$[]"](y(1,-1,!1));e=g=e["$[]"](1);return r.get("Inline").$new(a,"anchor",g,D(["type","target"],{type:"bibref",target:e})).$convert()},h.$$s=this,h),d).call(f,r.get("InlineBiblioAnchorRx")));(d=!1!==(l=(e=!1!==(w=c["$!"]())&&w!==k?w:c["$[]"]("square_bracket"),!1!==e&&e!==k?b["$include?"]("[["): e))&&l!==k?l:(e=!1!==(w=c["$!"]())&&w!==k?w:c["$[]"]("macroish"),!1!==e&&e!==k?b["$include?"]("anchor:"):e))===k||d.$$is_boolean&&1!=d||(b=(d=(l=b).$gsub,d.$$p=(p=function(){var b=p.$$s||this,e,h,g=k,c=k,g=k;null==x["~"]&&(x["~"]=k);g=x["~"];if((e=g["$[]"](0)["$start_with?"]("\\"))!==k&&(!e.$$is_boolean||1==e))return g["$[]"](0)["$[]"](y(1,-1,!1));if((e=a.get("RUBY_ENGINE_OPAL"))!==k&&(!e.$$is_boolean||1==e)){if(g["$[]"](1)["$=="](""))g["$[]="](1,k);if(g["$[]"](2)["$=="](""))g["$[]="](2,k);if(g["$[]"](4)["$=="](""))g["$[]="](4, k)}c=!1!==(e=g["$[]"](1))&&e!==k?e:g["$[]"](3);g=!1!==(e=!1!==(h=g["$[]"](2))&&h!==k?h:g["$[]"](4))&&e!==k?e:"["+c+"]";return r.get("Inline").$new(b,"anchor",g,D(["type","target"],{type:"ref",target:c})).$convert()},p.$$s=this,p),d).call(l,r.get("InlineAnchorRx")));return b});a.defn(p,"$sub_inline_xrefs",function(b,c){var d,f,l,h;null==c&&(c=k);(d=!1!==(f=!1!==(l=c["$!"]())&&l!==k?l:c["$[]"]("macroish"))&&f!==k?f:b["$include?"]("<<"))===k||d.$$is_boolean&&1!=d||(b=(d=(f=b).$gsub,d.$$p=(h=function(){var b= h.$$s||this,g,c,d,m,f,v,l=k,p=k,n=k,F=p=l=k,u=k,F=k;null==b.document&&(b.document=k);null==x["~"]&&(x["~"]=k);l=x["~"];if((g=l["$[]"](0)["$start_with?"]("\\"))!==k&&(!g.$$is_boolean||1==g))return l["$[]"](0)["$[]"](y(1,-1,!1));if((g=a.get("RUBY_ENGINE_OPAL"))!==k&&(!g.$$is_boolean||1==g)&&l["$[]"](1)["$=="](""))l["$[]="](1,k);if((g=l["$[]"](1))===k||g.$$is_boolean&&1!=g){if(p=l["$[]"](2),(g=l["$[]"](3)["$nil_or_empty?"]())===k||g.$$is_boolean&&1!=g)n=l["$[]"](3)}else g=a.to_ary((c=(d=l["$[]"](1).$split(",", 2)).$map,c.$$p=(m=function(a){null==a&&(a=k);return a.$strip()},m.$$s=b,m),c).call(d)),p=null==g[0]?k:g[0],n=null==g[1]?k:g[1],p=p.$sub(r.get("DoubleQuotedRx"),"\\2"),n=(g=n["$nil_or_empty?"]())===k||g.$$is_boolean&&1!=g?n.$sub(r.get("DoubleQuotedMultiRx"),"\\2"):k;(g=p["$include?"]("#"))===k||g.$$is_boolean&&1!=g?l=k:(g=a.to_ary(p.$split("#")),l=null==g[0]?k:g[0],p=null==g[1]?k:g[1]);!1!==l&&l!==k?(l=r.get("Helpers").$rootname(l),(g=!1!==(c=b.document.$attributes()["$[]"]("docname")["$=="](l))&& c!==k?c:b.document.$references()["$[]"]("includes")["$include?"](l))===k||g.$$is_boolean&&1!=g?(F=!1!==p&&p!==k?""+l+"#"+p:l,l=""+b.document.$attributes()["$[]"]("relfileprefix")+l+b.document.$attributes().$fetch("outfilesuffix",".html"),u=!1!==p&&p!==k?""+l+"#"+p:l):(F=p,l=k,u="#"+p)):((g=(c=(f=b.document.$references()["$[]"]("ids")["$has_key?"](p)["$!"](),!1!==f&&f!==k?!1!==(v=p["$include?"](" "))&&v!==k?v:p.$downcase()["$!="](p):f),!1!==c&&c!==k?F=(f=r.get("RUBY_MIN_VERSION_1_9"))===k||f.$$is_boolean&& 1!=f?b.document.$references()["$[]"]("ids").$index(p):b.document.$references()["$[]"]("ids").$key(p):c))===k||g.$$is_boolean&&1!=g||(p=F),F=p,u="#"+p);return r.get("Inline").$new(b,"anchor",n,D(["type","target","attributes"],{type:"xref",target:u,attributes:D(["path","fragment","refid"],{path:l,fragment:p,refid:F})})).$convert()},h.$$s=this,h),d).call(f,r.get("XrefInlineMacroRx")));return b});a.defn(p,"$sub_callouts",function(b){var c,d,f=k,f=(c=this["$attr?"]("line-comment"))===k||c.$$is_boolean&& 1!=c?r.get("CalloutSourceRx"):new RegExp("(?:"+a.get("Regexp").$escape(this.$attr("line-comment"))+" )?"+r.get("CalloutSourceRxt"));return(c=b.$gsub,c.$$p=(d=function(){var a=d.$$s||this,b=k;null==a.document&&(a.document=k);null==x["~"]&&(x["~"]=k);b=x["~"];return b["$[]"](1)["$=="]("\\")?b["$[]"](0).$sub("\\",""):r.get("Inline").$new(a,"callout",b["$[]"](3),D(["id"],{id:a.document.$callouts().$read_next_id()})).$convert()},d.$$s=this,d),c).call(b,f)});a.defn(p,"$sub_post_replacements",function(a){var b, c,d,f,h=k,e=k;null==this.document&&(this.document=k);null==this.attributes&&(this.attributes=k);if((b=!1!==(c=this.document.$attributes()["$has_key?"]("hardbreaks"))&&c!==k?c:this.attributes["$has_key?"]("hardbreaks-option"))===k||b.$$is_boolean&&1!=b)return(b=a["$include?"]("+"))===k||b.$$is_boolean&&1!=b?a:(b=a.$gsub,b.$$p=(f=function(){var a=f.$$s||this;null==x["~"]&&(x["~"]=k);return r.get("Inline").$new(a,"break",x["~"]["$[]"](1),D(["type"],{type:"line"})).$convert()},f.$$s=this,f),b).call(a, r.get("LineBreakRx"));h=a.$split(r.get("EOL"));if(h.$size()["$=="](1))return a;e=h.$pop();return q((b=(c=h).$map,b.$$p=(d=function(a){var b=d.$$s||this;null==a&&(a=k);return r.get("Inline").$new(b,"break",a.$rstrip().$chomp(r.get("LINE_BREAK")),D(["type"],{type:"line"})).$convert()},d.$$s=this,d),b).call(c).$push(e),r.get("EOL"))});a.defn(p,"$convert_quoted_text",function(a,b,c){var d,f=k,h=k,e=f=k,f=k;if((d=a["$[]"](0)["$start_with?"]("\\"))!==k&&(!d.$$is_boolean||1==d)){if((d=c["$=="]("constrained")? (h=a["$[]"](2))["$nil_or_empty?"]()["$!"]():c["$=="]("constrained"))===k||d.$$is_boolean&&1!=d)return a["$[]"](0)["$[]"](y(1,-1,!1));f="["+h+"]"}if(c["$=="]("constrained")){if(!1!==f&&f!==k)return""+f+r.get("Inline").$new(this,"quoted",a["$[]"](3),D(["type"],{type:b})).$convert();(d=f=this.$parse_quoted_text_attributes(a["$[]"](2)))===k||d.$$is_boolean&&1!=d?e=k:(e=f.$delete("id"),b["$=="]("mark")&&(b="unquoted"));return""+a["$[]"](1)+r.get("Inline").$new(this,"quoted",a["$[]"](3),D(["type","id", "attributes"],{type:b,id:e,attributes:f})).$convert()}(d=f=this.$parse_quoted_text_attributes(a["$[]"](1)))===k||d.$$is_boolean&&1!=d?e=k:(e=f.$delete("id"),b["$=="]("mark")&&(b="unquoted"));return r.get("Inline").$new(this,"quoted",a["$[]"](2),D(["type","id","attributes"],{type:b,id:e,attributes:f})).$convert()});a.defn(p,"$parse_quoted_text_attributes",function(b){var d,f,p,n=k,h=k,e=k,e=n=k;if(!1===b||b===k)return k;if((d=b["$empty?"]())!==k&&(!d.$$is_boolean||1==d))return D([],{});(d=b["$include?"]("{"))=== k||d.$$is_boolean&&1!=d||(b=this.$sub_attributes(b));b=b.$strip();(d=b["$include?"](","))===k||d.$$is_boolean&&1!=d||(d=a.to_ary(b.$split(",",2)),b=null==d[0]?k:d[0]);if((d=b["$empty?"]())===k||d.$$is_boolean&&1!=d){if((d=(f=!1!==(p=b["$start_with?"]("."))&&p!==k?p:b["$start_with?"]("#"),!1!==f&&f!==k?r.get("Compliance").$shorthand_property_syntax():f))===k||d.$$is_boolean&&1!=d)return D(["role"],{role:b});n=b.$split("#",2);l(n.$length(),1)?(d=a.to_ary(n["$[]"](1).$split(".")),h=null==d[0]?k:d[0], e=c.call(d,1)):(h=k,e=[]);n=(d=n["$[]"](0)["$empty?"]())===k||d.$$is_boolean&&1!=d?n["$[]"](0).$split("."):[];l(n.$length(),1)&&n.$shift();l(e.$length(),0)&&n.$concat(e);e=D([],{});if(!1!==h&&h!==k)e["$[]="]("id",h);if((d=n["$empty?"]())===k||d.$$is_boolean&&1!=d)e["$[]="]("role",q(n," "));return e}return D([],{})});a.defn(p,"$parse_attributes",function(a,b,d){var c,f=k,h=k;null==this.document&&(this.document=k);null==b&&(b=["role"]);null==d&&(d=D([],{}));if(!1===a||a===k)return k;if((c=a["$empty?"]())!== k&&(!c.$$is_boolean||1==c))return D([],{});(c=d["$[]"]("sub_input"))===k||c.$$is_boolean&&1!=c||(a=this.document.$sub_attributes(a));(c=d["$[]"]("unescape_input"))===k||c.$$is_boolean&&1!=c||(a=this.$unescape_bracketed_text(a));f=k;(c=d.$fetch("sub_result",!0))===k||c.$$is_boolean&&1!=c||(f=this);return(c=h=d["$[]"]("into"))===k||c.$$is_boolean&&1!=c?r.get("AttributeList").$new(a,f).$parse(b):r.get("AttributeList").$new(a,f).$parse_into(h,b)});a.defn(p,"$unescape_bracketed_text",function(a){var b; return(b=a["$empty?"]())===k||b.$$is_boolean&&1!=b?a.$strip().$tr(r.get("EOL")," ").$gsub("\\]","]"):""});a.defn(p,"$normalize_string",function(a,b){var c;null==b&&(b=!1);return(c=a["$empty?"]())===k||c.$$is_boolean&&1!=c?!1!==b&&b!==k?this.$unescape_brackets(a.$strip().$tr(r.get("EOL")," ")):a.$strip().$tr(r.get("EOL")," "):""});a.defn(p,"$unescape_brackets",function(a){var b;return(b=a["$empty?"]())===k||b.$$is_boolean&&1!=b?a.$gsub("\\]","]"):""});a.defn(p,"$split_simple_csv",function(a){var b, c,d,f,h=k,e=k,l=k;(b=a["$empty?"]())===k||b.$$is_boolean&&1!=b?(b=a["$include?"]('"'))===k||b.$$is_boolean&&1!=b?h=(b=(d=a.$split(",")).$map,b.$$p=(f=function(a){null==a&&(a=k);return a.$strip()},f.$$s=this,f),b).call(d):(h=[],e=[],l=!1,(b=a.$each_char,b.$$p=(c=function(a){var b=k;null==a&&(a=k);return function(){b=a;if(","["$==="](b)){if(!1!==l&&l!==k)return e.$push(a);h["$<<"](e.$join().$strip());return e=[]}return'"'["$==="](b)?l=l["$!"]():e.$push(a)}()},c.$$s=this,c),b).call(a),h["$<<"](e.$join().$strip())): h=[];return h});a.defn(p,"$resolve_subs",function(a,b,c,d){var p,h,e,w=k,E=k,C=k,t=k;null==b&&(b="block");null==c&&(c=k);null==d&&(d=k);if((p=a["$nil_or_empty?"]())!==k&&(!p.$$is_boolean||1==p))return[];w=k;E=r.get("SubModifierSniffRx")["$=~"](a);(p=(h=a.$tr(" ","").$split(",")).$each,p.$$p=(e=function(a){var e,h,d,g=k,l=h=h=h=k,g=k;null==a&&(a=k);g=k;!1!==E&&E!==k&&((h=a.$chr())["$=="]("+")?(g="append",a=a["$[]"](y(1,-1,!1))):h["$=="]("-")?(g="remove",a=a["$[]"](y(1,-1,!1))):(e=a["$end_with?"]("+"))=== k||e.$$is_boolean&&1!=e||(g="prepend",a=a.$chop()));a=a.$to_sym();(e=(h=b["$=="]("inline"))?!1!==(d=a["$=="]("verbatim"))&&d!==k?d:a["$=="]("v"):b["$=="]("inline"))===k||e.$$is_boolean&&1!=e?(e=r.get("COMPOSITE_SUBS")["$key?"](a))===k||e.$$is_boolean&&1!=e?(e=(h=b["$=="]("inline")?a.$length()["$=="](1):b["$=="]("inline"),!1!==h&&h!==k?r.get("SUB_SYMBOLS")["$key?"](a):h))===k||e.$$is_boolean&&1!=e?h=[a]:(h=r.get("SUB_SYMBOLS")["$[]"](a),h=(e=l=r.get("COMPOSITE_SUBS")["$[]"](h))===k||e.$$is_boolean&& 1!=e?[h]:l):h=r.get("COMPOSITE_SUBS")["$[]"](a):h=["specialcharacters"];if(!1!==g&&g!==k)return!1!==(e=w)&&e!==k?e:w=!1!==c&&c!==k?c.$dup():[],"append"["$==="](g)?w=n(w,h):"prepend"["$==="](g)?w=n(h,w):"remove"["$==="](g)?w=f(w,h):k;!1!==(e=w)&&e!==k?e:w=[];return w=n(w,h)},e.$$s=this,e),p).call(h);C=w["$&"](r.get("SUB_OPTIONS")["$[]"](b));if((p=f(w,C)["$empty?"]())===k||p.$$is_boolean&&1!=p)t=f(w,C),this.$warn("asciidoctor: WARNING: invalid substitution type"+(l(t.$size(),1)?"s":"")+(!1!==d&&d!== k?" for ":k)+d+": "+q(t,", "));return C});a.defn(p,"$resolve_block_subs",function(a,b,c){return this.$resolve_subs(a,"block",b,c)});a.defn(p,"$resolve_pass_subs",function(a){return this.$resolve_subs(a,"inline",k,"passthrough macro")});a.defn(p,"$highlight_source",function(b,c,d){var f,l,h,e,w,p=k,C=k,t=k,I=k,v=k,B=k,O=k,L=C=k,F=k,P=p=k,N=k;null==this.document&&(this.document=k);null==this.passthroughs&&(this.passthroughs=k);null==d&&(d=k);p=!1!==(f=d)&&f!==k?f:d=this.document.$attributes()["$[]"]("source-highlighter"); if("coderay"["$==="](p)){if((f=!1!==(l=C=null==a.Object.$$scope.CodeRay?k:"constant")&&l!==k?l:this.document.$attributes()["$[]"]("coderay-unavailable"))===k||f.$$is_boolean&&1!=f)(f=r.get("Helpers").$require_library("coderay",!0,"warn")["$nil?"]())===k||f.$$is_boolean&&1!=f?C=!0:this.document.$set_attr("coderay-unavailable",!0)}else if("pygments"["$==="](p)){if((f=!1!==(l=C=null==a.Object.$$scope.Pygments?k:"constant")&&l!==k?l:this.document.$attributes()["$[]"]("pygments-unavailable"))===k||f.$$is_boolean&& 1!=f)(f=r.get("Helpers").$require_library("pygments","pygments.rb","warn")["$nil?"]())===k||f.$$is_boolean&&1!=f?C=!0:this.document.$set_attr("pygments-unavailable",!0)}else C=!1;if(!1===C||C===k)return this.$sub_source(b,c);t=0;I=!1;!1!==c&&c!==k?(v=D([],{}),B=-1,O=(f=this["$attr?"]("line-comment"))===k||f.$$is_boolean&&1!=f?r.get("CalloutExtractRx"):new RegExp("(?:"+a.get("Regexp").$escape(this.$attr("line-comment"))+" )?"+r.get("CalloutExtractRxt")),b=q((f=(l=b.$split(r.get("EOL"))).$map,f.$$p= (h=function(a){var b=h.$$s||this,e,c,d;null==a&&(a=k);t=n(t,1);return(e=(c=a).$gsub,e.$$p=(d=function(){var a,b,e,h=k;null==x["~"]&&(x["~"]=k);h=x["~"];if(h["$[]"](1)["$=="]("\\"))return h["$[]"](0).$sub("\\","");(a=t,b=v,!1!==(e=b["$[]"](a))&&e!==k?e:b["$[]="](a,[]))["$<<"](h["$[]"](3));B=t;return k},d.$$s=b,d),e).call(c,O)},h.$$s=this,h),f).call(l),r.get("EOL")),I=B["$=="](t),(f=v["$empty?"]())===k||f.$$is_boolean&&1!=f||(v=k)):v=k;L=C=k;p=d;if("coderay"["$==="](p))(f=C=(e=this["$attr?"]("linenums"))=== k||e.$$is_boolean&&1!=e?k:(!1!==(e=this.document.$attributes()["$[]"]("coderay-linenums-mode"))&&e!==k?e:"table").$to_sym())===k||f.$$is_boolean&&1!=f||(f=this["$attr?"]("highlight",k,!1))===k||f.$$is_boolean&&1!=f||(L=this.$resolve_lines_to_highlight(this.$attr("highlight",k,!1))),F=a.get("CodeRay").$$scope.get("Duo")["$[]"](this.$attr("language","text",!1).$to_sym(),"html",D(["css","line_numbers","line_number_anchors","highlight_lines","bold_every"],{css:(!1!==(f=this.document.$attributes()["$[]"]("coderay-css"))&& f!==k?f:"class").$to_sym(),line_numbers:C,line_number_anchors:!1,highlight_lines:L,bold_every:!1})).$highlight(b);else if("pygments"["$==="](p)){p=!1!==(f=a.get("Pygments").$$scope.get("Lexer")["$[]"](this.$attr("language",k,!1)))&&f!==k?f:a.get("Pygments").$$scope.get("Lexer")["$[]"]("text");P=D(["cssclass","classprefix","nobackground"],{cssclass:"pyhl",classprefix:"tok-",nobackground:!0});(!1!==(f=this.document.$attributes()["$[]"]("pygments-css"))&&f!==k?f:"class")["$=="]("class")||(P["$[]="]("noclasses", !0),P["$[]="]("style",!1!==(f=this.document.$attributes()["$[]"]("pygments-style"))&&f!==k?f:r.get("Stylesheets").$$scope.get("DEFAULT_PYGMENTS_STYLE")));if((f=this["$attr?"]("highlight",k,!1))!==k&&(!f.$$is_boolean||1==f)&&((f=(L=this.$resolve_lines_to_highlight(this.$attr("highlight",k,!1)))["$empty?"]())===k||f.$$is_boolean&&1!=f))P["$[]="]("hl_lines",q(L," "));(f=this["$attr?"]("linenums"))===k||f.$$is_boolean&&1!=f?(P["$[]="]("nowrap",!0),F=p.$highlight(b,D(["options"],{options:P}))):P["$[]="]("linenos", !1!==(f=this.document.$attributes()["$[]"]("pygments-linenums-mode"))&&f!==k?f:"table")["$=="]("table")?(C="table",F=p.$highlight(b,D(["options"],{options:P})).$sub(/
(.*)<\/div>/m,"\\1").$gsub(/]*>(.*?)<\/pre>\s*/m,"\\1")):F=p.$highlight(b,D(["options"],{options:P})).$sub(/
]*>(.*?)<\/pre><\/div>/m,"\\1")}if((f=this.passthroughs["$empty?"]())===k||f.$$is_boolean&&1!=f)F=F.$gsub(r.get("PASS_MATCH_HI"),""+r.get("PASS_START")+"\\1"+r.get("PASS_END")); if((f=(e=!1!==c&&c!==k)?v:c)===k||f.$$is_boolean&&1!=f)return F;t=0;N=C["$!="]("table");return q((f=(e=F.$split(r.get("EOL"))).$map,f.$$p=(w=function(a){var b=w.$$s||this,e,h,c,d=k,g=k,f=k,d=k;null==b.document&&(b.document=k);null==a&&(a=k);if(!1===N||N===k){if((e=a["$include?"](''))===k||e.$$is_boolean&&1!=e)return a;N=!0}t=n(t,1);if((e=d=v.$delete(t))===k||e.$$is_boolean&&1!=e)return a;g=k;(e=(h=!1!==I&&I!==k)?v["$empty?"]():I)===k||e.$$is_boolean&&1!=e||((e=f=a.$index(""))=== k||e.$$is_boolean&&1!=e?a=""+a.$chomp(" ")+" ":(g=a["$[]"](y(f,-1,!1)),a=""+a["$[]"](y(0,f,!0)).$chomp(" ")+" "));if(d.$size()["$=="](1))return""+a+r.get("Inline").$new(b,"callout",d["$[]"](0),D(["id"],{id:b.document.$callouts().$read_next_id()})).$convert()+g;d=q((e=(h=d).$map,e.$$p=(c=function(a){var b=c.$$s||this;null==b.document&&(b.document=k);null==a&&(a=k);return r.get("Inline").$new(b,"callout",a,D(["id"],{id:b.document.$callouts().$read_next_id()})).$convert()},c.$$s=b,c),e).call(h)," "); return""+a+d+g},w.$$s=this,w),f).call(e),r.get("EOL"))});a.defn(p,"$resolve_lines_to_highlight",function(b){var c,d,l,p=k,p=[];(c=(d=b.$delete(" ").$split(r.get("DataDelimiterRx"))).$map,c.$$p=(l=function(b){var e,c=k,d=k,g=k,d=k;null==b&&(b=k);c=!1;(e=b["$start_with?"]("!"))===k||e.$$is_boolean&&1!=e||(b=b["$[]"](y(1,-1,!1)),c=!0);if((e=b["$include?"]("-"))===k||e.$$is_boolean&&1!=e)return!1!==c&&c!==k?p.$delete(b.$to_i()):p["$<<"](b.$to_i());e=a.to_ary(b.$split("-",2));d=null==e[0]?k:e[0];g=null== e[1]?k:e[1];d=y(d.$to_i(),g.$to_i(),!1).$to_a();return!1!==c&&c!==k?p=f(p,d):p.$concat(d)},l.$$s=this,l),c).call(d);return p.$sort().$uniq()});a.defn(p,"$sub_source",function(a,b){return!1!==b&&b!==k?this.$sub_callouts(this.$sub_specialchars(a)):this.$sub_specialchars(a)});a.defn(p,"$lock_in_subs",function(){var a,b,c,d,f,h=k,e=h=k;null==this.default_subs&&(this.default_subs=k);null==this.content_model&&(this.content_model=k);null==this.context&&(this.context=k);null==this.attributes&&(this.attributes= k);null==this.style&&(this.style=k);null==this.document&&(this.document=k);null==this.subs&&(this.subs=k);if((a=this.default_subs)===k||a.$$is_boolean&&1!=a)if(h=this.content_model,"simple"["$==="](h))h=r.get("SUBS")["$[]"]("normal");else if("verbatim"["$==="](h))h=(a=!1!==(b=this.context["$=="]("listing"))&&b!==k?b:(c=this.context["$=="]("literal"))?this["$option?"]("listparagraph")["$!"]():this.context["$=="]("literal"))===k||a.$$is_boolean&&1!=a?this.context["$=="]("verse")?r.get("SUBS")["$[]"]("normal"): r.get("SUBS")["$[]"]("basic"):r.get("SUBS")["$[]"]("verbatim");else if("raw"["$==="](h))h=this.context["$=="]("stem")?r.get("SUBS")["$[]"]("basic"):r.get("SUBS")["$[]"]("pass");else return k;else h=this.default_subs;(a=e=this.attributes["$[]"]("subs"))===k||a.$$is_boolean&&1!=a?this.subs=h.$dup():this.subs=this.$resolve_block_subs(e,h,this.context);return(a=(b=(c=(d=this.context["$=="]("listing")?this.style["$=="]("source"):this.context["$=="]("listing"),!1!==d&&d!==k?this.attributes["$[]"]("language"): d),!1!==c&&c!==k?this.document["$basebackend?"]("html"):c),!1!==b&&b!==k?r.get("SUB_HIGHLIGHT")["$include?"](this.document.$attributes()["$[]"]("source-highlighter")):b))===k||a.$$is_boolean&&1!=a?k:this.subs=(a=(b=this.subs).$map,a.$$p=(f=function(a){null==a&&(a=k);return a["$=="]("specialcharacters")?"highlight":a},f.$$s=this,f),a).call(b)})})(b(t,"Asciidoctor").$$scope.base)}(a.base)}; Opal.modules["asciidoctor/abstract_node"]=function(a){function n(a,c){return"number"===typeof a&&"number"===typeof c?a*c:a["$*"](c)}function q(a,c){return"number"===typeof a&&"number"===typeof c?a $[] $has_role? $header? $concat $find_by $to_proc $each $flatten $delete $title? $attributes $counter_increment $index= $+ $sectname $counter $numbered $number= $attr $caption= $special $doctype $assign_index $reindex_sections".split(" "));return function(D){D= d(D,"Asciidoctor").$$scope;(function(d,$super){function t(){}var p=t=c(d,$super,"AbstractBlock",t),r=p.$$proto,g=p.$$scope,m,u;r.document=r.attributes=r.blocks=r.source_location=r.subs=r.title=r.subbed_title=r.caption=r.next_section_index=r.context=r.style=r.id=r.header=r.next_section_number=l;p.$attr_accessor("content_model");p.$attr_reader("subs");p.$attr_reader("blocks");p.$attr_accessor("level");p.$attr_writer("title");p.$attr_accessor("style");p.$attr_accessor("caption");p.$attr_accessor("source_location"); a.defn(p,"$initialize",m=function(c,d,h){var e=k.call(arguments,0),g,f=m.$$p;null==h&&(h=b([],{}));m.$$p=null;a.find_super_dispatcher(this,"initialize",m,f).apply(this,e);this.content_model="compound";this.subs=[];this.default_subs=l;this.blocks=[];this.style=this.caption=this.title=this.id=l;this.level=d["$=="]("document")?0:(g=!1!==c&&c!==l?d["$!="]("section"):c)===l||g.$$is_boolean&&1!=g?l:c.$level();this.next_section_index=0;this.next_section_number=1;return this.source_location=l});a.defn(p, "$block?",function(){return!0});a.defn(p,"$inline?",function(){return!1});a.defn(p,"$context=",function(a){this.context=a;return this.node_name=a.$to_s()});a.defn(p,"$convert",function(){this.document.$playback_attributes(this.attributes);return this.$converter().$convert(this)});a.alias(p,"render","convert");a.defn(p,"$content",function(){var a,b,h;return n((a=(b=this.blocks).$map,a.$$p=(h=function(a){null==a&&(a=l);return a.$convert()},h.$$s=this,h),a).call(b),g.get("EOL"))});a.defn(p,"$file",function(){var a; return(a=this.source_location)===l||a.$$is_boolean&&1!=a?l:this.source_location.$file()});a.defn(p,"$lineno",function(){var a;return(a=this.source_location)===l||a.$$is_boolean&&1!=a?l:this.source_location.$lineno()});a.defn(p,"$sub?",function(a){return this.subs["$include?"](a)});a.defn(p,"$title?",function(){return this.title["$nil_or_empty?"]()["$!"]()});a.defn(p,"$title",function(){var a,b;return(a=(b=this.subbed_title,null!=b&&b!==l)?"instance-variable":l)===l||a.$$is_boolean&&1!=a?(a=this.title)=== l||a.$$is_boolean&&1!=a?this.title:this.subbed_title=this.$apply_title_subs(this.title):this.subbed_title});a.defn(p,"$captioned_title",function(){return""+this.caption+this.$title()});a.defn(p,"$blocks?",function(){return this.blocks["$empty?"]()["$!"]()});a.defn(p,"$<<",function(a){this.blocks["$<<"](a);return this});a.alias(p,"append","<<");a.defn(p,"$sections",function(){var a,b,h;return(a=(b=this.blocks).$select,a.$$p=(h=function(a){null==a&&(a=l);return a.$context()["$=="]("section")},h.$$s= this,h),a).call(b)});a.defn(p,"$sections?",function(){var a=this.next_section_index;return"number"===typeof a?0"](0)});a.defn(p,"$find_by",u=function(c){var d,h,e,g,m,k,p,n=u.$$p||l,v=l,B=l,r=l,q=l,F=l,P=l;null==c&&(c=b([],{}));u.$$p=null;v=[];if((d=(h=(e=(g=!1!==(m=B=(r=c["$[]"]("context"))["$!"]())&&m!==l?m:r["$=="](this.context),!1!==g&&g!==l?!1!==(m=(q=c["$[]"]("style"))["$!"]())&&m!==l?m:q["$=="](this.style):g),!1!==e&&e!==l?!1!==(g=(F=c["$[]"]("role"))["$!"]())&&g!==l?g:this["$has_role?"](F): e),!1!==h&&h!==l?!1!==(e=(P=c["$[]"]("id"))["$!"]())&&e!==l?e:P["$=="](this.id):h))!==l&&(!d.$$is_boolean||1==d)){if(!1!==P&&P!==l)return n!==l?(d=(h=a.yield1(n,this))===f?f.$v:h)===l||d.$$is_boolean&&1!=d?v:[this]:[this];if(n!==l){if((d=(h=a.yield1(n,this))===f?f.$v:h)!==l&&(!d.$$is_boolean||1==d))v["$<<"](this)}else v["$<<"](this)}(d=(h=(e=this.context["$=="]("document"))?!1!==(g=B)&&g!==l?g:r["$=="]("section"):this.context["$=="]("document"),!1!==h&&h!==l?this["$header?"]():h))===l||d.$$is_boolean&& 1!=d||v.$concat((d=(h=this.header).$find_by,d.$$p=n.$to_proc(),d).call(h,c));r["$=="]("document")||(this.context["$=="]("dlist")?(d=!1!==(e=B)&&e!==l?e:r["$!="]("section"))===l||d.$$is_boolean&&1!=d||(d=(e=this.blocks.$flatten()).$each,d.$$p=(k=function(a){var b,e;null==a&&(a=l);return!1!==a&&a!==l?v.$concat((b=(e=a).$find_by,b.$$p=n.$to_proc(),b).call(e,c)):l},k.$$s=this,k),d).call(e):d=(g=(m=this.blocks).$each,g.$$p=(p=function(a){var b,e;null==a&&(a=l);return(b=r["$=="]("section")?a.$context()["$!="]("section"): r["$=="]("section"))===l||b.$$is_boolean&&1!=b?v.$concat((b=(e=a).$find_by,b.$$p=n.$to_proc(),b).call(e,c)):l},p.$$s=this,p),g).call(m));return v});a.alias(p,"query","find_by");a.defn(p,"$remove_sub",function(a){this.subs.$delete(a);return l});a.defn(p,"$assign_caption",function(a,b){var h,e,c=l,d=c=c=l;null==a&&(a=l);null==b&&(b=l);if((h=!1!==(e=this["$title?"]())&&e!==l?e:this.caption["$!"]())===l||h.$$is_boolean&&1!=h)return l;!1!==a&&a!==l?this.caption=a:(h=c=this.document.$attributes()["$[]"]("caption"))=== l||h.$$is_boolean&&1!=h?(h=this["$title?"]())===l||h.$$is_boolean&&1!=h||(!1!==(h=b)&&h!==l?h:b=this.context.$to_s(),c=""+b+"-caption",(h=c=this.document.$attributes()["$[]"](c))===l||h.$$is_boolean&&1!=h||(d=this.document.$counter_increment(""+b+"-number",this),this.caption=""+c+" "+d+". ")):this.caption=c;return l});a.defn(p,"$assign_index",function(a){var b,h,e,c=l,d=l;b=[this.next_section_index];h=a;h["$index="].apply(h,b);b[b.length-1];this.next_section_index=q(this.next_section_index,1);return a.$sectname()["$=="]("appendix")? (c=this.document.$counter("appendix-number","A"),(b=a.$numbered())===l||b.$$is_boolean&&1!=b||(b=[c],h=a,h["$number="].apply(h,b),b[b.length-1]),(b=(d=this.document.$attr("appendix-caption",""))["$!="](""))===l||b.$$is_boolean&&1!=b?(b=[""+c+". "],h=a,h["$caption="].apply(h,b),b[b.length-1]):(b=[""+d+" "+c+": "],h=a,h["$caption="].apply(h,b),b[b.length-1])):(b=a.$numbered())===l||b.$$is_boolean&&1!=b?l:(b=(h=!1!==(e=a.$level()["$=="](1))&&e!==l?e:a.$level()["$=="](0)?a.$special():a.$level()["$=="](0), !1!==h&&h!==l?this.document.$doctype()["$=="]("book"):h))===l||b.$$is_boolean&&1!=b?(b=[this.next_section_number],h=a,h["$number="].apply(h,b),b[b.length-1],this.next_section_number=q(this.next_section_number,1)):(b=[this.document.$counter("chapter-number",1)],h=a,h["$number="].apply(h,b),b[b.length-1])});return(a.defn(p,"$reindex_sections",function(){var a,b,h;this.next_section_number=this.next_section_index=0;return(a=(b=this.blocks).$each,a.$$p=(h=function(a){var b=h.$$s||this;null==a&&(a=l);return a.$context()["$=="]("section")? (b.$assign_index(a),a.$reindex_sections()):l},h.$$s=this,h),a).call(b)}),l)&&"reindex_sections"})(D.base,D.get("AbstractNode"))}(a.base)}; Opal.modules["asciidoctor/attribute_list"]=function(a){function n(a,c){return"number"===typeof a&&"number"===typeof c?a+c:a["$+"](c)}a.dynamic_require_severity="ignore";var q=a.nil,l=a.module,f=a.klass,k=a.hash2;a.add_stubs("$== $new $[] $update $parse $parse_attribute $eos? $skip_delimiter $+ $rekey $each_with_index $[]= $skip_blank $peek $parse_attribute_value $get_byte $scan_name $! $!= $* $scan_to_delimiter $=== $each $split $tr $empty? $apply_normal_subs $scan_to_quote $gsub $skip $scan".split(" "));return function(d){(function(c, $super){function d(){}var l=d=f(c,$super,"AttributeList",d),y=l.$$proto,t=l.$$scope;y.attributes=y.scanner=y.delimiter=y.block=y.delimiter_skip_pattern=y.delimiter_boundary_pattern=q;a.get("RUBY_ENGINE")["$=="]("opal")&&(a.cdecl(t,"CG_BLANK","[ \\t]"),a.cdecl(t,"CC_WORD","a-zA-Z0-9_"),a.cdecl(t,"CG_WORD","[a-zA-Z0-9_]"));a.cdecl(t,"BoundaryRxs",k(['"',"'",","],{'"':/.*?[^\\](?=")/,"'":/.*?[^\\](?=')/,",":new RegExp(".*?(?="+t.get("CG_BLANK")+"*(,|$))")}));a.cdecl(t,"EscapedQuoteRxs",k(['"',"'"],{'"':/\\"/, "'":/\\'/}));a.cdecl(t,"NameRx",new RegExp(""+t.get("CG_WORD")+"["+t.get("CC_WORD")+"\\-.]*"));a.cdecl(t,"BlankRx",new RegExp(""+t.get("CG_BLANK")+"+"));a.cdecl(t,"SkipRxs",k(["blank",","],{blank:t.get("BlankRx"),",":new RegExp(""+t.get("CG_BLANK")+"*(,|$)")}));a.defn(l,"$initialize",function(c,d,g){null==d&&(d=q);null==g&&(g=",");this.scanner=a.get("StringScanner").$new(c);this.block=d;this.delimiter=g;this.delimiter_skip_pattern=t.get("SkipRxs")["$[]"](g);this.delimiter_boundary_pattern=t.get("BoundaryRxs")["$[]"](g); return this.attributes=q});a.defn(l,"$parse_into",function(a,c){null==c&&(c=[]);return a.$update(this.$parse(c))});a.defn(l,"$parse",function(a){var c,d,f=q;null==a&&(a=[]);if((c=this.attributes)!==q&&(!c.$$is_boolean||1==c))return this.attributes;this.attributes=k([],{});for(f=0;(d=this.$parse_attribute(f,a))!==q&&(!d.$$is_boolean||1==d)&&((d=this.scanner["$eos?"]())===q||d.$$is_boolean&&1!=d);)this.$skip_delimiter(),f=n(f,1);return this.attributes});a.defn(l,"$rekey",function(a){return t.get("AttributeList").$rekey(this.attributes, a)});a.defs(l,"$rekey",function(a,c){var d,f;(d=c.$each_with_index,d.$$p=(f=function(c,d){var g,h=q,e=q;null==c&&(c=q);null==d&&(d=q);if(!1===c||c===q)return q;h=n(d,1);return(g=e=a["$[]"](h))===q||g.$$is_boolean&&1!=g?q:a["$[]="](c,e)},f.$$s=this,f),d).call(c);return a});a.defn(l,"$parse_attribute",function(a,c){var d,f,k,l,t=q,h=q,e=h=q,w=q,E=q,h=t=w=q;null==a&&(a=0);null==c&&(c=[]);t=!1;this.$skip_blank();if((h=this.scanner.$peek(1))["$=="]('"'))h=this.$parse_attribute_value(this.scanner.$get_byte()), e=q;else if(h["$=="]("'"))h=this.$parse_attribute_value(this.scanner.$get_byte()),e=q,t=!0;else{h=this.$scan_name();w=0;E=q;if((d=this.scanner["$eos?"]())===q||d.$$is_boolean&&1!=d)w=!1!==(d=this.$skip_blank())&&d!==q?d:0,E=this.scanner.$get_byte();else if(!1===h||h===q)return!1;if((d=!1!==(f=E["$!"]())&&f!==q?f:E["$=="](this.delimiter))===q||d.$$is_boolean&&1!=d)if((d=!1!==(f=E["$!="]("="))&&f!==q?f:h["$!"]())===q||d.$$is_boolean&&1!=d){if(this.$skip_blank(),(d=this.scanner.$peek(1))!==q&&(!d.$$is_boolean|| 1==d))if((E=this.scanner.$get_byte())["$=="]('"'))e=this.$parse_attribute_value(E);else if(E["$=="]("'"))e=this.$parse_attribute_value(E),t=!0;else if(E["$=="](this.delimiter))e=q;else if(e=""+E+this.$scan_to_delimiter(),e["$=="]("None"))return!0}else h=""+h+" "["$*"](w)+E+this.$scan_to_delimiter(),e=q;else e=q}if(!1!==e&&e!==q)if(w=h,"options"["$==="](w)||"opts"["$==="](w))h="options",(d=(f=e.$tr(" ","").$split(",")).$each,d.$$p=(k=function(a){var e=k.$$s||this;null==e.attributes&&(e.attributes= q);null==a&&(a=q);return e.attributes["$[]="](""+a+"-option","")},k.$$s=this,k),d).call(f),this.attributes["$[]="](h,e);else if("title"["$==="](w))this.attributes["$[]="](h,e);else this.attributes["$[]="](h,(d=(l=!1!==t&&t!==q?e["$empty?"]()["$!"]():t,!1!==l&&l!==q?this.block:l))===q||d.$$is_boolean&&1!=d?e:this.block.$apply_normal_subs(e));else{t=(d=(l=!1!==t&&t!==q?h["$empty?"]()["$!"]():t,!1!==l&&l!==q?this.block:l))===q||d.$$is_boolean&&1!=d?h:this.block.$apply_normal_subs(h);if((d=h=c["$[]"](a))!== q&&(!d.$$is_boolean||1==d))this.attributes["$[]="](h,t);this.attributes["$[]="](n(a,1),t)}return!0});a.defn(l,"$parse_attribute_value",function(a){var c,d=q;if(this.scanner.$peek(1)["$=="](a))return this.scanner.$get_byte(),"";if((c=d=this.$scan_to_quote(a))===q||c.$$is_boolean&&1!=c)return""+a+this.$scan_to_delimiter();this.scanner.$get_byte();return d.$gsub(t.get("EscapedQuoteRxs")["$[]"](a),a)});a.defn(l,"$skip_blank",function(){return this.scanner.$skip(t.get("BlankRx"))});a.defn(l,"$skip_delimiter", function(){return this.scanner.$skip(this.delimiter_skip_pattern)});a.defn(l,"$scan_name",function(){return this.scanner.$scan(t.get("NameRx"))});a.defn(l,"$scan_to_delimiter",function(){return this.scanner.$scan(this.delimiter_boundary_pattern)});return(a.defn(l,"$scan_to_quote",function(a){return this.scanner.$scan(t.get("BoundaryRxs")["$[]"](a))}),q)&&"scan_to_quote"})(l(d,"Asciidoctor").$$scope.base,null)}(a.base)}; Opal.modules["asciidoctor/block"]=function(a){function n(a,b){return"number"===typeof a&&"number"===typeof b?a*b:a["$*"](b)}a.dynamic_require_severity="ignore";var q=a.nil,l=a.slice,f=a.module,k=a.klass,d=a.hash2;a.add_stubs("$default= $attr_accessor $[] $key? $== $=== $dup $delete $[]= $lock_in_subs $nil_or_empty? $normalize_lines_from_string $apply_subs $* $< $size $empty? $rstrip $shift $pop $warn $to_s $class $object_id $inspect".split(" "));return function(c){c=f(c,"Asciidoctor").$$scope;(function(b, $super){function c(){}var f=c=k(b,$super,"Block",c),t=f.$$proto,p=f.$$scope,r,g,m;t.attributes=t.content_model=t.lines=t.subs=t.blocks=t.context=t.style=q;t=["simple"];r=a.cdecl(p,"DEFAULT_CONTENT_MODEL",d("audio image listing literal stem open page_break pass thematic_break video".split(" "),{audio:"empty",image:"empty",listing:"verbatim",literal:"verbatim",stem:"raw",open:"compound",page_break:"empty",pass:"raw",thematic_break:"empty",video:"empty"}));r["$default="].apply(r,t);t[t.length-1];a.alias(f, "blockname","context");f.$attr_accessor("lines");a.defn(f,"$initialize",g=function(b,c,f){var h=l.call(arguments,0),e,m=g.$$p,k=q,n=q;null==f&&(f=d([],{}));g.$$p=null;a.find_super_dispatcher(this,"initialize",g,m).apply(this,h);this.content_model=!1!==(e=f["$[]"]("content_model"))&&e!==q?e:p.get("DEFAULT_CONTENT_MODEL")["$[]"](c);(e=f["$key?"]("subs"))===q||e.$$is_boolean&&1!=e?(this.subs=[],this.default_subs=q):(e=k=f["$[]"]("subs"))===q||e.$$is_boolean&&1!=e?(this.subs=[],this.default_subs=[],this.attributes.$delete("subs")): (k["$=="]("default")?this.default_subs=f["$[]"]("default_subs"):(e=a.get("Array")["$==="](k))===q||e.$$is_boolean&&1!=e?(this.default_subs=q,this.attributes["$[]="]("subs",""+k)):(this.default_subs=k.$dup(),this.attributes.$delete("subs")),this.$lock_in_subs());return(e=(n=f["$[]"]("source"))["$nil_or_empty?"]())===q||e.$$is_boolean&&1!=e?(e=a.get("String")["$==="](n))===q||e.$$is_boolean&&1!=e?this.lines=n.$dup():this.lines=p.get("Helpers").$normalize_lines_from_string(n):this.lines=[]});a.defn(f, "$content",m=function(){var b=l.call(arguments,0),c,d,h=this,e=m.$$p,g=q,f=q,k=q,r=q;m.$$p=null;return function(){g=h.content_model;if("compound"["$==="](g))return a.find_super_dispatcher(h,"content",m,e).apply(h,b);if("simple"["$==="](g))return h.$apply_subs(n(h.lines,p.get("EOL")),h.subs);if("verbatim"["$==="](g)||"raw"["$==="](g)){f=h.$apply_subs(h.lines,h.subs);var l=f.$size();if("number"===typeof l?2>l:l["$<"](2))return f["$[]"](0);for(;(c=(d=k=f["$[]"](0),!1!==d&&d!==q?k.$rstrip()["$empty?"](): d))!==q&&(!c.$$is_boolean||1==c);)f.$shift();for(;(c=(d=r=f["$[]"](-1),!1!==d&&d!==q?r.$rstrip()["$empty?"]():d))!==q&&(!c.$$is_boolean||1==c);)f.$pop();return n(f,p.get("EOL"))}h.content_model["$=="]("empty")||h.$warn("Unknown content model '"+h.content_model+"' for block: "+h.$to_s());return q}()});a.defn(f,"$source",function(){return n(this.lines,p.get("EOL"))});return(a.defn(f,"$to_s",function(){var a=q,a=this.content_model["$=="]("compound")?"blocks: "+this.blocks.$size():"lines: "+this.lines.$size(); return"#<"+this.$class()+"@"+this.$object_id()+" {context: "+this.context.$inspect()+", content_model: "+this.content_model.$inspect()+", style: "+this.style.$inspect()+", "+a+"}>"}),q)&&"to_s"})(c.base,c.get("AbstractBlock"))}(a.base)}; Opal.modules["asciidoctor/callouts"]=function(a){function n(a,b){return"number"===typeof a&&"number"===typeof b?a+b:a["$+"](b)}function q(a,b){return"number"===typeof a&&"number"===typeof b?a-b:a["$-"](b)}a.dynamic_require_severity="ignore";var l=a.nil,f=a.module,k=a.klass,d=a.hash2;a.add_stubs("$next_list $<< $current_list $to_i $generate_next_callout_id $+ $<= $size $[] $- $chop $join $map $== $< $generate_callout_id".split(" "));return function(c){(function(b,$super){function c(){}var f=c=k(b, $super,"Callouts",c),t=f.$$proto;t.co_index=t.lists=t.list_index=l;a.defn(f,"$initialize",function(){this.lists=[];this.list_index=0;return this.$next_list()});a.defn(f,"$register",function(a){var b=l;this.$current_list()["$<<"](d(["ordinal","id"],{ordinal:a.$to_i(),id:b=this.$generate_next_callout_id()}));this.co_index=n(this.co_index,1);return b});a.defn(f,"$read_next_id",function(){var a=l,b=l,a=l,b=this.$current_list(),c=this.co_index,d=b.$size();if("number"===typeof c&&"number"===typeof d?c<= d:c["$<="](d))a=b["$[]"](q(this.co_index,1))["$[]"]("id");this.co_index=n(this.co_index,1);return a});a.defn(f,"$callout_ids",function(a){var b,c,d;return(b=(c=this.$current_list()).$map,b.$$p=(d=function(b){null==b&&(b=l);return b["$[]"]("ordinal")["$=="](a)?""+b["$[]"]("id")+" ":l},d.$$s=this,d),b).call(c).$join().$chop()});a.defn(f,"$current_list",function(){return this.lists["$[]"](q(this.list_index,1))});a.defn(f,"$next_list",function(){this.list_index=n(this.list_index,1);var a=this.lists.$size(), b=this.list_index;if("number"===typeof a&&"number"===typeof b?am&&(m=0);for(var l=Array(m),n=0;n=b:a["$>="](b)}function q(a,b){return"number"===typeof a&&"number"===typeof b?a*b:a["$*"](b)}function l(a,b){return"number"===typeof a&&"number"===typeof b?a>b:a["$>"](b)}function f(a,b){return"number"===typeof a&&"number"===typeof b?a<=b:a["$<="](b)}function k(a,b){return"number"===typeof a&&"number"===typeof b?a= $safe $attr? $<< $doctitle $include? $normalize_web_path $embed_primary_stylesheet $read_asset $normalize_system_path $=== $coderay_stylesheet_name $embed_coderay_stylesheet $pygments_stylesheet_name $embed_pygments_stylesheet $docinfo $id $sections? $doctype $* $noheader $outline $has_header? $notitle $title $header $sub_macros $> $to_i $each $downcase $concat $content $footnotes? $! $index $text $footnotes $nofooter $inspect $!= $document $sections $level $special $numbered $caption $<= $sectnum $< $captioned_title $+ $role $title? $icon_uri $compact $style $media_uri $option? $append_boolean_attribute $each_with_index $items $text? $blocks? $chomp $read_svg_contents $image_uri $to_sym $start_with? $end_with? $list_marker_keyword $parent $warn $context $times $size $columns $colspan $rowspan $rows $select $role? $insert $split $target $type $attributes $references $join $map $chop $read_contents $sub $gsub $match".split(" ")); return function(t){t=b(t,"Asciidoctor").$$scope;(function(b,$super){function g(){}var m=g=D(b,$super,"Html5Converter",g),u=m.$$proto,t=m.$$scope,z;u.xml_mode=u.void_element_slash=u.stylesheets=c;u=[[c,c,c]];z=a.cdecl(t,"QUOTE_TAGS",x("emphasis strong monospaced superscript subscript double single mark asciimath latexmath".split(" "),{emphasis:["","",!0],strong:["","",!0],monospaced:["","",!0],superscript:["","",!0],subscript:["","",!0], "double":["“","”",!1],single:["‘","’",!1],mark:["","",!0],asciimath:["\\$","\\$",!1],latexmath:["\\(","\\)",!1]}));z["$default="].apply(z,u);u[u.length-1];a.cdecl(t,"SvgPreambleRx",/\A.*?(?=])/m);a.cdecl(t,"SvgStartTagRx",/\A]*>/);a.cdecl(t,"DimensionAttributeRx",/\s(?:width|height|style)=(["']).*?\1/);a.defn(m,"$initialize",function(a,b){var d;null==b&&(b=x([],{}));this.xml_mode=b["$[]"]("htmlsyntax")["$=="]("xml");this.void_element_slash=(d=this.xml_mode)=== c||d.$$is_boolean&&1!=d?c:"/";return this.stylesheets=t.get("Stylesheets").$instance()});a.defn(m,"$document",function(a){var b,d,g,f,k,m,v=c,B=c,p=c,L=c,F=c,P=c,u=c,z=P=u=P=u=L=u=L=u=c,B=B=P=P=u=c,v=[],B=this.void_element_slash,p="";if((b=(L=a.$attr("asset-uri-scheme","https"))["$empty?"]())===c||b.$$is_boolean&&1!=b)L=""+L+":";F=""+L+"//cdnjs.cloudflare.com/ajax/libs";P=!1!==(b=n(a.$safe(),t.get("SafeMode").$$scope.get("SECURE")))&&b!==c?b:a["$attr?"]("linkcss");v["$<<"](""); u=(b=a["$attr?"]("nolang"))===c||b.$$is_boolean&&1!=b?' lang="'+a.$attr("lang","en")+'"':c;v["$<<"]("");v["$<<"]('\n\n\x3c!--[if IE]>\n");if((b=a["$attr?"]("app-name"))!==c&&(!b.$$is_boolean||1==b))v["$<<"]('");if((b=a["$attr?"]("description"))!==c&&(!b.$$is_boolean||1==b))v["$<<"]('");if((b=a["$attr?"]("keywords"))!==c&&(!b.$$is_boolean||1==b))v["$<<"]('");if((b=a["$attr?"]("authors"))!==c&&(!b.$$is_boolean||1==b))v["$<<"]('");if((b=a["$attr?"]("copyright"))!==c&&(!b.$$is_boolean||1==b))v["$<<"]('");v["$<<"](""+a.$doctitle(x(["sanitize","use_fallback"],{sanitize:!0,use_fallback:!0}))+"");if((b=t.get("DEFAULT_STYLESHEET_KEYS")["$include?"](a.$attr("stylesheet")))!==c&&(!b.$$is_boolean||1==b)){if((b=u=a.$attr("webfonts"))!==c&&(!b.$$is_boolean||1==b))v["$<<"]('");if(!1!==P&&P!==c)v["$<<"]('");else v["$<<"](this.stylesheets.$embed_primary_stylesheet())}else if((b=a["$attr?"]("stylesheet"))!==c&&(!b.$$is_boolean||1==b))if(!1!==P&&P!==c)v["$<<"]('");else v["$<<"]("");if((b=a["$attr?"]("icons","font"))!==c&&(!b.$$is_boolean||1==b))if((b=a["$attr?"]("iconfont-remote"))===c||b.$$is_boolean&&1!=b)L=""+a.$attr("iconfont-name","font-awesome")+".css",v["$<<"]('");else v["$<<"]('");u=L=a.$attr("source-highlighter");if("coderay"["$==="](u)){if(a.$attr("coderay-css","class")["$=="]("class"))if(!1!==P&&P!==c)v["$<<"]('");else v["$<<"](this.stylesheets.$embed_coderay_stylesheet())}else if("pygments"["$==="](u)&& a.$attr("pygments-css","class")["$=="]("class"))if(u=a.$attr("pygments-style"),!1!==P&&P!==c)v["$<<"]('");else v["$<<"](this.stylesheets.$embed_pygments_stylesheet(u));if((b=(P=a.$docinfo())["$empty?"]())===c||b.$$is_boolean&&1!=b)v["$<<"](P);v["$<<"]("");u=[];if((b=a.$id())!==c&&(!b.$$is_boolean||1==b))u["$<<"]('id="'+a.$id()+'"');if((b=(d=(g=(f=P=a["$sections?"](), !1!==f&&f!==c?a["$attr?"]("toc-class"):f),!1!==g&&g!==c?a["$attr?"]("toc"):g),!1!==d&&d!==c?a["$attr?"]("toc-placement","auto"):d))===c||b.$$is_boolean&&1!=b)u["$<<"]('class="'+a.$doctype()+'"');else u["$<<"]('class="'+a.$doctype()+" "+a.$attr("toc-class")+" toc-"+a.$attr("toc-position","header")+'"');if((b=a["$attr?"]("max-width"))!==c&&(!b.$$is_boolean||1==b))u["$<<"]('style="max-width: '+a.$attr("max-width")+';"');v["$<<"]("");if((b=a.$noheader())===c||b.$$is_boolean&&1!=b){v["$<<"]('")}v["$<<"]('
\n'+a.$content()+"\n
");(b=(g=a["$footnotes?"](),!1!==g&&g!==c?a["$attr?"]("nofootnotes")["$!"]():g))===c||b.$$is_boolean&&1!=b||(v["$<<"]('
\n"),(b=(g=a.$footnotes()).$each,b.$$p=(m=function(a){null==a&&(a=c);return v["$<<"]('
\n'+a.$index()+". "+a.$text()+"\n
")},m.$$s=this,m),b).call(g),v["$<<"]("
"));if((b=a.$nofooter())===c||b.$$is_boolean&&1!=b){v["$<<"]('")}if((b=(P=a.$docinfo("footer"))["$empty?"]())===c||b.$$is_boolean&&1!=b)v["$<<"](P);u=L;"highlightjs"["$==="](u)||"highlight.js"["$==="](u)?(P=a.$attr("highlightjsdir",""+F+"/highlight.js/8.9.1"),v["$<<"]('"),v["$<<"]('