asciidoctor-html5s
Version:
Semantic HTML5 backend (converter) for Asciidoctor
4,465 lines • 207 kB
JavaScript
(function (Opal) {
function initialize (Opal) {
/* Generated by Opal 0.11.99.dev */
Opal.modules["asciidoctor/html5s/version"] = function(Opal) {
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module;
return (function($base, $parent_nesting) {
var self = $module($base, 'Asciidoctor');
var $nesting = [self].concat($parent_nesting);
(function($base, $parent_nesting) {
var self = $module($base, 'Html5s');
var $nesting = [self].concat($parent_nesting);
Opal.const_set($nesting[0], 'VERSION', "0.5.1")
})($nesting[0], $nesting)
})($nesting[0], $nesting)
};
/* Generated by Opal 0.11.99.dev */
Opal.modules["asciidoctor/html5s/replacements"] = function(Opal) {
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module;
Opal.add_stubs(['$==', '$unshift']);
if ($$($nesting, 'RUBY_PLATFORM')['$==']("opal")) {
} else {
nil
};
return (function($base, $parent_nesting) {
var self = $module($base, 'Asciidoctor');
var $nesting = [self].concat($parent_nesting);
$$($nesting, 'REPLACEMENTS').$unshift([/(^|\n| )---( |\n|$)/, " — ", "none"], [new RegExp("" + "(" + ($$($nesting, 'CG_WORD')) + ")---(?=" + ($$($nesting, 'CG_WORD')) + ")"), "—​", "leading"], [/(^|\n|\\| )--( |\n|$)/, " – ", "none"], [new RegExp("" + "(" + ($$($nesting, 'CG_WORD')) + ")\\\\?--(?=" + ($$($nesting, 'CG_WORD')) + ")"), "–", "leading"])
})($nesting[0], $nesting);
};
/* Generated by Opal 0.11.99.dev */
Opal.modules["asciidoctor/html5s/attached_colist_treeprocessor"] = function(Opal) {
function $rb_minus(lhs, rhs) {
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs);
}
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send, $hash2 = Opal.hash2;
Opal.add_stubs(['$require', '$==', '$!=', '$backend', '$find_by', '$blocks', '$parent', '$find_index', '$[]', '$-', '$node_name', '$instance_variable_set', '$create_block', '$[]=']);
self.$require("asciidoctor/html5s/version");
if ($$($nesting, 'RUBY_PLATFORM')['$==']("opal")) {
} else {
nil
};
return (function($base, $parent_nesting) {
var self = $module($base, 'Html5s');
var $nesting = [self].concat($parent_nesting);
(function($base, $super, $parent_nesting) {
var self = $klass($base, $super, 'AttachedColistTreeprocessor');
var $nesting = [self].concat($parent_nesting), $AttachedColistTreeprocessor_process$1;
return (Opal.def(self, '$process', $AttachedColistTreeprocessor_process$1 = function $$process(document) {
var $$2, self = this;
if ($truthy(document.$backend()['$!=']("html5s"))) {
return nil};
return $send(document, 'find_by', [$hash2(["context"], {"context": "colist"})], ($$2 = function(colist){var self = $$2.$$s || this, $a, blocks = nil, colist_idx = nil, prev_block = nil, $writer = nil;
if (colist == null) {
colist = nil;
};
blocks = colist.$parent().$blocks();
colist_idx = blocks.$find_index(colist);
if ($truthy(colist_idx)) {
prev_block = blocks['$[]']($rb_minus(colist_idx, 1))};
if ($truthy(($truthy($a = prev_block) ? prev_block.$node_name()['$==']("listing") : $a))) {
prev_block.$instance_variable_set("@html5s_colist", colist);
$writer = [colist_idx, self.$create_block(colist.$parent(), "empty", "", $hash2([], {}))];
$send(blocks, '[]=', Opal.to_a($writer));
return $writer[$rb_minus($writer["length"], 1)];;
} else {
return nil
};}, $$2.$$s = self, $$2.$$arity = 1, $$2));
}, $AttachedColistTreeprocessor_process$1.$$arity = 1), nil) && 'process'
})($nesting[0], $$$($$$($$$('::', 'Asciidoctor'), 'Extensions'), 'Treeprocessor'), $nesting)
})($$($nesting, 'Asciidoctor'), $nesting);
};
/* Generated by Opal 0.11.99.dev */
Opal.modules["asciidoctor/html5s/html_pipeline_highlighter"] = function(Opal) {
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy;
Opal.add_stubs(['$register_for', '$!=', '$send', '$singleton_class', '$content']);
return (function($base, $parent_nesting) {
var self = $module($base, 'Html5s');
var $nesting = [self].concat($parent_nesting);
(function($base, $super, $parent_nesting) {
var self = $klass($base, $super, 'HtmlPipelineHighlighter');
var $nesting = [self].concat($parent_nesting), $HtmlPipelineHighlighter_initialize$1, $HtmlPipelineHighlighter_format$2, $HtmlPipelineHighlighter_format_orig$3;
self.$register_for("html-pipeline");
Opal.def(self, '$initialize', $HtmlPipelineHighlighter_initialize$1 = function $$initialize(name, backend, opts) {
var $iter = $HtmlPipelineHighlighter_initialize$1.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
if ($iter) $HtmlPipelineHighlighter_initialize$1.$$p = null;
// Prepare super implicit arguments
for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) {
$zuper[$zuper_i] = arguments[$zuper_i];
}
if (opts == null) {
opts = $hash2([], {});
};
$send(self, Opal.find_super_dispatcher(self, 'initialize', $HtmlPipelineHighlighter_initialize$1, false), $zuper, $iter);
if ($truthy(backend['$!=']("html5s"))) {
return self.$singleton_class().$send("alias_method", "format", "format_orig")
} else {
return nil
};
}, $HtmlPipelineHighlighter_initialize$1.$$arity = -3);
Opal.def(self, '$format', $HtmlPipelineHighlighter_format$2 = function $$format(node, lang, _opts) {
var self = this;
return "" + "<pre><code" + ((function() {if ($truthy(lang)) {
return "" + " data-lang=\"" + (lang) + "\""
} else {
return nil
}; return nil; })()) + ">" + (node.$content()) + "</code></pre>"
}, $HtmlPipelineHighlighter_format$2.$$arity = 3);
return (Opal.def(self, '$format_orig', $HtmlPipelineHighlighter_format_orig$3 = function $$format_orig(node, lang, _opts) {
var self = this;
return "" + "<pre" + ((function() {if ($truthy(lang)) {
return "" + " lang=\"" + (lang) + "\""
} else {
return nil
}; return nil; })()) + "><code>" + (node.$content()) + "</code></pre>"
}, $HtmlPipelineHighlighter_format_orig$3.$$arity = 3), nil) && 'format_orig';
})($nesting[0], $$$($$$($$$('::', 'Asciidoctor'), 'SyntaxHighlighter'), 'Base'), $nesting)
})($$($nesting, 'Asciidoctor'), $nesting)
};
/* Generated by Opal 0.11.99.dev */
Opal.modules["asciidoctor/html5s"] = function(Opal) {
var $a, $b, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $truthy = Opal.truthy;
Opal.add_stubs(['$require', '$==']);
self.$require("asciidoctor/html5s/version");
self.$require("asciidoctor/html5s/converter");
self.$require("asciidoctor/html5s/replacements");
self.$require("asciidoctor/html5s/attached_colist_treeprocessor");
if ($truthy((($b = $$($nesting, 'Asciidoctor', 'skip_raise')) && ($a = $$$($b, 'SyntaxHighlighter', 'skip_raise')) ? 'constant' : nil))) {
self.$require("asciidoctor/html5s/html_pipeline_highlighter")};
if ($$($nesting, 'RUBY_PLATFORM')['$==']("opal")) {
return nil
} else {
return nil
};
};
/* Generated by Opal 0.11.99.dev */
Opal.modules["asciidoctor/html5s/converter"] = function(Opal) {
function $rb_minus(lhs, rhs) {
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs);
}
function $rb_plus(lhs, rhs) {
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs);
}
function $rb_times(lhs, rhs) {
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs);
}
function $rb_le(lhs, rhs) {
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs);
}
function $rb_lt(lhs, rhs) {
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs);
}
function $rb_gt(lhs, rhs) {
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs);
}
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy;
Opal.add_stubs(['$require', '$==', '$reduce', '$each', '$[]=', '$-', '$[]', '$default=', '$gsub', '$logger', '$call', '$inject', '$!', '$nil_or_empty?', '$is_a?', '$join', '$compact', '$<<', '$empty?', '$+', '$include?', '$to_s', '$html_tag', '$to_proc', '$split', '$uniq', '$flatten', '$role', '$id', '$parent', '$html_tag_if', '$title', '$captioned_title', '$reverse!', '$attr', '$document', '$to_sym', '$start_with?', '$end_with?', '$nil?', '$*', '$normalize_web_path', '$attr?', '$local_attr', '$option?', '$blocks?', '$all?', '$blocks', '$text?', '$text', '$content', '$level', '$special', '$caption', '$numbered', '$<=', '$to_i', '$<', '$doctype', '$sectname', '$sectnum', '$inline?', '$type', '$style', '$===', '$image_uri', '$image_link', '$syntax_highlighter', '$nowrap?', '$highlight?', '$name', '$format', '$source_lang', '$warn', '$log', '$!=', '$context', '$autowidth?', '$local_attr?', '$url_query', '$chomp', '$media_uri', '$map', '$iso8601', '$parse', '$revdate', '$instance', '$primary_stylesheet_data', '$read_asset', '$normalize_system_path', '$key?', '$urlize', '$docinfo?', '$docinfo', '$catalog', '$kind_of?', '$xreftext', '$tr_s', '$reftext', '$target', '$constants', '$const_set', '$const_get', '$register_for', '$respond_to?', '$basebackend', '$outfilesuffix', '$filetype', '$supports_templates', '$node_name', '$send', '$extend', '$instance_eval', '$block_with_title', '$map!', '$reject!', '$list_marker_keyword', '$items', '$print_item_content', '$footnoteref_id', '$footnote_id', '$convert', '$converter', '$html_meta_if', '$doctitle', '$styles_and_scripts', '$style_value', '$noheader', '$header?', '$notitle', '$header', '$any?', '$sub_macros', '$>', '$downcase', '$revdate_iso', '$footnotes?', '$footnotes', '$index', '$nofooter', '$title?', '$block_with_caption', '$image_link_label', '$link_rel', '$reject', '$capture', '$yield_capture', '$sections?', '$embedded?', '$size', '$first', '$each_with_index', '$zero?', '$sections', '$section_level', '$section_title', '$icon_fa_classes', '$icon_uri', '$admonition_aside?', '$admonition_aria', '$formatted_source', '$source_code_class', '$callout_list', '$role?', '$double_quoted', '$single_quoted', '$stem_lang', '$delimit_stem', '$abstract_allowed?', '$partintro_allowed?', '$stretch?', '$columns', '$rows', '$colspan', '$rowspan', '$one?', '$xref_text', '$bibref_text', '$video_iframe?', '$video_uri']);
(function($base, $parent_nesting) {
var self = $module($base, 'Asciidoctor');
var $nesting = [self].concat($parent_nesting);
(function($base, $parent_nesting) {
var self = $module($base, 'Html5s');
var $nesting = [self].concat($parent_nesting);
nil
})($nesting[0], $nesting)
})($nesting[0], $nesting);
return (function($base, $super, $parent_nesting) {
var self = $klass($base, $super, 'Converter');
var $nesting = [self].concat($parent_nesting), $Converter$59, $Converter_initialize$60, $Converter_convert$61, $Converter_handles$ques$62, $Converter_olist$63, $Converter_verse$67, $Converter_inline_footnote$70, $Converter_preamble$72, $Converter_document$74, $Converter_paragraph$79, $Converter_quote$81, $Converter_image$85, $Converter_colist$89, $Converter_pass$92, $Converter_inline_menu$94, $Converter_dlist$98, $Converter_inline_indexterm$103, $Converter_toc$105, $Converter_ulist$107, $Converter_inline_button$111, $Converter_empty$113, $Converter_inline_kbd$115, $Converter_outline$118, $Converter_inline_image$121, $Converter_example$124, $Converter_section$127, $Converter_admonition$129, $Converter_listing$133, $Converter_thematic_break$136, $Converter_inline_quoted$138, $Converter_inline_break$143, $Converter_audio$145, $Converter_open$148, $Converter_table$152, $Converter_inline_anchor$163, $Converter_floating_title$165, $Converter_sidebar$167, $Converter_page_break$169, $Converter_literal$171, $Converter_inline_callout$174, $Converter_embedded$176, $Converter_stem$179, $Converter_video$182;
self.$require("asciidoctor/html5s");
if ($$($nesting, 'RUBY_PLATFORM')['$==']("opal")) {
} else {
nil
};
(function($base, $parent_nesting) {
var self = $module($base, 'Helpers');
var $nesting = [self].concat($parent_nesting), $Helpers$1, $Helpers_log$3, $Helpers_capture$4, $Helpers_yield_capture$5, $Helpers_html_tag$6, $Helpers_html_tag_if$8, $Helpers_block_with_title$9, $Helpers_block_with_caption$11, $Helpers_delimit_stem$14, $Helpers_style_value$15, $Helpers_urlize$17, $Helpers_local_attr$18, $Helpers_local_attr$ques$19, $Helpers_footnote_id$20, $Helpers_footnoteref_id$21, $Helpers_nowrap$ques$22, $Helpers_print_item_content$23, $Helpers_section_level$26, $Helpers_section_title$27, $Helpers_stem_lang$28, $Helpers_link_rel$29, $Helpers_admonition_aside$ques$30, $Helpers_admonition_aria$31, $Helpers_image_link$32, $Helpers_image_link_label$33, $Helpers_formatted_source$34, $Helpers_callout_list$35, $Helpers_source_lang$36, $Helpers_source_code_class$37, $Helpers_abstract_allowed$ques$38, $Helpers_partintro_allowed$ques$39, $Helpers_autowidth$ques$40, $Helpers_stretch$ques$41, $Helpers_video_iframe$ques$42, $Helpers_video_uri$43, $Helpers_url_query$44, $Helpers_revdate_iso$46, $Helpers_html_meta_if$47, $Helpers_styles_and_scripts$48, $Helpers_xref_text$54, $Helpers_bibref_text$55, $Helpers_icon_fa_classes$56, $Helpers_double_quoted$57, $Helpers_single_quoted$58, $writer = nil;
Opal.const_set($nesting[0], 'CDN_BASE_URI', "https://cdnjs.cloudflare.com/ajax/libs");
Opal.const_set($nesting[0], 'FONT_AWESOME_URI', "https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css");
Opal.const_set($nesting[0], 'HIGHLIGHTJS_BASE_URI', "https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.15.1/build/");
Opal.const_set($nesting[0], 'KATEX_CSS_URI', "https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css");
Opal.const_set($nesting[0], 'KATEX_JS_URI', "https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js");
Opal.const_set($nesting[0], 'DEFAULT_HIGHLIGHTJS_THEME', "github");
Opal.const_set($nesting[0], 'DEFAULT_LANG', "en");
Opal.const_set($nesting[0], 'DEFAULT_SECTNUMLEVELS', 3);
Opal.const_set($nesting[0], 'DEFAULT_TOCLEVELS', 2);
Opal.const_set($nesting[0], 'CURLY_QUOTES', $send([[["af", "en", "eo", "ga", "hi", "ia", "id", "ko", "mt", "th", "tr", "zh"], ["‘", "’", "“", "”"]], [["bs", "fi", "sv"], ["’", "’", "”", "”"]], [["cs", "da", "de", "is", "lt", "sl", "sk", "sr"], ["‚", "‘", "„", "“"]], [["nl"], ["‚", "’", "„", "”"]], [["hu", "pl", "ro"], ["«", "»", "„", "”"]]], 'reduce', [$hash2([], {})], ($Helpers$1 = function(hsh, $mlhs_tmp1){var self = $Helpers$1.$$s || this, $a, $b, $$2, langs = nil, codes = nil;
if (hsh == null) {
hsh = nil;
};
if ($mlhs_tmp1 == null) {
$mlhs_tmp1 = nil;
};
$b = $mlhs_tmp1, $a = Opal.to_ary($b), (langs = ($a[0] == null ? nil : $a[0])), (codes = ($a[1] == null ? nil : $a[1])), $b;
$send(langs, 'each', [], ($$2 = function(lang){var self = $$2.$$s || this, $writer = nil;
if (lang == null) {
lang = nil;
};
$writer = [lang, codes];
$send(hsh, '[]=', Opal.to_a($writer));
return $writer[$rb_minus($writer["length"], 1)];}, $$2.$$s = self, $$2.$$arity = 1, $$2));
return hsh;}, $Helpers$1.$$s = self, $Helpers$1.$$arity = 2, $Helpers$1.$$has_top_level_mlhs_arg = true, $Helpers$1)));
$writer = [$$($nesting, 'CURLY_QUOTES')['$[]']($$($nesting, 'DEFAULT_LANG'))];
$send($$($nesting, 'CURLY_QUOTES'), 'default=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
Opal.const_set($nesting[0], 'KATEX_RENDER_CODE', ((((((((((((("" + " document.addEventListener(\"DOMContentLoaded\", function() {\n") + " var elements = document.getElementsByClassName(\"math\");\n") + " for (var i = 0; i < elements.length; i++) {\n") + " var el = elements[i];\n") + " if (el.getAttribute(\"data-lang\") !== \"tex\") {\n") + " continue;\n") + " }\n") + " katex.render(el.textContent.slice(2, -2), el, {\n") + " \"displayMode\": el.nodeName.toUpperCase() !== \"SPAN\",\n") + " \"throwOnError\": false,\n") + " });\n") + " }\n") + " });\n").$gsub(/\s+/, " "));
Opal.const_set($nesting[0], 'VOID_ELEMENTS', ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
Opal.def(self, '$log', $Helpers_log$3 = function $$log() {
var self = this;
return $$$($$$('::', 'Asciidoctor'), 'LoggerManager').$logger()
}, $Helpers_log$3.$$arity = 0);
Opal.def(self, '$capture', $Helpers_capture$4 = function $$capture() {
var $iter = $Helpers_capture$4.$$p, block = $iter || nil, self = this;
if ($iter) $Helpers_capture$4.$$p = null;
if ($iter) $Helpers_capture$4.$$p = null;;
self._html5s_capture = block;
return nil;
}, $Helpers_capture$4.$$arity = 0);
Opal.def(self, '$yield_capture', $Helpers_yield_capture$5 = function $$yield_capture($a) {
var $post_args, params, self = this;
if (self._html5s_capture == null) self._html5s_capture = nil;
$post_args = Opal.slice.call(arguments, 0, arguments.length);
params = $post_args;;
if ($truthy(self._html5s_capture)) {
return $send(self._html5s_capture, 'call', Opal.to_a(params))
} else {
return nil
};
}, $Helpers_yield_capture$5.$$arity = -1);
Opal.def(self, '$html_tag', $Helpers_html_tag$6 = function $$html_tag(name, attributes, content) {
var $$7, $a, $iter = $Helpers_html_tag$6.$$p, $yield = $iter || nil, self = this, attrs = nil, attrs_str = nil;
if ($iter) $Helpers_html_tag$6.$$p = null;
if (attributes == null) {
attributes = $hash2([], {});
};
if (content == null) {
content = nil;
};
attrs = $send(attributes, 'inject', [[]], ($$7 = function(attrs, $mlhs_tmp1){var self = $$7.$$s || this, $a, $b, k = nil, v = nil;
if (attrs == null) {
attrs = nil;
};
if ($mlhs_tmp1 == null) {
$mlhs_tmp1 = nil;
};
$b = $mlhs_tmp1, $a = Opal.to_ary($b), (k = ($a[0] == null ? nil : $a[0])), (v = ($a[1] == null ? nil : $a[1])), $b;
if ($truthy(($truthy($a = v['$!']()) ? $a : v['$nil_or_empty?']()))) {
return attrs;};
if ($truthy(v['$is_a?']($$($nesting, 'Array')))) {
v = v.$compact().$join(" ")};
return attrs['$<<']((function() {if (v['$=='](true)) {
return k
} else {
return "" + (k) + "=\"" + (v) + "\""
}; return nil; })());}, $$7.$$s = self, $$7.$$arity = 2, $$7.$$has_top_level_mlhs_arg = true, $$7));
attrs_str = (function() {if ($truthy(attrs['$empty?']())) {
return ""
} else {
return $rb_plus(" ", attrs.$join(" "))
}; return nil; })();
if ($truthy($$($nesting, 'VOID_ELEMENTS')['$include?'](name.$to_s()))) {
return "" + "<" + (name) + (attrs_str) + ">"
} else {
if (($yield !== nil)) {
content = ($truthy($a = content) ? $a : Opal.yieldX($yield, []))};
return "" + "<" + (name) + (attrs_str) + ">" + (content) + "</" + (name) + ">";
};
}, $Helpers_html_tag$6.$$arity = -2);
Opal.def(self, '$html_tag_if', $Helpers_html_tag_if$8 = function $$html_tag_if(condition, name, attributes, content) {
var $iter = $Helpers_html_tag_if$8.$$p, block = $iter || nil, $a, self = this;
if ($iter) $Helpers_html_tag_if$8.$$p = null;
if ($iter) $Helpers_html_tag_if$8.$$p = null;;
if (attributes == null) {
attributes = $hash2([], {});
};
if (content == null) {
content = nil;
};
if ($truthy(condition)) {
return $send(self, 'html_tag', [name, attributes, content], block.$to_proc())
} else {
return ($truthy($a = content) ? $a : Opal.yieldX(block, []))
};
}, $Helpers_html_tag_if$8.$$arity = -3);
Opal.def(self, '$block_with_title', $Helpers_block_with_title$9 = function $$block_with_title(attrs, title) {
var $iter = $Helpers_block_with_title$9.$$p, block = $iter || nil, $a, $b, $$10, self = this, klass = nil, $writer = nil, nested = nil;
if (self.title == null) self.title = nil;
if ($iter) $Helpers_block_with_title$9.$$p = null;
if ($iter) $Helpers_block_with_title$9.$$p = null;;
if (attrs == null) {
attrs = $hash2([], {});
};
if (title == null) {
title = self.title;
};
if ($truthy((klass = attrs['$[]']("class"))['$is_a?']($$($nesting, 'String')))) {
klass = klass.$split(" ")};
$writer = ["class", [klass, self.$role()].$flatten().$uniq()];
$send(attrs, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
$writer = ["id", self.$id()];
$send(attrs, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
if ($truthy(title['$nil_or_empty?']())) {
nested = ($truthy($a = self['$is_a?']($$$($$$('::', 'Asciidoctor'), 'List'))) ? ($truthy($b = self.$parent()['$is_a?']($$$($$$('::', 'Asciidoctor'), 'ListItem'))) ? $b : self.$parent()['$is_a?']($$$($$$('::', 'Asciidoctor'), 'List'))) : $a);
return self.$html_tag_if(nested['$!'](), "div", attrs, Opal.yieldX(block, []));
} else {
return $send(self, 'html_tag', ["section", attrs], ($$10 = function(){var self = $$10.$$s || this;
return [self.$html_tag("h6", $hash2(["class"], {"class": "block-title"}), title), Opal.yieldX(block, [])].$join("\n")}, $$10.$$s = self, $$10.$$arity = 0, $$10))
};
}, $Helpers_block_with_title$9.$$arity = -1);
Opal.def(self, '$block_with_caption', $Helpers_block_with_caption$11 = function $$block_with_caption(position, attrs) {
var $iter = $Helpers_block_with_caption$11.$$p, block = $iter || nil, $$12, self = this, klass = nil, $writer = nil;
if ($iter) $Helpers_block_with_caption$11.$$p = null;
if ($iter) $Helpers_block_with_caption$11.$$p = null;;
if (position == null) {
position = "bottom";
};
if (attrs == null) {
attrs = $hash2([], {});
};
if ($truthy((klass = attrs['$[]']("class"))['$is_a?']($$($nesting, 'String')))) {
klass = klass.$split(" ")};
$writer = ["class", [klass, self.$role()].$flatten().$uniq()];
$send(attrs, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
$writer = ["id", self.$id()];
$send(attrs, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
if ($truthy(self.$title()['$nil_or_empty?']())) {
return self.$html_tag("div", attrs, Opal.yieldX(block, []))
} else {
return $send(self, 'html_tag', ["figure", attrs], ($$12 = function(){var self = $$12.$$s || this, $$13, ary = nil;
ary = [Opal.yieldX(block, []), $send(self, 'html_tag', ["figcaption"], ($$13 = function(){var self = $$13.$$s || this;
return self.$captioned_title()}, $$13.$$s = self, $$13.$$arity = 0, $$13))];
if (position['$==']("top")) {
ary['$reverse!']()};
return ary.$compact().$join("\n");}, $$12.$$s = self, $$12.$$arity = 0, $$12))
};
}, $Helpers_block_with_caption$11.$$arity = -1);
Opal.def(self, '$delimit_stem', $Helpers_delimit_stem$14 = function $$delimit_stem(equation, type) {
var $a, $b, self = this, open = nil, close = nil;
if (self._html5s_stem_type == null) self._html5s_stem_type = nil;
if ($truthy((self._html5s_stem_type = ($truthy($a = self._html5s_stem_type) ? $a : self.$document().$attr("html5s-force-stem-type"))))) {
type = self._html5s_stem_type};
if ($truthy(self['$is_a?']($$$($$$('::', 'Asciidoctor'), 'Block')))) {
$b = $$$($$$('::', 'Asciidoctor'), 'BLOCK_MATH_DELIMITERS')['$[]'](type.$to_sym()), $a = Opal.to_ary($b), (open = ($a[0] == null ? nil : $a[0])), (close = ($a[1] == null ? nil : $a[1])), $b
} else {
$b = $$$($$$('::', 'Asciidoctor'), 'INLINE_MATH_DELIMITERS')['$[]'](type.$to_sym()), $a = Opal.to_ary($b), (open = ($a[0] == null ? nil : $a[0])), (close = ($a[1] == null ? nil : $a[1])), $b
};
if ($truthy(($truthy($a = equation['$start_with?'](open)['$!']()) ? $a : equation['$end_with?'](close)['$!']()))) {
equation = [open, equation, close].$join()};
return equation;
}, $Helpers_delimit_stem$14.$$arity = 2);
Opal.def(self, '$style_value', $Helpers_style_value$15 = function $$style_value(declarations) {
var $$16, self = this, decls = nil;
decls = [];
$send(declarations, 'each', [], ($$16 = function(prop, value){var self = $$16.$$s || this, $a, $b, unit = nil;
if (prop == null) {
prop = nil;
};
if (value == null) {
value = nil;
};
if ($truthy(value['$nil?']())) {
return nil;};
if ($truthy(value['$is_a?']($$($nesting, 'Array')))) {
$b = value, $a = Opal.to_ary($b), (value = ($a[0] == null ? nil : $a[0])), (unit = ($a[1] == null ? nil : $a[1])), $b;
if ($truthy(value['$nil?']())) {
return nil;};
if ($truthy(value['$end_with?'](unit))) {
} else {
value = $rb_plus(value.$to_s(), unit)
};};
prop = prop.$to_s().$gsub("_", "-");
return decls['$<<']("" + (prop) + ": " + (value));}, $$16.$$s = self, $$16.$$arity = 2, $$16));
if ($truthy(decls['$empty?']())) {
return nil
} else {
return $rb_plus(decls.$join("; "), ";")
};
}, $Helpers_style_value$15.$$arity = 1);
Opal.def(self, '$urlize', $Helpers_urlize$17 = function $$urlize($a) {
var $post_args, segments, $b, self = this, path = nil;
if (self._html5s_uri_scheme == null) self._html5s_uri_scheme = nil;
$post_args = Opal.slice.call(arguments, 0, arguments.length);
segments = $post_args;;
path = $rb_times(segments, "/");
if ($truthy(path['$start_with?']("//"))) {
self._html5s_uri_scheme = ($truthy($b = self._html5s_uri_scheme) ? $b : self.$document().$attr("asset-uri-scheme", "https"));
if ($truthy(self._html5s_uri_scheme['$empty?']())) {
} else {
path = "" + (self._html5s_uri_scheme) + ":" + (path)
};};
return self.$normalize_web_path(path);
}, $Helpers_urlize$17.$$arity = -1);
Opal.def(self, '$local_attr', $Helpers_local_attr$18 = function $$local_attr(name, default_val) {
var self = this;
if (default_val == null) {
default_val = nil;
};
return self.$attr(name, default_val, false);
}, $Helpers_local_attr$18.$$arity = -2);
Opal.def(self, '$local_attr?', $Helpers_local_attr$ques$19 = function(name, expect_val) {
var self = this;
if (expect_val == null) {
expect_val = nil;
};
return self['$attr?'](name, expect_val, false);
}, $Helpers_local_attr$ques$19.$$arity = -2);
Opal.def(self, '$footnote_id', $Helpers_footnote_id$20 = function $$footnote_id(index) {
var self = this;
if (index == null) {
index = self.$local_attr("index");
};
return "" + "_footnote_" + (index);
}, $Helpers_footnote_id$20.$$arity = -1);
Opal.def(self, '$footnoteref_id', $Helpers_footnoteref_id$21 = function $$footnoteref_id(index) {
var self = this;
if (index == null) {
index = self.$local_attr("index");
};
return "" + "_footnoteref_" + (index);
}, $Helpers_footnoteref_id$21.$$arity = -1);
Opal.def(self, '$nowrap?', $Helpers_nowrap$ques$22 = function() {
var $a, self = this;
if ($truthy(($truthy($a = self.$document()['$attr?']("prewrap")['$!']()) ? $a : self['$option?']("nowrap")))) {
return "nowrap"
} else {
return nil
}
}, $Helpers_nowrap$ques$22.$$arity = 0);
Opal.def(self, '$print_item_content', $Helpers_print_item_content$23 = function $$print_item_content(item) {
var $a, $$24, $$25, self = this, wrap = nil;
wrap = ($truthy($a = item['$blocks?']()) ? $send(item.$blocks(), 'all?', [], ($$24 = function(b){var self = $$24.$$s || this;
if (b == null) {
b = nil;
};
return b['$is_a?']($$$($$$('::', 'Asciidoctor'), 'List'));}, $$24.$$s = self, $$24.$$arity = 1, $$24))['$!']() : $a);
return [(function() {if ($truthy(item['$text?']())) {
return $send(self, 'html_tag_if', [wrap, "p"], ($$25 = function(){var self = $$25.$$s || this;
return item.$text()}, $$25.$$s = self, $$25.$$arity = 0, $$25))
} else {
return nil
}; return nil; })(), item.$content()].$join();
}, $Helpers_print_item_content$23.$$arity = 1);
Opal.def(self, '$section_level', $Helpers_section_level$26 = function $$section_level(sec) {
var $a, self = this;
if (sec == null) {
sec = self;
};
if ($truthy((($a = sec.$level()['$=='](0)) ? sec.$special() : sec.$level()['$=='](0)))) {
return 1
} else {
return sec.$level()
};
}, $Helpers_section_level$26.$$arity = -1);
Opal.def(self, '$section_title', $Helpers_section_title$27 = function $$section_title($a, $b) {
var $post_args, $kwargs, sec, drop_anchors, $c, $d, self = this, title = nil, signifier = nil, sectnum = nil;
$post_args = Opal.slice.call(arguments, 0, arguments.length);
$kwargs = Opal.extract_kwargs($post_args);
if ($kwargs == null) {
$kwargs = $hash2([], {});
} else if (!$kwargs.$$is_hash) {
throw Opal.ArgumentError.$new('expected kwargs');
};
if ($post_args.length > 0) {
sec = $post_args[0];
$post_args.splice(0, 1);
}
if (sec == null) {
sec = self;
};
drop_anchors = $kwargs.$$smap["drop_anchors"];
if (drop_anchors == null) {
drop_anchors = false
};
title = (function() {if ($truthy(sec.$caption())) {
return sec.$captioned_title()
} else if ($truthy(($truthy($c = sec.$numbered()) ? $rb_le(sec.$level(), self.$document().$attr("sectnumlevels", $$($nesting, 'DEFAULT_SECTNUMLEVELS')).$to_i()) : $c))) {
if ($truthy(($truthy($c = ($truthy($d = $rb_lt(sec.$level(), 2)) ? self.$document().$doctype()['$==']("book") : $d)) ? ["chapter", "part"]['$include?'](sec.$sectname()) : $c))) {
signifier = self.$document().$attr("" + (sec.$sectname()) + "-signifier");
sectnum = (function() {if (sec.$sectname()['$==']("part")) {
return sec.$sectnum(nil, ":")
} else {
return sec.$sectnum()
}; return nil; })();
return "" + ($rb_plus(signifier, " ")) + (sectnum) + " " + (sec.$title());
} else {
return "" + (sec.$sectnum()) + " " + (sec.$title())
}
} else {
return sec.$title()
}; return nil; })();
if ($truthy(($truthy($c = drop_anchors) ? title['$include?']("<a") : $c))) {
return title.$gsub(/<(?:a[^>+]+|\/a)>/, "")
} else {
return title
};
}, $Helpers_section_title$27.$$arity = -1);
Opal.def(self, '$stem_lang', $Helpers_stem_lang$28 = function $$stem_lang() {
var self = this, value = nil;
value = (function() {if ($truthy(self['$inline?']())) {
return self.$type()
} else {
return self.$style()
}; return nil; })().$to_s();
if (value['$==']("latexmath")) {
return "tex"
} else {
return value
};
}, $Helpers_stem_lang$28.$$arity = 0);
Opal.def(self, '$link_rel', $Helpers_link_rel$29 = function $$link_rel() {
var $a, self = this, rel = nil;
rel = [(function() {if ($truthy(self['$option?']("nofollow"))) {
return "nofollow"
} else {
return nil
}; return nil; })(), (function() {if ($truthy(($truthy($a = self['$option?']("noopener")) ? $a : self.$local_attr("window")['$==']("_blank")))) {
return "noopener"
} else {
return nil
}; return nil; })()].$compact();
if ($truthy(rel['$empty?']())) {
return nil
} else {
return rel.$join(" ")
};
}, $Helpers_link_rel$29.$$arity = 0);
Opal.def(self, '$admonition_aside?', $Helpers_admonition_aside$ques$30 = function() {
var self = this;
return ["note", "tip"]['$include?'](self.$attr("name"))
}, $Helpers_admonition_aside$ques$30.$$arity = 0);
Opal.def(self, '$admonition_aria', $Helpers_admonition_aria$31 = function $$admonition_aria() {
var self = this, $case = nil;
return (function() {$case = self.$attr("name");
if ("note"['$===']($case)) {return "note"}
else if ("tip"['$===']($case)) {return "doc-tip"}
else if ("caution"['$===']($case) || "important"['$===']($case) || "warning"['$===']($case)) {return "doc-notice"}
else { return nil }})()
}, $Helpers_admonition_aria$31.$$arity = 0);
Opal.def(self, '$image_link', $Helpers_image_link$32 = function $$image_link() {
var $a, self = this, $case = nil, link = nil;
if (self._html5s_image_link == null) self._html5s_image_link = nil;
return (self._html5s_image_link = ($truthy($a = self._html5s_image_link) ? $a : (function() {$case = (link = self.$attr("link"));
if ("none"['$===']($case) || "false"['$===']($case)) {return nil}
else if ("self"['$===']($case)) {return self.$image_uri(self.$attr("target"))}
else if (nil['$===']($case) || ""['$===']($case)) {if ($truthy(self.$document()['$attr?']("html5s-image-default-link", "self"))) {
return self.$image_uri(self.$attr("target"))
} else {
return nil
}}
else {return link}})()))
}, $Helpers_image_link$32.$$arity = 0);
Opal.def(self, '$image_link_label', $Helpers_image_link_label$33 = function $$image_link_label() {
var self = this;
if (self.$image_uri(self.$attr("target"))['$=='](self.$image_link())) {
return self.$document().$attr("html5s-image-self-link-label", "Open the image in full size")
} else {
return nil
}
}, $Helpers_image_link_label$33.$$arity = 0);
Opal.def(self, '$formatted_source', $Helpers_formatted_source$34 = function $$formatted_source() {try {
var $a, self = this, hl = nil, opts = nil, $writer = nil;
($truthy($a = (hl = self.$document().$syntax_highlighter())) ? $a : Opal.ret(nil));
opts = $hash2(["nowrap"], {"nowrap": self['$nowrap?']()});
if ($truthy(hl['$highlight?']())) {
$writer = ["css_mode", self.$document().$attr("" + (hl.$name()) + "-css", "class").$to_sym()];
$send(opts, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
$writer = ["style", self.$document().$attr("" + (hl.$name()) + "-style")];
$send(opts, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;};
return hl.$format(self, self.$source_lang(), opts);
} catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; }
}, $Helpers_formatted_source$34.$$arity = 0);
Opal.def(self, '$callout_list', $Helpers_callout_list$35 = function $$callout_list() {
var self = this;
if (self.html5s_colist == null) self.html5s_colist = nil;
return self.html5s_colist
}, $Helpers_callout_list$35.$$arity = 0);
Opal.def(self, '$source_lang', $Helpers_source_lang$36 = function $$source_lang() {
var self = this;
return self.$local_attr("language", false)
}, $Helpers_source_lang$36.$$arity = 0);
Opal.def(self, '$source_code_class', $Helpers_source_code_class$37 = function $$source_code_class() {
var $a, self = this;
if ($truthy(self.$document()['$attr?']("source-highlighter", "highlightjs"))) {
return "" + "language-" + (($truthy($a = self.$source_lang()) ? $a : "none")) + " hljs"
} else if ($truthy(self.$source_lang())) {
return "" + "language-" + (self.$source_lang())
} else {
return nil
}
}, $Helpers_source_code_class$37.$$arity = 0);
Opal.def(self, '$abstract_allowed?', $Helpers_abstract_allowed$ques$38 = function() {
var $a, self = this, result = nil;
if ($truthy((result = (($a = self.$parent()['$=='](self.$document())) ? self.$document().$doctype()['$==']("book") : self.$parent()['$=='](self.$document()))))) {
self.$log().$warn("" + "asciidoctor: WARNING: abstract block cannot be used in a document\n" + " without a title when doctype is book. Excluding block content.")};
return result['$!']();
}, $Helpers_abstract_allowed$ques$38.$$arity = 0);
Opal.def(self, '$partintro_allowed?', $Helpers_partintro_allowed$ques$39 = function() {
var $a, $b, self = this, result = nil;
if ($truthy((result = ($truthy($a = ($truthy($b = self.$level()['$!='](0)) ? $b : self.$parent().$context()['$!=']("section"))) ? $a : self.$document().$doctype()['$!=']("book"))))) {
self.$log().$warn("" + "asciidoctor: ERROR: partintro block can only be used when doctype\n" + " is book and must be a child of a book part. Excluding block content.")};
return result['$!']();
}, $Helpers_partintro_allowed$ques$39.$$arity = 0);
Opal.def(self, '$autowidth?', $Helpers_autowidth$ques$40 = function(node) {
var self = this;
if (node == null) {
node = self;
};
return node['$option?']("autowidth");
}, $Helpers_autowidth$ques$40.$$arity = -1);
Opal.def(self, '$stretch?', $Helpers_stretch$ques$41 = function() {
var $a, self = this;
if ($truthy(($truthy($a = self['$autowidth?']()['$!']()) ? $a : self['$local_attr?']("width")))) {
if ($truthy(self['$attr?']("tablepcwidth", 100))) {
return "stretch"
} else {
return nil
}
} else {
return nil
}
}, $Helpers_stretch$ques$41.$$arity = 0);
Opal.def(self, '$video_iframe?', $Helpers_video_iframe$ques$42 = function() {
var self = this;
return ["vimeo", "youtube"]['$include?'](self.$attr("poster"))
}, $Helpers_video_iframe$ques$42.$$arity = 0);
Opal.def(self, '$video_uri', $Helpers_video_uri$43 = function $$video_uri() {
var $a, $b, self = this, $case = nil, params = nil, start_anchor = nil, video_id = nil, list_id = nil, anchor = nil;
return (function() {$case = self.$attr("poster", "").$to_sym();
if ("vimeo"['$===']($case)) {
params = $hash2(["autoplay", "loop", "muted"], {"autoplay": (function() {if ($truthy(self['$option?']("autoplay"))) {
return 1
} else {
return nil
}; return nil; })(), "loop": (function() {if ($truthy(self['$option?']("loop"))) {
return 1
} else {
return nil
}; return nil; })(), "muted": (function() {if ($truthy(self['$option?']("muted"))) {
return 1
} else {
return nil
}; return nil; })()});
if ($truthy(self['$attr?']("start"))) {
start_anchor = "" + "#at=" + (self.$attr("start"))};
return "" + "//player.vimeo.com/video/" + (self.$attr("target")) + (start_anchor) + (self.$url_query(params));}
else if ("youtube"['$===']($case)) {
$b = self.$attr("target").$split("/", 2), $a = Opal.to_ary($b), (video_id = ($a[0] == null ? nil : $a[0])), (list_id = ($a[1] == null ? nil : $a[1])), $b;
params = $hash2(["rel", "start", "end", "list", "autoplay", "loop", "muted", "controls"], {"rel": 0, "start": self.$attr("start"), "end": self.$attr("end"), "list": self.$attr("list", list_id), "autoplay": (function() {if ($truthy(self['$option?']("autoplay"))) {
return 1
} else {
return nil
}; return nil; })(), "loop": (function() {if ($truthy(self['$option?']("loop"))) {
return 1
} else {
return nil
}; return nil; })(), "muted": (function() {if ($truthy(self['$option?']("muted"))) {
return 1
} else {
return nil
}; return nil; })(), "controls": (function() {if ($truthy(self['$option?']("nocontrols"))) {
return 0
} else {
return nil
}; return nil; })()});
return "" + "//www.youtube.com/embed/" + (video_id) + (self.$url_query(params));}
else {
anchor = [self.$attr("start"), self.$attr("end")].$join(",").$chomp(",");
if (anchor['$=='](",")) {
anchor = ""};
if ($truthy(anchor['$empty?']())) {
} else {
anchor = $rb_plus("#t=", anchor)
};
return self.$media_uri("" + (self.$attr("target")) + (anchor));}})()
}, $Helpers_video_uri$43.$$arity = 0);
Opal.def(self, '$url_query', $Helpers_url_query$44 = function $$url_query(params) {
var $$45, self = this, str = nil;
str = $send(params, 'map', [], ($$45 = function(k, v){var self = $$45.$$s || this, $a;
if (k == null) {
k = nil;
};
if (v == null) {
v = nil;
};
if ($truthy(($truthy($a = v['$nil?']()) ? $a : v.$to_s()['$empty?']()))) {
return nil;};
return $rb_times([k, v], "=");}, $$45.$$s = self, $$45.$$arity = 2, $$45)).$compact().$join("&");
if ($truthy(str['$empty?']())) {
return nil
} else {
return $rb_plus("?", str)
};
}, $Helpers_url_query$44.$$arity = 1);
Opal.def(self, '$revdate_iso', $Helpers_revdate_iso$46 = function $$revdate_iso() {
var $a, self = this;
try {
if ($truthy((($a = $$$('::', 'Date', 'skip_raise')) ? 'constant' : nil))) {
return $$$('::', 'Date').$parse(self.$revdate()).$iso8601()
} else {
return nil
}
} catch ($err) {
if (Opal.rescue($err, [$$($nesting, 'ArgumentError')])) {
try {
return nil
} finally { Opal.pop_exception() }
} else { throw $err; }
}
}, $Helpers_revdate_iso$46.$$arity = 0);
Opal.def(self, '$html_meta_if', $Helpers_html_meta_if$47 = function $$html_meta_if(name, content) {
var self = this;
if ($truthy(content)) {
return "" + "<meta name=\"" + (name) + "\" content=\"" + (content) + "\">"
} else {
return nil
}
}, $Helpers_html_meta_if$47.$$arity = 2);
Opal.def(self, '$styles_and_scripts', $Helpers_styles_and_scripts$48 = function $$styles_and_scripts() {
var $a, $b, $$49, $$51, $c, $d, $e, $$53, self = this, scripts = nil, styles = nil, tags = nil, stylesheet = nil, stylesdir = nil, default_style = nil, ss = nil, path = nil, hjs_base = nil, hjs_theme = nil, hl = nil;
scripts = [];
styles = [];
tags = [];
stylesheet = self.$attr("stylesheet");
stylesdir = self.$attr("stylesdir", "");
default_style = $$$($$$('::', 'Asciidoctor'), 'DEFAULT_STYLESHEET_KEYS')['$include?'](stylesheet);
ss = $$$($$$('::', 'Asciidoctor'), 'Stylesheets').$instance();
if ($truthy(self['$attr?']("linkcss"))) {
path = (function() {if ($truthy(default_style)) {
return $$$($$$('::', 'Asciidoctor'), 'DEFAULT_STYLESHEET_NAME')
} else {
return stylesheet
}; return nil; })();
styles['$<<']($hash2(["href"], {"href": [stylesdir, path]}));
} else if ($truthy(default_style)) {
styles['$<<']($hash2(["text"], {"text": ss.$primary_stylesheet_data()}))
} else {
styles['$<<']($hash2(["text"], {"text": self.$read_asset(self.$normalize_system_path(stylesheet, stylesdir), true)}))
};
if ($truthy(self['$attr?']("icons", "font"))) {
if ($truthy(self['$attr?']("iconfont-remote"))) {
styles['$<<']($hash2(["href"], {"href": self.$attr("iconfont-cdn", $$($nesting, 'FONT_AWESOME_URI'))}))
} else {
styles['$<<']($hash2(["href"], {"href": [stylesdir, "" + (self.$attr("iconfont-name", "font-awesome")) + ".css"]}))
}};
if ($truthy(self['$attr?']("stem"))) {
styles['$<<']($hash2(["href"], {"href": $$($nesting, 'KATEX_CSS_URI')}));
scripts['$<<']($hash2(["src"], {"src": $$($nesting, 'KATEX_JS_URI')}));
scripts['$<<']($hash2(["text"], {"text": $$($nesting, 'KATEX_RENDER_CODE')}));};
if ($truthy((($b = $$$('::', 'Asciidoctor', 'skip_raise')) && ($a = $$$($b, 'SyntaxHighlighter', 'skip_raise')) ? 'constant' : nil)['$!']())) {
if ($truthy(self['$attr?']("source-highlighter", "highlightjs"))) {
hjs_base = self.$attr("highlightjsdir", $$($nesting, 'HIGHLIGHTJS_BASE_URI'));
hjs_theme = self.$attr("highlightjs-theme", $$($nesting, 'DEFAULT_HIGHLIGHTJS_THEME'));
scripts['$<<']($hash2(["src"], {"src": [hjs_base, "highlight.min.js"]}));
scripts['$<<']($hash2(["text"], {"text": "hljs.initHighlightingOnLoad()"}));
styles['$<<']($hash2(["href"], {"href": [hjs_base, "" + "styles/" + (hjs_theme) + ".min.css"]}));}};
$send(styles, 'each', [], ($$49 = function(item){var self = $$49.$$s || this, $$50;
if (item == null) {
item = nil;
};
if ($truthy(item['$key?']("text"))) {
return tags['$<<']($send(self, 'html_tag', ["style"], ($$50 = function(){var self = $$50.$$s || this;
return item['$[]']("text")}, $$50.$$s = self, $$50.$$arity = 0, $$50)))
} else {
return tags['$<<'](self.$html_tag("link", $hash2(["rel", "href"], {"rel": "stylesheet", "href": $send(self, 'urlize', Opal.to_a(item['$[]']("href")))})))
};}, $$49.$$s = self, $$49.$$arity = 1, $$49));
$send(scripts, 'each', [], ($$51 = function(item){var self = $$51.$$s || this, $$52;
if (item == null) {
item = nil;
};
if ($truthy(item['$key?']("text"))) {
return tags['$<<']($send(self, 'html_tag', ["script", $hash2(["type"], {"type": item['$[]']("type")})], ($$52 = function(){var self = $$52.$$s || this;
return item['$[]']("text")}, $$52.$$s = self, $$52.$$arity = 0, $$52)))
} else {
return tags['$<<'](self.$html_tag("script", $hash2(["type", "src"], {"type": item['$[]']("type"), "src": $send(self, 'urlize', Opal.to_a(item['$[]']("src")))})))
};}, $$51.$$s = self, $$51.$$arity = 1, $$51));
if ($truthy(($truthy($c = (($e = $$$('::', 'Asciidoctor', 'skip_raise')) && ($d = $$$($e, 'SyntaxHighlighter', 'skip_raise')) ? 'constant' : nil)) ? (hl = self.$syntax_highlighter()) : $c))) {
$send(["head", "footer"], 'each', [], ($$53 = function(location){var self = $$53.$$s || this;
if (location == null) {
location = nil;
};
if ($truthy(hl['$docinfo?'](location))) {
return tags['$<<'](hl.$docinfo(location, self, $hash2(["cdn_base_url", "linkcss"], {"cdn_base_url": $$($nesting, 'CDN_BASE_URI'), "linkcss": self['$attr?']("linkcss")})))
} else {
return nil
};}, $$53.$$s = self, $$53.$$arity = 1, $$53))};
return tags.$join("\n");
}, $Helpers_styles_and_scripts$48.$$arity = 0);
Opal.def(self, '$xref_text', $Helpers_xref_text$54 = function $$xref_text() {
var $a, self = this, str = nil, path = nil, ref = nil;
str = (function() {if ($truthy(self.$text())) {
return self.$text()
} else if ($truthy((path = self.$local_attr("path")))) {
return path
} else {
ref = self.$document().$catalog()['$[]']("refs")['$[]'](self.$attr("refid"));
if ($truthy(ref['$kind_of?']($$$($$($nesting, 'Asciidoctor'), 'AbstractNode')))) {
return ref.$xreftext(self.$attr("xrefstyle", nil, true))
} else {
return nil
};
}; return nil; })();
return ($truthy($a = str) ? $a : "" + "[" + (self.$attr("refid")) + "]").$tr_s("\n", " ");
}, $Helpers_xref_text$54.$$arity = 0);
Opal.def(self, '$bibref_text', $Helpers_bibref_text$55 = function $$bibref_text() {
var $a, self = this;
if ($$$($$$('::', 'Asciidoctor'), 'VERSION')['$[]'](0)['$==']("1")) {
return self.$text()
} else {
return "" + "[" + (($truthy($a = self.$reftext()) ? $a : self.$id())) + "]"
}
}, $Helpers_bibref_text$55.$$arity = 0);
Opal.def(self, '$icon_fa_classes', $Helpers_icon_fa_classes$56 = function $$icon_fa_classes() {
var self = this;
return ["" + "fa fa-" + (self.$target()), (function() {if ($truthy(self['$attr?']("size"))) {
return "" + "fa-" + (self.$attr("size"))
} else {
return nil
}; return nil; })(), (function() {if ($truthy(self['$attr?']("rotate"))) {
return "" + "fa-rotate-" + (self.$attr("rotate"))
} else {
return nil
}; return nil; })(), (function() {if ($truthy(self['$attr?']("flip"))) {
return "" + "fa-flip-" + (self.$attr("flip"))
} else {
return nil
}; return nil; })()].$compact()
}, $Helpers_icon_fa_classes$56.$$arity = 0);
Opal.def(self, '$double_quoted', $Helpers_double_quoted$57 = function $$double_quoted(text) {
var self = this, quotes = nil;
quotes = $$($nesting, 'CURLY_QUOTES')['$[]'](self.$attr("lang", $$($nesting, 'DEFAULT_LANG'), true));
return "" + (quotes['$[]'](2)) + (text) + (quotes['$[]'](3));
}, $Helpers_double_quoted$57.$$arity = 1);
Opal.def(self, '$single_quoted', $Helpers_single_quoted$58 = function $$single_quoted(text) {
var self = this, quotes = nil;
quotes = $$($nesting, 'CURLY_QUOTES')['$[]'](self.$attr("lang", $$($nesting, 'DEFAULT_LANG'), true));
return "" + (quotes['$[]'](0)) + (text) + (quotes['$[]'](1));
}, $Helpers_single_quoted$58.$$arity = 1);
})($nesting[0], $nesting);
$send($$($nesting, 'Helpers').$constants(), 'each', [], ($Converter$59 = function(const$){var self = $Converter$59.$$s || this;
if (const$ == null) {
const$ = nil;
};
return self.$const_set(const$, $$($nesting, 'Helpers').$const_get(const$));}, $Converter$59.$$s = self, $Converter$59.$$arity = 1, $Converter$59));
self.$register_for("html5s");
Opal.def(self, '$initialize', $Converter_initialize$60 = function $$initialize(backend, opts) {
var $iter = $Converter_initialize$60.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
if ($iter) $Converter_initialize$60.$$p = null;
// Prepare super implicit arguments
for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) {
$zuper[$zuper_i] = arguments[$zuper_i];
}
if (opts == null) {
opts = $hash2([], {});
};
$send(self, Opal.find_super_dispatcher(self, 'initialize', $Converter_initialize$60, false), $zuper, $iter);
if ($truthy(self['$respond_to?']("basebackend"))) {
self.$basebackend("html")};
if ($truthy(self['$respond_to?']("outfilesuffix"))) {
self.$outfilesuffix(".html")};
if ($truthy(self['$respond_to?']("filetype"))) {
self.$filetype("html")};
if ($truthy(self['$respond_to?']("supports_templates"))) {
return self.$supports_templates()
} else {
return nil
};
}, $Converter_initialize$60.$$arity = -2);
Opal.def(self, '$convert', $Converter_convert$61 = function $$convert(node, transform, opts) {
var $a, self = this, converter = nil;
if (transform == null) {
transform = nil;
};
if (opts == null) {
opts = $hash2([], {});
};
transform = ($truthy($a = transform) ? $a : node.$node_name());
opts = ($truthy($a = opts) ? $a : $hash2([], {}));
converter = self;
if ($truthy(opts['$empty?']())) {
return converter.$send(transform, node)
} else {
return converter.$send(transform, node, opts)
};
}, $Converter_convert$61.$$arity = -2);
Opal.def(self, '$handles?', $Converter_handles$ques$62 = function(transform) {
var $a, self = this;
return ($truthy($a = self['$respond_to?']("" + "convert_" + (transform))) ? $a : self['$respond_to?'](transform))
}, $Converter_handles$ques$62.$$arity = 1);
Opal.def(self, '$olist', $Converter_olist$63 = function $$olist(node, opts) {
var $$64, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$64 = function(){var self = $$64.$$s || this, $$65, _buf = nil, _slim_controls1 = nil;
_buf = [];
_slim_controls1 = $send(self, 'block_with_title', [$hash2(["class"], {"class": ["olist", self.$style()]})], ($$65 = function(){var self = $$65.$$s || this, $$66, _slim_controls2 = nil, _temple_html_attributeremover1 = nil, _slim_codeattributes1 = nil, _slim_codeattributes2 = nil, _slim_codeattributes3 = nil, _slim_codeattributes4 = nil;
_slim_controls2 = [];
_slim_controls2['$<<']("<ol");
_temple_html_attributeremover1 = [];
_slim_codeattributes1 = self.$style();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes1))) {
_slim_codeattributes1 = _slim_codeattributes1.$flatten();
$send(_slim_codeattributes1, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes1, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover1['$<<'](_slim_codeattributes1.$join(" "));
} else {
_temple_html_attributeremover1['$<<'](_slim_codeattributes1)
};
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_slim_controls2['$<<'](" class=\"");
_slim_controls2['$<<'](_temple_html_attributeremover1);
_slim_controls2['$<<']("\"");};
_slim_codeattributes2 = self.$attr("start");
if ($truthy(_slim_codeattributes2)) {
if (_slim_codeattributes2['$=='](true)) {
_slim_controls2['$<<'](" start")
} else {
_slim_controls2['$<<'](" start=\"");
_slim_controls2['$<<'](_slim_codeattributes2);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes3 = self.$list_marker_keyword();
if ($truthy(_slim_codeattributes3)) {
if (_slim_codeattributes3['$=='](true)) {
_slim_controls2['$<<'](" type")
} else {
_slim_controls2['$<<'](" type=\"");
_slim_controls2['$<<'](_slim_codeattributes3);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes4 = self['$option?']("reversed");
if ($truthy(_slim_codeattributes4)) {
if (_slim_codeattributes4['$=='](true)) {
_slim_controls2['$<<'](" reversed")
} else {
_slim_controls2['$<<'](" reversed=\"");
_slim_controls2['$<<'](_slim_codeattributes4);
_slim_controls2['$<<']("\"");
}};
_slim_controls2['$<<'](">");
$send(self.$items(), 'each', [], ($$66 = function(item){var self = $$66.$$s || this, _slim_codeattributes5 = nil, _temple_html_attributeremover2 = nil, _slim_codeattributes6 = nil;
if (item == null) {
item = nil;
};
_slim_controls2['$<<']("<li");
_slim_codeattributes5 = item.$id();
if ($truthy(_slim_codeattributes5)) {
if (_slim_codeattributes5['$=='](true)) {
_slim_controls2['$<<'](" id")
} else {
_slim_controls2['$<<'](" id=\"");
_slim_controls2['$<<'](_slim_codeattributes5);
_slim_controls2['$<<']("\"");
}};
_temple_html_attributeremover2 = [];
_slim_codeattributes6 = item.$role();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes6))) {
_slim_codeattributes6 = _slim_codeattributes6.$flatten();
$send(_slim_codeattributes6, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes6, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover2['$<<'](_slim_codeattributes6.$join(" "));
} else {
_temple_html_attributeremover2['$<<'](_slim_codeattributes6)
};
_temple_html_attributeremover2 = _temple_html_attributeremover2.$join("");
if ($truthy(_temple_html_attributeremover2['$empty?']()['$!']())) {
_slim_controls2['$<<'](" class=\"");
_slim_controls2['$<<'](_temple_html_attributeremover2);
_slim_controls2['$<<']("\"");};
_slim_controls2['$<<'](">");
_slim_controls2['$<<'](self.$print_item_content(item));
return _slim_controls2['$<<']("</li>");}, $$66.$$s = self, $$66.$$arity = 1, $$66));
_slim_controls2['$<<']("</ol>");
return (_slim_controls2 = _slim_controls2.$join(""));}, $$65.$$s = self, $$65.$$arity = 0, $$65));
_buf['$<<'](_slim_controls1);
return (_buf = _buf.$join(""));}, $$64.$$s = self, $$64.$$arity = 0, $$64));
}, $Converter_olist$63.$$arity = -2);
Opal.def(self, '$verse', $Converter_verse$67 = function $$verse(node, opts) {
var $$68, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$68 = function(){var self = $$68.$$s || this, $$69, _buf = nil, _slim_controls1 = nil;
_buf = [];
_slim_controls1 = $send(self, 'block_with_title', [$hash2(["class"], {"class": "verse-block"})], ($$69 = function(){var self = $$69.$$s || this, $a, _slim_controls2 = nil;
_slim_controls2 = [];
if ($truthy(($truthy($a = self['$attr?']("attribution")) ? $a : self['$attr?']("citetitle")))) {
_slim_controls2['$<<']("<blockquote class=\"verse\"><pre class=\"verse\">");
_slim_controls2['$<<'](self.$content());
_slim_controls2['$<<']("</pre><footer>— <cite>");
_slim_controls2['$<<']([self.$attr("attribution"), self.$attr("citetitle")].$compact().$join(", "));
_slim_controls2['$<<']("</cite></footer></blockquote>");
} else {
_slim_controls2['$<<']("<pre class=\"verse\">");
_slim_controls2['$<<'](self.$content());
_slim_controls2['$<<']("</pre>");
};
return (_slim_controls2 = _slim_controls2.$join(""));}, $$69.$$s = self, $$69.$$arity = 0, $$69));
_buf['$<<'](_slim_controls1);
return (_buf = _buf.$join(""));}, $$68.$$s = self, $$68.$$arity = 0, $$68));
}, $Converter_verse$67.$$arity = -2);
Opal.def(self, '$inline_footnote', $Converter_inline_footnote$70 = function $$inline_footnote(node, opts) {
var $$71, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$71 = function(){var self = $$71.$$s || this, _buf = nil, index = nil, _slim_codeattributes1 = nil;
_buf = [];
if ($truthy((index = self.$local_attr("index")))) {
_buf['$<<']("<a class=\"footnote-ref\"");
_slim_codeattributes1 = (function() {if (self.$type()['$==']("xref")) {
return nil
} else {
return self.$footnoteref_id()
}; return nil; })();
if ($truthy(_slim_codeattributes1)) {
if (_slim_codeattributes1['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes1);
_buf['$<<']("\"");
}};
_buf['$<<'](" href=\"#");
_buf['$<<'](self.$footnote_id());
_buf['$<<']("\" title=\"View footnote ");
_buf['$<<'](index);
_buf['$<<']("\" role=\"doc-noteref\">[");
_buf['$<<'](index);
_buf['$<<']("]</a>");
} else {
_buf['$<<']("<a class=\"footnote-ref broken\" title=\"Unresolved footnote reference.\">[");
_buf['$<<'](self.$text());
_buf['$<<']("]</a>");
};
return (_buf = _buf.$join(""));}, $$71.$$s = self, $$71.$$arity = 0, $$71));
}, $Converter_inline_footnote$70.$$arity = -2);
Opal.def(self, '$preamble', $Converter_preamble$72 = function $$preamble(node, opts) {
var $$73, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$73 = function(){var self = $$73.$$s || this, $a, _buf = nil, _temple_html_attributeremover1 = nil, _slim_codeattributes1 = nil;
_buf = [];
_buf['$<<']("<section id=\"preamble\" aria-label=\"Preamble\">");
_buf['$<<'](self.$content());
_buf['$<<']("</section>");
if ($truthy(($truthy($a = self.$document()['$attr?']("toc")) ? self.$document()['$attr?']("toc-placement", "preamble") : $a))) {
_buf['$<<']("<nav id=\"toc\"");
_temple_html_attributeremover1 = [];
_slim_codeattributes1 = self.$document().$attr("toc-class", "toc");
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes1))) {
_slim_codeattributes1 = _slim_codeattributes1.$flatten();
$send(_slim_codeattributes1, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes1, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover1['$<<'](_slim_codeattributes1.$join(" "));
} else {
_temple_html_attributeremover1['$<<'](_slim_codeattributes1)
};
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover1);
_buf['$<<']("\"");};
_buf['$<<'](" role=\"doc-toc\"><h2 id=\"toc-title\">");
_buf['$<<'](self.$document().$attr("toc-title"));
_buf['$<<']("</h2>");
_buf['$<<'](self.$converter().$convert(self.$document(), "outline"));
_buf['$<<']("</nav>");};
return (_buf = _buf.$join(""));}, $$73.$$s = self, $$73.$$arity = 0, $$73));
}, $Converter_preamble$72.$$arity = -2);
Opal.def(self, '$document', $Converter_document$74 = function $$document(node, opts) {
var $$75, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$75 = function(){var self = $$75.$$s || this, $a, $b, $$76, $$77, $$78, _buf = nil, _slim_codeattributes1 = nil, document_content = nil, _slim_codeattributes2 = nil, docinfo_content = nil, _slim_codeattributes3 = nil, _temple_html_attributeremover1 = nil, _slim_codeattributes4 = nil, _slim_codeattributes5 = nil, authorcount = nil, _slim_codeattributes6 = nil, _temple_html_attributeremover2 = nil, _slim_codeattributes7 = nil;
_buf = [];
_buf['$<<']("<!DOCTYPE html><html");
_slim_codeattributes1 = (function() {if ($truthy(self['$attr?']("nolang"))) {
return nil
} else {
return self.$attr("lang", "en")
}; return nil; })();
if ($truthy(_slim_codeattributes1)) {
if (_slim_codeattributes1['$=='](true)) {
_buf['$<<'](" lang")
} else {
_buf['$<<'](" lang=\"");
_buf['$<<'](_slim_codeattributes1);
_buf['$<<']("\"");
}};
_buf['$<<'](">");
document_content = self.$content();
_buf['$<<']("<head><meta");
_slim_codeattributes2 = self.$attr("encoding", "UTF-8");
if ($truthy(_slim_codeattributes2)) {
if (_slim_codeattributes2['$=='](true)) {
_buf['$<<'](" charset")
} else {
_buf['$<<'](" charset=\"");
_buf['$<<'](_slim_codeattributes2);
_buf['$<<']("\"");
}};
_buf['$<<']("><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><meta name=\"generator\" content=\"Asciidoctor ");
_buf['$<<'](self.$attr("asciidoctor-version"));
_buf['$<<']("\">");
_buf['$<<'](self.$html_meta_if("application-name", self.$attr("app-name")));
_buf['$<<'](self.$html_meta_if("author", self.$attr("authors")));
_buf['$<<'](self.$html_meta_if("copyright", self.$attr("copyright")));
_buf['$<<'](self.$html_meta_if("description", self.$attr("description")));
_buf['$<<'](self.$html_meta_if("keywords", self.$attr("keywords")));
_buf['$<<']("<title>");
_buf['$<<'](($truthy($a = self.$doctitle($hash2(["sanitize"], {"sanitize": true}))) ? $a : self.$attr("untitled-label")));
_buf['$<<']("</title>");
_buf['$<<'](self.$styles_and_scripts());
if ($truthy((docinfo_content = self.$docinfo())['$empty?']())) {
} else {
_buf['$<<'](docinfo_content)
};
_buf['$<<']("</head><body");
_slim_codeattributes3 = self.$id();
if ($truthy(_slim_codeattributes3)) {
if (_slim_codeattributes3['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes3);
_buf['$<<']("\"");
}};
_temple_html_attributeremover1 = [];
_slim_codeattributes4 = [self.$attr("doctype"), (function() {if ($truthy(($truthy($a = ($truthy($b = self['$attr?']("toc-class")) ? self['$attr?']("toc") : $b)) ? self['$attr?']("toc-placement", "auto") : $a))) {
return "" + (self.$attr("toc-class")) + " toc-" + (self.$attr("toc-position", "left"))
} else {
return nil
}; return nil; })(), ($truthy($a = self.$attr("docrole")) ? $a : self.$attr("role"))];
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes4))) {
_slim_codeattributes4 = _slim_codeattributes4.$flatten();
$send(_slim_codeattributes4, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes4, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover1['$<<'](_slim_codeattributes4.$join(" "));
} else {
_temple_html_attributeremover1['$<<'](_slim_codeattributes4)
};
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover1);
_buf['$<<']("\"");};
_slim_codeattributes5 = self.$style_value($hash2(["max_width"], {"max_width": self.$attr("max-width")}));
if ($truthy(_slim_codeattributes5)) {
if (_slim_codeattributes5['$=='](true)) {
_buf['$<<'](" style")
} else {
_buf['$<<'](" style=\"");
_buf['$<<'](_slim_codeattributes5);
_buf['$<<']("\"");
}};
_buf['$<<'](">");
if ($truthy((docinfo_content = self.$docinfo("header"))['$empty?']())) {
} else {
_buf['$<<'](docinfo_content)
};
if ($truthy(self.$noheader())) {
} else {
_buf['$<<']("<header>");
if ($truthy(self['$header?']())) {
if ($truthy(self.$notitle())) {
} else {
_buf['$<<']("<h1>");
_buf['$<<'](self.$header().$title());
_buf['$<<']("</h1>");
};
if ($truthy($send(["author", "revnumber", "revdate", "revremark"], 'any?', [], ($$76 = function(a){var self = $$76.$$s || this;
if (a == null) {
a = nil;
};
return self['$attr?'](a);}, $$76.$$s = self, $$76.$$arity = 1, $$76)))) {
_buf['$<<']("<div class=\"details\">");
if ($truthy(self['$attr?']("author"))) {
_buf['$<<']("<span class=\"author\" id=\"author\">");
_buf['$<<'](self.$attr("author"));
_buf['$<<']("</span><br>");
if ($truthy(self['$attr?']("email"))) {
_buf['$<<']("<span class=\"email\" id=\"email\">");
_buf['$<<'](self.$sub_macros(self.$attr("email")));
_buf['$<<']("</span><br>");};
if ($truthy($rb_gt((authorcount = self.$attr("authorcount").$to_i()), 1))) {
$send(Opal.Range.$new(2, authorcount, false), 'each', [], ($$77 = function(idx){var self = $$77.$$s || this;
if (idx == null) {
idx = nil;
};
_buf['$<<']("<span class=\"author\" id=\"author");
_buf['$<<'](idx);
_buf['$<<']("\">");
_buf['$<<'](self.$attr("" + "author_" + (idx)));
_buf['$<<']("</span><br>");
if ($truthy(self['$attr?']("" + "email_" + (idx)))) {
_buf['$<<']("<span class=\"email\" id=\"email");
_buf['$<<'](idx);
_buf['$<<']("\">");
_buf['$<<'](self.$sub_macros(self.$attr("" + "email_" + (idx))));
return _buf['$<<']("</span>");
} else {
return nil
};}, $$77.$$s = self, $$77.$$arity = 1, $$77))};};
if ($truthy(self['$attr?']("revnumber"))) {
_buf['$<<']("<span id=\"revnumber\">");
_buf['$<<'](($truthy($a = self.$attr("version-label")) ? $a : "").$downcase());
_buf['$<<'](" ");
_buf['$<<'](self.$attr("revnumber"));
_buf['$<<']((function() {if ($truthy(self['$attr?']("revdate"))) {
return ","
} else {
return nil
}; return nil; })());
_buf['$<<']("</span> ");};
if ($truthy(self['$attr?']("revdate"))) {
_buf['$<<']("<time id=\"revdate\"");
_slim_codeattributes6 = self.$revdate_iso();
if ($truthy(_slim_codeattributes6)) {
if (_slim_codeattributes6['$=='](true)) {
_buf['$<<'](" datetime")
} else {
_buf['$<<'](" datetime=\"");
_buf['$<<'](_slim_codeattributes6);
_buf['$<<']("\"");
}};
_buf['$<<'](">");
_buf['$<<'](self.$attr("revdate"));
_buf['$<<']("</time>");};
if ($truthy(self['$attr?']("revremark"))) {
_buf['$<<']("<br><span id=\"revremark\">");
_buf['$<<'](self.$attr("revremark"));
_buf['$<<']("</span>");};
_buf['$<<']("</div>");};};
if ($truthy(($truthy($a = self['$attr?']("toc")) ? self['$attr?']("toc-placement", "auto") : $a))) {
_buf['$<<']("<nav id=\"toc\"");
_temple_html_attributeremover2 = [];
_slim_codeattributes7 = self.$document().$attr("toc-class", "toc");
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes7))) {
_slim_codeattributes7 = _slim_codeattributes7.$flatten();
$send(_slim_codeattributes7, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes7, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover2['$<<'](_slim_codeattributes7.$join(" "));
} else {
_temple_html_attributeremover2['$<<'](_slim_codeattributes7)
};
_temple_html_attributeremover2 = _temple_html_attributeremover2.$join("");
if ($truthy(_temple_html_attributeremover2['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover2);
_buf['$<<']("\"");};
_buf['$<<'](" role=\"doc-toc\"><h2 id=\"toc-title\">");
_buf['$<<'](self.$document().$attr("toc-title"));
_buf['$<<']("</h2>");
_buf['$<<'](self.$converter().$convert(self.$document(), "outline"));
_buf['$<<']("</nav>");};
_buf['$<<']("</header>");
};
_buf['$<<']("<div id=\"content\">");
_buf['$<<'](document_content);
_buf['$<<']("</div>");
if ($truthy(($truthy($a = self['$footnotes?']()['$!']()) ? $a : self['$attr?']("nofootnotes")))) {
} else {
_buf['$<<']("<section class=\"footnotes\" aria-label=\"Footnotes\" role=\"doc-endnotes\"><hr><ol class=\"footnotes\">");
$send(self.$footnotes(), 'each', [], ($$78 = function(fn){var self = $$78.$$s || this, _slim_codeattributes8 = nil;
if (fn == null) {
fn = nil;
};
_buf['$<<']("<li class=\"footnote\"");
_slim_codeattributes8 = self.$footnote_id(fn.$index());
if ($truthy(_slim_codeattributes8)) {
if (_slim_codeattributes8['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes8);
_buf['$<<']("\"");
}};
_buf['$<<'](" role=\"doc-endnote\">");
_buf['$<<']("" + (fn.$text()) + " ");
_buf['$<<']("<a class=\"footnote-backref\" href=\"#");
_buf['$<<'](self.$footnoteref_id(fn.$index()));
return _buf['$<<']("\" role=\"doc-backlink\" title=\"Jump to the first occurrence in the text\">↩</a></li>");}, $$78.$$s = self, $$78.$$arity = 1, $$78));
_buf['$<<']("</ol></section>");
};
if ($truthy(self.$nofooter())) {
} else {
_buf['$<<']("<footer><div id=\"footer-text\">");
if ($truthy(self['$attr?']("revnumber"))) {
_buf['$<<'](self.$attr("version-label"));
_buf['$<<'](" ");
_buf['$<<'](self.$attr("revnumber"));};
if ($truthy(self['$attr?']("last-update-label"))) {
_buf['$<<']("<br>");
_buf['$<<'](self.$attr("last-update-label"));
_buf['$<<'](" ");
_buf['$<<'](self.$attr("docdatetime"));};
_buf['$<<']("</div>");
if ($truthy((docinfo_content = self.$docinfo("footer"))['$empty?']())) {
} else {
_buf['$<<'](docinfo_content)
};
_buf['$<<']("</footer>");
};
_buf['$<<']("</body></html>");
return (_buf = _buf.$join(""));}, $$75.$$s = self, $$75.$$arity = 0, $$75));
}, $Converter_document$74.$$arity = -2);
Opal.def(self, '$paragraph', $Converter_paragraph$79 = function $$paragraph(node, opts) {
var $$80, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$80 = function(){var self = $$80.$$s || this, _buf = nil, _slim_codeattributes1 = nil, _temple_html_attributeremover1 = nil, _slim_codeattributes2 = nil, _slim_codeattributes3 = nil, _temple_html_attributeremover2 = nil, _slim_codeattributes4 = nil;
_buf = [];
if ($truthy(self['$title?']())) {
_buf['$<<']("<section class=\"paragraph\"");
_slim_codeattributes1 = self.$id();
if ($truthy(_slim_codeattributes1)) {
if (_slim_codeattributes1['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes1);
_buf['$<<']("\"");
}};
_buf['$<<']("><h6 class=\"block-title\">");
_buf['$<<'](self.$title());
_buf['$<<']("</h6><p");
_temple_html_attributeremover1 = [];
_slim_codeattributes2 = self.$role();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes2))) {
_slim_codeattributes2 = _slim_codeattributes2.$flatten();
$send(_slim_codeattributes2, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes2, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover1['$<<'](_slim_codeattributes2.$join(" "));
} else {
_temple_html_attributeremover1['$<<'](_slim_codeattributes2)
};
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover1);
_buf['$<<']("\"");};
_buf['$<<'](">");
_buf['$<<'](self.$content());
_buf['$<<']("</p></section>");
} else {
_buf['$<<']("<p");
_slim_codeattributes3 = self.$id();
if ($truthy(_slim_codeattributes3)) {
if (_slim_codeattributes3['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes3);
_buf['$<<']("\"");
}};
_temple_html_attributeremover2 = [];
_slim_codeattributes4 = self.$role();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes4))) {
_slim_codeattributes4 = _slim_codeattributes4.$flatten();
$send(_slim_codeattributes4, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes4, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover2['$<<'](_slim_codeattributes4.$join(" "));
} else {
_temple_html_attributeremover2['$<<'](_slim_codeattributes4)
};
_temple_html_attributeremover2 = _temple_html_attributeremover2.$join("");
if ($truthy(_temple_html_attributeremover2['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover2);
_buf['$<<']("\"");};
_buf['$<<'](">");
_buf['$<<'](self.$content());
_buf['$<<']("</p>");
};
return (_buf = _buf.$join(""));}, $$80.$$s = self, $$80.$$arity = 0, $$80));
}, $Converter_paragraph$79.$$arity = -2);
Opal.def(self, '$quote', $Converter_quote$81 = function $$quote(node, opts) {
var $$82, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$82 = function(){var self = $$82.$$s || this, $$83, _buf = nil, _slim_controls1 = nil;
_buf = [];
_slim_controls1 = $send(self, 'block_with_title', [$hash2(["class"], {"class": "quote-block"})], ($$83 = function(){var self = $$83.$$s || this, $$84, $a, _slim_controls2 = nil, _slim_controls3 = nil;
_slim_controls2 = [];
_slim_controls2['$<<']("<blockquote>");
_slim_controls3 = $send(self, 'html_tag_if', [self['$blocks?']()['$!'](), "p"], ($$84 = function(){var self = $$84.$$s || this, _slim_controls4 = nil;
_slim_controls4 = [];
_slim_controls4['$<<'](self.$content());
return (_slim_controls4 = _slim_controls4.$join(""));}, $$84.$$s = self, $$84.$$arity = 0, $$84));
_slim_controls2['$<<'](_slim_controls3);
if ($truthy(($truthy($a = self['$attr?']("attribution")) ? $a : self['$attr?']("citetitle")))) {
_slim_controls2['$<<']("<footer>— <cite>");
_slim_controls2['$<<']([self.$attr("attribution"), self.$attr("citetitle")].$compact().$join(", "));
_slim_controls2['$<<']("</cite></footer>");};
_slim_controls2['$<<']("</blockquote>");
return (_slim_controls2 = _slim_controls2.$join(""));}, $$83.$$s = self, $$83.$$arity = 0, $$83));
_buf['$<<'](_slim_controls1);
return (_buf = _buf.$join(""));}, $$82.$$s = self, $$82.$$arity = 0, $$82));
}, $Converter_quote$81.$$arity = -2);
Opal.def(self, '$image', $Converter_image$85 = function $$image(node, opts) {
var $$86, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$86 = function(){var self = $$86.$$s || this, $$87, _buf = nil, _slim_controls1 = nil;
_buf = [];
_slim_controls1 = $send(self, 'block_with_caption', ["bottom", $hash2(["class", "style"], {"class": "image-block", "style": self.$style_value($hash2(["text_align", "float"], {"text_align": self.$attr("align"), "float": self.$attr("float")}))})], ($$87 = function(){var self = $$87.$$s || this, $$88, _slim_controls2 = nil, target_url = nil, _slim_controls3 = nil;
_slim_controls2 = [];
target_url = self.$image_uri(self.$attr("target"));
_slim_controls3 = $send(self, 'html_tag_if', [self.$image_link(), "a", $hash2(["class", "href", "title", "aria-label", "target", "rel"], {"class": ["image", (function() {if (self.$image_link()['$=='](target_url)) {
return "bare"
} else {
return nil
}; return nil; })()], "href": self.$image_link(), "title": self.$image_link_label(), "aria-label": self.$image_link_label(), "target": self.$attr("window"), "rel": self.$link_rel()})], ($$88 = function(){var self = $$88.$$s || this, _slim_controls4 = nil, _slim_codeattributes1 = nil, _slim_codeattributes2 = nil, _slim_codeattributes3 = nil, _slim_codeattributes4 = nil, _slim_codeattributes5 = nil;
_slim_controls4 = [];
_slim_controls4['$<<']("<img");
_slim_codeattributes1 = target_url;
if ($truthy(_slim_codeattributes1)) {
if (_slim_codeattributes1['$=='](true)) {
_slim_controls4['$<<'](" src")
} else {
_slim_controls4['$<<'](" src=\"");
_slim_controls4['$<<'](_slim_codeattributes1);
_slim_controls4['$<<']("\"");
}};
_slim_codeattributes2 = self.$attr("alt");
if ($truthy(_slim_codeattributes2)) {
if (_slim_codeattributes2['$=='](true)) {
_slim_controls4['$<<'](" alt")
} else {
_slim_controls4['$<<'](" alt=\"");
_slim_controls4['$<<'](_slim_codeattributes2);
_slim_controls4['$<<']("\"");
}};
_slim_codeattributes3 = self.$attr("width");
if ($truthy(_slim_codeattributes3)) {
if (_slim_codeattributes3['$=='](true)) {
_slim_controls4['$<<'](" width")
} else {
_slim_controls4['$<<'](" width=\"");
_slim_controls4['$<<'](_slim_codeattributes3);
_slim_controls4['$<<']("\"");
}};
_slim_codeattributes4 = self.$attr("height");
if ($truthy(_slim_codeattributes4)) {
if (_slim_codeattributes4['$=='](true)) {
_slim_controls4['$<<'](" height")
} else {
_slim_controls4['$<<'](" height=\"");
_slim_controls4['$<<'](_slim_codeattributes4);
_slim_controls4['$<<']("\"");
}};
_slim_codeattributes5 = self.$attr("loading");
if ($truthy(_slim_codeattributes5)) {
if (_slim_codeattributes5['$=='](true)) {
_slim_controls4['$<<'](" loading")
} else {
_slim_controls4['$<<'](" loading=\"");
_slim_controls4['$<<'](_slim_codeattributes5);
_slim_controls4['$<<']("\"");
}};
_slim_controls4['$<<'](">");
return (_slim_controls4 = _slim_controls4.$join(""));}, $$88.$$s = self, $$88.$$arity = 0, $$88));
_slim_controls2['$<<'](_slim_controls3);
return (_slim_controls2 = _slim_controls2.$join(""));}, $$87.$$s = self, $$87.$$arity = 0, $$87));
_buf['$<<'](_slim_controls1);
return (_buf = _buf.$join(""));}, $$86.$$s = self, $$86.$$arity = 0, $$86));
}, $Converter_image$85.$$arity = -2);
Opal.def(self, '$colist', $Converter_colist$89 = function $$colist(node, opts) {
var $$90, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$90 = function(){var self = $$90.$$s || this, $$91, _buf = nil, _temple_html_attributeremover1 = nil, _temple_html_attributemerger1 = nil, $writer = nil, _slim_codeattributes1 = nil, _slim_codeattributes2 = nil;
_buf = [];
_buf['$<<']("<ol");
_temple_html_attributeremover1 = [];
_temple_html_attributemerger1 = [];
$writer = [0, "callout-list"];
$send(_temple_html_attributemerger1, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
$writer = [1, []];
$send(_temple_html_attributemerger1, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
_slim_codeattributes1 = [self.$style(), self.$role()];
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes1))) {
_slim_codeattributes1 = _slim_codeattributes1.$flatten();
$send(_slim_codeattributes1, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes1, 'reject!', [], "empty?".$to_proc());
_temple_html_attributemerger1['$[]'](1)['$<<'](_slim_codeattributes1.$join(" "));
} else {
_temple_html_attributemerger1['$[]'](1)['$<<'](_slim_codeattributes1)
};
$writer = [1, _temple_html_attributemerger1['$[]'](1).$join("")];
$send(_temple_html_attributemerger1, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
_temple_html_attributeremover1['$<<']($send(_temple_html_attributemerger1, 'reject', [], "empty?".$to_proc()).$join(" "));
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover1);
_buf['$<<']("\"");};
_slim_codeattributes2 = self.$id();
if ($truthy(_slim_codeattributes2)) {
if (_slim_codeattributes2['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes2);
_buf['$<<']("\"");
}};
_buf['$<<'](">");
$send(self.$items(), 'each', [], ($$91 = function(item){var self = $$91.$$s || this;
if (item == null) {
item = nil;
};
_buf['$<<']("<li>");
_buf['$<<'](item.$text());
return _buf['$<<']("</li>");}, $$91.$$s = self, $$91.$$arity = 1, $$91));
_buf['$<<']("</ol>");
return (_buf = _buf.$join(""));}, $$90.$$s = self, $$90.$$arity = 0, $$90));
}, $Converter_colist$89.$$arity = -2);
Opal.def(self, '$pass', $Converter_pass$92 = function $$pass(node, opts) {
var $$93, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$93 = function(){var self = $$93.$$s || this, _buf = nil;
_buf = [];
_buf['$<<'](self.$content());
return (_buf = _buf.$join(""));}, $$93.$$s = self, $$93.$$arity = 0, $$93));
}, $Converter_pass$92.$$arity = -2);
Opal.def(self, '$inline_menu', $Converter_inline_menu$94 = function $$inline_menu(node, opts) {
var $$95, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$95 = function(){var self = $$95.$$s || this, $$96, $$97, _buf = nil;
_buf = [];
if ($truthy(self.$local_attr("menuitem"))) {
$send(self, 'capture', [], ($$96 = function(){var self = $$96.$$s || this;
return _buf['$<<'](" <span class=\"caret\">›</span> ")}, $$96.$$s = self, $$96.$$arity = 0, $$96));
_buf['$<<']("<kbd class=\"menuseq\"><kbd class=\"menu\"><samp>");
_buf['$<<'](self.$attr("menu"));
_buf['$<<']("</samp></kbd>");
self.$yield_capture();
$send(self.$attr("submenus"), 'each', [], ($$97 = function(submenu){var self = $$97.$$s || this;
if (submenu == null) {
submenu = nil;
};
_buf['$<<']("<kbd class=\"menu\"><samp>");
_buf['$<<'](submenu);
_buf['$<<']("</samp></kbd>");
return self.$yield_capture();}, $$97.$$s = self, $$97.$$arity = 1, $$97));
_buf['$<<']("<kbd class=\"menu\"><samp>");
_buf['$<<'](self.$local_attr("menuitem"));
_buf['$<<']("</samp></kbd></kbd>");
} else {
_buf['$<<']("<kbd class=\"menu\"><samp>");
_buf['$<<'](self.$attr("menu"));
_buf['$<<']("</samp></kbd>");
};
return (_buf = _buf.$join(""));}, $$95.$$s = self, $$95.$$arity = 0, $$95));
}, $Converter_inline_menu$94.$$arity = -2);
Opal.def(self, '$dlist', $Converter_dlist$98 = function $$dlist(node, opts) {
var $$99, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$99 = function(){var self = $$99.$$s || this, $$100, _buf = nil, _slim_controls1 = nil;
_buf = [];
_slim_controls1 = $send(self, 'block_with_title', [$hash2(["class", "role"], {"class": ["dlist", self.$style()], "role": (function() {if (self.$style()['$==']("qanda")) {
return "doc-qna"
} else {
return nil
}; return nil; })()})], ($$100 = function(){var self = $$100.$$s || this, $$101, _slim_controls2 = nil, _temple_html_attributeremover1 = nil, _slim_codeattributes1 = nil;
_slim_controls2 = [];
_slim_controls2['$<<']("<dl");
_temple_html_attributeremover1 = [];
_slim_codeattributes1 = self.$style();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes1))) {
_slim_codeattributes1 = _slim_codeattributes1.$flatten();
$send(_slim_codeattributes1, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes1, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover1['$<<'](_slim_codeattributes1.$join(" "));
} else {
_temple_html_attributeremover1['$<<'](_slim_codeattributes1)
};
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_slim_controls2['$<<'](" class=\"");
_slim_controls2['$<<'](_temple_html_attributeremover1);
_slim_controls2['$<<']("\"");};
_slim_controls2['$<<'](">");
$send(self.$items(), 'each', [], ($$101 = function(terms, dd){var self = $$101.$$s || this, $$102;
if (terms == null) {
terms = nil;
};
if (dd == null) {
dd = nil;
};
$send([].concat(Opal.to_a(terms)), 'each', [], ($$102 = function(dt){var self = $$102.$$s || this;
if (dt == null) {
dt = nil;
};
_slim_controls2['$<<']("<dt>");
_slim_controls2['$<<'](dt.$text());
return _slim_controls2['$<<']("</dt>");}, $$102.$$s = self, $$102.$$arity = 1, $$102));
if ($truthy(dd['$nil?']())) {
return nil
} else {
_slim_controls2['$<<']("<dd>");
_slim_controls2['$<<'](self.$print_item_content(dd));
return _slim_controls2['$<<']("</dd>");
};}, $$101.$$s = self, $$101.$$arity = 2, $$101));
_slim_controls2['$<<']("</dl>");
return (_slim_controls2 = _slim_controls2.$join(""));}, $$100.$$s = self, $$100.$$arity = 0, $$100));
_buf['$<<'](_slim_controls1);
return (_buf = _buf.$join(""));}, $$99.$$s = self, $$99.$$arity = 0, $$99));
}, $Converter_dlist$98.$$arity = -2);
Opal.def(self, '$inline_indexterm', $Converter_inline_indexterm$103 = function $$inline_indexterm(node, opts) {
var $$104, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$104 = function(){var self = $$104.$$s || this, _buf = nil;
_buf = [];
if (self.$type()['$==']("visible")) {
_buf['$<<'](self.$text())};
return (_buf = _buf.$join(""));}, $$104.$$s = self, $$104.$$arity = 0, $$104));
}, $Converter_inline_indexterm$103.$$arity = -2);
Opal.def(self, '$toc', $Converter_toc$105 = function $$toc(node, opts) {
var $$106, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$106 = function(){var self = $$106.$$s || this, $a, $b, _buf = nil, toc_id = nil, _slim_codeattributes1 = nil, _temple_html_attributeremover1 = nil, _slim_codeattributes2 = nil, _slim_htag_filter1 = nil, _slim_codeattributes3 = nil;
_buf = [];
if ($truthy(($truthy($a = self.$document()['$attr?']("toc")) ? self.$document()['$sections?']() : $a))) {
toc_id = ($truthy($a = self.$id()) ? $a : (function() {if ($truthy(($truthy($b = self.$document()['$embedded?']()) ? $b : self.$document()['$attr?']("toc-placement")['$!']()))) {
return "toc"
} else {
return nil
}; return nil; })());
_buf['$<<']("<nav");
_slim_codeattributes1 = toc_id;
if ($truthy(_slim_codeattributes1)) {
if (_slim_codeattributes1['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes1);
_buf['$<<']("\"");
}};
_temple_html_attributeremover1 = [];
_slim_codeattributes2 = self.$attr("role", self.$document().$attr("toc-class", "toc"));
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes2))) {
_slim_codeattributes2 = _slim_codeattributes2.$flatten();
$send(_slim_codeattributes2, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes2, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover1['$<<'](_slim_codeattributes2.$join(" "));
} else {
_temple_html_attributeremover1['$<<'](_slim_codeattributes2)
};
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover1);
_buf['$<<']("\"");};
_buf['$<<'](" role=\"doc-toc\">");
_slim_htag_filter1 = $rb_plus(self.$level(), 2).$to_s();
_buf['$<<']("<h");
_buf['$<<'](_slim_htag_filter1);
_slim_codeattributes3 = (function() {if ($truthy(toc_id)) {
return "" + (toc_id) + "-title"
} else {
return nil
}; return nil; })();
if ($truthy(_slim_codeattributes3)) {
if (_slim_codeattributes3['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes3);
_buf['$<<']("\"");
}};
_buf['$<<'](">");
_buf['$<<'](($truthy($a = self.$title()) ? $a : self.$document().$attr("toc-title")));
_buf['$<<']("</h");
_buf['$<<'](_slim_htag_filter1);
_buf['$<<'](">");
_buf['$<<'](self.$converter().$convert(self.$document(), "outline", $hash2(["toclevels"], {"toclevels": (function() {if ($truthy(self['$attr?']("levels"))) {
return self.$attr("levels").$to_i()
} else {
return nil
}; return nil; })()})));
_buf['$<<']("</nav>");
} else {
_buf['$<<']("<!--toc disabled-->")
};
return (_buf = _buf.$join(""));}, $$106.$$s = self, $$106.$$arity = 0, $$106));
}, $Converter_toc$105.$$arity = -2);
Opal.def(self, '$ulist', $Converter_ulist$107 = function $$ulist(node, opts) {
var $$108, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$108 = function(){var self = $$108.$$s || this, $$109, _buf = nil, checklist = nil, _slim_controls1 = nil;
_buf = [];
if ($truthy(self['$option?']("checklist"))) {
checklist = "task-list"};
_slim_controls1 = $send(self, 'block_with_title', [$hash2(["class"], {"class": ["ulist", self.$style()]})], ($$109 = function(){var self = $$109.$$s || this, $a, $$110, _slim_controls2 = nil, _temple_html_attributeremover1 = nil, _slim_codeattributes1 = nil;
_slim_controls2 = [];
_slim_controls2['$<<']("<ul");
_temple_html_attributeremover1 = [];
_slim_codeattributes1 = ($truthy($a = checklist) ? $a : self.$style());
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes1))) {
_slim_codeattributes1 = _slim_codeattributes1.$flatten();
$send(_slim_codeattributes1, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes1, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover1['$<<'](_slim_codeattributes1.$join(" "));
} else {
_temple_html_attributeremover1['$<<'](_slim_codeattributes1)
};
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_slim_controls2['$<<'](" class=\"");
_slim_controls2['$<<'](_temple_html_attributeremover1);
_slim_controls2['$<<']("\"");};
_slim_controls2['$<<'](">");
$send(self.$items(), 'each', [], ($$110 = function(item){var self = $$110.$$s || this, $b, _temple_html_attributeremover2 = nil, _temple_html_attributemerger1 = nil, $writer = nil, _slim_codeattributes2 = nil, _slim_codeattributes3 = nil, _slim_codeattributes4 = nil, _slim_codeattributes5 = nil, _temple_html_attributeremover3 = nil, _slim_codeattributes6 = nil;
if (item == null) {
item = nil;
};
if ($truthy(($truthy($b = checklist) ? item['$attr?']("checkbox") : $b))) {
_slim_controls2['$<<']("<li");
_temple_html_attributeremover2 = [];
_temple_html_attributemerger1 = [];
$writer = [0, "task-list-item"];
$send(_temple_html_attributemerger1, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
$writer = [1, []];
$send(_temple_html_attributemerger1, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
_slim_codeattributes2 = item.$role();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes2))) {
_slim_codeattributes2 = _slim_codeattributes2.$flatten();
$send(_slim_codeattributes2, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes2, 'reject!', [], "empty?".$to_proc());
_temple_html_attributemerger1['$[]'](1)['$<<'](_slim_codeattributes2.$join(" "));
} else {
_temple_html_attributemerger1['$[]'](1)['$<<'](_slim_codeattributes2)
};
$writer = [1, _temple_html_attributemerger1['$[]'](1).$join("")];
$send(_temple_html_attributemerger1, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
_temple_html_attributeremover2['$<<']($send(_temple_html_attributemerger1, 'reject', [], "empty?".$to_proc()).$join(" "));
_temple_html_attributeremover2 = _temple_html_attributeremover2.$join("");
if ($truthy(_temple_html_attributeremover2['$empty?']()['$!']())) {
_slim_controls2['$<<'](" class=\"");
_slim_controls2['$<<'](_temple_html_attributeremover2);
_slim_controls2['$<<']("\"");};
_slim_codeattributes3 = item.$id();
if ($truthy(_slim_codeattributes3)) {
if (_slim_codeattributes3['$=='](true)) {
_slim_controls2['$<<'](" id")
} else {
_slim_controls2['$<<'](" id=\"");
_slim_controls2['$<<'](_slim_codeattributes3);
_slim_controls2['$<<']("\"");
}};
_slim_controls2['$<<']("><input class=\"task-list-item-checkbox\" type=\"checkbox\" disabled");
_slim_codeattributes4 = item['$attr?']("checked");
if ($truthy(_slim_codeattributes4)) {
if (_slim_codeattributes4['$=='](true)) {
_slim_controls2['$<<'](" checked")
} else {
_slim_controls2['$<<'](" checked=\"");
_slim_controls2['$<<'](_slim_codeattributes4);
_slim_controls2['$<<']("\"");
}};
_slim_controls2['$<<']("> ");
_slim_controls2['$<<'](item.$text());
return _slim_controls2['$<<']("</li>");
} else {
_slim_controls2['$<<']("<li");
_slim_codeattributes5 = item.$id();
if ($truthy(_slim_codeattributes5)) {
if (_slim_codeattributes5['$=='](true)) {
_slim_controls2['$<<'](" id")
} else {
_slim_controls2['$<<'](" id=\"");
_slim_controls2['$<<'](_slim_codeattributes5);
_slim_controls2['$<<']("\"");
}};
_temple_html_attributeremover3 = [];
_slim_codeattributes6 = item.$role();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes6))) {
_slim_codeattributes6 = _slim_codeattributes6.$flatten();
$send(_slim_codeattributes6, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes6, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover3['$<<'](_slim_codeattributes6.$join(" "));
} else {
_temple_html_attributeremover3['$<<'](_slim_codeattributes6)
};
_temple_html_attributeremover3 = _temple_html_attributeremover3.$join("");
if ($truthy(_temple_html_attributeremover3['$empty?']()['$!']())) {
_slim_controls2['$<<'](" class=\"");
_slim_controls2['$<<'](_temple_html_attributeremover3);
_slim_controls2['$<<']("\"");};
_slim_controls2['$<<'](">");
_slim_controls2['$<<'](self.$print_item_content(item));
return _slim_controls2['$<<']("</li>");
};}, $$110.$$s = self, $$110.$$arity = 1, $$110));
_slim_controls2['$<<']("</ul>");
return (_slim_controls2 = _slim_controls2.$join(""));}, $$109.$$s = self, $$109.$$arity = 0, $$109));
_buf['$<<'](_slim_controls1);
return (_buf = _buf.$join(""));}, $$108.$$s = self, $$108.$$arity = 0, $$108));
}, $Converter_ulist$107.$$arity = -2);
Opal.def(self, '$inline_button', $Converter_inline_button$111 = function $$inline_button(node, opts) {
var $$112, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$112 = function(){var self = $$112.$$s || this, _buf = nil;
_buf = [];
_buf['$<<']("<kbd class=\"button\"><samp>");
_buf['$<<'](self.$text());
_buf['$<<']("</samp></kbd>");
return (_buf = _buf.$join(""));}, $$112.$$s = self, $$112.$$arity = 0, $$112));
}, $Converter_inline_button$111.$$arity = -2);
Opal.def(self, '$empty', $Converter_empty$113 = function $$empty(node, opts) {
var $$114, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$114 = function(){var self = $$114.$$s || this, _buf = nil;
_buf = [];
return (_buf = _buf.$join(""));}, $$114.$$s = self, $$114.$$arity = 0, $$114));
}, $Converter_empty$113.$$arity = -2);
Opal.def(self, '$inline_kbd', $Converter_inline_kbd$115 = function $$inline_kbd(node, opts) {
var $$116, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$116 = function(){var self = $$116.$$s || this, $$117, _buf = nil, keys = nil;
_buf = [];
if ((keys = self.$attr("keys")).$size()['$=='](1)) {
_buf['$<<']("<kbd class=\"key\">");
_buf['$<<'](keys.$first());
_buf['$<<']("</kbd>");
} else {
_buf['$<<']("<kbd class=\"keyseq\">");
$send(keys, 'each_with_index', [], ($$117 = function(key, idx){var self = $$117.$$s || this;
if (key == null) {
key = nil;
};
if (idx == null) {
idx = nil;
};
_buf['$<<']((function() {if ($truthy(idx['$zero?']())) {
return nil
} else {
return "+"
}; return nil; })());
_buf['$<<']("<kbd class=\"key\">");
_buf['$<<'](key);
return _buf['$<<']("</kbd>");}, $$117.$$s = self, $$117.$$arity = 2, $$117));
_buf['$<<']("</kbd>");
};
return (_buf = _buf.$join(""));}, $$116.$$s = self, $$116.$$arity = 0, $$116));
}, $Converter_inline_kbd$115.$$arity = -2);
Opal.def(self, '$outline', $Converter_outline$118 = function $$outline(node, opts) {
var $$119, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$119 = function(){var self = $$119.$$s || this, $a, $b, $$120, _buf = nil, toclevels = nil, slevel = nil;
_buf = [];
if ($truthy(self.$sections()['$empty?']())) {
} else {
toclevels = ($truthy($a = toclevels) ? $a : ($truthy($b = opts['$[]']("toclevels")) ? $b : self.$document().$attr("toclevels", $$($nesting, 'DEFAULT_TOCLEVELS')).$to_i()));
slevel = self.$section_level(self.$sections().$first());
_buf['$<<']("<ol class=\"toc-list level-");
_buf['$<<'](slevel);
_buf['$<<']("\">");
$send(self.$sections(), 'each', [], ($$120 = function(sec){var self = $$120.$$s || this, $c, child_toc = nil;
if (sec == null) {
sec = nil;
};
_buf['$<<']("<li><a href=\"#");
_buf['$<<'](sec.$id());
_buf['$<<']("\">");
_buf['$<<'](self.$section_title(sec, $hash2(["drop_anchors"], {"drop_anchors": true})));
_buf['$<<']("</a>");
if ($truthy(($truthy($c = $rb_lt(sec.$level(), toclevels)) ? (child_toc = self.$converter().$convert(sec, "outline")) : $c))) {
_buf['$<<'](child_toc)};
return _buf['$<<']("</li>");}, $$120.$$s = self, $$120.$$arity = 1, $$120));
_buf['$<<']("</ol>");
};
return (_buf = _buf.$join(""));}, $$119.$$s = self, $$119.$$arity = 0, $$119));
}, $Converter_outline$118.$$arity = -2);
Opal.def(self, '$inline_image', $Converter_inline_image$121 = function $$inline_image(node, opts) {
var $$122, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$122 = function(){var self = $$122.$$s || this, $$123, _buf = nil, _slim_controls1 = nil;
_buf = [];
_slim_controls1 = $send(self, 'html_tag_if', [self['$attr?']("link"), "a", $hash2(["class", "href", "target", "rel"], {"class": "image", "href": self.$attr("link"), "target": self.$attr("window"), "rel": self.$link_rel()})], ($$123 = function(){var self = $$123.$$s || this, $a, _slim_controls2 = nil, _temple_html_attributeremover1 = nil, _slim_codeattributes1 = nil, _slim_codeattributes2 = nil, _temple_html_attributeremover2 = nil, _slim_codeattributes3 = nil, _slim_codeattributes4 = nil, _slim_codeattributes5 = nil, _slim_codeattributes6 = nil, _slim_codeattributes7 = nil, _slim_codeattributes8 = nil, _slim_codeattributes9 = nil, _slim_codeattributes10 = nil, _temple_html_attributeremover3 = nil, _slim_codeattributes11 = nil, _slim_codeattributes12 = nil;
_slim_controls2 = [];
if ($truthy((($a = self.$type()['$==']("icon")) ? self.$document()['$attr?']("icons", "font") : self.$type()['$==']("icon")))) {
_slim_controls2['$<<']("<i");
_temple_html_attributeremover1 = [];
_slim_codeattributes1 = [].concat(Opal.to_a(self.$icon_fa_classes())).concat([self.$role()]);
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes1))) {
_slim_codeattributes1 = _slim_codeattributes1.$flatten();
$send(_slim_codeattributes1, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes1, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover1['$<<'](_slim_codeattributes1.$join(" "));
} else {
_temple_html_attributeremover1['$<<'](_slim_codeattributes1)
};
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_slim_controls2['$<<'](" class=\"");
_slim_controls2['$<<'](_temple_html_attributeremover1);
_slim_controls2['$<<']("\"");};
_slim_codeattributes2 = self.$attr("title");
if ($truthy(_slim_codeattributes2)) {
if (_slim_codeattributes2['$=='](true)) {
_slim_controls2['$<<'](" title")
} else {
_slim_controls2['$<<'](" title=\"");
_slim_controls2['$<<'](_slim_codeattributes2);
_slim_controls2['$<<']("\"");
}};
_slim_controls2['$<<']("></i>");
} else if ($truthy((($a = self.$type()['$==']("icon")) ? self.$document()['$attr?']("icons")['$!']() : self.$type()['$==']("icon")))) {
_slim_controls2['$<<']("<b");
_temple_html_attributeremover2 = [];
_slim_codeattributes3 = ["icon", self.$role()];
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes3))) {
_slim_codeattributes3 = _slim_codeattributes3.$flatten();
$send(_slim_codeattributes3, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes3, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover2['$<<'](_slim_codeattributes3.$join(" "));
} else {
_temple_html_attributeremover2['$<<'](_slim_codeattributes3)
};
_temple_html_attributeremover2 = _temple_html_attributeremover2.$join("");
if ($truthy(_temple_html_attributeremover2['$empty?']()['$!']())) {
_slim_controls2['$<<'](" class=\"");
_slim_controls2['$<<'](_temple_html_attributeremover2);
_slim_controls2['$<<']("\"");};
_slim_codeattributes4 = self.$attr("title");
if ($truthy(_slim_codeattributes4)) {
if (_slim_codeattributes4['$=='](true)) {
_slim_controls2['$<<'](" title")
} else {
_slim_controls2['$<<'](" title=\"");
_slim_controls2['$<<'](_slim_codeattributes4);
_slim_controls2['$<<']("\"");
}};
_slim_controls2['$<<'](">[");
_slim_controls2['$<<'](self.$attr("alt"));
_slim_controls2['$<<']("]</b>");
} else {
_slim_controls2['$<<']("<img");
_slim_codeattributes5 = (function() {if (self.$type()['$==']("icon")) {
return self.$icon_uri(self.$target());
} else {
return self.$image_uri(self.$target());
}; return nil; })();
if ($truthy(_slim_codeattributes5)) {
if (_slim_codeattributes5['$=='](true)) {
_slim_controls2['$<<'](" src")
} else {
_slim_controls2['$<<'](" src=\"");
_slim_controls2['$<<'](_slim_codeattributes5);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes6 = self.$attr("alt");
if ($truthy(_slim_codeattributes6)) {
if (_slim_codeattributes6['$=='](true)) {
_slim_controls2['$<<'](" alt")
} else {
_slim_controls2['$<<'](" alt=\"");
_slim_controls2['$<<'](_slim_codeattributes6);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes7 = self.$attr("width");
if ($truthy(_slim_codeattributes7)) {
if (_slim_codeattributes7['$=='](true)) {
_slim_controls2['$<<'](" width")
} else {
_slim_controls2['$<<'](" width=\"");
_slim_controls2['$<<'](_slim_codeattributes7);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes8 = self.$attr("height");
if ($truthy(_slim_codeattributes8)) {
if (_slim_codeattributes8['$=='](true)) {
_slim_controls2['$<<'](" height")
} else {
_slim_controls2['$<<'](" height=\"");
_slim_controls2['$<<'](_slim_codeattributes8);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes9 = self.$attr("title");
if ($truthy(_slim_codeattributes9)) {
if (_slim_codeattributes9['$=='](true)) {
_slim_controls2['$<<'](" title")
} else {
_slim_controls2['$<<'](" title=\"");
_slim_controls2['$<<'](_slim_codeattributes9);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes10 = self.$attr("loading");
if ($truthy(_slim_codeattributes10)) {
if (_slim_codeattributes10['$=='](true)) {
_slim_controls2['$<<'](" loading")
} else {
_slim_controls2['$<<'](" loading=\"");
_slim_controls2['$<<'](_slim_codeattributes10);
_slim_controls2['$<<']("\"");
}};
_temple_html_attributeremover3 = [];
_slim_codeattributes11 = [(function() {if ($truthy(self.$type()['$!=']("image"))) {
return self.$type()
} else {
return nil
}; return nil; })(), self.$role()];
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes11))) {
_slim_codeattributes11 = _slim_codeattributes11.$flatten();
$send(_slim_codeattributes11, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes11, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover3['$<<'](_slim_codeattributes11.$join(" "));
} else {
_temple_html_attributeremover3['$<<'](_slim_codeattributes11)
};
_temple_html_attributeremover3 = _temple_html_attributeremover3.$join("");
if ($truthy(_temple_html_attributeremover3['$empty?']()['$!']())) {
_slim_controls2['$<<'](" class=\"");
_slim_controls2['$<<'](_temple_html_attributeremover3);
_slim_controls2['$<<']("\"");};
_slim_codeattributes12 = self.$style_value($hash2(["float"], {"float": self.$attr("float")}));
if ($truthy(_slim_codeattributes12)) {
if (_slim_codeattributes12['$=='](true)) {
_slim_controls2['$<<'](" style")
} else {
_slim_controls2['$<<'](" style=\"");
_slim_controls2['$<<'](_slim_codeattributes12);
_slim_controls2['$<<']("\"");
}};
_slim_controls2['$<<'](">");
};
return (_slim_controls2 = _slim_controls2.$join(""));}, $$123.$$s = self, $$123.$$arity = 0, $$123));
_buf['$<<'](_slim_controls1);
return (_buf = _buf.$join(""));}, $$122.$$s = self, $$122.$$arity = 0, $$122));
}, $Converter_inline_image$121.$$arity = -2);
Opal.def(self, '$example', $Converter_example$124 = function $$example(node, opts) {
var $$125, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$125 = function(){var self = $$125.$$s || this, $$126, _buf = nil, _slim_codeattributes1 = nil, _temple_html_attributeremover1 = nil, _slim_codeattributes2 = nil, _slim_codeattributes3 = nil, _slim_controls1 = nil;
_buf = [];
if ($truthy(self['$option?']("collapsible"))) {
_buf['$<<']("<details");
_slim_codeattributes1 = self.$id();
if ($truthy(_slim_codeattributes1)) {
if (_slim_codeattributes1['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes1);
_buf['$<<']("\"");
}};
_temple_html_attributeremover1 = [];
_slim_codeattributes2 = self.$role();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes2))) {
_slim_codeattributes2 = _slim_codeattributes2.$flatten();
$send(_slim_codeattributes2, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes2, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover1['$<<'](_slim_codeattributes2.$join(" "));
} else {
_temple_html_attributeremover1['$<<'](_slim_codeattributes2)
};
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover1);
_buf['$<<']("\"");};
_slim_codeattributes3 = self['$option?']("open");
if ($truthy(_slim_codeattributes3)) {
if (_slim_codeattributes3['$=='](true)) {
_buf['$<<'](" open")
} else {
_buf['$<<'](" open=\"");
_buf['$<<'](_slim_codeattributes3);
_buf['$<<']("\"");
}};
_buf['$<<'](">");
if ($truthy(self.$title())) {
_buf['$<<']("<summary>");
_buf['$<<'](self.$title());
_buf['$<<']("</summary>");};
_buf['$<<']("<div class=\"content\">");
_buf['$<<'](self.$content());
_buf['$<<']("</div></details>");
} else {
_slim_controls1 = $send(self, 'block_with_caption', ["top", $hash2(["class"], {"class": "example-block"})], ($$126 = function(){var self = $$126.$$s || this, _slim_controls2 = nil;
_slim_controls2 = [];
_slim_controls2['$<<']("<div class=\"example\">");
_slim_controls2['$<<'](self.$content());
_slim_controls2['$<<']("</div>");
return (_slim_controls2 = _slim_controls2.$join(""));}, $$126.$$s = self, $$126.$$arity = 0, $$126));
_buf['$<<'](_slim_controls1);
};
return (_buf = _buf.$join(""));}, $$125.$$s = self, $$125.$$arity = 0, $$125));
}, $Converter_example$124.$$arity = -2);
Opal.def(self, '$section', $Converter_section$127 = function $$section(node, opts) {
var $$128, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$128 = function(){var self = $$128.$$s || this, _buf = nil, _temple_html_attributeremover1 = nil, _temple_html_attributemerger1 = nil, $writer = nil, _slim_codeattributes1 = nil, _slim_htag_filter1 = nil, _slim_codeattributes2 = nil;
_buf = [];
_buf['$<<']("<section");
_temple_html_attributeremover1 = [];
_temple_html_attributemerger1 = [];
$writer = [0, "doc-section"];
$send(_temple_html_attributemerger1, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
$writer = [1, []];
$send(_temple_html_attributemerger1, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
_slim_codeattributes1 = ["" + "level-" + (self.$section_level()), self.$role()];
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes1))) {
_slim_codeattributes1 = _slim_codeattributes1.$flatten();
$send(_slim_codeattributes1, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes1, 'reject!', [], "empty?".$to_proc());
_temple_html_attributemerger1['$[]'](1)['$<<'](_slim_codeattributes1.$join(" "));
} else {
_temple_html_attributemerger1['$[]'](1)['$<<'](_slim_codeattributes1)
};
$writer = [1, _temple_html_attributemerger1['$[]'](1).$join("")];
$send(_temple_html_attributemerger1, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
_temple_html_attributeremover1['$<<']($send(_temple_html_attributemerger1, 'reject', [], "empty?".$to_proc()).$join(" "));
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover1);
_buf['$<<']("\"");};
_buf['$<<'](">");
_slim_htag_filter1 = $rb_plus(self.$section_level(), 1).$to_s();
_buf['$<<']("<h");
_buf['$<<'](_slim_htag_filter1);
_slim_codeattributes2 = self.$id();
if ($truthy(_slim_codeattributes2)) {
if (_slim_codeattributes2['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes2);
_buf['$<<']("\"");
}};
_buf['$<<'](">");
if ($truthy(self.$id())) {
if ($truthy(self.$document()['$attr?']("sectanchors"))) {
_buf['$<<']("<a class=\"anchor\" href=\"#");
_buf['$<<'](self.$id());
_buf['$<<']("\" aria-hidden=\"true\"></a>");};
if ($truthy(self.$document()['$attr?']("sectlinks"))) {
_buf['$<<']("<a class=\"link\" href=\"#");
_buf['$<<'](self.$id());
_buf['$<<']("\">");
_buf['$<<'](self.$section_title());
_buf['$<<']("</a>");
} else {
_buf['$<<'](self.$section_title())
};
} else {
_buf['$<<'](self.$section_title())
};
_buf['$<<']("</h");
_buf['$<<'](_slim_htag_filter1);
_buf['$<<'](">");
_buf['$<<'](self.$content());
_buf['$<<']("</section>");
return (_buf = _buf.$join(""));}, $$128.$$s = self, $$128.$$arity = 0, $$128));
}, $Converter_section$127.$$arity = -2);
Opal.def(self, '$admonition', $Converter_admonition$129 = function $$admonition(node, opts) {
var $$130, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$130 = function(){var self = $$130.$$s || this, $$131, _buf = nil, _temple_html_attributeremover2 = nil, _temple_html_attributemerger2 = nil, $writer = nil, _slim_codeattributes2 = nil, _slim_codeattributes3 = nil, _slim_codeattributes4 = nil, _temple_html_attributeremover3 = nil, _temple_html_attributemerger3 = nil, _slim_codeattributes5 = nil, _slim_codeattributes6 = nil, _slim_codeattributes7 = nil;
_buf = [];
$send(self, 'capture', [], ($$131 = function(){var self = $$131.$$s || this, $$132, _temple_html_attributeremover1 = nil, _temple_html_attributemerger1 = nil, $writer = nil, _slim_codeattributes1 = nil, _slim_controls1 = nil;
_buf['$<<']("<h6");
_temple_html_attributeremover1 = [];
_temple_html_attributemerger1 = [];
$writer = [0, "block-title"];
$send(_temple_html_attributemerger1, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
$writer = [1, []];
$send(_temple_html_attributemerger1, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
_slim_codeattributes1 = (function() {if ($truthy(self['$title?']())) {
return nil
} else {
return "label-only"
}; return nil; })();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes1))) {
_slim_codeattributes1 = _slim_codeattributes1.$flatten();
$send(_slim_codeattributes1, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes1, 'reject!', [], "empty?".$to_proc());
_temple_html_attributemerger1['$[]'](1)['$<<'](_slim_codeattributes1.$join(" "));
} else {
_temple_html_attributemerger1['$[]'](1)['$<<'](_slim_codeattributes1)
};
$writer = [1, _temple_html_attributemerger1['$[]'](1).$join("")];
$send(_temple_html_attributemerger1, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
_temple_html_attributeremover1['$<<']($send(_temple_html_attributemerger1, 'reject', [], "empty?".$to_proc()).$join(" "));
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover1);
_buf['$<<']("\"");};
_buf['$<<']("><span class=\"title-label\">");
_buf['$<<']("" + (self.$local_attr("textlabel")) + ": ");
_buf['$<<']("</span>");
_buf['$<<'](self.$title());
_buf['$<<']("</h6>");
_slim_controls1 = $send(self, 'html_tag_if', [self['$blocks?']()['$!'](), "p"], ($$132 = function(){var self = $$132.$$s || this, _slim_controls2 = nil;
_slim_controls2 = [];
_slim_controls2['$<<'](self.$content());
return (_slim_controls2 = _slim_controls2.$join(""));}, $$132.$$s = self, $$132.$$arity = 0, $$132));
return _buf['$<<'](_slim_controls1);}, $$131.$$s = self, $$131.$$arity = 0, $$131));
if ($truthy(self['$admonition_aside?']())) {
_buf['$<<']("<aside");
_temple_html_attributeremover2 = [];
_temple_html_attributemerger2 = [];
$writer = [0, "admonition-block"];
$send(_temple_html_attributemerger2, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
$writer = [1, []];
$send(_temple_html_attributemerger2, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
_slim_codeattributes2 = [self.$attr("name"), self.$role()];
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes2))) {
_slim_codeattributes2 = _slim_codeattributes2.$flatten();
$send(_slim_codeattributes2, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes2, 'reject!', [], "empty?".$to_proc());
_temple_html_attributemerger2['$[]'](1)['$<<'](_slim_codeattributes2.$join(" "));
} else {
_temple_html_attributemerger2['$[]'](1)['$<<'](_slim_codeattributes2)
};
$writer = [1, _temple_html_attributemerger2['$[]'](1).$join("")];
$send(_temple_html_attributemerger2, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
_temple_html_attributeremover2['$<<']($send(_temple_html_attributemerger2, 'reject', [], "empty?".$to_proc()).$join(" "));
_temple_html_attributeremover2 = _temple_html_attributeremover2.$join("");
if ($truthy(_temple_html_attributeremover2['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover2);
_buf['$<<']("\"");};
_slim_codeattributes3 = self.$id();
if ($truthy(_slim_codeattributes3)) {
if (_slim_codeattributes3['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes3);
_buf['$<<']("\"");
}};
_slim_codeattributes4 = self.$admonition_aria();
if ($truthy(_slim_codeattributes4)) {
if (_slim_codeattributes4['$=='](true)) {
_buf['$<<'](" role")
} else {
_buf['$<<'](" role=\"");
_buf['$<<'](_slim_codeattributes4);
_buf['$<<']("\"");
}};
_buf['$<<'](">");
self.$yield_capture();
_buf['$<<']("</aside>");
} else {
_buf['$<<']("<section");
_temple_html_attributeremover3 = [];
_temple_html_attributemerger3 = [];
$writer = [0, "admonition-block"];
$send(_temple_html_attributemerger3, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
$writer = [1, []];
$send(_temple_html_attributemerger3, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
_slim_codeattributes5 = [self.$attr("name"), self.$role()];
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes5))) {
_slim_codeattributes5 = _slim_codeattributes5.$flatten();
$send(_slim_codeattributes5, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes5, 'reject!', [], "empty?".$to_proc());
_temple_html_attributemerger3['$[]'](1)['$<<'](_slim_codeattributes5.$join(" "));
} else {
_temple_html_attributemerger3['$[]'](1)['$<<'](_slim_codeattributes5)
};
$writer = [1, _temple_html_attributemerger3['$[]'](1).$join("")];
$send(_temple_html_attributemerger3, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
_temple_html_attributeremover3['$<<']($send(_temple_html_attributemerger3, 'reject', [], "empty?".$to_proc()).$join(" "));
_temple_html_attributeremover3 = _temple_html_attributeremover3.$join("");
if ($truthy(_temple_html_attributeremover3['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover3);
_buf['$<<']("\"");};
_slim_codeattributes6 = self.$id();
if ($truthy(_slim_codeattributes6)) {
if (_slim_codeattributes6['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes6);
_buf['$<<']("\"");
}};
_slim_codeattributes7 = self.$admonition_aria();
if ($truthy(_slim_codeattributes7)) {
if (_slim_codeattributes7['$=='](true)) {
_buf['$<<'](" role")
} else {
_buf['$<<'](" role=\"");
_buf['$<<'](_slim_codeattributes7);
_buf['$<<']("\"");
}};
_buf['$<<'](">");
self.$yield_capture();
_buf['$<<']("</section>");
};
return (_buf = _buf.$join(""));}, $$130.$$s = self, $$130.$$arity = 0, $$130));
}, $Converter_admonition$129.$$arity = -2);
Opal.def(self, '$listing', $Converter_listing$133 = function $$listing(node, opts) {
var $$134, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$134 = function(){var self = $$134.$$s || this, $$135, _buf = nil, _slim_controls1 = nil;
_buf = [];
_slim_controls1 = $send(self, 'block_with_caption', ["top", $hash2(["class"], {"class": "listing-block"})], ($$135 = function(){var self = $$135.$$s || this, $a, $b, $c, _slim_controls2 = nil, highlighter = nil, _slim_codeattributes1 = nil, _temple_html_attributeremover1 = nil, _slim_codeattributes2 = nil, _temple_html_attributeremover2 = nil, _slim_codeattributes3 = nil, _slim_codeattributes4 = nil, _temple_html_attributeremover3 = nil, _slim_codeattributes5 = nil;
_slim_controls2 = [];
if (self.$style()['$==']("source")) {
highlighter = self.$document().$attr("source-highlighter");
if ($truthy(($truthy($a = (($c = $$$('::', 'Asciidoctor', 'skip_raise')) && ($b = $$$($c, 'SyntaxHighlighter', 'skip_raise')) ? 'constant' : nil)) ? self.$document().$syntax_highlighter() : $a))) {
_slim_controls2['$<<'](self.$formatted_source())
} else if (highlighter['$==']("html-pipeline")) {
_slim_controls2['$<<']("<pre><code");
_slim_codeattributes1 = self.$source_lang();
if ($truthy(_slim_codeattributes1)) {
if (_slim_codeattributes1['$=='](true)) {
_slim_controls2['$<<'](" data-lang")
} else {
_slim_controls2['$<<'](" data-lang=\"");
_slim_controls2['$<<'](_slim_codeattributes1);
_slim_controls2['$<<']("\"");
}};
_slim_controls2['$<<'](">");
_slim_controls2['$<<'](self.$content());
_slim_controls2['$<<']("</code></pre>");
} else {
_slim_controls2['$<<']("<pre");
_temple_html_attributeremover1 = [];
_slim_codeattributes2 = [highlighter, "highlight", (function() {if ($truthy(self['$attr?']("linenums"))) {
return "linenums"
} else {
return nil
}; return nil; })(), self['$nowrap?']()];
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes2))) {
_slim_codeattributes2 = _slim_codeattributes2.$flatten();
$send(_slim_codeattributes2, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes2, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover1['$<<'](_slim_codeattributes2.$join(" "));
} else {
_temple_html_attributeremover1['$<<'](_slim_codeattributes2)
};
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_slim_controls2['$<<'](" class=\"");
_slim_controls2['$<<'](_temple_html_attributeremover1);
_slim_controls2['$<<']("\"");};
_slim_controls2['$<<']("><code");
_temple_html_attributeremover2 = [];
_slim_codeattributes3 = self.$source_code_class();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes3))) {
_slim_codeattributes3 = _slim_codeattributes3.$flatten();
$send(_slim_codeattributes3, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes3, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover2['$<<'](_slim_codeattributes3.$join(" "));
} else {
_temple_html_attributeremover2['$<<'](_slim_codeattributes3)
};
_temple_html_attributeremover2 = _temple_html_attributeremover2.$join("");
if ($truthy(_temple_html_attributeremover2['$empty?']()['$!']())) {
_slim_controls2['$<<'](" class=\"");
_slim_controls2['$<<'](_temple_html_attributeremover2);
_slim_controls2['$<<']("\"");};
_slim_codeattributes4 = self.$source_lang();
if ($truthy(_slim_codeattributes4)) {
if (_slim_codeattributes4['$=='](true)) {
_slim_controls2['$<<'](" data-lang")
} else {
_slim_controls2['$<<'](" data-lang=\"");
_slim_controls2['$<<'](_slim_codeattributes4);
_slim_controls2['$<<']("\"");
}};
_slim_controls2['$<<'](">");
_slim_controls2['$<<'](self.$content());
_slim_controls2['$<<']("</code></pre>");
};
} else {
_slim_controls2['$<<']("<pre");
_temple_html_attributeremover3 = [];
_slim_codeattributes5 = self['$nowrap?']();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes5))) {
_slim_codeattributes5 = _slim_codeattributes5.$flatten();
$send(_slim_codeattributes5, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes5, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover3['$<<'](_slim_codeattributes5.$join(" "));
} else {
_temple_html_attributeremover3['$<<'](_slim_codeattributes5)
};
_temple_html_attributeremover3 = _temple_html_attributeremover3.$join("");
if ($truthy(_temple_html_attributeremover3['$empty?']()['$!']())) {
_slim_controls2['$<<'](" class=\"");
_slim_controls2['$<<'](_temple_html_attributeremover3);
_slim_controls2['$<<']("\"");};
_slim_controls2['$<<'](">");
_slim_controls2['$<<'](self.$content());
_slim_controls2['$<<']("</pre>");
};
if ($truthy(self.$callout_list())) {
_slim_controls2['$<<'](self.$converter().$convert(self.$callout_list(), "colist"))};
return (_slim_controls2 = _slim_controls2.$join(""));}, $$135.$$s = self, $$135.$$arity = 0, $$135));
_buf['$<<'](_slim_controls1);
return (_buf = _buf.$join(""));}, $$134.$$s = self, $$134.$$arity = 0, $$134));
}, $Converter_listing$133.$$arity = -2);
Opal.def(self, '$thematic_break', $Converter_thematic_break$136 = function $$thematic_break(node, opts) {
var $$137, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$137 = function(){var self = $$137.$$s || this, _buf = nil;
_buf = [];
_buf['$<<']("<hr>");
return (_buf = _buf.$join(""));}, $$137.$$s = self, $$137.$$arity = 0, $$137));
}, $Converter_thematic_break$136.$$arity = -2);
Opal.def(self, '$inline_quoted', $Converter_inline_quoted$138 = function $$inline_quoted(node, opts) {
var $$139, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$139 = function(){var self = $$139.$$s || this, $a, $$140, $$141, $$142, _buf = nil, $case = nil, _slim_codeattributes1 = nil, _temple_html_attributeremover1 = nil, _slim_codeattributes2 = nil, _slim_codeattributes3 = nil, _temple_html_attributeremover2 = nil, _slim_codeattributes4 = nil, _slim_codeattributes5 = nil, _temple_html_attributeremover3 = nil, _slim_codeattributes6 = nil, _slim_codeattributes7 = nil, _temple_html_attributeremover4 = nil, _slim_codeattributes8 = nil, _slim_codeattributes9 = nil, _temple_html_attributeremover5 = nil, _slim_codeattributes10 = nil, _slim_codeattributes11 = nil, _temple_html_attributeremover6 = nil, _slim_codeattributes12 = nil, _slim_controls1 = nil, _slim_controls3 = nil, _slim_codeattributes13 = nil, _slim_codeattributes14 = nil, _slim_codeattributes15 = nil, _slim_codeattributes16 = nil, _slim_codeattributes17 = nil, _slim_controls5 = nil;
_buf = [];
$case = self.$type();
if ("emphasis"['$===']($case)) {
_buf['$<<']("<em");
_slim_codeattributes1 = self.$id();
if ($truthy(_slim_codeattributes1)) {
if (_slim_codeattributes1['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes1);
_buf['$<<']("\"");
}};
_temple_html_attributeremover1 = [];
_slim_codeattributes2 = self.$role();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes2))) {
_slim_codeattributes2 = _slim_codeattributes2.$flatten();
$send(_slim_codeattributes2, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes2, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover1['$<<'](_slim_codeattributes2.$join(" "));
} else {
_temple_html_attributeremover1['$<<'](_slim_codeattributes2)
};
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover1);
_buf['$<<']("\"");};
_buf['$<<'](">");
_buf['$<<'](self.$text());
_buf['$<<']("</em>");}
else if ("strong"['$===']($case)) {
_buf['$<<']("<strong");
_slim_codeattributes3 = self.$id();
if ($truthy(_slim_codeattributes3)) {
if (_slim_codeattributes3['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes3);
_buf['$<<']("\"");
}};
_temple_html_attributeremover2 = [];
_slim_codeattributes4 = self.$role();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes4))) {
_slim_codeattributes4 = _slim_codeattributes4.$flatten();
$send(_slim_codeattributes4, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes4, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover2['$<<'](_slim_codeattributes4.$join(" "));
} else {
_temple_html_attributeremover2['$<<'](_slim_codeattributes4)
};
_temple_html_attributeremover2 = _temple_html_attributeremover2.$join("");
if ($truthy(_temple_html_attributeremover2['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover2);
_buf['$<<']("\"");};
_buf['$<<'](">");
_buf['$<<'](self.$text());
_buf['$<<']("</strong>");}
else if ("monospaced"['$===']($case)) {
_buf['$<<']("<code");
_slim_codeattributes5 = self.$id();
if ($truthy(_slim_codeattributes5)) {
if (_slim_codeattributes5['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes5);
_buf['$<<']("\"");
}};
_temple_html_attributeremover3 = [];
_slim_codeattributes6 = self.$role();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes6))) {
_slim_codeattributes6 = _slim_codeattributes6.$flatten();
$send(_slim_codeattributes6, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes6, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover3['$<<'](_slim_codeattributes6.$join(" "));
} else {
_temple_html_attributeremover3['$<<'](_slim_codeattributes6)
};
_temple_html_attributeremover3 = _temple_html_attributeremover3.$join("");
if ($truthy(_temple_html_attributeremover3['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover3);
_buf['$<<']("\"");};
_buf['$<<'](">");
_buf['$<<'](self.$text());
_buf['$<<']("</code>");}
else if ("superscript"['$===']($case)) {
_buf['$<<']("<sup");
_slim_codeattributes7 = self.$id();
if ($truthy(_slim_codeattributes7)) {
if (_slim_codeattributes7['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes7);
_buf['$<<']("\"");
}};
_temple_html_attributeremover4 = [];
_slim_codeattributes8 = self.$role();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes8))) {
_slim_codeattributes8 = _slim_codeattributes8.$flatten();
$send(_slim_codeattributes8, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes8, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover4['$<<'](_slim_codeattributes8.$join(" "));
} else {
_temple_html_attributeremover4['$<<'](_slim_codeattributes8)
};
_temple_html_attributeremover4 = _temple_html_attributeremover4.$join("");
if ($truthy(_temple_html_attributeremover4['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover4);
_buf['$<<']("\"");};
_buf['$<<'](">");
_buf['$<<'](self.$text());
_buf['$<<']("</sup>");}
else if ("subscript"['$===']($case)) {
_buf['$<<']("<sub");
_slim_codeattributes9 = self.$id();
if ($truthy(_slim_codeattributes9)) {
if (_slim_codeattributes9['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes9);
_buf['$<<']("\"");
}};
_temple_html_attributeremover5 = [];
_slim_codeattributes10 = self.$role();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes10))) {
_slim_codeattributes10 = _slim_codeattributes10.$flatten();
$send(_slim_codeattributes10, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes10, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover5['$<<'](_slim_codeattributes10.$join(" "));
} else {
_temple_html_attributeremover5['$<<'](_slim_codeattributes10)
};
_temple_html_attributeremover5 = _temple_html_attributeremover5.$join("");
if ($truthy(_temple_html_attributeremover5['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover5);
_buf['$<<']("\"");};
_buf['$<<'](">");
_buf['$<<'](self.$text());
_buf['$<<']("</sub>");}
else if ("mark"['$===']($case)) {
_buf['$<<']("<mark");
_slim_codeattributes11 = self.$id();
if ($truthy(_slim_codeattributes11)) {
if (_slim_codeattributes11['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes11);
_buf['$<<']("\"");
}};
_temple_html_attributeremover6 = [];
_slim_codeattributes12 = self.$role();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes12))) {
_slim_codeattributes12 = _slim_codeattributes12.$flatten();
$send(_slim_codeattributes12, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes12, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover6['$<<'](_slim_codeattributes12.$join(" "));
} else {
_temple_html_attributeremover6['$<<'](_slim_codeattributes12)
};
_temple_html_attributeremover6 = _temple_html_attributeremover6.$join("");
if ($truthy(_temple_html_attributeremover6['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover6);
_buf['$<<']("\"");};
_buf['$<<'](">");
_buf['$<<'](self.$text());
_buf['$<<']("</mark>");}
else if ("double"['$===']($case)) {
_slim_controls1 = $send(self, 'html_tag_if', [($truthy($a = self['$role?']()) ? $a : self.$id()), "span", $hash2(["id", "class"], {"id": self.$id(), "class": self.$role()})], ($$140 = function(){var self = $$140.$$s || this, _slim_controls2 = nil;
_slim_controls2 = [];
_slim_controls2['$<<'](self.$double_quoted(self.$text()));
return (_slim_controls2 = _slim_controls2.$join(""));}, $$140.$$s = self, $$140.$$arity = 0, $$140));
_buf['$<<'](_slim_controls1);}
else if ("single"['$===']($case)) {
_slim_controls3 = $send(self, 'html_tag_if', [($truthy($a = self['$role?']()) ? $a : self.$id()), "span", $hash2(["id", "class"], {"id": self.$id(), "class": self.$role()})], ($$141 = function(){var self = $$141.$$s || this, _slim_controls4 = nil;
_slim_controls4 = [];
_slim_controls4['$<<'](self.$single_quoted(self.$text()));
return (_slim_controls4 = _slim_controls4.$join(""));}, $$141.$$s = self, $$141.$$arity = 0, $$141));
_buf['$<<'](_slim_controls3);}
else if ("asciimath"['$===']($case) || "latexmath"['$===']($case)) {
_buf['$<<']("<span class=\"math\"");
_slim_codeattributes13 = self.$id();
if ($truthy(_slim_codeattributes13)) {
if (_slim_codeattributes13['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes13);
_buf['$<<']("\"");
}};
_slim_codeattributes14 = self.$stem_lang();
if ($truthy(_slim_codeattributes14)) {
if (_slim_codeattributes14['$=='](true)) {
_buf['$<<'](" data-lang")
} else {
_buf['$<<'](" data-lang=\"");
_buf['$<<'](_slim_codeattributes14);
_buf['$<<']("\"");
}};
_buf['$<<'](">");
_buf['$<<'](self.$delimit_stem(self.$text(), self.$type()));
_buf['$<<']("</span>");}
else {$case = self.$role();
if ("line-through"['$===']($case) || "strike"['$===']($case)) {
_buf['$<<']("<s");
_slim_codeattributes15 = self.$id();
if ($truthy(_slim_codeattributes15)) {
if (_slim_codeattributes15['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes15);
_buf['$<<']("\"");
}};
_buf['$<<'](">");
_buf['$<<'](self.$text());
_buf['$<<']("</s>");}
else if ("del"['$===']($case)) {
_buf['$<<']("<del");
_slim_codeattributes16 = self.$id();
if ($truthy(_slim_codeattributes16)) {
if (_slim_codeattributes16['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes16);
_buf['$<<']("\"");
}};
_buf['$<<'](">");
_buf['$<<'](self.$text());
_buf['$<<']("</del>");}
else if ("ins"['$===']($case)) {
_buf['$<<']("<ins");
_slim_codeattributes17 = self.$id();
if ($truthy(_slim_codeattributes17)) {
if (_slim_codeattributes17['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes17);
_buf['$<<']("\"");
}};
_buf['$<<'](">");
_buf['$<<'](self.$text());
_buf['$<<']("</ins>");}
else {
_slim_controls5 = $send(self, 'html_tag_if', [($truthy($a = self['$role?']()) ? $a : self.$id()), "span", $hash2(["id", "class"], {"id": self.$id(), "class": self.$role()})], ($$142 = function(){var self = $$142.$$s || this, _slim_controls6 = nil;
_slim_controls6 = [];
_slim_controls6['$<<'](self.$text());
return (_slim_controls6 = _slim_controls6.$join(""));}, $$142.$$s = self, $$142.$$arity = 0, $$142));
_buf['$<<'](_slim_controls5);}};
return (_buf = _buf.$join(""));}, $$139.$$s = self, $$139.$$arity = 0, $$139));
}, $Converter_inline_quoted$138.$$arity = -2);
Opal.def(self, '$inline_break', $Converter_inline_break$143 = function $$inline_break(node, opts) {
var $$144, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$144 = function(){var self = $$144.$$s || this, _buf = nil;
_buf = [];
_buf['$<<'](self.$text());
_buf['$<<']("<br>");
return (_buf = _buf.$join(""));}, $$144.$$s = self, $$144.$$arity = 0, $$144));
}, $Converter_inline_break$143.$$arity = -2);
Opal.def(self, '$audio', $Converter_audio$145 = function $$audio(node, opts) {
var $$146, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$146 = function(){var self = $$146.$$s || this, $$147, _buf = nil, _slim_controls1 = nil;
_buf = [];
_slim_controls1 = $send(self, 'block_with_caption', ["bottom", $hash2(["class"], {"class": "audio-block"})], ($$147 = function(){var self = $$147.$$s || this, _slim_controls2 = nil, _slim_codeattributes1 = nil, _slim_codeattributes2 = nil, _slim_codeattributes3 = nil, _slim_codeattributes4 = nil;
_slim_controls2 = [];
_slim_controls2['$<<']("<audio");
_slim_codeattributes1 = self.$media_uri(self.$attr("target"));
if ($truthy(_slim_codeattributes1)) {
if (_slim_codeattributes1['$=='](true)) {
_slim_controls2['$<<'](" src")
} else {
_slim_controls2['$<<'](" src=\"");
_slim_controls2['$<<'](_slim_codeattributes1);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes2 = self['$option?']("autoplay");
if ($truthy(_slim_codeattributes2)) {
if (_slim_codeattributes2['$=='](true)) {
_slim_controls2['$<<'](" autoplay")
} else {
_slim_controls2['$<<'](" autoplay=\"");
_slim_controls2['$<<'](_slim_codeattributes2);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes3 = self['$option?']("nocontrols")['$!']();
if ($truthy(_slim_codeattributes3)) {
if (_slim_codeattributes3['$=='](true)) {
_slim_controls2['$<<'](" controls")
} else {
_slim_controls2['$<<'](" controls=\"");
_slim_controls2['$<<'](_slim_codeattributes3);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes4 = self['$option?']("loop");
if ($truthy(_slim_codeattributes4)) {
if (_slim_codeattributes4['$=='](true)) {
_slim_controls2['$<<'](" loop")
} else {
_slim_controls2['$<<'](" loop=\"");
_slim_controls2['$<<'](_slim_codeattributes4);
_slim_controls2['$<<']("\"");
}};
_slim_controls2['$<<'](">Your browser does not support the audio tag.</audio>");
return (_slim_controls2 = _slim_controls2.$join(""));}, $$147.$$s = self, $$147.$$arity = 0, $$147));
_buf['$<<'](_slim_controls1);
return (_buf = _buf.$join(""));}, $$146.$$s = self, $$146.$$arity = 0, $$146));
}, $Converter_audio$145.$$arity = -2);
Opal.def(self, '$open', $Converter_open$148 = function $$open(node, opts) {
var $$149, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$149 = function(){var self = $$149.$$s || this, $$150, $a, $$151, _buf = nil, _slim_controls1 = nil, _slim_controls3 = nil;
_buf = [];
if (self.$style()['$==']("abstract")) {
if ($truthy(self['$abstract_allowed?']())) {
_slim_controls1 = $send(self, 'block_with_title', [$hash2(["class"], {"class": "quote-block abstract"})], ($$150 = function(){var self = $$150.$$s || this, _slim_controls2 = nil;
_slim_controls2 = [];
_slim_controls2['$<<']("<blockquote>");
_slim_controls2['$<<'](self.$content());
_slim_controls2['$<<']("</blockquote>");
return (_slim_controls2 = _slim_controls2.$join(""));}, $$150.$$s = self, $$150.$$arity = 0, $$150));
_buf['$<<'](_slim_controls1);}
} else if ($truthy(($truthy($a = self.$style()['$!=']("partintro")) ? $a : self['$partintro_allowed?']()))) {
_slim_controls3 = $send(self, 'block_with_title', [$hash2(["class"], {"class": ["open-block", (function() {if ($truthy(self.$style()['$!=']("open"))) {
return self.$style()
} else {
return nil
}; return nil; })()]})], ($$151 = function(){var self = $$151.$$s || this, _slim_controls4 = nil;
_slim_controls4 = [];
_slim_controls4['$<<']("<div class=\"content\">");
_slim_controls4['$<<'](self.$content());
_slim_controls4['$<<']("</div>");
return (_slim_controls4 = _slim_controls4.$join(""));}, $$151.$$s = self, $$151.$$arity = 0, $$151));
_buf['$<<'](_slim_controls3);};
return (_buf = _buf.$join(""));}, $$149.$$s = self, $$149.$$arity = 0, $$149));
}, $Converter_open$148.$$arity = -2);
Opal.def(self, '$table', $Converter_table$152 = function $$table(node, opts) {
var $$153, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$153 = function(){var self = $$153.$$s || this, $$154, _buf = nil, _slim_controls1 = nil;
_buf = [];
_slim_controls1 = $send(self, 'block_with_caption', ["top", $hash2(["class"], {"class": "table-block"})], ($$154 = function(){var self = $$154.$$s || this, $a, $b, $$155, $$156, $$157, $$158, _slim_controls2 = nil, _temple_html_attributeremover1 = nil, _slim_codeattributes1 = nil, _slim_codeattributes2 = nil;
_slim_controls2 = [];
_slim_controls2['$<<']("<table");
_temple_html_attributeremover1 = [];
_slim_codeattributes1 = ["" + "frame-" + (self.$attr("frame", "all")), "" + "grid-" + (self.$attr("grid", "all")), self['$stretch?'](), (function() {if ($truthy(self['$attr?']("stripes"))) {
return "" + "stripes-" + (self.$attr("stripes"))
} else {
return nil
}; return nil; })()];
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes1))) {
_slim_codeattributes1 = _slim_codeattributes1.$flatten();
$send(_slim_codeattributes1, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes1, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover1['$<<'](_slim_codeattributes1.$join(" "));
} else {
_temple_html_attributeremover1['$<<'](_slim_codeattributes1)
};
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_slim_controls2['$<<'](" class=\"");
_slim_controls2['$<<'](_temple_html_attributeremover1);
_slim_controls2['$<<']("\"");};
_slim_codeattributes2 = self.$style_value($hash2(["width", "float"], {"width": (function() {if ($truthy(($truthy($a = ($truthy($b = self['$autowidth?']()['$!']()) ? self['$stretch?']()['$!']() : $b)) ? $a : self.$local_attr("width")))) {
return "" + (self.$attr("tablepcwidth")) + "%"
} else {
return nil
}; return nil; })(), "float": self.$attr("float")}));
if ($truthy(_slim_codeattributes2)) {
if (_slim_codeattributes2['$=='](true)) {
_slim_controls2['$<<'](" style")
} else {
_slim_controls2['$<<'](" style=\"");
_slim_controls2['$<<'](_slim_codeattributes2);
_slim_controls2['$<<']("\"");
}};
_slim_controls2['$<<'](">");
if ($truthy(self.$attr("rowcount")['$zero?']())) {
} else {
_slim_controls2['$<<']("<colgroup>");
if ($truthy(self['$autowidth?']())) {
$send(self.$columns(), 'each', [], ($$155 = function(){var self = $$155.$$s || this;
return _slim_controls2['$<<']("<col>")}, $$155.$$s = self, $$155.$$arity = 0, $$155))
} else {
$send(self.$columns(), 'each', [], ($$156 = function(col){var self = $$156.$$s || this, _slim_codeattributes3 = nil;
if (col == null) {
col = nil;
};
_slim_controls2['$<<']("<col");
_slim_codeattributes3 = self.$style_value($hash2(["width"], {"width": (function() {if ($truthy(self['$autowidth?'](col)['$!']())) {
return "" + (col.$attr("colpcwidth")) + "%"
} else {
return nil
}; return nil; })()}));
if ($truthy(_slim_codeattributes3)) {
if (_slim_codeattributes3['$=='](true)) {
_slim_controls2['$<<'](" style")
} else {
_slim_controls2['$<<'](" style=\"");
_slim_controls2['$<<'](_slim_codeattributes3);
_slim_controls2['$<<']("\"");
}};
return _slim_controls2['$<<'](">");}, $$156.$$s = self, $$156.$$arity = 1, $$156))
};
_slim_controls2['$<<']("</colgroup>");
$send($send(["head", "foot", "body"], 'reject', [], ($$157 = function(tblsec){var self = $$157.$$s || this;
if (tblsec == null) {
tblsec = nil;
};
return self.$rows()['$[]'](tblsec)['$empty?']();}, $$157.$$s = self, $$157.$$arity = 1, $$157)), 'each', [], ($$158 = function(tblsec){var self = $$158.$$s || this, $$159;
if (tblsec == null) {
tblsec = nil;
};
_slim_controls2['$<<']("<t");
_slim_controls2['$<<'](tblsec);
_slim_controls2['$<<'](">");
$send(self.$rows()['$[]'](tblsec), 'each', [], ($$159 = function(row){var self = $$159.$$s || this, $$160;
if (row == null) {
row = nil;
};
_slim_controls2['$<<']("<tr>");
$send(row, 'each', [], ($$160 = function(cell){var self = $$160.$$s || this, $c, $$161, _slim_controls3 = nil;
if (cell == null) {
cell = nil;
};
_slim_controls3 = $send(self, 'html_tag', [(function() {if ($truthy(($truthy($c = tblsec['$==']("head")) ? $c : cell.$style()['$==']("header")))) {
return "th"
} else {
return "td"
}; return nil; })(), $hash2(["class", "colspan", "rowspan", "style"], {"class": ["" + "halign-" + (cell.$attr("halign")), "" + "valign-" + (cell.$attr("valign"))], "colspan": cell.$colspan(), "rowspan": cell.$rowspan(), "style": self.$style_value($hash2(["background_color"], {"background_color": self.$document().$attr("cellbgcolor")}))})], ($$161 = function(){var self = $$161.$$s || this, $$162, _slim_controls4 = nil, $case = nil, content = nil;
_slim_controls4 = [];
if (tblsec['$==']("head")) {
_slim_controls4['$<<'](cell.$text())
} else {
$case = cell.$style();
if ("asciidoc"['$===']($case)) {_slim_controls4['$<<'](cell.$content())}
else if ("literal"['$===']($case)) {
_slim_controls4['$<<']("<div class=\"literal\"><pre>");
_slim_controls4['$<<'](cell.$text());
_slim_controls4['$<<']("</pre></div>");}
else {if ($truthy((content = cell.$content())['$one?']())) {
_slim_controls4['$<<'](content.$first())
} else {
$send(content, 'each', [], ($$162 = function(text){var self = $$162.$$s || this;
if (text == null) {
text = nil;
};
_slim_controls4['$<<']("<p>");
_slim_controls4['$<<'](text);
return _slim_controls4['$<<']("</p>");}, $$162.$$s = self, $$162.$$arity = 1, $$162))
}}
};
return (_slim_controls4 = _slim_controls4.$join(""));}, $$161.$$s = self, $$161.$$arity = 0, $$161));
return _slim_controls2['$<<'](_slim_controls3);}, $$160.$$s = self, $$160.$$arity = 1, $$160));
return _slim_controls2['$<<']("</tr>");}, $$159.$$s = self, $$159.$$arity = 1, $$159));
_slim_controls2['$<<']("</t");
_slim_controls2['$<<'](tblsec);
return _slim_controls2['$<<'](">");}, $$158.$$s = self, $$158.$$arity = 1, $$158));
};
_slim_controls2['$<<']("</table>");
return (_slim_controls2 = _slim_controls2.$join(""));}, $$154.$$s = self, $$154.$$arity = 0, $$154));
_buf['$<<'](_slim_controls1);
return (_buf = _buf.$join(""));}, $$153.$$s = self, $$153.$$arity = 0, $$153));
}, $Converter_table$152.$$arity = -2);
Opal.def(self, '$inline_anchor', $Converter_inline_anchor$163 = function $$inline_anchor(node, opts) {
var $$164, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$164 = function(){var self = $$164.$$s || this, _buf = nil, $case = nil, _slim_codeattributes1 = nil, _temple_html_attributeremover1 = nil, _slim_codeattributes2 = nil, _slim_codeattributes3 = nil, _slim_codeattributes4 = nil, _slim_codeattributes5 = nil, _temple_html_attributeremover2 = nil, _slim_codeattributes6 = nil, _slim_codeattributes7 = nil, _slim_codeattributes8 = nil, _slim_codeattributes9 = nil, _slim_codeattributes10 = nil;
_buf = [];
$case = self.$type();
if ("xref"['$===']($case)) {
_buf['$<<']("<a");
_slim_codeattributes1 = self.$target();
if ($truthy(_slim_codeattributes1)) {
if (_slim_codeattributes1['$=='](true)) {
_buf['$<<'](" href")
} else {
_buf['$<<'](" href=\"");
_buf['$<<'](_slim_codeattributes1);
_buf['$<<']("\"");
}};
_temple_html_attributeremover1 = [];
_slim_codeattributes2 = self.$role();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes2))) {
_slim_codeattributes2 = _slim_codeattributes2.$flatten();
$send(_slim_codeattributes2, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes2, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover1['$<<'](_slim_codeattributes2.$join(" "));
} else {
_temple_html_attributeremover1['$<<'](_slim_codeattributes2)
};
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover1);
_buf['$<<']("\"");};
_buf['$<<'](">");
_buf['$<<'](self.$xref_text());
_buf['$<<']("</a>");}
else if ("ref"['$===']($case)) {
_buf['$<<']("<a");
_slim_codeattributes3 = self.$id();
if ($truthy(_slim_codeattributes3)) {
if (_slim_codeattributes3['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes3);
_buf['$<<']("\"");
}};
_buf['$<<'](" aria-hidden=\"true\"></a>");}
else if ("bibref"['$===']($case)) {
_buf['$<<']("<a");
_slim_codeattributes4 = self.$id();
if ($truthy(_slim_codeattributes4)) {
if (_slim_codeattributes4['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes4);
_buf['$<<']("\"");
}};
_buf['$<<'](" aria-hidden=\"true\"></a>");
_buf['$<<'](self.$bibref_text());}
else {
_buf['$<<']("<a");
_slim_codeattributes5 = self.$id();
if ($truthy(_slim_codeattributes5)) {
if (_slim_codeattributes5['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes5);
_buf['$<<']("\"");
}};
_temple_html_attributeremover2 = [];
_slim_codeattributes6 = self.$role();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes6))) {
_slim_codeattributes6 = _slim_codeattributes6.$flatten();
$send(_slim_codeattributes6, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes6, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover2['$<<'](_slim_codeattributes6.$join(" "));
} else {
_temple_html_attributeremover2['$<<'](_slim_codeattributes6)
};
_temple_html_attributeremover2 = _temple_html_attributeremover2.$join("");
if ($truthy(_temple_html_attributeremover2['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover2);
_buf['$<<']("\"");};
_slim_codeattributes7 = self.$target();
if ($truthy(_slim_codeattributes7)) {
if (_slim_codeattributes7['$=='](true)) {
_buf['$<<'](" href")
} else {
_buf['$<<'](" href=\"");
_buf['$<<'](_slim_codeattributes7);
_buf['$<<']("\"");
}};
_slim_codeattributes8 = self.$attr("window");
if ($truthy(_slim_codeattributes8)) {
if (_slim_codeattributes8['$=='](true)) {
_buf['$<<'](" target")
} else {
_buf['$<<'](" target=\"");
_buf['$<<'](_slim_codeattributes8);
_buf['$<<']("\"");
}};
_slim_codeattributes9 = self.$link_rel();
if ($truthy(_slim_codeattributes9)) {
if (_slim_codeattributes9['$=='](true)) {
_buf['$<<'](" rel")
} else {
_buf['$<<'](" rel=\"");
_buf['$<<'](_slim_codeattributes9);
_buf['$<<']("\"");
}};
_slim_codeattributes10 = self.$attr("title");
if ($truthy(_slim_codeattributes10)) {
if (_slim_codeattributes10['$=='](true)) {
_buf['$<<'](" title")
} else {
_buf['$<<'](" title=\"");
_buf['$<<'](_slim_codeattributes10);
_buf['$<<']("\"");
}};
_buf['$<<'](">");
_buf['$<<'](self.$text());
_buf['$<<']("</a>");};
return (_buf = _buf.$join(""));}, $$164.$$s = self, $$164.$$arity = 0, $$164));
}, $Converter_inline_anchor$163.$$arity = -2);
Opal.def(self, '$floating_title', $Converter_floating_title$165 = function $$floating_title(node, opts) {
var $$166, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$166 = function(){var self = $$166.$$s || this, _buf = nil, _slim_htag_filter1 = nil, _slim_codeattributes1 = nil, _temple_html_attributeremover1 = nil, _slim_codeattributes2 = nil;
_buf = [];
_slim_htag_filter1 = $rb_plus(self.$level(), 1).$to_s();
_buf['$<<']("<h");
_buf['$<<'](_slim_htag_filter1);
_slim_codeattributes1 = self.$id();
if ($truthy(_slim_codeattributes1)) {
if (_slim_codeattributes1['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes1);
_buf['$<<']("\"");
}};
_temple_html_attributeremover1 = [];
_slim_codeattributes2 = [self.$style(), self.$role()];
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes2))) {
_slim_codeattributes2 = _slim_codeattributes2.$flatten();
$send(_slim_codeattributes2, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes2, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover1['$<<'](_slim_codeattributes2.$join(" "));
} else {
_temple_html_attributeremover1['$<<'](_slim_codeattributes2)
};
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover1);
_buf['$<<']("\"");};
_buf['$<<'](">");
_buf['$<<'](self.$title());
_buf['$<<']("</h");
_buf['$<<'](_slim_htag_filter1);
_buf['$<<'](">");
return (_buf = _buf.$join(""));}, $$166.$$s = self, $$166.$$arity = 0, $$166));
}, $Converter_floating_title$165.$$arity = -2);
Opal.def(self, '$sidebar', $Converter_sidebar$167 = function $$sidebar(node, opts) {
var $$168, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$168 = function(){var self = $$168.$$s || this, _buf = nil, _temple_html_attributeremover1 = nil, _temple_html_attributemerger1 = nil, $writer = nil, _slim_codeattributes1 = nil, _slim_codeattributes2 = nil;
_buf = [];
_buf['$<<']("<aside");
_temple_html_attributeremover1 = [];
_temple_html_attributemerger1 = [];
$writer = [0, "sidebar"];
$send(_temple_html_attributemerger1, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
$writer = [1, []];
$send(_temple_html_attributemerger1, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
_slim_codeattributes1 = self.$role();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes1))) {
_slim_codeattributes1 = _slim_codeattributes1.$flatten();
$send(_slim_codeattributes1, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes1, 'reject!', [], "empty?".$to_proc());
_temple_html_attributemerger1['$[]'](1)['$<<'](_slim_codeattributes1.$join(" "));
} else {
_temple_html_attributemerger1['$[]'](1)['$<<'](_slim_codeattributes1)
};
$writer = [1, _temple_html_attributemerger1['$[]'](1).$join("")];
$send(_temple_html_attributemerger1, '[]=', Opal.to_a($writer));
$writer[$rb_minus($writer["length"], 1)];;
_temple_html_attributeremover1['$<<']($send(_temple_html_attributemerger1, 'reject', [], "empty?".$to_proc()).$join(" "));
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover1);
_buf['$<<']("\"");};
_slim_codeattributes2 = self.$id();
if ($truthy(_slim_codeattributes2)) {
if (_slim_codeattributes2['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes2);
_buf['$<<']("\"");
}};
_buf['$<<'](">");
if ($truthy(self['$title?']())) {
_buf['$<<']("<h6 class=\"block-title\">");
_buf['$<<'](self.$title());
_buf['$<<']("</h6>");};
_buf['$<<'](self.$content());
_buf['$<<']("</aside>");
return (_buf = _buf.$join(""));}, $$168.$$s = self, $$168.$$arity = 0, $$168));
}, $Converter_sidebar$167.$$arity = -2);
Opal.def(self, '$page_break', $Converter_page_break$169 = function $$page_break(node, opts) {
var $$170, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$170 = function(){var self = $$170.$$s || this, _buf = nil;
_buf = [];
_buf['$<<']("<div role=\"doc-pagebreak\" style=\"page-break-after: always;\"></div>");
return (_buf = _buf.$join(""));}, $$170.$$s = self, $$170.$$arity = 0, $$170));
}, $Converter_page_break$169.$$arity = -2);
Opal.def(self, '$literal', $Converter_literal$171 = function $$literal(node, opts) {
var $$172, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$172 = function(){var self = $$172.$$s || this, $$173, _buf = nil, _slim_controls1 = nil;
_buf = [];
_slim_controls1 = $send(self, 'block_with_title', [$hash2(["class"], {"class": "literal-block"})], ($$173 = function(){var self = $$173.$$s || this, _slim_controls2 = nil, _temple_html_attributeremover1 = nil, _slim_codeattributes1 = nil;
_slim_controls2 = [];
_slim_controls2['$<<']("<pre");
_temple_html_attributeremover1 = [];
_slim_codeattributes1 = self['$nowrap?']();
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes1))) {
_slim_codeattributes1 = _slim_codeattributes1.$flatten();
$send(_slim_codeattributes1, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes1, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover1['$<<'](_slim_codeattributes1.$join(" "));
} else {
_temple_html_attributeremover1['$<<'](_slim_codeattributes1)
};
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_slim_controls2['$<<'](" class=\"");
_slim_controls2['$<<'](_temple_html_attributeremover1);
_slim_controls2['$<<']("\"");};
_slim_controls2['$<<'](">");
_slim_controls2['$<<'](self.$content());
_slim_controls2['$<<']("</pre>");
return (_slim_controls2 = _slim_controls2.$join(""));}, $$173.$$s = self, $$173.$$arity = 0, $$173));
_buf['$<<'](_slim_controls1);
return (_buf = _buf.$join(""));}, $$172.$$s = self, $$172.$$arity = 0, $$172));
}, $Converter_literal$171.$$arity = -2);
Opal.def(self, '$inline_callout', $Converter_inline_callout$174 = function $$inline_callout(node, opts) {
var $$175, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$175 = function(){var self = $$175.$$s || this, _buf = nil;
_buf = [];
_buf['$<<']("<b class=\"conum\">");
_buf['$<<'](self.$text());
_buf['$<<']("</b>");
return (_buf = _buf.$join(""));}, $$175.$$s = self, $$175.$$arity = 0, $$175));
}, $Converter_inline_callout$174.$$arity = -2);
Opal.def(self, '$embedded', $Converter_embedded$176 = function $$embedded(node, opts) {
var $$177, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$177 = function(){var self = $$177.$$s || this, $a, $b, $$178, _buf = nil, _slim_codeattributes1 = nil, _temple_html_attributeremover1 = nil, _slim_codeattributes2 = nil;
_buf = [];
if ($truthy(($truthy($a = self.$notitle()['$!']()) ? self['$header?']() : $a))) {
_buf['$<<']("<h1");
_slim_codeattributes1 = self.$id();
if ($truthy(_slim_codeattributes1)) {
if (_slim_codeattributes1['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes1);
_buf['$<<']("\"");
}};
_buf['$<<'](">");
_buf['$<<'](self.$header().$title());
_buf['$<<']("</h1>");};
if ($truthy(($truthy($a = ($truthy($b = node['$sections?']()) ? self['$attr?']("toc") : $b)) ? self.$attr("toc-placement", "auto")['$==']("auto") : $a))) {
_buf['$<<']("<nav id=\"toc\"");
_temple_html_attributeremover1 = [];
_slim_codeattributes2 = self.$document().$attr("toc-class", "toc");
if ($truthy($$($nesting, 'Array')['$==='](_slim_codeattributes2))) {
_slim_codeattributes2 = _slim_codeattributes2.$flatten();
$send(_slim_codeattributes2, 'map!', [], "to_s".$to_proc());
$send(_slim_codeattributes2, 'reject!', [], "empty?".$to_proc());
_temple_html_attributeremover1['$<<'](_slim_codeattributes2.$join(" "));
} else {
_temple_html_attributeremover1['$<<'](_slim_codeattributes2)
};
_temple_html_attributeremover1 = _temple_html_attributeremover1.$join("");
if ($truthy(_temple_html_attributeremover1['$empty?']()['$!']())) {
_buf['$<<'](" class=\"");
_buf['$<<'](_temple_html_attributeremover1);
_buf['$<<']("\"");};
_buf['$<<'](" role=\"doc-toc\"><h2 id=\"toc-title\">");
_buf['$<<'](self.$document().$attr("toc-title"));
_buf['$<<']("</h2>");
_buf['$<<'](self.$converter().$convert(self.$document(), "outline"));
_buf['$<<']("</nav>");};
_buf['$<<'](self.$content());
if ($truthy(($truthy($a = self['$footnotes?']()) ? self['$attr?']("nofootnotes")['$!']() : $a))) {
_buf['$<<']("<section class=\"footnotes\" aria-label=\"Footnotes\" role=\"doc-endnotes\"><hr><ol class=\"footnotes\">");
$send(self.$footnotes(), 'each', [], ($$178 = function(fn){var self = $$178.$$s || this, _slim_codeattributes3 = nil;
if (fn == null) {
fn = nil;
};
_buf['$<<']("<li class=\"footnote\"");
_slim_codeattributes3 = self.$footnote_id(fn.$index());
if ($truthy(_slim_codeattributes3)) {
if (_slim_codeattributes3['$=='](true)) {
_buf['$<<'](" id")
} else {
_buf['$<<'](" id=\"");
_buf['$<<'](_slim_codeattributes3);
_buf['$<<']("\"");
}};
_buf['$<<'](" role=\"doc-endnote\">");
_buf['$<<']("" + (fn.$text()) + " ");
_buf['$<<']("<a class=\"footnote-backref\" href=\"#");
_buf['$<<'](self.$footnoteref_id(fn.$index()));
return _buf['$<<']("\" role=\"doc-backlink\" title=\"Jump to the first occurrence in the text\">↩</a></li>");}, $$178.$$s = self, $$178.$$arity = 1, $$178));
_buf['$<<']("</ol></section>");};
return (_buf = _buf.$join(""));}, $$177.$$s = self, $$177.$$arity = 0, $$177));
}, $Converter_embedded$176.$$arity = -2);
Opal.def(self, '$stem', $Converter_stem$179 = function $$stem(node, opts) {
var $$180, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$180 = function(){var self = $$180.$$s || this, $$181, _buf = nil, _slim_controls1 = nil;
_buf = [];
_slim_controls1 = $send(self, 'block_with_caption', ["top", $hash2(["class"], {"class": "stem-block"})], ($$181 = function(){var self = $$181.$$s || this, _slim_controls2 = nil, _slim_codeattributes1 = nil;
_slim_controls2 = [];
_slim_controls2['$<<']("<div class=\"math\"");
_slim_codeattributes1 = self.$stem_lang();
if ($truthy(_slim_codeattributes1)) {
if (_slim_codeattributes1['$=='](true)) {
_slim_controls2['$<<'](" data-lang")
} else {
_slim_controls2['$<<'](" data-lang=\"");
_slim_controls2['$<<'](_slim_codeattributes1);
_slim_controls2['$<<']("\"");
}};
_slim_controls2['$<<'](">");
_slim_controls2['$<<'](self.$delimit_stem(self.$content(), self.$style()));
_slim_controls2['$<<']("</div>");
return (_slim_controls2 = _slim_controls2.$join(""));}, $$181.$$s = self, $$181.$$arity = 0, $$181));
_buf['$<<'](_slim_controls1);
return (_buf = _buf.$join(""));}, $$180.$$s = self, $$180.$$arity = 0, $$180));
}, $Converter_stem$179.$$arity = -2);
return (Opal.def(self, '$video', $Converter_video$182 = function $$video(node, opts) {
var $$183, self = this;
if (opts == null) {
opts = $hash2([], {});
};
node.$extend($$($nesting, 'Helpers'));
return $send(node, 'instance_eval', [], ($$183 = function(){var self = $$183.$$s || this, $$184, _buf = nil, _slim_controls1 = nil;
_buf = [];
_slim_controls1 = $send(self, 'block_with_caption', ["bottom", $hash2(["class"], {"class": "video-block"})], ($$184 = function(){var self = $$184.$$s || this, _slim_controls2 = nil, _slim_codeattributes1 = nil, _slim_codeattributes2 = nil, _slim_codeattributes3 = nil, _slim_codeattributes4 = nil, _slim_codeattributes5 = nil, _slim_codeattributes6 = nil, _slim_codeattributes7 = nil, _slim_codeattributes8 = nil, _slim_codeattributes9 = nil, _slim_codeattributes10 = nil, _slim_codeattributes11 = nil, _slim_codeattributes12 = nil, _slim_codeattributes13 = nil;
_slim_controls2 = [];
if ($truthy(self['$video_iframe?']())) {
_slim_controls2['$<<']("<iframe");
_slim_codeattributes1 = self.$video_uri();
if ($truthy(_slim_codeattributes1)) {
if (_slim_codeattributes1['$=='](true)) {
_slim_controls2['$<<'](" src")
} else {
_slim_controls2['$<<'](" src=\"");
_slim_controls2['$<<'](_slim_codeattributes1);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes2 = self.$attr("width");
if ($truthy(_slim_codeattributes2)) {
if (_slim_codeattributes2['$=='](true)) {
_slim_controls2['$<<'](" width")
} else {
_slim_controls2['$<<'](" width=\"");
_slim_controls2['$<<'](_slim_codeattributes2);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes3 = self.$attr("height");
if ($truthy(_slim_codeattributes3)) {
if (_slim_codeattributes3['$=='](true)) {
_slim_controls2['$<<'](" height")
} else {
_slim_controls2['$<<'](" height=\"");
_slim_controls2['$<<'](_slim_codeattributes3);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes4 = 0;
if ($truthy(_slim_codeattributes4)) {
if (_slim_codeattributes4['$=='](true)) {
_slim_controls2['$<<'](" frameborder")
} else {
_slim_controls2['$<<'](" frameborder=\"");
_slim_controls2['$<<'](_slim_codeattributes4);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes5 = self['$option?']("nofullscreen")['$!']();
if ($truthy(_slim_codeattributes5)) {
if (_slim_codeattributes5['$=='](true)) {
_slim_controls2['$<<'](" allowfullscreen")
} else {
_slim_controls2['$<<'](" allowfullscreen=\"");
_slim_controls2['$<<'](_slim_codeattributes5);
_slim_controls2['$<<']("\"");
}};
_slim_controls2['$<<']("></iframe>");
} else {
_slim_controls2['$<<']("<video");
_slim_codeattributes6 = self.$video_uri();
if ($truthy(_slim_codeattributes6)) {
if (_slim_codeattributes6['$=='](true)) {
_slim_controls2['$<<'](" src")
} else {
_slim_controls2['$<<'](" src=\"");
_slim_controls2['$<<'](_slim_codeattributes6);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes7 = self.$attr("width");
if ($truthy(_slim_codeattributes7)) {
if (_slim_codeattributes7['$=='](true)) {
_slim_controls2['$<<'](" width")
} else {
_slim_controls2['$<<'](" width=\"");
_slim_controls2['$<<'](_slim_codeattributes7);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes8 = self.$attr("height");
if ($truthy(_slim_codeattributes8)) {
if (_slim_codeattributes8['$=='](true)) {
_slim_controls2['$<<'](" height")
} else {
_slim_controls2['$<<'](" height=\"");
_slim_controls2['$<<'](_slim_codeattributes8);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes9 = (function() {if ($truthy(self['$attr?']("poster"))) {
return self.$media_uri(self.$attr("poster"))
} else {
return nil
}; return nil; })();
if ($truthy(_slim_codeattributes9)) {
if (_slim_codeattributes9['$=='](true)) {
_slim_controls2['$<<'](" poster")
} else {
_slim_controls2['$<<'](" poster=\"");
_slim_controls2['$<<'](_slim_codeattributes9);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes10 = self['$option?']("autoplay");
if ($truthy(_slim_codeattributes10)) {
if (_slim_codeattributes10['$=='](true)) {
_slim_controls2['$<<'](" autoplay")
} else {
_slim_controls2['$<<'](" autoplay=\"");
_slim_controls2['$<<'](_slim_codeattributes10);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes11 = self['$option?']("muted");
if ($truthy(_slim_codeattributes11)) {
if (_slim_codeattributes11['$=='](true)) {
_slim_controls2['$<<'](" muted")
} else {
_slim_controls2['$<<'](" muted=\"");
_slim_controls2['$<<'](_slim_codeattributes11);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes12 = self['$option?']("nocontrols")['$!']();
if ($truthy(_slim_codeattributes12)) {
if (_slim_codeattributes12['$=='](true)) {
_slim_controls2['$<<'](" controls")
} else {
_slim_controls2['$<<'](" controls=\"");
_slim_controls2['$<<'](_slim_codeattributes12);
_slim_controls2['$<<']("\"");
}};
_slim_codeattributes13 = self['$option?']("loop");
if ($truthy(_slim_codeattributes13)) {
if (_slim_codeattributes13['$=='](true)) {
_slim_controls2['$<<'](" loop")
} else {
_slim_controls2['$<<'](" loop=\"");
_slim_controls2['$<<'](_slim_codeattributes13);
_slim_controls2['$<<']("\"");
}};
_slim_controls2['$<<'](">Your browser does not support the video tag.</video>");
};
return (_slim_controls2 = _slim_controls2.$join(""));}, $$184.$$s = self, $$184.$$arity = 0, $$184));
_buf['$<<'](_slim_controls1);
return (_buf = _buf.$join(""));}, $$183.$$s = self, $$183.$$arity = 0, $$183));
}, $Converter_video$182.$$arity = -2), nil) && 'video';
})($$$($$($nesting, 'Asciidoctor'), 'Html5s'), $$$($$$($$$('::', 'Asciidoctor'), 'Converter'), 'Base'), $nesting);
};
/* Generated by Opal 0.11.99.dev */
(function(Opal) {
var $a, $b, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $truthy = Opal.truthy;
Opal.add_stubs(['$require', '$==']);
self.$require("asciidoctor/html5s/version");
self.$require("asciidoctor/html5s/converter");
self.$require("asciidoctor/html5s/replacements");
self.$require("asciidoctor/html5s/attached_colist_treeprocessor");
if ($truthy((($b = $$($nesting, 'Asciidoctor', 'skip_raise')) && ($a = $$$($b, 'SyntaxHighlighter', 'skip_raise')) ? 'constant' : nil))) {
self.$require("asciidoctor/html5s/html_pipeline_highlighter")};
if ($$($nesting, 'RUBY_PLATFORM')['$==']("opal")) {
return nil
} else {
return nil
};
})(Opal);
}
var mainModule
function resolveModule (name) {
if (!mainModule) {
checkAsciidoctor()
initialize(Opal)
mainModule = Opal.const_get_qualified(Opal.Asciidoctor, 'Html5s')
}
if (!name) {
return mainModule
}
return Opal.const_get_qualified(mainModule, name)
}
function checkAsciidoctor () {
if (typeof Opal.Asciidoctor === 'undefined') {
throw new TypeError('Asciidoctor.js is not loaded')
}
}
/**
* @return A new instance of `Asciidoctor::Html5s::AttachedColistTreeprocessor`.
*/
function AttachedColistTreeprocessor () {
var processor = resolveModule('AttachedColistTreeprocessor').$new()
processor.process = processor.$process
return processor
}
/**
* @param {string} backend The backend name.
* @param {Object} opts The converter options.
* @return A new instance of `Asciidoctor::Html5s::Converter`.
*/
function Converter (backend, opts) {
var converter = resolveModule('Converter').$new(backend, Opal.hash(opts || {}))
converter.convert = function (node, transform, opts) {
return this.$convert(node, transform, Opal.hash(opts || {}))
}
return converter
}
/**
* @return {string} Version of this extension.
*/
function getVersion () {
return resolveModule().$$const.VERSION.toString()
}
/**
* Registers the HTML5s converter and the supporting extension into Asciidoctor.
*
* @param registry The Asciidoctor extensions registry to register the
* extension into. Defaults to the global Asciidoctor registry.
* @throws {TypeError} if the *registry* is invalid or Asciidoctor.js is not loaded.
*/
function register (registry) {
if (!registry) {
checkAsciidoctor()
registry = Opal.Asciidoctor.Extensions
}
var processor = AttachedColistTreeprocessor()
// global registry
if (typeof registry.register === 'function') {
registry.register(function () {
this.treeProcessor(processor)
})
// custom registry
} else if (typeof registry.block === 'function') {
registry.treeProcessor(processor)
} else {
throw new TypeError('Invalid registry object')
}
}
var facade = {
AttachedColistTreeprocessor: AttachedColistTreeprocessor,
Converter: Converter,
getVersion: getVersion,
register: register,
}
if (typeof module !== 'undefined' && module.exports) {
module.exports = facade
}
return facade
})(Opal);