-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtoc-toc-module-ngfactory.acb527f1b95892a4c7d5.js
2 lines (2 loc) · 6.45 KB
/
toc-toc-module-ngfactory.acb527f1b95892a4c7d5.js
1
2
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{s8K4:function(n,l,t){"use strict";t.r(l);var e=t("CcnG"),u=t("K9Ia"),i=t("dzgT"),o=t("KQya"),a=t("ny24"),c=t("mrSG"),r=t("6blF"),s=t("/21U"),d=function(n){function l(l,t,e){void 0===t&&(t=0),void 0===e&&(e=o.a);var u=n.call(this)||this;return u.source=l,u.delayTime=t,u.scheduler=e,(!Object(s.a)(t)||t<0)&&(u.delayTime=0),e&&"function"==typeof e.schedule||(u.scheduler=o.a),u}return c.b(l,n),l.create=function(n,t,e){return void 0===t&&(t=0),void 0===e&&(e=o.a),new l(n,t,e)},l.dispatch=function(n){return this.add(n.source.subscribe(n.subscriber))},l.prototype._subscribe=function(n){return this.scheduler.schedule(l.dispatch,this.delayTime,{source:this.source,subscriber:n})},l}(r.a),p=function(){function n(n,l){this.scheduler=n,this.delay=l}return n.prototype.call=function(n,l){return new d(l,this.delay,this.scheduler).subscribe(n)},n}(),f=t("p0Sj"),b=function(){function n(n,l,t){this.scrollService=n,this.tocService=t,this.activeIndex=null,this.type="None",this.isCollapsed=!0,this.isEmbedded=!1,this.onDestroy=new u.a,this.primaryMax=4,this.isEmbedded=-1!==l.nativeElement.className.indexOf("embedded")}return n.prototype.ngOnInit=function(){var n=this;this.tocService.tocList.pipe(Object(a.a)(this.onDestroy)).subscribe(function(l){n.tocList=l;var t,e=(t=function(n){return"h1"!==n.level},n.tocList.reduce(function(n,l){return t(l)?n+1:n},0));n.type=e>0?n.isEmbedded?e>n.primaryMax?"EmbeddedExpandable":"EmbeddedSimple":"Floating":"None"})},n.prototype.ngAfterViewInit=function(){var n,l,t=this;this.isEmbedded||Object(i.a)(this.tocService.activeItemIndex.pipe((n=o.a,void 0===l&&(l=0),function(t){return t.lift(new p(n,l))})),this.items.changes.pipe(Object(f.a)(this.items))).pipe(Object(a.a)(this.onDestroy)).subscribe(function(n){var l=n[0],e=n[1];if(t.activeIndex=l,!(null===l||l>=e.length)){var u=e.toArray()[l].nativeElement,i=u.offsetParent,o=u.getBoundingClientRect(),a=i.getBoundingClientRect();o.top>=a.top&&o.bottom<=a.bottom||(i.scrollTop+=o.top-a.top-i.clientHeight/2)}})},n.prototype.ngOnDestroy=function(){this.onDestroy.next()},n.prototype.toggle=function(n){void 0===n&&(n=!0),this.isCollapsed=!this.isCollapsed,n&&this.isCollapsed&&this.toTop()},n.prototype.toTop=function(){this.scrollService.scrollToTop()},n}(),m=function(){return function(){this.customElementComponent=b}}(),h=t("Mr+X"),v=t("SMsm"),g=t("Ip0R"),y=t("Faly"),x=t("TNhP"),O=e.Ma({encapsulation:2,styles:[],data:{}});function I(n){return e.eb(0,[(n()(),e.Oa(0,0,null,null,1,"div",[["class","toc-heading embedded"]],null,null,null,null,null)),(n()(),e.cb(-1,null,[" \u76ee\u5f55 "]))],null,null)}function E(n){return e.eb(0,[(n()(),e.Oa(0,0,null,null,3,"button",[["aria-label","Expand/collapse contents"],["class","toc-heading embedded secondary"],["title","Expand/collapse contents"],["type","button"]],[[1,"aria-pressed",0]],[[null,"click"]],function(n,l,t){var e=!0;return"click"===l&&(e=!1!==n.component.toggle(!1)&&e),e},null,null)),(n()(),e.cb(-1,null,[" \u76ee\u5f55 "])),(n()(),e.Oa(2,0,null,null,1,"mat-icon",[["class","rotating-icon mat-icon"],["role","img"],["svgIcon","keyboard_arrow_right"]],[[2,"collapsed",null],[2,"mat-icon-inline",null]],null,null,h.b,h.a)),e.Na(3,638976,null,0,v.b,[e.k,v.d,[8,null]],{svgIcon:[0,"svgIcon"]},null)],function(n,l){n(l,3,0,"keyboard_arrow_right")},function(n,l){var t=l.component;n(l,0,0,!t.isCollapsed),n(l,2,0,t.isCollapsed,e.Xa(l,3).inline)})}function F(n){return e.eb(0,[(n()(),e.Oa(0,0,[[1,0],["tocItem",1]],null,1,"li",[],[[8,"title",0],[8,"className",0],[2,"secondary",null],[2,"active",null]],null,null,null,null)),(n()(),e.Oa(1,0,null,null,0,"a",[],[[8,"href",4],[8,"innerHTML",1]],null,null,null,null))],null,function(n,l){var t=l.component;n(l,0,0,e.Qa(1,"",l.parent.context.$implicit.title,""),e.Qa(1,"",l.parent.context.$implicit.level,""),"EmbeddedExpandable"===t.type&&l.parent.context.index>=t.primaryMax,l.parent.context.index===t.activeIndex),n(l,1,0,l.parent.context.$implicit.href,l.parent.context.$implicit.content)})}function N(n){return e.eb(0,[(n()(),e.Oa(0,0,null,null,2,null,null,null,null,null,null,null)),(n()(),e.Fa(16777216,null,null,1,null,F)),e.Na(2,16384,null,0,g.k,[e.O,e.L],{ngIf:[0,"ngIf"]},null),(n()(),e.Fa(0,null,null,0))],function(n,l){n(l,2,0,"Floating"===l.component.type||"h1"!==l.context.$implicit.level)},null)}function k(n){return e.eb(0,[(n()(),e.Oa(0,0,null,null,0,"button",[["aria-label","Expand/collapse contents"],["class","toc-more-items embedded material-icons"],["title","Expand/collapse contents"],["type","button"]],[[2,"collapsed",null],[1,"aria-pressed",0]],[[null,"click"]],function(n,l,t){var e=!0;return"click"===l&&(e=!1!==n.component.toggle()&&e),e},null,null))],null,function(n,l){var t=l.component;n(l,0,0,t.isCollapsed,!t.isCollapsed)})}function w(n){return e.eb(0,[(n()(),e.Oa(0,0,null,null,9,"div",[["class","toc-inner no-print"]],[[2,"collapsed",null]],null,null,null,null)),(n()(),e.Fa(16777216,null,null,1,null,I)),e.Na(2,16384,null,0,g.k,[e.O,e.L],{ngIf:[0,"ngIf"]},null),(n()(),e.Fa(16777216,null,null,1,null,E)),e.Na(4,16384,null,0,g.k,[e.O,e.L],{ngIf:[0,"ngIf"]},null),(n()(),e.Oa(5,0,null,null,2,"ul",[["class","toc-list"]],[[2,"embedded",null]],null,null,null,null)),(n()(),e.Fa(16777216,null,null,1,null,N)),e.Na(7,802816,null,0,g.j,[e.O,e.L,e.q],{ngForOf:[0,"ngForOf"]},null),(n()(),e.Fa(16777216,null,null,1,null,k)),e.Na(9,16384,null,0,g.k,[e.O,e.L],{ngIf:[0,"ngIf"]},null)],function(n,l){var t=l.component;n(l,2,0,"EmbeddedSimple"===t.type),n(l,4,0,"EmbeddedExpandable"===t.type),n(l,7,0,t.tocList),n(l,9,0,"EmbeddedExpandable"===t.type)},function(n,l){var t=l.component;n(l,0,0,t.isCollapsed),n(l,5,0,"Floating"!==t.type)})}function C(n){return e.eb(0,[e.ab(671088640,1,{items:1}),(n()(),e.Fa(16777216,null,null,1,null,w)),e.Na(2,16384,null,0,g.k,[e.O,e.L],{ngIf:[0,"ngIf"]},null)],function(n,l){n(l,2,0,"None"!==l.component.type)},null)}var L=e.Ka("aio-toc",b,function(n){return e.eb(0,[(n()(),e.Oa(0,0,null,null,1,"aio-toc",[],null,null,null,C,O)),e.Na(1,4440064,null,0,b,[y.a,e.k,x.a],null,null)],function(n,l){n(l,1,0)},null)},{},{},[]),T=t("t/Na"),j=t("ZYjt"),S=t("Fzqc"),V=t("Wf4p");t.d(l,"TocModuleNgFactory",function(){return M});var M=e.La(m,[],function(n){return e.Ua([e.Va(512,e.j,e.Aa,[[8,[L]],[3,e.j],e.v]),e.Va(4608,g.m,g.l,[e.s,[2,g.v]]),e.Va(5120,v.d,v.a,[[3,v.d],[2,T.c],j.c,[2,g.d]]),e.Va(1073742336,g.c,g.c,[]),e.Va(1073742336,S.a,S.a,[]),e.Va(1073742336,V.e,V.e,[[2,V.c]]),e.Va(1073742336,v.c,v.c,[]),e.Va(1073742336,m,m,[])])})}}]);
//# sourceMappingURL=toc-toc-module-ngfactory.acb527f1b95892a4c7d5.js.map