muwu 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +7 -0
  2. data/bin/muwu +5 -0
  3. data/lib/muwu.rb +38 -0
  4. data/lib/muwu/cli/cli.rb +143 -0
  5. data/lib/muwu/cli/cli_help.rb +28 -0
  6. data/lib/muwu/cli/help/compile +22 -0
  7. data/lib/muwu/cli/help/concat +8 -0
  8. data/lib/muwu/cli/help/heading +2 -0
  9. data/lib/muwu/cli/help/inspect +7 -0
  10. data/lib/muwu/cli/help/new +8 -0
  11. data/lib/muwu/cli/help/reset +14 -0
  12. data/lib/muwu/cli/help/summary +14 -0
  13. data/lib/muwu/controller/controller.rb +120 -0
  14. data/lib/muwu/controller/controller_interaction.rb +146 -0
  15. data/lib/muwu/default/default.rb +51 -0
  16. data/lib/muwu/destination/destination.rb +212 -0
  17. data/lib/muwu/destination_builder/destination_builder.rb +127 -0
  18. data/lib/muwu/helper/hash_helper.rb +37 -0
  19. data/lib/muwu/helper/html_href_helper.rb +101 -0
  20. data/lib/muwu/helper/outline_helper.rb +160 -0
  21. data/lib/muwu/helper/regexp_lib.rb +101 -0
  22. data/lib/muwu/helper/sanitizer_helper.rb +50 -0
  23. data/lib/muwu/manifest/manifest.rb +158 -0
  24. data/lib/muwu/manifest_builder/manifest_builder.rb +102 -0
  25. data/lib/muwu/manifest_task/contents.rb +42 -0
  26. data/lib/muwu/manifest_task/document_css.rb +25 -0
  27. data/lib/muwu/manifest_task/document_html.rb +69 -0
  28. data/lib/muwu/manifest_task/document_js.rb +25 -0
  29. data/lib/muwu/manifest_task/metadata.rb +35 -0
  30. data/lib/muwu/manifest_task/navigator.rb +29 -0
  31. data/lib/muwu/manifest_task/subcontents.rb +48 -0
  32. data/lib/muwu/manifest_task/text.rb +51 -0
  33. data/lib/muwu/manifest_task/text_item.rb +124 -0
  34. data/lib/muwu/manifest_task/title.rb +34 -0
  35. data/lib/muwu/manifest_task_builder/contents_builder.rb +88 -0
  36. data/lib/muwu/manifest_task_builder/document_css_builder.rb +63 -0
  37. data/lib/muwu/manifest_task_builder/document_html_builder.rb +210 -0
  38. data/lib/muwu/manifest_task_builder/document_js_builder.rb +69 -0
  39. data/lib/muwu/manifest_task_builder/metadata_builder.rb +118 -0
  40. data/lib/muwu/manifest_task_builder/navigator_builder.rb +78 -0
  41. data/lib/muwu/manifest_task_builder/subcontents_builder.rb +90 -0
  42. data/lib/muwu/manifest_task_builder/text_builder.rb +125 -0
  43. data/lib/muwu/manifest_task_builder/text_item_builder.rb +314 -0
  44. data/lib/muwu/manifest_task_builder/title_builder.rb +122 -0
  45. data/lib/muwu/project/project.rb +430 -0
  46. data/lib/muwu/project_builder/assets/config/css/base/html_elements.scss +138 -0
  47. data/lib/muwu/project_builder/assets/config/css/base/index.scss +11 -0
  48. data/lib/muwu/project_builder/assets/config/css/base/mixin_text_section_heading.scss +23 -0
  49. data/lib/muwu/project_builder/assets/config/css/base/section_muwu_contents.scss +58 -0
  50. data/lib/muwu/project_builder/assets/config/css/base/section_muwu_metadata.scss +17 -0
  51. data/lib/muwu/project_builder/assets/config/css/base/section_muwu_navigator.scss +13 -0
  52. data/lib/muwu/project_builder/assets/config/css/base/section_muwu_subcontents.scss +58 -0
  53. data/lib/muwu/project_builder/assets/config/css/base/section_muwu_text.scss +48 -0
  54. data/lib/muwu/project_builder/assets/config/css/base/section_muwu_title.scss +22 -0
  55. data/lib/muwu/project_builder/assets/config/css/colors/dark.scss +32 -0
  56. data/lib/muwu/project_builder/assets/config/css/colors/index.scss +1 -0
  57. data/lib/muwu/project_builder/assets/config/css/colors/light.scss +34 -0
  58. data/lib/muwu/project_builder/assets/config/css/extensions/index.scss +1 -0
  59. data/lib/muwu/project_builder/assets/config/css/index.scss +19 -0
  60. data/lib/muwu/project_builder/assets/config/css_debugger/debug_section_text.scss +27 -0
  61. data/lib/muwu/project_builder/project_reader.rb +144 -0
  62. data/lib/muwu/project_builder/project_reset_css.rb +95 -0
  63. data/lib/muwu/project_builder/project_starter.rb +27 -0
  64. data/lib/muwu/project_builder/project_validator.rb +157 -0
  65. data/lib/muwu/project_builder/project_writer.rb +127 -0
  66. data/lib/muwu/project_exception/css_manifest_file_not_found.rb +23 -0
  67. data/lib/muwu/project_exception/dry_output_recommended_with_multiple_documents.rb +19 -0
  68. data/lib/muwu/project_exception/metadata_file_not_found.rb +24 -0
  69. data/lib/muwu/project_exception/metadata_value_not_given.rb +42 -0
  70. data/lib/muwu/project_exception/multiple_documents_outlined_with_stdout.rb +18 -0
  71. data/lib/muwu/project_exception/multiple_formats_requested_with_stdout.rb +18 -0
  72. data/lib/muwu/project_exception/navigator_not_recommended_with_stdout.rb +23 -0
  73. data/lib/muwu/project_exception/navigators_will_be_generated_automatically.rb +23 -0
  74. data/lib/muwu/project_exception/option_key_not_understood.rb +23 -0
  75. data/lib/muwu/project_exception/option_not_validatable.rb +23 -0
  76. data/lib/muwu/project_exception/option_value_not_understood.rb +24 -0
  77. data/lib/muwu/project_exception/options_file_not_found.rb +24 -0
  78. data/lib/muwu/project_exception/outline_file_not_found.rb +24 -0
  79. data/lib/muwu/project_exception/outline_step_not_understood.rb +23 -0
  80. data/lib/muwu/project_exception/output_already_open.rb +18 -0
  81. data/lib/muwu/project_exception/output_not_open.rb +18 -0
  82. data/lib/muwu/project_exception/subcontents_will_be_generated_automatically copy.rb +23 -0
  83. data/lib/muwu/project_exception/target_project_folder_already_exists.rb +24 -0
  84. data/lib/muwu/project_exception/text_source_file_not_found.rb +26 -0
  85. data/lib/muwu/project_exception_handler/fatal.rb +39 -0
  86. data/lib/muwu/project_options/project_options.rb +54 -0
  87. data/lib/muwu/project_options_builder/project_option_validator.rb +37 -0
  88. data/lib/muwu/project_options_builder/project_option_validator_key.rb +56 -0
  89. data/lib/muwu/project_options_builder/project_option_validator_value.rb +300 -0
  90. data/lib/muwu/project_options_builder/project_options_reader.rb +80 -0
  91. data/lib/muwu/render_concat/render_concat.rb +80 -0
  92. data/lib/muwu/render_html/render_html.rb +101 -0
  93. data/lib/muwu/render_html/render_markup_to_html.rb +87 -0
  94. data/lib/muwu/render_html_builder/render_css_builder.rb +34 -0
  95. data/lib/muwu/render_html_builder/render_html_builder.rb +34 -0
  96. data/lib/muwu/render_html_builder/render_js_builder.rb +34 -0
  97. data/lib/muwu/render_html_partial/js_library/_init_bare.js +7 -0
  98. data/lib/muwu/render_html_partial/js_library/_zepto.min.js +2 -0
  99. data/lib/muwu/render_html_partial/js_library/init.js +10 -0
  100. data/lib/muwu/render_html_partial/js_library/navigation.js +140 -0
  101. data/lib/muwu/render_html_partial/render_contents.rb +369 -0
  102. data/lib/muwu/render_html_partial/render_document_css.rb +45 -0
  103. data/lib/muwu/render_html_partial/render_document_html.rb +397 -0
  104. data/lib/muwu/render_html_partial/render_document_js.rb +37 -0
  105. data/lib/muwu/render_html_partial/render_js_library.rb +54 -0
  106. data/lib/muwu/render_html_partial/render_metadata.rb +120 -0
  107. data/lib/muwu/render_html_partial/render_navigator.rb +136 -0
  108. data/lib/muwu/render_html_partial/render_subcontents.rb +374 -0
  109. data/lib/muwu/render_html_partial/render_text.rb +74 -0
  110. data/lib/muwu/render_html_partial/render_text_item.rb +230 -0
  111. data/lib/muwu/render_html_partial/render_title.rb +71 -0
  112. data/lib/muwu/render_html_partial_builder/render_contents_builder.rb +100 -0
  113. data/lib/muwu/render_html_partial_builder/render_document_css_builder.rb +46 -0
  114. data/lib/muwu/render_html_partial_builder/render_document_html_builder.rb +211 -0
  115. data/lib/muwu/render_html_partial_builder/render_document_js_builder.rb +52 -0
  116. data/lib/muwu/render_html_partial_builder/render_metadata_builder.rb +47 -0
  117. data/lib/muwu/render_html_partial_builder/render_navigator_builder.rb +74 -0
  118. data/lib/muwu/render_html_partial_builder/render_subcontents_builder.rb +85 -0
  119. data/lib/muwu/render_html_partial_builder/render_text_builder.rb +86 -0
  120. data/lib/muwu/render_html_partial_builder/render_text_item_builder.rb +274 -0
  121. data/lib/muwu/render_html_partial_builder/render_title_builder.rb +47 -0
  122. data/lib/muwu/render_inspector/render_inspector.rb +224 -0
  123. data/lib/muwu/var/deflistdiv.rb +239 -0
  124. data/lib/muwu_loader.rb +35 -0
  125. data/test/what_no_tests.md +5 -0
  126. metadata +251 -0
