Viewing File: /home/markqprx/iniasli.pro/public/client/445-es5.0571e61aeb32d1a410f2.js

!function(){function t(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)}function n(t,e){return(n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,i=r(t);if(e){var a=r(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return o(this,n)}}function o(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?a(t):e}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var i,o,a=[],r=!0,s=!1;try{for(n=n.call(t);!(r=(i=n.next()).done)&&(a.push(i.value),!e||a.length!==e);r=!0);}catch(c){s=!0,o=c}finally{try{r||null==n.return||n.return()}finally{if(s)throw o}}return a}(t,e)||l(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||l(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function g(t,e,n){return e&&p(t.prototype,e),n&&p(t,n),t}(self.webpackChunkclient=self.webpackChunkclient||[]).push([[445],{69244:function(t,e,n){"use strict";n.d(e,{Zt:function(){return yt},Bh:function(){return mt},Wj:function(){return ht},_t:function(){return xt},bA:function(){return X}});var i=n(35366),o=n(61116),a=n(43725),r=n(93169),l=n(19861),u=n(48318),p=n(48569),h=n(62293);function f(t){var e=t.subscriber,n=t.counter,i=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:i},i)}var m=n(55959),v=n(87570),b=n(91741),y=n(31906),_=n(25416),x=n(56238),k=n(79996),Z=n(90611),w=n(66599),A=n(44689),C=n(94720);function T(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function q(t,e){var n=e?"":"none";T(t.style,{touchAction:e?"":"none",webkitUserDrag:e?"":"none",webkitTapHighlightColor:e?"":"transparent",userSelect:n,msUserSelect:n,webkitUserSelect:n,MozUserSelect:n})}function I(t,e){var n=t.style;n.position=e?"":"fixed",n.top=n.opacity=e?"":"0",n.left=e?"":"-999em"}function O(t){var e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function U(t,e){return t.getPropertyValue(e).split(",").map(function(t){return t.trim()})}function P(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}}function M(t,e,n){var i=t.top,o=t.bottom,a=t.left,r=t.right;return n>=i&&n<=o&&e>=a&&e<=r}function S(t,e,n){t.top+=e,t.bottom=t.top+t.height,t.left+=n,t.right=t.left+t.width}function N(t,e,n,i){var o=t.top,a=t.right,r=t.bottom,s=t.left,c=t.width*e,l=t.height*e;return i>o-l&&i<r+l&&n>s-c&&n<a+c}var J=function(){function t(e,n){d(this,t),this._document=e,this._viewportRuler=n,this.positions=new Map}return g(t,[{key:"clear",value:function(){this.positions.clear()}},{key:"cache",value:function(t){var e=this;this.clear(),this.positions.set(this._document,{scrollPosition:this._viewportRuler.getViewportScrollPosition()}),t.forEach(function(t){e.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:P(t)})})}},{key:"handleScroll",value:function(t){var e=t.target,n=this.positions.get(e);if(!n)return null;var i,o,a=e===this._document?e.documentElement:e,r=n.scrollPosition;if(e===this._document){var s=this._viewportRuler.getViewportScrollPosition();i=s.top,o=s.left}else i=e.scrollTop,o=e.scrollLeft;var c=r.top-i,l=r.left-o;return this.positions.forEach(function(t,n){t.clientRect&&e!==n&&a.contains(n)&&S(t.clientRect,c,l)}),r.top=i,r.left=o,{top:c,left:l}}}]),t}();function E(t){var e=t.cloneNode(!0),n=e.querySelectorAll("[id]"),i=t.nodeName.toLowerCase();e.removeAttribute("id");for(var o=0;o<n.length;o++)n[o].removeAttribute("id");return"canvas"===i?Y(t,e):"input"!==i&&"select"!==i&&"textarea"!==i||R(t,e),L("canvas",t,e,Y),L("input, textarea, select",t,e,R),e}function L(t,e,n,i){var o=e.querySelectorAll(t);if(o.length)for(var a=n.querySelectorAll(t),r=0;r<o.length;r++)i(o[r],a[r])}var D=0;function R(t,e){"file"!==e.type&&(e.value=t.value),"radio"===e.type&&e.name&&(e.name="mat-clone-".concat(e.name,"-").concat(D++))}function Y(t,e){var n=e.getContext("2d");if(n)try{n.drawImage(t,0,0)}catch(i){}}var F=(0,r.i$)({passive:!0}),Q=(0,r.i$)({passive:!1}),$=function(){function t(e,n,i,o,a,r){var s=this;d(this,t),this._config=n,this._document=i,this._ngZone=o,this._viewportRuler=a,this._dragDropRegistry=r,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new m.xQ,this._pointerMoveSubscription=v.w.EMPTY,this._pointerUpSubscription=v.w.EMPTY,this._scrollSubscription=v.w.EMPTY,this._resizeSubscription=v.w.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new m.xQ,this.started=new m.xQ,this.released=new m.xQ,this.ended=new m.xQ,this.entered=new m.xQ,this.exited=new m.xQ,this.dropped=new m.xQ,this.moved=this._moveEvents,this._pointerDown=function(t){if(s.beforeStarted.next(),s._handles.length){var e=s._handles.find(function(e){var n=t.target;return!!n&&(n===e||e.contains(n))});!e||s._disabledHandles.has(e)||s.disabled||s._initializeDragSequence(e,t)}else s.disabled||s._initializeDragSequence(s._rootElement,t)},this._pointerMove=function(t){var e=s._getPointerPositionOnPage(t);if(s._hasStartedDragging){s._boundaryElement&&(s._previewRect&&(s._previewRect.width||s._previewRect.height)||(s._previewRect=(s._preview||s._rootElement).getBoundingClientRect())),t.preventDefault();var n=s._getConstrainedPointerPosition(e);if(s._hasMoved=!0,s._lastKnownPointerPosition=e,s._updatePointerDirectionDelta(n),s._dropContainer)s._updateActiveDropContainer(n,e);else{var i=s._activeTransform;i.x=n.x-s._pickupPositionOnPage.x+s._passiveTransform.x,i.y=n.y-s._pickupPositionOnPage.y+s._passiveTransform.y,s._applyRootElementTransform(i.x,i.y),"undefined"!=typeof SVGElement&&s._rootElement instanceof SVGElement&&s._rootElement.setAttribute("transform","translate(".concat(i.x," ").concat(i.y,")"))}s._moveEvents.observers.length&&s._ngZone.run(function(){s._moveEvents.next({source:s,pointerPosition:n,event:t,distance:s._getDragDistance(n),delta:s._pointerDirectionDelta})})}else if(Math.abs(e.x-s._pickupPositionOnPage.x)+Math.abs(e.y-s._pickupPositionOnPage.y)>=s._config.dragStartThreshold){var o=Date.now()>=s._dragStartTime+s._getDragStartDelay(t),a=s._dropContainer;if(!o)return void s._endDragSequence(t);a&&(a.isDragging()||a.isReceiving())||(t.preventDefault(),s._hasStartedDragging=!0,s._ngZone.run(function(){return s._startDragSequence(t)}))}},this._pointerUp=function(t){s._endDragSequence(t)},this.withRootElement(e).withParent(n.parentDragRef||null),this._parentPositions=new J(i,a),r.registerDragItem(this)}return g(t,[{key:"disabled",get:function(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)},set:function(t){var e=(0,l.Ig)(t);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(function(t){return q(t,e)}))}},{key:"getPlaceholderElement",value:function(){return this._placeholder}},{key:"getRootElement",value:function(){return this._rootElement}},{key:"getVisibleElement",value:function(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}},{key:"withHandles",value:function(t){var e=this;this._handles=t.map(function(t){return(0,l.fI)(t)}),this._handles.forEach(function(t){return q(t,e.disabled)}),this._toggleNativeDragInteractions();var n=new Set;return this._disabledHandles.forEach(function(t){e._handles.indexOf(t)>-1&&n.add(t)}),this._disabledHandles=n,this}},{key:"withPreviewTemplate",value:function(t){return this._previewTemplate=t,this}},{key:"withPlaceholderTemplate",value:function(t){return this._placeholderTemplate=t,this}},{key:"withRootElement",value:function(t){var e=this,n=(0,l.fI)(t);return n!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(function(){n.addEventListener("mousedown",e._pointerDown,Q),n.addEventListener("touchstart",e._pointerDown,F)}),this._initialTransform=void 0,this._rootElement=n),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}},{key:"withBoundaryElement",value:function(t){var e=this;return this._boundaryElement=t?(0,l.fI)(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(function(){return e._containInsideBoundaryOnResize()})),this}},{key:"withParent",value:function(t){return this._parentDragRef=t,this}},{key:"dispose",value:function(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&V(this._rootElement),V(this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}},{key:"isDragging",value:function(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}},{key:"reset",value:function(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}},{key:"disableHandle",value:function(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),q(t,!0))}},{key:"enableHandle",value:function(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),q(t,this.disabled))}},{key:"withDirection",value:function(t){return this._direction=t,this}},{key:"_withDropContainer",value:function(t){this._dropContainer=t}},{key:"getFreeDragPosition",value:function(){var t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}},{key:"setFreeDragPosition",value:function(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}},{key:"_sortFromLastPointerPosition",value:function(){var t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}},{key:"_removeSubscriptions",value:function(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}},{key:"_destroyPreview",value:function(){this._preview&&V(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null}},{key:"_destroyPlaceholder",value:function(){this._placeholder&&V(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null}},{key:"_endDragSequence",value:function(t){var e=this;this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging&&(this.released.next({source:this}),this._dropContainer?(this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(function(){e._cleanupDragArtifacts(t),e._cleanupCachedDimensions(),e._dragDropRegistry.stopDragging(e)})):(this._passiveTransform.x=this._activeTransform.x,this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(function(){e.ended.next({source:e,distance:e._getDragDistance(e._getPointerPositionOnPage(t))})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this))))}},{key:"_startDragSequence",value:function(t){z(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();var e=this._dropContainer;if(e){var n=this._rootElement,i=n.parentNode,o=this._preview=this._createPreviewElement(),a=this._placeholder=this._createPlaceholderElement(),r=this._anchor=this._anchor||this._document.createComment(""),s=this._getShadowRoot();i.insertBefore(r,n),I(n,!1),this._document.body.appendChild(i.replaceChild(a,n)),function(t,e){return e||t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement||t.body}(this._document,s).appendChild(o),this.started.next({source:this}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(e?e.getScrollableParents():[])}},{key:"_initializeDragSequence",value:function(t,e){var n=this;this._parentDragRef&&e.stopPropagation();var i=this.isDragging(),o=z(e),a=!o&&0!==e.button,r=this._rootElement,s=!o&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(e.target&&e.target.draggable&&"mousedown"===e.type&&e.preventDefault(),!(i||a||s)){this._handles.length&&(this._rootElementTapHighlight=r.style.webkitTapHighlightColor||"",r.style.webkitTapHighlightColor="transparent"),this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scroll.subscribe(function(t){n._updateOnScroll(t)}),this._boundaryElement&&(this._boundaryRect=P(this._boundaryElement));var c=this._previewTemplate;this._pickupPositionInElement=c&&c.template&&!c.matchSize?{x:0,y:0}:this._getPointerPositionInElement(t,e);var l=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:l.x,y:l.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}}},{key:"_cleanupDragArtifacts",value:function(t){var e=this;I(this._rootElement,!0),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run(function(){var n=e._dropContainer,i=n.getItemIndex(e),o=e._getPointerPositionOnPage(t),a=e._getDragDistance(e._getPointerPositionOnPage(t)),r=n._isOverContainer(o.x,o.y);e.ended.next({source:e,distance:a}),e.dropped.next({item:e,currentIndex:i,previousIndex:e._initialIndex,container:n,previousContainer:e._initialContainer,isPointerOverContainer:r,distance:a}),n.drop(e,i,e._initialIndex,e._initialContainer,r,a),e._dropContainer=e._initialContainer})}},{key:"_updateActiveDropContainer",value:function(t,e){var n=this,i=t.x,o=t.y,a=e.x,r=e.y,s=this._initialContainer._getSiblingContainerFromPosition(this,i,o);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,o)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(function(){n.exited.next({item:n,container:n._dropContainer}),n._dropContainer.exit(n),n._dropContainer=s,n._dropContainer.enter(n,i,o,s===n._initialContainer&&s.sortingDisabled?n._initialIndex:void 0),n.entered.next({item:n,container:s,currentIndex:s.getItemIndex(n)})}),this._dropContainer._startScrollingIfNecessary(a,r),this._dropContainer._sortItem(this,i,o,this._pointerDirectionDelta),this._preview.style.transform=B(i-this._pickupPositionInElement.x,o-this._pickupPositionInElement.y)}},{key:"_createPreviewElement",value:function(){var t,e=this._previewTemplate,n=this.previewClass,i=e?e.template:null;if(i&&e){var o=e.matchSize?this._rootElement.getBoundingClientRect():null,a=e.viewContainer.createEmbeddedView(i,e.context);a.detectChanges(),t=G(a,this._document),this._previewRef=a,e.matchSize?j(t,o):t.style.transform=B(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{var r=this._rootElement;j(t=E(r),r.getBoundingClientRect())}return T(t.style,{pointerEvents:"none",margin:"0",position:"fixed",top:"0",left:"0",zIndex:"".concat(this._config.zIndex||1e3)}),q(t,!1),t.classList.add("cdk-drag-preview"),t.setAttribute("dir",this._direction),n&&(Array.isArray(n)?n.forEach(function(e){return t.classList.add(e)}):t.classList.add(n)),t}},{key:"_animatePreviewToPlaceholder",value:function(){var t=this;if(!this._hasMoved)return Promise.resolve();var e=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=B(e.left,e.top);var n=function(t){var e=getComputedStyle(t),n=U(e,"transition-property"),i=n.find(function(t){return"transform"===t||"all"===t});if(!i)return 0;var o=n.indexOf(i),a=U(e,"transition-duration"),r=U(e,"transition-delay");return O(a[o])+O(r[o])}(this._preview);return 0===n?Promise.resolve():this._ngZone.runOutsideAngular(function(){return new Promise(function(e){var i=function n(i){(!i||i.target===t._preview&&"transform"===i.propertyName)&&(t._preview.removeEventListener("transitionend",n),e(),clearTimeout(o))},o=setTimeout(i,1.5*n);t._preview.addEventListener("transitionend",i)})})}},{key:"_createPlaceholderElement",value:function(){var t,e=this._placeholderTemplate,n=e?e.template:null;return n?(this._placeholderRef=e.viewContainer.createEmbeddedView(n,e.context),this._placeholderRef.detectChanges(),t=G(this._placeholderRef,this._document)):t=E(this._rootElement),t.classList.add("cdk-drag-placeholder"),t}},{key:"_getPointerPositionInElement",value:function(t,e){var n=this._rootElement.getBoundingClientRect(),i=t===this._rootElement?null:t,o=i?i.getBoundingClientRect():n,a=z(e)?e.targetTouches[0]:e,r=this._getViewportScrollPosition();return{x:o.left-n.left+(a.pageX-o.left-r.left),y:o.top-n.top+(a.pageY-o.top-r.top)}}},{key:"_getPointerPositionOnPage",value:function(t){var e=this._getViewportScrollPosition(),n=z(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,i=n.pageX-e.left,o=n.pageY-e.top;if(this._ownerSVGElement){var a=this._ownerSVGElement.getScreenCTM();if(a){var r=this._ownerSVGElement.createSVGPoint();return r.x=i,r.y=o,r.matrixTransform(a.inverse())}}return{x:i,y:o}}},{key:"_getConstrainedPointerPosition",value:function(t){var e=this._dropContainer?this._dropContainer.lockAxis:null,n=this.constrainPosition?this.constrainPosition(t,this):t,i=n.x,o=n.y;if("x"===this.lockAxis||"x"===e?o=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==e||(i=this._pickupPositionOnPage.x),this._boundaryRect){var a=this._pickupPositionInElement,r=a.x,s=a.y,c=this._boundaryRect,l=this._previewRect,u=c.top+s,d=c.bottom-(l.height-s);i=H(i,c.left+r,c.right-(l.width-r)),o=H(o,u,d)}return{x:i,y:o}}},{key:"_updatePointerDirectionDelta",value:function(t){var e=t.x,n=t.y,i=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,a=Math.abs(e-o.x),r=Math.abs(n-o.y);return a>this._config.pointerDirectionChangeThreshold&&(i.x=e>o.x?1:-1,o.x=e),r>this._config.pointerDirectionChangeThreshold&&(i.y=n>o.y?1:-1,o.y=n),i}},{key:"_toggleNativeDragInteractions",value:function(){if(this._rootElement&&this._handles){var t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,q(this._rootElement,t))}}},{key:"_removeRootElementListeners",value:function(t){t.removeEventListener("mousedown",this._pointerDown,Q),t.removeEventListener("touchstart",this._pointerDown,F)}},{key:"_applyRootElementTransform",value:function(t,e){var n=B(t,e);null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._rootElement.style.transform=this._initialTransform?n+" "+this._initialTransform:n}},{key:"_getDragDistance",value:function(t){var e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}},{key:"_cleanupCachedDimensions",value:function(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}},{key:"_containInsideBoundaryOnResize",value:function(){var t=this._passiveTransform,e=t.x,n=t.y;if(!(0===e&&0===n||this.isDragging())&&this._boundaryElement){var i=this._boundaryElement.getBoundingClientRect(),o=this._rootElement.getBoundingClientRect();if(!(0===i.width&&0===i.height||0===o.width&&0===o.height)){var a=i.left-o.left,r=o.right-i.right,s=i.top-o.top,c=o.bottom-i.bottom;i.width>o.width?(a>0&&(e+=a),r>0&&(e-=r)):e=0,i.height>o.height?(s>0&&(n+=s),c>0&&(n-=c)):n=0,e===this._passiveTransform.x&&n===this._passiveTransform.y||this.setFreeDragPosition({y:n,x:e})}}}},{key:"_getDragStartDelay",value:function(t){var e=this.dragStartDelay;return"number"==typeof e?e:z(t)?e.touch:e?e.mouse:0}},{key:"_updateOnScroll",value:function(t){var e=this._parentPositions.handleScroll(t);if(e){var n=t.target;this._boundaryRect&&(n===this._document||n!==this._boundaryElement&&n.contains(this._boundaryElement))&&S(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}},{key:"_getViewportScrollPosition",value:function(){var t=this._parentPositions.positions.get(this._document);return t?t.scrollPosition:this._viewportRuler.getViewportScrollPosition()}},{key:"_getShadowRoot",value:function(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=(0,r.kV)(this._rootElement)),this._cachedShadowRoot}}]),t}();function B(t,e){return"translate3d(".concat(Math.round(t),"px, ").concat(Math.round(e),"px, 0)")}function H(t,e,n){return Math.max(e,Math.min(n,t))}function V(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function z(t){return"t"===t.type[0]}function G(t,e){var n=t.rootNodes;if(1===n.length&&n[0].nodeType===e.ELEMENT_NODE)return n[0];var i=e.createElement("div");return n.forEach(function(t){return i.appendChild(t)}),i}function j(t,e){t.style.width="".concat(e.width,"px"),t.style.height="".concat(e.height,"px"),t.style.transform=B(e.left,e.top)}function X(t,e,n){var i=W(e,t.length-1),o=W(n,t.length-1);if(i!==o){for(var a=t[i],r=o<i?-1:1,s=i;s!==o;s+=r)t[s]=t[s+r];t[o]=a}}function W(t,e){return Math.max(0,Math.min(e,t))}var K=function(){function t(e,n,i,o,a){var r=this;d(this,t),this._dragDropRegistry=n,this._ngZone=o,this._viewportRuler=a,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=function(){return!0},this.sortPredicate=function(){return!0},this.beforeStarted=new m.xQ,this.entered=new m.xQ,this.exited=new m.xQ,this.dropped=new m.xQ,this.sorted=new m.xQ,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0,overlaps:!1},this._draggables=[],this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=v.w.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new m.xQ,this._cachedShadowRoot=null,this._startScrollInterval=function(){r._stopScrolling(),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.P;return(!(0,h.k)(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=p.P),new u.y(function(n){return n.add(e.schedule(f,t,{subscriber:n,counter:0,period:t})),n})}(0,b.Z).pipe((0,_.R)(r._stopScrollTimers)).subscribe(function(){var t=r._scrollNode,e=r.autoScrollStep;1===r._verticalScrollDirection?et(t,-e):2===r._verticalScrollDirection&&et(t,e),1===r._horizontalScrollDirection?nt(t,-e):2===r._horizontalScrollDirection&&nt(t,e)})},this.element=(0,l.fI)(e),this._document=i,this.withScrollableParents([this.element]),n.registerDropContainer(this),this._parentPositions=new J(i,a)}return g(t,[{key:"dispose",value:function(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}},{key:"isDragging",value:function(){return this._isDragging}},{key:"start",value:function(){this._draggingStarted(),this._notifyReceivingSiblings()}},{key:"enter",value:function(t,e,n,i){var o;this._draggingStarted(),null==i?-1===(o=this.sortingDisabled?this._draggables.indexOf(t):-1)&&(o=this._getItemIndexFromPointerPosition(t,e,n)):o=i;var a=this._activeDraggables,r=a.indexOf(t),s=t.getPlaceholderElement(),c=a[o];if(c===t&&(c=a[o+1]),r>-1&&a.splice(r,1),c&&!this._dragDropRegistry.isDragging(c)){var u=c.getRootElement();u.parentElement.insertBefore(s,u),a.splice(o,0,t)}else if(this._shouldEnterAsFirstChild(e,n)){var d=a[0].getRootElement();d.parentNode.insertBefore(s,d),a.unshift(t)}else(0,l.fI)(this.element).appendChild(s),a.push(t);s.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}},{key:"exit",value:function(t){this._reset(),this.exited.next({item:t,container:this})}},{key:"drop",value:function(t,e,n,i,o,a){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:n,container:this,previousContainer:i,isPointerOverContainer:o,distance:a})}},{key:"withItems",value:function(t){var e=this,n=this._draggables;return this._draggables=t,t.forEach(function(t){return t._withDropContainer(e)}),this.isDragging()&&(n.filter(function(t){return t.isDragging()}).every(function(e){return-1===t.indexOf(e)})?this._reset():this._cacheItems()),this}},{key:"withDirection",value:function(t){return this._direction=t,this}},{key:"connectedTo",value:function(t){return this._siblings=t.slice(),this}},{key:"withOrientation",value:function(t){return this._orientation=t,this}},{key:"withScrollableParents",value:function(t){var e=(0,l.fI)(this.element);return this._scrollableElements=-1===t.indexOf(e)?[e].concat(c(t)):t.slice(),this}},{key:"getScrollableParents",value:function(){return this._scrollableElements}},{key:"getItemIndex",value:function(t){return this._isDragging?tt("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions,function(e){return e.drag===t}):this._draggables.indexOf(t)}},{key:"isReceiving",value:function(){return this._activeSiblings.size>0}},{key:"_sortItem",value:function(t,e,n,i){if(!this.sortingDisabled&&this._clientRect&&N(this._clientRect,.05,e,n)){var o=this._itemPositions,a=this._getItemIndexFromPointerPosition(t,e,n,i);if(!(-1===a&&o.length>0)){var r="horizontal"===this._orientation,s=tt(o,function(e){return e.drag===t}),c=o[a],l=c.clientRect,u=s>a?1:-1,d=this._getItemOffsetPx(o[s].clientRect,l,u),p=this._getSiblingOffsetPx(s,o,u),g=o.slice();X(o,s,a),this.sorted.next({previousIndex:s,currentIndex:a,container:this,item:t}),o.forEach(function(e,n){if(g[n]!==e){var i=e.drag===t,o=i?d:p,a=i?t.getPlaceholderElement():e.drag.getRootElement();e.offset+=o,r?(a.style.transform="translate3d(".concat(Math.round(e.offset),"px, 0, 0)"),S(e.clientRect,0,o)):(a.style.transform="translate3d(0, ".concat(Math.round(e.offset),"px, 0)"),S(e.clientRect,o,0))}}),this._previousSwap.overlaps=M(l,e,n),this._previousSwap.drag=c.drag,this._previousSwap.delta=r?i.x:i.y}}}},{key:"_startScrollingIfNecessary",value:function(t,e){var n=this;if(!this.autoScrollDisabled){var i,o=0,a=0;if(this._parentPositions.positions.forEach(function(r,c){var l;c!==n._document&&r.clientRect&&!i&&N(r.clientRect,.05,t,e)&&(l=s(function(t,e,n,i){var o=it(e,i),a=ot(e,n),r=0,s=0;if(o){var c=t.scrollTop;1===o?c>0&&(r=1):t.scrollHeight-c>t.clientHeight&&(r=2)}if(a){var l=t.scrollLeft;1===a?l>0&&(s=1):t.scrollWidth-l>t.clientWidth&&(s=2)}return[r,s]}(c,r.clientRect,t,e),2),o=l[0],a=l[1],(o||a)&&(i=c))}),!o&&!a){var r=this._viewportRuler.getViewportSize(),c=r.width,l=r.height,u={width:c,height:l,top:0,right:c,bottom:l,left:0};o=it(u,e),a=ot(u,t),i=window}!i||o===this._verticalScrollDirection&&a===this._horizontalScrollDirection&&i===this._scrollNode||(this._verticalScrollDirection=o,this._horizontalScrollDirection=a,this._scrollNode=i,(o||a)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}}},{key:"_stopScrolling",value:function(){this._stopScrollTimers.next()}},{key:"_draggingStarted",value:function(){var t=(0,l.fI)(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._cacheItems(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}},{key:"_cacheParentPositions",value:function(){var t=(0,l.fI)(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(t).clientRect}},{key:"_cacheItemPositions",value:function(){var t="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(function(t){var e=t.getVisibleElement();return{drag:t,offset:0,clientRect:P(e)}}).sort(function(e,n){return t?e.clientRect.left-n.clientRect.left:e.clientRect.top-n.clientRect.top})}},{key:"_reset",value:function(){var t=this;this._isDragging=!1;var e=(0,l.fI)(this.element).style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach(function(t){var e=t.getRootElement();e&&(e.style.transform="")}),this._siblings.forEach(function(e){return e._stopReceiving(t)}),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}},{key:"_getSiblingOffsetPx",value:function(t,e,n){var i="horizontal"===this._orientation,o=e[t].clientRect,a=e[t+-1*n],r=o[i?"width":"height"]*n;if(a){var s=i?"left":"top",c=i?"right":"bottom";-1===n?r-=a.clientRect[s]-o[c]:r+=o[s]-a.clientRect[c]}return r}},{key:"_getItemOffsetPx",value:function(t,e,n){var i="horizontal"===this._orientation,o=i?e.left-t.left:e.top-t.top;return-1===n&&(o+=i?e.width-t.width:e.height-t.height),o}},{key:"_shouldEnterAsFirstChild",value:function(t,e){if(!this._activeDraggables.length)return!1;var n=this._itemPositions,i="horizontal"===this._orientation;if(n[0].drag!==this._activeDraggables[0]){var o=n[n.length-1].clientRect;return i?t>=o.right:e>=o.bottom}var a=n[0].clientRect;return i?t<=a.left:e<=a.top}},{key:"_getItemIndexFromPointerPosition",value:function(t,e,n,i){var o=this,a="horizontal"===this._orientation,r=tt(this._itemPositions,function(r,s,c){var l=r.drag,u=r.clientRect;if(l===t)return c.length<2;if(i){var d=a?i.x:i.y;if(l===o._previousSwap.drag&&o._previousSwap.overlaps&&d===o._previousSwap.delta)return!1}return a?e>=Math.floor(u.left)&&e<Math.floor(u.right):n>=Math.floor(u.top)&&n<Math.floor(u.bottom)});return-1!==r&&this.sortPredicate(r,t,this)?r:-1}},{key:"_cacheItems",value:function(){this._activeDraggables=this._draggables.slice(),this._cacheItemPositions(),this._cacheParentPositions()}},{key:"_isOverContainer",value:function(t,e){return null!=this._clientRect&&M(this._clientRect,t,e)}},{key:"_getSiblingContainerFromPosition",value:function(t,e,n){return this._siblings.find(function(i){return i._canReceive(t,e,n)})}},{key:"_canReceive",value:function(t,e,n){if(!this._clientRect||!M(this._clientRect,e,n)||!this.enterPredicate(t,this))return!1;var i=this._getShadowRoot().elementFromPoint(e,n);if(!i)return!1;var o=(0,l.fI)(this.element);return i===o||o.contains(i)}},{key:"_startReceiving",value:function(t,e){var n=this,i=this._activeSiblings;!i.has(t)&&e.every(function(t){return n.enterPredicate(t,n)||n._draggables.indexOf(t)>-1})&&(i.add(t),this._cacheParentPositions(),this._listenToScrollEvents())}},{key:"_stopReceiving",value:function(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe()}},{key:"_listenToScrollEvents",value:function(){var t=this;this._viewportScrollSubscription=this._dragDropRegistry.scroll.subscribe(function(e){if(t.isDragging()){var n=t._parentPositions.handleScroll(e);n&&(t._itemPositions.forEach(function(t){S(t.clientRect,n.top,n.left)}),t._itemPositions.forEach(function(e){var n=e.drag;t._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()}))}else t.isReceiving()&&t._cacheParentPositions()})}},{key:"_getShadowRoot",value:function(){if(!this._cachedShadowRoot){var t=(0,r.kV)((0,l.fI)(this.element));this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}},{key:"_notifyReceivingSiblings",value:function(){var t=this,e=this._activeDraggables.filter(function(t){return t.isDragging()});this._siblings.forEach(function(n){return n._startReceiving(t,e)})}}]),t}();function tt(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1}function et(t,e){t===window?t.scrollBy(0,e):t.scrollTop+=e}function nt(t,e){t===window?t.scrollBy(e,0):t.scrollLeft+=e}function it(t,e){var n=t.top,i=t.bottom,o=.05*t.height;return e>=n-o&&e<=n+o?1:e>=i-o&&e<=i+o?2:0}function ot(t,e){var n=t.left,i=t.right,o=.05*t.width;return e>=n-o&&e<=n+o?1:e>=i-o&&e<=i+o?2:0}var at=(0,r.i$)({passive:!1,capture:!0}),rt=function(){var t=function(){function t(e,n){var i=this;d(this,t),this._ngZone=e,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=function(t){return t.isDragging()},this.pointerMove=new m.xQ,this.pointerUp=new m.xQ,this.scroll=new m.xQ,this._preventDefaultWhileDragging=function(t){i._activeDragInstances.length>0&&t.preventDefault()},this._persistentTouchmoveListener=function(t){i._activeDragInstances.length>0&&(i._activeDragInstances.some(i._draggingPredicate)&&t.preventDefault(),i.pointerMove.next(t))},this._document=n}return g(t,[{key:"registerDropContainer",value:function(t){this._dropInstances.has(t)||this._dropInstances.add(t)}},{key:"registerDragItem",value:function(t){var e=this;this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(function(){e._document.addEventListener("touchmove",e._persistentTouchmoveListener,at)})}},{key:"removeDropContainer",value:function(t){this._dropInstances.delete(t)}},{key:"removeDragItem",value:function(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,at)}},{key:"startDragging",value:function(t,e){var n=this;if(!(this._activeDragInstances.indexOf(t)>-1)&&(this._activeDragInstances.push(t),1===this._activeDragInstances.length)){var i=e.type.startsWith("touch");this._globalListeners.set(i?"touchend":"mouseup",{handler:function(t){return n.pointerUp.next(t)},options:!0}).set("scroll",{handler:function(t){return n.scroll.next(t)},options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:at}),i||this._globalListeners.set("mousemove",{handler:function(t){return n.pointerMove.next(t)},options:at}),this._ngZone.runOutsideAngular(function(){n._globalListeners.forEach(function(t,e){n._document.addEventListener(e,t.handler,t.options)})})}}},{key:"stopDragging",value:function(t){var e=this._activeDragInstances.indexOf(t);e>-1&&(this._activeDragInstances.splice(e,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}},{key:"isDragging",value:function(t){return this._activeDragInstances.indexOf(t)>-1}},{key:"ngOnDestroy",value:function(){var t=this;this._dragInstances.forEach(function(e){return t.removeDragItem(e)}),this._dropInstances.forEach(function(e){return t.removeDropContainer(e)}),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}},{key:"_clearGlobalListeners",value:function(){var t=this;this._globalListeners.forEach(function(e,n){t._document.removeEventListener(n,e.handler,e.options)}),this._globalListeners.clear()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.LFG(i.R0b),i.LFG(o.K0))},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t((0,i.LFG)(i.R0b),(0,i.LFG)(o.K0))},token:t,providedIn:"root"}),t}(),st={dragStartThreshold:5,pointerDirectionChangeThreshold:5},ct=function(){var t=function(){function t(e,n,i,o){d(this,t),this._document=e,this._ngZone=n,this._viewportRuler=i,this._dragDropRegistry=o}return g(t,[{key:"createDrag",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:st;return new $(t,e,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}},{key:"createDropList",value:function(t){return new K(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.LFG(o.K0),i.LFG(i.R0b),i.LFG(a.rL),i.LFG(rt))},t.\u0275prov=(0,i.Yz7)({factory:function(){return new t((0,i.LFG)(o.K0),(0,i.LFG)(i.R0b),(0,i.LFG)(a.rL),(0,i.LFG)(rt))},token:t,providedIn:"root"}),t}(),lt=new i.OlP("CDK_DRAG_PARENT"),ut=new i.OlP("CdkDropListGroup"),dt=new i.OlP("CDK_DRAG_CONFIG"),pt=0,gt=new i.OlP("CdkDropList"),ht=function(){var t=function(){function t(e,n,o,a,r,s,c){var l=this;d(this,t),this.element=e,this._changeDetectorRef=o,this._scrollDispatcher=a,this._dir=r,this._group=s,this._destroyed=new m.xQ,this.connectedTo=[],this.id="cdk-drop-list-"+pt++,this.enterPredicate=function(){return!0},this.sortPredicate=function(){return!0},this.dropped=new i.vpe,this.entered=new i.vpe,this.exited=new i.vpe,this.sorted=new i.vpe,this._unsortedItems=new Set,this._dropListRef=n.createDropList(e),this._dropListRef.data=this,c&&this._assignDefaults(c),this._dropListRef.enterPredicate=function(t,e){return l.enterPredicate(t.data,e.data)},this._dropListRef.sortPredicate=function(t,e,n){return l.sortPredicate(t,e.data,n.data)},this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),s&&s._items.add(this)}return g(t,[{key:"disabled",get:function(){return this._disabled||!!this._group&&this._group.disabled},set:function(t){this._dropListRef.disabled=this._disabled=(0,l.Ig)(t)}},{key:"addItem",value:function(t){this._unsortedItems.add(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}},{key:"removeItem",value:function(t){this._unsortedItems.delete(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}},{key:"getSortedItems",value:function(){return Array.from(this._unsortedItems).sort(function(t,e){return t._dragRef.getVisibleElement().compareDocumentPosition(e._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1})}},{key:"ngOnDestroy",value:function(){var e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}},{key:"_setupInputSyncSubscription",value:function(e){var n=this;this._dir&&this._dir.change.pipe((0,x.O)(this._dir.value),(0,_.R)(this._destroyed)).subscribe(function(t){return e.withDirection(t)}),e.beforeStarted.subscribe(function(){var i=(0,l.Eq)(n.connectedTo).map(function(e){return"string"==typeof e?t._dropLists.find(function(t){return t.id===e}):e});if(n._group&&n._group._items.forEach(function(t){-1===i.indexOf(t)&&i.push(t)}),!n._scrollableParentsResolved){var o=n._scrollDispatcher.getAncestorScrollContainers(n.element).map(function(t){return t.getElementRef().nativeElement});n._dropListRef.withScrollableParents(o),n._scrollableParentsResolved=!0}e.disabled=n.disabled,e.lockAxis=n.lockAxis,e.sortingDisabled=(0,l.Ig)(n.sortingDisabled),e.autoScrollDisabled=(0,l.Ig)(n.autoScrollDisabled),e.autoScrollStep=(0,l.su)(n.autoScrollStep,2),e.connectedTo(i.filter(function(t){return t&&t!==n}).map(function(t){return t._dropListRef})).withOrientation(n.orientation)})}},{key:"_handleEvents",value:function(t){var e=this;t.beforeStarted.subscribe(function(){e._syncItemsWithRef(),e._changeDetectorRef.markForCheck()}),t.entered.subscribe(function(t){e.entered.emit({container:e,item:t.item.data,currentIndex:t.currentIndex})}),t.exited.subscribe(function(t){e.exited.emit({container:e,item:t.item.data}),e._changeDetectorRef.markForCheck()}),t.sorted.subscribe(function(t){e.sorted.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,container:e,item:t.item.data})}),t.dropped.subscribe(function(t){e.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,item:t.item.data,isPointerOverContainer:t.isPointerOverContainer,distance:t.distance}),e._changeDetectorRef.markForCheck()})}},{key:"_assignDefaults",value:function(t){var e=t.lockAxis,n=t.draggingDisabled,i=t.sortingDisabled,o=t.listAutoScrollDisabled,a=t.listOrientation;this.disabled=null!=n&&n,this.sortingDisabled=null!=i&&i,this.autoScrollDisabled=null!=o&&o,this.orientation=a||"vertical",e&&(this.lockAxis=e)}},{key:"_syncItemsWithRef",value:function(){this._dropListRef.withItems(this.getSortedItems().map(function(t){return t._dragRef}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.SBq),i.Y36(ct),i.Y36(i.sBO),i.Y36(a.mF),i.Y36(C.Is,8),i.Y36(ut,12),i.Y36(dt,8))},t.\u0275dir=i.lG2({type:t,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(t,e){2&t&&(i.uIk("id",e.id),i.ekj("cdk-drop-list-disabled",e.disabled)("cdk-drop-list-dragging",e._dropListRef.isDragging())("cdk-drop-list-receiving",e._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],id:"id",enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],sortPredicate:["cdkDropListSortPredicate","sortPredicate"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],orientation:["cdkDropListOrientation","orientation"],lockAxis:["cdkDropListLockAxis","lockAxis"],data:["cdkDropListData","data"],autoScrollStep:["cdkDropListAutoScrollStep","autoScrollStep"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[i._Bn([{provide:ut,useValue:void 0},{provide:gt,useExisting:t}])]}),t._dropLists=[],t}(),ft=new i.OlP("CdkDragHandle"),mt=function(){var t=function(){function t(e,n){d(this,t),this.element=e,this._stateChanges=new m.xQ,this._disabled=!1,this._parentDrag=n}return g(t,[{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=(0,l.Ig)(t),this._stateChanges.next(this)}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.SBq),i.Y36(lt,12))},t.\u0275dir=i.lG2({type:t,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:["cdkDragHandleDisabled","disabled"]},features:[i._Bn([{provide:ft,useExisting:t}])]}),t}(),vt=new i.OlP("CdkDragPlaceholder"),bt=new i.OlP("CdkDragPreview"),yt=function(){var t=function(){function t(e,n,o,a,r,s,c,l,p,g,h){var f=this;d(this,t),this.element=e,this.dropContainer=n,this._ngZone=a,this._viewContainerRef=r,this._dir=c,this._changeDetectorRef=p,this._selfHandle=g,this._parentDrag=h,this._destroyed=new m.xQ,this.started=new i.vpe,this.released=new i.vpe,this.ended=new i.vpe,this.entered=new i.vpe,this.exited=new i.vpe,this.dropped=new i.vpe,this.moved=new u.y(function(t){var e=f._dragRef.moved.pipe((0,k.U)(function(t){return{source:f,pointerPosition:t.pointerPosition,event:t.event,delta:t.delta,distance:t.distance}})).subscribe(t);return function(){e.unsubscribe()}}),this._dragRef=l.createDrag(e,{dragStartThreshold:s&&null!=s.dragStartThreshold?s.dragStartThreshold:5,pointerDirectionChangeThreshold:s&&null!=s.pointerDirectionChangeThreshold?s.pointerDirectionChangeThreshold:5,zIndex:null==s?void 0:s.zIndex}),this._dragRef.data=this,t._dragInstances.push(this),s&&this._assignDefaults(s),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}return g(t,[{key:"disabled",get:function(){return this._disabled||this.dropContainer&&this.dropContainer.disabled},set:function(t){this._disabled=(0,l.Ig)(t),this._dragRef.disabled=this._disabled}},{key:"getPlaceholderElement",value:function(){return this._dragRef.getPlaceholderElement()}},{key:"getRootElement",value:function(){return this._dragRef.getRootElement()}},{key:"reset",value:function(){this._dragRef.reset()}},{key:"getFreeDragPosition",value:function(){return this._dragRef.getFreeDragPosition()}},{key:"ngAfterViewInit",value:function(){var t=this;this._ngZone.onStable.pipe((0,Z.q)(1),(0,_.R)(this._destroyed)).subscribe(function(){t._updateRootElement(),t._handles.changes.pipe((0,x.O)(t._handles),(0,w.b)(function(e){var n=e.filter(function(e){return e._parentDrag===t}).map(function(t){return t.element});t._selfHandle&&t.rootElementSelector&&n.push(t.element),t._dragRef.withHandles(n)}),(0,A.w)(function(t){return y.T.apply(void 0,c(t.map(function(t){return t._stateChanges.pipe((0,x.O)(t))})))}),(0,_.R)(t._destroyed)).subscribe(function(e){var n=t._dragRef,i=e.element.nativeElement;e.disabled?n.disableHandle(i):n.enableHandle(i)}),t.freeDragPosition&&t._dragRef.setFreeDragPosition(t.freeDragPosition)})}},{key:"ngOnChanges",value:function(t){var e=t.rootElementSelector,n=t.freeDragPosition;e&&!e.firstChange&&this._updateRootElement(),n&&!n.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}},{key:"ngOnDestroy",value:function(){this.dropContainer&&this.dropContainer.removeItem(this);var e=t._dragInstances.indexOf(this);e>-1&&t._dragInstances.splice(e,1),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()}},{key:"_updateRootElement",value:function(){var t=this.element.nativeElement,e=this.rootElementSelector?_t(t,this.rootElementSelector):t;this._dragRef.withRootElement(e||t)}},{key:"_getBoundaryElement",value:function(){var t=this.boundaryElement;return t?"string"==typeof t?_t(this.element.nativeElement,t):(0,l.fI)(t):null}},{key:"_syncInputs",value:function(e){var n=this;e.beforeStarted.subscribe(function(){if(!e.isDragging()){var t=n._dir,i=n.dragStartDelay,o=n._placeholderTemplate?{template:n._placeholderTemplate.templateRef,context:n._placeholderTemplate.data,viewContainer:n._viewContainerRef}:null,a=n._previewTemplate?{template:n._previewTemplate.templateRef,context:n._previewTemplate.data,matchSize:n._previewTemplate.matchSize,viewContainer:n._viewContainerRef}:null;e.disabled=n.disabled,e.lockAxis=n.lockAxis,e.dragStartDelay="object"==typeof i&&i?i:(0,l.su)(i),e.constrainPosition=n.constrainPosition,e.previewClass=n.previewClass,e.withBoundaryElement(n._getBoundaryElement()).withPlaceholderTemplate(o).withPreviewTemplate(a),t&&e.withDirection(t.value)}}),e.beforeStarted.pipe((0,Z.q)(1)).subscribe(function(){var i,o;if(n._parentDrag)e.withParent(n._parentDrag._dragRef);else for(var a=n.element.nativeElement.parentElement;a;){if(null===(i=a.classList)||void 0===i?void 0:i.contains("cdk-drag")){e.withParent((null===(o=t._dragInstances.find(function(t){return t.element.nativeElement===a}))||void 0===o?void 0:o._dragRef)||null);break}a=a.parentElement}})}},{key:"_handleEvents",value:function(t){var e=this;t.started.subscribe(function(){e.started.emit({source:e}),e._changeDetectorRef.markForCheck()}),t.released.subscribe(function(){e.released.emit({source:e})}),t.ended.subscribe(function(t){e.ended.emit({source:e,distance:t.distance}),e._changeDetectorRef.markForCheck()}),t.entered.subscribe(function(t){e.entered.emit({container:t.container.data,item:e,currentIndex:t.currentIndex})}),t.exited.subscribe(function(t){e.exited.emit({container:t.container.data,item:e})}),t.dropped.subscribe(function(t){e.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:e,distance:t.distance})})}},{key:"_assignDefaults",value:function(t){var e=t.lockAxis,n=t.dragStartDelay,i=t.constrainPosition,o=t.previewClass,a=t.boundaryElement,r=t.draggingDisabled,s=t.rootElementSelector;this.disabled=null!=r&&r,this.dragStartDelay=n||0,e&&(this.lockAxis=e),i&&(this.constrainPosition=i),o&&(this.previewClass=o),a&&(this.boundaryElement=a),s&&(this.rootElementSelector=s)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.SBq),i.Y36(gt,12),i.Y36(o.K0),i.Y36(i.R0b),i.Y36(i.s_b),i.Y36(dt,8),i.Y36(C.Is,8),i.Y36(ct),i.Y36(i.sBO),i.Y36(ft,10),i.Y36(lt,12))},t.\u0275dir=i.lG2({type:t,selectors:[["","cdkDrag",""]],contentQueries:function(t,e,n){var o;(1&t&&(i.Suo(n,bt,5),i.Suo(n,vt,5),i.Suo(n,ft,5)),2&t)&&(i.iGM(o=i.CRH())&&(e._previewTemplate=o.first),i.iGM(o=i.CRH())&&(e._placeholderTemplate=o.first),i.iGM(o=i.CRH())&&(e._handles=o))},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(t,e){2&t&&i.ekj("cdk-drag-disabled",e.disabled)("cdk-drag-dragging",e._dragRef.isDragging())},inputs:{disabled:["cdkDragDisabled","disabled"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],lockAxis:["cdkDragLockAxis","lockAxis"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],boundaryElement:["cdkDragBoundary","boundaryElement"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],data:["cdkDragData","data"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[i._Bn([{provide:lt,useExisting:t}]),i.TTD]}),t._dragInstances=[],t}();function _t(t,e){for(var n=t.parentElement;n;){if(n.matches?n.matches(e):n.msMatchesSelector(e))return n;n=n.parentElement}return null}var xt=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i.oAB({type:t}),t.\u0275inj=i.cJS({providers:[ct],imports:[a.ZD]}),t}()},79961:function(t,n,o){"use strict";o.d(n,{XC:function(){return Y},Bb:function(){return V},ZL:function(){return H}});var a=o(97388),r=o(19861),s=o(93169),l=o(35366),u=o(87064),p=o(87570),h=o(55959),f=o(31450),m=o(31906),v=o(40878),b=o(87254),y=o(61116),_=o(77923),x=o(43725),k=o(99235),Z=o(82151),w=o(31041),A=o(13070),C=o(90611),T=o(44689),q=o(43835),I=o(79996),O=o(66599),U=o(82628),P=o(94720),M=["panel"];function S(t,e){if(1&t&&(l.TgZ(0,"div",0,1),l.Hsn(2),l.qZA()),2&t){var n=e.id,i=l.oxw();l.Q6J("id",i.id)("ngClass",i._classList),l.uIk("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(n))}}var N=["*"],J=0,E=function t(e,n){d(this,t),this.source=e,this.option=n},L=(0,u.Kr)(function t(){d(this,t)}),D=new l.OlP("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1}}}),R=function(){var t=function(t){e(o,t);var n=i(o);function o(t,e,i,a){var r;return d(this,o),(r=n.call(this))._changeDetectorRef=t,r._elementRef=e,r._activeOptionChanges=p.w.EMPTY,r.showPanel=!1,r._isOpen=!1,r.displayWith=null,r.optionSelected=new l.vpe,r.opened=new l.vpe,r.closed=new l.vpe,r.optionActivated=new l.vpe,r._classList={},r.id="mat-autocomplete-"+J++,r.inertGroups=(null==a?void 0:a.SAFARI)||!1,r._autoActiveFirstOption=!!i.autoActiveFirstOption,r}return g(o,[{key:"isOpen",get:function(){return this._isOpen&&this.showPanel}},{key:"autoActiveFirstOption",get:function(){return this._autoActiveFirstOption},set:function(t){this._autoActiveFirstOption=(0,r.Ig)(t)}},{key:"classList",set:function(t){this._classList=t&&t.length?(0,r.du)(t).reduce(function(t,e){return t[e]=!0,t},{}):{},this._setVisibilityClasses(this._classList),this._elementRef.nativeElement.className=""}},{key:"ngAfterContentInit",value:function(){var t=this;this._keyManager=new a.s1(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe(function(e){t.optionActivated.emit({source:t,option:t.options.toArray()[e]||null})}),this._setVisibility()}},{key:"ngOnDestroy",value:function(){this._activeOptionChanges.unsubscribe()}},{key:"_setScrollTop",value:function(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}},{key:"_getScrollTop",value:function(){return this.panel?this.panel.nativeElement.scrollTop:0}},{key:"_setVisibility",value:function(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}},{key:"_emitSelectEvent",value:function(t){var e=new E(this,t);this.optionSelected.emit(e)}},{key:"_getPanelAriaLabelledby",value:function(t){return this.ariaLabel?null:this.ariaLabelledby?(t?t+" ":"")+this.ariaLabelledby:t}},{key:"_setVisibilityClasses",value:function(t){t[this._visibleClass]=this.showPanel,t[this._hiddenClass]=!this.showPanel}}]),o}(L);return t.\u0275fac=function(e){return new(e||t)(l.Y36(l.sBO),l.Y36(l.SBq),l.Y36(D),l.Y36(s.t4))},t.\u0275dir=l.lG2({type:t,viewQuery:function(t,e){var n;(1&t&&(l.Gf(l.Rgc,7),l.Gf(M,5)),2&t)&&(l.iGM(n=l.CRH())&&(e.template=n.first),l.iGM(n=l.CRH())&&(e.panel=n.first))},inputs:{displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",classList:["class","classList"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],panelWidth:"panelWidth"},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[l.qOj]}),t}(),Y=function(){var t,n=function(t){e(o,t);var n=i(o);function o(){var t;return d(this,o),(t=n.apply(this,arguments))._visibleClass="mat-autocomplete-visible",t._hiddenClass="mat-autocomplete-hidden",t}return o}(R);return n.\u0275fac=function(e){return(t||(t=l.n5z(n)))(e||n)},n.\u0275cmp=l.Xpm({type:n,selectors:[["mat-autocomplete"]],contentQueries:function(t,e,n){var i;(1&t&&(l.Suo(n,u.K7,5),l.Suo(n,u.ey,5)),2&t)&&(l.iGM(i=l.CRH())&&(e.optionGroups=i),l.iGM(i=l.CRH())&&(e.options=i))},hostAttrs:[1,"mat-autocomplete"],inputs:{disableRipple:"disableRipple"},exportAs:["matAutocomplete"],features:[l._Bn([{provide:u.HF,useExisting:n}]),l.qOj],ngContentSelectors:N,decls:1,vars:0,consts:[["role","listbox",1,"mat-autocomplete-panel",3,"id","ngClass"],["panel",""]],template:function(t,e){1&t&&(l.F$t(),l.YNc(0,S,3,4,"ng-template"))},directives:[y.mk],styles:[".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}.mat-autocomplete-panel-above .mat-autocomplete-panel{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}.mat-autocomplete-panel .mat-divider-horizontal{margin-top:-1px}.cdk-high-contrast-active .mat-autocomplete-panel{outline:solid 1px}mat-autocomplete{display:none}\n"],encapsulation:2,changeDetection:0}),n}(),F=new l.OlP("mat-autocomplete-scroll-strategy"),Q={provide:F,deps:[_.aV],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},$={provide:w.JU,useExisting:(0,l.Gpc)(function(){return H}),multi:!0},B=function(){var t=function(){function t(e,n,i,o,a,r,s,l,u,g,v){var b=this;d(this,t),this._element=e,this._overlay=n,this._viewContainerRef=i,this._zone=o,this._changeDetectorRef=a,this._dir=s,this._formField=l,this._document=u,this._viewportRuler=g,this._defaults=v,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=p.w.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new h.xQ,this._windowBlurHandler=function(){b._canOpenOnNextFocus=b._document.activeElement!==b._element.nativeElement||b.panelOpen},this._onChange=function(){},this._onTouched=function(){},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=(0,f.P)(function(){return b.autocomplete&&b.autocomplete.options?m.T.apply(void 0,c(b.autocomplete.options.map(function(t){return t.onSelectionChange}))):b._zone.onStable.pipe((0,C.q)(1),(0,T.w)(function(){return b.optionSelections}))}),this._scrollStrategy=r}return g(t,[{key:"autocompleteDisabled",get:function(){return this._autocompleteDisabled},set:function(t){this._autocompleteDisabled=(0,r.Ig)(t)}},{key:"ngAfterViewInit",value:function(){var t=this,e=this._getWindow();void 0!==e&&this._zone.runOutsideAngular(function(){return e.addEventListener("blur",t._windowBlurHandler)})}},{key:"ngOnChanges",value:function(t){t.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}},{key:"ngOnDestroy",value:function(){var t=this._getWindow();void 0!==t&&t.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}},{key:"panelOpen",get:function(){return this._overlayAttached&&this.autocomplete.showPanel}},{key:"openPanel",value:function(){this._attachOverlay(),this._floatLabel()}},{key:"closePanel",value:function(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this.autocomplete.closed.emit(),this.autocomplete._isOpen=this._overlayAttached=!1,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}},{key:"updatePosition",value:function(){this._overlayAttached&&this._overlayRef.updatePosition()}},{key:"panelClosingActions",get:function(){var t=this;return(0,m.T)(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe((0,q.h)(function(){return t._overlayAttached})),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe((0,q.h)(function(){return t._overlayAttached})):(0,v.of)()).pipe((0,I.U)(function(t){return t instanceof u.rN?t:null}))}},{key:"activeOption",get:function(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}},{key:"_getOutsideClickStream",value:function(){var t=this;return(0,m.T)((0,b.R)(this._document,"click"),(0,b.R)(this._document,"auxclick"),(0,b.R)(this._document,"touchend")).pipe((0,q.h)(function(e){var n=t._isInsideShadowRoot&&e.composedPath?e.composedPath()[0]:e.target,i=t._formField?t._formField._elementRef.nativeElement:null,o=t.connectedTo?t.connectedTo.elementRef.nativeElement:null;return t._overlayAttached&&n!==t._element.nativeElement&&(!i||!i.contains(n))&&(!o||!o.contains(n))&&!!t._overlayRef&&!t._overlayRef.overlayElement.contains(n)}))}},{key:"writeValue",value:function(t){var e=this;Promise.resolve(null).then(function(){return e._setTriggerValue(t)})}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this._element.nativeElement.disabled=t}},{key:"_handleKeydown",value:function(t){var e=t.keyCode;if(e!==k.hY||(0,k.Vb)(t)||t.preventDefault(),this.activeOption&&e===k.K5&&this.panelOpen)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){var n=this.autocomplete._keyManager.activeItem,i=e===k.LH||e===k.JH;this.panelOpen||e===k.Mf?this.autocomplete._keyManager.onKeydown(t):i&&this._canOpen()&&this.openPanel(),(i||this.autocomplete._keyManager.activeItem!==n)&&this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0)}}},{key:"_handleInput",value:function(t){var e=t.target,n=e.value;"number"===e.type&&(n=""==n?null:parseFloat(n)),this._previousValue!==n&&(this._previousValue=n,this._onChange(n),this._canOpen()&&this._document.activeElement===t.target&&this.openPanel())}},{key:"_handleFocus",value:function(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}},{key:"_floatLabel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._formField&&"auto"===this._formField.floatLabel&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}},{key:"_resetLabel",value:function(){this._manuallyFloatingLabel&&(this._formField.floatLabel="auto",this._manuallyFloatingLabel=!1)}},{key:"_subscribeToClosingActions",value:function(){var t=this,e=this._zone.onStable.pipe((0,C.q)(1)),n=this.autocomplete.options.changes.pipe((0,O.b)(function(){return t._positionStrategy.reapplyLastPosition()}),(0,U.g)(0));return(0,m.T)(e,n).pipe((0,T.w)(function(){var e=t.panelOpen;return t._resetActiveItem(),t.autocomplete._setVisibility(),t.panelOpen&&(t._overlayRef.updatePosition(),e!==t.panelOpen&&t.autocomplete.opened.emit()),t.panelClosingActions}),(0,C.q)(1)).subscribe(function(e){return t._setValueAndClose(e)})}},{key:"_destroyPanel",value:function(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}},{key:"_setTriggerValue",value:function(t){var e=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(t):t,n=null!=e?e:"";this._formField?this._formField._control.value=n:this._element.nativeElement.value=n,this._previousValue=n}},{key:"_setValueAndClose",value:function(t){t&&t.source&&(this._clearPreviousSelectedOption(t.source),this._setTriggerValue(t.source.value),this._onChange(t.source.value),this._element.nativeElement.focus(),this.autocomplete._emitSelectEvent(t.source)),this.closePanel()}},{key:"_clearPreviousSelectedOption",value:function(t){this.autocomplete.options.forEach(function(e){e!==t&&e.selected&&e.deselect()})}},{key:"_attachOverlay",value:function(){var t,e=this;null==this._isInsideShadowRoot&&(this._isInsideShadowRoot=!!(0,s.kV)(this._element.nativeElement));var n=this._overlayRef;n?(this._positionStrategy.setOrigin(this._getConnectedElement()),n.updateSize({width:this._getPanelWidth()})):(this._portal=new Z.UE(this.autocomplete.template,this._viewContainerRef,{id:null===(t=this._formField)||void 0===t?void 0:t.getLabelId()}),n=this._overlay.create(this._getOverlayConfig()),this._overlayRef=n,n.keydownEvents().subscribe(function(t){(t.keyCode===k.hY&&!(0,k.Vb)(t)||t.keyCode===k.LH&&(0,k.Vb)(t,"altKey"))&&(e._resetActiveItem(),e._closeKeyEventStream.next(),t.stopPropagation(),t.preventDefault())}),this._viewportSubscription=this._viewportRuler.change().subscribe(function(){e.panelOpen&&n&&n.updateSize({width:e._getPanelWidth()})})),n&&!n.hasAttached()&&(n.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());var i=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.panelOpen&&i!==this.panelOpen&&this.autocomplete.opened.emit()}},{key:"_getOverlayConfig",value:function(){var t;return new _.X_({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir,panelClass:null===(t=this._defaults)||void 0===t?void 0:t.overlayPanelClass})}},{key:"_getOverlayPosition",value:function(){var t=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(t),this._positionStrategy=t,t}},{key:"_setStrategyPositions",value:function(t){var e,n=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],i=this._aboveClass,o=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:i},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:i}];e="above"===this.position?o:"below"===this.position?n:[].concat(n,o),t.withPositions(e)}},{key:"_getConnectedElement",value:function(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}},{key:"_getPanelWidth",value:function(){return this.autocomplete.panelWidth||this._getHostWidth()}},{key:"_getHostWidth",value:function(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}},{key:"_resetActiveItem",value:function(){var t=this.autocomplete;t.autoActiveFirstOption?t._keyManager.setFirstItemActive():t._keyManager.setActiveItem(-1)}},{key:"_canOpen",value:function(){var t=this._element.nativeElement;return!t.readOnly&&!t.disabled&&!this._autocompleteDisabled}},{key:"_getWindow",value:function(){var t;return(null===(t=this._document)||void 0===t?void 0:t.defaultView)||window}},{key:"_scrollToOption",value:function(t){var e=this.autocomplete,n=(0,u.CB)(t,e.options,e.optionGroups);if(0===t&&1===n)e._setScrollTop(0);else if(e.panel){var i=e.options.toArray()[t];if(i){var o=i._getHostElement(),a=(0,u.jH)(o.offsetTop,o.offsetHeight,e._getScrollTop(),e.panel.nativeElement.offsetHeight);e._setScrollTop(a)}}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(l.Y36(l.SBq),l.Y36(_.aV),l.Y36(l.s_b),l.Y36(l.R0b),l.Y36(l.sBO),l.Y36(F),l.Y36(P.Is,8),l.Y36(A.G_,9),l.Y36(y.K0,8),l.Y36(x.rL),l.Y36(D,8))},t.\u0275dir=l.lG2({type:t,inputs:{position:["matAutocompletePosition","position"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"],autocomplete:["matAutocomplete","autocomplete"],connectedTo:["matAutocompleteConnectedTo","connectedTo"]},features:[l.TTD]}),t}(),H=function(){var t,n=function(t){e(o,t);var n=i(o);function o(){var t;return d(this,o),(t=n.apply(this,arguments))._aboveClass="mat-autocomplete-panel-above",t}return o}(B);return n.\u0275fac=function(e){return(t||(t=l.n5z(n)))(e||n)},n.\u0275dir=l.lG2({type:n,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-autocomplete-trigger"],hostVars:7,hostBindings:function(t,e){1&t&&l.NdJ("focusin",function(){return e._handleFocus()})("blur",function(){return e._onTouched()})("input",function(t){return e._handleInput(t)})("keydown",function(t){return e._handleKeydown(t)}),2&t&&l.uIk("autocomplete",e.autocompleteAttribute)("role",e.autocompleteDisabled?null:"combobox")("aria-autocomplete",e.autocompleteDisabled?null:"list")("aria-activedescendant",e.panelOpen&&e.activeOption?e.activeOption.id:null)("aria-expanded",e.autocompleteDisabled?null:e.panelOpen.toString())("aria-owns",e.autocompleteDisabled||!e.panelOpen||null==e.autocomplete?null:e.autocomplete.id)("aria-haspopup",!e.autocompleteDisabled)},exportAs:["matAutocompleteTrigger"],features:[l._Bn([$]),l.qOj]}),n}(),V=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=l.oAB({type:t}),t.\u0275inj=l.cJS({providers:[Q],imports:[[_.U8,u.Ng,u.BQ,y.ez],x.ZD,u.Ng,u.BQ]}),t}()},92762:function(t,n,o){"use strict";o.d(n,{Yi:function(){return Z},A9:function(){return x},vV:function(){return w}});var a=o(19861),r=o(58378),s=o(35366),l=o(31041),u=o(87064),p=o(97388),h=["button"],f=["*"],m=new s.OlP("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS"),v=new s.OlP("MatButtonToggleGroup"),b={provide:l.JU,useExisting:(0,s.Gpc)(function(){return x}),multi:!0},y=0,_=function t(e,n){d(this,t),this.source=e,this.value=n},x=function(){var t=function(){function t(e,n){d(this,t),this._changeDetector=e,this._vertical=!1,this._multiple=!1,this._disabled=!1,this._controlValueAccessorChangeFn=function(){},this._onTouched=function(){},this._name="mat-button-toggle-group-"+y++,this.valueChange=new s.vpe,this.change=new s.vpe,this.appearance=n&&n.appearance?n.appearance:"standard"}return g(t,[{key:"name",get:function(){return this._name},set:function(t){var e=this;this._name=t,this._buttonToggles&&this._buttonToggles.forEach(function(t){t.name=e._name,t._markForCheck()})}},{key:"vertical",get:function(){return this._vertical},set:function(t){this._vertical=(0,a.Ig)(t)}},{key:"value",get:function(){var t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(function(t){return t.value}):t[0]?t[0].value:void 0},set:function(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}},{key:"selected",get:function(){var t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=(0,a.Ig)(t)}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=(0,a.Ig)(t),this._buttonToggles&&this._buttonToggles.forEach(function(t){return t._markForCheck()})}},{key:"ngOnInit",value:function(){this._selectionModel=new r.Ov(this.multiple,void 0,!1)}},{key:"ngAfterContentInit",value:function(){var t;(t=this._selectionModel).select.apply(t,c(this._buttonToggles.filter(function(t){return t.checked})))}},{key:"writeValue",value:function(t){this.value=t,this._changeDetector.markForCheck()}},{key:"registerOnChange",value:function(t){this._controlValueAccessorChangeFn=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t}},{key:"_emitChangeEvent",value:function(){var t=this.selected,e=Array.isArray(t)?t[t.length-1]:t,n=new _(e,this.value);this._controlValueAccessorChangeFn(n.value),this.change.emit(n)}},{key:"_syncButtonToggle",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.multiple||!this.selected||t.checked||(this.selected.checked=!1),this._selectionModel?e?this._selectionModel.select(t):this._selectionModel.deselect(t):o=!0,o?Promise.resolve().then(function(){return n._updateModelValue(i)}):this._updateModelValue(i)}},{key:"_isSelected",value:function(t){return this._selectionModel&&this._selectionModel.isSelected(t)}},{key:"_isPrechecked",value:function(t){return void 0!==this._rawValue&&(this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(function(e){return null!=t.value&&e===t.value}):t.value===this._rawValue)}},{key:"_setSelectionByValue",value:function(t){var e=this;this._rawValue=t,this._buttonToggles&&(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach(function(t){return e._selectValue(t)})):(this._clearSelection(),this._selectValue(t)))}},{key:"_clearSelection",value:function(){this._selectionModel.clear(),this._buttonToggles.forEach(function(t){return t.checked=!1})}},{key:"_selectValue",value:function(t){var e=this._buttonToggles.find(function(e){return null!=e.value&&e.value===t});e&&(e.checked=!0,this._selectionModel.select(e))}},{key:"_updateModelValue",value:function(t){t&&this._emitChangeEvent(),this.valueChange.emit(this.value)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Y36(s.sBO),s.Y36(m,8))},t.\u0275dir=s.lG2({type:t,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,e,n){var i;(1&t&&s.Suo(n,Z,5),2&t)&&(s.iGM(i=s.CRH())&&(e._buttonToggles=i))},hostAttrs:["role","group",1,"mat-button-toggle-group"],hostVars:5,hostBindings:function(t,e){2&t&&(s.uIk("aria-disabled",e.disabled),s.ekj("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard","standard"===e.appearance))},inputs:{appearance:"appearance",name:"name",vertical:"vertical",value:"value",multiple:"multiple",disabled:"disabled"},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[s._Bn([b,{provide:v,useExisting:t}])]}),t}(),k=(0,u.Kr)(function t(){d(this,t)}),Z=function(){var t=function(t){e(o,t);var n=i(o);function o(t,e,i,a,r,c){var l;d(this,o),(l=n.call(this))._changeDetectorRef=e,l._elementRef=i,l._focusMonitor=a,l._isSingleSelector=!1,l._checked=!1,l.ariaLabelledby=null,l._disabled=!1,l.change=new s.vpe;var u=Number(r);return l.tabIndex=u||0===u?u:null,l.buttonToggleGroup=t,l.appearance=c&&c.appearance?c.appearance:"standard",l}return g(o,[{key:"buttonId",get:function(){return"".concat(this.id,"-button")}},{key:"appearance",get:function(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance},set:function(t){this._appearance=t}},{key:"checked",get:function(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked},set:function(t){var e=(0,a.Ig)(t);e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}},{key:"disabled",get:function(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled},set:function(t){this._disabled=(0,a.Ig)(t)}},{key:"ngOnInit",value:function(){var t=this.buttonToggleGroup;this._isSingleSelector=t&&!t.multiple,this.id=this.id||"mat-button-toggle-"+y++,this._isSingleSelector&&(this.name=t.name),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}},{key:"ngAfterViewInit",value:function(){this._focusMonitor.monitor(this._elementRef,!0)}},{key:"ngOnDestroy",value:function(){var t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}},{key:"focus",value:function(t){this._buttonElement.nativeElement.focus(t)}},{key:"_onButtonClick",value:function(){var t=!!this._isSingleSelector||!this._checked;t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.change.emit(new _(this,this.value))}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}}]),o}(k);return t.\u0275fac=function(e){return new(e||t)(s.Y36(v,8),s.Y36(s.sBO),s.Y36(s.SBq),s.Y36(p.tE),s.$8M("tabindex"),s.Y36(m,8))},t.\u0275cmp=s.Xpm({type:t,selectors:[["mat-button-toggle"]],viewQuery:function(t,e){var n;(1&t&&s.Gf(h,5),2&t)&&(s.iGM(n=s.CRH())&&(e._buttonElement=n.first))},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:12,hostBindings:function(t,e){1&t&&s.NdJ("focus",function(){return e.focus()}),2&t&&(s.uIk("aria-label",null)("aria-labelledby",null)("id",e.id)("name",null),s.ekj("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-appearance-standard","standard"===e.appearance))},inputs:{disableRipple:"disableRipple",ariaLabelledby:["aria-labelledby","ariaLabelledby"],tabIndex:"tabIndex",appearance:"appearance",checked:"checked",disabled:"disabled",id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],value:"value"},outputs:{change:"change"},exportAs:["matButtonToggle"],features:[s.qOj],ngContentSelectors:f,decls:6,vars:9,consts:[["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"id","disabled","click"],["button",""],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,e){if(1&t&&(s.F$t(),s.TgZ(0,"button",0,1),s.NdJ("click",function(){return e._onButtonClick()}),s.TgZ(2,"span",2),s.Hsn(3),s.qZA(),s.qZA(),s._UZ(4,"span",3),s._UZ(5,"span",4)),2&t){var n=s.MAs(1);s.Q6J("id",e.buttonId)("disabled",e.disabled||null),s.uIk("tabindex",e.disabled?-1:e.tabIndex)("aria-pressed",e.checked)("name",e.name||null)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),s.xp6(5),s.Q6J("matRippleTrigger",n)("matRippleDisabled",e.disableRipple||e.disabled)}},directives:[u.wG],styles:[".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;border-radius:2px;-webkit-tap-highlight-color:transparent}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:4px}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}.cdk-high-contrast-active .mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:.5}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.04}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.12}.cdk-high-contrast-active .mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.5}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{border-radius:inherit;pointer-events:none;opacity:0;top:0;left:0;right:0;bottom:0;position:absolute}.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 36px}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}\n"],encapsulation:2,changeDetection:0}),t}(),w=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=s.oAB({type:t}),t.\u0275inj=s.cJS({imports:[[u.BQ,u.si],u.BQ]}),t}()},95522:function(t,n,o){"use strict";o.d(n,{HS:function(){return U},oH:function(){return D},qn:function(){return E},qH:function(){return P},Hi:function(){return Y}});var r=o(99235),s=o(35366),l=o(87064),u=o(19861),p=o(61116),h=o(26136),f=o(55959),m=o(31906),v=o(90611),b=o(25416),y=o(56238),_=o(97388),x=o(58378),k=o(13070),Z=o(93169),w=o(94720),A=o(31041),C=["*"],T=new s.OlP("MatChipRemove"),q=new s.OlP("MatChipAvatar"),I=new s.OlP("MatChipTrailingIcon"),O=(0,l.sb)((0,l.pj)((0,l.Kr)(function t(e){d(this,t),this._elementRef=e}),"primary"),-1),U=function(){var t=function(t){e(o,t);var n=i(o);function o(t,e,i,r,c,u,p,g){var h;return d(this,o),(h=n.call(this,t))._elementRef=t,h._ngZone=e,h._changeDetectorRef=c,h._hasFocus=!1,h.chipListSelectable=!0,h._chipListMultiple=!1,h._chipListDisabled=!1,h._selected=!1,h._selectable=!0,h._disabled=!1,h._removable=!0,h._onFocus=new f.xQ,h._onBlur=new f.xQ,h.selectionChange=new s.vpe,h.destroyed=new s.vpe,h.removed=new s.vpe,h._addHostClassName(),h._chipRippleTarget=u.createElement("div"),h._chipRippleTarget.classList.add("mat-chip-ripple"),h._elementRef.nativeElement.appendChild(h._chipRippleTarget),h._chipRipple=new l.IR(a(h),e,h._chipRippleTarget,i),h._chipRipple.setupTriggerEvents(t),h.rippleConfig=r||{},h._animationsDisabled="NoopAnimations"===p,h.tabIndex=null!=g&&parseInt(g)||-1,h}return g(o,[{key:"rippleDisabled",get:function(){return this.disabled||this.disableRipple||this._animationsDisabled||!!this.rippleConfig.disabled}},{key:"selected",get:function(){return this._selected},set:function(t){var e=(0,u.Ig)(t);e!==this._selected&&(this._selected=e,this._dispatchSelectionChange())}},{key:"value",get:function(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent},set:function(t){this._value=t}},{key:"selectable",get:function(){return this._selectable&&this.chipListSelectable},set:function(t){this._selectable=(0,u.Ig)(t)}},{key:"disabled",get:function(){return this._chipListDisabled||this._disabled},set:function(t){this._disabled=(0,u.Ig)(t)}},{key:"removable",get:function(){return this._removable},set:function(t){this._removable=(0,u.Ig)(t)}},{key:"ariaSelected",get:function(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}},{key:"_addHostClassName",value:function(){var t=this._elementRef.nativeElement;t.hasAttribute("mat-basic-chip")||"mat-basic-chip"===t.tagName.toLowerCase()?t.classList.add("mat-basic-chip"):t.classList.add("mat-standard-chip")}},{key:"ngOnDestroy",value:function(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}},{key:"select",value:function(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}},{key:"deselect",value:function(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}},{key:"selectViaInteraction",value:function(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._changeDetectorRef.markForCheck())}},{key:"toggleSelected",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._selected=!this.selected,this._dispatchSelectionChange(t),this._changeDetectorRef.markForCheck(),this.selected}},{key:"focus",value:function(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}},{key:"remove",value:function(){this.removable&&this.removed.emit({chip:this})}},{key:"_handleClick",value:function(t){this.disabled?t.preventDefault():t.stopPropagation()}},{key:"_handleKeydown",value:function(t){if(!this.disabled)switch(t.keyCode){case r.yY:case r.ZH:this.remove(),t.preventDefault();break;case r.L_:this.selectable&&this.toggleSelected(!0),t.preventDefault()}}},{key:"_blur",value:function(){var t=this;this._ngZone.onStable.pipe((0,v.q)(1)).subscribe(function(){t._ngZone.run(function(){t._hasFocus=!1,t._onBlur.next({chip:t})})})}},{key:"_dispatchSelectionChange",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.selectionChange.emit({source:this,isUserInput:t,selected:this._selected})}}]),o}(O);return t.\u0275fac=function(e){return new(e||t)(s.Y36(s.SBq),s.Y36(s.R0b),s.Y36(Z.t4),s.Y36(l.Y2,8),s.Y36(s.sBO),s.Y36(p.K0),s.Y36(h.Qb,8),s.$8M("tabindex"))},t.\u0275dir=s.lG2({type:t,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(t,e,n){var i;(1&t&&(s.Suo(n,q,5),s.Suo(n,I,5),s.Suo(n,T,5)),2&t)&&(s.iGM(i=s.CRH())&&(e.avatar=i.first),s.iGM(i=s.CRH())&&(e.trailingIcon=i.first),s.iGM(i=s.CRH())&&(e.removeIcon=i.first))},hostAttrs:["role","option",1,"mat-chip","mat-focus-indicator"],hostVars:14,hostBindings:function(t,e){1&t&&s.NdJ("click",function(t){return e._handleClick(t)})("keydown",function(t){return e._handleKeydown(t)})("focus",function(){return e.focus()})("blur",function(){return e._blur()}),2&t&&(s.uIk("tabindex",e.disabled?null:e.tabIndex)("disabled",e.disabled||null)("aria-disabled",e.disabled.toString())("aria-selected",e.ariaSelected),s.ekj("mat-chip-selected",e.selected)("mat-chip-with-avatar",e.avatar)("mat-chip-with-trailing-icon",e.trailingIcon||e.removeIcon)("mat-chip-disabled",e.disabled)("_mat-animation-noopable",e._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[s.qOj]}),t}(),P=function(){var t=function(){function t(e,n){d(this,t),this._parentChip=e,"BUTTON"===n.nativeElement.nodeName&&n.nativeElement.setAttribute("type","button")}return g(t,[{key:"_handleClick",value:function(t){var e=this._parentChip;e.removable&&!e.disabled&&e.remove(),t.stopPropagation()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Y36(U),s.Y36(s.SBq))},t.\u0275dir=s.lG2({type:t,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(t,e){1&t&&s.NdJ("click",function(t){return e._handleClick(t)})},features:[s._Bn([{provide:T,useExisting:t}])]}),t}(),M=new s.OlP("mat-chips-default-options"),S=(0,l.FD)(function t(e,n,i,o){d(this,t),this._defaultErrorStateMatcher=e,this._parentForm=n,this._parentFormGroup=i,this.ngControl=o}),N=0,J=function t(e,n){d(this,t),this.source=e,this.value=n},E=function(){var t=function(t){e(o,t);var n=i(o);function o(t,e,i,r,c,l,u){var p;return d(this,o),(p=n.call(this,l,r,c,u))._elementRef=t,p._changeDetectorRef=e,p._dir=i,p.ngControl=u,p.controlType="mat-chip-list",p._lastDestroyedChipIndex=null,p._destroyed=new f.xQ,p._uid="mat-chip-list-"+N++,p._tabIndex=0,p._userTabIndex=null,p._onTouched=function(){},p._onChange=function(){},p._multiple=!1,p._compareWith=function(t,e){return t===e},p._required=!1,p._disabled=!1,p.ariaOrientation="horizontal",p._selectable=!0,p.change=new s.vpe,p.valueChange=new s.vpe,p.ngControl&&(p.ngControl.valueAccessor=a(p)),p}return g(o,[{key:"selected",get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}},{key:"role",get:function(){return this.empty?null:"listbox"}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=(0,u.Ig)(t),this._syncChipsState()}},{key:"compareWith",get:function(){return this._compareWith},set:function(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}},{key:"value",get:function(){return this._value},set:function(t){this.writeValue(t),this._value=t}},{key:"id",get:function(){return this._chipInput?this._chipInput.id:this._uid}},{key:"required",get:function(){return this._required},set:function(t){this._required=(0,u.Ig)(t),this.stateChanges.next()}},{key:"placeholder",get:function(){return this._chipInput?this._chipInput.placeholder:this._placeholder},set:function(t){this._placeholder=t,this.stateChanges.next()}},{key:"focused",get:function(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}},{key:"empty",get:function(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}},{key:"shouldLabelFloat",get:function(){return!this.empty||this.focused}},{key:"disabled",get:function(){return this.ngControl?!!this.ngControl.disabled:this._disabled},set:function(t){this._disabled=(0,u.Ig)(t),this._syncChipsState()}},{key:"selectable",get:function(){return this._selectable},set:function(t){var e=this;this._selectable=(0,u.Ig)(t),this.chips&&this.chips.forEach(function(t){return t.chipListSelectable=e._selectable})}},{key:"tabIndex",set:function(t){this._userTabIndex=t,this._tabIndex=t}},{key:"chipSelectionChanges",get:function(){return m.T.apply(void 0,c(this.chips.map(function(t){return t.selectionChange})))}},{key:"chipFocusChanges",get:function(){return m.T.apply(void 0,c(this.chips.map(function(t){return t._onFocus})))}},{key:"chipBlurChanges",get:function(){return m.T.apply(void 0,c(this.chips.map(function(t){return t._onBlur})))}},{key:"chipRemoveChanges",get:function(){return m.T.apply(void 0,c(this.chips.map(function(t){return t.destroyed})))}},{key:"ngAfterContentInit",value:function(){var t=this;this._keyManager=new _.Em(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe((0,b.R)(this._destroyed)).subscribe(function(e){return t._keyManager.withHorizontalOrientation(e)}),this._keyManager.tabOut.pipe((0,b.R)(this._destroyed)).subscribe(function(){t._allowFocusEscape()}),this.chips.changes.pipe((0,y.O)(null),(0,b.R)(this._destroyed)).subscribe(function(){t.disabled&&Promise.resolve().then(function(){t._syncChipsState()}),t._resetChips(),t._initializeSelection(),t._updateTabIndex(),t._updateFocusForDestroyedChips(),t.stateChanges.next()})}},{key:"ngOnInit",value:function(){this._selectionModel=new x.Ov(this.multiple,void 0,!1),this.stateChanges.next()}},{key:"ngDoCheck",value:function(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}},{key:"registerInput",value:function(t){this._chipInput=t,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",t.id)}},{key:"setDescribedByIds",value:function(t){this._ariaDescribedby=t.join(" ")}},{key:"writeValue",value:function(t){this.chips&&this._setSelectionByValue(t,!1)}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this.stateChanges.next()}},{key:"onContainerClick",value:function(t){this._originatesFromChip(t)||this.focus()}},{key:"focus",value:function(t){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(t),this.stateChanges.next()))}},{key:"_focusInput",value:function(t){this._chipInput&&this._chipInput.focus(t)}},{key:"_keydown",value:function(t){var e=t.target;t.keyCode===r.ZH&&this._isInputEmpty(e)?(this._keyManager.setLastItemActive(),t.preventDefault()):e&&e.classList.contains("mat-chip")&&(this._keyManager.onKeydown(t),this.stateChanges.next())}},{key:"_updateTabIndex",value:function(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}},{key:"_updateFocusForDestroyedChips",value:function(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){var t=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(t)}else this.focus();this._lastDestroyedChipIndex=null}},{key:"_isValidIndex",value:function(t){return t>=0&&t<this.chips.length}},{key:"_isInputEmpty",value:function(t){return!(!t||"input"!==t.nodeName.toLowerCase()||t.value)}},{key:"_setSelectionByValue",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._clearSelection(),this.chips.forEach(function(t){return t.deselect()}),Array.isArray(t))t.forEach(function(t){return e._selectValue(t,n)}),this._sortValues();else{var i=this._selectValue(t,n);i&&n&&this._keyManager.setActiveItem(i)}}},{key:"_selectValue",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.chips.find(function(n){return null!=n.value&&e._compareWith(n.value,t)});return i&&(n?i.selectViaInteraction():i.select(),this._selectionModel.select(i)),i}},{key:"_initializeSelection",value:function(){var t=this;Promise.resolve().then(function(){(t.ngControl||t._value)&&(t._setSelectionByValue(t.ngControl?t.ngControl.value:t._value,!1),t.stateChanges.next())})}},{key:"_clearSelection",value:function(t){this._selectionModel.clear(),this.chips.forEach(function(e){e!==t&&e.deselect()}),this.stateChanges.next()}},{key:"_sortValues",value:function(){var t=this;this._multiple&&(this._selectionModel.clear(),this.chips.forEach(function(e){e.selected&&t._selectionModel.select(e)}),this.stateChanges.next())}},{key:"_propagateChanges",value:function(t){var e;e=Array.isArray(this.selected)?this.selected.map(function(t){return t.value}):this.selected?this.selected.value:t,this._value=e,this.change.emit(new J(this,e)),this.valueChange.emit(e),this._onChange(e),this._changeDetectorRef.markForCheck()}},{key:"_blur",value:function(){var t=this;this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout(function(){t.focused||t._markAsTouched()}):this._markAsTouched())}},{key:"_markAsTouched",value:function(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}},{key:"_allowFocusEscape",value:function(){var t=this;-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(function(){t._tabIndex=t._userTabIndex||0,t._changeDetectorRef.markForCheck()}))}},{key:"_resetChips",value:function(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}},{key:"_dropSubscriptions",value:function(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}},{key:"_listenToChipsSelection",value:function(){var t=this;this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(function(e){e.source.selected?t._selectionModel.select(e.source):t._selectionModel.deselect(e.source),t.multiple||t.chips.forEach(function(e){!t._selectionModel.isSelected(e)&&e.selected&&e.deselect()}),e.isUserInput&&t._propagateChanges()})}},{key:"_listenToChipsFocus",value:function(){var t=this;this._chipFocusSubscription=this.chipFocusChanges.subscribe(function(e){var n=t.chips.toArray().indexOf(e.chip);t._isValidIndex(n)&&t._keyManager.updateActiveItem(n),t.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(function(){t._blur(),t.stateChanges.next()})}},{key:"_listenToChipsRemoved",value:function(){var t=this;this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(function(e){var n=e.chip,i=t.chips.toArray().indexOf(e.chip);t._isValidIndex(i)&&n._hasFocus&&(t._lastDestroyedChipIndex=i)})}},{key:"_originatesFromChip",value:function(t){for(var e=t.target;e&&e!==this._elementRef.nativeElement;){if(e.classList.contains("mat-chip"))return!0;e=e.parentElement}return!1}},{key:"_hasFocusedChip",value:function(){return this.chips&&this.chips.some(function(t){return t._hasFocus})}},{key:"_syncChipsState",value:function(){var t=this;this.chips&&this.chips.forEach(function(e){e._chipListDisabled=t._disabled,e._chipListMultiple=t.multiple})}}]),o}(S);return t.\u0275fac=function(e){return new(e||t)(s.Y36(s.SBq),s.Y36(s.sBO),s.Y36(w.Is,8),s.Y36(A.F,8),s.Y36(A.sg,8),s.Y36(l.rD),s.Y36(A.a5,10))},t.\u0275cmp=s.Xpm({type:t,selectors:[["mat-chip-list"]],contentQueries:function(t,e,n){var i;(1&t&&s.Suo(n,U,5),2&t)&&(s.iGM(i=s.CRH())&&(e.chips=i))},hostAttrs:[1,"mat-chip-list"],hostVars:15,hostBindings:function(t,e){1&t&&s.NdJ("focus",function(){return e.focus()})("blur",function(){return e._blur()})("keydown",function(t){return e._keydown(t)}),2&t&&(s.Ikx("id",e._uid),s.uIk("tabindex",e.disabled?null:e._tabIndex)("aria-describedby",e._ariaDescribedby||null)("aria-required",e.role?e.required:null)("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-multiselectable",e.multiple)("role",e.role)("aria-orientation",e.ariaOrientation),s.ekj("mat-chip-list-disabled",e.disabled)("mat-chip-list-invalid",e.errorState)("mat-chip-list-required",e.required))},inputs:{ariaOrientation:["aria-orientation","ariaOrientation"],multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",selectable:"selectable",tabIndex:"tabIndex",errorStateMatcher:"errorStateMatcher"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[s._Bn([{provide:k.Eo,useExisting:t}]),s.qOj],ngContentSelectors:C,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(t,e){1&t&&(s.F$t(),s.TgZ(0,"div",0),s.Hsn(1),s.qZA())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transform:translateZ(0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}._mat-animation-noopable.mat-standard-chip{transition:none;animation:none}.mat-standard-chip .mat-chip-remove.mat-icon{width:18px;height:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}\n'],encapsulation:2,changeDetection:0}),t}(),L=0,D=function(){var t=function(){function t(e,n){d(this,t),this._elementRef=e,this._defaultOptions=n,this.focused=!1,this._addOnBlur=!1,this.separatorKeyCodes=this._defaultOptions.separatorKeyCodes,this.chipEnd=new s.vpe,this.placeholder="",this.id="mat-chip-list-input-"+L++,this._disabled=!1,this._inputElement=this._elementRef.nativeElement}return g(t,[{key:"chipList",set:function(t){t&&(this._chipList=t,this._chipList.registerInput(this))}},{key:"addOnBlur",get:function(){return this._addOnBlur},set:function(t){this._addOnBlur=(0,u.Ig)(t)}},{key:"disabled",get:function(){return this._disabled||this._chipList&&this._chipList.disabled},set:function(t){this._disabled=(0,u.Ig)(t)}},{key:"empty",get:function(){return!this._inputElement.value}},{key:"ngOnChanges",value:function(){this._chipList.stateChanges.next()}},{key:"_keydown",value:function(t){t&&t.keyCode===r.Mf&&!(0,r.Vb)(t,"shiftKey")&&this._chipList._allowFocusEscape(),this._emitChipEnd(t)}},{key:"_blur",value:function(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipList.focused||this._chipList._blur(),this._chipList.stateChanges.next()}},{key:"_focus",value:function(){this.focused=!0,this._chipList.stateChanges.next()}},{key:"_emitChipEnd",value:function(t){!this._inputElement.value&&t&&this._chipList._keydown(t),t&&!this._isSeparatorKey(t)||(this.chipEnd.emit({input:this._inputElement,value:this._inputElement.value}),t&&t.preventDefault())}},{key:"_onInput",value:function(){this._chipList.stateChanges.next()}},{key:"focus",value:function(t){this._inputElement.focus(t)}},{key:"_isSeparatorKey",value:function(t){return!(0,r.Vb)(t)&&new Set(this.separatorKeyCodes).has(t.keyCode)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Y36(s.SBq),s.Y36(M))},t.\u0275dir=s.lG2({type:t,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-chip-input","mat-input-element"],hostVars:5,hostBindings:function(t,e){1&t&&s.NdJ("keydown",function(t){return e._keydown(t)})("blur",function(){return e._blur()})("focus",function(){return e._focus()})("input",function(){return e._onInput()}),2&t&&(s.Ikx("id",e.id),s.uIk("disabled",e.disabled||null)("placeholder",e.placeholder||null)("aria-invalid",e._chipList&&e._chipList.ngControl?e._chipList.ngControl.invalid:null)("aria-required",e._chipList&&e._chipList.required||null))},inputs:{separatorKeyCodes:["matChipInputSeparatorKeyCodes","separatorKeyCodes"],placeholder:"placeholder",id:"id",chipList:["matChipInputFor","chipList"],addOnBlur:["matChipInputAddOnBlur","addOnBlur"],disabled:"disabled"},outputs:{chipEnd:"matChipInputTokenEnd"},exportAs:["matChipInput","matChipInputFor"],features:[s.TTD]}),t}(),R={separatorKeyCodes:[r.K5]},Y=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=s.oAB({type:t}),t.\u0275inj=s.cJS({providers:[l.rD,{provide:M,useValue:R}],imports:[[l.BQ]]}),t}()},7436:function(t,n,o){"use strict";o.d(n,{U0:function(){return C},VQ:function(){return Z},Fk:function(){return T}});var a=o(35366),r=o(87064),s=o(19861),c=o(31041),l=o(26136),u=o(97388),p=o(58378),h=["input"],f=function(){return{enterDuration:150}},m=["*"],v=new a.OlP("mat-radio-default-options",{providedIn:"root",factory:function(){return{color:"accent"}}}),b=0,y={provide:c.JU,useExisting:(0,a.Gpc)(function(){return Z}),multi:!0},_=function t(e,n){d(this,t),this.source=e,this.value=n},x=new a.OlP("MatRadioGroup"),k=function(){var t=function(){function t(e){d(this,t),this._changeDetector=e,this._value=null,this._name="mat-radio-group-"+b++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=function(){},this.onTouched=function(){},this.change=new a.vpe}return g(t,[{key:"name",get:function(){return this._name},set:function(t){this._name=t,this._updateRadioButtonNames()}},{key:"labelPosition",get:function(){return this._labelPosition},set:function(t){this._labelPosition="before"===t?"before":"after",this._markRadiosForCheck()}},{key:"value",get:function(){return this._value},set:function(t){this._value!==t&&(this._value=t,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}},{key:"_checkSelectedRadioButton",value:function(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}},{key:"selected",get:function(){return this._selected},set:function(t){this._selected=t,this.value=t?t.value:null,this._checkSelectedRadioButton()}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=(0,s.Ig)(t),this._markRadiosForCheck()}},{key:"required",get:function(){return this._required},set:function(t){this._required=(0,s.Ig)(t),this._markRadiosForCheck()}},{key:"ngAfterContentInit",value:function(){this._isInitialized=!0}},{key:"_touch",value:function(){this.onTouched&&this.onTouched()}},{key:"_updateRadioButtonNames",value:function(){var t=this;this._radios&&this._radios.forEach(function(e){e.name=t.name,e._markForCheck()})}},{key:"_updateSelectedRadioFromValue",value:function(){var t=this;this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach(function(e){e.checked=t.value===e.value,e.checked&&(t._selected=e)}))}},{key:"_emitChangeEvent",value:function(){this._isInitialized&&this.change.emit(new _(this._selected,this._value))}},{key:"_markRadiosForCheck",value:function(){this._radios&&this._radios.forEach(function(t){return t._markForCheck()})}},{key:"writeValue",value:function(t){this.value=t,this._changeDetector.markForCheck()}},{key:"registerOnChange",value:function(t){this._controlValueAccessorChangeFn=t}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this._changeDetector.markForCheck()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Y36(a.sBO))},t.\u0275dir=a.lG2({type:t,inputs:{name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:"disabled",required:"required",color:"color"},outputs:{change:"change"}}),t}(),Z=function(){var t,n=function(t){e(o,t);var n=i(o);function o(){return d(this,o),n.apply(this,arguments)}return o}(k);return n.\u0275fac=function(e){return(t||(t=a.n5z(n)))(e||n)},n.\u0275dir=a.lG2({type:n,selectors:[["mat-radio-group"]],contentQueries:function(t,e,n){var i;(1&t&&a.Suo(n,C,5),2&t)&&(a.iGM(i=a.CRH())&&(e._radios=i))},hostAttrs:["role","radiogroup",1,"mat-radio-group"],exportAs:["matRadioGroup"],features:[a._Bn([y,{provide:x,useExisting:n}]),a.qOj]}),n}(),w=(0,r.Kr)((0,r.sb)(function t(e){d(this,t),this._elementRef=e})),A=function(){var t=function(t){e(o,t);var n=i(o);function o(t,e,i,r,c,l,u,p){var g;return d(this,o),(g=n.call(this,e))._changeDetector=i,g._focusMonitor=r,g._radioDispatcher=c,g._animationMode=l,g._providerOverride=u,g._uniqueId="mat-radio-"+ ++b,g.id=g._uniqueId,g.change=new a.vpe,g._checked=!1,g._value=null,g._removeUniqueSelectionListener=function(){},g.radioGroup=t,p&&(g.tabIndex=(0,s.su)(p,0)),g._removeUniqueSelectionListener=c.listen(function(t,e){t!==g.id&&e===g.name&&(g.checked=!1)}),g}return g(o,[{key:"checked",get:function(){return this._checked},set:function(t){var e=(0,s.Ig)(t);this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}},{key:"value",get:function(){return this._value},set:function(t){this._value!==t&&(this._value=t,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===t),this.checked&&(this.radioGroup.selected=this)))}},{key:"labelPosition",get:function(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"},set:function(t){this._labelPosition=t}},{key:"disabled",get:function(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled},set:function(t){this._setDisabled((0,s.Ig)(t))}},{key:"required",get:function(){return this._required||this.radioGroup&&this.radioGroup.required},set:function(t){this._required=(0,s.Ig)(t)}},{key:"color",get:function(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"},set:function(t){this._color=t}},{key:"inputId",get:function(){return"".concat(this.id||this._uniqueId,"-input")}},{key:"focus",value:function(t,e){e?this._focusMonitor.focusVia(this._inputElement,e,t):this._inputElement.nativeElement.focus(t)}},{key:"_markForCheck",value:function(){this._changeDetector.markForCheck()}},{key:"ngOnInit",value:function(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name)}},{key:"ngAfterViewInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe(function(e){!e&&t.radioGroup&&t.radioGroup._touch()})}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}},{key:"_emitChangeEvent",value:function(){this.change.emit(new _(this,this._value))}},{key:"_isRippleDisabled",value:function(){return this.disableRipple||this.disabled}},{key:"_onInputClick",value:function(t){t.stopPropagation()}},{key:"_onInputChange",value:function(t){t.stopPropagation();var e=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),e&&this.radioGroup._emitChangeEvent())}},{key:"_setDisabled",value:function(t){this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())}}]),o}(w);return t.\u0275fac=function(e){return new(e||t)(a.Y36(k),a.Y36(a.SBq),a.Y36(a.sBO),a.Y36(u.tE),a.Y36(p.A8),a.Y36(String),a.Y36(void 0),a.Y36(String))},t.\u0275dir=a.lG2({type:t,viewQuery:function(t,e){var n;(1&t&&a.Gf(h,5),2&t)&&(a.iGM(n=a.CRH())&&(e._inputElement=n.first))},inputs:{id:"id",checked:"checked",value:"value",labelPosition:"labelPosition",disabled:"disabled",required:"required",color:"color",name:"name",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{change:"change"},features:[a.qOj]}),t}(),C=function(){var t=function(t){e(o,t);var n=i(o);function o(t,e,i,a,r,s,c,l){return d(this,o),n.call(this,t,e,i,a,r,s,c,l)}return o}(A);return t.\u0275fac=function(e){return new(e||t)(a.Y36(x,8),a.Y36(a.SBq),a.Y36(a.sBO),a.Y36(u.tE),a.Y36(p.A8),a.Y36(l.Qb,8),a.Y36(v,8),a.$8M("tabindex"))},t.\u0275cmp=a.Xpm({type:t,selectors:[["mat-radio-button"]],hostAttrs:[1,"mat-radio-button"],hostVars:17,hostBindings:function(t,e){1&t&&a.NdJ("focus",function(){return e._inputElement.nativeElement.focus()}),2&t&&(a.uIk("tabindex",null)("id",e.id)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),a.ekj("mat-radio-checked",e.checked)("mat-radio-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-primary","primary"===e.color)("mat-accent","accent"===e.color)("mat-warn","warn"===e.color))},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matRadioButton"],features:[a.qOj],ngContentSelectors:m,decls:13,vars:19,consts:[[1,"mat-radio-label"],["label",""],[1,"mat-radio-container"],[1,"mat-radio-outer-circle"],[1,"mat-radio-inner-circle"],["type","radio",1,"mat-radio-input","cdk-visually-hidden",3,"id","checked","disabled","tabIndex","required","change","click"],["input",""],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mat-radio-label-content"],[2,"display","none"]],template:function(t,e){if(1&t&&(a.F$t(),a.TgZ(0,"label",0,1),a.TgZ(2,"span",2),a._UZ(3,"span",3),a._UZ(4,"span",4),a.TgZ(5,"input",5,6),a.NdJ("change",function(t){return e._onInputChange(t)})("click",function(t){return e._onInputClick(t)}),a.qZA(),a.TgZ(7,"span",7),a._UZ(8,"span",8),a.qZA(),a.qZA(),a.TgZ(9,"span",9),a.TgZ(10,"span",10),a._uU(11,"\xa0"),a.qZA(),a.Hsn(12),a.qZA(),a.qZA()),2&t){var n=a.MAs(1);a.uIk("for",e.inputId),a.xp6(5),a.Q6J("id",e.inputId)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex)("required",e.required),a.uIk("name",e.name)("value",e.value)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby)("aria-describedby",e.ariaDescribedby),a.xp6(2),a.Q6J("matRippleTrigger",n)("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",a.DdM(18,f)),a.xp6(2),a.ekj("mat-radio-label-before","before"==e.labelPosition)}},directives:[r.wG],styles:[".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(0.001);-webkit-print-color-adjust:exact;color-adjust:exact}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5)}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none;top:0;left:0}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"],encapsulation:2,changeDetection:0}),t}(),T=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=a.oAB({type:t}),t.\u0275inj=a.cJS({imports:[[r.si,r.BQ],r.BQ]}),t}()},79572:function(t,n,o){"use strict";o.d(n,{Rr:function(){return w},rP:function(){return C}});var a=o(27853),r=o(35366),s=o(87064),c=o(19861),l=o(31041),u=o(26136),p=o(97388),h=["thumbContainer"],f=["toggleBar"],m=["input"],v=function(){return{enterDuration:150}},b=["*"],y=new r.OlP("mat-slide-toggle-default-options",{providedIn:"root",factory:function(){return{disableToggleValue:!1}}}),_=0,x={provide:l.JU,useExisting:(0,r.Gpc)(function(){return w}),multi:!0},k=function t(e,n){d(this,t),this.source=e,this.checked=n},Z=(0,s.sb)((0,s.pj)((0,s.Kr)((0,s.Id)(function t(e){d(this,t),this._elementRef=e})),"accent")),w=function(){var t=function(t){e(o,t);var n=i(o);function o(t,e,i,a,s,c){var l;return d(this,o),(l=n.call(this,t))._focusMonitor=e,l._changeDetectorRef=i,l.defaults=s,l._animationMode=c,l._onChange=function(t){},l._onTouched=function(){},l._uniqueId="mat-slide-toggle-"+ ++_,l._required=!1,l._checked=!1,l.name=null,l.id=l._uniqueId,l.labelPosition="after",l.ariaLabel=null,l.ariaLabelledby=null,l.change=new r.vpe,l.toggleChange=new r.vpe,l.tabIndex=parseInt(a)||0,l}return g(o,[{key:"required",get:function(){return this._required},set:function(t){this._required=(0,c.Ig)(t)}},{key:"checked",get:function(){return this._checked},set:function(t){this._checked=(0,c.Ig)(t),this._changeDetectorRef.markForCheck()}},{key:"inputId",get:function(){return"".concat(this.id||this._uniqueId,"-input")}},{key:"ngAfterContentInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe(function(e){"keyboard"===e||"program"===e?t._inputElement.nativeElement.focus():e||Promise.resolve().then(function(){return t._onTouched()})})}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"_onChangeEvent",value:function(t){t.stopPropagation(),this.toggleChange.emit(),this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}},{key:"_onInputClick",value:function(t){t.stopPropagation()}},{key:"writeValue",value:function(t){this.checked=!!t}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this._changeDetectorRef.markForCheck()}},{key:"focus",value:function(t,e){e?this._focusMonitor.focusVia(this._inputElement,e,t):this._inputElement.nativeElement.focus(t)}},{key:"toggle",value:function(){this.checked=!this.checked,this._onChange(this.checked)}},{key:"_emitChangeEvent",value:function(){this._onChange(this.checked),this.change.emit(new k(this,this.checked))}},{key:"_onLabelTextChange",value:function(){this._changeDetectorRef.detectChanges()}}]),o}(Z);return t.\u0275fac=function(e){return new(e||t)(r.Y36(r.SBq),r.Y36(p.tE),r.Y36(r.sBO),r.$8M("tabindex"),r.Y36(y),r.Y36(u.Qb,8))},t.\u0275cmp=r.Xpm({type:t,selectors:[["mat-slide-toggle"]],viewQuery:function(t,e){var n;(1&t&&(r.Gf(h,5),r.Gf(f,5),r.Gf(m,5)),2&t)&&(r.iGM(n=r.CRH())&&(e._thumbEl=n.first),r.iGM(n=r.CRH())&&(e._thumbBarEl=n.first),r.iGM(n=r.CRH())&&(e._inputElement=n.first))},hostAttrs:[1,"mat-slide-toggle"],hostVars:12,hostBindings:function(t,e){2&t&&(r.Ikx("id",e.id),r.uIk("tabindex",e.disabled?null:-1)("aria-label",null)("aria-labelledby",null),r.ekj("mat-checked",e.checked)("mat-disabled",e.disabled)("mat-slide-toggle-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[r._Bn([x]),r.qOj],ngContentSelectors:b,decls:16,vars:18,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["toggleBar",""],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container"],["thumbContainer",""],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(t,e){if(1&t&&(r.F$t(),r.TgZ(0,"label",0,1),r.TgZ(2,"div",2,3),r.TgZ(4,"input",4,5),r.NdJ("change",function(t){return e._onChangeEvent(t)})("click",function(t){return e._onInputClick(t)}),r.qZA(),r.TgZ(6,"div",6,7),r._UZ(8,"div",8),r.TgZ(9,"div",9),r._UZ(10,"div",10),r.qZA(),r.qZA(),r.qZA(),r.TgZ(11,"span",11,12),r.NdJ("cdkObserveContent",function(){return e._onLabelTextChange()}),r.TgZ(13,"span",13),r._uU(14,"\xa0"),r.qZA(),r.Hsn(15),r.qZA(),r.qZA()),2&t){var n=r.MAs(1),i=r.MAs(12);r.uIk("for",e.inputId),r.xp6(2),r.ekj("mat-slide-toggle-bar-no-side-margin",!i.textContent||!i.textContent.trim()),r.xp6(2),r.Q6J("id",e.inputId)("required",e.required)("tabIndex",e.tabIndex)("checked",e.checked)("disabled",e.disabled),r.uIk("name",e.name)("aria-checked",e.checked.toString())("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),r.xp6(5),r.Q6J("matRippleTrigger",n)("matRippleDisabled",e.disableRipple||e.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",r.DdM(17,v))}},directives:[s.wG,a.wD],styles:[".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:transparent}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}.cdk-high-contrast-active .mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:2px dotted;outline-offset:5px}\n"],encapsulation:2,changeDetection:0}),t}(),A=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.oAB({type:t}),t.\u0275inj=r.cJS({}),t}(),C=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.oAB({type:t}),t.\u0275inj=r.cJS({imports:[[A,s.si,s.BQ,a.Q8],A,s.BQ]}),t}()},88636:function(t,e,n){var i,o,a;void 0===(a=this)&&void 0!==window&&(a=window),i=[n(45059)],void 0===(o=(function(t){return a["Chartist.plugins.tooltip"]=(e=t,function(t,e,n){"use strict";var i={currency:void 0,currencyFormatCallback:void 0,tooltipOffset:{x:0,y:-20},anchorToPoint:!1,appendToBody:!0,class:void 0,pointClass:"ct-point"};function o(t,e){return(" "+t.getAttribute("class")+" ").indexOf(" "+e+" ")>-1}function a(n){var i;return a in n?((i=n.offsetParent)||(i=e.body.parentElement),i):(i=n.parentNode)?"static"!==t.getComputedStyle(i).position?i:"BODY"===i.tagName?i.parentElement:a(i):e.body.parentElement}n.plugins=n.plugins||{},n.plugins.tooltip=function(r){return r=n.extend({},i,r),function(i){var s=r.pointClass;i instanceof n.Bar?s="ct-bar":i instanceof n.Pie&&(s=i.options.donut?i.options.donutSolid?"ct-slice-donut-solid":"ct-slice-donut":"ct-slice-pie");var c,l=i.container,u=!1,d=a(l);(c=r.appendToBody?e.querySelector(".chartist-tooltip"):l.querySelector(".chartist-tooltip"))||((c=e.createElement("div")).className=r.class?"chartist-tooltip "+r.class:"chartist-tooltip",r.appendToBody?e.body.appendChild(c):l.appendChild(c));var p=c.offsetHeight,g=c.offsetWidth;function h(t,e,n){l.addEventListener(t,function(t){e&&!o(t.target,e)||n(t)})}function f(e){var n=-(g=g||c.offsetWidth)/2+r.tooltipOffset.x,i=-(p=p||c.offsetHeight)+r.tooltipOffset.y,o=!0===r.anchorToPoint&&e.target.x2&&e.target.y2;if(!0===r.appendToBody)if(o){var a=l.getBoundingClientRect(),s=e.target.y2.baseVal.value+a.top+t.pageYOffset;c.style.left=e.target.x2.baseVal.value+a.left+t.pageXOffset+n+"px",c.style.top=s+i+"px"}else c.style.left=e.pageX+n+"px",c.style.top=e.pageY+i+"px";else{var u=d.getBoundingClientRect(),h=-u.left-t.pageXOffset+n,f=-u.top-t.pageYOffset+i;o?(a=l.getBoundingClientRect(),s=e.target.y2.baseVal.value+a.top+t.pageYOffset,c.style.left=e.target.x2.baseVal.value+a.left+t.pageXOffset+h+"px",c.style.top=s+f+"px"):(c.style.left=e.pageX+h+"px",c.style.top=e.pageY+f+"px")}}function m(t){u=!1;var e=new RegExp("tooltip-show\\s*","gi");t.className=t.className.replace(e,"").trim()}m(c),h("mouseover",s,function(t){var s,h=t.target,m="",v=(i instanceof n.Pie?h:h.parentNode)?h.parentNode.getAttribute("ct:meta")||h.parentNode.getAttribute("ct:series-name"):"",b=h.getAttribute("ct:meta")||v||"",y=!!b,_=h.getAttribute("ct:value");if(r.transformTooltipTextFnc&&"function"==typeof r.transformTooltipTextFnc&&(_=r.transformTooltipTextFnc(_)),r.tooltipFnc&&"function"==typeof r.tooltipFnc)m=r.tooltipFnc(b,_);else{if(r.metaIsHTML){var x=e.createElement("textarea");x.innerHTML=b,b=x.value}if(b='<span class="chartist-tooltip-meta">'+b+"</span>",y)m+=b+"<br>";else if(i instanceof n.Pie){var k=function(t,e){do{t=t.nextSibling}while(t&&!o(t,"ct-label"));return t}(h);k&&(m+=((s=k).innerText||s.textContent)+"<br>")}_&&(r.currency&&(_=null!=r.currencyFormatCallback?r.currencyFormatCallback(_,r):r.currency+_.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g,"$1,")),m+=_='<span class="chartist-tooltip-value">'+_+"</span>")}m&&(c.innerHTML=m,p=c.offsetHeight,g=c.offsetWidth,!0!==r.appendToBody&&(d=a(l)),"absolute"!==c.style.display&&(c.style.display="absolute"),f(t),function(t){u=!0,o(t,"tooltip-show")||(t.className=t.className+" tooltip-show")}(c),p=c.offsetHeight,g=c.offsetWidth)}),h("mouseout",s,function(){m(c)}),h("mousemove",null,function(t){!1===r.anchorToPoint&&u&&f(t)})}}}(window,document,e),e.plugins.tooltip);var e}).apply(e,i))||(t.exports=o)},45059:function(t,e){var n,i;i=this,void 0===(n=(function(){return i.Chartist=function(){var t={version:"0.11.4"};return function(t,e){"use strict";var n=t.window,i=t.document;e.namespaces={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",ct:"http://gionkunz.github.com/chartist-js/ct"},e.noop=function(t){return t},e.alphaNumerate=function(t){return String.fromCharCode(97+t%26)},e.extend=function(t){var n,i,o;for(t=t||{},n=1;n<arguments.length;n++)for(var a in i=arguments[n])t[a]="object"!=typeof(o=i[a])||null===o||o instanceof Array?o:e.extend(t[a],o);return t},e.replaceAll=function(t,e,n){return t.replace(new RegExp(e,"g"),n)},e.ensureUnit=function(t,e){return"number"==typeof t&&(t+=e),t},e.quantity=function(t){if("string"==typeof t){var e=/^(\d+)\s*(.*)$/g.exec(t);return{value:+e[1],unit:e[2]||void 0}}return{value:t}},e.querySelector=function(t){return t instanceof Node?t:i.querySelector(t)},e.times=function(t){return Array.apply(null,new Array(t))},e.sum=function(t,e){return t+(e||0)},e.mapMultiply=function(t){return function(e){return e*t}},e.mapAdd=function(t){return function(e){return e+t}},e.serialMap=function(t,n){var i=[],o=Math.max.apply(null,t.map(function(t){return t.length}));return e.times(o).forEach(function(e,o){var a=t.map(function(t){return t[o]});i[o]=n.apply(null,a)}),i},e.roundWithPrecision=function(t,n){var i=Math.pow(10,n||e.precision);return Math.round(t*i)/i},e.precision=8,e.escapingMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"},e.serialize=function(t){return null==t?t:("number"==typeof t?t=""+t:"object"==typeof t&&(t=JSON.stringify({data:t})),Object.keys(e.escapingMap).reduce(function(t,n){return e.replaceAll(t,n,e.escapingMap[n])},t))},e.deserialize=function(t){if("string"!=typeof t)return t;t=Object.keys(e.escapingMap).reduce(function(t,n){return e.replaceAll(t,e.escapingMap[n],n)},t);try{t=void 0!==(t=JSON.parse(t)).data?t.data:t}catch(n){}return t},e.createSvg=function(t,n,i,o){var a;return n=n||"100%",i=i||"100%",Array.prototype.slice.call(t.querySelectorAll("svg")).filter(function(t){return t.getAttributeNS(e.namespaces.xmlns,"ct")}).forEach(function(e){t.removeChild(e)}),(a=new e.Svg("svg").attr({width:n,height:i}).addClass(o))._node.style.width=n,a._node.style.height=i,t.appendChild(a._node),a},e.normalizeData=function(t,n,i){var o,a={raw:t,normalized:{}};return a.normalized.series=e.getDataArray({series:t.series||[]},n,i),o=a.normalized.series.every(function(t){return t instanceof Array})?Math.max.apply(null,a.normalized.series.map(function(t){return t.length})):a.normalized.series.length,a.normalized.labels=(t.labels||[]).slice(),Array.prototype.push.apply(a.normalized.labels,e.times(Math.max(0,o-a.normalized.labels.length)).map(function(){return""})),n&&e.reverseData(a.normalized),a},e.safeHasProperty=function(t,e){return null!==t&&"object"==typeof t&&t.hasOwnProperty(e)},e.isDataHoleValue=function(t){return null==t||"number"==typeof t&&isNaN(t)},e.reverseData=function(t){t.labels.reverse(),t.series.reverse();for(var e=0;e<t.series.length;e++)"object"==typeof t.series[e]&&void 0!==t.series[e].data?t.series[e].data.reverse():t.series[e]instanceof Array&&t.series[e].reverse()},e.getDataArray=function(t,n,i){return t.series.map(function t(n){if(e.safeHasProperty(n,"value"))return t(n.value);if(e.safeHasProperty(n,"data"))return t(n.data);if(n instanceof Array)return n.map(t);if(!e.isDataHoleValue(n)){if(i){var o={};return"string"==typeof i?o[i]=e.getNumberOrUndefined(n):o.y=e.getNumberOrUndefined(n),o.x=n.hasOwnProperty("x")?e.getNumberOrUndefined(n.x):o.x,o.y=n.hasOwnProperty("y")?e.getNumberOrUndefined(n.y):o.y,o}return e.getNumberOrUndefined(n)}})},e.normalizePadding=function(t,e){return e=e||0,"number"==typeof t?{top:t,right:t,bottom:t,left:t}:{top:"number"==typeof t.top?t.top:e,right:"number"==typeof t.right?t.right:e,bottom:"number"==typeof t.bottom?t.bottom:e,left:"number"==typeof t.left?t.left:e}},e.getMetaData=function(t,e){var n=t.data?t.data[e]:t[e];return n?n.meta:void 0},e.orderOfMagnitude=function(t){return Math.floor(Math.log(Math.abs(t))/Math.LN10)},e.projectLength=function(t,e,n){return e/n.range*t},e.getAvailableHeight=function(t,n){return Math.max((e.quantity(n.height).value||t.height())-(n.chartPadding.top+n.chartPadding.bottom)-n.axisX.offset,0)},e.getHighLow=function(t,n,i){var o={high:void 0===(n=e.extend({},n,i?n["axis"+i.toUpperCase()]:{})).high?-Number.MAX_VALUE:+n.high,low:void 0===n.low?Number.MAX_VALUE:+n.low},a=void 0===n.high,r=void 0===n.low;return(a||r)&&function t(e){if(void 0!==e)if(e instanceof Array)for(var n=0;n<e.length;n++)t(e[n]);else{var s=i?+e[i]:+e;a&&s>o.high&&(o.high=s),r&&s<o.low&&(o.low=s)}}(t),(n.referenceValue||0===n.referenceValue)&&(o.high=Math.max(n.referenceValue,o.high),o.low=Math.min(n.referenceValue,o.low)),o.high<=o.low&&(0===o.low?o.high=1:o.low<0?o.high=0:(o.high>0||(o.high=1),o.low=0)),o},e.isNumeric=function(t){return null!==t&&isFinite(t)},e.isFalseyButZero=function(t){return!t&&0!==t},e.getNumberOrUndefined=function(t){return e.isNumeric(t)?+t:void 0},e.isMultiValue=function(t){return"object"==typeof t&&("x"in t||"y"in t)},e.getMultiValue=function(t,n){return e.isMultiValue(t)?e.getNumberOrUndefined(t[n||"y"]):e.getNumberOrUndefined(t)},e.rho=function(t){if(1===t)return t;function e(t,n){return t%n==0?n:e(n,t%n)}function n(t){return t*t+1}var i,o=2,a=2;if(t%2==0)return 2;do{o=n(o)%t,a=n(n(a))%t,i=e(Math.abs(o-a),t)}while(1===i);return i},e.getBounds=function(t,n,i,o){var a,r,s,c=0,l={high:n.high,low:n.low};l.valueRange=l.high-l.low,l.oom=e.orderOfMagnitude(l.valueRange),l.step=Math.pow(10,l.oom),l.min=Math.floor(l.low/l.step)*l.step,l.max=Math.ceil(l.high/l.step)*l.step,l.range=l.max-l.min,l.numberOfSteps=Math.round(l.range/l.step);var u=e.projectLength(t,l.step,l)<i,d=o?e.rho(l.range):0;if(o&&e.projectLength(t,1,l)>=i)l.step=1;else if(o&&d<l.step&&e.projectLength(t,d,l)>=i)l.step=d;else for(;;){if(u&&e.projectLength(t,l.step,l)<=i)l.step*=2;else{if(u||!(e.projectLength(t,l.step/2,l)>=i))break;if(l.step/=2,o&&l.step%1!=0){l.step*=2;break}}if(c++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}function p(t,e){return t===(t+=e)&&(t*=1+(e>0?2221e-19:-2221e-19)),t}for(l.step=Math.max(l.step,2221e-19),r=l.min,s=l.max;r+l.step<=l.low;)r=p(r,l.step);for(;s-l.step>=l.high;)s=p(s,-l.step);l.min=r,l.max=s,l.range=l.max-l.min;var g=[];for(a=l.min;a<=l.max;a=p(a,l.step)){var h=e.roundWithPrecision(a);h!==g[g.length-1]&&g.push(h)}return l.values=g,l},e.polarToCartesian=function(t,e,n,i){var o=(i-90)*Math.PI/180;return{x:t+n*Math.cos(o),y:e+n*Math.sin(o)}},e.createChartRect=function(t,n,i){var o=!(!n.axisX&&!n.axisY),a=o?n.axisY.offset:0,r=o?n.axisX.offset:0,s=t.width()||e.quantity(n.width).value||0,c=t.height()||e.quantity(n.height).value||0,l=e.normalizePadding(n.chartPadding,i);s=Math.max(s,a+l.left+l.right),c=Math.max(c,r+l.top+l.bottom);var u={padding:l,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return o?("start"===n.axisX.position?(u.y2=l.top+r,u.y1=Math.max(c-l.bottom,u.y2+1)):(u.y2=l.top,u.y1=Math.max(c-l.bottom-r,u.y2+1)),"start"===n.axisY.position?(u.x1=l.left+a,u.x2=Math.max(s-l.right,u.x1+1)):(u.x1=l.left,u.x2=Math.max(s-l.right-a,u.x1+1))):(u.x1=l.left,u.x2=Math.max(s-l.right,u.x1+1),u.y2=l.top,u.y1=Math.max(c-l.bottom,u.y2+1)),u},e.createGrid=function(t,n,i,o,a,r,s,c){var l={};l[i.units.pos+"1"]=t,l[i.units.pos+"2"]=t,l[i.counterUnits.pos+"1"]=o,l[i.counterUnits.pos+"2"]=o+a;var u=r.elem("line",l,s.join(" "));c.emit("draw",e.extend({type:"grid",axis:i,index:n,group:r,element:u},l))},e.createGridBackground=function(t,e,n,i){var o=t.elem("rect",{x:e.x1,y:e.y2,width:e.width(),height:e.height()},n,!0);i.emit("draw",{type:"gridBackground",group:t,element:o})},e.createLabel=function(t,n,o,a,r,s,c,l,u,d,p){var g,h={};if(h[r.units.pos]=t+c[r.units.pos],h[r.counterUnits.pos]=c[r.counterUnits.pos],h[r.units.len]=n,h[r.counterUnits.len]=Math.max(0,s-10),d){var f=i.createElement("span");f.className=u.join(" "),f.setAttribute("xmlns",e.namespaces.xhtml),f.innerText=a[o],f.style[r.units.len]=Math.round(h[r.units.len])+"px",f.style[r.counterUnits.len]=Math.round(h[r.counterUnits.len])+"px",g=l.foreignObject(f,e.extend({style:"overflow: visible;"},h))}else g=l.elem("text",h,u.join(" ")).text(a[o]);p.emit("draw",e.extend({type:"label",axis:r,index:o,group:l,element:g,text:a[o]},h))},e.getSeriesOption=function(t,e,n){if(t.name&&e.series&&e.series[t.name]){var i=e.series[t.name];return i.hasOwnProperty(n)?i[n]:e[n]}return e[n]},e.optionsProvider=function(t,i,o){var a,r,s=e.extend({},t),c=[];function l(t){var c=a;if(a=e.extend({},s),i)for(r=0;r<i.length;r++)n.matchMedia(i[r][0]).matches&&(a=e.extend(a,i[r][1]));o&&t&&o.emit("optionsChanged",{previousOptions:c,currentOptions:a})}if(!n.matchMedia)throw"window.matchMedia not found! Make sure you're using a polyfill.";if(i)for(r=0;r<i.length;r++){var u=n.matchMedia(i[r][0]);u.addListener(l),c.push(u)}return l(),{removeMediaQueryListeners:function(){c.forEach(function(t){t.removeListener(l)})},getCurrentOptions:function(){return e.extend({},a)}}},e.splitIntoSegments=function(t,n,i){i=e.extend({},{increasingX:!1,fillHoles:!1},i);for(var o=[],a=!0,r=0;r<t.length;r+=2)void 0===e.getMultiValue(n[r/2].value)?i.fillHoles||(a=!0):(i.increasingX&&r>=2&&t[r]<=t[r-2]&&(a=!0),a&&(o.push({pathCoordinates:[],valueData:[]}),a=!1),o[o.length-1].pathCoordinates.push(t[r],t[r+1]),o[o.length-1].valueData.push(n[r/2]));return o}}(this||global,t),function(t,e){"use strict";e.Interpolation={},e.Interpolation.none=function(t){return t=e.extend({},{fillHoles:!1},t),function(n,i){for(var o=new e.Svg.Path,a=!0,r=0;r<n.length;r+=2){var s=n[r],c=n[r+1],l=i[r/2];void 0!==e.getMultiValue(l.value)?(a?o.move(s,c,!1,l):o.line(s,c,!1,l),a=!1):t.fillHoles||(a=!0)}return o}},e.Interpolation.simple=function(t){t=e.extend({},{divisor:2,fillHoles:!1},t);var n=1/Math.max(1,t.divisor);return function(i,o){for(var a,r,s,c=new e.Svg.Path,l=0;l<i.length;l+=2){var u=i[l],d=i[l+1],p=(u-a)*n,g=o[l/2];void 0!==g.value?(void 0===s?c.move(u,d,!1,g):c.curve(a+p,r,u-p,d,u,d,!1,g),a=u,r=d,s=g):t.fillHoles||(a=u=s=void 0)}return c}},e.Interpolation.cardinal=function(t){t=e.extend({},{tension:1,fillHoles:!1},t);var n=Math.min(1,Math.max(0,t.tension)),i=1-n;return function o(a,r){var s=e.splitIntoSegments(a,r,{fillHoles:t.fillHoles});if(s.length){if(s.length>1){var c=[];return s.forEach(function(t){c.push(o(t.pathCoordinates,t.valueData))}),e.Svg.Path.join(c)}if(r=s[0].valueData,(a=s[0].pathCoordinates).length<=4)return e.Interpolation.none()(a,r);for(var l=(new e.Svg.Path).move(a[0],a[1],!1,r[0]),u=0,d=a.length;d-2>u;u+=2){var p=[{x:+a[u-2],y:+a[u-1]},{x:+a[u],y:+a[u+1]},{x:+a[u+2],y:+a[u+3]},{x:+a[u+4],y:+a[u+5]}];d-4===u?p[3]=p[2]:u||(p[0]={x:+a[u],y:+a[u+1]}),l.curve(n*(6*p[1].x-p[0].x+p[2].x)/6+i*p[2].x,n*(6*p[1].y-p[0].y+p[2].y)/6+i*p[2].y,n*(p[1].x+6*p[2].x-p[3].x)/6+i*p[2].x,n*(p[1].y+6*p[2].y-p[3].y)/6+i*p[2].y,p[2].x,p[2].y,!1,r[(u+2)/2])}return l}return e.Interpolation.none()([])}},e.Interpolation.monotoneCubic=function(t){return t=e.extend({},{fillHoles:!1},t),function n(i,o){var a=e.splitIntoSegments(i,o,{fillHoles:t.fillHoles,increasingX:!0});if(a.length){if(a.length>1){var r=[];return a.forEach(function(t){r.push(n(t.pathCoordinates,t.valueData))}),e.Svg.Path.join(r)}if(o=a[0].valueData,(i=a[0].pathCoordinates).length<=4)return e.Interpolation.none()(i,o);var s,c,l=[],u=[],d=i.length/2,p=[],g=[],h=[],f=[];for(s=0;s<d;s++)l[s]=i[2*s],u[s]=i[2*s+1];for(s=0;s<d-1;s++)h[s]=u[s+1]-u[s],f[s]=l[s+1]-l[s],g[s]=h[s]/f[s];for(p[0]=g[0],p[d-1]=g[d-2],s=1;s<d-1;s++)0===g[s]||0===g[s-1]||g[s-1]>0!=g[s]>0?p[s]=0:(p[s]=3*(f[s-1]+f[s])/((2*f[s]+f[s-1])/g[s-1]+(f[s]+2*f[s-1])/g[s]),isFinite(p[s])||(p[s]=0));for(c=(new e.Svg.Path).move(l[0],u[0],!1,o[0]),s=0;s<d-1;s++)c.curve(l[s]+f[s]/3,u[s]+p[s]*f[s]/3,l[s+1]-f[s]/3,u[s+1]-p[s+1]*f[s]/3,l[s+1],u[s+1],!1,o[s+1]);return c}return e.Interpolation.none()([])}},e.Interpolation.step=function(t){return t=e.extend({},{postpone:!0,fillHoles:!1},t),function(n,i){for(var o,a,r,s=new e.Svg.Path,c=0;c<n.length;c+=2){var l=n[c],u=n[c+1],d=i[c/2];void 0!==d.value?(void 0===r?s.move(l,u,!1,d):(t.postpone?s.line(l,a,!1,r):s.line(o,u,!1,d),s.line(l,u,!1,d)),o=l,a=u,r=d):t.fillHoles||(o=a=r=void 0)}return s}}}(this||global,t),function(t,e){"use strict";e.EventEmitter=function(){var t=[];return{addEventHandler:function(e,n){t[e]=t[e]||[],t[e].push(n)},removeEventHandler:function(e,n){t[e]&&(n?(t[e].splice(t[e].indexOf(n),1),0===t[e].length&&delete t[e]):delete t[e])},emit:function(e,n){t[e]&&t[e].forEach(function(t){t(n)}),t["*"]&&t["*"].forEach(function(t){t(e,n)})}}}}(this||global,t),function(t,e){"use strict";function n(t){var e=[];if(t.length)for(var n=0;n<t.length;n++)e.push(t[n]);return e}e.Class={extend:function(t,n){var i=n||this.prototype||e.Class,o=Object.create(i);e.Class.cloneDefinitions(o,t);var a=function(){var t,n=o.constructor||function(){};return t=this===e?Object.create(o):this,n.apply(t,Array.prototype.slice.call(arguments,0)),t};return a.prototype=o,a.super=i,a.extend=this.extend,a},cloneDefinitions:function(){var t=n(arguments),e=t[0];return t.splice(1,t.length-1).forEach(function(t){Object.getOwnPropertyNames(t).forEach(function(n){delete e[n],Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}),e}}}(this||global,t),function(t,e){"use strict";var n=t.window;function i(){n.addEventListener("resize",this.resizeListener),this.optionsProvider=e.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter),this.eventEmitter.addEventHandler("optionsChanged",(function(){this.update()}).bind(this)),this.options.plugins&&this.options.plugins.forEach((function(t){t instanceof Array?t[0](this,t[1]):t(this)}).bind(this)),this.eventEmitter.emit("data",{type:"initial",data:this.data}),this.createChart(this.optionsProvider.getCurrentOptions()),this.initializeTimeoutId=void 0}e.Base=e.Class.extend({constructor:function(t,n,o,a,r){this.container=e.querySelector(t),this.data=n||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.defaultOptions=o,this.options=a,this.responsiveOptions=r,this.eventEmitter=e.EventEmitter(),this.supportsForeignObject=e.Svg.isSupported("Extensibility"),this.supportsAnimations=e.Svg.isSupported("AnimationEventsAttribute"),this.resizeListener=(function(){this.update()}).bind(this),this.container&&(this.container.__chartist__&&this.container.__chartist__.detach(),this.container.__chartist__=this),this.initializeTimeoutId=setTimeout(i.bind(this),0)},optionsProvider:void 0,container:void 0,svg:void 0,eventEmitter:void 0,createChart:function(){throw new Error("Base chart type can't be instantiated!")},update:function(t,n,i){return t&&(this.data=t||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.eventEmitter.emit("data",{type:"update",data:this.data})),n&&(this.options=e.extend({},i?this.options:this.defaultOptions,n),this.initializeTimeoutId||(this.optionsProvider.removeMediaQueryListeners(),this.optionsProvider=e.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter))),this.initializeTimeoutId||this.createChart(this.optionsProvider.getCurrentOptions()),this},detach:function(){return this.initializeTimeoutId?n.clearTimeout(this.initializeTimeoutId):(n.removeEventListener("resize",this.resizeListener),this.optionsProvider.removeMediaQueryListeners()),this},on:function(t,e){return this.eventEmitter.addEventHandler(t,e),this},off:function(t,e){return this.eventEmitter.removeEventHandler(t,e),this},version:e.version,supportsForeignObject:!1})}(this||global,t),function(t,e){"use strict";var n=t.document;e.Svg=e.Class.extend({constructor:function(t,i,o,a,r){t instanceof Element?this._node=t:(this._node=n.createElementNS(e.namespaces.svg,t),"svg"===t&&this.attr({"xmlns:ct":e.namespaces.ct})),i&&this.attr(i),o&&this.addClass(o),a&&(r&&a._node.firstChild?a._node.insertBefore(this._node,a._node.firstChild):a._node.appendChild(this._node))},attr:function(t,n){return"string"==typeof t?n?this._node.getAttributeNS(n,t):this._node.getAttribute(t):(Object.keys(t).forEach((function(n){if(void 0!==t[n])if(-1!==n.indexOf(":")){var i=n.split(":");this._node.setAttributeNS(e.namespaces[i[0]],n,t[n])}else this._node.setAttribute(n,t[n])}).bind(this)),this)},elem:function(t,n,i,o){return new e.Svg(t,n,i,this,o)},parent:function(){return this._node.parentNode instanceof SVGElement?new e.Svg(this._node.parentNode):null},root:function(){for(var t=this._node;"svg"!==t.nodeName;)t=t.parentNode;return new e.Svg(t)},querySelector:function(t){var n=this._node.querySelector(t);return n?new e.Svg(n):null},querySelectorAll:function(t){var n=this._node.querySelectorAll(t);return n.length?new e.Svg.List(n):null},getNode:function(){return this._node},foreignObject:function(t,i,o,a){if("string"==typeof t){var r=n.createElement("div");r.innerHTML=t,t=r.firstChild}t.setAttribute("xmlns",e.namespaces.xmlns);var s=this.elem("foreignObject",i,o,a);return s._node.appendChild(t),s},text:function(t){return this._node.appendChild(n.createTextNode(t)),this},empty:function(){for(;this._node.firstChild;)this._node.removeChild(this._node.firstChild);return this},remove:function(){return this._node.parentNode.removeChild(this._node),this.parent()},replace:function(t){return this._node.parentNode.replaceChild(t._node,this._node),t},append:function(t,e){return e&&this._node.firstChild?this._node.insertBefore(t._node,this._node.firstChild):this._node.appendChild(t._node),this},classes:function(){return this._node.getAttribute("class")?this._node.getAttribute("class").trim().split(/\s+/):[]},addClass:function(t){return this._node.setAttribute("class",this.classes(this._node).concat(t.trim().split(/\s+/)).filter(function(t,e,n){return n.indexOf(t)===e}).join(" ")),this},removeClass:function(t){var e=t.trim().split(/\s+/);return this._node.setAttribute("class",this.classes(this._node).filter(function(t){return-1===e.indexOf(t)}).join(" ")),this},removeAllClasses:function(){return this._node.setAttribute("class",""),this},height:function(){return this._node.getBoundingClientRect().height},width:function(){return this._node.getBoundingClientRect().width},animate:function(t,n,i){return void 0===n&&(n=!0),Object.keys(t).forEach((function(o){function a(t,n){var a,r,s,c={};t.easing&&(s=t.easing instanceof Array?t.easing:e.Svg.Easing[t.easing],delete t.easing),t.begin=e.ensureUnit(t.begin,"ms"),t.dur=e.ensureUnit(t.dur,"ms"),s&&(t.calcMode="spline",t.keySplines=s.join(" "),t.keyTimes="0;1"),n&&(t.fill="freeze",c[o]=t.from,this.attr(c),r=e.quantity(t.begin||0).value,t.begin="indefinite"),a=this.elem("animate",e.extend({attributeName:o},t)),n&&setTimeout((function(){try{a._node.beginElement()}catch(e){c[o]=t.to,this.attr(c),a.remove()}}).bind(this),r),i&&a._node.addEventListener("beginEvent",(function(){i.emit("animationBegin",{element:this,animate:a._node,params:t})}).bind(this)),a._node.addEventListener("endEvent",(function(){i&&i.emit("animationEnd",{element:this,animate:a._node,params:t}),n&&(c[o]=t.to,this.attr(c),a.remove())}).bind(this))}t[o]instanceof Array?t[o].forEach((function(t){a.bind(this)(t,!1)}).bind(this)):a.bind(this)(t[o],n)}).bind(this)),this}}),e.Svg.isSupported=function(t){return n.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#"+t,"1.1")},e.Svg.Easing={easeInSine:[.47,0,.745,.715],easeOutSine:[.39,.575,.565,1],easeInOutSine:[.445,.05,.55,.95],easeInQuad:[.55,.085,.68,.53],easeOutQuad:[.25,.46,.45,.94],easeInOutQuad:[.455,.03,.515,.955],easeInCubic:[.55,.055,.675,.19],easeOutCubic:[.215,.61,.355,1],easeInOutCubic:[.645,.045,.355,1],easeInQuart:[.895,.03,.685,.22],easeOutQuart:[.165,.84,.44,1],easeInOutQuart:[.77,0,.175,1],easeInQuint:[.755,.05,.855,.06],easeOutQuint:[.23,1,.32,1],easeInOutQuint:[.86,0,.07,1],easeInExpo:[.95,.05,.795,.035],easeOutExpo:[.19,1,.22,1],easeInOutExpo:[1,0,0,1],easeInCirc:[.6,.04,.98,.335],easeOutCirc:[.075,.82,.165,1],easeInOutCirc:[.785,.135,.15,.86],easeInBack:[.6,-.28,.735,.045],easeOutBack:[.175,.885,.32,1.275],easeInOutBack:[.68,-.55,.265,1.55]},e.Svg.List=e.Class.extend({constructor:function(t){var n=this;this.svgElements=[];for(var i=0;i<t.length;i++)this.svgElements.push(new e.Svg(t[i]));Object.keys(e.Svg.prototype).filter(function(t){return-1===["constructor","parent","querySelector","querySelectorAll","replace","append","classes","height","width"].indexOf(t)}).forEach(function(t){n[t]=function(){var i=Array.prototype.slice.call(arguments,0);return n.svgElements.forEach(function(n){e.Svg.prototype[t].apply(n,i)}),n}})}})}(this||global,t),function(t,e){"use strict";var n={m:["x","y"],l:["x","y"],c:["x1","y1","x2","y2","x","y"],a:["rx","ry","xAr","lAf","sf","x","y"]},i={accuracy:3};function o(t,n,i,o,a,r){var s=e.extend({command:a?t.toLowerCase():t.toUpperCase()},n,r?{data:r}:{});i.splice(o,0,s)}function a(t,e){t.forEach(function(i,o){n[i.command.toLowerCase()].forEach(function(n,a){e(i,n,o,a,t)})})}e.Svg.Path=e.Class.extend({constructor:function(t,n){this.pathElements=[],this.pos=0,this.close=t,this.options=e.extend({},i,n)},position:function(t){return void 0!==t?(this.pos=Math.max(0,Math.min(this.pathElements.length,t)),this):this.pos},remove:function(t){return this.pathElements.splice(this.pos,t),this},move:function(t,e,n,i){return o("M",{x:+t,y:+e},this.pathElements,this.pos++,n,i),this},line:function(t,e,n,i){return o("L",{x:+t,y:+e},this.pathElements,this.pos++,n,i),this},curve:function(t,e,n,i,a,r,s,c){return o("C",{x1:+t,y1:+e,x2:+n,y2:+i,x:+a,y:+r},this.pathElements,this.pos++,s,c),this},arc:function(t,e,n,i,a,r,s,c,l){return o("A",{rx:+t,ry:+e,xAr:+n,lAf:+i,sf:+a,x:+r,y:+s},this.pathElements,this.pos++,c,l),this},scale:function(t,e){return a(this.pathElements,function(n,i){n[i]*="x"===i[0]?t:e}),this},translate:function(t,e){return a(this.pathElements,function(n,i){n[i]+="x"===i[0]?t:e}),this},transform:function(t){return a(this.pathElements,function(e,n,i,o,a){var r=t(e,n,i,o,a);(r||0===r)&&(e[n]=r)}),this},parse:function(t){var i=t.replace(/([A-Za-z])([0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").split(/[\s,]+/).reduce(function(t,e){return e.match(/[A-Za-z]/)&&t.push([]),t[t.length-1].push(e),t},[]);"Z"===i[i.length-1][0].toUpperCase()&&i.pop();var o=i.map(function(t){var i=t.shift(),o=n[i.toLowerCase()];return e.extend({command:i},o.reduce(function(e,n,i){return e[n]=+t[i],e},{}))}),a=[this.pos,0];return Array.prototype.push.apply(a,o),Array.prototype.splice.apply(this.pathElements,a),this.pos+=o.length,this},stringify:function(){var t=Math.pow(10,this.options.accuracy);return this.pathElements.reduce((function(e,i){var o=n[i.command.toLowerCase()].map((function(e){return this.options.accuracy?Math.round(i[e]*t)/t:i[e]}).bind(this));return e+i.command+o.join(",")}).bind(this),"")+(this.close?"Z":"")},clone:function(t){var n=new e.Svg.Path(t||this.close);return n.pos=this.pos,n.pathElements=this.pathElements.slice().map(function(t){return e.extend({},t)}),n.options=e.extend({},this.options),n},splitByCommand:function(t){var n=[new e.Svg.Path];return this.pathElements.forEach(function(i){i.command===t.toUpperCase()&&0!==n[n.length-1].pathElements.length&&n.push(new e.Svg.Path),n[n.length-1].pathElements.push(i)}),n}}),e.Svg.Path.elementDescriptions=n,e.Svg.Path.join=function(t,n,i){for(var o=new e.Svg.Path(n,i),a=0;a<t.length;a++)for(var r=t[a],s=0;s<r.pathElements.length;s++)o.pathElements.push(r.pathElements[s]);return o}}(this||global,t),function(t,e){"use strict";var n={x:{pos:"x",len:"width",dir:"horizontal",rectStart:"x1",rectEnd:"x2",rectOffset:"y2"},y:{pos:"y",len:"height",dir:"vertical",rectStart:"y2",rectEnd:"y1",rectOffset:"x1"}};e.Axis=e.Class.extend({constructor:function(t,e,i,o){this.units=t,this.counterUnits=t===n.x?n.y:n.x,this.chartRect=e,this.axisLength=e[t.rectEnd]-e[t.rectStart],this.gridOffset=e[t.rectOffset],this.ticks=i,this.options=o},createGridAndLabels:function(t,n,i,o,a){var r=o["axis"+this.units.pos.toUpperCase()],s=this.ticks.map(this.projectValue.bind(this)),c=this.ticks.map(r.labelInterpolationFnc);s.forEach((function(l,u){var d,p={x:0,y:0};d=s[u+1]?s[u+1]-l:Math.max(this.axisLength-l,30),e.isFalseyButZero(c[u])&&""!==c[u]||("x"===this.units.pos?(l=this.chartRect.x1+l,p.x=o.axisX.labelOffset.x,p.y="start"===o.axisX.position?this.chartRect.padding.top+o.axisX.labelOffset.y+(i?5:20):this.chartRect.y1+o.axisX.labelOffset.y+(i?5:20)):(l=this.chartRect.y1-l,p.y=o.axisY.labelOffset.y-(i?d:0),p.x="start"===o.axisY.position?i?this.chartRect.padding.left+o.axisY.labelOffset.x:this.chartRect.x1-10:this.chartRect.x2+o.axisY.labelOffset.x+10),r.showGrid&&e.createGrid(l,u,this,this.gridOffset,this.chartRect[this.counterUnits.len](),t,[o.classNames.grid,o.classNames[this.units.dir]],a),r.showLabel&&e.createLabel(l,d,u,c,this,r.offset,p,n,[o.classNames.label,o.classNames[this.units.dir],"start"===r.position?o.classNames[r.position]:o.classNames.end],i,a))}).bind(this))},projectValue:function(t,e,n){throw new Error("Base axis can't be instantiated!")}}),e.Axis.units=n}(this||global,t),function(t,e){"use strict";e.AutoScaleAxis=e.Axis.extend({constructor:function(t,n,i,o){var a=o.highLow||e.getHighLow(n,o,t.pos);this.bounds=e.getBounds(i[t.rectEnd]-i[t.rectStart],a,o.scaleMinSpace||20,o.onlyInteger),this.range={min:this.bounds.min,max:this.bounds.max},e.AutoScaleAxis.super.constructor.call(this,t,i,this.bounds.values,o)},projectValue:function(t){return this.axisLength*(+e.getMultiValue(t,this.units.pos)-this.bounds.min)/this.bounds.range}})}(this||global,t),function(t,e){"use strict";e.FixedScaleAxis=e.Axis.extend({constructor:function(t,n,i,o){var a=o.highLow||e.getHighLow(n,o,t.pos);this.divisor=o.divisor||1,this.ticks=o.ticks||e.times(this.divisor).map((function(t,e){return a.low+(a.high-a.low)/this.divisor*e}).bind(this)),this.ticks.sort(function(t,e){return t-e}),this.range={min:a.low,max:a.high},e.FixedScaleAxis.super.constructor.call(this,t,i,this.ticks,o),this.stepLength=this.axisLength/this.divisor},projectValue:function(t){return this.axisLength*(+e.getMultiValue(t,this.units.pos)-this.range.min)/(this.range.max-this.range.min)}})}(this||global,t),function(t,e){"use strict";e.StepAxis=e.Axis.extend({constructor:function(t,n,i,o){e.StepAxis.super.constructor.call(this,t,i,o.ticks,o);var a=Math.max(1,o.ticks.length-(o.stretch?1:0));this.stepLength=this.axisLength/a},projectValue:function(t,e){return this.stepLength*e}})}(this||global,t),function(t,e){"use strict";var n={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:e.noop,type:void 0},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:e.noop,type:void 0,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,showLine:!0,showPoint:!0,showArea:!1,areaBase:0,lineSmooth:!0,showGridBackground:!1,low:void 0,high:void 0,chartPadding:{top:15,right:15,bottom:5,left:10},fullWidth:!1,reverseData:!1,classNames:{chart:"ct-chart-line",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",line:"ct-line",point:"ct-point",area:"ct-area",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};e.Line=e.Base.extend({constructor:function(t,i,o,a){e.Line.super.constructor.call(this,t,i,n,e.extend({},n,o),a)},createChart:function(t){var i=e.normalizeData(this.data,t.reverseData,!0);this.svg=e.createSvg(this.container,t.width,t.height,t.classNames.chart);var o,a,r=this.svg.elem("g").addClass(t.classNames.gridGroup),s=this.svg.elem("g"),c=this.svg.elem("g").addClass(t.classNames.labelGroup),l=e.createChartRect(this.svg,t,n.padding);o=void 0===t.axisX.type?new e.StepAxis(e.Axis.units.x,i.normalized.series,l,e.extend({},t.axisX,{ticks:i.normalized.labels,stretch:t.fullWidth})):t.axisX.type.call(e,e.Axis.units.x,i.normalized.series,l,t.axisX),a=void 0===t.axisY.type?new e.AutoScaleAxis(e.Axis.units.y,i.normalized.series,l,e.extend({},t.axisY,{high:e.isNumeric(t.high)?t.high:t.axisY.high,low:e.isNumeric(t.low)?t.low:t.axisY.low})):t.axisY.type.call(e,e.Axis.units.y,i.normalized.series,l,t.axisY),o.createGridAndLabels(r,c,this.supportsForeignObject,t,this.eventEmitter),a.createGridAndLabels(r,c,this.supportsForeignObject,t,this.eventEmitter),t.showGridBackground&&e.createGridBackground(r,l,t.classNames.gridBackground,this.eventEmitter),i.raw.series.forEach((function(n,r){var c=s.elem("g");c.attr({"ct:series-name":n.name,"ct:meta":e.serialize(n.meta)}),c.addClass([t.classNames.series,n.className||t.classNames.series+"-"+e.alphaNumerate(r)].join(" "));var u=[],d=[];i.normalized.series[r].forEach((function(t,s){var c={x:l.x1+o.projectValue(t,s,i.normalized.series[r]),y:l.y1-a.projectValue(t,s,i.normalized.series[r])};u.push(c.x,c.y),d.push({value:t,valueIndex:s,meta:e.getMetaData(n,s)})}).bind(this));var p={lineSmooth:e.getSeriesOption(n,t,"lineSmooth"),showPoint:e.getSeriesOption(n,t,"showPoint"),showLine:e.getSeriesOption(n,t,"showLine"),showArea:e.getSeriesOption(n,t,"showArea"),areaBase:e.getSeriesOption(n,t,"areaBase")},g=("function"==typeof p.lineSmooth?p.lineSmooth:p.lineSmooth?e.Interpolation.monotoneCubic():e.Interpolation.none())(u,d);if(p.showPoint&&g.pathElements.forEach((function(i){var s=c.elem("line",{x1:i.x,y1:i.y,x2:i.x+.01,y2:i.y},t.classNames.point).attr({"ct:value":[i.data.value.x,i.data.value.y].filter(e.isNumeric).join(","),"ct:meta":e.serialize(i.data.meta)});this.eventEmitter.emit("draw",{type:"point",value:i.data.value,index:i.data.valueIndex,meta:i.data.meta,series:n,seriesIndex:r,axisX:o,axisY:a,group:c,element:s,x:i.x,y:i.y})}).bind(this)),p.showLine){var h=c.elem("path",{d:g.stringify()},t.classNames.line,!0);this.eventEmitter.emit("draw",{type:"line",values:i.normalized.series[r],path:g.clone(),chartRect:l,index:r,series:n,seriesIndex:r,seriesMeta:n.meta,axisX:o,axisY:a,group:c,element:h})}if(p.showArea&&a.range){var f=Math.max(Math.min(p.areaBase,a.range.max),a.range.min),m=l.y1-a.projectValue(f);g.splitByCommand("M").filter(function(t){return t.pathElements.length>1}).map(function(t){var e=t.pathElements[0],n=t.pathElements[t.pathElements.length-1];return t.clone(!0).position(0).remove(1).move(e.x,m).line(e.x,e.y).position(t.pathElements.length+1).line(n.x,m)}).forEach((function(e){var s=c.elem("path",{d:e.stringify()},t.classNames.area,!0);this.eventEmitter.emit("draw",{type:"area",values:i.normalized.series[r],path:e.clone(),series:n,seriesIndex:r,axisX:o,axisY:a,chartRect:l,index:r,group:c,element:s})}).bind(this))}}).bind(this)),this.eventEmitter.emit("created",{bounds:a.bounds,chartRect:l,axisX:o,axisY:a,svg:this.svg,options:t})}})}(this||global,t),function(t,e){"use strict";var n={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:e.noop,scaleMinSpace:30,onlyInteger:!1},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:e.noop,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,high:void 0,low:void 0,referenceValue:0,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:!1,stackMode:"accumulate",horizontalBars:!1,distributeSeries:!1,reverseData:!1,showGridBackground:!1,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};e.Bar=e.Base.extend({constructor:function(t,i,o,a){e.Bar.super.constructor.call(this,t,i,n,e.extend({},n,o),a)},createChart:function(t){var i,o;t.distributeSeries?(i=e.normalizeData(this.data,t.reverseData,t.horizontalBars?"x":"y")).normalized.series=i.normalized.series.map(function(t){return[t]}):i=e.normalizeData(this.data,t.reverseData,t.horizontalBars?"x":"y"),this.svg=e.createSvg(this.container,t.width,t.height,t.classNames.chart+(t.horizontalBars?" "+t.classNames.horizontalBars:""));var a=this.svg.elem("g").addClass(t.classNames.gridGroup),r=this.svg.elem("g"),s=this.svg.elem("g").addClass(t.classNames.labelGroup);if(t.stackBars&&0!==i.normalized.series.length){var c=e.serialMap(i.normalized.series,function(){return Array.prototype.slice.call(arguments).map(function(t){return t}).reduce(function(t,e){return{x:t.x+(e&&e.x)||0,y:t.y+(e&&e.y)||0}},{x:0,y:0})});o=e.getHighLow([c],t,t.horizontalBars?"x":"y")}else o=e.getHighLow(i.normalized.series,t,t.horizontalBars?"x":"y");o.high=+t.high||(0===t.high?0:o.high),o.low=+t.low||(0===t.low?0:o.low);var l,u,d,p,g,h=e.createChartRect(this.svg,t,n.padding);u=t.distributeSeries&&t.stackBars?i.normalized.labels.slice(0,1):i.normalized.labels,t.horizontalBars?(l=p=void 0===t.axisX.type?new e.AutoScaleAxis(e.Axis.units.x,i.normalized.series,h,e.extend({},t.axisX,{highLow:o,referenceValue:0})):t.axisX.type.call(e,e.Axis.units.x,i.normalized.series,h,e.extend({},t.axisX,{highLow:o,referenceValue:0})),d=g=void 0===t.axisY.type?new e.StepAxis(e.Axis.units.y,i.normalized.series,h,{ticks:u}):t.axisY.type.call(e,e.Axis.units.y,i.normalized.series,h,t.axisY)):(d=p=void 0===t.axisX.type?new e.StepAxis(e.Axis.units.x,i.normalized.series,h,{ticks:u}):t.axisX.type.call(e,e.Axis.units.x,i.normalized.series,h,t.axisX),l=g=void 0===t.axisY.type?new e.AutoScaleAxis(e.Axis.units.y,i.normalized.series,h,e.extend({},t.axisY,{highLow:o,referenceValue:0})):t.axisY.type.call(e,e.Axis.units.y,i.normalized.series,h,e.extend({},t.axisY,{highLow:o,referenceValue:0})));var f=t.horizontalBars?h.x1+l.projectValue(0):h.y1-l.projectValue(0),m=[];d.createGridAndLabels(a,s,this.supportsForeignObject,t,this.eventEmitter),l.createGridAndLabels(a,s,this.supportsForeignObject,t,this.eventEmitter),t.showGridBackground&&e.createGridBackground(a,h,t.classNames.gridBackground,this.eventEmitter),i.raw.series.forEach((function(n,o){var a,s,c=o-(i.raw.series.length-1)/2;a=t.distributeSeries&&!t.stackBars?d.axisLength/i.normalized.series.length/2:t.distributeSeries&&t.stackBars?d.axisLength/2:d.axisLength/i.normalized.series[o].length/2,(s=r.elem("g")).attr({"ct:series-name":n.name,"ct:meta":e.serialize(n.meta)}),s.addClass([t.classNames.series,n.className||t.classNames.series+"-"+e.alphaNumerate(o)].join(" ")),i.normalized.series[o].forEach((function(r,u){var v,b,y,_;if(_=t.distributeSeries&&!t.stackBars?o:t.distributeSeries&&t.stackBars?0:u,v=t.horizontalBars?{x:h.x1+l.projectValue(r&&r.x?r.x:0,u,i.normalized.series[o]),y:h.y1-d.projectValue(r&&r.y?r.y:0,_,i.normalized.series[o])}:{x:h.x1+d.projectValue(r&&r.x?r.x:0,_,i.normalized.series[o]),y:h.y1-l.projectValue(r&&r.y?r.y:0,u,i.normalized.series[o])},d instanceof e.StepAxis&&(d.options.stretch||(v[d.units.pos]+=a*(t.horizontalBars?-1:1)),v[d.units.pos]+=t.stackBars||t.distributeSeries?0:c*t.seriesBarDistance*(t.horizontalBars?-1:1)),m[u]=(y=m[u]||f)-(f-v[d.counterUnits.pos]),void 0!==r){var x={};x[d.units.pos+"1"]=v[d.units.pos],x[d.units.pos+"2"]=v[d.units.pos],!t.stackBars||"accumulate"!==t.stackMode&&t.stackMode?(x[d.counterUnits.pos+"1"]=f,x[d.counterUnits.pos+"2"]=v[d.counterUnits.pos]):(x[d.counterUnits.pos+"1"]=y,x[d.counterUnits.pos+"2"]=m[u]),x.x1=Math.min(Math.max(x.x1,h.x1),h.x2),x.x2=Math.min(Math.max(x.x2,h.x1),h.x2),x.y1=Math.min(Math.max(x.y1,h.y2),h.y1),x.y2=Math.min(Math.max(x.y2,h.y2),h.y1);var k=e.getMetaData(n,u);b=s.elem("line",x,t.classNames.bar).attr({"ct:value":[r.x,r.y].filter(e.isNumeric).join(","),"ct:meta":e.serialize(k)}),this.eventEmitter.emit("draw",e.extend({type:"bar",value:r,index:u,meta:k,series:n,seriesIndex:o,axisX:p,axisY:g,chartRect:h,group:s,element:b},x))}}).bind(this))}).bind(this)),this.eventEmitter.emit("created",{bounds:l.bounds,chartRect:h,axisX:p,axisY:g,svg:this.svg,options:t})}})}(this||global,t),function(t,e){"use strict";var n={width:void 0,height:void 0,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",sliceDonutSolid:"ct-slice-donut-solid",label:"ct-label"},startAngle:0,total:void 0,donut:!1,donutSolid:!1,donutWidth:60,showLabel:!0,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:e.noop,labelDirection:"neutral",reverseData:!1,ignoreEmptyValues:!1};function i(t,e,n){var i=e.x>t.x;return i&&"explode"===n||!i&&"implode"===n?"start":i&&"implode"===n||!i&&"explode"===n?"end":"middle"}e.Pie=e.Base.extend({constructor:function(t,i,o,a){e.Pie.super.constructor.call(this,t,i,n,e.extend({},n,o),a)},createChart:function(t){var o,a,r,s,c,l=e.normalizeData(this.data),u=[],d=t.startAngle;this.svg=e.createSvg(this.container,t.width,t.height,t.donut?t.classNames.chartDonut:t.classNames.chartPie),a=e.createChartRect(this.svg,t,n.padding),r=Math.min(a.width()/2,a.height()/2),c=t.total||l.normalized.series.reduce(function(t,e){return t+e},0);var p=e.quantity(t.donutWidth);"%"===p.unit&&(p.value*=r/100),r-=t.donut&&!t.donutSolid?p.value/2:0,s="outside"===t.labelPosition||t.donut&&!t.donutSolid?r:"center"===t.labelPosition?0:t.donutSolid?r-p.value/2:r/2,s+=t.labelOffset;var g={x:a.x1+a.width()/2,y:a.y2+a.height()/2},h=1===l.raw.series.filter(function(t){return t.hasOwnProperty("value")?0!==t.value:0!==t}).length;l.raw.series.forEach((function(t,e){u[e]=this.svg.elem("g",null,null)}).bind(this)),t.showLabel&&(o=this.svg.elem("g",null,null)),l.raw.series.forEach((function(n,a){if(0!==l.normalized.series[a]||!t.ignoreEmptyValues){u[a].attr({"ct:series-name":n.name}),u[a].addClass([t.classNames.series,n.className||t.classNames.series+"-"+e.alphaNumerate(a)].join(" "));var f=c>0?d+l.normalized.series[a]/c*360:0,m=Math.max(0,d-(0===a||h?0:.2));f-m>=359.99&&(f=m+359.99);var v,b,y,_=e.polarToCartesian(g.x,g.y,r,m),x=e.polarToCartesian(g.x,g.y,r,f),k=new e.Svg.Path(!t.donut||t.donutSolid).move(x.x,x.y).arc(r,r,0,f-d>180,0,_.x,_.y);t.donut?t.donutSolid&&(v=e.polarToCartesian(g.x,g.y,y=r-p.value,d-(0===a||h?0:.2)),b=e.polarToCartesian(g.x,g.y,y,f),k.line(v.x,v.y),k.arc(y,y,0,f-d>180,1,b.x,b.y)):k.line(g.x,g.y);var Z=t.classNames.slicePie;t.donut&&(Z=t.classNames.sliceDonut,t.donutSolid&&(Z=t.classNames.sliceDonutSolid));var w=u[a].elem("path",{d:k.stringify()},Z);if(w.attr({"ct:value":l.normalized.series[a],"ct:meta":e.serialize(n.meta)}),t.donut&&!t.donutSolid&&(w._node.style.strokeWidth=p.value+"px"),this.eventEmitter.emit("draw",{type:"slice",value:l.normalized.series[a],totalDataSum:c,index:a,meta:n.meta,series:n,group:u[a],element:w,path:k.clone(),center:g,radius:r,startAngle:d,endAngle:f}),t.showLabel){var A,C;A=1===l.raw.series.length?{x:g.x,y:g.y}:e.polarToCartesian(g.x,g.y,s,d+(f-d)/2),C=l.normalized.labels&&!e.isFalseyButZero(l.normalized.labels[a])?l.normalized.labels[a]:l.normalized.series[a];var T=t.labelInterpolationFnc(C,a);if(T||0===T){var q=o.elem("text",{dx:A.x,dy:A.y,"text-anchor":i(g,A,t.labelDirection)},t.classNames.label).text(""+T);this.eventEmitter.emit("draw",{type:"label",index:a,group:o,element:q,text:""+T,x:A.x,y:A.y})}}d=f}}).bind(this)),this.eventEmitter.emit("created",{chartRect:a,svg:this.svg,options:t})},determineAnchorPosition:i})}(this||global,t),t}()}).apply(e,[]))||(t.exports=n)},1486:function(t){"use strict";t.exports=function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){if(e.constructor!==n.constructor)return!1;var i,o,a;if(Array.isArray(e)){if((i=e.length)!=n.length)return!1;for(o=i;0!=o--;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((i=(a=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,a[o]))return!1;for(o=i;0!=o--;){var r=a[o];if(!t(e[r],n[r]))return!1}return!0}return e!=e&&n!=n}},38193:function(e,n,i){"use strict";i.d(n,{w:function(){return Jn}});var o=i(56238),a=i(78512),r=i(11520),l=i(66599),u=i(87829),p=i(4694),h=i(35366),f=i(76512),m=i(73234),v=i(31041),b=i(68515),y=function(){var t=function(){function t(e){d(this,t),this.http=e}return g(t,[{key:"create",value:function(t,e,n,i){return this.http.post("biolink/".concat(t,"/widget"),{type:e,position:n,config:i})}},{key:"update",value:function(t,e,n){return this.http.put("biolink/".concat(t,"/widget/").concat(e),{config:n})}},{key:"delete",value:function(t,e){return this.http.delete("biolink/".concat(t,"/widget/").concat(e))}}]),t}();return t.BASE_URI="biolink-widgets",t.\u0275fac=function(e){return new(e||t)(h.LFG(b.r))},t.\u0275prov=h.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}(),_=i(24859),x={links:0,appearance:1,settings:2},k=function(){var e=function(){function e(t,n,i,o,r){d(this,e),this.biolinks=t,this.toast=n,this.fb=i,this.widgets=o,this.modal=r,this.biolink$=new a.X(null),this.loading$=new a.X(!1),this.activeTab$=new a.X(x.links),this.appearanceForm=this.fb.group({fontConfig:{},btnConfig:this.fb.group({color:this.fb.control(""),variant:this.fb.control(""),type:this.fb.control("")}),bgConfig:{}})}return g(e,[{key:"saveAppearance",value:function(){var t=this;return this.loading$.next(!0),this.biolinks.saveAppearance(this.biolink$.value.id,this.appearanceForm.value).pipe((0,r.x)(function(){return t.loading$.next(!1)})).subscribe(function(){t.toast.open("Appearance saved")})}},{key:"reloadBiolink",value:function(t){var e=this;t=t||this.biolink$.value.id,this.loading$.next(!0),this.biolinks.get(t,{with:["appearance","rules","pixels","domain"]}).pipe((0,r.x)(function(){return e.loading$.next(!1)})).subscribe(function(t){var n;e.biolink$.next(t.biolink),e.appearanceForm.patchValue(null===(n=t.biolink.appearance)||void 0===n?void 0:n.config)})}},{key:"crupdateWidget",value:function(t,e,n){var i=this;return this.loading$.next(!0),(t?this.widgets.update(this.biolink$.value.id,t,n):this.widgets.create(this.biolink$.value.id,e,this.biolink$.value.content.length+1,n)).pipe((0,r.x)(function(){return i.loading$.next(!1)}),(0,l.b)(function(){return i.reloadBiolink()}))}},{key:"openCrupdateLinkDialog",value:function(e){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.modal.open(u.P,Object.assign(Object.assign({},{groups:t({},this.biolink$.value.id,e?{}:{position:this.biolink$.value.content.length+1}),link:e,featuresToHide:{alias:!0,domain:!0,linkGroups:!0,tags:!0}}),i)).afterClosed().subscribe(function(t){t&&n.reloadBiolink()})}},{key:"maybeDeleteContentItem",value:function(t){var e=this;this.modal.open(p.z,{title:"Delete Widget",body:"Are you sure you want to delete this ".concat(t.model_type,"?"),ok:"Delete"}).afterClosed().subscribe(function(n){n&&(e.loading$.next(!0),e.biolinks.detach(e.biolink$.value.id,t).pipe((0,r.x)(function(){return e.loading$.next(!1)})).subscribe(function(){e.reloadBiolink(e.biolink$.value.id)}))})}},{key:"updateContentItemConfig",value:function(t,e){var n=this;this.loading$.next(!0),this.biolinks.updateContentItemConfig(this.biolink$.value.id,t,e).pipe((0,r.x)(function(){return n.loading$.next(!1)})).subscribe(function(){n.reloadBiolink()})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(h.LFG(f.n),h.LFG(m.F),h.LFG(v.qu),h.LFG(y),h.LFG(_.u))},e.\u0275prov=h.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),Z=i(63337),w=i(88195),A=i(57173),C=i(61116),T=i(24637),q=i(92935),I=i(77307),O=i(6006),U=i(38116),P=i(84369);function M(t,e){1&t&&(h.TgZ(0,"span",19),h._uU(1,"Update image widget"),h.qZA())}function S(t,e){1&t&&(h.TgZ(0,"span"),h._uU(1,"Add image widget"),h.qZA())}function N(t,e){1&t&&(h.TgZ(0,"span",19),h._uU(1,"Update"),h.qZA())}function J(t,e){1&t&&(h.TgZ(0,"span",19),h._uU(1,"Add"),h.qZA())}var E=function(){var t=function(){function t(e,n,i){d(this,t),this.dialogRef=e,this.data=n,this.editor=i,this.form=new v.cw({url:new v.NI,destinationUrl:new v.NI,type:new v.NI("default")}),n.config&&this.form.patchValue(n.config)}return g(t,[{key:"createOrUpdate",value:function(){var t=this;this.editor.crupdateWidget(this.data.widgetId,"image",this.form.value).subscribe(function(e){t.dialogRef.close(e.widget)})}},{key:"close",value:function(){this.dialogRef.close()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Y36(q.so),h.Y36(q.WI),h.Y36(k))},t.\u0275cmp=h.Xpm({type:t,selectors:[["image-widget-modal"]],decls:28,vars:8,consts:[[1,"modal-header"],["mat-dialog-title","",1,"modal-title"],["trans","",4,"ngIf"],[4,"ngIf"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"formGroup","ngSubmit"],["mat-dialog-content","",1,"many-inputs"],["formControlName","url"],[1,"input-container"],["for","image-widget-type","trans","",1,"capitalize"],["id","image-widget-type","formControlName","type"],["value","default","trans",""],["value","avatar","trans",""],["for","image-widget-link","cdkFocusInitial","","trans","",1,"capitalize"],["type","url","id","image-widget-link","placeholder","Optional...","trans-placeholder","","formControlName","destinationUrl"],["mat-dialog-actions","",1,"buttons","right"],["type","button","mat-button","","trans","",1,"button","cancel","cancel-button",3,"click"],["type","submit","mat-raised-button","","color","accent",1,"button","primary","submit-button",3,"disabled"],["trans",""]],template:function(t,e){1&t&&(h.TgZ(0,"div",0),h.TgZ(1,"h2",1),h.YNc(2,M,2,0,"span",2),h.YNc(3,S,2,0,"span",3),h.qZA(),h.TgZ(4,"button",4),h.NdJ("click",function(){return e.close()}),h._UZ(5,"mat-icon",5),h.qZA(),h.qZA(),h.TgZ(6,"form",6),h.NdJ("ngSubmit",function(){return e.createOrUpdate()}),h.TgZ(7,"div",7),h._UZ(8,"upload-image-control",8),h.TgZ(9,"div",9),h.TgZ(10,"label",10),h._uU(11,"Type"),h.qZA(),h.TgZ(12,"select",11),h.TgZ(13,"option",12),h._uU(14,"Default"),h.qZA(),h.TgZ(15,"option",13),h._uU(16,"Avatar"),h.qZA(),h.qZA(),h.qZA(),h.TgZ(17,"div",9),h.TgZ(18,"label",14),h._uU(19,"Destination Url"),h.qZA(),h._UZ(20,"input",15),h.qZA(),h.qZA(),h.TgZ(21,"div",16),h.TgZ(22,"button",17),h.NdJ("click",function(){return e.close()}),h._uU(23," Cancel "),h.qZA(),h.TgZ(24,"button",18),h.ALo(25,"async"),h.YNc(26,N,2,0,"span",2),h.YNc(27,J,2,0,"span",2),h.qZA(),h.qZA(),h.qZA()),2&t&&(h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config),h.xp6(3),h.Q6J("formGroup",e.form),h.xp6(18),h.Q6J("disabled",h.lcZ(25,6,e.editor.loading$)),h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config))},directives:[q.uh,C.O5,I.Hw,v.JL,v.sg,q.xY,O.V,v.JJ,v.u,U.P,v.EJ,v.YN,v.Kr,v.Fj,q.H8,P.lW],pipes:[C.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}upload-image-control[_ngcontent-%COMP%]{margin:0 auto 25px}"],changeDetection:0}),t}(),L=i(10487);function D(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Update youtube widget"),h.qZA())}function R(t,e){1&t&&(h.TgZ(0,"span"),h._uU(1,"Add youtube widget"),h.qZA())}function Y(t,e){if(1&t&&(h.TgZ(0,"div",16),h._uU(1),h.qZA()),2&t){var n=e.ngIf;h.xp6(1),h.Oqu(n)}}function F(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Update"),h.qZA())}function Q(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Add"),h.qZA())}var $=function(){var t=function(){function t(e,n,i){var o,r;d(this,t),this.dialogRef=e,this.data=n,this.editor=i,this.errors$=new a.X({}),this.form=new v.cw({url:new v.NI("")}),(null===(o=n.config)||void 0===o?void 0:o.url)&&this.form.patchValue({url:null===(r=n.config)||void 0===r?void 0:r.url})}return g(t,[{key:"createOrUpdate",value:function(){var e=this;if(!(0,L.Z)(this.form.value.url).id)return this.errors$.next({url:"This is not a valid youtube url."});this.editor.crupdateWidget(this.data.widgetId,t.type,this.form.value).subscribe(function(t){e.dialogRef.close(t.widget)})}},{key:"close",value:function(){this.dialogRef.close()}}]),t}();return t.type="youtubeEmbed",t.\u0275fac=function(e){return new(e||t)(h.Y36(q.so),h.Y36(q.WI),h.Y36(k))},t.\u0275cmp=h.Xpm({type:t,selectors:[["youtube-widget-modal"]],decls:21,vars:11,consts:[[1,"modal-header"],["mat-dialog-title","",1,"modal-title"],["trans","",4,"ngIf"],[4,"ngIf"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"formGroup","ngSubmit"],["mat-dialog-content",""],[1,"input-container"],["for","youtube-widget-url","trans",""],["type","url","id","youtube-widget-url","formControlName","url","placeholder","https://www.youtube.com/watch?v=YE7VzlLtp-4","cdkFocusInitial","","required",""],["class","error","trans","",4,"ngIf"],["mat-dialog-actions","",1,"buttons","right"],["type","button","mat-button","","trans","",1,"button","cancel","cancel-button",3,"click"],["type","submit","mat-raised-button","","color","accent",1,"button","primary","submit-button",3,"disabled"],["trans",""],["trans","",1,"error"]],template:function(t,e){1&t&&(h.TgZ(0,"div",0),h.TgZ(1,"h2",1),h.YNc(2,D,2,0,"span",2),h.YNc(3,R,2,0,"span",3),h.qZA(),h.TgZ(4,"button",4),h.NdJ("click",function(){return e.close()}),h._UZ(5,"mat-icon",5),h.qZA(),h.qZA(),h.TgZ(6,"form",6),h.NdJ("ngSubmit",function(){return e.createOrUpdate()}),h.TgZ(7,"div",7),h.TgZ(8,"div",8),h.TgZ(9,"label",9),h._uU(10,"Youtube Url"),h.qZA(),h._UZ(11,"input",10),h.YNc(12,Y,2,1,"div",11),h.ALo(13,"async"),h.qZA(),h.qZA(),h.TgZ(14,"div",12),h.TgZ(15,"button",13),h.NdJ("click",function(){return e.close()}),h._uU(16," Cancel "),h.qZA(),h.TgZ(17,"button",14),h.ALo(18,"async"),h.YNc(19,F,2,0,"span",2),h.YNc(20,Q,2,0,"span",2),h.qZA(),h.qZA(),h.qZA()),2&t&&(h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config),h.xp6(3),h.Q6J("formGroup",e.form),h.xp6(6),h.Q6J("ngIf",h.lcZ(13,7,e.errors$).url),h.xp6(5),h.Q6J("disabled",h.lcZ(18,9,e.editor.loading$)),h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config))},directives:[q.uh,C.O5,I.Hw,v.JL,v.sg,q.xY,U.P,v.Fj,v.JJ,v.u,v.Q7,q.H8,P.lW],pipes:[C.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}upload-image-control[_ngcontent-%COMP%]{margin:0 auto 25px}"],changeDetection:0}),t}();function B(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Update soundcloud widget"),h.qZA())}function H(t,e){1&t&&(h.TgZ(0,"span"),h._uU(1,"Add soundcloud widget"),h.qZA())}function V(t,e){if(1&t&&(h.TgZ(0,"div",16),h._uU(1),h.qZA()),2&t){var n=e.ngIf;h.xp6(1),h.Oqu(n)}}function z(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Update"),h.qZA())}function G(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Add"),h.qZA())}var j=function(){var t=function(){function t(e,n,i,o){d(this,t),this.dialogRef=e,this.data=n,this.http=i,this.editor=o,this.errors$=new a.X({}),this.form=new v.cw({url:new v.NI("")}),n.config&&this.form.patchValue(n.config)}return g(t,[{key:"createOrUpdate",value:function(){var e=this;this.editor.loading$.next(!0);var n=encodeURIComponent(this.form.value.url);this.http.get("https://soundcloud.com/oembed?format=json&url="+n).subscribe(function(n){var i=n.html;if(!i)return e.editor.loading$.next(!1),e.errors$.next({url:"This is not a valid soundcloud url."});i=i.replace('height="400"','height="180"'),e.editor.crupdateWidget(e.data.widgetId,t.type,{embedCode:i,url:e.form.value.url}).subscribe(function(t){e.dialogRef.close(t.widget)})},function(){e.editor.loading$.next(!1),e.errors$.next({url:"Could not get soundcloud embed code, try again later."})})}},{key:"close",value:function(){this.dialogRef.close()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Y36(q.so),h.Y36(q.WI),h.Y36(b.r),h.Y36(k))},t.\u0275cmp=h.Xpm({type:t,selectors:[["soundcloud-widget-modal"]],decls:21,vars:11,consts:[[1,"modal-header"],["mat-dialog-title","",1,"modal-title"],["trans","",4,"ngIf"],[4,"ngIf"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"formGroup","ngSubmit"],["mat-dialog-content",""],[1,"input-container"],["for","soundcloud-widget-url","trans",""],["type","url","id","soundcloud-widget-url","formControlName","url","placeholder","https://soundcloud.com/arianagrande/ariana-grande-test-drive","cdkFocusInitial","","required",""],["class","error","trans","",4,"ngIf"],["mat-dialog-actions","",1,"buttons","right"],["type","button","mat-button","","trans","",1,"button","cancel","cancel-button",3,"click"],["type","submit","mat-raised-button","","color","accent",1,"button","primary","submit-button",3,"disabled"],["trans",""],["trans","",1,"error"]],template:function(t,e){1&t&&(h.TgZ(0,"div",0),h.TgZ(1,"h2",1),h.YNc(2,B,2,0,"span",2),h.YNc(3,H,2,0,"span",3),h.qZA(),h.TgZ(4,"button",4),h.NdJ("click",function(){return e.close()}),h._UZ(5,"mat-icon",5),h.qZA(),h.qZA(),h.TgZ(6,"form",6),h.NdJ("ngSubmit",function(){return e.createOrUpdate()}),h.TgZ(7,"div",7),h.TgZ(8,"div",8),h.TgZ(9,"label",9),h._uU(10,"Soundcloud Url"),h.qZA(),h._UZ(11,"input",10),h.YNc(12,V,2,1,"div",11),h.ALo(13,"async"),h.qZA(),h.qZA(),h.TgZ(14,"div",12),h.TgZ(15,"button",13),h.NdJ("click",function(){return e.close()}),h._uU(16," Cancel "),h.qZA(),h.TgZ(17,"button",14),h.ALo(18,"async"),h.YNc(19,z,2,0,"span",2),h.YNc(20,G,2,0,"span",2),h.qZA(),h.qZA(),h.qZA()),2&t&&(h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config),h.xp6(3),h.Q6J("formGroup",e.form),h.xp6(6),h.Q6J("ngIf",h.lcZ(13,7,e.errors$).url),h.xp6(5),h.Q6J("disabled",h.lcZ(18,9,e.editor.loading$)),h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config))},directives:[q.uh,C.O5,I.Hw,v.JL,v.sg,q.xY,U.P,v.Fj,v.JJ,v.u,v.Q7,q.H8,P.lW],pipes:[C.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}upload-image-control[_ngcontent-%COMP%]{margin:0 auto 25px}"],changeDetection:0}),t}();function X(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Update vimeo widget"),h.qZA())}function W(t,e){1&t&&(h.TgZ(0,"span"),h._uU(1,"Add vimeo widget"),h.qZA())}function K(t,e){if(1&t&&(h.TgZ(0,"div",16),h._uU(1),h.qZA()),2&t){var n=e.ngIf;h.xp6(1),h.Oqu(n)}}function tt(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Update"),h.qZA())}function et(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Add"),h.qZA())}var nt=function(){var t=function(){function t(e,n,i){var o,r;d(this,t),this.dialogRef=e,this.data=n,this.editor=i,this.errors$=new a.X({}),this.form=new v.cw({url:new v.NI("")}),(null===(o=n.config)||void 0===o?void 0:o.url)&&this.form.patchValue({url:null===(r=n.config)||void 0===r?void 0:r.url})}return g(t,[{key:"createOrUpdate",value:function(){var e=this;if(!(0,L.Z)(this.form.value.url).id)return this.errors$.next({url:"This is not a valid vimeo url."});this.editor.crupdateWidget(this.data.widgetId,t.widgetType,this.form.value).subscribe(function(t){e.dialogRef.close(t.widget)})}},{key:"close",value:function(){this.dialogRef.close()}}]),t}();return t.widgetType="vimeoEmbed",t.\u0275fac=function(e){return new(e||t)(h.Y36(q.so),h.Y36(q.WI),h.Y36(k))},t.\u0275cmp=h.Xpm({type:t,selectors:[["vimeo-widget-modal"]],decls:21,vars:11,consts:[[1,"modal-header"],["mat-dialog-title","",1,"modal-title"],["trans","",4,"ngIf"],[4,"ngIf"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"formGroup","ngSubmit"],["mat-dialog-content",""],[1,"input-container"],["for","youtube-widget-url","trans",""],["type","url","id","youtube-widget-url","formControlName","url","placeholder","https://vimeo.com/1084537","cdkFocusInitial","","required",""],["class","error","trans","",4,"ngIf"],["mat-dialog-actions","",1,"buttons","right"],["type","button","mat-button","","trans","",1,"button","cancel","cancel-button",3,"click"],["type","submit","mat-raised-button","","color","accent",1,"button","primary","submit-button",3,"disabled"],["trans",""],["trans","",1,"error"]],template:function(t,e){1&t&&(h.TgZ(0,"div",0),h.TgZ(1,"h2",1),h.YNc(2,X,2,0,"span",2),h.YNc(3,W,2,0,"span",3),h.qZA(),h.TgZ(4,"button",4),h.NdJ("click",function(){return e.close()}),h._UZ(5,"mat-icon",5),h.qZA(),h.qZA(),h.TgZ(6,"form",6),h.NdJ("ngSubmit",function(){return e.createOrUpdate()}),h.TgZ(7,"div",7),h.TgZ(8,"div",8),h.TgZ(9,"label",9),h._uU(10,"Vimeo Url"),h.qZA(),h._UZ(11,"input",10),h.YNc(12,K,2,1,"div",11),h.ALo(13,"async"),h.qZA(),h.qZA(),h.TgZ(14,"div",12),h.TgZ(15,"button",13),h.NdJ("click",function(){return e.close()}),h._uU(16," Cancel "),h.qZA(),h.TgZ(17,"button",14),h.ALo(18,"async"),h.YNc(19,tt,2,0,"span",2),h.YNc(20,et,2,0,"span",2),h.qZA(),h.qZA(),h.qZA()),2&t&&(h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config),h.xp6(3),h.Q6J("formGroup",e.form),h.xp6(6),h.Q6J("ngIf",h.lcZ(13,7,e.errors$).url),h.xp6(5),h.Q6J("disabled",h.lcZ(18,9,e.editor.loading$)),h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config))},directives:[q.uh,C.O5,I.Hw,v.JL,v.sg,q.xY,U.P,v.Fj,v.JJ,v.u,v.Q7,q.H8,P.lW],pipes:[C.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}upload-image-control[_ngcontent-%COMP%]{margin:0 auto 25px}"],changeDetection:0}),t}(),it=i(70110);function ot(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Update spotify widget"),h.qZA())}function at(t,e){1&t&&(h.TgZ(0,"span"),h._uU(1,"Add spotify widget"),h.qZA())}function rt(t,e){if(1&t&&(h.TgZ(0,"div",16),h._uU(1),h.qZA()),2&t){var n=e.ngIf;h.xp6(1),h.Oqu(n)}}function st(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Update"),h.qZA())}function ct(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Add"),h.qZA())}var lt=function(){var t=function(){function t(e,n,i){var o,r;d(this,t),this.dialogRef=e,this.data=n,this.editor=i,this.errors$=new a.X({}),this.form=new v.cw({url:new v.NI("")}),(null===(o=n.config)||void 0===o?void 0:o.url)&&this.form.patchValue({url:null===(r=n.config)||void 0===r?void 0:r.url})}return g(t,[{key:"createOrUpdate",value:function(){var e=this;if(!("id"in it(this.form.value.url)))return this.errors$.next({url:"This is not a valid spotify url."});this.editor.crupdateWidget(this.data.widgetId,t.type,this.form.value).subscribe(function(t){e.dialogRef.close(t.widget)})}},{key:"close",value:function(){this.dialogRef.close()}}]),t}();return t.type="spotifyEmbed",t.\u0275fac=function(e){return new(e||t)(h.Y36(q.so),h.Y36(q.WI),h.Y36(k))},t.\u0275cmp=h.Xpm({type:t,selectors:[["spotify-widget-modal"]],decls:21,vars:11,consts:[[1,"modal-header"],["mat-dialog-title","",1,"modal-title"],["trans","",4,"ngIf"],[4,"ngIf"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"formGroup","ngSubmit"],["mat-dialog-content",""],[1,"input-container"],["for","spotify-widget-url","trans",""],["type","url","id","spotify-widget-url","formControlName","url","placeholder","https://open.spotify.com/track/2sqfLwGKXDw1nGjFhH3GGX?si=f329040f45804ec5","cdkFocusInitial","","required",""],["class","error","trans","",4,"ngIf"],["mat-dialog-actions","",1,"buttons","right"],["type","button","mat-button","","trans","",1,"button","cancel","cancel-button",3,"click"],["type","submit","mat-raised-button","","color","accent",1,"button","primary","submit-button",3,"disabled"],["trans",""],["trans","",1,"error"]],template:function(t,e){1&t&&(h.TgZ(0,"div",0),h.TgZ(1,"h2",1),h.YNc(2,ot,2,0,"span",2),h.YNc(3,at,2,0,"span",3),h.qZA(),h.TgZ(4,"button",4),h.NdJ("click",function(){return e.close()}),h._UZ(5,"mat-icon",5),h.qZA(),h.qZA(),h.TgZ(6,"form",6),h.NdJ("ngSubmit",function(){return e.createOrUpdate()}),h.TgZ(7,"div",7),h.TgZ(8,"div",8),h.TgZ(9,"label",9),h._uU(10,"Spotify Url"),h.qZA(),h._UZ(11,"input",10),h.YNc(12,rt,2,1,"div",11),h.ALo(13,"async"),h.qZA(),h.qZA(),h.TgZ(14,"div",12),h.TgZ(15,"button",13),h.NdJ("click",function(){return e.close()}),h._uU(16," Cancel "),h.qZA(),h.TgZ(17,"button",14),h.ALo(18,"async"),h.YNc(19,st,2,0,"span",2),h.YNc(20,ct,2,0,"span",2),h.qZA(),h.qZA(),h.qZA()),2&t&&(h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config),h.xp6(3),h.Q6J("formGroup",e.form),h.xp6(6),h.Q6J("ngIf",h.lcZ(13,7,e.errors$).url),h.xp6(5),h.Q6J("disabled",h.lcZ(18,9,e.editor.loading$)),h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config))},directives:[q.uh,C.O5,I.Hw,v.JL,v.sg,q.xY,U.P,v.Fj,v.JJ,v.u,v.Q7,q.H8,P.lW],pipes:[C.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}upload-image-control[_ngcontent-%COMP%]{margin:0 auto 25px}"],changeDetection:0}),t}();function ut(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Update twitch widget"),h.qZA())}function dt(t,e){1&t&&(h.TgZ(0,"span"),h._uU(1,"Add twitch widget"),h.qZA())}function pt(t,e){if(1&t&&(h.TgZ(0,"div",16),h._uU(1),h.qZA()),2&t){var n=e.ngIf;h.xp6(1),h.Oqu(n)}}function gt(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Update"),h.qZA())}function ht(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Add"),h.qZA())}var ft=function(){var t=function(){function t(e,n,i){var o,r;d(this,t),this.dialogRef=e,this.data=n,this.editor=i,this.errors$=new a.X({}),this.form=new v.cw({url:new v.NI("")}),(null===(o=n.config)||void 0===o?void 0:o.url)&&this.form.patchValue({url:null===(r=n.config)||void 0===r?void 0:r.url})}return g(t,[{key:"createOrUpdate",value:function(){var e=this;if(!this.form.value.url.includes("twitch.tv/"))return this.errors$.next({url:"This is not a valid twitch url."});this.editor.crupdateWidget(this.data.widgetId,t.type,this.form.value).subscribe(function(t){e.dialogRef.close(t.widget)})}},{key:"close",value:function(){this.dialogRef.close()}}]),t}();return t.type="twitchEmbed",t.\u0275fac=function(e){return new(e||t)(h.Y36(q.so),h.Y36(q.WI),h.Y36(k))},t.\u0275cmp=h.Xpm({type:t,selectors:[["twitch-widget-modal"]],decls:21,vars:11,consts:[[1,"modal-header"],["mat-dialog-title","",1,"modal-title"],["trans","",4,"ngIf"],[4,"ngIf"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"formGroup","ngSubmit"],["mat-dialog-content",""],[1,"input-container"],["for","twitch-widget-url","trans",""],["type","url","id","twitch-widget-url","formControlName","url","placeholder","https://www.twitch.tv/kasparovchess","cdkFocusInitial","","required",""],["class","error","trans","",4,"ngIf"],["mat-dialog-actions","",1,"buttons","right"],["type","button","mat-button","","trans","",1,"button","cancel","cancel-button",3,"click"],["type","submit","mat-raised-button","","color","accent",1,"button","primary","submit-button",3,"disabled"],["trans",""],["trans","",1,"error"]],template:function(t,e){1&t&&(h.TgZ(0,"div",0),h.TgZ(1,"h2",1),h.YNc(2,ut,2,0,"span",2),h.YNc(3,dt,2,0,"span",3),h.qZA(),h.TgZ(4,"button",4),h.NdJ("click",function(){return e.close()}),h._UZ(5,"mat-icon",5),h.qZA(),h.qZA(),h.TgZ(6,"form",6),h.NdJ("ngSubmit",function(){return e.createOrUpdate()}),h.TgZ(7,"div",7),h.TgZ(8,"div",8),h.TgZ(9,"label",9),h._uU(10,"Twitch Url"),h.qZA(),h._UZ(11,"input",10),h.YNc(12,pt,2,1,"div",11),h.ALo(13,"async"),h.qZA(),h.qZA(),h.TgZ(14,"div",12),h.TgZ(15,"button",13),h.NdJ("click",function(){return e.close()}),h._uU(16," Cancel "),h.qZA(),h.TgZ(17,"button",14),h.ALo(18,"async"),h.YNc(19,gt,2,0,"span",2),h.YNc(20,ht,2,0,"span",2),h.qZA(),h.qZA(),h.qZA()),2&t&&(h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config),h.xp6(3),h.Q6J("formGroup",e.form),h.xp6(6),h.Q6J("ngIf",h.lcZ(13,7,e.errors$).url),h.xp6(5),h.Q6J("disabled",h.lcZ(18,9,e.editor.loading$)),h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config))},directives:[q.uh,C.O5,I.Hw,v.JL,v.sg,q.xY,U.P,v.Fj,v.JJ,v.u,v.Q7,q.H8,P.lW],pipes:[C.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}upload-image-control[_ngcontent-%COMP%]{margin:0 auto 25px}"],changeDetection:0}),t}();function mt(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Update tiktok widget"),h.qZA())}function vt(t,e){1&t&&(h.TgZ(0,"span"),h._uU(1,"Add tiktok widget"),h.qZA())}function bt(t,e){if(1&t&&(h.TgZ(0,"div",16),h._uU(1),h.qZA()),2&t){var n=e.ngIf;h.xp6(1),h.Oqu(n)}}function yt(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Update"),h.qZA())}function _t(t,e){1&t&&(h.TgZ(0,"span",15),h._uU(1,"Add"),h.qZA())}var xt=function(){var t=function(){function t(e,n,i){var o,r;d(this,t),this.dialogRef=e,this.data=n,this.editor=i,this.errors$=new a.X({}),this.form=new v.cw({url:new v.NI("")}),(null===(o=n.config)||void 0===o?void 0:o.url)&&this.form.patchValue({url:null===(r=n.config)||void 0===r?void 0:r.url})}return g(t,[{key:"createOrUpdate",value:function(){var e=this;if(!this.form.value.url.includes("tiktok.com/"))return this.errors$.next({url:"This is not a valid tiktok url."});this.editor.crupdateWidget(this.data.widgetId,t.type,this.form.value).subscribe(function(t){e.dialogRef.close(t.widget)})}},{key:"close",value:function(){this.dialogRef.close()}}]),t}();return t.type="tiktokEmbed",t.\u0275fac=function(e){return new(e||t)(h.Y36(q.so),h.Y36(q.WI),h.Y36(k))},t.\u0275cmp=h.Xpm({type:t,selectors:[["tiktok-widget-modal"]],decls:21,vars:11,consts:[[1,"modal-header"],["mat-dialog-title","",1,"modal-title"],["trans","",4,"ngIf"],[4,"ngIf"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"formGroup","ngSubmit"],["mat-dialog-content",""],[1,"input-container"],["for","tiktok-widget-url","trans",""],["type","url","id","tiktok-widget-url","formControlName","url","placeholder","https://www.tiktok.com/@bts_official_bighit/video/6964945720885464322","cdkFocusInitial","","required",""],["class","error","trans","",4,"ngIf"],["mat-dialog-actions","",1,"buttons","right"],["type","button","mat-button","","trans","",1,"button","cancel","cancel-button",3,"click"],["type","submit","mat-raised-button","","color","accent",1,"button","primary","submit-button",3,"disabled"],["trans",""],["trans","",1,"error"]],template:function(t,e){1&t&&(h.TgZ(0,"div",0),h.TgZ(1,"h2",1),h.YNc(2,mt,2,0,"span",2),h.YNc(3,vt,2,0,"span",3),h.qZA(),h.TgZ(4,"button",4),h.NdJ("click",function(){return e.close()}),h._UZ(5,"mat-icon",5),h.qZA(),h.qZA(),h.TgZ(6,"form",6),h.NdJ("ngSubmit",function(){return e.createOrUpdate()}),h.TgZ(7,"div",7),h.TgZ(8,"div",8),h.TgZ(9,"label",9),h._uU(10,"TikTok Url"),h.qZA(),h._UZ(11,"input",10),h.YNc(12,bt,2,1,"div",11),h.ALo(13,"async"),h.qZA(),h.qZA(),h.TgZ(14,"div",12),h.TgZ(15,"button",13),h.NdJ("click",function(){return e.close()}),h._uU(16," Cancel "),h.qZA(),h.TgZ(17,"button",14),h.ALo(18,"async"),h.YNc(19,yt,2,0,"span",2),h.YNc(20,_t,2,0,"span",2),h.qZA(),h.qZA(),h.qZA()),2&t&&(h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config),h.xp6(3),h.Q6J("formGroup",e.form),h.xp6(6),h.Q6J("ngIf",h.lcZ(13,7,e.errors$).url),h.xp6(5),h.Q6J("disabled",h.lcZ(18,9,e.editor.loading$)),h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config))},directives:[q.uh,C.O5,I.Hw,v.JL,v.sg,q.xY,U.P,v.Fj,v.JJ,v.u,v.Q7,q.H8,P.lW],pipes:[C.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}upload-image-control[_ngcontent-%COMP%]{margin:0 auto 25px}"],changeDetection:0}),t}();function kt(t,e){1&t&&(h.TgZ(0,"span",16),h._uU(1,"Update text widget"),h.qZA())}function Zt(t,e){1&t&&(h.TgZ(0,"span"),h._uU(1,"Add text widget"),h.qZA())}function wt(t,e){1&t&&(h.TgZ(0,"span",16),h._uU(1,"Update"),h.qZA())}function At(t,e){1&t&&(h.TgZ(0,"span",16),h._uU(1,"Add"),h.qZA())}var Ct=[{name:"Email",type:"mail",placeholder:"your@email.com",inputType:"email"},{name:"Facebook Url",type:"facebook",placeholder:"https://facebook.com/username",pattern:"https://facebook.com/[a-zA-Z0-9._]+$",inputType:"url"},{name:"Twitter Handle",type:"twitter",placeholder:"@yourtwitterhandle",pattern:"^@[A-Za-z0-9_]{1,15}$"},{name:"Instagram Username",type:"instagram",placeholder:"@instagramusername",pattern:"^@[a-zA-Z0-9._]+$"},{name:"TikTok Username",type:"tiktok",placeholder:"@tiktokusername",pattern:"^@[a-zA-Z0-9._]+$"},{name:"Youtube Channel Url",type:"youtube",placeholder:"https://youtube.com/channel/youtubechannelurl",inputType:"url",pattern:"https://youtube.com/channel/[a-zA-Z0-9._]+$"},{name:"SoundCloud Url",type:"soundcloud",placeholder:"https://soundcloud.com/username",inputType:"url",pattern:"https://soundcloud.com/[a-zA-Z0-9._]+$"},{name:"Bandcamp Url",type:"bandcamp",placeholder:"https://you.bandcamp.com",inputType:"url",pattern:"https://[a-zA-Z0-9._]+.bandcamp.com$"},{name:"LinkedIn Url",type:"linkedin",placeholder:"https://linkedin.com/in/username",inputType:"url",pattern:"https://linkedin.com/in/[a-zA-Z0-9._]+$"},{name:"WhatsApp",type:"whatsapp",placeholder:"+00000000000",pattern:"^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*$"},{name:"Telegram Url",type:"telegram",placeholder:"https://t.me/",inputType:"url",pattern:"https://t.me/[a-zA-Z0-9._]+$"},{name:"Twitch Url",type:"twitch",placeholder:"https://twitch.tv/username",inputType:"url",pattern:"https://twitch.tv/[a-zA-Z0-9._]+$"},{name:"Patreon Url",type:"patreon",placeholder:"https://patreon.com/username",inputType:"url",pattern:"https://patreon.com/[a-zA-Z0-9._]+$"},{name:"Pinterest Url",type:"pinterest",placeholder:"https://pinterest.com/",inputType:"url",pattern:"https://pinterest.com/.+"},{name:"Spotify Artist Url",type:"spotify",placeholder:"https://open.spotify.com/artist/artistname",inputType:"url",pattern:"https://open.spotify.com/artist/[a-zA-Z0-9._]+$"},{name:"Amazon Shop Url",type:"amazon",placeholder:"https://amazon.com/shop/yourshopname",inputType:"url",pattern:"https://amazon.com/shop/[a-zA-Z0-9._]+$"},{name:"Snapchat Url",type:"snapchat",placeholder:"https://www.snapchat.com/add/yourusername",inputType:"url",pattern:"https://www.snapchat.com/add/[a-zA-Z0-9._]+$"},{name:"Apple Music Url",type:"apple",placeholder:"https://music.apple.com/us/album/youralbum",inputType:"url",pattern:"https://music.apple.com/.+"}];function Tt(t,e){1&t&&(h.TgZ(0,"span",12),h._uU(1,"Update social links"),h.qZA())}function qt(t,e){1&t&&(h.TgZ(0,"span"),h._uU(1,"Add social links"),h.qZA())}function It(t,e){if(1&t&&(h.TgZ(0,"div",13),h.TgZ(1,"label",14),h._uU(2),h.qZA(),h._UZ(3,"input",15),h.qZA()),2&t){var n=e.$implicit;h.xp6(1),h.Q6J("for",n.name),h.xp6(1),h.Oqu(n.name),h.xp6(1),h.Q6J("type",n.inputType||"text")("pattern",n.pattern)("placeholder",n.placeholder)("id",n.name)("formControlName",n.type)}}function Ot(t,e){1&t&&(h.TgZ(0,"span",12),h._uU(1,"Update"),h.qZA())}function Ut(t,e){1&t&&(h.TgZ(0,"span",12),h._uU(1,"Add"),h.qZA())}var Pt,Mt,St=[{type:"image",image:"image.png",description:"Upload an image and optionally add a link it will redirect to when clicked.",component:E},{type:"text",image:"text.png",description:"Add title and optional description. Can be used as a header for the whole biolink or a group of multiple widgets.",component:(Mt=function(){function t(e,n,i){d(this,t),this.dialogRef=e,this.data=n,this.editor=i,this.form=new v.cw({title:new v.NI,description:new v.NI}),n.config&&this.form.patchValue(n.config)}return g(t,[{key:"createOrUpdate",value:function(){var t=this;this.editor.crupdateWidget(this.data.widgetId,"text",this.form.value).subscribe(function(e){t.dialogRef.close(e.widget)})}},{key:"close",value:function(){this.dialogRef.close()}}]),t}(),Mt.\u0275fac=function(t){return new(t||Mt)(h.Y36(q.so),h.Y36(q.WI),h.Y36(k))},Mt.\u0275cmp=h.Xpm({type:Mt,selectors:[["text-widget-modal"]],decls:23,vars:8,consts:[[1,"modal-header"],["mat-dialog-title","",1,"modal-title"],["trans","",4,"ngIf"],[4,"ngIf"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"formGroup","ngSubmit"],["mat-dialog-content","",1,"many-inputs"],[1,"input-container"],["for","text-widget-title","trans","",1,"capitalize"],["cdkFocusInitial","","type","text","id","text-widget-title","formControlName","title","required",""],["for","text-widget-description","trans","",1,"capitalize"],["type","text","id","text-widget-description","formControlName","description"],["mat-dialog-actions","",1,"buttons","right"],["type","button","mat-button","","trans","",1,"button","cancel","cancel-button",3,"click"],["type","submit","mat-raised-button","","color","accent",1,"button","primary","submit-button",3,"disabled"],["trans",""]],template:function(t,e){1&t&&(h.TgZ(0,"div",0),h.TgZ(1,"h2",1),h.YNc(2,kt,2,0,"span",2),h.YNc(3,Zt,2,0,"span",3),h.qZA(),h.TgZ(4,"button",4),h.NdJ("click",function(){return e.close()}),h._UZ(5,"mat-icon",5),h.qZA(),h.qZA(),h.TgZ(6,"form",6),h.NdJ("ngSubmit",function(){return e.createOrUpdate()}),h.TgZ(7,"div",7),h.TgZ(8,"div",8),h.TgZ(9,"label",9),h._uU(10,"Title"),h.qZA(),h._UZ(11,"input",10),h.qZA(),h.qZA(),h.TgZ(12,"div",8),h.TgZ(13,"label",11),h._uU(14,"Description"),h.qZA(),h._UZ(15,"input",12),h.qZA(),h.TgZ(16,"div",13),h.TgZ(17,"button",14),h.NdJ("click",function(){return e.close()}),h._uU(18," Cancel "),h.qZA(),h.TgZ(19,"button",15),h.ALo(20,"async"),h.YNc(21,wt,2,0,"span",2),h.YNc(22,At,2,0,"span",2),h.qZA(),h.qZA(),h.qZA()),2&t&&(h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config),h.xp6(3),h.Q6J("formGroup",e.form),h.xp6(13),h.Q6J("disabled",h.lcZ(20,6,e.editor.loading$)),h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config))},directives:[q.uh,C.O5,I.Hw,v.JL,v.sg,q.xY,U.P,v.Fj,v.JJ,v.u,v.Q7,q.H8,P.lW],pipes:[C.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}upload-image-control[_ngcontent-%COMP%]{margin:0 auto 25px}"],changeDetection:0}),Mt)},{type:"socials",name:"Social Links",image:"socials.png",description:"Add your socials links to display them as icon buttons.",component:(Pt=function(){function t(e,n,i){var o=this;d(this,t),this.dialogRef=e,this.data=n,this.editor=i,this.services=Ct,this.form=new v.cw({}),this.services.forEach(function(t){o.form.addControl(t.type,new v.NI)}),n.config&&this.form.patchValue(n.config)}return g(t,[{key:"createOrUpdate",value:function(){var t=this;this.editor.crupdateWidget(this.data.widgetId,"socials",this.form.value).subscribe(function(e){t.dialogRef.close(e.widget)})}},{key:"close",value:function(){this.dialogRef.close()}}]),t}(),Pt.\u0275fac=function(t){return new(t||Pt)(h.Y36(q.so),h.Y36(q.WI),h.Y36(k))},Pt.\u0275cmp=h.Xpm({type:Pt,selectors:[["socials-widget-modal"]],decls:16,vars:9,consts:[[1,"modal-header"],["mat-dialog-title","",1,"modal-title"],["trans","",4,"ngIf"],[4,"ngIf"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"formGroup","ngSubmit"],["mat-dialog-content","",1,"many-inputs"],["class","input-container",4,"ngFor","ngForOf"],["mat-dialog-actions","",1,"buttons","right"],["type","button","mat-button","","trans","",1,"button","cancel","cancel-button",3,"click"],["type","submit","mat-raised-button","","color","accent",1,"button","primary","submit-button",3,"disabled"],["trans",""],[1,"input-container"],["trans","",1,"capitalize",3,"for"],["autocomplete","false",3,"type","pattern","placeholder","id","formControlName"]],template:function(t,e){1&t&&(h.TgZ(0,"div",0),h.TgZ(1,"h2",1),h.YNc(2,Tt,2,0,"span",2),h.YNc(3,qt,2,0,"span",3),h.qZA(),h.TgZ(4,"button",4),h.NdJ("click",function(){return e.close()}),h._UZ(5,"mat-icon",5),h.qZA(),h.qZA(),h.TgZ(6,"form",6),h.NdJ("ngSubmit",function(){return e.createOrUpdate()}),h.TgZ(7,"div",7),h.YNc(8,It,4,7,"div",8),h.qZA(),h.TgZ(9,"div",9),h.TgZ(10,"button",10),h.NdJ("click",function(){return e.close()}),h._uU(11," Cancel "),h.qZA(),h.TgZ(12,"button",11),h.ALo(13,"async"),h.YNc(14,Ot,2,0,"span",2),h.YNc(15,Ut,2,0,"span",2),h.qZA(),h.qZA(),h.qZA()),2&t&&(h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config),h.xp6(3),h.Q6J("formGroup",e.form),h.xp6(2),h.Q6J("ngForOf",e.services),h.xp6(4),h.Q6J("disabled",h.lcZ(13,7,e.editor.loading$)),h.xp6(2),h.Q6J("ngIf",e.data.config),h.xp6(1),h.Q6J("ngIf",!e.data.config))},directives:[q.uh,C.O5,I.Hw,v.JL,v.sg,q.xY,C.sg,q.H8,P.lW,U.P,v.Fj,v.c5,v.JJ,v.u],pipes:[C.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}upload-image-control[_ngcontent-%COMP%]{margin:0 auto 25px}"],changeDetection:0}),Pt)},{name:"Youtube Video",type:"youtubeEmbed",image:"youtube.png",description:"Paste a YouTube video URL to show it as a video embed in your profile.",component:$},{name:"Soundcloud Video",type:"soundcloudEmbed",image:"soundcloud.png",description:"Paste a SoundCloud URL to show it as a playable song in your profile.",component:j},{name:"Vimeo Video",type:"vimeoEmbed",image:"vimeo.jpeg",description:"Paste a vimeo URL to show it as a video embed in your profile.",component:nt},{name:"Spotify Embed",type:"spotifyEmbed",image:"spotify.png",description:"Paste a spotify song, album, artist, playlist, podcast or episode url to show it as an embed in your profile.",component:lt},{name:"Twitch Embed",type:"twitchEmbed",image:"twitch.svg",description:"Paste twitch profile or clip url to show it as an embed in your profile.",component:ft},{name:"TikTok Embed",type:"tiktokEmbed",image:"tiktok.png",description:"Paste TikTok video url to show it as an embed in your profile.",component:xt}],Nt=i(87064);function Jt(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"div",7),h.NdJ("click",function(){var t=h.CHM(n).$implicit;return h.oxw().openWidgetDialog(t.component)}),h._UZ(1,"img",8),h.TgZ(2,"div",9),h._uU(3),h.qZA(),h.TgZ(4,"div",10),h._uU(5),h.qZA(),h.qZA()}if(2&t){var i=e.$implicit,o=h.oxw();h.xp6(1),h.Q6J("src",o.settings.getAssetUrl("images/widgets/"+i.image),h.LSH),h.xp6(2),h.Oqu(i.name||i.type),h.xp6(2),h.Oqu(i.description)}}var Et=function(){var t=function(){function t(e,n,i,o){d(this,t),this.dialogRef=e,this.data=n,this.settings=i,this.modal=o,this.widgets=St}return g(t,[{key:"openWidgetDialog",value:function(t){this.close(),this.modal.open(t,this.data)}},{key:"close",value:function(){this.dialogRef.close()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Y36(q.so),h.Y36(q.WI),h.Y36(w.Z),h.Y36(_.u))},t.\u0275cmp=h.Xpm({type:t,selectors:[["widget-list-modal"]],decls:8,vars:1,consts:[[1,"modal-header"],["mat-dialog-title","",1,"modal-title"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["mat-dialog-content",""],[1,"widgets"],["class","widget","mat-ripple","",3,"click",4,"ngFor","ngForOf"],["mat-ripple","",1,"widget",3,"click"],["alt","",1,"widget-img",3,"src"],["trans","",1,"name"],["trans","",1,"description"]],template:function(t,e){1&t&&(h.TgZ(0,"div",0),h.TgZ(1,"h2",1),h._uU(2,"Add New Widget"),h.qZA(),h.TgZ(3,"button",2),h.NdJ("click",function(){return e.close()}),h._UZ(4,"mat-icon",3),h.qZA(),h.qZA(),h.TgZ(5,"div",4),h.TgZ(6,"div",5),h.YNc(7,Jt,6,3,"div",6),h.qZA(),h.qZA()),2&t&&(h.xp6(7),h.Q6J("ngForOf",e.widgets))},directives:[q.uh,I.Hw,q.xY,C.sg,Nt.wG,U.P],styles:["[_nghost-%COMP%]{display:block;width:700px;max-width:100%;background-color:var(--be-background-alternative)}.widgets[_ngcontent-%COMP%]{display:grid;grid-column-gap:10px;grid-row-gap:10px;grid-template-columns:repeat(3,1fr)}.widget[_ngcontent-%COMP%]{cursor:pointer;border:1px solid #ececec;border-radius:4px;padding:10px;background-color:var(--be-background);box-shadow:0 2px 4px 0 #ececec}.widget[_ngcontent-%COMP%]:hover{background-color:var(--be-hover)}.widget-img[_ngcontent-%COMP%]{width:55px;height:55px;margin-bottom:20px;margin-right:auto}.name[_ngcontent-%COMP%]{text-transform:capitalize;font-size:2rem;font-weight:500;color:var(--be-accent-default);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.description[_ngcontent-%COMP%]{color:var(--be-secondary-text)}"],changeDetection:0}),t}(),Lt=i(69244),Dt=i(26437),Rt=i(24311),Yt=i(3080),Ft=i(99713),Qt=i(47701),$t=i(79996),Bt=i(48865),Ht=i(79572),Vt=i(40450),zt=["*"],Gt=function(){var t=function t(){d(this,t),this.closed=new h.vpe,this.visible$=new a.X(!1)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=h.Xpm({type:t,selectors:[["biolink-slideout-panel"]],inputs:{title:"title"},outputs:{closed:"closed"},ngContentSelectors:zt,decls:8,vars:3,consts:[[1,"header"],[1,"title"],["type","button","mat-icon-button","",3,"click"],["svgIcon","close"],[1,"body"]],template:function(t,e){1&t&&(h.F$t(),h.TgZ(0,"div",0),h.TgZ(1,"div",1),h._uU(2),h.ALo(3,"trans"),h.qZA(),h.TgZ(4,"button",2),h.NdJ("click",function(){return e.closed.emit()}),h._UZ(5,"mat-icon",3),h.qZA(),h.qZA(),h.TgZ(6,"div",4),h.Hsn(7),h.qZA()),2&t&&(h.xp6(2),h.Oqu(h.lcZ(3,1,e.title)))},directives:[P.lW,I.Hw],pipes:[Vt.R],styles:["[_nghost-%COMP%]{display:block;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);border-bottom-left-radius:4px;border-bottom-right-radius:4px;overflow:hidden}.header[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 20px;background-color:var(--be-background-alternative);border-top:1px solid var(--be-divider-lighter);border-bottom:1px solid var(--be-divider-lighter)}.header[_ngcontent-%COMP%]   .mat-icon-button[_ngcontent-%COMP%]{margin-left:15px}.title[_ngcontent-%COMP%]{flex:1 1 auto;margin-right:auto;font-weight:500}.body[_ngcontent-%COMP%]{background-color:var(--be-background);padding:15px}"],changeDetection:0}),t}(),jt=["bounce","flash","pulse","rubberBand","shakeX","shakeY","headShake","swing","tada","wobble","jello","heartBeat"],Xt=i(78733);function Wt(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"button",5),h.NdJ("mouseenter",function(t){var e=h.CHM(n).$implicit;return h.oxw().onMouseEnter(t,e)})("mouseleave",function(t){var e=h.CHM(n).$implicit;return h.oxw().onMouseLeave(t,e)})("click",function(){var t=h.CHM(n).$implicit;return h.oxw().selectAnimation(t)}),h.ALo(1,"async"),h._uU(2),h.qZA()}if(2&t){var i=e.$implicit,o=h.oxw();h.ekj("selected",h.lcZ(1,3,o.selectedAnimation$)===i),h.xp6(2),h.hij(" ",i," ")}}var Kt=function(){var t=function(){function t(e){d(this,t),this.lazyLoader=e,this.animationList=jt,this.selectedAnimation$=new a.X(null)}return g(t,[{key:"ngOnInit",value:function(){this.lazyLoader.loadAsset("https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css",{type:"css",id:"animate.css"})}},{key:"registerOnChange",value:function(t){this.propagateChange=t}},{key:"writeValue",value:function(t){this.selectedAnimation$.next(t)}},{key:"registerOnTouched",value:function(t){}},{key:"selectAnimation",value:function(t){this.propagateChange(t),this.selectedAnimation$.next(t)}},{key:"onMouseEnter",value:function(t,e){t.target.classList.add("animate__".concat(e))}},{key:"onMouseLeave",value:function(t,e){t.target.classList.remove("animate__".concat(e))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Y36(Xt.j))},t.\u0275cmp=h.Xpm({type:t,selectors:[["animation-selector"]],features:[h._Bn([{provide:v.JU,useExisting:t,multi:!0}])],decls:10,vars:5,consts:[[1,"description"],["trans",""],[1,"animation-list"],["type","button","mat-stroked-button","","trans","",3,"click"],["type","button","mat-stroked-button","","class","animate__animated","trans","",3,"selected","mouseenter","mouseleave","click",4,"ngFor","ngForOf"],["type","button","mat-stroked-button","","trans","",1,"animate__animated",3,"mouseenter","mouseleave","click"]],template:function(t,e){1&t&&(h.TgZ(0,"div",0),h.TgZ(1,"div",1),h._uU(2,"Add an animation to draw attention to this link."),h.qZA(),h.TgZ(3,"div",1),h._uU(4,"Selected animation will repeat five times by default."),h.qZA(),h.qZA(),h.TgZ(5,"div",2),h.TgZ(6,"button",3),h.NdJ("click",function(){return e.selectAnimation(null)}),h.ALo(7,"async"),h._uU(8," None "),h.qZA(),h.YNc(9,Wt,3,5,"button",4),h.qZA()),2&t&&(h.xp6(6),h.ekj("selected",!h.lcZ(7,3,e.selectedAnimation$)),h.xp6(3),h.Q6J("ngForOf",e.animationList))},directives:[U.P,P.lW,C.sg],pipes:[C.Ov],styles:[".description[_ngcontent-%COMP%]{text-align:center;margin-bottom:18px}button[_ngcontent-%COMP%]{line-height:60px;text-transform:uppercase;border-width:2px;font-size:1.3rem;padding:0 5px}button.selected[_ngcontent-%COMP%]{border-color:var(--be-accent-default)}.animation-list[_ngcontent-%COMP%]{display:grid;grid-gap:15px;grid-template-columns:repeat(auto-fill,minmax(95px,1fr))}"],changeDetection:0}),t}(),te=i(98720),ee=i(98081);function ne(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"div",1),h.TgZ(1,"div",2),h._uU(2,"Temporarily send all visitors directly to this link."),h.qZA(),h.TgZ(3,"div",2),h._uU(4,"You can only have one active Leap Link at a time."),h.qZA(),h.TgZ(5,"button",3),h.NdJ("click",function(){return h.CHM(n),h.oxw().enableLeapLink()}),h._uU(6," Enable Leap Link "),h.qZA(),h.qZA()}}function ie(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"div",1),h.TgZ(1,"div",4),h._uU(2,"Set an end time for the Leap Link. Your Biolink will automatically restore when the Leap Link expires."),h.qZA(),h._UZ(3,"datetime-input",5),h.TgZ(4,"button",3),h.NdJ("click",function(){return h.CHM(n),h.oxw().disableLeapLink()}),h._uU(5," Disable Leap Link "),h.qZA(),h.qZA()}if(2&t){var i=h.oxw();h.xp6(3),h.Q6J("formControl",i.leapUntilControl)}}var oe=function(){var t=function(){function t(){var e=this;d(this,t),this.leapUntilControl=new v.NI(null),this.leapIsActive$=new a.X(!1),this.sub=this.leapUntilControl.valueChanges.pipe((0,o.O)(null),(0,$t.U)(function(t){return!!t})).subscribe(function(t){e.leapIsActive$.next(t)})}return g(t,[{key:"ngAfterViewInit",value:function(){var t=this;this.leapUntilControl.valueChanges.pipe((0,te.x)()).subscribe(function(e){t.propagateChange(e)})}},{key:"ngOnDestroy",value:function(){this.sub.unsubscribe()}},{key:"registerOnChange",value:function(t){this.propagateChange=t}},{key:"writeValue",value:function(t){this.leapUntilControl.setValue(t)}},{key:"registerOnTouched",value:function(t){}},{key:"enableLeapLink",value:function(){var t=new Date;t.setDate(t.getDate()+1),this.leapUntilControl.setValue(t.toISOString())}},{key:"disableLeapLink",value:function(){this.leapUntilControl.setValue(null)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=h.Xpm({type:t,selectors:[["leap-link-panel"]],features:[h._Bn([{provide:v.JU,useExisting:t,multi:!0}])],decls:4,vars:6,consts:[["class","enable-panel",4,"ngIf"],[1,"enable-panel"],["trans",""],["type","button","mat-flat-button","","color","accent","trans","",1,"enable-leap-btn",3,"click"],["trans","",1,"description"],[3,"formControl"]],template:function(t,e){1&t&&(h.YNc(0,ne,7,0,"div",0),h.ALo(1,"async"),h.YNc(2,ie,6,1,"div",0),h.ALo(3,"async")),2&t&&(h.Q6J("ngIf",!h.lcZ(1,2,e.leapIsActive$)),h.xp6(2),h.Q6J("ngIf",h.lcZ(3,4,e.leapIsActive$)))},directives:[C.O5,U.P,P.lW,ee.k,v.JJ,v.oH],pipes:[C.Ov],styles:["[_nghost-%COMP%]{text-align:center}.enable-leap-btn[_ngcontent-%COMP%]{margin-top:18px;width:100%;min-height:40px}.enable-panel[_ngcontent-%COMP%]   .description[_ngcontent-%COMP%]{margin-bottom:10px}"],changeDetection:0}),t}(),ae=i(62147),re=i(66457),se=i(67139),ce=i(35331),le=i(57125);function ue(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"div",2),h.TgZ(1,"div",3),h._uU(2,"Upload a thumbnail for this link."),h.qZA(),h.TgZ(3,"button",4),h.NdJ("click",function(){return h.CHM(n),h.oxw().openUploadWindow()}),h._uU(4," Upload Thumbnail "),h.qZA(),h.qZA()}}function de(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"div",5),h._UZ(1,"img",6),h.ALo(2,"async"),h.TgZ(3,"div",7),h.TgZ(4,"button",8),h.NdJ("click",function(){return h.CHM(n),h.oxw().openUploadWindow()}),h._uU(5," Change "),h.qZA(),h.TgZ(6,"button",9),h.NdJ("click",function(){return h.CHM(n),h.oxw().removeImage()}),h._uU(7," Remove "),h.qZA(),h.qZA(),h.qZA()}if(2&t){var i=h.oxw();h.xp6(1),h.Q6J("src",h.lcZ(2,1,i.src$),h.LSH)}}var pe=function(){var t=function(){function t(e,n){d(this,t),this.uploadQueue=e,this.imageValidator=n,this.src$=new a.X(null)}return g(t,[{key:"ngOnInit",value:function(){}},{key:"registerOnChange",value:function(t){this.propagateChange=t}},{key:"writeValue",value:function(t){this.src$.next(t)}},{key:"registerOnTouched",value:function(t){}},{key:"openUploadWindow",value:function(){var t=this;(0,ae.r)({multiple:!1,types:[se.j.image]}).then(function(e){t.uploadQueue.start(e,{httpParams:{diskPrefix:"biolink-thumbnails"},uri:ce.C.Image,validator:t.imageValidator}).subscribe(function(e){t.src$.next(e.fileEntry.url),t.propagateChange(e.fileEntry.url)})})}},{key:"removeImage",value:function(){this.src$.next(null),this.propagateChange(null)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Y36(re.A),h.Y36(le.G))},t.\u0275cmp=h.Xpm({type:t,selectors:[["link-thumbnail-panel"]],features:[h._Bn([re.A,{provide:v.JU,useExisting:t,multi:!0}])],decls:4,vars:6,consts:[["class","upload-panel",4,"ngIf"],["class","change-panel",4,"ngIf"],[1,"upload-panel"],["trans","",1,"description"],["type","button","mat-flat-button","","color","accent","trans","",1,"action-button",3,"click"],[1,"change-panel"],["alt","",1,"preview",3,"src"],[1,"upload-buttons"],["type","button","mat-flat-button","","color","accent","trans","",1,"action-button","change-button",3,"click"],["type","button","mat-stroked-button","","color","accent","trans","",1,"action-button",3,"click"]],template:function(t,e){1&t&&(h.YNc(0,ue,5,0,"div",0),h.ALo(1,"async"),h.YNc(2,de,8,3,"div",1),h.ALo(3,"async")),2&t&&(h.Q6J("ngIf",!h.lcZ(1,2,e.src$)),h.xp6(2),h.Q6J("ngIf",h.lcZ(3,4,e.src$)))},directives:[C.O5,U.P,P.lW],pipes:[C.Ov],styles:[".change-panel[_ngcontent-%COMP%]{display:flex}.description[_ngcontent-%COMP%]{margin-bottom:10px;text-align:center}.preview[_ngcontent-%COMP%]{display:block;width:90px;height:90px;-o-object-fit:cover;object-fit:cover;margin-right:10px;border-radius:4px;overflow:hidden;flex-shrink:0}.upload-buttons[_ngcontent-%COMP%]{flex:1 1 auto}.action-button[_ngcontent-%COMP%]{display:block;width:100%;min-height:40px}.change-button[_ngcontent-%COMP%]{margin-bottom:10px}"],changeDetection:0}),t}(),ge=i(77830),he=i(40985);function fe(t,e){if(1&t&&h._UZ(0,"img",29),2&t){var n=h.oxw();h.Q6J("src",n.link.image,h.LSH)}}function me(t,e){if(1&t&&(h._UZ(0,"img",29),h.ALo(1,"favicon")),2&t){var n=h.oxw();h.Q6J("src",h.lcZ(1,1,n.link.long_url),h.LSH)}}function ve(t,e){1&t&&(h.TgZ(0,"div",30),h.TgZ(1,"div",31),h._uU(2,"This link is inactive due to its schedule."),h.qZA(),h.qZA())}function be(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"biolink-slideout-panel",32),h.NdJ("closed",function(){return h.CHM(n),h.oxw().activeSlideOutPanel$.next(null)}),h._UZ(1,"animation-selector",33),h.qZA()}2&t&&h.Q6J("title","Animation")("@slideOutPanelAnimation",void 0)}function ye(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"biolink-slideout-panel",32),h.NdJ("closed",function(){return h.CHM(n),h.oxw().activeSlideOutPanel$.next(null)}),h._UZ(1,"leap-link-panel",34),h.qZA()}2&t&&h.Q6J("title","Leap Link")("@slideOutPanelAnimation",void 0)}function _e(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"biolink-slideout-panel",35),h.NdJ("closed",function(){return h.CHM(n),h.oxw().activeSlideOutPanel$.next(null)}),h._UZ(1,"link-thumbnail-panel",34),h.qZA()}2&t&&h.Q6J("@slideOutPanelAnimation",void 0)}var xe=function(){return{resource:"link"}};function ke(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"biolink-slideout-panel",36),h.NdJ("closed",function(){return h.CHM(n),h.oxw().activeSlideOutPanel$.next(null)}),h.TgZ(1,"p",37),h._uU(2," Enter a date when :resource should be active. Both start and end dates are optional. "),h.qZA(),h.TgZ(3,"div",38),h.TgZ(4,"div",39),h.TgZ(5,"datetime-input",40),h._uU(6,"Start Date"),h.qZA(),h.qZA(),h.TgZ(7,"div",39),h.TgZ(8,"datetime-input",41),h._uU(9,"End Date"),h.qZA(),h.qZA(),h.qZA(),h.qZA()}2&t&&(h.Q6J("@slideOutPanelAnimation",void 0),h.xp6(1),h.Q6J("transValues",h.DdM(2,xe)))}var Ze=function(t,e){return["/",t,"links",e]},we=function(){var e=function(){function e(t,n,i){d(this,e),this.editor=t,this.fb=n,this.section=i,this.activeSlideOutPanel$=new a.X(null),this.form=this.fb.group({active:!0,animation:null,leap_until:null,image:null,expires_at:null,activates_at:null})}return g(e,[{key:"ngOnChanges",value:function(){var t,e,n=this;null===(t=this.formSub)||void 0===t||t.unsubscribe(),null===(e=this.animSub)||void 0===e||e.unsubscribe(),this.form.patchValue(this.link),this.link.active_locked?this.form.get("active").disable():this.form.get("active").enable(),this.formSub=this.form.valueChanges.pipe((0,Qt.b)(400)).subscribe(function(){n.editor.updateContentItemConfig(n.link,n.getDirtyFromValues())}),this.animSub=this.form.get("animation").valueChanges.subscribe(function(){n.activeSlideOutPanel$.next(null)})}},{key:"ngOnInit",value:function(){this.leapActive$=this.activeObservable("leap_until"),this.animationActive$=this.activeObservable("animation"),this.imageActive$=this.activeObservable("image"),this.scheduleActive$=(0,Yt.aj)(this.activeObservable("expires_at"),this.activeObservable("activates_at")).pipe((0,$t.U)(function(t){return t[0]||t[1]}))}},{key:"toggleAnimationPanel",value:function(t){this.activeSlideOutPanel$.next(this.activeSlideOutPanel$.value===t?null:t)}},{key:"openEditLinkDialog",value:function(){this.editor.openCrupdateLinkDialog(this.link)}},{key:"getParentRoute",value:function(){return this.section.admin?"admin":"dashboard"}},{key:"enableLeapLink",value:function(){this.form.patchValue({leap_link:!0})}},{key:"clearFormField",value:function(e){this.form.patchValue(t({},e,null))}},{key:"activeObservable",value:function(t){return this.form.get(t).valueChanges.pipe((0,o.O)(this.link[t]),(0,$t.U)(function(t){return!!t}))}},{key:"getDirtyFromValues",value:function(){var t={};return Object.entries(this.form.controls).forEach(function(e){var n=s(e,2),i=n[0],o=n[1];o.dirty&&(t[i]=o.value)}),t}}]),e}();return e.\u0275fac=function(t){return new(t||e)(h.Y36(k),h.Y36(v.qu),h.Y36(Bt.W))},e.\u0275cmp=h.Xpm({type:e,selectors:[["biolink-editor-link"]],inputs:{link:"link"},features:[h.TTD],decls:58,vars:85,consts:[[3,"formGroup"],[1,"content-item-wrapper"],[1,"drag-handle-container"],["type","button","mat-icon-button","","cdkDragHandle",""],["svgIcon","drag-indicator"],[1,"content-item-body"],[1,"header"],[1,"title"],["formControlName","active"],[1,"subheader"],["class","favicon-img","alt","",3,"src",4,"ngIf"],[1,"url"],[1,"actions"],["type","button","mat-icon-button","",1,"action-button",3,"disabled","matTooltip","click"],["svgIcon","edit"],["type","button","mat-icon-button","",1,"action-button","image-action-btn",3,"disabled","matTooltip","click"],["svgIcon","image"],["target","_blank","mat-icon-button","",1,"action-button",3,"routerLink","disabled","matTooltip"],["svgIcon","analytics"],["svgIcon","animation"],["svgIcon","shortcut"],["type","button","mat-icon-button","",1,"action-button","schedule-action-btn",3,"disabled","matTooltip","click"],["svgIcon","more-time"],["type","button","mat-icon-button","",1,"action-button","delete-action",3,"disabled","click"],["svgIcon","delete"],["class","locked-notif",4,"ngIf"],[3,"title","closed",4,"ngIf"],["title","Thumbnail",3,"closed",4,"ngIf"],["title","Schedule Link",3,"closed",4,"ngIf"],["alt","",1,"favicon-img",3,"src"],[1,"locked-notif"],["trans","",1,"locked-notif-msg"],[3,"title","closed"],["formControlName","animation"],["formControlName","image"],["title","Thumbnail",3,"closed"],["title","Schedule Link",3,"closed"],["trans","",1,"schedule-description",3,"transValues"],[1,"inline-inputs-container"],["permission-aware-input-container","expiration",1,"input-container"],["id","bio_exp_at","formControlName","activates_at","trans",""],["id","bio_act_at","formControlName","expires_at"]],template:function(t,e){1&t&&(h.ynx(0,0),h.TgZ(1,"div",1),h.ALo(2,"async"),h.TgZ(3,"div",2),h.TgZ(4,"button",3),h._UZ(5,"mat-icon",4),h.qZA(),h.qZA(),h.TgZ(6,"div",5),h.TgZ(7,"div",6),h.TgZ(8,"div",7),h._uU(9),h.qZA(),h._UZ(10,"mat-slide-toggle",8),h.qZA(),h.TgZ(11,"div",9),h.YNc(12,fe,1,1,"img",10),h.YNc(13,me,2,3,"img",10),h.TgZ(14,"span",11),h._uU(15),h.qZA(),h.qZA(),h.TgZ(16,"div",12),h.TgZ(17,"button",13),h.NdJ("click",function(){return e.openEditLinkDialog()}),h.ALo(18,"async"),h.ALo(19,"trans"),h._UZ(20,"mat-icon",14),h.qZA(),h.TgZ(21,"button",15),h.NdJ("click",function(){return e.toggleAnimationPanel("image")}),h.ALo(22,"async"),h.ALo(23,"async"),h.ALo(24,"trans"),h._UZ(25,"mat-icon",16),h.qZA(),h.TgZ(26,"a",17),h.ALo(27,"async"),h.ALo(28,"trans"),h._UZ(29,"mat-icon",18),h.qZA(),h.TgZ(30,"button",13),h.NdJ("click",function(){return e.toggleAnimationPanel("animation")}),h.ALo(31,"async"),h.ALo(32,"async"),h.ALo(33,"trans"),h._UZ(34,"mat-icon",19),h.qZA(),h.TgZ(35,"button",13),h.NdJ("click",function(){return e.toggleAnimationPanel("leapLink")}),h.ALo(36,"async"),h.ALo(37,"async"),h.ALo(38,"trans"),h._UZ(39,"mat-icon",20),h.qZA(),h.TgZ(40,"button",21),h.NdJ("click",function(){return e.toggleAnimationPanel("schedule")}),h.ALo(41,"async"),h.ALo(42,"async"),h.ALo(43,"trans"),h._UZ(44,"mat-icon",22),h.qZA(),h.TgZ(45,"button",23),h.NdJ("click",function(){return e.editor.maybeDeleteContentItem(e.link)}),h.ALo(46,"async"),h._UZ(47,"mat-icon",24),h.qZA(),h.qZA(),h.qZA(),h.qZA(),h.YNc(48,ve,3,0,"div",25),h.ALo(49,"async"),h.YNc(50,be,2,2,"biolink-slideout-panel",26),h.ALo(51,"async"),h.YNc(52,ye,2,2,"biolink-slideout-panel",26),h.ALo(53,"async"),h.YNc(54,_e,2,1,"biolink-slideout-panel",27),h.ALo(55,"async"),h.YNc(56,ke,10,3,"biolink-slideout-panel",28),h.ALo(57,"async"),h.BQk()),2&t&&(h.Q6J("formGroup",e.form),h.xp6(1),h.ekj("slide-out-panel-active",h.lcZ(2,36,e.activeSlideOutPanel$))("active-locked",e.link.active_locked),h.xp6(8),h.Oqu(e.link.name),h.xp6(3),h.Q6J("ngIf",e.link.image),h.xp6(1),h.Q6J("ngIf",!e.link.image),h.xp6(2),h.Oqu(e.link.long_url),h.xp6(2),h.Q6J("disabled",h.lcZ(18,38,e.editor.loading$))("matTooltip",h.lcZ(19,40,"Edit")),h.xp6(4),h.ekj("active",h.lcZ(22,42,e.imageActive$)),h.Q6J("disabled",h.lcZ(23,44,e.editor.loading$))("matTooltip",h.lcZ(24,46,"Change Thumbnail")),h.xp6(5),h.Q6J("routerLink",h.WLB(82,Ze,e.getParentRoute(),e.link.id))("disabled",h.lcZ(27,48,e.editor.loading$))("matTooltip",h.lcZ(28,50,"Statistics")),h.xp6(4),h.ekj("active",h.lcZ(31,52,e.animationActive$)),h.Q6J("disabled",h.lcZ(32,54,e.editor.loading$))("matTooltip",h.lcZ(33,56,"Animation")),h.xp6(5),h.ekj("active",h.lcZ(36,58,e.leapActive$)),h.Q6J("disabled",h.lcZ(37,60,e.editor.loading$))("matTooltip",h.lcZ(38,62,"Leap Link")),h.xp6(5),h.ekj("active",h.lcZ(41,64,e.scheduleActive$)),h.Q6J("disabled",h.lcZ(42,66,e.editor.loading$))("matTooltip",h.lcZ(43,68,"Schedule")),h.xp6(5),h.Q6J("disabled",h.lcZ(46,70,e.editor.loading$)),h.xp6(3),h.Q6J("ngIf",e.link.active_locked&&!h.lcZ(49,72,e.activeSlideOutPanel$)),h.xp6(2),h.Q6J("ngIf","animation"===h.lcZ(51,74,e.activeSlideOutPanel$)),h.xp6(2),h.Q6J("ngIf","leapLink"===h.lcZ(53,76,e.activeSlideOutPanel$)),h.xp6(2),h.Q6J("ngIf","image"===h.lcZ(55,78,e.activeSlideOutPanel$)),h.xp6(2),h.Q6J("ngIf","schedule"===h.lcZ(57,80,e.activeSlideOutPanel$)))},directives:[v.JL,v.sg,P.lW,Lt.Bh,I.Hw,Ht.Rr,v.JJ,v.u,C.O5,Rt.gM,P.zs,Z.yS,U.P,Gt,Kt,oe,pe,ge.o,ee.k],pipes:[C.Ov,Vt.R,he.K],styles:[".locked-notif[_ngcontent-%COMP%]{background-color:var(--be-background);border:1px solid var(--be-accent-lighter);border-top:none;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.locked-notif-msg[_ngcontent-%COMP%]{padding:12px 15px;background-color:var(--be-accent-emphasis);font-size:1.5rem}.schedule-description[_ngcontent-%COMP%]{text-align:center;margin:0 0 15px}@media only screen and (max-width:768px){.image-action-btn[_ngcontent-%COMP%], .schedule-action-btn[_ngcontent-%COMP%]{display:none}}"],data:{animation:[(0,Ft.X$)("slideOutPanelAnimation",[(0,Ft.eR)(":enter",[(0,Ft.oB)({height:"0px",opacity:0}),(0,Ft.jt)("225ms cubic-bezier(0.4,0.0,0.2,1)",(0,Ft.oB)({height:"*",opacity:1}))]),(0,Ft.eR)(":leave",[(0,Ft.oB)({height:"*",opacity:1}),(0,Ft.jt)("225ms cubic-bezier(0.4,0.0,0.2,1)",(0,Ft.oB)({height:"0px",opacity:0}))])])]},changeDetection:0}),e}(),Ae=i(62181),Ce=i(29476);function Te(t,e){if(1&t&&(h.ynx(0),h.TgZ(1,"div",15),h.TgZ(2,"div",16),h._UZ(3,"image-or-icon",17),h.TgZ(4,"div",18),h._uU(5),h.qZA(),h.qZA(),h._UZ(6,"mat-slide-toggle",19),h.qZA(),h.BQk()),2&t){var n=h.oxw().ngIf,i=h.oxw();h.xp6(3),h.Q6J("src",i.widget.config.url),h.xp6(2),h.Oqu(n.name||n.type)}}function qe(t,e){if(1&t&&(h.ynx(0),h.TgZ(1,"div",15),h.TgZ(2,"div",20),h.TgZ(3,"div",21),h._uU(4),h.qZA(),h.TgZ(5,"div",22),h.TgZ(6,"div",23),h._uU(7),h.qZA(),h.TgZ(8,"div",24),h._uU(9),h.qZA(),h.qZA(),h.qZA(),h._UZ(10,"mat-slide-toggle",19),h.qZA(),h.BQk()),2&t){var n=h.oxw().ngIf,i=h.oxw();h.xp6(4),h.Oqu(n.name||n.type),h.xp6(3),h.Oqu(i.widget.config.title),h.xp6(2),h.Oqu(i.widget.config.description)}}function Ie(t,e){if(1&t&&(h.ynx(0),h.TgZ(1,"div",15),h.TgZ(2,"div",25),h._uU(3),h.qZA(),h._UZ(4,"mat-slide-toggle",19),h.qZA(),h.TgZ(5,"div",26),h._UZ(6,"social-button-list",27),h.qZA(),h.BQk()),2&t){var n=h.oxw().ngIf,i=h.oxw();h.xp6(3),h.Oqu(n.name||n.type),h.xp6(3),h.Q6J("config",i.widget.config)}}function Oe(t,e){if(1&t&&(h.ynx(0),h.TgZ(1,"div",15),h.TgZ(2,"div",25),h._uU(3),h.qZA(),h._UZ(4,"mat-slide-toggle",19),h.qZA(),h.TgZ(5,"div",26),h._UZ(6,"img",28),h.TgZ(7,"span",29),h._uU(8),h.qZA(),h.qZA(),h.BQk()),2&t){var n=h.oxw().ngIf,i=h.oxw();h.xp6(3),h.Oqu(n.name||n.type),h.xp6(3),h.Q6J("src",i.settings.getAssetUrl("images/widgets/"+n.image),h.LSH),h.xp6(2),h.Oqu(i.widget.config.url)}}function Ue(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"div",6),h.ynx(1,7),h.YNc(2,Te,7,2,"ng-container",8),h.YNc(3,qe,11,3,"ng-container",8),h.YNc(4,Ie,7,2,"ng-container",8),h.YNc(5,Oe,9,3,"ng-container",9),h.BQk(),h.TgZ(6,"div",10),h.TgZ(7,"button",11),h.NdJ("click",function(){h.CHM(n);var t=h.oxw();return t.openEditWidgetDialog(t.widget)}),h.ALo(8,"async"),h.ALo(9,"trans"),h._UZ(10,"mat-icon",12),h.qZA(),h.TgZ(11,"button",13),h.NdJ("click",function(){h.CHM(n);var t=h.oxw();return t.editor.maybeDeleteContentItem(t.widget)}),h.ALo(12,"async"),h._UZ(13,"mat-icon",14),h.qZA(),h.qZA(),h.qZA()}if(2&t){var i=e.ngIf,o=h.oxw();h.xp6(1),h.Q6J("ngSwitch",i.type),h.xp6(1),h.Q6J("ngSwitchCase","image"),h.xp6(1),h.Q6J("ngSwitchCase","text"),h.xp6(1),h.Q6J("ngSwitchCase","socials"),h.xp6(3),h.Q6J("disabled",h.lcZ(8,7,o.editor.loading$))("matTooltip",h.lcZ(9,9,"Edit")),h.xp6(4),h.Q6J("disabled",h.lcZ(12,11,o.editor.loading$))}}var Pe=function(){var t=function(){function t(e,n,i,o){d(this,t),this.settings=e,this.fb=n,this.editor=i,this.modal=o,this.form=this.fb.group({active:!0})}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.form.patchValue(this.widget),this.form.valueChanges.subscribe(function(e){t.editor.updateContentItemConfig(t.widget,e)})}},{key:"getWidgetConfig",value:function(t){return St.find(function(e){return e.type===t})}},{key:"openEditWidgetDialog",value:function(t){var e=this.getWidgetConfig(t.type);this.modal.open(e.component,{config:t.config,widgetId:t.id})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Y36(w.Z),h.Y36(v.qu),h.Y36(k),h.Y36(_.u))},t.\u0275cmp=h.Xpm({type:t,selectors:[["biolink-editor-widget"]],inputs:{widget:"widget"},decls:6,vars:2,consts:[[3,"formGroup"],[1,"content-item-wrapper"],[1,"drag-handle-container"],["type","button","mat-icon-button","","cdkDragHandle",""],["svgIcon","drag-indicator"],["class","content-item-body",4,"ngIf"],[1,"content-item-body"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"actions"],["type","button","mat-icon-button","",1,"action-button",3,"disabled","matTooltip","click"],["svgIcon","edit"],["type","button","mat-icon-button","",1,"action-button","delete-action",3,"disabled","click"],["svgIcon","delete"],[1,"header"],[1,"title","image-title"],[1,"inherit-size",3,"src"],["trans","",1,"capitalize"],["formControlName","active"],[1,"title"],["trans","",1,"capitalize","centered"],[1,"text-widget-body"],[1,"text-widget-title","centered"],[1,"text-widget-description","centered"],["trans","",1,"title","capitalize"],[1,"subheader"],[3,"config"],["alt","",1,"favicon-img",3,"src"],[1,"url"]],template:function(t,e){1&t&&(h.ynx(0,0),h.TgZ(1,"div",1),h.TgZ(2,"div",2),h.TgZ(3,"button",3),h._UZ(4,"mat-icon",4),h.qZA(),h.qZA(),h.YNc(5,Ue,14,13,"div",5),h.qZA(),h.BQk()),2&t&&(h.Q6J("formGroup",e.form),h.xp6(5),h.Q6J("ngIf",e.getWidgetConfig(e.widget.type)))},directives:[v.JL,v.sg,P.lW,Lt.Bh,I.Hw,C.O5,C.RF,C.n9,C.ED,Rt.gM,Ae.A,U.P,Ht.Rr,v.JJ,v.u,Ce.W],pipes:[C.Ov,Vt.R],styles:[".centered[_ngcontent-%COMP%]{text-align:center}.image-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding-top:22px;font-size:1.6rem}.image-title[_ngcontent-%COMP%]   image-or-icon[_ngcontent-%COMP%]{width:25px;height:25px;margin-right:10px;display:block;border-radius:4px;overflow:hidden}.text-widget-body[_ngcontent-%COMP%]{font-weight:400;font-size:1.3rem;margin-top:5px}social-button-list[_ngcontent-%COMP%]{color:var(--be-secondary-text)}"],changeDetection:0}),t}(),Me=i(47210),Se=i(88798);function Ne(t,e){if(1&t&&h._UZ(0,"biolink-editor-link",11),2&t){var n=h.oxw().$implicit;h.Q6J("link",n)}}function Je(t,e){if(1&t&&h._UZ(0,"biolink-editor-widget",12),2&t){var n=h.oxw().$implicit;h.Q6J("widget",n)}}function Ee(t,e){if(1&t&&(h.ynx(0),h.YNc(1,Ne,1,1,"biolink-editor-link",9),h.YNc(2,Je,1,1,"biolink-editor-widget",10),h.BQk()),2&t){var n=e.$implicit;h.xp6(1),h.Q6J("ngIf","link"===n.model_type),h.xp6(1),h.Q6J("ngIf","biolinkWidget"===n.model_type)}}function Le(t,e){1&t&&(h.TgZ(0,"no-results-message",13),h.TgZ(1,"span",14),h._uU(2,"No links or widgets have been added yet"),h.qZA(),h.qZA())}function De(t,e){if(1&t){var n=h.EpF();h.ynx(0),h.TgZ(1,"div",6),h.NdJ("cdkDropListDropped",function(t){return h.CHM(n),h.oxw().reorderContent(t)}),h.ALo(2,"async"),h.YNc(3,Ee,3,2,"ng-container",7),h.YNc(4,Le,3,0,"no-results-message",8),h.qZA(),h.BQk()}if(2&t){var i=e.ngIf,o=h.oxw();h.xp6(1),h.Q6J("cdkDropListDisabled",h.lcZ(2,5,o.editor.loading$))("@fadeIn",void 0),h.xp6(2),h.Q6J("ngForOf",i.content)("ngForTrackBy",o.trackByFn),h.xp6(1),h.Q6J("ngIf",!i.content.length)}}function Re(t,e){1&t&&(h.TgZ(0,"div",17),h.TgZ(1,"div",18),h.TgZ(2,"div",19),h._UZ(3,"skeleton",20),h.qZA(),h.TgZ(4,"div",21),h._UZ(5,"skeleton",22),h._UZ(6,"skeleton"),h._UZ(7,"skeleton"),h.qZA(),h.qZA(),h.qZA())}function Ye(t,e){if(1&t&&(h.TgZ(0,"div",15),h.YNc(1,Re,8,0,"div",16),h.qZA()),2&t){var n=h.oxw();h.Q6J("@fadeOut",void 0),h.xp6(1),h.Q6J("ngForOf",n.skeletonIterator)}}var Fe=function(){var t=function(){function t(e,n,i,o,a){d(this,t),this.modal=e,this.editor=n,this.toast=i,this.biolinks=o,this.settings=a,this.skeletonIterator=Array(5),this.trackByFn=function(t,e){return e.id}}return g(t,[{key:"openNewLinkDialog",value:function(){this.editor.openCrupdateLinkDialog(null,{createMsg:"Link added"})}},{key:"openWidgetListDialog",value:function(){this.modal.open(Et,{biolinkId:this.editor.biolink$.value.id})}},{key:"reorderContent",value:function(t){var e=this;if(t.previousIndex!==t.currentIndex){var n=c(this.editor.biolink$.value.content);(0,Lt.bA)(n,t.previousIndex,t.currentIndex),this.editor.biolink$.next(Object.assign(Object.assign({},this.editor.biolink$.value),{content:n}));var i=n.map(function(t){return{id:t.id,model_type:t.model_type}});this.editor.loading$.next(!0),this.biolinks.changeOrder(this.editor.biolink$.value.id,i).pipe((0,r.x)(function(){return e.editor.loading$.next(!1)})).subscribe()}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Y36(_.u),h.Y36(k),h.Y36(m.F),h.Y36(f.n),h.Y36(w.Z))},t.\u0275cmp=h.Xpm({type:t,selectors:[["biolink-editor-content"]],decls:10,vars:7,consts:[[1,"links-tab","left-col-spacer"],["type","button","mat-raised-button","","color","accent","trans","",1,"add-new-link-btn",3,"click"],["type","button","mat-raised-button","","color","accent",1,"add-widget-btn",3,"matTooltip","click"],["svgIcon","widgets"],[4,"ngIf","ngIfElse"],["loading",""],["cdkDropList","",1,"link-list",3,"cdkDropListDisabled","cdkDropListDropped"],[4,"ngFor","ngForOf","ngForTrackBy"],["svgImage","share-link.svg",4,"ngIf"],["class","biolink-content-item","cdkDrag","",3,"link",4,"ngIf"],["class","biolink-content-item","cdkDrag","",3,"widget",4,"ngIf"],["cdkDrag","",1,"biolink-content-item",3,"link"],["cdkDrag","",1,"biolink-content-item",3,"widget"],["svgImage","share-link.svg"],["primary-text","","trans",""],[1,"link-list"],["class","biolink-content-item",4,"ngFor","ngForOf"],[1,"biolink-content-item"],[1,"content-item-wrapper"],[1,"drag-handle-container"],["variant","icon"],[1,"content-item-body"],["animation",""]],template:function(t,e){if(1&t&&(h.TgZ(0,"div",0),h.TgZ(1,"button",1),h.NdJ("click",function(){return e.openNewLinkDialog()}),h._uU(2," Add New Link "),h.qZA(),h.TgZ(3,"button",2),h.NdJ("click",function(){return e.openWidgetListDialog()}),h.ALo(4,"trans"),h._UZ(5,"mat-icon",3),h.qZA(),h.YNc(6,De,5,7,"ng-container",4),h.ALo(7,"async"),h.YNc(8,Ye,2,2,"ng-template",null,5,h.W1O),h.qZA()),2&t){var n=h.MAs(9);h.xp6(3),h.Q6J("matTooltip",h.lcZ(4,3,"Add widget")),h.xp6(3),h.Q6J("ngIf",h.lcZ(7,5,e.editor.biolink$))("ngIfElse",n)}},directives:[P.lW,U.P,Rt.gM,I.Hw,C.O5,Lt.Wj,C.sg,we,Lt.Zt,Pe,Me.U,Se._],pipes:[Vt.R,C.Ov],styles:["[_nghost-%COMP%]{display:block}.add-new-link-btn[_ngcontent-%COMP%]{width:calc(100% - 79px);height:48px;margin:auto}.add-widget-btn[_ngcontent-%COMP%]{height:48px;width:48px;margin-left:15px}.link-list[_ngcontent-%COMP%]{margin-top:50px}  .biolink-content-item{display:block;margin-bottom:20px}  .biolink-content-item .content-item-wrapper{display:flex;border-radius:4px;background-color:var(--be-background);border:1px solid transparent;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}  .biolink-content-item .content-item-wrapper.active-locked{border-color:var(--be-accent-lighter)}  .biolink-content-item .content-item-wrapper.active-locked,   .biolink-content-item .content-item-wrapper.slide-out-panel-active{border-bottom-left-radius:0;border-bottom-right-radius:0}  .biolink-content-item .drag-handle-container{display:flex;align-items:center;border-right:1px solid var(--be-divider-default)}  .biolink-content-item .content-item-body{padding:20px 20px 15px;flex:1 1 auto;overflow:hidden}  .biolink-content-item .header{display:flex;align-items:center;margin-bottom:3px}  .biolink-content-item .header .title{flex:1 1 auto;margin-right:auto;font-weight:500;font-size:1.5rem}  .biolink-content-item .header .mat-slide-toggle{flex-shrink:0;margin-left:10px}  .biolink-content-item .subheader{display:flex;align-items:center}  .biolink-content-item .url{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--be-secondary-text)}  .biolink-content-item .favicon-img{margin-right:8px;width:16px;height:16px;border-radius:4px;overflow:hidden}  .biolink-content-item .actions{display:flex;align-items:center;margin-top:5px;color:var(--be-secondary-text)}  .biolink-content-item .action-button.active{color:var(--be-accent-default)}  .biolink-content-item .delete-action{margin-left:auto}"],data:{animation:Dt.B},changeDetection:0}),t}(),Qe=i(64762),$e={configId:"uploadedImg",configLabel:"Image",backgroundSize:"cover",repeat:"no-repeat",position:"center center"},Be={configId:"flat",configLabel:"Color",backgroundColor:"rgb(209, 246, 255)",color:null},He=[$e,Be,{configId:"gradient",configLabel:"Gradient",backgroundImage:"linear-gradient(43deg, #4158D0 0%, #C850C0 46%, #FFCC70 100%)"},{configId:"img1",backgroundColor:"#ffdd55",backgroundImage:"svg-bgs/Angled-Focus.svg",backgroundAttachment:"fixed",backgroundSize:"cover",color:"#fff"},{configId:"img2",backgroundColor:"#220044",backgroundImage:"svg-bgs/Circular-Focus.svg",backgroundAttachment:"fixed",backgroundSize:"cover",color:"#fff"},{configId:"img3",backgroundColor:"#000000",backgroundImage:"svg-bgs/Farseeing-Eyeball.svg",backgroundAttachment:"fixed",backgroundSize:"cover",color:"#fff"},{configId:"img4",backgroundColor:"#ff0000",backgroundImage:"svg-bgs/Canyon-Funnel.svg",backgroundAttachment:"fixed",backgroundSize:"cover",color:"#fff"},{configId:"img5",backgroundColor:"#11ddaa",backgroundImage:"svg-bgs/Looney-Loops.svg",backgroundAttachment:"fixed",backgroundSize:"cover",color:"#000"},{configId:"img6",backgroundColor:"#070014",backgroundImage:"svg-bgs/Hurricane-Aperture.svg",backgroundAttachment:"fixed",backgroundSize:"cover",color:"#fff"},{configId:"img7",backgroundColor:"#ccffff",backgroundImage:"svg-bgs/Icy-Explosion.svg",backgroundAttachment:"fixed",backgroundSize:"cover",backgroundRepeat:"no-repeat",color:"#000"},{configId:"img8",backgroundColor:"#442233",backgroundImage:"svg-bgs/Nuclear-Focalpoint.svg",backgroundAttachment:"fixed",backgroundSize:"cover",color:"#fff"},{configId:"img9",backgroundColor:"#ee5522;",backgroundImage:"svg-bgs/Protruding-Squares.svg",color:"#fff"},{configId:"img10",backgroundColor:"#fff",backgroundImage:"svg-bgs/Alternating-Triangles.svg",color:"#000"},{configId:"img11",backgroundColor:"#002200",backgroundImage:"svg-bgs/Monstera-Patch.svg",color:"#fff"},{configId:"img11",backgroundColor:"#aa3333",backgroundImage:"svg-bgs/Confetti-Doodles.svg",color:"#fff",backgroundAttachment:"fixed"},{configId:"img12",backgroundColor:"#ffdd99",backgroundImage:"svg-bgs/Threads-Ahead.svg",backgroundAttachment:"fixed",backgroundSize:"cover",color:"#000"},{configId:"img13",backgroundColor:"#00bbff",backgroundImage:"svg-bgs/Launch-Day.svg",backgroundAttachment:"fixed",backgroundSize:"cover",color:"#fff"},{configId:"img14",backgroundImage:"svg-bgs/Sprinkle.svg"},{configId:"img15",backgroundImage:"svg-bgs/Circuit-Board.svg"},{configId:"img15",backgroundImage:"svg-bgs/Snow.svg"}],Ve=i(72674),ze=i(25416),Ge=[{configId:"grd1",backgroundImage:"linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%)"},{configId:"grd2",backgroundImage:"linear-gradient(to right, #ff8177 0%, #ff867a 0%, #ff8c7f 21%, #f99185 52%, #cf556c 78%, #b12a5b 100%)"},{configId:"grd3",backgroundImage:"linear-gradient(to top, #fbc2eb 0%, #a6c1ee 100%)"},{configId:"grd4",backgroundImage:"linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%)"},{configId:"grd5",backgroundImage:"linear-gradient(to top, #30cfd0 0%, #330867 100%)",color:"#fff"},{configId:"grd6",backgroundImage:"linear-gradient(135deg, #FDEB71 10%, #F8D800 100%)"},{configId:"grd7",backgroundImage:"linear-gradient( 135deg, #F05F57 10%, #360940 100%)"},{configId:"grd8",color:"#4158D0",backgroundImage:"linear-gradient(43deg, #4158D0 0%, #C850C0 46%, #FFCC70 100%)"},{configId:"grd9",color:"#FBAB7E",backgroundImage:"linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%)"},{configId:"grd10",color:"#21D4FD",backgroundImage:"linear-gradient(19deg, #21D4FD 0%, #B721FF 100%)"},{configId:"grd11",backgroundImage:"linear-gradient( 109.5deg,  rgba(76,221,242,1) 11.2%, rgba(92,121,255,1) 91.1% )"},{configId:"grd12",backgroundImage:"linear-gradient( 112.1deg,  rgba(32,38,57,1) 11.4%, rgba(63,76,119,1) 70.2% )",color:"#fff"}],je=i(7855),Xe=i(80147);function We(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"div",2),h.NdJ("click",function(){var t=h.CHM(n).$implicit;return h.oxw().selectGradient(t)}),h._UZ(1,"div",3),h._UZ(2,"div",4),h.qZA()}if(2&t){var i=e.$implicit,o=h.oxw();h.ekj("active",(null==o.data.active?null:o.data.active.configId)===i.configId),h.xp6(1),h.Udp("background-image",i.backgroundImage)}}var Ke=function(){var t=function(){function t(e,n){d(this,t),this.data=e,this.overlayPanelRef=n,this.gradients=Ge}return g(t,[{key:"selectGradient",value:function(t){this.overlayPanelRef.close(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Y36(je.p,8),h.Y36(Xe.L))},t.\u0275cmp=h.Xpm({type:t,selectors:[["background-selector-gradient"]],decls:2,vars:1,consts:[[1,"auto-height-grid"],["class","grid-item",3,"active","click",4,"ngFor","ngForOf"],[1,"grid-item",3,"click"],[1,"grid-content"],[1,"grid-label"]],template:function(t,e){1&t&&(h.TgZ(0,"div",0),h.YNc(1,We,3,4,"div",1),h.qZA()),2&t&&(h.xp6(1),h.Q6J("ngForOf",e.gradients))},directives:[C.sg],styles:["[_nghost-%COMP%]{display:block;padding:15px;background-color:var(--be-background);width:500px;max-width:95%;border-radius:4px}"],changeDetection:0}),t}(),tn=i(98979),en=i(58901),nn=function(){var t=function(){function t(e,n,i,o){d(this,t),this.uploadQueue=e,this.imgValidator=n,this.el=i,this.bgUrl=o,this.imgUploaded=new h.vpe}return g(t,[{key:"ngOnChanges",value:function(){this.el.nativeElement.style.backgroundImage=this.selectedBg&&"uploadedImg"===this.selectedBg.configId?this.bgUrl.transform(this.selectedBg.backgroundImage):null}},{key:"openUploadDialog",value:function(){var t=this;(0,ae.r)({types:[se.j.image]}).then(function(e){t.uploadQueue.start(e,{validator:t.imgValidator,httpParams:{diskPrefix:"biolink",disk:"public"}}).subscribe(function(e){t.imgUploaded.emit(Object.assign(Object.assign({},$e),{backgroundImage:e.fileEntry.url}))})})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Y36(re.A),h.Y36(le.G),h.Y36(h.SBq),h.Y36(en.j))},t.\u0275cmp=h.Xpm({type:t,selectors:[["background-selector-img"]],hostBindings:function(t,e){1&t&&h.NdJ("click",function(t){return e.openUploadDialog(t.target)})},inputs:{selectedBg:"selectedBg"},outputs:{imgUploaded:"imgUploaded"},features:[h.TTD],decls:2,vars:0,consts:[[1,"icon-container"],["svgIcon","add-photo-alternate"]],template:function(t,e){1&t&&(h.TgZ(0,"div",0),h._UZ(1,"mat-icon",1),h.qZA())},directives:[I.Hw],styles:["[_nghost-%COMP%]{color:#fff;position:relative}.icon-container[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;background-color:rgba(0,0,0,.3);padding:4px 4px 6px 6px;border-radius:4px;width:50px;height:50px}.mat-icon[_ngcontent-%COMP%]{width:40px;height:40px}"],changeDetection:0}),t}(),on=function(){var t=function(){function t(){d(this,t)}return g(t,[{key:"transform",value:function(t){if(t)return t.split("/").pop().split(".")[0].replace("-"," ")}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=h.Yjl({name:"labelFromFilename",type:t,pure:!0}),t}();function an(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"background-selector-img",7),h.NdJ("imgUploaded",function(t){return h.CHM(n),h.oxw(2).selectBackground(t)}),h.ALo(1,"async"),h.qZA()}if(2&t){var i=h.oxw(2);h.Q6J("selectedBg",h.lcZ(1,1,i.selectedBg$))}}function rn(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"div",8),h.NdJ("click",function(t){h.CHM(n);var e=h.oxw().$implicit;return h.oxw().onBgClick(e,t)}),h.ALo(1,"backgroundUrl"),h.qZA()}if(2&t){var i=h.oxw().$implicit;h.Udp("background-color",i.color)("background-image",h.lcZ(1,4,i.backgroundImage))}}function sn(t,e){if(1&t&&(h.ynx(0),h.TgZ(1,"div"),h.TgZ(2,"div",2),h.ALo(3,"async"),h.ynx(4,3),h.YNc(5,an,2,3,"background-selector-img",4),h.YNc(6,rn,2,6,"div",5),h.BQk(),h.qZA(),h.TgZ(7,"div",6),h._uU(8),h.ALo(9,"trans"),h.ALo(10,"labelFromFilename"),h.qZA(),h.qZA(),h.BQk()),2&t){var n,i=e.$implicit,o=h.oxw();h.xp6(2),h.ekj("active",(null==(n=h.lcZ(3,5,o.selectedBg$))?null:n.id)===i.configId),h.xp6(2),h.Q6J("ngSwitch",i.configId),h.xp6(1),h.Q6J("ngSwitchCase","uploadedImg"),h.xp6(3),h.hij(" ",h.lcZ(9,7,i.configLabel||h.lcZ(10,9,i.backgroundImage))," ")}}var cn=function(){var t=function(){function t(e){d(this,t),this.overlay=e,this.backgrounds=He,this.selectedBg$=new a.X(null)}return g(t,[{key:"registerOnChange",value:function(t){this.propagateChange=t}},{key:"writeValue",value:function(t){this.selectedBg$.next(t)}},{key:"registerOnTouched",value:function(t){}},{key:"onBgClick",value:function(t,e){var n,i=this;"flat"===t.configId?(this.setFlatColorBg(null===(n=this.selectedBg$.value)||void 0===n?void 0:n.color),this.openColorPicker(e)):"gradient"===t.configId?this.overlay.open(Ke,{origin:new h.SBq(e.target),position:Ve.Z,data:{active:this.selectedBg$.value}}).afterClosed().subscribe(function(t){t&&i.selectBackground(t)}):this.selectBackground(t)}},{key:"selectBackground",value:function(t){var e,n=null===(e=this.selectedBg$.value)||void 0===e?void 0:e.color,i=Object.assign({},t);!i.color&&n&&(i.color=n),this.propagateChange(i),this.selectedBg$.next(i)}},{key:"setFlatColorBg",value:function(t){this.selectBackground(Object.assign(Object.assign({},Be),{color:t}))}},{key:"openColorPicker",value:function(t){var e;return(0,Qe.mG)(this,void 0,void 0,regeneratorRuntime.mark(function n(){var o,a,r,s=this;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.e(378).then(i.bind(i,49378));case 2:o=n.sent,a=o.BeColorPickerModule,(r=this.overlay.open(a.components.panel,{origin:new h.SBq(t.target),position:Ve.Z,data:{color:null===(e=this.selectedBg$.value)||void 0===e?void 0:e.color}})).valueChanged().pipe((0,ze.R)(r.afterClosed())).subscribe(function(t){s.setFlatColorBg(t)});case 6:case"end":return n.stop()}},n,this)}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Y36(tn.T))},t.\u0275cmp=h.Xpm({type:t,selectors:[["background-selector"]],features:[h._Bn([{provide:v.JU,useExisting:t,multi:!0}])],decls:2,vars:1,consts:[[1,"auto-height-grid"],[4,"ngFor","ngForOf"],[1,"grid-item"],[3,"ngSwitch"],["class","grid-content","matRipple","",3,"selectedBg","imgUploaded",4,"ngSwitchCase"],["class","grid-content","matRipple","",3,"background-color","background-image","click",4,"ngSwitchDefault"],[1,"grid-label"],["matRipple","",1,"grid-content",3,"selectedBg","imgUploaded"],["matRipple","",1,"grid-content",3,"click"]],template:function(t,e){1&t&&(h.TgZ(0,"div",0),h.YNc(1,sn,11,11,"ng-container",1),h.qZA()),2&t&&(h.xp6(1),h.Q6J("ngForOf",e.backgrounds))},directives:[C.sg,C.RF,C.n9,C.ED,nn,Nt.wG],pipes:[C.Ov,Vt.R,on,en.j],styles:[".auto-height-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}.grid-item[_ngcontent-%COMP%]{padding-top:140%}.grid-content[_ngcontent-%COMP%]{background-size:cover;background-position:50%;border-radius:4px}background-selector-img.grid-content[_ngcontent-%COMP%]{border:1px dashed var(--be-secondary-text)}"],changeDetection:0}),t}(),ln=i(9636),un=[{family:"Impact, Charcoal, sans-serif",category:"sans-serif"},{family:"Arial, Helvetica Neue, Helvetica, sans-serif",category:"serif"},{family:'"Comic Sans MS", cursive, sans-serif',category:"Handwriting"},{family:"Century Gothic, sans-serif",category:"sans-serif"},{family:'"Courier New", Courier, monospace',category:"monospace"},{family:'"Lucida Sans Unicode", "Lucida Grande", sans-serif',category:"sans-serif"},{family:'"Times New Roman", Times, serif',category:"serif"},{family:'"Lucida Console", Monaco, monospace',category:"monospace"},{family:'"Andele Mono", monospace, sans-serif',category:"sans-serif"},{family:"Verdana, Geneva, sans-serif",category:"sans-serif"},{family:'"Helvetica Neue", Helvetica, Arial, sans-serif',category:"sans-serif"}],dn=i(39404),pn=function(){var t=function(){function t(){d(this,t)}return g(t,[{key:"transform",value:function(t){return t?t.split(",")[0].replace(/"/g,"").trim():null}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=h.Yjl({name:"fontDisplayName",type:t,pure:!0}),t}();function gn(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"div",19),h.NdJ("click",function(){var t=h.CHM(n).$implicit;return h.oxw().selectFamily(t.family)}),h.ALo(1,"async"),h.TgZ(2,"div",20),h.TgZ(3,"div",21),h.O4$(),h.TgZ(4,"svg",22),h.TgZ(5,"text",23),h._uU(6,"Aa"),h.qZA(),h.qZA(),h.qZA(),h.qZA(),h.kcU(),h.TgZ(7,"div",24),h._uU(8),h.ALo(9,"fontDisplayName"),h.qZA(),h.qZA()}if(2&t){var i=e.$implicit,o=h.oxw();h.ekj("active",h.lcZ(1,5,o.selectedFamily$)===i.family),h.xp6(5),h.Udp("font-family",i.family),h.xp6(3),h.Oqu(h.lcZ(9,7,i.family))}}var hn=function(){var t=function(){function t(e){var n=this;d(this,t),this.googleFonts=e,this.activePage$=new a.X(0),this.chunkedFonts$=new a.X(null),this.selectedFamily$=new a.X(null),this.filters=new v.cw({query:new v.NI,category:new v.NI(null)}),this.from$=this.activePage$.pipe((0,$t.U)(function(t){return t*n.perPage+1})),this.total$=new a.X(1052),this.to$=this.from$.pipe((0,$t.U)(function(t){return Math.min(t+n.perPage-1)},this.total$.value)),this.fonts$=(0,Yt.aj)(this.activePage$,this.chunkedFonts$).pipe((0,$t.U)(function(t){var e=s(t,2),n=e[0],i=e[1];return i?i[n]:[]})),this.perPage=20}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.allFonts=[].concat(un),this.googleFonts.getAll().subscribe(function(e){t.allFonts=[].concat(c(t.allFonts),c(e)),t.chunkFonts(t.allFonts)}),this.fontSub=this.fonts$.subscribe(function(e){t.loadIntoDom(e)}),this.formSub=this.filters.valueChanges.subscribe(function(e){var n,i=(null===(n=e.query)||void 0===n?void 0:n.length)?(0,ln.D)(t.allFonts,e.query):t.allFonts;i=e.category?i.filter(function(t){return t.category.toLowerCase()===e.category.toLowerCase()}):i,t.activePage$.next(0),t.chunkFonts(i)})}},{key:"ngOnDestroy",value:function(){this.formSub.unsubscribe(),this.fontSub.unsubscribe()}},{key:"selectFamily",value:function(t){this.selectedFamily$.next(t),this.propagateChange({family:t})}},{key:"haveNext",value:function(){var t;return(null===(t=this.chunkedFonts$.value)||void 0===t?void 0:t.length)>this.activePage$.value+1}},{key:"havePrev",value:function(){return this.activePage$.value>0}},{key:"nextPage",value:function(){this.activePage$.next(this.activePage$.value+1)}},{key:"prevPage",value:function(){this.activePage$.next(this.activePage$.value-1)}},{key:"registerOnChange",value:function(t){this.propagateChange=t}},{key:"writeValue",value:function(t){this.selectedFamily$.next(null==t?void 0:t.family)}},{key:"registerOnTouched",value:function(t){}},{key:"chunkFonts",value:function(t){for(var e=this.perPage,n=[],i=0,o=t.length;i<o;i+=e)n.push(t.slice(i,i+e));this.chunkedFonts$.next(n),this.total$.next(t.length)}},{key:"loadIntoDom",value:function(t){this.googleFonts.loadIntoDom(t,"google-font-selector")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Y36(dn.I))},t.\u0275cmp=h.Xpm({type:t,selectors:[["google-font-selector"]],features:[h._Bn([{provide:v.JU,useExisting:t,multi:!0}])],decls:36,vars:21,consts:[[1,"filters","inline-inputs-container","many-inputs",3,"formGroup"],[1,"input-container"],["for","font-selector-search","trans","",1,"hidden"],["type","text","id","font-selector-search","formControlName","query","placeholder","Search..."],["for","font-selector-category","trans","",1,"hidden"],["id","font-selector-category","formControlName","category"],["trans","",3,"ngValue"],["value","serif","trans",""],["value","sans-serif","trans",""],["value","display","trans",""],["value","handwriting","trans",""],["value","monospace","trans",""],[1,"font-grid"],["class","font",3,"active","click",4,"ngFor","ngForOf"],[1,"range-actions"],[1,"range-label"],["type","button","mat-icon-button","",1,"range-button",3,"disabled","click"],["svgIcon","chevron-left"],["svgIcon","chevron-right"],[1,"font",3,"click"],["role","button","matRipple","",1,"grid-item"],[1,"grid-content"],["viewBox","0 0 100 100"],["x","50%","y","50%"],[1,"label"]],template:function(t,e){1&t&&(h.TgZ(0,"form",0),h.TgZ(1,"div",1),h.TgZ(2,"label",2),h._uU(3,"Search"),h.qZA(),h._UZ(4,"input",3),h.qZA(),h.TgZ(5,"div",1),h.TgZ(6,"label",4),h._uU(7,"Category"),h.qZA(),h.TgZ(8,"select",5),h.TgZ(9,"option",6),h._uU(10,"All Categories"),h.qZA(),h.TgZ(11,"option",7),h._uU(12,"Serif"),h.qZA(),h.TgZ(13,"option",8),h._uU(14,"Sans Serif"),h.qZA(),h.TgZ(15,"option",9),h._uU(16,"Display"),h.qZA(),h.TgZ(17,"option",10),h._uU(18,"Handwriting"),h.qZA(),h.TgZ(19,"option",11),h._uU(20,"monospace"),h.qZA(),h.qZA(),h.qZA(),h.qZA(),h.TgZ(21,"div",12),h.YNc(22,gn,10,9,"div",13),h.ALo(23,"async"),h.qZA(),h.TgZ(24,"div",14),h.TgZ(25,"div",15),h._uU(26),h.ALo(27,"async"),h.ALo(28,"async"),h.ALo(29,"trans"),h.ALo(30,"number"),h.ALo(31,"async"),h.qZA(),h.TgZ(32,"button",16),h.NdJ("click",function(){return e.prevPage()}),h._UZ(33,"mat-icon",17),h.qZA(),h.TgZ(34,"button",16),h.NdJ("click",function(){return e.nextPage()}),h._UZ(35,"mat-icon",18),h.qZA(),h.qZA()),2&t&&(h.Q6J("formGroup",e.filters),h.xp6(9),h.Q6J("ngValue",null),h.xp6(13),h.Q6J("ngForOf",h.lcZ(23,9,e.fonts$)),h.xp6(4),h.HOy(" ",h.lcZ(27,11,e.from$)," - ",h.lcZ(28,13,e.to$)," ",h.lcZ(29,15,"of")," ",h.lcZ(30,17,h.lcZ(31,19,e.total$))," "),h.xp6(6),h.Q6J("disabled",!e.havePrev()),h.xp6(2),h.Q6J("disabled",!e.haveNext()))},directives:[v._Y,v.JL,v.sg,U.P,v.Fj,v.JJ,v.u,v.EJ,v.YN,v.Kr,C.sg,P.lW,I.Hw,Nt.wG],pipes:[C.Ov,Vt.R,C.JJ,pn],styles:["[_nghost-%COMP%]{display:block}.font-grid[_ngcontent-%COMP%]{display:grid;grid-gap:15px;grid-template-columns:repeat(auto-fill,minmax(99px,1fr))}.grid-item[_ngcontent-%COMP%]{padding-top:100%;position:relative;cursor:pointer}.grid-item[_ngcontent-%COMP%]:hover{background-color:var(--be-hover)}.active[_ngcontent-%COMP%]   .grid-content[_ngcontent-%COMP%]{border-color:var(--be-accent-default)}.grid-content[_ngcontent-%COMP%]{border:1px solid var(--be-divider-default);border-radius:4px;position:absolute;top:0;left:0;right:0;bottom:0;margin:auto}.label[_ngcontent-%COMP%]{margin-top:6px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 5px}.preview[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;font-size:4rem;height:100%}svg[_ngcontent-%COMP%]{width:100%;height:100%}svg[_ngcontent-%COMP%]   text[_ngcontent-%COMP%]{font-size:4rem;dominant-baseline:central;text-anchor:middle}.range-actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;margin-top:25px}.range-label[_ngcontent-%COMP%]{margin:0 32px 0 24px;font-size:1.2rem}.range-button[_ngcontent-%COMP%], .range-label[_ngcontent-%COMP%]{color:var(--be-secondary-text)}.range-button[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{width:28px;height:28px;line-height:28px}"],changeDetection:0}),t}(),fn=function(){var t=function t(e){d(this,t),this.editor=e};return t.\u0275fac=function(e){return new(e||t)(h.Y36(k))},t.\u0275cmp=h.Xpm({type:t,selectors:[["biolink-editor-fonts"]],decls:4,vars:1,consts:[["trans",""],[1,"material-panel"],[3,"formControl"]],template:function(t,e){1&t&&(h.TgZ(0,"h3",0),h._uU(1,"Fonts"),h.qZA(),h.TgZ(2,"div",1),h._UZ(3,"google-font-selector",2),h.qZA()),2&t&&(h.xp6(3),h.Q6J("formControl",e.editor.appearanceForm.get("fontConfig")))},directives:[U.P,hn,v.JJ,v.oH],styles:[""],changeDetection:0}),t}(),mn=i(69042);function vn(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"div",2),h.TgZ(1,"h4",0),h._uU(2,"Raised"),h.qZA(),h.TgZ(3,"div",3),h.TgZ(4,"div",4),h.TgZ(5,"button",5),h.NdJ("click",function(){return h.CHM(n),h.oxw().changeBtnType("raised","square")}),h._uU(6," Square "),h.qZA(),h.qZA(),h.TgZ(7,"div",4),h.TgZ(8,"button",6),h.NdJ("click",function(){return h.CHM(n),h.oxw().changeBtnType("raised","rounded")}),h._uU(9," Rounded "),h.qZA(),h.qZA(),h.TgZ(10,"div",4),h.TgZ(11,"button",7),h.NdJ("click",function(){return h.CHM(n),h.oxw().changeBtnType("raised","pill")}),h._uU(12," Pill "),h.qZA(),h.qZA(),h.qZA(),h.TgZ(13,"h4",0),h._uU(14,"Flat"),h.qZA(),h.TgZ(15,"div",3),h.TgZ(16,"div",4),h.TgZ(17,"button",8),h.NdJ("click",function(){return h.CHM(n),h.oxw().changeBtnType("flat","square")}),h._uU(18," Square "),h.qZA(),h.qZA(),h.TgZ(19,"div",4),h.TgZ(20,"button",9),h.NdJ("click",function(){return h.CHM(n),h.oxw().changeBtnType("flat","rounded")}),h._uU(21," Rounded "),h.qZA(),h.qZA(),h.TgZ(22,"div",4),h.TgZ(23,"button",10),h.NdJ("click",function(){return h.CHM(n),h.oxw().changeBtnType("flat","pill")}),h._uU(24," Pill "),h.qZA(),h.qZA(),h.qZA(),h.TgZ(25,"h4",0),h._uU(26,"Outline"),h.qZA(),h.TgZ(27,"div",3),h.TgZ(28,"div",4),h.TgZ(29,"button",11),h.NdJ("click",function(){return h.CHM(n),h.oxw().changeBtnType("stroked","square")}),h._uU(30," Square "),h.qZA(),h.qZA(),h.TgZ(31,"div",4),h.TgZ(32,"button",12),h.NdJ("click",function(){return h.CHM(n),h.oxw().changeBtnType("stroked","rounded")}),h._uU(33," Rounded "),h.qZA(),h.qZA(),h.TgZ(34,"div",4),h.TgZ(35,"button",13),h.NdJ("click",function(){return h.CHM(n),h.oxw().changeBtnType("stroked","pill")}),h._uU(36," Pill "),h.qZA(),h.qZA(),h.qZA(),h.TgZ(37,"h4",0),h._uU(38,"Basic"),h.qZA(),h.TgZ(39,"div",3),h.TgZ(40,"div",4),h.TgZ(41,"button",14),h.NdJ("click",function(){return h.CHM(n),h.oxw().changeBtnType("basic","square")}),h._uU(42," Square "),h.qZA(),h.qZA(),h.TgZ(43,"div",4),h.TgZ(44,"button",15),h.NdJ("click",function(){return h.CHM(n),h.oxw().changeBtnType("basic","rounded")}),h._uU(45," Rounded "),h.qZA(),h.qZA(),h.TgZ(46,"div",4),h.TgZ(47,"button",16),h.NdJ("click",function(){return h.CHM(n),h.oxw().changeBtnType("basic","pill")}),h._uU(48," Pill "),h.qZA(),h.qZA(),h.qZA(),h.TgZ(49,"color-picker-input",17),h._uU(50,"Button Color"),h.qZA(),h.qZA()}if(2&t){var i=e.ngIf,o=h.oxw();h.xp6(4),h.ekj("active","raised"===i.type&&"square"===i.variant),h.xp6(3),h.ekj("active","raised"===i.type&&"rounded"===i.variant),h.xp6(3),h.ekj("active","raised"===i.type&&"pill"===i.variant),h.xp6(6),h.ekj("active","flat"===i.type&&"square"===i.variant),h.xp6(3),h.ekj("active","flat"===i.type&&"rounded"===i.variant),h.xp6(3),h.ekj("active","flat"===i.type&&"pill"===i.variant),h.xp6(6),h.ekj("active","stroked"===i.type&&"square"===i.variant),h.xp6(3),h.ekj("active","stroked"===i.type&&"rounded"===i.variant),h.xp6(3),h.ekj("active","stroked"===i.type&&"pill"===i.variant),h.xp6(6),h.ekj("active","basic"===i.type&&"square"===i.variant),h.xp6(3),h.ekj("active","basic"===i.type&&"rounded"===i.variant),h.xp6(3),h.ekj("active","basic"===i.type&&"pill"===i.variant),h.xp6(3),h.Q6J("formControl",o.colorControl)}}var bn=function(){var t=function(){function t(e){d(this,t),this.editor=e,this.colorControl=new v.NI,this.active$=this.editor.appearanceForm.get("btnConfig").valueChanges.pipe((0,o.O)({}),(0,$t.U)(function(t){return null!=t?t:{}}))}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.colorControl.valueChanges.subscribe(function(e){t.editor.appearanceForm.get("btnConfig.color").setValue(e),t.editor.appearanceForm.markAsDirty()})}},{key:"changeBtnType",value:function(t,e){this.editor.appearanceForm.patchValue({btnConfig:{type:t,variant:e}}),this.editor.appearanceForm.markAsDirty()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Y36(k))},t.\u0275cmp=h.Xpm({type:t,selectors:[["biolink-editor-buttons"]],decls:4,vars:3,consts:[["trans",""],["class","material-panel",4,"ngIf"],[1,"material-panel"],[1,"row"],[1,"border"],["type","button","color","accent","mat-raised-button","","trans","",1,"btn-square",3,"click"],["type","button","color","accent","mat-raised-button","","trans","",3,"click"],["type","button","color","accent","mat-raised-button","","trans","",1,"btn-pill",3,"click"],["type","button","color","accent","mat-flat-button","","trans","",1,"btn-square",3,"click"],["type","button","color","accent","mat-flat-button","","trans","",3,"click"],["type","button","color","accent","mat-flat-button","","trans","",1,"btn-pill",3,"click"],["type","button","color","accent","mat-stroked-button","","trans","",1,"btn-square",3,"click"],["type","button","color","accent","mat-stroked-button","","trans","",3,"click"],["type","button","color","accent","mat-stroked-button","","trans","",1,"btn-pill",3,"click"],["type","button","color","accent","mat-button","","trans","",1,"btn-square","basic-btn",3,"click"],["type","button","color","accent","mat-button","","trans","",1,"basic-btn",3,"click"],["type","button","color","accent","mat-button","","trans","",1,"btn-pill","basic-btn",3,"click"],["trans","",3,"formControl"]],template:function(t,e){1&t&&(h.TgZ(0,"h3",0),h._uU(1,"Buttons"),h.qZA(),h.YNc(2,vn,51,25,"div",1),h.ALo(3,"async")),2&t&&(h.xp6(2),h.Q6J("ngIf",h.lcZ(3,1,e.active$)))},directives:[U.P,C.O5,P.lW,mn.M,v.JJ,v.oH],pipes:[C.Ov],styles:["[_nghost-%COMP%]{display:block}h4[_ngcontent-%COMP%]{font-size:1.4rem;margin:0 0 10px}.row[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:24px;margin:0 -10px 20px}button[_ngcontent-%COMP%]{min-height:45px;width:100%}.btn-square[_ngcontent-%COMP%]{border-radius:0}.btn-pill[_ngcontent-%COMP%]{border-radius:30px}.basic-btn[_ngcontent-%COMP%]{border:1px dashed var(--be-divider-lighter)}.border[_ngcontent-%COMP%]{border:4px solid transparent;border-radius:4px;padding:5px}.border.active[_ngcontent-%COMP%]{border-color:var(--be-divider-default)}"],changeDetection:0}),t}(),yn=function(){var t=function t(e){d(this,t),this.editor=e};return t.\u0275fac=function(e){return new(e||t)(h.Y36(k))},t.\u0275cmp=h.Xpm({type:t,selectors:[["biolink-appearance"]],decls:13,vars:4,consts:[["trans",""],["trans","",1,"tab-description"],["mat-raised-button","","type","button","color","accent","trans","",1,"save-button",3,"disabled","click"],[1,"material-panel"],[3,"formControl"]],template:function(t,e){1&t&&(h.TgZ(0,"h2",0),h._uU(1,"Custom Appearance"),h.qZA(),h.TgZ(2,"p",1),h._uU(3," Fully customize your Biolink. Change background color or select gradients and images. Choose button style, text color, typeface and more.\n"),h.qZA(),h.TgZ(4,"button",2),h.NdJ("click",function(){return e.editor.saveAppearance()}),h.ALo(5,"async"),h._uU(6," Save Changes\n"),h.qZA(),h.TgZ(7,"h3",0),h._uU(8,"Background"),h.qZA(),h.TgZ(9,"div",3),h._UZ(10,"background-selector",4),h.qZA(),h._UZ(11,"biolink-editor-fonts"),h._UZ(12,"biolink-editor-buttons")),2&t&&(h.xp6(4),h.Q6J("disabled",h.lcZ(5,2,e.editor.loading$)||e.editor.appearanceForm.pristine),h.xp6(6),h.Q6J("formControl",e.editor.appearanceForm.get("bgConfig")))},directives:[U.P,P.lW,cn,v.JJ,v.oH,fn,bn],pipes:[C.Ov],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font-size:2.4rem;margin:0 0 10px}h3[_ngcontent-%COMP%]{font-size:2rem}.tab-description[_ngcontent-%COMP%]{margin:0 0 15px}.save-button[_ngcontent-%COMP%]{margin:0 0 40px}  .mat-tab-label-content{text-transform:capitalize}.material-panel[_ngcontent-%COMP%]{max-height:550px;overflow:auto}"],changeDetection:0}),t}(),_n=i(32198),xn=i(43835),kn=i(90611),Zn=i(25051),wn=i(28505),An=i(53129),Cn=i(29738);function Tn(t,e){if(1&t&&(h.TgZ(0,"div",14),h._uU(1),h.qZA()),2&t){var n=h.oxw().ngIf;h.xp6(1),h.Oqu(n.name)}}function qn(t,e){if(1&t&&(h.TgZ(0,"div",14),h._uU(1),h.qZA()),2&t){var n=h.oxw().ngIf;h.xp6(1),h.Oqu(n.hash)}}function In(t,e){if(1&t&&(h.TgZ(0,"div",4),h.TgZ(1,"div",5),h.TgZ(2,"label",6),h._uU(3,"Name"),h.qZA(),h._UZ(4,"input",7),h.YNc(5,Tn,2,1,"div",8),h.qZA(),h.TgZ(6,"div",9),h._UZ(7,"slug-control",10),h.ALo(8,"async"),h.YNc(9,qn,2,1,"div",8),h.qZA(),h.TgZ(10,"div",11),h.TgZ(11,"label",12),h._uU(12,"Description"),h.qZA(),h._UZ(13,"textarea",13),h.qZA(),h.qZA()),2&t){var n=e.ngIf,i=h.oxw();h.Q6J("formGroup",i.linkForm.formGroup),h.xp6(5),h.Q6J("ngIf",n.name),h.xp6(2),h.Q6J("baseUri",h.lcZ(8,4,i.slugBaseUri$)),h.xp6(2),h.Q6J("ngIf",n.hash)}}var On=function(){var t=function(){function t(e,n,i,o,r,s,c){d(this,t),this.linkForm=e,this.valueLists=n,this.currentUser=i,this.fb=o,this.settings=r,this.editor=s,this.toast=c,this.hiddenFeatures={alias:!0,linkGroups:!0,details:!0},this.slugBaseUri$=new a.X(null),this.options$=new a.X(null),this.form=this.fb.group({name:""}),this.errors$=new a.X({})}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.valueLists.get(["countries","domains","pixels"],{userId:this.currentUser.get("id")}).subscribe(function(e){t.options$.next(e)}),(0,Yt.aj)(this.linkForm.formGroup.get("domain_id").valueChanges,this.options$.pipe((0,xn.h)(function(t){return!!t}))).subscribe(function(e){var n=s(e,2),i=n[0];n[1];t.setSlugBaseUri(i)}),this.editor.biolink$.pipe((0,xn.h)(function(t){return!!t}),(0,kn.q)(1)).subscribe(function(e){t.linkForm.patchValue(e)})}},{key:"saveSettings",value:function(){var t=this;return this.editor.loading$.next(!0),this.editor.biolinks.update(this.editor.biolink$.value.id,this.linkForm.value()).pipe((0,r.x)(function(){return t.editor.loading$.next(!1)})).subscribe(function(){t.toast.open("Biolink updated")},function(e){return t.errors$.next(e.errors)})}},{key:"setSlugBaseUri",value:function(t){this.slugBaseUri$.next(t?this.options$.value.domains.find(function(e){return e.id===t}).host:this.settings.getBaseUrl())}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Y36(_n.l),h.Y36(Zn.l),h.Y36(wn.I),h.Y36(v.qu),h.Y36(w.Z),h.Y36(k),h.Y36(m.F))},t.\u0275cmp=h.Xpm({type:t,selectors:[["biolink-settings"]],features:[h._Bn([_n.l])],decls:8,vars:10,consts:[["ngNativeValidate","",1,"material-panel",3,"ngSubmit"],[3,"formGroup",4,"ngIf"],["resourceName","biolink",3,"featuresToHide","linkOptions"],["type","submit","mat-raised-button","","color","accent","trans","",3,"disabled"],[3,"formGroup"],[1,"input-container","name-container"],["for","link-group-name","trans",""],["type","text","id","link-group-name","formControlName","name","required","","minlength","3"],["class","error",4,"ngIf"],[1,"input-container","slug-container"],["formControlName","hash",3,"baseUri"],[1,"input-container"],["for","link-group-description","trans",""],["id","link-group-description","formControlName","description"],[1,"error"]],template:function(t,e){1&t&&(h.TgZ(0,"form",0),h.NdJ("ngSubmit",function(){return e.saveSettings()}),h.YNc(1,In,14,6,"div",1),h.ALo(2,"async"),h._UZ(3,"link-options-form",2),h.ALo(4,"async"),h.TgZ(5,"button",3),h.ALo(6,"async"),h._uU(7," Save "),h.qZA(),h.qZA()),2&t&&(h.xp6(1),h.Q6J("ngIf",h.lcZ(2,4,e.errors$)),h.xp6(2),h.Q6J("featuresToHide",e.hiddenFeatures)("linkOptions",h.lcZ(4,6,e.options$)),h.xp6(2),h.Q6J("disabled",h.lcZ(6,8,e.editor.loading$)))},directives:[v.JL,v.F,C.O5,An.O,P.lW,U.P,v.sg,v.Fj,v.JJ,v.u,v.Q7,v.wO,Cn.b],pipes:[C.Ov],styles:["[_nghost-%COMP%]{display:block}.slug-container[_ngcontent-%COMP%]{margin:8px 0 20px}link-options-form[_ngcontent-%COMP%]{margin-top:10px}"],changeDetection:0}),t}(),Un=i(78671);function Pn(t,e){1&t&&h._UZ(0,"biolink-editor-content",8)}function Mn(t,e){1&t&&h._UZ(0,"biolink-appearance",8)}function Sn(t,e){1&t&&h._UZ(0,"biolink-settings",8)}function Nn(t,e){if(1&t&&(h.TgZ(0,"div",9),h.TgZ(1,"div",10),h.TgZ(2,"a",11),h._uU(3),h.qZA(),h.qZA(),h._UZ(4,"share-link-btns",12),h.qZA()),2&t){var n=e.ngIf;h.xp6(2),h.Q6J("href",n.short_url,h.LSH),h.xp6(1),h.Oqu(n.short_url),h.xp6(1),h.Q6J("showCopyBtn",!0)("colored",!0)("link",n)}}var Jn=function(){var t=function(){function t(e,n,i,a,r,s,c,l){d(this,t),this.modal=e,this.biolinks=n,this.widgets=i,this.route=a,this.toast=r,this.settings=s,this.router=c,this.editor=l,this.appearance$=this.editor.appearanceForm.valueChanges.pipe((0,o.O)({}))}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.route.params.subscribe(function(e){t.editor.reloadBiolink(e.linkId)}),this.route.queryParams.subscribe(function(e){t.editor.activeTab$.next(x[e.tab||"links"])})}},{key:"tabChanged",value:function(t){this.router.navigate([],{queryParams:{tab:Object.entries(x)[t.index][0]},replaceUrl:!0})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Y36(_.u),h.Y36(f.n),h.Y36(y),h.Y36(Z.gz),h.Y36(m.F),h.Y36(w.Z),h.Y36(Z.F0),h.Y36(k))},t.\u0275cmp=h.Xpm({type:t,selectors:[["biolink-editor"]],decls:19,vars:21,consts:[[1,"left-col"],["dynamicHeight","","color","accent","animationDuration","0",3,"selectedIndex","selectedTabChange"],[3,"label"],["matTabContent",""],[1,"right-col"],["class","preview-title",4,"ngIf"],[1,"phone-preview"],[3,"biolink","appearance"],[1,"left-col-spacer"],[1,"preview-title"],[1,"link"],["target","_blank",3,"href"],[3,"showCopyBtn","colored","link"]],template:function(t,e){1&t&&(h.TgZ(0,"div",0),h.TgZ(1,"mat-tab-group",1),h.NdJ("selectedTabChange",function(t){return e.tabChanged(t)}),h.ALo(2,"async"),h.TgZ(3,"mat-tab",2),h.ALo(4,"trans"),h.YNc(5,Pn,1,0,"ng-template",3),h.qZA(),h.TgZ(6,"mat-tab",2),h.ALo(7,"trans"),h.YNc(8,Mn,1,0,"ng-template",3),h.qZA(),h.TgZ(9,"mat-tab",2),h.ALo(10,"trans"),h.YNc(11,Sn,1,0,"ng-template",3),h.qZA(),h.qZA(),h.qZA(),h.TgZ(12,"div",4),h.YNc(13,Nn,5,5,"div",5),h.ALo(14,"async"),h.TgZ(15,"div",6),h._UZ(16,"biolink-page",7),h.ALo(17,"async"),h.ALo(18,"async"),h.qZA(),h.qZA()),2&t&&(h.xp6(1),h.Q6J("selectedIndex",h.lcZ(2,7,e.editor.activeTab$)),h.xp6(2),h.Q6J("label",h.lcZ(4,9,"Content")),h.xp6(3),h.Q6J("label",h.lcZ(7,11,"Appearance")),h.xp6(3),h.Q6J("label",h.lcZ(10,13,"Settings")),h.xp6(4),h.Q6J("ngIf",h.lcZ(14,15,e.editor.biolink$)),h.xp6(3),h.Q6J("biolink",h.lcZ(17,17,e.editor.biolink$))("appearance",h.lcZ(18,19,e.appearance$)))},directives:[A.SP,A.uX,A.Vc,C.O5,T.v,Fe,yn,On,Un.t],pipes:[C.Ov,Vt.R],styles:["@media only screen and (min-width:768px){[_nghost-%COMP%]{display:flex}}[_nghost-%COMP%]     .mat-tab-label-content{text-transform:capitalize}.left-col[_ngcontent-%COMP%]{flex:1 1 auto}@media only screen and (min-width:768px){.left-col[_ngcontent-%COMP%]{padding-right:40px}}.left-col-spacer[_ngcontent-%COMP%]{max-width:650px;margin:0 auto;position:relative;padding:40px 0}.right-col[_ngcontent-%COMP%]{padding:0 40px 40px;border-left:1px solid var(--be-divider-default);flex-shrink:0}@media only screen and (max-width:768px){.right-col[_ngcontent-%COMP%]{display:none}}.preview-title[_ngcontent-%COMP%]{display:flex;align-items:center;padding-bottom:8px;margin-bottom:55px;border-bottom:1px solid var(--be-divider-default)}.preview-title[_ngcontent-%COMP%]   .link[_ngcontent-%COMP%]{flex:1 1 auto;margin-right:auto;color:var(--be-link);text-decoration:underline;max-width:175px;overflow:hidden;text-overflow:ellipsis}.preview-title[_ngcontent-%COMP%]   share-link-btns[_ngcontent-%COMP%]{flex-shrink:0;margin-left:15px}.phone-preview[_ngcontent-%COMP%]{width:352px;height:724px;border-radius:64px;box-shadow:0 0 30px rgba(0,0,0,.2);border:12px solid #444546;overflow:hidden;position:sticky;top:135px}biolink-page[_ngcontent-%COMP%]{height:100%;width:100%;min-height:100%}"],changeDetection:0}),t}()},4512:function(t,e,n){"use strict";n.d(e,{o:function(){return j}});var i=n(56515),o=n(36024),a=n(90832),r=n(28577),s=n(76512),c=n(35366),l=n(28505),u=n(73234),p=n(63337),h=n(36501),f=n(48865),m=n(95157),v=n(24859),b=n(38116),y=n(49517),_=n(34955),x=n(56361),k=n(84369),Z=n(77307),w=n(61116),A=n(13536),C=n(80922),T=n(86668),q=n(27701),I=n(54275),O=n(24311),U=n(19708),P=n(71765),M=n(47210),S=n(2406),N=n(40450);function J(t,e){1&t&&c._UZ(0,"mat-progress-bar",22)}function E(t,e){1&t&&(c.TgZ(0,"th",23),c._uU(1,"Owner"),c.qZA())}var L=function(t){return{count:t,resource:"biolink(s)"}};function D(t,e){if(1&t){var n=c.EpF();c.TgZ(0,"tr"),c.TgZ(1,"th",24),c.TgZ(2,"div",25),c._uU(3," :count :resource selected: "),c.qZA(),c.TgZ(4,"div",26),c.TgZ(5,"permission-aware-button",27),c.TgZ(6,"button",28),c.NdJ("click",function(){return c.CHM(n),c.oxw().maybeDeleteSelectedBiolinks()}),c._uU(7," Delete "),c.qZA(),c.qZA(),c.qZA(),c.qZA(),c.qZA()}if(2&t){var i=e.ngIf;c.xp6(2),c.Q6J("transValues",c.VKq(1,L,i))}}function R(t,e){if(1&t&&(c.TgZ(0,"td",48),c._UZ(1,"user-column",49),c.qZA()),2&t){var n=c.oxw().$implicit;c.xp6(1),c.Q6J("user",n.user)}}function Y(t,e){1&t&&c._UZ(0,"mat-icon",50)}function F(t,e){1&t&&(c.TgZ(0,"span"),c._uU(1,"-"),c.qZA())}function Q(t,e){1&t&&c._UZ(0,"mat-icon",50)}function $(t,e){1&t&&(c.TgZ(0,"span"),c._uU(1,"-"),c.qZA())}var B=function(t){return["/",t]},H=function(t){return[t,"analytics"]},V=function(t){return[t,"edit"]};function z(t,e){if(1&t){var n=c.EpF();c.TgZ(0,"tr"),c._UZ(1,"td",29),c.TgZ(2,"td",30),c.TgZ(3,"a",31),c._uU(4),c.qZA(),c.qZA(),c.YNc(5,R,2,1,"td",32),c.TgZ(6,"td",33),c._uU(7),c.qZA(),c.TgZ(8,"td",34),c.YNc(9,Y,1,0,"mat-icon",35),c.YNc(10,F,2,0,"span",19),c.qZA(),c.TgZ(11,"td",36),c.YNc(12,Q,1,0,"mat-icon",35),c.YNc(13,$,2,0,"span",19),c.qZA(),c.TgZ(14,"td",37),c._uU(15),c.ALo(16,"formattedDate"),c.qZA(),c.TgZ(17,"td",38),c.TgZ(18,"button",39),c.ALo(19,"trans"),c._UZ(20,"mat-icon",40),c.qZA(),c.TgZ(21,"permission-aware-button",41),c.TgZ(22,"button",42),c.ALo(23,"trans"),c._UZ(24,"mat-icon",43),c.qZA(),c.qZA(),c._UZ(25,"copy-link-btn",44),c.TgZ(26,"permission-aware-button",45),c.TgZ(27,"button",46),c.NdJ("click",function(){var t=c.CHM(n).$implicit;return c.oxw().maybeDeleteSelectedBiolinks([t.id])}),c._UZ(28,"mat-icon",47),c.qZA(),c.qZA(),c.qZA(),c.qZA()}if(2&t){var i=e.$implicit,o=c.oxw();c.xp6(1),c.Q6J("table-body-checkbox",i.id),c.xp6(2),c.Q6J("routerLink",c.VKq(22,B,i.hash)),c.xp6(1),c.Oqu(i.name),c.xp6(1),c.Q6J("ngIf",o.showUserColumn()),c.xp6(2),c.Oqu(i.links_count),c.xp6(2),c.Q6J("ngIf",i.active),c.xp6(1),c.Q6J("ngIf",!i.active),c.xp6(2),c.Q6J("ngIf",i.rotator),c.xp6(1),c.Q6J("ngIf",!i.rotator),c.xp6(2),c.Oqu(c.lcZ(16,16,i.updated_at)),c.xp6(3),c.Q6J("routerLink",c.VKq(24,H,i.id))("matTooltip",c.lcZ(19,18,"Analytics")),c.xp6(3),c.Q6J("userOwnsResource",o.currentUser.get("id")===i.user_id),c.xp6(1),c.Q6J("routerLink",c.VKq(26,V,i.id))("matTooltip",c.lcZ(23,20,"Edit")),c.xp6(3),c.Q6J("model",i)}}function G(t,e){1&t&&(c.TgZ(0,"no-results-message",51),c.TgZ(1,"span",52),c._uU(2,"No biolinks have been created yet"),c.qZA(),c.qZA())}var j=function(){var t=function(){function t(e,n,i,o,r,s,c,l,u,p){d(this,t),this.datatable=e,this.currentUser=n,this.biolinks=i,this.toast=o,this.route=r,this.linkUsage=s,this.activeSection=c,this.workspaces=l,this.modal=u,this.router=p,this.biolinks$=this.datatable.data$,this.filters=a.L}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.workspaceSub=this.workspaces.activeId$.subscribe(function(){t.setFilters()}),this.datatable.init({uri:s.n.BASE_URI,staticParams:{with:["user"],withCount:["links"],userId:this.showUserColumn()?null:this.currentUser.get("id")}})}},{key:"ngOnDestroy",value:function(){this.workspaceSub.unsubscribe()}},{key:"maybeDeleteSelectedBiolinks",value:function(t){var e=this;this.datatable.confirmResourceDeletion("biolinks").subscribe(function(){e.biolinks.delete(t||e.datatable.selectedRows$.value).subscribe(function(){e.datatable.reset(),e.toast.open("Biolink deleted")},function(t){e.toast.open(t.message||o.v.Default)})})}},{key:"showUserColumn",value:function(){return this.activeSection.admin||!!this.workspaces.activeId$.value}},{key:"setFilters",value:function(){var t=this;this.filters=a.L.filter(function(e){return"user_id"!==e.key||t.showUserColumn()})}},{key:"openCreateBiolinkModal",value:function(){var t=this;this.modal.open(r.L,{type:"biolink"}).afterClosed().subscribe(function(e){e&&t.router.navigate(["/",t.activeSection.admin?"admin":"dashboard","biolinks",e.id,"edit"])})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.Y36(i.x),c.Y36(l.I),c.Y36(s.n),c.Y36(u.F),c.Y36(p.gz),c.Y36(h.F),c.Y36(f.W),c.Y36(m.b),c.Y36(v.u),c.Y36(p.F0))},t.\u0275cmp=c.Xpm({type:t,selectors:[["biolink-index"]],features:[c._Bn([i.x])],decls:43,vars:12,consts:[[1,"datatable-page-header"],["trans",""],["trans","",1,"title"],[1,"header"],["pluralName","biolinks",3,"filters"],[1,"action-buttons"],["permission","biolinks.create"],["mat-raised-button","","color","accent","trans","",1,"button-with-icon",3,"click"],["svgIcon","add"],[1,"datatable","responsive-table"],["class","loading-bar","mode","indeterminate","color","accent",4,"ngIf"],[1,"material-table"],["table-header-checkbox",""],["table-sort-header","","trans",""],["table-sort-header","user_id","trans","",4,"ngIf"],["table-sort-header","links_count","trans",""],["table-sort-header","public","trans",""],["table-sort-header","rotator","trans",""],["table-sort-header","updated_at","trans",""],[4,"ngIf"],[4,"ngFor","ngForOf"],["svgImage","marketing.svg",4,"ngIf"],["mode","indeterminate","color","accent",1,"loading-bar"],["table-sort-header","user_id","trans",""],["colspan","6"],["trans","",1,"bulk-actions-title",3,"transValues"],[1,"bulk-actions"],["permission","biolinks.delete"],["type","button","mat-raised-button","","color","warn","trans","",3,"click"],[3,"table-body-checkbox"],["data-label","Name"],["target","_blank",1,"link-group-name",3,"routerLink"],["data-label","Owner",4,"ngIf"],["data-label","Link Count"],["data-label","Public"],["svgIcon","check",4,"ngIf"],["data-label","Rotator"],["data-label","Last Updated"],[1,"edit-column"],["type","button","mat-icon-button","",3,"routerLink","matTooltip"],["svgIcon","bar-chart"],["permission","biolinks.update",3,"userOwnsResource"],["mat-icon-button","",3,"routerLink","matTooltip"],["svgIcon","edit"],[3,"model"],["permission","biolinks.delete",1,"visible-on-mobile"],["type","button","mat-icon-button","","trans","",3,"click"],["svgIcon","delete"],["data-label","Owner"],[3,"user"],["svgIcon","check"],["svgImage","marketing.svg"],["primary-text","","trans",""]],template:function(t,e){1&t&&(c.TgZ(0,"div",0),c.TgZ(1,"h1"),c.TgZ(2,"span",1),c._uU(3,"Biolinks"),c.qZA(),c.TgZ(4,"info-popover"),c.TgZ(5,"div",2),c._uU(6,"Link in Bio"),c.qZA(),c.TgZ(7,"div",1),c._uU(8,"Offer multiple choices to your followers when they click on your Biolink. Share all your Social Media profiles, videos, songs, articles and other important links with just one url."),c.qZA(),c.qZA(),c.qZA(),c.TgZ(9,"div",3),c._UZ(10,"datatable-filters",4),c.TgZ(11,"div",5),c.TgZ(12,"permission-aware-button",6),c.TgZ(13,"button",7),c.NdJ("click",function(){return e.openCreateBiolinkModal()}),c._UZ(14,"mat-icon",8),c.TgZ(15,"span",1),c._uU(16,"Add New Biolink"),c.qZA(),c.qZA(),c.qZA(),c.qZA(),c.qZA(),c.qZA(),c.TgZ(17,"div",9),c.YNc(18,J,1,0,"mat-progress-bar",10),c.ALo(19,"async"),c.TgZ(20,"table",11),c.TgZ(21,"thead"),c.TgZ(22,"tr"),c._UZ(23,"th",12),c.TgZ(24,"th",13),c._uU(25,"Name"),c.qZA(),c.YNc(26,E,2,0,"th",14),c.TgZ(27,"th",15),c._uU(28,"Links"),c.qZA(),c.TgZ(29,"th",16),c._uU(30,"Public"),c.qZA(),c.TgZ(31,"th",17),c._uU(32,"Rotator"),c.qZA(),c.TgZ(33,"th",18),c._uU(34,"Last Updated"),c.qZA(),c._UZ(35,"th"),c.qZA(),c.YNc(36,D,8,3,"tr",19),c.qZA(),c.TgZ(37,"tbody"),c.YNc(38,z,29,28,"tr",20),c.ALo(39,"async"),c.qZA(),c.qZA(),c.YNc(40,G,3,0,"no-results-message",21),c.ALo(41,"async"),c._UZ(42,"datatable-footer"),c.qZA()),2&t&&(c.xp6(10),c.Q6J("filters",e.filters),c.xp6(8),c.Q6J("ngIf",c.lcZ(19,6,e.datatable.paginator&&e.datatable.paginator.loading$)),c.xp6(8),c.Q6J("ngIf",e.showUserColumn()),c.xp6(10),c.Q6J("ngIf",e.datatable.selectedRows$.value.length),c.xp6(2),c.Q6J("ngForOf",c.lcZ(39,8,e.biolinks$)),c.xp6(2),c.Q6J("ngIf",c.lcZ(41,10,e.datatable.paginator.noResults$)))},directives:[b.P,y.N,_.h,x.v,k.lW,Z.Hw,w.O5,A.e,C.p,w.sg,T.V,q.pW,I.O,p.yS,p.rH,O.gM,U.b,P.r,M.U],pipes:[w.Ov,S.l,N.R],styles:["h1[_ngcontent-%COMP%]{display:flex;align-items:center}"],changeDetection:0}),t}()},76512:function(t,e,n){"use strict";n.d(e,{n:function(){return a}});var i=n(35366),o=n(68515),a=function(){var t=function(){function t(e){d(this,t),this.http=e}return g(t,[{key:"get",value:function(e,n){return this.http.get("".concat(t.BASE_URI,"/").concat(e),n)}},{key:"create",value:function(e){return this.http.post(t.BASE_URI,e)}},{key:"update",value:function(e,n){return this.http.put("".concat(t.BASE_URI,"/").concat(e),n)}},{key:"delete",value:function(e){return this.http.delete("".concat(t.BASE_URI,"/").concat(e))}},{key:"detach",value:function(e,n){return this.http.post("".concat(t.BASE_URI,"/").concat(e,"/detach"),{contentItem:n})}},{key:"changeOrder",value:function(e,n){return this.http.post("".concat(t.BASE_URI,"/").concat(e,"/change-order"),{order:n})}},{key:"analytics",value:function(t){return this.http.get(this.analyticsEndpoint(t))}},{key:"analyticsEndpoint",value:function(e){return"".concat(t.BASE_URI,"/").concat(e,"/analytics")}},{key:"saveAppearance",value:function(e,n){return this.http.post("".concat(t.BASE_URI,"/").concat(e,"/appearance"),{config:n})}},{key:"updateContentItemConfig",value:function(e,n,i){return this.http.post("".concat(t.BASE_URI,"/").concat(e,"/update-content-config"),Object.assign({item_id:n.id,item_model_type:n.model_type},i))}}]),t}();return t.BASE_URI="biolink",t.\u0275fac=function(e){return new(e||t)(i.LFG(o.r))},t.\u0275prov=i.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},93836:function(t,e,n){"use strict";n.d(e,{z:function(){return L}});var i=n(84222),o=n(31041),a=n(43835),r=n(66599),c=n(11520),l=n(79996),u=n(78512),p=n(3080),h=n(83693),f=n(18948),m=n(35366),v=n(78733),b=n(131),y=n(88195),_=n(3950),x=n(68515),k=n(61116),Z=n(42300),w=n(92762),A=n(38116),C=n(92007),T=["*"],q=function(){var t=function(){function t(e){d(this,t),this.fb=e,this.setDefaultDate=!1,this.showLabels=!1,this.datePattern="([12]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01]))",this.initiated=!1,this.form=this.fb.group({from:[""],to:[""]}),this.defaultFrom=this.getDefaultDate(7),this.defaultTo=this.getDefaultDate()}return g(t,[{key:"writeValue",value:function(t){Array.isArray(t)||(t=(t||"").split(":"));var e=s(t,2),n=e[0],i=e[1];!this.initiated&&this.setDefaultDate&&(n=n||this.defaultFrom,i=i||this.defaultTo),this.initiated=!0,this.form.patchValue({from:n,to:i})}},{key:"registerOnChange",value:function(t){var e=this;this.propagateChange=t,this.form.valueChanges.pipe((0,a.h)(function(t){return t.from&&t.to})).subscribe(function(t){e.propagateChange("".concat(t.from,":").concat(t.to))})}},{key:"registerOnTouched",value:function(){}},{key:"getDefaultDate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=new Date;e.setDate(e.getDate()-t);var n=this.addZero(e.getMonth()+1),i=this.addZero(e.getDate());return"".concat(e.getFullYear(),"-").concat(n,"-").concat(i)}},{key:"addZero",value:function(t){return t<10?"0"+t:""+t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(m.Y36(o.qu))},t.\u0275cmp=m.Xpm({type:t,selectors:[["between-input"]],inputs:{setDefaultDate:"setDefaultDate",showLabels:"showLabels"},features:[m._Bn([{provide:o.JU,useExisting:t,multi:!0}])],ngContentSelectors:T,decls:12,vars:9,consts:[[3,"formGroup"],["trans",""],[1,"inline-inputs-container"],[1,"input-container"],["for","from","trans",""],["type","date","id","from","formControlName","from","required","",3,"placeholder","pattern"],["for","to","trans",""],["type","date","id","to","formControlName","to","required","",3,"placeholder","pattern"]],template:function(t,e){1&t&&(m.F$t(),m.TgZ(0,"fieldset",0),m.TgZ(1,"legend",1),m.Hsn(2),m.qZA(),m.TgZ(3,"div",2),m.TgZ(4,"div",3),m.TgZ(5,"label",4),m._uU(6,"From"),m.qZA(),m._UZ(7,"input",5),m.qZA(),m.TgZ(8,"div",3),m.TgZ(9,"label",6),m._uU(10,"To"),m.qZA(),m._UZ(11,"input",7),m.qZA(),m.qZA(),m.qZA()),2&t&&(m.Q6J("formGroup",e.form),m.xp6(5),m.ekj("hidden",!e.showLabels),m.xp6(2),m.Q6J("placeholder",e.defaultFrom)("pattern",e.datePattern),m.xp6(2),m.ekj("hidden",!e.showLabels),m.xp6(2),m.Q6J("placeholder",e.defaultTo)("pattern",e.datePattern))},directives:[o.JL,o.sg,A.P,o.Fj,o.JJ,o.u,o.Q7,o.c5],styles:["legend[_ngcontent-%COMP%]{text-transform:capitalize}legend[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0}),t}(),I=n(84369),O=n(40450),U=["countryChartPlaceholder"];function P(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"div",31),m._UZ(1,"between-input",32),m.TgZ(2,"button",33),m.NdJ("click",function(){m.CHM(n);var t=m.oxw(2);return t.customRange$.next(t.customRangeControl.value)}),m.ALo(3,"async"),m._uU(4,"Apply"),m.qZA(),m.qZA()}if(2&t){var i=m.oxw(2);m.xp6(1),m.Q6J("formControl",i.customRangeControl),m.xp6(1),m.Q6J("disabled",!m.lcZ(3,2,i.customRangeControl.valueChanges))}}function M(t,e){if(1&t&&(m.TgZ(0,"a",38),m._uU(1),m.qZA()),2&t){var n=m.oxw().$implicit;m.Q6J("href",n.label,m.LSH),m.xp6(1),m.Oqu(n.label)}}function S(t,e){1&t&&(m.TgZ(0,"div",39),m._uU(1,"Direct, Email, SMS"),m.qZA())}function N(t,e){if(1&t&&(m.TgZ(0,"li",34),m.YNc(1,M,2,2,"a",35),m.YNc(2,S,2,0,"ng-template",null,36,m.W1O),m.TgZ(4,"div",37),m._uU(5),m.qZA(),m.qZA()),2&t){var n=e.$implicit,i=m.MAs(3);m.xp6(1),m.Q6J("ngIf",n.label)("ngIfElse",i),m.xp6(4),m.Oqu(n.count)}}function J(t,e){if(1&t&&(m.TgZ(0,"div",40),m.TgZ(1,"span",41),m._uU(2),m.qZA(),m._uU(3),m.qZA()),2&t){var n=e.$implicit;m.xp6(2),m.Oqu(n.label),m.xp6(1),m.hij(" (",n.percentage,"%) ")}}function E(t,e){if(1&t&&(m.ynx(0),m.TgZ(1,"header",2),m.TgZ(2,"mat-button-toggle-group",3),m.TgZ(3,"mat-button-toggle",4),m._uU(4,"Hourly"),m.qZA(),m.TgZ(5,"mat-button-toggle",5),m._uU(6,"Weekly"),m.qZA(),m.TgZ(7,"mat-button-toggle",6),m._uU(8,"Monthly"),m.qZA(),m.TgZ(9,"mat-button-toggle",7),m._uU(10,"Yearly"),m.qZA(),m.TgZ(11,"mat-button-toggle",8),m._uU(12,"Custom"),m.qZA(),m.qZA(),m.YNc(13,P,5,4,"div",9),m.ALo(14,"async"),m.qZA(),m.TgZ(15,"div",10),m.TgZ(16,"div",11),m.TgZ(17,"chart",12),m.TgZ(18,"div",13),m.TgZ(19,"div",14),m.TgZ(20,"div",15),m._uU(21),m.ALo(22,"trans"),m.qZA(),m.TgZ(23,"div",16),m._uU(24),m.ALo(25,"trans"),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m.TgZ(26,"div",17),m.TgZ(27,"chart",18),m.TgZ(28,"div",19),m.TgZ(29,"div",15),m._uU(30,"Top Devices"),m.qZA(),m.TgZ(31,"div",20),m._uU(32,"Click count by device"),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m.TgZ(33,"div",10),m.TgZ(34,"div",21),m.TgZ(35,"div",22),m.TgZ(36,"div",19),m.TgZ(37,"div",15),m._uU(38,"Referrers"),m.qZA(),m.TgZ(39,"div",20),m._uU(40,"Click count by referrer"),m.qZA(),m.qZA(),m.TgZ(41,"ul",23),m.YNc(42,N,6,3,"li",24),m.qZA(),m.qZA(),m.qZA(),m.TgZ(43,"div",25),m.TgZ(44,"div",22),m.TgZ(45,"div",19),m.TgZ(46,"div",15),m._uU(47,"Top Locations"),m.qZA(),m.TgZ(48,"div",20),m._uU(49,"Click count by country"),m.qZA(),m.qZA(),m.TgZ(50,"div",26),m._UZ(51,"div",27,28),m.TgZ(53,"div",29),m.YNc(54,J,4,2,"div",30),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m.TgZ(55,"div",10),m.TgZ(56,"div",17),m.TgZ(57,"chart",18),m.TgZ(58,"div",19),m.TgZ(59,"div",15),m._uU(60,"Top Browsers"),m.qZA(),m.TgZ(61,"div",20),m._uU(62,"Click count by browser"),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m.TgZ(63,"div",17),m.TgZ(64,"chart",18),m.TgZ(65,"div",19),m.TgZ(66,"div",15),m._uU(67,"Top Platforms"),m.qZA(),m.TgZ(68,"div",20),m._uU(69,"Click count by OS"),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m.BQk()),2&t){var n=e.ngIf,i=m.oxw();m.xp6(2),m.Q6J("formControl",i.range),m.xp6(11),m.Q6J("ngIf","custom"===m.lcZ(14,11,i.range.valueChanges)),m.xp6(4),m.Q6J("chartConfig",n.clicks),m.xp6(4),m.Oqu(m.lcZ(22,13,"Clicks this "+i.getRangeName())),m.xp6(3),m.AsE("",n.totalClicks," ",m.lcZ(25,15,"Total Clicks"),""),m.xp6(3),m.Q6J("chartConfig",n.devices),m.xp6(15),m.Q6J("ngForOf",n.referrers),m.xp6(12),m.Q6J("ngForOf",n.locations),m.xp6(3),m.Q6J("chartConfig",n.browsers),m.xp6(7),m.Q6J("chartConfig",n.platforms)}}var L=function(){var t=function(){function t(e,n,a,r,s){d(this,t),this.loader=e,this.theme=n,this.settings=a,this.i18n=r,this.http=s,this.endpoint="".concat(i.M.BASE_URI,"/analytics"),this.transformedReports$=new u.X({}),this.loading$=new u.X(!1),this.range=new o.NI("weekly"),this.customRangeControl=new o.NI,this.customRange$=new u.X("")}return g(t,[{key:"ngOnChanges",value:function(t){t.reports&&t.reports.currentValue&&(this.updateCharts(t.reports.currentValue),this.initGoogleWorldMap())}},{key:"ngOnInit",value:function(){var t=this;(0,p.aj)([this.range.valueChanges,this.customRange$]).pipe((0,a.h)(function(t){var e=s(t,2),n=e[0],i=e[1];return"custom"!==n||!!i}),(0,r.b)(function(){return t.loading$.next(!0)})).subscribe(function(e){var n=s(e,2),i=n[0],o=n[1];t.getUpdateDataRequest(i,o).pipe((0,c.x)(function(){return t.loading$.next(!1)})).subscribe(function(e){t.updateCharts(e),t.drawGoogleChart()})}),this.theme.selectedTheme$.subscribe(function(){t.googleChart&&t.drawGoogleChart()})}},{key:"getRangeName",value:function(){return"custom"===this.range.value?"period":this.range.value.replace("ly","")}},{key:"getUpdateDataRequest",value:function(t,e){return this.http.get(this.endpoint,{range:t,customRange:e}).pipe((0,l.U)(function(t){return(0,f.w)("mainData",t)?t.mainData:t.analytics}))}},{key:"updateCharts",value:function(t){var e=Object.assign(Object.assign({},t),{browsers:this.transformData(null==t?void 0:t.browsers,h.o.PIE),platforms:this.transformData(null==t?void 0:t.platforms,h.o.PIE),devices:this.transformData(null==t?void 0:t.devices,h.o.PIE,!0),clicks:this.transformData(null==t?void 0:t.clicks,h.o.LINE)});this.transformedReports$.next(e)}},{key:"transformData",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h.o.LINE,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t?{type:n,labels:t.map(function(t){return i?e.i18n.t(t.label):t.label}),data:n===h.o.LINE?[t.map(function(t){return t.count})]:t.map(function(t){return t.count}),legend:!1,tooltip:this.i18n.t("Click Count"),options:{showLabel:!0,donut:!0}}:{}}},{key:"initGoogleWorldMap",value:function(){var t=this;this.loader.loadAsset("https://www.gstatic.com/charts/loader.js",{type:"js"}).then(function(){var e=window.google;e.charts.load("current",{packages:["geochart"],mapsApiKey:t.settings.get("links.gchart_api_key")}),e.charts.setOnLoadCallback(function(){t.drawGoogleChart()})})}},{key:"drawGoogleChart",value:function(){var t=window.google,e=this.transformedReports$.value.locations.map(function(t){return[t.label,t.count]});e.unshift(["Country","Popularity"]),e=t.visualization.arrayToDataTable(e);var n={colorAxis:{colors:["#4662fa"]},backgroundColor:this.theme.selectedTheme$.value.is_dark?"#1D1D1D":null,datalessRegionColor:this.theme.selectedTheme$.value.is_dark?"#e9ecfe":null};this.googleChart||(this.googleChart=new t.visualization.GeoChart(this.iframe.nativeElement)),this.googleChart.draw(e,n)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(m.Y36(v.j),m.Y36(b.f),m.Y36(y.Z),m.Y36(_.Z),m.Y36(x.r))},t.\u0275cmp=m.Xpm({type:t,selectors:[["click-charts"]],viewQuery:function(t,e){var n;(1&t&&m.Gf(U,5),2&t)&&(m.iGM(n=m.CRH())&&(e.iframe=n.first))},inputs:{reports:"reports",endpoint:"endpoint"},features:[m.TTD],decls:4,vars:6,consts:[[4,"ngIf"],[1,"overlay",3,"isVisible"],[1,"date-header"],[1,"right",3,"formControl"],["value","hourly","trans",""],["value","weekly","trans",""],["value","monthly","trans",""],["value","yearly","trans",""],["value","custom","trans",""],["class","custom-date-container",4,"ngIf"],[1,"chart-row"],[1,"chart-wrapper"],["height","400",1,"clicks-chart",3,"chartConfig"],[1,"chart-header","clicks-chart-header"],[1,"left"],["trans","",1,"title"],[1,"subtitle"],[1,"chart-wrapper","pie-wrapper"],["height","385",3,"chartConfig"],[1,"chart-header"],["trans","",1,"subtitle"],[1,"chart-wrapper","referrers-panel"],[1,"chart"],[1,"unstyled-list"],["class","referrer",4,"ngFor","ngForOf"],[1,"chart-wrapper","locations-panel"],[1,"chart-body"],[1,"country-chart-placeholder"],["countryChartPlaceholder",""],[1,"country-list"],["class","country",4,"ngFor","ngForOf"],[1,"custom-date-container"],[1,"click-charts-date-input",3,"formControl"],["type","button","mat-raised-button","","color","accent","trans","",1,"apply-custom-range-button",3,"disabled","click"],[1,"referrer"],["class","url","target","_blank",3,"href",4,"ngIf","ngIfElse"],["direct",""],[1,"count"],["target","_blank",1,"url",3,"href"],["trans",""],[1,"country"],[1,"country-name"]],template:function(t,e){1&t&&(m.YNc(0,E,70,17,"ng-container",0),m.ALo(1,"async"),m._UZ(2,"loading-indicator",1),m.ALo(3,"async")),2&t&&(m.Q6J("ngIf",m.lcZ(1,2,e.transformedReports$)),m.xp6(2),m.Q6J("isVisible",m.lcZ(3,4,e.loading$)))},directives:[k.O5,Z.Q,w.A9,o.JJ,o.oH,w.Yi,A.P,C.x,k.sg,q,I.lW],pipes:[k.Ov,O.R],styles:["[_nghost-%COMP%]{display:block;overflow:hidden}.clicks-chart[_ngcontent-%COMP%]   .chart-body[_ngcontent-%COMP%]{padding-right:15px}.date-header[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:25px}.custom-date-container[_ngcontent-%COMP%]{display:flex;align-items:center;margin-left:auto}@media only screen and (max-width:845px){.date-header[_ngcontent-%COMP%]{display:block;overflow-x:auto}.custom-date-container[_ngcontent-%COMP%]{margin-top:25px}}  .click-charts-date-input input{background-color:var(--be-background)}.apply-custom-range-button[_ngcontent-%COMP%]{margin-left:10px}.title[_ngcontent-%COMP%]{text-transform:capitalize}.referrers-panel[_ngcontent-%COMP%]{overflow:auto}.referrers-panel[_ngcontent-%COMP%]   .chart-header[_ngcontent-%COMP%]{margin-bottom:5px}.referrers-panel[_ngcontent-%COMP%]   .referrer[_ngcontent-%COMP%]{display:flex;align-items:center;padding:5px 20px}.referrers-panel[_ngcontent-%COMP%]   .count[_ngcontent-%COMP%]{background-color:var(--be-accent-default);color:var(--be-accent-contrast);font-size:1.2rem;padding:5px 10px;border-radius:4px;margin-left:auto;line-height:10px}.referrers-panel[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:85%}.referrers-panel[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{text-decoration:underline}.locations-panel[_ngcontent-%COMP%]{max-width:700px}.locations-panel[_ngcontent-%COMP%]   .chart-body[_ngcontent-%COMP%]{display:flex;padding:0 15px}@media only screen and (max-width:768px){.locations-panel[_ngcontent-%COMP%]{height:auto;max-height:none}.locations-panel[_ngcontent-%COMP%]   .chart-body[_ngcontent-%COMP%]{display:block}.locations-panel[_ngcontent-%COMP%]   .country-list[_ngcontent-%COMP%]{padding:10px 0}}.locations-panel[_ngcontent-%COMP%]   .country-chart-placeholder[_ngcontent-%COMP%]{flex:1 1 auto;height:100%}.locations-panel[_ngcontent-%COMP%]   .country[_ngcontent-%COMP%]{padding:4px 0;white-space:nowrap;overflow:hidden;font-size:1.3rem}.locations-panel[_ngcontent-%COMP%]   .country-name[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle;max-width:150px;overflow:hidden;text-overflow:ellipsis}iframe[_ngcontent-%COMP%]{border:none;width:100%;height:100%}"],changeDetection:0}),t}()},69193:function(t,e,n){"use strict";n.d(e,{a:function(){return h}});var i=n(61116),o=n(20653),a=n(84369),r=n(77307),s=n(92762),c=n(68400),l=n(31041),u=n(99808),p=n(68692),g=n(35366),h=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=g.oAB({type:t}),t.\u0275inj=g.cJS({imports:[[i.ez,o.m,c.N,l.UX,u.p,p.X,a.ot,r.Ps,s.vV]]}),t}()},66445:function(t,n,o){"use strict";o.r(n),o.d(n,{DashboardModule:function(){return Nn}});var a=o(61116),r=o(63337),s=o(84698),c=o(25051),l=o(14926),u=o(35366),p=o(36501),h=o(88195),f=o(70549),m=o(95157),v=o(86655),b=o(97070),y=o(36024),_=o(4694),x=o(43835),k=o(72798),Z=o(24859),w=o(28505),A=o(73234),C=o(38116),T=o(77307),q=o(84369),I=o(40450);function O(t,e){1&t&&(u.TgZ(0,"span",12),u._uU(1,"Personal workspace"),u.qZA())}var U=function(t){return{count:t}};function P(t,e){if(1&t&&(u.TgZ(0,"span",12),u._uU(1),u.ALo(2,"trans"),u.qZA()),2&t){var n=u.oxw().ngIf;u.xp6(1),u.Oqu(u.xi3(2,1,":count members",u.VKq(4,U,(null==n?null:n.members_count)||0)))}}function M(t,e){if(1&t&&(u.TgZ(0,"div",5),u.TgZ(1,"div",6),u.TgZ(2,"div",7),u._uU(3),u.qZA(),u.TgZ(4,"div",8),u.YNc(5,O,2,0,"span",9),u.YNc(6,P,3,6,"span",9),u.qZA(),u.qZA(),u.TgZ(7,"div",10),u._UZ(8,"mat-icon",11),u.qZA(),u.qZA()),2&t){var n=e.ngIf;u.oxw();var i=u.MAs(3);u.Q6J("matMenuTriggerFor",i),u.xp6(3),u.Oqu(n.name),u.xp6(2),u.Q6J("ngIf",n.default),u.xp6(1),u.Q6J("ngIf",!n.default)}}function S(t,e){1&t&&(u.TgZ(0,"span",12),u._uU(1,"Personal workspace"),u.qZA())}function N(t,e){if(1&t&&(u.TgZ(0,"span",12),u._uU(1),u.ALo(2,"trans"),u.qZA()),2&t){var n=u.oxw().$implicit;u.xp6(1),u.Oqu(u.xi3(2,1,":count members",u.VKq(4,U,(null==n?null:n.members_count)||0)))}}function J(t,e){if(1&t){var n=u.EpF();u.TgZ(0,"button",17),u.NdJ("click",function(t){u.CHM(n);var e=u.oxw().$implicit;return u.oxw().openWorkspaceMembersModal(e),t.stopPropagation()}),u._UZ(1,"mat-icon",18),u.qZA()}}function E(t,e){if(1&t){var n=u.EpF();u.TgZ(0,"div",13),u.NdJ("click",function(){var t=u.CHM(n).$implicit;return u.oxw().selectWorkspace(t)}),u.ALo(1,"async"),u._UZ(2,"mat-icon",14),u.ALo(3,"async"),u.TgZ(4,"div"),u.TgZ(5,"div",15),u._uU(6),u.qZA(),u.TgZ(7,"div",8),u.YNc(8,S,2,0,"span",9),u.YNc(9,N,3,6,"span",9),u.qZA(),u.qZA(),u.YNc(10,J,2,0,"button",16),u.qZA()}if(2&t){var i=e.$implicit,o=u.oxw();u.ekj("active",u.lcZ(1,8,o.workspaces.activeId$)===i.id),u.xp6(2),u.ekj("visually-hidden",u.lcZ(3,10,o.workspaces.activeId$)!==i.id),u.xp6(4),u.Oqu(i.name),u.xp6(2),u.Q6J("ngIf",i.default),u.xp6(1),u.Q6J("ngIf",!i.default),u.xp6(1),u.Q6J("ngIf",!i.default)}}function L(t,e){if(1&t){var n=u.EpF();u.TgZ(0,"div",19),u.NdJ("click",function(){return u.CHM(n),u.oxw().openCrupdateWorkspaceModal()}),u._UZ(1,"mat-icon",20),u.TgZ(2,"span",12),u._uU(3,"Create new workspace"),u.qZA(),u.qZA()}}var D=function(){var t=function(){function t(e,n,i,o,a,r){d(this,t),this.modal=e,this.workspaces=n,this.currentUser=i,this.toast=o,this.vcr=a,this.cd=r}return g(t,[{key:"ngOnInit",value:function(){this.workspaces.indexUserWorkspaces().subscribe()}},{key:"openCrupdateWorkspaceModal",value:function(t){var e=this;Promise.resolve().then(o.bind(o,75428)).then(function(n){e.modal.open(n.WorkspaceModule.components.crupdateModal,{workspace:t},{viewContainerRef:e.vcr}),e.cd.markForCheck()})}},{key:"openWorkspaceMembersModal",value:function(t){var e=this;Promise.resolve().then(o.bind(o,75428)).then(function(n){e.modal.open(n.WorkspaceModule.components.manageMembers,{workspace:t},{viewContainerRef:e.vcr}),e.cd.markForCheck(),e.menuTrigger.closeMenu()})}},{key:"maybeDeleteWorkspace",value:function(t){var e=this,n=Object.assign(Object.assign({},k.M),{replacements:{resource:"workspace"}});this.modal.open(_.z,n).afterClosed().pipe((0,x.h)(function(t){return t})).subscribe(function(){e.workspaces.delete([t.id]).subscribe(function(){e.toast.open("Workspace deleted.")},function(t){e.toast.open(t.message||y.v.Default)})})}},{key:"selectWorkspace",value:function(t){this.workspaces.select(t.id),this.menuTrigger.closeMenu()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.Y36(Z.u),u.Y36(m.b),u.Y36(w.I),u.Y36(A.F),u.Y36(u.s_b),u.Y36(u.sBO))},t.\u0275cmp=u.Xpm({type:t,selectors:[["workspace-selector"]],viewQuery:function(t,e){var n;(1&t&&u.Gf(b.p6,5),2&t)&&(u.iGM(n=u.CRH())&&(e.menuTrigger=n.first))},decls:7,vars:7,consts:[[3,"matMenuTriggerFor",4,"ngIf"],[1,"workspace-menu"],["workspaceMenu","matMenu"],["mat-menu-item","","class","workspace-menu-item",3,"active","click",4,"ngFor","ngForOf"],["mat-menu-item","","class","new-workspace-menu-item",3,"click",4,"ngIf"],[3,"matMenuTriggerFor"],[1,"left"],["trans","",1,"role-name"],[1,"member-count"],["trans","",4,"ngIf"],[1,"right"],["svgIcon","unfold-more"],["trans",""],["mat-menu-item","",1,"workspace-menu-item",3,"click"],["svgIcon","check"],["trans","",1,"name"],["type","button","class","settings-button","mat-icon-button","",3,"click",4,"ngIf"],["type","button","mat-icon-button","",1,"settings-button",3,"click"],["svgIcon","settings"],["mat-menu-item","",1,"new-workspace-menu-item",3,"click"],["svgIcon","add"]],template:function(t,e){1&t&&(u.YNc(0,M,9,4,"div",0),u.ALo(1,"async"),u.TgZ(2,"mat-menu",1,2),u.YNc(4,E,11,12,"div",3),u.ALo(5,"async"),u.YNc(6,L,4,0,"div",4),u.qZA()),2&t&&(u.Q6J("ngIf",u.lcZ(1,3,e.workspaces.activeWorkspace$)),u.xp6(4),u.Q6J("ngForOf",u.lcZ(5,5,e.workspaces.available$)),u.xp6(2),u.Q6J("ngIf",e.currentUser.hasPermission("workspaces.create")))},directives:[a.O5,b.VK,a.sg,b.p6,C.P,T.Hw,b.OP,q.lW],pipes:[a.Ov,I.R],styles:[".mat-menu-trigger[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;height:100%}.right[_ngcontent-%COMP%]{margin-left:auto;flex-shrink:0}.role-name[_ngcontent-%COMP%]{font-weight:500;text-transform:capitalize}.workspace-menu-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:normal;min-width:248px;line-height:normal;height:52px}.workspace-menu-item.active[_ngcontent-%COMP%]{color:var(--be-accent-default)}.workspace-menu-item.active[_ngcontent-%COMP%]   .member-count[_ngcontent-%COMP%]{color:inherit}.workspace-menu-item[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{flex-shrink:0;color:inherit}.workspace-menu-item[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{margin-right:10px;flex:1 1 auto;font-size:1.5rem;text-transform:capitalize}.new-workspace-menu-item[_ngcontent-%COMP%]{border-top:1px solid var(--be-divider-default);margin-top:8px;padding-top:4px;font-size:1.5rem}.member-count[_ngcontent-%COMP%]{color:var(--be-secondary-text);font-size:1.3rem}.settings-button[_ngcontent-%COMP%]{margin-left:auto;color:var(--be-secondary-text);width:30px;height:30px;line-height:30px}.settings-button[_ngcontent-%COMP%]:hover{color:var(--be-accent-default)}.settings-button[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;line-height:18px;margin-right:0}"],changeDetection:0}),t}(),R=o(35944),Y=o(2406);function F(t,e){if(1&t&&(u.TgZ(0,"li"),u._uU(1),u.ALo(2,"number"),u.ALo(3,"trans"),u.ALo(4,"trans"),u.ALo(5,"trans"),u.qZA()),2&t){var n=u.oxw().ngIf;u.xp6(1),u.Oqu(u.lcZ(2,1,n.links.used)+" "+u.lcZ(3,3,"out of")+" "+(n.links.total||u.lcZ(4,5,"Unlimited"))+" "+u.lcZ(5,7,"Links"))}}function Q(t,e){if(1&t&&(u.TgZ(0,"li"),u._uU(1),u.ALo(2,"number"),u.ALo(3,"trans"),u.ALo(4,"trans"),u.ALo(5,"trans"),u.qZA()),2&t){var n=u.oxw().ngIf;u.xp6(1),u.Oqu(u.lcZ(2,1,n.biolinks.used)+" "+u.lcZ(3,3,"out of")+" "+(n.biolinks.total||u.lcZ(4,5,"Unlimited"))+" "+u.lcZ(5,7,"Biolinks"))}}function $(t,e){if(1&t&&(u.TgZ(0,"li"),u._uU(1),u.ALo(2,"number"),u.ALo(3,"trans"),u.ALo(4,"trans"),u.ALo(5,"trans"),u.qZA()),2&t){var n=u.oxw().ngIf;u.xp6(1),u.Oqu(u.lcZ(2,1,n.link_clicks.used)+" "+u.lcZ(3,3,"out of")+" "+(n.link_clicks.total||u.lcZ(4,5,"Unlimited"))+" "+u.lcZ(5,7,"Visitors"))}}function B(t,e){if(1&t&&(u.TgZ(0,"li"),u._uU(1),u.ALo(2,"trans"),u.ALo(3,"trans"),u.ALo(4,"trans"),u.qZA()),2&t){var n=u.oxw().ngIf;u.xp6(1),u.Oqu(n.link_overlays.used+" "+u.lcZ(2,1,"out of")+" "+(n.link_overlays.total||u.lcZ(3,3,"Unlimited"))+" "+u.lcZ(4,5,"Link Overlays"))}}function H(t,e){if(1&t&&(u.TgZ(0,"li"),u._uU(1),u.ALo(2,"trans"),u.ALo(3,"trans"),u.ALo(4,"trans"),u.qZA()),2&t){var n=u.oxw().ngIf;u.xp6(1),u.Oqu(n.custom_pages.used+" "+u.lcZ(2,1,"out of")+" "+(n.custom_pages.total||u.lcZ(3,3,"Unlimited"))+" "+u.lcZ(4,5,"Custom Link Pages"))}}function V(t,e){if(1&t&&(u.TgZ(0,"li"),u._uU(1),u.ALo(2,"trans"),u.ALo(3,"trans"),u.ALo(4,"trans"),u.qZA()),2&t){var n=u.oxw().ngIf;u.xp6(1),u.Oqu(n.custom_domains.used+" "+u.lcZ(2,1,"out of")+" "+(n.custom_domains.total||u.lcZ(3,3,"Unlimited"))+" "+u.lcZ(4,5,"Custom Domains"))}}function z(t,e){if(1&t&&(u.TgZ(0,"li"),u._uU(1),u.ALo(2,"number"),u.ALo(3,"trans"),u.ALo(4,"trans"),u.ALo(5,"trans"),u.qZA()),2&t){var n=u.oxw().ngIf;u.xp6(1),u.Oqu(u.lcZ(2,1,n.link_groups.used)+" "+u.lcZ(3,3,"out of")+" "+(n.link_groups.total||u.lcZ(4,5,"Unlimited"))+" "+u.lcZ(5,7,"Link Groups"))}}function G(t,e){if(1&t&&(u.TgZ(0,"li"),u._uU(1),u.ALo(2,"trans"),u.ALo(3,"trans"),u.ALo(4,"trans"),u.qZA()),2&t){var n=u.oxw().ngIf;u.xp6(1),u.Oqu(n.tracking_pixels.used+" "+u.lcZ(2,1,"out of")+" "+(n.tracking_pixels.total||u.lcZ(3,3,"Unlimited"))+" "+u.lcZ(4,5,"Tracking Pixels"))}}function j(t,e){if(1&t&&(u.TgZ(0,"ul",4),u.YNc(1,F,6,9,"li",5),u.YNc(2,Q,6,9,"li",5),u.YNc(3,$,6,9,"li",5),u.YNc(4,B,5,7,"li",5),u.YNc(5,H,5,7,"li",5),u.YNc(6,V,5,7,"li",5),u.YNc(7,z,6,9,"li",5),u.YNc(8,G,5,7,"li",5),u.qZA()),2&t){var n=e.ngIf;u.xp6(1),u.Q6J("ngIf",n.links.create),u.xp6(1),u.Q6J("ngIf",n.biolinks.create),u.xp6(1),u.Q6J("ngIf",n.link_clicks.create),u.xp6(1),u.Q6J("ngIf",n.link_overlays.create),u.xp6(1),u.Q6J("ngIf",n.custom_pages.create),u.xp6(1),u.Q6J("ngIf",n.custom_domains.create),u.xp6(1),u.Q6J("ngIf",n.link_groups.create),u.xp6(1),u.Q6J("ngIf",n.tracking_pixels.create)}}var X=function(){var t=function t(e,n){d(this,t),this.linkUsage=e,this.currentUser=n};return t.\u0275fac=function(e){return new(e||t)(u.Y36(p.F),u.Y36(w.I))},t.\u0275cmp=u.Xpm({type:t,selectors:[["link-usage-info"]],decls:12,vars:15,consts:[[1,"header"],[1,"current-plan"],[1,"next-payment"],["class","unstyled-list",4,"ngIf"],[1,"unstyled-list"],[4,"ngIf"]],template:function(t,e){var n,i;(1&t&&(u.TgZ(0,"div",0),u.TgZ(1,"div",1),u._uU(2),u.ALo(3,"trans"),u.ALo(4,"trans"),u.qZA(),u.TgZ(5,"div",2),u._uU(6),u.ALo(7,"trans"),u.ALo(8,"formattedDate"),u.ALo(9,"trans"),u.qZA(),u.qZA(),u.YNc(10,j,9,8,"ul",3),u.ALo(11,"async")),2&t)&&(u.xp6(2),u.hij(" ",u.lcZ(3,3,"Current Plan")+": "+((null==(n=e.currentUser.getSubscription())||null==n.plan?null:n.plan.name)||u.lcZ(4,5,"Free"))," "),u.xp6(4),u.hij(" ",u.lcZ(7,7,"Next Payment")+": "+(u.lcZ(8,9,null==(i=e.currentUser.getSubscription())?null:i.renews_at)||u.lcZ(9,11,"Never"))," "),u.xp6(4),u.Q6J("ngIf",u.lcZ(11,13,e.linkUsage.response$).usage))},directives:[a.O5],pipes:[I.R,Y.l,a.Ov,a.JJ],styles:["[_nghost-%COMP%]{display:block;background-color:var(--be-background);box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12);border-radius:4px;padding:15px}.header[_ngcontent-%COMP%]{margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid var(--be-divider-lighter)}.current-plan[_ngcontent-%COMP%]{font-weight:500;font-size:1.5rem}.next-payment[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--be-secondary-text)}li[_ngcontent-%COMP%]{padding:5px 0;font-size:1.5rem}"],changeDetection:0}),t}(),W=o(72674),K=o(98979),tt=o(27701),et=["infoIcon"],nt=function(t,e){return{number:t,total:e}};function it(t,e){if(1&t){var n=u.EpF();u.ynx(0),u._UZ(1,"mat-progress-bar",6),u.TgZ(2,"div",7),u.TgZ(3,"div",8),u.ALo(4,"number"),u.ALo(5,"trans"),u.ALo(6,"number"),u._uU(7," :number of :total links created "),u.qZA(),u.TgZ(8,"mat-icon",9,10),u.NdJ("click",function(){return u.CHM(n),u.oxw(3).togglePopover()})("mouseenter",function(){return u.CHM(n),u.oxw(3).openPopover()})("mouseleave",function(){return u.CHM(n),u.oxw(3).closePopover()}),u.qZA(),u.qZA(),u.BQk()}if(2&t){var i=u.oxw().ngIf;u.xp6(1),u.Q6J("value",i.usage.links.used/i.usage.links.total*100),u.xp6(2),u.Q6J("transValues",u.WLB(8,nt,u.lcZ(4,2,i.usage.links.used),u.lcZ(5,4,u.lcZ(6,6,i.usage.links.total)||"Unlimited")))}}function ot(t,e){1&t&&(u.TgZ(0,"a",11),u._uU(1,"Upgrade Account"),u.qZA())}function at(t,e){1&t&&(u.TgZ(0,"a",12),u._uU(1,"Upgrade"),u.qZA())}function rt(t,e){if(1&t&&(u.TgZ(0,"div",2),u.YNc(1,it,10,11,"ng-container",0),u.TgZ(2,"div",3),u.YNc(3,ot,2,0,"a",4),u.YNc(4,at,2,0,"a",5),u.qZA(),u.qZA()),2&t){var n=e.ngIf,i=u.oxw(2);u.xp6(1),u.Q6J("ngIf",n.usage.links),u.xp6(2),u.Q6J("ngIf",!i.compact),u.xp6(1),u.Q6J("ngIf",i.compact)}}function st(t,e){if(1&t&&(u.ynx(0),u.YNc(1,rt,5,3,"div",1),u.ALo(2,"async"),u.BQk()),2&t){var n=u.oxw();u.xp6(1),u.Q6J("ngIf",u.lcZ(2,1,n.linkUsage.response$))}}var ct=function(){var t=function(){function t(e,n,i,o){d(this,t),this.settings=e,this.linkUsage=n,this.currentUser=i,this.overlay=o,this.compact=!1}return g(t,[{key:"ngOnInit",value:function(){this.linkUsage.reload()}},{key:"openPopover",value:function(){this.overlayRef&&this.closePopover(),Object.assign({},W.Z)[0].offsetY=-15,this.overlayRef=this.overlay.open(X,{origin:this.infoIcon,position:W.Z,hasBackdrop:!1})}},{key:"closePopover",value:function(){this.overlayRef&&this.overlayRef.close(),this.overlayRef=null}},{key:"togglePopover",value:function(){this.overlayRef?this.closePopover():this.openPopover()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.Y36(h.Z),u.Y36(p.F),u.Y36(w.I),u.Y36(K.T))},t.\u0275cmp=u.Xpm({type:t,selectors:[["upgrade-panel"]],viewQuery:function(t,e){var n;(1&t&&u.Gf(et,5,u.SBq),2&t)&&(u.iGM(n=u.CRH())&&(e.infoIcon=n.first))},hostVars:2,hostBindings:function(t,e){2&t&&u.ekj("compact",e.compact)},inputs:{compact:"compact"},decls:1,vars:1,consts:[[4,"ngIf"],["class","upgrade-panel",4,"ngIf"],[1,"upgrade-panel"],[1,"upgrade-link-container"],["routerLink","/billing/upgrade","target","_blank","trans","",4,"ngIf"],["routerLink","/billing/upgrade","class","compact-link","target","_blank","trans","",4,"ngIf"],["mode","determinate","color","accent",3,"value"],[1,"usage-info"],["trans","",1,"text",3,"transValues"],["svgIcon","info",1,"info-icon",3,"click","mouseenter","mouseleave"],["infoIcon",""],["routerLink","/billing/upgrade","target","_blank","trans",""],["routerLink","/billing/upgrade","target","_blank","trans","",1,"compact-link"]],template:function(t,e){1&t&&u.YNc(0,st,3,3,"ng-container",0),2&t&&u.Q6J("ngIf",e.settings.get("billing.enable"))},directives:[a.O5,tt.pW,C.P,T.Hw,r.yS],pipes:[a.Ov,a.JJ,I.R],styles:["[_nghost-%COMP%]{margin-top:auto;padding:15px 15px 0}.usage-info[_ngcontent-%COMP%]{display:flex;align-items:center;margin:5px 0;font-size:1.3rem;color:var(--be-secondary-text)}.usage-info[_ngcontent-%COMP%]   .info-icon[_ngcontent-%COMP%]{margin-left:auto;flex-shrink:0;width:18px;height:18px}.usage-info[_ngcontent-%COMP%]   .info-icon[_ngcontent-%COMP%]:hover{color:var(--be-primary-default)}.compact[_nghost-%COMP%], .compact   [_nghost-%COMP%]{padding:15px 5px 0}.compact[_nghost-%COMP%]   .mat-progress-bar[_ngcontent-%COMP%], .compact   [_nghost-%COMP%]   .mat-progress-bar[_ngcontent-%COMP%]{display:none}.compact[_nghost-%COMP%]   .text[_ngcontent-%COMP%], .compact   [_nghost-%COMP%]   .text[_ngcontent-%COMP%]{display:none}.compact[_nghost-%COMP%]   .info-icon[_ngcontent-%COMP%], .compact   [_nghost-%COMP%]   .info-icon[_ngcontent-%COMP%]{margin-right:auto}.compact[_nghost-%COMP%]   .link-container[_ngcontent-%COMP%], .compact   [_nghost-%COMP%]   .link-container[_ngcontent-%COMP%]{text-align:center;font-size:1.3rem}"],changeDetection:0}),t}(),lt=o(60467),ut=o(30307);function dt(t,e){1&t&&u._UZ(0,"app-footer")}var pt=function(){var t=function(){function t(e,n,i,o){d(this,t),this.linkUsage=e,this.settings=n,this.notifications=i,this.workspaces=o,this.subscriptions=[]}return g(t,[{key:"ngOnInit",value:function(){this.bindToNotificationClick(),this.bindToWorkspaceChange()}},{key:"ngOnDestroy",value:function(){this.subscriptions.forEach(function(t){return t.unsubscribe()}),this.subscriptions=[]}},{key:"onPageChange",value:function(t){this.activePage=t}},{key:"bindToWorkspaceChange",value:function(){var t=this,e=this.workspaces.activeId$.pipe((0,s.T)(1)).subscribe(function(){var e;null===(e=t.activePage.datatable)||void 0===e||e.reset(),t.linkUsage.reload()});this.subscriptions.push(e)}},{key:"bindToNotificationClick",value:function(){var t=this.workspaces.bindToNotificationClick();this.subscriptions.push(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.Y36(p.F),u.Y36(h.Z),u.Y36(f.g),u.Y36(m.b))},t.\u0275cmp=u.Xpm({type:t,selectors:[["dashboard-host"]],viewQuery:function(t,e){var n;(1&t&&u.Gf(l._,7),2&t)&&(u.iGM(n=u.CRH())&&(e.sidenav=n.first))},features:[u._Bn([c.l])],decls:13,vars:9,consts:[["menuPosition","dashboard-navbar",3,"showToggleButton","toggleButtonClick"],["position","dashboard-sidebar",1,"vertical",3,"vertical","compact"],[3,"compact"],["slot","ads.dashboard.top"],[1,"dashboard-page"],[3,"activate"],[4,"ngIf"]],template:function(t,e){1&t&&(u.TgZ(0,"material-navbar",0),u.NdJ("toggleButtonClick",function(){return e.sidenav.toggleSidebarMode()}),u._UZ(1,"workspace-selector"),u.qZA(),u.TgZ(2,"sidenav"),u.TgZ(3,"nav"),u._UZ(4,"custom-menu",1),u.ALo(5,"async"),u._UZ(6,"upgrade-panel",2),u.ALo(7,"async"),u.qZA(),u.TgZ(8,"main"),u._UZ(9,"ad-host",3),u.TgZ(10,"div",4),u.TgZ(11,"router-outlet",5),u.NdJ("activate",function(t){return e.onPageChange(t)}),u.qZA(),u.qZA(),u.YNc(12,dt,1,0,"app-footer",6),u.qZA(),u.qZA()),2&t&&(u.Q6J("showToggleButton",!0),u.xp6(4),u.Q6J("vertical",!0)("compact",u.lcZ(5,5,e.sidenav.isCompact$)),u.xp6(2),u.Q6J("compact",u.lcZ(7,7,e.sidenav.isCompact$)),u.xp6(6),u.Q6J("ngIf",e.settings.get("links.dash_footer")))},directives:[v.e,D,l._,R.K,ct,lt.i,r.lC,a.O5,ut.q],pipes:[a.Ov],styles:["material-navbar[_ngcontent-%COMP%]{position:fixed;top:0;left:0;z-index:2}workspace-selector[_ngcontent-%COMP%]{min-width:200px;height:100%;margin-left:5px;margin-right:auto;border-left:1px solid hsla(0,0%,100%,.12);border-right:1px solid hsla(0,0%,100%,.12);padding:0 15px}workspace-selector[_ngcontent-%COMP%]     .member-count{color:hsla(0,0%,100%,.7)}@media only screen and (max-width:768px){workspace-selector[_ngcontent-%COMP%]{display:none}}@media only screen and (min-width:768px){material-navbar[_ngcontent-%COMP%]     .right-side-actions{margin-left:0}}.ads-dashboard-top-host[_ngcontent-%COMP%]{margin-bottom:25px}.dashboard-page[_ngcontent-%COMP%]{flex:1 1 auto;padding:25px}@media only screen and (max-width:768px){.dashboard-page[_ngcontent-%COMP%]{padding:15px}}app-footer[_ngcontent-%COMP%]{background-color:var(--be-background);padding:30px;border-top:1px solid var(--be-divider-default)}"],changeDetection:0}),t}(),gt=o(32656),ht=o(4886),ft=o(92890),mt=o(47727),vt=o(73982),bt=o(34056),yt=o(40878),_t=o(68515),xt=o(84222),kt=function(){var t=function(){function t(e,n,i){d(this,t),this.router=e,this.http=n,this.link=i}return g(t,[{key:"resolve",value:function(t,e){var n=this;return this.link.getCurrentUserReports().pipe((0,mt.K)(function(){return n.router.navigate(["/dashboard"]),bt.E}),(0,vt.zg)(function(t){return t?(0,yt.of)(t.analytics):(n.router.navigate(["/dashboard"]),bt.E)}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.LFG(r.F0),u.LFG(_t.r),u.LFG(xt.M))},t.\u0275prov=u.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}(),Zt=o(78512),wt=o(93836),At=function(){var t=function(){function t(e,n,i){d(this,t),this.route=e,this.workspaces=n,this.links=i,this.reports$=new Zt.X(null)}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.route.data.subscribe(function(e){t.reports$.next(e.reports)}),this.workspaceSub=this.workspaces.activeId$.pipe((0,s.T)(1)).subscribe(function(){t.links.getCurrentUserReports().subscribe(function(e){t.reports$.next(e.analytics)})})}},{key:"ngOnDestroy",value:function(){this.workspaceSub.unsubscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.Y36(r.gz),u.Y36(m.b),u.Y36(xt.M))},t.\u0275cmp=u.Xpm({type:t,selectors:[["dashboard-home"]],decls:2,vars:3,consts:[[3,"reports"]],template:function(t,e){1&t&&(u._UZ(0,"click-charts",0),u.ALo(1,"async")),2&t&&u.Q6J("reports",u.lcZ(1,1,e.reports$))},directives:[wt.z],pipes:[a.Ov],styles:[""],changeDetection:0}),t}(),Ct=o(45905),Tt=o(80773),qt=o(75950),It=o(45362),Ot=o(99208),Ut=o(71453),Pt=o(56515),Mt=o(14732),St=o(83381),Nt=o(48865),Jt=o(34955),Et=o(56361),Lt=o(13536),Dt=o(80922),Rt=o(86668),Yt=o(54275),Ft=o(24311),Qt=o(71765),$t=o(47210),Bt=o(40985);function Ht(t,e){1&t&&u._UZ(0,"mat-progress-bar",18)}function Vt(t,e){1&t&&(u.TgZ(0,"th",19),u._uU(1,"Owner"),u.qZA())}var zt=function(t){return{count:t,resource:"domain(s)"}};function Gt(t,e){if(1&t){var n=u.EpF();u.TgZ(0,"tr"),u.TgZ(1,"th",20),u.TgZ(2,"div",21),u._uU(3," :count :resource selected: "),u.qZA(),u.TgZ(4,"div",22),u.TgZ(5,"permission-aware-button",23),u.TgZ(6,"button",24),u.NdJ("click",function(){return u.CHM(n),u.oxw().maybeDeleteSelectedDomains()}),u._uU(7," Delete "),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.qZA()}if(2&t){var i=e.ngIf;u.xp6(2),u.Q6J("transValues",u.VKq(1,zt,i))}}function jt(t,e){if(1&t&&(u.TgZ(0,"td",37),u._UZ(1,"user-column",38),u.qZA()),2&t){var n=u.oxw().$implicit;u.xp6(1),u.Q6J("user",n.user)}}function Xt(t,e){if(1&t){var n=u.EpF();u.TgZ(0,"tr"),u._UZ(1,"td",25),u.TgZ(2,"td",26),u._UZ(3,"img",27),u.ALo(4,"favicon"),u.TgZ(5,"span"),u._uU(6),u.qZA(),u.qZA(),u.YNc(7,jt,2,1,"td",28),u.TgZ(8,"td",29),u._uU(9),u.ALo(10,"formattedDate"),u.qZA(),u.TgZ(11,"td",30),u.TgZ(12,"permission-aware-button",31),u.TgZ(13,"button",32),u.NdJ("click",function(){var t=u.CHM(n).$implicit;return u.oxw().showCrupdateDomainModal(t)}),u.ALo(14,"trans"),u._UZ(15,"mat-icon",33),u.qZA(),u.qZA(),u.TgZ(16,"permission-aware-button",34),u.TgZ(17,"button",35),u.NdJ("click",function(){var t=u.CHM(n).$implicit;return u.oxw().maybeDeleteSelectedDomains([t.id])}),u._UZ(18,"mat-icon",36),u.qZA(),u.qZA(),u.qZA(),u.qZA()}if(2&t){var i=e.$implicit,o=u.oxw();u.xp6(1),u.Q6J("table-body-checkbox",i.id),u.xp6(2),u.Q6J("src",u.lcZ(4,7,i.host),u.LSH),u.xp6(3),u.Oqu(i.host),u.xp6(1),u.Q6J("ngIf",o.showUserColumn()),u.xp6(2),u.Oqu(u.lcZ(10,9,i.updated_at)),u.xp6(3),u.Q6J("userOwnsResource",o.currentUser.get("id")===i.user_id),u.xp6(1),u.Q6J("matTooltip",u.lcZ(14,11,"Edit domain"))}}function Wt(t,e){1&t&&(u.TgZ(0,"no-results-message",39),u.TgZ(1,"span",40),u._uU(2,"No custom domains have been added yet"),u.qZA(),u.qZA())}var Kt=function(){var t=function(t){e(o,t);var n=i(o);function o(t,e,i,a,r,s,c,l){var u;return d(this,o),(u=n.call(this,t,e,i,a,r)).datatable=t,u.currentUser=e,u.customDomains=i,u.toast=a,u.router=r,u.route=s,u.workspaces=c,u.activeSection=l,u}return g(o,[{key:"ngOnInit",value:function(){var t=this;this.workspaceSub=this.workspaces.activeId$.subscribe(function(){t.setFilters()}),this.datatable.init({uri:Mt.c.BASE_URI,staticParams:{userId:this.showUserColumn()?null:this.currentUser.get("id")}})}},{key:"ngOnDestroy",value:function(){this.workspaceSub.unsubscribe()}},{key:"showUserColumn",value:function(){return this.activeSection.admin||!!this.workspaces.activeId$.value}},{key:"setFilters",value:function(){var t=this;this.filters=St.r.filter(function(e){return("user_id"!==e.key||t.showUserColumn())&&"global"!==e.key})}}]),o}(Ut.T);return t.\u0275fac=function(e){return new(e||t)(u.Y36(Pt.x),u.Y36(w.I),u.Y36(Mt.c),u.Y36(A.F),u.Y36(r.F0),u.Y36(r.gz),u.Y36(m.b),u.Y36(Nt.W))},t.\u0275cmp=u.Xpm({type:t,selectors:[["link-domain"]],features:[u._Bn([Pt.x]),u.qOj],decls:31,vars:12,consts:[[1,"datatable-page-header"],["trans",""],[1,"header"],["pluralName","domains",3,"filters"],[1,"action-buttons"],["permission","custom_domains.create"],["mat-raised-button","","color","accent",1,"button-with-icon",3,"click"],["svgIcon","add"],[1,"datatable","responsive-table"],["class","loading-bar","mode","indeterminate","color","accent",4,"ngIf"],[1,"material-table"],["table-header-checkbox",""],["table-sort-header","","trans",""],["table-sort-header","user_id","trans","",4,"ngIf"],["table-sort-header","updated_at","trans",""],[4,"ngIf"],[4,"ngFor","ngForOf"],["svgImage","custom-domain.svg",4,"ngIf"],["mode","indeterminate","color","accent",1,"loading-bar"],["table-sort-header","user_id","trans",""],["colspan","5"],["trans","",1,"bulk-actions-title",3,"transValues"],[1,"bulk-actions"],["permission","custom_domains.delete"],["type","button","mat-raised-button","","color","warn","trans","",3,"click"],[3,"table-body-checkbox"],["data-label","Host"],["alt","",1,"favicon-img",3,"src"],["data-label","Owner",4,"ngIf"],["data-label","Updated At"],[1,"edit-column"],["permission","custom_domains.update",3,"userOwnsResource"],["mat-icon-button","",3,"matTooltip","click"],["svgIcon","edit"],["permission","custom_domains.delete",1,"visible-on-mobile"],["type","button","mat-icon-button","","trans","",3,"click"],["svgIcon","delete"],["data-label","Owner"],[3,"user"],["svgImage","custom-domain.svg"],["primary-text","","trans",""]],template:function(t,e){1&t&&(u.TgZ(0,"div",0),u.TgZ(1,"h1",1),u._uU(2,"Custom Domains"),u.qZA(),u.TgZ(3,"div",2),u._UZ(4,"datatable-filters",3),u.TgZ(5,"div",4),u.TgZ(6,"permission-aware-button",5),u.TgZ(7,"button",6),u.NdJ("click",function(){return e.showCrupdateDomainModal()}),u._UZ(8,"mat-icon",7),u.TgZ(9,"span",1),u._uU(10,"Connect New Domain"),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.TgZ(11,"div",8),u.YNc(12,Ht,1,0,"mat-progress-bar",9),u.ALo(13,"async"),u.TgZ(14,"table",10),u.TgZ(15,"thead"),u.TgZ(16,"tr"),u._UZ(17,"th",11),u.TgZ(18,"th",12),u._uU(19,"Host"),u.qZA(),u.YNc(20,Vt,2,0,"th",13),u.TgZ(21,"th",14),u._uU(22,"Last Updated"),u.qZA(),u._UZ(23,"th"),u.qZA(),u.YNc(24,Gt,8,3,"tr",15),u.qZA(),u.TgZ(25,"tbody"),u.YNc(26,Xt,19,13,"tr",16),u.ALo(27,"async"),u.qZA(),u.qZA(),u.YNc(28,Wt,3,0,"no-results-message",17),u.ALo(29,"async"),u._UZ(30,"datatable-footer"),u.qZA()),2&t&&(u.xp6(4),u.Q6J("filters",e.filters),u.xp6(8),u.Q6J("ngIf",u.lcZ(13,6,e.datatable.paginator&&e.datatable.paginator.loading$)),u.xp6(8),u.Q6J("ngIf",e.showUserColumn()),u.xp6(4),u.Q6J("ngIf",e.datatable.selectedRows$.value.length),u.xp6(2),u.Q6J("ngForOf",u.lcZ(27,8,e.domains$)),u.xp6(2),u.Q6J("ngIf",u.lcZ(29,10,e.datatable.paginator.noResults$)))},directives:[C.P,Jt.h,Et.v,q.lW,T.Hw,a.O5,Lt.e,Dt.p,a.sg,Rt.V,tt.pW,Yt.O,Ft.gM,Qt.r,$t.U],pipes:[a.Ov,Bt.K,Y.l,I.R],styles:[".favicon-img[_ngcontent-%COMP%]{display:inline-block;margin-right:5px;vertical-align:middle;flex-shrink:0}"],changeDetection:0}),t}(),te=o(34384),ee=o(8889),ne=o(98034),ie=o(4954),oe=o(38053);function ae(t,e){1&t&&u._UZ(0,"mat-progress-bar",19)}function re(t,e){1&t&&(u.TgZ(0,"th",12),u._uU(1,"Owner"),u.qZA())}function se(t,e){1&t&&(u.TgZ(0,"th",20),u._uU(1,"Type"),u.qZA())}var ce=function(t){return{count:t,resource:"page(s)"}};function le(t,e){if(1&t){var n=u.EpF();u.TgZ(0,"tr"),u.TgZ(1,"th",21),u.TgZ(2,"div",22),u._uU(3," :count :resource selected: "),u.qZA(),u.TgZ(4,"div",23),u.TgZ(5,"button",24),u.NdJ("click",function(){return u.CHM(n),u.oxw().maybeDeleteSelectedPages()}),u._uU(6," Delete "),u.qZA(),u.qZA(),u.qZA(),u.qZA()}if(2&t){var i=e.ngIf;u.xp6(2),u.Q6J("transValues",u.VKq(1,ce,i))}}function ue(t,e){if(1&t&&(u.TgZ(0,"td",39),u._UZ(1,"user-column",40),u.qZA()),2&t){var n=u.oxw().$implicit;u.xp6(1),u.Q6J("user",n.user)}}function de(t,e){if(1&t&&(u.TgZ(0,"td",41),u._uU(1),u.qZA()),2&t){var n=u.oxw().$implicit,i=u.oxw();u.xp6(1),u.hij(" ",n.type?i.viewName(n.type):"default"," ")}}var pe=function(t){return[t,"edit"]};function ge(t,e){if(1&t){var n=u.EpF();u.TgZ(0,"tr"),u._UZ(1,"td",25),u.TgZ(2,"td",26),u.TgZ(3,"a",27),u._uU(4),u.qZA(),u.qZA(),u.YNc(5,ue,2,1,"td",28),u.TgZ(6,"td",29),u._uU(7),u.qZA(),u.YNc(8,de,2,1,"td",30),u.TgZ(9,"td",31),u._uU(10),u.ALo(11,"formattedDate"),u.qZA(),u.TgZ(12,"td",32),u.TgZ(13,"permission-aware-button",33),u.TgZ(14,"button",34),u.ALo(15,"trans"),u._UZ(16,"mat-icon",35),u.qZA(),u.qZA(),u.TgZ(17,"permission-aware-button",36),u.TgZ(18,"button",37),u.NdJ("click",function(){var t=u.CHM(n).$implicit;return u.oxw().maybeDeleteSelectedPages([t.id])}),u._UZ(19,"mat-icon",38),u.qZA(),u.qZA(),u.qZA(),u.qZA()}if(2&t){var i=e.$implicit,o=u.oxw();u.xp6(1),u.Q6J("table-body-checkbox",i.id),u.xp6(2),u.Q6J("href",o.getPageUrl(i),u.LSH),u.xp6(1),u.Oqu(i.slug),u.xp6(1),u.Q6J("ngIf",o.showUserColumn()),u.xp6(2),u.Oqu(i.body),u.xp6(1),u.Q6J("ngIf",!o.endpoint),u.xp6(2),u.Oqu(u.lcZ(11,10,i.updated_at)),u.xp6(3),u.Q6J("userOwnsResource",i.user_id===o.currentUser.get("id")),u.xp6(1),u.Q6J("routerLink",u.VKq(14,pe,i.id))("matTooltip",u.lcZ(15,12,"Edit page"))}}function he(t,e){1&t&&(u.TgZ(0,"no-results-message",42),u.TgZ(1,"span",43),u._uU(2,"No pages have been created yet"),u.qZA(),u.qZA())}var fe=function(){var t=function(t){e(o,t);var n=i(o);function o(t,e,i,a,r,s,c,l,u){var p;return d(this,o),(p=n.call(this,t,e,i,a,r,s,c)).settings=t,p.datatable=e,p.currentUser=i,p.customPages=a,p.toast=r,p.router=s,p.route=c,p.workspaces=l,p.activeSection=u,p}return g(o,[{key:"ngOnInit",value:function(){var t=this;this.workspaceSub=this.workspaces.activeId$.subscribe(function(){t.setFilters()}),this.datatable.init({uri:"link-page",staticParams:{with:["user"],userId:this.showUserColumn()?null:this.currentUser.get("id")}})}},{key:"ngOnDestroy",value:function(){this.workspaceSub.unsubscribe()}},{key:"showUserColumn",value:function(){return this.activeSection.admin||!!this.workspaces.activeId$.value}},{key:"setFilters",value:function(){var t=this;this.filters=ie.I.filter(function(e){return"user_id"!==e.key||t.showUserColumn()})}}]),o}(ne.c);return t.\u0275fac=function(e){return new(e||t)(u.Y36(h.Z),u.Y36(Pt.x),u.Y36(w.I),u.Y36(oe.i),u.Y36(A.F),u.Y36(r.F0),u.Y36(r.gz),u.Y36(m.b),u.Y36(Nt.W))},t.\u0275cmp=u.Xpm({type:t,selectors:[["link-page-index"]],features:[u._Bn([Pt.x]),u.qOj],decls:35,vars:13,consts:[[1,"datatable-page-header"],["trans",""],[1,"header"],["pluralName","pages",3,"filters"],[1,"action-buttons"],["permission","custom_pages.create"],["mat-raised-button","","color","accent","routerLink","new",1,"button-with-icon"],["svgIcon","add"],[1,"datatable","responsive-table"],["class","loading-bar","mode","indeterminate","color","accent",4,"ngIf"],[1,"material-table"],["table-header-checkbox",""],["table-sort-header","","trans",""],["table-sort-header","","trans","",4,"ngIf"],["trans","",1,"body-column"],["class","type-column","table-sort-header","","trans","",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["svgImage","custom-page.svg",4,"ngIf"],["mode","indeterminate","color","accent",1,"loading-bar"],["table-sort-header","","trans","",1,"type-column"],["colspan","7"],["trans","",1,"bulk-actions-title",3,"transValues"],[1,"bulk-actions"],["type","button","mat-raised-button","","color","warn","trans","",3,"click"],[3,"table-body-checkbox"],["data-label","Slug"],["target","_blank",3,"href"],["data-label","Owner",4,"ngIf"],["data-label","Body",1,"body-column"],["data-label","Type","class","type-column",4,"ngIf"],["data-label","Last Updated"],[1,"edit-column"],["permission","custom_pages.update",3,"userOwnsResource"],["mat-icon-button","",3,"routerLink","matTooltip"],["svgIcon","edit"],["permission","custom_pages.delete",1,"visible-on-mobile"],["type","button","mat-icon-button","","trans","",3,"click"],["svgIcon","delete"],["data-label","Owner"],[3,"user"],["data-label","Type",1,"type-column"],["svgImage","custom-page.svg"],["primary-text","","trans",""]],template:function(t,e){1&t&&(u.TgZ(0,"div",0),u.TgZ(1,"h1",1),u.TgZ(2,"span",1),u._uU(3,"Link Pages"),u.qZA(),u.qZA(),u.TgZ(4,"div",2),u._UZ(5,"datatable-filters",3),u.TgZ(6,"div",4),u.TgZ(7,"permission-aware-button",5),u.TgZ(8,"button",6),u._UZ(9,"mat-icon",7),u.TgZ(10,"span",1),u._uU(11,"Add New Page"),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.TgZ(12,"div",8),u.YNc(13,ae,1,0,"mat-progress-bar",9),u.ALo(14,"async"),u.TgZ(15,"table",10),u.TgZ(16,"thead"),u.TgZ(17,"tr"),u._UZ(18,"th",11),u.TgZ(19,"th",12),u._uU(20,"Slug"),u.qZA(),u.YNc(21,re,2,0,"th",13),u.TgZ(22,"th",14),u._uU(23,"Body"),u.qZA(),u.YNc(24,se,2,0,"th",15),u.TgZ(25,"th",1),u._uU(26,"Last Updated"),u.qZA(),u._UZ(27,"th"),u.qZA(),u.YNc(28,le,7,3,"tr",16),u.qZA(),u.TgZ(29,"tbody"),u.YNc(30,ge,20,16,"tr",17),u.ALo(31,"async"),u.qZA(),u.qZA(),u.YNc(32,he,3,0,"no-results-message",18),u.ALo(33,"async"),u._UZ(34,"datatable-footer"),u.qZA()),2&t&&(u.xp6(5),u.Q6J("filters",e.filters),u.xp6(8),u.Q6J("ngIf",u.lcZ(14,7,e.datatable.paginator&&e.datatable.paginator.loading$)),u.xp6(8),u.Q6J("ngIf",e.showUserColumn()),u.xp6(3),u.Q6J("ngIf",!e.endpoint),u.xp6(4),u.Q6J("ngIf",e.datatable.selectedRows$.value.length),u.xp6(2),u.Q6J("ngForOf",u.lcZ(31,9,e.pages$)),u.xp6(2),u.Q6J("ngIf",u.lcZ(33,11,e.datatable.paginator.noResults$)))},directives:[C.P,Jt.h,Et.v,q.lW,r.rH,T.Hw,a.O5,Lt.e,Dt.p,a.sg,Rt.V,tt.pW,Yt.O,Ft.gM,Qt.r,$t.U],pipes:[a.Ov,Y.l,I.R],styles:[".body-column[_ngcontent-%COMP%]{margin-right:25px;overflow:hidden}.type-column[_ngcontent-%COMP%]{text-transform:capitalize}"],changeDetection:0}),t}(),me=o(20237),ve=o(36957),be=o(36402),ye=function(){var t=function(){function t(e,n,i,o){d(this,t),this.currentUser=e,this.router=n,this.workspaces=i,this.localStorage=o}return g(t,[{key:"canActivate",value:function(t,e){return this.handle()}},{key:"canActivateChild",value:function(t,e){return this.handle()}},{key:"canLoad",value:function(t){return this.handle()}},{key:"handle",value:function(){return!(this.currentUser.isLoggedIn()&&!this.currentUser.isSubscribed()&&!this.workspaces.activeId$.value&&this.localStorage.get(ve.b)&&(this.localStorage.remove(ve.b),this.router.navigate(["/billing/upgrade"]),1))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.LFG(w.I),u.LFG(r.F0),u.LFG(m.b),u.LFG(be.m))},t.\u0275prov=u.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}(),_e=o(12440),xe=o(77044),ke=o(75183),Ze=new u.OlP("WORKSPACE_CONFIG"),we=o(49517);function Ae(t,e){if(1&t){var n=u.EpF();u.TgZ(0,"button",13),u.NdJ("click",function(){return u.CHM(n),u.oxw().showCrupdateWorkspaceModal()}),u._UZ(1,"mat-icon",14),u.TgZ(2,"span",1),u._uU(3,"Add New Workspace"),u.qZA(),u.qZA()}}function Ce(t,e){if(1&t){var n=u.EpF();u.ynx(0),u.TgZ(1,"button",22),u.NdJ("click",function(){u.CHM(n);var t=u.oxw().$implicit;return u.oxw().showCrupdateWorkspaceModal(t)}),u.ALo(2,"trans"),u._UZ(3,"mat-icon",25),u.qZA(),u.TgZ(4,"button",22),u.NdJ("click",function(){u.CHM(n);var t=u.oxw().$implicit;return u.oxw().maybeDeleteWorkspace(t)}),u.ALo(5,"trans"),u._UZ(6,"mat-icon",26),u.qZA(),u.BQk()}2&t&&(u.xp6(1),u.Q6J("matTooltip",u.lcZ(2,2,"Edit workspace")),u.xp6(3),u.Q6J("matTooltip",u.lcZ(5,4,"Delete workspace")))}function Te(t,e){if(1&t){var n=u.EpF();u.ynx(0),u.TgZ(1,"button",22),u.NdJ("click",function(){u.CHM(n);var t=u.oxw().$implicit;return u.oxw().maybeLeaveWorkspace(t)}),u.ALo(2,"trans"),u._UZ(3,"mat-icon",27),u.qZA(),u.BQk()}2&t&&(u.xp6(1),u.Q6J("matTooltip",u.lcZ(2,1,"Leave workspace")))}function qe(t,e){if(1&t){var n=u.EpF();u.TgZ(0,"tr"),u.TgZ(1,"td",15),u._uU(2),u.qZA(),u.TgZ(3,"td",16),u._UZ(4,"user-column",17),u.qZA(),u.TgZ(5,"td",18),u._uU(6),u.qZA(),u.TgZ(7,"td",19),u._uU(8),u.qZA(),u.TgZ(9,"td",20),u._uU(10),u.ALo(11,"formattedDate"),u.qZA(),u.TgZ(12,"td",21),u.TgZ(13,"button",22),u.NdJ("click",function(){var t=u.CHM(n).$implicit;return u.oxw().openWorkspaceMembersModal(t)}),u.ALo(14,"trans"),u._UZ(15,"mat-icon",23),u.qZA(),u.YNc(16,Ce,7,6,"ng-container",24),u.YNc(17,Te,4,3,"ng-container",24),u.qZA(),u.qZA()}if(2&t){var i=e.$implicit,o=u.oxw();u.xp6(2),u.Oqu(i.name),u.xp6(2),u.Q6J("user",i.owner),u.xp6(2),u.Oqu((null==i.currentUser?null:i.currentUser.role_name)||"-"),u.xp6(2),u.Oqu(i.members_count||"-"),u.xp6(2),u.Oqu(u.lcZ(11,8,i.updated_at)),u.xp6(3),u.Q6J("matTooltip",u.lcZ(14,10,"Manage Members")),u.xp6(3),u.Q6J("ngIf",i.owner_id===o.currentUser.get("id")),u.xp6(1),u.Q6J("ngIf",i.owner_id!==o.currentUser.get("id"))}}function Ie(t,e){1&t&&(u.TgZ(0,"no-results-message",28),u.TgZ(1,"span",29),u._uU(2,"No workspaces have been created yet"),u.qZA(),u.qZA())}var Oe=function(){var t=function(){function t(e,n,i,o,a,r,s){d(this,t),this.datatable=e,this.currentUser=n,this.workspaces=i,this.toast=o,this.router=a,this.modal=r,this.workspaceConfig=s,this.workspaces$=this.datatable.data$}return g(t,[{key:"ngOnInit",value:function(){this.datatable.init({uri:m.b.BASE_URI,staticParams:{userId:this.currentUser.get("id")}})}},{key:"maybeDeleteWorkspace",value:function(t){var e=this;this.datatable.confirmResourceDeletion("workspace").subscribe(function(){e.workspaces.delete([t.id]).subscribe(function(){e.datatable.reset(),e.toast.open("Workspace deleted.")},function(t){e.toast.open(t.message||y.v.Default)})})}},{key:"showCrupdateWorkspaceModal",value:function(t){this.datatable.openCrupdateResourceModal(_e.Z,{workspace:t}).subscribe()}},{key:"openWorkspaceMembersModal",value:function(t){this.modal.open(xe.t,{workspace:t})}},{key:"filterByUser",value:function(){return-1===this.router.url.indexOf("admin")}},{key:"maybeLeaveWorkspace",value:function(t){var e=this;this.modal.open(_.z,ke.W).afterClosed().subscribe(function(n){n&&e.workspaces.deleteMember(t.id,e.currentUser.get("id")).subscribe(function(){return e.datatable.reset()})})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.Y36(Pt.x),u.Y36(w.I),u.Y36(m.b),u.Y36(A.F),u.Y36(r.F0),u.Y36(Z.u),u.Y36(Ze))},t.\u0275cmp=u.Xpm({type:t,selectors:[["workspace-index"]],features:[u._Bn([Pt.x])],decls:34,vars:8,consts:[[1,"datatable-page-header"],["trans",""],[1,"header"],["pluralName","workspaces"],[1,"action-buttons"],["mat-raised-button","","color","accent","class","button-with-icon",3,"click",4,"ngIf"],[1,"datatable","responsive-table"],[1,"material-table"],["table-sort-header","","trans",""],["table-sort-header","owner_id","trans",""],["table-sort-header","members_count","trans",""],[4,"ngFor","ngForOf"],["svgImage","shared-workspace.svg",4,"ngIf"],["mat-raised-button","","color","accent",1,"button-with-icon",3,"click"],["svgIcon","add"],["data-label","Name"],["data-label","Owner"],[3,"user"],["data-label","Your Role","trans",""],["data-label","Members"],["data-label","Last Updated"],[1,"edit-column"],["mat-icon-button","",3,"matTooltip","click"],["svgIcon","group-add"],[4,"ngIf"],["svgIcon","edit"],["svgIcon","delete"],["svgIcon","exit-to-app"],["svgImage","shared-workspace.svg"],["primary-text","","trans",""]],template:function(t,e){1&t&&(u.TgZ(0,"div",0),u.TgZ(1,"h1",1),u.TgZ(2,"span",1),u._uU(3,"Workspaces"),u.qZA(),u.TgZ(4,"info-popover"),u.TgZ(5,"strong",1),u._uU(6,"Workspaces and Teammates"),u.qZA(),u.TgZ(7,"p",1),u._uU(8),u.qZA(),u.qZA(),u.qZA(),u.TgZ(9,"div",2),u._UZ(10,"datatable-filters",3),u.TgZ(11,"div",4),u.YNc(12,Ae,4,0,"button",5),u.qZA(),u.qZA(),u.qZA(),u.TgZ(13,"div",6),u.TgZ(14,"table",7),u.TgZ(15,"thead"),u.TgZ(16,"tr"),u.TgZ(17,"th",8),u._uU(18,"Name"),u.qZA(),u.TgZ(19,"th",9),u._uU(20,"Owner"),u.qZA(),u.TgZ(21,"th",1),u._uU(22,"Your Role"),u.qZA(),u.TgZ(23,"th",10),u._uU(24,"Members"),u.qZA(),u.TgZ(25,"th",1),u._uU(26,"Last Updated"),u.qZA(),u._UZ(27,"th"),u.qZA(),u.qZA(),u.TgZ(28,"tbody"),u.YNc(29,qe,18,12,"tr",11),u.ALo(30,"async"),u.qZA(),u.qZA(),u.YNc(31,Ie,3,0,"no-results-message",12),u.ALo(32,"async"),u._UZ(33,"datatable-footer"),u.qZA()),2&t&&(u.xp6(8),u.Oqu(e.workspaceConfig.description),u.xp6(4),u.Q6J("ngIf",e.currentUser.hasPermission("workspaces.create")),u.xp6(17),u.Q6J("ngForOf",u.lcZ(30,4,e.workspaces$)),u.xp6(2),u.Q6J("ngIf",u.lcZ(32,6,e.datatable.paginator.noResults$)))},directives:[C.P,we.N,Jt.h,a.O5,Dt.p,a.sg,Rt.V,q.lW,T.Hw,Qt.r,Ft.gM,$t.U],pipes:[a.Ov,Y.l,I.R],styles:["h1[_ngcontent-%COMP%]{display:flex;align-items:center}"],changeDetection:0}),t}(),Ue=o(4512),Pe=o(38193),Me=[{path:"",component:pt,canActivate:[ye],children:[{path:"",resolve:{reports:kt},component:At,data:{name:"Dashboard"}},{path:"links",component:gt.g},{path:"links/:linkId",resolve:{api:ft.F},component:ht.G,data:{name:"Link Statistics"}},{path:"biolinks",component:Ue.o},{path:"biolinks/:linkId/edit",component:Pe.w,data:{name:"Edit Bio Link"}},{path:"biolinks/:biolinkId/analytics",component:Tt.x,data:{name:"Biolink Statistics"}},{path:"link-groups",component:Ct.o},{path:"link-groups/:groupId/links",component:ee.Z},{path:"link-groups/:groupId/analytics",component:Tt.x,data:{name:"Link Group Statistics"}},{path:"custom-domains",component:Kt,data:{name:"Custom Domains"}},{path:"link-overlays",component:qt.m,data:{name:"Link Overlays"}},{path:"link-overlays/new",component:te.O,canDeactivate:[me.w]},{path:"link-overlays/edit/:id",component:te.O,canDeactivate:[me.w]},{path:"pixels",component:It.V,data:{name:"Tracking Pixels"}},{path:"workspaces",component:Oe,data:{name:"Workspaces"}},{path:"link-pages",component:fe,data:{name:"Link Pages",endpoint:"link-page"}},{path:"link-pages/new",component:Ot.e,data:{name:"Add New Page",hideSlug:!0,endpoint:"link-page"}},{path:"link-pages/:id/edit",component:Ot.e,data:{name:"Edit Page",hideSlug:!0,endpoint:"link-page"}}]}],Se=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=u.oAB({type:t}),t.\u0275inj=u.cJS({imports:[[r.Bz.forChild(Me)],r.Bz]}),t}(),Ne=o(92762),Je=o(92935),Ee=o(56160),Le=o(87829),De=o(20653),Re=o(75425),Ye=o(79572),Fe=o(68400),Qe=o(58666),$e=o(50615),Be=o(31041),He=o(51685),Ve=o(99808),ze=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=u.oAB({type:t}),t.\u0275inj=u.cJS({imports:[[a.ez,Fe.N,Qe.u,$e.X,Be.u5,Be.UX,He.x,Ve.p,T.Ps,q.ot,Ft.AV,Je.Is,Ye.rP,tt.Cv]]}),t}(),Ge=o(57173),je=["rootMenu"];function Xe(t,e){if(1&t){var n=u.EpF();u.TgZ(0,"button",9),u.NdJ("click",function(){var t=u.CHM(n).$implicit;return u.oxw().selectValue("page:"+t.id)}),u._uU(1),u.qZA()}if(2&t){var i=e.$implicit,o=u.oxw();u.ekj("active",o.value==="page:"+i.id),u.xp6(1),u.Oqu(i.title)}}function We(t,e){if(1&t){var n=u.EpF();u.TgZ(0,"button",9),u.NdJ("click",function(){var t=u.CHM(n).$implicit;return u.oxw().selectValue("overlay:"+t.id)}),u._uU(1),u.qZA()}if(2&t){var i=e.$implicit,o=u.oxw();u.ekj("active",o.value==="overlay:"+i.id),u.xp6(1),u.Oqu(i.name)}}var Ke,tn=function(t){return{siteName:t}},en=function(){var t=function(){function t(e,n){d(this,t),this.cd=e,this.settings=n}return g(t,[{key:"writeValue",value:function(t){this.value=t,this.cd.detectChanges()}},{key:"registerOnChange",value:function(t){this.propagateChange=t}},{key:"registerOnTouched",value:function(){}},{key:"selectValue",value:function(t){this.value=t,this.propagateChange(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.Y36(u.sBO),u.Y36(h.Z))},t.\u0275cmp=u.Xpm({type:t,selectors:[["link-type-menu"]],viewQuery:function(t,e){var n;(1&t&&u.Gf(je,7),2&t)&&(u.iGM(n=u.CRH())&&(e.matMenu=n.first))},inputs:{linkOptions:"linkOptions"},features:[u._Bn([{provide:Be.JU,useExisting:t,multi:!0}])],decls:33,vars:24,consts:[["rootMenu",""],["mat-menu-item","",1,"multiline-mat-menu-item",3,"click"],["trans","",1,"title"],["trans","",1,"description"],["trans","",1,"description",3,"transValues"],["mat-menu-item","",1,"multiline-mat-menu-item",3,"matMenuTriggerFor"],["customPagesMenu",""],["mat-menu-item","",3,"active","click",4,"ngFor","ngForOf"],["overlayMenu",""],["mat-menu-item","",3,"click"]],template:function(t,e){if(1&t&&(u.TgZ(0,"mat-menu",null,0),u.TgZ(2,"div",1),u.NdJ("click",function(){return e.selectValue("direct")}),u.TgZ(3,"div",2),u._uU(4,"Direct"),u.qZA(),u.TgZ(5,"div",3),u._uU(6,"Redirect user to url instantly."),u.qZA(),u.qZA(),u.TgZ(7,"div",1),u.NdJ("click",function(){return e.selectValue("frame")}),u.TgZ(8,"div",2),u._uU(9,"Frame"),u.qZA(),u.TgZ(10,"div",4),u._uU(11,"Show url inside iframe with :siteName navigation bar."),u.qZA(),u.qZA(),u.TgZ(12,"div",1),u.NdJ("click",function(){return e.selectValue("splash")}),u.TgZ(13,"div",2),u._uU(14,"Splash"),u.qZA(),u.TgZ(15,"div",3),u._uU(16,"Show splash page with optional ads and redirect user to url after a delay."),u.qZA(),u.qZA(),u.TgZ(17,"div",5),u.TgZ(18,"div",2),u._uU(19,"Link Page"),u.qZA(),u.TgZ(20,"div",4),u._uU(21,"Show specified link page with :siteName navigation bar and button to open long url."),u.qZA(),u.qZA(),u.TgZ(22,"div",5),u.TgZ(23,"div",2),u._uU(24,"Overlay"),u.qZA(),u.TgZ(25,"div",3),u._uU(26,"Redirect user instantly and show specified overlay over the link."),u.qZA(),u.qZA(),u.qZA(),u.TgZ(27,"mat-menu",null,6),u.YNc(29,Xe,2,3,"button",7),u.qZA(),u.TgZ(30,"mat-menu",null,8),u.YNc(32,We,2,3,"button",7),u.qZA()),2&t){var n=u.MAs(28),i=u.MAs(31);u.xp6(2),u.ekj("active","direct"===e.value),u.xp6(5),u.ekj("active","frame"===e.value),u.xp6(3),u.Q6J("transValues",u.VKq(20,tn,e.settings.get("branding.site_name"))),u.xp6(2),u.ekj("active","splash"===e.value),u.xp6(5),u.ekj("hidden",!(null!=e.linkOptions&&e.linkOptions.pages.length))("active",e.value.includes("page")),u.Q6J("matMenuTriggerFor",n),u.xp6(3),u.Q6J("transValues",u.VKq(22,tn,e.settings.get("branding.site_name"))),u.xp6(2),u.ekj("hidden",!(null!=e.linkOptions&&e.linkOptions.overlays.length))("active",e.value.includes("overlay")),u.Q6J("matMenuTriggerFor",i),u.xp6(7),u.Q6J("ngForOf",null==e.linkOptions?null:e.linkOptions.pages),u.xp6(3),u.Q6J("ngForOf",null==e.linkOptions?null:e.linkOptions.overlays)}},directives:[b.VK,b.OP,C.P,b.p6,a.sg],styles:[""],changeDetection:0}),t}(),nn=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=u.oAB({type:t}),t.\u0275inj=u.cJS({imports:[[a.ez,Be.UX,Fe.N,q.ot]]}),t}(),on=o(69193),an=o(37604),rn=o(86013),sn=o(20673),cn=o(12188),ln=o(29828),un=o(7436),dn=o(4182),pn=o(15595),gn=o(47878),hn=o(63380),fn=o(90723),mn=o(87254),vn=function(){var t=function(){function t(e){d(this,t),this.el=e,this.enterPressed=new u.vpe}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.subscription=(0,mn.R)(this.el.nativeElement,"keydown").subscribe(function(e){13===e.keyCode&&(e.preventDefault(),e.stopPropagation(),t.el.nativeElement.blur(),t.enterPressed.emit(e))})}},{key:"ngOnDestroy",value:function(){this.subscription.unsubscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.Y36(u.SBq))},t.\u0275dir=u.lG2({type:t,selectors:[["","enterKeybind",""]],outputs:{enterPressed:"enterPressed"}}),t}(),bn=o(59447),yn=o(75428),_n=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=u.oAB({type:t}),t.\u0275inj=u.cJS({imports:[[a.ez,Fe.N,b.Tx,q.ot,T.Ps]]}),t}(),xn=o(41816),kn=o(45052),Zn=o(87064),wn=o(8424),An=o(69244),Cn=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=u.oAB({type:t}),t.\u0275inj=u.cJS({imports:[[a.ez,Fe.N,Be.UX,Be.u5,Zn.si,q.ot,T.Ps]]}),t}(),Tn=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=u.oAB({type:t}),t.\u0275inj=u.cJS({imports:[[a.ez,Fe.N,Zn.si,$e.X,q.ot,T.Ps,Be.UX,un.Fk,Ne.vV]]}),t}(),qn=o(13070),In=o(13841),On=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=u.oAB({type:t}),t.\u0275inj=u.cJS({imports:[[a.ez,Be.UX,Fe.N,nn,fn.a,Ee.G,q.ot,T.Ps,qn.lN,In.LD]]}),t}(),Un=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=u.oAB({type:t}),t.\u0275inj=u.cJS({imports:[[a.ez,Be.u5,Be.UX,r.Bz,$e.X,Fe.N,Qe.u,pn.m,wn._,fn.a,an.x,Cn,Tn,On,ln.I,Re.m,nn,kn.T,T.Ps,q.ot,Ft.AV,Je.Is,An._t,Ge.Nh,Zn.si,Ye.rP]]}),t}(),Pn=o(85786),Mn=o(53129),Sn=o(78671),Nn=((Ke=function t(){d(this,t)}).\u0275fac=function(t){return new(t||Ke)},Ke.\u0275mod=u.oAB({type:Ke}),Ke.\u0275inj=u.cJS({providers:[Z.u,{provide:Ze,useValue:{description:"Workspaces are like folders for your links, domains, groups and other resources. They're great for organising your campaigns, collaborating with teammates and managing different projects."}}],imports:[[a.ez,r.Bz,Se,Fe.N,$e.X,on.a,Be.u5,Be.UX,an.x,Ve.p,Qe.u,rn.b,sn.l,cn.v,ln.I,hn.M,fn.a,bn.a,xn.J,yn.WorkspaceModule,_n,On,Pn.c,pn.m,He.x,dn.S,Re.m,De.m,ze,gn.k,Ee.G,nn,Un,q.ot,T.Ps,Ft.AV,Je.Is,Ne.vV,Ge.Nh,b.Tx,tt.Cv,Ye.rP,un.Fk,kn.T,Zn.si]]}),Ke);u.B6R(Le.P,[Je.uh,a.O5,C.P,T.Hw,Be.JL,Be.F,Je.xY,Be.sg,Be.Fj,Be.JJ,Be.u,vn,Be.Q7,Be.wO,Be.nD,q.lW,b.p6,en,Mn.O,Je.H8,Sn.t],[a.Ov])},28577:function(t,e,n){"use strict";n.d(e,{L:function(){return U}});var i=n(78512),o=n(92935),a=n(31041),r=n(11520),s=n(24831),c=n(35366),l=n(16980),u=n(76512),p=n(73234),h=n(25051),f=n(88195),m=n(61116),v=n(77307),b=n(38116),y=n(29738),_=n(13571),x=n(79572),k=n(84369);function Z(t,e){if(1&t&&(c.TgZ(0,"span",6),c._uU(1),c.qZA()),2&t){var n=c.oxw();c.xp6(1),c.hij("Create ",n.resourceName,"")}}function w(t,e){if(1&t&&(c.TgZ(0,"span",6),c._uU(1),c.qZA()),2&t){var n=c.oxw();c.xp6(1),c.hij("Update ",n.resourceName,"")}}function A(t,e){if(1&t&&(c.TgZ(0,"div",25),c._uU(1),c.qZA()),2&t){var n=c.oxw().ngIf;c.xp6(1),c.Oqu(n.name)}}function C(t,e){if(1&t&&(c.TgZ(0,"div",25),c._uU(1),c.qZA()),2&t){var n=c.oxw().ngIf;c.xp6(1),c.Oqu(n.hash)}}function T(t,e){1&t&&(c.TgZ(0,"div",18),c.TgZ(1,"mat-slide-toggle",26),c._uU(2,"Rotator"),c.qZA(),c.TgZ(3,"p",6),c._uU(4," When checked, url above will redirect to random link from the group, instead of showing all links belonging to group. "),c.qZA(),c.qZA())}function q(t,e){1&t&&(c.TgZ(0,"span"),c._uU(1,"Update"),c.qZA())}function I(t,e){1&t&&(c.TgZ(0,"span"),c._uU(1,"Create"),c.qZA())}function O(t,e){if(1&t){var n=c.EpF();c.TgZ(0,"form",7),c.NdJ("ngSubmit",function(){return c.CHM(n),c.oxw().confirm()}),c.TgZ(1,"mat-dialog-content",8),c.TgZ(2,"div",9),c.TgZ(3,"label",10),c._uU(4,"Name"),c.qZA(),c._UZ(5,"input",11),c.YNc(6,A,2,1,"div",12),c.qZA(),c.TgZ(7,"div",13),c._UZ(8,"slug-control",14),c.ALo(9,"async"),c.YNc(10,C,2,1,"div",12),c.qZA(),c._UZ(11,"domain-form-control",15),c.ALo(12,"async"),c.TgZ(13,"div",13),c.TgZ(14,"label",16),c._uU(15,"Description"),c.qZA(),c._UZ(16,"textarea",17),c.qZA(),c.TgZ(17,"div",18),c.TgZ(18,"mat-slide-toggle",19),c._uU(19,"Active"),c.qZA(),c.TgZ(20,"p",6),c._uU(21),c.qZA(),c.qZA(),c.YNc(22,T,5,0,"div",20),c.qZA(),c.TgZ(23,"mat-dialog-actions"),c.TgZ(24,"button",21),c.NdJ("click",function(){return c.CHM(n),c.oxw().close()}),c._uU(25,"Cancel"),c.qZA(),c.TgZ(26,"button",22),c.ALo(27,"async"),c.YNc(28,q,2,0,"span",23),c.ALo(29,"async"),c.YNc(30,I,2,0,"ng-template",null,24,c.W1O),c.qZA(),c.qZA(),c.qZA()}if(2&t){var i=e.ngIf,o=c.MAs(31),a=c.oxw();c.Q6J("formGroup",a.form),c.xp6(6),c.Q6J("ngIf",i.name),c.xp6(2),c.Q6J("baseUri",c.lcZ(9,10,a.slugBaseUri$)),c.xp6(2),c.Q6J("ngIf",i.hash),c.xp6(1),c.Q6J("domains",c.lcZ(12,12,a.domains$)),c.xp6(10),c.hij("Whether this ",a.resourceName," is viewable publicly."),c.xp6(1),c.Q6J("ngIf","biolink"!==a.data.type),c.xp6(4),c.Q6J("disabled",c.lcZ(27,14,a.loading$)),c.xp6(2),c.Q6J("ngIf",c.lcZ(29,16,a.updating$))("ngIfElse",o)}}var U=function(){var t=function(){function t(e,n,o,r,c,l,u){d(this,t),this.dialogRef=e,this.data=n,this.groups=o,this.biolinks=r,this.toast=c,this.valueLists=l,this.settings=u,this.loading$=new i.X(!1),this.updating$=new i.X(!1),this.errors$=new i.X({}),this.form=new a.cw({name:new a.NI,active:new a.NI(!0),description:new a.NI(""),hash:new a.NI((0,s.O)(6)),rotator:new a.NI(!1),domain_id:new a.NI(null)}),this.slugBaseUri$=new i.X(null),this.domains$=new i.X([])}return g(t,[{key:"resourceName",get:function(){return"biolink"===this.data.type?"biolink":"link group"}},{key:"ngOnInit",value:function(){var t=this;this.updating$.next(!!this.data.linkGroup),this.data.linkGroup&&this.form.patchValue(this.data.linkGroup),this.valueLists.get(["domains"]).subscribe(function(e){t.domains$.next(e.domains),t.setSlugBaseUri(t.form.value.domain_id)}),this.form.get("domain_id").valueChanges.subscribe(function(e){t.setSlugBaseUri(e)})}},{key:"confirm",value:function(){var t=this;this.loading$.next(!0),(this.updating$.value?this.api().update(this.data.linkGroup.id,this.form.value):this.api().create(this.form.value)).pipe((0,r.x)(function(){return t.loading$.next(!1)})).subscribe(function(e){t.toast.open(t.updating$.value?"".concat(t.resourceName," updated"):"".concat(t.resourceName," created")),t.close(e.linkGroup||e.biolink)},function(e){return t.errors$.next(e.errors)})}},{key:"close",value:function(t){this.dialogRef.close(t)}},{key:"api",value:function(){return"biolink"===this.data.type?this.biolinks:this.groups}},{key:"setSlugBaseUri",value:function(t){this.slugBaseUri$.next(t?this.domains$.value.find(function(e){return e.id===t}).host:this.settings.getBaseUrl())}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.Y36(o.so),c.Y36(o.WI),c.Y36(l.L),c.Y36(u.n),c.Y36(p.F),c.Y36(h.l),c.Y36(f.Z))},t.\u0275cmp=c.Xpm({type:t,selectors:[["crupdate-link-group-modal"]],decls:8,vars:5,consts:[[1,"modal-header"],["mat-dialog-title","",1,"capitalize"],["trans","",4,"ngIf"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"formGroup","ngSubmit",4,"ngIf"],["trans",""],["ngNativeValidate","",3,"formGroup","ngSubmit"],[1,"many-inputs"],[1,"input-container","name-container"],["for","link-group-name","trans",""],["type","text","id","link-group-name","formControlName","name","required","","minlength","3"],["class","error",4,"ngIf"],[1,"input-container"],["formControlName","hash",3,"baseUri"],["controlName","domain_id",1,"many-inputs",3,"domains"],["for","link-group-description","trans",""],["id","link-group-description","formControlName","description"],[1,"setting-toggle-container"],["formControlName","active","id","link-group-active","trans","",1,"capitalize"],["class","setting-toggle-container",4,"ngIf"],["type","button","mat-button","","trans","",3,"click"],["type","submit","mat-raised-button","","color","accent","trans","",3,"disabled"],[4,"ngIf","ngIfElse"],["creating",""],[1,"error"],["formControlName","rotator","id","link-group-rotator","trans",""]],template:function(t,e){1&t&&(c.TgZ(0,"div",0),c.TgZ(1,"h2",1),c.YNc(2,Z,2,1,"span",2),c.YNc(3,w,2,1,"span",2),c.qZA(),c.TgZ(4,"button",3),c.NdJ("click",function(){return e.close()}),c._UZ(5,"mat-icon",4),c.qZA(),c.qZA(),c.YNc(6,O,32,18,"form",5),c.ALo(7,"async")),2&t&&(c.xp6(2),c.Q6J("ngIf",!e.data.linkGroup),c.xp6(1),c.Q6J("ngIf",e.data.linkGroup),c.xp6(3),c.Q6J("ngIf",c.lcZ(7,3,e.errors$)))},directives:[o.uh,m.O5,v.Hw,b.P,a.JL,a.sg,o.xY,a.Fj,a.JJ,a.u,a.Q7,a.wO,y.b,_.z,x.Rr,o.H8,k.lW],pipes:[m.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}.name-container[_ngcontent-%COMP%]{margin-bottom:8px}"],changeDetection:0}),t}()},80773:function(t,e,n){"use strict";n.d(e,{x:function(){return _}});var i=n(55959),o=n(26437),a=n(35366),r=n(63337),s=n(24859),c=n(16980),l=n(76512),u=n(61116),p=n(93836),h=n(84369),f=n(77307),m=n(88798),v=n(40450);function b(t,e){if(1&t&&(a.TgZ(0,"div"),a.TgZ(1,"h1",2),a.TgZ(2,"a",3),a._UZ(3,"mat-icon",4),a.qZA(),a._uU(4),a.ALo(5,"trans"),a.qZA(),a.qZA()),2&t){var n=e.ngIf;a.Q6J("@fadeIn",void 0),a.xp6(4),a.AsE(" ",n.name," ",a.lcZ(5,3,"Analytics")," ")}}function y(t,e){1&t&&(a.TgZ(0,"h1"),a._UZ(1,"skeleton",5),a.qZA()),2&t&&a.Q6J("@fadeOut",void 0)}var _=function(){var t=function(){function t(e,n,o,a){d(this,t),this.route=e,this.modal=n,this.groups=o,this.biolinks=a,this.analytics$=new i.xQ,this.linkGroup$=new i.xQ}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.route.params.subscribe(function(e){var n=e.groupId||e.biolinkId,i=e.groupId?t.groups:t.biolinks;t.analyticsEndpoint=i.analyticsEndpoint(n),i.analytics(n).subscribe(function(e){t.analytics$.next(e.analytics),t.linkGroup$.next(e.linkGroup||e.biolink)})})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Y36(r.gz),a.Y36(s.u),a.Y36(c.L),a.Y36(l.n))},t.\u0275cmp=a.Xpm({type:t,selectors:[["link-group-analytics-page"]],decls:7,vars:10,consts:[[4,"ngIf"],[3,"reports","endpoint"],[1,"name"],["routerLink","../../","mat-icon-button",""],["svgIcon","arrow-back"],["variant","text"]],template:function(t,e){1&t&&(a.TgZ(0,"header"),a.YNc(1,b,6,5,"div",0),a.ALo(2,"async"),a.YNc(3,y,2,1,"h1",0),a.ALo(4,"async"),a.qZA(),a._UZ(5,"click-charts",1),a.ALo(6,"async")),2&t&&(a.xp6(1),a.Q6J("ngIf",a.lcZ(2,4,e.linkGroup$)),a.xp6(2),a.Q6J("ngIf",!a.lcZ(4,6,e.linkGroup$)),a.xp6(2),a.Q6J("reports",a.lcZ(6,8,e.analytics$))("endpoint",e.analyticsEndpoint))},directives:[u.O5,p.z,r.yS,h.zs,f.Hw,m._],pipes:[u.Ov,v.R],styles:["header[_ngcontent-%COMP%]{position:relative}h1[_ngcontent-%COMP%]{font-size:2rem;text-transform:capitalize;margin:0 0 10px;font-weight:400;height:40px}skeleton[_ngcontent-%COMP%]{max-width:350px}.mat-icon-button[_ngcontent-%COMP%]{color:var(--be-secondary-text);vertical-align:middle}"],data:{animation:o.B},changeDetection:0}),t}()},90832:function(t,e,n){"use strict";n.d(e,{L:function(){return r}});var i=n(44415),o=n(59075),a=n(45523),r=[new o.XQ({type:o.Bq.Select,key:"active",label:"status",defaultValue:!1,description:"Whether group is public or not",options:[{key:"Disabled",value:!1},{key:"Active",value:!0}]}),new o.XQ({type:o.Bq.Select,key:"rotator",label:"rotator",defaultValue:!1,description:"Whether group is used as link rotator",options:[{key:"Yes",value:!0},{key:"No",value:!1}]}),new a.T7({description:"Date link group was created"}),new a.yH({description:"Date link group was last updated"}),new o.XQ({type:o.Bq.SelectModel,key:"user_id",label:"User",description:"User group was created by",component:i.y})]},45905:function(t,e,n){"use strict";n.d(e,{o:function(){return j}});var i=n(56515),o=n(36024),a=n(16980),r=n(67455),s=n(28577),c=n(90832),l=n(35366),u=n(28505),p=n(73234),h=n(63337),f=n(36501),m=n(48865),v=n(95157),b=n(38116),y=n(49517),_=n(34955),x=n(56361),k=n(84369),Z=n(77307),w=n(61116),A=n(13536),C=n(80922),T=n(86668),q=n(27701),I=n(54275),O=n(24311),U=n(19708),P=n(71765),M=n(47210),S=n(2406),N=n(40450);function J(t,e){1&t&&l._UZ(0,"mat-progress-bar",23)}function E(t,e){1&t&&(l.TgZ(0,"th",24),l._uU(1,"Owner"),l.qZA())}var L=function(t){return{count:t,resource:"group(s)"}};function D(t,e){if(1&t){var n=l.EpF();l.TgZ(0,"tr"),l.TgZ(1,"th",25),l.TgZ(2,"div",26),l._uU(3," :count :resource selected: "),l.qZA(),l.TgZ(4,"div",27),l.TgZ(5,"permission-aware-button",28),l.TgZ(6,"button",29),l.NdJ("click",function(){return l.CHM(n),l.oxw().maybeDeleteSelectedGroups()}),l._uU(7," Delete "),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.qZA()}if(2&t){var i=e.ngIf;l.xp6(2),l.Q6J("transValues",l.VKq(1,L,i))}}function R(t,e){if(1&t&&(l.TgZ(0,"td",50),l._UZ(1,"user-column",51),l.qZA()),2&t){var n=l.oxw().$implicit;l.xp6(1),l.Q6J("user",n.user)}}function Y(t,e){1&t&&l._UZ(0,"mat-icon",52)}function F(t,e){1&t&&(l.TgZ(0,"span"),l._uU(1,"-"),l.qZA())}function Q(t,e){1&t&&l._UZ(0,"mat-icon",52)}function $(t,e){1&t&&(l.TgZ(0,"span"),l._uU(1,"-"),l.qZA())}var B=function(t){return["/",t]},H=function(t){return[t,"analytics"]},V=function(t){return[t,"links"]};function z(t,e){if(1&t){var n=l.EpF();l.TgZ(0,"tr"),l._UZ(1,"td",30),l.TgZ(2,"td",31),l.TgZ(3,"a",32),l._uU(4),l.qZA(),l.qZA(),l.YNc(5,R,2,1,"td",33),l.TgZ(6,"td",34),l._uU(7),l.qZA(),l.TgZ(8,"td",35),l.YNc(9,Y,1,0,"mat-icon",36),l.YNc(10,F,2,0,"span",20),l.qZA(),l.TgZ(11,"td",37),l.YNc(12,Q,1,0,"mat-icon",36),l.YNc(13,$,2,0,"span",20),l.qZA(),l.TgZ(14,"td",38),l._uU(15),l.ALo(16,"formattedDate"),l.qZA(),l.TgZ(17,"td",39),l.TgZ(18,"button",40),l.ALo(19,"trans"),l._UZ(20,"mat-icon",41),l.qZA(),l.TgZ(21,"permission-aware-button",42),l.TgZ(22,"button",40),l.ALo(23,"trans"),l._UZ(24,"mat-icon",43),l.qZA(),l.qZA(),l.TgZ(25,"permission-aware-button",42),l.TgZ(26,"button",44),l.NdJ("click",function(){var t=l.CHM(n).$implicit;return l.oxw().showCrupdateGroupModal(t)}),l.ALo(27,"trans"),l._UZ(28,"mat-icon",45),l.qZA(),l.qZA(),l._UZ(29,"copy-link-btn",46),l.TgZ(30,"permission-aware-button",47),l.TgZ(31,"button",48),l.NdJ("click",function(){var t=l.CHM(n).$implicit;return l.oxw().maybeDeleteSelectedGroups([t.id])}),l._UZ(32,"mat-icon",49),l.qZA(),l.qZA(),l.qZA(),l.qZA()}if(2&t){var i=e.$implicit,o=l.oxw();l.xp6(1),l.Q6J("table-body-checkbox",i.id),l.xp6(2),l.Q6J("routerLink",l.VKq(26,B,i.hash)),l.xp6(1),l.Oqu(i.name),l.xp6(1),l.Q6J("ngIf",o.showUserColumn()),l.xp6(2),l.Oqu(i.links_count),l.xp6(2),l.Q6J("ngIf",i.active),l.xp6(1),l.Q6J("ngIf",!i.active),l.xp6(2),l.Q6J("ngIf",i.rotator),l.xp6(1),l.Q6J("ngIf",!i.rotator),l.xp6(2),l.Oqu(l.lcZ(16,18,i.updated_at)),l.xp6(3),l.Q6J("routerLink",l.VKq(28,H,i.id))("matTooltip",l.lcZ(19,20,"Analytics")),l.xp6(3),l.Q6J("userOwnsResource",o.currentUser.get("id")===i.user_id),l.xp6(1),l.Q6J("routerLink",l.VKq(30,V,i.id))("matTooltip",l.lcZ(23,22,"Manage Links")),l.xp6(3),l.Q6J("userOwnsResource",o.currentUser.get("id")===i.user_id),l.xp6(1),l.Q6J("matTooltip",l.lcZ(27,24,"Edit")),l.xp6(3),l.Q6J("model",i)}}function G(t,e){1&t&&(l.TgZ(0,"no-results-message",53),l.TgZ(1,"span",54),l._uU(2,"No link groups have been created yet"),l.qZA(),l.qZA())}var j=function(){var t=function(){function t(e,n,i,o,a,r,s,l){d(this,t),this.datatable=e,this.currentUser=n,this.linkGroups=i,this.toast=o,this.route=a,this.linkUsage=r,this.activeSection=s,this.workspaces=l,this.groups$=this.datatable.data$,this.filters=c.L}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.workspaceSub=this.workspaces.activeId$.subscribe(function(){t.setFilters()}),this.datatable.init({uri:a.L.BASE_URI,staticParams:{with:["user"],withCount:["links"],userId:this.showUserColumn()?null:this.currentUser.get("id")}})}},{key:"ngOnDestroy",value:function(){this.workspaceSub.unsubscribe()}},{key:"maybeDeleteSelectedGroups",value:function(t){var e=this;this.datatable.confirmResourceDeletion("link groups").subscribe(function(){e.linkGroups.delete(t||e.datatable.selectedRows$.value).subscribe(function(){e.datatable.reset(),e.toast.open(r.V.LINK_GROUP_DELETE_SUCCESS)},function(t){e.toast.open(t.message||o.v.Default)})})}},{key:"showCrupdateGroupModal",value:function(t){var e=this;this.datatable.openCrupdateResourceModal(s.L,{linkGroup:t}).subscribe(function(){return e.linkUsage.reload()})}},{key:"showUserColumn",value:function(){return this.activeSection.admin||!!this.workspaces.activeId$.value}},{key:"setFilters",value:function(){var t=this;this.filters=c.L.filter(function(e){return"user_id"!==e.key||t.showUserColumn()})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(l.Y36(i.x),l.Y36(u.I),l.Y36(a.L),l.Y36(p.F),l.Y36(h.gz),l.Y36(f.F),l.Y36(m.W),l.Y36(v.b))},t.\u0275cmp=l.Xpm({type:t,selectors:[["link-group-index"]],features:[l._Bn([i.x])],decls:50,vars:13,consts:[[1,"datatable-page-header"],["trans",""],[3,"wider"],["trans","",1,"title"],[1,"header"],["pluralName","groups",3,"filters"],[1,"action-buttons"],["permission","link_groups.create"],["mat-raised-button","","color","accent","trans","",1,"button-with-icon",3,"click"],["svgIcon","add"],[1,"datatable","responsive-table"],["class","loading-bar","mode","indeterminate","color","accent",4,"ngIf"],[1,"material-table"],["table-header-checkbox",""],["table-sort-header","","trans",""],["table-sort-header","user_id","trans","",4,"ngIf"],["table-sort-header","links_count","trans",""],["table-sort-header","active","trans",""],["table-sort-header","rotator","trans",""],["table-sort-header","updated_at","trans",""],[4,"ngIf"],[4,"ngFor","ngForOf"],["svgImage","marketing.svg",4,"ngIf"],["mode","indeterminate","color","accent",1,"loading-bar"],["table-sort-header","user_id","trans",""],["colspan","6"],["trans","",1,"bulk-actions-title",3,"transValues"],[1,"bulk-actions"],["permission","link_groups.delete"],["type","button","mat-raised-button","","color","warn","trans","",3,"click"],[3,"table-body-checkbox"],["data-label","Name"],["target","_blank",1,"link-group-name",3,"routerLink"],["data-label","Owner",4,"ngIf"],["data-label","Link Count"],["data-label","Active"],["svgIcon","check",4,"ngIf"],["data-label","Rotator"],["data-label","Last Updated"],[1,"edit-column"],["type","button","mat-icon-button","",3,"routerLink","matTooltip"],["svgIcon","bar-chart"],["permission","link_groups.update",3,"userOwnsResource"],["svgIcon","list-alt"],["mat-icon-button","",3,"matTooltip","click"],["svgIcon","edit"],[3,"model"],["permission","link_groups.delete",1,"visible-on-mobile"],["type","button","mat-icon-button","","trans","",3,"click"],["svgIcon","delete"],["data-label","Owner"],[3,"user"],["svgIcon","check"],["svgImage","marketing.svg"],["primary-text","","trans",""]],template:function(t,e){1&t&&(l.TgZ(0,"div",0),l.TgZ(1,"h1"),l.TgZ(2,"span",1),l._uU(3,"Link Groups"),l.qZA(),l.TgZ(4,"info-popover",2),l.TgZ(5,"div",3),l._uU(6,"Group links together to:"),l.qZA(),l.TgZ(7,"ul"),l.TgZ(8,"li",1),l._uU(9,"Simplify multiple link management."),l.qZA(),l.TgZ(10,"li",1),l._uU(11,"View statistics for a whole group instead of individual links."),l.qZA(),l.TgZ(12,"li",1),l._uU(13,"Share all links in the group with one link."),l.qZA(),l.TgZ(14,"li",1),l._uU(15,"And more."),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.TgZ(16,"div",4),l._UZ(17,"datatable-filters",5),l.TgZ(18,"div",6),l.TgZ(19,"permission-aware-button",7),l.TgZ(20,"button",8),l.NdJ("click",function(){return e.showCrupdateGroupModal()}),l._UZ(21,"mat-icon",9),l.TgZ(22,"span",1),l._uU(23,"Add New Group"),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.TgZ(24,"div",10),l.YNc(25,J,1,0,"mat-progress-bar",11),l.ALo(26,"async"),l.TgZ(27,"table",12),l.TgZ(28,"thead"),l.TgZ(29,"tr"),l._UZ(30,"th",13),l.TgZ(31,"th",14),l._uU(32,"Name"),l.qZA(),l.YNc(33,E,2,0,"th",15),l.TgZ(34,"th",16),l._uU(35,"Links"),l.qZA(),l.TgZ(36,"th",17),l._uU(37,"Active"),l.qZA(),l.TgZ(38,"th",18),l._uU(39,"Rotator"),l.qZA(),l.TgZ(40,"th",19),l._uU(41,"Last Updated"),l.qZA(),l._UZ(42,"th"),l.qZA(),l.YNc(43,D,8,3,"tr",20),l.qZA(),l.TgZ(44,"tbody"),l.YNc(45,z,33,32,"tr",21),l.ALo(46,"async"),l.qZA(),l.qZA(),l.YNc(47,G,3,0,"no-results-message",22),l.ALo(48,"async"),l._UZ(49,"datatable-footer"),l.qZA()),2&t&&(l.xp6(4),l.Q6J("wider",!0),l.xp6(13),l.Q6J("filters",e.filters),l.xp6(8),l.Q6J("ngIf",l.lcZ(26,7,e.datatable.paginator&&e.datatable.paginator.loading$)),l.xp6(8),l.Q6J("ngIf",e.showUserColumn()),l.xp6(10),l.Q6J("ngIf",e.datatable.selectedRows$.value.length),l.xp6(2),l.Q6J("ngForOf",l.lcZ(46,9,e.groups$)),l.xp6(2),l.Q6J("ngIf",l.lcZ(48,11,e.datatable.paginator.noResults$)))},directives:[b.P,y.N,_.h,x.v,k.lW,Z.Hw,w.O5,A.e,C.p,w.sg,T.V,q.pW,I.O,h.yS,h.rH,O.gM,U.b,P.r,M.U],pipes:[w.Ov,S.l,N.R],styles:["h1[_ngcontent-%COMP%]{display:flex;align-items:center}.link-group-name[_ngcontent-%COMP%]{color:inherit}.link-group-name[_ngcontent-%COMP%]:hover{text-decoration:underline}info-popover[_ngcontent-%COMP%]  .info-popover-panel{max-width:450px!important}"],changeDetection:0}),t}()},8889:function(t,e,n){"use strict";n.d(e,{Z:function(){return b}});var i=n(78512),o=n(56515),a=n(26437),r=n(85706),s=n(35366),c=n(63337),l=n(24859),u=n(36501),p=n(16980),h=n(84222),f=n(73234),m=n(28505),v=n(32656),b=function(){var t=function(){function t(e,n,o,a,r,s,c,l,u){d(this,t),this.route=e,this.modal=n,this.datatable=o,this.linkUsage=a,this.linkGroups=r,this.links=s,this.toast=c,this.router=l,this.currentUser=u,this.loading$=new i.X(!1),this.groupId$=new i.X(null)}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.route.params.subscribe(function(e){t.groupId$.next(e.groupId)})}},{key:"filterByUser",value:function(){return-1===this.router.url.indexOf("admin")}},{key:"setFilters",value:function(){var t=this;this.filters=r.f.filter(function(e){return"user_id"!==e.key||!t.filterByUser()})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Y36(c.gz),s.Y36(l.u),s.Y36(o.x),s.Y36(u.F),s.Y36(p.L),s.Y36(h.M),s.Y36(f.F),s.Y36(c.F0),s.Y36(m.I))},t.\u0275cmp=s.Xpm({type:t,selectors:[["link-group-links-index"]],features:[s._Bn([o.x])],decls:1,vars:1,consts:[[3,"groupId"]],template:function(t,e){1&t&&s._UZ(0,"link-index",0),2&t&&s.Q6J("groupId",e.route.snapshot.params.groupId)},directives:[v.g],styles:["header[_ngcontent-%COMP%]{position:relative}h1[_ngcontent-%COMP%]{font-size:2rem;text-transform:capitalize;margin:0 0 10px;font-weight:400;line-height:40px}skeleton[_ngcontent-%COMP%]{max-width:350px}.mat-icon-button[_ngcontent-%COMP%]{color:var(--be-secondary-text);vertical-align:middle}"],data:{animation:a.B},changeDetection:0}),t}()},34384:function(t,e,n){"use strict";n.d(e,{O:function(){return U}});var i=n(34500),o=n(67455),a=n(11520),r=n(78512),s=n(35366),c=n(31041),l=n(72686),u=n(73234),p=n(3950),h=n(63337),f=n(61116),m=n(57173),v=n(38116),b=n(84369),y=n(6006),_=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Xpm({type:t,selectors:[["generic-page-preview"]],decls:31,vars:0,consts:[[1,"navbar"],[1,"os-button"],[1,"page-body"],[1,"top-row"],[1,"circle"],[1,"line"],[1,"middle-row"],[1,"flex-container"],[1,"left"],[1,"rect"],[1,"line","fat-line"],[1,"separator"],[1,"right"],[1,"fat-line","line"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s._UZ(1,"div",1),s._UZ(2,"div",1),s._UZ(3,"div",1),s.qZA(),s.TgZ(4,"div",2),s.TgZ(5,"div",3),s._UZ(6,"div",4),s._UZ(7,"div",5),s._UZ(8,"div",5),s._UZ(9,"div",5),s.qZA(),s.TgZ(10,"div",6),s._UZ(11,"div",5),s._UZ(12,"div",5),s._UZ(13,"div",5),s._UZ(14,"div",5),s.qZA(),s.TgZ(15,"div",7),s.TgZ(16,"div",8),s._UZ(17,"div",9),s._UZ(18,"div",10),s._UZ(19,"div",5),s._UZ(20,"div",5),s._UZ(21,"div",11),s._UZ(22,"div",9),s._UZ(23,"div",5),s.qZA(),s.TgZ(24,"div",12),s._UZ(25,"div",9),s._UZ(26,"div",5),s._UZ(27,"div",13),s._UZ(28,"div",5),s._UZ(29,"div",11),s._UZ(30,"div",5),s.qZA(),s.qZA(),s.qZA())},styles:["[_nghost-%COMP%]{display:block;background-color:var(--be-background);height:100%;overflow:hidden}.navbar[_ngcontent-%COMP%]{display:flex;align-items:center;background-color:var(--be-background-alternative);height:40px;width:100%}.os-button[_ngcontent-%COMP%]{width:20px;height:20px;border-radius:50%;margin-left:15px}.os-button[_ngcontent-%COMP%]:first-child{background-color:#d7665d}.os-button[_ngcontent-%COMP%]:nth-child(2){background-color:#deab54}.os-button[_ngcontent-%COMP%]:nth-child(3){background-color:#6fb54c}.page-body[_ngcontent-%COMP%]{padding:25px}.top-row[_ngcontent-%COMP%]{display:flex;align-items:center;height:60px;background-color:var(--be-background-alternative);padding:10px;margin-bottom:25px}.top-row[_ngcontent-%COMP%]   .line[_ngcontent-%COMP%]{width:15%;margin-left:15px}.circle[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;margin-right:auto}.circle[_ngcontent-%COMP%], .line[_ngcontent-%COMP%]{background-color:var(--be-disabled-button)}.line[_ngcontent-%COMP%]{height:20px;border-radius:4px}.middle-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;height:260px;background-color:var(--be-background-alternative);margin:25px 0}.middle-row[_ngcontent-%COMP%]   .line[_ngcontent-%COMP%]{height:15px;margin-bottom:5px;width:50%;background-color:var(--be-disabled-toggle)}.middle-row[_ngcontent-%COMP%]   .line[_ngcontent-%COMP%]:first-child{height:35px;margin-bottom:20px;width:65%;background-color:var(--be-disabled-button)}.flex-container[_ngcontent-%COMP%]{display:flex}.fat-line[_ngcontent-%COMP%]{background-color:var(--be-chip);height:35px;margin-bottom:25px}.separator[_ngcontent-%COMP%]{height:1px;background-color:var(--be-divider-default);margin-bottom:25px;margin-top:25px}.left[_ngcontent-%COMP%]{width:30%}.left[_ngcontent-%COMP%]   .rect[_ngcontent-%COMP%]{height:150px;background-color:var(--be-disabled-toggle);margin-bottom:5px}.left[_ngcontent-%COMP%]   .rect[_ngcontent-%COMP%]:last-of-type{height:250px}.left[_ngcontent-%COMP%]   .line[_ngcontent-%COMP%]{margin-bottom:10px}.right[_ngcontent-%COMP%]{width:70%;padding-left:25px}.right[_ngcontent-%COMP%]   .rect[_ngcontent-%COMP%]{height:300px;margin-bottom:35px;background-color:var(--be-chip)}.right[_ngcontent-%COMP%]   .line[_ngcontent-%COMP%]{margin-bottom:10px}"],changeDetection:0}),t}(),x=n(27701),k=n(69042),Z=n(40450);function w(t,e){1&t&&s._UZ(0,"mat-progress-bar",37)}function A(t,e){if(1&t&&(s.TgZ(0,"div",38),s._uU(1),s.qZA()),2&t){var n=s.oxw();s.xp6(1),s.Oqu(n.errors.name)}}function C(t,e){if(1&t&&(s.TgZ(0,"div",38),s._uU(1),s.qZA()),2&t){var n=s.oxw();s.xp6(1),s.Oqu(n.errors.message)}}function T(t,e){if(1&t&&(s.TgZ(0,"div",38),s._uU(1),s.qZA()),2&t){var n=s.oxw();s.xp6(1),s.Oqu(n.errors.label)}}function q(t,e){if(1&t&&(s.TgZ(0,"div",38),s._uU(1),s.qZA()),2&t){var n=s.oxw();s.xp6(1),s.Oqu(n.errors.btn_link)}}function I(t,e){if(1&t&&(s.TgZ(0,"div",38),s._uU(1),s.qZA()),2&t){var n=s.oxw();s.xp6(1),s.Oqu(n.errors.btn_text)}}function O(t,e){if(1&t&&(s.TgZ(0,"color-picker-input",39),s._uU(1),s.qZA()),2&t){var n=e.$implicit,i=s.oxw();s.Q6J("formControlName",n.key),s.xp6(1),s.Oqu(i.colorViewName(n.key))}}var U=function(){var t=function(){function t(e,n,i,o,a,s,c){d(this,t),this.fb=e,this.linkOverlays=n,this.toast=i,this.i18n=o,this.cd=a,this.router=s,this.route=c,this.loading$=new r.X(!1),this.errors={},this.form=this.fb.group({name:[""],position:[""],theme:[""],message:[""],label:[""],label_position:[""],btn_link:[""],btn_text:[""],colors:this.fb.group({"bg-image":this.fb.control(null),"bg-color":this.fb.control(""),"text-color":this.fb.control(""),"label-bg-color":this.fb.control(""),"label-color":this.fb.control(""),"btn-bg-color":this.fb.control(""),"btn-text-color":this.fb.control("")})})}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.route.params.subscribe(function(e){e.id&&(t.loading$.next(!0),t.linkOverlays.get(e.id).pipe((0,a.x)(function(){return t.loading$.next(!1)})).subscribe(function(e){t.overlay=e.linkOverlay,t.form.patchValue(Object.assign({},t.overlay))}))})}},{key:"ngAfterViewInit",value:function(){this.route.snapshot.params.id||this.form.patchValue(Object.assign({},this.getDefaultValue()))}},{key:"canDeactivate",value:function(){return!this.form.dirty}},{key:"confirm",value:function(){var t=this;this.loading$.next(!0);var e=this.overlay?this.linkOverlays.update(this.overlay.id,this.form.value):this.linkOverlays.create(this.form.value),n=this.overlay?o.V.LINK_OVERLAY_UPDATE_SUCCESS:o.V.LINK_OVERLAY_CREATE_SUCCESS;e.pipe((0,a.x)(function(){return t.loading$.next(!1)})).subscribe(function(){t.toast.open(n),t.form.markAsPristine(),t.router.navigate([t.route.snapshot.params.id?"../../":"../"],{relativeTo:t.route})},function(e){t.errors=e.errors,t.cd.markForCheck()})}},{key:"colorControls",value:function(){return this.form.get("colors").controls}},{key:"colorViewName",value:function(t){return t.replace(/-/g," ").replace("bg","background").replace("btn","button")}},{key:"getDefaultValue",value:function(){var t={position:"bottom-left",theme:"default",message:this.i18n.t("Your message here"),label:this.i18n.t("Label"),btn_text:this.i18n.t("Button Text"),btn_link:"https://google.com",colors:{}},e=this.overlayCmp.getComputedStyle();return Object.keys(this.colorControls()).forEach(function(n){t.colors[n]=e.getPropertyValue("--"+n).trim()}),t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Y36(c.qu),s.Y36(l.S),s.Y36(u.F),s.Y36(p.Z),s.Y36(s.sBO),s.Y36(h.F0),s.Y36(h.gz))},t.\u0275cmp=s.Xpm({type:t,selectors:[["crupdate-link-overlay-page"]],viewQuery:function(t,e){var n;(1&t&&s.Gf(i.a,7),2&t)&&(s.iGM(n=s.CRH())&&(e.overlayCmp=n.first))},decls:74,vars:29,consts:[[1,"left"],["mode","indeterminate","color","accent",4,"ngIf"],["ngNativeValidate","",3,"formGroup","ngSubmit"],["color","accent","animationDuration","200ms"],[3,"label"],[1,"many-inputs","tab-body-wrapper"],[1,"input-container"],["for","name","trans",""],["type","text","id","name","formControlName","name","required",""],["class","error",4,"ngIf"],["for","position","trans",""],["id","position","formControlName","position","required",""],["value","top-left","trans",""],["value","top-right","trans",""],["value","bottom-left","trans",""],["value","bottom-right","trans",""],["for","link-overlay-theme","trans",""],["id","link-overlay-theme","formControlName","theme","required",""],["value","default","trans",""],["value","full-width","trans",""],["value","rounded","trans",""],["value","pill","trans",""],["for","message","trans",""],["id","message","formControlName","message","maxlength","200","required",""],["for","label","trans",""],["type","text","id","label","formControlName","label","maxlength","8"],["for","btn_link","trans",""],["type","url","id","btn_link","formControlName","btn_link"],["for","btn_text","trans",""],["type","text","id","btn_text","formControlName","btn_text","maxlength","30"],["mat-raised-button","","color","accent","trans","",3,"disabled"],["formGroupName","colors",1,"tab-body-wrapper"],["formControlName","bg-image","diskPrefix","link-overlay-images",1,"overlay-bg-input"],[3,"formControlName",4,"ngFor","ngForOf"],[1,"right"],[3,"overlay"],[1,"cdk-overlay-backdrop","cdk-overlay-backdrop-showing","cdk-overlay-dark-backdrop"],["mode","indeterminate","color","accent"],[1,"error"],[3,"formControlName"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.YNc(1,w,1,0,"mat-progress-bar",1),s.ALo(2,"async"),s.TgZ(3,"form",2),s.NdJ("ngSubmit",function(){return e.confirm()}),s.TgZ(4,"mat-tab-group",3),s.TgZ(5,"mat-tab",4),s.ALo(6,"trans"),s.TgZ(7,"div",5),s.TgZ(8,"div",6),s.TgZ(9,"label",7),s._uU(10,"Name"),s.qZA(),s._UZ(11,"input",8),s.YNc(12,A,2,1,"div",9),s.qZA(),s.TgZ(13,"div",6),s.TgZ(14,"label",10),s._uU(15,"Position"),s.qZA(),s.TgZ(16,"select",11),s.TgZ(17,"option",12),s._uU(18,"Top Left"),s.qZA(),s.TgZ(19,"option",13),s._uU(20,"Top Right"),s.qZA(),s.TgZ(21,"option",14),s._uU(22,"Bottom Left"),s.qZA(),s.TgZ(23,"option",15),s._uU(24,"Bottom Right"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(25,"div",6),s.TgZ(26,"label",16),s._uU(27,"Theme"),s.qZA(),s.TgZ(28,"select",17),s.TgZ(29,"option",18),s._uU(30,"Default"),s.qZA(),s.TgZ(31,"option",19),s._uU(32,"Full Width"),s.qZA(),s.TgZ(33,"option",20),s._uU(34,"Rounded"),s.qZA(),s.TgZ(35,"option",21),s._uU(36,"Pill"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(37,"div",6),s.TgZ(38,"label",22),s._uU(39,"Message"),s.qZA(),s._UZ(40,"textarea",23),s.YNc(41,C,2,1,"div",9),s.qZA(),s.TgZ(42,"div",6),s.TgZ(43,"label",24),s._uU(44,"Label"),s.qZA(),s._UZ(45,"input",25),s.YNc(46,T,2,1,"div",9),s.qZA(),s.TgZ(47,"div",6),s.TgZ(48,"label",26),s._uU(49,"Button Link"),s.qZA(),s._UZ(50,"input",27),s.YNc(51,q,2,1,"div",9),s.qZA(),s.TgZ(52,"div",6),s.TgZ(53,"label",28),s._uU(54,"Button Text"),s.qZA(),s._UZ(55,"input",29),s.YNc(56,I,2,1,"div",9),s.qZA(),s.TgZ(57,"button",30),s.ALo(58,"async"),s._uU(59),s.qZA(),s.qZA(),s.qZA(),s.TgZ(60,"mat-tab",4),s.ALo(61,"trans"),s.TgZ(62,"div",31),s._UZ(63,"upload-image-control",32),s.YNc(64,O,2,2,"color-picker-input",33),s.ALo(65,"keyvalue"),s.TgZ(66,"button",30),s.ALo(67,"async"),s._uU(68),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(69,"div",34),s._UZ(70,"generic-page-preview"),s._UZ(71,"link-overlay",35),s.ALo(72,"async"),s._UZ(73,"div",36),s.qZA()),2&t&&(s.xp6(1),s.Q6J("ngIf",s.lcZ(2,15,e.loading$)),s.xp6(2),s.Q6J("formGroup",e.form),s.xp6(2),s.Q6J("label",s.lcZ(6,17,"General")),s.xp6(7),s.Q6J("ngIf",e.errors.name),s.xp6(29),s.Q6J("ngIf",e.errors.message),s.xp6(5),s.Q6J("ngIf",e.errors.label),s.xp6(5),s.Q6J("ngIf",e.errors.btn_link),s.xp6(5),s.Q6J("ngIf",e.errors.btn_text),s.xp6(1),s.Q6J("disabled",s.lcZ(58,19,e.loading$)),s.xp6(2),s.hij(" ",e.overlay?"Update":"Create"," "),s.xp6(1),s.Q6J("label",s.lcZ(61,21,"Design")),s.xp6(4),s.Q6J("ngForOf",s.lcZ(65,23,e.colorControls())),s.xp6(2),s.Q6J("disabled",s.lcZ(67,25,e.loading$)),s.xp6(2),s.hij(" ",e.overlay?"Update":"Create"," "),s.xp6(3),s.Q6J("overlay",s.lcZ(72,27,e.form.valueChanges)))},directives:[f.O5,c.JL,c.sg,m.SP,m.uX,v.P,c.Fj,c.JJ,c.u,c.Q7,c.EJ,c.YN,c.Kr,c.nD,b.lW,c.x0,y.V,f.sg,_,i.a,x.pW,k.M],pipes:[f.Ov,Z.R,f.Nd],styles:["[_nghost-%COMP%]{display:flex;height:calc(100vh - 70px);margin:-25px}.left[_ngcontent-%COMP%], .right[_ngcontent-%COMP%]{flex:1 1 auto}.left[_ngcontent-%COMP%]{max-width:300px;padding:10px 20px 20px;background-color:var(--be-background);border-right:1px solid var(--be-divider-default);overflow:auto;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);z-index:1}.left[_ngcontent-%COMP%], .right[_ngcontent-%COMP%]{position:relative}.mat-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0}  crupdate-link-overlay-page .mat-tab-label{width:50%;min-width:0;min-width:auto}.tab-body-wrapper[_ngcontent-%COMP%]{padding-top:15px}link-overlay[_ngcontent-%COMP%]{z-index:1001}.overlay-bg-input[_ngcontent-%COMP%]{margin-bottom:10px;height:80px;width:100%;border:1px solid var(--be-divider-default)}.overlay-bg-input[_ngcontent-%COMP%] .action-buttons{bottom:23px}"],changeDetection:0}),t}()},75950:function(t,e,n){"use strict";n.d(e,{m:function(){return B}});var i=n(67455),o=n(36024),a=n(72686),r=n(56515),s=n(44415),c=n(59075),l=n(45523),u=[new c.XQ({type:c.Bq.Select,key:"theme",defaultValue:"default",description:"Active theme for link overlay",options:[{key:"default",value:"default"},{key:"full-width",value:"full-width"},{key:"rounded",value:"rounded"},{key:"pill",value:"pill"}]}),new l.T7({description:"Date overlay was created"}),new l.yH({description:"Date overlay was last updated"}),new c.XQ({type:c.Bq.SelectModel,key:"user_id",label:"User",description:"User overlay was created by",component:s.y})],p=n(35366),h=n(28505),f=n(36501),m=n(73234),v=n(63337),b=n(95157),y=n(48865),_=n(38116),x=n(49517),k=n(34955),Z=n(56361),w=n(84369),A=n(77307),C=n(61116),T=n(13536),q=n(80922),I=n(86668),O=n(27701),U=n(54275),P=n(24311),M=n(71765),S=n(47210),N=n(2406),J=n(40450);function E(t,e){1&t&&p._UZ(0,"mat-progress-bar",18)}function L(t,e){1&t&&(p.TgZ(0,"th",1),p._uU(1,"Owner"),p.qZA())}var D=function(t){return{count:t,resource:"overlay(s)"}};function R(t,e){if(1&t){var n=p.EpF();p.TgZ(0,"tr"),p.TgZ(1,"th",19),p.TgZ(2,"div",20),p._uU(3," :count :resource selected: "),p.qZA(),p.TgZ(4,"div",21),p.TgZ(5,"permission-aware-button",22),p.TgZ(6,"button",23),p.NdJ("click",function(){return p.CHM(n),p.oxw().maybeDeleteSelectedOverlays()}),p._uU(7," Delete "),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA()}if(2&t){var i=e.ngIf;p.xp6(2),p.Q6J("transValues",p.VKq(1,D,i))}}function Y(t,e){if(1&t&&(p.TgZ(0,"td",39),p._UZ(1,"user-column",40),p.qZA()),2&t){var n=p.oxw().$implicit;p.xp6(1),p.Q6J("user",n.user)}}var F=function(t){return["edit",t]};function Q(t,e){if(1&t){var n=p.EpF();p.TgZ(0,"tr"),p._UZ(1,"td",24),p.TgZ(2,"td",25),p._uU(3),p.qZA(),p.YNc(4,Y,2,1,"td",26),p.TgZ(5,"td",27),p._uU(6),p.qZA(),p.TgZ(7,"td",28),p._uU(8),p.qZA(),p.TgZ(9,"td",29),p._UZ(10,"mat-icon",30),p.qZA(),p.TgZ(11,"td",31),p._uU(12),p.ALo(13,"formattedDate"),p.qZA(),p.TgZ(14,"td",32),p.TgZ(15,"permission-aware-button",33),p.TgZ(16,"button",34),p.ALo(17,"trans"),p._UZ(18,"mat-icon",35),p.qZA(),p.qZA(),p.TgZ(19,"permission-aware-button",36),p.TgZ(20,"button",37),p.NdJ("click",function(){var t=p.CHM(n).$implicit;return p.oxw().maybeDeleteSelectedOverlays([t.id])}),p._UZ(21,"mat-icon",38),p.qZA(),p.qZA(),p.qZA(),p.qZA()}if(2&t){var i=e.$implicit,o=p.oxw();p.xp6(1),p.Q6J("table-body-checkbox",i.id),p.xp6(2),p.Oqu(i.name),p.xp6(1),p.Q6J("ngIf",o.showUserColumn()),p.xp6(2),p.Oqu(i.message),p.xp6(2),p.Oqu(i.btn_text),p.xp6(2),p.Udp("color",i.colors["bg-color"]),p.xp6(2),p.Oqu(p.lcZ(13,11,i.updated_at)),p.xp6(3),p.Q6J("userOwnsResource",o.currentUser.get("id")===i.user_id),p.xp6(1),p.Q6J("routerLink",p.VKq(15,F,i.id))("matTooltip",p.lcZ(17,13,"Edit overlay"))}}function $(t,e){1&t&&(p.TgZ(0,"no-results-message",41),p.TgZ(1,"span",42),p._uU(2,"No link overlays have been created yet"),p.qZA(),p.qZA())}var B=function(){var t=function(){function t(e,n,i,o,a,r,s,c){d(this,t),this.datatable=e,this.currentUser=n,this.linkUsage=i,this.linkOverlays=o,this.toast=a,this.route=r,this.workspaces=s,this.activeSection=c,this.filters=u,this.overlays$=this.datatable.data$}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.workspaceSub=this.workspaces.activeId$.subscribe(function(){t.setFilters()}),this.datatable.init({uri:a.S.BASE_URI,staticParams:{with:["user"],userId:this.showUserColumn()?null:this.currentUser.get("id")}})}},{key:"ngOnDestroy",value:function(){this.workspaceSub.unsubscribe()}},{key:"maybeDeleteSelectedOverlays",value:function(t){var e=this;this.datatable.confirmResourceDeletion("link overlays").subscribe(function(){e.linkOverlays.delete(t||e.datatable.selectedRows$.value).subscribe(function(){e.datatable.reset(),e.linkUsage.reload(),e.toast.open(i.V.LINK_OVERLAY_DELETE_SUCCESS)},function(t){e.toast.open(t.message||o.v.Default)})})}},{key:"showUserColumn",value:function(){return this.activeSection.admin||!!this.workspaces.activeId$.value}},{key:"setFilters",value:function(){var t=this;this.filters=u.filter(function(e){return"user_id"!==e.key||t.showUserColumn()})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(p.Y36(r.x),p.Y36(h.I),p.Y36(f.F),p.Y36(a.S),p.Y36(m.F),p.Y36(v.gz),p.Y36(b.b),p.Y36(y.W))},t.\u0275cmp=p.Xpm({type:t,selectors:[["link-overlay-index"]],features:[p._Bn([r.x])],decls:41,vars:12,consts:[[1,"datatable-page-header"],["trans",""],[1,"header"],["pluralName","overlays",3,"filters"],[1,"action-buttons"],["permission","link_overlays.create"],["mat-raised-button","","color","accent","routerLink","new",1,"button-with-icon"],["svgIcon","add"],[1,"datatable","responsive-table"],["class","loading-bar","mode","indeterminate","color","accent",4,"ngIf"],[1,"material-table"],["table-header-checkbox",""],["table-sort-header","","trans",""],["trans","",4,"ngIf"],["table-sort-header","clicks_count"],[4,"ngIf"],[4,"ngFor","ngForOf"],["svgImage","popular.svg",4,"ngIf"],["mode","indeterminate","color","accent",1,"loading-bar"],["colspan","8"],["trans","",1,"bulk-actions-title",3,"transValues"],[1,"bulk-actions"],["permission","link_overlays.delete"],["type","button","mat-raised-button","","color","warn","trans","",3,"click"],[3,"table-body-checkbox"],["data-label","Name"],["data-label","Owner",4,"ngIf"],["data-label","Message"],["data-label","Action"],["data-label","Color"],["svgIcon","drop-custom",1,"color-icon"],["data-label","Last Updated"],[1,"edit-column"],["permission","link_overlays.update",3,"userOwnsResource"],["mat-icon-button","",3,"routerLink","matTooltip"],["svgIcon","edit"],["permission","link_overlays.delete",1,"visible-on-mobile"],["type","button","mat-icon-button","","trans","",3,"click"],["svgIcon","delete"],["data-label","Owner"],[3,"user"],["svgImage","popular.svg"],["primary-text","","trans",""]],template:function(t,e){1&t&&(p.TgZ(0,"div",0),p.TgZ(1,"h1",1),p.TgZ(2,"span",1),p._uU(3,"Link Overlays"),p.qZA(),p.TgZ(4,"info-popover"),p.TgZ(5,"span",1),p._uU(6,"Display fully customizable overlay with a message and call-to-action button over destination website."),p.qZA(),p.qZA(),p.qZA(),p.TgZ(7,"div",2),p._UZ(8,"datatable-filters",3),p.TgZ(9,"div",4),p.TgZ(10,"permission-aware-button",5),p.TgZ(11,"button",6),p._UZ(12,"mat-icon",7),p.TgZ(13,"span",1),p._uU(14,"Add New Overlay"),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.qZA(),p.TgZ(15,"div",8),p.YNc(16,E,1,0,"mat-progress-bar",9),p.ALo(17,"async"),p.TgZ(18,"table",10),p.TgZ(19,"thead"),p.TgZ(20,"tr"),p._UZ(21,"th",11),p.TgZ(22,"th",12),p._uU(23,"Name"),p.qZA(),p.YNc(24,L,2,0,"th",13),p.TgZ(25,"th",14),p._uU(26,"Message"),p.qZA(),p.TgZ(27,"th",1),p._uU(28,"Action"),p.qZA(),p.TgZ(29,"th",1),p._uU(30,"Color"),p.qZA(),p.TgZ(31,"th",1),p._uU(32,"Last Updated"),p.qZA(),p._UZ(33,"th"),p.qZA(),p.YNc(34,R,8,3,"tr",15),p.qZA(),p.TgZ(35,"tbody"),p.YNc(36,Q,22,17,"tr",16),p.ALo(37,"async"),p.qZA(),p.qZA(),p.YNc(38,$,3,0,"no-results-message",17),p.ALo(39,"async"),p._UZ(40,"datatable-footer"),p.qZA()),2&t&&(p.xp6(8),p.Q6J("filters",e.filters),p.xp6(8),p.Q6J("ngIf",p.lcZ(17,6,e.datatable.paginator&&e.datatable.paginator.loading$)),p.xp6(8),p.Q6J("ngIf",e.showUserColumn()),p.xp6(10),p.Q6J("ngIf",e.datatable.selectedRows$.value.length),p.xp6(2),p.Q6J("ngForOf",p.lcZ(37,8,e.overlays$)),p.xp6(2),p.Q6J("ngIf",p.lcZ(39,10,e.datatable.paginator.noResults$)))},directives:[_.P,x.N,k.h,Z.v,w.lW,v.rH,A.Hw,C.O5,T.e,q.p,C.sg,I.V,O.pW,U.O,P.gM,M.r,S.U],pipes:[C.Ov,N.l,J.R],styles:["h1[_ngcontent-%COMP%]{display:flex;align-items:center}.info-button[_ngcontent-%COMP%]{color:var(--be-secondary-text)}"],changeDetection:0}),t}()},72686:function(t,e,n){"use strict";n.d(e,{S:function(){return a}});var i=n(35366),o=n(68515),a=function(){var t=function(){function t(e){d(this,t),this.http=e}return g(t,[{key:"index",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.http.get("".concat(t.BASE_URI),e)}},{key:"get",value:function(e){return this.http.get("".concat(t.BASE_URI,"/").concat(e))}},{key:"create",value:function(e){return this.http.post(t.BASE_URI,e)}},{key:"update",value:function(e,n){return this.http.put("".concat(t.BASE_URI,"/").concat(e),n)}},{key:"delete",value:function(e){return this.http.delete("".concat(t.BASE_URI,"/").concat(e))}}]),t}();return t.BASE_URI="link-overlay",t.\u0275fac=function(e){return new(e||t)(i.LFG(o.r))},t.\u0275prov=i.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},87829:function(t,e,n){"use strict";n.d(e,{P:function(){return B}});var i,o,a=n(64762),r=n(92935),s=n(78512),c=n(32198),l=n(67455),u=n(99713),p=n(11520),h=n(8839),f="function"==typeof Map?new Map:(i=[],o=[],{has:function(t){return i.indexOf(t)>-1},get:function(t){return o[i.indexOf(t)]},set:function(t,e){-1===i.indexOf(t)&&(i.push(t),o.push(e))},delete:function(t){var e=i.indexOf(t);e>-1&&(i.splice(e,1),o.splice(e,1))}}),m=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(i){m=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!1),e}}function v(t){var e=f.get(t);e&&e.destroy()}function b(t){var e=f.get(t);e&&e.update()}var y=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((y=function(t){return t}).destroy=function(t){return t},y.update=function(t){return t}):((y=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!f.has(t)){var e,n=null,i=null,o=null,a=function(){t.clientWidth!==i&&l()},r=(function(e){window.removeEventListener("resize",a,!1),t.removeEventListener("input",l,!1),t.removeEventListener("keyup",l,!1),t.removeEventListener("autosize:destroy",r,!1),t.removeEventListener("autosize:update",l,!1),Object.keys(e).forEach(function(n){t.style[n]=e[n]}),f.delete(t)}).bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",r,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",l,!1),window.addEventListener("resize",a,!1),t.addEventListener("input",l,!1),t.addEventListener("autosize:update",l,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",f.set(t,{destroy:r,update:l}),"vertical"===(e=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===e.resize&&(t.style.resize="horizontal"),n="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(n)&&(n=0),l()}function s(e){var n=t.style.width;t.style.width="0px",t.style.width=n,t.style.overflowY=e}function c(){if(0!==t.scrollHeight){var e=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return e}(t),o=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+n+"px",i=t.clientWidth,e.forEach(function(t){t.node.scrollTop=t.scrollTop}),o&&(document.documentElement.scrollTop=o)}}function l(){c();var e=Math.round(parseFloat(t.style.height)),n=window.getComputedStyle(t,null),i="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):t.offsetHeight;if(i<e?"hidden"===n.overflowY&&(s("scroll"),c(),i="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==n.overflowY&&(s("hidden"),c(),i="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),o!==i){o=i;var a=m("autosize:resized");try{t.dispatchEvent(a)}catch(t){}}}}(t)}),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],v),t},y.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],b),t});var _=y,x=n(63589),k=n(35366),Z=n(38116),w=n(61116),A=n(78671);function C(t,e){if(1&t&&k._UZ(0,"share-link-btns",2),2&t){var n=k.oxw();k.Q6J("showCopyBtn",!0)("link",n.data.link)}}var T=function(){var t=function t(e){d(this,t),this.data=e,this.message=this.data.createMsg||l.V.LINK_CREATE_SUCCESS};return t.\u0275fac=function(e){return new(e||t)(k.Y36(x.qD))},t.\u0275cmp=k.Xpm({type:t,selectors:[["link-created-message"]],decls:3,vars:2,consts:[["trans",""],[3,"showCopyBtn","link",4,"ngIf"],[3,"showCopyBtn","link"]],template:function(t,e){1&t&&(k.TgZ(0,"div",0),k._uU(1),k.qZA(),k.YNc(2,C,1,2,"share-link-btns",1)),2&t&&(k.xp6(1),k.Oqu(e.message),k.xp6(1),k.Q6J("ngIf",e.data.link))},directives:[Z.P,w.O5,A.t],styles:["[_nghost-%COMP%]{display:flex;align-items:center}share-link-btns[_ngcontent-%COMP%]{margin-left:auto}  .link-created-snackbar{padding-top:4px;padding-bottom:4px}"],changeDetection:0}),t}(),q=n(84222),I=n(73234),O=n(541),U=n(28505),P=n(88195),M=n(3950),S=n(2862),N=["textarea"];function J(t,e){1&t&&(k.TgZ(0,"span"),k._uU(1,"Edit Link"),k.qZA())}function E(t,e){1&t&&(k.TgZ(0,"span",10),k._uU(1,"New Link"),k.qZA())}function L(t,e){if(1&t&&(k.TgZ(0,"div",23),k._uU(1),k.qZA()),2&t){var n=k.oxw(2).ngIf;k.xp6(1),k.Oqu(n.long_urls)}}function D(t,e){if(1&t&&(k.TgZ(0,"div",18),k.TgZ(1,"label",19),k._uU(2,"Multiple URLs (one per line)"),k.qZA(),k._UZ(3,"textarea",20,21),k.YNc(5,L,2,1,"div",22),k.qZA()),2&t){var n=k.oxw().ngIf;k.xp6(5),k.Q6J("ngIf",n.long_urls)}}function R(t,e){if(1&t&&(k.ynx(0),k.TgZ(1,"button",29),k.TgZ(2,"span",10),k._uU(3),k.qZA(),k._UZ(4,"mat-icon",30),k.qZA(),k._UZ(5,"link-type-menu",31,32),k.ALo(7,"async"),k.BQk()),2&t){var n=k.MAs(6),i=k.oxw(3);k.xp6(1),k.Q6J("matMenuTriggerFor",n.matMenu),k.xp6(2),k.Oqu(i.typeViewName()),k.xp6(2),k.Q6J("linkOptions",k.lcZ(7,3,i.linkOptions$))}}function Y(t,e){if(1&t&&(k.TgZ(0,"div",23),k._uU(1),k.qZA()),2&t){var n=k.oxw(2).ngIf;k.xp6(1),k.Oqu(n.long_url)}}function F(t,e){if(1&t){var n=k.EpF();k.TgZ(0,"div",24),k.TgZ(1,"label",25),k._uU(2,"Paste long url"),k.qZA(),k.TgZ(3,"div",26),k.TgZ(4,"textarea",27,21),k.NdJ("enterPressed",function(){return k.CHM(n),k.oxw(2).createOrUpdate()}),k.qZA(),k.YNc(6,R,8,5,"ng-container",28),k.qZA(),k.YNc(7,Y,2,1,"div",22),k.qZA()}if(2&t){var i=k.oxw().ngIf,o=k.oxw();k.xp6(4),k.Q6J("minlength",o.minLen)("maxlength",o.maxLen),k.xp6(2),k.Q6J("ngIf",o.settings.get("links.enable_type")),k.xp6(1),k.Q6J("ngIf",i.long_url)}}function Q(t,e){if(1&t){var n=k.EpF();k.ynx(0,11),k.YNc(1,D,6,1,"div",12),k.YNc(2,F,8,4,"ng-template",null,13,k.W1O),k.TgZ(4,"div",14),k.TgZ(5,"button",15),k.NdJ("click",function(){return k.CHM(n),k.oxw().toggleOptions()}),k._UZ(6,"mat-icon",16),k.TgZ(7,"span",10),k._uU(8,"Advanced Options"),k.qZA(),k.qZA(),k.qZA(),k._UZ(9,"link-options-form",17),k.ALo(10,"async"),k.ALo(11,"async"),k.BQk()}if(2&t){var i=k.MAs(3),o=k.oxw();k.Q6J("formGroup",o.linkForm.formGroup),k.xp6(1),k.Q6J("ngIf",o.data.batch)("ngIfElse",i),k.xp6(8),k.Q6J("featuresToHide",o.data.featuresToHide)("@bodyExpansion",k.lcZ(10,7,o.optionsVisible$))("linkOptions",k.lcZ(11,9,o.linkOptions$))("batch",o.data.batch)}}function $(t,e){if(1&t&&k._UZ(0,"share-link-btns",33),2&t){var n=k.oxw();k.Q6J("showCopyBtn",!0)("link",n.data.link)}}var B=function(){var t=function(){function t(e,n,i,o,a,r,c,l,u,p){d(this,t),this.dialogRef=e,this.data=n,this.linkForm=i,this.links=o,this.toast=a,this.selectValues=r,this.currentUser=c,this.settings=l,this.i18n=u,this.recaptcha=p,this.loading$=new s.X(!1),this.updating$=new s.X(!1),this.optionsVisible$=new s.X(!1),this.linkOptions$=new s.X(null),this.minLen=this.settings.get("links.min_len"),this.maxLen=this.settings.get("links.max_len"),n.link&&(this.updating$.next(!0),this.linkForm.patchValue(n.link))}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.selectValues.get().subscribe(function(e){t.linkOptions$.next(e)})}},{key:"ngAfterViewInit",value:function(){_(this.textarea.nativeElement)}},{key:"createOrUpdate",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.getPayload(),!this.urlInvalid(e.long_url)){t.next=5;break}t.t0=this.linkForm.setErrors({long_url:this.i18n.t("This url is invalid.")}),t.next=14;break;case 5:return this.loading$.next(!0),t.next=8,this.recaptcha.verify("link_creation");case 8:if(!t.sent){t.next=12;break}t.t1=void(this.updating$.value?this.links.update(this.data.link.id,e):this.links.create(e)).pipe((0,p.x)(function(){return n.loading$.next(!1)})).subscribe(function(t){n.updating$.value?n.toast.open(l.V.LINK_UPDATE_SUCCESS):n.toast.openComponent(T,{data:{link:t.link,createMsg:n.data.createMsg},duration:6e3,panelClass:"link-created-snackbar"}),n.close(t.link)},function(t){return n.linkForm.setErrors(t.errors)}),t.next=13;break;case 12:t.t1=this.loading$.next(!1);case 13:t.t0=t.t1;case 14:return t.abrupt("return",t.t0);case 15:case"end":return t.stop()}},t,this)}))}},{key:"shortenBatchUrls",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=this.getPayload()).long_urls.some(function(t){return n.urlInvalid(t)})){t.next=5;break}t.t0=this.linkForm.setErrors({long_urls:this.i18n.t("Some of the urls are not valid.")}),t.next=14;break;case 5:return this.loading$.next(!0),t.next=8,this.recaptcha.verify("link_creation");case 8:if(!t.sent){t.next=12;break}t.t1=void this.links.createBatch(e).pipe((0,p.x)(function(){return n.loading$.next(!1)})).subscribe(function(t){n.toast.open(l.V.MULTIPLE_LINKS_CREATE_SUCCESS),n.close(t.links)},function(t){return n.linkForm.setErrors(t.errors)}),t.next=13;break;case 12:t.t1=this.loading$.next(!1);case 13:t.t0=t.t1;case 14:return t.abrupt("return",t.t0);case 15:case"end":return t.stop()}},t,this)}))}},{key:"close",value:function(t){this.dialogRef.close(t)}},{key:"toggleOptions",value:function(){this.optionsVisible$.next(!this.optionsVisible$.value)}},{key:"typeViewName",value:function(){return this.linkForm.formGroup.get("type").value.split(":")[0]}},{key:"getPayload",value:function(){var t=this.linkForm.value();return this.data.groups&&(t.groups=Object.assign(Object.assign({},t.groups),this.data.groups)),t}},{key:"urlInvalid",value:function(t){return!h({exact:!0,strict:!1}).test(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(k.Y36(r.so),k.Y36(r.WI),k.Y36(c.l),k.Y36(q.M),k.Y36(I.F),k.Y36(O.U),k.Y36(U.I),k.Y36(P.Z),k.Y36(M.Z),k.Y36(S.K))},t.\u0275cmp=k.Xpm({type:t,selectors:[["crupdate-link-modal"]],viewQuery:function(t,e){var n;(1&t&&k.Gf(N,5),2&t)&&(k.iGM(n=k.CRH())&&(e.textarea=n.first))},features:[k._Bn([c.l])],decls:18,vars:11,consts:[[1,"modal-header"],["mat-dialog-title",""],[4,"ngIf","ngIfElse"],["creating",""],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"ngSubmit"],[3,"formGroup",4,"ngIf"],["class","colored dialog-actions-left",3,"showCopyBtn","link",4,"ngIf"],["type","submit","mat-raised-button","","color","accent","trans","",1,"submit-button",3,"disabled"],["trans",""],[3,"formGroup"],["class","input-container",4,"ngIf","ngIfElse"],["single",""],[1,"actions"],["type","button","mat-button","",1,"advanced-options-btn",3,"click"],["svgIcon","settings"],[3,"featuresToHide","linkOptions","batch"],[1,"input-container"],["for","link-dialog-multiple-urls","trans",""],["name","link-dialog-multiple-urls","id","link-dialog-multiple-urls","autocomplete","off","spellcheck","false","formControlName","long_urls",1,"multiple-link-textarea"],["textarea",""],["class","error",4,"ngIf"],[1,"error"],[1,"input-container","link-input-container"],["for","link-dialog-long-url","trans","",1,"hidden"],[1,"input-with-action"],["type","text","id","link-dialog-long-url","autocomplete","off","spellcheck","false","enterKeybind","","formControlName","long_url","placeholder","Enter long url...","trans-placeholder","","required","",1,"single-link-textarea",3,"minlength","maxlength","enterPressed"],[4,"ngIf"],["mat-flat-button","","color","gray","type","button",1,"type-button",3,"matMenuTriggerFor"],["svgIcon","arrow-drop-down"],["formControlName","type",3,"linkOptions"],["linkTypeMenu",""],[1,"colored","dialog-actions-left",3,"showCopyBtn","link"]],template:function(t,e){if(1&t&&(k.TgZ(0,"div",0),k.TgZ(1,"h2",1),k.GkF(2),k.YNc(3,J,2,0,"span",2),k.ALo(4,"async"),k.YNc(5,E,2,0,"ng-template",null,3,k.W1O),k.qZA(),k.TgZ(7,"button",4),k.NdJ("click",function(){return e.close()}),k._UZ(8,"mat-icon",5),k.qZA(),k.qZA(),k.TgZ(9,"form",6),k.NdJ("ngSubmit",function(){return e.data.batch?e.shortenBatchUrls():e.createOrUpdate()}),k.TgZ(10,"mat-dialog-content"),k.YNc(11,Q,12,11,"ng-container",7),k.ALo(12,"async"),k.qZA(),k.TgZ(13,"mat-dialog-actions"),k.YNc(14,$,1,2,"share-link-btns",8),k.TgZ(15,"button",9),k.ALo(16,"async"),k._uU(17," Confirm "),k.qZA(),k.qZA(),k.qZA()),2&t){var n=k.MAs(6);k.xp6(3),k.Q6J("ngIf",k.lcZ(4,5,e.updating$))("ngIfElse",n),k.xp6(8),k.Q6J("ngIf",k.lcZ(12,7,e.linkForm.errors$)),k.xp6(3),k.Q6J("ngIf",e.data.link),k.xp6(1),k.Q6J("disabled",k.lcZ(16,9,e.loading$))}},styles:["[_nghost-%COMP%]{display:block;width:650px;max-width:100%}.single-link-textarea[_ngcontent-%COMP%]{max-height:130px;height:46px;border-right:1px solid var(--be-divider-default)!important}.multiple-link-textarea[_ngcontent-%COMP%]{height:242px;max-height:300px}textarea[_ngcontent-%COMP%]{resize:vertical;word-break:break-all;font-size:1.5rem;line-height:1.5}.link-input-container[_ngcontent-%COMP%]{margin-bottom:5px}.type-container[_ngcontent-%COMP%]{margin-left:auto;width:auto;min-width:100px}.type-button[_ngcontent-%COMP%]{text-transform:capitalize;max-height:46px}.type-button[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{margin-bottom:3px}.advanced-options-btn[_ngcontent-%COMP%]{padding:0 6px;margin-left:-6px;overflow:hidden}.advanced-options-btn[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{margin-right:5px}.dialog-actions-left[_ngcontent-%COMP%]{margin-right:auto}.mat-dialog-actions[_ngcontent-%COMP%]{margin-top:15px}.submit-button[_ngcontent-%COMP%]{width:120px;line-height:40px}@media screen and (max-width:768px){.multiple-toggle[_ngcontent-%COMP%]{display:none}}"],data:{animation:[(0,u.X$)("bodyExpansion",[(0,u.SB)("false",(0,u.oB)({height:"0px",visibility:"hidden"})),(0,u.SB)("true",(0,u.oB)({height:"*",visibility:"visible"})),(0,u.eR)("true <=> false",(0,u.jt)("225ms cubic-bezier(0.4,0.0,0.2,1)"))])]},changeDetection:0}),t}()},541:function(t,e,n){"use strict";n.d(e,{U:function(){return s}});var i=n(25051),o=n(35366),a=n(9823),r=n(28505),s=function(){var t=function(){function t(e,n){d(this,t),this.http=e,this.currentUser=n}return g(t,[{key:"get",value:function(){return this.http.getWithCache("".concat(i.l.BASE_URI,"/").concat(["countries","domains","pages","overlays","pixels","groups"].join(",")),{userId:this.currentUser.get("id"),pageType:"link_page"})}},{key:"clearCache",value:function(){this.http.clearCache()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.LFG(a.F),o.LFG(r.I))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},85706:function(t,e,n){"use strict";n.d(e,{f:function(){return r}});var i=n(59075),o=n(45523),a=n(44415),r=[new i.XQ({type:i.Bq.Select,key:"type",description:"Type of the link",defaultValue:"direct",options:[{key:"All",value:""},{key:"Direct",value:"direct"},{key:"Overlay",value:"overlay"},{key:"Frame",value:"frame"},{key:"Custom Page",value:"link_page"}]}),new i.XQ({type:i.Bq.Select,key:"active",label:"status",defaultValue:!1,description:"Whether link is disabled or not",options:[{key:"enabled",value:!1},{key:"disabled",value:!0}]}),new i.XQ({type:i.Bq.Select,key:"password",description:"Whether link is password protected",options:[{key:"any",value:""},{key:"does not have password",value:{value:null,operator:i.pg.eq}},{key:"has password",value:{value:null,operator:i.pg.ne}}]}),new i.XQ({type:i.Bq.Input,inputType:"number",key:"clicks_count",label:"Click Count",description:"Total number of clicks for link",defaultValue:1,defaultOperator:i.pg.gte,operators:i.Hi}),new o.k4({key:"clicked_at",label:"Clicked At",description:"Date the link was last clicked"}),new o.k4({key:"expires_at",label:"Expires At",description:"Date the link will expire"}),new o.T7({description:"Date link was created"}),new o.yH({description:"Date link was last updated"}),new i.XQ({type:i.Bq.SelectModel,key:"user_id",label:"User",description:"User link was created by",component:a.y})]},32656:function(e,n,i){"use strict";i.d(n,{g:function(){return xt}});var o=i(36024),a=i(87829),r=i(84222),s=i(56515),c=i(67455),l=i(85706),u=i(16980),p=i(78512),h=i(4694),f=i(92935),m=i(40878),v=i(31041),b=i(56238),y=i(47701),_=i(98720),x=i(44689),k=i(47727),Z=i(11520),w=i(79996),A=i(35366),C=i(28505),T=i(73234),q=i(48865),I=i(95157),O=i(38116),U=i(77307),P=i(61116),M=i(27701),S=i(47210),N=i(40985);function J(t,e){1&t&&A._UZ(0,"mat-progress-bar",8)}function E(t,e){if(1&t){var n=A.EpF();A.TgZ(0,"div",12),A.NdJ("click",function(){var t=A.CHM(n).$implicit;return A.oxw(2).confirm(t)}),A._UZ(1,"img",13),A.ALo(2,"favicon"),A.TgZ(3,"button",14),A.ALo(4,"async"),A.TgZ(5,"span",15),A._uU(6),A.qZA(),A.TgZ(7,"span",16),A._uU(8),A.qZA(),A.qZA(),A.qZA()}if(2&t){var i=e.$implicit,o=A.oxw(2);A.xp6(1),A.Q6J("src",A.lcZ(2,4,i.long_url),A.LSH),A.xp6(2),A.Q6J("disabled",A.lcZ(4,6,o.loading$)),A.xp6(3),A.Oqu(i.long_url),A.xp6(2),A.Oqu(i.short_url)}}function L(t,e){1&t&&(A.TgZ(0,"div",17),A.TgZ(1,"no-results-message"),A.TgZ(2,"span",18),A._uU(3,"Could not find any links matching this query."),A.qZA(),A.qZA(),A.qZA())}function D(t,e){if(1&t&&(A.TgZ(0,"div",9),A.YNc(1,E,9,8,"div",10),A.YNc(2,L,4,0,"div",11),A.qZA()),2&t){var n=e.ngIf;A.xp6(1),A.Q6J("ngForOf",n),A.xp6(1),A.Q6J("ngIf",!n.length)}}var R=function(){var t=function(){function t(e,n,i,o,a,r,s,c){d(this,t),this.dialogRef=e,this.data=n,this.linkGroup=i,this.link=o,this.currentUser=a,this.toast=r,this.activeSection=s,this.workspaces=c,this.loading$=new p.X(!1),this.links$=new p.X(null),this.searchControl=new v.NI}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.searchControl.valueChanges.pipe((0,b.O)(""),(0,y.b)(250),(0,_.x)(),(0,x.w)(function(e){return t.findLinks(e)}),(0,k.K)(function(){return(0,m.of)([])})).subscribe(function(e){t.links$.next(e),t.loading$.next(!1)})}},{key:"close",value:function(t){this.dialogRef.close(t)}},{key:"confirm",value:function(t){var e=this;this.loading$.next(!0),this.linkGroup.attach(this.data.groupId,[t.id]).pipe((0,Z.x)(function(){return e.loading$.next(!1)})).subscribe(function(){e.toast.open(c.V.LINK_ATTACH_SUCCESS),e.close(t)})}},{key:"findLinks",value:function(t){this.loading$.next(!0);var e="!"+this.data.groupId,n=this.forCurrentUser()?this.currentUser.get("id"):null;return this.link.index({query:t,userId:n,groupId:e,per_page:8}).pipe((0,w.U)(function(t){return t.pagination.data}))}},{key:"forCurrentUser",value:function(){return!this.activeSection.admin&&!this.workspaces.activeId$.value}}]),t}();return t.\u0275fac=function(e){return new(e||t)(A.Y36(f.so),A.Y36(f.WI),A.Y36(u.L),A.Y36(r.M),A.Y36(C.I),A.Y36(T.F),A.Y36(q.W),A.Y36(I.b))},t.\u0275cmp=A.Xpm({type:t,selectors:[["attach-link-modal"]],decls:12,vars:7,consts:[[1,"modal-header"],["mat-dialog-title","","trans",""],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],[1,"input-container"],["type","text","placeholder","Search for links...",3,"formControl"],["mode","indeterminate","color","accent",4,"ngIf"],["class","links",4,"ngIf"],["mode","indeterminate","color","accent"],[1,"links"],["class","link",3,"click",4,"ngFor","ngForOf"],["class","link",4,"ngIf"],[1,"link",3,"click"],[3,"src"],[1,"meta","overflow-hidden","no-style",3,"disabled"],[1,"long-url","overflow-hidden"],[1,"short-url","overflow-hidden"],[1,"link"],["secondary-text","","trans",""]],template:function(t,e){1&t&&(A.TgZ(0,"div",0),A.TgZ(1,"h2",1),A._uU(2,"Add Existing Links to Group"),A.qZA(),A.TgZ(3,"button",2),A.NdJ("click",function(){return e.close()}),A._UZ(4,"mat-icon",3),A.qZA(),A.qZA(),A.TgZ(5,"mat-dialog-content"),A.TgZ(6,"div",4),A._UZ(7,"input",5),A.YNc(8,J,1,0,"mat-progress-bar",6),A.ALo(9,"async"),A.qZA(),A.YNc(10,D,3,2,"div",7),A.ALo(11,"async"),A.qZA()),2&t&&(A.xp6(7),A.Q6J("formControl",e.searchControl),A.xp6(1),A.Q6J("ngIf",A.lcZ(9,3,e.loading$)),A.xp6(2),A.Q6J("ngIf",A.lcZ(11,5,e.links$)))},directives:[f.uh,O.P,U.Hw,f.xY,v.Fj,v.JJ,v.oH,P.O5,M.pW,P.sg,S.U],pipes:[P.Ov,N.K],styles:["[_nghost-%COMP%]{display:block;width:450px;max-width:100%}.modal-header[_ngcontent-%COMP%]{margin-bottom:15px}.input-container[_ngcontent-%COMP%]{width:100%;margin-bottom:30px;position:relative}.mat-progress-bar[_ngcontent-%COMP%]{position:absolute;bottom:0}.link[_ngcontent-%COMP%]{display:flex;margin-bottom:20px;cursor:pointer}.link[_ngcontent-%COMP%]:hover   .overflow-hidden[_ngcontent-%COMP%]{color:var(--be-primary-default)}.link[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:25px;height:25px;flex-shrink:0;margin-right:10px;border-radius:4px;overflow:hidden}.link[_ngcontent-%COMP%]   .long-url[_ngcontent-%COMP%]{color:var(--be-text);font-weight:500;margin-bottom:5px}.link[_ngcontent-%COMP%]   .short-url[_ngcontent-%COMP%]{color:var(--be-secondary-text);font-size:1.3rem}.overflow-hidden[_ngcontent-%COMP%]{display:block;overflow:hidden;text-overflow:ellipsis}"],changeDetection:0}),t}(),Y=i(63337),F=i(36501),Q=i(37123),$=i(24859),B=i(34955),H=i(84369),V=i(97070),z=i(56361),G=i(13536),j=i(80922),X=i(86668),W=i(54275),K=i(24311),tt=i(19708),et=i(71765),nt=function(){var t=function(){function t(){d(this,t)}return g(t,[{key:"transform",value:function(t){return t&&t.replace(/(^\w+:|^)\/\//,"")}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=A.Yjl({name:"removeProtocol",type:t,pure:!0}),t}(),it=i(40450),ot=i(2406),at=function(t){return{groupName:t}};function rt(t,e){1&t&&(A.TgZ(0,"span",30),A._uU(1,' Links for ":groupName" '),A.qZA()),2&t&&A.Q6J("transValues",A.VKq(1,at,e.ngIf.name))}function st(t,e){if(1&t&&(A.ynx(0),A.TgZ(1,"a",27),A._UZ(2,"mat-icon",28),A.qZA(),A.YNc(3,rt,2,3,"span",29),A.ALo(4,"async"),A.BQk()),2&t){var n=A.oxw();A.xp6(3),A.Q6J("ngIf",A.lcZ(4,1,n.group$))}}function ct(t,e){1&t&&(A.TgZ(0,"span",7),A._uU(1,"Links"),A.qZA())}function lt(t,e){if(1&t){var n=A.EpF();A.TgZ(0,"permission-aware-button",31),A.TgZ(1,"button",12),A.NdJ("click",function(){return A.CHM(n),A.oxw().showAttachLinksToGroupModal()}),A._UZ(2,"mat-icon",32),A.TgZ(3,"span",7),A._uU(4,"Move existing links to this group"),A.qZA(),A.qZA(),A.qZA()}}function ut(t,e){1&t&&A._UZ(0,"mat-progress-bar",33)}function dt(t,e){1&t&&(A.ynx(0),A.TgZ(1,"th",34),A._uU(2,"Owner"),A.qZA(),A.BQk())}function pt(t,e){if(1&t){var n=A.EpF();A.TgZ(0,"button",41),A.NdJ("click",function(){return A.CHM(n),A.oxw(2).maybeDetachLinksFromGroup()}),A._uU(1," Detach from group "),A.qZA()}}var gt=function(t){return{count:t,resource:"link(s)"}};function ht(t,e){if(1&t){var n=A.EpF();A.TgZ(0,"tr"),A.TgZ(1,"th",35),A.TgZ(2,"div",36),A._uU(3," :count :resource selected: "),A.qZA(),A.TgZ(4,"div",37),A.YNc(5,pt,2,0,"button",38),A.TgZ(6,"permission-aware-button",39),A.TgZ(7,"button",40),A.NdJ("click",function(){return A.CHM(n),A.oxw().maybeDeleteSelectedLinks()}),A._uU(8," Delete "),A.qZA(),A.qZA(),A.qZA(),A.qZA(),A.qZA()}if(2&t){var i=e.ngIf,o=A.oxw();A.xp6(2),A.Q6J("transValues",A.VKq(2,gt,i)),A.xp6(3),A.Q6J("ngIf",o.groupId)}}function ft(t,e){if(1&t&&(A.TgZ(0,"td",65),A._UZ(1,"user-column",66),A.qZA()),2&t){var n=A.oxw().$implicit;A.xp6(1),A.Q6J("user",n.user)}}function mt(t,e){1&t&&A._UZ(0,"mat-icon",67)}function vt(t,e){1&t&&(A.TgZ(0,"span"),A._uU(1,"-"),A.qZA())}var bt=function(t,e){return["/",t,"links",e]};function yt(t,e){if(1&t){var n=A.EpF();A.TgZ(0,"tr"),A._UZ(1,"td",42),A.TgZ(2,"td",43),A.TgZ(3,"a",44),A._UZ(4,"img",45),A.ALo(5,"favicon"),A.TgZ(6,"span"),A._uU(7),A.ALo(8,"slice"),A.ALo(9,"removeProtocol"),A.qZA(),A.qZA(),A.TgZ(10,"div",46),A.TgZ(11,"a",47),A._uU(12),A.qZA(),A.qZA(),A.qZA(),A.YNc(13,ft,2,1,"td",48),A.TgZ(14,"td",49),A._uU(15),A.ALo(16,"number"),A.qZA(),A.TgZ(17,"td",50),A._uU(18),A.qZA(),A.TgZ(19,"td",51),A.YNc(20,mt,1,0,"mat-icon",52),A.YNc(21,vt,2,0,"span",1),A.qZA(),A.TgZ(22,"td",53),A._uU(23),A.ALo(24,"trans"),A.ALo(25,"formattedDate"),A.qZA(),A.TgZ(26,"td",54),A._uU(27),A.ALo(28,"formattedDate"),A.qZA(),A.TgZ(29,"td",55),A.TgZ(30,"a",56),A.ALo(31,"trans"),A._UZ(32,"mat-icon",57),A.qZA(),A._UZ(33,"copy-link-btn",58),A.TgZ(34,"permission-aware-button",59),A.TgZ(35,"button",60),A.NdJ("click",function(){var t=A.CHM(n).$implicit;return A.oxw().showCrupdateLinkModal(t)}),A.ALo(36,"trans"),A._UZ(37,"mat-icon",61),A.qZA(),A.qZA(),A.TgZ(38,"permission-aware-button",62),A.TgZ(39,"button",63),A.NdJ("click",function(){var t=A.CHM(n).$implicit;return A.oxw().maybeDeleteSelectedLinks([t.id])}),A.ALo(40,"trans"),A._UZ(41,"mat-icon",64),A.qZA(),A.qZA(),A.qZA(),A.qZA()}if(2&t){var i=e.$implicit,o=A.oxw();A.xp6(1),A.Q6J("table-body-checkbox",i.id),A.xp6(2),A.Q6J("href",i.long_url,A.LSH),A.xp6(1),A.Q6J("src",A.lcZ(5,20,i.long_url),A.LSH),A.xp6(3),A.Oqu(A.Dn7(8,22,A.lcZ(9,26,i.long_url),0,50)),A.xp6(4),A.Q6J("href",i.short_url,A.LSH),A.xp6(1),A.Oqu(i.short_url),A.xp6(1),A.Q6J("ngIf",o.showUserColumn()),A.xp6(2),A.Oqu(A.lcZ(16,28,i.clicks_count)),A.xp6(3),A.Oqu(i.type),A.xp6(2),A.Q6J("ngIf",i.has_password),A.xp6(1),A.Q6J("ngIf",!i.has_password),A.xp6(2),A.hij(" ",i.deleted_at?A.lcZ(24,30,"Expired"):i.expires_at?A.lcZ(25,32,i.expires_at):"-"," "),A.xp6(4),A.Oqu(i.clicked_at?A.lcZ(28,34,i.clicked_at):"-"),A.xp6(3),A.Q6J("routerLink",A.WLB(42,bt,o.getParentRoute(),i.id))("matTooltip",A.lcZ(31,36,"Link Statistics")),A.xp6(3),A.Q6J("model",i),A.xp6(1),A.Q6J("userOwnsResource",i.user_id===o.currentUser.get("id")),A.xp6(1),A.Q6J("matTooltip",A.lcZ(36,38,"Edit link")),A.xp6(3),A.Q6J("userOwnsResource",i.user_id===o.currentUser.get("id")),A.xp6(1),A.Q6J("matTooltip",A.lcZ(40,40,"Delete link"))}}function _t(t,e){1&t&&(A.TgZ(0,"no-results-message",68),A.TgZ(1,"span",69),A._uU(2,"No links have been added yet"),A.qZA(),A.qZA())}var xt=function(){var e=function(){function e(t,n,i,o,a,r,s,c,l,u,g,h){d(this,e),this.datatable=t,this.currentUser=n,this.links=i,this.toast=o,this.route=a,this.linkUsage=r,this.csv=s,this.router=c,this.modal=l,this.groups=u,this.workspaces=g,this.activeSection=h,this.group$=new p.X(null),this.links$=this.datatable.data$}return g(e,[{key:"ngOnInit",value:function(){var t=this;this.workspaceSub=this.workspaces.activeId$.subscribe(function(){t.setFilters()}),this.datatable.init({uri:this.groupId?"".concat(u.L.BASE_URI,"/").concat(this.groupId,"/links"):r.M.BASE_URI,staticParams:{with:["user"],userId:this.showUserColumn()?null:this.currentUser.get("id")}}),this.groupId&&this.datatable.paginator.response$.subscribe(function(e){t.group$.next(null==e?void 0:e.linkGroup)})}},{key:"ngOnDestroy",value:function(){this.workspaceSub.unsubscribe()}},{key:"maybeDeleteSelectedLinks",value:function(t){var e=this;this.datatable.confirmResourceDeletion("links").subscribe(function(){e.links.delete(t||e.datatable.selectedRows$.value).subscribe(function(){e.datatable.reset(),e.linkUsage.reload(),e.toast.open(c.V.LINK_DELETE_SUCCESS)},function(t){e.toast.open(t.message||o.v.Default)})})}},{key:"showAttachLinksToGroupModal",value:function(){var t=this;this.modal.open(R,{groupId:this.groupId}).beforeClosed().subscribe(function(e){e&&t.datatable.reset()})}},{key:"maybeDetachLinksFromGroup",value:function(){var t=this;this.modal.open(h.z,{title:"Detach Links",body:"Are you sure you want to detach selected links from this group?",ok:"Detach"}).afterClosed().subscribe(function(e){e&&t.groups.detach(t.groupId,t.datatable.selectedRows$.value).subscribe(function(){return t.datatable.reset()},function(e){t.toast.open(e.message||o.v.Default)})})}},{key:"showCrupdateLinkModal",value:function(e,n){var i=this;this.datatable.openCrupdateResourceModal(a.P,{link:e,groups:t({},this.groupId,{}),batch:n}).subscribe(function(){return i.linkUsage.reload()})}},{key:"showUserColumn",value:function(){return this.activeSection.admin||!!this.workspaces.activeId$.value}},{key:"setFilters",value:function(){var t=this;this.filters=l.f.filter(function(e){return"user_id"!==e.key||t.showUserColumn()})}},{key:"exportCsv",value:function(){this.csv.export(r.M.EXPORT_CSV_URI,{type:this.activeSection.admin?"all":null})}},{key:"getParentRoute",value:function(){return this.activeSection.admin?"admin":"dashboard"}}]),e}();return e.\u0275fac=function(t){return new(t||e)(A.Y36(s.x),A.Y36(C.I),A.Y36(r.M),A.Y36(T.F),A.Y36(Y.gz),A.Y36(F.F),A.Y36(Q.T),A.Y36(Y.F0),A.Y36($.u),A.Y36(u.L),A.Y36(I.b),A.Y36(q.W))},e.\u0275cmp=A.Xpm({type:e,selectors:[["link-index"]],inputs:{groupId:"groupId"},features:[A._Bn([s.x])],decls:56,vars:18,consts:[[1,"datatable-page-header"],[4,"ngIf"],["trans","",4,"ngIf"],[1,"header"],["pluralName","links",3,"filters"],[1,"action-buttons"],["mat-raised-button","",1,"btn-with-dropdown-icon",3,"matMenuTriggerFor"],["trans",""],["svgIcon","keyboard-arrow-down"],["menu","matMenu"],["permission","link_groups.update",4,"ngIf"],["permission","links.create"],["mat-menu-item","",3,"click"],["svgIcon","add-link"],["svgIcon","export-csv"],["mat-raised-button","","color","accent",1,"button-with-icon",3,"click"],["svgIcon","add"],[1,"datatable","responsive-table"],["class","loading-bar","mode","indeterminate","color","accent",4,"ngIf"],[1,"material-table"],["table-header-checkbox",""],["table-sort-header","clicks_count"],["table-sort-header","","trans",""],["table-sort-header","expires_at","trans",""],["table-sort-header","clicked_at","trans",""],[4,"ngFor","ngForOf"],["svgImage","share-link.svg",4,"ngIf"],["routerLink","../../","mat-icon-button","",1,"back-button"],["svgIcon","arrow-back"],["trans","",3,"transValues",4,"ngIf"],["trans","",3,"transValues"],["permission","link_groups.update"],["svgIcon","shortcut"],["mode","indeterminate","color","accent",1,"loading-bar"],["table-sort-header","user_id","trans",""],["colspan","9"],["trans","",1,"bulk-actions-title",3,"transValues"],[1,"bulk-actions"],["type","button","mat-raised-button","","color","accent","trans","",3,"click",4,"ngIf"],["permission","links.delete"],["type","button","mat-raised-button","","color","warn","trans","",3,"click"],["type","button","mat-raised-button","","color","accent","trans","",3,"click"],[3,"table-body-checkbox"],[1,"link-summary-column","mobile-no-label"],["target","_blank",1,"long-url",3,"href"],["alt","Link favicon",1,"favicon-img",3,"src"],[1,"short-url"],["target","_blank",3,"href"],["data-label","Owner",4,"ngIf"],["data-label","Clicks"],["data-label","Type",1,"capitalize"],["data-label","Password"],["svgIcon","check",4,"ngIf"],["data-label","Expires At"],["data-label","Last Clicked"],[1,"edit-column"],["mat-icon-button","",3,"routerLink","matTooltip"],["svgIcon","analytics"],[3,"model"],["permission","links.update",3,"userOwnsResource"],["mat-icon-button","",3,"matTooltip","click"],["svgIcon","edit"],["permission","links.delete",3,"userOwnsResource"],["mat-icon-button","",1,"visible-on-mobile",3,"matTooltip","click"],["svgIcon","delete"],["data-label","Owner"],[3,"user"],["svgIcon","check"],["svgImage","share-link.svg"],["primary-text","","trans",""]],template:function(t,e){if(1&t&&(A.TgZ(0,"div",0),A.TgZ(1,"h1"),A.YNc(2,st,5,3,"ng-container",1),A.YNc(3,ct,2,0,"span",2),A.qZA(),A.TgZ(4,"div",3),A._UZ(5,"datatable-filters",4),A.TgZ(6,"div",5),A.TgZ(7,"button",6),A.TgZ(8,"span",7),A._uU(9,"More Actions"),A.qZA(),A._UZ(10,"mat-icon",8),A.qZA(),A.TgZ(11,"mat-menu",null,9),A.YNc(13,lt,5,0,"permission-aware-button",10),A.TgZ(14,"permission-aware-button",11),A.TgZ(15,"button",12),A.NdJ("click",function(){return e.showCrupdateLinkModal(null,!0)}),A._UZ(16,"mat-icon",13),A.TgZ(17,"span",7),A._uU(18),A.qZA(),A.qZA(),A.qZA(),A.TgZ(19,"button",12),A.NdJ("click",function(){return e.exportCsv()}),A._UZ(20,"mat-icon",14),A.TgZ(21,"span",7),A._uU(22,"Export links in CSV"),A.qZA(),A.qZA(),A.qZA(),A.TgZ(23,"permission-aware-button",11),A.TgZ(24,"button",15),A.NdJ("click",function(){return e.showCrupdateLinkModal()}),A._UZ(25,"mat-icon",16),A.TgZ(26,"span",7),A._uU(27),A.qZA(),A.qZA(),A.qZA(),A.qZA(),A.qZA(),A.qZA(),A.TgZ(28,"div",17),A.YNc(29,ut,1,0,"mat-progress-bar",18),A.ALo(30,"async"),A.TgZ(31,"table",19),A.TgZ(32,"thead"),A.TgZ(33,"tr"),A._UZ(34,"th",20),A.TgZ(35,"th",7),A._uU(36,"Summary"),A.qZA(),A.YNc(37,dt,3,0,"ng-container",1),A.TgZ(38,"th",21),A._uU(39,"Clicks"),A.qZA(),A.TgZ(40,"th",22),A._uU(41,"Type"),A.qZA(),A.TgZ(42,"th",22),A._uU(43,"Password"),A.qZA(),A.TgZ(44,"th",23),A._uU(45,"Expires At"),A.qZA(),A.TgZ(46,"th",24),A._uU(47,"Last Clicked"),A.qZA(),A._UZ(48,"th"),A.qZA(),A.YNc(49,ht,9,4,"tr",1),A.qZA(),A.TgZ(50,"tbody"),A.YNc(51,yt,42,45,"tr",25),A.ALo(52,"async"),A.qZA(),A.qZA(),A.YNc(53,_t,3,0,"no-results-message",26),A.ALo(54,"async"),A._UZ(55,"datatable-footer"),A.qZA()),2&t){var n=A.MAs(12);A.xp6(2),A.Q6J("ngIf",e.groupId),A.xp6(1),A.Q6J("ngIf",!e.groupId),A.xp6(2),A.Q6J("filters",e.filters),A.xp6(2),A.Q6J("matMenuTriggerFor",n),A.xp6(6),A.Q6J("ngIf",e.groupId),A.xp6(5),A.Oqu(e.groupId?"Add multiple links":"Shorten multiple links"),A.xp6(9),A.Oqu(e.groupId?"Add Link":"Shorten Link"),A.xp6(2),A.Q6J("ngIf",A.lcZ(30,12,e.datatable.paginator&&e.datatable.paginator.loading$)),A.xp6(8),A.Q6J("ngIf",e.showUserColumn()),A.xp6(12),A.Q6J("ngIf",e.datatable.selectedRows$.value.length),A.xp6(2),A.Q6J("ngForOf",A.lcZ(52,14,e.links$)),A.xp6(2),A.Q6J("ngIf",A.lcZ(54,16,e.datatable.paginator.noResults$))}},directives:[P.O5,B.h,H.lW,V.p6,O.P,U.Hw,V.VK,z.v,V.OP,G.e,j.p,P.sg,X.V,Y.yS,H.zs,M.pW,W.O,K.gM,tt.b,et.r,S.U],pipes:[P.Ov,N.K,P.OU,nt,P.JJ,it.R,ot.l],styles:["h1[_ngcontent-%COMP%]{display:flex;align-items:center}.back-button[_ngcontent-%COMP%]{color:var(--be-secondary-text)}.export-csv-button[_ngcontent-%COMP%]{border-color:var(--be-accent-default);min-width:0;min-width:auto;width:42px;padding:0}.export-csv-button[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{margin-bottom:4px}.favicon-img[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle;margin-right:5px}.long-url[_ngcontent-%COMP%]{display:block;font-weight:500;font-size:1.5rem;color:inherit;max-width:90%;overflow:hidden;text-overflow:ellipsis}.short-url[_ngcontent-%COMP%]{display:block;color:var(--be-secondary-text);font-size:1.3rem;white-space:nowrap}.short-url[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:inherit}"],changeDetection:0}),e}()},13571:function(t,e,n){"use strict";n.d(e,{z:function(){return f}});var i=n(78512),o=n(35366),a=n(31041),r=n(25051),s=n(88195),c=n(38116),l=n(61116);function u(t,e){if(1&t&&(o.TgZ(0,"option",5),o._uU(1),o.qZA()),2&t){var n=o.oxw().$implicit;o.Q6J("ngValue",n.id),o.xp6(1),o.hij(" ",n.host," ")}}function p(t,e){if(1&t&&(o.ynx(0),o.YNc(1,u,2,2,"option",7),o.BQk()),2&t){var n=e.$implicit,i=o.oxw().ngIf;o.xp6(1),o.Q6J("ngIf",i!==n.host)}}function h(t,e){if(1&t&&(o.ynx(0),o.TgZ(1,"option",5),o._uU(2),o.qZA(),o.YNc(3,p,2,1,"ng-container",6),o.BQk()),2&t){var n=e.ngIf,i=o.oxw();o.xp6(1),o.Q6J("ngValue",0),o.xp6(1),o.Oqu(n),o.xp6(1),o.Q6J("ngForOf",i.domains)}}var f=function(){var t=function(){function t(e,n,o){d(this,t),this.groupDirective=e,this.valueLists=n,this.settings=o,this.domains=[],this.hideLabel=!1,this.defaultHost$=new i.X(null)}return g(t,[{key:"ngOnChanges",value:function(){this.domains.length&&this.setDefaultHost()}},{key:"ngOnInit",value:function(){this.formControl=this.groupDirective.form.controls[this.controlName]}},{key:"setDefaultHost",value:function(){var t=this.settings.get("custom_domains.default_host");if(t)this.defaultHost$.next(this.domains.find(function(e){return e.host===t}).host);else{var e=this.settings.getBaseUrl().replace(/\/$/,"").replace(/(^\w+:|^)\/\//,"");this.defaultHost$.next(e)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.Y36(a.sg),o.Y36(r.l),o.Y36(s.Z))},t.\u0275cmp=o.Xpm({type:t,selectors:[["domain-form-control"]],inputs:{controlName:"controlName",domains:"domains",hideLabel:"hideLabel"},features:[o.TTD],decls:8,vars:7,consts:[[1,"input-container"],["for","crupdate_group_domain_id","trans",""],["id","crupdate_group_domain_id",3,"formControl"],["trans","",3,"ngValue"],[4,"ngIf"],[3,"ngValue"],[4,"ngFor","ngForOf"],[3,"ngValue",4,"ngIf"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"label",1),o._uU(2,"Domain"),o.qZA(),o.TgZ(3,"select",2),o.TgZ(4,"option",3),o._uU(5,"All my domains (including default)"),o.qZA(),o.YNc(6,h,4,3,"ng-container",4),o.ALo(7,"async"),o.qZA(),o.qZA()),2&t&&(o.xp6(1),o.ekj("hidden",e.hideLabel),o.xp6(2),o.Q6J("formControl",e.formControl),o.xp6(1),o.Q6J("ngValue",null),o.xp6(2),o.Q6J("ngIf",o.lcZ(7,5,e.defaultHost$)))},directives:[c.P,a.EJ,a.JJ,a.oH,a.YN,a.Kr,l.O5,l.sg],pipes:[l.Ov],styles:[""],changeDetection:0}),t}()},53129:function(t,e,n){"use strict";n.d(e,{O:function(){return W}});var i=n(74899),o=n(78512),a=n(92935),r=n(73709),s=n(35366),c=n(31041),l=n(38116),u=n(77307),p=n(84369),h=function(){var t=function(){function t(e,n,i){d(this,t),this.dialogRef=e,this.data=n,this.fb=i,this.form=this.fb.group({utm_source:this.fb.control(null),utm_medium:this.fb.control(null),utm_campaign:this.fb.control(null),utm_term:this.fb.control(null),utm_content:this.fb.control(null)})}return g(t,[{key:"ngOnInit",value:function(){this.hydrateForm()}},{key:"save",value:function(){this.dialogRef.close(this.formToUrlParams().toString())}},{key:"close",value:function(){this.dialogRef.close()}},{key:"hydrateForm",value:function(){if(this.data.utmQuery){var t=new URLSearchParams(this.data.utmQuery),e={};t.forEach(function(t,n){e[n]=t}),this.form.patchValue(e)}}},{key:"formToUrlParams",value:function(){return new URLSearchParams((0,r.N)(this.form.value))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Y36(a.so),s.Y36(a.WI),s.Y36(c.qu))},t.\u0275cmp=s.Xpm({type:t,selectors:[["utm-builder-dialog"]],decls:36,vars:1,consts:[[1,"modal-header"],["mat-dialog-title","","trans",""],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"formGroup","ngSubmit"],[1,"inline-inputs-container","many-inputs"],[1,"input-container"],["for","utm-source","trans",""],["type","text","id","utm-source","placeholder","e.g: adwords, google, facebook","trans-placeholder","","formControlName","utm_source"],["for","utm-medium","trans",""],["type","text","id","utm-medium","placeholder","e.g: banner, email, social post","trans-placeholder","","formControlName","utm_medium"],["for","utm-campaign","trans",""],["type","text","id","utm-campaign","placeholder","e.g: holiday special, birthday promo","trans-placeholder","","formControlName","utm_campaign"],["for","utm-term","trans",""],["type","text","id","utm-term","placeholder","Use to identify ppc keywords","trans-placeholder","","formControlName","utm_term"],["for","utm-content","trans",""],["type","text","id","utm-content","placeholder","Use to differentiate ads or words on a page","trans-placeholder","","formControlName","utm_content"],[1,"widget","widget-info"],["trans",""],["type","submit","mat-raised-button","","color","accent","trans",""]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"h2",1),s._uU(2,"UTM Builder"),s.qZA(),s.TgZ(3,"button",2),s.NdJ("click",function(){return e.close()}),s._UZ(4,"mat-icon",3),s.qZA(),s.qZA(),s.TgZ(5,"form",4),s.NdJ("ngSubmit",function(){return e.save()}),s.TgZ(6,"mat-dialog-content"),s.TgZ(7,"div",5),s.TgZ(8,"div",6),s.TgZ(9,"label",7),s._uU(10,"Source"),s.qZA(),s._UZ(11,"input",8),s.qZA(),s.TgZ(12,"div",6),s.TgZ(13,"label",9),s._uU(14,"Medium"),s.qZA(),s._UZ(15,"input",10),s.qZA(),s.qZA(),s.TgZ(16,"div",5),s.TgZ(17,"div",6),s.TgZ(18,"label",11),s._uU(19,"Campaign"),s.qZA(),s._UZ(20,"input",12),s.qZA(),s.TgZ(21,"div",6),s.TgZ(22,"label",13),s._uU(23,"Term"),s.qZA(),s._UZ(24,"input",14),s.qZA(),s.qZA(),s.TgZ(25,"div",5),s.TgZ(26,"div",6),s.TgZ(27,"label",15),s._uU(28,"Content"),s.qZA(),s._UZ(29,"input",16),s.qZA(),s.qZA(),s.TgZ(30,"div",17),s.TgZ(31,"div",18),s._uU(32," UTM codes specified here will be applied to the link automatically when redirecting from short url to destination url. "),s.qZA(),s.qZA(),s.qZA(),s.TgZ(33,"mat-dialog-actions"),s.TgZ(34,"button",19),s._uU(35,"Save"),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(5),s.Q6J("formGroup",e.form))},directives:[a.uh,l.P,u.Hw,c.JL,c.sg,a.xY,c.Fj,c.JJ,c.u,a.H8,p.lW],styles:["[_nghost-%COMP%]{display:block;width:500px;max-width:100%}.widget[_ngcontent-%COMP%]{background-color:#f3fbf7;max-width:100%;padding:14px;margin:10px 0;border-radius:3px;overflow-wrap:break-word;border-left:5px solid #5ac891}"],changeDetection:0}),t}(),f=n(32198),m=n(88195),v=n(24859),b=n(61116),y=n(77830),_=n(56361),x=n(98081),k=n(13571),Z=n(13070),w=n(13841),A=n(87064),C=n(6006),T=n(77910);function q(t,e){if(1&t&&(s.TgZ(0,"p",35),s._uU(1),s.qZA()),2&t){var n=s.oxw(2).ngIf;s.xp6(1),s.Oqu(n.alias)}}function I(t,e){if(1&t&&(s.TgZ(0,"div",32),s.TgZ(1,"label",33),s._uU(2,"Custom Link ID"),s.qZA(),s._UZ(3,"input",34),s.YNc(4,q,2,1,"p",12),s.qZA()),2&t){var n=s.oxw().ngIf,i=s.oxw();s.xp6(3),s.Q6J("minlength",i.alias.min)("maxlength",i.alias.max)("placeholder",i.linkForm.linkHash.value),s.xp6(1),s.Q6J("ngIf",n.alias)}}function O(t,e){if(1&t&&(s.TgZ(0,"p",35),s._uU(1),s.qZA()),2&t){var n=s.oxw().ngIf;s.xp6(1),s.Oqu(n.password)}}function U(t,e){if(1&t&&(s.TgZ(0,"div",16),s.TgZ(1,"header"),s.TgZ(2,"div",17),s.TgZ(3,"h3",18),s._uU(4,"Domain"),s.qZA(),s.TgZ(5,"p",18),s._uU(6,"Select on which domain should this short link be accessible."),s.qZA(),s.qZA(),s.qZA(),s._UZ(7,"domain-form-control",36),s.qZA()),2&t){var n=s.oxw(2);s.xp6(7),s.Q6J("domains",n.linkOptions.domains)("hideLabel",!0)}}function P(t,e){if(1&t&&(s.TgZ(0,"p",35),s._uU(1),s.qZA()),2&t){var n=s.oxw().ngIf;s.xp6(1),s.Oqu(n.activates_at)}}function M(t,e){if(1&t&&(s.TgZ(0,"p",35),s._uU(1),s.qZA()),2&t){var n=s.oxw().ngIf;s.xp6(1),s.Oqu(n.expires_at)}}function S(t,e){if(1&t&&(s.TgZ(0,"mat-option",40),s._uU(1),s.qZA()),2&t){var n=e.$implicit,i=s.oxw(3);s.Q6J("value",n.id),s.xp6(1),s.Oqu(i.capitalize(n.name))}}function N(t,e){if(1&t&&(s.TgZ(0,"div",16),s.TgZ(1,"header"),s.TgZ(2,"div",17),s.TgZ(3,"h3",18),s._uU(4,"Link Groups"),s.qZA(),s.TgZ(5,"p",18),s._uU(6,"Groups this link should be attached to."),s.qZA(),s.qZA(),s.qZA(),s.TgZ(7,"mat-form-field",37),s.TgZ(8,"mat-label",18),s._uU(9,"Select Groups"),s.qZA(),s.TgZ(10,"mat-select",38),s.YNc(11,S,2,2,"mat-option",39),s.qZA(),s.qZA(),s.qZA()),2&t){var n=s.oxw(2);s.xp6(11),s.Q6J("ngForOf",n.linkOptions.groups)}}function J(t,e){if(1&t&&(s.TgZ(0,"p",35),s._uU(1),s.qZA()),2&t){var n=s.oxw(2).ngIf;s.xp6(1),s.Oqu(n.name)}}function E(t,e){1&t&&(s.TgZ(0,"div",5),s.TgZ(1,"label",48),s._uU(2,"Tags"),s.qZA(),s._UZ(3,"chip-input",49),s.qZA())}function L(t,e){if(1&t&&(s.TgZ(0,"p",35),s._uU(1),s.qZA()),2&t){var n=s.oxw(2).ngIf;s.xp6(1),s.Oqu(n.description)}}function D(t,e){if(1&t&&(s.TgZ(0,"div",41),s.TgZ(1,"header"),s.TgZ(2,"div",17),s.TgZ(3,"h3",18),s._uU(4,"Details"),s.qZA(),s.TgZ(5,"p",18),s._uU(6,"Add title, description and upload an image to personalize the link."),s.qZA(),s.qZA(),s.qZA(),s.TgZ(7,"div",3),s._UZ(8,"upload-image-control",42),s.TgZ(9,"div",5),s.TgZ(10,"label",43),s._uU(11,"Title"),s.qZA(),s._UZ(12,"input",44),s.YNc(13,J,2,1,"p",12),s.qZA(),s.qZA(),s.YNc(14,E,4,0,"div",45),s.TgZ(15,"div",5),s.TgZ(16,"label",46),s._uU(17,"Description"),s.qZA(),s._UZ(18,"textarea",47),s.YNc(19,L,2,1,"p",12),s.qZA(),s.qZA()),2&t){var n=s.oxw().ngIf,i=s.oxw();s.xp6(8),s.Q6J("compact",!0),s.xp6(5),s.Q6J("ngIf",n.name),s.xp6(1),s.Q6J("ngIf",!(null!=i.featuresToHide&&i.featuresToHide.tags)),s.xp6(5),s.Q6J("ngIf",n.description)}}function R(t,e){if(1&t&&(s.TgZ(0,"mat-option",40),s._uU(1),s.qZA()),2&t){var n=e.$implicit,i=s.oxw(3);s.Q6J("value",n.id),s.xp6(1),s.Oqu(i.capitalize(n.name))}}function Y(t,e){if(1&t&&(s.TgZ(0,"div",16),s.TgZ(1,"header"),s.TgZ(2,"div",17),s.TgZ(3,"h3",18),s._uU(4,"Tracking Pixel"),s.qZA(),s.TgZ(5,"p",18),s._uU(6,"Select tracking pixels that should be used for this link."),s.qZA(),s.qZA(),s.qZA(),s.TgZ(7,"mat-form-field",37),s.TgZ(8,"mat-label",18),s._uU(9,"Select Pixels"),s.qZA(),s.TgZ(10,"mat-select",50),s.YNc(11,R,2,2,"mat-option",39),s.qZA(),s.qZA(),s.qZA()),2&t){var n=s.oxw(2);s.xp6(11),s.Q6J("ngForOf",n.linkOptions.pixels)}}function F(t,e){if(1&t){var n=s.EpF();s.TgZ(0,"button",55),s.NdJ("click",function(){return s.CHM(n),s.oxw(3).linkForm.addNewGeoRule()}),s._UZ(1,"mat-icon",56),s.qZA()}}function Q(t,e){if(1&t&&(s.TgZ(0,"option",40),s._uU(1),s.qZA()),2&t){var n=e.$implicit;s.Q6J("value",n.code),s.xp6(1),s.hij(" ",n.name," ")}}function $(t,e){if(1&t){var n=s.EpF();s.TgZ(0,"li",57),s.TgZ(1,"div",58),s.TgZ(2,"label",59),s._uU(3,"Country"),s.qZA(),s.TgZ(4,"select",60),s.YNc(5,Q,2,2,"option",39),s.qZA(),s.qZA(),s.TgZ(6,"div",61),s.TgZ(7,"label",59),s._uU(8,"Url"),s.qZA(),s._UZ(9,"input",62),s.qZA(),s.TgZ(10,"button",63),s.NdJ("click",function(){var t=s.CHM(n).index;return s.oxw(3).linkForm.geoRules.removeAt(t)}),s._UZ(11,"mat-icon",64),s.qZA(),s.qZA()}if(2&t){var i=e.$implicit,o=e.index,a=s.oxw(3);s.xp6(1),s.Q6J("formGroup",i),s.xp6(1),s.Q6J("for","link_dialog_country-"+o),s.xp6(2),s.Q6J("id","link_dialog_country-"+o),s.xp6(1),s.Q6J("ngForOf",a.linkOptions.countries),s.xp6(1),s.Q6J("formGroup",i),s.xp6(1),s.Q6J("for","link_dialog_geo_url-"+o),s.xp6(2),s.Q6J("id","link_dialog_geo_url-"+o),s.xp6(1),s.Q6J("disabled",i.disabled)}}function B(t,e){if(1&t){var n=s.EpF();s.TgZ(0,"button",55),s.NdJ("click",function(){return s.CHM(n),s.oxw(3).linkForm.addNewDeviceRule()}),s._UZ(1,"mat-icon",56),s.qZA()}}function H(t,e){if(1&t){var n=s.EpF();s.TgZ(0,"li",57),s.TgZ(1,"div",65),s.TgZ(2,"label",59),s._uU(3,"Device"),s.qZA(),s.TgZ(4,"select",60),s.TgZ(5,"option",66),s._uU(6,"Desktop"),s.qZA(),s.TgZ(7,"option",67),s._uU(8,"Tablet"),s.qZA(),s.TgZ(9,"option",68),s._uU(10,"Mobile"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(11,"div",61),s.TgZ(12,"label",59),s._uU(13,"Url"),s.qZA(),s._UZ(14,"input",62),s.qZA(),s.TgZ(15,"button",69),s.NdJ("click",function(){var t=s.CHM(n).index;return s.oxw(3).linkForm.deviceRules.removeAt(t)}),s._UZ(16,"mat-icon",64),s.qZA(),s.qZA()}if(2&t){var i=e.$implicit,o=e.index;s.xp6(1),s.Q6J("formGroup",i),s.xp6(1),s.Q6J("for","link_dialog_device-"+o),s.xp6(2),s.Q6J("id","link_dialog_device-"+o),s.xp6(7),s.Q6J("formGroup",i),s.xp6(1),s.Q6J("for","link_dialog_device_url-"+o),s.xp6(2),s.Q6J("id","link_dialog_device_url-"+o),s.xp6(1),s.Q6J("disabled",i.disabled)}}function V(t,e){if(1&t){var n=s.EpF();s.TgZ(0,"button",55),s.NdJ("click",function(){return s.CHM(n),s.oxw(3).linkForm.addNewPlatformRule()}),s._UZ(1,"mat-icon",56),s.qZA()}}function z(t,e){if(1&t){var n=s.EpF();s.TgZ(0,"li",57),s.TgZ(1,"div",65),s.TgZ(2,"label",59),s._uU(3,"Platform"),s.qZA(),s.TgZ(4,"select",60),s.TgZ(5,"option",70),s._uU(6,"Windows"),s.qZA(),s.TgZ(7,"option",71),s._uU(8,"Linux"),s.qZA(),s.TgZ(9,"option",72),s._uU(10,"MacOS"),s.qZA(),s.TgZ(11,"option",73),s._uU(12,"iOS"),s.qZA(),s.TgZ(13,"option",74),s._uU(14,"Android"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(15,"div",61),s.TgZ(16,"label",59),s._uU(17,"Url"),s.qZA(),s._UZ(18,"input",62),s.qZA(),s.TgZ(19,"button",69),s.NdJ("click",function(){var t=s.CHM(n).index;return s.oxw(3).linkForm.platformRules.removeAt(t)}),s._UZ(20,"mat-icon",64),s.qZA(),s.qZA()}if(2&t){var i=e.$implicit,o=e.index;s.xp6(1),s.Q6J("formGroup",i),s.xp6(1),s.Q6J("for","link_dialog_platform-"+o),s.xp6(2),s.Q6J("id","link_dialog_platform-"+o),s.xp6(11),s.Q6J("formGroup",i),s.xp6(1),s.Q6J("for","link_dialog_platform_url-"+o),s.xp6(2),s.Q6J("id","link_dialog_platform_url-"+o),s.xp6(1),s.Q6J("disabled",i.disabled)}}function G(t,e){if(1&t&&(s.ynx(0),s.TgZ(1,"div",51),s.TgZ(2,"header"),s.TgZ(3,"div",17),s.TgZ(4,"h3",18),s._uU(5,"Location Targeting"),s.qZA(),s.TgZ(6,"p",18),s._uU(7,"Redirect users to different url based on their location."),s.qZA(),s.qZA(),s.YNc(8,F,2,0,"button",52),s.qZA(),s.TgZ(9,"ul",53),s.YNc(10,$,12,8,"li",54),s.qZA(),s.qZA(),s.TgZ(11,"div",51),s.TgZ(12,"header"),s.TgZ(13,"div",17),s.TgZ(14,"h3",18),s._uU(15,"Device Targeting"),s.qZA(),s.TgZ(16,"p",18),s._uU(17,"Redirect users to different url based on their device."),s.qZA(),s.qZA(),s.YNc(18,B,2,0,"button",52),s.qZA(),s.TgZ(19,"ul",53),s.YNc(20,H,17,7,"li",54),s.qZA(),s.qZA(),s.TgZ(21,"div",51),s.TgZ(22,"header"),s.TgZ(23,"div",17),s.TgZ(24,"h3",18),s._uU(25,"Platform Targeting"),s.qZA(),s.TgZ(26,"p",18),s._uU(27,"Redirect users to different url based on their platform."),s.qZA(),s.qZA(),s.YNc(28,V,2,0,"button",52),s.qZA(),s.TgZ(29,"ul",53),s.YNc(30,z,21,7,"li",54),s.qZA(),s.qZA(),s.BQk()),2&t){var n=s.oxw(2);s.xp6(1),s.Q6J("controlGroup",n.linkForm.geoRules),s.xp6(7),s.Q6J("ngIf",!n.linkForm.geoRules.disabled),s.xp6(2),s.Q6J("ngForOf",n.linkForm.geoRules.controls),s.xp6(1),s.Q6J("controlGroup",n.linkForm.deviceRules),s.xp6(7),s.Q6J("ngIf",!n.linkForm.geoRules.disabled),s.xp6(2),s.Q6J("ngForOf",n.linkForm.deviceRules.controls),s.xp6(1),s.Q6J("controlGroup",n.linkForm.platformRules),s.xp6(7),s.Q6J("ngIf",!n.linkForm.geoRules.disabled),s.xp6(2),s.Q6J("ngForOf",n.linkForm.platformRules.controls)}}var j=function(t){return{resource:t}};function X(t,e){if(1&t){var n=s.EpF();s.ynx(0,1),s.TgZ(1,"div",2),s.TgZ(2,"div",3),s.YNc(3,I,5,4,"div",4),s.TgZ(4,"div",5),s.TgZ(5,"label",6),s._uU(6,"Status"),s.qZA(),s.TgZ(7,"select",7),s.TgZ(8,"option",8),s._uU(9,"Activate"),s.qZA(),s.TgZ(10,"option",8),s._uU(11,"Disabled"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(12,"div",3),s.TgZ(13,"div",9),s.TgZ(14,"label",10),s._uU(15,"Password"),s.qZA(),s._UZ(16,"input",11),s.YNc(17,O,2,1,"p",12),s.qZA(),s.qZA(),s.TgZ(18,"permission-aware-button",13),s.TgZ(19,"button",14),s.NdJ("click",function(){return s.CHM(n),s.oxw().openUtmBuilder()}),s._uU(20," UTM Builder "),s.qZA(),s.qZA(),s.qZA(),s.YNc(21,U,8,2,"div",15),s.TgZ(22,"div",16),s.TgZ(23,"header"),s.TgZ(24,"div",17),s.TgZ(25,"h3",18),s._uU(26,"Schedule"),s.qZA(),s.TgZ(27,"p",19),s._uU(28," Enter a date when :resource should be active. Both start and end dates are optional. "),s.qZA(),s.qZA(),s.qZA(),s.TgZ(29,"div",3),s.TgZ(30,"div",20),s.TgZ(31,"datetime-input",21),s._uU(32,"Start Date"),s.qZA(),s.YNc(33,P,2,1,"p",12),s.qZA(),s.TgZ(34,"div",20),s.TgZ(35,"datetime-input",22),s._uU(36,"End Date"),s.qZA(),s.YNc(37,M,2,1,"p",12),s.qZA(),s.qZA(),s.qZA(),s.YNc(38,N,12,1,"div",15),s.YNc(39,D,20,4,"div",23),s.YNc(40,Y,12,1,"div",15),s.TgZ(41,"div",24),s.TgZ(42,"header"),s.TgZ(43,"div",17),s.TgZ(44,"h3",18),s._uU(45,"Expiration Clicks"),s.qZA(),s.TgZ(46,"p"),s.TgZ(47,"span",19),s._uU(48,"After :resource is visited specified amount of times, it will no longer be accessible."),s.qZA(),s._UZ(49,"br"),s.TgZ(50,"span",19),s._uU(51,"Optionally, after click amount is reached :resource can redirect to specified url instead."),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(52,"div",25),s.TgZ(53,"div",26),s.TgZ(54,"label",27),s._uU(55,"Max Clicks"),s.qZA(),s._UZ(56,"input",28),s.qZA(),s.TgZ(57,"div",5),s.TgZ(58,"label",29),s._uU(59,"Redirect Url"),s.qZA(),s._UZ(60,"input",30),s.qZA(),s.qZA(),s.qZA(),s.YNc(61,G,31,9,"ng-container",31),s.BQk()}if(2&t){var i=e.ngIf,o=s.oxw();s.Q6J("formGroup",o.linkForm.formGroup),s.xp6(3),s.Q6J("ngIf",!(o.batch||null!=o.featuresToHide&&o.featuresToHide.alias)),s.xp6(5),s.Q6J("ngValue",!0),s.xp6(2),s.Q6J("ngValue",!1),s.xp6(7),s.Q6J("ngIf",i.password),s.xp6(4),s.Q6J("ngIf",(null==o.linkOptions||null==o.linkOptions.domains?null:o.linkOptions.domains.length)&&!(null!=o.featuresToHide&&o.featuresToHide.domain)&&o.settings.get("custom_domains.allow_select")),s.xp6(6),s.Q6J("transValues",s.VKq(16,j,o.resourceName)),s.xp6(6),s.Q6J("ngIf",i.activates_at),s.xp6(4),s.Q6J("ngIf",i.expires_at),s.xp6(1),s.Q6J("ngIf",!(null!=o.featuresToHide&&o.featuresToHide.linkGroups)&&(null==o.linkOptions||null==o.linkOptions.groups?null:o.linkOptions.groups.length)),s.xp6(1),s.Q6J("ngIf",!(null!=o.featuresToHide&&o.featuresToHide.details)),s.xp6(1),s.Q6J("ngIf",(null==o.linkOptions||null==o.linkOptions.pixels?null:o.linkOptions.pixels.length)&&o.settings.get("links.pixels")),s.xp6(1),s.Q6J("controlGroup",o.linkForm.expClicksRule),s.xp6(6),s.Q6J("transValues",s.VKq(18,j,o.resourceName)),s.xp6(3),s.Q6J("transValues",s.VKq(20,j,o.resourceName)),s.xp6(11),s.Q6J("ngIf",o.linkOptions&&o.settings.get("links.retargeting"))}}var W=function(){var t=function(){function t(e,n,i){d(this,t),this.linkForm=e,this.settings=n,this.modal=i,this.batch=!1,this.featuresToHide={},this.resourceName="link",this.defaultHost$=new o.X(null),this.alias={min:this.settings.get("links.alias_min"),max:this.settings.get("links.alias_max")}}return g(t,[{key:"ngOnChanges",value:function(t){if(t.linkOptions.currentValue){var e=this.settings.get("custom_domains.default_host");if(e)this.defaultHost$.next(this.linkOptions.domains.find(function(t){return t.host===e}).host);else{var n=this.settings.getBaseUrl().replace(/\/$/,"").replace(/(^\w+:|^)\/\//,"");this.defaultHost$.next(n)}}}},{key:"capitalize",value:function(t){return(0,i.z)(t)}},{key:"openUtmBuilder",value:function(){var t=this;this.modal.open(h,{utmQuery:this.linkForm.formGroup.get("utm").value}).afterClosed().subscribe(function(e){e&&t.linkForm.formGroup.patchValue({utm:e})})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Y36(f.l),s.Y36(m.Z),s.Y36(v.u))},t.\u0275cmp=s.Xpm({type:t,selectors:[["link-options-form"]],inputs:{linkOptions:"linkOptions",batch:"batch",featuresToHide:"featuresToHide",resourceName:"resourceName"},features:[s.TTD],decls:2,vars:3,consts:[[3,"formGroup",4,"ngIf"],[3,"formGroup"],[1,"group","first-group"],[1,"inline-inputs-container"],["class","input-container","permission-aware-input-container","alias",4,"ngIf"],[1,"input-container"],["for","link_dialog_active","trans",""],["id","link_dialog_active","formControlName","active"],["trans","",3,"ngValue"],["permission-aware-input-container","password",1,"input-container"],["for","link-dialog-password","trans",""],["type","password","id","link-dialog-password","formControlName","password","autocomplete","new-password"],["class","error",4,"ngIf"],["permission","links.create","restriction","utm"],["type","button","mat-stroked-button","","color","accent","trans","",3,"click"],["class","group",4,"ngIf"],[1,"group"],[1,"header-text"],["trans",""],["trans","",3,"transValues"],["permission-aware-input-container","expiration",1,"input-container"],["id","link_dialog_activates_at","formControlName","activates_at","trans",""],["id","link_dialog_expires_at","formControlName","expires_at","trans",""],["class","group many-inputs",4,"ngIf"],["permission-aware-input-container","expiration",1,"group","retargeting-group",3,"controlGroup"],["formGroupName","exp_clicks_rule",1,"inline-inputs-container","rule-inline-inputs"],[1,"input-container","country-input-container"],["for","link_dialog_exp_clicks","trans",""],["type","number","min","1","id","link_dialog_exp_clicks","formControlName","key"],["for","link_dialog_exp_link","trans",""],["type","url","id","link_dialog_exp_link","formControlName","value","placeholder","(Optional)","trans-placeholder",""],[4,"ngIf"],["permission-aware-input-container","alias",1,"input-container"],["for","link-dialog-alias","trans",""],["type","text","id","link-dialog-alias","formControlName","alias","pattern","[A-Za-z0-9_-]+",3,"minlength","maxlength","placeholder"],[1,"error"],["controlName","domain_id",3,"domains","hideLabel"],["appearance","outline"],["formControlName","groups","multiple",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"group","many-inputs"],["formControlName","image",3,"compact"],["for","link_dialog_title","trans",""],["type","text","id","link_dialog_title","formControlName","name","maxlength","140"],["class","input-container",4,"ngIf"],["for","link_dialog_description","trans",""],["id","link_dialog_description","formControlName","description","maxlength","240"],["for","link_dialog_tags","trans",""],["id","link_dialog_tags","formControlName","tags","placeholder","+New tag","trans-placeholder",""],["formControlName","pixels","multiple",""],["permission-aware-input-container","retargeting",1,"group","retargeting-group",3,"controlGroup"],["mat-icon-button","","color","accent","type","button",3,"click",4,"ngIf"],[1,"unstyled-list"],["class","inline-inputs-container rule-inline-inputs",4,"ngFor","ngForOf"],["mat-icon-button","","color","accent","type","button",3,"click"],["svgIcon","add"],[1,"inline-inputs-container","rule-inline-inputs"],[1,"input-container","country-input-container",3,"formGroup"],["trans","",3,"for"],["formControlName","key",3,"id"],[1,"input-container",3,"formGroup"],["type","url","formControlName","value",3,"id"],["mat-icon-button","","color","warn","type","button",1,"remove-rule-btn",3,"disabled","click"],["svgIcon","close"],[1,"input-container","device-input-container",3,"formGroup"],["value","desktop","trans",""],["value","tablet","trans",""],["value","mobile","trans",""],["mat-icon-button","","type","button","color","warn",1,"remove-rule-btn",3,"disabled","click"],["value","windows","trans",""],["value","linux","trans",""],["value","osx","trans",""],["value","ios","trans",""],["value","androidos","trans",""]],template:function(t,e){1&t&&(s.YNc(0,X,62,22,"ng-container",0),s.ALo(1,"async")),2&t&&s.Q6J("ngIf",s.lcZ(1,1,e.linkForm.errors$))},directives:[b.O5,c.JL,c.sg,l.P,c.EJ,c.JJ,c.u,c.YN,c.Kr,y.o,c.Fj,_.v,p.lW,x.k,c.x0,c.qQ,c.wV,c.c5,c.wO,c.nD,k.z,Z.KE,Z.hX,w.gD,b.sg,A.ey,C.V,T.S,u.Hw],pipes:[b.Ov],styles:["[_nghost-%COMP%]{display:block;overflow:hidden}label[_ngcontent-%COMP%]{text-transform:capitalize}.group[_ngcontent-%COMP%]{border-bottom:1px solid var(--be-divider-default);margin-bottom:20px;padding-bottom:20px}.retargeting-group[_ngcontent-%COMP%]     .lock-icon{right:8px;top:5px}.first-group[_ngcontent-%COMP%]{margin-top:15px;padding-top:15px;border-top:1px solid var(--be-divider-default)}header[_ngcontent-%COMP%]{display:flex;align-items:center}header[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-left:auto;align-self:flex-start}h3[_ngcontent-%COMP%]{margin:0}p[_ngcontent-%COMP%]{margin-top:3px;color:var(--be-secondary-text);max-width:650px}.inline-inputs-container[_ngcontent-%COMP%]{margin-bottom:20px;align-items:flex-end}.remove-rule-btn[_ngcontent-%COMP%]{margin-top:29px;margin-left:5px;flex-shrink:0}.input-wrapper[_ngcontent-%COMP%]{position:relative}.host-input[_ngcontent-%COMP%]{font-size:1.6rem}.base-url-prefix[_ngcontent-%COMP%]{position:absolute;top:0;left:0;line-height:46px;text-align:right}.mat-form-field[_ngcontent-%COMP%]{width:100%}upload-image-control[_ngcontent-%COMP%]{width:66px;height:66px;margin-right:15px}@media screen and (max-width:768px){.inline-inputs-container[_ngcontent-%COMP%]{display:block;position:relative}.country-input-container[_ngcontent-%COMP%], .device-input-container[_ngcontent-%COMP%]{margin-bottom:15px}.remove-rule-btn[_ngcontent-%COMP%]{position:absolute;top:-15px;right:-5px;margin:0}.rule-inline-inputs[_ngcontent-%COMP%]:not(:last-of-type){margin-bottom:25px;padding-bottom:25px;border-bottom:1px solid var(--be-divider-lighter)}}"],changeDetection:0}),t}()},92890:function(t,e,n){"use strict";n.d(e,{F:function(){return p}});var i=n(47727),o=n(73982),a=n(34056),r=n(40878),s=n(35366),c=n(63337),l=n(68515),u=n(84222),p=function(){var t=function(){function t(e,n,i){d(this,t),this.router=e,this.http=n,this.link=i}return g(t,[{key:"resolve",value:function(t,e){var n=this;return this.link.get(t.params.linkId).pipe((0,i.K)(function(){return n.router.navigate(["/dashboard/links"]),a.E}),(0,o.zg)(function(t){return t?(0,r.of)(t):(n.router.navigate(["/dashboard/links"]),a.E)}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.LFG(c.F0),s.LFG(l.r),s.LFG(u.M))},t.\u0275prov=s.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},4886:function(t,e,n){"use strict";n.d(e,{G:function(){return m}});var i=n(84222),o=n(78512),a=n(35366),r=n(63337),s=n(88195),c=n(61116),l=n(19708),u=n(78671),p=n(93836),h=n(40985);function f(t,e){if(1&t&&(a.ynx(0),a.TgZ(1,"header"),a._UZ(2,"img",1),a.ALo(3,"favicon"),a.TgZ(4,"a",2),a._uU(5),a.qZA(),a._UZ(6,"copy-link-btn",3),a._UZ(7,"share-link-btns",4),a.qZA(),a._UZ(8,"click-charts",5),a.BQk()),2&t){var n=e.ngIf,i=a.oxw();a.xp6(2),a.Q6J("src",a.lcZ(3,8,n.link.long_url),a.LSH),a.xp6(2),a.Q6J("href",n.link.long_url,a.LSH),a.xp6(1),a.Oqu(n.link.long_url),a.xp6(1),a.Q6J("model",n.link),a.xp6(1),a.Q6J("colored",!0)("link",n.link),a.xp6(1),a.Q6J("reports",n.analytics)("endpoint",i.analyticsEndpoint)}}var m=function(){var t=function(){function t(e,n){d(this,t),this.route=e,this.settings=n,this.data$=new o.X(null)}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.route.data.subscribe(function(e){t.data$.next(e.api),t.analyticsEndpoint="".concat(i.M.BASE_URI,"/").concat(e.api.link.id)})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Y36(r.gz),a.Y36(s.Z))},t.\u0275cmp=a.Xpm({type:t,selectors:[["link-show"]],decls:2,vars:3,consts:[[4,"ngIf"],["alt","link favicon",3,"src"],["target","_blank",1,"long-url",3,"href"],[3,"model"],[3,"colored","link"],[3,"reports","endpoint"]],template:function(t,e){1&t&&(a.YNc(0,f,9,10,"ng-container",0),a.ALo(1,"async")),2&t&&a.Q6J("ngIf",a.lcZ(1,1,e.data$))},directives:[c.O5,l.b,u.t,p.z],pipes:[c.Ov,h.K],styles:["header[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:15px;font-size:1.8rem;flex-wrap:wrap}header[_ngcontent-%COMP%]   .long-url[_ngcontent-%COMP%]{max-width:60%;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width:768px){header[_ngcontent-%COMP%]   .long-url[_ngcontent-%COMP%]{width:calc(100% - 32px)}header[_ngcontent-%COMP%]   .long-url[_ngcontent-%COMP%], header[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-bottom:15px}}@media only screen and (min-width:768px){header[_ngcontent-%COMP%]   share-link-btns[_ngcontent-%COMP%]{margin-left:auto}header[_ngcontent-%COMP%]   .edit-btn[_ngcontent-%COMP%]{margin-left:10px}}header[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-right:10px;width:22px;height:22px;flex-shrink:0}header[_ngcontent-%COMP%]   .edit-btn[_ngcontent-%COMP%], header[_ngcontent-%COMP%]   copy-link-btn[_ngcontent-%COMP%]{color:var(--be-secondary-text)}"],changeDetection:0}),t}()},77830:function(t,e,n){"use strict";n.d(e,{o:function(){return y}});var i=n(35366),o=n(31041),a=n(40149),r=n(35096),s=n(78512),c=n(98979),l=n(88195),u=n(28505),p=n(36501),h=n(77307),f=n(61116),m=["lockIcon"],v=["permission-aware-input-container",""],b=["*"],y=function(){var t=function(){function t(e,n,i,o,a,r){d(this,t),this.cd=e,this.overlay=n,this.viewContainerRef=i,this.settings=o,this.currentUser=a,this.usage=r,this.lockIconHidden$=new s.X(!0)}return g(t,[{key:"ngAfterViewInit",value:function(){var t=this;setTimeout(function(){t.usageSub=t.usage.response$.subscribe(function(e){e.usage.links[t.permission]||t.currentUser.isAdmin()||(t.lockIconHidden$.next(!1),t.controlGroup?t.controlGroup.disable():t.controlName&&t.controlName.control.disable(),t.lockIcon&&t.createHoverListener())})})}},{key:"ngOnDestroy",value:function(){var t;null===(t=this.usageSub)||void 0===t||t.unsubscribe()}},{key:"createHoverListener",value:function(){var t=this;this.listeningToHover||(this.lockIcon.nativeElement.addEventListener("mouseenter",function(){t.cd.markForCheck(),t.showMessage()}),this.lockIcon.nativeElement.addEventListener("mouseleave",function(e){var n,i=e.relatedTarget;"upgrade-overlay"!==(null===(n=null==i?void 0:i.nodeName)||void 0===n?void 0:n.toLowerCase())&&t.hideMessage()}),this.listeningToHover=!0)}},{key:"showMessage",value:function(){var t=this;this.overlayRef&&this.hideMessage(),this.overlayRef=this.overlay.open(r.O,{origin:this.lockIcon,position:a.x,hasBackdrop:!1,scrollStrategy:"close",viewContainerRef:this.viewContainerRef,data:{config:{resource:"links",createMsgType:this.permission}}}),this.overlayRef.getPanelEl().addEventListener("mouseleave",function(){t.hideMessage()})}},{key:"hideMessage",value:function(){this.overlayRef&&(this.overlayRef.close(),this.overlayRef=null)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.sBO),i.Y36(c.T),i.Y36(i.s_b),i.Y36(l.Z),i.Y36(u.I),i.Y36(p.F))},t.\u0275cmp=i.Xpm({type:t,selectors:[["","permission-aware-input-container",""]],contentQueries:function(t,e,n){var a;(1&t&&i.Suo(n,o.u,5),2&t)&&(i.iGM(a=i.CRH())&&(e.controlName=a.first))},viewQuery:function(t,e){var n;(1&t&&i.Gf(m,5,i.SBq),2&t)&&(i.iGM(n=i.CRH())&&(e.lockIcon=n.first))},inputs:{permission:["permission-aware-input-container","permission"],controlGroup:"controlGroup"},attrs:v,ngContentSelectors:b,decls:4,vars:4,consts:[["svgIcon","lock",1,"lock-icon"],["lockIcon",""]],template:function(t,e){1&t&&(i.F$t(),i.Hsn(0),i.TgZ(1,"mat-icon",0,1),i.ALo(3,"async"),i.qZA()),2&t&&(i.xp6(1),i.ekj("hidden",i.lcZ(3,2,e.lockIconHidden$)))},directives:[h.Hw],pipes:[f.Ov],styles:["[_nghost-%COMP%]{display:block;position:relative;margin-top:8px}.lock-icon[_ngcontent-%COMP%]{position:absolute;right:0;top:-6px;color:var(--be-secondary-text)}"],changeDetection:0}),t}()},56361:function(t,e,n){"use strict";n.d(e,{v:function(){return x}});var i=n(84369),o=n(35096),a=n(40149),r=n(7855),c=n(35366),l=n(77307),u=n(38116),p=function(){var t=function(){function t(e){d(this,t),this.data=e}return g(t,[{key:"ngOnInit",value:function(){this.message=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;return"overQuota"===i?"You have created the maximum allowed number of ".concat(t,"."):function(t,e,n){return t=t.replace("_"," "),e?"You are not allowed to ".concat(n," ").concat(t," in this workspace."):"You are not allowed to ".concat(n," ").concat(t,".")}(t,e,n)}(this.data.config.resource,this.data.config.forWorkspace,this.data.config.action,this.data.config.createMsgType)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.Y36(r.p))},t.\u0275cmp=c.Xpm({type:t,selectors:[["simple-permission-overlay"]],hostAttrs:[1,"permission-overlay"],decls:4,vars:1,consts:[[1,"overlay"],["svgIcon","lock",1,"lock-icon"],["trans",""]],template:function(t,e){1&t&&(c.TgZ(0,"div",0),c._UZ(1,"mat-icon",1),c.TgZ(2,"span",2),c._uU(3),c.qZA(),c.qZA()),2&t&&(c.xp6(3),c.Oqu(e.message))},directives:[l.Hw,u.P],styles:["[_nghost-%COMP%]{display:block;padding:5px 0}.overlay[_ngcontent-%COMP%]{display:flex;align-items:flex-start;background-color:var(--be-background);box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12);border-radius:4px;padding:15px;max-width:350px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.lock-icon[_ngcontent-%COMP%]{width:28px;height:28px;flex-shrink:0;margin-right:10px;color:var(--be-secondary-text)}"],changeDetection:0}),t}(),h=n(97070),f=n(98979),m=n(88195),v=n(28505),b=n(36501),y=["permission-aware-button",""],_=["*"],x=function(){var t=function(){function t(e,n,i,o,a,r,s){d(this,t),this.cd=e,this.overlay=n,this.viewContainerRef=i,this.settings=o,this.currentUser=a,this.el=r,this.linkUsage=s}return g(t,[{key:"ngAfterViewInit",value:function(){var t=this;setTimeout(function(){t.matButton||t.matMenuItem||(t.regularButton=t.el.nativeElement.querySelector("button")),t.usageSub=t.linkUsage.response$.subscribe(function(e){t.hydrateConfig(e),t.config.hasPermission||t.userOwnsResource?(t.toggleButtonState(!1),t.overlayCmp=null):(t.toggleButtonState(!0),t.setOverlayCmp()),t.cd.markForCheck()}),t.createHoverListener()})}},{key:"ngOnDestroy",value:function(){var t;null===(t=this.usageSub)||void 0===t||t.unsubscribe()}},{key:"hydrateConfig",value:function(t){var e=s(this.permission.split("."),2),n=e[0],i=e[1];this.config={resource:n,action:i,hasPermission:t.usage[n][this.restriction||i]||this.currentUser.isAdmin(),forWorkspace:t.forWorkspace,createMsgType:t.usage[n].createMsgType||this.restriction,userOwnsWorkspace:t.userOwnsWorkspace}}},{key:"setOverlayCmp",value:function(){this.overlayCmp=this.shouldShowUpgradeOverlay()?o.O:p}},{key:"shouldShowUpgradeOverlay",value:function(){return this.settings.get("billing.enable")&&"create"===this.config.action&&!this.config.hasPermission&&"noWorkspacePermission"!==this.config.createMsgType}},{key:"createHoverListener",value:function(){var t=this;this.el.nativeElement.addEventListener("mouseenter",function(){t.overlayCmp&&(t.cd.markForCheck(),t.showMessage())}),this.el.nativeElement.addEventListener("mouseleave",function(e){t.overlayRef&&!e.relatedTarget.classList.contains("permission-overlay")&&t.hideMessage()})}},{key:"toggleButtonState",value:function(t){(this.matButton||this.matMenuItem||this.regularButton).disabled=t}},{key:"showMessage",value:function(){var t=this;this.overlayRef&&this.hideMessage(),this.overlayRef=this.overlay.open(this.overlayCmp,{origin:this.matButton._elementRef,position:a.x,hasBackdrop:!1,scrollStrategy:"close",viewContainerRef:this.viewContainerRef,data:{config:this.config}}),this.overlayRef.getPanelEl().addEventListener("mouseleave",function(){t.hideMessage()})}},{key:"hideMessage",value:function(){this.overlayRef&&(this.overlayRef.close(),this.overlayRef=null)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.Y36(c.sBO),c.Y36(f.T),c.Y36(c.s_b),c.Y36(m.Z),c.Y36(v.I),c.Y36(c.SBq),c.Y36(b.F))},t.\u0275cmp=c.Xpm({type:t,selectors:[["","permission-aware-button",""],["permission-aware-button"]],contentQueries:function(t,e,n){var o;(1&t&&(c.Suo(n,i.lW,5),c.Suo(n,h.OP,5)),2&t)&&(c.iGM(o=c.CRH())&&(e.matButton=o.first),c.iGM(o=c.CRH())&&(e.matMenuItem=o.first))},inputs:{permission:"permission",restriction:"restriction",userOwnsResource:"userOwnsResource"},attrs:y,ngContentSelectors:_,decls:1,vars:0,template:function(t,e){1&t&&(c.F$t(),c.Hsn(0))},styles:[""],changeDetection:0}),t}()},35096:function(t,e,n){"use strict";n.d(e,{O:function(){return h}});var i=n(7855),o=n(35366),a=n(80147),r=n(88195),s=n(38116),c=n(84369),l=n(63337),u=n(92552),p=function(t){return{siteName:t}},h=function(){var t=function(){function t(e,n,i){d(this,t),this.overlayPanelRef=e,this.data=n,this.settings=i}return g(t,[{key:"ngOnInit",value:function(){var t,e;this.message=(e=this.data.config.createMsgType,t=(t=this.data.config.resource).replace("_"," "),"overQuota"===e?"You've reached the maximum number of ".concat(t," allowed for your current plan."):"alias"===e?"Your current plan doesn't allow setting custom link ID.":"expiration"===e?"Your current plan doesn't allow setting link expiration.":"password"===e?"Your current plan doesn't allow setting a password for links.":"utm"===e?"Your current plan doesn't include utm builder functionality.":"retargeting"===e?"Your current plan doesn't include retargeting functionality.":"Your current plan doesn't allow creating ".concat(t,".")),this.siteName=this.settings.get("branding.site_name")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.Y36(a.L),o.Y36(i.p),o.Y36(r.Z))},t.\u0275cmp=o.Xpm({type:t,selectors:[["upgrade-overlay"]],hostAttrs:[1,"permission-overlay"],decls:11,vars:4,consts:[[1,"overlay"],[1,"content"],["trans",""],["trans","",3,"transValues"],["mat-raised-button","","color","accent","routerLink","/billing/pricing","trans","",1,"upgrade-button"],["name","upgrade"]],template:function(t,e){1&t&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o.TgZ(2,"div",2),o.TgZ(3,"span",2),o._uU(4),o.qZA(),o._uU(5," "),o.TgZ(6,"span",3),o._uU(7," Upgrade to get more out of :siteName. "),o.qZA(),o.qZA(),o.TgZ(8,"a",4),o._uU(9,"Upgrade Now"),o.qZA(),o.qZA(),o._UZ(10,"svg-image",5),o.qZA()),2&t&&(o.xp6(4),o.Oqu(e.message),o.xp6(2),o.Q6J("transValues",o.VKq(2,p,e.siteName)))},directives:[s.P,c.zs,l.yS,u.L],styles:["[_nghost-%COMP%]{display:block;padding:5px 0}.overlay[_ngcontent-%COMP%]{display:flex;align-items:center;background-color:var(--be-background);box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12);border-radius:4px;padding:20px;max-width:350px}.content[_ngcontent-%COMP%]{flex:1 1 auto}svg-image[_ngcontent-%COMP%]{height:80px;width:auto;flex-shrink:0;margin-left:15px}.upgrade-button[_ngcontent-%COMP%]{margin-top:20px}"],changeDetection:0}),t}()},45362:function(t,e,n){"use strict";n.d(e,{V:function(){return st}});var i=n(67455),o=n(36024),a=n(56515),r=n(35366),s=n(68515),c=function(){var t=function(){function t(e){d(this,t),this.http=e}return g(t,[{key:"index",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.http.get("".concat(t.BASE_URI),e)}},{key:"create",value:function(e){return this.http.post(t.BASE_URI,e)}},{key:"update",value:function(e,n){return this.http.put("".concat(t.BASE_URI,"/").concat(e),n)}},{key:"delete",value:function(e){return this.http.delete("".concat(t.BASE_URI,"/").concat(e))}}]),t}();return t.BASE_URI="pixel",t.\u0275fac=function(e){return new(e||t)(r.LFG(s.r))},t.\u0275prov=r.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}(),l=n(92935),u=n(11520),p=n(78512),h=[{name:"facebook",type:"number"},{name:"twitter",type:"number"},{name:"google-tag-manager",type:"text",pattern:"GTM-[a-zA-Z0-9]+"},{name:"google-analytics",type:"text"},{name:"adwords",type:"number"},{name:"bing",type:"number"},{name:"pinterest",type:"number"},{name:"linkedin",type:"text"},{name:"quora",type:"text",pattern:"[a-z0-9]+"},{name:"adroll",type:"text"},{name:"nexus-segment",type:"text"},{name:"custom",type:"text"}],f=n(31041),m=n(73234),v=n(61116),b=n(77307),y=n(84369),_=n(38116);function x(t,e){1&t&&(r.TgZ(0,"span",11),r._uU(1,"Update Pixel"),r.qZA())}function k(t,e){1&t&&(r.TgZ(0,"span",11),r._uU(1,"Create New Pixel"),r.qZA())}function Z(t,e){if(1&t&&(r.TgZ(0,"div",20),r._uU(1),r.qZA()),2&t){var n=r.oxw().ngIf;r.xp6(1),r.Oqu(n.name)}}function w(t,e){if(1&t&&(r.TgZ(0,"option",21),r._uU(1),r.qZA()),2&t){var n=e.$implicit,i=r.oxw(2);r.Q6J("value",n.name),r.xp6(1),r.Oqu(i.viewTypeName(n.name))}}function A(t,e){if(1&t&&(r.TgZ(0,"div",20),r._uU(1),r.qZA()),2&t){var n=r.oxw(3).ngIf;r.xp6(1),r.Oqu(n.pixel_id)}}function C(t,e){if(1&t&&(r.TgZ(0,"div",13),r.TgZ(1,"label",23),r._uU(2,"Pixel ID"),r.qZA(),r._UZ(3,"input",24),r.YNc(4,A,2,1,"div",16),r.qZA()),2&t){var n=r.oxw().ngIf,i=r.oxw().ngIf;r.xp6(3),r.Q6J("type",n.type)("pattern",n.pattern),r.xp6(1),r.Q6J("ngIf",i.pixel_id)}}function T(t,e){1&t&&(r.TgZ(0,"div",12),r.TgZ(1,"div",13),r.TgZ(2,"label",25),r._uU(3,"Custom Code for Page Head"),r.qZA(),r._UZ(4,"textarea",26),r.qZA(),r.TgZ(5,"div",13),r.TgZ(6,"label",27),r._uU(7,"Custom Code for Page Body"),r.qZA(),r._UZ(8,"textarea",28),r.qZA(),r.qZA())}function q(t,e){if(1&t&&(r.ynx(0),r.YNc(1,C,5,3,"div",22),r.YNc(2,T,9,0,"div",7),r.BQk()),2&t){var n=e.ngIf;r.xp6(1),r.Q6J("ngIf","custom"!==n.name),r.xp6(1),r.Q6J("ngIf","custom"===n.name)}}function I(t,e){if(1&t&&(r.TgZ(0,"mat-dialog-content",12),r.TgZ(1,"div",13),r.TgZ(2,"label",14),r._uU(3,"Name"),r.qZA(),r._UZ(4,"input",15),r.YNc(5,Z,2,1,"div",16),r.qZA(),r.TgZ(6,"div",13),r.TgZ(7,"label",17),r._uU(8,"Type"),r.qZA(),r.TgZ(9,"select",18),r.YNc(10,w,2,2,"option",19),r.qZA(),r.qZA(),r.YNc(11,q,3,2,"ng-container",10),r.ALo(12,"async"),r.qZA()),2&t){var n=e.ngIf,i=r.oxw();r.xp6(5),r.Q6J("ngIf",n.name),r.xp6(5),r.Q6J("ngForOf",i.types),r.xp6(1),r.Q6J("ngIf",r.lcZ(12,3,i.selectedType$))}}function O(t,e){1&t&&(r.TgZ(0,"span"),r._uU(1,"Update"),r.qZA())}function U(t,e){1&t&&(r.TgZ(0,"span"),r._uU(1,"Create"),r.qZA())}var P=function(){var t=function(){function t(e,n,i,o,a){d(this,t),this.dialogRef=e,this.data=n,this.fb=i,this.pixels=o,this.toast=a,this.types=h,this.loading$=new p.X(!1),this.errors$=new p.X({}),this.selectedType$=new p.X(this.types[0]),this.form=this.fb.group({name:[""],type:[this.types[0].name],head_code:[""],body_code:[""],pixel_id:[""]})}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.form.get("type").valueChanges.subscribe(function(e){t.selectedType$.next(t.types.find(function(t){return t.name===e}))}),this.data.pixel&&this.form.patchValue(this.data.pixel)}},{key:"confirm",value:function(){var t=this;this.loading$.next(!0);var e=this.data.pixel?this.pixels.update(this.data.pixel.id,this.getPayload()):this.pixels.create(this.getPayload()),n=this.data.pixel?i.V.TRACKING_PIXEL_UPDATE_SUCCESS:i.V.TRACKING_PIXEL_CREATE_SUCCESS;e.pipe((0,u.x)(function(){return t.loading$.next(!1)})).subscribe(function(e){t.toast.open(n),t.close(e.pixel)},function(e){return t.errors$.next(e.errors)})}},{key:"close",value:function(t){this.dialogRef.close(t)}},{key:"getPayload",value:function(){return Object.assign({},this.form.value)}},{key:"viewTypeName",value:function(t){return t.replace(/-/g," ")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Y36(l.so),r.Y36(l.WI),r.Y36(f.qu),r.Y36(c),r.Y36(m.F))},t.\u0275cmp=r.Xpm({type:t,selectors:[["crupdate-tracking-pixel-modal"]],decls:17,vars:11,consts:[[1,"modal-header"],["mat-dialog-title",""],["trans","",4,"ngIf","ngIfElse"],["creating",""],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"formGroup","ngSubmit"],["class","many-inputs",4,"ngIf"],["type","button","mat-button","","trans","",3,"click"],["type","submit","mat-raised-button","","color","accent","trans","",3,"disabled"],[4,"ngIf"],["trans",""],[1,"many-inputs"],[1,"input-container"],["for","name","trans",""],["type","text","id","name","formControlName","name","required",""],["class","error",4,"ngIf"],["for","type","trans",""],["id","type","formControlName","type","required","",1,"type-select"],[3,"value",4,"ngFor","ngForOf"],[1,"error"],[3,"value"],["class","input-container",4,"ngIf"],["for","pixel_id","trans",""],["id","pixel_id","formControlName","pixel_id","required","",3,"type","pattern"],["for","head-code","trans",""],["name","head-code","id","head-code","rows","10","formControlName","head_code"],["for","body-code","trans",""],["name","body-code","id","body-code","rows","10","formControlName","body_code"]],template:function(t,e){if(1&t&&(r.TgZ(0,"div",0),r.TgZ(1,"h2",1),r.YNc(2,x,2,0,"span",2),r.YNc(3,k,2,0,"ng-template",null,3,r.W1O),r.qZA(),r.TgZ(5,"button",4),r.NdJ("click",function(){return e.close()}),r._UZ(6,"mat-icon",5),r.qZA(),r.qZA(),r.TgZ(7,"form",6),r.NdJ("ngSubmit",function(){return e.confirm()}),r.YNc(8,I,13,5,"mat-dialog-content",7),r.ALo(9,"async"),r.TgZ(10,"mat-dialog-actions"),r.TgZ(11,"button",8),r.NdJ("click",function(){return e.close()}),r._uU(12,"Cancel"),r.qZA(),r.TgZ(13,"button",9),r.ALo(14,"async"),r.YNc(15,O,2,0,"span",10),r.YNc(16,U,2,0,"span",10),r.qZA(),r.qZA(),r.qZA()),2&t){var n=r.MAs(4);r.xp6(2),r.Q6J("ngIf",e.data.pixel)("ngIfElse",n),r.xp6(5),r.Q6J("formGroup",e.form),r.xp6(1),r.Q6J("ngIf",r.lcZ(9,7,e.errors$)),r.xp6(5),r.Q6J("disabled",r.lcZ(14,9,e.loading$)),r.xp6(2),r.Q6J("ngIf",e.data.pixel),r.xp6(1),r.Q6J("ngIf",!e.data.pixel)}},directives:[l.uh,v.O5,b.Hw,f.JL,f.sg,l.H8,y.lW,_.P,l.xY,f.Fj,f.JJ,f.u,f.Q7,f.EJ,v.sg,f.YN,f.Kr,f.c5],pipes:[v.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}.type-select[_ngcontent-%COMP%]{text-transform:capitalize}"],changeDetection:0}),t}(),M=n(59075),S=n(45523),N=n(44415),J=[new M.XQ({type:M.Bq.Select,key:"type",defaultValue:"facebook",description:"Tracking pixel type",options:h.map(function(t){return{key:t.name,value:t.name}})}),new S.T7({description:"Date pixel was created"}),new S.yH({description:"Date pixel was last updated"}),new M.XQ({type:M.Bq.SelectModel,key:"user_id",label:"User",description:"User overlay was created by",component:N.y})],E=n(28505),L=n(36501),D=n(63337),R=n(95157),Y=n(48865),F=n(34955),Q=n(56361),$=n(13536),B=n(80922),H=n(86668),V=n(27701),z=n(54275),G=n(24311),j=n(71765),X=n(47210),W=n(2406),K=n(40450);function tt(t,e){1&t&&r._UZ(0,"mat-progress-bar",17)}function et(t,e){1&t&&(r.TgZ(0,"th",12),r._uU(1,"Owner"),r.qZA())}var nt=function(t){return{count:t,resource:"pixel(s)"}};function it(t,e){if(1&t){var n=r.EpF();r.TgZ(0,"tr"),r.TgZ(1,"th",18),r.TgZ(2,"div",19),r._uU(3," :count :resource selected: "),r.qZA(),r.TgZ(4,"div",20),r.TgZ(5,"permission-aware-button",21),r.TgZ(6,"button",22),r.NdJ("click",function(){return r.CHM(n),r.oxw().maybeDeleteSelectedPixels()}),r._uU(7," Delete "),r.qZA(),r.qZA(),r.qZA(),r.qZA(),r.qZA()}if(2&t){var i=e.ngIf;r.xp6(2),r.Q6J("transValues",r.VKq(1,nt,i))}}function ot(t,e){if(1&t&&(r.TgZ(0,"td",36),r._UZ(1,"user-column",37),r.qZA()),2&t){var n=r.oxw().$implicit;r.xp6(1),r.Q6J("user",n.user)}}function at(t,e){if(1&t){var n=r.EpF();r.TgZ(0,"tr"),r._UZ(1,"td",23),r.TgZ(2,"td",24),r._uU(3),r.qZA(),r.YNc(4,ot,2,1,"td",25),r.TgZ(5,"td",26),r._uU(6),r.qZA(),r.TgZ(7,"td",27),r._uU(8),r.qZA(),r.TgZ(9,"td",28),r._uU(10),r.ALo(11,"formattedDate"),r.qZA(),r.TgZ(12,"td",29),r.TgZ(13,"permission-aware-button",30),r.TgZ(14,"button",31),r.NdJ("click",function(){var t=r.CHM(n).$implicit;return r.oxw().showCrupdatePixelModal(t)}),r.ALo(15,"trans"),r._UZ(16,"mat-icon",32),r.qZA(),r.qZA(),r.TgZ(17,"permission-aware-button",33),r.TgZ(18,"button",34),r.NdJ("click",function(){var t=r.CHM(n).$implicit;return r.oxw().maybeDeleteSelectedPixels([t.id])}),r._UZ(19,"mat-icon",35),r.qZA(),r.qZA(),r.qZA(),r.qZA()}if(2&t){var i=e.$implicit,o=r.oxw();r.xp6(1),r.Q6J("table-body-checkbox",i.id),r.xp6(2),r.Oqu(i.name),r.xp6(1),r.Q6J("ngIf",o.showUserColumn()),r.xp6(2),r.Oqu(i.type),r.xp6(2),r.Oqu(i.pixel_id),r.xp6(2),r.Oqu(r.lcZ(11,8,i.updated_at)),r.xp6(3),r.Q6J("userOwnsResource",o.currentUser.get("id")===i.user_id),r.xp6(1),r.Q6J("matTooltip",r.lcZ(15,10,"Edit tracking pixel"))}}function rt(t,e){1&t&&(r.TgZ(0,"no-results-message",38),r.TgZ(1,"span",39),r._uU(2,"No tracking pixels have been created yet"),r.qZA(),r.qZA())}var st=function(){var t=function(){function t(e,n,i,o,a,r,s,c){d(this,t),this.datatable=e,this.currentUser=n,this.linkUsage=i,this.trackingPixels=o,this.toast=a,this.route=r,this.workspaces=s,this.activeSection=c,this.filters=J,this.pixels$=this.datatable.data$}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.workspaceSub=this.workspaces.activeId$.subscribe(function(){t.setFilters()}),this.datatable.init({uri:c.BASE_URI,staticParams:{with:["user"],userId:this.showUserColumn()?null:this.currentUser.get("id")}})}},{key:"ngOnDestroy",value:function(){this.workspaceSub.unsubscribe()}},{key:"maybeDeleteSelectedPixels",value:function(t){var e=this;this.datatable.confirmResourceDeletion("tracking pixels").subscribe(function(){e.trackingPixels.delete(t||e.datatable.selectedRows$.value).subscribe(function(){e.datatable.reset(),e.linkUsage.reload(),e.toast.open(i.V.TRACKING_PIXEL_DELETE_SUCCESS)},function(t){e.toast.open(t.message||o.v.Default)})})}},{key:"showCrupdatePixelModal",value:function(t){var e=this;this.datatable.openCrupdateResourceModal(P,{pixel:t}).subscribe(function(){e.linkUsage.reload()})}},{key:"showUserColumn",value:function(){return this.activeSection.admin||!!this.workspaces.activeId$.value}},{key:"setFilters",value:function(){var t=this;this.filters=J.filter(function(e){return"user_id"!==e.key||t.showUserColumn()})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Y36(a.x),r.Y36(E.I),r.Y36(L.F),r.Y36(c),r.Y36(m.F),r.Y36(D.gz),r.Y36(R.b),r.Y36(Y.W))},t.\u0275cmp=r.Xpm({type:t,selectors:[["tracking-pixel-index"]],features:[r._Bn([a.x])],decls:35,vars:12,consts:[[1,"datatable-page-header"],["trans",""],[1,"header"],["pluralName","pixels",3,"filters"],[1,"action-buttons"],["permission","tracking_pixels.create"],["mat-raised-button","","color","accent",1,"button-with-icon",3,"click"],["svgIcon","add"],[1,"datatable","responsive-table"],["class","loading-bar","mode","indeterminate","color","accent",4,"ngIf"],[1,"material-table"],["table-header-checkbox",""],["table-sort-header","","trans",""],["table-sort-header","","trans","",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["svgImage","location-tracking.svg",4,"ngIf"],["mode","indeterminate","color","accent",1,"loading-bar"],["colspan","7"],["trans","",1,"bulk-actions-title",3,"transValues"],[1,"bulk-actions"],["permission","tracking_pixels.delete"],["type","button","mat-raised-button","","color","warn","trans","",3,"click"],[3,"table-body-checkbox"],["data-label","Name"],["data-label","Owner",4,"ngIf"],["data-label","Type"],["data-label","Pixel ID"],["data-label","Last Updated"],[1,"edit-column"],["permission","tracking_pixels.update",3,"userOwnsResource"],["mat-icon-button","",3,"matTooltip","click"],["svgIcon","edit"],["permission","tracking_pixels.delete",1,"visible-on-mobile"],["type","button","mat-icon-button","","trans","",3,"click"],["svgIcon","delete"],["data-label","Owner"],[3,"user"],["svgImage","location-tracking.svg"],["primary-text","","trans",""]],template:function(t,e){1&t&&(r.TgZ(0,"div",0),r.TgZ(1,"h1",1),r._uU(2,"Tracking Pixels"),r.qZA(),r.TgZ(3,"div",2),r._UZ(4,"datatable-filters",3),r.TgZ(5,"div",4),r.TgZ(6,"permission-aware-button",5),r.TgZ(7,"button",6),r.NdJ("click",function(){return e.showCrupdatePixelModal()}),r._UZ(8,"mat-icon",7),r.TgZ(9,"span",1),r._uU(10,"Add New Pixel"),r.qZA(),r.qZA(),r.qZA(),r.qZA(),r.qZA(),r.qZA(),r.TgZ(11,"div",8),r.YNc(12,tt,1,0,"mat-progress-bar",9),r.ALo(13,"async"),r.TgZ(14,"table",10),r.TgZ(15,"thead"),r.TgZ(16,"tr"),r._UZ(17,"th",11),r.TgZ(18,"th",12),r._uU(19,"Name"),r.qZA(),r.YNc(20,et,2,0,"th",13),r.TgZ(21,"th",12),r._uU(22,"Type"),r.qZA(),r.TgZ(23,"th",1),r._uU(24,"Pixel ID"),r.qZA(),r.TgZ(25,"th",1),r._uU(26,"Last Updated"),r.qZA(),r._UZ(27,"th"),r.qZA(),r.YNc(28,it,8,3,"tr",14),r.qZA(),r.TgZ(29,"tbody"),r.YNc(30,at,20,12,"tr",15),r.ALo(31,"async"),r.qZA(),r.qZA(),r.YNc(32,rt,3,0,"no-results-message",16),r.ALo(33,"async"),r._UZ(34,"datatable-footer"),r.qZA()),2&t&&(r.xp6(4),r.Q6J("filters",e.filters),r.xp6(8),r.Q6J("ngIf",r.lcZ(13,6,e.datatable.paginator&&e.datatable.paginator.loading$)),r.xp6(8),r.Q6J("ngIf",e.showUserColumn()),r.xp6(8),r.Q6J("ngIf",e.datatable.selectedRows$.value.length),r.xp6(2),r.Q6J("ngForOf",r.lcZ(31,8,e.pixels$)),r.xp6(2),r.Q6J("ngIf",r.lcZ(33,10,e.datatable.paginator.noResults$)))},directives:[_.P,F.h,Q.v,y.lW,b.Hw,v.O5,$.e,B.p,v.sg,H.V,V.pW,z.O,G.gM,j.r,X.U],pipes:[v.Ov,W.l,K.R],styles:[".mat-column-type[_ngcontent-%COMP%]{text-transform:capitalize}"],changeDetection:0}),t}()},36501:function(t,e,n){"use strict";n.d(e,{F:function(){return s}});var i=n(66994),o=n(35366),a=n(68515),r=n(541),s=function(){var t=function(){function t(e,n){d(this,t),this.http=e,this.selectValues=n,this.response$=new i.t(1)}return g(t,[{key:"reload",value:function(){var t=this;this.selectValues.clearCache(),this.http.get("link/usage").subscribe(function(e){t.response$.next(e)})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.LFG(a.r),o.LFG(r.U))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},32198:function(t,e,n){"use strict";n.d(e,{l:function(){return s}});var i=n(78512),o=n(35366),a=n(31041),r=n(88195),s=function(){var t=function(){function t(e,n){d(this,t),this.fb=e,this.settings=n,this.errors$=new i.X({}),this.build(),this.linkHash=this.formGroup.get("hash")}return g(t,[{key:"value",value:function(){var t=Object.assign({},this.formGroup.value);return t.rules=(t.geo_rules||[]).concat(t.device_rules).concat(t.platform_rules).filter(function(t){return(null==t?void 0:t.key)&&(null==t?void 0:t.value)}),delete t.geo_rules,delete t.device_rules,delete t.platform_rules,t.type.indexOf(":")>-1&&(t.type_id=parseInt(t.type.split(":")[1]),t.type=t.type.split(":")[0]),t.long_urls?(t.long_urls=t.long_urls.split(/\n/g),delete t.long_url,delete t.alias):delete t.long_urls,this.formGroup.get("password").dirty||delete t.password,t}},{key:"build",value:function(){var t=this,e=this.settings.get("links.default_type","direct");this.formGroup=this.fb.group({type:[e],name:[""],long_url:[""],long_urls:[""],domain_id:[null],hash:[""],alias:[""],image:[""],utm:[""],password:[""],active:[!0],expires_at:[""],activates_at:[""],description:[""],tags:[[]],pixels:[[]],groups:[[]],geo_rules:this.fb.array([]),device_rules:this.fb.array([]),platform_rules:this.fb.array([]),exp_clicks_rule:this.fb.group({key:[""],value:[""]})}),this.geoRules=this.formGroup.controls.geo_rules,this.deviceRules=this.formGroup.controls.device_rules,this.platformRules=this.formGroup.controls.platform_rules,this.expClicksRule=this.formGroup.controls.exp_clicks_rule,this.addNewGeoRule(),this.addNewDeviceRule(),this.addNewPlatformRule(),this.formGroup.get("long_urls").valueChanges.subscribe(function(e){e?t.formGroup.get("alias").disable():t.formGroup.get("alias").enable()})}},{key:"patchValue",value:function(t){var e=this;if(t){var n=Object.assign({},t);"type_id"in t&&t.type_id&&(n.type="".concat(t.type,":").concat(t.type_id));var i=t.rules||[];n.geo_rules=i.filter(function(t){return"geo"===t.type}),n.device_rules=i.filter(function(t){return"device"===t.type}),n.platform_rules=i.filter(function(t){return"platform"===t.type}),n.exp_clicks_rule=i.find(function(t){return"exp_clicks"===t.type}),n.tags=(n.tags||[]).map(function(t){return t.name}),n.pixels=(n.pixels||[]).map(function(t){return t.id}),n.groups=(n.groups||[]).map(function(t){return t.id}),t.has_password&&(n.password="******"),this.formGroup.patchValue(n),n.geo_rules.length&&(this.geoRules.clear(),n.geo_rules.forEach(function(t){e.addNewGeoRule(t.key,t.value)})),n.device_rules.length&&(this.deviceRules.clear(),n.device_rules.forEach(function(t){e.addNewDeviceRule(t.key,t.value)})),n.platform_rules.length&&(this.platformRules.clear(),n.platform_rules.forEach(function(t){e.addNewPlatformRule(t.key,t.value)}))}}},{key:"addNewGeoRule",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"us",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.geoRules.push(this.fb.group({key:[t],value:[e],type:"geo"}))}},{key:"addNewDeviceRule",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mobile",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.deviceRules.push(this.fb.group({key:[t],value:[e],type:"device"}))}},{key:"addNewPlatformRule",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"windows",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.platformRules.push(this.fb.group({key:[t],value:[e],type:"platform"}))}},{key:"setErrors",value:function(t){this.errors$.next(t||{})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.LFG(a.qu),o.LFG(r.Z))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},57125:function(t,n,o){"use strict";o.d(n,{G:function(){return u}});var a=o(16930),r=o(20274),s=o(94380),c=o(73033),l=o(35366),u=function(){var t,n=function(t){e(o,t);var n=i(o);function o(){var t;return d(this,o),(t=n.apply(this,arguments)).DEFAULT_MAX_SIZE_MB=5,t}return g(o,[{key:"initValidations",value:function(){var t,e=[new r.p({maxSize:(0,s.F)(this.DEFAULT_MAX_SIZE_MB,"MB")},this.i18n),new c.p({types:["image"]},this.i18n)];(t=this.validations).push.apply(t,e)}}]),o}(a.c);return n.\u0275fac=function(e){return(t||(t=l.n5z(n)))(e||n)},n.\u0275prov=l.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n}()},44415:function(t,e,n){"use strict";n.d(e,{y:function(){return _}});var i=n(31041),o=n(47701),a=n(98720),r=n(44689),s=n(47727),c=n(78512),l=n(40878),u=n(35366),p=n(92935),h=n(62424),f=n(38116),m=n(77307),v=n(42300),b=n(61116);function y(t,e){if(1&t){var n=u.EpF();u.TgZ(0,"div",9),u.NdJ("click",function(){var t=u.CHM(n).$implicit;return u.oxw().close(t)}),u._UZ(1,"img",10),u.TgZ(2,"div",11),u.TgZ(3,"div",12),u._uU(4),u.qZA(),u.TgZ(5,"div",13),u._uU(6),u.qZA(),u.qZA(),u.qZA()}if(2&t){var i=e.$implicit;u.xp6(1),u.Q6J("src",i.avatar,u.LSH),u.xp6(3),u.Oqu(i.display_name),u.xp6(2),u.Oqu(i.email)}}var _=function(){var t=function(){function t(e,n){d(this,t),this.dialogRef=e,this.users=n,this.searchFormControl=new i.NI,this.loading$=new c.X(!1),this.users$=new c.X([])}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.searchFormControl.valueChanges.pipe((0,o.b)(250),(0,a.x)(),(0,r.w)(function(e){return t.searchUsers(e)}),(0,s.K)(function(){return(0,l.of)([])})).subscribe(function(e){t.users$.next(e),t.loading$.next(!1)})}},{key:"close",value:function(t){this.dialogRef.close(this.normalizeUser(t))}},{key:"searchUsers",value:function(t){return this.loading$.next(!0),t?this.users.getAll({query:t}):(0,l.of)([])}},{key:"normalizeUser",value:function(t){return t?{id:t.id,name:t.display_name,image:t.avatar,model_type:t.model_type}:null}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.Y36(p.so),u.Y36(h.Q))},t.\u0275cmp=u.Xpm({type:t,selectors:[["find-user-modal"]],decls:13,vars:7,consts:[[1,"modal-header"],["mat-dialog-title","","trans",""],["type","button","tabindex","-1",1,"no-style","close-button",3,"click"],["svgIcon","close"],[1,"input-container","search-input-container"],["type","text","placeholder","Search for user by name or email...",3,"formControl"],[1,"small",3,"isVisible"],[1,"users"],["class","user",3,"click",4,"ngFor","ngForOf"],[1,"user",3,"click"],[3,"src"],[1,"meta","overflow-hidden"],[1,"name","overflow-hidden"],[1,"email","overflow-hidden"]],template:function(t,e){1&t&&(u.TgZ(0,"div",0),u.TgZ(1,"h2",1),u._uU(2,"Find User"),u.qZA(),u.TgZ(3,"button",2),u.NdJ("click",function(){return e.close()}),u._UZ(4,"mat-icon",3),u.qZA(),u.qZA(),u.TgZ(5,"mat-dialog-content"),u.TgZ(6,"div",4),u._UZ(7,"input",5),u._UZ(8,"loading-indicator",6),u.ALo(9,"async"),u.qZA(),u.TgZ(10,"div",7),u.YNc(11,y,7,3,"div",8),u.ALo(12,"async"),u.qZA(),u.qZA()),2&t&&(u.xp6(7),u.Q6J("formControl",e.searchFormControl),u.xp6(1),u.Q6J("isVisible",u.lcZ(9,3,e.loading$)),u.xp6(3),u.Q6J("ngForOf",u.lcZ(12,5,e.users$)))},directives:[p.uh,f.P,m.Hw,p.xY,i.Fj,i.JJ,i.oH,v.Q,b.sg],pipes:[b.Ov],styles:["[_nghost-%COMP%]{display:block;width:500px;max-width:100%}.modal-header[_ngcontent-%COMP%]{margin-bottom:15px}.search-input-container[_ngcontent-%COMP%]{width:100%;margin-bottom:20px;position:relative}loading-indicator[_ngcontent-%COMP%]{top:12px;right:12px}.users[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between;margin:0 -15px}.user[_ngcontent-%COMP%]{display:flex;align-items:center;width:calc(50% - 10px);flex-shrink:0;min-width:0;padding:12px;border-radius:4px;cursor:pointer}.user[_ngcontent-%COMP%]:hover{background-color:var(--be-hover)}.user[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:50px;height:50px;flex-shrink:0;margin-right:10px;border-radius:4px;overflow:hidden}.user[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{color:var(--be-text);font-size:1.5rem;margin-bottom:5px}.user[_ngcontent-%COMP%]   .email[_ngcontent-%COMP%]{color:var(--be-secondary-text)}.overflow-hidden[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}"],changeDetection:0}),t}()},68692:function(t,e,n){"use strict";n.d(e,{X:function(){return s}});var i=n(61116),o=n(68400),a=n(31041),r=n(35366),s=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.oAB({type:t}),t.\u0275inj=r.cJS({imports:[[i.ez,o.N,a.UX]]}),t}()},77910:function(t,e,n){"use strict";n.d(e,{S:function(){return I}});var i=n(31041),o=n(78512),a=n(40878),r=n(47701),s=n(98720),l=n(44689),u=n(47727),p=n(35366),h=n(95522),f=n(61116),m=n(79961),v=n(77307),b=n(87064),y=n(40450),_=["auto"],x=["inputEl"],k=["selectModeTemplate"];function Z(t,e){if(1&t){var n=p.EpF();p.TgZ(0,"mat-chip",8),p.NdJ("removed",function(){var t=p.CHM(n).index;return p.oxw().remove(t)}),p._uU(1),p._UZ(2,"mat-icon",9),p.qZA()}if(2&t){var i=e.$implicit,o=p.oxw();p.Q6J("selectable",!1)("removable",!o.selectMode),p.xp6(1),p.hij(" ",o.displayChipValue(i)," ")}}var w=function(t){return{elementRef:t}};function A(t,e){if(1&t){var n=p.EpF();p.TgZ(0,"input",10,11),p.NdJ("matChipInputTokenEnd",function(t){return p.CHM(n),p.oxw().addFromChipInput(t.value)}),p.ALo(2,"trans"),p.qZA()}if(2&t){var i=p.oxw(),o=p.MAs(1),a=p.MAs(6);p.Q6J("placeholder",p.lcZ(2,7,i.placeholder))("type",i.type)("matChipInputFor",o)("matChipInputAddOnBlur",!0)("matAutocomplete",a)("matAutocompleteConnectedTo",p.VKq(9,w,i.el))("formControl",i.formControl)}}function C(t,e){if(1&t&&(p.TgZ(0,"mat-option",12),p._uU(1),p.qZA()),2&t){var n=e.$implicit,i=p.oxw();p.Q6J("value",n),p.xp6(1),p.Oqu(i.displayChipValue(n))}}function T(t,e){if(1&t&&(p.TgZ(0,"mat-option",12),p._uU(1),p.qZA()),2&t){var n=e.$implicit,i=p.oxw(2);p.Q6J("value",n),p.xp6(1),p.Oqu(i.displayChipValue(n))}}function q(t,e){1&t&&p.YNc(0,T,2,2,"mat-option",6),2&t&&p.Q6J("ngForOf",e.suggestions)}var I=function(){var t=function(){function t(e){d(this,t),this.el=e,this.type="text",this.emailsInput=!1,this.selectMode=!1,this.formControl=new i.NI,this.items$=new o.X([]),this.suggestedValues$=new o.X([])}return g(t,[{key:"suggestedValues",set:function(t){this.suggestedValues$.next(t)}},{key:"ngOnInit",value:function(){this.suggestFn&&this.bindToSearchControl()}},{key:"ngAfterViewInit",value:function(){this.emailsInput&&this.parseEmailsOnPaste()}},{key:"remove",value:function(t){var e=c(this.items$.value);e.splice(t,1),this.items$.next(e),this.propagateChange(this.items$.value)}},{key:"addFromChipInput",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];!t||this.matAutocomplete.isOpen||this.selectMode||this.add(t,e)}},{key:"addFromAutocomplete",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.add(t,e)}},{key:"add",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t="string"==typeof t?t.trim():t;var n=this.findValueIndex(t)>-1;t&&!n&&(this.items$.next([].concat(c(this.items$.value),[t])),e&&this.propagateChange(this.items$.value)),this.inputEl&&(this.inputEl.nativeElement.value=""),this.formControl.setValue(null),this.suggestedValues$.next([])}},{key:"findValueIndex",value:function(t){return"string"==typeof t?this.items$.value.indexOf(t):this.items$.value.findIndex(function(e){return e.id===t.id})}},{key:"writeValue",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.items$.next(t||[])}},{key:"registerOnChange",value:function(t){this.propagateChange=t}},{key:"registerOnTouched",value:function(){}},{key:"bindToSearchControl",value:function(){var t=this;this.formControl.valueChanges.pipe((0,r.b)(150),(0,s.x)(),(0,l.w)(function(e){return e?t.suggestFn(e):(0,a.of)([])}),(0,u.K)(function(){return(0,a.of)([])})).subscribe(function(e){var n=e.filter(function(e){return-1===t.findValueIndex(e)});t.suggestedValues$.next(n)})}},{key:"displayChipValue",value:function(t){return"object"==typeof t?t.name:t}},{key:"parseEmailsOnPaste",value:function(){var t=this;this.inputEl.nativeElement.addEventListener("paste",function(e){var n=(e.clipboardData||window.clipboardData).getData("text").match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);if(n){e.preventDefault();var i=window.getSelection();i.rangeCount&&(i.deleteFromDocument(),n.forEach(function(e){return t.add(e)}))}})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(p.Y36(p.SBq))},t.\u0275cmp=p.Xpm({type:t,selectors:[["chip-input"]],viewQuery:function(t,e){var n;(1&t&&(p.Gf(_,5),p.Gf(x,5),p.Gf(k,5)),2&t)&&(p.iGM(n=p.CRH())&&(e.matAutocomplete=n.first),p.iGM(n=p.CRH())&&(e.inputEl=n.first),p.iGM(n=p.CRH())&&(e.selectModeTemplate=n.first))},hostVars:2,hostBindings:function(t,e){2&t&&p.ekj("select-mode",e.selectMode)},inputs:{placeholder:"placeholder",type:"type",emailsInput:"emailsInput",suggestFn:"suggestFn",selectMode:"selectMode",suggestedValues:"suggestedValues"},features:[p._Bn([{provide:i.JU,useExisting:t,multi:!0}])],decls:11,vars:9,consts:[[3,"selectable"],["chipList",""],[3,"selectable","removable","removed",4,"ngFor","ngForOf"],["class","mat-chip-input mat-input-element",3,"placeholder","type","matChipInputFor","matChipInputAddOnBlur","matAutocomplete","matAutocompleteConnectedTo","formControl","matChipInputTokenEnd",4,"ngIf"],[1,"chip-input-autocomplete-panel",3,"autoActiveFirstOption","optionSelected"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],["selectModeTemplate",""],[3,"selectable","removable","removed"],["matChipRemove","","svgIcon","cancel"],[1,"mat-chip-input","mat-input-element",3,"placeholder","type","matChipInputFor","matChipInputAddOnBlur","matAutocomplete","matAutocompleteConnectedTo","formControl","matChipInputTokenEnd"],["inputEl",""],[3,"value"]],template:function(t,e){1&t&&(p.TgZ(0,"mat-chip-list",0,1),p.YNc(2,Z,3,3,"mat-chip",2),p.ALo(3,"async"),p.YNc(4,A,3,11,"input",3),p.qZA(),p.TgZ(5,"mat-autocomplete",4,5),p.NdJ("optionSelected",function(t){return e.addFromAutocomplete(t.option.value)}),p.YNc(7,C,2,2,"mat-option",6),p.ALo(8,"async"),p.qZA(),p.YNc(9,q,1,1,"ng-template",null,7,p.W1O)),2&t&&(p.Q6J("selectable",!1),p.xp6(2),p.Q6J("ngForOf",p.lcZ(3,5,e.items$)),p.xp6(2),p.Q6J("ngIf",!e.selectMode),p.xp6(1),p.Q6J("autoActiveFirstOption",!0),p.xp6(2),p.Q6J("ngForOf",p.lcZ(8,7,e.suggestedValues$)))},directives:[h.qn,f.sg,f.O5,m.XC,h.HS,v.Hw,h.qH,h.oH,m.ZL,i.Fj,i.JJ,i.oH,b.ey],pipes:[f.Ov,y.R],styles:["chip-input{display:block;min-height:46px}chip-input .mat-chip-list-wrapper{width:100%;height:100%;color:inherit;border:1px solid var(--be-divider-default);padding:6px;line-height:normal;font-size:1.4rem;font-family:inherit;background-color:inherit;box-sizing:border-box;border-radius:2px;margin:0}chip-input .mat-chip-input{height:24px;font:inherit;background:0 0;color:currentColor;border:none;outline:0;padding:0;margin:0;width:0;max-width:100%;vertical-align:bottom;text-align:inherit}chip-input .mat-chip-input:focus{outline:none;box-shadow:none}.chip-input-select-panel{background-color:var(--be-background);min-width:180px;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}"],encapsulation:2,changeDetection:0}),t}()},56160:function(t,e,n){"use strict";n.d(e,{G:function(){return g}});var i=n(61116),o=n(95522),a=n(77307),r=n(31041),s=n(68400),c=n(79961),l=n(84369),u=n(87064),p=n(35366),g=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=p.oAB({type:t}),t.\u0275inj=p.cJS({imports:[[i.ez,o.Hi,c.Bb,r.UX,s.N,l.ot,a.Ps,u.si]]}),t}()},69042:function(t,e,n){"use strict";n.d(e,{M:function(){return m}});var i=n(64762),o=n(35366),a=n(31041),r=n(40149),s=n(78512),c=n(98979),l=n(87064),u=n(77307),p=n(38116),h=n(61116),f=["*"],m=function(){var t=function(){function t(e){d(this,t),this.overlayPanel=e,this.color$=new s.X(null)}return g(t,[{key:"ngOnDestroy",value:function(){this.pickerSub&&this.pickerSub.unsubscribe()}},{key:"writeValue",value:function(t){this.color$.next(t)}},{key:"registerOnChange",value:function(t){this.propagateChange=t}},{key:"registerOnTouched",value:function(){}},{key:"openColorPicker",value:function(t){return(0,i.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var i,a,s=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(378).then(n.bind(n,49378));case 2:i=e.sent,a=i.BeColorPickerModule,this.pickerSub=this.overlayPanel.open(a.components.panel,{origin:new o.SBq(t.target),position:r.x,data:{color:this.color$.value}}).valueChanged().subscribe(function(t){s.color$.next(t),s.propagateChange(s.color$.value)});case 5:case"end":return e.stop()}},e,this)}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.Y36(c.T))},t.\u0275cmp=o.Xpm({type:t,selectors:[["color-picker-input"]],features:[o._Bn([{provide:a.JU,useExisting:t,multi:!0}])],ngContentSelectors:f,decls:7,vars:4,consts:[["type","button","matRipple","",1,"no-style","color-picker-btn",3,"click"],["svgIcon","drop-custom",1,"color-icon"],["trans","",1,"name"],["trans","",1,"change"]],template:function(t,e){1&t&&(o.F$t(),o.TgZ(0,"button",0),o.NdJ("click",function(t){return e.openColorPicker(t)}),o.TgZ(1,"mat-icon",1),o.ALo(2,"async"),o.qZA(),o.TgZ(3,"span",2),o.Hsn(4),o.qZA(),o.TgZ(5,"span",3),o._uU(6,"Change"),o.qZA(),o.qZA()),2&t&&(o.xp6(1),o.Udp("color",o.lcZ(2,2,e.color$)))},directives:[l.wG,u.Hw,p.P],pipes:[h.Ov],styles:[".color-picker-btn[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 10px 0 15px;margin-bottom:15px;border-radius:4px;border:1px solid var(--be-divider-default);background-color:var(--be-background);cursor:pointer;height:57px;font-size:1.5rem;overflow:hidden;width:100%}.color-picker-btn[_ngcontent-%COMP%]   .color-icon[_ngcontent-%COMP%]{width:35px;height:35px}.color-picker-btn[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{margin-left:3px;margin-top:3px;font-size:1.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px;text-transform:capitalize}.color-picker-btn[_ngcontent-%COMP%]   .change[_ngcontent-%COMP%]{color:var(--be-link);font-size:1.3rem;margin-left:auto}"],changeDetection:0}),t}()},37604:function(t,e,n){"use strict";n.d(e,{x:function(){return c}});var i=n(61116),o=n(68400),a=n(77307),r=n(87064),s=n(35366),c=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=s.oAB({type:t}),t.\u0275inj=s.cJS({imports:[[i.ez,o.N,a.Ps,r.si]]}),t}()},98081:function(t,e,n){"use strict";n.d(e,{k:function(){return p}});var i=n(31041),o=n(35366),a=n(61116),r=n(38116),c=n(84369);function l(t,e){if(1&t){var n=o.EpF();o.TgZ(0,"button",8),o.NdJ("click",function(){return o.CHM(n),o.oxw().clearValue()}),o._uU(1," Clear "),o.qZA()}}var u=["*"],p=function(){var t=function(){function t(e,n){d(this,t),this.fb=e,this.cd=n,this.currentDateAsDefault=!1,this.initiated=!1,this.form=this.fb.group({date:[""],time:[""]}),this.setCurrentDatetime()}return g(t,[{key:"writeValue",value:function(t){var e=s((t=(t||"").replace("Z","")).includes("T")?t.split("T"):t.split(" "),2),n=e[0],i=e[1];i=i?i.substr(0,5):"",!this.initiated&&this.currentDateAsDefault&&(n=n||this.currentDate,i=i||this.currentTime),this.initiated=!0,this.form.patchValue({date:n,time:i})}},{key:"registerOnChange",value:function(t){var e=this;this.propagateChange=t,this.form.valueChanges.subscribe(function(t){var n;t.date?(t.time||(t.time="00:00"),2===(n="".concat(t.date," ").concat(t.time)).split(":").length&&(n+=":00")):n=null,e.propagateChange(n)})}},{key:"registerOnTouched",value:function(){}},{key:"setDisabledState",value:function(t){t?this.form.disable():this.form.enable(),this.cd.markForCheck()}},{key:"clearValue",value:function(){this.form.patchValue({date:null,time:null})}},{key:"setCurrentDatetime",value:function(){var t=s((new Date).toISOString().replace("Z","").split("T"),2),e=t[0],n=s(t[1].split(":"),2),i=n[0],o=n[1];this.currentDate=e,this.currentTime="".concat(i,":").concat(o)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.Y36(i.qu),o.Y36(o.sBO))},t.\u0275cmp=o.Xpm({type:t,selectors:[["datetime-input"]],inputs:{id:"id",currentDateAsDefault:"currentDateAsDefault"},features:[o._Bn([{provide:i.JU,useExisting:t,multi:!0}])],ngContentSelectors:u,decls:14,vars:8,consts:[[3,"formGroup"],[1,"legend-label"],["class","clear-btn","type","button","mat-button","","trans","",3,"click",4,"ngIf"],[1,"inline-inputs-container"],[1,"input-container"],["trans","",1,"hidden",3,"for"],["type","date","formControlName","date",1,"date-input",3,"id","placeholder"],["type","time","formControlName","time",1,"time-input",3,"id","placeholder"],["type","button","mat-button","","trans","",1,"clear-btn",3,"click"]],template:function(t,e){1&t&&(o.F$t(),o.TgZ(0,"fieldset",0),o.TgZ(1,"legend"),o.TgZ(2,"span",1),o.Hsn(3),o.qZA(),o.YNc(4,l,2,0,"button",2),o.qZA(),o.TgZ(5,"div",3),o.TgZ(6,"div",4),o.TgZ(7,"label",5),o._uU(8,"Date"),o.qZA(),o._UZ(9,"input",6),o.qZA(),o.TgZ(10,"div",4),o.TgZ(11,"label",5),o._uU(12,"Time"),o.qZA(),o._UZ(13,"input",7),o.qZA(),o.qZA(),o.qZA()),2&t&&(o.Q6J("formGroup",e.form),o.xp6(4),o.Q6J("ngIf",!e.form.disabled),o.xp6(3),o.Q6J("for",e.id+"-date"),o.xp6(2),o.Q6J("id",e.id+"-date")("placeholder",e.currentDate),o.xp6(2),o.Q6J("for",e.id+"-time"),o.xp6(2),o.Q6J("id",e.id+"-time")("placeholder",e.currentTime))},directives:[i.JL,i.sg,a.O5,r.P,i.Fj,i.JJ,i.u,c.lW],styles:[".date-input[_ngcontent-%COMP%]{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.time-input[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-container[_ngcontent-%COMP%]{margin-right:0}legend[_ngcontent-%COMP%]{display:flex;align-items:center;color:var(--be-label);width:100%}.legend-label[_ngcontent-%COMP%]{margin-right:auto}.clear-btn[_ngcontent-%COMP%]{margin-left:10px;line-height:28px}"],changeDetection:0}),t}()},49517:function(t,e,n){"use strict";n.d(e,{N:function(){return h}});var i=n(35366),o=n(72674),a=n(98979),r=n(84369),s=n(77307),c=["infoIcon"],l=["popoverContent"];function u(t,e){1&t&&i.Hsn(0)}var p=["*"],h=function(){var t=function(){function t(e,n){d(this,t),this.overlay=e,this.viewContainerRef=n}return g(t,[{key:"openPopover",value:function(){var t=this;this.overlayRef&&this.closePopover(),Object.assign({},o.Z)[0].offsetY=-15,this.overlayRef=this.overlay.open(this.content,{origin:this.infoButton,position:o.Z,hasBackdrop:!1,scrollStrategy:"close",viewContainerRef:this.viewContainerRef,panelClass:["info-popover-panel",this.wider?"wider":null]}),this.overlayRef.getPanelEl().addEventListener("mouseleave",function(){t.closePopover()})}},{key:"closePopover",value:function(){this.overlayRef&&(this.overlayRef.close(),this.overlayRef=null)}},{key:"togglePopover",value:function(){this.overlayRef?this.closePopover():this.openPopover()}},{key:"onMouseLeave",value:function(t){var e=t.toElement||t.relatedTarget;e&&e.classList.contains("info-popover-panel")||this.closePopover()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Y36(a.T),i.Y36(i.s_b))},t.\u0275cmp=i.Xpm({type:t,selectors:[["info-popover"]],viewQuery:function(t,e){var n;(1&t&&(i.Gf(c,5,i.SBq),i.Gf(l,5)),2&t)&&(i.iGM(n=i.CRH())&&(e.infoButton=n.first),i.iGM(n=i.CRH())&&(e.content=n.first))},inputs:{wider:"wider"},ngContentSelectors:p,decls:5,vars:0,consts:[["type","button","mat-icon-button","",3,"click","mouseenter","mouseleave"],["svgIcon","info",1,"info-icon"],["infoIcon",""],["popoverContent",""]],template:function(t,e){1&t&&(i.F$t(),i.TgZ(0,"button",0),i.NdJ("click",function(){return e.togglePopover()})("mouseenter",function(){return e.openPopover()})("mouseleave",function(t){return e.onMouseLeave(t)}),i._UZ(1,"mat-icon",1,2),i.qZA(),i.YNc(3,u,1,0,"ng-template",null,3,i.W1O))},directives:[r.lW,s.Hw],styles:["info-popover .mat-icon-button{vertical-align:middle;color:var(--be-secondary-text);cursor:help}.info-popover-panel{display:block;background-color:var(--be-background);box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12);border-radius:4px;padding:15px;max-width:350px}.info-popover-panel.wider{max-width:550px}.info-popover-panel .title{font-size:1.6rem;margin-bottom:8px}.info-popover-panel .description{margin-bottom:5px;color:var(--be-secondary-text)}.info-popover-panel .link{margin-top:5px;padding-top:5px;border-top:var(--be-divider-default)}.info-popover-panel .link .mat-icon{vertical-align:middle;margin-right:5px;color:var(--be-link)}.info-popover-panel .link a:hover{text-decoration:underline}.info-popover-panel ol,.info-popover-panel ul{padding-left:15px;margin:0}"],encapsulation:2,changeDetection:0}),t}()},86013:function(t,e,n){"use strict";n.d(e,{b:function(){return s}});var i=n(61116),o=n(77307),a=n(84369),r=n(35366),s=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.oAB({type:t}),t.\u0275inj=r.cJS({imports:[[i.ez,o.Ps,a.ot]]}),t}()},72674:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var i=[{originX:"end",originY:"center",overlayX:"start",overlayY:"center",offsetX:5},{originX:"start",originY:"center",overlayX:"end",overlayY:"center",offsetX:5}]},4182:function(t,e,n){"use strict";n.d(e,{S:function(){return p}});var i=n(61116),o=n(84369),a=n(77307),r=n(97070),s=n(68400),c=n(31041),l=n(99808),u=n(35366),p=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=u.oAB({type:t}),t.\u0275inj=u.cJS({imports:[[i.ez,o.ot,r.Tx,s.N,c.UX,a.Ps,l.p]]}),t}()},26437:function(t,e,n){"use strict";n.d(e,{B:function(){return o}});var i=n(99713),o=[(0,i.X$)("fadeIn",[(0,i.eR)(":enter",[(0,i.oB)({opacity:0}),(0,i.jt)("325ms ease-in",(0,i.oB)({opacity:1}))])]),(0,i.X$)("fadeOut",[(0,i.eR)(":leave",[(0,i.oB)({opacity:1,position:"absolute",left:"0",right:"0"}),(0,i.jt)("325ms ease-out",(0,i.oB)({opacity:0}))])])]},73709:function(t,e,n){"use strict";function i(t){var e=Object.assign({},t);return Object.keys(e).forEach(function(t){null!=e[t]&&""!==e[t]||delete e[t]}),e}n.d(e,{N:function(){return i}})},37123:function(t,e,n){"use strict";n.d(e,{T:function(){return p}});var i=n(35366),o=n(92935),a=n(77307),r=n(38116),s=n(84369),c=function(){var t=function(){function t(e){d(this,t),this.dialogRef=e}return g(t,[{key:"close",value:function(){this.dialogRef.close()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Y36(o.so))},t.\u0275cmp=i.Xpm({type:t,selectors:[["csv-export-info-dialog"]],decls:13,vars:0,consts:[[1,"modal-header"],["mat-dialog-title","",1,"modal-title"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["mat-dialog-content","",1,"mat-dialog-contents"],[1,"message-container"],["svgIcon","check","color","su",1,"success-icon"],["trans",""],["mat-dialog-actions","",1,"buttons","right","mat-dialog-actions"],["mat-raised-button","","color","accent","cdkFocusInitial","","trans","",1,"button","primary","submit-button",3,"click"]],template:function(t,e){1&t&&(i.TgZ(0,"div",0),i.TgZ(1,"h2",1),i._uU(2,"CSV Export"),i.qZA(),i.TgZ(3,"button",2),i.NdJ("click",function(){return e.close()}),i._UZ(4,"mat-icon",3),i.qZA(),i.qZA(),i.TgZ(5,"div",4),i.TgZ(6,"div",5),i._UZ(7,"mat-icon",6),i.TgZ(8,"div",7),i._uU(9," Your request is being processed. We'll email you when the report is ready to download. In certain cases, it might take a little longer, depending on the number of items beings exported and the volume of activity. "),i.qZA(),i.qZA(),i.qZA(),i.TgZ(10,"div",8),i.TgZ(11,"button",9),i.NdJ("click",function(){return e.close()}),i._uU(12," Got it "),i.qZA(),i.qZA())},directives:[o.uh,a.Hw,o.xY,r.P,o.H8,s.lW],styles:["[_nghost-%COMP%]{display:block;max-width:500px}.modal-header[_ngcontent-%COMP%]{margin-bottom:10px}.message-container[_ngcontent-%COMP%]{display:flex;align-items:flex-start;margin-bottom:10px}.success-icon[_ngcontent-%COMP%]{color:#43a047;margin-right:10px;flex-shrink:0}"],changeDetection:0}),t}(),l=n(68515),u=n(24859),p=function(){var t=function(){function t(e,n){d(this,t),this.http=e,this.modal=n}return g(t,[{key:"export",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.http.post(t,n).subscribe(function(t){t.downloadPath?function(t,e){var n=document.createElement("a");n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}(t.downloadPath):e.modal.open(c)})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.LFG(l.r),i.LFG(u.u))},t.\u0275prov=i.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},63380:function(t,e,n){"use strict";n.d(e,{M:function(){return c}});var i=n(77307),o=n(84369),a=n(92935),r=n(68400),s=n(35366),c=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=s.oAB({type:t}),t.\u0275inj=s.cJS({imports:[[r.N,i.Ps,o.ot,a.Is]]}),t}()},83381:function(t,e,n){"use strict";n.d(e,{r:function(){return r}});var i=n(59075),o=n(44415),a=n(45523),r=[new i.XQ({type:i.Bq.Select,key:"global",defaultValue:!1,description:"Whether domain is set as global or not",options:[{key:"No",value:!1},{key:"Yes",value:!0}]}),new a.yH({description:"Date the domain was last updated"}),new a.T7({description:"Date the domain was created"}),new i.XQ({type:i.Bq.SelectModel,key:"user_id",label:"User",description:"User domain was created by",component:o.y})]},71453:function(t,e,n){"use strict";n.d(e,{T:function(){return ct}});var i=n(36024),o=n(56515),a=n(78512),r=n(92935),s=n(31041),c=n(11520),l=n(35366),u=n(14732),p=n(73234),h=n(88195),f=n(63337),m=n(28505),v=n(38116),b=n(77307),y=n(61116),_=n(84369),x=n(79572),k=n(42300),Z=n(40450);function w(t,e){if(1&t&&(l.TgZ(0,"div",23),l._uU(1),l.qZA()),2&t){var n=l.oxw(3).ngIf;l.xp6(1),l.Oqu(n.host)}}function A(t,e){1&t&&(l.TgZ(0,"div",24),l.TgZ(1,"mat-slide-toggle",25),l._uU(2,"Global"),l.qZA(),l.TgZ(3,"p",20),l._uU(4,"Whether all users should be able to select this domain."),l.qZA(),l.qZA())}function C(t,e){if(1&t&&(l.TgZ(0,"div",16),l.TgZ(1,"div",17),l.TgZ(2,"label",18),l._uU(3,"Host"),l.qZA(),l._UZ(4,"input",19),l.TgZ(5,"p",20),l._uU(6),l.qZA(),l.YNc(7,w,2,1,"div",21),l.qZA(),l.YNc(8,A,5,0,"div",22),l.qZA()),2&t){var n=l.oxw(2).ngIf,i=l.oxw();l.xp6(6),l.hij(" Enter the exact domain name you want your ",i.data.resourceName||"links"," to be accessible with. It can be a subdomain (example.yourdomain.com) or root domain (yourdomain.com). "),l.xp6(1),l.Q6J("ngIf",n.host),l.xp6(1),l.Q6J("ngIf",i.insideAdmin())}}function T(t,e){if(1&t&&(l.ynx(0),l.TgZ(1,"p",20),l._uU(2," Add this CNAME record to your domain by visiting your DNS provider or registrar. "),l.qZA(),l.TgZ(3,"div",27),l.TgZ(4,"div",28),l.TgZ(5,"strong"),l._uU(6,"CNAME"),l.qZA(),l._uU(7),l.qZA(),l.qZA(),l.BQk()),2&t){var n=l.oxw(4);l.xp6(7),l.hij(" ",n.baseUrl(),"")}}function q(t,e){if(1&t&&(l.ynx(0),l.TgZ(1,"p",20),l._uU(2," Add this A record to your domain by visiting your DNS provider or registrar. "),l.qZA(),l.TgZ(3,"div",27),l.TgZ(4,"div",28),l.TgZ(5,"strong"),l._uU(6,"A"),l.qZA(),l._uU(7),l.qZA(),l.qZA(),l.BQk()),2&t){var n=l.oxw(4);l.xp6(7),l.hij(" ",n.serverIp,"")}}function I(t,e){if(1&t&&(l.TgZ(0,"div",26),l.YNc(1,T,8,1,"ng-container",6),l.ALo(2,"async"),l.YNc(3,q,8,1,"ng-container",6),l.ALo(4,"async"),l.qZA()),2&t){var n=l.oxw(3);l.xp6(1),l.Q6J("ngIf",l.lcZ(2,2,n.isSubdomain$)),l.xp6(2),l.Q6J("ngIf",!l.lcZ(4,4,n.isSubdomain$))}}function O(t,e){1&t&&(l.TgZ(0,"div",27),l._UZ(1,"loading-indicator",32),l.TgZ(2,"div",33),l._uU(3,"Checking DNS configuration..."),l.qZA(),l.qZA()),2&t&&(l.xp6(1),l.Q6J("isVisible",!0))}var U=function(t){return{host:t}};function P(t,e){if(1&t&&(l.TgZ(0,"div",39),l._uU(1,' DNS records for the domain are setup, however it seems that your server is not configured to handle requests from "host" '),l.qZA()),2&t){var n=l.oxw(5);l.Q6J("transValues",l.VKq(1,U,n.form.value.host))}}var M=function(t){return{location:t}};function S(t,e){if(1&t&&(l.TgZ(0,"div",39),l.ALo(1,"async"),l._uU(2),l.ALo(3,"async"),l.qZA()),2&t){var n=l.oxw(5);l.Q6J("transValues",l.VKq(6,M,l.lcZ(1,2,n.isSubdomain$)?n.baseUrl():n.serverIp)),l.xp6(2),l.hij(" The domain is missing ",l.lcZ(3,4,n.isSubdomain$)?"CNAME":"A"," record pointing to :location or the changes haven't propagated yet. ")}}function N(t,e){if(1&t){var n=l.EpF();l.TgZ(0,"div",34),l._UZ(1,"mat-icon",35),l.YNc(2,P,2,3,"div",36),l.ALo(3,"async"),l.YNc(4,S,4,8,"ng-template",null,37,l.W1O),l.qZA(),l.TgZ(6,"p"),l._uU(7),l.ALo(8,"trans"),l.TgZ(9,"button",38),l.NdJ("click",function(){return l.CHM(n),l.oxw(4).validateDnsForDomain()}),l.ALo(10,"async"),l._uU(11," refresh "),l.qZA(),l.qZA()}if(2&t){var i=l.MAs(5),o=l.oxw(4);l.xp6(2),l.Q6J("ngIf","serverNotConfigured"===l.lcZ(3,4,o.validationFailReason$)&&o.currentUserIsAdmin)("ngIfElse",i),l.xp6(5),l.hij(" ",l.lcZ(8,6,"You can wait and try again later or")," "),l.xp6(2),l.Q6J("disabled",l.lcZ(10,8,o.loading$))}}function J(t,e){if(1&t&&(l.TgZ(0,"div",29),l.YNc(1,O,4,1,"div",30),l.ALo(2,"async"),l.YNc(3,N,12,10,"ng-template",null,31,l.W1O),l.qZA()),2&t){var n=l.MAs(4),i=l.oxw(3);l.xp6(1),l.Q6J("ngIf",l.lcZ(2,2,i.loading$))("ngIfElse",n)}}function E(t,e){1&t&&(l.TgZ(0,"div",40),l.TgZ(1,"div",27),l._UZ(2,"loading-indicator",32),l.TgZ(3,"div",33),l._uU(4,"Connecting domain..."),l.qZA(),l.qZA(),l.TgZ(5,"p",20),l._uU(6,"Don't close this window until domain is connected."),l.qZA(),l.qZA()),2&t&&(l.xp6(2),l.Q6J("isVisible",!0))}function L(t,e){if(1&t){var n=l.EpF();l.TgZ(0,"button",41),l.NdJ("click",function(){return l.CHM(n),l.oxw(3).previousStep()}),l._UZ(1,"mat-icon",42),l._uU(2," Previous "),l.qZA()}}function D(t,e){if(1&t){var n=l.EpF();l.ynx(0),l.TgZ(1,"mat-dialog-content"),l.YNc(2,C,9,3,"div",7),l.YNc(3,I,5,6,"div",8),l.YNc(4,J,5,4,"div",9),l.YNc(5,E,7,1,"div",10),l.qZA(),l.TgZ(6,"mat-dialog-actions"),l.TgZ(7,"button",11),l.NdJ("click",function(){return l.CHM(n),l.oxw(2).close()}),l._uU(8," Cancel "),l.qZA(),l.TgZ(9,"div",12),l.YNc(10,L,3,0,"button",13),l.TgZ(11,"button",14),l.ALo(12,"async"),l.ALo(13,"async"),l._uU(14," Next "),l._UZ(15,"mat-icon",15),l.qZA(),l.qZA(),l.qZA(),l.BQk()}if(2&t){var i=e.ngIf,o=l.oxw(2);l.xp6(2),l.Q6J("ngIf",i===o.Steps.Host),l.xp6(1),l.Q6J("ngIf",i===o.Steps.Info),l.xp6(1),l.Q6J("ngIf",i===o.Steps.Validate),l.xp6(1),l.Q6J("ngIf",i===o.Steps.Finalize),l.xp6(5),l.Q6J("ngIf",i>1),l.xp6(1),l.Q6J("disabled",l.lcZ(12,6,o.loading$)||l.lcZ(13,8,o.disabled$))}}function R(t,e){if(1&t){var n=l.EpF();l.TgZ(0,"form",5),l.NdJ("ngSubmit",function(){return l.CHM(n),l.oxw().nextStep()}),l.YNc(1,D,16,10,"ng-container",6),l.ALo(2,"async"),l.qZA()}if(2&t){var i=l.oxw();l.Q6J("formGroup",i.form),l.xp6(1),l.Q6J("ngIf",l.lcZ(2,2,i.currentStep$))}}var Y=function(t){return t[t.Host=1]="Host",t[t.Info=2]="Info",t[t.Validate=3]="Validate",t[t.Finalize=4]="Finalize",t}({}),F=function(){var t=function(){function t(e,n,i,o,r,c,l){d(this,t),this.dialogRef=e,this.data=n,this.customDomains=i,this.toast=o,this.settings=r,this.router=c,this.currentUser=l,this.Steps=Y,this.currentStep$=new a.X(1),this.loading$=new a.X(!1),this.disabled$=new a.X(!1),this.updating$=new a.X(!1),this.errors$=new a.X({}),this.validationFailReason$=new a.X(null),this.isSubdomain$=new a.X(!1),this.form=new s.cw({host:new s.NI,global:new s.NI(!1)}),this.updating$.next(!!n.domain),this.currentUserIsAdmin=this.currentUser.isAdmin(),n.domain&&this.form.patchValue(n.domain)}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.form.get("host").valueChanges.subscribe(function(e){t.isSubdomain$.next((e.replace("www.","").match(/\./g)||[]).length>1)})}},{key:"connectDomain",value:function(){var t=this;this.loading$.next(!0),(this.updating$.value?this.customDomains.update(this.data.domain.id,this.form.value):this.customDomains.create(this.form.value)).pipe((0,c.x)(function(){return t.loading$.next(!1)})).subscribe(function(e){t.toast.open("Domain connected"),t.close(e.domain)},function(e){t.errors$.next(e.errors)})}},{key:"validateDnsForDomain",value:function(){var t=this;this.disabled$.next(!0),this.loading$.next(!0),this.customDomains.validate(this.form.value.host).pipe((0,c.x)(function(){return t.loading$.next(!1)})).subscribe(function(e){e&&"connected"===e.result&&t.nextStep()},function(e){t.validationFailReason$.next(e.failReason)})}},{key:"authorizeCrupdate",value:function(){var t=this;this.loading$.next(!0);var e=Object.assign({},this.form.value);this.data.domain&&(e.domainId=this.data.domain.id),this.customDomains.authorizeCrupdate(e).pipe((0,c.x)(function(){return t.loading$.next(!1)})).subscribe(function(e){t.serverIp=e.serverIp,t.nextStep(!0)},function(e){return t.errors$.next(e.errors)})}},{key:"close",value:function(t){this.dialogRef.close(t)}},{key:"previousStep",value:function(){this.currentStep$.value>Y.Host&&this.currentStep$.next(this.currentStep$.value-1)}},{key:"nextStep",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.currentStep$.value===Y.Host&&!t)return this.authorizeCrupdate();this.currentStep$.next(this.currentStep$.value+1),this.currentStep$.value===Y.Validate?this.data.domain&&this.form.value.host===this.data.domain.host?this.connectDomain():this.validateDnsForDomain():this.currentStep$.value===Y.Finalize&&this.connectDomain()}},{key:"baseUrl",value:function(){return this.settings.getBaseUrl().replace(/\/$/,"")}},{key:"insideAdmin",value:function(){return this.router.url.indexOf("admin")>-1}}]),t}();return t.\u0275fac=function(e){return new(e||t)(l.Y36(r.so),l.Y36(r.WI),l.Y36(u.c),l.Y36(p.F),l.Y36(h.Z),l.Y36(f.F0),l.Y36(m.I))},t.\u0275cmp=l.Xpm({type:t,selectors:[["crupdate-custom-domain-modal"]],decls:7,vars:3,consts:[[1,"modal-header"],["mat-dialog-title","","trans",""],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"formGroup","ngSubmit",4,"ngIf"],["ngNativeValidate","",3,"formGroup","ngSubmit"],[4,"ngIf"],["class","host-step",4,"ngIf"],["class","info-step",4,"ngIf"],["class","validate-step",4,"ngIf"],["class","finalize-step",4,"ngIf"],["type","button","mat-button","","trans","",1,"cancel-button",3,"click"],[1,"submit-btns"],["mat-button","","color","accent","class","step-btn","type","button","trans","",3,"click",4,"ngIf"],["type","submit","mat-raised-button","","color","accent","trans","",1,"step-btn",3,"disabled"],["svgIcon","keyboard-arrow-right",1,"step-icon"],[1,"host-step"],[1,"input-container"],["for","host","trans",""],["type","text","id","host","formControlName","host","placeholder","https://example.com","maxlength","100","required","",1,"host-input"],["trans",""],["class","error",4,"ngIf"],["class","setting-toggle-container global-toggle",4,"ngIf"],[1,"error"],[1,"setting-toggle-container","global-toggle"],["id","global","formControlName","global","trans",""],[1,"info-step"],[1,"message-widget"],[1,"message"],[1,"validate-step"],["class","message-widget",4,"ngIf","ngIfElse"],["notLoading",""],[1,"small","icon",3,"isVisible"],["trans","",1,"message"],[1,"message-widget","warning-color"],["svgIcon","warning",1,"icon"],["class","message","trans","",3,"transValues",4,"ngIf","ngIfElse"],["dnsNotSetup",""],["type","button","trans","",1,"no-style","refresh-btn",3,"disabled","click"],["trans","",1,"message",3,"transValues"],[1,"finalize-step"],["mat-button","","color","accent","type","button","trans","",1,"step-btn",3,"click"],["svgIcon","keyboard-arrow-left",1,"step-icon"]],template:function(t,e){1&t&&(l.TgZ(0,"div",0),l.TgZ(1,"h2",1),l._uU(2,"Connect Domain"),l.qZA(),l.TgZ(3,"button",2),l.NdJ("click",function(){return e.close()}),l._UZ(4,"mat-icon",3),l.qZA(),l.qZA(),l.YNc(5,R,3,4,"form",4),l.ALo(6,"async")),2&t&&(l.xp6(5),l.Q6J("ngIf",l.lcZ(6,1,e.errors$)))},directives:[r.uh,v.P,b.Hw,y.O5,s.JL,s.sg,r.xY,r.H8,_.lW,s.Fj,s.JJ,s.u,s.nD,s.Q7,x.Rr,k.Q],pipes:[y.Ov,Z.R],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}.host-input[_ngcontent-%COMP%]{font-size:1.6rem}.mat-dialog-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding-top:25px;margin-top:25px;border-top:1px solid var(--be-divider-lighter)}.modal-header[_ngcontent-%COMP%]{border-bottom:1px solid var(--be-divider-lighter);margin-bottom:20px;padding-bottom:25px}.message-widget[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px;border-radius:4px;background-color:#ecf3ff;color:var(--be-accent-default);font-size:1.6rem}.message-widget[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.message-widget.warning-color[_ngcontent-%COMP%]{background-color:#fef0e2;color:#f77d05}.message-widget[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{flex-shrink:0;position:static;margin-right:15px}p[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--be-secondary-text);margin:8px 0}.mat-button[_ngcontent-%COMP%], .mat-raised-button[_ngcontent-%COMP%]{min-width:105px;line-height:40px}.refresh-btn[_ngcontent-%COMP%]{color:var(--be-accent-default);text-decoration:underline}.step-icon[_ngcontent-%COMP%]{vertical-align:middle;margin-right:5px}.global-toggle[_ngcontent-%COMP%]{border-top:1px solid var(--be-divider-lighter);margin-top:20px;padding-top:20px;margin-bottom:0}@media only screen and (max-width:768px){.cancel-button[_ngcontent-%COMP%]{display:none}}"],changeDetection:0}),t}(),Q=n(83381),$=n(34955),B=n(13536),H=n(80922),V=n(86668),z=n(27701),G=n(54275),j=n(24311),X=n(71765),W=n(47210),K=n(40985),tt=n(2406);function et(t,e){1&t&&l._UZ(0,"mat-progress-bar",17)}function nt(t,e){1&t&&(l.TgZ(0,"th",18),l._uU(1,"Owner"),l.qZA())}var it=function(t){return{count:t,resource:"domain(s)"}};function ot(t,e){if(1&t){var n=l.EpF();l.TgZ(0,"tr"),l.TgZ(1,"th",19),l.TgZ(2,"div",20),l._uU(3," :count :resource selected: "),l.qZA(),l.TgZ(4,"div",21),l.TgZ(5,"button",22),l.NdJ("click",function(){return l.CHM(n),l.oxw().maybeDeleteSelectedDomains()}),l._uU(6," Delete "),l.qZA(),l.qZA(),l.qZA(),l.qZA()}if(2&t){var i=e.ngIf,o=l.oxw();l.xp6(2),l.Q6J("transValues",l.VKq(2,it,i)),l.xp6(3),l.Q6J("disabled",!o.currentUser.hasPermission("custom_domains.delete"))}}function at(t,e){if(1&t&&(l.TgZ(0,"td",34),l._UZ(1,"user-column",35),l.qZA()),2&t){var n=l.oxw().$implicit;l.xp6(1),l.Q6J("user",n.user)}}function rt(t,e){if(1&t){var n=l.EpF();l.TgZ(0,"tr"),l._UZ(1,"td",23),l.TgZ(2,"td",24),l._UZ(3,"img",25),l.ALo(4,"favicon"),l.TgZ(5,"span"),l._uU(6),l.qZA(),l.qZA(),l.YNc(7,at,2,1,"td",26),l.TgZ(8,"td",27),l._uU(9),l.qZA(),l.TgZ(10,"td",28),l._uU(11),l.ALo(12,"formattedDate"),l.qZA(),l.TgZ(13,"td",29),l.TgZ(14,"button",30),l.NdJ("click",function(){var t=l.CHM(n).$implicit;return l.oxw().showCrupdateDomainModal(t)}),l.ALo(15,"trans"),l._UZ(16,"mat-icon",31),l.qZA(),l.TgZ(17,"button",32),l.NdJ("click",function(){var t=l.CHM(n).$implicit;return l.oxw().maybeDeleteSelectedDomains([t.id])}),l._UZ(18,"mat-icon",33),l.qZA(),l.qZA(),l.qZA()}if(2&t){var i=e.$implicit,o=l.oxw();l.xp6(1),l.Q6J("table-body-checkbox",i.id),l.xp6(2),l.Q6J("src",l.lcZ(4,7,i.host),l.LSH),l.xp6(3),l.Oqu(i.host),l.xp6(1),l.Q6J("ngIf",o.showUserColumn()),l.xp6(2),l.Oqu(i.global?"Yes":"No"),l.xp6(2),l.Oqu(l.lcZ(12,9,i.updated_at)),l.xp6(3),l.Q6J("matTooltip",l.lcZ(15,11,"Edit domain"))}}function st(t,e){1&t&&(l.TgZ(0,"no-results-message",36),l.TgZ(1,"span",37),l._uU(2,"No custom domains have been added yet"),l.qZA(),l.qZA())}var ct=function(){var t=function(){function t(e,n,i,o,a){d(this,t),this.datatable=e,this.currentUser=n,this.customDomains=i,this.toast=o,this.router=a,this.filters=Q.r,this.domains$=this.datatable.data$}return g(t,[{key:"ngOnInit",value:function(){this.datatable.init({uri:u.c.BASE_URI})}},{key:"maybeDeleteSelectedDomains",value:function(t){var e=this;this.datatable.confirmResourceDeletion("domains").subscribe(function(){e.customDomains.delete(t||e.datatable.selectedRows$.value).subscribe(function(){e.datatable.reset(),e.toast.open("Domains deleted.")},function(t){e.toast.open(t.message||i.v.Default)})})}},{key:"showCrupdateDomainModal",value:function(t){this.datatable.openCrupdateResourceModal(F,{domain:t}).subscribe()}},{key:"showUserColumn",value:function(){return this.router.url.indexOf("admin")>-1}}]),t}();return t.\u0275fac=function(e){return new(e||t)(l.Y36(o.x),l.Y36(m.I),l.Y36(u.c),l.Y36(p.F),l.Y36(f.F0))},t.\u0275cmp=l.Xpm({type:t,selectors:[["custom-domain-index"]],features:[l._Bn([o.x])],decls:32,vars:13,consts:[[1,"datatable-page-header"],["trans",""],[1,"header"],["pluralName","domains",3,"filters"],[1,"action-buttons"],["mat-raised-button","","color","accent",1,"button-with-icon",3,"disabled","click"],["svgIcon","add"],[1,"datatable","responsive-table"],["class","loading-bar","mode","indeterminate","color","accent",4,"ngIf"],[1,"material-table"],["table-header-checkbox",""],["table-sort-header","","trans",""],["table-sort-header","user_id","trans","",4,"ngIf"],["table-sort-header","updated_at","trans",""],[4,"ngIf"],[4,"ngFor","ngForOf"],["svgImage","custom-domain.svg",4,"ngIf"],["mode","indeterminate","color","accent",1,"loading-bar"],["table-sort-header","user_id","trans",""],["colspan","6"],["trans","",1,"bulk-actions-title",3,"transValues"],[1,"bulk-actions"],["type","button","mat-raised-button","","color","warn","trans","",3,"disabled","click"],[3,"table-body-checkbox"],["data-label","Host"],["alt","",1,"favicon-img",3,"src"],["data-label","Owner",4,"ngIf"],["data-label","Global"],["data-label","Updated At"],[1,"edit-column"],["mat-icon-button","",3,"matTooltip","click"],["svgIcon","edit"],["type","button","mat-icon-button","","trans","",1,"visible-on-mobile",3,"click"],["svgIcon","delete"],["data-label","Owner"],[3,"user"],["svgImage","custom-domain.svg"],["primary-text","","trans",""]],template:function(t,e){1&t&&(l.TgZ(0,"div",0),l.TgZ(1,"h1",1),l._uU(2,"Custom Domains"),l.qZA(),l.TgZ(3,"div",2),l._UZ(4,"datatable-filters",3),l.TgZ(5,"div",4),l.TgZ(6,"button",5),l.NdJ("click",function(){return e.showCrupdateDomainModal()}),l._UZ(7,"mat-icon",6),l.TgZ(8,"span",1),l._uU(9,"Connect New Domain"),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.TgZ(10,"div",7),l.YNc(11,et,1,0,"mat-progress-bar",8),l.ALo(12,"async"),l.TgZ(13,"table",9),l.TgZ(14,"thead"),l.TgZ(15,"tr"),l._UZ(16,"th",10),l.TgZ(17,"th",11),l._uU(18,"Host"),l.qZA(),l.YNc(19,nt,2,0,"th",12),l.TgZ(20,"th",11),l._uU(21,"Global"),l.qZA(),l.TgZ(22,"th",13),l._uU(23,"Last Updated"),l.qZA(),l._UZ(24,"th"),l.qZA(),l.YNc(25,ot,7,4,"tr",14),l.qZA(),l.TgZ(26,"tbody"),l.YNc(27,rt,19,13,"tr",15),l.ALo(28,"async"),l.qZA(),l.qZA(),l.YNc(29,st,3,0,"no-results-message",16),l.ALo(30,"async"),l._UZ(31,"datatable-footer"),l.qZA()),2&t&&(l.xp6(4),l.Q6J("filters",e.filters),l.xp6(2),l.Q6J("disabled",!e.currentUser.hasPermission("custom_domains.create")),l.xp6(5),l.Q6J("ngIf",l.lcZ(12,7,e.datatable.paginator&&e.datatable.paginator.loading$)),l.xp6(8),l.Q6J("ngIf",e.showUserColumn()),l.xp6(6),l.Q6J("ngIf",e.datatable.selectedRows$.value.length),l.xp6(2),l.Q6J("ngForOf",l.lcZ(28,9,e.domains$)),l.xp6(2),l.Q6J("ngIf",l.lcZ(30,11,e.datatable.paginator.noResults$)))},directives:[v.P,$.h,_.lW,b.Hw,y.O5,B.e,H.p,y.sg,V.V,z.pW,G.O,j.gM,X.r,W.U],pipes:[y.Ov,K.K,tt.l,Z.R],styles:[".favicon-img[_ngcontent-%COMP%]{display:inline-block;margin-right:5px;vertical-align:middle;flex-shrink:0}"],changeDetection:0}),t}()},14732:function(t,e,n){"use strict";n.d(e,{c:function(){return a}});var i=n(35366),o=n(68515),a=function(){var t=function(){function t(e){d(this,t),this.http=e}return g(t,[{key:"index",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.http.get("".concat(t.BASE_URI),e)}},{key:"create",value:function(e){return this.http.post(t.BASE_URI,e)}},{key:"update",value:function(e,n){return this.http.put("".concat(t.BASE_URI,"/").concat(e),n)}},{key:"delete",value:function(e){return this.http.delete("".concat(t.BASE_URI,"/").concat(e))}},{key:"validate",value:function(e){return this.http.post("".concat(t.BASE_URI,"/validate/2BrM45vvfS/api"),{host:e})}},{key:"authorizeCrupdate",value:function(e){return this.http.post("".concat(t.BASE_URI,"/authorize/store"),e)}}]),t}();return t.BASE_URI="custom-domain",t.\u0275fac=function(e){return new(e||t)(i.LFG(o.r))},t.\u0275prov=i.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},71765:function(t,e,n){"use strict";n.d(e,{r:function(){return u}});var i=n(35366),o=n(60994),a=n(61116),r=n(63337);function s(t,e){if(1&t&&(i.TgZ(0,"a",4),i.TgZ(1,"div"),i._uU(2),i.qZA(),i.TgZ(3,"div",5),i._uU(4),i.qZA(),i.qZA()),2&t){var n=i.oxw(2);i.Q6J("routerLink",n.url.generate(n.user)),i.xp6(2),i.Oqu(n.user.display_name),i.xp6(2),i.Oqu(n.user.email)}}function c(t,e){if(1&t&&(i.TgZ(0,"div",6),i.TgZ(1,"div"),i._uU(2),i.qZA(),i.TgZ(3,"div",5),i._uU(4),i.qZA(),i.qZA()),2&t){var n=i.oxw(2);i.xp6(2),i.Oqu(n.user.display_name),i.xp6(2),i.Oqu(n.user.email)}}function l(t,e){if(1&t&&(i.ynx(0),i._UZ(1,"img",1),i.YNc(2,s,5,3,"a",2),i.YNc(3,c,5,2,"div",3),i.BQk()),2&t){var n=i.oxw();i.xp6(1),i.Q6J("src",n.user.avatar,i.LSH),i.xp6(1),i.Q6J("ngIf",n.haveUrl),i.xp6(1),i.Q6J("ngIf",!n.haveUrl)}}var u=function(){var t=function t(e){d(this,t),this.url=e,this.showEmail=!1,this.haveUrl=!!e.user};return t.\u0275fac=function(e){return new(e||t)(i.Y36(o.o))},t.\u0275cmp=i.Xpm({type:t,selectors:[["user-column"]],hostAttrs:[1,"column-with-image"],inputs:{user:"user",showEmail:"showEmail"},decls:1,vars:1,consts:[[4,"ngIf"],["alt","",3,"src"],["target","_blank","class","link content",3,"routerLink",4,"ngIf"],["class","content",4,"ngIf"],["target","_blank",1,"link","content",3,"routerLink"],[1,"email","secondary"],[1,"content"]],template:function(t,e){1&t&&i.YNc(0,l,4,3,"ng-container",0),2&t&&i.Q6J("ngIf",e.user)},directives:[a.O5,r.yS],styles:[""],changeDetection:0}),t}()},34955:function(t,e,n){"use strict";n.d(e,{h:function(){return st}});var i=n(35366),o=n(56515),a=n(56238),r=n(79996),c=n(98720),l=n(43835),u=n(78512),p=n(3080),h=n(31906),f=n(87254),m=n(38116),v=n(61116),b=n(77307),y=["filterSuggestion"];function _(t,e){if(1&t){var n=i.EpF();i.TgZ(0,"div",8,9),i.NdJ("click",function(){var t=i.CHM(n).$implicit;return i.oxw().filterSelected.emit(t.value)}),i.TgZ(2,"div",10),i._uU(3),i.qZA(),i.TgZ(4,"div",2),i._uU(5),i.qZA(),i.qZA()}if(2&t){var o=e.$implicit,a=e.index;i.uIk("data-filter-key",o.key)("data-index",a),i.xp6(3),i.Oqu(o.value.label),i.xp6(2),i.Oqu(o.value.description)}}var x=function(){var t=function(){function t(){d(this,t),this.filterSelected=new i.vpe,this.originalOrder=function(){return 0}}return g(t,[{key:"anyFocused",value:function(){return document.activeElement.classList.contains("filter-suggestion-item")}},{key:"focusItemAt",value:function(t){this.items.get(t).nativeElement.focus()}},{key:"getFocusedFilter",value:function(){if(this.anyFocused()){var t=document.activeElement.dataset.filterKey;return this.filters[t]}}},{key:"getFocusedIndex",value:function(){if(this.anyFocused()){var t=document.activeElement;return parseInt(t.dataset.index)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Xpm({type:t,selectors:[["filter-suggestions"]],viewQuery:function(t,e){var n;(1&t&&i.Gf(y,5),2&t)&&(i.iGM(n=i.CRH())&&(e.items=n))},inputs:{filters:"filters"},outputs:{filterSelected:"filterSelected"},decls:13,vars:4,consts:[[1,"table"],[1,"filter-suggestion-header","row"],["trans","",1,"column"],["role","list",1,"body"],["role","listitem","class","row filter-suggestion-item","tabindex","0",3,"click",4,"ngFor","ngForOf"],[1,"help-container"],["svgIcon","info"],["trans",""],["role","listitem","tabindex","0",1,"row","filter-suggestion-item",3,"click"],["filterSuggestion",""],["trans","",1,"column","label-column"]],template:function(t,e){1&t&&(i.TgZ(0,"div",0),i.TgZ(1,"div",1),i.TgZ(2,"div",2),i._uU(3,"Field"),i.qZA(),i.TgZ(4,"div",2),i._uU(5,"Description"),i.qZA(),i.qZA(),i.TgZ(6,"div",3),i.YNc(7,_,6,4,"div",4),i.ALo(8,"keyvalue"),i.qZA(),i.qZA(),i.TgZ(9,"div",5),i._UZ(10,"mat-icon",6),i.TgZ(11,"div",7),i._uU(12," Use arrows, tab or mouse to navigate added filters. Backspace or delete key to remove them. "),i.qZA(),i.qZA()),2&t&&(i.xp6(7),i.Q6J("ngForOf",i.xi3(8,1,e.filters,e.originalOrder)))},directives:[m.P,v.sg,b.Hw],pipes:[v.Nd],styles:["[_nghost-%COMP%]{display:none;position:absolute;left:0;z-index:10;background-color:var(--be-background);width:100%;border-radius:4px;overflow:hidden;color:var(--be-text);box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}.visible[_nghost-%COMP%]{display:block}.filter-suggestion-header[_ngcontent-%COMP%]{background-color:var(--be-background-alternative)}.row[_ngcontent-%COMP%]{display:flex;height:55px;padding:15px;border-bottom:1px solid var(--be-divider-lighter)}.row[_ngcontent-%COMP%]:not(.header){cursor:pointer}.row[_ngcontent-%COMP%]:not(.header):focus, .row[_ngcontent-%COMP%]:not(.header):hover{background-color:var(--be-hover)}.row[_ngcontent-%COMP%]:not(.header):focus{outline:none}.column[_ngcontent-%COMP%]{flex:0 0 48%}.label-column[_ngcontent-%COMP%]{text-transform:capitalize}.help-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding:12px;background-color:var(--be-accent-emphasis)}.help-container[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{margin-right:10px;color:var(--be-accent-default)}"],changeDetection:0}),t}(),k=n(24831),Z=n(1486),w=n(31041),A=n(24859);function C(t,e){if(1&t&&(i.ynx(0),i._UZ(1,"img",2),i.TgZ(2,"div",3),i._uU(3),i.qZA(),i.BQk()),2&t){var n=e.ngIf;i.xp6(1),i.Q6J("src",n.image,i.LSH),i.xp6(2),i.Oqu(n.name)}}function T(t,e){1&t&&(i.TgZ(0,"div",4),i._uU(1,"Click to select"),i.qZA())}var q=function(){var t=function(){function t(e){d(this,t),this.dialog=e,this.value$=new u.X(null)}return g(t,[{key:"registerOnChange",value:function(t){this.propagateChange=t}},{key:"registerOnTouched",value:function(t){}},{key:"writeValue",value:function(t){this.value$.next(t)}},{key:"onClick",value:function(){this.openSelectModelDialog()}},{key:"openSelectModelDialog",value:function(){var t=this;this.dialog.open(this.filter.component,this.filter.componentData).afterClosed().subscribe(function(e){e&&(t.value$.next(e),t.propagateChange(e))})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Y36(A.u))},t.\u0275cmp=i.Xpm({type:t,selectors:[["select-model-control"]],hostBindings:function(t,e){1&t&&i.NdJ("click",function(){return e.onClick()})},inputs:{filter:"filter"},features:[i._Bn([{provide:w.JU,useExisting:t,multi:!0}])],decls:4,vars:4,consts:[[4,"ngIf","ngIfElse"],["defaultHint",""],[1,"image",3,"src"],[1,"name"],["trans",""]],template:function(t,e){if(1&t&&(i.YNc(0,C,4,2,"ng-container",0),i.ALo(1,"async"),i.YNc(2,T,2,0,"ng-template",null,1,i.W1O)),2&t){var n=i.MAs(3);i.Q6J("ngIf",i.lcZ(1,2,e.value$))("ngIfElse",n)}},directives:[v.O5,m.P],pipes:[v.Ov],styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 8px;cursor:pointer}img[_ngcontent-%COMP%]{height:22px;width:22px;border-radius:4px;margin-right:8px;flex-shrink:0;-o-object-fit:cover;object-fit:cover}"],changeDetection:0}),t}(),I={"=":"is","!=":"is not",">":"is greater than",">=":"is greater than or equal to","<":"is less than","<=":"is less than or equal to",has:"Include",doesntHave:"Do not include"},O=n(71294),U=function(){var t=function(){function t(e){d(this,t),this.breakpoints=e}return g(t,[{key:"transform",value:function(t,e){return e||this.breakpoints.isMobile$.value?t:I[t]}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Y36(O.S,16))},t.\u0275pipe=i.Yjl({name:"operatorDisplayName",type:t,pure:!0}),t}(),P=["select"];function M(t,e){if(1&t&&(i.TgZ(0,"option",4),i._uU(1),i.ALo(2,"operatorDisplayName"),i.qZA()),2&t){var n=e.$implicit,o=i.oxw();i.Q6J("value",n),i.xp6(1),i.hij(" ",i.xi3(2,2,n,o.compact)," ")}}var S=function(){var t=function(){function t(){d(this,t)}return g(t,[{key:"ngAfterViewInit",value:function(){this.resizeSelect()}},{key:"resizeSelect",value:function(){var t,e=null===(t=this.select)||void 0===t?void 0:t.nativeElement;e&&e.selectedIndex>-1&&(e.style.width="".concat(e.options[e.selectedIndex].label.length+5,"ch"))}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=i.Xpm({type:t,selectors:[["operator-select"]],viewQuery:function(t,e){var n;(1&t&&i.Gf(P,5),2&t)&&(i.iGM(n=i.CRH())&&(e.select=n.first))},inputs:{compact:"compact",formGroup:"formGroup",operators:"operators"},decls:4,vars:2,consts:[[3,"formGroup"],["formControlName","operator",1,"operator-select",3,"ngModelChange"],["select",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(t,e){1&t&&(i.ynx(0,0),i.TgZ(1,"select",1,2),i.NdJ("ngModelChange",function(){return e.resizeSelect()}),i.YNc(3,M,3,5,"option",3),i.qZA(),i.BQk()),2&t&&(i.Q6J("formGroup",e.formGroup),i.xp6(3),i.Q6J("ngForOf",e.operators))},directives:[w.JL,w.sg,w.EJ,w.JJ,w.u,v.sg,w.YN,w.Kr],pipes:[U],styles:['[_nghost-%COMP%]{display:flex;align-items:center;position:relative;height:100%}[_nghost-%COMP%]:before{content:"";position:absolute;top:0;bottom:0;width:50%;left:0;background-color:var(--be-chip)}[_nghost-%COMP%]:after{content:"";position:absolute;top:0;bottom:0;width:50%;right:0;background-color:var(--be-accent-default)}.operator-select[_ngcontent-%COMP%]{transition:width .1s ease-in-out 0s;padding:2px 8px;min-width:60px;max-width:200px;height:27px;color:var(--be-accent-default);z-index:10;background-color:var(--be-accent-contrast);text-overflow:ellipsis;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;-moz-text-align-last:center;text-align-last:center;border:1px solid transparent}.operator-select[_ngcontent-%COMP%]:focus-visible{outline:0;border-color:var(--be-accent-default);box-shadow:0 0 0 1px #fff}'],changeDetection:0}),t}(),N=["valueInput"];function J(t,e){if(1&t&&i._UZ(0,"operator-select",8),2&t){var n=i.oxw().ngIf,o=i.oxw();i.Q6J("compact",o.compact)("formGroup",n)("operators",o.filter.operators)}}function E(t,e){if(1&t&&(i.TgZ(0,"option",16),i._uU(1),i.qZA()),2&t){var n=e.$implicit;i.Q6J("ngValue",n.value),i.xp6(1),i.hij(" ",n.key||n.value," ")}}function L(t,e){if(1&t){var n=i.EpF();i.TgZ(0,"div",9),i.TgZ(1,"select",10,11),i.NdJ("ngModelChange",function(){return i.CHM(n),i.oxw(2).resizeInput()}),i.YNc(3,E,2,2,"option",12),i.qZA(),i.O4$(),i.TgZ(4,"svg",13),i._UZ(5,"path",14),i._UZ(6,"path",15),i.qZA(),i.qZA()}if(2&t){var o=i.oxw(2);i.xp6(1),i.Q6J("id",o.key)("compareWith",o.compareFilterValueFn),i.xp6(2),i.Q6J("ngForOf",o.filter.options)}}function D(t,e){if(1&t&&(i.TgZ(0,"div",17),i._UZ(1,"input",18,11),i.qZA()),2&t){var n=i.oxw(2);i.xp6(1),i.Q6J("id",n.key)}}function R(t,e){if(1&t&&i._UZ(0,"select-model-control",19,11),2&t){var n=i.oxw(2);i.Q6J("filter",n.filter)("id",n.key)}}function Y(t,e){if(1&t){var n=i.EpF();i.TgZ(0,"div",9),i.TgZ(1,"input",20,11),i.NdJ("ngModelChange",function(){return i.CHM(n),i.oxw(2).resizeInput()}),i.qZA(),i.qZA()}if(2&t){var o=i.oxw(2);i.xp6(1),i.Q6J("id",o.key)("type",o.filter.inputType||"text")}}function F(t,e){if(1&t){var n=i.EpF();i.ynx(0,1),i.TgZ(1,"div",2),i.NdJ("click",function(){return i.CHM(n),i.oxw().el.nativeElement.focus()}),i._uU(2),i.qZA(),i.YNc(3,J,1,3,"operator-select",3),i.ynx(4,4),i.YNc(5,L,7,3,"div",5),i.YNc(6,D,3,1,"div",6),i.YNc(7,R,2,2,"select-model-control",7),i.YNc(8,Y,3,2,"div",5),i.BQk(),i.BQk()}if(2&t){var o=e.ngIf,a=i.oxw();i.Q6J("formGroup",o),i.xp6(2),i.Oqu(a.filter.label),i.xp6(1),i.Q6J("ngIf",a.filter.operators),i.xp6(1),i.Q6J("ngSwitch",a.filter.type),i.xp6(1),i.Q6J("ngSwitchCase","select"),i.xp6(1),i.Q6J("ngSwitchCase","datePicker"),i.xp6(1),i.Q6J("ngSwitchCase","selectModel"),i.xp6(1),i.Q6J("ngSwitchCase","input")}}var Q=function(){var t=function(){function t(e){d(this,t),this.el=e,this.compareFilterValueFn=function(t,e){return Z(t,e)}}return g(t,[{key:"ngAfterViewInit",value:function(){this.resizeInput()}},{key:"focus",value:function(){this.el.nativeElement.focus()}},{key:"focusValueInput",value:function(){var t;this.valueInput instanceof q?this.valueInput.openSelectModelDialog():(null===(t=this.valueInput)||void 0===t?void 0:t.nativeElement)&&this.valueInput.nativeElement.focus()}},{key:"resizeInput",value:function(){var t,e=null===(t=this.valueInput)||void 0===t?void 0:t.nativeElement;if("SELECT"===(null==e?void 0:e.nodeName)){var n=e;n.selectedIndex>-1&&(n.style.width="".concat(n.options[n.selectedIndex].label.length+5,"ch"))}else"INPUT"===(null==e?void 0:e.nodeName)&&"date"!==e.type&&(e.style.width="".concat(e.value.length+7,"ch"))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Y36(i.SBq))},t.\u0275cmp=i.Xpm({type:t,selectors:[["active-filter"]],viewQuery:function(t,e){var n;(1&t&&i.Gf(N,5),2&t)&&(i.iGM(n=i.CRH())&&(e.valueInput=n.first))},hostAttrs:["tabIndex","0","role","button"],hostVars:1,hostBindings:function(t,e){2&t&&i.uIk("data-control-key",e.key)},inputs:{key:"key",compact:"compact",form:"form",filter:"filter"},decls:1,vars:1,consts:[[3,"formGroup",4,"ngIf"],[3,"formGroup"],["trans","",1,"filter-label",3,"click"],[3,"compact","formGroup","operators",4,"ngIf"],[3,"ngSwitch"],["class","filter-input-container",4,"ngSwitchCase"],["class","date-picker-container",4,"ngSwitchCase"],["formControlName","value","class","filter-value select-model-input",3,"filter","id",4,"ngSwitchCase"],[3,"compact","formGroup","operators"],[1,"filter-input-container"],["formControlName","value",1,"filter-input","filter-value",3,"id","compareWith","ngModelChange"],["valueInput",""],["trans","",3,"ngValue",4,"ngFor","ngForOf"],["viewBox","0 0 24 24",1,"caret-svg"],["d","M7 10l5 5 5-5z"],["d","M0 0h24v24H0z","fill","none"],["trans","",3,"ngValue"],[1,"date-picker-container"],["type","date","formControlName","value",1,"date-input","filter-value",3,"id"],["formControlName","value",1,"filter-value","select-model-input",3,"filter","id"],["formControlName","value","min","1","required","",1,"filter-input","filter-value",3,"id","type","ngModelChange"]],template:function(t,e){1&t&&i.YNc(0,F,9,8,"ng-container",0),2&t&&i.Q6J("ngIf",e.form.controls[e.key])},directives:[v.O5,w.JL,w.sg,m.P,v.RF,v.n9,S,w.EJ,w.JJ,w.u,v.sg,w.YN,w.Kr,w.Fj,q,w.Q7],styles:["[_nghost-%COMP%]{display:inline-flex;align-items:flex-start;border-radius:4px;height:37px;background-color:var(--be-chip);margin:3px 5px 3px 0}[_nghost-%COMP%]:focus{outline:none;box-shadow:var(--be-accent-default) 0 0 0 1px}.filter-label[_ngcontent-%COMP%]{color:var(--be-text);line-height:37px;cursor:pointer;padding:0 12px;text-transform:capitalize;white-space:nowrap;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.filter-input-container[_ngcontent-%COMP%]{position:relative;height:100%;overflow:hidden;border-radius:0 4px 4px 0}.caret-svg[_ngcontent-%COMP%]{position:absolute;top:9.5px;right:5px;z-index:11;fill:var(--be-accent-contrast);width:18px;height:18px;pointer-events:none}.filter-input[_ngcontent-%COMP%]{border:0;transition:width .1s ease-in-out 0s;padding:0 12px;min-width:60px;max-width:200px;z-index:10;text-overflow:ellipsis;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:100%;font-weight:500}select.filter-select[_ngcontent-%COMP%]{padding:0 25px 0 12px}.date-input[_ngcontent-%COMP%]{position:relative;max-width:30ch;line-height:37px;height:37px;font-size:inherit;border:none;margin:0;padding:0 12px;width:20ch;font-weight:500}.select-model-input[_ngcontent-%COMP%]{min-width:76px;height:100%}.filter-value[_ngcontent-%COMP%]{background-color:var(--be-accent-default);color:var(--be-accent-contrast);border-radius:0 4px 4px 0}"],changeDetection:0}),t}();function $(t,e){if(1&t&&i._UZ(0,"active-filter",2),2&t){var n=e.ngIf,o=i.oxw(),a=o.$implicit,r=o.index,s=i.oxw();i.Q6J("compact",s.compact)("key",a.key)("form",s.form)("filter",n),i.uIk("data-index",r)}}function B(t,e){if(1&t&&(i.ynx(0),i.YNc(1,$,1,5,"active-filter",1),i.BQk()),2&t){var n=e.$implicit,o=i.oxw();i.xp6(1),i.Q6J("ngIf",o.config[n.value.value.key])}}var H=["*"],V=function(){var t=function(){function t(e,n,i){d(this,t),this.fb=e,this.cd=n,this.el=i}return g(t,[{key:"add",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=void 0!==e.value?e.value:t.defaultValue,i=this.fb.group({key:t.key,value:n,operator:e.operator||t.defaultOperator}),o=Object.keys(this.form.controls).length+(0,k.O)(8);this.form.addControl(o,i,{emitEvent:""!==n}),this.cd.detectChanges(),e.focus&&this.filters.last.focusValueInput()}},{key:"removeByKey",value:function(t){this.form.removeControl(t),this.cd.markForCheck()}},{key:"removeCurrentlyFocused",value:function(){var t=document.activeElement;this.removeByKey(t.dataset.controlKey)}},{key:"anyFocused",value:function(){return"ACTIVE-FILTER"===document.activeElement.nodeName}},{key:"focusLast",value:function(){this.filters.last&&this.filters.last.focus()}},{key:"focusPrevious",value:function(){var t=this.getFocusedIndex(),e=this.filters.get(t-1);e&&e.focus()}},{key:"getByIndex",value:function(t){return this.filters.get(t)}},{key:"lastIsFocused",value:function(){return this.getFocusedIndex()===this.filters.length-1}},{key:"getFocusedIndex",value:function(){var t=document.activeElement.dataset.index;return t?parseInt(t):null}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Y36(w.qu),i.Y36(i.sBO),i.Y36(i.SBq))},t.\u0275cmp=i.Xpm({type:t,selectors:[["active-filters"]],viewQuery:function(t,e){var n;(1&t&&i.Gf(Q,5),2&t)&&(i.iGM(n=i.CRH())&&(e.filters=n))},inputs:{compact:"compact",form:"form",config:"config"},ngContentSelectors:H,decls:3,vars:3,consts:[[4,"ngFor","ngForOf"],[3,"compact","key","form","filter",4,"ngIf"],[3,"compact","key","form","filter"]],template:function(t,e){1&t&&(i.F$t(),i.YNc(0,B,2,1,"ng-container",0),i.ALo(1,"keyvalue"),i.Hsn(2)),2&t&&i.Q6J("ngForOf",i.lcZ(1,1,e.form.controls))},directives:[v.sg,v.O5,Q],pipes:[v.Nd],styles:["[_nghost-%COMP%]{display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center}"],changeDetection:0}),t}(),z=n(63337),G=function(t){return t[t.ENTER=13]="ENTER",t[t.SPACE=32]="SPACE",t[t.ESCAPE=27]="ESCAPE",t[t.DELETE=46]="DELETE",t[t.ARROW_UP=38]="ARROW_UP",t[t.ARROW_RIGHT=39]="ARROW_RIGHT",t[t.ARROW_DOWN=40]="ARROW_DOWN",t[t.ARROW_LEFT=37]="ARROW_LEFT",t[t.BACKSPACE=8]="BACKSPACE",t[t.TAB=9]="TAB",t[t.S=83]="S",t[t.N=78]="N",t[t.A=65]="A",t[t.T=84]="T",t[t.B=66]="B",t[t.C=67]="C",t[t.O=79]="O",t[t.P=80]="P",t[t.R=82]="R",t[t.F=70]="F",t[t.Y=89]="Y",t[t.Z=90]="Z",t}({}),j=function(){var t=function(){function t(){d(this,t),this.bindings=[]}return g(t,[{key:"add",value:function(t,e){var n=this;Array.isArray(t)||(t=[t]),t.forEach(function(t){n.bindings.push({keybind:n.parseKeybindString(t),keybindString:t,callback:e})})}},{key:"addWithPreventDefault",value:function(t,e){this.bindings.push({keybind:this.parseKeybindString(t),keybindString:t,callback:e,preventDefault:!0})}},{key:"listenOn",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,f.R)(t,"keydown").subscribe(function(t){!n.fireIfInputFocused&&["input","select"].includes(document.activeElement.nodeName.toLowerCase())||e.executeBindings(t)})}},{key:"executeBindings",value:function(t){var e=this;this.bindings.forEach(function(n){e.bindingMatches(n.keybind,t)&&(n.preventDefault&&t.preventDefault&&t.preventDefault(),n.callback(t))})}},{key:"bindingMatches",value:function(t,e){return G[t.key.toUpperCase()]===e.keyCode&&(e.ctrlKey===t.ctrl||e.metaKey===t.ctrl)&&e.shiftKey===t.shift}},{key:"parseKeybindString",value:function(t){var e=t.trim().split("+"),n={ctrl:!1,shift:!1,key:""};return e.forEach(function(t){"ctrl"===(t=t.trim().toLowerCase())?n.ctrl=!0:"shift"===t?n.shift=!0:n.key=t}),n}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}(),X=n(84369),W=n(40450),K=["searchInput"],tt=["filterSuggestion"];function et(t,e){if(1&t){var n=i.EpF();i.TgZ(0,"button",8),i.NdJ("click",function(){return i.CHM(n),i.oxw().clearSearch()}),i._UZ(1,"mat-icon",9),i.qZA()}}function nt(t,e){1&t&&(i.TgZ(0,"span",13),i._uU(1,"Filter"),i.qZA())}function it(t,e){if(1&t){var n=i.EpF();i.TgZ(0,"button",10),i.NdJ("click",function(){return i.CHM(n),i.oxw().toggleFilterDropdown()}),i._UZ(1,"mat-icon",11),i.YNc(2,nt,2,0,"span",12),i.qZA()}if(2&t){var o=i.oxw();i.xp6(2),i.Q6J("ngIf",!o.compact)}}var ot=function(){var t=function(){function t(e,n,o,a,r,s){d(this,t),this.fb=e,this.route=n,this.el=o,this.keybinds=a,this.cd=r,this.router=s,this.filterChange=new i.vpe,this.inputFocus=new i.vpe,this.form=this.fb.group({}),this.filterBarHeight=0,this.filterDropdownVisible$=new u.X(!1)}return g(t,[{key:"filters",set:function(t){var e=this;t?(this.keyedFilters={},(t||[]).forEach(function(t){e.keyedFilters[t.key]=t})):this.keyedFilters=null}},{key:"ngOnInit",value:function(){this.haveFiltersOrQuery$=(0,p.aj)([this.searchControl.valueChanges.pipe((0,a.O)(null)),this.form.valueChanges.pipe((0,a.O)(null))]).pipe((0,r.U)(function(t){var e=s(t,2),n=e[0],i=e[1];return n||i&&0!==Object.keys(i).length}))}},{key:"ngAfterViewInit",value:function(){this.watchForSizeChanges(),this.setFiltersFromQuery(),this.setupKeybinds(),this.subscribeToCloseActions(),this.bindToFormValueChange()}},{key:"onClick",value:function(t){t.target!==this.el.nativeElement&&t.target!==this.activeFilters.el.nativeElement||this.searchInput.nativeElement.focus()}},{key:"ngOnDestroy",value:function(){var t;null===(t=this.closeActionsStream$)||void 0===t||t.unsubscribe()}},{key:"clearSearch",value:function(){var t=this;Object.keys(this.form.controls).forEach(function(e){t.activeFilters.removeByKey(e)}),this.searchControl.reset(null,{emitEvent:!1}),this.form.reset()}},{key:"toggleFilterDropdown",value:function(){this.filterDropdownVisible$.next(!this.filterDropdownVisible$.value)}},{key:"addFilterFromDropdownClick",value:function(t){this.activeFilters.add(t,{focus:!0}),this.filterDropdownVisible$.next(!1)}},{key:"searchInputIsFocused",value:function(){return document.activeElement===this.searchInput.nativeElement}},{key:"cursorAtStartOfSearchInput",value:function(){return this.searchInputIsFocused()&&0===this.searchInput.nativeElement.selectionStart}},{key:"cursorAtEndOfSearchInput",value:function(){return this.searchInputIsFocused()&&this.searchInput.nativeElement.selectionStart===this.searchInput.nativeElement.value.length}},{key:"bindToFormValueChange",value:function(){var t=this;this.form.valueChanges.pipe((0,r.U)(function(t){return Object.keys(t).length?t:null}),(0,c.x)()).subscribe(function(e){t.filterChange.emit(e?at(e):null)})}},{key:"watchForSizeChanges",value:function(){var t=this;new ResizeObserver(function(e){t.filterBarHeight=e[0].contentRect.height}).observe(this.el.nativeElement,{box:"border-box"})}},{key:"setFiltersFromQuery",value:function(){var t=this,e=this.router.routerState.root.snapshot.queryParams;e.filters&&rt(e.filters).forEach(function(e){t.activeFilters.add(t.keyedFilters[e.key],e)}),e.query&&this.searchControl.setValue(e.query)}},{key:"setupKeybinds",value:function(){var t=this;this.keybinds.add(["backspace","delete"],function(){return t.cursorAtStartOfSearchInput()?t.activeFilters.focusLast():t.activeFilters.anyFocused()?(t.activeFilters.removeCurrentlyFocused(),t.searchInput.nativeElement.focus()):void 0}),this.keybinds.add("arrow_left",function(e){t.cursorAtStartOfSearchInput()?(t.activeFilters.focusLast(),e.preventDefault()):t.activeFilters.anyFocused()&&(t.activeFilters.focusPrevious(),e.preventDefault())}),this.keybinds.add("arrow_right",function(e){if(t.activeFilters.anyFocused()){e.preventDefault();var n=t.activeFilters.getFocusedIndex(),i=t.activeFilters.getByIndex(n+1);i?i.focus():t.activeFilters.lastIsFocused()&&t.searchInput.nativeElement.focus()}}),this.keybinds.add(["arrow_down","tab"],function(e){if(t.cursorAtEndOfSearchInput()||t.suggestions.anyFocused()){e.preventDefault(),t.filterDropdownVisible$.value||t.toggleFilterDropdown();var n=t.suggestions.getFocusedIndex(),i=n>-1?n:0;t.suggestions.anyFocused()&&(i+=1),i>=t.suggestions.items.length&&(i=0),t.suggestions.focusItemAt(i)}}),this.keybinds.add(["arrow_up","shift+tab"],function(e){if(t.suggestions.anyFocused()){e.preventDefault();var n=t.activeFilters.getFocusedIndex(),i=n>-1?n:0;-1===(i-=1)?t.searchInput.nativeElement.focus():t.suggestions.focusItemAt(i)}}),this.keybinds.add("enter",function(e){var n=t.suggestions.getFocusedFilter();n&&(e.preventDefault(),t.activeFilters.add(n,{focus:!0}),t.filterDropdownVisible$.next(!1))}),this.keybinds.add("esc",function(e){t.filterDropdownVisible$.value&&(e.preventDefault(),t.filterDropdownVisible$.next(!1))}),this.keybinds.listenOn(document,{fireIfInputFocused:!0})}},{key:"subscribeToCloseActions",value:function(){var t=this;this.closeActionsStream$=(0,h.T)((0,f.R)(document,"click"),(0,f.R)(document,"auxclick"),(0,f.R)(document,"touchend")).pipe((0,l.h)(function(e){var n=e.target;return n!==t.el.nativeElement&&!t.el.nativeElement.contains(n)})).subscribe(function(){t.filterDropdownVisible$.next(!1)})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Y36(w.qu),i.Y36(z.gz),i.Y36(i.SBq),i.Y36(j),i.Y36(i.sBO),i.Y36(z.F0))},t.\u0275cmp=i.Xpm({type:t,selectors:[["search-input-with-filters"]],viewQuery:function(t,e){var n;(1&t&&(i.Gf(K,5),i.Gf(x,5),i.Gf(V,5),i.Gf(tt,5)),2&t)&&(i.iGM(n=i.CRH())&&(e.searchInput=n.first),i.iGM(n=i.CRH())&&(e.suggestions=n.first),i.iGM(n=i.CRH())&&(e.activeFilters=n.first),i.iGM(n=i.CRH())&&(e.filterContainers=n))},hostBindings:function(t,e){1&t&&i.NdJ("click",function(t){return e.onClick(t)})},inputs:{compact:"compact",searchControl:"searchControl",pluralName:"pluralName",filters:"filters"},outputs:{filterChange:"filterChange",inputFocus:"inputFocus"},decls:11,vars:18,consts:[[3,"form","config","compact"],[1,"input-container","search-input-container"],["svgIcon","search",1,"search-icon"],["type","text",1,"search-input",3,"placeholder","formControl","focus"],["searchInput",""],["type","button","class","clear-button","mat-icon-button","",3,"click",4,"ngIf"],["type","button","mat-button","","class","filter-button",3,"click",4,"ngIf"],[3,"filters","filterSelected"],["type","button","mat-icon-button","",1,"clear-button",3,"click"],["svgIcon","close"],["type","button","mat-button","",1,"filter-button",3,"click"],["svgIcon","filter-list",1,"filter-button-icon"],["class","filter-button-text","trans","",4,"ngIf"],["trans","",1,"filter-button-text"]],template:function(t,e){1&t&&(i.TgZ(0,"active-filters",0),i.TgZ(1,"div",1),i._UZ(2,"mat-icon",2),i.TgZ(3,"input",3,4),i.NdJ("focus",function(){return e.inputFocus.emit()}),i.ALo(5,"trans"),i.qZA(),i.qZA(),i.qZA(),i.YNc(6,et,2,0,"button",5),i.ALo(7,"async"),i.YNc(8,it,3,1,"button",6),i.TgZ(9,"filter-suggestions",7),i.NdJ("filterSelected",function(t){return e.addFilterFromDropdownClick(t)}),i.ALo(10,"async"),i.qZA()),2&t&&(i.Q6J("form",e.form)("config",e.keyedFilters)("compact",e.compact),i.xp6(3),i.Q6J("placeholder",i.lcZ(5,12,"Type to search for "+e.pluralName))("formControl",e.searchControl),i.xp6(3),i.Q6J("ngIf",i.lcZ(7,14,e.haveFiltersOrQuery$)),i.xp6(2),i.Q6J("ngIf",e.keyedFilters),i.xp6(1),i.Udp("top",e.filterBarHeight+5+"px"),i.ekj("visible",i.lcZ(10,16,e.filterDropdownVisible$)),i.Q6J("filters",e.keyedFilters))},directives:[V,b.Hw,w.Fj,w.JJ,w.oH,v.O5,x,X.lW,m.P],pipes:[W.R,v.Ov],styles:["[_nghost-%COMP%]{display:flex;background-color:var(--be-background);border:1px solid var(--be-divider-default);height:45px;border-radius:4px;position:relative;padding-left:3px;overflow:hidden;width:100%}@media only screen and (max-width:768px){[_nghost-%COMP%]{flex-wrap:wrap;justify-content:center}}[_nghost-%COMP%]:focus-within{outline:none;border-color:var(--be-accent-lighter);box-shadow:0 0 0 2px var(--be-accent-lighter);z-index:3;overflow:visible;height:auto!important}.search-input-container[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1 1 auto;width:auto;height:43px;padding-left:8px}.search-icon[_ngcontent-%COMP%]{display:block;color:var(--be-secondary-text);margin-right:5px}.search-input[_ngcontent-%COMP%]{border:none;height:100%;padding:0}.search-input[_ngcontent-%COMP%]:focus{box-shadow:none;z-index:1}.filter-button[_ngcontent-%COMP%]{min-width:auto;padding:0 14px}.clear-button[_ngcontent-%COMP%], .filter-button[_ngcontent-%COMP%]{color:var(--be-accent-default);height:43px}.clear-button[_ngcontent-%COMP%]{width:43px;line-height:43px}.filter-button-text[_ngcontent-%COMP%]{margin-left:10px}"],changeDetection:0}),t}(),at=function(t){var e=[];return Object.values(t).forEach(function(t){""!==t.value&&e.push(t)}),e.length?encodeURIComponent(btoa(JSON.stringify(e))):""},rt=function(t){var e=[];try{e=JSON.parse(atob(decodeURIComponent(t)))}catch(n){}return e},st=function(){var t=function(){function t(e){d(this,t),this.datable=e}return g(t,[{key:"onFilterChange",value:function(t){this.datable.filters$.next({filters:t})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Y36(o.x))},t.\u0275cmp=i.Xpm({type:t,selectors:[["datatable-filters"]],inputs:{pluralName:"pluralName",filters:"filters"},decls:1,vars:3,consts:[[3,"searchControl","pluralName","filters","filterChange"]],template:function(t,e){1&t&&(i.TgZ(0,"search-input-with-filters",0),i.NdJ("filterChange",function(t){return e.onFilterChange(t)}),i.qZA()),2&t&&i.Q6J("searchControl",e.datable.searchControl)("pluralName",e.pluralName)("filters",e.filters)},directives:[ot],styles:[""],changeDetection:0}),t}()},59075:function(t,e,n){"use strict";n.d(e,{XQ:function(){return i},Bq:function(){return o},pg:function(){return a},Hi:function(){return r}});var i=function t(e){d(this,t),this.defaultValue=void 0!==e.defaultValue?e.defaultValue:"",this.key=e.key||"",this.label=e.label||e.key||"",this.description=e.description||"",this.defaultOperator=e.defaultOperator||a.eq,this.required=!!e.required,this.order=void 0===e.order?1:e.order,this.type=e.type||o.Select,this.inputType=e.inputType,this.options=e.options||[],this.operators=e.operators,this.component=e.component,this.componentData=e.componentData},o=function(t){return t.Select="select",t.DatePicker="datePicker",t.SelectModel="selectModel",t.Input="input",t.StaticValue="staticValue",t}({}),a=function(t){return t.eq="=",t.ne="!=",t.gt=">",t.gte=">=",t.lt="<",t.lte="<=",t.has="has",t.doesntHave="doesntHave",t}({}),r=[a.eq,a.ne,a.gt,a.gte,a.lt,a.lte]},45523:function(t,n,o){"use strict";o.d(n,{k4:function(){return r},T7:function(){return s},yH:function(){return c}});var a=o(59075),r=function(t){e(o,t);var n=i(o);function o(){var t;return d(this,o),(t=n.apply(this,arguments)).type=a.Bq.DatePicker,t.operators=a.Hi,t.defaultOperator=a.pg.lte,t.defaultValue=(new Date).toISOString().split("T")[0],t}return o}(a.XQ),s=function(t){e(o,t);var n=i(o);function o(){var t;return d(this,o),(t=n.apply(this,arguments)).key="created_at",t.label="Created At",t}return o}(r),c=function(t){e(o,t);var n=i(o);function o(){var t;return d(this,o),(t=n.apply(this,arguments)).key="updated_at",t.label="Updated At",t}return o}(r)},86668:function(t,e,n){"use strict";n.d(e,{V:function(){return v}});var i=n(31041),o=n(43835),a=n(79996),r=n(35366),s=n(56515),c=n(61116),l=n(84369),u=n(77307),p=n(38116),h=n(40450);function f(t,e){if(1&t&&(r.TgZ(0,"div",6),r.TgZ(1,"div",7),r._uU(2,"Items per page"),r.qZA(),r.TgZ(3,"div",8),r.TgZ(4,"select",9),r.TgZ(5,"option",10),r._uU(6,"10"),r.qZA(),r.TgZ(7,"option",10),r._uU(8,"15"),r.qZA(),r.TgZ(9,"option",10),r._uU(10,"20"),r.qZA(),r.TgZ(11,"option",10),r._uU(12,"50"),r.qZA(),r.TgZ(13,"option",10),r._uU(14,"100"),r.qZA(),r.qZA(),r.qZA(),r.qZA()),2&t){var n=r.oxw();r.xp6(4),r.Q6J("formControl",n.perPageControl),r.xp6(1),r.Q6J("ngValue",10),r.xp6(2),r.Q6J("ngValue",15),r.xp6(2),r.Q6J("ngValue",20),r.xp6(2),r.Q6J("ngValue",50),r.xp6(2),r.Q6J("ngValue",100)}}function m(t,e){if(1&t&&(r.TgZ(0,"div",11),r._uU(1),r.ALo(2,"trans"),r.ALo(3,"number"),r.qZA()),2&t){var n=r.oxw();r.xp6(1),r.HOy(" ",n.from," - ",n.to," ",r.lcZ(2,4,"of")," ",r.lcZ(3,6,n.totalRecords)," ")}}var v=function(){var t=function(){function t(e,n){d(this,t),this.datable=e,this.cd=n,this.hidePerPage=!1,this.perPageControl=new i.NI(15)}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.changeRef=this.datable.paginator.response$.pipe((0,o.h)(function(t){return!!(null==t?void 0:t.pagination)}),(0,a.U)(function(t){return t.pagination})).subscribe(function(e){t.totalRecords=e.total,t.to=Math.min(e.per_page*e.current_page,t.totalRecords),t.from=Math.max(t.to-e.per_page,1),t.havePrevious=t.datable.paginator.canLoadPrevPage(),t.haveNext=t.datable.paginator.canLoadNextPage(),t.perPageControl.setValue(parseInt(""+e.per_page),{emitEvent:!1}),t.cd.markForCheck()}),this.perPageControl.valueChanges.subscribe(function(e){t.datable.paginator.changePerPage(e)})}},{key:"ngOnDestroy",value:function(){this.changeRef.unsubscribe(),this.datable.destroy()}},{key:"previousPage",value:function(){this.datable.paginator.previousPage()}},{key:"nextPage",value:function(){this.datable.paginator.nextPage()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Y36(s.x),r.Y36(r.sBO))},t.\u0275cmp=r.Xpm({type:t,selectors:[["datatable-footer"]],inputs:{hidePerPage:"hidePerPage"},decls:9,vars:8,consts:[["class","page-size",4,"ngIf"],[1,"range-actions"],["class","range-label",4,"ngIf"],["type","button","mat-icon-button","",1,"range-button",3,"disabled","click"],["svgIcon","chevron-left"],["svgIcon","chevron-right"],[1,"page-size"],["trans","",1,"page-size-label"],[1,"input-container"],[1,"page-size-input",3,"formControl"],[3,"ngValue"],[1,"range-label"]],template:function(t,e){1&t&&(r.YNc(0,f,15,6,"div",0),r.TgZ(1,"div",1),r.YNc(2,m,4,8,"div",2),r.TgZ(3,"button",3),r.NdJ("click",function(){return e.previousPage()}),r.ALo(4,"async"),r._UZ(5,"mat-icon",4),r.qZA(),r.TgZ(6,"button",3),r.NdJ("click",function(){return e.nextPage()}),r.ALo(7,"async"),r._UZ(8,"mat-icon",5),r.qZA(),r.qZA()),2&t&&(r.Q6J("ngIf",!e.hidePerPage),r.xp6(2),r.Q6J("ngIf",e.from&&e.to&&e.totalRecords),r.xp6(1),r.Q6J("disabled",!e.havePrevious||r.lcZ(4,4,e.datable.paginator.loading$)),r.xp6(3),r.Q6J("disabled",!e.haveNext||r.lcZ(7,6,e.datable.paginator.loading$)))},directives:[c.O5,l.lW,u.Hw,p.P,i.EJ,i.JJ,i.oH,i.YN,i.Kr],pipes:[c.Ov,h.R,c.JJ],styles:["[_nghost-%COMP%]{display:flex;padding:0 8px;align-items:center;justify-content:flex-end;flex-wrap:wrap-reverse;width:100%;height:56px}.page-size[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:8px}.page-size-label[_ngcontent-%COMP%]{font-size:1.2rem;color:var(--be-secondary-text);margin:0 4px}.input-container[_ngcontent-%COMP%]{width:auto}.page-size-input[_ngcontent-%COMP%]{width:60px;height:33px;padding:4px;margin:0 4px}.range-actions[_ngcontent-%COMP%]{display:flex;align-items:center}.range-label[_ngcontent-%COMP%]{margin:0 32px 0 24px;font-size:1.2rem}.range-button[_ngcontent-%COMP%], .range-label[_ngcontent-%COMP%]{color:var(--be-secondary-text)}.range-button[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{width:28px;height:28px;line-height:28px}"],changeDetection:0}),t}()},51685:function(t,e,n){"use strict";n.d(e,{x:function(){return _}});var i=n(61116),o=n(77307),a=n(68400),r=n(40994),s=n(31041),c=n(84369),l=n(95522),u=n(27701),p=n(56160),g=n(58666),h=n(50615),f=n(92935),m=n(99808),v=n(35366),b=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=v.oAB({type:t}),t.\u0275inj=v.cJS({imports:[[i.ez,a.N,s.UX,o.Ps,c.ot,f.Is,m.p]]}),t}(),y=n(63337),_=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=v.oAB({type:t}),t.\u0275inj=v.cJS({imports:[[i.ez,a.N,s.UX,s.u5,p.G,g.u,h.X,b,y.Bz,c.ot,o.Ps,r.p9,l.Hi,u.Cv],r.p9]}),t}()},56515:function(e,n,i){"use strict";i.d(n,{x:function(){return P}});var o=i(78512),a=i(3080),r=i(91741),l=i(40878),u=i(79996),p=i(44689),h=i(66599),f=i(35366),m=i(63337),v=i(68515),b=i(36402),y=function(){var t=function(){function t(e,n,i){var a=this;d(this,t),this.router=e,this.http=n,this.localStorage=i,this.params$=new o.X({}),this.paginatedOnce$=new o.X(!1),this.loading$=new o.X(!1),this.response$=new o.X(null),this.dontUpdateQueryParams=!1,this.perPageCacheKey=null,this.noResults$=this.response$.pipe((0,u.U)(function(t){return a.paginatedOnce$.value&&0===t.pagination.data.length}))}return g(t,[{key:"params",get:function(){return this.params$.value}},{key:"currentPage",get:function(){var t,e;return null===(e=null===(t=this.response$.value)||void 0===t?void 0:t.pagination)||void 0===e?void 0:e.current_page}},{key:"paginate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=this.subscription?{}:this.currentQueryParams();this.params$.next(Object.assign(Object.assign(Object.assign({},this.response$.value?{perPage:this.response$.value.pagination.per_page,page:this.response$.value.pagination.current_page}:{}),i),t)),this.subscription||this.init(e,n)}},{key:"nextPage",value:function(){var t=this.response$.value.pagination.current_page||0;this.paginate(Object.assign(Object.assign({},this.params$.value),{page:t+1,cursor:this.response$.value.pagination.next_cursor}))}},{key:"previousPage",value:function(){var t=this.response$.value.pagination.current_page;this.paginate(Object.assign(Object.assign({},this.params$.value),{page:t-1||1,cursor:this.response$.value.pagination.prev_cursor}))}},{key:"changePerPage",value:function(t){var e;t!==(null===(e=this.params$.value)||void 0===e?void 0:e.perPage)&&(this.perPageCacheKey&&this.localStorage.set(this.perPageCacheKey,t),this.paginate(Object.assign(Object.assign({},this.params$.value),{perPage:t})))}},{key:"currentQueryParams",value:function(){return this.router.routerState.root.snapshot.queryParams}},{key:"init",value:function(t,e){var n=this;this.subscription=this.params$.pipe((0,p.w)(function(i){n.loading$.next(!0);var o=!n.paginatedOnce$.value;return o&&n.perPageCacheKey&&n.localStorage.get(n.perPageCacheKey)&&(i=Object.assign({perPage:n.localStorage.get(n.perPageCacheKey)},i)),(o&&e?(0,l.of)({pagination:e}):n.http.get(t,i)).pipe((0,h.b)(function(){n.updateQueryParams(i),n.loading$.next(!1),n.paginatedOnce$.next(!0)},function(){n.loading$.next(!1),n.paginatedOnce$.next(!0)}))})).subscribe(function(t){n.response$.next(t)})}},{key:"updateQueryParams",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.dontUpdateQueryParams){for(var e in t)Array.isArray(t[e])&&(t[e]=t[e].join(","));this.router.navigate([],{queryParams:t,replaceUrl:!0})}}},{key:"canLoadNextPage",value:function(){var t,e=null===(t=this.response$.value)||void 0===t?void 0:t.pagination;return!!e&&(!!e.next_cursor||this.currentPage<e.last_page)}},{key:"canLoadPrevPage",value:function(){var t,e=null===(t=this.response$.value)||void 0===t?void 0:t.pagination;return!!e&&(!!e.prev_cursor||this.currentPage>1)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(f.LFG(m.F0),f.LFG(v.r),f.LFG(b.m))},t.\u0275prov=f.Yz7({token:t,factory:t.\u0275fac}),t}(),_=i(47701),x=i(62855),k=i(43835),Z=i(73709),w=i(4694),A=i(72798),C=i(52907),T=i(19861);function q(t,e){var n=C.pick(e,t);if((0,T.t6)(n)){var i=Number(n);return i<9007199254740991?i:n}return n}var I=i(9636),O=i(31041),U=i(24859),P=function(){var e=function(){function e(t,n,i,a){d(this,e),this.modal=t,this.router=n,this.http=i,this.localStorage=a,this.sort$=new o.X({}),this.filters$=new o.X({}),this.searchControl=new O.NI,this.searchTerm$=new o.X(null),this.staticParams$=new o.X({}),this.paginator=new y(this.router,this.http,this.localStorage),this.ignoreNextParamChange=!1,this.originalData$=new o.X([]),this.data$=new o.X([]),this.selectedRows$=new o.X([])}return g(e,[{key:"data",get:function(){return this.data$.value},set:function(t){var e=c(t);this.originalData$.next(e),this.data$.next(e),this.ignoreNextParamChange=!0,this.reset()}},{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.config=e,this.staticParams$.next(Object.assign(Object.assign({},this.staticParams$.value),e.staticParams)),e.uri?this.connectToPaginator():e.initialData&&(this.data=e.initialData),e.uri){var n=this.router.routerState.root.snapshot.queryParams,i=n.query;this.searchControl.setValue(i),this.searchTerm$.next(i),this.sort$.next({orderBy:n.orderBy,orderDir:n.orderDir})}return this.searchControlSub=this.searchControl.valueChanges.pipe((0,_.b)(300)).subscribe(function(e){t.searchTerm$.next(e)}),this.mainSub=(0,a.aj)([this.sort$,this.filters$,this.searchTerm$.pipe((0,u.U)(function(t){return{query:t}})),this.staticParams$]).pipe((0,_.b)(0,r.Z),(0,u.U)(function(t){return Object.assign.apply(Object,[{}].concat(c(t)))})).subscribe(function(e){if(t.ignoreNextParamChange)return t.ignoreNextParamChange=!1;e=(0,Z.N)(e),Object.entries(e).forEach(function(t){var n=s(t,2),i=n[0],o=n[1];"object"==typeof o&&o.id&&(e["".concat(i,"Id")]=o.id,delete e[i])}),t.config.uri?t.paginator.paginate(e,t.config.uri,t.config.initialData):Object.keys(e).length&&t.data.length&&t.applyLocalTransforms(e)}),this}},{key:"connectToPaginator",value:function(){var t=this;this.paginatorSub=this.paginator.response$.pipe((0,x.G)()).subscribe(function(e){var n,i=s(e,2),o=i[0],a=i[1],r=t.config.infiniteScroll&&(null===(n=null==o?void 0:o.pagination)||void 0===n?void 0:n.current_page)!==a.pagination.current_page?[].concat(c(t.data$.value),c(a.pagination.data)):a.pagination.data;t.data$.next(r)})}},{key:"applyLocalTransforms",value:function(t){var e=c(this.originalData$.value);t.query&&(e=(0,I.D)(e,t.query)),t.orderBy&&t.orderDir&&(e=function(t,e,n){return t.sort(function(t,i){var o=q(t,e),a=q(i,e),r=typeof o,s=typeof a;r!==s&&("number"===r&&(o+=""),"number"===s&&(a+=""));var c=0;return null!=o&&null!=a?o>a?c=1:o<a&&(c=-1):null!=o?c=1:null!=a&&(c=-1),c*("asc"===n?1:-1)})}(e,t.orderBy,t.orderDir)),this.data$.next(e)}},{key:"addFilter",value:function(e,n){this.filters$.next(Object.assign(Object.assign({},this.filters$.value),t({},e,n)))}},{key:"removeFilter",value:function(t){var e=Object.assign({},this.filters$.value);delete e[t],this.filters$.next(e)}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.filters$.next({}),this.sort$.next({}),this.selectedRows$.next([]),t&&this.staticParams$.next(t)}},{key:"openCrupdateResourceModal",value:function(t,e,n){var i=this;return this.modal.open(t,e,n).beforeClosed().pipe((0,k.h)(function(t){return!!t}),(0,h.b)(function(){return i.reset()}))}},{key:"confirmResourceDeletion",value:function(t){var e=Object.assign(Object.assign({},A.M),{replacements:{resource:t}});return this.modal.open(w.z,e).afterClosed().pipe((0,k.h)(function(t){return t}))}},{key:"getCurrentParams",value:function(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.sort$.value),this.filters$.value),this.staticParams$.value),this.paginator.params)}},{key:"destroy",value:function(){var t,e,n;null===(t=this.paginatorSub)||void 0===t||t.unsubscribe(),null===(e=this.mainSub)||void 0===e||e.unsubscribe(),null===(n=this.searchControlSub)||void 0===n||n.unsubscribe()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(f.LFG(U.u),f.LFG(m.F0),f.LFG(v.r),f.LFG(b.m))},e.\u0275prov=f.Yz7({token:e,factory:e.\u0275fac}),e}()},72798:function(t,e,n){"use strict";n.d(e,{M:function(){return i}});var i={title:"Delete :resource",body:"Are you sure you want to delete selected :resource?",ok:"Delete"}},54275:function(t,e,n){"use strict";n.d(e,{O:function(){return s}});var i=n(35366),o=n(56515),a=n(40994),r=["table-body-checkbox",""],s=function(){var t=function(){function t(e,n){d(this,t),this.datatable=e,this.cd=n}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.changeRef=this.datatable.selectedRows$.subscribe(function(e){t.cd.markForCheck()})}},{key:"ngOnDestroy",value:function(){this.changeRef.unsubscribe()}},{key:"isRowSelected",value:function(t){return this.datatable.selectedRows$.value.indexOf(t)>-1}},{key:"toggleRow",value:function(t){if(this.isRowSelected(t)){var e=this.datatable.selectedRows$.value.slice(),n=this.datatable.selectedRows$.value.indexOf(t);e.splice(n,1),this.datatable.selectedRows$.next(e)}else this.datatable.selectedRows$.next([].concat(c(this.datatable.selectedRows$.value),[t]))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Y36(o.x),i.Y36(i.sBO))},t.\u0275cmp=i.Xpm({type:t,selectors:[["","table-body-checkbox",""]],hostAttrs:[1,"table-checkbox"],inputs:{rowId:["table-body-checkbox","rowId"]},attrs:r,decls:1,vars:1,consts:[[3,"checked","click","change"]],template:function(t,e){1&t&&(i.TgZ(0,"mat-checkbox",0),i.NdJ("click",function(t){return t.stopPropagation()})("change",function(t){return t?e.toggleRow(e.rowId):null}),i.qZA()),2&t&&i.Q6J("checked",e.isRowSelected(e.rowId))},directives:[a.oG],encapsulation:2,changeDetection:0}),t}()},13536:function(t,e,n){"use strict";n.d(e,{e:function(){return s}});var i=n(35366),o=n(56515),a=n(40994),r=["table-header-checkbox",""],s=function(){var t=function(){function t(e,n){d(this,t),this.datatable=e,this.cd=n}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.changeRef=this.datatable.selectedRows$.subscribe(function(){t.cd.markForCheck()})}},{key:"ngOnDestroy",value:function(){this.changeRef.unsubscribe()}},{key:"anyRowsSelected",value:function(){return!!this.datatable.selectedRows$.value.length}},{key:"allRowsSelected",value:function(){var t;return this.datatable.selectedRows$.value.length&&this.datatable.selectedRows$.value.length===(null===(t=this.datatable.data$.value)||void 0===t?void 0:t.length)}},{key:"toggleAllRows",value:function(){this.allRowsSelected()?this.datatable.selectedRows$.next([]):this.datatable.selectedRows$.next(this.datatable.data$.value.map(function(t){return t.id}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Y36(o.x),i.Y36(i.sBO))},t.\u0275cmp=i.Xpm({type:t,selectors:[["","table-header-checkbox",""]],hostAttrs:[1,"table-checkbox"],attrs:r,decls:1,vars:2,consts:[[3,"checked","indeterminate","change"]],template:function(t,e){1&t&&(i.TgZ(0,"mat-checkbox",0),i.NdJ("change",function(t){return t?e.toggleAllRows():null}),i.qZA()),2&t&&i.Q6J("checked",e.allRowsSelected())("indeterminate",e.anyRowsSelected()&&!e.allRowsSelected())},directives:[a.oG],encapsulation:2,changeDetection:0}),t}()},80922:function(t,e,n){"use strict";n.d(e,{p:function(){return m}});var i=n(43835),o=n(99235),a=n(40694),r=n(35366),s=n(56515),c=n(97388),l=n(61116),u=n(77307),p=["columnName"],h=["table-sort-header",""],f=["*"],m=function(){var t=function(){function t(e,n,i,o){d(this,t),this.datable=e,this.cd=n,this.focusMonitor=i,this.el=o,this.orderDir=null,this.arrowVisible=!1,this.arrowDirection="down"}return g(t,[{key:"sortDisabled",get:function(){var t;return null===(t=this.datable.config)||void 0===t?void 0:t.disableSort}},{key:"ngOnInit",value:function(){var t=this;this.orderBy||(this.orderBy=(0,a.V)(this.columnName.nativeElement.textContent,"_")),this.sortSub=this.datable.sort$.pipe((0,i.h)(function(e){return e.orderBy!==t.orderBy})).subscribe(function(){t.orderDir=null,t.onMouseLeave(),t.cd.markForCheck()})}},{key:"ngAfterViewInit",value:function(){this.focusMonitor.monitor(this.el).subscribe()}},{key:"ngOnDestroy",value:function(){this.sortSub.unsubscribe(),this.focusMonitor.stopMonitoring(this.el)}},{key:"changeSort",value:function(){this.datable.sort$.next({orderBy:this.orderBy,orderDir:this.getDirection(this.orderDir)})}},{key:"getDirection",value:function(t){switch(t){case"asc":return this.arrowVisible=!1,this.orderDir=null;case"desc":return this.arrowVisible=!0,this.arrowDirection="up",this.orderDir="asc";default:return this.arrowVisible=!0,this.arrowDirection="down",this.orderDir="desc"}}},{key:"onMouseEnter",value:function(){var t;(null===(t=this.datable.config)||void 0===t?void 0:t.disableSort)||(this.arrowVisible=!0)}},{key:"onMouseLeave",value:function(){this.arrowVisible=!1,this.orderDir||(this.arrowDirection="down")}},{key:"handleClick",value:function(){var t;(null===(t=this.datable.config)||void 0===t?void 0:t.disableSort)||this.changeSort()}},{key:"handleKeydown",value:function(t){var e;(null===(e=this.datable.config)||void 0===e?void 0:e.disableSort)||t.keyCode!==o.L_&&t.keyCode!==o.K5||(t.preventDefault(),this.changeSort())}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Y36(s.x),r.Y36(r.sBO),r.Y36(c.tE),r.Y36(r.SBq))},t.\u0275cmp=r.Xpm({type:t,selectors:[["","table-sort-header",""]],viewQuery:function(t,e){var n;(1&t&&r.Gf(p,7),2&t)&&(r.iGM(n=r.CRH())&&(e.columnName=n.first))},hostAttrs:["tabindex","0"],hostVars:4,hostBindings:function(t,e){1&t&&r.NdJ("click",function(){return e.handleClick()})("keydown",function(t){return e.handleKeydown(t)})("mouseenter",function(){return e.onMouseEnter()})("mouseleave",function(){return e.onMouseLeave()}),2&t&&r.ekj("active",e.orderDir)("sort-disabled",e.sortDisabled)},inputs:{orderBy:["table-sort-header","orderBy"]},attrs:h,ngContentSelectors:f,decls:5,vars:3,consts:[[1,"text"],["columnName",""],[1,"icon-wrapper",3,"ngClass"],["svgIcon","arrow-downward",1,"sort-icon"]],template:function(t,e){1&t&&(r.F$t(),r.TgZ(0,"span",0,1),r.Hsn(2),r.qZA(),r.TgZ(3,"span",2),r._UZ(4,"mat-icon",3),r.qZA()),2&t&&(r.xp6(3),r.Q6J("ngClass",e.arrowDirection),r.xp6(1),r.ekj("hint-visible",e.arrowVisible))},directives:[l.mk,u.Hw],styles:["[_nghost-%COMP%]{outline:none}[_nghost-%COMP%]:not(.sort-disabled){cursor:pointer}.active[_nghost-%COMP%]   .sort-icon[_ngcontent-%COMP%]{color:var(--be-text);opacity:1;transform:translate(0)}.cdk-keyboard-focused[_nghost-%COMP%]   .text[_ngcontent-%COMP%]{border-bottom:1px solid}.text[_ngcontent-%COMP%]{display:inline-block;text-transform:capitalize}.sort-icon[_ngcontent-%COMP%], .text[_ngcontent-%COMP%]{vertical-align:middle}.sort-icon[_ngcontent-%COMP%]{width:15px;height:15px;transition:all 225ms cubic-bezier(.4,0,.2,1);transform:translateY(25%);opacity:0}.icon-wrapper[_ngcontent-%COMP%]{display:inline-block;margin-left:4px;transition:transform 225ms cubic-bezier(.4,0,.2,1)}.icon-wrapper[_ngcontent-%COMP%]:not(.down){transform:rotate(180deg)}.hint-visible[_ngcontent-%COMP%]{opacity:1;transform:translate(0)}"],changeDetection:0}),t}()},9636:function(t,e,n){"use strict";function i(t,e){return t.filter(function(t){return function(t,e){var n="string"==typeof t?t:o(t),i=e.trim().toLowerCase();return-1!==n.indexOf(i)}(t,e)})}function o(t){return Object.keys(t).reduce(function(e,n){return e+(t[n]&&"object"==typeof t[n]?o(t[n]):t[n])+"\u25ec"},"").toLowerCase()}n.d(e,{D:function(){return i}})},20237:function(t,e,n){"use strict";n.d(e,{w:function(){return r}});var i=n(4694),o=n(35366),a=n(24859),r=function(){var t=function(){function t(e){d(this,t),this.modal=e}return g(t,[{key:"canDeactivate",value:function(t){return!!t.canDeactivate()||this.modal.show(i.z,{title:"Unsaved Changes",body:"You have unsaved changes. Do you want to discard them?",ok:"Discard"}).beforeClosed()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.LFG(a.u))},t.\u0275prov=o.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},99208:function(t,n,o){"use strict";o.d(n,{e:function(){return dt}});var a=o(11520),r=o(82628),s=o(64762),c=o(35366),l=o(88195),u=o(78733),p=o(71294),h=o(3950),f=function(){var t=function(){function t(e,n,i,o,a){d(this,t),this.settings=e,this.zone=n,this.lazyLoader=i,this.breakpoints=o,this.i18n=a,this.makeBootstrapPromise()}return g(t,[{key:"reset",value:function(){this.editorIsReady()&&(this.tinymceInstance.setContent(""),this.tinymceInstance.undoManager.clear())}},{key:"focus",value:function(){var t=this;this.waitForEditor().then(function(){t.tinymceInstance.focus(!1)})}},{key:"hasUndo",value:function(){return this.editorIsReady()&&this.tinymceInstance.undoManager.hasUndo()}},{key:"hasRedo",value:function(){return this.editorIsReady()&&this.tinymceInstance.undoManager.hasRedo()}},{key:"queryCommandState",value:function(t){return this.editorIsReady()&&this.tinymceInstance.queryCommandState(t)}},{key:"execCommand",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.waitForEditor().then(function(){e.zone.run(function(){e.tinymceInstance.execCommand(t,!1,n)})})}},{key:"getContents",value:function(t){return this.editorIsReady()?this.tinymceInstance.getContent(t):""}},{key:"setContents",value:function(t){var e=this;this.waitForEditor().then(function(){e.tinymceInstance.undoManager&&(e.tinymceInstance.undoManager.transact(function(){e.tinymceInstance.setContent(t)}),e.tinymceInstance.selection.setCursorLocation(),e.tinymceInstance.nodeChanged(),e.tinymceInstance.execCommand("mceResize"))})}},{key:"insertContents",value:function(t){var e=this;this.waitForEditor().then(function(){e.tinymceInstance.execCommand("mceInsertContent",!1,t),setTimeout(function(){return e.tinymceInstance.selection.collapse()})})}},{key:"insertImage",value:function(t){var e=this;this.waitForEditor().then(function(){e.insertContents('<img src="'+t+'"/>'),setTimeout(function(){return e.execCommand("mceAutoResize")},500)})}},{key:"waitForEditor",value:function(){var t=this;return this.tinymceInstance?new Promise(function(e){return e(t.tinymceInstance)}):this.bootstrapPromise?this.bootstrapPromise:void 0}},{key:"setConfig",value:function(t){var e=this;this.config=t,this.loadTinymce().then(function(){e.initTinymce()})}},{key:"editorIsReady",value:function(){return!this.bootstrapPromise&&!!this.tinymceInstance&&!!this.tinymceInstance.undoManager}},{key:"loadTinymce",value:function(){return this.lazyLoader.loadAsset("js/tinymce/tinymce.min.js",{type:"js"})}},{key:"initTinymce",value:function(){var t=this,e={target:this.config.textAreaEl.nativeElement,plugins:["link","codesample","paste","autoresize"],branding:!1,browser_spellcheck:!0,max_height:this.config.maxHeight,min_height:this.config.minHeight,autoresize_on_init:!1,paste_as_text:!0,elementpath:!1,statusbar:!1,entity_encoding:"raw",menubar:!1,toolbar:!1,convert_urls:!1,forced_root_block:!1,document_base_url:document.baseURI,element_format:"html",body_class:"editor-body",content_style:'html {font-size: 62.5%;}\n.editor-body {font-size: 1.4rem;font-family: "Roboto", "Helvetica Neue", sans-serif;color: rgba(0, 0, 0, .87);}\nimg {max-width: 100%}\ncode[class*=language-], pre[class*=language-] {font-size: inherit;} .mce-preview-object {border: none;}',content_css:["https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic"],default_link_target:"_blank",link_assume_external_targets:!0,target_list:!1,link_title:!1,image_dimensions:!1,image_description:!1,setup:function(e){t.tinymceInstance=e,e.on("change",function(){return t.config.onChange.emit(e.getContent())}),e.on("click",function(){t.zone.run(function(){})})},init_instance_callback:function(e){t.bootstrapPromise=!1,t.bootstrapPromiseResolve(t.tinymceInstance);var n=function(){t.zone.run(function(){t.config.onChange.emit(e.getContent()),t.config.onCtrlEnter.emit()})};e.shortcuts.add("ctrl+13","desc",n),window.navigator.platform.toLowerCase().includes("mac")&&e.shortcuts.add("meta+13","desc",n)}};if(this.config.showAdvancedControls&&(e.plugins=e.plugins.concat(["media","hr","visualblocks","visualchars","wordcount"]),e.forced_root_block="p",e.statusbar=!0,e.autoresize_on_init=!0,e.extended_valid_elements="svg[*],use[*],iframe[src|frameborder|width|height|allow=*|allowfullscreen],script[src]",e.elementpath=!0,e.content_css.push(this.settings.getAssetUrl()+"css/advanced-editor-styles.css"),e.target_list=[{title:this.i18n.t("Current window"),value:""},{title:this.i18n.t("New Window"),value:"_blank"}],e.codesample_languages=[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"Shell",value:"shell-session"},{text:"Bash",value:"bash"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}]),"auto"===this.config.minHeight){var n=this.config.editorEl.nativeElement.parentElement.offsetHeight-74-4;e.min_height=n,e.max_height=n}tinymce.init(e)}},{key:"destroyEditor",value:function(){try{this.tinymceInstance&&this.tinymceInstance.remove(),this.tinymceInstance=null,this.makeBootstrapPromise()}catch(t){}}},{key:"makeBootstrapPromise",value:function(){var t=this;this.bootstrapPromise=new Promise(function(e){return t.bootstrapPromiseResolve=e})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.LFG(l.Z),c.LFG(c.R0b),c.LFG(u.j),c.LFG(p.S),c.LFG(h.Z))},t.\u0275prov=c.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}(),m=o(62147),v=o(66457),b=o(67139),y=o(40149),_=o(74899),x=o(31041),k=o(47701),Z=o(35331),w=o(28505),A=o(98979),C=o(16930),T=o(20274),q=o(94380),I=o(73033),O=function(){var t,n=function(t){e(o,t);var n=i(o);function o(){var t;return d(this,o),(t=n.apply(this,arguments)).DEFAULT_MAX_SIZE_MB=3,t}return g(o,[{key:"initValidations",value:function(){var t,e=[new T.p({maxSize:(0,q.F)(this.DEFAULT_MAX_SIZE_MB,"MB")},this.i18n),new I.p({types:["image"]},this.i18n)];(t=this.validations).push.apply(t,e)}}]),o}(C.c);return n.\u0275fac=function(e){return(t||(t=c.n5z(n)))(e||n)},n.\u0275prov=c.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n}(),U=o(61116),P=o(24311),M=o(77307),S=o(97070),N=o(38116),J=o(40450),E=["visualArea"],L=["sourceArea"];function D(t,e){if(1&t){var n=c.EpF();c.TgZ(0,"div",3),c.TgZ(1,"button",4),c.NdJ("click",function(){return c.CHM(n),c.oxw().openFileUploadDialog()}),c.ALo(2,"trans"),c._UZ(3,"mat-icon",19),c.qZA(),c.qZA()}2&t&&(c.xp6(1),c.Q6J("matTooltip",c.lcZ(2,1,"Add Attachment")))}function R(t,e){if(1&t){var n=c.EpF();c.TgZ(0,"div",3),c.TgZ(1,"button",4),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("codesample")}),c.ALo(2,"trans"),c._UZ(3,"mat-icon",20),c.qZA(),c.qZA()}2&t&&(c.xp6(1),c.Q6J("matTooltip",c.lcZ(2,1,"Insert Code Sample")))}function Y(t,e){if(1&t){var n=c.EpF();c.TgZ(0,"button",23),c.NdJ("click",function(){return c.CHM(n),c.oxw(2).openInsertImageModal()}),c.ALo(1,"trans"),c._UZ(2,"mat-icon",24),c.qZA()}2&t&&c.Q6J("matTooltip",c.lcZ(1,1,"Insert Image"))}function F(t,e){if(1&t){var n=c.EpF();c.TgZ(0,"div",3),c.TgZ(1,"button",4),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("mceLink")}),c.ALo(2,"trans"),c._UZ(3,"mat-icon",21),c.qZA(),c.YNc(4,Y,3,3,"button",22),c.qZA()}if(2&t){var i=c.oxw();c.xp6(1),c.ekj("active",i.queryCommandState("link")),c.Q6J("matTooltip",c.lcZ(2,4,"Insert Link")),c.xp6(3),c.Q6J("ngIf",i.currentUser.hasPermission("files.create"))}}function Q(t,e){if(1&t){var n=c.EpF();c.TgZ(0,"div",1),c.TgZ(1,"div",3),c.TgZ(2,"button",25),c.TgZ(3,"span",26),c._uU(4,"Insert"),c.qZA(),c._UZ(5,"mat-icon",27),c.qZA(),c.TgZ(6,"mat-menu",null,28),c.TgZ(8,"div",29),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("InsertHorizontalRule")}),c._UZ(9,"mat-icon",30),c.TgZ(10,"span",26),c._uU(11,"Horizontal Line"),c.qZA(),c.qZA(),c.TgZ(12,"div",29),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("mceLink")}),c._UZ(13,"mat-icon",21),c.TgZ(14,"span",26),c._uU(15,"Link"),c.qZA(),c.qZA(),c.TgZ(16,"div",29),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("mceMedia")}),c._UZ(17,"mat-icon",31),c.TgZ(18,"span",26),c._uU(19,"Media"),c.qZA(),c.qZA(),c.TgZ(20,"div",32),c.NdJ("click",function(){return c.CHM(n),c.oxw().insertInfoContainer("important")}),c._UZ(21,"mat-icon",33),c.TgZ(22,"span",26),c._uU(23,"Important"),c.qZA(),c.qZA(),c.TgZ(24,"div",32),c.NdJ("click",function(){return c.CHM(n),c.oxw().insertInfoContainer("warning")}),c._UZ(25,"mat-icon",34),c.TgZ(26,"span",26),c._uU(27,"Warning"),c.qZA(),c.qZA(),c.TgZ(28,"div",32),c.NdJ("click",function(){return c.CHM(n),c.oxw().insertInfoContainer("note")}),c._UZ(29,"mat-icon",35),c.TgZ(30,"span",26),c._uU(31,"Note"),c.qZA(),c.qZA(),c.qZA(),c.qZA(),c.TgZ(32,"div",3),c.TgZ(33,"button",36),c.TgZ(34,"span",26),c._uU(35,"Format"),c.qZA(),c._UZ(36,"mat-icon",27),c.qZA(),c.TgZ(37,"mat-menu",37,38),c.TgZ(39,"div",29),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("FormatBlock","h1")}),c.TgZ(40,"div",39),c._uU(41,"Heading 1"),c.qZA(),c.TgZ(42,"div",40),c._uU(43,"Alt+Shift+1"),c.qZA(),c.qZA(),c.TgZ(44,"div",29),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("FormatBlock","h2")}),c.TgZ(45,"div",39),c._uU(46,"Heading 2"),c.qZA(),c.TgZ(47,"div",40),c._uU(48,"Alt+Shift+2"),c.qZA(),c.qZA(),c.TgZ(49,"div",29),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("FormatBlock","h3")}),c.TgZ(50,"div",39),c._uU(51,"Heading 3"),c.qZA(),c.TgZ(52,"div",40),c._uU(53,"Alt+Shift+3"),c.qZA(),c.qZA(),c.TgZ(54,"div",29),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("FormatBlock","h4")}),c.TgZ(55,"div",39),c._uU(56,"Heading 4"),c.qZA(),c.TgZ(57,"div",40),c._uU(58,"Alt+Shift+4"),c.qZA(),c.qZA(),c.TgZ(59,"div",29),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("FormatBlock","code")}),c.TgZ(60,"div",39),c._uU(61,"Code"),c.qZA(),c.qZA(),c.TgZ(62,"div",29),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("strikethrough")}),c.TgZ(63,"div",39),c._uU(64,"Strikethrough"),c.qZA(),c.qZA(),c.TgZ(65,"div",29),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("superscript")}),c.TgZ(66,"div",39),c._uU(67,"Superscript"),c.qZA(),c.qZA(),c.TgZ(68,"div",29),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("subscript")}),c.TgZ(69,"div",39),c._uU(70,"Subscript"),c.qZA(),c.qZA(),c.TgZ(71,"div",29),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("mceBlockQuote")}),c.TgZ(72,"div",39),c._uU(73,"Blockquote"),c.qZA(),c.qZA(),c.TgZ(74,"div",29),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("FormatBlock","p")}),c.TgZ(75,"div",39),c._uU(76,"Paragraph"),c.qZA(),c.TgZ(77,"div",40),c._uU(78,"Ctrl+Shift+7"),c.qZA(),c.qZA(),c.qZA(),c.qZA(),c.TgZ(79,"div",3),c.TgZ(80,"button",41,42),c.TgZ(82,"span",26),c._uU(83,"Color"),c.qZA(),c._UZ(84,"mat-icon",27),c.qZA(),c.TgZ(85,"mat-menu",43,44),c.TgZ(87,"div",45),c.NdJ("click",function(){c.CHM(n);var t=c.MAs(81);return c.oxw().showColorPicker("ForeColor",t)}),c._UZ(88,"mat-icon",46),c.TgZ(89,"span",26),c._uU(90,"Text Color"),c.qZA(),c.qZA(),c.TgZ(91,"div",47),c.NdJ("click",function(){c.CHM(n);var t=c.MAs(81);return c.oxw().showColorPicker("HiliteColor",t)}),c._UZ(92,"mat-icon",48),c.TgZ(93,"span",26),c._uU(94,"Background Color"),c.qZA(),c.qZA(),c.qZA(),c.qZA(),c.TgZ(95,"div",3),c.TgZ(96,"button",4),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("justifyLeft")}),c.ALo(97,"trans"),c._UZ(98,"mat-icon",49),c.qZA(),c.TgZ(99,"button",4),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("justifyCenter")}),c.ALo(100,"trans"),c._UZ(101,"mat-icon",50),c.qZA(),c.TgZ(102,"button",4),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("justifyRight")}),c.ALo(103,"trans"),c._UZ(104,"mat-icon",51),c.qZA(),c.qZA(),c.TgZ(105,"div",3),c.TgZ(106,"button",4),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("Outdent")}),c.ALo(107,"trans"),c._UZ(108,"mat-icon",52),c.qZA(),c.TgZ(109,"button",4),c.NdJ("click",function(){return c.CHM(n),c.oxw().execCommand("Indent")}),c.ALo(110,"trans"),c._UZ(111,"mat-icon",53),c.qZA(),c.qZA(),c.TgZ(112,"div",54),c.TgZ(113,"button",55),c.NdJ("click",function(){return c.CHM(n),c.oxw().showVisualEditor()}),c._uU(114,"Visual "),c.qZA(),c.TgZ(115,"button",56),c.NdJ("click",function(){return c.CHM(n),c.oxw().showSourceEditor()}),c._uU(116,"Source "),c.qZA(),c.qZA(),c.qZA()}if(2&t){var i=c.MAs(7),o=c.MAs(38),a=c.MAs(86),r=c.oxw();c.xp6(2),c.Q6J("matMenuTriggerFor",i),c.xp6(31),c.Q6J("matMenuTriggerFor",o),c.xp6(47),c.Q6J("matMenuTriggerFor",a),c.xp6(16),c.ekj("active",r.queryCommandState("justifyLeft")),c.Q6J("matTooltip",c.lcZ(97,18,"Align Left")),c.xp6(3),c.ekj("active",r.queryCommandState("justifyCenter")),c.Q6J("matTooltip",c.lcZ(100,20,"Center")),c.xp6(3),c.ekj("active",r.queryCommandState("justifyRight")),c.Q6J("matTooltip",c.lcZ(103,22,"Align Right")),c.xp6(4),c.Q6J("matTooltip",c.lcZ(107,24,"Decrease Indent")),c.xp6(3),c.Q6J("matTooltip",c.lcZ(110,26,"Increase Indent")),c.xp6(4),c.ekj("active","visual"===r.activeEditor),c.xp6(2),c.ekj("active","source"===r.activeEditor)}}var $=[[["","customButtons",""]],[["","header",""]],[["","footer",""]]],B=["[customButtons]","[header]","[footer]"],H=function(){var t=function(){function t(e,n,i,o,a,r,s,l){d(this,t),this.editor=e,this.currentUser=n,this.uploadQueue=i,this.settings=o,this.renderer=a,this.el=r,this.overlayPanel=s,this.imageValidator=l,this.sourceAreaControl=new x.NI,this.activeEditor="visual",this.showAdvancedControls=!1,this.basic=!1,this.minHeight=183,this.maxHeight=530,this.onChange=new c.vpe,this.onCtrlEnter=new c.vpe,this.onFileUpload=new c.vpe}return g(t,[{key:"ngAfterViewInit",value:function(){this.bootTextEditor()}},{key:"ngOnDestroy",value:function(){this.destroyEditor()}},{key:"reset",value:function(){this.editor.reset()}},{key:"focus",value:function(){this.editor.focus()}},{key:"hasUndo",value:function(){return this.editor.hasUndo()}},{key:"hasRedo",value:function(){return this.editor.hasRedo()}},{key:"queryCommandState",value:function(t){return this.editor.queryCommandState(t)}},{key:"execCommand",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.editor.execCommand(t,e)}},{key:"insertInfoContainer",value:function(t){this.insertContents('<div class="widget widget-'.concat(t,'"><div class="title">').concat((0,_.z)(t),":</div><br></div><br>"))}},{key:"showColorPicker",value:function(t,e){return(0,s.mG)(this,void 0,void 0,regeneratorRuntime.mark(function n(){var i,a,r=this;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,o.e(378).then(o.bind(o,49378));case 2:i=n.sent,a=i.BeColorPickerModule,this.overlayPanel.open(a.components.panel,{origin:new c.SBq(e),position:y.x}).valueChanged().pipe((0,k.b)(50)).subscribe(function(e){r.execCommand(t,e)});case 5:case"end":return n.stop()}},n,this)}))}},{key:"showVisualEditor",value:function(){this.editor.tinymceInstance.contentAreaContainer&&"visual"!==this.activeEditor&&(this.activeEditor="visual",this.renderer.setStyle(this.editor.tinymceInstance.contentAreaContainer,"display","block"),this.renderer.setStyle(this.sourceTextArea.nativeElement,"display","none"),this.editor.focus())}},{key:"showSourceEditor",value:function(){this.editor.tinymceInstance.contentAreaContainer&&"source"!==this.activeEditor&&(this.activeEditor="source",this.renderer.setStyle(this.sourceTextArea.nativeElement,"height",this.editor.tinymceInstance.contentAreaContainer.offsetHeight+"px"),this.renderer.setStyle(this.sourceTextArea.nativeElement,"display","block"),this.renderer.setStyle(this.editor.tinymceInstance.contentAreaContainer,"display","none"),this.sourceAreaControl.setValue(this.editor.getContents({source_view:!0})))}},{key:"openFileUploadDialog",value:function(){var t=this;(0,m.r)({multiple:!0}).then(function(e){t.onFileUpload.emit(e)})}},{key:"openInsertImageModal",value:function(){var t=this,e={uri:Z.C.Image,validator:this.imageValidator,httpParams:{diskPrefix:this.inlineUploadPrefix}};(0,m.r)({types:[b.j.image]}).then(function(n){t.uploadQueue.start(n,e).subscribe(function(e){t.insertImage(e.fileEntry.url)})})}},{key:"getContents",value:function(){return this.editor.getContents()}},{key:"setContents",value:function(t){this.editor.setContents(t)}},{key:"insertContents",value:function(t){this.editor.insertContents(t)}},{key:"insertImage",value:function(t){this.editor.insertImage(t)}},{key:"insertLink",value:function(t){this.insertContents('<a href="'.concat(t.href,'" target="').concat(t.target||"self",'">').concat(t.text,"</a>"))}},{key:"destroyEditor",value:function(){this.editor.destroyEditor()}},{key:"bootTextEditor",value:function(){this.editor.setConfig({textAreaEl:this.visualTextArea,editorEl:this.el,minHeight:this.minHeight,maxHeight:this.maxHeight,onChange:this.onChange,onCtrlEnter:this.onCtrlEnter,showAdvancedControls:this.showAdvancedControls})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.Y36(f),c.Y36(w.I),c.Y36(v.A),c.Y36(l.Z),c.Y36(c.Qsj),c.Y36(c.SBq),c.Y36(A.T),c.Y36(O))},t.\u0275cmp=c.Xpm({type:t,selectors:[["text-editor"]],viewQuery:function(t,e){var n;(1&t&&(c.Gf(E,7),c.Gf(L,7)),2&t)&&(c.iGM(n=c.CRH())&&(e.visualTextArea=n.first),c.iGM(n=c.CRH())&&(e.sourceTextArea=n.first))},inputs:{showAdvancedControls:"showAdvancedControls",basic:"basic",minHeight:"minHeight",maxHeight:"maxHeight",inlineUploadPrefix:"inlineUploadPrefix"},outputs:{onChange:"onChange",onCtrlEnter:"onCtrlEnter",onFileUpload:"onFileUpload"},features:[c._Bn([v.A,f])],ngContentSelectors:B,decls:41,vars:47,consts:[[1,"editor-header"],[1,"toolbar-row"],["class","header-actions",4,"ngIf"],[1,"header-actions"],["type","button",1,"no-style","editor-button",3,"matTooltip","click"],["svgIcon","undo"],["svgIcon","redo"],["svgIcon","format-bold"],["svgIcon","format-italic"],["svgIcon","format-underlined"],["svgIcon","format-list-bulleted"],["svgIcon","format-list-numbered"],[1,"header-actions","last"],["svgIcon","format-clear"],["class","toolbar-row",4,"ngIf"],["rows","8",1,"source-textarea",2,"display","none",3,"formControl","blur"],["sourceArea",""],["rows","8",1,"visual-textarea"],["visualArea",""],["svgIcon","attachment"],["svgIcon","code"],["svgIcon","link"],["type","button","class","no-style editor-button image-modal-button",3,"matTooltip","click",4,"ngIf"],["type","button",1,"no-style","editor-button","image-modal-button",3,"matTooltip","click"],["svgIcon","image"],["type","button",1,"no-style","editor-button","text-button","insert-button",3,"matMenuTriggerFor"],["trans",""],["svgIcon","arrow-drop-down",1,"caret"],["insertMenu",""],["mat-menu-item","",3,"click"],["svgIcon","remove"],["svgIcon","videocam"],["mat-menu-item","","trans","",3,"click"],["svgIcon","star"],["svgIcon","warning"],["svgIcon","note"],["type","button",1,"no-style","editor-button","text-button","format-button",3,"matMenuTriggerFor"],[1,"format-menu","menu-with-alt-text"],["formatMenu",""],["trans","",1,"text"],[1,"alt-text"],["type","button",1,"no-style","editor-button","text-button","color-button",3,"matMenuTriggerFor"],["colorPickerOrigin",""],[1,"color-dropdown"],["colorMenu",""],["mat-menu-item","",1,"text-color-item",3,"click"],["svgIcon","format-color-text"],["mat-menu-item","",1,"bg-color-item",3,"click"],["svgIcon","format-color-fill"],["svgIcon","format-align-left"],["svgIcon","format-align-center"],["svgIcon","format-align-right"],["svgIcon","format-indent-decrease"],["svgIcon","format-indent-increase"],[1,"header-actions","editor-toggle-buttons"],["type","button","trans","",1,"no-style","editor-button","visual-mode-button",3,"click"],["type","button","trans","",1,"no-style","editor-button","source-mode-button",3,"click"]],template:function(t,e){1&t&&(c.F$t($),c.TgZ(0,"div",0),c.TgZ(1,"div",1),c.YNc(2,D,4,3,"div",2),c.YNc(3,R,4,3,"div",2),c.TgZ(4,"div",3),c.TgZ(5,"button",4),c.NdJ("click",function(){return e.execCommand("undo")}),c.ALo(6,"trans"),c._UZ(7,"mat-icon",5),c.qZA(),c.TgZ(8,"button",4),c.NdJ("click",function(){return e.execCommand("redo")}),c.ALo(9,"trans"),c._UZ(10,"mat-icon",6),c.qZA(),c.qZA(),c.TgZ(11,"div",3),c.TgZ(12,"button",4),c.NdJ("click",function(){return e.execCommand("bold")}),c.ALo(13,"trans"),c._UZ(14,"mat-icon",7),c.qZA(),c.TgZ(15,"button",4),c.NdJ("click",function(){return e.execCommand("italic")}),c.ALo(16,"trans"),c._UZ(17,"mat-icon",8),c.qZA(),c.TgZ(18,"button",4),c.NdJ("click",function(){return e.execCommand("underline")}),c.ALo(19,"trans"),c._UZ(20,"mat-icon",9),c.qZA(),c.qZA(),c.TgZ(21,"div",3),c.TgZ(22,"button",4),c.NdJ("click",function(){return e.execCommand("insertunorderedlist")}),c.ALo(23,"trans"),c._UZ(24,"mat-icon",10),c.qZA(),c.TgZ(25,"button",4),c.NdJ("click",function(){return e.execCommand("insertorderedlist")}),c.ALo(26,"trans"),c._UZ(27,"mat-icon",11),c.qZA(),c.qZA(),c.YNc(28,F,5,6,"div",2),c.Hsn(29),c.TgZ(30,"div",12),c.TgZ(31,"button",4),c.NdJ("click",function(){return e.execCommand("removeformat")}),c.ALo(32,"trans"),c._UZ(33,"mat-icon",13),c.qZA(),c.qZA(),c.Hsn(34,1),c.qZA(),c.YNc(35,Q,117,28,"div",14),c.qZA(),c.TgZ(36,"textarea",15,16),c.NdJ("blur",function(){return e.setContents(e.sourceAreaControl.value)}),c.qZA(),c._UZ(38,"textarea",17,18),c.Hsn(40,2)),2&t&&(c.xp6(2),c.Q6J("ngIf",e.inlineUploadPrefix&&e.currentUser.hasPermission("files.create")&&e.onFileUpload.observers.length),c.xp6(1),c.Q6J("ngIf",!e.basic),c.xp6(2),c.ekj("disabled",!e.hasUndo()),c.Q6J("matTooltip",c.lcZ(6,31,"Undo")),c.xp6(3),c.ekj("disabled",!e.hasRedo()),c.Q6J("matTooltip",c.lcZ(9,33,"Redo")),c.xp6(4),c.ekj("active",e.queryCommandState("bold")),c.Q6J("matTooltip",c.lcZ(13,35,"Bold")),c.xp6(3),c.ekj("active",e.queryCommandState("italic")),c.Q6J("matTooltip",c.lcZ(16,37,"Italic")),c.xp6(3),c.ekj("active",e.queryCommandState("underline")),c.Q6J("matTooltip",c.lcZ(19,39,"Underline")),c.xp6(4),c.ekj("active",e.queryCommandState("unorderedlist")),c.Q6J("matTooltip",c.lcZ(23,41,"Unordered List")),c.xp6(3),c.ekj("active",e.queryCommandState("orderedlist")),c.Q6J("matTooltip",c.lcZ(26,43,"Ordered List")),c.xp6(3),c.Q6J("ngIf",!e.basic),c.xp6(3),c.Q6J("matTooltip",c.lcZ(32,45,"Remove Formatting")),c.xp6(4),c.Q6J("ngIf",e.showAdvancedControls),c.xp6(1),c.Udp("min-height",e.minHeight),c.Q6J("formControl",e.sourceAreaControl),c.xp6(2),c.Udp("min-height",e.minHeight))},directives:[U.O5,P.gM,M.Hw,x.Fj,x.JJ,x.oH,S.p6,N.P,S.VK,S.OP],pipes:[J.R],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;min-height:218px;max-height:600px;position:relative;border:1px solid var(--be-divider-default);border-radius:4px;overflow:hidden}[_nghost-%COMP%]     .editor-button{color:#788593;padding:7px;width:36px;height:36px}[_nghost-%COMP%]     .editor-button .mat-icon{height:22px;width:22px}[_nghost-%COMP%]     .editor-button .caret{display:inline-block;width:20px;height:20px;vertical-align:middle}[_nghost-%COMP%]     .editor-button.text-button{display:block;font-weight:300;font-size:1.5rem;width:auto}[_nghost-%COMP%]     .editor-button.disabled{opacity:.4}[_nghost-%COMP%]     .editor-button.active{background-color:rgba(0,0,0,.04)}[_nghost-%COMP%]     .editor-button.success{color:var(--be-accent-default)}[_nghost-%COMP%]     .editor-button:hover{background-color:rgba(0,0,0,.04)}[_nghost-%COMP%]     .editor-footer{position:relative;height:37px;flex-shrink:0;background-color:var(--be-background-alternative);border-top:1px solid var(--be-divider-default)}textarea[_ngcontent-%COMP%]{border:none;outline:none;resize:none;padding:15px}.editor-header[_ngcontent-%COMP%]{clear:both;flex:0 0 37px;background-color:var(--be-background-alternative)}.toolbar-row[_ngcontent-%COMP%]{display:flex;height:37px;border-bottom:1px solid var(--be-divider-default);overflow:hidden}  .header-actions{display:inline-block;border-right:1px solid var(--be-divider-default);height:100%;padding:0 4px}  .header-actions.right{margin-left:auto;margin-right:7px}  .header-actions.last{border-right:none}.editor-toggle-buttons[_ngcontent-%COMP%]{border-right:none;margin-left:auto;padding:0;display:flex}.editor-toggle-buttons[_ngcontent-%COMP%]   .editor-button[_ngcontent-%COMP%]{width:auto}@media only screen and (max-width:768px){.toolbar-row[_ngcontent-%COMP%]{overflow-x:auto}}"],changeDetection:0}),t}(),V=o(78512),z=o(43835),G=o(98720),j=o(40694),X=o(38053),W=o(63337),K=o(73234),tt=o(79572),et=o(84369),nt=o(42300),it=o(29738);function ot(t,e){if(1&t&&(c.TgZ(0,"div",19),c._uU(1),c.qZA()),2&t){var n=c.oxw().ngIf;c.xp6(1),c.Oqu(n.title)}}function at(t,e){if(1&t&&(c.TgZ(0,"div",19),c._uU(1),c.qZA()),2&t){var n=c.oxw(2).ngIf;c.xp6(1),c.Oqu(n.slug)}}function rt(t,e){if(1&t&&(c.TgZ(0,"div",20),c._UZ(1,"slug-control",21),c.YNc(2,at,2,1,"div",6),c.qZA()),2&t){var n=c.oxw().ngIf,i=c.oxw();c.xp6(1),c.Q6J("prefix",i.slugPrefix()),c.xp6(1),c.Q6J("ngIf",n.slug)}}function st(t,e){1&t&&(c.TgZ(0,"span",10),c._uU(1,"Update"),c.qZA())}function ct(t,e){1&t&&(c.TgZ(0,"span",10),c._uU(1,"Create"),c.qZA())}function lt(t,e){if(1&t&&(c.TgZ(0,"div",19),c._uU(1),c.qZA()),2&t){var n=c.oxw().ngIf;c.xp6(1),c.Oqu(n.body)}}function ut(t,e){if(1&t){var n=c.EpF();c.ynx(0,1),c.TgZ(1,"div",2),c.TgZ(2,"div",3),c.TgZ(3,"label",4),c._uU(4,"Page Title"),c.qZA(),c._UZ(5,"input",5),c.YNc(6,ot,2,1,"div",6),c.qZA(),c.YNc(7,rt,3,2,"div",7),c.TgZ(8,"div",8),c.TgZ(9,"mat-slide-toggle",9),c._uU(10,"Hide Navbar"),c.qZA(),c.TgZ(11,"p",10),c._uU(12,"Whether default site navbar should be hidden for this page."),c.qZA(),c.qZA(),c.qZA(),c.TgZ(13,"div",11),c.TgZ(14,"button",12),c.NdJ("click",function(){return c.CHM(n),c.oxw().crupdatePage()}),c.YNc(15,st,2,0,"span",13),c.YNc(16,ct,2,0,"span",13),c.qZA(),c.TgZ(17,"a",14),c._uU(18,"Cancel"),c.qZA(),c.qZA(),c.TgZ(19,"div",15),c.YNc(20,lt,2,1,"div",6),c.qZA(),c.TgZ(21,"div",16),c.TgZ(22,"text-editor",17),c.NdJ("onChange",function(t){return c.CHM(n),c.oxw().setBody(t)}),c.qZA(),c.qZA(),c._UZ(23,"loading-indicator",18),c.ALo(24,"async"),c.BQk()}if(2&t){var i=e.ngIf,o=c.oxw();c.Q6J("formGroup",o.form),c.xp6(6),c.Q6J("ngIf",i.title),c.xp6(1),c.Q6J("ngIf",!o.hideSlug),c.xp6(8),c.Q6J("ngIf",o.page),c.xp6(1),c.Q6J("ngIf",!o.page),c.xp6(1),c.Q6J("routerLink",o.backRoute()),c.xp6(3),c.Q6J("ngIf",i.body),c.xp6(2),c.Q6J("showAdvancedControls",!0),c.xp6(1),c.Q6J("isVisible",c.lcZ(24,9,o.loading$))}}var dt=function(){var t=function(){function t(e,n,i,o,a){d(this,t),this.pages=e,this.route=n,this.toast=i,this.router=o,this.fb=a,this.hideSlug=this.route.snapshot.data.hideSlug,this.endpoint=this.route.snapshot.data.endpoint,this.loading$=new V.X(!1),this.updating$=new V.X(!1),this.form=this.fb.group({title:[""],slug:[""],body:[""],type:[""],hide_nav:[!1]}),this.errors$=new V.X({})}return g(t,[{key:"ngOnInit",value:function(){var t,e=this;this.route.params.subscribe(function(t){e.getPage(t.id)}),this.route.snapshot.data.hideSlug||(t=this.form.get("title")).valueChanges.pipe((0,z.h)(function(t){return!!t}),(0,G.x)()).subscribe(function(e){t.parent.get("slug").dirty||t.parent.get("slug").setValue((0,j.V)(e))})}},{key:"crupdatePage",value:function(){var t=this;this.loading$.next(!0),(this.updating$.value?this.pages.update(this.page.id,this.getPayload(),this.endpoint):this.pages.create(this.getPayload(),this.endpoint)).pipe((0,a.x)(function(){return t.loading$.next(!1)})).subscribe(function(){t.router.navigate(t.backRoute(),{relativeTo:t.route}),t.toast.open(t.updating$.value?"Page updated":"Page created")},function(e){return t.errors$.next(e.errors)})}},{key:"getPage",value:function(t){var e=this;t&&(this.loading$.next(!0),this.pages.get(t).pipe((0,r.g)(0)).subscribe(function(t){e.updating$.next(!0),e.page=t.page,e.form.patchValue(t.page),e.textEditor.setContents(t.page.body||""),e.loading$.next(!1)}))}},{key:"getPayload",value:function(){return Object.assign({},this.form.value)}},{key:"setBody",value:function(t){this.form.patchValue({body:t})}},{key:"backRoute",value:function(){return this.page?["../../"]:["../"]}},{key:"slugPrefix",value:function(){return"pages/"+(this.page?this.page.id:"*")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.Y36(X.i),c.Y36(W.gz),c.Y36(K.F),c.Y36(W.F0),c.Y36(x.qu))},t.\u0275cmp=c.Xpm({type:t,selectors:[["crupdate-page"]],viewQuery:function(t,e){var n;(1&t&&c.Gf(H,5),2&t)&&(c.iGM(n=c.CRH())&&(e.textEditor=n.first))},decls:2,vars:3,consts:[[3,"formGroup",4,"ngIf"],[3,"formGroup"],[1,"many-inputs","input-header"],[1,"input-container"],["for","page-title","trans",""],["type","text","id","page-title","formControlName","title"],["class","error",4,"ngIf"],["class","input-container slug-input-container",4,"ngIf"],[1,"setting-toggle-container"],["id","crupdate_custom_page.hideNav","formControlName","hide_nav","trans",""],["trans",""],[1,"actions"],["mat-raised-button","","color","accent",3,"click"],["trans","",4,"ngIf"],["mat-button","","trans","",3,"routerLink"],[1,"errors"],[1,"editor-container"],["inlineUploadPrefix","page_media","minHeight","auto",1,"text-editor",3,"showAdvancedControls","onChange"],[1,"overlay",3,"isVisible"],[1,"error"],[1,"input-container","slug-input-container"],["formControlName","slug",3,"prefix"]],template:function(t,e){1&t&&(c.YNc(0,ut,25,11,"ng-container",0),c.ALo(1,"async")),2&t&&c.Q6J("ngIf",c.lcZ(1,1,e.errors$))},directives:[U.O5,x.JL,x.sg,N.P,x.Fj,x.JJ,x.u,tt.Rr,et.lW,et.zs,W.yS,H,nt.Q,it.b],pipes:[U.Ov],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:calc(100vh - 120px);overflow:hidden}.input-container[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{background-color:var(--be-background)}.actions[_ngcontent-%COMP%]{margin-bottom:25px;flex-shrink:0}.errors[_ngcontent-%COMP%]{color:#f44336;flex-shrink:0}.errors[_ngcontent-%COMP%]   .error[_ngcontent-%COMP%]{padding:5px 0}.editor-container[_ngcontent-%COMP%]{flex:1 1 auto}text-editor[_ngcontent-%COMP%]{max-height:none}"],changeDetection:0}),t}()},4954:function(t,e,n){"use strict";n.d(e,{I:function(){return r}});var i=n(59075),o=n(44415),a=n(45523),r=[new a.yH({description:"Date the page was last updated"}),new a.T7({description:"Date the page was created"}),new i.XQ({type:i.Bq.SelectModel,key:"user_id",label:"User",description:"User page was created by",component:o.y})]},47878:function(t,e,n){"use strict";n.d(e,{k:function(){return _}});var i=n(61116),o=n(51685),a=n(77307),r=n(84369),s=n(24311),c=n(68400),l=n(63337),u=n(50615),p=n(58666),g=n(31041),h=n(29828),f=n(90164),m=n(99808),v=n(79572),b=n(27701),y=n(35366),_=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=y.oAB({type:t}),t.\u0275inj=y.cJS({imports:[[i.ez,l.Bz,o.x,c.N,u.X,p.u,f.y,m.p,g.u5,g.UX,h.I,a.Ps,r.ot,s.AV,v.rP,b.Cv]]}),t}()},98034:function(t,e,n){"use strict";n.d(e,{c:function(){return D}});var i=n(38053),o=n(36024),a=n(56515),r=n(4954),s=n(35366),c=n(88195),l=n(28505),u=n(73234),p=n(63337),h=n(38116),f=n(34955),m=n(61116),v=n(13536),b=n(80922),y=n(86668),_=n(84369),x=n(77307),k=n(27701),Z=n(54275),w=n(71765),A=n(24311),C=n(47210),T=n(2406),q=n(40450);function I(t,e){1&t&&(s.TgZ(0,"a",17),s._UZ(1,"mat-icon",18),s.TgZ(2,"span",1),s._uU(3,"Add New Page"),s.qZA(),s.qZA())}function O(t,e){1&t&&s._UZ(0,"mat-progress-bar",19)}function U(t,e){1&t&&(s.TgZ(0,"th",20),s._uU(1,"Type"),s.qZA())}var P=function(t){return{count:t,resource:"page(s)"}};function M(t,e){if(1&t){var n=s.EpF();s.TgZ(0,"tr"),s.TgZ(1,"th",21),s.TgZ(2,"div",22),s._uU(3," :count :resource selected: "),s.qZA(),s.TgZ(4,"div",23),s.TgZ(5,"button",24),s.NdJ("click",function(){return s.CHM(n),s.oxw().maybeDeleteSelectedPages()}),s._uU(6," Delete "),s.qZA(),s.qZA(),s.qZA(),s.qZA()}if(2&t){var i=e.ngIf;s.xp6(2),s.Q6J("transValues",s.VKq(1,P,i))}}function S(t,e){if(1&t&&(s.TgZ(0,"td",37),s._uU(1),s.qZA()),2&t){var n=s.oxw().$implicit,i=s.oxw();s.xp6(1),s.hij(" ",n.type?i.viewName(n.type):"default"," ")}}var N=function(t){return[t,"edit"]};function J(t,e){if(1&t&&(s.TgZ(0,"a",38),s.ALo(1,"trans"),s._UZ(2,"mat-icon",39),s.qZA()),2&t){var n=s.oxw().$implicit;s.Q6J("routerLink",s.VKq(4,N,n.id))("matTooltip",s.lcZ(1,2,"Edit page"))}}function E(t,e){if(1&t){var n=s.EpF();s.TgZ(0,"tr"),s._UZ(1,"td",25),s.TgZ(2,"td",26),s.TgZ(3,"a",27),s._uU(4),s.qZA(),s.qZA(),s.TgZ(5,"td",28),s._UZ(6,"user-column",29),s.qZA(),s.TgZ(7,"td",30),s._uU(8),s.qZA(),s.YNc(9,S,2,1,"td",31),s.TgZ(10,"td",32),s._uU(11),s.ALo(12,"formattedDate"),s.qZA(),s.TgZ(13,"td",33),s.YNc(14,J,3,6,"a",34),s.TgZ(15,"button",35),s.NdJ("click",function(){var t=s.CHM(n).$implicit;return s.oxw().maybeDeleteSelectedPages([t.id])}),s._UZ(16,"mat-icon",36),s.qZA(),s.qZA(),s.qZA()}if(2&t){var i=e.$implicit,o=s.oxw();s.xp6(1),s.Q6J("table-body-checkbox",i.id),s.xp6(2),s.Q6J("href",o.getPageUrl(i),s.LSH),s.xp6(1),s.Oqu(i.slug),s.xp6(2),s.Q6J("user",i.user),s.xp6(2),s.Oqu(i.body),s.xp6(1),s.Q6J("ngIf",!o.endpoint),s.xp6(2),s.Oqu(s.lcZ(12,8,i.updated_at)),s.xp6(3),s.Q6J("ngIf",o.currentUser.hasPermission("custom_pages.update"))}}function L(t,e){1&t&&(s.TgZ(0,"no-results-message",40),s.TgZ(1,"span",41),s._uU(2,"No pages have been created yet"),s.qZA(),s.qZA())}var D=function(){var t=function(){function t(e,n,i,o,a,s,c){d(this,t),this.settings=e,this.datatable=n,this.currentUser=i,this.customPages=o,this.toast=a,this.router=s,this.route=c,this.endpoint=this.route.snapshot.data.endpoint,this.filters=r.I,this.pages$=this.datatable.data$}return g(t,[{key:"ngOnInit",value:function(){this.datatable.init({uri:this.endpoint||i.i.BASE_URI,staticParams:{with:["user"]}})}},{key:"maybeDeleteSelectedPages",value:function(t){var e=this;this.datatable.confirmResourceDeletion("tracking pixels").subscribe(function(){e.customPages.delete(t||e.datatable.selectedRows$.value).subscribe(function(){e.datatable.reset(),e.toast.open("Pages deleted")},function(t){e.toast.open(t.message||o.v.Default)})})}},{key:"showUserColumn",value:function(){return this.router.url.indexOf("admin")>-1}},{key:"getPageUrl",value:function(t){return this.settings.getBaseUrl()+"/pages/"+t.id+"/"+t.slug}},{key:"viewName",value:function(t){return t.replace(/_/g," ")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Y36(c.Z),s.Y36(a.x),s.Y36(l.I),s.Y36(i.i),s.Y36(u.F),s.Y36(p.F0),s.Y36(p.gz))},t.\u0275cmp=s.Xpm({type:t,selectors:[["custom-pages-index"]],features:[s._Bn([a.x])],decls:32,vars:13,consts:[[1,"datatable-page-header"],["trans",""],[1,"header"],["pluralName","pages",3,"filters"],[1,"action-buttons"],["mat-raised-button","","color","accent","routerLink","new","class","button-with-icon",4,"ngIf"],[1,"datatable","responsive-table"],["class","loading-bar","mode","indeterminate","color","accent",4,"ngIf"],[1,"material-table"],["table-header-checkbox",""],["table-sort-header","","trans",""],["table-sort-header","user_id","trans",""],["trans","",1,"body-column"],["class","type-column","table-sort-header","","trans","",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["svgImage","custom-page.svg",4,"ngIf"],["mat-raised-button","","color","accent","routerLink","new",1,"button-with-icon"],["svgIcon","add"],["mode","indeterminate","color","accent",1,"loading-bar"],["table-sort-header","","trans","",1,"type-column"],["colspan","7"],["trans","",1,"bulk-actions-title",3,"transValues"],[1,"bulk-actions"],["type","button","mat-raised-button","","color","warn","trans","",3,"click"],[3,"table-body-checkbox"],["data-label","Slug"],["target","_blank",3,"href"],["data-label","Owner"],[3,"user"],["data-label","Body",1,"body-column"],["data-label","Type","class","type-column",4,"ngIf"],["data-label","Last Updated"],[1,"edit-column"],["mat-icon-button","",3,"routerLink","matTooltip",4,"ngIf"],["type","button","mat-icon-button","","trans","",3,"click"],["svgIcon","delete"],["data-label","Type",1,"type-column"],["mat-icon-button","",3,"routerLink","matTooltip"],["svgIcon","edit"],["svgImage","custom-page.svg"],["primary-text","","trans",""]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"h1",1),s.TgZ(2,"span",1),s._uU(3,"Custom Pages"),s.qZA(),s.qZA(),s.TgZ(4,"div",2),s._UZ(5,"datatable-filters",3),s.TgZ(6,"div",4),s.YNc(7,I,4,0,"a",5),s.qZA(),s.qZA(),s.qZA(),s.TgZ(8,"div",6),s.YNc(9,O,1,0,"mat-progress-bar",7),s.ALo(10,"async"),s.TgZ(11,"table",8),s.TgZ(12,"thead"),s.TgZ(13,"tr"),s._UZ(14,"th",9),s.TgZ(15,"th",10),s._uU(16,"Slug"),s.qZA(),s.TgZ(17,"th",11),s._uU(18,"Owner"),s.qZA(),s.TgZ(19,"th",12),s._uU(20,"Body"),s.qZA(),s.YNc(21,U,2,0,"th",13),s.TgZ(22,"th",1),s._uU(23,"Last Updated"),s.qZA(),s._UZ(24,"th"),s.qZA(),s.YNc(25,M,7,3,"tr",14),s.qZA(),s.TgZ(26,"tbody"),s.YNc(27,E,17,10,"tr",15),s.ALo(28,"async"),s.qZA(),s.qZA(),s.YNc(29,L,3,0,"no-results-message",16),s.ALo(30,"async"),s._UZ(31,"datatable-footer"),s.qZA()),2&t&&(s.xp6(5),s.Q6J("filters",e.filters),s.xp6(2),s.Q6J("ngIf",e.currentUser.hasPermission("custom_pages.create")),s.xp6(2),s.Q6J("ngIf",s.lcZ(10,7,e.datatable.paginator&&e.datatable.paginator.loading$)),s.xp6(12),s.Q6J("ngIf",!e.endpoint),s.xp6(4),s.Q6J("ngIf",e.datatable.selectedRows$.value.length),s.xp6(2),s.Q6J("ngForOf",s.lcZ(28,9,e.pages$)),s.xp6(2),s.Q6J("ngIf",s.lcZ(30,11,e.datatable.paginator.noResults$)))},directives:[h.P,f.h,m.O5,v.e,b.p,m.sg,y.V,_.zs,p.yS,x.Hw,k.pW,_.lW,Z.O,w.r,A.gM,C.U],pipes:[m.Ov,T.l,q.R],styles:[".body-column[_ngcontent-%COMP%]{margin-right:25px;overflow:hidden}.type-column[_ngcontent-%COMP%]{text-transform:capitalize}"],changeDetection:0}),t}()},83693:function(t,e,n){"use strict";n.d(e,{o:function(){return i},P:function(){return o}});var i=function(t){return t.LINE="line",t.PIE="pie",t.BAR="bar",t}({}),o=function(){function t(e){var n=this;d(this,t),this.config=e,setTimeout(function(){return n.generate()})}return g(t,[{key:"getMaxValue",value:function(){return this.config.data?Array.isArray(this.config.data[0])?Math.max.apply(Math,c(this.config.data[0]).concat(c(this.config.data[1]||[]))):Math.max.apply(Math,c(this.config.data)):0}},{key:"generateDataWithTooltip",value:function(t){var e=this;return this.config.tooltip?t.map(function(t){return{value:t,meta:e.config.tooltip}}):t}},{key:"isEmpty",value:function(){return this.getMaxValue()<=0}}]),t}()},92007:function(t,n,o){"use strict";o.d(n,{x:function(){return T}});var a=o(83693),r=o(45059),s=o.n(r),c=o(88636),l=o.n(c),u=function(t){e(o,t);var n=i(o);function o(){var t;return d(this,o),(t=n.apply(this,arguments)).lineConfig={showArea:!0,lineSmooth:!0,low:0,fullWidth:!0,chartPadding:{left:15,right:30},axisY:{labelInterpolationFnc:function(t){return Math.floor(t)}},plugins:[l()()]},t}return g(o,[{key:"generate",value:function(){var t=Object.assign(Object.assign(Object.assign({},this.lineConfig),{high:this.getHigh()}),this.config.options||{});this.chart=new(s().Line)(this.config.selector,this.transformChartData(),t),this.chart.on("draw",function(t){"line"!==t.type&&"area"!==t.type||t.element.animate({d:{begin:t.index,dur:250,from:t.path.clone().scale(1,0).translate(0,t.chartRect.height()).stringify(),to:t.path.clone().stringify(),easing:s().Svg.Easing.easeOutQuint}})})}},{key:"transformChartData",value:function(){var t=this;return{labels:this.config.labels,series:this.config.data.map(function(e){return t.generateDataWithTooltip(e||[])})}}},{key:"getHigh",value:function(){return this.getMaxValue()?void 0:100}},{key:"destroy",value:function(){this.chart&&(this.chart.off("draw"),this.chart.detach())}}]),o}(a.P),p=function(t){e(o,t);var n=i(o);function o(){var t;return d(this,o),(t=n.apply(this,arguments)).pieConfig={showLabel:!1,chartPadding:0,plugins:[l()()]},t}return g(o,[{key:"generate",value:function(){var t=Object.assign(Object.assign({},this.pieConfig),this.config.options||{});this.chart=new(s().Pie)(this.config.selector,this.transformChartData(),t),this.animate()}},{key:"transformChartData",value:function(){return{labels:this.config.labels,series:this.generateDataWithTooltip(this.config.data)}}},{key:"destroy",value:function(){this.chart&&(this.chart.off("draw"),this.chart.detach())}},{key:"animate",value:function(){this.chart.on("draw",function(t){if("slice"===t.type){var e=t.element._node.getTotalLength();t.element.attr({"stroke-dasharray":e+"px "+e+"px"});var n={"stroke-dashoffset":{id:"anim"+t.index,dur:300*t.value/t.totalDataSum,from:-e+"px",to:"0px",fill:"freeze"}};if(0!==t.index&&(n["stroke-dashoffset"].begin="anim"+(t.index-1)+".end"),t.element.attr({"stroke-dashoffset":-e+"px"}),t.element.animate(n,!1),360===t.endAngle)for(var i=t.index,o=1e3*t.value/t.totalDataSum/2,a=0,r=-e/3,s=0;s<4;s++){t.element.animate({"stroke-dashoffset":{id:"anim"+(i+1),dur:o,from:a+"px",to:r+"px",fill:"freeze",begin:"anim"+i+".end"}},!1),i++,o/=1.75;var c=a;a=r,r=c/2.5}}})}}]),o}(a.P),h=function(t){e(o,t);var n=i(o);function o(){var t;return d(this,o),(t=n.apply(this,arguments)).barConfig={chartPadding:{left:15,right:30},plugins:[l()()]},t}return g(o,[{key:"generate",value:function(){var t=Object.assign(Object.assign(Object.assign({},this.barConfig),this.config.options||{}),{high:this.getHigh()});this.chart=new(s().Bar)(this.config.selector,this.transformChartData(),t),this.chart.on("draw",function(t){"bar"===t.type&&t.element.animate({y2:{dur:"0.2s",from:t.y1,to:t.y2}})})}},{key:"transformChartData",value:function(){var t=this;return{labels:this.config.labels,series:this.config.data.map(function(e){return t.generateDataWithTooltip(e||[])})}}},{key:"getHigh",value:function(){return this.getMaxValue()?void 0:100}},{key:"destroy",value:function(){this.chart&&(this.chart.off("draw"),this.chart.detach())}}]),o}(a.P),f=o(35366),m=o(61116),v=o(77307),b=o(38116),y=["headerWrapper"],_=["legendWrapper"],x=["chartPlaceholder"];function k(t,e){1&t&&(f.TgZ(0,"div",7),f._UZ(1,"mat-icon",8),f.TgZ(2,"span",9),f._uU(3,"No data available for this time period."),f.qZA(),f.qZA())}function Z(t,e){if(1&t&&(f.TgZ(0,"div",12),f._uU(1),f.qZA()),2&t){var n=e.$implicit;f.xp6(1),f.Oqu(n)}}function w(t,e){if(1&t&&(f.TgZ(0,"div",10),f.YNc(1,Z,2,1,"div",11),f.qZA()),2&t){var n=f.oxw();f.xp6(1),f.Q6J("ngForOf",n.chartConfig.labels)}}var A=[[["",8,"chart-header"]],[["",8,"chart-legend"]]],C=[".chart-header",".chart-legend"],T=function(){var t=function(){function t(e){d(this,t),this.el=e}return g(t,[{key:"ngOnInit",value:function(){this.calcAndSetChartHeight()}},{key:"ngOnChanges",value:function(){this.chartConfig&&(this.chart=this.chartConfig.type===a.o.LINE?new u(this.transformConfig()):this.chartConfig.type===a.o.BAR?new h(this.transformConfig()):new p(this.transformConfig()))}},{key:"ngOnDestroy",value:function(){this.chart&&this.chart.destroy()}},{key:"transformConfig",value:function(){return Object.assign(Object.assign({},this.chartConfig),{selector:this.chartPlaceholder.nativeElement})}},{key:"calcAndSetChartHeight",value:function(){var t=this.height;this.headerWrapper.nativeElement.children.length&&(t-=66),(this.chartConfig&&this.chartConfig.legend||this.legendWrapper.nativeElement.children.length)&&(t-=40),this.el.nativeElement.style.height=this.height+"px",this.chartPlaceholder.nativeElement.style.height=t-15+"px"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(f.Y36(f.SBq))},t.\u0275cmp=f.Xpm({type:t,selectors:[["chart"]],viewQuery:function(t,e){var n;(1&t&&(f.Gf(y,7),f.Gf(_,7),f.Gf(x,7)),2&t)&&(f.iGM(n=f.CRH())&&(e.headerWrapper=n.first),f.iGM(n=f.CRH())&&(e.legendWrapper=n.first),f.iGM(n=f.CRH())&&(e.chartPlaceholder=n.first))},hostAttrs:[1,"chart"],inputs:{chartConfig:"chartConfig",height:"height"},features:[f.TTD],ngContentSelectors:C,decls:10,vars:5,consts:[[1,"header-wrapper"],["headerWrapper",""],["chartPlaceholder",""],["class","empty-msg",4,"ngIf"],[1,"legend-wrapper"],["legendWrapper",""],["class","chart-legend",4,"ngIf"],[1,"empty-msg"],["svgIcon","warning"],["trans",""],[1,"chart-legend"],["class","legend-item",4,"ngFor","ngForOf"],[1,"legend-item"]],template:function(t,e){1&t&&(f.F$t(A),f.TgZ(0,"div",0,1),f.Hsn(2),f.qZA(),f.TgZ(3,"div",null,2),f.YNc(5,k,4,0,"div",3),f.qZA(),f.TgZ(6,"div",4,5),f.Hsn(8,1),f.YNc(9,w,2,1,"div",6),f.qZA()),2&t&&(f.xp6(3),f.Gre("ct-chart ct-perfect-fourth ",null==e.chartConfig?null:e.chartConfig.type,"-chart chart-body"),f.xp6(2),f.Q6J("ngIf",e.chart&&e.chart.isEmpty()),f.xp6(4),f.Q6J("ngIf",null==e.chartConfig?null:e.chartConfig.legend))},directives:[m.O5,v.Hw,b.P,m.sg],styles:['.chart{display:block;max-width:100%;overflow:hidden}@media only screen and (max-width:768px){.chart{width:100%;flex:0 0 100%}}.chart .chart-body{margin-top:15px;position:relative}.chart .chart-header{padding:15px;border-bottom:1px solid var(--be-divider-default);height:66px}.chart .chart-header .title{font-size:1.3rem;font-weight:500;color:var(--be-text)}.chart .chart-header .subtitle{font-size:1.2rem;color:var(--be-secondary-text)}.chart .chart-legend{display:flex;width:100%;height:40px;align-items:center;justify-content:center;flex-wrap:wrap;padding:0 15px;font-size:1.3rem}.chart .chart-legend .legend-item{margin-right:14px;position:relative;padding-left:15px;white-space:nowrap;text-transform:capitalize}.chart .chart-legend .legend-item:before{display:block;content:" ";width:12px;height:12px;position:absolute;top:0;left:0;bottom:0;right:0;margin:auto 0}.chart .empty-msg{padding:15px;border-radius:4px;background-color:var(--be-background-alternative);border:1px solid var(--be-divider-default);text-align:center;width:80%;height:50px;max-width:340px;position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;z-index:1}.chart .empty-msg .mat-icon{vertical-align:middle;margin-right:8px;color:var(--be-secondary-text);margin-top:-2px}.chart .ct-bar{stroke-width:30px}'],encapsulation:2,changeDetection:0}),t}()},20653:function(t,e,n){"use strict";n.d(e,{m:function(){return s}});var i=n(61116),o=n(68400),a=n(77307),r=n(35366),s=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=r.oAB({type:t}),t.\u0275inj=r.cJS({imports:[[i.ez,o.N,a.Ps]]}),t}()},29738:function(t,e,n){"use strict";n.d(e,{b:function(){return m}});var i=n(31041),o=n(78512),a=n(35366),r=n(88195),s=n(77307),c=n(61116),l=n(84369),u=n(38116);function p(t,e){if(1&t){var n=a.EpF();a.ynx(0),a.TgZ(1,"div",3),a._uU(2),a.qZA(),a.TgZ(3,"div",4),a._UZ(4,"input",5),a.qZA(),a.TgZ(5,"button",6),a.NdJ("click",function(){return a.CHM(n),a.oxw().save()}),a._uU(6," Save "),a.qZA(),a.BQk()}if(2&t){var i=a.oxw();a.xp6(2),a.Oqu(i.fullBaseUri+i.getPrefix()),a.xp6(2),a.Q6J("formControl",i.slugControl)}}function h(t,e){if(1&t&&(a.ynx(0),a.TgZ(1,"a",8),a._uU(2),a.qZA(),a.BQk()),2&t){var n=e.ngIf;a.xp6(1),a.Q6J("href",n,a.LSH)("title",n),a.xp6(1),a.Oqu(n)}}function f(t,e){if(1&t){var n=a.EpF();a.YNc(0,h,3,3,"ng-container",7),a.ALo(1,"async"),a.TgZ(2,"button",6),a.NdJ("click",function(){return a.CHM(n),a.oxw().startEditing()}),a._uU(3," Edit "),a.qZA()}if(2&t){var i=a.oxw();a.Q6J("ngIf",i.fullBaseUri+i.getPrefix()+a.lcZ(1,1,i.slug$))}}var m=function(){var t=function(){function t(e){d(this,t),this.settings=e,this.slug$=new o.X(""),this.editing$=new o.X(!1),this.slugControl=new i.NI,this.defaultBaseUri=this.settings.getBaseUrl()+"/",this.fullBaseUri=this.defaultBaseUri}return g(t,[{key:"baseUri",set:function(t){this.fullBaseUri=(t=t||this.defaultBaseUri).endsWith("/")?t:t+"/"}},{key:"writeValue",value:function(t){this.slug$.next(t),this.slugControl.setValue(t)}},{key:"registerOnChange",value:function(t){this.propagateChange=t}},{key:"registerOnTouched",value:function(){}},{key:"save",value:function(){this.slug$.next(this.slugControl.value),this.propagateChange(this.slug$.value),this.editing$.next(!1)}},{key:"startEditing",value:function(){this.editing$.next(!0)}},{key:"getPrefix",value:function(){return this.prefix?this.prefix+"/":""}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Y36(r.Z))},t.\u0275cmp=a.Xpm({type:t,selectors:[["slug-control"]],inputs:{prefix:"prefix",baseUri:"baseUri"},features:[a._Bn([{provide:i.JU,useExisting:t,multi:!0}])],decls:5,vars:4,consts:[["svgIcon","link",1,"link-icon"],[4,"ngIf","ngIfElse"],["editButton",""],[1,"nowrap"],[1,"input-container"],["type","text",3,"formControl"],["type","button","mat-flat-button","","color","gray","trans","",1,"action-button",3,"click"],[4,"ngIf"],["target","_blank",1,"nowrap",3,"href","title"]],template:function(t,e){if(1&t&&(a._UZ(0,"mat-icon",0),a.YNc(1,p,7,2,"ng-container",1),a.ALo(2,"async"),a.YNc(3,f,4,3,"ng-template",null,2,a.W1O)),2&t){var n=a.MAs(4);a.xp6(1),a.Q6J("ngIf",a.lcZ(2,2,e.editing$))("ngIfElse",n)}},directives:[s.Hw,c.O5,i.Fj,i.JJ,i.oH,l.lW,u.P],pipes:[c.Ov],styles:["[_nghost-%COMP%]{display:flex;align-items:center}.input-container[_ngcontent-%COMP%]{margin-left:3px;width:auto;max-width:160px}.input-container[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{height:25px;padding:6px}.link-icon[_ngcontent-%COMP%]{margin-right:5px;flex-shrink:0}.action-button[_ngcontent-%COMP%]{margin-left:20px;line-height:25px}.nowrap[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"],changeDetection:0}),t}()},29828:function(t,e,n){"use strict";n.d(e,{I:function(){return l}});var i=n(61116),o=n(31041),a=n(84369),r=n(77307),s=n(68400),c=n(35366),l=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=c.oAB({type:t}),t.\u0275inj=c.cJS({imports:[[i.ez,o.UX,a.ot,s.N,r.Ps]]}),t}()},6006:function(t,n,o){"use strict";o.d(n,{V:function(){return R}});var a=o(35366),r=o(31041),s=o(78512),c=o(66457),l=o(67139),u=o(35331),p=o(62147),h=o(97070),f=o(57125),m=o(340),v=o(68515),b=o(61116),y=o(91741),_=o(96673),x=o(48569),k={leading:!0,trailing:!1},Z=function(){function t(e,n,i,o){d(this,t),this.duration=e,this.scheduler=n,this.leading=i,this.trailing=o}return g(t,[{key:"call",value:function(t,e){return e.subscribe(new w(t,this.duration,this.scheduler,this.leading,this.trailing))}}]),t}(),w=function(t){e(o,t);var n=i(o);function o(t,e,i,a,r){var s;return d(this,o),(s=n.call(this,t)).duration=e,s.scheduler=i,s.leading=a,s.trailing=r,s._hasTrailingValue=!1,s._trailingValue=null,s}return g(o,[{key:"_next",value:function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(A,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))}},{key:"_complete",value:function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}},{key:"clearThrottle",value:function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)}}]),o}(_.L);function A(t){t.subscriber.clearThrottle()}var C=o(27701),T=function(){var t=function(){function t(e,n,i){var o=this;d(this,t),this.el=e,this.uploadQueue=n,this.cd=i,this.hidden=!0,this.subscription=this.uploadQueue.totalProgress().pipe(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x.P,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:k;return function(i){return i.lift(new Z(t,e,n.leading,n.trailing))}}(260,y.Z,{leading:!0,trailing:!0})).subscribe(function(t){o.progress=t,o.hidden=100===t||0===o.uploadQueue.count$.value.pending,o.cd.markForCheck()})}return g(t,[{key:"ngOnDestroy",value:function(){this.subscription.unsubscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Y36(a.SBq),a.Y36(c.A),a.Y36(a.sBO))},t.\u0275cmp=a.Xpm({type:t,selectors:[["upload-progress-bar"]],hostVars:2,hostBindings:function(t,e){2&t&&a.ekj("hidden",e.hidden)},decls:1,vars:1,consts:[["mode","determinate","color","accent",3,"value"]],template:function(t,e){1&t&&a._UZ(0,"mat-progress-bar",0),2&t&&a.Q6J("value",e.progress)},directives:[C.pW],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}),t}(),q=o(62181),I=o(84369),O=o(77307),U=function(){var t=function(){function t(e){d(this,t),this.el=e,this.config={},this.filesSelected=new a.vpe}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.el.nativeElement.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),(0,p.r)(t.config).then(function(e){e&&e.length&&t.filesSelected.emit(e)})})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Y36(a.SBq))},t.\u0275dir=a.lG2({type:t,selectors:[["","uploadButton",""]],inputs:{config:["uploadButton","config"]},outputs:{filesSelected:"filesSelected"}}),t}(),P=o(38116),M=o(40450);function S(t,e){1&t&&a._UZ(0,"image-or-icon",4),2&t&&a.Q6J("src",e.ngIf)}function N(t,e){if(1&t&&a._UZ(0,"image-or-icon",4),2&t){var n=a.oxw(2);a.Q6J("src",n.defaultBackground)}}function J(t,e){if(1&t&&a.YNc(0,N,1,1,"image-or-icon",5),2&t){var n=a.oxw();a.Q6J("ngIf",n.defaultBackground)}}function E(t,e){if(1&t){var n=a.EpF();a.ynx(0),a._UZ(1,"span",6),a.TgZ(2,"button",7),a.NdJ("click",function(){return a.CHM(n),a.oxw().openUploadDialog()}),a._UZ(3,"mat-icon",8),a.qZA(),a.TgZ(4,"mat-menu",null,9),a.TgZ(6,"button",10),a.NdJ("filesSelected",function(t){return a.CHM(n),a.oxw().uploadImage(t)}),a._uU(7),a.ALo(8,"trans"),a.qZA(),a.TgZ(9,"button",11),a.NdJ("click",function(){return a.CHM(n),a.oxw().deleteUpload()}),a._uU(10,"Remove"),a.qZA(),a.qZA(),a.BQk()}if(2&t){var i=a.MAs(5),o=a.oxw();a.xp6(1),a.Q6J("matMenuTriggerFor",i),a.xp6(5),a.Q6J("uploadButton",o.uploadInputConfig),a.xp6(1),a.Oqu(a.lcZ(8,3,o.buttonText))}}function L(t,e){if(1&t){var n=a.EpF();a.TgZ(0,"button",14),a.NdJ("click",function(){return a.CHM(n),a.oxw(2).deleteUpload()}),a._UZ(1,"mat-icon",15),a.qZA()}}function D(t,e){if(1&t){var n=a.EpF();a.ynx(0),a.TgZ(1,"button",12),a.NdJ("filesSelected",function(t){return a.CHM(n),a.oxw().uploadImage(t)}),a._uU(2),a.ALo(3,"trans"),a.qZA(),a.YNc(4,L,2,0,"button",13),a.ALo(5,"async"),a.BQk()}if(2&t){var i=a.oxw();a.xp6(1),a.Q6J("uploadButton",i.uploadInputConfig),a.xp6(1),a.Oqu(a.lcZ(3,3,i.buttonText)),a.xp6(2),a.Q6J("ngIf",a.lcZ(5,5,i.src$))}}var R=function(){var t=function(){function t(e,n,i,o){d(this,t),this.uploadQueue=e,this.imageValidator=n,this.uploadsApi=i,this.http=o,this.fileDeleted=new a.vpe,this.buttonText="Upload image",this.uploadConfig={},this.compact=!1,this.uploadInputConfig={multiple:!1,types:[l.j.image]},this.isDisabled$=new s.X(!1),this.src$=new s.X(null)}return g(t,[{key:"writeValue",value:function(t){this.src$.next(t)}},{key:"registerOnChange",value:function(t){this.propagateChange=t}},{key:"registerOnTouched",value:function(){}},{key:"setDisabledState",value:function(t){this.isDisabled$.next(t)}},{key:"uploadImage",value:function(t){var e=this,n=Object.assign(Object.assign({},this.defaultUploadConfig()),this.uploadConfig);this.uploadQueue.start(t,n).subscribe(function(t){e.src$.next(t.fileEntry.url),e.propagateChange(t.fileEntry.url)})}},{key:"deleteUpload",value:function(){var t=this,e={paths:[this.src$.value],deleteForever:!0};(this.uploadConfig&&this.uploadConfig.uri?this.http.delete(this.uploadConfig.uri,e):this.uploadsApi.delete(e)).subscribe(function(){t.src$.next(null),t.propagateChange(null),t.fileDeleted.emit()})}},{key:"defaultUploadConfig",value:function(){return{httpParams:{diskPrefix:this.diskPrefix||"common_media"},uri:u.C.Image,validator:this.imageValidator}}},{key:"openUploadDialog",value:function(){var t=this;this.src$.value?this.menuTrigger.toggleMenu():(0,p.r)(this.uploadInputConfig).then(function(e){t.uploadImage(e)})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Y36(c.A),a.Y36(f.G),a.Y36(m.f),a.Y36(v.r))},t.\u0275cmp=a.Xpm({type:t,selectors:[["upload-image-control"]],viewQuery:function(t,e){var n;(1&t&&a.Gf(h.p6,5),2&t)&&(a.iGM(n=a.CRH())&&(e.menuTrigger=n.first))},hostVars:2,hostBindings:function(t,e){2&t&&a.ekj("compact",e.compact)},inputs:{defaultBackground:"defaultBackground",buttonText:"buttonText",uploadConfig:"uploadConfig",diskPrefix:"diskPrefix",compact:"compact"},outputs:{fileDeleted:"fileDeleted"},features:[a._Bn([c.A,{provide:r.JU,useExisting:t,multi:!0}])],decls:10,vars:10,consts:[["class","inherit-size",3,"src",4,"ngIf","ngIfElse"],["defaultBg",""],[1,"action-buttons"],[4,"ngIf"],[1,"inherit-size",3,"src"],["class","inherit-size",3,"src",4,"ngIf"],[3,"matMenuTriggerFor"],["type","button","mat-icon-button","",1,"action-button",3,"click"],["svgIcon","add-photo-alternate"],["menu","matMenu"],["type","button","mat-menu-item","",3,"uploadButton","filesSelected"],["type","button","mat-menu-item","","trans","",3,"click"],["type","button","mat-stroked-button","","color","accent",1,"action-button",3,"uploadButton","filesSelected"],["type","button","class","action-button delete-button","mat-icon-button","",3,"click",4,"ngIf"],["type","button","mat-icon-button","",1,"action-button","delete-button",3,"click"],["svgIcon","delete"]],template:function(t,e){if(1&t&&(a.YNc(0,S,1,1,"image-or-icon",0),a.ALo(1,"async"),a.YNc(2,J,1,1,"ng-template",null,1,a.W1O),a.TgZ(4,"div",2),a.YNc(5,E,11,5,"ng-container",3),a.ALo(6,"async"),a.YNc(7,D,6,7,"ng-container",3),a.ALo(8,"async"),a.qZA(),a._UZ(9,"upload-progress-bar")),2&t){var n=a.MAs(3);a.Q6J("ngIf",a.lcZ(1,4,e.src$))("ngIfElse",n),a.xp6(5),a.Q6J("ngIf",e.compact&&!a.lcZ(6,6,e.isDisabled$)),a.xp6(2),a.Q6J("ngIf",!e.compact&&!a.lcZ(8,8,e.isDisabled$))}},directives:[b.O5,T,q.A,h.p6,I.lW,O.Hw,h.VK,h.OP,U,P.P],pipes:[b.Ov,M.R],styles:["[_nghost-%COMP%]{display:block;width:220px;height:220px;flex-shrink:0;border-radius:4px;overflow:hidden;background:linear-gradient(135deg,#70929c,#846170);position:relative}.inherit-size[_nghost-%COMP%], .inherit-size   [_nghost-%COMP%]{width:100%;height:100%}.compact[_nghost-%COMP%]   .action-buttons[_ngcontent-%COMP%], .compact   [_nghost-%COMP%]   .action-buttons[_ngcontent-%COMP%]{bottom:0;top:0}.action-buttons[_ngcontent-%COMP%]{position:absolute;bottom:25px;left:0;right:0;margin:auto;text-align:center;height:34px}.action-button[_ngcontent-%COMP%]{color:rgba(0,0,0,.87);border-color:rgba(0,0,0,.1);background:hsla(0,0%,100%,.8)}.mat-icon-button[_ngcontent-%COMP%]{border-radius:4px;line-height:34px;height:34px;width:34px}.delete-button[_ngcontent-%COMP%]{margin-left:5px}upload-progress-bar[_ngcontent-%COMP%]{width:100%;position:absolute;left:0;bottom:0}"]}),t}()},90723:function(t,e,n){"use strict";n.d(e,{a:function(){return g}});var i=n(61116),o=n(84369),a=n(77307),r=n(27701),s=n(35366),c=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=s.oAB({type:t}),t.\u0275inj=s.cJS({imports:[[i.ez,o.ot,r.Cv,a.Ps]]}),t}(),l=n(45052),u=n(68400),p=n(97070),g=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=s.oAB({type:t}),t.\u0275inj=s.cJS({imports:[[i.ez,c,l.T,u.N,r.Cv,a.Ps,o.ot,p.Tx]]}),t}()},14926:function(t,e,n){"use strict";n.d(e,{_:function(){return b}});var i=n(78512),o=n(55959),a=n(25416),r=n(84698),s=n(90611),c=n(43835),l=n(63337),u=n(35366),p=n(71294),h=n(36402),f=n(88195),m=n(61116),v=["*"],b=function(){var t=function(){function t(e,n,a,r,s){d(this,t),this.breakpoints=e,this.localStorage=n,this.settings=a,this.el=r,this.router=s,this.navIsOpen$=new i.X(!1),this.isCompact$=new i.X(!1),this.onDestroy$=new o.xQ}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.navIsOpen$.next(!this.breakpoints.isMobile$.value),this.isCompact$.pipe((0,a.R)(this.onDestroy$)).subscribe(function(e){e?t.el.nativeElement.style.setProperty("--nav-width","80px"):t.el.nativeElement.style.removeProperty("--nav-width")}),this.navIsOpen$.pipe((0,r.T)(1),(0,s.q)(1)).subscribe(function(){t.el.nativeElement.classList.add("enable-transitions")}),this.navIsOpen$.pipe((0,a.R)(this.onDestroy$)).subscribe(function(e){e?t.el.nativeElement.classList.remove("nav-closed"):t.el.nativeElement.classList.add("nav-closed")}),this.router.events.pipe((0,c.h)(function(t){return t instanceof l.m2}),(0,a.R)(this.onDestroy$)).subscribe(function(){t.navIsOpen$.next(!t.breakpoints.isMobile$.value)})}},{key:"ngOnDestroy",value:function(){this.onDestroy$.next()}},{key:"toggleSidebarMode",value:function(){this.breakpoints.isMobile$.value?this.navIsOpen$.next(!this.navIsOpen$.value):(this.isCompact$.next(!this.isCompact$.value),this.localStorage.set(this.storageSelector(),this.isCompact$.value))}},{key:"storageSelector",value:function(){return"".concat(this.settings.get("branding.site_name"),".sidebarCompact")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(u.Y36(p.S),u.Y36(h.m),u.Y36(f.Z),u.Y36(u.SBq),u.Y36(l.F0))},t.\u0275cmp=u.Xpm({type:t,selectors:[["sidenav"]],ngContentSelectors:v,decls:3,vars:4,consts:[[1,"backdrop",3,"click"]],template:function(t,e){1&t&&(u.F$t(),u.Hsn(0),u.TgZ(1,"div",0),u.NdJ("click",function(){return e.navIsOpen$.next(!1)}),u.ALo(2,"async"),u.qZA()),2&t&&(u.xp6(1),u.ekj("visible",u.lcZ(2,2,e.navIsOpen$)))},pipes:[m.Ov],styles:["[_nghost-%COMP%]{display:flex;padding-top:var(--top-offset);--nav-width:225px;--top-offset:70px}.no-navbar[_nghost-%COMP%]{--top-offset:0px}.nav-closed[_nghost-%COMP%]     nav{transform:translate3d(-100%,0,0);box-shadow:none}.enable-transitions[_nghost-%COMP%]     nav{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:transform}[_nghost-%COMP%]     nav{width:var(--nav-width);overflow:auto;padding:26px 8px 16px;border-right:1px solid var(--be-divider-default);display:flex;flex-direction:column;position:fixed;top:var(--top-offset);bottom:0;z-index:4;background-color:var(--be-background)}@media only screen and (max-width:768px){[_nghost-%COMP%]     nav{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}}[_nghost-%COMP%]   .backdrop[_ngcontent-%COMP%]{display:block;top:0;left:0;right:0;bottom:0;position:absolute;z-index:1;transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:background-color,visibility;visibility:hidden}[_nghost-%COMP%]   .backdrop.visible[_ngcontent-%COMP%]{visibility:visible;background-color:var(--be-backdrop);opacity:.6}@media only screen and (min-width:768px){[_nghost-%COMP%]   .backdrop[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%]     main{min-width:0;flex:1 1 auto;background-color:var(--be-background-alternative);min-height:calc(100vh - 0px);min-height:calc(100vh - var(--top-offset, 0px));display:flex;flex-direction:column}@media only screen and (min-width:768px){[_nghost-%COMP%]     main{margin-left:var(--nav-width)}}"],changeDetection:0}),t}()},85786:function(t,e,n){"use strict";n.d(e,{c:function(){return a}});var i=n(61116),o=n(35366),a=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[[i.ez]]}),t}()},90164:function(t,e,n){"use strict";n.d(e,{y:function(){return f}});var i=n(61116),o=n(31041),a=n(84369),r=n(40994),s=n(92935),c=n(97070),l=n(63589),u=n(24311),p=n(77307),g=n(68400),h=n(35366),f=function(){var t=function t(){d(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=h.oAB({type:t}),t.\u0275inj=h.cJS({imports:[[i.ez,o.u5,o.UX,g.N,a.ot,l.ZX,r.p9,u.AV,s.Is,c.Tx,p.Ps]]}),t}()},35331:function(t,e,n){"use strict";n.d(e,{C:function(){return i}});var i=function(t){return t.Image="uploads/images",t}({})},66457:function(t,n,o){"use strict";o.d(n,{A:function(){return S}});var a=o(55959),r=o(78512),s=o(66994),c=o(24831),l=function(){function t(e,n){d(this,t),this.canceled$=new a.xQ,this.processing$=new r.X(!1),this.uploadedResponse$=new s.t(1),this.progress$=new r.X({percentage:0}),this.error$=new r.X(null),this.customData={},this.uploadedFile=e,this.id=n||(0,c.O)()}return g(t,[{key:"completed",get:function(){return!this.processing$.value&&100===this.progress$.value.percentage}},{key:"inProgress",get:function(){return!this.error$.value&&!this.completed}},{key:"cancel",value:function(){this.canceled$.next(!0),this.finalize()}},{key:"complete",value:function(){this.setProgress({percentage:100,eta:null}),this.finalize()}},{key:"finalize",value:function(){this.uploadedResponse$.complete(),this.canceled$.complete(),this.progress$.complete()}},{key:"finishProcessing",value:function(){this.processing$.next(!1),this.processing$.complete()}},{key:"addError",value:function(t){this.error$.next(t)}},{key:"setProgress",value:function(t){this.progress$.next(Object.assign(Object.assign({},this.progress$.value),t))}}]),t}(),u=o(19764),p=o(31225),h=o(34056),f=o(73982),m=o(47727),v=o(25416),b=o(79996),y=o(43835),_=o(91772),x=o(36024),k=o(35366),Z=o(340),w=o(16930),A=o(20274),C=o(16890),T=function(t){e(o,t);var n=i(o);function o(t,e){var i;return d(this,o),(i=n.call(this)).params=t,i.i18n=e,i.errorMessage=i.i18n.t("Only these file types are allowed: :extensions",{extensions:i.params.extensions.join(", ")}),i}return g(o,[{key:"fails",value:function(t){return!this.params.extensions.some(function(e){return e.toLowerCase()===t.extension.toLowerCase()})}}]),o}(C.y),q=function(t){e(o,t);var n=i(o);function o(t,e){var i;return d(this,o),(i=n.call(this)).params=t,i.i18n=e,i.errorMessage=i.i18n.t("These file types are not allowed: :extensions",{extensions:i.params.extensions.join(", ")}),i}return g(o,[{key:"fails",value:function(t){return this.params.extensions.some(function(e){return e===t.extension})}}]),o}(C.y),I=o(94380),O=function(){var t,n=function(t){e(o,t);var n=i(o);function o(){var t;return d(this,o),(t=n.apply(this,arguments)).DEFAULT_MAX_FILE_SIZE_MB=8,t.showToast=!0,t}return g(o,[{key:"initValidations",value:function(){this.validations.push(new A.p({maxSize:this.getMaxFileSize()},this.i18n));var t=this.getAllowedExtensions(),e=this.getBlockedExtensions();t&&t.length&&this.validations.push(new T({extensions:t},this.i18n)),e&&e.length&&this.validations.push(new q({extensions:e},this.i18n))}},{key:"getMaxFileSize",value:function(){return this.settings.get("uploads.max_size",(0,I.F)(this.DEFAULT_MAX_FILE_SIZE_MB,"MB"))}},{key:"getAllowedExtensions",value:function(){return this.settings.getJson("uploads.allowed_extensions")}},{key:"getBlockedExtensions",value:function(){return this.settings.getJson("uploads.blocked_extensions")}}]),o}(w.c);return n.\u0275fac=function(e){return(t||(t=k.n5z(n)))(e||n)},n.\u0275prov=k.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n}(),U=o(73234),P=o(28505),M=o(88195),S=function(){var t=function(){function t(e,n,i,o,c){d(this,t),this.api=e,this.defaultValidator=n,this.toast=i,this.currentUser=o,this.settings=c,this.uploads$=new r.X([]),this.totalProgress$=new s.t(1),this.uploadsAdded$=new a.xQ,this.count$=new r.X({pending:0,completed:0})}return g(t,[{key:"isEmpty",value:function(){return!this.uploads$.value.length}},{key:"getAllCompleted",value:function(){return this.uploads$.value.filter(function(t){return t.completed}).map(function(t){return t.fileEntry})}},{key:"updateTotalProgress",value:function(){var t=this.uploads$.value.map(function(t){return t.progress$.value.percentage||0});this.totalProgress$.next(t.reduce(function(t,e){return t+e},0)/t.length)}},{key:"totalProgress",value:function(){return this.totalProgress$.asObservable()}},{key:"start",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.validator||this.defaultValidator,o=[];if(Array.isArray(t))o=this.transformUploads(t,i),this.uploads$.next(this.uploads$.value.concat(o)),this.uploadsAdded$.next(o);else{var a=this.uploads$.value.map(function(n){if(t[n.id]){var a=e.transformUploads([t[n.id]],i,n.id)[0];return o.push(a),a}return n});this.uploads$.next(a)}return this.updateCount(),(0,u.D)(o.filter(function(t){return!t.error$.value})).pipe((0,f.zg)(function(t){return e.api.upload(t.uploadedFile,n).pipe((0,m.K)(function(o){return e.handleUploadFailure(o,t,i),n.bubbleError?(0,p._)(o):h.E}),(0,v.R)(t.canceled$),(0,b.U)(function(i){return e.handleUploadEvent(i,t,n.willProcessFiles),i.name===_.b.COMPLETED&&(i.body.queueItemId=t.id),i}))},1),(0,y.h)(function(t){return t.name===_.b.COMPLETED}),(0,b.U)(function(t){return t.body}))}},{key:"updateProgress",value:function(t,e){var n=this.find(t);n&&(n.setProgress({eta:e.eta,speed:e.speed,percentage:e.progress,totalBytes:e.totalBytes,completedBytes:e.completedBytes}),this.updateTotalProgress())}},{key:"completeUpload",value:function(t,e){var n=this.find(t);n&&(n.uploadedResponse$.next(e),n.fileEntry=e.fileEntry,n.complete(),this.updateTotalProgress())}},{key:"errorUpload",value:function(t,e){this.find(t).addError(e)}},{key:"reset",value:function(){this.uploads$.value.forEach(function(t){return t.cancel()}),this.uploads$.next([])}},{key:"remove",value:function(t){var e=this.uploads$.value.findIndex(function(e){return e.id===t}),n=this.uploads$.value[e];n.completed?n.finalize():n.cancel(),this.uploads$.value.splice(e,1),this.uploads$.next(this.uploads$.value)}},{key:"find",value:function(t){return this.uploads$.value.find(function(e){return e.id===t})}},{key:"transformUploads",value:function(t,e,n){return t.map(function(t){var i=new l(t,n);if(e){var o=e.validate(t);o.failed&&i.addError(o.errorMessage)}return i})}},{key:"handleUploadEvent",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.name===_.b.PROGRESS?(100===t.progress&&(t=Object.assign(Object.assign({},t),{progress:99}),n&&e.processing$.next(!0)),this.updateProgress(e.id,t)):t.name===_.b.COMPLETED&&(this.completeUpload(e.id,t.body),this.updateCount())}},{key:"handleUploadFailure",value:function(t,e,n){var i,o=null===(i=null==t?void 0:t.errors)||void 0===i?void 0:i.file,a=null;o||(o=x.v.DefaultUpload,a=this.currentUser.isAdmin()&&!this.settings.get("site.hide_docs_buttons")),this.errorUpload(e.id,o),this.updateCount(),this.updateTotalProgress(),n.showToast&&this.toast.open(o,{action:a?"Learn More":null}).onAction().subscribe(function(){window.open(x.h)})}},{key:"updateCount",value:function(){var t=this.uploads$.value.filter(function(t){return t.inProgress}).length;this.count$.next({pending:t,completed:this.uploads$.value.length-t})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(k.LFG(Z.f),k.LFG(O),k.LFG(U.F),k.LFG(P.I),k.LFG(M.Z))},t.\u0275prov=k.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},12440:function(t,e,n){"use strict";n.d(e,{Z:function(){return _}});var i=n(78512),o=n(31041),a=n(92935),r=n(11520),s=n(35366),c=n(95157),l=n(73234),u=n(61116),p=n(77307),h=n(38116),f=n(84369);function m(t,e){1&t&&(s.TgZ(0,"span",6),s._uU(1,"Create Workspace"),s.qZA())}function v(t,e){1&t&&(s.TgZ(0,"span",6),s._uU(1,"Update Workspace"),s.qZA())}function b(t,e){if(1&t&&(s.TgZ(0,"div",15),s._uU(1),s.qZA()),2&t){var n=s.oxw().ngIf;s.xp6(1),s.Oqu(n.name)}}function y(t,e){if(1&t){var n=s.EpF();s.TgZ(0,"form",7),s.NdJ("ngSubmit",function(){return s.CHM(n),s.oxw().confirm()}),s.TgZ(1,"mat-dialog-content",8),s.TgZ(2,"div",9),s.TgZ(3,"label",10),s._uU(4,"Name"),s.qZA(),s._UZ(5,"input",11),s.YNc(6,b,2,1,"div",12),s.qZA(),s.qZA(),s.TgZ(7,"mat-dialog-actions"),s.TgZ(8,"button",13),s.NdJ("click",function(){return s.CHM(n),s.oxw().close()}),s._uU(9,"Cancel"),s.qZA(),s.TgZ(10,"button",14),s.ALo(11,"async"),s._uU(12),s.qZA(),s.qZA(),s.qZA()}if(2&t){var i=e.ngIf,o=s.oxw();s.Q6J("formGroup",o.form),s.xp6(6),s.Q6J("ngIf",i.name),s.xp6(4),s.Q6J("disabled",s.lcZ(11,4,o.loading$)),s.xp6(2),s.Oqu(o.data.workspace?"Update":"Create")}}var _=function(){var t=function(){function t(e,n,a,r){d(this,t),this.dialogRef=e,this.data=n,this.workspaces=a,this.toast=r,this.loading$=new i.X(!1),this.errors$=new i.X({}),this.form=new o.cw({name:new o.NI}),n.workspace&&this.form.patchValue(n.workspace)}return g(t,[{key:"confirm",value:function(){var t=this;this.loading$.next(!0),(this.data.workspace?this.workspaces.update(this.data.workspace.id,this.form.value):this.workspaces.create(this.form.value)).pipe((0,r.x)(function(){return t.loading$.next(!1)})).subscribe(function(e){t.toast.open(t.data.workspace?"Workspace updated.":"Workspace created."),t.close(e.workspace)},function(e){return t.errors$.next(e.errors)})}},{key:"close",value:function(t){this.dialogRef.close(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(s.Y36(a.so),s.Y36(a.WI),s.Y36(c.b),s.Y36(l.F))},t.\u0275cmp=s.Xpm({type:t,selectors:[["crupdate-workspace-modal"]],decls:8,vars:5,consts:[[1,"modal-header"],["mat-dialog-title",""],["trans","",4,"ngIf"],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"formGroup","ngSubmit",4,"ngIf"],["trans",""],["ngNativeValidate","",3,"formGroup","ngSubmit"],[1,"many-inputs"],[1,"input-container","name-container"],["for","crupdate-workspace-name","trans",""],["type","text","id","crupdate-workspace-name","formControlName","name","required","","minlength","3"],["class","error",4,"ngIf"],["type","button","mat-button","","trans","",3,"click"],["type","submit","mat-raised-button","","color","accent","trans","",3,"disabled"],[1,"error"]],template:function(t,e){1&t&&(s.TgZ(0,"div",0),s.TgZ(1,"h2",1),s.YNc(2,m,2,0,"span",2),s.YNc(3,v,2,0,"span",2),s.qZA(),s.TgZ(4,"button",3),s.NdJ("click",function(){return e.close()}),s._UZ(5,"mat-icon",4),s.qZA(),s.qZA(),s.YNc(6,y,13,6,"form",5),s.ALo(7,"async")),2&t&&(s.xp6(2),s.Q6J("ngIf",!e.data.workspace),s.xp6(1),s.Q6J("ngIf",e.data.workspace),s.xp6(3),s.Q6J("ngIf",s.lcZ(7,3,e.errors$)))},directives:[a.uh,u.O5,p.Hw,h.P,o.JL,o.sg,a.xY,o.Fj,o.JJ,o.u,o.Q7,o.wO,a.H8,f.lW],pipes:[u.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}"],changeDetection:0}),t}()},75183:function(t,e,n){"use strict";n.d(e,{W:function(){return i}});var i={title:"Leave Workspace",body:"Are you sure you want to leave this workspace?",bodyBold:"All resources you've created in the workspace will be transferred to workspace owner.",ok:"Leave"}},77044:function(t,e,n){"use strict";n.d(e,{t:function(){return B}});var i=n(78512),o=n(31041),a=n(92935),r=n(11520),s=function(t){return t.LEFT_WORKSPACE="You have left the workspace.",t.MEMBER_DELETED="Member Deleted.",t.INVITES_SENT="Invites Sent.",t.INVITE_RESENT="Resent invite.",t.ROLE_ASSIGNED="Role Assigned.",t}({}),l=n(4694),u=n(75183),p=n(26437),h=n(35366),f=n(95157),m=n(73234),v=n(25051),b=n(28505),y=n(24859),_=n(38116),x=n(77307),k=n(61116),Z=n(97070),w=n(77910),A=n(84369),C=n(27701),T=n(88798),q=n(24311),I=n(40450);function O(t,e){1&t&&h._UZ(0,"mat-progress-bar",23)}function U(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"div",16),h.TgZ(1,"div",17),h.TgZ(2,"label",18),h._uU(3,"Invite by email"),h.qZA(),h.TgZ(4,"div",19),h._UZ(5,"chip-input",20),h.TgZ(6,"button",21),h.NdJ("click",function(){return h.CHM(n),h.oxw().invitePeople()}),h.ALo(7,"async"),h.ALo(8,"async"),h._uU(9,"Invite "),h.qZA(),h.qZA(),h.qZA(),h.YNc(10,O,1,0,"mat-progress-bar",22),h.ALo(11,"async"),h.qZA()}if(2&t){var i,o=h.oxw();h.Q6J("@fadeIn",void 0),h.xp6(5),h.Q6J("emailsInput",!0)("formControl",o.peopleToInvite),h.xp6(1),h.Q6J("disabled",h.lcZ(7,5,o.inviting$)||!(null!=(i=h.lcZ(8,7,o.peopleToInvite.valueChanges))&&i.length)),h.xp6(4),h.Q6J("ngIf",h.lcZ(11,9,o.inviting$))}}function P(t,e){1&t&&(h.TgZ(0,"li",24),h._UZ(1,"skeleton",25),h.TgZ(2,"div",26),h._UZ(3,"skeleton"),h._UZ(4,"skeleton"),h.qZA(),h.qZA())}var M=function(){return[1,2,3]};function S(t,e){1&t&&(h.TgZ(0,"ul",12),h.YNc(1,P,5,0,"li",13),h.qZA()),2&t&&(h.Q6J("@fadeOut",void 0),h.xp6(1),h.Q6J("ngForOf",h.DdM(2,M)))}function N(t,e){1&t&&(h.TgZ(0,"span",38),h._uU(1,"(You)"),h.qZA())}function J(t,e){if(1&t){var n=h.EpF();h.ynx(0),h._uU(1," \xb7 "),h.TgZ(2,"button",39),h.NdJ("click",function(){h.CHM(n);var t=h.oxw(2).$implicit;return h.oxw().maybeResendInvite(t)}),h.ALo(3,"async"),h._uU(4,"Resend Invite"),h.qZA(),h.BQk()}if(2&t){var i=h.oxw(3);h.xp6(2),h.Q6J("disabled",h.lcZ(3,1,i.inviting$))}}function E(t,e){if(1&t&&(h.TgZ(0,"span"),h._uU(1," \xb7 "),h.TgZ(2,"span",34),h._uU(3,"Invited"),h.qZA(),h.YNc(4,J,5,3,"ng-container",30),h.qZA()),2&t){var n=h.oxw(2);h.xp6(4),h.Q6J("ngIf",n.canInvite)}}function L(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"button",40),h.NdJ("click",function(){h.CHM(n);var t=h.oxw().$implicit;return h.oxw().maybeDeleteMember(t)}),h.ALo(1,"async"),h._UZ(2,"mat-icon",3),h.qZA()}if(2&t){var i=h.oxw().$implicit,o=h.oxw();h.ekj("visually-hidden",i.is_owner||!o.canDelete),h.Q6J("disabled",h.lcZ(1,3,o.deleting$))}}function D(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"button",41),h.NdJ("click",function(){h.CHM(n);var t=h.oxw().$implicit;return h.oxw().maybeLeaveWorkspace(t)}),h.ALo(1,"trans"),h.ALo(2,"async"),h._UZ(3,"mat-icon",42),h.qZA()}if(2&t){var i=h.oxw(2);h.Q6J("matTooltip",h.lcZ(1,2,"Leave workspace"))("disabled",h.lcZ(2,4,i.deleting$))}}var R=function(t){return{member:t}};function Y(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"li",24),h.NdJ("@fadeIn.done",function(){return h.CHM(n),h.oxw(),h.MAs(6).style.overflow="auto"}),h._UZ(1,"img",27),h.TgZ(2,"div",26),h.TgZ(3,"div",28),h.TgZ(4,"span"),h._uU(5),h.qZA(),h._uU(6," "),h.YNc(7,N,2,0,"span",29),h.YNc(8,E,5,1,"span",30),h.qZA(),h.TgZ(9,"div",31),h._uU(10),h.qZA(),h.qZA(),h.TgZ(11,"div",32),h.TgZ(12,"button",33),h.TgZ(13,"span",34),h._uU(14),h.qZA(),h._UZ(15,"mat-icon",35),h.qZA(),h.YNc(16,L,3,5,"button",36),h.YNc(17,D,4,6,"button",37),h.qZA(),h.qZA()}if(2&t){var i=e.$implicit,o=h.oxw(),a=h.MAs(19);h.Q6J("@fadeIn",void 0),h.xp6(1),h.Q6J("src",i.avatar,h.LSH),h.xp6(4),h.Oqu(i.display_name),h.xp6(2),h.Q6J("ngIf",o.currentUser.get("id")===i.id),h.xp6(1),h.Q6J("ngIf","invite"===i.model_type),h.xp6(2),h.Oqu(i.email),h.xp6(2),h.ekj("not-clickable",i.is_owner||!o.canEdit),h.Q6J("matMenuTriggerFor",a)("matMenuTriggerData",h.VKq(13,R,i)),h.xp6(2),h.Oqu(i.role_name),h.xp6(2),h.Q6J("ngIf",i.is_owner||o.currentUser.get("id")!==i.id),h.xp6(1),h.Q6J("ngIf",!i.is_owner&&o.currentUser.get("id")===i.id)}}function F(t,e){if(1&t){var n=h.EpF();h.TgZ(0,"div",44),h.NdJ("click",function(){var t=h.CHM(n).$implicit,e=h.oxw().member;return h.oxw().changeRole(e,t)}),h._UZ(1,"mat-icon",45),h.TgZ(2,"div",46),h.TgZ(3,"div",47),h._uU(4),h.qZA(),h.TgZ(5,"div",48),h._uU(6),h.qZA(),h.qZA(),h.qZA()}if(2&t){var i=e.$implicit,o=h.oxw().member;h.ekj("active",o.role_id===i.id),h.xp6(1),h.ekj("visually-hidden",o.role_id!==i.id),h.xp6(3),h.Oqu(i.name),h.xp6(2),h.Oqu(i.description)}}function Q(t,e){if(1&t&&(h.YNc(0,F,7,6,"div",43),h.ALo(1,"async")),2&t){var n=h.oxw();h.Q6J("ngForOf",h.lcZ(1,1,n.workspaceRoles$))}}var $=function(t){return{workspace:t}},B=function(){var t=function(){function t(e,n,a,r,s,c,l){d(this,t),this.dialogRef=e,this.data=n,this.workspaces=a,this.toast=r,this.valueLists=s,this.currentUser=c,this.modal=l,this.inviting$=new i.X(!1),this.deleting$=new i.X(!1),this.loadingMembers$=new i.X(!1),this.workspaceRoles$=new i.X([]),this.members$=new i.X([]),this.peopleToInvite=new o.NI([]),this.canInvite=!1,this.canEdit=!1,this.canDelete=!1}return g(t,[{key:"ngOnInit",value:function(){var t=this;this.loadingMembers$.next(!0),this.valueLists.get(["workspaceRoles"]).subscribe(function(e){t.workspaceRoles$.next(e.workspaceRoles)}),this.workspaces.get(this.data.workspace.id).pipe((0,r.x)(function(){return t.loadingMembers$.next(!1)})).subscribe(function(e){t.members$.next([].concat(c(e.workspace.invites),c(e.workspace.members))),t.setCurrentUserPermissions()})}},{key:"close",value:function(t){this.dialogRef.close(t)}},{key:"invitePeople",value:function(){var t=this,e=this.peopleToInvite.value.filter(function(e){return!t.members$.value.find(function(t){return t.email===e})});if(!e.length)return this.peopleToInvite.reset(),void this.toast.open("All invited people are already members.");var n={emails:e,roleId:(this.workspaceRoles$.value.find(function(t){return t.default})||this.workspaceRoles$.value[0]).id};this.inviting$.next(!0),this.workspaces.invitePeople(this.data.workspace.id,n).pipe((0,r.x)(function(){return t.inviting$.next(!1)})).subscribe(function(e){t.members$.next([].concat(c(t.members$.value),c(e.invites))),t.peopleToInvite.reset(),t.toast.open(s.INVITES_SENT)})}},{key:"resendInvite",value:function(t){var e=this;this.inviting$.next(!0),this.workspaces.resendInvite(this.data.workspace.id,t.id).pipe((0,r.x)(function(){return e.inviting$.next(!1)})).subscribe(function(){e.toast.open(s.INVITE_RESENT)})}},{key:"changeRole",value:function(t,e){var n=this;this.workspaces.changeRole(this.data.workspace.id,t,e.id).subscribe(function(){n.toast.open(s.ROLE_ASSIGNED);var i=c(n.members$.value),o=i.findIndex(function(e){return e.id===t.id});i[o].role_name=e.name,i[o].role_id=e.id,n.members$.next(i)})}},{key:"deleteMember",value:function(t){var e=this;this.deleting$.next(!0),("member"===t.model_type?this.workspaces.deleteMember(this.data.workspace.id,t.id):this.workspaces.deleteInvite(t.id)).pipe((0,r.x)(function(){return e.deleting$.next(!1)})).subscribe(function(){var n=c(e.members$.value),i=n.findIndex(function(e){return t.id&&e.model_type===t.model_type});n.splice(i,1),e.members$.next(n),t.id===e.currentUser.get("id")?(e.close(),e.toast.open(s.LEFT_WORKSPACE)):e.toast.open(s.MEMBER_DELETED)})}},{key:"maybeDeleteMember",value:function(t){var e=this;this.modal.show(l.z,{title:"Delete Member",body:"Are you sure you want to delete this member?",bodyBold:"All workspace resources created by this member will be transferred to workspace owner.",ok:"Delete"}).afterClosed().subscribe(function(n){n&&e.deleteMember(t)})}},{key:"maybeResendInvite",value:function(t){var e=this;this.modal.show(l.z,{title:"Resend Invite",body:"Are you sure you want to send this invite again?",ok:"Resend"}).afterClosed().subscribe(function(n){n&&e.resendInvite(t)})}},{key:"maybeLeaveWorkspace",value:function(t){var e=this;this.modal.show(l.z,u.W).afterClosed().subscribe(function(n){n&&e.deleteMember(t)})}},{key:"setCurrentUserPermissions",value:function(){var t=this,e=this.members$.value.find(function(e){return e.id===t.currentUser.get("id")});this.canInvite=e.is_owner||!!e.permissions.find(function(t){return"workspace_members.invite"===t.name}),this.canEdit=e.is_owner||!!e.permissions.find(function(t){return"workspace_members.update"===t.name}),this.canDelete=e.is_owner||!!e.permissions.find(function(t){return"workspace_members.delete"===t.name})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(h.Y36(a.so),h.Y36(a.WI),h.Y36(f.b),h.Y36(m.F),h.Y36(v.l),h.Y36(b.I),h.Y36(y.u))},t.\u0275cmp=h.Xpm({type:t,selectors:[["manage-workspace-members-modal"]],decls:21,vars:10,consts:[[1,"modal-header"],["mat-dialog-title","","trans",""],["type","button","tabindex","-1",1,"close-button","no-style",3,"click"],["svgIcon","close"],[2,"overflow","hidden"],["container",""],["class","invite-container",4,"ngIf"],[1,"header"],["svgIcon","people"],["trans","",1,"text",3,"transValues"],[1,"animation-container"],["class","member-list unstyled-list",4,"ngIf"],[1,"member-list","unstyled-list"],["class","member-list-item",4,"ngFor","ngForOf"],["selectRoleMenu","matMenu"],["matMenuContent",""],[1,"invite-container"],[1,"input-container"],["for","workspace-emails-input","trans",""],[1,"input-with-action"],["id","workspace-emails-input","placeholder","Email addresses",3,"emailsInput","formControl"],["type","button","mat-flat-button","","color","accent","trans","",1,"add-tags-button",3,"disabled","click"],["mode","indeterminate","color","accent",4,"ngIf"],["mode","indeterminate","color","accent"],[1,"member-list-item"],["variant","avatar"],[1,"details"],["alt","",3,"src"],[1,"email"],["class","strong","trans","",4,"ngIf"],[4,"ngIf"],[1,"invited_at"],[1,"actions"],["type","button","mat-stroked-button","",1,"role-trigger-button",3,"matMenuTriggerFor","matMenuTriggerData"],["trans",""],["svgIcon","keyboard-arrow-down",1,"dropdown-icon"],["type","button","class","delete-member-button","mat-icon-button","",3,"visually-hidden","disabled","click",4,"ngIf"],["type","button","class","delete-member-button","mat-icon-button","",3,"matTooltip","disabled","click",4,"ngIf"],["trans","",1,"strong"],["type","button","trans","",1,"no-style","resend-invite-button",3,"disabled","click"],["type","button","mat-icon-button","",1,"delete-member-button",3,"disabled","click"],["type","button","mat-icon-button","",1,"delete-member-button",3,"matTooltip","disabled","click"],["svgIcon","exit-to-app"],["class","multiline-mat-menu-item with-icon","mat-menu-item","","trans","",3,"active","click",4,"ngFor","ngForOf"],["mat-menu-item","","trans","",1,"multiline-mat-menu-item","with-icon",3,"click"],["svgIcon","check"],[1,"menu-item-content"],["trans","",1,"title"],["trans","",1,"description"]],template:function(t,e){1&t&&(h.TgZ(0,"div",0),h.TgZ(1,"h2",1),h._uU(2,"Manage workspace members"),h.qZA(),h.TgZ(3,"button",2),h.NdJ("click",function(){return e.close()}),h._UZ(4,"mat-icon",3),h.qZA(),h.qZA(),h.TgZ(5,"mat-dialog-content",4,5),h.YNc(7,U,12,11,"div",6),h.TgZ(8,"div",7),h._UZ(9,"mat-icon",8),h.TgZ(10,"span",9),h._uU(11,"Members of :workspace"),h.qZA(),h.qZA(),h.TgZ(12,"div",10),h.YNc(13,S,2,3,"ul",11),h.ALo(14,"async"),h.TgZ(15,"ul",12),h.YNc(16,Y,18,15,"li",13),h.ALo(17,"async"),h.qZA(),h.qZA(),h.qZA(),h.TgZ(18,"mat-menu",null,14),h.YNc(20,Q,2,3,"ng-template",15),h.qZA()),2&t&&(h.xp6(7),h.Q6J("ngIf",e.canInvite),h.xp6(3),h.Q6J("transValues",h.VKq(8,$,e.data.workspace.name)),h.xp6(3),h.Q6J("ngIf",h.lcZ(14,4,e.loadingMembers$)),h.xp6(3),h.Q6J("ngForOf",h.lcZ(17,6,e.members$)))},directives:[a.uh,_.P,x.Hw,a.xY,k.O5,k.sg,Z.VK,Z.KA,w.S,o.JJ,o.oH,A.lW,C.pW,T._,Z.p6,q.gM,Z.OP],pipes:[k.Ov,I.R],styles:["[_nghost-%COMP%]{display:block;width:600px;max-width:100%}chip-input[_ngcontent-%COMP%]{flex:1}.invite-container[_ngcontent-%COMP%]{margin-bottom:30px;position:relative}.mat-progress-bar[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0}.header[_ngcontent-%COMP%]{font-size:1.5rem;margin-bottom:15px}.header[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{margin-right:5px}.header[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%], .header[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{vertical-align:middle}.animation-container[_ngcontent-%COMP%]{position:relative}.member-list-item[_ngcontent-%COMP%]{display:flex;margin-bottom:20px}.member-list-item[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{flex-shrink:0;width:40px;height:40px;-o-object-fit:cover;object-fit:cover;margin-right:10px;border-radius:4px}.member-list-item[_ngcontent-%COMP%]   .details[_ngcontent-%COMP%]{flex:1 1 auto}.member-list-item[_ngcontent-%COMP%]   .delete-member-button[_ngcontent-%COMP%], .member-list-item[_ngcontent-%COMP%]   .invited_at[_ngcontent-%COMP%]{color:var(--be-secondary-text)}.not-clickable[_ngcontent-%COMP%]{pointer-events:none}.not-clickable[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{display:none}.dropdown-icon[_ngcontent-%COMP%]{width:18px;height:18px;line-height:18px}.resend-invite-button[_ngcontent-%COMP%]{color:var(--be-link)}.role-trigger-button[_ngcontent-%COMP%]{margin-right:8px;font-size:1.3rem;font-weight:400}"],data:{animation:p.B},changeDetection:0}),t}()},75428:function(t,e,n){"use strict";n.r(e),n.d(e,{WorkspaceModule:function(){return Z}});var i,o=n(61116),a=n(12440),r=n(77044),s=n(77307),c=n(84369),l=n(92935),u=n(68400),p=n(31041),g=n(7436),h=n(51685),f=n(86013),m=n(24311),v=n(50615),b=n(27701),y=n(15595),_=n(56160),x=n(97070),k=n(35366),Z=((i=function t(){d(this,t)}).components={crupdateModal:a.Z,manageMembers:r.t},i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=k.oAB({type:i}),i.\u0275inj=k.cJS({imports:[[o.ez,p.u5,p.UX,u.N,h.x,f.b,v.X,y.m,_.G,s.Ps,c.ot,l.Is,g.Fk,m.AV,b.Cv,x.Tx]]}),i)}}])}();
//# sourceMappingURL=445-es5.0571e61aeb32d1a410f2.js.map
Back to Directory File Manager