text: !function(s){"use strict";function e(s){return new RegExp("(^|\\s+)"+s+"(\\s+|$)")}function n(s,e){var n=a(s,e)?c:t;n(s,e)}var a,t,c;"classList"in document.documentElement?(a=function(s,e){return s.classList.contains(e)},t=function(s,e){s.classList.add(e)},c=function(s,e){s.classList.remove(e)}):(a=function(s,n){return e(n).test(s.className)},t=function(s,e){a(s,e)||(s.className=s.className+" "+e)},c=function(s,n){s.className=s.className.replace(e(n)," ")});var i={hasClass:a,addClass:t,removeClass:c,toggleClass:n,has:a,add:t,remove:c,toggle:n};"function"==typeof define&&define.amd?define(i):s.classie=i}(window);
  !function(t){function n(n){n.mp_title&&n.mp_title.length>0&&(t("#mp_title").html(n.mp_title),t("title").html(n.mp_title));var e="";t.each(n.states,function(){t.each(this,function(n,i){i.href?(i.target||(i.target="_blank"),e+="<li id='"+n+"'><a class='icon "+i.icon+"' href='"+i.href+"' target='"+i.target+"'>"+i.display+"</a></li>"):e+="<li id='"+n+"'><a class='icon "+i.icon+"' href='#1'>"+i.display+"</a></li>",t("#"+n).on("click",i.click)})}),t(n.toolbarselector).find("ul").append(e),c(e)}function e(n){t.each(n.states,function(){t.each(this,function(e){t("#"+e).on("click",function(){console.log(e+"--click"),i(n,e)})})}),t("#all").click(function(){t.each(n.states,function(){t.each(this,function(n){t("."+n).show()})})})}function i(n,e){t.each(n.states,function(){t.each(this,function(n){t("."+n).hide()})}),t("."+e).show(),t(n.menu_trigger_selector).trigger("click")}function o(n){var e=n.default_state;"all"===e?(t.each(n.states,function(){t.each(this,function(n){t("."+n).show()})}),t(n.menu_trigger_selector).trigger("click")):i(n,e)}function c(n){t.transtool.options.debug===!0&&console.log(n)}t.transtool=function(i){var c=t.extend({},t.transtool.options,i);n(c),e(c),o(c)},t.transtool.options={debug:!1,mp_title:"请配置mp_title",toolbarselector:"#user-toolbar",menu_trigger_selector:"#normal-button",punctuation:".",states:[{zh:{icon:"icon-edit",href:"http://baidu.com",target:"_self",click:function(){alert("zh")}},en:{icon:"icon-user",click:function(){alert("en")}}}]},t.expr[":"].transtool=function(n){return-1!==t(n).text().indexOf("awesome")}}(jQuery);
  !function(e){"use strict";function t(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function i(e,t){if(!e)return!1;for(var i=e.target||e.srcElement||e||!1;i&&i.id!=t;)i=i.parentNode||!1;return i!==!1}function s(e,t,i,l){return l=l||0,e.id.indexOf(t)>=0?l:(classie.has(e,i)&&++l,e.parentNode&&s(e.parentNode,t,i,l))}function l(){var t=!1;return function(e){(/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0)}(navigator.userAgent||navigator.vendor||e.opera),t}function a(e,t){return classie.has(e,t)?e:e.parentNode&&a(e.parentNode,t)}function n(e,i,s){this.el=e,this.trigger=i,this.options=t(this.defaults,s),this.support=Modernizr.csstransforms3d,this.support&&this._init()}n.prototype={defaults:{type:"overlap",levelSpacing:40,backClass:"mp-back"},_init:function(){this.open=!1,this.level=0,this.wrapper=document.getElementById("mp-pusher"),this.levels=Array.prototype.slice.call(this.el.querySelectorAll("div.mp-level"));var e=this;this.levels.forEach(function(t){t.setAttribute("data-level",s(t,e.el.id,"mp-level"))}),this.menuItems=Array.prototype.slice.call(this.el.querySelectorAll("li")),this.levelBack=Array.prototype.slice.call(this.el.querySelectorAll("."+this.options.backClass)),this.eventtype=l()?"touchstart":"click",classie.add(this.el,"mp-"+this.options.type),this._initEvents()},_initEvents:function(){var e=this,t=function(i){e._resetMenu(),i.removeEventListener(e.eventtype,t)};this.trigger.addEventListener(this.eventtype,function(s){s.stopPropagation(),s.preventDefault(),e.open?e._resetMenu():(e._openMenu(),document.addEventListener(e.eventtype,function(s){e.open&&!i(s.target,e.el.id)&&t(this)}))}),this.menuItems.forEach(function(t){var i=t.querySelector("div.mp-level");i&&t.querySelector("a").addEventListener(e.eventtype,function(s){s.preventDefault();var l=a(t,"mp-level").getAttribute("data-level");e.level<=l&&(s.stopPropagation(),classie.add(a(t,"mp-level"),"mp-level-overlay"),e._openMenu(i))})}),this.levels.forEach(function(t){t.addEventListener(e.eventtype,function(i){i.stopPropagation();var s=t.getAttribute("data-level");e.level>s&&(e.level=s,e._closeMenu())})}),this.levelBack.forEach(function(t){t.addEventListener(e.eventtype,function(i){i.preventDefault();var s=a(t,"mp-level").getAttribute("data-level");e.level<=s&&(i.stopPropagation(),e.level=a(t,"mp-level").getAttribute("data-level")-1,0===e.level?e._resetMenu():e._closeMenu())})})},_openMenu:function(e){++this.level;var t=(this.level-1)*this.options.levelSpacing,i="overlap"===this.options.type?this.el.offsetWidth+t:this.el.offsetWidth;if(this._setTransform("translate3d("+i+"px,0,0)"),e){this._setTransform("",e);for(var s=0,l=this.levels.length;l>s;++s){var a=this.levels[s];a==e||classie.has(a,"mp-level-open")||this._setTransform("translate3d(-100%,0,0) translate3d("+-1*t+"px,0,0)",a)}}1===this.level&&(classie.add(this.wrapper,"mp-pushed"),this.open=!0),classie.add(e||this.levels[0],"mp-level-open")},_resetMenu:function(){this._setTransform("translate3d(0,0,0)"),this.level=0,classie.remove(this.wrapper,"mp-pushed"),this._toggleLevels(),this.open=!1},_closeMenu:function(){var e="overlap"===this.options.type?this.el.offsetWidth+(this.level-1)*this.options.levelSpacing:this.el.offsetWidth;this._setTransform("translate3d("+e+"px,0,0)"),this._toggleLevels()},_setTransform:function(e,t){t=t||this.wrapper,t.style.WebkitTransform=e,t.style.MozTransform=e,t.style.transform=e},_toggleLevels:function(){for(var e=0,t=this.levels.length;t>e;++e){var i=this.levels[e];i.getAttribute("data-level")>=this.level+1?(classie.remove(i,"mp-level-open"),classie.remove(i,"mp-level-overlay")):Number(i.getAttribute("data-level"))==this.level&&classie.remove(i,"mp-level-overlay")}}},e.mlPushMenu=n}(window);
  function encode_id_with_array(e,t){for(var o=0,r=0;r<t.length;r++)o+=factor(e,t.length-r,t[r]);return o}function get_parent_id_with_array(e,t){for(var o=[],r=0;r<t.length;r++)o.push(t[r]);o.pop();for(var n=0,r=0;r<o.length;r++)n+=factor(e,o.length-r,o[r]);return n}function factor(opts,count,current){if(1==count)return current;for(var str="",i=count-1;i>0;i--)str+=current*opts.step+"*";return eval(str+"1")}!function(e){function t(t){e(t.documment_selector).find(":header").each(function(){var o=parseInt(this.nodeName.substring(1),10);r(t,this,o),n(t,e(this))})}function o(t){var o=e(t._zTree);o=e.fn.zTree.init(o,t.ztreeSetting,t._header_nodes).expandAll(t.is_expand_all),1==t.is_posion_top?(t.ztreeStyle.top="0px",t.ztreeStyle.hasOwnProperty("bottom")&&delete t.ztreeStyle.bottom):(t.ztreeStyle.bottom="0px",t.ztreeStyle.hasOwnProperty("top")&&delete t.ztreeStyle.top),e(t._zTree).css(t.ztreeStyle)}function r(t,o,r){if(t._headers.length==r)t._headers[r-1]++;else if(t._headers.length>r)t._headers=t._headers.slice(0,r),t._headers[r-1]++;else if(t._headers.length<r)for(var n=0;n<r-t._headers.length;n++)t._headers.push(1);1==t.is_auto_number&&(-1!=e(o).text().indexOf(t._headers.join("."))||e(o).text(t._headers.join(".")+". "+e(o).text()))}function n(t,o){var r=encode_id_with_array(t,t._headers),n=get_parent_id_with_array(t,t._headers);e(o).attr("id",r),i(e(o).text()),t._header_offsets.push(e(o).offset().top-t.highlight_offset),i("h offset ="+(e(o).offset().top-t.highlight_offset)),t._header_nodes.push({id:r,pId:n,name:e(o).text()||"null",open:!0,url:"#"+r,target:"_self"})}function s(t){var o,r=function(){o&&clearTimeout(o),o=setTimeout(function(){var o=e(t.scroll_selector).scrollTop();t.debug&&console.log("top="+o);for(var r=0,n=t._header_offsets.length;n>r;r++)if(t._header_offsets[r]>=o+5){console.log("opts._header_offsets["+r+"] = "+t._header_offsets[r]),e("a").removeClass("curSelectedNode");{e("#tree_"+(r+1)+"_a").addClass("curSelectedNode")}break}},t.refresh_scroll_time)};t.highlight_on_scroll&&(e(t.scroll_selector).bind("scroll",r),r())}function l(t){t.highlight_offset=e(t.documment_selector).offset().top}function i(e){}e.fn.ztree_toc=function(r){var n=e.extend({},e.fn.ztree_toc.defaults,r);return this.each(function(){n._zTree=e(this),l(n),t(n),o(n),s(n)})},e.fn.ztree_toc.defaults={_zTree:null,_headers:[],_header_offsets:[],_header_nodes:[{id:1,pId:0,name:"Table of Content",open:!0}],debug:!0,scroll_selector:"window",highlight_offset:0,highlight_on_scroll:!0,refresh_scroll_time:50,documment_selector:"body",is_posion_top:!0,is_auto_number:!1,is_expand_all:!0,is_highlight_selected_line:!0,step:100,ztreeStyle:{width:"260px",overflow:"auto",position:"fixed","z-index":2147483647,border:"0px none",left:"0px",bottom:"0px"},ztreeSetting:{view:{dblClickExpand:!1,showLine:!0,showIcon:!1,selectedMulti:!1},data:{simpleData:{enable:!0,idKey:"id",pIdKey:"pId"}},callback:{beforeClick:function(t,o){e("a").removeClass("curSelectedNode"),1==o.id&&console.log("click root table of content"),1==e.fn.ztree_toc.defaults.is_highlight_selected_line&&e("#"+o.id).css("color","red").fadeOut("slow",function(){e(this).show().css("color","black")})},onRightClick:function(e,t,o){1==o.id&&console.log("right_click root table of content")}}}}}(jQuery);