@@ -0,0 +1,7 @@
1
+ var Muwu = {
2
+ activeRequest: {},
3
+ ajax: {},
4
+ helper: {},
5
+ responder: {}
6
+ };
7
+
@@ -0,0 +1,2 @@
1
+ /* Zepto v1.2.0-28-g763b3d6 - zepto event - zeptojs.com/license */
2
+ !function(t,e){"function"==typeof define&&define.amd?define(function(){return e(t)}):e(t)}(window,function(t){var e=function(){function Z(t){return null==t?String(t):C[S.call(t)]||"object"}function j(t){return"function"==Z(t)}function k(t){return null!=t&&t==t.window}function D(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function M(t){return"object"==Z(t)}function z(t){return M(t)&&!k(t)&&Object.getPrototypeOf(t)==Object.prototype}function V(t){var e=!!t&&"length"in t&&t.length,n=i.type(t);return"function"!=n&&!k(t)&&("array"==n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function _(t){return u.call(t,function(t){return null!=t})}function B(t){return t.length>0?i.fn.concat.apply([],t):t}function F(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function q(t){return t in l?l[t]:l[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function I(t,e){return"number"!=typeof e||h[F(t)]?e:e+"px"}function R(t){var e,n;return c[t]||(e=a.createElement(t),a.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),c[t]=n),c[t]}function H(t){return"children"in t?f.call(t.children):i.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function X(t,e){var n,i=t?t.length:0;for(n=0;i>n;n++)this[n]=t[n];this.length=i,this.selector=e||""}function Y(t,i,r){for(n in i)r&&(z(i[n])||$(i[n]))?(z(i[n])&&!z(t[n])&&(t[n]={}),$(i[n])&&!$(t[n])&&(t[n]=[]),Y(t[n],i[n],r)):i[n]!==e&&(t[n]=i[n])}function J(t,e){return null==e?i(t):i(t).filter(e)}function U(t,e,n,i){return j(e)?e.call(t,n,i):e}function W(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function G(t,n){var i=t.className||"",r=i&&i.baseVal!==e;return n===e?r?i.baseVal:i:void(r?i.baseVal=n:t.className=n)}function K(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?i.parseJSON(t):t):t}catch(e){return t}}function Q(t,e){e(t);for(var n=0,i=t.childNodes.length;i>n;n++)Q(t.childNodes[n],e)}var e,n,i,r,P,T,o=[],s=o.concat,u=o.filter,f=o.slice,a=t.document,c={},l={},h={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},p=/^\s*<(\w+|!)[^>]*>/,d=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,m=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,g=/^(?:body|html)$/i,v=/([A-Z])/g,y=["val","css","html","text","data","width","height","offset"],E=["after","prepend","before","append"],b=a.createElement("table"),w=a.createElement("tr"),x={tr:a.createElement("tbody"),tbody:b,thead:b,tfoot:b,td:w,th:w,"*":a.createElement("div")},N=/^[\w-]*$/,C={},S=C.toString,O={},A=a.createElement("div"),L={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},$=Array.isArray||function(t){return t instanceof Array};return O.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var i,r=t.parentNode,o=!r;return o&&(r=A).appendChild(t),i=~O.qsa(r,e).indexOf(t),o&&A.removeChild(t),i},P=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},T=function(t){return u.call(t,function(e,n){return t.indexOf(e)==n})},O.fragment=function(t,n,r){var o,s,u;return d.test(t)&&(o=i(a.createElement(RegExp.$1))),o||(t.replace&&(t=t.replace(m,"<$1></$2>")),n===e&&(n=p.test(t)&&RegExp.$1),n in x||(n="*"),u=x[n],u.innerHTML=""+t,o=i.each(f.call(u.childNodes),function(){u.removeChild(this)})),z(r)&&(s=i(o),i.each(r,function(t,e){y.indexOf(t)>-1?s[t](e):s.attr(t,e)})),o},O.Z=function(t,e){return new X(t,e)},O.isZ=function(t){return t instanceof O.Z},O.init=function(t,n){var r;if(!t)return O.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&p.test(t))r=O.fragment(t,RegExp.$1,n),t=null;else{if(n!==e)return i(n).find(t);r=O.qsa(a,t)}else{if(j(t))return i(a).ready(t);if(O.isZ(t))return t;if($(t))r=_(t);else if(M(t))r=[t],t=null;else if(p.test(t))r=O.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==e)return i(n).find(t);r=O.qsa(a,t)}}return O.Z(r,t)},i=function(t,e){return O.init(t,e)},i.extend=function(t){var e,n=f.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){Y(t,n,e)}),t},O.qsa=function(t,e){var n,i="#"==e[0],r=!i&&"."==e[0],o=i||r?e.slice(1):e,s=N.test(o);return t.getElementById&&s&&i?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:f.call(s&&!i&&t.getElementsByClassName?r?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},i.contains=a.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},i.type=Z,i.isFunction=j,i.isWindow=k,i.isArray=$,i.isPlainObject=z,i.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},i.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},i.inArray=function(t,e,n){return o.indexOf.call(e,t,n)},i.camelCase=P,i.trim=function(t){return null==t?"":String.prototype.trim.call(t)},i.uuid=0,i.support={},i.expr={},i.noop=function(){},i.map=function(t,e){var n,r,o,i=[];if(V(t))for(r=0;r<t.length;r++)n=e(t[r],r),null!=n&&i.push(n);else for(o in t)n=e(t[o],o),null!=n&&i.push(n);return B(i)},i.each=function(t,e){var n,i;if(V(t)){for(n=0;n<t.length;n++)if(e.call(t[n],n,t[n])===!1)return t}else for(i in t)if(e.call(t[i],i,t[i])===!1)return t;return t},i.grep=function(t,e){return u.call(t,e)},t.JSON&&(i.parseJSON=JSON.parse),i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){C["[object "+e+"]"]=e.toLowerCase()}),i.fn={constructor:O.Z,length:0,forEach:o.forEach,reduce:o.reduce,push:o.push,sort:o.sort,splice:o.splice,indexOf:o.indexOf,concat:function(){var t,e,n=[];for(t=0;t<arguments.length;t++)e=arguments[t],n[t]=O.isZ(e)?e.toArray():e;return s.apply(O.isZ(this)?this.toArray():this,n)},map:function(t){return i(i.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return i(f.apply(this,arguments))},ready:function(e){if("complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll)setTimeout(function(){e(i)},0);else{var n=function(){a.removeEventListener("DOMContentLoaded",n,!1),t.removeEventListener("load",n,!1),e(i)};a.addEventListener("DOMContentLoaded",n,!1),t.addEventListener("load",n,!1)}return this},get:function(t){return t===e?f.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return o.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return j(t)?this.not(this.not(t)):i(u.call(this,function(e){return O.matches(e,t)}))},add:function(t,e){return i(T(this.concat(i(t,e))))},is:function(t){return"string"==typeof t?this.length>0&&O.matches(this[0],t):t&&this.selector==t.selector},not:function(t){var n=[];if(j(t)&&t.call!==e)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):V(t)&&j(t.item)?f.call(t):i(t);this.forEach(function(t){r.indexOf(t)<0&&n.push(t)})}return i(n)},has:function(t){return this.filter(function(){return M(t)?i.contains(this,t):i(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!M(t)?t:i(t)},last:function(){var t=this[this.length-1];return t&&!M(t)?t:i(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?i(t).filter(function(){var t=this;return o.some.call(n,function(e){return i.contains(e,t)})}):1==this.length?i(O.qsa(this[0],t)):this.map(function(){return O.qsa(this,t)}):i()},closest:function(t,e){var n=[],r="object"==typeof t&&i(t);return this.each(function(i,o){for(;o&&!(r?r.indexOf(o)>=0:O.matches(o,t));)o=o!==e&&!D(o)&&o.parentNode;o&&n.indexOf(o)<0&&n.push(o)}),i(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=i.map(n,function(t){return(t=t.parentNode)&&!D(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return J(e,t)},parent:function(t){return J(T(this.pluck("parentNode")),t)},children:function(t){return J(this.map(function(){return H(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||f.call(this.childNodes)})},siblings:function(t){return J(this.map(function(t,e){return u.call(H(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return i.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=R(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=j(t);if(this[0]&&!e)var n=i(t).get(0),r=n.parentNode||this.length>1;return this.each(function(o){i(this).wrapAll(e?t.call(this,o):r?n.cloneNode(!0):n)})},wrapAll:function(t){if(this[0]){i(this[0]).before(t=i(t));for(var e;(e=t.children()).length;)t=e.first();i(t).append(this)}return this},wrapInner:function(t){var e=j(t);return this.each(function(n){var r=i(this),o=r.contents(),s=e?t.call(this,n):t;o.length?o.wrapAll(s):r.append(s)})},unwrap:function(){return this.parent().each(function(){i(this).replaceWith(i(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var n=i(this);(t===e?"none"==n.css("display"):t)?n.show():n.hide()})},prev:function(t){return i(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return i(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;i(this).empty().append(U(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=U(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,i){var r;return"string"!=typeof t||1 in arguments?this.each(function(e){if(1===this.nodeType)if(M(t))for(n in t)W(this,n,t[n]);else W(this,t,U(this,i,e,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(r=this[0].getAttribute(t))?r:e},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){W(this,t)},this)})},prop:function(t,e){return t=L[t]||t,"string"!=typeof t||1 in arguments?this.each(function(i){if(M(t))for(n in t)this[L[n]||n]=t[n];else this[t]=U(this,e,i,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=L[t]||t,this.each(function(){delete this[t]})},data:function(t,n){var i="data-"+t.replace(v,"-$1").toLowerCase(),r=1 in arguments?this.attr(i,n):this.attr(i);return null!==r?K(r):e},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=U(this,t,e,this.value)})):this[0]&&(this[0].multiple?i(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each(function(t){var n=i(this),r=U(this,e,t,n.offset()),o=n.offsetParent().offset(),s={top:r.top-o.top,left:r.left-o.left};"static"==n.css("position")&&(s.position="relative"),n.css(s)});if(!this.length)return null;if(a.documentElement!==this[0]&&!i.contains(a.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+t.pageXOffset,top:n.top+t.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(t,e){if(arguments.length<2){var r=this[0];if("string"==typeof t){if(!r)return;return r.style[P(t)]||getComputedStyle(r,"").getPropertyValue(t)}if($(t)){if(!r)return;var o={},s=getComputedStyle(r,"");return i.each(t,function(t,e){o[e]=r.style[P(e)]||s.getPropertyValue(e)}),o}}var u="";if("string"==Z(t))e||0===e?u=F(t)+":"+I(t,e):this.each(function(){this.style.removeProperty(F(t))});else for(n in t)t[n]||0===t[n]?u+=F(n)+":"+I(n,t[n])+";":this.each(function(){this.style.removeProperty(F(n))});return this.each(function(){this.style.cssText+=";"+u})},index:function(t){return t?this.indexOf(i(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?o.some.call(this,function(t){return this.test(G(t))},q(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){r=[];var n=G(this),o=U(this,t,e,n);o.split(/\s+/g).forEach(function(t){i(this).hasClass(t)||r.push(t)},this),r.length&&G(this,n+(n?" ":"")+r.join(" "))}}):this},removeClass:function(t){return this.each(function(n){if("className"in this){if(t===e)return G(this,"");r=G(this),U(this,t,n,r).split(/\s+/g).forEach(function(t){r=r.replace(q(t)," ")}),G(this,r.trim())}})},toggleClass:function(t,n){return t?this.each(function(r){var o=i(this),s=U(this,t,r,G(this));s.split(/\s+/g).forEach(function(t){(n===e?!o.hasClass(t):n)?o.addClass(t):o.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var n="scrollTop"in this[0];return t===e?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var n="scrollLeft"in this[0];return t===e?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=g.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(i(t).css("margin-top"))||0,n.left-=parseFloat(i(t).css("margin-left"))||0,r.top+=parseFloat(i(e[0]).css("border-top-width"))||0,r.left+=parseFloat(i(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||a.body;t&&!g.test(t.nodeName)&&"static"==i(t).css("position");)t=t.offsetParent;return t})}},i.fn.detach=i.fn.remove,["width","height"].forEach(function(t){var n=t.replace(/./,function(t){return t[0].toUpperCase()});i.fn[t]=function(r){var o,s=this[0];return r===e?k(s)?s["inner"+n]:D(s)?s.documentElement["scroll"+n]:(o=this.offset())&&o[t]:this.each(function(e){s=i(this),s.css(t,U(this,r,e,s[t]()))})}}),E.forEach(function(n,r){var o=r%2;i.fn[n]=function(){var n,u,s=i.map(arguments,function(t){var r=[];return n=Z(t),"array"==n?(t.forEach(function(t){return t.nodeType!==e?r.push(t):i.zepto.isZ(t)?r=r.concat(t.get()):void(r=r.concat(O.fragment(t)))}),r):"object"==n||null==t?t:O.fragment(t)}),f=this.length>1;return s.length<1?this:this.each(function(e,n){u=o?n:n.parentNode,n=0==r?n.nextSibling:1==r?n.firstChild:2==r?n:null;var c=i.contains(a.documentElement,u);s.forEach(function(e){if(f)e=e.cloneNode(!0);else if(!u)return i(e).remove();u.insertBefore(e,n),c&&Q(e,function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}})})})},i.fn[o?n+"To":"insert"+(r?"Before":"After")]=function(t){return i(t)[n](this),this}}),O.Z.prototype=X.prototype=i.fn,O.uniq=T,O.deserializeValue=K,i.zepto=O,i}();return t.Zepto=e,void 0===t.$&&(t.$=e),function(e){function h(t){return t._zid||(t._zid=n++)}function p(t,e,n,i){if(e=d(e),e.ns)var r=m(e.ns);return(u[h(t)]||[]).filter(function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||r.test(t.ns))&&(!n||h(t.fn)===h(n))&&(!i||t.sel==i)})}function d(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function m(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function g(t,e){return t.del&&!a&&t.e in c||!!e}function v(t){return l[t]||a&&c[t]||t}function y(t,n,r,o,s,f,a){var c=h(t),p=u[c]||(u[c]=[]);n.split(/\s/).forEach(function(n){if("ready"==n)return e(document).ready(r);var u=d(n);u.fn=r,u.sel=s,u.e in l&&(r=function(t){var n=t.relatedTarget;return!n||n!==this&&!e.contains(this,n)?u.fn.apply(this,arguments):void 0}),u.del=f;var c=f||r;u.proxy=function(e){if(e=C(e),!e.isImmediatePropagationStopped()){e.data=o;var n=c.apply(t,e._args==i?[e]:[e].concat(e._args));return n===!1&&(e.preventDefault(),e.stopPropagation()),n}},u.i=p.length,p.push(u),"addEventListener"in t&&t.addEventListener(v(u.e),u.proxy,g(u,a))})}function E(t,e,n,i,r){var o=h(t);(e||"").split(/\s/).forEach(function(e){p(t,e,n,i).forEach(function(e){delete u[o][e.i],"removeEventListener"in t&&t.removeEventListener(v(e.e),e.proxy,g(e,r))})})}function C(t,n){if(n||!t.isDefaultPrevented){n||(n=t),e.each(N,function(e,i){var r=n[e];t[e]=function(){return this[i]=b,r&&r.apply(n,arguments)},t[i]=w});try{t.timeStamp||(t.timeStamp=Date.now())}catch(r){}(n.defaultPrevented!==i?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(t.isDefaultPrevented=b)}return t}function S(t){var e,n={originalEvent:t};for(e in t)x.test(e)||t[e]===i||(n[e]=t[e]);return C(n,t)}var i,n=1,r=Array.prototype.slice,o=e.isFunction,s=function(t){return"string"==typeof t},u={},f={},a="onfocusin"in t,c={focus:"focusin",blur:"focusout"},l={mouseenter:"mouseover",mouseleave:"mouseout"};f.click=f.mousedown=f.mouseup=f.mousemove="MouseEvents",e.event={add:y,remove:E},e.proxy=function(t,n){var i=2 in arguments&&r.call(arguments,2);if(o(t)){var u=function(){return t.apply(n,i?i.concat(r.call(arguments)):arguments)};return u._zid=h(t),u}if(s(n))return i?(i.unshift(t[n],t),e.proxy.apply(null,i)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,i){return this.on(t,e,n,i,1)};var b=function(){return!0},w=function(){return!1},x=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,N={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,n,u,f,a){var c,l,h=this;return t&&!s(t)?(e.each(t,function(t,e){h.on(t,n,u,e,a)}),h):(s(n)||o(f)||f===!1||(f=u,u=n,n=i),(f===i||u===!1)&&(f=u,u=i),f===!1&&(f=w),h.each(function(i,o){a&&(c=function(t){return E(o,t.type,f),f.apply(this,arguments)}),n&&(l=function(t){var i,s=e(t.target).closest(n,o).get(0);return s&&s!==o?(i=e.extend(S(t),{currentTarget:s,liveFired:o}),(c||f).apply(s,[i].concat(r.call(arguments,1)))):void 0}),y(o,t,f,u,n,l||c)}))},e.fn.off=function(t,n,r){var u=this;return t&&!s(t)?(e.each(t,function(t,e){u.off(t,n,e)}),u):(s(n)||o(r)||r===!1||(r=n,n=i),r===!1&&(r=w),u.each(function(){E(this,t,r,n)}))},e.fn.trigger=function(t,n){return t=s(t)||e.isPlainObject(t)?e.Event(t):C(t),t._args=n,this.each(function(){t.type in c&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)})},e.fn.triggerHandler=function(t,n){var i,r;return this.each(function(o,u){i=S(s(t)?e.Event(t):t),i._args=n,i.target=u,e.each(p(u,t.type||t),function(t,e){return r=e.proxy(i),i.isImmediatePropagationStopped()?!1:void 0})}),r},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}}),e.Event=function(t,e){s(t)||(e=t,t=e.type);var n=document.createEvent(f[t]||"Events"),i=!0;if(e)for(var r in e)"bubbles"==r?i=!!e[r]:n[r]=e[r];return n.initEvent(t,i,!0),C(n)}}(e),e});
@@ -0,0 +1,10 @@
1
+ var Muwu = {
2
+ activeRequest: {},
3
+ ajax: {},
4
+ helper: {},
5
+ responder: {}
6
+ };
7
+
8
+
9
+ /* Zepto v1.2.0-28-g763b3d6 - zepto event - zeptojs.com/license */
10
+ !function(t,e){"function"==typeof define&&define.amd?define(function(){return e(t)}):e(t)}(window,function(t){var e=function(){function Z(t){return null==t?String(t):C[S.call(t)]||"object"}function j(t){return"function"==Z(t)}function k(t){return null!=t&&t==t.window}function D(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function M(t){return"object"==Z(t)}function z(t){return M(t)&&!k(t)&&Object.getPrototypeOf(t)==Object.prototype}function V(t){var e=!!t&&"length"in t&&t.length,n=i.type(t);return"function"!=n&&!k(t)&&("array"==n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function _(t){return u.call(t,function(t){return null!=t})}function B(t){return t.length>0?i.fn.concat.apply([],t):t}function F(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function q(t){return t in l?l[t]:l[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function I(t,e){return"number"!=typeof e||h[F(t)]?e:e+"px"}function R(t){var e,n;return c[t]||(e=a.createElement(t),a.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),c[t]=n),c[t]}function H(t){return"children"in t?f.call(t.children):i.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function X(t,e){var n,i=t?t.length:0;for(n=0;i>n;n++)this[n]=t[n];this.length=i,this.selector=e||""}function Y(t,i,r){for(n in i)r&&(z(i[n])||$(i[n]))?(z(i[n])&&!z(t[n])&&(t[n]={}),$(i[n])&&!$(t[n])&&(t[n]=[]),Y(t[n],i[n],r)):i[n]!==e&&(t[n]=i[n])}function J(t,e){return null==e?i(t):i(t).filter(e)}function U(t,e,n,i){return j(e)?e.call(t,n,i):e}function W(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function G(t,n){var i=t.className||"",r=i&&i.baseVal!==e;return n===e?r?i.baseVal:i:void(r?i.baseVal=n:t.className=n)}function K(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?i.parseJSON(t):t):t}catch(e){return t}}function Q(t,e){e(t);for(var n=0,i=t.childNodes.length;i>n;n++)Q(t.childNodes[n],e)}var e,n,i,r,P,T,o=[],s=o.concat,u=o.filter,f=o.slice,a=t.document,c={},l={},h={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},p=/^\s*<(\w+|!)[^>]*>/,d=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,m=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,g=/^(?:body|html)$/i,v=/([A-Z])/g,y=["val","css","html","text","data","width","height","offset"],E=["after","prepend","before","append"],b=a.createElement("table"),w=a.createElement("tr"),x={tr:a.createElement("tbody"),tbody:b,thead:b,tfoot:b,td:w,th:w,"*":a.createElement("div")},N=/^[\w-]*$/,C={},S=C.toString,O={},A=a.createElement("div"),L={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},$=Array.isArray||function(t){return t instanceof Array};return O.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var i,r=t.parentNode,o=!r;return o&&(r=A).appendChild(t),i=~O.qsa(r,e).indexOf(t),o&&A.removeChild(t),i},P=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},T=function(t){return u.call(t,function(e,n){return t.indexOf(e)==n})},O.fragment=function(t,n,r){var o,s,u;return d.test(t)&&(o=i(a.createElement(RegExp.$1))),o||(t.replace&&(t=t.replace(m,"<$1></$2>")),n===e&&(n=p.test(t)&&RegExp.$1),n in x||(n="*"),u=x[n],u.innerHTML=""+t,o=i.each(f.call(u.childNodes),function(){u.removeChild(this)})),z(r)&&(s=i(o),i.each(r,function(t,e){y.indexOf(t)>-1?s[t](e):s.attr(t,e)})),o},O.Z=function(t,e){return new X(t,e)},O.isZ=function(t){return t instanceof O.Z},O.init=function(t,n){var r;if(!t)return O.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&p.test(t))r=O.fragment(t,RegExp.$1,n),t=null;else{if(n!==e)return i(n).find(t);r=O.qsa(a,t)}else{if(j(t))return i(a).ready(t);if(O.isZ(t))return t;if($(t))r=_(t);else if(M(t))r=[t],t=null;else if(p.test(t))r=O.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==e)return i(n).find(t);r=O.qsa(a,t)}}return O.Z(r,t)},i=function(t,e){return O.init(t,e)},i.extend=function(t){var e,n=f.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){Y(t,n,e)}),t},O.qsa=function(t,e){var n,i="#"==e[0],r=!i&&"."==e[0],o=i||r?e.slice(1):e,s=N.test(o);return t.getElementById&&s&&i?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:f.call(s&&!i&&t.getElementsByClassName?r?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},i.contains=a.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},i.type=Z,i.isFunction=j,i.isWindow=k,i.isArray=$,i.isPlainObject=z,i.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},i.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},i.inArray=function(t,e,n){return o.indexOf.call(e,t,n)},i.camelCase=P,i.trim=function(t){return null==t?"":String.prototype.trim.call(t)},i.uuid=0,i.support={},i.expr={},i.noop=function(){},i.map=function(t,e){var n,r,o,i=[];if(V(t))for(r=0;r<t.length;r++)n=e(t[r],r),null!=n&&i.push(n);else for(o in t)n=e(t[o],o),null!=n&&i.push(n);return B(i)},i.each=function(t,e){var n,i;if(V(t)){for(n=0;n<t.length;n++)if(e.call(t[n],n,t[n])===!1)return t}else for(i in t)if(e.call(t[i],i,t[i])===!1)return t;return t},i.grep=function(t,e){return u.call(t,e)},t.JSON&&(i.parseJSON=JSON.parse),i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){C["[object "+e+"]"]=e.toLowerCase()}),i.fn={constructor:O.Z,length:0,forEach:o.forEach,reduce:o.reduce,push:o.push,sort:o.sort,splice:o.splice,indexOf:o.indexOf,concat:function(){var t,e,n=[];for(t=0;t<arguments.length;t++)e=arguments[t],n[t]=O.isZ(e)?e.toArray():e;return s.apply(O.isZ(this)?this.toArray():this,n)},map:function(t){return i(i.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return i(f.apply(this,arguments))},ready:function(e){if("complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll)setTimeout(function(){e(i)},0);else{var n=function(){a.removeEventListener("DOMContentLoaded",n,!1),t.removeEventListener("load",n,!1),e(i)};a.addEventListener("DOMContentLoaded",n,!1),t.addEventListener("load",n,!1)}return this},get:function(t){return t===e?f.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return o.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return j(t)?this.not(this.not(t)):i(u.call(this,function(e){return O.matches(e,t)}))},add:function(t,e){return i(T(this.concat(i(t,e))))},is:function(t){return"string"==typeof t?this.length>0&&O.matches(this[0],t):t&&this.selector==t.selector},not:function(t){var n=[];if(j(t)&&t.call!==e)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):V(t)&&j(t.item)?f.call(t):i(t);this.forEach(function(t){r.indexOf(t)<0&&n.push(t)})}return i(n)},has:function(t){return this.filter(function(){return M(t)?i.contains(this,t):i(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!M(t)?t:i(t)},last:function(){var t=this[this.length-1];return t&&!M(t)?t:i(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?i(t).filter(function(){var t=this;return o.some.call(n,function(e){return i.contains(e,t)})}):1==this.length?i(O.qsa(this[0],t)):this.map(function(){return O.qsa(this,t)}):i()},closest:function(t,e){var n=[],r="object"==typeof t&&i(t);return this.each(function(i,o){for(;o&&!(r?r.indexOf(o)>=0:O.matches(o,t));)o=o!==e&&!D(o)&&o.parentNode;o&&n.indexOf(o)<0&&n.push(o)}),i(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=i.map(n,function(t){return(t=t.parentNode)&&!D(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return J(e,t)},parent:function(t){return J(T(this.pluck("parentNode")),t)},children:function(t){return J(this.map(function(){return H(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||f.call(this.childNodes)})},siblings:function(t){return J(this.map(function(t,e){return u.call(H(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return i.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=R(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=j(t);if(this[0]&&!e)var n=i(t).get(0),r=n.parentNode||this.length>1;return this.each(function(o){i(this).wrapAll(e?t.call(this,o):r?n.cloneNode(!0):n)})},wrapAll:function(t){if(this[0]){i(this[0]).before(t=i(t));for(var e;(e=t.children()).length;)t=e.first();i(t).append(this)}return this},wrapInner:function(t){var e=j(t);return this.each(function(n){var r=i(this),o=r.contents(),s=e?t.call(this,n):t;o.length?o.wrapAll(s):r.append(s)})},unwrap:function(){return this.parent().each(function(){i(this).replaceWith(i(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var n=i(this);(t===e?"none"==n.css("display"):t)?n.show():n.hide()})},prev:function(t){return i(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return i(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;i(this).empty().append(U(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=U(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,i){var r;return"string"!=typeof t||1 in arguments?this.each(function(e){if(1===this.nodeType)if(M(t))for(n in t)W(this,n,t[n]);else W(this,t,U(this,i,e,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(r=this[0].getAttribute(t))?r:e},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){W(this,t)},this)})},prop:function(t,e){return t=L[t]||t,"string"!=typeof t||1 in arguments?this.each(function(i){if(M(t))for(n in t)this[L[n]||n]=t[n];else this[t]=U(this,e,i,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=L[t]||t,this.each(function(){delete this[t]})},data:function(t,n){var i="data-"+t.replace(v,"-$1").toLowerCase(),r=1 in arguments?this.attr(i,n):this.attr(i);return null!==r?K(r):e},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=U(this,t,e,this.value)})):this[0]&&(this[0].multiple?i(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each(function(t){var n=i(this),r=U(this,e,t,n.offset()),o=n.offsetParent().offset(),s={top:r.top-o.top,left:r.left-o.left};"static"==n.css("position")&&(s.position="relative"),n.css(s)});if(!this.length)return null;if(a.documentElement!==this[0]&&!i.contains(a.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+t.pageXOffset,top:n.top+t.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(t,e){if(arguments.length<2){var r=this[0];if("string"==typeof t){if(!r)return;return r.style[P(t)]||getComputedStyle(r,"").getPropertyValue(t)}if($(t)){if(!r)return;var o={},s=getComputedStyle(r,"");return i.each(t,function(t,e){o[e]=r.style[P(e)]||s.getPropertyValue(e)}),o}}var u="";if("string"==Z(t))e||0===e?u=F(t)+":"+I(t,e):this.each(function(){this.style.removeProperty(F(t))});else for(n in t)t[n]||0===t[n]?u+=F(n)+":"+I(n,t[n])+";":this.each(function(){this.style.removeProperty(F(n))});return this.each(function(){this.style.cssText+=";"+u})},index:function(t){return t?this.indexOf(i(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?o.some.call(this,function(t){return this.test(G(t))},q(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){r=[];var n=G(this),o=U(this,t,e,n);o.split(/\s+/g).forEach(function(t){i(this).hasClass(t)||r.push(t)},this),r.length&&G(this,n+(n?" ":"")+r.join(" "))}}):this},removeClass:function(t){return this.each(function(n){if("className"in this){if(t===e)return G(this,"");r=G(this),U(this,t,n,r).split(/\s+/g).forEach(function(t){r=r.replace(q(t)," ")}),G(this,r.trim())}})},toggleClass:function(t,n){return t?this.each(function(r){var o=i(this),s=U(this,t,r,G(this));s.split(/\s+/g).forEach(function(t){(n===e?!o.hasClass(t):n)?o.addClass(t):o.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var n="scrollTop"in this[0];return t===e?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var n="scrollLeft"in this[0];return t===e?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=g.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(i(t).css("margin-top"))||0,n.left-=parseFloat(i(t).css("margin-left"))||0,r.top+=parseFloat(i(e[0]).css("border-top-width"))||0,r.left+=parseFloat(i(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||a.body;t&&!g.test(t.nodeName)&&"static"==i(t).css("position");)t=t.offsetParent;return t})}},i.fn.detach=i.fn.remove,["width","height"].forEach(function(t){var n=t.replace(/./,function(t){return t[0].toUpperCase()});i.fn[t]=function(r){var o,s=this[0];return r===e?k(s)?s["inner"+n]:D(s)?s.documentElement["scroll"+n]:(o=this.offset())&&o[t]:this.each(function(e){s=i(this),s.css(t,U(this,r,e,s[t]()))})}}),E.forEach(function(n,r){var o=r%2;i.fn[n]=function(){var n,u,s=i.map(arguments,function(t){var r=[];return n=Z(t),"array"==n?(t.forEach(function(t){return t.nodeType!==e?r.push(t):i.zepto.isZ(t)?r=r.concat(t.get()):void(r=r.concat(O.fragment(t)))}),r):"object"==n||null==t?t:O.fragment(t)}),f=this.length>1;return s.length<1?this:this.each(function(e,n){u=o?n:n.parentNode,n=0==r?n.nextSibling:1==r?n.firstChild:2==r?n:null;var c=i.contains(a.documentElement,u);s.forEach(function(e){if(f)e=e.cloneNode(!0);else if(!u)return i(e).remove();u.insertBefore(e,n),c&&Q(e,function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}})})})},i.fn[o?n+"To":"insert"+(r?"Before":"After")]=function(t){return i(t)[n](this),this}}),O.Z.prototype=X.prototype=i.fn,O.uniq=T,O.deserializeValue=K,i.zepto=O,i}();return t.Zepto=e,void 0===t.$&&(t.$=e),function(e){function h(t){return t._zid||(t._zid=n++)}function p(t,e,n,i){if(e=d(e),e.ns)var r=m(e.ns);return(u[h(t)]||[]).filter(function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||r.test(t.ns))&&(!n||h(t.fn)===h(n))&&(!i||t.sel==i)})}function d(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function m(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function g(t,e){return t.del&&!a&&t.e in c||!!e}function v(t){return l[t]||a&&c[t]||t}function y(t,n,r,o,s,f,a){var c=h(t),p=u[c]||(u[c]=[]);n.split(/\s/).forEach(function(n){if("ready"==n)return e(document).ready(r);var u=d(n);u.fn=r,u.sel=s,u.e in l&&(r=function(t){var n=t.relatedTarget;return!n||n!==this&&!e.contains(this,n)?u.fn.apply(this,arguments):void 0}),u.del=f;var c=f||r;u.proxy=function(e){if(e=C(e),!e.isImmediatePropagationStopped()){e.data=o;var n=c.apply(t,e._args==i?[e]:[e].concat(e._args));return n===!1&&(e.preventDefault(),e.stopPropagation()),n}},u.i=p.length,p.push(u),"addEventListener"in t&&t.addEventListener(v(u.e),u.proxy,g(u,a))})}function E(t,e,n,i,r){var o=h(t);(e||"").split(/\s/).forEach(function(e){p(t,e,n,i).forEach(function(e){delete u[o][e.i],"removeEventListener"in t&&t.removeEventListener(v(e.e),e.proxy,g(e,r))})})}function C(t,n){if(n||!t.isDefaultPrevented){n||(n=t),e.each(N,function(e,i){var r=n[e];t[e]=function(){return this[i]=b,r&&r.apply(n,arguments)},t[i]=w});try{t.timeStamp||(t.timeStamp=Date.now())}catch(r){}(n.defaultPrevented!==i?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(t.isDefaultPrevented=b)}return t}function S(t){var e,n={originalEvent:t};for(e in t)x.test(e)||t[e]===i||(n[e]=t[e]);return C(n,t)}var i,n=1,r=Array.prototype.slice,o=e.isFunction,s=function(t){return"string"==typeof t},u={},f={},a="onfocusin"in t,c={focus:"focusin",blur:"focusout"},l={mouseenter:"mouseover",mouseleave:"mouseout"};f.click=f.mousedown=f.mouseup=f.mousemove="MouseEvents",e.event={add:y,remove:E},e.proxy=function(t,n){var i=2 in arguments&&r.call(arguments,2);if(o(t)){var u=function(){return t.apply(n,i?i.concat(r.call(arguments)):arguments)};return u._zid=h(t),u}if(s(n))return i?(i.unshift(t[n],t),e.proxy.apply(null,i)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,i){return this.on(t,e,n,i,1)};var b=function(){return!0},w=function(){return!1},x=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,N={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,n,u,f,a){var c,l,h=this;return t&&!s(t)?(e.each(t,function(t,e){h.on(t,n,u,e,a)}),h):(s(n)||o(f)||f===!1||(f=u,u=n,n=i),(f===i||u===!1)&&(f=u,u=i),f===!1&&(f=w),h.each(function(i,o){a&&(c=function(t){return E(o,t.type,f),f.apply(this,arguments)}),n&&(l=function(t){var i,s=e(t.target).closest(n,o).get(0);return s&&s!==o?(i=e.extend(S(t),{currentTarget:s,liveFired:o}),(c||f).apply(s,[i].concat(r.call(arguments,1)))):void 0}),y(o,t,f,u,n,l||c)}))},e.fn.off=function(t,n,r){var u=this;return t&&!s(t)?(e.each(t,function(t,e){u.off(t,n,e)}),u):(s(n)||o(r)||r===!1||(r=n,n=i),r===!1&&(r=w),u.each(function(){E(this,t,r,n)}))},e.fn.trigger=function(t,n){return t=s(t)||e.isPlainObject(t)?e.Event(t):C(t),t._args=n,this.each(function(){t.type in c&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)})},e.fn.triggerHandler=function(t,n){var i,r;return this.each(function(o,u){i=S(s(t)?e.Event(t):t),i._args=n,i.target=u,e.each(p(u,t.type||t),function(t,e){return r=e.proxy(i),i.isImmediatePropagationStopped()?!1:void 0})}),r},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}}),e.Event=function(t,e){s(t)||(e=t,t=e.type);var n=document.createEvent(f[t]||"Events"),i=!0;if(e)for(var r in e)"bubbles"==r?i=!!e[r]:n[r]=e[r];return n.initEvent(t,i,!0),C(n)}}(e),e});
@@ -0,0 +1,140 @@
1
+ /* Muwu navigation */
2
+
3
+ Muwu.ajax.newDocumentBody = {
4
+ declareRequest: function(targetMetadata) {
5
+ Muwu.activeRequest.documentBody = { xhr: new XMLHttpRequest() };
6
+ Muwu.activeRequest.documentBody.target = targetMetadata;
7
+ Muwu.activeRequest.documentBody.xhr.onreadystatechange = Muwu.ajax.newDocumentBody.onreadystatechange;
8
+ Muwu.activeRequest.documentBody.xhr.responseType = 'document';
9
+ },
10
+
11
+ makeRequest: function() {
12
+ Muwu.activeRequest.documentBody.xhr.open('GET', Muwu.activeRequest.documentBody.target.filename);
13
+ Muwu.activeRequest.documentBody.xhr.send();
14
+ },
15
+
16
+ onreadystatechange: function() {
17
+ if (Muwu.activeRequest.documentBody.xhr.readyState === XMLHttpRequest.DONE) {
18
+ if (Muwu.activeRequest.documentBody.xhr.status === 200) {
19
+ Muwu.ajax.newDocumentBody.performAction();
20
+ } else {
21
+ Muwu.ajax.newDocumentBody.performAction_failure();
22
+ }
23
+ }
24
+ },
25
+
26
+ performAction: function() {
27
+ var newDocumentBody = Muwu.activeRequest.documentBody.xhr.responseXML.body;
28
+ if (newDocumentBody === null) {
29
+ Muwu.ajax.newDocumentBody.performAction_failure();
30
+ } else {
31
+ Muwu.ajax.newDocumentBody.performAction_success(newDocumentBody);
32
+ Muwu.ajax.newDocumentBody.undeclareRequest();
33
+ }
34
+ },
35
+
36
+ performAction_failure: function() {
37
+ console.log('XMLHttpRequest failed. Navigating via `window.location`.');
38
+ window.location = Muwu.activeRequest.documentBody.target.href;
39
+ },
40
+
41
+ performAction_success: function(newDocumentBody) {
42
+ var targetId = Muwu.activeRequest.documentBody.target.id;
43
+ if (typeof targetId === 'string') {
44
+ document.body.replaceWith(newDocumentBody);
45
+ document.getElementById(targetId).scrollIntoView();
46
+ } else if (typeof targetId === 'undefined') {
47
+ document.body.replaceWith(newDocumentBody);
48
+ window.scrollTo(0,0);
49
+ }
50
+ },
51
+
52
+ undeclareRequest: function() {
53
+ Muwu.activeRequest.documentBody = {};
54
+ }
55
+ };
56
+
57
+
58
+ Muwu.helper = {
59
+ parse_anchor: function(anchor) {
60
+ var _hrefMetadata = Muwu.helper.parse_href(anchor.getAttribute('href'));
61
+ var filename = _hrefMetadata.filename;
62
+ var href = _hrefMetadata.href;
63
+ var id = _hrefMetadata.id;
64
+ var protocol = anchor.protocol;
65
+ var result = {
66
+ filename: filename,
67
+ href: href,
68
+ id: id,
69
+ protocol: protocol
70
+ };
71
+ return result;
72
+ },
73
+
74
+ parse_href: function(href) {
75
+ var _re = /(\w+[.]html)?(#{1})?(\w*)?/;
76
+ var _hrefSplit = href.split(_re);
77
+ var filename = _hrefSplit[1];
78
+ var id = _hrefSplit[3];
79
+ var result = {
80
+ filename: filename,
81
+ href: href,
82
+ id: id
83
+ };
84
+ return result;
85
+ }
86
+ };
87
+
88
+
89
+ Muwu.responder.navigateFrom = {
90
+ anchorDocumentLink: function(event) {
91
+ var anchor = event.target;
92
+ var targetMetadata = Muwu.helper.parse_anchor(anchor);
93
+ if (targetMetadata.protocol.match(/^http/)) {
94
+ event.preventDefault();
95
+ if (typeof targetMetadata.filename === 'string') {
96
+ Muwu.responder.navigateTo.url(targetMetadata);
97
+ } else if ((typeof targetMetadata.filename === 'undefined') && (typeof targetMetadata.id ==='string')) {
98
+ Muwu.responder.navigateTo.element(targetMetadata);
99
+ }
100
+ }
101
+ }
102
+ };
103
+
104
+
105
+ Muwu.responder.navigateTo = {
106
+ element: function(targetMetadata) {
107
+ if (targetMetadata.id === 'top') {
108
+ Muwu.responder.navigateTo.windowTop();
109
+ } else {
110
+ Muwu.responder.navigateTo.elementById(targetMetadata);
111
+ }
112
+ },
113
+
114
+ elementById: function(targetMetadata) {
115
+ document.getElementById(targetMetadata.id).scrollIntoView();;
116
+ },
117
+
118
+ url: function(targetMetadata) {
119
+ if (XMLHttpRequest) {
120
+ Muwu.ajax.newDocumentBody.declareRequest(targetMetadata);
121
+ Muwu.ajax.newDocumentBody.makeRequest();
122
+ } else {
123
+ console.log('XMLHttpRequest not available. Navigating via `window.location`.');
124
+ Muwu.responder.navigateTo.windowLocation(targetMetadata);
125
+ }
126
+ },
127
+
128
+ windowLocation: function(targetMetadata) {
129
+ window.location = targetMetadata.href;
130
+ },
131
+
132
+ windowTop: function() {
133
+ window.scrollTo(0,0);
134
+ }
135
+ };
136
+
137
+
138
+ $(document).ready(function() {
139
+ $(document).on('click', '.document_link', function(event) { Muwu.responder.navigateFrom.anchorDocumentLink(event); });
140
+ });
@@ -0,0 +1,369 @@
1
+ module Muwu
2
+ module RenderHtmlPartial
3
+ class Contents
4
+
5
+
6
+ include Muwu
7
+
8
+
9
+ attr_accessor(
10
+ :destination,
11
+ :href_helper,
12
+ :html_attr_id,
13
+ :item_depth_max,
14
+ :project,
15
+ :sections,
16
+ :text_root_name,
17
+ :will_render_section_numbers
18
+ )
19
+
20
+
21
+
22
+ public
23
+
24
+
25
+ def render
26
+ @destination.margin_to_zero
27
+ @destination.padding_vertical(1) do
28
+ write_tag_div_open
29
+ render_contents_heading
30
+ render_contents_element(@sections)
31
+ write_tag_div_close
32
+ end
33
+ @destination.margin_to_zero
34
+ end
35
+
36
+
37
+ def render_contents_element(sections)
38
+ @destination.margin_indent do
39
+ case @will_render_section_numbers
40
+ when false
41
+ render_ol(sections)
42
+ when true
43
+ render_table(sections)
44
+ end
45
+ end
46
+ end
47
+
48
+
49
+ def render_contents_heading
50
+ write_tag_h1_contents_heading
51
+ end
52
+
53
+
54
+ def render_ol(text_item)
55
+ write_tag_ol_open
56
+ @destination.margin_indent do
57
+ text_item.each do |section|
58
+ render_ol_li(section)
59
+ end
60
+ end
61
+ write_tag_ol_close
62
+ end
63
+
64
+
65
+ def render_ol_li(text_item)
66
+ if task_depth_is_within_range(text_item)
67
+ if text_item.is_parent_heading
68
+ write_tag_li_open
69
+ @destination.margin_indent do
70
+ render_ol_li_heading_and_subsections(text_item)
71
+ end
72
+ write_tag_li_close_outline
73
+ elsif text_item.is_not_parent_heading
74
+ write_tag_li_open
75
+ render_ol_li_heading(text_item)
76
+ write_tag_li_close_inline
77
+ end
78
+ end
79
+ end
80
+
81
+
82
+ def render_ol_li_heading(text_item)
83
+ render_tag_a_section_heading(text_item)
84
+ end
85
+
86
+
87
+ def render_ol_li_heading_and_subsections(text_item)
88
+ render_tag_a_section_heading(text_item, trailing_line_feed: true)
89
+ render_ol(text_item.sections)
90
+ end
91
+
92
+
93
+ def render_table(text_item)
94
+ write_tag_table_open
95
+ @destination.margin_indent do
96
+ text_item.each do |section|
97
+ render_table_tr(section)
98
+ end
99
+ end
100
+ write_tag_table_close
101
+ end
102
+
103
+
104
+ def render_table_tr(section)
105
+ if task_depth_is_within_range(section)
106
+ html_id = ['contents', @text_root_name, section.numbering.join('_')].join('_')
107
+ write_tag_tr_open(html_id)
108
+ @destination.margin_indent do
109
+ if section.is_parent_heading
110
+ render_table_tr_td_number(section)
111
+ render_table_tr_td_heading_and_subsections(section)
112
+ elsif section.is_not_parent_heading
113
+ render_table_tr_td_number(section)
114
+ render_table_tr_td_heading(section)
115
+ end
116
+ end
117
+ write_tag_tr_close
118
+ end
119
+ end
120
+
121
+
122
+ def render_table_tr_td_heading(text_item)
123
+ write_tag_td_open(attr_list: "class='heading'")
124
+ render_tag_a_section_heading(text_item)
125
+ write_tag_td_close_inline
126
+ end
127
+
128
+
129
+ def render_table_tr_td_heading_and_subsections(text_item)
130
+ write_tag_td_open(attr_list: "class='heading'")
131
+ render_tag_a_section_heading(text_item, trailing_line_feed: true)
132
+ @destination.margin_indent do
133
+ render_table(text_item.sections)
134
+ end
135
+ write_tag_td_close_outline
136
+ end
137
+
138
+
139
+ def render_table_tr_td_number(text_item)
140
+ write_tag_td_open(attr_list: "class='number'")
141
+ render_tag_a_section_number(text_item, attr_list: "tabindex='-1'")
142
+ write_tag_td_close_inline
143
+ end
144
+
145
+
146
+ def render_tag_a_section_heading(text_item, trailing_line_feed: false)
147
+ href = @href_helper.to_text_item(text_item)
148
+ write_tag_a_open(href)
149
+ write_text_section_heading(text_item)
150
+ write_tag_a_close
151
+ if trailing_line_feed
152
+ write_lf
153
+ end
154
+ end
155
+
156
+
157
+ def render_tag_a_section_number(text_item, attr_list: nil)
158
+ href = @href_helper.to_text_item(text_item)
159
+ write_tag_a_open(href, attr_list: attr_list)
160
+ write_text_section_number(text_item)
161
+ write_tag_a_close
162
+ end
163
+
164
+
165
+ def write_lf
166
+ @destination.write_lf
167
+ end
168
+
169
+
170
+ def write_tag_a_close
171
+ @destination.write_inline tag_a_close
172
+ end
173
+
174
+
175
+ def write_tag_a_open(href_id, attr_list: nil)
176
+ @destination.write_inline tag_a_open(href_id, attr_list: attr_list)
177
+ end
178
+
179
+
180
+ def write_tag_div_close
181
+ @destination.write_line tag_div_close
182
+ end
183
+
184
+
185
+ def write_tag_div_open
186
+ @destination.write_line tag_div_open
187
+ end
188
+
189
+
190
+ def write_tag_h1_contents_heading
191
+ @destination.write_line tag_h1_contents_heading
192
+ end
193
+
194
+
195
+ def write_tag_li_close
196
+ write_tag_li_close_outline
197
+ end
198
+
199
+
200
+ def write_tag_li_close_inline
201
+ @destination.write_inline_end tag_li_close
202
+ end
203
+
204
+
205
+ def write_tag_li_close_outline
206
+ @destination.write_line tag_li_close
207
+ end
208
+
209
+
210
+ def write_tag_li_open
211
+ @destination.write_inline_indented tag_li_open
212
+ end
213
+
214
+
215
+ def write_tag_ol_close
216
+ @destination.write_line tag_ol_close
217
+ end
218
+
219
+
220
+ def write_tag_ol_open
221
+ @destination.write_line tag_ol_open
222
+ end
223
+
224
+
225
+ def write_tag_table_close
226
+ @destination.write_line tag_table_close
227
+ end
228
+
229
+
230
+ def write_tag_table_open
231
+ @destination.write_line tag_table_open
232
+ end
233
+
234
+
235
+ def write_tag_td_close
236
+ write_tag_td_close_outline
237
+ end
238
+
239
+
240
+ def write_tag_td_close_inline
241
+ @destination.write_inline_end tag_td_close
242
+ end
243
+
244
+
245
+ def write_tag_td_close_outline
246
+ @destination.write_line tag_td_close
247
+ end
248
+
249
+
250
+ def write_tag_td_open(attr_list: nil)
251
+ @destination.write_inline_indented tag_td_open(attr_list: attr_list)
252
+ end
253
+
254
+
255
+ def write_tag_tr_close
256
+ @destination.write_line tag_tr_close
257
+ end
258
+
259
+
260
+ def write_tag_tr_open(html_id)
261
+ @destination.write_line tag_tr_open(html_id)
262
+ end
263
+
264
+
265
+ def write_text_section_heading(textobject)
266
+ @destination.write_inline CGI::escape_html(textobject.heading)
267
+ end
268
+
269
+
270
+ def write_text_section_number(textobject)
271
+ @destination.write_inline textobject.numbering.join('.')
272
+ end
273
+
274
+
275
+
276
+ private
277
+
278
+
279
+ def tag_a_close
280
+ "</a>"
281
+ end
282
+
283
+
284
+ def tag_a_open(href_id, attr_list: nil)
285
+ ["<a", "class='document_link'", "href='#{href_id}'", attr_list].compact.join(' ').concat('>')
286
+ end
287
+
288
+
289
+ def tag_div_close
290
+ "</div>"
291
+ end
292
+
293
+
294
+ def tag_div_open
295
+ "<div class='contents' data-text_root_name='#{@text_root_name}' id='#{@html_attr_id}'>"
296
+ end
297
+
298
+
299
+ def tag_h1_contents_heading
300
+ "<h1>Contents</h1>"
301
+ end
302
+
303
+
304
+ def tag_li_close
305
+ "</li>"
306
+ end
307
+
308
+
309
+ def tag_li_open
310
+ "<li>"
311
+ end
312
+
313
+
314
+ def tag_ol_close
315
+ "</ol>"
316
+ end
317
+
318
+
319
+ def tag_ol_open
320
+ "<ol>"
321
+ end
322
+
323
+
324
+ def tag_table_close
325
+ "</table>"
326
+ end
327
+
328
+
329
+ def tag_table_open
330
+ "<table class='document_links'>"
331
+ end
332
+
333
+
334
+ def tag_td_close
335
+ "</td>"
336
+ end
337
+
338
+
339
+ def tag_td_open(attr_list: nil)
340
+ ["<td", attr_list].compact.join(' ').concat('>')
341
+ end
342
+
343
+
344
+ def tag_tr_close
345
+ "</tr>"
346
+ end
347
+
348
+
349
+ def tag_tr_open(html_id)
350
+ "<tr id='#{html_id}'>"
351
+ end
352
+
353
+
354
+ def task_depth_is_within_range(textobject)
355
+ result = nil
356
+ if @item_depth_max == nil
357
+ result = true
358
+ elsif textobject.section_depth <= @item_depth_max
359
+ result = true
360
+ elsif textobject.section_depth > @item_depth_max
361
+ result = false
362
+ end
363
+ result
364
+ end
365
+
366
+
367
+ end
368
+ end
369
+ end