"use strict";var fixedtoc=function(s){var t,e={init:function(){fixedtocOption.scrollDuration=500,fixedtocOption.fadeTriggerDuration=5e3,fixedtocOption.scrollOffset=o(fixedtocOption.scrollOffset),fixedtocOption.fixedOffsetX=o(fixedtocOption.fixedOffsetX),fixedtocOption.fixedOffsetY=o(fixedtocOption.fixedOffsetY),fixedtocOption.contentsFixedHeight=o(fixedtocOption.contentsFixedHeight),fixedtocOption.contentsWidthInPost=o(fixedtocOption.contentsWidthInPost),fixedtocOption.contentsHeightInPost=o(fixedtocOption.contentsHeightInPost),fixedtocOption.triggerBorderWidth=t(fixedtocOption.triggerBorder),fixedtocOption.contentsBorderWidth=t(fixedtocOption.contentsBorder),fixedtocOption.triggerSize=o(fixedtocOption.triggerSize)},set:i,update:function(t,e,n){i(t,e,n)},remove:function(t){void 0!==fixedtocOption[t]&&delete fixedtocOption[t]}};function i(t,e,n){fixedtocOption[t]="int"==n?o(e):"float"==n?parseFloat(e)||0:e}var r,n={inWidgetProp:void 0,showAdminbar:function(){return fixedtocOption.showAdminbar},isQuickMin:function(){return fixedtocOption.isQuickMin},isEscMin:function(){return fixedtocOption.isEscMin},isEnterMax:function(){return fixedtocOption.isEnterMax},isNestedList:function(){return fixedtocOption.isNestedList},isColExpList:function(){return fixedtocOption.isColExpList},showColExpIcon:function(){return fixedtocOption.showColExpIcon},isAccordionList:function(){return fixedtocOption.isAccordionList},showTargetHint:function(){return!0},supportInPost:function(){return fixedtocOption.inPost},inWidget:function(){return!!fixedtocOption.inWidget&&(void 0===this.inWidgetProp&&(this.inWidgetProp=!!s("#ftwp-widget-container").length),this.inWidgetProp)},fixedWidget:function(){return!!this.inWidget()&&fixedtocOption.fixedWidget},isAutoHeightFixedToPost:function(){return 0==fixedtocOption.contentsFixedHeight},isFloat:function(){return"none"!=fixedtocOption.contentsFloatInPost},isAutoHeightInPost:function(){return 0==fixedtocOption.contentsHeightInPost},isPositionAtFixed:function(t){return-1!=fixedtocOption.fixedPosition.indexOf(t)},isDebug:function(){return 1==fixedtocOption.debug},isNotBlur:function(){var t=navigator.userAgent.toLowerCase();return-1<t.indexOf("android")||-1<t.indexOf("firefox")},isMobile:function(){return w.data.window.width<=o(fixedtocOption.mobileMaxWidth)},isClickableHeader:function(){return 1==fixedtocOption.isClickableHeader},isColExpInitMobile:function(){return 1==fixedtocOption.contentsColexpInitMobile}};function o(t){return parseInt(t)||0}function c(t){if(!t.length)return 0;var e=0;return t.each(function(){var t=s(this);"fixed"==t.css("position")&&(e+=o(t.outerHeight()))}),e}function a(t){t.preventDefault()}function d(t){return o(t-2*fixedtocOption.contentsBorderWidth)}function f(t){n.isDebug()&&console.log(t)}var u,p,g,l,h,x,w=(g={set:function(){var t;n.isAutoHeightInPost()||fixedtocOption.contentsColexpInit?(r.container.css("position","static"),t=r.containerOuter.outerHeight(),r.container.css("position","")):t=fixedtocOption.contentsHeightInPost,r.containerOuter.css("height",t+"px"),p.containerOuterHeight=t},update:function(){function t(){r.containerOuter.css("height","auto"),r.contents.css("height","auto"),J.setAuto(),p.containerOuterHeight=r.containerOuter.outerHeight()}D.location.inPost&&(n.isAutoHeightInPost()||"collapse"==r.contents.data("colexp")?t():(r.containerOuter.css("height",fixedtocOption.contentsHeightInPost+"px"),r.contents.css("height",fixedtocOption.contentsHeightInPost+"px"),J.set(d(fixedtocOption.contentsHeightInPost)),p.containerOuterHeight=r.containerOuter.outerHeight()))}},l={set:E,updateOnResize:function(){E()},updateHeight:function(){p.ftocRectInWidget.height=u()}},{data:p={},ftocRectInWidget:l,createOnInit:function(){v(),m(),C(),fixedtocOption.fixedMenu&&T(),I(),W(),n.supportInPost()&&(g.set(),R()),b(),A(),H(),n.inWidget()&&M(),n.fixedWidget()&&(z(),l.set()),P(),f(this.data)},updateOnResize:function(){v(),m(),C(),fixedtocOption.fixedMenu&&T(),I(),W(),n.supportInPost()&&(g.update(),R()),b(),A(),H(),n.inWidget()&&M(),n.fixedWidget()&&(z(),l.updateOnResize()),P(),f(p)},updateOnScroll:function(){m(),fixedtocOption.fixedMenu&&(void 0===h&&(h=p.fixedMenuHeight),T(),h!==p.fixedMenuHeight&&(I(),W(),n.supportInPost()&&R(),b(),A(),H(),n.inWidget()&&M(),n.fixedWidget()&&(z(),l.updateOnResize()),P(),h=p.fixedMenuHeight,f(p)))},updateInPost:function(){g.update(),R(),b(),P(),A(),H()},updateOnDocumentHeightChange:function(){O(),p.document.height!=x&&(fixedtoc.reload(),x=p.document.height)},setDocumentHeight:O});function m(){p.scrollTop=r.window.scrollTop()}function v(){p.window={},p.window.width=window.innerWidth,p.window.height=window.innerHeight}function O(){p.document={},p.document.height=Math.round(r.document.height())}function C(){p.adminbarHeight=n.showAdminbar()?c(s("#wpadminbar")):0}function T(){p.fixedMenuHeight=c(s(fixedtocOption.fixedMenu))}function I(){fixedtocOption.fixedMenu?p.fixedHeight=p.adminbarHeight+p.fixedMenuHeight:p.fixedHeight=p.adminbarHeight}function W(){p.fixedOffsetTop=p.fixedHeight+fixedtocOption.fixedOffsetY}function b(){p.headingOffset=p.fixedHeight+fixedtocOption.scrollOffset}function P(){p.headingsTop=[],s.each(r.anchors,function(){var t=s(s(this).attr("href")),t=t.length?o(t.offset().top-p.headingOffset):NaN;isNaN(t)||p.headingsTop.push({headingTop:t,anchorEle:s(this)})})}function A(){p.postRect={};var t=r.postContent.offset(),e=r.postContent.outerWidth(),n=r.postContent.outerHeight();p.postRect.left=t.left,p.postRect.top=t.top,p.postRect.width=e,p.postRect.right=p.postRect.left+p.postRect.width,p.postRect.bottom=n+p.postRect.top,p.postRect.height=p.postRect.bottom-p.postRect.top}function H(){p.ftocRangeY={},n.supportInPost()?p.ftocRangeY.top=p.inPostRangeY.bottom:p.ftocRangeY.top=p.postRect.top-p.fixedHeight,"document-bottom"===fixedtocOption.disappearPoint?p.ftocRangeY.bottom=Math.round(r.document.height()):p.ftocRangeY.bottom=p.postRect.bottom-p.window.height}function R(){p.inPostRangeY={},p.inPostRangeY.top=0,p.inPostRangeY.bottom=r.containerOuter.offset().top+p.containerOuterHeight-p.fixedHeight}function M(){p.inWidgetMinWidth=p.postRect.width+r.widgetContainer.outerWidth()}function z(){p.fixedWidgetRangeY={},p.fixedWidgetRangeY.top=r.widgetContainer.offset().top-p.fixedHeight,p.fixedWidgetRangeY.bottom=p.ftocRangeY.bottom}function E(){p.ftocRectInWidget={left:r.widgetContainer.offset().left,top:p.fixedHeight,width:r.widgetContainer.outerWidth(),height:u()}}var _={fixedWidget:function(){return!!n.fixedWidget()&&(!!y()&&(w.data.fixedWidgetRangeY.top<=w.data.scrollTop&&w.data.fixedWidgetRangeY.bottom>w.data.scrollTop))},inWidget:y,inPost:function(){return!!n.supportInPost()&&w.data.inPostRangeY.bottom>w.data.scrollTop},fixedToPost:function(){return w.data.ftocRangeY.top<=w.data.scrollTop&&w.data.ftocRangeY.bottom>w.data.scrollTop}};function y(){return n.inWidget()&&!n.isMobile()}var k,F,D={location:k={fixedWidget:!(u=function(){var t;return"collapse"==r.contents.data("colexp")?(r.contents.css("height","auto"),t=r.contents.outerHeight(),r.contents.css("height","")):t=window.innerHeight-p.fixedHeight,t}),inWidget:!(t=function(t){switch(t){case"thin":return 1;case"medium":return 2;case"bold":return 5;default:return 0}}),inPost:!(F=["common","hidden","fixedToPost","inPost","inWidget","fixedWidget"]),fixedToPost:!1,hidden:!1},register:function(t,e){-1!=s.inArray(t,F)?(void 0!==e._construct&&r.container.on("ftoc_"+t,e._construct),"common"!=t&&void 0!==e._destruct&&r.container.on("_ftoc_"+t,e._destruct)):f("Not support this event: "+t)},updateOnResize:function(){Y("resize")},updateOnScroll:function(){Y("scroll")},init:function(){r.container.trigger("ftoc_common"),Y("init")}};function Y(o){function t(t){for(var e=F.length,n={location:t,eventType:o},i=1;i<e;i++)t!=F[i]&&r.container.trigger("_ftoc_"+F[i],n);r.container.trigger("ftoc_"+t,n)}function e(t){for(var e=1,n=F.length;e<n;e++)void 0!==t&&t==F[e]?k[t]=!0:k[F[e]]=!1}_.fixedWidget()?k.fixedWidget||(e("fixedWidget"),t("fixedWidget"),f(k)):_.inWidget()?k.inWidget||(e("inWidget"),t("inWidget"),f(k)):_.inPost()?k.inPost||(e("inPost"),t("inPost"),f(k)):_.fixedToPost()?k.fixedToPost||(e("fixedToPost"),t("fixedToPost"),f(k)):k.hidden||(e("hidden"),t("hidden"),f(k))}var S,L,N,B,Q,X,j,q,G,J={set:function(t){t=void 0!==t?t:r.contents.height();r.list.css("height",t-r.header.outerHeight()+"px")},setAuto:function(){r.list.css("height","auto")},unset:function(){r.list.css("height","")}};n.isColExpList()&&(L=function(t,e){var n=void 0===e?s(this):e,e=n.parent(".ftwp-has-sub");e.length&&(n.hasClass("ftwp-anchor")?j(e,n.prev("button")):B(e,n))},N=function(t,e){var n=void 0===e?s(this):e,e=n.parent(".ftwp-item");e.length&&(n.hasClass("ftwp-anchor")?Q(e,n.prev("button")):(B(e,n),q(e)))},B=function(t,e){t.hasClass("ftwp-collapse")?j(t,e):t.hasClass("ftwp-expand")&&X(t,e)},Q=function(t,e){q(t),t.hasClass("ftwp-has-sub")&&j(t,e)},X=function(t,e){t.removeClass("ftwp-expand").addClass("ftwp-collapse"),e.length&&e.removeClass("ftwp-icon-expand").addClass("ftwp-icon-collapse")},j=function(t,e){t.removeClass("ftwp-collapse").addClass("ftwp-expand"),e.length&&e.removeClass("ftwp-icon-collapse").addClass("ftwp-icon-expand")},q=function(e){r.hasSubItems.each(function(){var t=s(this);t.get(0)!=e.get(0)&&(t.find(e).length||X(t,t.children("button")))})},G=function(t){n.isAccordionList()&&q(t.parent(".ftwp-item"));t=t.parents(".ftwp-has-sub");t&&t.each(function(){var t=s(this),e=t.children("button");j(t,e)})},S={_construct:function(){n.showColExpIcon()&&n.isAccordionList()?(r.colExpIcons.on("click",N),r.container.on("ftocAfterScrollToTarget",N)):n.showColExpIcon()?(r.colExpIcons.on("click",L),r.container.on("ftocAfterScrollToTarget",L)):r.container.on("ftocAfterScrollToTarget",N),n.showColExpIcon()&&r.colExpIcons.on("mousedown",a),r.container.on("ftocAfterTargetIndicated",function(t,e){G(e)}),f("Activated colExpSubList().")}});var K,U,V,Z,$,tt,et,nt,it,ot,ct,st,rt,at,dt,ft,ut,pt,gt,lt,ht,xt,wt,mt,vt,Ot,Ct,Tt=(U=!1,V=function(t){var n,e=t.attr("href"),i=s(e),o=t.data("index"),c=w.data.headingsTop[o];void 0!==c&&(n=c.headingTop,c=e.substr(1),r.headings.removeClass("ftwp-heading-target"),i.attr("id","").addClass("ftwp-heading-target"),window.location.hash=e,i.attr("id",c),s("html, body").animate({scrollTop:n},{duration:fixedtocOption.scrollDuration,start:function(){U=!0}}).promise().then(function(){U=!1;var e=w.data.headingsTop[o].headingTop;n!=e&&s("html, body").animate({scrollTop:e},100,function(){var t=w.data.headingsTop[o].headingTop;e!=t&&s("html, body").animate({scrollTop:t},1,function(){})}),Z(t),r.container.trigger("ftocAfterScrollToTarget",[t,n])}))},{_construct:function(){r.anchors.on("click",function(t){t.preventDefault();t=s(t.currentTarget);V(t)}),r.anchors.on("mousedown",a),f("Activated scrollToTarget().")},activeCurrent:Z=function(t){$(),(K=t).addClass("ftwp-active"),(D.location.fixedToPost||D.location.fixedWidget)&&(t.is(":focus")||U||t.trigger("focus")),!n.showColExpIcon()||(t=t.prev()).length&&t.addClass("ftwp-active")},deactivateAll:function(){K=void 0,r.anchors.removeClass("ftwp-active").trigger("blur"),n.showColExpIcon()&&r.colExpIcons.removeClass("ftwp-active")},deactivatePrev:$=function(){var t;K&&(K.removeClass("ftwp-active").trigger("blur"),!n.showColExpIcon()||(t=K.prev()).length&&t.removeClass("ftwp-active"))}}),It=(nt=function(){var e=w.data.headingsTop,n=w.data.scrollTop;return e[0].headingTop>n||w.data.ftocRangeY.bottom<n?(void 0!==tt&&Tt.deactivateAll(),void(tt=void 0)):void 0!==et&&et!=w.data.document.height?(t(),void f("Fixed target indicator!!")):void(void 0!==tt&&tt[0].headingTop<=n&&tt[1].headingTop>n||t());function t(){s.each(e,function(t){return void 0===e[t+1]&&this.headingTop<=w.data.ftocRangeY.bottom?(tt=[this,e[t],t],et=w.data.document.height,Tt.activeCurrent(this.anchorEle),r.container.trigger("ftocAfterTargetIndicated",[this.anchorEle,n]),!1):this.headingTop<=n&&e[t+1].headingTop>n?(tt=[this,e[t+1],t],void 0===w.data.document&&w.setDocumentHeight(),et=w.data.document.height,Tt.activeCurrent(this.anchorEle),r.container.trigger("ftocAfterTargetIndicated",[this.anchorEle,n]),!1):void 0})}},{_construct:function(){r.window.on("ftocScroll",nt).on("ftocResize",nt),f("Actived targetIndicator().")},start:function(){r.window.on("ftocScroll",nt).on("ftocResize",nt)},stop:function(){r.window.off("ftocScroll",nt).off("ftocResize",nt)}}),Wt=(it=function(){ot()},ot=function(){r.list.on("scroll",st),r.list.on("mouseleave",rt),r.document.on("click",at),r.window.on("scroll",rt)},ct=function(){r.body.removeClass("ftwp-no-scroll"),r.list.off("scroll",st),r.list.off("mouseleave",rt),r.document.off("click",at),r.window.off("scroll",rt)},st=function(){r.body.addClass("ftwp-no-scroll")},rt=function(){r.body.hasClass("ftwp-no-scroll")&&(r.list.off("scroll",st),r.body.removeClass("ftwp-no-scroll"),setTimeout(function(){r.list.on("scroll",st)},100))},at=function(t){s.contains(r.list.get(0),t.target)||rt()},{_construct:function(){r.container.addClass("ftwp-hidden-state"),f("Actived hideToc().")},_destruct:function(){r.container.removeClass("ftwp-hidden-state"),f("Deactivated hideToc().")}}),bt=(pt=function(){r.container.addClass("ftwp-fixed-to-post"),r.container.parent().is(r.body)||r.container.appendTo(r.body),r.minIcon.addClass("ftwp-icon-minimize"),n.isMobile()&&r.container.hasClass("ftwp-maximize")&&r.container.removeClass("ftwp-maximize").addClass("ftwp-minimize")},gt=function(){r.container.removeClass("ftwp-fixed-to-post"),r.minIcon.removeClass("ftwp-icon-minimize")},dt=function(t,e,n){Pt(t,n)?(t.css({left:"0px",right:"auto"}),Ct.reverseTransformOrigin(t)):t.css({right:e+"px",left:"auto"})},ft=function(t,e,n){Pt(t,n)?(t.css({right:"0px",left:"auto"}),Ct.reverseTransformOrigin(t)):t.css({left:e+"px",right:"auto"})},ut=function(){n.isPositionAtFixed("top")?(r.trigger.css("top",w.data.fixedOffsetTop+"px"),r.contents.css("top",w.data.fixedOffsetTop+"px")):n.isPositionAtFixed("middle")?r.contents.css("top",w.data.fixedHeight+"px"):(r.trigger.css("top",""),r.contents.css("top",""))},lt={set:function(){var t,e;Ct.setTransformOrigin(),n.isPositionAtFixed("left")?(t=w.data.window.width-w.data.postRect.left+fixedtocOption.fixedOffsetX,e=w.data.postRect.left-fixedtocOption.fixedOffsetX,dt(r.trigger,t,e),dt(r.contents,t,e)):(t=w.data.postRect.right+fixedtocOption.fixedOffsetX,e=w.data.window.width-t,ft(r.trigger,t,e),ft(r.contents,t,e)),ut(),xt.reset()},unset:function(){r.trigger.css({left:"",right:"",top:""}),r.contents.css({left:"",right:"",top:""}),Ct.removeTransformOrigin()}},ht=function(){var t;return n.isAutoHeightFixedToPost()?n.isColExpList()?t=window.innerHeight:(J.setAuto(),r.contents.css("height","auto"),t=r.contents.outerHeight(),At(),J.unset()):t=fixedtocOption.contentsFixedHeight,t},xt={reset:function(){var t=ht(),e=n.isPositionAtFixed("middle")?w.data.window.height-w.data.fixedHeight:w.data.window.height-w.data.fixedOffsetTop,t=e<t?e:t;r.contents.css("height",t+"px");t=d(t);J.set(t)},unset:At},vt="ftwp-animate-"+fixedtocOption.inOutEffect+"-in",Ot="ftwp-animate-"+fixedtocOption.inOutEffect+"-inOut",{_construct:function(){pt(),lt.set(),r.window.on("ftocResize",lt.set),Ct.in(),r.container.on("ftocAfterMinMax",Ct.inOut),f("Actived ftocInOut().")},_destruct:function(){gt(),lt.unset(),r.window.off("ftocResize",lt.set),xt.unset(),J.unset(),Ct.out(),r.container.off("ftocAfterMinMax",Ct.inOut),f("Deactivated ftocInOut().")},effectInCls:(Ct={inCls:vt,in:function(){r.container.addClass(vt)},inOut:function(){r.container.removeClass(vt+" "+Ot),r.container.offsetWidth,r.container.addClass(Ot),setTimeout(function(){r.container.removeClass(Ot)},1e3)},out:function(){r.container.removeClass(vt+" "+Ot)},setTransformOrigin:function(){var t,e=fixedtocOption.fixedPosition.match(/(\w+)-(\w+)/i);e&&(t=e[2],e=e[1],"left"==t?t="right":"right"==t&&(t="left"),wt="ftwp-transform-"+t+"-"+(e="middle"==e?"center":e),r.trigger.removeClass(mt).addClass(wt),r.contents.removeClass(mt).addClass(wt))},reverseTransformOrigin:function(t){mt=wt.match(/left/i)?wt.replace("left","right"):wt.replace("right","left"),t.removeClass(wt).addClass(mt)},removeTransformOrigin:function(){r.trigger.removeClass(wt+" "+mt),r.contents.removeClass(wt+" "+mt)}}).inCls});function Pt(t,e){return e<=t.outerWidth()}function At(){r.contents.css("height","")}var Ht,Rt,Mt,zt,Et,_t,yt,kt,Ft,Dt,Yt,St,Lt,Nt,Bt,Qt,Xt,jt,qt,Gt,Jt,Kt,Ut,Vt,Zt,$t,te,ee,ne,ie,oe,ce,se,re,ae,de,fe,ue,pe,ge,le,he,xe,we,me,ve,Oe,Ce,Te,Ie,We,be,Pe,Ae,He,Re,Me=(Ht=function(){r.container.removeClass("ftwp-minimize").addClass("ftwp-maximize"),r.container.trigger("ftocAfterMinMax"),r.container.trigger("ftocAfterMaximize"),f("Maximized FTOC.")},Mt=function(t){"touchstart"==t.type&&768<w.data.window.width||r.container.hasClass("ftwp-maximize")&&!s.contains(r.container.get(0),t.target)&&Rt()},zt=function(t){r.container.hasClass("ftwp-maximize")&&27==t.keyCode&&Rt()},Et=function(t){r.container.hasClass("ftwp-minimize")&&13==t.keyCode&&Ht()},{_construct:function(){var t=n.isClickableHeader()?r.header:r.minIcon;r.trigger.on("click",Ht),t.on("click",Rt),r.trigger.on("mousedown",a),t.on("mousedown",a),n.isQuickMin()&&r.document.on("click touchstart",Mt),n.isEscMin()&&r.document.on("keyup",zt),n.isEnterMax()&&r.document.on("keyup",Et),f("Actived minMaxFtoc().")},_destruct:function(){var t=n.isClickableHeader()?r.header:r.minIcon;r.trigger.off("click",Ht),t.off("click",Rt),r.trigger.off("mousedown",a),t.off("mousedown",a),n.isQuickMin()&&r.document.off("click",Mt),n.isEscMin()&&r.document.off("keyup",zt),n.isEnterMax()&&r.document.off("keyup",Et),f("Deactivated minMaxFtoc.")},isMax:function(){return!!r.container.hasClass("ftwp-maximize")},isMin:function(){return!!r.container.hasClass("ftwp-minimize")},minimize:Rt=function(){r.container.removeClass("ftwp-maximize").addClass("ftwp-minimize"),r.container.trigger("ftocAfterMinMax"),r.container.trigger("ftocAfterMinimize"),f("Minimized FTOC.")}}),ze=(yt="ftwp-fade-trigger",kt="ftwp-unfade-trigger",Yt=function(){void 0!==_t&&(clearTimeout(_t),r.trigger.removeClass(yt).addClass(kt))},St=function(){void 0!==_t&&(Dt(),Ft())},Lt=function(){Yt()},Nt=function(){St()},{_construct:function(){r.container.hasClass("ftwp-minimize")&&Ft(),r.trigger.on("mouseenter",Yt).on("mouseleave",St),r.container.on("ftocAfterMinimize",Ft).on("ftocAfterMaximize",Dt),f("Actived fadeTrigger().")},_destruct:function(){Dt(),r.trigger.off("mouseenter",Lt),r.trigger.off("mouseleave",Nt),r.container.off("ftocAfterMinimize",Ft),r.container.off("ftocAfterMaximize",Dt),f("Deactivated fadeTrigger().")},stop:Dt=function(){void 0!==_t&&(clearTimeout(_t),_t=void 0,r.trigger.removeClass(yt+" "+kt))},start:Ft=function(){void 0===_t&&(setTimeout(function(){r.container.removeClass(bt.effectInCls)},500),_t=setTimeout(function(){r.trigger.addClass(yt)},fixedtocOption.fadeTriggerDuration))},restart:St,mouseLeave:Nt}),Ee={start:function(t){n.isNotBlur()||t&&t.length&&t.removeClass("ftwp-unblur").addClass("ftwp-blur")},stop:function(t){t&&t.length&&t.hasClass("ftwp-blur")&&(t.removeClass("ftwp-blur").addClass("ftwp-unblur"),setTimeout(function(){t.removeClass("ftwp-unblur")},500))},clear:function(t){t&&t.length&&t.removeClass("ftwp-blur ftwp-unblur")}},_e=(Qt=function(){Bt=r.container.siblings(':not("script, style")'),Me.isMax()&&Kt()&&Ee.start(Bt)},Xt=function(){Me.isMax()&&Kt()?Ee.start(Bt):Ee.stop(Bt)},jt=function(){Kt()&&Ee.start(Bt)},qt=function(){Ee.stop(Bt)},Gt=function(t,e){Kt()&&r.container.hasClass("ftwp-maximize")&&(Me.minimize(),Ee.stop(Bt),e.trigger("blur"))},Jt=function(){Ee.clear(Bt)},Kt=function(){return.6*r.window.width()<=r.contents.outerWidth()},{_construct:function(){Qt(),r.window.on("ftocResize",Xt),r.container.on("ftocAfterMaximize",jt),r.container.on("ftocAfterMinimize",qt),r.container.on("ftocAfterScrollToTarget",Gt),f("Actived blurBody().")},_destruct:function(){Jt(),r.window.off("ftocResize",Xt),r.container.off("ftocAfterMaximize",jt),r.container.off("ftocAfterMinimize",qt),r.container.off("ftocAfterScrollToTarget",Gt),f("Deactivated blurBody().")}});n.fixedWidget()&&(Zt=function(){"expand"==r.contents.data("colexp")&&Ee.start(Vt)},$t=function(){Ee.start(Vt)},te=function(){Ee.stop(Vt)},ee=function(){Ee.clear(Vt)},Ut={_construct:function(){Vt=r.widget.siblings(".widget"),Zt(),r.contents.on("ftocAfterExpandContents",$t),r.contents.on("ftocAfterCollapseContents",te),f("Actived blurWidgets().")},_destruct:function(){ee(),r.contents.off("ftocAfterExpandContents",$t),r.contents.off("ftocAfterCollapseContents",te),f("Deactivated blurWidgets().")}}),(n.inWidget()||n.supportInPost())&&(ce=!0,se=function(){n.isMobile()&&ce?(console.log(n.isColExpInitMobile()),n.isColExpInitMobile()?fe(0,oe):ue(0,ie),Ye.reload()):de()?ue(0,ie):fe(0,oe),ce=!1},re=function(){r.list.show(0),r.minIcon.removeClass("ftwp-icon-collapse ftwp-icon-expand")},ae=function(t){de()?fe(100,oe,t):ue(100,ie,t)},de=function(){var t=r.contents.data("colexp");return"expand"==t||void 0===t},fe=function(t,e,n){r.list.hide(t,function(){r.minIcon.removeClass("ftwp-icon-expand").addClass("ftwp-icon-collapse"),void 0!==e&&e(n)}),r.contents.data("colexp","collapse"),r.contents.trigger("ftocAfterCollapseContents"),f("Collapsed contents.")},ue=function(t,e,n){r.list.show(t,function(){r.minIcon.removeClass("ftwp-icon-collapse").addClass("ftwp-icon-expand"),void 0!==e&&e(n)}),r.contents.data("colexp","expand"),r.contents.trigger("ftocAfterExpandContents"),f("Expanded contents.")},ne={construct:function(t,e){ie=t,oe=e,se();e=n.isClickableHeader()?r.header:r.minIcon;e.on("mousedown",a),e.on("click",ae)},destruct:function(){re();var t=n.isClickableHeader()?r.header:r.minIcon;t.off("mousedown",a),t.off("click",ae)}}),n.inWidget()&&(pe={_construct:function(){ne.construct(),f("Actived colExpConentsInWidget().")},_destruct:function(){ne.destruct(),f("Deactivated colExpConentsInWidget().")}}),n.fixedWidget()&&(le=function(){w.ftocRectInWidget.updateHeight(),me.setFixed()},he=function(){w.ftocRectInWidget.updateHeight(),me.setFixed()},ge={_construct:function(){ne.construct(le,he),f("Actived colExpConentsInFixedWidget().")},_destruct:function(){ne.destruct(),f("Deactivated colExpConentsInFixedWidget().")}}),n.inWidget()&&(xe={_construct:function(){we(),f("Actived displayInWidget().")},_destruct:function(){r.contents.css("height",""),f("Deactivated displayInWidget().")},init:we=function(){r.container.parent().is(r.widgetContainer)||r.container.appendTo(r.widgetContainer),r.contents.css("height","auto")}}),n.fixedWidget()&&(ve=function(){xe.init()},Ce=function(){r.widget.removeClass("ftwp-widget-fixed"),r.contents.css({left:"",top:"",width:"",height:""})},me={_construct:function(){ve(),Oe(),r.window.on("ftocResize",Oe),f("Actived fixedInWidget().")},_destruct:function(){ve(),Ce(),r.window.off("ftocResize",Oe),J.unset(),f("Deactivated fixedInWidget().")},setFixed:Oe=function(){r.widget.addClass("ftwp-widget-fixed");var t=w.data.ftocRectInWidget;r.contents.css({left:t.left,top:t.top,width:t.width+"px",height:t.height+"px"});t=d(t.height);J.set(t)}}),n.supportInPost()&&(Ae=function(){r.container.parent().is(r.containerOuter)||r.container.appendTo(r.containerOuter),Re()},He=function(){r.contents.css("height",""),J.unset()},Re=function(){var t;0==fixedtocOption.contentsWidthInPost&&n.isFloat()?(r.containerOuter.css("width",""),Pe=r.containerOuter.outerWidth(),r.containerOuter.css("width",Pe+"px")):r.containerOuter.css("width",""),n.isAutoHeightInPost()?(r.containerOuter.css("height","auto"),r.contents.css("height","auto"),J.setAuto()):(r.containerOuter.css("height",w.data.containerOuterHeight+"px"),r.contents.css("height",w.data.containerOuterHeight+"px"),t=d(w.data.containerOuterHeight),J.set(t))},Te={_construct:function(){Ae(),r.window.on("ftocResize",Re),f("Actived displayInPost().")},_destruct:function(){var t;He(),r.window.off("ftocResize",Re),n.isAutoHeightInPost()&&(t=r.containerOuter.height(),r.containerOuter.css("height",t+"px")),f("Deactivated displayInPost().")}},We=function(t){be(t)},be=function(t){void 0!==t&&"click"==t.type&&w.updateInPost()},Ie={_construct:function(){ne.construct(We,be),f("Actived colExpConentsInFixedWidget().")},_destruct:function(){ne.destruct(),f("Deactivated colExpConentsInFixedWidget().")}});var ye,ke,Fe,De,Ye=(ye=function(){w.createOnInit(),n.isColExpList()&&D.register("common",S),D.register("common",Tt),D.register("common",It),D.register("hidden",Wt),n.fixedWidget()&&(D.register("fixedWidget",ge),D.register("fixedWidget",me),D.register("fixedWidget",Ut)),n.inWidget()&&(D.register("inWidget",xe),D.register("inWidget",pe)),n.supportInPost()&&(D.register("inPost",Te),D.register("inPost",Ie)),D.register("fixedToPost",bt),D.register("fixedToPost",Me),D.register("fixedToPost",ze),D.register("fixedToPost",_e),D.init(),r.window.on("resize",ke),r.window.on("scroll",Fe)},ke=function(){w.updateOnResize(),D.updateOnResize(),r.window.trigger("ftocResize")},Fe=function(){w.updateOnDocumentHeightChange(),w.updateOnScroll(),D.updateOnScroll(),r.window.trigger("ftocScroll")},{option:e,onReady:function(){e.init(),(r={window:s(window),document:s(document),body:s("body"),container:s("#ftwp-container"),trigger:s("#ftwp-trigger"),contents:s("#ftwp-contents"),header:s("#ftwp-header"),minIcon:s("#ftwp-header-minimize"),list:s("#ftwp-list"),postContent:s(fixedtocOption.postContentSelector),headings:s(".ftwp-heading")}).anchors=r.list.find(".ftwp-anchor").not(".ftwp-otherpage-anchor"),n.isNestedList()&&(r.hasSubItems=r.list.find(".ftwp-has-sub")),n.showColExpIcon()&&(r.colExpIcons=r.list.find(".ftwp-icon-expand, .ftwp-icon-collapse")),n.inWidget()&&(r.widget=s(".ftwp-widget"),r.widgetContainer=s("#ftwp-widget-container")),n.supportInPost()&&(r.containerOuter=s("#ftwp-container-outer")),f(r),r.anchors.each(function(t){s(this).data("index",t)}),r.container.trigger("ftocReady"),ye(),setTimeout(De,100),f(fixedtocOption)},reload:De=function(){f(fixedtocOption),w.updateOnResize(),D.updateOnResize(),r.window.trigger("ftocResize")}});return s(document).ready(Ye.onReady),s(document).on("load",n.reload),{option:Ye.option,reload:Ye.reload}}(jQuery);
;