-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain-es2015.6b3911653b0ff936a386.js
1 lines (1 loc) · 12.9 KB
/
main-es2015.6b3911653b0ff936a386.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(t,e,o){t.exports=o("2v48")},"2v48":function(t,e,o){"use strict";o.r(e);var i=o("ENSU"),n=o("kZht"),s=o("Vhhf"),l=o("6uGs"),r=o("uryd"),a=o("P0vk"),u=o("aJOL"),d=o("FxgA"),c=o("b5Xb"),h=o("1VvW"),m=o("8EXQ");let p=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=n.Gb({type:t,selectors:[["app-root"]],decls:32,vars:0,consts:[[1,"dashboard"],["mode","side","opened","",1,"dashboard__menu"],[1,"title"],["src","assets/img/angular.svg","alt","angular",1,"logo"],["routerLink","/",1,"logo-title"],[1,"menu"],[1,"menu__item"],["routerLink","samples/guide"],[1,"dashboard__content"]],template:function(t,e){1&t&&(n.Rb(0,"mat-drawer-container",0),n.qc(1,"\n "),n.Rb(2,"mat-drawer",1),n.qc(3,"\n "),n.Rb(4,"mat-toolbar",2),n.qc(5,"\n "),n.Nb(6,"img",3),n.qc(7,"\n "),n.Rb(8,"a",4),n.qc(9,"@angular-ru/tooltip"),n.Qb(),n.qc(10,"\n "),n.Qb(),n.qc(11,"\n\n "),n.Rb(12,"mat-list",5),n.qc(13,"\n "),n.Rb(14,"mat-list-item",6),n.qc(15,"\n "),n.Rb(16,"a",7),n.qc(17,"- "),n.Rb(18,"strong"),n.qc(19,"Guide overview"),n.Qb(),n.Qb(),n.qc(20,"\n "),n.Qb(),n.qc(21,"\n "),n.Nb(22,"mat-divider"),n.qc(23,"\n "),n.Qb(),n.qc(24,"\n "),n.Qb(),n.qc(25,"\n\n "),n.Rb(26,"mat-drawer-content",8),n.qc(27,"\n "),n.Nb(28,"router-outlet"),n.qc(29,"\n "),n.Qb(),n.qc(30,"\n"),n.Qb(),n.qc(31,"\n"))},directives:[a.b,a.a,u.a,h.a,r.a,r.b,m.a,a.c,h.c],encapsulation:2,changeDetection:0}),t})(),f=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=n.Kb({type:t}),t.\u0275inj=n.Jb({imports:[[h.b.forRoot([{path:"",pathMatch:"full",redirectTo:"samples"},{path:"samples",children:[{path:"",pathMatch:"full",redirectTo:"guide"},{path:"guide",loadChildren:()=>o.e(6).then(o.bind(null,"G7lC")).then(t=>t.GuideModule)}]}],{useHash:!0,scrollPositionRestoration:"enabled"})],h.b]}),t})();o("JM6N");let v=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=n.Kb({type:t,bootstrap:[p]}),t.\u0275inj=n.Jb({imports:[[i.a,l.b,f,d.b,a.d,u.b,r.c,c.a.forRoot()]]}),t})();Object(s.f)(!0)&&Object(n.U)(),i.c().bootstrapModule(v,{ngZoneEventCoalescing:!0}).catch(t=>console.error(t))},"9FoD":function(t,e,o){"use strict";function i(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}function n(t){return"string"==typeof t}o.d(e,"a",function(){return i}),o.d(e,"b",function(){return n}),o("Vhhf")},GoXd:function(t,e,o){"use strict";o.d(e,"a",function(){return l});var i=o("9FoD"),n=o("kZht"),s=o("aDqW");let l=(()=>{class t{constructor(t){this.translate=t}instant(t){return Object(i.b)(t)?this.translate.instant(t):t}}return t.\u0275fac=function(e){return new(e||t)(n.Vb(s.a))},t.\u0275prov=n.Ib({token:t,factory:t.\u0275fac}),t})()},JM6N:function(t,e,o){"use strict";o.d(e,"a",function(){return u});var i=o("An66"),n=o("X2rR"),s=o("QeIy"),l=o("ztO2"),r=o("xNRp"),a=o("kZht");let u=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[{provide:r.a,useValue:Object.assign(Object.assign({},l.a),e)},{provide:r.b,useClass:n.a}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=a.Kb({type:t}),t.\u0275inj=a.Jb({providers:[s.a],imports:[[i.b]]}),t})()},M1Zg:function(t,e,o){"use strict";o.d(e,"a",function(){return u});var i=o("kZht"),n=o("9FoD"),s=o("Vhhf"),l=o("KTx3"),r=o("QeIy"),a=o("xNRp");let u=(()=>{class t{constructor(t,e,o,i,s,l){this.el=t,this.renderer=e,this.ngZone=o,this.options=i,this.interceptor=s,this.domLeak=l,this.placement="top",this.localCssStyle=null,this.size="small",this.uid=Object(n.a)(),this.delta=2,this.layoutMinDuration=100,this.tooltipDomElement=null,this.timeoutId=null,this.frameId=null,this.createLayoutId=null,this.hideId=null,this.mouseLeaveTooltipId=null,this.tooltipMouseenter=null,this.tooltipMouseleave=null,this.handlerOptions={passive:!0},this.internalTooltipValue=null,this.internalContext=null,this.addUidToElement(),this.connectMouseEvents()}set context(t){this.internalContext=t,this.refreshTooltipContent()}set tooltip(t){this.internalTooltipValue=t,this.refreshTooltipContent()}get offsetElementHeight(){var t,e;return null!==(e=null===(t=this.tooltipDomElement)||void 0===t?void 0:t.clientHeight)&&void 0!==e?e:0}get offsetElementWidth(){var t,e;return null!==(e=null===(t=this.tooltipDomElement)||void 0===t?void 0:t.clientWidth)&&void 0!==e?e:0}static getScrollPos(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}onMouseenterHandler(){this.tooltipDisabled||(this.domLeak.invalidationOfIrrelevantNodes(),this.showTooltip())}onMouseleaveHandler(){this.tooltipDisabled||(this.destroyAllTimeouts(),this.hideTooltip())}ngOnDestroy(){this.disconnectMouseEvents(),this.destroyAllTimeouts(),this.removeOldNodes()}showTooltip(){this.destroyAllTimeouts(),Object(s.e)(this.tooltipDomElement)?this.addTooltipShowClass():this.addTooltipToBodyWithAnimation()}hideTooltip(){this.ngZone.runOutsideAngular(()=>{window.clearTimeout(this.hideId),this.hideId=window.setTimeout(()=>{this.removeTooltipShowClass(),this.timeoutId=window.setTimeout(()=>this.removeOldNodes(),this.options.durationAfterDestroy)},this.layoutMinDuration)})}addTooltipElementToBody(){this.tooltipDomElement=this.createTooltipElement(),Object(s.e)(this.tooltipDomElement)&&(this.renderer.appendChild(document.body,this.tooltipDomElement),this.renderer.setAttribute(this.tooltipDomElement,"id",this.uid),this.renderer.addClass(this.tooltipDomElement,"ng-tooltip"),this.renderer.addClass(this.tooltipDomElement,`ng-tooltip-${this.placement}`),this.renderer.addClass(this.tooltipDomElement,`ng-tooltip-${this.size}`))}setPosition(){var e;const o=this.el.nativeElement.getBoundingClientRect(),i=null===(e=this.tooltipDomElement)||void 0===e?void 0:e.getBoundingClientRect(),n=t.getScrollPos();if("top"===this.placement){const{top:t,left:e}=this.calculateByTop(o,i);this.setStyle(t,e,n)}else if("bottom"===this.placement){const{top:t,left:e}=this.calculateByBottom(o,i);this.setStyle(t,e,n)}else if("left"===this.placement){const{top:t,left:e}=this.calculateByLeft(o,i);this.setStyle(t,e,n)}else if("right"===this.placement){const{top:t,left:e}=this.calculateByRight(o,i);this.setStyle(t,e,n)}}addTooltipToBodyWithAnimation(){this.ngZone.runOutsideAngular(()=>{this.frameId=window.setTimeout(()=>{this.addTooltipElementToBody(),Object(s.e)(this.tooltipDomElement)&&(this.tooltipListenOnHoverEvent(),this.createLayoutId=window.setTimeout(()=>{this.setPosition(),this.addTooltipShowClass(),this.markElementAddInDom()},this.layoutMinDuration))},this.options.durationBeforeCreate)})}refreshTooltipContent(){if(Object(s.e)(this.tooltipDomElement)){const t=this.createTooltipContent();if(Object(s.e)(t)){const e=this.tooltipDomElement.children;for(const t of Array.from(e))this.renderer.removeChild(this.tooltipDomElement,t);this.renderer.appendChild(this.tooltipDomElement,t)}}}markElementAddInDom(){Object(s.e)(this.tooltipDomElement)&&this.domLeak.actualContainsInDomUidCollections.add(this.uid)}markElementRemoveFromDom(){Object(s.c)(this.tooltipDomElement)&&this.domLeak.actualContainsInDomUidCollections.delete(this.uid)}connectMouseEvents(){this.ngZone.runOutsideAngular(()=>{this.el.nativeElement.addEventListener("mouseenter",()=>this.onMouseenterHandler(),this.handlerOptions),this.el.nativeElement.addEventListener("mouseleave",()=>this.onMouseleaveHandler(),this.handlerOptions)})}disconnectMouseEvents(){this.el.nativeElement.removeEventListener("mouseenter",()=>this.onMouseenterHandler(),this.handlerOptions),this.el.nativeElement.removeEventListener("mouseleave",()=>this.onMouseleaveHandler(),this.handlerOptions)}addUidToElement(){this.el.nativeElement.setAttribute("data-tooltip-uid",this.uid)}addTooltipShowClass(){Object(s.e)(this.tooltipDomElement)&&this.renderer.addClass(this.tooltipDomElement,"ng-tooltip-show")}removeTooltipShowClass(){Object(s.e)(this.tooltipDomElement)&&this.renderer.removeClass(this.tooltipDomElement,"ng-tooltip-show")}tooltipListenOnHoverEvent(){var t,e;window.clearTimeout(this.mouseLeaveTooltipId),Object(s.e)(this.tooltipDomElement)&&(null===(t=this.tooltipMouseenter)||void 0===t||t.unsubscribe(),null===(e=this.tooltipMouseleave)||void 0===e||e.unsubscribe(),this.tooltipMouseenter=Object(l.a)(this.tooltipDomElement,"mouseenter").subscribe(()=>{window.clearTimeout(this.hideId),window.clearTimeout(this.mouseLeaveTooltipId)}),this.tooltipMouseleave=Object(l.a)(this.tooltipDomElement,"mouseleave").subscribe(()=>{window.clearTimeout(this.mouseLeaveTooltipId),this.mouseLeaveTooltipId=window.setTimeout(()=>this.hideTooltip(),this.options.timeoutForWaitAfterBlurTooltip)}))}createTooltipContent(){var t,e,o,n,l;const r=document.createElement("div");if(this.internalTooltipValue instanceof i.M){const t=this.internalTooltipValue.createEmbeddedView({$implicit:this.internalContext});t.detectChanges(),r.append(...t.rootNodes)}else{if(Object(s.b)(this.internalTooltipValue))return null;if(Object(s.e)(this.internalTooltipValue)){const i=null===(t=this.internalTooltipValue)||void 0===t?void 0:t.toString();r.innerHTML=null!==(n=null===(o=(e=this.interceptor).instant)||void 0===o?void 0:o.call(e,i))&&void 0!==n?n:i}}return r.style.cssText=null!==(l=this.localCssStyle)&&void 0!==l?l:this.options.cssStyle,r}createTooltipElement(){const t=this.createTooltipContent();if(Object(s.e)(t)){const e=this.renderer.createElement("div");return this.renderer.appendChild(e,t),e}return null}destroyAllTimeouts(){window.clearTimeout(this.frameId),window.clearTimeout(this.createLayoutId),window.clearTimeout(this.mouseLeaveTooltipId),window.clearTimeout(this.timeoutId),window.clearTimeout(this.hideId)}removeOldNodes(){if(Object(s.e)(this.tooltipDomElement)){const t=document.getElementById(this.uid);null==t||t.remove(),this.tooltipDomElement=null}this.markElementRemoveFromDom()}setStyle(t,e,o){this.renderer.setStyle(this.tooltipDomElement,"top",`${t+o}px`),this.renderer.setStyle(this.tooltipDomElement,"left",`${e}px`)}calculateByTop(t,e){var o;return{top:t.top-this.offsetElementHeight,left:t.left+(t.width-(null!==(o=null==e?void 0:e.width)&&void 0!==o?o:0))/this.delta}}calculateByBottom(t,e){var o;return{top:t.bottom,left:t.left+(t.width-(null!==(o=null==e?void 0:e.width)&&void 0!==o?o:0))/this.delta}}calculateByLeft(t,e){var o;return{top:t.top+(t.height-(null!==(o=null==e?void 0:e.height)&&void 0!==o?o:0))/this.delta,left:t.left-this.offsetElementWidth}}calculateByRight(t,e){var o;return{top:t.top+(t.height-(null!==(o=null==e?void 0:e.height)&&void 0!==o?o:0))/this.delta,left:t.right}}}return t.\u0275fac=function(e){return new(e||t)(i.Mb(i.l),i.Mb(i.F),i.Mb(i.A),i.Mb(a.a),i.Mb(a.b),i.Mb(r.a))},t.\u0275dir=i.Hb({type:t,selectors:[["","tooltip",""]],inputs:{tooltipDisabled:["tooltip-disabled","tooltipDisabled"],placement:["tooltip-placement","placement"],localCssStyle:["tooltip-css-style","localCssStyle"],size:["tooltip-size","size"],context:["tooltip-context","context"],tooltip:"tooltip"}}),t})()},QeIy:function(t,e,o){"use strict";o.d(e,"a",function(){return l});var i=o("ZTXN"),n=o("mWib"),s=o("kZht");let l=(()=>{class t{constructor(){this.actualContainsInDomUidCollections=new Set,this.domMemoryLeakTicker$=new i.a,this.timeoutCheck=500,this.domMemoryLeakTicker$.pipe(Object(n.a)(this.timeoutCheck)).subscribe(()=>{Array.from(new Set(this.actualContainsInDomUidCollections)).forEach(t=>{var e;!document.querySelector(`[data-tooltip-uid="${t}"]`)&&(null===(e=document.getElementById(t))||void 0===e||e.remove())})})}invalidationOfIrrelevantNodes(){this.domMemoryLeakTicker$.next()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=s.Ib({token:t,factory:t.\u0275fac}),t})()},Vhhf:function(t,e,o){"use strict";function i(t){return t}function n(t){const e="string"==typeof t?t.trim():t;return[void 0,null,NaN,"",1/0].includes(e)}function s(t){return!0===t}function l(t){return null==t}function r(t){return!l(t)}function a(t){return!function(t){return Boolean(t)}(t)}o.d(e,"a",function(){return i}),o.d(e,"b",function(){return n}),o.d(e,"c",function(){return a}),o.d(e,"d",function(){return l}),o.d(e,"e",function(){return r}),o.d(e,"f",function(){return s})},X2rR:function(t,e,o){"use strict";o.d(e,"a",function(){return n});var i=o("kZht");let n=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Ib({token:t,factory:t.\u0275fac}),t})()},b5Xb:function(t,e,o){"use strict";o("GoXd"),o("X2rR"),o("M1Zg");var i=o("JM6N");o.d(e,"a",function(){return i.a}),o("ztO2"),o("xNRp")},xNRp:function(t,e,o){"use strict";o.d(e,"b",function(){return n}),o.d(e,"a",function(){return s});var i=o("kZht");const n=new i.r("TOOLTIP_TEXT_INTERCEPTOR_TOKEN"),s=new i.r("TOOLTIP_OPTIONS_TOKEN")},zn8P:function(t,e){function o(t){return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e})}o.keys=function(){return[]},o.resolve=o,t.exports=o,o.id="zn8P"},ztO2:function(t,e,o){"use strict";o.d(e,"a",function(){return i}),o("GoXd"),o("xNRp");const i={cssStyle:"",durationBeforeCreate:200,durationAfterDestroy:1500,timeoutForWaitAfterBlurTooltip:400}}},[[0,0,5]]]);