fossasia/loklak_search

View on GitHub
3.83c8d9007443d24f366f.js

Summary

Maintainability
A
0 mins
Test Coverage
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{M2Lx:function(t,e,i){"use strict";i.d(e,"c",function(){return c}),i.d(e,"b",function(){return l}),i.d(e,"a",function(){return u}),i.d(e,"d",function(){return h});var n=i("n6gG"),o=i("CcnG"),r=i("6blF"),s=i("K9Ia"),a=i("Gi3i"),c=function(){function t(){}return t.prototype.create=function(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)},t.ngInjectableDef=Object(o.defineInjectable)({factory:function(){return new t},token:t,providedIn:"root"}),t}(),l=function(){function t(t){this._mutationObserverFactory=t,this._observedElements=new Map}return t.prototype.ngOnDestroy=function(){var t=this;this._observedElements.forEach(function(e,i){return t._cleanupObserver(i)})},t.prototype.observe=function(t){var e=this;return r.a.create(function(i){var n=e._observeElement(t).subscribe(i);return function(){n.unsubscribe(),e._unobserveElement(t)}})},t.prototype._observeElement=function(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{var e=new s.a,i=this._mutationObserverFactory.create(function(t){return e.next(t)});i&&i.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:i,stream:e,count:1})}return this._observedElements.get(t).stream},t.prototype._unobserveElement=function(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))},t.prototype._cleanupObserver=function(t){if(this._observedElements.has(t)){var e=this._observedElements.get(t),i=e.observer,n=e.stream;i&&i.disconnect(),n.complete(),this._observedElements.delete(t)}},t.ngInjectableDef=Object(o.defineInjectable)({factory:function(){return new t(Object(o.inject)(c))},token:t,providedIn:"root"}),t}(),u=function(){function t(t,e,i){this._contentObserver=t,this._elementRef=e,this._ngZone=i,this.event=new o.EventEmitter,this._disabled=!1,this._currentSubscription=null}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=Object(n.b)(t),this._disabled?this._unsubscribe():this._subscribe()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"debounce",{get:function(){return this._debounce},set:function(t){this._debounce=Object(n.d)(t),this._subscribe()},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){this._currentSubscription||this.disabled||this._subscribe()},t.prototype.ngOnDestroy=function(){this._unsubscribe()},t.prototype._subscribe=function(){var t=this;this._unsubscribe();var e=this._contentObserver.observe(this._elementRef.nativeElement);this._ngZone.runOutsideAngular(function(){t._currentSubscription=(t.debounce?e.pipe(Object(a.a)(t.debounce)):e).subscribe(t.event)})},t.prototype._unsubscribe=function(){this._currentSubscription&&this._currentSubscription.unsubscribe()},t}(),h=function(){}},NcP4:function(t,e,i){"use strict";i.d(e,"a",function(){return l});var n=i("CcnG"),o=i("v9Dh"),r=i("Ip0R"),s=(i("M2Lx"),i("eDkP"),i("Fzqc"),i("dWZg"),i("lLAP"),i("4c35"),i("qAlS"),i("Wf4p"),i("vGXY")),a=n["\u0275crt"]({encapsulation:2,styles:[".mat-tooltip-panel{pointer-events:none!important}.mat-tooltip{color:#fff;border-radius:2px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}@media screen and (-ms-high-contrast:active){.mat-tooltip{outline:solid 1px}}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}"],data:{animation:[{type:7,name:"state",definitions:[{type:0,name:"initial, void, hidden",styles:{type:6,styles:{transform:"scale(0)"},offset:null},options:void 0},{type:0,name:"visible",styles:{type:6,styles:{transform:"scale(1)"},offset:null},options:void 0},{type:1,expr:"* => visible",animation:{type:4,styles:null,timings:"150ms cubic-bezier(0.0, 0.0, 0.2, 1)"},options:null},{type:1,expr:"* => hidden",animation:{type:4,styles:null,timings:"150ms cubic-bezier(0.4, 0.0, 1, 1)"},options:null}],options:{}}]}});function c(t){return n["\u0275vid"](2,[(t()(),n["\u0275eld"](0,0,null,null,3,"div",[["class","mat-tooltip"]],[[2,"mat-tooltip-handset",null],[24,"@state",0]],[[null,"@state.start"],[null,"@state.done"]],function(t,e,i){var n=!0,o=t.component;return"@state.start"===e&&(n=!1!==o._animationStart()&&n),"@state.done"===e&&(n=!1!==o._animationDone(i)&&n),n},null,null)),n["\u0275did"](1,278528,null,0,r.i,[n.IterableDiffers,n.KeyValueDiffers,n.ElementRef,n.Renderer2],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),n["\u0275pid"](131072,r.b,[n.ChangeDetectorRef]),(t()(),n["\u0275ted"](3,null,["",""]))],function(t,e){t(e,1,0,"mat-tooltip",e.component.tooltipClass)},function(t,e){var i=e.component;t(e,0,0,n["\u0275unv"](e,0,0,n["\u0275nov"](e,2).transform(i._isHandset)).matches,i._visibility),t(e,3,0,i.message)})}var l=n["\u0275ccf"]("mat-tooltip-component",o.f,function(t){return n["\u0275vid"](0,[(t()(),n["\u0275eld"](0,0,null,null,1,"mat-tooltip-component",[["aria-hidden","true"]],[[4,"zoom",null]],[["body","click"]],function(t,e,i){var o=!0;return"body:click"===e&&(o=!1!==n["\u0275nov"](t,1)._handleBodyInteraction()&&o),o},c,a)),n["\u0275did"](1,49152,null,0,o.f,[n.ChangeDetectorRef,s.a],null,null)],null,function(t,e){t(e,0,0,"visible"===n["\u0275nov"](e,1)._visibility?1:null)})},{},{},[])},v9Dh:function(t,e,i){"use strict";i.d(e,"e",function(){return y}),i.d(e,"b",function(){return f}),i.d(e,"c",function(){return b}),i.d(e,"a",function(){return _}),i.d(e,"d",function(){return m}),i.d(e,"f",function(){return v}),i("ihYY");var n=i("mrSG"),o=i("n6gG"),r=i("YSh2"),s=i("vGXY"),a=(i("eDkP"),i("4c35")),c=i("ny24"),l=i("t9fZ"),u=i("CcnG"),h=i("K9Ia"),d=20;function p(t){return Error('Tooltip position "'+t+'" is invalid.')}var f=new u.InjectionToken("mat-tooltip-scroll-strategy");function b(t){return function(){return t.scrollStrategies.reposition({scrollThrottle:d})}}var _=new u.InjectionToken("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),m=function(){function t(t,e,i,n,o,r,s,a,l,u,d){var p=this;this._overlay=t,this._elementRef=e,this._scrollDispatcher=i,this._viewContainerRef=n,this._ngZone=o,this._platform=r,this._ariaDescriber=s,this._focusMonitor=a,this._scrollStrategy=l,this._dir=u,this._defaultOptions=d,this._position="below",this._disabled=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this._message="",this._manualListeners=new Map,this._destroyed=new h.a;var f=e.nativeElement;r.IOS?"INPUT"!==f.nodeName&&"TEXTAREA"!==f.nodeName||(f.style.webkitUserSelect=f.style.userSelect=""):(this._manualListeners.set("mouseenter",function(){return p.show()}),this._manualListeners.set("mouseleave",function(){return p.hide()}),this._manualListeners.forEach(function(t,i){return e.nativeElement.addEventListener(i,t)})),a.monitor(f).pipe(Object(c.a)(this._destroyed)).subscribe(function(t){t?"keyboard"===t&&o.run(function(){return p.show()}):o.run(function(){return p.hide(0)})})}return Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=Object(o.b)(t),this._disabled&&this.hide(0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this._message},set:function(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=t?(""+t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._updateTooltipMessage(),this._ariaDescriber.describe(this._elementRef.nativeElement,this.message))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tooltipClass",{get:function(){return this._tooltipClass},set:function(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){var t=this;this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._platform.IOS||(this._manualListeners.forEach(function(e,i){return t._elementRef.nativeElement.removeEventListener(i,e)}),this._manualListeners.clear()),this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.message),this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)},t.prototype.show=function(t){var e=this;if(void 0===t&&(t=this.showDelay),!this.disabled&&this.message){var i=this._createOverlay();this._detach(),this._portal=this._portal||new a.d(v,this._viewContainerRef),this._tooltipInstance=i.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(Object(c.a)(this._destroyed)).subscribe(function(){return e._detach()}),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(t)}},t.prototype.hide=function(t){void 0===t&&(t=this.hideDelay),this._tooltipInstance&&this._tooltipInstance.hide(t)},t.prototype.toggle=function(){this._isTooltipVisible()?this.hide():this.show()},t.prototype._isTooltipVisible=function(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()},t.prototype._handleKeydown=function(t){this._isTooltipVisible()&&t.keyCode===r.e&&(t.stopPropagation(),this.hide(0))},t.prototype._handleTouchend=function(){this.hide(this._defaultOptions.touchendHideDelay)},t.prototype._createOverlay=function(){var t=this;if(this._overlayRef)return this._overlayRef;var e=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8),i=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef);return e.withScrollableContainers(i),e.positionChanges.pipe(Object(c.a)(this._destroyed)).subscribe(function(e){t._tooltipInstance&&e.scrollableViewProperties.isOverlayClipped&&t._tooltipInstance.isVisible()&&t._ngZone.run(function(){return t.hide(0)})}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:e,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(Object(c.a)(this._destroyed)).subscribe(function(){return t._detach()}),this._overlayRef},t.prototype._detach=function(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null},t.prototype._updatePosition=function(){var t=this._overlayRef.getConfig().positionStrategy,e=this._getOrigin(),i=this._getOverlayPosition();t.withPositions([Object(n.__assign)({},e.main,i.main),Object(n.__assign)({},e.fallback,i.fallback)])},t.prototype._getOrigin=function(){var t,e=!this._dir||"ltr"==this._dir.value,i=this.position;if("above"==i||"below"==i)t={originX:"center",originY:"above"==i?"top":"bottom"};else if("before"==i||"left"==i&&e||"right"==i&&!e)t={originX:"start",originY:"center"};else{if(!("after"==i||"right"==i&&e||"left"==i&&!e))throw p(i);t={originX:"end",originY:"center"}}var n=this._invertPosition(t.originX,t.originY);return{main:t,fallback:{originX:n.x,originY:n.y}}},t.prototype._getOverlayPosition=function(){var t,e=!this._dir||"ltr"==this._dir.value,i=this.position;if("above"==i)t={overlayX:"center",overlayY:"bottom"};else if("below"==i)t={overlayX:"center",overlayY:"top"};else if("before"==i||"left"==i&&e||"right"==i&&!e)t={overlayX:"end",overlayY:"center"};else{if(!("after"==i||"right"==i&&e||"left"==i&&!e))throw p(i);t={overlayX:"start",overlayY:"center"}}var n=this._invertPosition(t.overlayX,t.overlayY);return{main:t,fallback:{overlayX:n.x,overlayY:n.y}}},t.prototype._updateTooltipMessage=function(){var t=this;this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.asObservable().pipe(Object(l.a)(1),Object(c.a)(this._destroyed)).subscribe(function(){t._tooltipInstance&&t._overlayRef.updatePosition()}))},t.prototype._setTooltipClass=function(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())},t.prototype._invertPosition=function(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}},t}(),v=function(){function t(t,e){this._changeDetectorRef=t,this._breakpointObserver=e,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new h.a,this._isHandset=this._breakpointObserver.observe(s.b.Handset)}return t.prototype.show=function(t){var e=this;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout(function(){e._visibility="visible",e._markForCheck()},t)},t.prototype.hide=function(t){var e=this;this._showTimeoutId&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(function(){e._visibility="hidden",e._markForCheck()},t)},t.prototype.afterHidden=function(){return this._onHide.asObservable()},t.prototype.isVisible=function(){return"visible"===this._visibility},t.prototype._animationStart=function(){this._closeOnInteraction=!1},t.prototype._animationDone=function(t){var e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)},t.prototype._handleBodyInteraction=function(){this._closeOnInteraction&&this.hide(0)},t.prototype._markForCheck=function(){this._changeDetectorRef.markForCheck()},t}(),y=function(){}},vGXY:function(t,e,i){"use strict";var n=i("CcnG"),o=i("dWZg"),r=i("dzgT"),s=i("K9Ia"),a=i("6blF"),c=i("isby"),l=i("2Bdj"),u=i("67Y/"),h=i("ny24"),d=i("p0Sj"),p=i("n6gG");i.d(e,"a",function(){return v}),i.d(e,"b",function(){return g});var f,b=new Set,_=function(){function t(t){this.platform=t,this._matchMedia=this.platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):m}return t.prototype.matchMedia=function(t){return this.platform.WEBKIT&&function(t){if(!b.has(t))try{f||((f=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(f)),f.sheet&&(f.sheet.insertRule("@media "+t+" {.fx-query-test{ }}",0),b.add(t))}catch(t){console.error(t)}}(t),this._matchMedia(t)},t.ngInjectableDef=Object(n.defineInjectable)({factory:function(){return new t(Object(n.inject)(o.a))},token:t,providedIn:"root"}),t}();function m(t){return{matches:"all"===t||""===t,media:t,addListener:function(){},removeListener:function(){}}}var v=function(){function t(t,e){this.mediaMatcher=t,this.zone=e,this._queries=new Map,this._destroySubject=new s.a}return t.prototype.ngOnDestroy=function(){this._destroySubject.next(),this._destroySubject.complete()},t.prototype.isMatched=function(t){var e=this;return y(Object(p.a)(t)).some(function(t){return e._registerQuery(t).mql.matches})},t.prototype.observe=function(t){var e=this,i=y(Object(p.a)(t)).map(function(t){return e._registerQuery(t).observable});return Object(r.a)(i).pipe(Object(u.a)(function(t){return{matches:t.some(function(t){return t&&t.matches})}}))},t.prototype._registerQuery=function(t){var e=this;if(this._queries.has(t))return this._queries.get(t);var i=this.mediaMatcher.matchMedia(t),n={observable:function t(e,i,n){return n?t(e,i).pipe(Object(u.a)(function(t){return Object(c.a)(t)?n.apply(void 0,t):n(t)})):new a.a(function(t){var n,o=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.next(1===e.length?e[0]:e)};try{n=e(o)}catch(e){return void t.error(e)}if(Object(l.a)(i))return function(){return i(o,n)}})}(function(t){i.addListener(function(i){return e.zone.run(function(){return t(i)})})},function(t){i.removeListener(function(i){return e.zone.run(function(){return t(i)})})}).pipe(Object(h.a)(this._destroySubject),Object(d.a)(i),Object(u.a)(function(t){return{matches:t.matches}})),mql:i};return this._queries.set(t,n),n},t.ngInjectableDef=Object(n.defineInjectable)({factory:function(){return new t(Object(n.inject)(_),Object(n.inject)(n.NgZone))},token:t,providedIn:"root"}),t}();function y(t){return t.map(function(t){return t.split(",")}).reduce(function(t,e){return t.concat(e)}).map(function(t){return t.trim()})}var g={XSmall:"(max-width: 599px)",Small:"(min-width: 600px) and (max-width: 959px)",Medium:"(min-width: 960px) and (max-width: 1279px)",Large:"(min-width: 1280px) and (max-width: 1919px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599px) and (orientation: portrait), (max-width: 959px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"}}}]);