%PDF- %PDF-
Direktori : /home/graphicd/public_html/vebto/public/client/ |
Current File : /home/graphicd/public_html/vebto/public/client/936-es2015.4c349652cd92731bb447.js |
(self.webpackChunkbedrive2=self.webpackChunkbedrive2||[]).push([[936],{21554:function(e,t,i){"use strict";i.d(t,{XC:function(){return L},Bb:function(){return R},ZL:function(){return Y}});var n=i(19238),s=i(39490),r=i(80521),o=i(37716),a=i(72458),c=i(75319),l=i(79765),d=i(41439),p=i(66682),u=i(25917),h=i(22759),g=i(38583),f=i(90625),m=i(71386),v=i(36461),b=i(87636),w=i(3679),x=i(98295),y=i(15257),_=i(43190),k=i(45435),C=i(88002),A=i(93342),Z=i(71289),O=i(70946);const S=["panel"];function I(e,t){if(1&e&&(o.TgZ(0,"div",0,1),o.Hsn(2),o.qZA()),2&e){const e=t.id,i=o.oxw();o.Q6J("id",i.id)("ngClass",i._classList),o.uIk("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(e))}}const T=["*"];let E=0;class P{constructor(e,t){this.source=e,this.option=t}}class F{}const M=(0,a.Kr)(F),U=new o.OlP("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1}}});let D=(()=>{class e extends M{constructor(e,t,i,n){super(),this._changeDetectorRef=e,this._elementRef=t,this._activeOptionChanges=c.w.EMPTY,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new o.vpe,this.opened=new o.vpe,this.closed=new o.vpe,this.optionActivated=new o.vpe,this._classList={},this.id="mat-autocomplete-"+E++,this.inertGroups=(null==n?void 0:n.SAFARI)||!1,this._autoActiveFirstOption=!!i.autoActiveFirstOption}get isOpen(){return this._isOpen&&this.showPanel}get autoActiveFirstOption(){return this._autoActiveFirstOption}set autoActiveFirstOption(e){this._autoActiveFirstOption=(0,s.Ig)(e)}set classList(e){this._classList=e&&e.length?(0,s.du)(e).reduce((e,t)=>(e[t]=!0,e),{}):{},this._setVisibilityClasses(this._classList),this._elementRef.nativeElement.className=""}ngAfterContentInit(){this._keyManager=new n.s1(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){const t=new P(this,e);this.optionSelected.emit(t)}_getPanelAriaLabelledby(e){return this.ariaLabel?null:this.ariaLabelledby?(e?e+" ":"")+this.ariaLabelledby:e}_setVisibilityClasses(e){e[this._visibleClass]=this.showPanel,e[this._hiddenClass]=!this.showPanel}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.sBO),o.Y36(o.SBq),o.Y36(U),o.Y36(r.t4))},e.\u0275dir=o.lG2({type:e,viewQuery:function(e,t){if(1&e&&(o.Gf(o.Rgc,7),o.Gf(S,5)),2&e){let e;o.iGM(e=o.CRH())&&(t.template=e.first),o.iGM(e=o.CRH())&&(t.panel=e.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:[o.qOj]}),e})(),L=(()=>{class e extends D{constructor(){super(...arguments),this._visibleClass="mat-autocomplete-visible",this._hiddenClass="mat-autocomplete-hidden"}}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275cmp=o.Xpm({type:e,selectors:[["mat-autocomplete"]],contentQueries:function(e,t,i){if(1&e&&(o.Suo(i,a.K7,5),o.Suo(i,a.ey,5)),2&e){let e;o.iGM(e=o.CRH())&&(t.optionGroups=e),o.iGM(e=o.CRH())&&(t.options=e)}},hostAttrs:[1,"mat-autocomplete"],inputs:{disableRipple:"disableRipple"},exportAs:["matAutocomplete"],features:[o._Bn([{provide:a.HF,useExisting:e}]),o.qOj],ngContentSelectors:T,decls:1,vars:0,consts:[["role","listbox",1,"mat-autocomplete-panel",3,"id","ngClass"],["panel",""]],template:function(e,t){1&e&&(o.F$t(),o.YNc(0,I,3,4,"ng-template"))},directives:[g.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}),e})();const q=new o.OlP("mat-autocomplete-scroll-strategy"),N={provide:q,deps:[f.aV],useFactory:function(e){return()=>e.scrollStrategies.reposition()}},$={provide:w.JU,useExisting:(0,o.Gpc)(()=>Y),multi:!0};let B=(()=>{class e{constructor(e,t,i,n,s,r,o,a,u,h,g){this._element=e,this._overlay=t,this._viewContainerRef=i,this._zone=n,this._changeDetectorRef=s,this._dir=o,this._formField=a,this._document=u,this._viewportRuler=h,this._defaults=g,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=c.w.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new l.xQ,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=(0,d.P)(()=>this.autocomplete&&this.autocomplete.options?(0,p.T)(...this.autocomplete.options.map(e=>e.onSelectionChange)):this._zone.onStable.pipe((0,y.q)(1),(0,_.w)(()=>this.optionSelections))),this._scrollStrategy=r}get autocompleteDisabled(){return this._autocompleteDisabled}set autocompleteDisabled(e){this._autocompleteDisabled=(0,s.Ig)(e)}ngAfterViewInit(){const e=this._getWindow();void 0!==e&&this._zone.runOutsideAngular(()=>e.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){const e=this._getWindow();void 0!==e&&e.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._attachOverlay(),this._floatLabel()}closePanel(){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())}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return(0,p.T)(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe((0,k.h)(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe((0,k.h)(()=>this._overlayAttached)):(0,u.of)()).pipe((0,C.U)(e=>e instanceof a.rN?e:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return(0,p.T)((0,h.R)(this._document,"click"),(0,h.R)(this._document,"auxclick"),(0,h.R)(this._document,"touchend")).pipe((0,k.h)(e=>{const t=this._isInsideShadowRoot&&e.composedPath?e.composedPath()[0]:e.target,i=this._formField?this._formField._elementRef.nativeElement:null,n=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&t!==this._element.nativeElement&&(!i||!i.contains(t))&&(!n||!n.contains(t))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(t)}))}writeValue(e){Promise.resolve(null).then(()=>this._setTriggerValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){const t=e.keyCode;if(t!==v.hY||(0,v.Vb)(e)||e.preventDefault(),this.activeOption&&t===v.K5&&this.panelOpen)this.activeOption._selectViaInteraction(),this._resetActiveItem(),e.preventDefault();else if(this.autocomplete){const i=this.autocomplete._keyManager.activeItem,n=t===v.LH||t===v.JH;this.panelOpen||t===v.Mf?this.autocomplete._keyManager.onKeydown(e):n&&this._canOpen()&&this.openPanel(),(n||this.autocomplete._keyManager.activeItem!==i)&&this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0)}}_handleInput(e){let t=e.target,i=t.value;"number"===t.type&&(i=""==i?null:parseFloat(i)),this._previousValue!==i&&(this._previousValue=i,this._onChange(i),this._canOpen()&&this._document.activeElement===e.target&&this.openPanel())}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_floatLabel(e=!1){this._formField&&"auto"===this._formField.floatLabel&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField.floatLabel="auto",this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){const e=this._zone.onStable.pipe((0,y.q)(1)),t=this.autocomplete.options.changes.pipe((0,A.b)(()=>this._positionStrategy.reapplyLastPosition()),(0,Z.g)(0));return(0,p.T)(e,t).pipe((0,_.w)(()=>{const e=this.panelOpen;return this._resetActiveItem(),this.autocomplete._setVisibility(),this.panelOpen&&(this._overlayRef.updatePosition(),e!==this.panelOpen&&this.autocomplete.opened.emit()),this.panelClosingActions}),(0,y.q)(1)).subscribe(e=>this._setValueAndClose(e))}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_setTriggerValue(e){const t=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(e):e,i=null!=t?t:"";this._formField?this._formField._control.value=i:this._element.nativeElement.value=i,this._previousValue=i}_setValueAndClose(e){e&&e.source&&(this._clearPreviousSelectedOption(e.source),this._setTriggerValue(e.source.value),this._onChange(e.source.value),this._element.nativeElement.focus(),this.autocomplete._emitSelectEvent(e.source)),this.closePanel()}_clearPreviousSelectedOption(e){this.autocomplete.options.forEach(t=>{t!==e&&t.selected&&t.deselect()})}_attachOverlay(){var e;null==this._isInsideShadowRoot&&(this._isInsideShadowRoot=!!(0,r.kV)(this._element.nativeElement));let t=this._overlayRef;t?(this._positionStrategy.setOrigin(this._getConnectedElement()),t.updateSize({width:this._getPanelWidth()})):(this._portal=new b.UE(this.autocomplete.template,this._viewContainerRef,{id:null===(e=this._formField)||void 0===e?void 0:e.getLabelId()}),t=this._overlay.create(this._getOverlayConfig()),this._overlayRef=t,t.keydownEvents().subscribe(e=>{(e.keyCode===v.hY&&!(0,v.Vb)(e)||e.keyCode===v.LH&&(0,v.Vb)(e,"altKey"))&&(this._resetActiveItem(),this._closeKeyEventStream.next(),e.stopPropagation(),e.preventDefault())}),this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&t&&t.updateSize({width:this._getPanelWidth()})})),t&&!t.hasAttached()&&(t.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());const i=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.panelOpen&&i!==this.panelOpen&&this.autocomplete.opened.emit()}_getOverlayConfig(){var e;return new f.X_({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir,panelClass:null===(e=this._defaults)||void 0===e?void 0:e.overlayPanelClass})}_getOverlayPosition(){const e=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){const t=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],i=this._aboveClass,n=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:i},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:i}];let s;s="above"===this.position?n:"below"===this.position?t:[...t,...n],e.withPositions(s)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){const e=this.autocomplete;e.autoActiveFirstOption?e._keyManager.setFirstItemActive():e._keyManager.setActiveItem(-1)}_canOpen(){const e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this._autocompleteDisabled}_getWindow(){var e;return(null===(e=this._document)||void 0===e?void 0:e.defaultView)||window}_scrollToOption(e){const t=this.autocomplete,i=(0,a.CB)(e,t.options,t.optionGroups);if(0===e&&1===i)t._setScrollTop(0);else if(t.panel){const i=t.options.toArray()[e];if(i){const e=i._getHostElement(),n=(0,a.jH)(e.offsetTop,e.offsetHeight,t._getScrollTop(),t.panel.nativeElement.offsetHeight);t._setScrollTop(n)}}}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.SBq),o.Y36(f.aV),o.Y36(o.s_b),o.Y36(o.R0b),o.Y36(o.sBO),o.Y36(q),o.Y36(O.Is,8),o.Y36(x.G_,9),o.Y36(g.K0,8),o.Y36(m.rL),o.Y36(U,8))},e.\u0275dir=o.lG2({type:e,inputs:{position:["matAutocompletePosition","position"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"],autocomplete:["matAutocomplete","autocomplete"],connectedTo:["matAutocompleteConnectedTo","connectedTo"]},features:[o.TTD]}),e})(),Y=(()=>{class e extends B{constructor(){super(...arguments),this._aboveClass="mat-autocomplete-panel-above"}}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275dir=o.lG2({type:e,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-autocomplete-trigger"],hostVars:7,hostBindings:function(e,t){1&e&&o.NdJ("focusin",function(){return t._handleFocus()})("blur",function(){return t._onTouched()})("input",function(e){return t._handleInput(e)})("keydown",function(e){return t._handleKeydown(e)}),2&e&&o.uIk("autocomplete",t.autocompleteAttribute)("role",t.autocompleteDisabled?null:"combobox")("aria-autocomplete",t.autocompleteDisabled?null:"list")("aria-activedescendant",t.panelOpen&&t.activeOption?t.activeOption.id:null)("aria-expanded",t.autocompleteDisabled?null:t.panelOpen.toString())("aria-owns",t.autocompleteDisabled||!t.panelOpen||null==t.autocomplete?null:t.autocomplete.id)("aria-haspopup",!t.autocompleteDisabled)},exportAs:["matAutocompleteTrigger"],features:[o._Bn([$]),o.qOj]}),e})(),R=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({providers:[N],imports:[[f.U8,a.Ng,a.BQ,g.ez],m.ZD,a.Ng,a.BQ]}),e})()},58341:function(e,t,i){"use strict";i.d(t,{HS:function(){return Z},oH:function(){return U},qn:function(){return F},qH:function(){return O},Hi:function(){return L}});var n=i(36461),s=i(37716),r=i(72458),o=i(39490),a=i(38583),c=i(46237),l=i(79765),d=i(66682),p=i(15257),u=i(46782),h=i(39761),g=i(19238),f=i(38345),m=i(98295),v=i(80521),b=i(70946),w=i(3679);const x=["*"],y=new s.OlP("MatChipRemove"),_=new s.OlP("MatChipAvatar"),k=new s.OlP("MatChipTrailingIcon");class C{constructor(e){this._elementRef=e}}const A=(0,r.sb)((0,r.pj)((0,r.Kr)(C),"primary"),-1);let Z=(()=>{class e extends A{constructor(e,t,i,n,o,a,c,d){super(e),this._elementRef=e,this._ngZone=t,this._changeDetectorRef=o,this._hasFocus=!1,this.chipListSelectable=!0,this._chipListMultiple=!1,this._chipListDisabled=!1,this._selected=!1,this._selectable=!0,this._disabled=!1,this._removable=!0,this._onFocus=new l.xQ,this._onBlur=new l.xQ,this.selectionChange=new s.vpe,this.destroyed=new s.vpe,this.removed=new s.vpe,this._addHostClassName(),this._chipRippleTarget=a.createElement("div"),this._chipRippleTarget.classList.add("mat-chip-ripple"),this._elementRef.nativeElement.appendChild(this._chipRippleTarget),this._chipRipple=new r.IR(this,t,this._chipRippleTarget,i),this._chipRipple.setupTriggerEvents(e),this.rippleConfig=n||{},this._animationsDisabled="NoopAnimations"===c,this.tabIndex=null!=d&&parseInt(d)||-1}get rippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||!!this.rippleConfig.disabled}get selected(){return this._selected}set selected(e){const t=(0,o.Ig)(e);t!==this._selected&&(this._selected=t,this._dispatchSelectionChange())}get value(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent}set value(e){this._value=e}get selectable(){return this._selectable&&this.chipListSelectable}set selectable(e){this._selectable=(0,o.Ig)(e)}get disabled(){return this._chipListDisabled||this._disabled}set disabled(e){this._disabled=(0,o.Ig)(e)}get removable(){return this._removable}set removable(e){this._removable=(0,o.Ig)(e)}get ariaSelected(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}_addHostClassName(){const e=this._elementRef.nativeElement;e.hasAttribute("mat-basic-chip")||"mat-basic-chip"===e.tagName.toLowerCase()?e.classList.add("mat-basic-chip"):e.classList.add("mat-standard-chip")}ngOnDestroy(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}select(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}deselect(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}selectViaInteraction(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._changeDetectorRef.markForCheck())}toggleSelected(e=!1){return this._selected=!this.selected,this._dispatchSelectionChange(e),this._changeDetectorRef.markForCheck(),this.selected}focus(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}remove(){this.removable&&this.removed.emit({chip:this})}_handleClick(e){this.disabled?e.preventDefault():e.stopPropagation()}_handleKeydown(e){if(!this.disabled)switch(e.keyCode){case n.yY:case n.ZH:this.remove(),e.preventDefault();break;case n.L_:this.selectable&&this.toggleSelected(!0),e.preventDefault()}}_blur(){this._ngZone.onStable.pipe((0,p.q)(1)).subscribe(()=>{this._ngZone.run(()=>{this._hasFocus=!1,this._onBlur.next({chip:this})})})}_dispatchSelectionChange(e=!1){this.selectionChange.emit({source:this,isUserInput:e,selected:this._selected})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(s.SBq),s.Y36(s.R0b),s.Y36(v.t4),s.Y36(r.Y2,8),s.Y36(s.sBO),s.Y36(a.K0),s.Y36(c.Qb,8),s.$8M("tabindex"))},e.\u0275dir=s.lG2({type:e,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(e,t,i){if(1&e&&(s.Suo(i,_,5),s.Suo(i,k,5),s.Suo(i,y,5)),2&e){let e;s.iGM(e=s.CRH())&&(t.avatar=e.first),s.iGM(e=s.CRH())&&(t.trailingIcon=e.first),s.iGM(e=s.CRH())&&(t.removeIcon=e.first)}},hostAttrs:["role","option",1,"mat-chip","mat-focus-indicator"],hostVars:14,hostBindings:function(e,t){1&e&&s.NdJ("click",function(e){return t._handleClick(e)})("keydown",function(e){return t._handleKeydown(e)})("focus",function(){return t.focus()})("blur",function(){return t._blur()}),2&e&&(s.uIk("tabindex",t.disabled?null:t.tabIndex)("disabled",t.disabled||null)("aria-disabled",t.disabled.toString())("aria-selected",t.ariaSelected),s.ekj("mat-chip-selected",t.selected)("mat-chip-with-avatar",t.avatar)("mat-chip-with-trailing-icon",t.trailingIcon||t.removeIcon)("mat-chip-disabled",t.disabled)("_mat-animation-noopable",t._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]}),e})(),O=(()=>{class e{constructor(e,t){this._parentChip=e,"BUTTON"===t.nativeElement.nodeName&&t.nativeElement.setAttribute("type","button")}_handleClick(e){const t=this._parentChip;t.removable&&!t.disabled&&t.remove(),e.stopPropagation()}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z),s.Y36(s.SBq))},e.\u0275dir=s.lG2({type:e,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(e,t){1&e&&s.NdJ("click",function(e){return t._handleClick(e)})},features:[s._Bn([{provide:y,useExisting:e}])]}),e})();const S=new s.OlP("mat-chips-default-options");class I{constructor(e,t,i,n){this._defaultErrorStateMatcher=e,this._parentForm=t,this._parentFormGroup=i,this.ngControl=n}}const T=(0,r.FD)(I);let E=0;class P{constructor(e,t){this.source=e,this.value=t}}let F=(()=>{class e extends T{constructor(e,t,i,n,r,o,a){super(o,n,r,a),this._elementRef=e,this._changeDetectorRef=t,this._dir=i,this.ngControl=a,this.controlType="mat-chip-list",this._lastDestroyedChipIndex=null,this._destroyed=new l.xQ,this._uid="mat-chip-list-"+E++,this._tabIndex=0,this._userTabIndex=null,this._onTouched=()=>{},this._onChange=()=>{},this._multiple=!1,this._compareWith=(e,t)=>e===t,this._required=!1,this._disabled=!1,this.ariaOrientation="horizontal",this._selectable=!0,this.change=new s.vpe,this.valueChange=new s.vpe,this.ngControl&&(this.ngControl.valueAccessor=this)}get selected(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}get role(){return this.empty?null:"listbox"}get multiple(){return this._multiple}set multiple(e){this._multiple=(0,o.Ig)(e),this._syncChipsState()}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this.writeValue(e),this._value=e}get id(){return this._chipInput?this._chipInput.id:this._uid}get required(){return this._required}set required(e){this._required=(0,o.Ig)(e),this.stateChanges.next()}get placeholder(){return this._chipInput?this._chipInput.placeholder:this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get focused(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}get empty(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}get shouldLabelFloat(){return!this.empty||this.focused}get disabled(){return this.ngControl?!!this.ngControl.disabled:this._disabled}set disabled(e){this._disabled=(0,o.Ig)(e),this._syncChipsState()}get selectable(){return this._selectable}set selectable(e){this._selectable=(0,o.Ig)(e),this.chips&&this.chips.forEach(e=>e.chipListSelectable=this._selectable)}set tabIndex(e){this._userTabIndex=e,this._tabIndex=e}get chipSelectionChanges(){return(0,d.T)(...this.chips.map(e=>e.selectionChange))}get chipFocusChanges(){return(0,d.T)(...this.chips.map(e=>e._onFocus))}get chipBlurChanges(){return(0,d.T)(...this.chips.map(e=>e._onBlur))}get chipRemoveChanges(){return(0,d.T)(...this.chips.map(e=>e.destroyed))}ngAfterContentInit(){this._keyManager=new g.Em(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe((0,u.R)(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e)),this._keyManager.tabOut.pipe((0,u.R)(this._destroyed)).subscribe(()=>{this._allowFocusEscape()}),this.chips.changes.pipe((0,h.O)(null),(0,u.R)(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>{this._syncChipsState()}),this._resetChips(),this._initializeSelection(),this._updateTabIndex(),this._updateFocusForDestroyedChips(),this.stateChanges.next()})}ngOnInit(){this._selectionModel=new f.Ov(this.multiple,void 0,!1),this.stateChanges.next()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}registerInput(e){this._chipInput=e,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",e.id)}setDescribedByIds(e){this._ariaDescribedby=e.join(" ")}writeValue(e){this.chips&&this._setSelectionByValue(e,!1)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this.stateChanges.next()}onContainerClick(e){this._originatesFromChip(e)||this.focus()}focus(e){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(e),this.stateChanges.next()))}_focusInput(e){this._chipInput&&this._chipInput.focus(e)}_keydown(e){const t=e.target;e.keyCode===n.ZH&&this._isInputEmpty(t)?(this._keyManager.setLastItemActive(),e.preventDefault()):t&&t.classList.contains("mat-chip")&&(this._keyManager.onKeydown(e),this.stateChanges.next())}_updateTabIndex(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}_updateFocusForDestroyedChips(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){const e=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(e)}else this.focus();this._lastDestroyedChipIndex=null}_isValidIndex(e){return e>=0&&e<this.chips.length}_isInputEmpty(e){return!(!e||"input"!==e.nodeName.toLowerCase()||e.value)}_setSelectionByValue(e,t=!0){if(this._clearSelection(),this.chips.forEach(e=>e.deselect()),Array.isArray(e))e.forEach(e=>this._selectValue(e,t)),this._sortValues();else{const i=this._selectValue(e,t);i&&t&&this._keyManager.setActiveItem(i)}}_selectValue(e,t=!0){const i=this.chips.find(t=>null!=t.value&&this._compareWith(t.value,e));return i&&(t?i.selectViaInteraction():i.select(),this._selectionModel.select(i)),i}_initializeSelection(){Promise.resolve().then(()=>{(this.ngControl||this._value)&&(this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value,!1),this.stateChanges.next())})}_clearSelection(e){this._selectionModel.clear(),this.chips.forEach(t=>{t!==e&&t.deselect()}),this.stateChanges.next()}_sortValues(){this._multiple&&(this._selectionModel.clear(),this.chips.forEach(e=>{e.selected&&this._selectionModel.select(e)}),this.stateChanges.next())}_propagateChanges(e){let t=null;t=Array.isArray(this.selected)?this.selected.map(e=>e.value):this.selected?this.selected.value:e,this._value=t,this.change.emit(new P(this,t)),this.valueChange.emit(t),this._onChange(t),this._changeDetectorRef.markForCheck()}_blur(){this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout(()=>{this.focused||this._markAsTouched()}):this._markAsTouched())}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}_allowFocusEscape(){-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(()=>{this._tabIndex=this._userTabIndex||0,this._changeDetectorRef.markForCheck()}))}_resetChips(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}_dropSubscriptions(){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)}_listenToChipsSelection(){this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(e=>{e.source.selected?this._selectionModel.select(e.source):this._selectionModel.deselect(e.source),this.multiple||this.chips.forEach(e=>{!this._selectionModel.isSelected(e)&&e.selected&&e.deselect()}),e.isUserInput&&this._propagateChanges()})}_listenToChipsFocus(){this._chipFocusSubscription=this.chipFocusChanges.subscribe(e=>{let t=this.chips.toArray().indexOf(e.chip);this._isValidIndex(t)&&this._keyManager.updateActiveItem(t),this.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(()=>{this._blur(),this.stateChanges.next()})}_listenToChipsRemoved(){this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(e=>{const t=e.chip,i=this.chips.toArray().indexOf(e.chip);this._isValidIndex(i)&&t._hasFocus&&(this._lastDestroyedChipIndex=i)})}_originatesFromChip(e){let t=e.target;for(;t&&t!==this._elementRef.nativeElement;){if(t.classList.contains("mat-chip"))return!0;t=t.parentElement}return!1}_hasFocusedChip(){return this.chips&&this.chips.some(e=>e._hasFocus)}_syncChipsState(){this.chips&&this.chips.forEach(e=>{e._chipListDisabled=this._disabled,e._chipListMultiple=this.multiple})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(s.SBq),s.Y36(s.sBO),s.Y36(b.Is,8),s.Y36(w.F,8),s.Y36(w.sg,8),s.Y36(r.rD),s.Y36(w.a5,10))},e.\u0275cmp=s.Xpm({type:e,selectors:[["mat-chip-list"]],contentQueries:function(e,t,i){if(1&e&&s.Suo(i,Z,5),2&e){let e;s.iGM(e=s.CRH())&&(t.chips=e)}},hostAttrs:[1,"mat-chip-list"],hostVars:15,hostBindings:function(e,t){1&e&&s.NdJ("focus",function(){return t.focus()})("blur",function(){return t._blur()})("keydown",function(e){return t._keydown(e)}),2&e&&(s.Ikx("id",t._uid),s.uIk("tabindex",t.disabled?null:t._tabIndex)("aria-describedby",t._ariaDescribedby||null)("aria-required",t.role?t.required:null)("aria-disabled",t.disabled.toString())("aria-invalid",t.errorState)("aria-multiselectable",t.multiple)("role",t.role)("aria-orientation",t.ariaOrientation),s.ekj("mat-chip-list-disabled",t.disabled)("mat-chip-list-invalid",t.errorState)("mat-chip-list-required",t.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:m.Eo,useExisting:e}]),s.qOj],ngContentSelectors:x,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(e,t){1&e&&(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}),e})(),M=0,U=(()=>{class e{constructor(e,t){this._elementRef=e,this._defaultOptions=t,this.focused=!1,this._addOnBlur=!1,this.separatorKeyCodes=this._defaultOptions.separatorKeyCodes,this.chipEnd=new s.vpe,this.placeholder="",this.id="mat-chip-list-input-"+M++,this._disabled=!1,this._inputElement=this._elementRef.nativeElement}set chipList(e){e&&(this._chipList=e,this._chipList.registerInput(this))}get addOnBlur(){return this._addOnBlur}set addOnBlur(e){this._addOnBlur=(0,o.Ig)(e)}get disabled(){return this._disabled||this._chipList&&this._chipList.disabled}set disabled(e){this._disabled=(0,o.Ig)(e)}get empty(){return!this._inputElement.value}ngOnChanges(){this._chipList.stateChanges.next()}_keydown(e){e&&e.keyCode===n.Mf&&!(0,n.Vb)(e,"shiftKey")&&this._chipList._allowFocusEscape(),this._emitChipEnd(e)}_blur(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipList.focused||this._chipList._blur(),this._chipList.stateChanges.next()}_focus(){this.focused=!0,this._chipList.stateChanges.next()}_emitChipEnd(e){!this._inputElement.value&&e&&this._chipList._keydown(e),e&&!this._isSeparatorKey(e)||(this.chipEnd.emit({input:this._inputElement,value:this._inputElement.value}),e&&e.preventDefault())}_onInput(){this._chipList.stateChanges.next()}focus(e){this._inputElement.focus(e)}_isSeparatorKey(e){return!(0,n.Vb)(e)&&new Set(this.separatorKeyCodes).has(e.keyCode)}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(s.SBq),s.Y36(S))},e.\u0275dir=s.lG2({type:e,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-chip-input","mat-input-element"],hostVars:5,hostBindings:function(e,t){1&e&&s.NdJ("keydown",function(e){return t._keydown(e)})("blur",function(){return t._blur()})("focus",function(){return t._focus()})("input",function(){return t._onInput()}),2&e&&(s.Ikx("id",t.id),s.uIk("disabled",t.disabled||null)("placeholder",t.placeholder||null)("aria-invalid",t._chipList&&t._chipList.ngControl?t._chipList.ngControl.invalid:null)("aria-required",t._chipList&&t._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]}),e})();const D={separatorKeyCodes:[n.K5]};let L=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({providers:[r.rD,{provide:S,useValue:D}],imports:[[r.BQ]]}),e})()},98295:function(e,t,i){"use strict";i.d(t,{G_:function(){return c},Eo:function(){return a},lN:function(){return l}});var n=i(18553),s=i(38583),r=i(37716),o=i(72458);i(39490),i(79765),i(66682),i(22759),i(39761),i(46782),i(15257),i(17238),i(46237),i(70946),i(80521);let a=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=r.lG2({type:e}),e})();const c=new r.OlP("MatFormField");let l=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=r.oAB({type:e}),e.\u0275inj=r.cJS({imports:[[s.ez,o.BQ,n.Q8],o.BQ]}),e})()},45396:function(e,t,i){"use strict";i.d(t,{Rr:function(){return y},rP:function(){return k}});var n=i(18553),s=i(37716),r=i(72458),o=i(39490),a=i(3679),c=i(46237),l=i(19238);const d=["thumbContainer"],p=["toggleBar"],u=["input"],h=function(){return{enterDuration:150}},g=["*"],f=new s.OlP("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1})});let m=0;const v={provide:a.JU,useExisting:(0,s.Gpc)(()=>y),multi:!0};class b{constructor(e,t){this.source=e,this.checked=t}}class w{constructor(e){this._elementRef=e}}const x=(0,r.sb)((0,r.pj)((0,r.Kr)((0,r.Id)(w)),"accent"));let y=(()=>{class e extends x{constructor(e,t,i,n,r,o){super(e),this._focusMonitor=t,this._changeDetectorRef=i,this.defaults=r,this._animationMode=o,this._onChange=e=>{},this._onTouched=()=>{},this._uniqueId="mat-slide-toggle-"+ ++m,this._required=!1,this._checked=!1,this.name=null,this.id=this._uniqueId,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.change=new s.vpe,this.toggleChange=new s.vpe,this.tabIndex=parseInt(n)||0}get required(){return this._required}set required(e){this._required=(0,o.Ig)(e)}get checked(){return this._checked}set checked(e){this._checked=(0,o.Ig)(e),this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{"keyboard"===e||"program"===e?this._inputElement.nativeElement.focus():e||Promise.resolve().then(()=>this._onTouched())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}_onChangeEvent(e){e.stopPropagation(),this.toggleChange.emit(),this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}_onInputClick(e){e.stopPropagation()}writeValue(e){this.checked=!!e}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck()}focus(e,t){t?this._focusMonitor.focusVia(this._inputElement,t,e):this._inputElement.nativeElement.focus(e)}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(new b(this,this.checked))}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(s.SBq),s.Y36(l.tE),s.Y36(s.sBO),s.$8M("tabindex"),s.Y36(f),s.Y36(c.Qb,8))},e.\u0275cmp=s.Xpm({type:e,selectors:[["mat-slide-toggle"]],viewQuery:function(e,t){if(1&e&&(s.Gf(d,5),s.Gf(p,5),s.Gf(u,5)),2&e){let e;s.iGM(e=s.CRH())&&(t._thumbEl=e.first),s.iGM(e=s.CRH())&&(t._thumbBarEl=e.first),s.iGM(e=s.CRH())&&(t._inputElement=e.first)}},hostAttrs:[1,"mat-slide-toggle"],hostVars:12,hostBindings:function(e,t){2&e&&(s.Ikx("id",t.id),s.uIk("tabindex",t.disabled?null:-1)("aria-label",null)("aria-labelledby",null),s.ekj("mat-checked",t.checked)("mat-disabled",t.disabled)("mat-slide-toggle-label-before","before"==t.labelPosition)("_mat-animation-noopable","NoopAnimations"===t._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:[s._Bn([v]),s.qOj],ngContentSelectors:g,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(e,t){if(1&e&&(s.F$t(),s.TgZ(0,"label",0,1),s.TgZ(2,"div",2,3),s.TgZ(4,"input",4,5),s.NdJ("change",function(e){return t._onChangeEvent(e)})("click",function(e){return t._onInputClick(e)}),s.qZA(),s.TgZ(6,"div",6,7),s._UZ(8,"div",8),s.TgZ(9,"div",9),s._UZ(10,"div",10),s.qZA(),s.qZA(),s.qZA(),s.TgZ(11,"span",11,12),s.NdJ("cdkObserveContent",function(){return t._onLabelTextChange()}),s.TgZ(13,"span",13),s._uU(14,"\xa0"),s.qZA(),s.Hsn(15),s.qZA(),s.qZA()),2&e){const e=s.MAs(1),i=s.MAs(12);s.uIk("for",t.inputId),s.xp6(2),s.ekj("mat-slide-toggle-bar-no-side-margin",!i.textContent||!i.textContent.trim()),s.xp6(2),s.Q6J("id",t.inputId)("required",t.required)("tabIndex",t.tabIndex)("checked",t.checked)("disabled",t.disabled),s.uIk("name",t.name)("aria-checked",t.checked.toString())("aria-label",t.ariaLabel)("aria-labelledby",t.ariaLabelledby),s.xp6(5),s.Q6J("matRippleTrigger",e)("matRippleDisabled",t.disableRipple||t.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",s.DdM(17,h))}},directives:[r.wG,n.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}),e})(),_=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({}),e})(),k=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[_,r.si,r.BQ,n.Q8],_,r.BQ]}),e})()},95439:function(e){"use strict";e.exports=function e(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;var n,s,r;if(Array.isArray(t)){if((n=t.length)!=i.length)return!1;for(s=n;0!=s--;)if(!e(t[s],i[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if((n=(r=Object.keys(t)).length)!==Object.keys(i).length)return!1;for(s=n;0!=s--;)if(!Object.prototype.hasOwnProperty.call(i,r[s]))return!1;for(s=n;0!=s--;){var o=r[s];if(!e(t[o],i[o]))return!1}return!0}return t!=t&&i!=i}},81235:function(e,t,i){var n=i(4153)(i(27038),"DataView");e.exports=n},41505:function(e,t,i){var n=i(59410),s=i(21143),r=i(604),o=i(80584),a=i(7792);function c(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=s,c.prototype.get=r,c.prototype.has=o,c.prototype.set=a,e.exports=c},73545:function(e,t,i){var n=i(63391),s=i(68971),r=i(18858),o=i(37490),a=i(68944);function c(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=s,c.prototype.get=r,c.prototype.has=o,c.prototype.set=a,e.exports=c},39046:function(e,t,i){var n=i(4153)(i(27038),"Map");e.exports=n},93177:function(e,t,i){var n=i(70536),s=i(61502),r=i(94960),o=i(61539),a=i(34138);function c(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=s,c.prototype.get=r,c.prototype.has=o,c.prototype.set=a,e.exports=c},97129:function(e,t,i){var n=i(4153)(i(27038),"Promise");e.exports=n},74918:function(e,t,i){var n=i(4153)(i(27038),"Set");e.exports=n},48690:function(e,t,i){var n=i(93177),s=i(30365),r=i(58235);function o(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new n;++t<i;)this.add(e[t])}o.prototype.add=o.prototype.push=s,o.prototype.has=r,e.exports=o},33667:function(e,t,i){var n=i(73545),s=i(18034),r=i(37238),o=i(75887),a=i(81450),c=i(61386);function l(e){var t=this.__data__=new n(e);this.size=t.size}l.prototype.clear=s,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=a,l.prototype.set=c,e.exports=l},57333:function(e,t,i){var n=i(27038);e.exports=n.Symbol},96820:function(e,t,i){var n=i(27038);e.exports=n.Uint8Array},54203:function(e,t,i){var n=i(4153)(i(27038),"WeakMap");e.exports=n},4500:function(e){e.exports=function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e}},11375:function(e){e.exports=function(e,t){for(var i=-1,n=null==e?0:e.length,s=0,r=[];++i<n;){var o=e[i];t(o,i,e)&&(r[s++]=o)}return r}},5242:function(e,t,i){var n=i(2166);e.exports=function(e,t){return!(null==e||!e.length)&&n(e,t,0)>-1}},80679:function(e){e.exports=function(e,t,i){for(var n=-1,s=null==e?0:e.length;++n<s;)if(i(t,e[n]))return!0;return!1}},71890:function(e,t,i){var n=i(48282),s=i(2952),r=i(81690),o=i(84444),a=i(20968),c=i(47679),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var i=r(e),d=!i&&s(e),p=!i&&!d&&o(e),u=!i&&!d&&!p&&c(e),h=i||d||p||u,g=h?n(e.length,String):[],f=g.length;for(var m in e)!t&&!l.call(e,m)||h&&("length"==m||p&&("offset"==m||"parent"==m)||u&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,f))||g.push(m);return g}},14992:function(e){e.exports=function(e,t){for(var i=-1,n=null==e?0:e.length,s=Array(n);++i<n;)s[i]=t(e[i],i,e);return s}},94165:function(e){e.exports=function(e,t){for(var i=-1,n=t.length,s=e.length;++i<n;)e[s+i]=t[i];return e}},8141:function(e){e.exports=function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}},23898:function(e,t,i){var n=i(92007),s=i(71166),r=Object.prototype.hasOwnProperty;e.exports=function(e,t,i){var o=e[t];r.call(e,t)&&s(o,i)&&(void 0!==i||t in e)||n(e,t,i)}},15758:function(e,t,i){var n=i(71166);e.exports=function(e,t){for(var i=e.length;i--;)if(n(e[i][0],t))return i;return-1}},22067:function(e,t,i){var n=i(11694),s=i(59108);e.exports=function(e,t){return e&&n(t,s(t),e)}},70882:function(e,t,i){var n=i(11694),s=i(42970);e.exports=function(e,t){return e&&n(t,s(t),e)}},92007:function(e,t,i){var n=i(20395);e.exports=function(e,t,i){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}},77007:function(e,t,i){var n=i(33667),s=i(4500),r=i(23898),o=i(22067),a=i(70882),c=i(50694),l=i(53595),d=i(14746),p=i(78857),u=i(58605),h=i(51675),g=i(26663),f=i(62963),m=i(32143),v=i(31563),b=i(81690),w=i(84444),x=i(32e3),y=i(53867),_=i(48855),k=i(59108),C=i(42970),A={};A["[object Arguments]"]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object DataView]"]=A["[object Boolean]"]=A["[object Date]"]=A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Map]"]=A["[object Number]"]=A["[object Object]"]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object Symbol]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A["[object Error]"]=A["[object Function]"]=A["[object WeakMap]"]=!1,e.exports=function e(t,i,Z,O,S,I){var T,E=1&i,P=2&i,F=4&i;if(Z&&(T=S?Z(t,O,S,I):Z(t)),void 0!==T)return T;if(!y(t))return t;var M=b(t);if(M){if(T=f(t),!E)return l(t,T)}else{var U=g(t),D="[object Function]"==U||"[object GeneratorFunction]"==U;if(w(t))return c(t,E);if("[object Object]"==U||"[object Arguments]"==U||D&&!S){if(T=P||D?{}:v(t),!E)return P?p(t,a(T,t)):d(t,o(T,t))}else{if(!A[U])return S?t:{};T=m(t,U,E)}}I||(I=new n);var L=I.get(t);if(L)return L;I.set(t,T),_(t)?t.forEach(function(n){T.add(e(n,i,Z,n,t,I))}):x(t)&&t.forEach(function(n,s){T.set(s,e(n,i,Z,s,t,I))});var q=M?void 0:(F?P?h:u:P?C:k)(t);return s(q||t,function(n,s){q&&(n=t[s=n]),r(T,s,e(n,i,Z,s,t,I))}),T}},60920:function(e,t,i){var n=i(53867),s=Object.create,r=function(){function e(){}return function(t){if(!n(t))return{};if(s)return s(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}();e.exports=r},12229:function(e){e.exports=function(e,t,i,n){for(var s=e.length,r=i+(n?1:-1);n?r--:++r<s;)if(t(e[r],r,e))return r;return-1}},93436:function(e,t,i){var n=i(64667),s=i(82773);e.exports=function(e,t){for(var i=0,r=(t=n(t,e)).length;null!=e&&i<r;)e=e[s(t[i++])];return i&&i==r?e:void 0}},19215:function(e,t,i){var n=i(94165),s=i(81690);e.exports=function(e,t,i){var r=t(e);return s(e)?r:n(r,i(e))}},72802:function(e,t,i){var n=i(57333),s=i(21613),r=i(81244),o=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?s(e):r(e)}},55333:function(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},2166:function(e,t,i){var n=i(12229),s=i(2469),r=i(54299);e.exports=function(e,t,i){return t==t?r(e,t,i):n(e,s,i)}},77090:function(e,t,i){var n=i(72802),s=i(27503);e.exports=function(e){return s(e)&&"[object Arguments]"==n(e)}},30696:function(e,t,i){var n=i(36863),s=i(27503);e.exports=function e(t,i,r,o,a){return t===i||(null==t||null==i||!s(t)&&!s(i)?t!=t&&i!=i:n(t,i,r,o,e,a))}},36863:function(e,t,i){var n=i(33667),s=i(27667),r=i(64630),o=i(70838),a=i(26663),c=i(81690),l=i(84444),d=i(47679),p="[object Object]",u=Object.prototype.hasOwnProperty;e.exports=function(e,t,i,h,g,f){var m=c(e),v=c(t),b=m?"[object Array]":a(e),w=v?"[object Array]":a(t),x=(b="[object Arguments]"==b?p:b)==p,y=(w="[object Arguments]"==w?p:w)==p,_=b==w;if(_&&l(e)){if(!l(t))return!1;m=!0,x=!1}if(_&&!x)return f||(f=new n),m||d(e)?s(e,t,i,h,g,f):r(e,t,b,i,h,g,f);if(!(1&i)){var k=x&&u.call(e,"__wrapped__"),C=y&&u.call(t,"__wrapped__");if(k||C){var A=k?e.value():e,Z=C?t.value():t;return f||(f=new n),g(A,Z,i,h,f)}}return!!_&&(f||(f=new n),o(e,t,i,h,g,f))}},63434:function(e,t,i){var n=i(26663),s=i(27503);e.exports=function(e){return s(e)&&"[object Map]"==n(e)}},88783:function(e,t,i){var n=i(33667),s=i(30696);e.exports=function(e,t,i,r){var o=i.length,a=o,c=!r;if(null==e)return!a;for(e=Object(e);o--;){var l=i[o];if(c&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var d=(l=i[o])[0],p=e[d],u=l[1];if(c&&l[2]){if(void 0===p&&!(d in e))return!1}else{var h=new n;if(r)var g=r(p,u,d,e,t,h);if(!(void 0===g?s(u,p,3,r,h):g))return!1}}return!0}},2469:function(e){e.exports=function(e){return e!=e}},43540:function(e,t,i){var n=i(55836),s=i(38466),r=i(53867),o=i(51217),a=/^\[object .+?Constructor\]$/,c=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!r(e)||s(e))&&(n(e)?c:a).test(o(e))}},67495:function(e,t,i){var n=i(26663),s=i(27503);e.exports=function(e){return s(e)&&"[object Set]"==n(e)}},99390:function(e,t,i){var n=i(72802),s=i(8613),r=i(27503),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return r(e)&&s(e.length)&&!!o[n(e)]}},5245:function(e,t,i){var n=i(69433),s=i(68608),r=i(80290),o=i(81690),a=i(63354);e.exports=function(e){return"function"==typeof e?e:null==e?r:"object"==typeof e?o(e)?s(e[0],e[1]):n(e):a(e)}},92488:function(e,t,i){var n=i(58845),s=i(36700),r=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return s(e);var t=[];for(var i in Object(e))r.call(e,i)&&"constructor"!=i&&t.push(i);return t}},50762:function(e,t,i){var n=i(53867),s=i(58845),r=i(25618),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return r(e);var t=s(e),i=[];for(var a in e)("constructor"!=a||!t&&o.call(e,a))&&i.push(a);return i}},69433:function(e,t,i){var n=i(88783),s=i(48834),r=i(63587);e.exports=function(e){var t=s(e);return 1==t.length&&t[0][2]?r(t[0][0],t[0][1]):function(i){return i===e||n(i,e,t)}}},68608:function(e,t,i){var n=i(30696),s=i(58102),r=i(18303),o=i(99743),a=i(45774),c=i(63587),l=i(82773);e.exports=function(e,t){return o(e)&&a(t)?c(l(e),t):function(i){var o=s(i,e);return void 0===o&&o===t?r(i,e):n(t,o,3)}}},68840:function(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},59866:function(e,t,i){var n=i(93436);e.exports=function(e){return function(t){return n(t,e)}}},48282:function(e){e.exports=function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}},68166:function(e,t,i){var n=i(57333),s=i(14992),r=i(81690),o=i(7786),a=n?n.prototype:void 0,c=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(r(t))return s(t,e)+"";if(o(t))return c?c.call(t):"";var i=t+"";return"0"==i&&1/t==-1/0?"-0":i}},70544:function(e){e.exports=function(e){return function(t){return e(t)}}},83987:function(e,t,i){var n=i(48690),s=i(5242),r=i(80679),o=i(13747),a=i(52252),c=i(57673);e.exports=function(e,t,i){var l=-1,d=s,p=e.length,u=!0,h=[],g=h;if(i)u=!1,d=r;else if(p>=200){var f=t?null:a(e);if(f)return c(f);u=!1,d=o,g=new n}else g=t?[]:h;e:for(;++l<p;){var m=e[l],v=t?t(m):m;if(m=i||0!==m?m:0,u&&v==v){for(var b=g.length;b--;)if(g[b]===v)continue e;t&&g.push(v),h.push(m)}else d(g,v,i)||(g!==h&&g.push(v),h.push(m))}return h}},13747:function(e){e.exports=function(e,t){return e.has(t)}},64667:function(e,t,i){var n=i(81690),s=i(99743),r=i(89775),o=i(41233);e.exports=function(e,t){return n(e)?e:s(e,t)?[e]:r(o(e))}},88461:function(e,t,i){var n=i(96820);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},50694:function(e,t,i){e=i.nmd(e);var n=i(27038),s=t&&!t.nodeType&&t,r=s&&e&&!e.nodeType&&e,o=r&&r.exports===s?n.Buffer:void 0,a=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var i=e.length,n=a?a(i):new e.constructor(i);return e.copy(n),n}},59757:function(e,t,i){var n=i(88461);e.exports=function(e,t){var i=t?n(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}},83615:function(e){var t=/\w*$/;e.exports=function(e){var i=new e.constructor(e.source,t.exec(e));return i.lastIndex=e.lastIndex,i}},42282:function(e,t,i){var n=i(57333),s=n?n.prototype:void 0,r=s?s.valueOf:void 0;e.exports=function(e){return r?Object(r.call(e)):{}}},53769:function(e,t,i){var n=i(88461);e.exports=function(e,t){var i=t?n(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}},53595:function(e){e.exports=function(e,t){var i=-1,n=e.length;for(t||(t=Array(n));++i<n;)t[i]=e[i];return t}},11694:function(e,t,i){var n=i(23898),s=i(92007);e.exports=function(e,t,i,r){var o=!i;i||(i={});for(var a=-1,c=t.length;++a<c;){var l=t[a],d=r?r(i[l],e[l],l,i,e):void 0;void 0===d&&(d=e[l]),o?s(i,l,d):n(i,l,d)}return i}},14746:function(e,t,i){var n=i(11694),s=i(10296);e.exports=function(e,t){return n(e,s(e),t)}},78857:function(e,t,i){var n=i(11694),s=i(29572);e.exports=function(e,t){return n(e,s(e),t)}},93412:function(e,t,i){var n=i(27038);e.exports=n["__core-js_shared__"]},52252:function(e,t,i){var n=i(74918),s=i(49122),r=i(57673),o=n&&1/r(new n([,-0]))[1]==1/0?function(e){return new n(e)}:s;e.exports=o},20395:function(e,t,i){var n=i(4153),s=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=s},27667:function(e,t,i){var n=i(48690),s=i(8141),r=i(13747);e.exports=function(e,t,i,o,a,c){var l=1&i,d=e.length,p=t.length;if(d!=p&&!(l&&p>d))return!1;var u=c.get(e),h=c.get(t);if(u&&h)return u==t&&h==e;var g=-1,f=!0,m=2&i?new n:void 0;for(c.set(e,t),c.set(t,e);++g<d;){var v=e[g],b=t[g];if(o)var w=l?o(b,v,g,t,e,c):o(v,b,g,e,t,c);if(void 0!==w){if(w)continue;f=!1;break}if(m){if(!s(t,function(e,t){if(!r(m,t)&&(v===e||a(v,e,i,o,c)))return m.push(t)})){f=!1;break}}else if(v!==b&&!a(v,b,i,o,c)){f=!1;break}}return c.delete(e),c.delete(t),f}},64630:function(e,t,i){var n=i(57333),s=i(96820),r=i(71166),o=i(27667),a=i(37461),c=i(57673),l=n?n.prototype:void 0,d=l?l.valueOf:void 0;e.exports=function(e,t,i,n,l,p,u){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!p(new s(e),new s(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=a;case"[object Set]":if(h||(h=c),e.size!=t.size&&!(1&n))return!1;var g=u.get(e);if(g)return g==t;n|=2,u.set(e,t);var f=o(h(e),h(t),n,l,p,u);return u.delete(e),f;case"[object Symbol]":if(d)return d.call(e)==d.call(t)}return!1}},70838:function(e,t,i){var n=i(58605),s=Object.prototype.hasOwnProperty;e.exports=function(e,t,i,r,o,a){var c=1&i,l=n(e),d=l.length;if(d!=n(t).length&&!c)return!1;for(var p=d;p--;){var u=l[p];if(!(c?u in t:s.call(t,u)))return!1}var h=a.get(e),g=a.get(t);if(h&&g)return h==t&&g==e;var f=!0;a.set(e,t),a.set(t,e);for(var m=c;++p<d;){var v=e[u=l[p]],b=t[u];if(r)var w=c?r(b,v,u,t,e,a):r(v,b,u,e,t,a);if(!(void 0===w?v===b||o(v,b,i,r,a):w)){f=!1;break}m||(m="constructor"==u)}if(f&&!m){var x=e.constructor,y=t.constructor;x==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof y&&y instanceof y||(f=!1)}return a.delete(e),a.delete(t),f}},61138:function(e){var t="object"==typeof global&&global&&global.Object===Object&&global;e.exports=t},58605:function(e,t,i){var n=i(19215),s=i(10296),r=i(59108);e.exports=function(e){return n(e,r,s)}},51675:function(e,t,i){var n=i(19215),s=i(29572),r=i(42970);e.exports=function(e){return n(e,r,s)}},85556:function(e,t,i){var n=i(36586);e.exports=function(e,t){var i=e.__data__;return n(t)?i["string"==typeof t?"string":"hash"]:i.map}},48834:function(e,t,i){var n=i(45774),s=i(59108);e.exports=function(e){for(var t=s(e),i=t.length;i--;){var r=t[i],o=e[r];t[i]=[r,o,n(o)]}return t}},4153:function(e,t,i){var n=i(43540),s=i(36825);e.exports=function(e,t){var i=s(e,t);return n(i)?i:void 0}},52398:function(e,t,i){var n=i(93332)(Object.getPrototypeOf,Object);e.exports=n},21613:function(e,t,i){var n=i(57333),s=Object.prototype,r=s.hasOwnProperty,o=s.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=r.call(e,a),i=e[a];try{e[a]=void 0;var n=!0}catch(c){}var s=o.call(e);return n&&(t?e[a]=i:delete e[a]),s}},10296:function(e,t,i){var n=i(11375),s=i(65336),r=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols;e.exports=o?function(e){return null==e?[]:(e=Object(e),n(o(e),function(t){return r.call(e,t)}))}:s},29572:function(e,t,i){var n=i(94165),s=i(52398),r=i(10296),o=i(65336);e.exports=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,r(e)),e=s(e);return t}:o},26663:function(e,t,i){var n=i(81235),s=i(39046),r=i(97129),o=i(74918),a=i(54203),c=i(72802),l=i(51217),d=l(n),p=l(s),u=l(r),h=l(o),g=l(a),f=c;(n&&"[object DataView]"!=f(new n(new ArrayBuffer(1)))||s&&"[object Map]"!=f(new s)||r&&"[object Promise]"!=f(r.resolve())||o&&"[object Set]"!=f(new o)||a&&"[object WeakMap]"!=f(new a))&&(f=function(e){var t=c(e),i="[object Object]"==t?e.constructor:void 0,n=i?l(i):"";if(n)switch(n){case d:return"[object DataView]";case p:return"[object Map]";case u:return"[object Promise]";case h:return"[object Set]";case g:return"[object WeakMap]"}return t}),e.exports=f},36825:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},82138:function(e,t,i){var n=i(64667),s=i(2952),r=i(81690),o=i(20968),a=i(8613),c=i(82773);e.exports=function(e,t,i){for(var l=-1,d=(t=n(t,e)).length,p=!1;++l<d;){var u=c(t[l]);if(!(p=null!=e&&i(e,u)))break;e=e[u]}return p||++l!=d?p:!!(d=null==e?0:e.length)&&a(d)&&o(u,d)&&(r(e)||s(e))}},59410:function(e,t,i){var n=i(95969);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},21143:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},604:function(e,t,i){var n=i(95969),s=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return s.call(t,e)?t[e]:void 0}},80584:function(e,t,i){var n=i(95969),s=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:s.call(t,e)}},7792:function(e,t,i){var n=i(95969);e.exports=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},62963:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var i=e.length,n=new e.constructor(i);return i&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},32143:function(e,t,i){var n=i(88461),s=i(59757),r=i(83615),o=i(42282),a=i(53769);e.exports=function(e,t,i){var c=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return s(e,i);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,i);case"[object Map]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return r(e);case"[object Set]":return new c;case"[object Symbol]":return o(e)}}},31563:function(e,t,i){var n=i(60920),s=i(52398),r=i(58845);e.exports=function(e){return"function"!=typeof e.constructor||r(e)?{}:n(s(e))}},20968:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,i){var n=typeof e;return!!(i=null==i?9007199254740991:i)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<i}},99743:function(e,t,i){var n=i(81690),s=i(7786),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!s(e))||o.test(e)||!r.test(e)||null!=t&&e in Object(t)}},36586:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},38466:function(e,t,i){var n,s=i(93412),r=(n=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!r&&r in e}},58845:function(e){var t=Object.prototype;e.exports=function(e){var i=e&&e.constructor;return e===("function"==typeof i&&i.prototype||t)}},45774:function(e,t,i){var n=i(53867);e.exports=function(e){return e==e&&!n(e)}},63391:function(e){e.exports=function(){this.__data__=[],this.size=0}},68971:function(e,t,i){var n=i(15758),s=Array.prototype.splice;e.exports=function(e){var t=this.__data__,i=n(t,e);return!(i<0||(i==t.length-1?t.pop():s.call(t,i,1),--this.size,0))}},18858:function(e,t,i){var n=i(15758);e.exports=function(e){var t=this.__data__,i=n(t,e);return i<0?void 0:t[i][1]}},37490:function(e,t,i){var n=i(15758);e.exports=function(e){return n(this.__data__,e)>-1}},68944:function(e,t,i){var n=i(15758);e.exports=function(e,t){var i=this.__data__,s=n(i,e);return s<0?(++this.size,i.push([e,t])):i[s][1]=t,this}},70536:function(e,t,i){var n=i(41505),s=i(73545),r=i(39046);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(r||s),string:new n}}},61502:function(e,t,i){var n=i(85556);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},94960:function(e,t,i){var n=i(85556);e.exports=function(e){return n(this,e).get(e)}},61539:function(e,t,i){var n=i(85556);e.exports=function(e){return n(this,e).has(e)}},34138:function(e,t,i){var n=i(85556);e.exports=function(e,t){var i=n(this,e),s=i.size;return i.set(e,t),this.size+=i.size==s?0:1,this}},37461:function(e){e.exports=function(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}},63587:function(e){e.exports=function(e,t){return function(i){return null!=i&&i[e]===t&&(void 0!==t||e in Object(i))}}},43911:function(e,t,i){var n=i(97425);e.exports=function(e){var t=n(e,function(e){return 500===i.size&&i.clear(),e}),i=t.cache;return t}},95969:function(e,t,i){var n=i(4153)(Object,"create");e.exports=n},36700:function(e,t,i){var n=i(93332)(Object.keys,Object);e.exports=n},25618:function(e){e.exports=function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t}},70938:function(e,t,i){e=i.nmd(e);var n=i(61138),s=t&&!t.nodeType&&t,r=s&&e&&!e.nodeType&&e,o=r&&r.exports===s&&n.process,a=function(){try{return r&&r.require&&r.require("util").types||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a},81244:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},93332:function(e){e.exports=function(e,t){return function(i){return e(t(i))}}},27038:function(e,t,i){var n=i(61138),s="object"==typeof self&&self&&self.Object===Object&&self,r=n||s||Function("return this")();e.exports=r},30365:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},58235:function(e){e.exports=function(e){return this.__data__.has(e)}},57673:function(e){e.exports=function(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}},18034:function(e,t,i){var n=i(73545);e.exports=function(){this.__data__=new n,this.size=0}},37238:function(e){e.exports=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i}},75887:function(e){e.exports=function(e){return this.__data__.get(e)}},81450:function(e){e.exports=function(e){return this.__data__.has(e)}},61386:function(e,t,i){var n=i(73545),s=i(39046),r=i(93177);e.exports=function(e,t){var i=this.__data__;if(i instanceof n){var o=i.__data__;if(!s||o.length<199)return o.push([e,t]),this.size=++i.size,this;i=this.__data__=new r(o)}return i.set(e,t),this.size=i.size,this}},54299:function(e){e.exports=function(e,t,i){for(var n=i-1,s=e.length;++n<s;)if(e[n]===t)return n;return-1}},89775:function(e,t,i){var n=i(43911),s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,o=n(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(s,function(e,i,n,s){t.push(n?s.replace(r,"$1"):i||e)}),t});e.exports=o},82773:function(e,t,i){var n=i(7786);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},51217:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(i){}try{return e+""}catch(i){}}return""}},37524:function(e,t,i){var n=i(77007);e.exports=function(e){return n(e,5)}},71166:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},58102:function(e,t,i){var n=i(93436);e.exports=function(e,t,i){var s=null==e?void 0:n(e,t);return void 0===s?i:s}},18303:function(e,t,i){var n=i(55333),s=i(82138);e.exports=function(e,t){return null!=e&&s(e,t,n)}},80290:function(e){e.exports=function(e){return e}},2952:function(e,t,i){var n=i(77090),s=i(27503),r=Object.prototype,o=r.hasOwnProperty,a=r.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return s(e)&&o.call(e,"callee")&&!a.call(e,"callee")};e.exports=c},81690:function(e){e.exports=Array.isArray},93406:function(e,t,i){var n=i(55836),s=i(8613);e.exports=function(e){return null!=e&&s(e.length)&&!n(e)}},84444:function(e,t,i){e=i.nmd(e);var n=i(27038),s=i(61711),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r?n.Buffer:void 0;e.exports=(a?a.isBuffer:void 0)||s},49977:function(e,t,i){var n=i(30696);e.exports=function(e,t){return n(e,t)}},55836:function(e,t,i){var n=i(72802),s=i(53867);e.exports=function(e){if(!s(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},8613:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},32e3:function(e,t,i){var n=i(63434),s=i(70544),r=i(70938),o=r&&r.isMap,a=o?s(o):n;e.exports=a},53867:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},27503:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},48855:function(e,t,i){var n=i(67495),s=i(70544),r=i(70938),o=r&&r.isSet,a=o?s(o):n;e.exports=a},7786:function(e,t,i){var n=i(72802),s=i(27503);e.exports=function(e){return"symbol"==typeof e||s(e)&&"[object Symbol]"==n(e)}},47679:function(e,t,i){var n=i(99390),s=i(70544),r=i(70938),o=r&&r.isTypedArray,a=o?s(o):n;e.exports=a},59108:function(e,t,i){var n=i(71890),s=i(92488),r=i(93406);e.exports=function(e){return r(e)?n(e):s(e)}},42970:function(e,t,i){var n=i(71890),s=i(50762),r=i(93406);e.exports=function(e){return r(e)?n(e,!0):s(e)}},97425:function(e,t,i){var n=i(93177);function s(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var n=arguments,s=t?t.apply(this,n):n[0],r=i.cache;if(r.has(s))return r.get(s);var o=e.apply(this,n);return i.cache=r.set(s,o)||r,o};return i.cache=new(s.Cache||n),i}s.Cache=n,e.exports=s},49122:function(e){e.exports=function(){}},63354:function(e,t,i){var n=i(68840),s=i(59866),r=i(99743),o=i(82773);e.exports=function(e){return r(e)?n(o(e)):s(e)}},65336:function(e){e.exports=function(){return[]}},61711:function(e){e.exports=function(){return!1}},41233:function(e,t,i){var n=i(68166);e.exports=function(e){return null==e?"":n(e)}},76394:function(e,t,i){var n=i(5245),s=i(83987);e.exports=function(e,t){return e&&e.length?s(e,n(t,2)):[]}},39426:function(e,t,i){"use strict";i.d(t,{p:function(){return o}});var n=i(77393),s=i(33637);const r={leading:!0,trailing:!1};function o(e,t=s.P,i=r){return n=>n.lift(new a(e,t,i.leading,i.trailing))}class a{constructor(e,t,i,n){this.duration=e,this.scheduler=t,this.leading=i,this.trailing=n}call(e,t){return t.subscribe(new c(e,this.duration,this.scheduler,this.leading,this.trailing))}}class c extends n.L{constructor(e,t,i,n,s){super(e),this.duration=t,this.scheduler=i,this.leading=n,this.trailing=s,this._hasTrailingValue=!1,this._trailingValue=null}_next(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(l,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))}_complete(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}clearThrottle(){const e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)}}function l(e){const{subscriber:t}=e;t.clearThrottle()}},86936:function(e,t,i){"use strict";i.r(t),i.d(t,{DriveModule:function(){return zc},STATE_HANDLERS:function(){return Jc}});var n=i(38583),s=i(63423),r=i(64762),o=i(37716),a=i(47661),c=i(93342),l=i(68939);let d=(()=>{class e{}return e.type="[Drive] Load User Folders",e})(),p=(()=>{class e{}return e.type="[Drive] Load User Space Usage",e})(),u=(()=>{class e{constructor(e){this.folders=e}}return e.type="[Drive] Build Folder Tree",e})(),h=(()=>{class e{constructor(e){this.folder=e}}return e.type="[Drive] Open Folder",e})(),g=(()=>{class e{constructor(e){this.queryParams=e}}return e.type="[Drive] Open Search Page",e})(),f=(()=>{class e{constructor(e){this.entries=e}}return e.type="[Drive] Select Entries",e})(),m=(()=>{class e{}return e.type="[Drive] Select All Entries",e})(),v=(()=>{class e{}return e.type="[Drive] Deselect All Entries",e})(),b=(()=>{class e{}return e.type="[Drive] Delete Selected Entries",e})(),w=(()=>{class e{}return e.type="[Drive] Open UploadsApiService Panel",e})(),x=(()=>{class e{}return e.type="[Drive] Close UploadsApiService Panel",e})(),y=(()=>{class e{constructor(e){this.entries=e}}return e.type="[Drive] Add Entries",e})(),_=(()=>{class e{constructor(e,t){this.destination=e,this.entries=t}}return e.type="[Drive API] Move Entries",e})(),k=(()=>{class e{constructor(e,t,i){this.dialog=e,this.data=t,this.config=i}}return e.type="[Drive] Open Dialog",e})(),C=(()=>{class e{constructor(e,t){this.data=e,this.confirmAction=t}}return e.type="[Drive] Open Confirm Dialog",e})(),A=(()=>{class e{constructor(e){this.mode=e}}return e.type="[Drive] Set View Mode",e})(),Z=(()=>{class e{}return e.type="[Drive] Toggle Details",e})(),O=(()=>{class e{}return e.type="[Drive] Toggle Sidebar",e})(),S=(()=>{class e{constructor(e){this.files=e}}return e.type="[Drive] Upload Files",e})(),I=(()=>{class e{constructor(e){this.entries=e}}return e.type="[Drive] Restore Trashed Entries",e})(),T=(()=>{class e{}return e.type="[Drive] Delete Trashed Entries Forever",e})(),E=(()=>{class e{}return e.type="[Drive] Empty Trash",e})(),P=(()=>{class e{constructor(e){this.entries=e}}return e.type="[Drive] Open File Preview Overlay",e})(),F=(()=>{class e{constructor(e,t,i){this.entries=e,this.link=t,this.password=i}}return e.type="[Drive] Download Files",e})(),M=(()=>{class e{constructor(e){this.entries=e}}return e.type="[Drive] Add a Star",e})(),U=(()=>{class e{constructor(e){this.entries=e}}return e.type="[Drive] Remove Star",e})(),D=(()=>{class e{constructor(e){this.entries=e}}return e.type="[Drive] Remove Entries",e})(),L=(()=>{class e{constructor(e={}){this.queryParams=e,this.loadMore=!0}}return e.type="[Drive Infinite Scroll] Load More Entries",e})(),q=(()=>{class e{constructor(e={},t){this.queryParams=e,this.page=t}}return e.type="[Drive] Reload Page Entries",e})(),N=(()=>{class e{}return e.type="[Drive] Copy Selected Entries",e})(),$=(()=>{class e{constructor(e){this.type=e}}return e.type="[Drive] Open Upload Window",e})(),B=(()=>{class e{constructor(e){this.message=e}}return e.type="[Drive] Show Loading Toast",e})(),Y=(()=>{class e{}return e.type="[Drive] Hide Loading Toast",e})(),R=(()=>{class e{}return e.type="[Drive] Reset State",e})(),Q=(()=>{class e{constructor(e){this.entries=e}}return e.type="[Drive] Update Entries",e})(),j=(()=>{class e{constructor(e){this.user=e}}return e.type="[Drive] Set Current User",e})(),J=(()=>{class e{constructor(e){this.workspace=e}}return e.type="[Drive] Set Workspace",e})(),z=(()=>{class e{constructor(e,t){this.entry=e,this.description=t}}return e.type="[Drive] Update Entry Description",e})();class V{constructor(e){this.name=null,this.viewName=null,this.folder=null,this.folderHash=null,this.hasActions=!1,this.sortColumn="updated_at",this.sortDirection="desc",this.queryParams={},Object.keys(e).forEach(t=>{this[t]=e[t]})}}const H=new V({name:"recent",viewName:"Recent",disableSort:!0,sortColumn:"created_at",sortDirection:"desc",queryParams:{recentOnly:!0}}),G=new V({name:"search",viewName:"Search results"}),W=new V({name:"shares",viewName:"Shared",queryParams:{sharedOnly:!0}}),X=new V({name:"trash",viewName:"Trash",hasActions:!0,queryParams:{deletedOnly:!0}}),K=new V({name:"workspaces",viewName:"Workspaces"}),ee=new V({name:"starred",viewName:"Starred",queryParams:{starredOnly:!0}});class te extends V{constructor(e){super({name:"folder",viewName:null==e?void 0:e.name,folder:e,folderHash:null==e?void 0:e.hash,hasActions:!0})}}let ie=(()=>{class e{constructor(){this.page=H,this.queryParams={orderBy:"created_at",recentOnly:!0}}}return e.type="[Drive] Recent Entries Page Opened",e})(),ne=(()=>{class e{constructor(e){this.queryParams={},this.page=new te({hash:e})}}return e.type="[Drive] Folder Page Opened",e})(),se=(()=>{class e{constructor(){this.page=W,this.queryParams={sharedOnly:!0}}}return e.type="[Drive] Shared folder opened",e})(),re=(()=>{class e{constructor(){this.page=X,this.queryParams={deletedOnly:!0}}}return e.type="[Drive] Trash Page Opened",e})(),oe=(()=>{class e{constructor(){this.page=K}}return e.type="[Drive] Workspaces Index Page Opened",e})(),ae=(()=>{class e{constructor(e={}){this.queryParams=e,this.page=G}}return e.type="[Drive] Search Page Opened",e})(),ce=(()=>{class e{constructor(){this.page=ee,this.queryParams={starredOnly:!0}}}return e.type="[Drive] Starred Entries Page Opened",e})(),le=(()=>{class e{constructor(e){this.entries=e}}return e.type="[Drive] Entries Selected Via Drag",e})(),de=(()=>{class e{constructor(e){this.entries=e}}return e.type="[Drive] File Selected Via ContextMenu",e})(),pe=(()=>{class e{constructor(e,t=!1){this.entry=e,this.ctrlKey=t}}return e.type="[Drive] User Tapped File",e})(),ue=(()=>{class e{constructor(e){this.entry=e}}return e.type="[Drive] User Double Tapped Entry",e})(),he=(()=>{class e{constructor(e){this.deletedFiles=e}}return e.type="[Drive] Successfully Deleted Files",e})(),ge=(()=>{class e{constructor(e){this.entry=e}}return e.type="[Drive] Entry Context Menu Opened",e})(),fe=(()=>{class e{constructor(e){this.folder=e}}return e.type="[Drive] New Folder Created",e})(),me=(()=>{class e{constructor(e,t){this.entry=e,this.newName=t}}return e.type="[Drive] Entry Renamed",e})(),ve=(()=>{class e{}return e.type="[Drive] Started Dragging",e})(),be=(()=>{class e{}return e.type="[Drive] Stopped Dragging",e})(),we=(()=>{class e{constructor(e,t,i){this.destination=e,this.oldLocation=t,this.entries=i}}return e.type="[Drive API] Move Entries Success",e})(),xe=(()=>{class e{constructor(e){this.messages=e}}return e.type="[Drive API] Move Entries Failed",e})(),ye=(()=>{class e{constructor(e){this.entries=e}}return e.type="[Drive API] Trashed Entries Delete Forever Success",e})(),_e=(()=>{class e{constructor(e){this.entries=e}}return e.type="[Drive API] Trashed Entries Restore Success",e})(),ke=(()=>{class e{}return e.type="[Drive] Not Enough Space Error",e})(),Ce=(()=>{class e{}return e.type="[Drive] User Space Usage Changed",e})(),Ae=(()=>{class e{constructor(e){this.status=e}}return e.type="[Drive] BreakpointChanged",e})();const Ze={isMobile:!1,activePage:null,folderTree:[],flatFolders:[],userFoldersLoaded:!1,entries:[],selectedEntries:[],dragging:!1,loading:!1,uploadsPanelOpen:!1,viewMode:"grid",detailsVisible:!0,sidebarOpen:!0,currentUser:null,activeWorkspace:null,spaceUsage:{available:null,used:null},meta:{sortColumn:"updated_at",sortDirection:"desc",currentPage:0,lastPage:0}};var Oe=i(41880),Se=(()=>(function(e){e.copyEntries="Copying items...",e.emptyTrash="Emptying trash...",e.moveEntries="Moving items..."}(Se||(Se={})),Se))();const Ie=new o.OlP("DRIVE_UPLOAD_INPUT_CONFIG");var Te=i(24162),Ee=(()=>(function(e){e.GET_ALL="drive/folders",e.CREATE="drive/folders"}(Ee||(Ee={})),Ee))(),Pe=i(90299),Fe=i(24688);let Me=(()=>{class e{constructor(e,t){this.http=e,this.currentUser=t}getAll(e){return this.http.get(Ee.GET_ALL,e)}getAllForCurrentUser(){return this.http.get("drive/users/"+this.currentUser.get("id")+"/folders")}create(e){return this.http.post(Ee.CREATE,e)}getByHash(e){return this.http.get("drive/folders/find",{hash:e})}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(Pe.r),o.LFG(Fe.I))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Ue=(()=>{class e{constructor(e,t){this.http=e,this.currentUser=t}getEntriesForFolder(e={}){return this.http.get("drive/entries",e)}getCurrentUserEntries(e){return e.userId=this.currentUser.get("id"),this.http.get("drive/entries",e)}update(e,t){return this.http.put("uploads/"+e,t)}delete(e){return this.http.delete("drive/entries",e)}copy(e){return this.http.post("drive/entries/copy",e)}restore(e){return this.http.post("drive/entries/restore",e)}emptyTrash(){return this.delete({emptyTrash:!0})}moveEntries(e){return this.http.post("drive/entries/move",e)}addStar(e){return this.http.post("drive/entries/star",{entryIds:e})}removeStar(e){return this.http.post("drive/entries/unstar",{entryIds:e})}getSpaceUsage(){return this.http.get("drive/user/space-usage")}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(Pe.r),o.LFG(Fe.I))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),De=(()=>{class e{driveRoot(){return"/drive"}folder(e){return(null==e?void 0:e.id)?`/drive/folders/${e.hash}`:this.driveRoot()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var Le=i(56456),qe=i(90962),Ne=i(18715),$e=i(68756),Be=i(16850),Ye=i(45746),Re=i(43256);let Qe=(()=>{class e extends Ne.c{constructor(){super(...arguments),this.DEFAULT_MAX_FILE_SIZE_MB=8}initValidations(){this.validations.push(new $e.p({maxSize:this.getMaxFileSize()},this.i18n));const e=this.getAllowedExtensions(),t=this.getBlockedExtensions();e&&e.length&&this.validations.push(new Ye.G({extensions:e},this.i18n)),t&&t.length&&this.validations.push(new Re.u({extensions:t},this.i18n))}getMaxFileSize(){return this.settings.get("uploads.max_size",(0,Be.F)(this.DEFAULT_MAX_FILE_SIZE_MB,"MB"))}getAllowedExtensions(){return this.settings.getJson("uploads.allowed_extensions")}getBlockedExtensions(){return this.settings.getJson("uploads.blocked_extensions")}}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var je,Je=i(87991),ze=i(35718);let Ve=je=class{constructor(e,t,i,n,s,r,o,a,c,l,d){this.foldersApi=e,this.entriesApi=t,this.router=i,this.driveUrls=n,this.uploads=s,this.store=r,this.localStore=o,this.validator=a,this.workspaces=c,this.toast=l,this.uploadInputConfig=d}static flatFolders(e){return e.flatFolders}static userFoldersLoaded(e){return e.userFoldersLoaded}static activePage(e){return e.activePage}static activePageName(e){return e.activePage.name}static userFolders(e){return e.folderTree}static selectedEntries(e){return e.selectedEntries}static selectedEntryIds(e,t){return t.map(e=>e.id)}static selectedEntry(e,t){return t?t[t.length-1]:null}static selectedEntryOrActiveFolder(e,t){return t||e.activePage.folder}static selectedEntryParent(e,t,i){return t&&i&&t.parent_id?i.find(e=>e.id===t.parent_id):e.rootFolder}static anythingSelected(e,t){return t.length>0}static allSelectedEntriesStarred(e,t){return t.every(e=>!!e.tags.find(e=>"starred"===e.name))}static onlyFoldersSelected(e,t){return t.every(e=>"folder"===e.type)}static entries(e){return e.entries}static entriesEmpty(e){return e.meta.currentPage&&!e.loading&&0===e.entries.length}static multipleEntriesSelected(e,t){return t.length>1}static activeFolder(e){return e.activePage.folder}static rootFolder(e){return e.rootFolder}static meta(e){return e.meta}static dragging(e){return e.dragging}static loading(e){return e.loading}static currentPage(e){return e.meta.currentPage}static viewMode(e){return e.viewMode}static detailsOpen(e){return e.detailsVisible}static sidebarOpen(e){return e.sidebarOpen}static sortColumn(e){return e.meta.sortColumn}static sortDirection(e){return e.meta.sortDirection}static canLoadMoreEntries(e){return e.meta.currentPage<e.meta.lastPage}static userSpaceUsed(e){return e.spaceUsage.used}static userSpaceAvailable(e){return e.spaceUsage.available}static spaceUsedPercent(e,t,i){return null===i?0:100*t/i}static isMobile(e){return e.isMobile}static userHasPermission(e,t,i){if(!t||!i)return!1;const n=t.users.find(e=>e.id===i.id);return!(!n.owns_entry&&!n.entry_permissions[e])||void 0}static currentUser(e){return e.currentUser}static activeWorkspace(e){return e.activeWorkspace}static userOwnsActiveFolder(e,t,i){return je.userHasPermission("owner",t,i)}static userOwnsSelectedEntries(e,t,i){return t.every(e=>je.userHasPermission("owner",e,i))}static userCanEditSelectedEntries(e,t,i){return t.every(e=>{const t=e.users.find(e=>e.id===i.id);return t&&(t.owns_entry||t.entry_permissions.edit)})}static canUpload(e,t,i,n){if(!t.folder||!i||!n)return!1;if((null==n?void 0:n.id)&&t.folder.workspace_id===n.id){const e=n.currentUser;return e&&(e.is_owner||e.permissions.findIndex(e=>"files.create"===e.name)>-1)}return je.userHasPermission("edit",t.folder,i)}loadUserFolders(e){return this.foldersApi.getAllForCurrentUser().pipe((0,c.b)(t=>(e.patchState({rootFolder:t.rootFolder}),e.dispatch(new u(t.folders)))))}buildFolderTree(e,t){const i=t.folders||e.getState().flatFolders,n=function(e){const t={},i=[];for(let n=0,s=e.length;n<s;n++){const i=e[n];i.children=[],t[i.id]=i}for(const n in t){if(!t.hasOwnProperty(n))continue;const e=t[n];if(e.parent_id){const i=t[e.parent_id];i&&i.children.push(e)}else i.push(e)}return i}(i);e.patchState({folderTree:n,flatFolders:i,userFoldersLoaded:!0})}workspacesIndexPageOpened(e,t){e.patchState({activePage:t.page})}loadDriveEntries(e,t){const i=e.getState(),n={loading:!0,meta:Object.assign({},i.meta)};n.activePage=t.page?t.page:i.activePage,n.meta.sortColumn=t.queryParams.orderBy||i.meta.sortColumn||n.activePage.sortColumn,n.meta.sortDirection=t.queryParams.orderDir||i.meta.sortDirection||n.activePage.sortDirection,"search"!==n.activePage.name&&(n.meta.query=null,n.meta.filters=null),n.meta.query=t.queryParams.query||n.meta.query,n.meta.filters=t.queryParams.filters||n.meta.filters,e.patchState(n);const s=this.transformQueryParams(Object.assign(Object.assign({},t.queryParams),n.activePage.queryParams));return"search"!==n.activePage.name||n.meta.query||n.meta.filters?this.entriesApi.getEntriesForFolder(s).pipe((0,c.b)(s=>{const r={entries:(t.loadMore?i.entries:[]).concat(s.data),meta:Object.assign(Object.assign({},n.meta),{lastPage:s.last_page,currentPage:s.current_page}),loading:!1};return r.activePage=Object.assign(Object.assign({},n.activePage),{folder:s.folder}),e.patchState(r)},()=>e.patchState({loading:!1}))):e.patchState({entries:[],loading:!1,activePage:n.activePage,meta:Object.assign(Object.assign({},n.meta),{lastPage:1,currentPage:1})})}openFolder(e,t){const i=e.getState().activePage.folder;if(!i||t.folder.id!==i.id)return t.folder&&t.folder.deleted_at?e.dispatch(new C({title:"Folder is in trash",body:"To view this folder, you need to restore it first.",ok:"Restore"},new I([t.folder]))):(e.patchState({loading:!0}),this.router.navigate([this.driveUrls.folder(t.folder)]))}openSearchPage(e,t){return e.patchState({loading:!0}),this.router.navigate(["/drive/search"],{queryParams:t.queryParams})}selectEntries(e,t){e.patchState({selectedEntries:t.entries})}deselectAllEntries(e){e.getState().selectedEntries.length&&e.patchState({selectedEntries:[]})}SelectAllEntries(e){e.patchState({selectedEntries:e.getState().entries.slice()})}entryTapped(e,t){const i=e.getState().selectedEntries.slice();let n=!1;const s=i.findIndex(e=>e.id===t.entry.id);s>-1&&(i.splice(s,1),n=!0),e.patchState(t.ctrlKey?n?{selectedEntries:i}:{selectedEntries:[...i,t.entry]}:{selectedEntries:[t.entry]}),e.getState().isMobile&&this.entryDoubleTapped(e,t)}entryDoubleTapped(e,t){return e.dispatch("folder"===t.entry.type?new h(t.entry):new P([t.entry]))}deleteSelectedEntries(e){const t=this.store.selectSnapshot(je.selectedEntries),i=this.store.selectSnapshot(je.selectedEntryIds),n=this.store.selectSnapshot(je.flatFolders),s=e.getState().activePage;return this.entriesApi.delete({entryIds:i}).pipe((0,c.b)(()=>{const r={entries:e.getState().entries.filter(e=>-1===i.indexOf(e.id))},o=[new he(t)];r.selectedEntries=[],s.folder&&i.indexOf(s.folder.id)>-1&&this.store.dispatch(new h(this.store.selectSnapshot(je.selectedEntryParent)));const a=t.filter(e=>"folder"===e.type);return a.length&&(a.forEach(e=>delete n[e.id]),r.flatFolders=n,o.push(new u)),e.patchState(r),e.dispatch(o)}))}fileContextMenuOpened(e,t){var i;if(null===(i=null==t?void 0:t.entry)||void 0===i?void 0:i.id)return e.getState().selectedEntries.find(e=>e.id===t.entry.id)?void 0:e.dispatch(new de([t.entry]))}newFolderCreated(e,t){const i=e.getState(),n={flatFolders:[...i.flatFolders,t.folder]};return t.folder.parent_id===i.activePage.folder.id&&(n.entries=[t.folder,...i.entries]),e.patchState(n),e.dispatch(new u)}entryRenamed(e,t){const i=e.getState(),n={entries:i.entries.slice()},s=n.entries.findIndex(e=>e.id===t.entry.id);if(s>-1&&(n.entries[s]=Object.assign(Object.assign({},n.entries[s]),{name:t.newName})),n.selectedEntries=[Object.assign(Object.assign({},i.selectedEntries[0]),{name:t.newName})],i.activePage.folder&&i.activePage.folder.id===t.entry.id&&(n.activePage=Object.assign(Object.assign({},i.activePage),{folder:t.entry})),"folder"===t.entry.type){const s=Object.assign({},i.flatFolders);s[t.entry.id]=Object.assign(Object.assign({},s[t.entry.id]),{name:t.newName}),n.flatFolders=s,e.dispatch(new u)}e.patchState(n)}startedDragging(e){e.patchState({dragging:!0})}stoppedDragging(e){e.patchState({dragging:!1})}movieEntries(e,t){var i;const n=t.entries||e.getState().selectedEntries;if(!je.canMoveEntriesTo(n,t.destination))return;e.dispatch(new B(Se.moveEntries));const s=n[0].parent_id;return this.entriesApi.moveEntries({entryIds:n.map(e=>e.id),destination:null===(i=t.destination)||void 0===i?void 0:i.id}).pipe((0,l.x)(()=>e.dispatch(new Y)),(0,c.b)(i=>{var n;return e.dispatch(new we(null===(n=t.destination)||void 0===n?void 0:n.id,s,i.entries))},t=>e.dispatch(new xe(t.errors))))}moveEntriesSuccess(e,t){const i=e.getState(),n=t.entries.map(e=>e.id),s=t.entries.filter(e=>"folder"===e.type),r={selectedEntries:[],entries:i.entries.filter(e=>-1===n.indexOf(e.id))};if(s.length&&(r.flatFolders=Object.assign({},i.flatFolders),t.entries.filter(e=>"folder"===e.type).forEach(e=>r.flatFolders[e.id]=e)),i.activePage.folder){const e=t.entries.find(e=>i.activePage.folder.id===e.id);e&&(r.activePage=Object.assign(Object.assign({},i.activePage),{folder:e}))}return e.patchState(r),e.dispatch(new u)}setViewMode(e,t){this.localStore.set("bedrive.viewMode",t.mode),e.patchState({viewMode:t.mode})}toggleDetailsSidebar(e){e.patchState({detailsVisible:!e.getState().detailsVisible})}toggleSidebar(e){e.patchState({sidebarOpen:!e.getState().sidebarOpen})}addEntries(e,t){const i=e.getState().entries,n=e.getState().spaceUsage,s=t.entries.filter(e=>!i.find(t=>t.id===e.id)),r=s.filter(e=>"folder"!==e.type).reduce((e,t)=>e+t.file_size,0);e.patchState({entries:[...s,...i],spaceUsage:Object.assign(Object.assign({},n),{used:n.used+r})})}uploadFiles(e,t){if(!this.enoughSpaceLeftToUpload(e.getState().spaceUsage,t.files))return e.dispatch(new ke);if(!t.files.length)return;e.dispatch(new w);const i=e.getState().activePage.folder.id||null;return this.uploads.start(t.files,{httpParams:{parentId:i},validator:this.validator}).pipe((0,c.b)(t=>{const n=[...t.fileEntry.all_parents,t.fileEntry],s=n.filter(e=>e&&e.parent_id===i),r=e.getState().activePage;r.folder&&r.folder.id===i&&e.dispatch(new y(s));const o=n.filter(e=>e&&"folder"===e.type);if(o.length){const t=[...e.getState().flatFolders,...o];e.patchState({flatFolders:t}),e.dispatch(new u)}}))}deleteTrashedEntriesForever(e){const t=this.store.selectSnapshot(je.selectedEntries),i=t.map(e=>e.id),n=e.getState().entries.filter(e=>-1===i.indexOf(e.id));return this.entriesApi.delete({entryIds:i,deleteForever:!0}).pipe((0,c.b)(()=>(e.patchState({entries:n,selectedEntries:[]}),e.dispatch([new ye(t),new Ce]))))}restoreTrashedEntries(e,t){const i=this.store.selectSnapshot(je.activePage),n=t.entries||this.store.selectSnapshot(je.selectedEntries),s=n.map(e=>e.id);let r;return r=i.name===X.name?e.getState().entries.filter(e=>-1===s.indexOf(e.id)):[...e.getState().entries,...t.entries],this.entriesApi.restore({entryIds:s}).pipe((0,c.b)(()=>(e.patchState({entries:r,selectedEntries:[]}),e.dispatch(new _e(n)))))}emptyTrash(e){return e.dispatch(new B(Se.emptyTrash)),this.entriesApi.emptyTrash().pipe((0,l.x)(()=>e.dispatch(new Y)),(0,c.b)(()=>(e.patchState({entries:[],selectedEntries:[]}),e.dispatch(new Ce))))}addStar(e,t){const i=e.getState(),n=t.entries.map(e=>e.id);return this.entriesApi.addStar(n).pipe((0,c.b)(t=>{const s=i.entries.map(e=>(n.indexOf(e.id)>-1&&(e.tags||(e.tags=[]),e.tags.push(t.tag)),e)),r=i.selectedEntries.map(e=>(e.tags.push(t.tag),e));e.patchState({entries:s,selectedEntries:r})}))}removeStar(e,t){const i=e.getState(),n=t.entries.map(e=>e.id);return this.entriesApi.removeStar(n).pipe((0,c.b)(t=>{const s=i.entries.map(e=>(n.indexOf(e.id)>-1&&this.removeTag(e,t.tag),e)),r=i.selectedEntries.map(e=>this.removeTag(e,t.tag));e.patchState({entries:s,selectedEntries:r})}))}removeEntries(e,t){const i=t.entries.map(e=>e.id),n=e.getState().entries.filter(e=>-1===i.indexOf(e.id));e.patchState({entries:n}),this.toast.open({message:"Removed :count items.",replacements:{count:i.length}})}copySelectedEntries(e){const t=this.store.selectSnapshot(je.selectedEntries),i=t.map(e=>e.id),n=t.filter(e=>"folder"===e.type),s=e.getState();return this.enoughSpaceLeftToUpload(e.getState().spaceUsage,t)?(e.dispatch(new B(Se.copyEntries)),this.entriesApi.copy({entryIds:i}).pipe((0,l.x)(()=>e.dispatch(new Y)),(0,c.b)(t=>{const r={};e.getState().activePage.folder&&(r.entries=s.entries.concat(t.entries)),n.length&&(r.flatFolders=Object.assign({},s.flatFolders),t.entries.filter(e=>"folder"===e.type).forEach(e=>r.flatFolders.push(e))),e.patchState(r),e.dispatch(new Ce),n.length&&e.dispatch(new u);const o=this.store.selectSnapshot(je.activePage);this.toast.open({message:"Copied :count file(s) into :location.",replacements:{count:i.length,location:"shares"===o.name?`${this.workspaces.activeWorkspace$.value.name} workspace`:o.folder.name}})}))):e.dispatch(new ke)}openUploadWindow(e,t){const i=Object.assign(Object.assign({},this.uploadInputConfig),{directory:"directory"===t.type});(0,Oe.r)(i).then(t=>{t&&t.length&&e.dispatch(new S(t))})}loadUserSpaceUsage(e){return this.entriesApi.getSpaceUsage().pipe((0,c.b)(t=>{e.patchState({spaceUsage:{used:t.used,available:t.available}})}))}updateEntries(e,t){const i=e.getState().entries.slice(),n=e.getState().selectedEntries.slice();t.entries.forEach(e=>{const t=i.findIndex(t=>e.id===t.id);i[t]=Object.assign(Object.assign({},i[t]),e);const s=n.findIndex(t=>e.id===t.id);s>-1&&(n[s]=Object.assign(Object.assign({},n[s]),e))}),e.patchState({entries:i,selectedEntries:n})}updateEntryDescription(e,{entry:t,description:i}){return this.entriesApi.update(t.id,{description:i}).pipe((0,c.b)(t=>{e.dispatch(new Q([t.fileEntry]))}))}breakpointChanged(e,t){e.patchState({isMobile:t.status.isMobile,sidebarOpen:!t.status.isMobile,detailsVisible:!t.status.isMobile})}setCurrentUser(e,t){e.patchState({currentUser:t.user})}setWorkspace(e,t){e.patchState({activeWorkspace:t.workspace})}resetState(e){e.setState(Object.assign(Object.assign({},Ze),{viewMode:e.getState().viewMode}))}transformQueryParams(e){const t=this.store.selectSnapshot(je.activePage),i=this.store.selectSnapshot(je.meta),n=Object.assign({orderBy:i.sortColumn,orderDir:i.sortDirection},e);return"folder"===t.name&&(n.folderId=t.folderHash),i.query&&(n.query=i.query),i.filters&&(n.filters=i.filters),n}enoughSpaceLeftToUpload(e,t){return t.reduce((e,t)=>e+((0,Te.w)("size",t)?t.size:t.file_size),0)+e.used<e.available}removeTag(e,t){return e.tags=e.tags.filter(e=>e.id!==t.id),e}static canMoveEntriesTo(e,t){return(!t||"folder"===t.type)&&e.every(e=>!((null==t?void 0:t.id)===e.parent_id||t&&t.path.startsWith(e.path)))}};Ve.\u0275fac=function(e){return new(e||Ve)(o.LFG(Me),o.LFG(Ue),o.LFG(s.F0),o.LFG(De),o.LFG(Le.A),o.LFG(a.yh),o.LFG(qe.m),o.LFG(Qe),o.LFG(Je.b),o.LFG(ze.F),o.LFG(Ie))},Ve.\u0275prov=o.Yz7({token:Ve,factory:Ve.\u0275fac}),(0,r.gn)([(0,a.aU)(d)],Ve.prototype,"loadUserFolders",null),(0,r.gn)([(0,a.aU)(u)],Ve.prototype,"buildFolderTree",null),(0,r.gn)([(0,a.aU)(oe)],Ve.prototype,"workspacesIndexPageOpened",null),(0,r.gn)([(0,a.aU)(ne),(0,a.aU)(ie),(0,a.aU)(re),(0,a.aU)(ce),(0,a.aU)(ae,{cancelUncompleted:!0}),(0,a.aU)(se),(0,a.aU)(q),(0,a.aU)(L)],Ve.prototype,"loadDriveEntries",null),(0,r.gn)([(0,a.aU)(h,{cancelUncompleted:!0})],Ve.prototype,"openFolder",null),(0,r.gn)([(0,a.aU)(g,{cancelUncompleted:!0})],Ve.prototype,"openSearchPage",null),(0,r.gn)([(0,a.aU)(le),(0,a.aU)(de),(0,a.aU)(f)],Ve.prototype,"selectEntries",null),(0,r.gn)([(0,a.aU)(v)],Ve.prototype,"deselectAllEntries",null),(0,r.gn)([(0,a.aU)(m)],Ve.prototype,"SelectAllEntries",null),(0,r.gn)([(0,a.aU)(pe)],Ve.prototype,"entryTapped",null),(0,r.gn)([(0,a.aU)(ue)],Ve.prototype,"entryDoubleTapped",null),(0,r.gn)([(0,a.aU)(b)],Ve.prototype,"deleteSelectedEntries",null),(0,r.gn)([(0,a.aU)(ge)],Ve.prototype,"fileContextMenuOpened",null),(0,r.gn)([(0,a.aU)(fe)],Ve.prototype,"newFolderCreated",null),(0,r.gn)([(0,a.aU)(me)],Ve.prototype,"entryRenamed",null),(0,r.gn)([(0,a.aU)(ve)],Ve.prototype,"startedDragging",null),(0,r.gn)([(0,a.aU)(be)],Ve.prototype,"stoppedDragging",null),(0,r.gn)([(0,a.aU)(_)],Ve.prototype,"movieEntries",null),(0,r.gn)([(0,a.aU)(we)],Ve.prototype,"moveEntriesSuccess",null),(0,r.gn)([(0,a.aU)(A)],Ve.prototype,"setViewMode",null),(0,r.gn)([(0,a.aU)(Z)],Ve.prototype,"toggleDetailsSidebar",null),(0,r.gn)([(0,a.aU)(O)],Ve.prototype,"toggleSidebar",null),(0,r.gn)([(0,a.aU)(y)],Ve.prototype,"addEntries",null),(0,r.gn)([(0,a.aU)(S)],Ve.prototype,"uploadFiles",null),(0,r.gn)([(0,a.aU)(T)],Ve.prototype,"deleteTrashedEntriesForever",null),(0,r.gn)([(0,a.aU)(I)],Ve.prototype,"restoreTrashedEntries",null),(0,r.gn)([(0,a.aU)(E,{cancelUncompleted:!0})],Ve.prototype,"emptyTrash",null),(0,r.gn)([(0,a.aU)(M,{cancelUncompleted:!0})],Ve.prototype,"addStar",null),(0,r.gn)([(0,a.aU)(U,{cancelUncompleted:!0})],Ve.prototype,"removeStar",null),(0,r.gn)([(0,a.aU)(D)],Ve.prototype,"removeEntries",null),(0,r.gn)([(0,a.aU)(N)],Ve.prototype,"copySelectedEntries",null),(0,r.gn)([(0,a.aU)($)],Ve.prototype,"openUploadWindow",null),(0,r.gn)([(0,a.aU)(p),(0,a.aU)(Ce)],Ve.prototype,"loadUserSpaceUsage",null),(0,r.gn)([(0,a.aU)(Q)],Ve.prototype,"updateEntries",null),(0,r.gn)([(0,a.aU)(z)],Ve.prototype,"updateEntryDescription",null),(0,r.gn)([(0,a.aU)(Ae)],Ve.prototype,"breakpointChanged",null),(0,r.gn)([(0,a.aU)(j)],Ve.prototype,"setCurrentUser",null),(0,r.gn)([(0,a.aU)(J)],Ve.prototype,"setWorkspace",null),(0,r.gn)([(0,a.aU)(R)],Ve.prototype,"resetState",null),(0,r.gn)([(0,a.Qf)()],Ve,"flatFolders",null),(0,r.gn)([(0,a.Qf)()],Ve,"userFoldersLoaded",null),(0,r.gn)([(0,a.Qf)()],Ve,"activePage",null),(0,r.gn)([(0,a.Qf)()],Ve,"activePageName",null),(0,r.gn)([(0,a.Qf)()],Ve,"userFolders",null),(0,r.gn)([(0,a.Qf)()],Ve,"selectedEntries",null),(0,r.gn)([(0,a.Qf)([je.selectedEntries])],Ve,"selectedEntryIds",null),(0,r.gn)([(0,a.Qf)([je.selectedEntries])],Ve,"selectedEntry",null),(0,r.gn)([(0,a.Qf)([je.selectedEntry])],Ve,"selectedEntryOrActiveFolder",null),(0,r.gn)([(0,a.Qf)([je.selectedEntryOrActiveFolder,je.flatFolders])],Ve,"selectedEntryParent",null),(0,r.gn)([(0,a.Qf)([je.selectedEntries])],Ve,"anythingSelected",null),(0,r.gn)([(0,a.Qf)([je.selectedEntries])],Ve,"allSelectedEntriesStarred",null),(0,r.gn)([(0,a.Qf)([je.selectedEntries])],Ve,"onlyFoldersSelected",null),(0,r.gn)([(0,a.Qf)()],Ve,"entries",null),(0,r.gn)([(0,a.Qf)()],Ve,"entriesEmpty",null),(0,r.gn)([(0,a.Qf)([je.selectedEntries])],Ve,"multipleEntriesSelected",null),(0,r.gn)([(0,a.Qf)()],Ve,"activeFolder",null),(0,r.gn)([(0,a.Qf)()],Ve,"rootFolder",null),(0,r.gn)([(0,a.Qf)()],Ve,"meta",null),(0,r.gn)([(0,a.Qf)()],Ve,"dragging",null),(0,r.gn)([(0,a.Qf)()],Ve,"loading",null),(0,r.gn)([(0,a.Qf)()],Ve,"currentPage",null),(0,r.gn)([(0,a.Qf)()],Ve,"viewMode",null),(0,r.gn)([(0,a.Qf)()],Ve,"detailsOpen",null),(0,r.gn)([(0,a.Qf)()],Ve,"sidebarOpen",null),(0,r.gn)([(0,a.Qf)()],Ve,"sortColumn",null),(0,r.gn)([(0,a.Qf)()],Ve,"sortDirection",null),(0,r.gn)([(0,a.Qf)()],Ve,"canLoadMoreEntries",null),(0,r.gn)([(0,a.Qf)()],Ve,"userSpaceUsed",null),(0,r.gn)([(0,a.Qf)()],Ve,"userSpaceAvailable",null),(0,r.gn)([(0,a.Qf)([je.userSpaceUsed,je.userSpaceAvailable])],Ve,"spaceUsedPercent",null),(0,r.gn)([(0,a.Qf)()],Ve,"isMobile",null),(0,r.gn)([(0,a.Qf)()],Ve,"currentUser",null),(0,r.gn)([(0,a.Qf)()],Ve,"activeWorkspace",null),(0,r.gn)([(0,a.Qf)([je.activeFolder,je.currentUser])],Ve,"userOwnsActiveFolder",null),(0,r.gn)([(0,a.Qf)([je.selectedEntries,je.currentUser])],Ve,"userOwnsSelectedEntries",null),(0,r.gn)([(0,a.Qf)([je.selectedEntries,je.currentUser])],Ve,"userCanEditSelectedEntries",null),(0,r.gn)([(0,a.Qf)([je.activePage,je.currentUser,je.activeWorkspace])],Ve,"canUpload",null),Ve=je=(0,r.gn)([(0,a.ZM)({name:"drive",defaults:Ze})],Ve);const He=["audio","video","text","pdf","archive","folder","shared-folder","image","powerPoint","word","spreadsheet"];var Ge=i(35566),We=i(76627);let Xe=(()=>{class e{ngOnChanges(){!this.type&&this.mime&&(this.type=this.mime.split("/")[0]),He.includes(this.type)||(this.type="default")}getType(){return(0,Ge.f)(this.type).replace("_","-")}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Xpm({type:e,selectors:[["file-icon"]],inputs:{type:"type",mime:"mime"},features:[o.TTD],decls:1,vars:2,consts:[[1,"file-color",3,"svgIcon","ngClass"]],template:function(e,t){1&e&&o._UZ(0,"mat-icon",0),2&e&&o.Q6J("svgIcon",t.getType()+"-file-custom")("ngClass",t.getType()+"-file")},directives:[We.Hw,n.mk],styles:["file-icon{display:inline-block;flex-shrink:0;width:24px;height:24px}file-icon .mat-icon{width:100%;height:100%}"],encapsulation:2,changeDetection:0}),e})();function Ke(e,t){if(1&e&&(o.TgZ(0,"div",4),o._uU(1),o.qZA()),2&e){const e=o.oxw(2).ngIf;o.xp6(1),o.Oqu(e.length)}}function et(e,t){if(1&e&&(o.ynx(0),o._UZ(1,"file-icon",1),o.TgZ(2,"div",2),o._uU(3),o.qZA(),o.YNc(4,Ke,2,1,"div",3),o.BQk()),2&e){const e=o.oxw().ngIf;o.xp6(1),o.Q6J("type",e[0].type),o.xp6(2),o.Oqu(e[0].name),o.xp6(1),o.Q6J("ngIf",e.length>1)}}function tt(e,t){if(1&e&&(o.ynx(0),o.YNc(1,et,5,3,"ng-container",0),o.BQk()),2&e){const e=t.ngIf;o.xp6(1),o.Q6J("ngIf",e[0])}}class it{constructor(e){this.store=e,this.className="files-grid-item-footer"}get dragging(){return!this.store.selectSnapshot(Ve.dragging)}}it.\u0275fac=function(e){return new(e||it)(o.Y36(a.yh))},it.\u0275cmp=o.Xpm({type:it,selectors:[["entry-drag-preview"]],hostVars:4,hostBindings:function(e,t){2&e&&(o.Tol(t.className),o.ekj("hidden",t.dragging))},decls:2,vars:3,consts:[[4,"ngIf"],[3,"type"],[1,"text"],["class","selected-entry-count",4,"ngIf"],[1,"selected-entry-count"]],template:function(e,t){1&e&&(o.YNc(0,tt,2,1,"ng-container",0),o.ALo(1,"async")),2&e&&o.Q6J("ngIf",o.lcZ(1,1,t.entries))},directives:[n.O5,Xe],pipes:[n.Ov],styles:["entry-drag-preview{position:fixed;top:0;left:0;z-index:10;background-color:var(--be-accent-emphasis);color:var(--be-accent-lighter);width:185px;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);pointer-events:none}entry-drag-preview .selected-entry-count{width:22px;height:22px;line-height:22px;text-align:center;font-weight:500;background-color:var(--be-accent-default);color:var(--be-accent-contrast);position:absolute;top:-7px;right:-7px;border-radius:50%;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)}"],encapsulation:2,changeDetection:0}),(0,r.gn)([(0,a.Ph)(Ve.selectedEntries)],it.prototype,"entries",void 0);var nt=i(13653),st=i(45435),rt=i(79765),ot=i(26215);const at={edit:!0,view:!0,download:!0};var ct=i(49977),lt=i.n(ct),dt=i(37524),pt=i.n(dt),ut=i(76394),ht=i.n(ut);let gt=(()=>{class e{constructor(e){this.http=e}changePermissions(e,t,i){return this.http.put(`drive/shares/change-permissions/${e}`,{permissions:i,entryIds:t})}shareEntries(e){return this.http.post("drive/shares/add-users",Object.assign(Object.assign({},e),{entryIds:e.entries.map(e=>e.id)}))}detachUser(e,t){return this.http.post("drive/shares/remove-user/"+e,{entryIds:t})}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(Pe.r))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),ft=(()=>{class e{}return e.type="[ShareDialog] Set Initial Users",e})(),mt=(()=>{class e{constructor(e,t){this.user=e,this.permissions=t}}return e.type="[ShareDialog] Update User Permissions",e})(),vt=(()=>{class e{constructor(e){this.user=e}}return e.type="[ShareDialog] Remove User",e})(),bt=(()=>{class e{constructor(e){this.users=e}}return e.type="[ShareDialog] Set Users",e})(),wt=(()=>{class e{}return e.type="[ShareDialog] Reset",e})(),xt=(()=>{class e{constructor(e){this.payload=e}}return e.type="[ShareDialog] Share Entries",e})(),yt=(()=>{class e{constructor(e){this.messages=e}}return e.type="[ShareDialog] Share Entries Failed",e})(),_t=class{constructor(e,t){this.store=e,this.sharesApi=t}static usersWithAccess(e){return e.usersWithAccess}static dirty(e){return!lt()(e.original,e.usersWithAccess)}static loading(e){return e.loading}static loadingUsers(e){return e.loadingUsers}setInitialUsers(e){const t=this.store.selectSnapshot(Ve.selectedEntries);let i=t.map(e=>e.users).reduce((e,t)=>e.concat(t),[]);i=pt()(i),i=i.filter(e=>!!e);const n=ht()(i,e=>e.id);t.length>1&&n.forEach(e=>{const i=t.map(t=>t.users.find(t=>t.id===e.id)).filter(e=>!!e).map(e=>Object.assign({},e.entry_permissions));(t.length!==i.length||i.some(e=>!lt()(e,i[0])))&&(e.entry_permissions={varies:!0})}),e.patchState({usersWithAccess:pt()(n),original:n})}setUsers(e,t){e.patchState({usersWithAccess:t.users,original:pt()(t.users)})}updateUserPermissions(e,t){this.toggleUserLoading(e,t.user.id,!0);const i=this.store.selectSnapshot(Ve.selectedEntries).map(e=>e.id);return this.sharesApi.changePermissions(t.user.id,i,t.permissions).pipe((0,l.x)(()=>this.toggleUserLoading(e,t.user.id,!1)),(0,c.b)(t=>this.updateUsers(e,t.users)))}removeUser(e,t){return this.toggleUserLoading(e,t.user.id,!0),this.sharesApi.detachUser(t.user.id,this.store.selectSnapshot(Ve.selectedEntries).map(e=>e.id)).pipe((0,l.x)(()=>this.toggleUserLoading(e,t.user.id,!1)),(0,c.b)(t=>this.updateUsers(e,t.users)))}resetState(e){e.setState({loading:!1,usersWithAccess:[],original:[],loadingUsers:[]})}shareEntries(e,t){e.patchState({loading:!0});const i=Object.assign(Object.assign({},t.payload),{entries:this.store.selectSnapshot(Ve.selectedEntries)});return this.sharesApi.shareEntries(i).pipe((0,l.x)(()=>e.patchState({loading:!1})),(0,c.b)(t=>{e.dispatch(new bt(t.users)),this.updateEntriesInDriveStore(t.users)},t=>{e.dispatch(new yt(t.errors))}))}toggleUserLoading(e,t,i){e.patchState(i?{loadingUsers:[...e.getState().loadingUsers,t]}:{loadingUsers:e.getState().loadingUsers.filter(e=>e!==t)})}updateUsers(e,t){e.patchState({usersWithAccess:t,original:pt()(t)}),this.updateEntriesInDriveStore(t)}updateEntriesInDriveStore(e){const t=this.store.selectSnapshot(Ve.selectedEntries).map(t=>(t.users=e,t));this.store.dispatch(new Q(t))}};_t.\u0275fac=function(e){return new(e||_t)(o.LFG(a.yh),o.LFG(gt))},_t.\u0275prov=o.Yz7({token:_t,factory:_t.\u0275fac}),(0,r.gn)([(0,a.aU)(ft)],_t.prototype,"setInitialUsers",null),(0,r.gn)([(0,a.aU)(bt)],_t.prototype,"setUsers",null),(0,r.gn)([(0,a.aU)(mt)],_t.prototype,"updateUserPermissions",null),(0,r.gn)([(0,a.aU)(vt)],_t.prototype,"removeUser",null),(0,r.gn)([(0,a.aU)(wt)],_t.prototype,"resetState",null),(0,r.gn)([(0,a.aU)(xt,{cancelUncompleted:!0})],_t.prototype,"shareEntries",null),(0,r.gn)([(0,a.Qf)()],_t,"usersWithAccess",null),(0,r.gn)([(0,a.Qf)()],_t,"dirty",null),(0,r.gn)([(0,a.Qf)()],_t,"loading",null),(0,r.gn)([(0,a.Qf)()],_t,"loadingUsers",null),_t=(0,r.gn)([(0,a.ZM)({name:"shareDialog",defaults:{usersWithAccess:[],original:[],loading:!1,loadingUsers:[]}})],_t);var kt=i(3679),Ct=i(88002),At=i(46782),Zt=i(22238),Ot=i(34673),St=i(73429),It=i(15515),Tt=i(51095),Et=i(44666),Pt=i(33935);function Ft(e,t){1&e&&(o.ynx(0),o._UZ(1,"mat-icon",9),o.TgZ(2,"span",10),o._uU(3,"Varies"),o.qZA(),o.BQk())}function Mt(e,t){1&e&&(o.ynx(0),o._UZ(1,"mat-icon",11),o.TgZ(2,"span",10),o._uU(3,"Can edit"),o.qZA(),o.BQk())}function Ut(e,t){1&e&&(o.ynx(0),o._UZ(1,"mat-icon",12),o.TgZ(2,"span",10),o._uU(3,"Can View"),o.qZA(),o.BQk())}function Dt(e,t){1&e&&(o.ynx(0),o._UZ(1,"mat-icon",13),o.TgZ(2,"span",10),o._uU(3,"Can Download"),o.qZA(),o.BQk())}class Lt{constructor(e,t,i){this.store=e,this.api=t,this.toast=i,this.permissions=at,this.change=new o.vpe,this.compact=!1}overallPermission(){return this.permissions.varies?"varies":this.permissions.edit?"edit":this.permissions.download?"download":"view"}selectPermission(e){this.permissions="edit"===e?Object.assign({},at):Object.assign(Object.assign({},at),"download"===e?{edit:!1}:{edit:!1,download:!1}),this.user?this.updateUserPermissions(this.permissions):this.change.emit(this.permissions)}updateUserPermissions(e){this.store.dispatch(new mt(this.user,e)).subscribe(()=>{this.toast.open("Changed permissions.")})}}Lt.\u0275fac=function(e){return new(e||Lt)(o.Y36(a.yh),o.Y36(gt),o.Y36(ze.F))},Lt.\u0275cmp=o.Xpm({type:Lt,selectors:[["sharing-permissions-button"]],hostVars:2,hostBindings:function(e,t){2&e&&o.ekj("compact",t.compact)},inputs:{permissions:"permissions",user:"user",compact:"compact"},outputs:{change:"change"},decls:30,vars:14,consts:[["mat-flat-button","","color","gray",3,"matMenuTriggerFor","disabled"],[4,"ngIf"],["svgIcon","arrow-drop-down",1,"dropdown-icon"],["classList","mat-menu-with-description"],["shareMenu","matMenu"],["mat-menu-item","",3,"click"],["svgIcon","check",1,"mat-icon"],["trans",""],["trans","",1,"description"],["svgIcon","priority-high",1,"button-icon"],["trans","",1,"button-text"],["svgIcon","edit",1,"button-icon"],["svgIcon","remove-red-eye",1,"button-icon"],["svgIcon","file-download",1,"button-icon"]],template:function(e,t){if(1&e&&(o.TgZ(0,"button",0),o.ALo(1,"async"),o.YNc(2,Ft,4,0,"ng-container",1),o.YNc(3,Mt,4,0,"ng-container",1),o.YNc(4,Ut,4,0,"ng-container",1),o.YNc(5,Dt,4,0,"ng-container",1),o._UZ(6,"mat-icon",2),o.qZA(),o.TgZ(7,"mat-menu",3,4),o.TgZ(9,"div",5),o.NdJ("click",function(){return t.selectPermission("edit")}),o._UZ(10,"mat-icon",6),o.TgZ(11,"div"),o.TgZ(12,"div",7),o._uU(13,"Can edit"),o.qZA(),o.TgZ(14,"div",8),o._uU(15,"People can edit, delete and copy the item to their own drive."),o.qZA(),o.qZA(),o.qZA(),o.TgZ(16,"div",5),o.NdJ("click",function(){return t.selectPermission("download")}),o._UZ(17,"mat-icon",6),o.TgZ(18,"div"),o.TgZ(19,"div",7),o._uU(20,"Can download"),o.qZA(),o.TgZ(21,"div",8),o._uU(22,"People can view and download the item."),o.qZA(),o.qZA(),o.qZA(),o.TgZ(23,"div",5),o.NdJ("click",function(){return t.selectPermission("view")}),o._UZ(24,"mat-icon",6),o.TgZ(25,"div"),o.TgZ(26,"div",7),o._uU(27,"Can view"),o.qZA(),o.TgZ(28,"div",8),o._uU(29,"People can view the item."),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&e){const e=o.MAs(8);o.Q6J("matMenuTriggerFor",e)("disabled",o.lcZ(1,12,t.loadingUsers$).includes(null==t.user?null:t.user.id)),o.xp6(2),o.Q6J("ngIf","varies"===t.overallPermission()),o.xp6(1),o.Q6J("ngIf","edit"===t.overallPermission()),o.xp6(1),o.Q6J("ngIf","view"===t.overallPermission()),o.xp6(1),o.Q6J("ngIf","download"===t.overallPermission()),o.xp6(5),o.ekj("visually-hidden","edit"!==t.overallPermission()),o.xp6(7),o.ekj("visually-hidden","download"!==t.overallPermission()),o.xp6(7),o.ekj("visually-hidden","view"!==t.overallPermission())}},directives:[Tt.lW,Pt.p6,n.O5,We.Hw,Pt.VK,Pt.OP,It.P],pipes:[n.Ov],styles:[".mat-menu-with-description .mat-menu-item{display:flex;height:auto;min-height:48px;line-height:normal;white-space:normal;padding:10px 16px;font-size:1.5rem}.mat-menu-with-description .mat-menu-item .mat-icon{flex:0 0 24px}.mat-menu-with-description .mat-menu-item .description{font-size:1.4rem;color:var(--be-secondary-text);margin-top:3px}sharing-permissions-button{display:inline-block}sharing-permissions-button.compact .button-text{display:none}sharing-permissions-button .dropdown-icon,sharing-permissions-button:not(.compact) .button-icon{width:18px;height:18px;line-height:18px}sharing-permissions-button:not(.compact) .button-icon{margin-right:5px}sharing-permissions-button .button-text{font-size:1.3rem}"],encapsulation:2,changeDetection:0}),(0,r.gn)([(0,a.Ph)(_t.loadingUsers)],Lt.prototype,"loadingUsers$",void 0);var qt=i(17238),Nt=i(43190),$t=i(63297);const Bt=function(e){return{workspace:e}};function Yt(e,t){if(1&e&&(o.TgZ(0,"div",4),o._UZ(1,"mat-icon",5),o.TgZ(2,"div",6),o.TgZ(3,"div",7),o._uU(4,'Everyone at ":workspace" workspace'),o.qZA(),o.TgZ(5,"div",8),o._uU(6),o.ALo(7,"trans"),o.qZA(),o.qZA(),o.qZA()),2&e){const e=t.ngIf;o.xp6(3),o.Q6J("transValues",o.VKq(5,Bt,e.name)),o.xp6(3),o.AsE("",e.members_count," ",o.lcZ(7,3,"members"),"")}}function Rt(e,t){if(1&e&&(o.TgZ(0,"span",14),o._uU(1),o.qZA()),2&e){const e=o.oxw().$implicit;o.xp6(1),o.hij(" ",e.owns_entry?"Owner":"You"," ")}}function Qt(e,t){if(1&e){const e=o.EpF();o._UZ(0,"sharing-permissions-button",15),o.TgZ(1,"button",16),o.NdJ("click",function(){o.CHM(e);const t=o.oxw().$implicit;return o.oxw().removeUser(t)}),o.ALo(2,"async"),o._UZ(3,"mat-icon",17),o.qZA()}if(2&e){const e=o.oxw().$implicit,t=o.oxw();o.Q6J("permissions",e.entry_permissions)("user",e),o.xp6(1),o.Q6J("disabled",o.lcZ(2,3,t.loadingUsers$).includes(e.id))}}function jt(e,t){if(1&e&&(o.TgZ(0,"div",4),o._UZ(1,"img",9),o.TgZ(2,"div",6),o.TgZ(3,"div",10),o._uU(4),o.qZA(),o.TgZ(5,"div",8),o._uU(6),o.qZA(),o.qZA(),o.TgZ(7,"div",11),o.YNc(8,Rt,2,1,"span",12),o.YNc(9,Qt,4,5,"ng-template",null,13,o.W1O),o.qZA(),o.qZA()),2&e){const e=t.$implicit,i=o.MAs(10),n=o.oxw();o.ekj("removed",e.removed),o.Q6J("@flyInOut","in"),o.xp6(1),o.Q6J("src",e.avatar,o.LSH),o.xp6(3),o.Oqu(e.display_name),o.xp6(2),o.Oqu(e.email),o.xp6(2),o.Q6J("ngIf",e.owns_entry||n.currentUser.getModel().id===e.id)("ngIfElse",i)}}class Jt{constructor(e,t,i){this.store=e,this.currentUser=t,this.workspaces=i,this.activeWorkspace$=this.store.select(Ve.selectedEntries).pipe((0,Ct.U)(e=>e.every(e=>e.workspace_id)),(0,st.h)(e=>!!e),(0,Nt.w)(()=>this.workspaces.activeWorkspace$))}removeUser(e){this.store.dispatch(new vt(e))}trackByUser(e,t){return t.id}}function zt(e,t){if(1&e&&(o.TgZ(0,"div",11),o._uU(1),o.qZA()),2&e){const e=t.$implicit;o.xp6(1),o.Oqu(e.value)}}function Vt(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",12),o.NdJ("click",function(){return o.CHM(e),o.oxw().share()}),o.ALo(1,"async"),o._uU(2,"Share"),o.qZA()}if(2&e){const e=o.oxw();o.Q6J("disabled",o.lcZ(1,1,e.loading$))}}Jt.\u0275fac=function(e){return new(e||Jt)(o.Y36(a.yh),o.Y36(Fe.I),o.Y36(Je.b))},Jt.\u0275cmp=o.Xpm({type:Jt,selectors:[["entries-access-table"]],decls:7,vars:7,consts:[["trans","",1,"header"],[1,"users-list"],["class","list-item",4,"ngIf"],["class","list-item",3,"removed",4,"ngFor","ngForOf","ngForTrackBy"],[1,"list-item"],["svgIcon","groups",1,"list-item-img"],[1,"text"],["trans","",1,"display_name",3,"transValues"],[1,"email"],["alt","",1,"list-item-img",3,"src"],[1,"display_name"],[1,"actions"],["class","owner-label","trans","",4,"ngIf","ngIfElse"],["permissionSelector",""],["trans","",1,"owner-label"],[3,"permissions","user"],["mat-icon-button","",3,"disabled","click"],["svgIcon","close"]],template:function(e,t){1&e&&(o.TgZ(0,"div",0),o._uU(1,"Who has access"),o.qZA(),o.TgZ(2,"div",1),o.YNc(3,Yt,8,7,"div",2),o.ALo(4,"async"),o.YNc(5,jt,11,8,"div",3),o.ALo(6,"async"),o.qZA()),2&e&&(o.xp6(3),o.Q6J("ngIf",o.lcZ(4,3,t.activeWorkspace$)),o.xp6(2),o.Q6J("ngForOf",o.lcZ(6,5,t.users))("ngForTrackBy",t.trackByUser))},directives:[It.P,n.O5,n.sg,We.Hw,Lt,Tt.lW],pipes:[n.Ov,$t.R],styles:["entries-access-table{display:block;margin-top:25px}entries-access-table .users-list{overflow-x:hidden}entries-access-table .users-list .list-item{display:flex;align-items:center;padding:12px 0;border-bottom:1px solid var(--be-divider-default)}entries-access-table .users-list .display_name{text-transform:capitalize}entries-access-table .users-list .email{color:var(--be-secondary-text)}entries-access-table .users-list .actions{margin-left:auto;padding-right:5px}entries-access-table .users-list .actions button{color:var(--be-secondary-text)}entries-access-table .list-item-img{width:30px;height:30px;flex:0 0 30px;margin-right:15px;color:var(--be-secondary-text)}"],encapsulation:2,data:{animation:[(0,qt.X$)("flyInOut",[(0,qt.SB)("in",(0,qt.oB)({transform:"translateX(0)"})),(0,qt.eR)("void => *",[(0,qt.oB)({transform:"translateX(-100%)"}),(0,qt.jt)(100)]),(0,qt.eR)("* => void",[(0,qt.jt)(100,(0,qt.oB)({transform:"translateX(100%)"}))])])]},changeDetection:0}),(0,r.gn)([(0,a.Ph)(_t.usersWithAccess)],Jt.prototype,"users",void 0),(0,r.gn)([(0,a.Ph)(_t.loadingUsers)],Jt.prototype,"loadingUsers$",void 0);class Ht{constructor(e,t,i,n,s){this.dialogRef=e,this.settings=t,this.store=i,this.actions$=n,this.users=s,this.destroyed$=new rt.xQ,this.errors=new ot.X({}),this.suggestUserEmails=e=>this.users.getAll({query:e,perPage:7}).pipe((0,Ct.U)(e=>e.map(e=>e.email))),this.resetModel(),this.store.dispatch(new ft),this.bindToShareError(),this.bindToShareModel()}ngOnDestroy(){this.store.dispatch(new wt),this.destroyed$.next(),this.destroyed$.complete()}share(){this.store.dispatch(new xt({emails:this.shareModel.emails.value,permissions:this.shareModel.permissions})).subscribe(()=>{this.setErrorMessages(),this.resetModel()})}resetModel(){this.shareModel={emails:new kt.NI([]),permissions:at}}setErrorMessages(e){this.errors.next(e||{})}bindToShareModel(){this.shareModel.emails.valueChanges.pipe((0,At.R)(this.destroyed$)).subscribe(()=>this.setErrorMessages())}bindToShareError(){this.actions$.pipe((0,At.R)(this.destroyed$),(0,a.xt)(yt)).subscribe(e=>{this.setErrorMessages(e.messages)})}}Ht.\u0275fac=function(e){return new(e||Ht)(o.Y36(Zt.so),o.Y36(Ot.Z),o.Y36(a.yh),o.Y36(a.eX),o.Y36(St.Q))},Ht.\u0275cmp=o.Xpm({type:Ht,selectors:[["share-dialog"]],decls:19,vars:13,consts:[[1,"modal-header"],["mat-dialog-title","","trans",""],["type","button","mat-icon-button","","tabindex","-1",1,"close-button",3,"click"],["svgIcon","close"],[1,"emails-container"],["placeholder","Enter email addresses...","email","","required","",3,"formControl","emailsInput","suggestFn"],[3,"compact","change"],[1,"errors"],["class","error",4,"ngFor","ngForOf"],["type","button","mat-button","","trans","",3,"disabled","click"],["type","submit","mat-raised-button","","color","accent","trans","",3,"disabled","click",4,"ngIf"],[1,"error"],["type","submit","mat-raised-button","","color","accent","trans","",3,"disabled","click"]],template:function(e,t){1&e&&(o.TgZ(0,"div",0),o.TgZ(1,"h2",1),o._uU(2,"Add people"),o.qZA(),o.TgZ(3,"button",2),o.NdJ("click",function(){return t.dialogRef.close()}),o._UZ(4,"mat-icon",3),o.qZA(),o.qZA(),o.TgZ(5,"mat-dialog-content"),o.TgZ(6,"div",4),o._UZ(7,"chip-input",5),o.TgZ(8,"sharing-permissions-button",6),o.NdJ("change",function(e){return t.shareModel.permissions=e}),o.qZA(),o.qZA(),o.TgZ(9,"div",7),o.YNc(10,zt,2,1,"div",8),o.ALo(11,"keyvalue"),o.ALo(12,"async"),o.qZA(),o._UZ(13,"entries-access-table"),o.qZA(),o.TgZ(14,"mat-dialog-actions"),o.TgZ(15,"button",9),o.NdJ("click",function(){return t.dialogRef.close()}),o.ALo(16,"async"),o._uU(17,"Close"),o.qZA(),o.YNc(18,Vt,3,3,"button",10),o.qZA()),2&e&&(o.xp6(7),o.Q6J("formControl",t.shareModel.emails)("emailsInput",!0)("suggestFn",t.settings.get("share.suggest_emails")?t.suggestUserEmails:null),o.xp6(1),o.Q6J("compact",!0),o.xp6(2),o.Q6J("ngForOf",o.lcZ(11,7,o.lcZ(12,9,t.errors))),o.xp6(5),o.Q6J("disabled",o.lcZ(16,11,t.loading$)),o.xp6(3),o.Q6J("ngIf",null==t.shareModel.emails.value?null:t.shareModel.emails.value.length))},directives:[Zt.uh,It.P,Tt.lW,We.Hw,Zt.xY,Et.S,kt.on,kt.Q7,kt.JJ,kt.oH,Lt,n.sg,Jt,Zt.H8,n.O5],pipes:[n.Nd,n.Ov],styles:["share-dialog{display:block;width:500px;max-width:100%}share-dialog .emails-container{display:flex;min-height:54px}share-dialog .emails-container chip-input{flex:1 1 auto;border-bottom-right-radius:0;border-top-right-radius:0}share-dialog .emails-container .mat-flat-button{height:54px;border:1px solid var(--be-divider-default);border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}share-dialog .mat-tab-body{padding:15px 0}"],encapsulation:2,changeDetection:0}),(0,r.gn)([(0,a.Ph)(_t.loading)],Ht.prototype,"loading$",void 0);let Gt=(()=>{class e{constructor(e){this.http=e}findByEntryId(e,t){return this.http.get(`drive/entries/${e}/shareable-link`,t)}findByHash(e,t){return this.http.get(`drive/shareable-links/${e}`,t)}create(e,t){return this.http.post(`drive/entries/${e}/shareable-link`,t)}update(e,t){return this.http.put(`drive/shareable-links/${e}`,t)}delete(e){return this.http.delete(`drive/shareable-links/${e})`)}checkPassword(e,t){return this.http.post(`drive/shareable-links/${e}/check-password`,{password:t})}importEntry(e,t){return this.http.post(`drive/shareable-links/${e}/import`,{password:t})}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(Pe.r))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Wt=(()=>{class e{constructor(e={}){this.options=e}}return e.type="[Shareable Link] Load From Backend",e})(),Xt=(()=>{class e{constructor(e){this.options=e}}return e.type="[Shareable Link] Update",e})(),Kt=(()=>{class e{constructor(e){this.options=e}}return e.type="[Shareable Link] Create",e})(),ei=(()=>{class e{}return e.type="[Shareable Link] Delete",e})(),ti=(()=>{class e{}return e.type="[Shareable Link] Toggle Options Panel Visibility",e})(),ii=(()=>{class e{}return e.type="[Shareable Link] Copy To Clipboard Success",e})(),ni=(()=>{class e{}return e.type="[Shareable Link] Reset State",e})();const si={link:null,loading:!1,optionsPanelVisible:!0,backendErrors:{},cache:{},linkOptions:{allowDownload:!1,allowEdit:!1,expiresAt:null,password:null}};let ri=class{constructor(e,t,i){this.store=e,this.settings=t,this.linksApi=i}static loading(e){return e.loading}static link(e){return e.link}static optionsVisible(e){return!e.loading&&e.optionsPanelVisible}static backendErrors(e){return e.backendErrors}createShareableLink(e,t){const i=this.store.selectSnapshot(Ve.selectedEntryIds)[0];return e.patchState({loading:!0}),this.linksApi.create(i,t.options).pipe((0,l.x)(()=>e.patchState({loading:!1,backendErrors:{}})),(0,c.b)(t=>{const i=t.link;e.patchState({cache:Object.assign(Object.assign({},e.getState().cache),{[i.entry_id]:i}),link:t.link,optionsPanelVisible:!1})},t=>{e.patchState({backendErrors:t.errors})}))}updateLink(e,t){const i=e.getState().link;return e.patchState({loading:!0}),this.linksApi.update(i.id,t.options).pipe((0,l.x)(()=>e.patchState({loading:!1,backendErrors:{}})),(0,c.b)(t=>e.patchState({link:t.link,cache:Object.assign(Object.assign({},e.getState().cache),{[i.entry_id]:t.link}),optionsPanelVisible:!1}),t=>{e.patchState({backendErrors:t.errors})}))}loadShareableLink(e,t){const i=this.store.selectSnapshot(Ve.selectedEntryIds)[0],n=e.getState().cache[i];return n?e.patchState({link:n,optionsPanelVisible:!1}):(e.patchState({loading:!0}),this.linksApi.findByEntryId(i,{autoCreate:t.options.autoCreate}).pipe((0,l.x)(()=>e.patchState({loading:!1})),(0,c.b)(t=>e.patchState({link:t.link,optionsPanelVisible:!1,cache:Object.assign(Object.assign({},e.getState().cache),{[t.link.entry_id]:t.link})}),()=>{})))}deleteShareableLink(e){const t=e.getState().link;return e.patchState({loading:!0}),this.linksApi.delete(t.id).pipe((0,l.x)(()=>e.patchState({loading:!1})),(0,c.b)(()=>{const i=e.getState().cache;delete i[t.entry_id],e.patchState({link:null,cache:i})}))}toggleOptionsPanel(e){e.patchState({optionsPanelVisible:!e.getState().optionsPanelVisible})}resetShareLinkState(e){return e.patchState(Object.assign(Object.assign({},e.getState()),si))}};ri.\u0275fac=function(e){return new(e||ri)(o.LFG(a.yh),o.LFG(Ot.Z),o.LFG(Gt))},ri.\u0275prov=o.Yz7({token:ri,factory:ri.\u0275fac}),(0,r.gn)([(0,a.aU)(Kt)],ri.prototype,"createShareableLink",null),(0,r.gn)([(0,a.aU)(Xt)],ri.prototype,"updateLink",null),(0,r.gn)([(0,a.aU)(Wt)],ri.prototype,"loadShareableLink",null),(0,r.gn)([(0,a.aU)(ei)],ri.prototype,"deleteShareableLink",null),(0,r.gn)([(0,a.aU)(ti)],ri.prototype,"toggleOptionsPanel",null),(0,r.gn)([(0,a.aU)(ni,{cancelUncompleted:!0})],ri.prototype,"resetShareLinkState",null),(0,r.gn)([(0,a.Qf)()],ri,"loading",null),(0,r.gn)([(0,a.Qf)()],ri,"link",null),(0,r.gn)([(0,a.Qf)()],ri,"optionsVisible",null),(0,r.gn)([(0,a.Qf)()],ri,"backendErrors",null),ri=(0,r.gn)([(0,a.ZM)({name:"shareLink",defaults:si})],ri);var oi=i(96967),ai=i.n(oi),ci=i(7539);function li(e,t){if(1&e&&(o.TgZ(0,"div",16),o._uU(1),o.qZA()),2&e){const e=t.ngIf;o.xp6(1),o.Oqu(e)}}function di(e,t){1&e&&(o.ynx(0),o.TgZ(1,"div",17),o._UZ(2,"input",18),o.qZA(),o.BQk())}class pi{constructor(e){this.store=e,this.form=new kt.cw({password:new kt.NI,expiresAt:new kt.cw({date:new kt.NI,time:new kt.NI}),allowEdit:new kt.NI(!1),allowDownload:new kt.NI(!0)}),this.passwordVisible=new kt.NI(!1),this.expirationVisible=new kt.NI(!1)}ngOnInit(){this.bindToLinkChange()}toggleOptionsPanel(){this.store.dispatch(new ti)}saveChanges(){this.store.selectSnapshot(ri.link)?this.store.dispatch(new Xt(this.getPayload())):this.store.dispatch(new Kt(this.getPayload()))}getPayload(){const e={allowEdit:this.form.get("allowEdit").value,allowDownload:this.form.get("allowDownload").value};return this.expirationVisible.value&&(e.expiresAt=this.form.get("expiresAt.date").value,this.form.get("expiresAt.time").value&&(e.expiresAt+=" "+this.form.get("expiresAt.time").value)),this.passwordVisible.value&&(e.password=this.form.get("password").value),e}bindToLinkChange(){this.link$.pipe((0,st.h)(e=>!!e)).subscribe(e=>{this.hydrateExpirationForm(e),this.passwordVisible.setValue(!!e.password),this.expirationVisible.setValue(!!e.expires_at),this.form.patchValue({allowEdit:e.allow_edit,allowDownload:e.allow_download})})}hydrateExpirationForm(e){if(!e||!e.expires_at)return;const t=e.expires_at.split(/[ T]/);this.form.get("expiresAt").setValue({date:t[0],time:t[1]?t[1].substr(0,5):""})}getMinDate(){return(new Date).toJSON().split("T")[0]}}pi.\u0275fac=function(e){return new(e||pi)(o.Y36(a.yh))},pi.\u0275cmp=o.Xpm({type:pi,selectors:[["link-options"]],decls:38,vars:18,consts:[[1,"update-link-panel",3,"formGroup","ngSubmit"],[1,"link-options"],[1,"link-option"],["trans","",1,"label"],[1,"content"],["color","accent","trans","",3,"formControl"],["formGroupName","expiresAt",1,"input-container","expiration-input-container"],[1,"date-input-container"],["type","date","formControlName","date","placeholder","Expiration date...","trans-placeholder","",1,"date-input",3,"min"],["type","time","formControlName","time","placeholder","Expiration time...","trans-placeholder","",1,"time-input"],["class","error",4,"ngIf"],[4,"ngIf"],["color","accent","formControlName","allowEdit","trans",""],["color","accent","formControlName","allowDownload","trans",""],["type","button","mat-button","","trans","",3,"click"],["type","submit","mat-raised-button","","color","accent",1,"update-button",3,"disabled"],[1,"error"],[1,"input-container","password-input-container"],["type","password","formControlName","password","placeholder","Enter new password...","trans-placeholder",""]],template:function(e,t){if(1&e&&(o.TgZ(0,"form",0),o.NdJ("ngSubmit",function(){return t.saveChanges()}),o.TgZ(1,"div",1),o.TgZ(2,"div",2),o.TgZ(3,"div",3),o._uU(4,"Link expiration"),o.qZA(),o.TgZ(5,"div",4),o.TgZ(6,"mat-checkbox",5),o._uU(7,"Link is valid until:"),o.qZA(),o.TgZ(8,"div",6),o.TgZ(9,"div",7),o._UZ(10,"input",8),o.qZA(),o._UZ(11,"input",9),o.qZA(),o.YNc(12,li,2,1,"div",10),o.ALo(13,"async"),o.qZA(),o.qZA(),o.TgZ(14,"div",2),o.TgZ(15,"div",3),o._uU(16,"Password Protect"),o.qZA(),o.TgZ(17,"div",4),o.TgZ(18,"mat-checkbox",5),o._uU(19,"Require password:"),o.qZA(),o.YNc(20,di,3,0,"ng-container",11),o.qZA(),o.qZA(),o.TgZ(21,"div",2),o.TgZ(22,"div",3),o._uU(23,"Allow editing"),o.qZA(),o.TgZ(24,"mat-checkbox",12),o._uU(25,"Users with link can modify this item."),o.qZA(),o.qZA(),o.TgZ(26,"div",2),o.TgZ(27,"div",3),o._uU(28,"Allow download"),o.qZA(),o.TgZ(29,"mat-checkbox",13),o._uU(30,"Users with link can download this item."),o.qZA(),o.qZA(),o.qZA(),o.TgZ(31,"button",14),o.NdJ("click",function(){return t.toggleOptionsPanel()}),o._uU(32,"Cancel"),o.qZA(),o.TgZ(33,"button",15),o.ALo(34,"async"),o._uU(35),o.ALo(36,"trans"),o.ALo(37,"async"),o.qZA(),o.qZA()),2&e){let e;o.Q6J("formGroup",t.form),o.xp6(6),o.Q6J("formControl",t.expirationVisible),o.xp6(2),o.ekj("hidden",!t.expirationVisible.value),o.xp6(2),o.Q6J("min",t.getMinDate()),o.xp6(2),o.Q6J("ngIf",null==(e=o.lcZ(13,10,t.backendErrors$))?null:e.expiresAt),o.xp6(6),o.Q6J("formControl",t.passwordVisible),o.xp6(2),o.Q6J("ngIf",t.passwordVisible.value),o.xp6(13),o.Q6J("disabled",o.lcZ(34,12,t.loading$)),o.xp6(2),o.hij(" ",o.lcZ(36,14,o.lcZ(37,16,t.link$)?"Update Link":"Create Link")," ")}},directives:[kt._Y,kt.JL,kt.sg,It.P,ci.oG,kt.JJ,kt.oH,kt.x0,kt.Fj,kt.u,n.O5,Tt.lW],pipes:[n.Ov,$t.R],styles:["link-options{display:block;padding:15px;border:1px solid var(--be-divider-default);border-radius:4px}link-options .link-option{padding-bottom:25px;margin-bottom:25px;border-bottom:1px solid var(--be-divider-default)}link-options .link-option .label{font-weight:500;margin-bottom:8px}link-options .link-option .expiration-input-container,link-options .link-option .password-input-container{margin-top:15px}link-options .link-option .content .error{margin-top:10px}link-options .expiration-input-container{display:flex}link-options .expiration-input-container .date-input-container{flex:1 1 auto;margin-right:10px;position:relative}link-options .expiration-input-container .time-input{max-width:150px;margin-right:20px}link-options .update-button{margin-top:15px}"],encapsulation:2,changeDetection:0}),(0,r.gn)([(0,a.Ph)(ri.link)],pi.prototype,"link$",void 0),(0,r.gn)([(0,a.Ph)(ri.loading)],pi.prototype,"loading$",void 0),(0,r.gn)([(0,a.Ph)(ri.backendErrors)],pi.prototype,"backendErrors$",void 0);var ui=i(20616);function hi(e,t){if(1&e){const e=o.EpF();o.ynx(0),o.TgZ(1,"div",7),o.TgZ(2,"div",8),o._uU(3),o.ALo(4,"trans"),o.TgZ(5,"span",9),o.TgZ(6,"button",10),o.NdJ("click",function(){return o.CHM(e),o.oxw().deleteLink()}),o._uU(7," on "),o.qZA(),o.qZA(),o.qZA(),o.TgZ(8,"div",11),o.TgZ(9,"button",12),o.NdJ("click",function(){return o.CHM(e),o.oxw().deleteLink()}),o._UZ(10,"mat-icon",13),o.qZA(),o.TgZ(11,"button",12),o.NdJ("click",function(){return o.CHM(e),o.oxw().toggleOptionsPanel()}),o._UZ(12,"mat-icon",14),o.qZA(),o.qZA(),o.qZA(),o.TgZ(13,"div",15),o.TgZ(14,"div",16),o.TgZ(15,"input",17),o.NdJ("click",function(){return o.CHM(e),o.oxw().focusInput()})("change",function(){return o.CHM(e),o.oxw().focusInput()}),o.ALo(16,"async"),o.qZA(),o.TgZ(17,"button",18),o.NdJ("click",function(){return o.CHM(e),o.oxw().copyLinkToClipboard()}),o._uU(18," Copy "),o.qZA(),o.qZA(),o.TgZ(19,"div",19),o.TgZ(20,"button",20),o.NdJ("click",function(){return o.CHM(e),o.oxw().shareLink("facebook")}),o._UZ(21,"mat-icon",21),o.qZA(),o.TgZ(22,"button",22),o.NdJ("click",function(){return o.CHM(e),o.oxw().shareLink("twitter")}),o._UZ(23,"mat-icon",23),o.qZA(),o.TgZ(24,"button",24),o.NdJ("click",function(){return o.CHM(e),o.oxw().shareLink("mail")}),o._UZ(25,"mat-icon",25),o.qZA(),o.qZA(),o.qZA(),o.BQk()}if(2&e){const e=o.oxw();o.xp6(3),o.hij(" ",o.lcZ(4,2,"Link sharing is")," "),o.xp6(12),o.Q6J("value",o.lcZ(16,4,e.shareableLink$))}}class gi{constructor(e,t,i,n,s){this.store=e,this.toast=t,this.actions$=i,this.settings=n,this.dialogRef=s,this.shareableLink$=new ot.X(null),this.subscriptions=[]}ngOnInit(){this.store.dispatch(new Wt),this.bindToOptionsPanelToggle()}ngAfterViewInit(){this.bindToLinkChange()}ngOnDestroy(){this.store.dispatch(new ni),this.subscriptions.forEach(e=>e.unsubscribe())}toggleOptionsPanel(){this.store.dispatch(new ti)}deleteLink(){this.store.dispatch(new ei).subscribe(()=>{this.toast.open("Link deleted."),this.dialogRef.close()})}copyLinkToClipboard(){this.focusInput(),ai()(this.shareableLink$.value)&&this.store.dispatch(new ii)}bindToLinkChange(){this.link$.subscribe(e=>{e&&(this.shareableLink$.next(this.settings.getBaseUrl()+"/drive/s/"+e.hash),setTimeout(()=>this.focusInput()))})}bindToOptionsPanelToggle(){const e=this.actions$.pipe((0,a.xt)(ti)).subscribe(()=>{this.store.selectSnapshot(ri.optionsVisible)||this.shareableLink$.value||this.close()});this.subscriptions.push(e)}shareLink(e){!function(e,t,i,n){const s=function(e,t,i,n){switch(e){case"facebook":return"https://www.facebook.com/sharer/sharer.php?u="+t;case"twitter":return`https://twitter.com/intent/tweet?text=undefined&url=${t}`;case"google-plus":return"https://plus.google.com/share?url="+t;case"pinterest":return"https://pinterest.com/pin/create/button/?url="+t+"&media="+undefined;case"tumblr":return"https://www.tumblr.com/widgets/share/tool?shareSource=legacy&canonicalUrl=&posttype=photo&title=&caption=undefined&content=undefined&url="+t;case"blogger":return"https://www.blogger.com/blog_this.pyra?t&u="+t+"&n="+undefined;case"mail":return`mailto:?subject=Check out this link.&body=${t}`}}(e,t);"mail"===e?window.location.href=s:function(e){const t=(window.innerWidth-575)/2,i=(window.innerHeight-400)/2;window.open(e,"share","status=1, scrollbars=1,width=575,height=400,top="+i+",left="+t)}(s)}(e,this.shareableLink$.value)}focusInput(){const e=document.getElementById("link-input");e.focus(),e.select()}close(){this.dialogRef.close()}}function fi(e,t){if(1&e&&(o.TgZ(0,"div",11),o._uU(1),o.qZA()),2&e){const e=o.oxw();o.xp6(1),o.Oqu(e.errors.name)}}gi.\u0275fac=function(e){return new(e||gi)(o.Y36(a.yh),o.Y36(ze.F),o.Y36(a.eX),o.Y36(Ot.Z),o.Y36(Zt.so))},gi.\u0275cmp=o.Xpm({type:gi,selectors:[["share-link-dialog"]],decls:16,vars:12,consts:[[1,"modal-header"],["mat-dialog-title","","trans",""],["type","button","mat-icon-button","","tabindex","-1",1,"close-button",3,"click"],["svgIcon","close"],[4,"ngIf"],[1,"overlay-transparent",3,"isVisible"],["type","button","mat-button","","trans","",1,"submit-button",3,"disabled","click"],[1,"title"],[1,"left"],[1,"state","on"],["trans","",1,"on-text","text","no-style",3,"click"],[1,"right"],["type","button","mat-icon-button","",3,"click"],["svgIcon","delete"],["svgIcon","settings"],[1,"link-container"],[1,"link-input-container","input-container"],["type","text","id","link-input","readonly","","tabindex","1",3,"value","click","change"],["mat-flat-button","","color","accent","trans","",3,"click"],[1,"social-icons"],["type","button","mat-icon-button","",1,"social-icon","no-style","facebook",3,"click"],["svgIcon","facebook"],["type","button","mat-icon-button","",1,"social-icon","no-style","twitter",3,"click"],["svgIcon","twitter"],["type","button","mat-icon-button","",1,"social-icon","no-style","mail",3,"click"],["svgIcon","mail"]],template:function(e,t){1&e&&(o.TgZ(0,"div",0),o.TgZ(1,"h2",1),o._uU(2,"Shareable link"),o.qZA(),o.TgZ(3,"button",2),o.NdJ("click",function(){return t.close()}),o._UZ(4,"mat-icon",3),o.qZA(),o.qZA(),o.TgZ(5,"mat-dialog-content"),o.YNc(6,hi,26,6,"ng-container",4),o.ALo(7,"async"),o._UZ(8,"link-options"),o.ALo(9,"async"),o._UZ(10,"loading-indicator",5),o.ALo(11,"async"),o.qZA(),o.TgZ(12,"mat-dialog-actions"),o.TgZ(13,"button",6),o.NdJ("click",function(){return t.close()}),o.ALo(14,"async"),o._uU(15," Close "),o.qZA(),o.qZA()),2&e&&(o.xp6(6),o.Q6J("ngIf",o.lcZ(7,4,t.link$)),o.xp6(2),o.Q6J("@visibility",o.lcZ(9,6,t.optionsVisible$)),o.xp6(2),o.Q6J("isVisible",o.lcZ(11,8,t.loading$)),o.xp6(3),o.Q6J("disabled",o.lcZ(14,10,t.loading$)))},directives:[Zt.uh,It.P,Tt.lW,We.Hw,Zt.xY,n.O5,pi,ui.Q,Zt.H8],pipes:[n.Ov,$t.R],styles:["share-link-dialog{display:block;min-height:273px;width:500px;max-width:100%}share-link-dialog .title{display:flex;align-items:center;margin-bottom:5px}share-link-dialog .title .right{margin-left:auto;color:var(--be-secondary-text)}share-link-dialog .link-input-container{display:flex;margin-bottom:10px}share-link-dialog .link-input-container input{flex:1 1 auto;border-top-right-radius:0;border-bottom-right-radius:0}share-link-dialog .link-input-container button{width:88px;flex:0 0 88px;border-top-left-radius:0;border-bottom-left-radius:0}share-link-dialog .mat-dialog-content{min-height:144px}share-link-dialog .social-icons{margin-bottom:10px}share-link-dialog loading-indicator{top:0;left:0;bottom:0;right:0;margin:auto}"],encapsulation:2,data:{animation:[(0,qt.X$)("visibility",[(0,qt.SB)("true",(0,qt.oB)({height:"*",padding:"*",opacity:"1",overflow:"*"})),(0,qt.SB)("false",(0,qt.oB)({height:"0",padding:"0",opacity:"0",overflow:"hidden"})),(0,qt.eR)("true <=> false",(0,qt.jt)("225ms cubic-bezier(.4,0,.2,1)"))])]},changeDetection:0}),(0,r.gn)([(0,a.Ph)(ri.loading)],gi.prototype,"loading$",void 0),(0,r.gn)([(0,a.Ph)(ri.link)],gi.prototype,"link$",void 0),(0,r.gn)([(0,a.Ph)(ri.optionsVisible)],gi.prototype,"optionsVisible$",void 0);let mi=(()=>{class e{constructor(e,t,i,n,s){this.dialogRef=e,this.data=t,this.store=i,this.foldersApi=n,this.changeDetection=s,this.folderName=new kt.NI,this.loading=new ot.X(!1),this.errors={}}confirm(){this.loading.next(!0);const e=this.data.folder||this.store.selectSnapshot(Ve.activeFolder);return this.foldersApi.create({name:this.folderName.value,parentId:(null==e?void 0:e.id)||null}).pipe((0,l.x)(()=>this.loading.next(!1))).subscribe(e=>{this.setErrors(),this.store.dispatch(new fe(e.folder)),this.close()},e=>this.setErrors(e))}setErrors(e){this.errors=e?e.errors:{},this.changeDetection.detectChanges()}close(){this.dialogRef.close()}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(Zt.so),o.Y36(Zt.WI),o.Y36(a.yh),o.Y36(Me),o.Y36(o.sBO))},e.\u0275cmp=o.Xpm({type:e,selectors:[["crupdate-folder-dialog"]],decls:16,vars:5,consts:[[1,"modal-header"],["mat-dialog-title","","trans",""],["type","button","mat-icon-button","","tabindex","-1",1,"close-button",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"ngSubmit"],[1,"many-inputs"],[1,"input-container"],["type","text","placeholder","Folder name...","trans-placeholder","","required","","min","3",3,"formControl"],["class","error",4,"ngIf"],["type","button","mat-button","","trans","",1,"cancel-button",3,"click"],["type","submit","mat-raised-button","","color","accent","trans","",1,"submit-button",3,"disabled"],[1,"error"]],template:function(e,t){1&e&&(o.TgZ(0,"div",0),o.TgZ(1,"h2",1),o._uU(2,"New Folder"),o.qZA(),o.TgZ(3,"button",2),o.NdJ("click",function(){return t.close()}),o._UZ(4,"mat-icon",3),o.qZA(),o.qZA(),o.TgZ(5,"form",4),o.NdJ("ngSubmit",function(){return t.confirm()}),o.TgZ(6,"mat-dialog-content",5),o.TgZ(7,"div",6),o._UZ(8,"input",7),o.YNc(9,fi,2,1,"div",8),o.qZA(),o.qZA(),o.TgZ(10,"mat-dialog-actions"),o.TgZ(11,"button",9),o.NdJ("click",function(){return t.close()}),o._uU(12,"Cancel"),o.qZA(),o.TgZ(13,"button",10),o.ALo(14,"async"),o._uU(15,"Create"),o.qZA(),o.qZA(),o.qZA()),2&e&&(o.xp6(8),o.Q6J("formControl",t.folderName),o.xp6(1),o.Q6J("ngIf",t.errors.name),o.xp6(4),o.Q6J("disabled",o.lcZ(14,3,t.loading)))},directives:[Zt.uh,It.P,Tt.lW,We.Hw,kt.JL,kt.F,Zt.xY,kt.Fj,kt.Q7,kt.JJ,kt.oH,n.O5,Zt.H8],pipes:[n.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}"],changeDetection:0}),e})();var vi=i(15257),bi=i(38345),wi=i(95639),xi=i(25917),yi=i(39490),_i=i(70946);class ki extends class{constructor(){this.expansionModel=new bi.Ov(!0)}toggle(e){this.expansionModel.toggle(this._trackByValue(e))}expand(e){this.expansionModel.select(this._trackByValue(e))}collapse(e){this.expansionModel.deselect(this._trackByValue(e))}isExpanded(e){return this.expansionModel.isSelected(this._trackByValue(e))}toggleDescendants(e){this.expansionModel.isSelected(this._trackByValue(e))?this.collapseDescendants(e):this.expandDescendants(e)}collapseAll(){this.expansionModel.clear()}expandDescendants(e){let t=[e];t.push(...this.getDescendants(e)),this.expansionModel.select(...t.map(e=>this._trackByValue(e)))}collapseDescendants(e){let t=[e];t.push(...this.getDescendants(e)),this.expansionModel.deselect(...t.map(e=>this._trackByValue(e)))}_trackByValue(e){return this.trackBy?this.trackBy(e):e}}{constructor(e,t,i){super(),this.getLevel=e,this.isExpandable=t,this.options=i,this.options&&(this.trackBy=this.options.trackBy)}getDescendants(e){const t=[];for(let i=this.dataNodes.indexOf(e)+1;i<this.dataNodes.length&&this.getLevel(e)<this.getLevel(this.dataNodes[i]);i++)t.push(this.dataNodes[i]);return t}expandAll(){this.expansionModel.select(...this.dataNodes.map(e=>this._trackByValue(e)))}}const Ci=new o.OlP("CDK_TREE_NODE_OUTLET_NODE");let Ai=(()=>{class e{constructor(e,t){this.viewContainer=e,this._node=t}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.s_b),o.Y36(Ci,8))},e.\u0275dir=o.lG2({type:e,selectors:[["","cdkTreeNodeOutlet",""]]}),e})();class Zi{constructor(e){this.$implicit=e}}let Oi=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.Rgc))},e.\u0275dir=o.lG2({type:e,selectors:[["","cdkTreeNodeDef",""]],inputs:{when:["cdkTreeNodeDefWhen","when"]}}),e})(),Si=(()=>{class e{constructor(e,t){this._differs=e,this._changeDetectorRef=t,this._onDestroy=new rt.xQ,this._levels=new Map,this.viewChange=new ot.X({start:0,end:Number.MAX_VALUE})}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&this._switchDataSource(e)}ngOnInit(){this._dataDiffer=this._differs.find([]).create(this.trackBy)}ngOnDestroy(){this._nodeOutlet.viewContainer.clear(),this.viewChange.complete(),this._onDestroy.next(),this._onDestroy.complete(),this._dataSource&&"function"==typeof this._dataSource.disconnect&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null)}ngAfterContentChecked(){const e=this._nodeDefs.filter(e=>!e.when);this._defaultNodeDef=e[0],this.dataSource&&this._nodeDefs&&!this._dataSubscription&&this._observeRenderChanges()}_switchDataSource(e){this._dataSource&&"function"==typeof this._dataSource.disconnect&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null),e||this._nodeOutlet.viewContainer.clear(),this._dataSource=e,this._nodeDefs&&this._observeRenderChanges()}_observeRenderChanges(){let e;(0,bi.Z9)(this._dataSource)?e=this._dataSource.connect(this):(0,wi.b)(this._dataSource)?e=this._dataSource:Array.isArray(this._dataSource)&&(e=(0,xi.of)(this._dataSource)),e&&(this._dataSubscription=e.pipe((0,At.R)(this._onDestroy)).subscribe(e=>this.renderNodeChanges(e)))}renderNodeChanges(e,t=this._dataDiffer,i=this._nodeOutlet.viewContainer,n){const s=t.diff(e);s&&(s.forEachOperation((t,s,r)=>{if(null==t.previousIndex)this.insertNode(e[r],r,i,n);else if(null==r)i.remove(s),this._levels.delete(t.item);else{const e=i.get(s);i.move(e,r)}}),this._changeDetectorRef.detectChanges())}_getNodeDef(e,t){return 1===this._nodeDefs.length?this._nodeDefs.first:this._nodeDefs.find(i=>i.when&&i.when(t,e))||this._defaultNodeDef}insertNode(e,t,i,n){const s=this._getNodeDef(e,t),r=new Zi(e);r.level=this.treeControl.getLevel?this.treeControl.getLevel(e):void 0!==n&&this._levels.has(n)?this._levels.get(n)+1:0,this._levels.set(e,r.level),(i||this._nodeOutlet.viewContainer).createEmbeddedView(s.template,r,t),Ii.mostRecentTreeNode&&(Ii.mostRecentTreeNode.data=e)}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.ZZ4),o.Y36(o.sBO))},e.\u0275cmp=o.Xpm({type:e,selectors:[["cdk-tree"]],contentQueries:function(e,t,i){if(1&e&&o.Suo(i,Oi,5),2&e){let e;o.iGM(e=o.CRH())&&(t._nodeDefs=e)}},viewQuery:function(e,t){if(1&e&&o.Gf(Ai,7),2&e){let e;o.iGM(e=o.CRH())&&(t._nodeOutlet=e.first)}},hostAttrs:["role","tree",1,"cdk-tree"],inputs:{dataSource:"dataSource",treeControl:"treeControl",trackBy:"trackBy"},exportAs:["cdkTree"],decls:1,vars:0,consts:[["cdkTreeNodeOutlet",""]],template:function(e,t){1&e&&o.GkF(0,0)},directives:[Ai],encapsulation:2}),e})(),Ii=(()=>{class e{constructor(t,i){this._elementRef=t,this._tree=i,this._destroyed=new rt.xQ,this._dataChanges=new rt.xQ,e.mostRecentTreeNode=this,this._elementRef.nativeElement.classList.add("cdk-tree-node"),this.role="treeitem"}get role(){return"treeitem"}set role(e){this._elementRef.nativeElement.setAttribute("role",e)}get data(){return this._data}set data(e){e!==this._data&&(this._data=e,this._setRoleFromData(),this._dataChanges.next())}get isExpanded(){return this._tree.treeControl.isExpanded(this._data)}_setExpanded(e){this._isAriaExpanded=e,this._elementRef.nativeElement.setAttribute("aria-expanded",`${e}`)}get level(){return this._tree.treeControl.getLevel?this._tree.treeControl.getLevel(this._data):this._parentNodeAriaLevel}ngOnInit(){this._parentNodeAriaLevel=function(e){let t=e.parentElement;for(;t&&!Ti(t);)t=t.parentElement;return t?t.classList.contains("cdk-nested-tree-node")?(0,yi.su)(t.getAttribute("aria-level")):0:-1}(this._elementRef.nativeElement),this._elementRef.nativeElement.setAttribute("aria-level",`${this.level+1}`)}ngDoCheck(){this.isExpanded!=this._isAriaExpanded&&this._setExpanded(this.isExpanded)}ngOnDestroy(){e.mostRecentTreeNode===this&&(e.mostRecentTreeNode=null),this._dataChanges.complete(),this._destroyed.next(),this._destroyed.complete()}focus(){this._elementRef.nativeElement.focus()}_setRoleFromData(){this.role="treeitem"}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.SBq),o.Y36(Si))},e.\u0275dir=o.lG2({type:e,selectors:[["cdk-tree-node"]],inputs:{role:"role"},exportAs:["cdkTreeNode"]}),e.mostRecentTreeNode=null,e})();function Ti(e){const t=e.classList;return!(!(null==t?void 0:t.contains("cdk-nested-tree-node"))&&!(null==t?void 0:t.contains("cdk-tree")))}const Ei=/([A-Za-z%]+)$/;let Pi=(()=>{class e{constructor(e,t,i,n){this._treeNode=e,this._tree=t,this._element=i,this._dir=n,this._destroyed=new rt.xQ,this.indentUnits="px",this._indent=40,this._setPadding(),n&&n.change.pipe((0,At.R)(this._destroyed)).subscribe(()=>this._setPadding(!0)),e._dataChanges.subscribe(()=>this._setPadding())}get level(){return this._level}set level(e){this._setLevelInput(e)}get indent(){return this._indent}set indent(e){this._setIndentInput(e)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_paddingIndent(){const e=this._treeNode.data&&this._tree.treeControl.getLevel?this._tree.treeControl.getLevel(this._treeNode.data):null,t=null==this._level?e:this._level;return"number"==typeof t?`${t*this._indent}${this.indentUnits}`:null}_setPadding(e=!1){const t=this._paddingIndent();if(t!==this._currentPadding||e){const e=this._element.nativeElement,i=this._dir&&"rtl"===this._dir.value?"paddingRight":"paddingLeft",n="paddingLeft"===i?"paddingRight":"paddingLeft";e.style[i]=t||"",e.style[n]="",this._currentPadding=t}}_setLevelInput(e){this._level=(0,yi.su)(e,null),this._setPadding()}_setIndentInput(e){let t=e,i="px";if("string"==typeof e){const n=e.split(Ei);t=n[0],i=n[1]||i}this.indentUnits=i,this._indent=(0,yi.su)(t),this._setPadding()}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(Ii),o.Y36(Si),o.Y36(o.SBq),o.Y36(_i.Is,8))},e.\u0275dir=o.lG2({type:e,selectors:[["","cdkTreeNodePadding",""]],inputs:{level:["cdkTreeNodePadding","level"],indent:["cdkTreeNodePaddingIndent","indent"]}}),e})(),Fi=(()=>{class e{constructor(e,t){this._tree=e,this._treeNode=t,this._recursive=!1}get recursive(){return this._recursive}set recursive(e){this._recursive=(0,yi.Ig)(e)}_toggle(e){this.recursive?this._tree.treeControl.toggleDescendants(this._treeNode.data):this._tree.treeControl.toggle(this._treeNode.data),e.stopPropagation()}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(Si),o.Y36(Ii))},e.\u0275dir=o.lG2({type:e,selectors:[["","cdkTreeNodeToggle",""]],hostBindings:function(e,t){1&e&&o.NdJ("click",function(e){return t._toggle(e)})},inputs:{recursive:["cdkTreeNodeToggleRecursive","recursive"]}}),e})(),Mi=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({}),e})();var Ui=i(72458),Di=i(66682);const Li=(0,Ui.sb)((0,Ui.Id)(Ii));let qi=(()=>{class e extends Li{constructor(e,t,i){super(e,t),this._elementRef=e,this._tree=t,this.tabIndex=Number(i)||0,this._elementRef.nativeElement.classList.add("mat-tree-node")}ngOnInit(){super.ngOnInit()}ngDoCheck(){super.ngDoCheck()}ngOnDestroy(){super.ngOnDestroy()}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.SBq),o.Y36(Si),o.$8M("tabindex"))},e.\u0275dir=o.lG2({type:e,selectors:[["mat-tree-node"]],inputs:{role:"role",disabled:"disabled",tabIndex:"tabIndex"},exportAs:["matTreeNode"],features:[o._Bn([{provide:Ii,useExisting:e}]),o.qOj]}),e})(),Ni=(()=>{class e extends Oi{}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275dir=o.lG2({type:e,selectors:[["","matTreeNodeDef",""]],inputs:{when:["matTreeNodeDefWhen","when"],data:["matTreeNode","data"]},features:[o._Bn([{provide:Oi,useExisting:e}]),o.qOj]}),e})(),$i=(()=>{class e extends Pi{get level(){return this._level}set level(e){this._setLevelInput(e)}get indent(){return this._indent}set indent(e){this._setIndentInput(e)}}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275dir=o.lG2({type:e,selectors:[["","matTreeNodePadding",""]],inputs:{level:["matTreeNodePadding","level"],indent:["matTreeNodePaddingIndent","indent"]},features:[o._Bn([{provide:Pi,useExisting:e}]),o.qOj]}),e})(),Bi=(()=>{class e{constructor(e,t){this.viewContainer=e,this._node=t}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.s_b),o.Y36(Ci,8))},e.\u0275dir=o.lG2({type:e,selectors:[["","matTreeNodeOutlet",""]],features:[o._Bn([{provide:Ai,useExisting:e}])]}),e})(),Yi=(()=>{class e extends Si{}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275cmp=o.Xpm({type:e,selectors:[["mat-tree"]],viewQuery:function(e,t){if(1&e&&o.Gf(Bi,7),2&e){let e;o.iGM(e=o.CRH())&&(t._nodeOutlet=e.first)}},hostAttrs:["role","tree",1,"mat-tree","cdk-tree"],exportAs:["matTree"],features:[o._Bn([{provide:Si,useExisting:e}]),o.qOj],decls:1,vars:0,consts:[["matTreeNodeOutlet",""]],template:function(e,t){1&e&&o.GkF(0,0)},directives:[Bi],styles:[".mat-tree{display:block}.mat-tree-node{display:flex;align-items:center;flex:1;word-wrap:break-word}.mat-nested-tree-node{border-bottom-width:0}\n"],encapsulation:2}),e})(),Ri=(()=>{class e extends Fi{get recursive(){return this._recursive}set recursive(e){this._recursive=(0,yi.Ig)(e)}}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275dir=o.lG2({type:e,selectors:[["","matTreeNodeToggle",""]],inputs:{recursive:["matTreeNodeToggleRecursive","recursive"]},features:[o._Bn([{provide:Fi,useExisting:e}]),o.qOj]}),e})(),Qi=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({imports:[[Mi,Ui.BQ],Ui.BQ]}),e})();class ji{constructor(e,t,i,n){this.transformFunction=e,this.getLevel=t,this.isExpandable=i,this.getChildren=n}_flattenNode(e,t,i,n){const s=this.transformFunction(e,t);if(i.push(s),this.isExpandable(s)){const s=this.getChildren(e);s&&(Array.isArray(s)?this._flattenChildren(s,t,i,n):s.pipe((0,vi.q)(1)).subscribe(e=>{this._flattenChildren(e,t,i,n)}))}return i}_flattenChildren(e,t,i,n){e.forEach((s,r)=>{let o=n.slice();o.push(r!=e.length-1),this._flattenNode(s,t+1,i,o)})}flattenNodes(e){let t=[];return e.forEach(e=>this._flattenNode(e,0,t,[])),t}expandFlattenedNodes(e,t){let i=[],n=[];return n[0]=!0,e.forEach(e=>{let s=!0;for(let t=0;t<=this.getLevel(e);t++)s=s&&n[t];s&&i.push(e),this.isExpandable(e)&&(n[this.getLevel(e)+1]=t.isExpanded(e))}),i}}class Ji extends bi.o2{constructor(e,t,i=[]){super(),this._treeControl=e,this._treeFlattener=t,this._flattenedData=new ot.X([]),this._expandedData=new ot.X([]),this._data=new ot.X(i)}get data(){return this._data.value}set data(e){this._data.next(e),this._flattenedData.next(this._treeFlattener.flattenNodes(this.data)),this._treeControl.dataNodes=this._flattenedData.value}connect(e){return(0,Di.T)(e.viewChange,this._treeControl.expansionModel.changed,this._flattenedData).pipe((0,Ct.U)(()=>(this._expandedData.next(this._treeFlattener.expandFlattenedNodes(this._flattenedData.value,this._treeControl)),this._expandedData.value)))}disconnect(){}}let zi=(()=>{class e{constructor(){this.createTreeFlattener(),this.createTreeControl(),this.createTreeDataSource()}set data(e){this.dataSource.data=e}createTreeFlattener(){this.flattener=new ji(this.transformer,this.getLevel,this.isExpandable,this.getChildren)}createTreeControl(){this.control=new ki(this.getLevel,this.isExpandable)}createTreeDataSource(){this.dataSource=new Ji(this.control,this.flattener)}transformer(e,t){const i=Object.assign({},e);return i.level=t,i.expandable=!!e.children,i}getLevel(e){return e.level}isExpandable(e){return e.expandable}getChildren(e){return(0,xi.of)(e.children)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const Vi=new o.OlP("AVAILABLE_CONTEXT_MENUS");var Hi=i(87636);class Gi{constructor(e){this.overlayRef=e}close(){this.overlayRef&&this.overlayRef.dispose()}backdropClick(){return this.overlayRef.backdropClick()}attachments(){return this.overlayRef.attachments()}detachments(){return this.overlayRef.detachments()}backdropElement(){return this.overlayRef.backdropElement}contextMenuElement(){return this.overlayRef.overlayElement}}const Wi=new o.OlP("CONTEXT_MENU_DATA");var Xi=i(90625);let Ki=(()=>{class e{constructor(e,t,i,n,r){this.router=e,this.zone=t,this.injector=i,this.resolver=n,this.overlay=r,this.router.events.pipe((0,st.h)(e=>e instanceof s.OD)).subscribe(()=>this.close())}open(e,t,i={}){if(this.close(),!e)return;const n=this.createOverlay(t,i);this.openContextMenu=new Gi(n);const s=new Hi.nK(this.injector,new WeakMap([[Wi,i.data],[Gi,this.openContextMenu]])),r=new Hi.C5(e,null,s);return n.attach(r),this.bindEventsToOverlay(),this.openContextMenu}close(){this.removeLastOrigin(),this.openContextMenu&&(this.openContextMenu.close(),this.openContextMenu=null)}createOverlay(e,t){return this.overlay.create({positionStrategy:this.getMenuPositionStrategy(e,t),scrollStrategy:this.overlay.scrollStrategies.close(),hasBackdrop:!0,backdropClass:"context-menu-backdrop",panelClass:"context-menu-overlay"})}bindEventsToOverlay(){this.openContextMenu.contextMenuElement().addEventListener("click",()=>{this.close()}),this.openContextMenu.backdropClick().subscribe(()=>{this.close()}),this.openContextMenu.backdropElement().addEventListener("contextmenu",e=>{e.preventDefault(),this.close()}),this.openContextMenu.detachments().subscribe(()=>{this.close()})}getMenuPositionStrategy(e,t){this.createOriginFromEvent(e,t);const i={originX:t.originX||"center",originY:t.originY||"bottom",overlayX:t.overlayX||"center",overlayY:t.overlayY||"top"};return this.overlay.position().flexibleConnectedTo(new o.SBq(this.lastOrigin)).withPositions([i,{originX:"end",originY:"bottom",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"bottom"}])}createOriginFromEvent(e,t){this.removeLastOrigin(),e instanceof HTMLElement||e instanceof EventTarget?this.lastOrigin=e:(this.lastOrigin=document.createElement("div"),this.lastOrigin.style.position="fixed",this.lastOrigin.style.top=e.clientY+(t.offsetY||0)+"px",this.lastOrigin.style.left=e.clientX+(t.offsetX||0)+"px",this.lastOrigin.id="dynamic-context-menu-origin",document.body.appendChild(this.lastOrigin))}removeLastOrigin(){this.lastOrigin&&"dynamic-context-menu-origin"===this.lastOrigin.id&&this.lastOrigin.remove()}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(s.F0),o.LFG(o.R0b),o.LFG(o.zs3),o.LFG(o._Vd),o.LFG(Xi.aV))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),en=(()=>{class e{constructor(e,t,i){this.el=e,this.contextMenu=t,this.disableContextMenu=!1,this.availableMenus={},i.forEach(e=>{Object.assign(this.availableMenus,e)})}ngOnInit(){this.el.nativeElement.addEventListener("contextmenu",e=>{e.preventDefault(),e.stopPropagation(),this.disableContextMenu||this.contextMenu.open(this.getMenuComponent(),e,{overlayX:"start",overlayY:"top",data:this.getMenuData()})})}getMenuComponent(){return"string"==typeof this.params?this.availableMenus[this.params]:this.availableMenus[this.params.type]}getMenuData(){return"string"==typeof this.params?{type:this.params}:this.params}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.SBq),o.Y36(Ki),o.Y36(Vi))},e.\u0275dir=o.lG2({type:e,selectors:[["","contextMenu",""]],inputs:{params:["contextMenu","params"],disableContextMenu:"disableContextMenu"}}),e})();var tn=i(22759);class nn{constructor(){this.subs=[]}ngOnInit(){this.dragging.subscribe(e=>{e?this.onDragStart():this.onDragEnd()})}ngOnDestroy(){this.unsubscribe()}onDragStart(){const e=(0,tn.R)(this.el.nativeElement,"mouseenter").subscribe(()=>this.onDragEnter()),t=(0,tn.R)(this.el.nativeElement,"mouseleave").subscribe(()=>this.onDragLeave());this.subs.push(e,t)}onDragEnter(){const e=["drag-over"];this.canDrop()&&(this.active=!0,e.push("can-drop")),this.el.nativeElement.classList.add(...e)}onDragLeave(){this.active=!1,this.removeDragOverClass()}onDragEnd(){this.unsubscribe(),this.removeDragOverClass(),this.active&&this.canDrop()&&(this.executeAction(),this.active=!1)}unsubscribe(){this.subs.forEach(e=>e&&e.unsubscribe())}removeDragOverClass(){this.el.nativeElement.classList.remove("drag-over","can-drop")}}nn.\u0275fac=function(e){return new(e||nn)},nn.\u0275dir=o.lG2({type:nn}),(0,r.gn)([(0,a.Ph)(Ve.dragging)],nn.prototype,"dragging",void 0);let sn=(()=>{class e extends nn{constructor(e,t){super(),this.el=e,this.store=t}canDrop(){const e=this.store.selectSnapshot(Ve.selectedEntries);return Ve.canMoveEntriesTo(e,this.folder)}executeAction(){return this.store.dispatch(new _(this.folder))}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.SBq),o.Y36(a.yh))},e.\u0275dir=o.lG2({type:e,selectors:[["","folderDropTarget",""]],inputs:{folder:["folderDropTarget","folder"]},features:[o.qOj]}),e})();function rn(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div",3),o.NdJ("click",function(){return o.CHM(e),o.oxw().selectFolder()}),o.ALo(1,"async"),o._UZ(2,"mat-icon",4),o.TgZ(3,"span",5),o._uU(4,"My Drive"),o.qZA(),o.qZA()}if(2&e){const e=o.oxw();o.ekj("active",!o.lcZ(1,2,e.selectedFolderId$))}}const on=function(e){return{type:"entry",entry:e}};function an(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"mat-tree-node",6),o.ALo(1,"async"),o._UZ(2,"mat-icon",7),o.TgZ(3,"button",8),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw().selectFolder(t)}),o._UZ(4,"mat-icon",9),o.TgZ(5,"span",10),o._uU(6),o.qZA(),o.qZA(),o.qZA()}if(2&e){const e=t.$implicit,i=o.oxw();o.ekj("active",o.lcZ(1,9,i.selectedFolderId$)===e.hash),o.Q6J("matTreeNodePaddingIndent",i.showRootNode?40:24)("contextMenu",o.VKq(11,on,e))("disableContextMenu",i.disableContextMenu)("folderDropTarget",e),o.xp6(2),o.ekj("expanded",i.tree.control.isExpanded(e)),o.xp6(4),o.Oqu(e.name)}}let cn=(()=>{class e{constructor(e,t){this.tree=e,this.store=t,this.expanded=!1,this.showRootNode=!1,this.disableContextMenu=!1,this.folderSelected=new o.vpe,this.subscriptions=[],this.selectedFolderId$=new ot.X(null)}selectFolder(e){this.selectedFolderId$.next(null==e?void 0:e.hash),this.folderSelected.emit(e)}toggle(){this.expanded=!this.expanded}ngOnInit(){const e=this.store.select(Ve.userFolders).pipe((0,st.h)(e=>!!e)).subscribe(e=>{this.tree.data=e}),t=this.store.select(Ve.activePage).subscribe(e=>{this.selectedFolderId$.next(e.folderHash)});this.subscriptions.push(e,t)}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(zi),o.Y36(a.yh))},e.\u0275cmp=o.Xpm({type:e,selectors:[["folders-tree"]],hostVars:4,hostBindings:function(e,t){2&e&&o.ekj("expanded",t.expanded)("has-root-node",t.showRootNode)},inputs:{expanded:"expanded",showRootNode:"showRootNode",disableContextMenu:"disableContextMenu"},outputs:{folderSelected:"folderSelected"},features:[o._Bn([zi])],decls:3,vars:3,consts:[["class","mat-tree-node root-tree-node",3,"active","click",4,"ngIf"],[3,"dataSource","treeControl"],["matTreeNodePadding","","class","tree-node",3,"matTreeNodePaddingIndent","contextMenu","disableContextMenu","folderDropTarget","active",4,"matTreeNodeDef"],[1,"mat-tree-node","root-tree-node",3,"click"],["svgIcon","network-drive-custom",1,"folder-icon"],["trans","",1,"text"],["matTreeNodePadding","",1,"tree-node",3,"matTreeNodePaddingIndent","contextMenu","disableContextMenu","folderDropTarget"],["matTreeNodeToggle","","svgIcon","arrow-drop-down",1,"toggle-expansion-icon"],["type","button",1,"no-style","folder-button",3,"click"],["svgIcon","folder",1,"folder-icon"],[1,"folder-name","text"]],template:function(e,t){1&e&&(o.YNc(0,rn,5,4,"div",0),o.TgZ(1,"mat-tree",1),o.YNc(2,an,7,13,"mat-tree-node",2),o.qZA()),2&e&&(o.Q6J("ngIf",t.showRootNode),o.xp6(1),o.Q6J("dataSource",t.tree.dataSource)("treeControl",t.tree.control))},directives:[n.O5,Yi,Ni,We.Hw,It.P,qi,$i,en,sn,Ri],pipes:[n.Ov],styles:["folders-tree{display:none;color:var(--be-text)}folders-tree.expanded{display:block}folders-tree.has-root-node .mat-tree-node:not(.root-tree-node){padding-left:16px}folders-tree .folder-icon{margin-right:5px;color:var(--be-secondary-text);flex:0 0 24px}folders-tree .mat-tree .folder-button{display:flex;align-items:center;color:inherit;width:100%;min-height:inherit;line-height:inherit}folders-tree .mat-tree .folder-name{padding-top:2.5px}folders-tree .mat-tree-node{padding-right:24px;white-space:nowrap;color:inherit;background-color:var(--be-background-alternative)}folders-tree .mat-tree-node.disabled{pointer-events:none;opacity:.5}folders-tree .mat-tree-node:not(.active):not(.drag-over):hover{background-color:var(--be-hover)}folders-tree .mat-tree-node.active{color:var(--be-accent-default);background-color:var(--be-accent-emphasis)}folders-tree .mat-tree-node.active .folder-icon{color:inherit}folders-tree .mat-tree-node.active .text{font-weight:500}folders-tree .root-tree-node{padding-left:12px;cursor:pointer}folders-tree .root-tree-node .mat-icon{margin-right:6px}"],encapsulation:2,changeDetection:0}),e})();class ln{constructor(e,t,i){this.dialogRef=e,this.store=t,this.actions=i,this.destination$=new ot.X(this.store.selectSnapshot(Ve.activePage).folder),this.loading$=new ot.X(!1),this.subscriptions=[],this.canMove$=this.destination$.pipe((0,Ct.U)(e=>{const t=this.store.selectSnapshot(Ve.selectedEntries);return Ve.canMoveEntriesTo(t,e)}))}ngOnInit(){const e=this.actions.pipe((0,a.Lt)(xe)).subscribe(()=>{this.loading$.next(!1)}),t=this.actions.pipe((0,a.Lt)(we),(0,vi.q)(1)).subscribe(()=>{this.close()});this.subscriptions.push(t,e)}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}confirm(){this.loading$.next(!0),this.store.dispatch(new _(this.destination$.value)).subscribe(()=>{this.loading$.next(!1)})}close(){this.dialogRef.close()}}function dn(e,t){if(1&e&&(o.TgZ(0,"div",11),o._uU(1),o.qZA()),2&e){const e=o.oxw();o.xp6(1),o.Oqu(e.errors.name)}}ln.\u0275fac=function(e){return new(e||ln)(o.Y36(Zt.so),o.Y36(a.yh),o.Y36(a.eX))},ln.\u0275cmp=o.Xpm({type:ln,selectors:[["move-entries-dialog"]],decls:15,vars:8,consts:[[1,"modal-header"],["mat-dialog-title","","trans",""],["type","button","mat-icon-button","","tabindex","-1",1,"close-button",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"ngSubmit"],[3,"expanded","disableContextMenu","showRootNode","folderSelected"],["type","button","mat-button","","trans","",1,"cancel-button",3,"click"],["type","submit","mat-raised-button","","color","accent","trans","",1,"submit-button",3,"disabled"]],template:function(e,t){1&e&&(o.TgZ(0,"div",0),o.TgZ(1,"h2",1),o._uU(2,"Move items"),o.qZA(),o.TgZ(3,"button",2),o.NdJ("click",function(){return t.close()}),o._UZ(4,"mat-icon",3),o.qZA(),o.qZA(),o.TgZ(5,"form",4),o.NdJ("ngSubmit",function(){return t.confirm()}),o.TgZ(6,"mat-dialog-content"),o.TgZ(7,"folders-tree",5),o.NdJ("folderSelected",function(e){return t.destination$.next(e)}),o.qZA(),o.qZA(),o.TgZ(8,"mat-dialog-actions"),o.TgZ(9,"button",6),o.NdJ("click",function(){return t.close()}),o._uU(10,"Cancel"),o.qZA(),o.TgZ(11,"button",7),o.ALo(12,"async"),o.ALo(13,"async"),o._uU(14,"Move"),o.qZA(),o.qZA(),o.qZA()),2&e&&(o.xp6(7),o.Q6J("expanded",!0)("disableContextMenu",!0)("showRootNode",!0),o.xp6(4),o.Q6J("disabled",!o.lcZ(12,4,t.canMove$)||o.lcZ(13,6,t.loading$)))},directives:[Zt.uh,It.P,Tt.lW,We.Hw,kt.JL,kt.F,Zt.xY,cn,Zt.H8],pipes:[n.Ov],styles:[".move-entries-dialog-container{width:350px}move-entries-dialog{display:block;width:400px;max-width:100%}move-entries-dialog folders-tree{border:1px solid var(--be-divider-lighter);border-radius:3px}move-entries-dialog .mat-dialog-actions{margin-top:15px}"],encapsulation:2,changeDetection:0}),(0,r.gn)([(0,a.Ph)(Ve.selectedEntries)],ln.prototype,"selectedEntries$",void 0);let pn=(()=>{class e{constructor(e,t,i,n,s){this.dialogRef=e,this.store=t,this.toast=i,this.entriesApi=n,this.changeDetection=s,this.entryName=new kt.NI,this.loading=new ot.X(!1),this.errors={}}ngOnInit(){this.entry=this.store.selectSnapshot(Ve.selectedEntries)[0],this.entryName.setValue(this.entry.name)}confirm(){const e=this.entryName.value;return e===this.entry.name?this.close():(this.loading.next(!0),this.entriesApi.update(this.entry.id,{name:e}).pipe((0,l.x)(()=>this.loading.next(!1))).subscribe(()=>{this.setErrors(),this.store.dispatch(new me(this.entry,e)),this.close()},e=>this.setErrors(e)))}setErrors(e){this.loading.next(!1),this.errors=e?e.errors:{},this.changeDetection.detectChanges()}close(){this.dialogRef.close()}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(Zt.so),o.Y36(a.yh),o.Y36(ze.F),o.Y36(Ue),o.Y36(o.sBO))},e.\u0275cmp=o.Xpm({type:e,selectors:[["rename-entry-dialog"]],decls:16,vars:5,consts:[[1,"modal-header"],["mat-dialog-title","","trans",""],["type","button","mat-icon-button","","tabindex","-1",1,"close-button",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"ngSubmit"],[1,"many-inputs"],[1,"input-container"],["type","text","placeholder","Enter a name...","trans-placeholder","","required","","min","3",3,"formControl"],["class","error",4,"ngIf"],["type","button","mat-button","","trans","",1,"cancel-button",3,"click"],["type","submit","mat-raised-button","","color","accent","trans","",1,"submit-button",3,"disabled"],[1,"error"]],template:function(e,t){1&e&&(o.TgZ(0,"div",0),o.TgZ(1,"h2",1),o._uU(2,"Rename"),o.qZA(),o.TgZ(3,"button",2),o.NdJ("click",function(){return t.close()}),o._UZ(4,"mat-icon",3),o.qZA(),o.qZA(),o.TgZ(5,"form",4),o.NdJ("ngSubmit",function(){return t.confirm()}),o.TgZ(6,"mat-dialog-content",5),o.TgZ(7,"div",6),o._UZ(8,"input",7),o.YNc(9,dn,2,1,"div",8),o.qZA(),o.qZA(),o.TgZ(10,"mat-dialog-actions"),o.TgZ(11,"button",9),o.NdJ("click",function(){return t.close()}),o._uU(12,"Cancel"),o.qZA(),o.TgZ(13,"button",10),o.ALo(14,"async"),o._uU(15,"Rename"),o.qZA(),o.qZA(),o.qZA()),2&e&&(o.xp6(8),o.Q6J("formControl",t.entryName),o.xp6(1),o.Q6J("ngIf",t.errors.name),o.xp6(4),o.Q6J("disabled",o.lcZ(14,3,t.loading)))},directives:[Zt.uh,It.P,Tt.lW,We.Hw,kt.JL,kt.F,Zt.xY,kt.Fj,kt.Q7,kt.JJ,kt.oH,n.O5,Zt.H8],pipes:[n.Ov],styles:["[_nghost-%COMP%]{display:block;width:400px;max-width:100%}"],changeDetection:0}),e})(),un=(()=>{class e{constructor(e,t,i){this.store=e,this.workspaces=t,this.currentUser=i}getActions(){return this.updateStatus(),this.actions}getSelectedEntries(){return this.store.selectSnapshot(Ve.selectedEntries)}updateStatus(){this.multipleEntriesSelected=this.store.selectSnapshot(Ve.multipleEntriesSelected),this.allStarred=this.store.selectSnapshot(Ve.allSelectedEntriesStarred),this.onlyFoldersSelected=this.store.selectSnapshot(Ve.onlyFoldersSelected)}hasPermission(e){if("files.create"===e){const e=this.store.selectSnapshot(Ve.activePage).folder,t=!this.multipleEntriesSelected&&this.getSelectedFolder()||e;return((null==t?void 0:t.permissions)||[])["files.update"]}return this.getSelectedEntries().every(t=>t.permissions[e])}getSelectedFolder(){return this.getSelectedEntries().find(e=>"folder"===e.type)}openUploadWindow(e){this.store.dispatch(new $(e))}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(a.yh),o.LFG(Je.b),o.LFG(Fe.I))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),hn=(()=>{class e extends un{constructor(){super(...arguments),this.actions=[{viewName:"Preview",icon:"visibility",showInCompact:!0,execute:()=>{this.store.dispatch(new P)},visible:()=>!this.onlyFoldersSelected},{viewName:"Manage People",icon:"person-add",showInCompact:!0,execute:()=>{this.store.dispatch(new k(Ht))},visible:()=>this.hasPermission("files.update")},{viewName:"Get shareable link",icon:"link",execute:()=>{this.store.dispatch(new k(gi,null,{panelClass:"share-link-dialog-container",autoFocus:!1}))},visible:()=>!this.multipleEntriesSelected&&this.hasPermission("files.update")},{viewName:"Add a star",icon:"star",execute:()=>{this.store.dispatch(new M(this.getSelectedEntries()))},visible:()=>!this.allStarred},{viewName:"Remove star",icon:"star-border",execute:()=>{this.store.dispatch(new U(this.getSelectedEntries()))},visible:()=>this.allStarred},{viewName:"New Folder",icon:"create-new-folder",separatorBefore:this.store.selectSnapshot(Ve.isMobile),execute:()=>{this.store.dispatch(new k(mi,{folder:this.getSelectedFolder()}))},visible:()=>this.hasPermission("files.create")},{viewName:"Upload Files",icon:"cloud-upload",execute:()=>{this.openUploadWindow("file")},visible:()=>this.hasPermission("files.create")&&this.store.selectSnapshot(Ve.isMobile)},{viewName:"Upload Folder",icon:"upload-folder-custom",execute:()=>{this.openUploadWindow("directory")},visible:()=>this.hasPermission("files.create")&&this.store.selectSnapshot(Ve.isMobile)},{viewName:"Move to",icon:"subdirectory-arrow-right",separatorBefore:this.store.selectSnapshot(Ve.isMobile),execute:()=>{this.store.dispatch(new k(ln,null,{panelClass:"move-entries-dialog-container"}))},visible:()=>this.hasPermission("files.update")},{viewName:"Rename",icon:"edit",execute:()=>{this.store.dispatch(new k(pn))},visible:()=>!this.multipleEntriesSelected&&this.hasPermission("files.update")},{viewName:"Make a copy",icon:"file-copy",execute:()=>{this.store.dispatch(new N)},visible:()=>this.hasPermission("files.create")},{viewName:"Download",icon:"file-download",execute:()=>{this.store.dispatch(new F)},visible:()=>this.hasPermission("files.download")},{viewName:"Delete",icon:"delete",showInCompact:!0,separatorBefore:!0,execute:()=>{this.store.dispatch(new b)},visible:()=>this.hasPermission("files.delete")}]}}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),gn=(()=>{class e extends un{constructor(){super(...arguments),this.actions=[{viewName:"New Folder",icon:"create-new-folder",execute:()=>{this.store.dispatch(new k(mi))},visible:()=>this.hasPermission("files.create")},{viewName:"Upload Files",icon:"cloud-upload",separatorBefore:!0,execute:()=>{this.openUploadWindow("file")},visible:()=>this.hasPermission("files.create")},{viewName:"Upload Folder",icon:"upload-folder-custom",execute:()=>{this.openUploadWindow("directory")},visible:()=>this.hasPermission("files.create")}]}}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const fn=()=>!0;let mn=(()=>{class e extends un{constructor(e,t,i,n){super(e,n,t),this.store=e,this.currentUser=t,this.shares=i,this.workspaces=n,this.actions=[{viewName:"Preview",icon:"visibility",execute:()=>{this.store.dispatch(new P)},visible:()=>!this.onlyFoldersSelected},{viewName:"Manage People",icon:"person-add",showInCompact:!0,execute:()=>{this.store.dispatch(new k(Ht))},visible:()=>this.hasPermission("files.update")},{viewName:"Get shareable link",icon:"link",execute:()=>{this.store.dispatch(new k(gi,null,{panelClass:"share-link-dialog-container",autoFocus:!1}))},visible:()=>!this.multipleEntriesSelected&&this.hasPermission("files.update")},{viewName:"Rename",icon:"edit",execute:()=>{this.store.dispatch(new k(pn))},visible:()=>!this.multipleEntriesSelected&&this.hasPermission("files.update")},{viewName:"Make a copy",icon:"file-copy",execute:()=>{this.store.dispatch(new N)},visible:()=>this.hasPermission("files.download")&&this.hasPermission("files.create")},{viewName:"Download",icon:"file-download",execute:()=>{this.store.dispatch(new F)},visible:()=>this.hasPermission("files.download")},{viewName:"Remove",icon:"delete",showInCompact:!0,execute:()=>{const e=this.getSelectedEntries();this.shares.detachUser(this.currentUser.get("id"),e.map(e=>e.id)).subscribe(()=>{this.store.dispatch(new D(e))})},visible:fn}]}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(a.yh),o.LFG(Fe.I),o.LFG(gt),o.LFG(Je.b))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),vn=(()=>{class e extends un{constructor(){super(...arguments),this.actions=[{viewName:"Restore",icon:"restore",showInCompact:!0,execute:()=>{this.store.dispatch(new I)},visible:()=>this.hasPermission("files.update")},{viewName:"Delete Forever",icon:"delete-forever",showInCompact:!0,execute:()=>{this.deleteForever()},visible:()=>this.hasPermission("files.delete")}]}deleteForever(){this.store.dispatch(new C({title:"Delete Forever",body:"This will permanently delete selected items.",bodyBold:"This action can not be undone.",ok:"Delete Forever"},new T))}}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),bn=(()=>{class e extends un{constructor(){super(...arguments),this.actions=[{viewName:"Empty Trash",icon:"delete-forever",execute:()=>{this.emptyTrash()},visible:()=>this.hasPermission("files.delete")}]}emptyTrash(){this.store.dispatch(new C({title:"Empty Trash",body:"All files and folders in your trash will be permanently deleted.",bodyBold:"This action can not be undone.",ok:"Empty Trash"},new E))}}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),wn=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var xn=i(65072),yn=i(70837),_n=i(87519),kn=i(39761),Cn=i(54395),An=i(90739),Zn=i(23876),On=i(75499),Sn=i(83644),In=i(45418),Tn=i(79893);let En=(()=>{class e{constructor(e,t,i,n){var s;this.store=e,this.driveApi=t,this.router=i,this.currentUser=n,this.filters=[Tn.M,new Sn.XQ({type:Sn.Bq.Select,key:"owner_id",label:"Owner",description:"User that this file was uploaded by",defaultValue:(s=this.currentUser).get("id"),options:[{key:"Anyone",value:{value:null,operator:"!="}},{key:"Owned by me",value:s.get("id")},{key:"Not owned by me",value:{value:s.get("id"),operator:"!="}}]}),new In.T7({description:"Date file was uploaded"}),new In.yH({description:"Date file was last changed"}),new Sn.XQ({type:Sn.Bq.StaticValue,key:"deleted_at",label:"Trashed",defaultOperator:Sn.pg.ne,defaultValue:null,description:"Only show files that are in the trash"}),new Sn.XQ({type:Sn.Bq.StaticValue,key:"shareableLink",label:"Has Shareable Link",description:"Only show files that have a shareable link",defaultValue:"*",defaultOperator:Sn.pg.has}),new Sn.XQ({type:Sn.Bq.StaticValue,key:"sharedByMe",label:"Shared By Me",defaultValue:!0,description:"Only show files that are shared with someone"})],this.searchControl=new kt.NI,this.filterChange$=new ot.X(null)}ngOnInit(){this.metaSub=this.store.select(Ve.meta).subscribe(e=>{e.query||e.filters?this.searchEl.nativeElement.classList.add("always-white"):this.searchEl.nativeElement.classList.remove("always-white")}),(0,An.aj)([this.searchControl.valueChanges.pipe((0,_n.x)(),(0,kn.O)(null)),this.filterChange$]).pipe((0,nt.T)(1),(0,Cn.b)(0)).subscribe(([e,t])=>{const i={query:e,filters:t},n=this.store.selectSnapshot(Zn.uu.state).root.queryParams;!e&&!t||lt()(n,i)?t||e||!this.inSearchPage()||this.router.navigate(["/drive"]):this.store.dispatch(new g(i))})}ngOnDestroy(){var e;null===(e=this.metaSub)||void 0===e||e.unsubscribe()}openSearchPage(){this.inSearchPage()||this.store.dispatch(new g)}inSearchPage(){return this.router.routerState.snapshot.url.includes("/drive/search")}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(a.yh),o.Y36(Ue),o.Y36(s.F0),o.Y36(Fe.I))},e.\u0275cmp=o.Xpm({type:e,selectors:[["main-searchbar"]],viewQuery:function(e,t){if(1&e&&o.Gf(On.k,7,o.SBq),2&e){let e;o.iGM(e=o.CRH())&&(t.searchEl=e.first)}},decls:1,vars:3,consts:[["pluralName","files",1,"nav-searchbar",3,"compact","searchControl","filters","inputFocus","filterChange"]],template:function(e,t){1&e&&(o.TgZ(0,"search-input-with-filters",0),o.NdJ("inputFocus",function(){return t.openSearchPage()})("filterChange",function(e){return t.filterChange$.next(e)}),o.qZA()),2&e&&o.Q6J("compact",!0)("searchControl",t.searchControl)("filters",t.filters)},directives:[On.k],styles:["[_nghost-%COMP%]{display:block;width:100%;align-self:flex-start;margin-top:12.5px}search-input-with-filters.nav-searchbar[_ngcontent-%COMP%]{background-color:var(--be-accent-emphasis);max-width:750px}search-input-with-filters.nav-searchbar[_ngcontent-%COMP%] .search-input::-moz-placeholder{color:currentColor}search-input-with-filters.nav-searchbar[_ngcontent-%COMP%] .search-input:-ms-input-placeholder{color:currentColor}search-input-with-filters.nav-searchbar[_ngcontent-%COMP%] .clear-button, search-input-with-filters.nav-searchbar[_ngcontent-%COMP%] .filter-button, search-input-with-filters.nav-searchbar[_ngcontent-%COMP%] .search-icon, search-input-with-filters.nav-searchbar[_ngcontent-%COMP%] .search-input::placeholder{color:currentColor}"],changeDetection:0}),e})();var Pn=i(80521),Fn=i(71386),Mn=i(36461),Un=i(77393);function Dn(e){return t=>t.lift(new Ln(e))}class Ln{constructor(e){this.value=e}call(e,t){return t.subscribe(new qn(e,this.value))}}class qn extends Un.L{constructor(e,t){super(e),this.value=t}_next(e){this.destination.next(this.value)}}var Nn=i(46237),$n=i(19238);const Bn=["*"];function Yn(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div",2),o.NdJ("click",function(){return o.CHM(e),o.oxw()._onBackdropClicked()}),o.qZA()}if(2&e){const e=o.oxw();o.ekj("mat-drawer-shown",e._isShowingBackdrop())}}function Rn(e,t){1&e&&(o.TgZ(0,"mat-drawer-content"),o.Hsn(1,2),o.qZA())}const Qn=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],jn=["mat-drawer","mat-drawer-content","*"];function Jn(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div",2),o.NdJ("click",function(){return o.CHM(e),o.oxw()._onBackdropClicked()}),o.qZA()}if(2&e){const e=o.oxw();o.ekj("mat-drawer-shown",e._isShowingBackdrop())}}function zn(e,t){1&e&&(o.TgZ(0,"mat-sidenav-content",3),o.Hsn(1,2),o.qZA())}const Vn=[[["mat-sidenav"]],[["mat-sidenav-content"]],"*"],Hn=["mat-sidenav","mat-sidenav-content","*"],Gn=".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer{transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}\n",Wn={transformDrawer:(0,qt.X$)("transform",[(0,qt.SB)("open, open-instant",(0,qt.oB)({transform:"none",visibility:"visible"})),(0,qt.SB)("void",(0,qt.oB)({"box-shadow":"none",visibility:"hidden"})),(0,qt.eR)("void => open-instant",(0,qt.jt)("0ms")),(0,qt.eR)("void <=> open, open-instant => void",(0,qt.jt)("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])},Xn=new o.OlP("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function(){return!1}}),Kn=new o.OlP("MAT_DRAWER_CONTAINER");let es=(()=>{class e extends Fn.PQ{constructor(e,t,i,n,s){super(i,n,s),this._changeDetectorRef=e,this._container=t}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.sBO),o.Y36((0,o.Gpc)(()=>is)),o.Y36(o.SBq),o.Y36(Fn.mF),o.Y36(o.R0b))},e.\u0275cmp=o.Xpm({type:e,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(e,t){2&e&&o.Udp("margin-left",t._container._contentMargins.left,"px")("margin-right",t._container._contentMargins.right,"px")},features:[o.qOj],ngContentSelectors:Bn,decls:1,vars:0,template:function(e,t){1&e&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),e})(),ts=(()=>{class e{constructor(e,t,i,n,s,r,a){this._elementRef=e,this._focusTrapFactory=t,this._focusMonitor=i,this._platform=n,this._ngZone=s,this._doc=r,this._container=a,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._opened=!1,this._animationStarted=new rt.xQ,this._animationEnd=new rt.xQ,this._animationState="void",this.openedChange=new o.vpe(!0),this._openedStream=this.openedChange.pipe((0,st.h)(e=>e),(0,Ct.U)(()=>{})),this.openedStart=this._animationStarted.pipe((0,st.h)(e=>e.fromState!==e.toState&&0===e.toState.indexOf("open")),Dn(void 0)),this._closedStream=this.openedChange.pipe((0,st.h)(e=>!e),(0,Ct.U)(()=>{})),this.closedStart=this._animationStarted.pipe((0,st.h)(e=>e.fromState!==e.toState&&"void"===e.toState),Dn(void 0)),this._destroyed=new rt.xQ,this.onPositionChanged=new o.vpe,this._modeChanged=new rt.xQ,this.openedChange.subscribe(e=>{e?(this._doc&&(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement),this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus()}),this._ngZone.runOutsideAngular(()=>{(0,tn.R)(this._elementRef.nativeElement,"keydown").pipe((0,st.h)(e=>e.keyCode===Mn.hY&&!this.disableClose&&!(0,Mn.Vb)(e)),(0,At.R)(this._destroyed)).subscribe(e=>this._ngZone.run(()=>{this.close(),e.stopPropagation(),e.preventDefault()}))}),this._animationEnd.pipe((0,_n.x)((e,t)=>e.fromState===t.fromState&&e.toState===t.toState)).subscribe(e=>{const{fromState:t,toState:i}=e;(0===i.indexOf("open")&&"void"===t||"void"===i&&0===t.indexOf("open"))&&this.openedChange.emit(this._opened)})}get position(){return this._position}set position(e){(e="end"===e?"end":"start")!=this._position&&(this._position=e,this.onPositionChanged.emit())}get mode(){return this._mode}set mode(e){this._mode=e,this._updateFocusTrapState(),this._modeChanged.next()}get disableClose(){return this._disableClose}set disableClose(e){this._disableClose=(0,yi.Ig)(e)}get autoFocus(){const e=this._autoFocus;return null==e?"side"!==this.mode:e}set autoFocus(e){this._autoFocus=(0,yi.Ig)(e)}get opened(){return this._opened}set opened(e){this.toggle((0,yi.Ig)(e))}_takeFocus(){this.autoFocus&&this._focusTrap&&this._focusTrap.focusInitialElementWhenReady().then(e=>{e||"function"!=typeof this._elementRef.nativeElement.focus||this._elementRef.nativeElement.focus()})}_restoreFocus(){this.autoFocus&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,this._openedVia):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null,this._openedVia=null)}_isFocusWithinDrawer(){var e;const t=null===(e=this._doc)||void 0===e?void 0:e.activeElement;return!!t&&this._elementRef.nativeElement.contains(t)}ngAfterContentInit(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState()}ngAfterContentChecked(){this._platform.isBrowser&&(this._enableAnimations=!0)}ngOnDestroy(){this._focusTrap&&this._focusTrap.destroy(),this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(e){return this.toggle(!0,e)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0)}toggle(e=!this.opened,t){return this._setOpen(e,!e&&this._isFocusWithinDrawer(),t)}_setOpen(e,t,i="program"){return this._opened=e,e?(this._animationState=this._enableAnimations?"open":"open-instant",this._openedVia=i):(this._animationState="void",t&&this._restoreFocus()),this._updateFocusTrapState(),new Promise(e=>{this.openedChange.pipe((0,vi.q)(1)).subscribe(t=>e(t?"open":"close"))})}_getWidth(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=this.opened&&"side"!==this.mode)}_animationStartListener(e){this._animationStarted.next(e)}_animationDoneListener(e){this._animationEnd.next(e)}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.SBq),o.Y36($n.qV),o.Y36($n.tE),o.Y36(Pn.t4),o.Y36(o.R0b),o.Y36(n.K0,8),o.Y36(Kn,8))},e.\u0275cmp=o.Xpm({type:e,selectors:[["mat-drawer"]],hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(e,t){1&e&&o.WFA("@transform.start",function(e){return t._animationStartListener(e)})("@transform.done",function(e){return t._animationDoneListener(e)}),2&e&&(o.uIk("align",null),o.d8E("@transform",t._animationState),o.ekj("mat-drawer-end","end"===t.position)("mat-drawer-over","over"===t.mode)("mat-drawer-push","push"===t.mode)("mat-drawer-side","side"===t.mode)("mat-drawer-opened",t.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],ngContentSelectors:Bn,decls:2,vars:0,consts:[["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(e,t){1&e&&(o.F$t(),o.TgZ(0,"div",0),o.Hsn(1),o.qZA())},directives:[Fn.PQ],encapsulation:2,data:{animation:[Wn.transformDrawer]},changeDetection:0}),e})(),is=(()=>{class e{constructor(e,t,i,n,s,r=!1,a){this._dir=e,this._element=t,this._ngZone=i,this._changeDetectorRef=n,this._animationMode=a,this._drawers=new o.n_E,this.backdropClick=new o.vpe,this._destroyed=new rt.xQ,this._doCheckSubject=new rt.xQ,this._contentMargins={left:null,right:null},this._contentMarginChanges=new rt.xQ,e&&e.change.pipe((0,At.R)(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),s.change().pipe((0,At.R)(this._destroyed)).subscribe(()=>this.updateContentMargins()),this._autosize=r}get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(e){this._autosize=(0,yi.Ig)(e)}get hasBackdrop(){return null==this._backdropOverride?!this._start||"side"!==this._start.mode||!this._end||"side"!==this._end.mode:this._backdropOverride}set hasBackdrop(e){this._backdropOverride=null==e?null:(0,yi.Ig)(e)}get scrollable(){return this._userContent||this._content}ngAfterContentInit(){this._allDrawers.changes.pipe((0,kn.O)(this._allDrawers),(0,At.R)(this._destroyed)).subscribe(e=>{this._drawers.reset(e.filter(e=>!e._container||e._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe((0,kn.O)(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(e=>{this._watchDrawerToggle(e),this._watchDrawerPosition(e),this._watchDrawerMode(e)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe((0,Cn.b)(10),(0,At.R)(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(e=>e.open())}close(){this._drawers.forEach(e=>e.close())}updateContentMargins(){let e=0,t=0;if(this._left&&this._left.opened)if("side"==this._left.mode)e+=this._left._getWidth();else if("push"==this._left.mode){const i=this._left._getWidth();e+=i,t-=i}if(this._right&&this._right.opened)if("side"==this._right.mode)t+=this._right._getWidth();else if("push"==this._right.mode){const i=this._right._getWidth();t+=i,e-=i}e=e||null,t=t||null,e===this._contentMargins.left&&t===this._contentMargins.right||(this._contentMargins={left:e,right:t},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(e){e._animationStarted.pipe((0,st.h)(e=>e.fromState!==e.toState),(0,At.R)(this._drawers.changes)).subscribe(e=>{"open-instant"!==e.toState&&"NoopAnimations"!==this._animationMode&&this._element.nativeElement.classList.add("mat-drawer-transition"),this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),"side"!==e.mode&&e.openedChange.pipe((0,At.R)(this._drawers.changes)).subscribe(()=>this._setContainerClass(e.opened))}_watchDrawerPosition(e){e&&e.onPositionChanged.pipe((0,At.R)(this._drawers.changes)).subscribe(()=>{this._ngZone.onMicrotaskEmpty.pipe((0,vi.q)(1)).subscribe(()=>{this._validateDrawers()})})}_watchDrawerMode(e){e&&e._modeChanged.pipe((0,At.R)((0,Di.T)(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(e){const t=this._element.nativeElement.classList,i="mat-drawer-container-has-open";e?t.add(i):t.remove(i)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(e=>{"end"==e.position?this._end=e:this._start=e}),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(e=>e&&!e.disableClose&&this._canHaveBackdrop(e)).forEach(e=>e._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._canHaveBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._canHaveBackdrop(this._end)}_canHaveBackdrop(e){return"side"!==e.mode||!!this._backdropOverride}_isDrawerOpen(e){return null!=e&&e.opened}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(_i.Is,8),o.Y36(o.SBq),o.Y36(o.R0b),o.Y36(o.sBO),o.Y36(Fn.rL),o.Y36(Xn),o.Y36(Nn.Qb,8))},e.\u0275cmp=o.Xpm({type:e,selectors:[["mat-drawer-container"]],contentQueries:function(e,t,i){if(1&e&&(o.Suo(i,es,5),o.Suo(i,ts,5)),2&e){let e;o.iGM(e=o.CRH())&&(t._content=e.first),o.iGM(e=o.CRH())&&(t._allDrawers=e)}},viewQuery:function(e,t){if(1&e&&o.Gf(es,5),2&e){let e;o.iGM(e=o.CRH())&&(t._userContent=e.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(e,t){2&e&&o.ekj("mat-drawer-container-explicit-backdrop",t._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[o._Bn([{provide:Kn,useExisting:e}])],ngContentSelectors:jn,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown","click",4,"ngIf"],[4,"ngIf"],[1,"mat-drawer-backdrop",3,"click"]],template:function(e,t){1&e&&(o.F$t(Qn),o.YNc(0,Yn,1,2,"div",0),o.Hsn(1),o.Hsn(2,1),o.YNc(3,Rn,2,0,"mat-drawer-content",1)),2&e&&(o.Q6J("ngIf",t.hasBackdrop),o.xp6(3),o.Q6J("ngIf",!t._content))},directives:[n.O5,es],styles:[Gn],encapsulation:2,changeDetection:0}),e})(),ns=(()=>{class e extends es{constructor(e,t,i,n,s){super(e,t,i,n,s)}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.sBO),o.Y36((0,o.Gpc)(()=>rs)),o.Y36(o.SBq),o.Y36(Fn.mF),o.Y36(o.R0b))},e.\u0275cmp=o.Xpm({type:e,selectors:[["mat-sidenav-content"]],hostAttrs:[1,"mat-drawer-content","mat-sidenav-content"],hostVars:4,hostBindings:function(e,t){2&e&&o.Udp("margin-left",t._container._contentMargins.left,"px")("margin-right",t._container._contentMargins.right,"px")},features:[o.qOj],ngContentSelectors:Bn,decls:1,vars:0,template:function(e,t){1&e&&(o.F$t(),o.Hsn(0))},encapsulation:2,changeDetection:0}),e})(),ss=(()=>{class e extends ts{constructor(){super(...arguments),this._fixedInViewport=!1,this._fixedTopGap=0,this._fixedBottomGap=0}get fixedInViewport(){return this._fixedInViewport}set fixedInViewport(e){this._fixedInViewport=(0,yi.Ig)(e)}get fixedTopGap(){return this._fixedTopGap}set fixedTopGap(e){this._fixedTopGap=(0,yi.su)(e)}get fixedBottomGap(){return this._fixedBottomGap}set fixedBottomGap(e){this._fixedBottomGap=(0,yi.su)(e)}}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275cmp=o.Xpm({type:e,selectors:[["mat-sidenav"]],hostAttrs:["tabIndex","-1",1,"mat-drawer","mat-sidenav"],hostVars:17,hostBindings:function(e,t){2&e&&(o.uIk("align",null),o.Udp("top",t.fixedInViewport?t.fixedTopGap:null,"px")("bottom",t.fixedInViewport?t.fixedBottomGap:null,"px"),o.ekj("mat-drawer-end","end"===t.position)("mat-drawer-over","over"===t.mode)("mat-drawer-push","push"===t.mode)("mat-drawer-side","side"===t.mode)("mat-drawer-opened",t.opened)("mat-sidenav-fixed",t.fixedInViewport))},inputs:{fixedInViewport:"fixedInViewport",fixedTopGap:"fixedTopGap",fixedBottomGap:"fixedBottomGap"},exportAs:["matSidenav"],features:[o.qOj],ngContentSelectors:Bn,decls:2,vars:0,consts:[["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(e,t){1&e&&(o.F$t(),o.TgZ(0,"div",0),o.Hsn(1),o.qZA())},directives:[Fn.PQ],encapsulation:2,data:{animation:[Wn.transformDrawer]},changeDetection:0}),e})(),rs=(()=>{class e extends is{}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275cmp=o.Xpm({type:e,selectors:[["mat-sidenav-container"]],contentQueries:function(e,t,i){if(1&e&&(o.Suo(i,ns,5),o.Suo(i,ss,5)),2&e){let e;o.iGM(e=o.CRH())&&(t._content=e.first),o.iGM(e=o.CRH())&&(t._allDrawers=e)}},hostAttrs:[1,"mat-drawer-container","mat-sidenav-container"],hostVars:2,hostBindings:function(e,t){2&e&&o.ekj("mat-drawer-container-explicit-backdrop",t._backdropOverride)},exportAs:["matSidenavContainer"],features:[o._Bn([{provide:Kn,useExisting:e}]),o.qOj],ngContentSelectors:Hn,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown","click",4,"ngIf"],["cdkScrollable","",4,"ngIf"],[1,"mat-drawer-backdrop",3,"click"],["cdkScrollable",""]],template:function(e,t){1&e&&(o.F$t(Vn),o.YNc(0,Jn,1,2,"div",0),o.Hsn(1),o.Hsn(2,1),o.YNc(3,zn,2,0,"mat-sidenav-content",1)),2&e&&(o.Q6J("ngIf",t.hasBackdrop),o.xp6(3),o.Q6J("ngIf",!t._content))},directives:[n.O5,ns,Fn.PQ],styles:[Gn],encapsulation:2,changeDetection:0}),e})(),os=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({imports:[[n.ez,Ui.BQ,Pn.ud,Fn.ZD],Fn.ZD,Ui.BQ]}),e})();var as=i(15381),cs=i(52781);class ls{constructor(e,t,i){this.dialog=e,this.store=t,this.uploadInputConfig=i}openNewFolderDialog(){this.dialog.open(mi)}openUploadsPanel(e){this.store.dispatch(new S(e))}}ls.\u0275fac=function(e){return new(e||ls)(o.Y36(as.u),o.Y36(a.yh),o.Y36(Ie))},ls.\u0275cmp=o.Xpm({type:ls,selectors:[["sidebar-action-buttons"]],decls:8,vars:7,consts:[["mat-raised-button","","color","accent",1,"upload-button",3,"disabled","uploadButton","filesSelected"],["svgIcon","cloud-upload"],["trans",""],["mat-raised-button","","color","accent",1,"new-folder-button",3,"disabled","click"],["svgIcon","create-new-folder"]],template:function(e,t){1&e&&(o.TgZ(0,"button",0),o.NdJ("filesSelected",function(e){return t.openUploadsPanel(e)}),o.ALo(1,"async"),o._UZ(2,"mat-icon",1),o.TgZ(3,"span",2),o._uU(4,"Upload"),o.qZA(),o.qZA(),o.TgZ(5,"button",3),o.NdJ("click",function(){return t.openNewFolderDialog()}),o.ALo(6,"async"),o._UZ(7,"mat-icon",4),o.qZA()),2&e&&(o.Q6J("disabled",!o.lcZ(1,3,t.canUpload$))("uploadButton",t.uploadInputConfig),o.xp6(5),o.Q6J("disabled",!o.lcZ(6,5,t.canUpload$)))},directives:[Tt.lW,cs.c,We.Hw,It.P],pipes:[n.Ov],styles:["sidebar-action-buttons{display:block;text-align:center}sidebar-action-buttons .upload-button{margin-right:5px;margin-bottom:2px}sidebar-action-buttons .upload-button .mat-icon{margin-right:5px}sidebar-action-buttons .new-folder-button{max-width:60px;min-width:auto}"],encapsulation:2,changeDetection:0}),(0,r.gn)([(0,a.Ph)(Ve.canUpload)],ls.prototype,"canUpload$",void 0);var ds=i(14434),ps=i(83326),us=i(12178),hs=i(64833),gs=i(52644);function fs(e,t){if(1&e&&(o.TgZ(0,"div",4),o._uU(1),o.ALo(2,"formattedFileSize"),o.ALo(3,"async"),o.ALo(4,"trans"),o.ALo(5,"formattedFileSize"),o.ALo(6,"async"),o.ALo(7,"trans"),o.qZA()),2&e){const e=o.oxw();o.Q6J("@fadeIn",void 0),o.xp6(1),o.HOy(" ",o.lcZ(2,5,o.lcZ(3,7,e.spaceUsed$))," ",o.lcZ(4,9,"of")," ",o.lcZ(5,11,o.lcZ(6,13,e.spaceAvailable$))," ",o.lcZ(7,15,"used"),"\n")}}function ms(e,t){1&e&&o._UZ(0,"skeleton",4),2&e&&o.Q6J("@fadeOut",void 0)}function vs(e,t){1&e&&(o.TgZ(0,"div"),o.TgZ(1,"a",5),o._uU(2,"Upgrade Storage"),o.qZA(),o.qZA())}class bs{constructor(e,t){this.settings=e,this.workspaces=t}}bs.\u0275fac=function(e){return new(e||bs)(o.Y36(Ot.Z),o.Y36(Je.b))},bs.\u0275cmp=o.Xpm({type:bs,selectors:[["available-space-indicator"]],decls:9,vars:12,consts:[["mode","determinate","color","accent",3,"value"],["class","usage-info",4,"ngIf","ngIfElse"],["skeleton",""],[4,"ngIf"],[1,"usage-info"],["mat-button","","routerLink","/billing/upgrade","target","_blank","trans","",1,"upgrade-link"]],template:function(e,t){if(1&e&&(o._UZ(0,"mat-progress-bar",0),o.ALo(1,"async"),o.YNc(2,fs,8,17,"div",1),o.ALo(3,"async"),o.YNc(4,ms,1,1,"ng-template",null,2,o.W1O),o.YNc(6,vs,3,0,"div",3),o.ALo(7,"async"),o.ALo(8,"async")),2&e){const e=o.MAs(5);let i;o.Q6J("value",o.lcZ(1,4,t.spaceUsedPercent$)),o.xp6(2),o.Q6J("ngIf",null!==o.lcZ(3,6,t.spaceUsed$))("ngIfElse",e),o.xp6(4),o.Q6J("ngIf",t.settings.get("billing.enable")&&(!o.lcZ(7,8,t.workspaces.activeId$)||(null==(i=o.lcZ(8,10,t.workspaces.activeWorkspace$))||null==i.currentUser?null:i.currentUser.is_owner)))}},directives:[us.pW,n.O5,hs._,Tt.zs,s.yS,It.P],pipes:[n.Ov,gs.y,$t.R],styles:["[_nghost-%COMP%]{display:block;flex:1 1 auto;position:relative}skeleton.text[_ngcontent-%COMP%]{height:18px}.usage-info[_ngcontent-%COMP%]{margin:5px 0;font-size:1.3rem;color:var(--be-secondary-text)}.upgrade-link[_ngcontent-%COMP%]{color:var(--be-link);font-size:1.3rem;margin-left:-16px}.mat-progress-bar[_ngcontent-%COMP%]{max-width:132px}"],data:{animation:[ps.B]},changeDetection:0}),(0,r.gn)([(0,a.Ph)(Ve.userSpaceUsed)],bs.prototype,"spaceUsed$",void 0),(0,r.gn)([(0,a.Ph)(Ve.userSpaceAvailable)],bs.prototype,"spaceAvailable$",void 0),(0,r.gn)([(0,a.Ph)(Ve.spaceUsedPercent)],bs.prototype,"spaceUsedPercent$",void 0);var ws=i(81769),xs=i(8208),ys=i(48358);function _s(e,t){1&e&&(o.TgZ(0,"span",12),o._uU(1,"Personal workspace"),o.qZA())}const ks=function(e){return{count:e}};function Cs(e,t){if(1&e&&(o.TgZ(0,"span",12),o._uU(1),o.ALo(2,"trans"),o.qZA()),2&e){const e=o.oxw().ngIf;o.xp6(1),o.Oqu(o.xi3(2,1,":count members",o.VKq(4,ks,(null==e?null:e.members_count)||0)))}}function As(e,t){if(1&e&&(o.TgZ(0,"div",5),o.TgZ(1,"div",6),o.TgZ(2,"div",7),o._uU(3),o.qZA(),o.TgZ(4,"div",8),o.YNc(5,_s,2,0,"span",9),o.YNc(6,Cs,3,6,"span",9),o.qZA(),o.qZA(),o.TgZ(7,"div",10),o._UZ(8,"mat-icon",11),o.qZA(),o.qZA()),2&e){const e=t.ngIf;o.oxw();const i=o.MAs(3);o.Q6J("matMenuTriggerFor",i),o.xp6(3),o.Oqu(e.name),o.xp6(2),o.Q6J("ngIf",e.default),o.xp6(1),o.Q6J("ngIf",!e.default)}}function Zs(e,t){1&e&&(o.TgZ(0,"span",12),o._uU(1,"Personal workspace"),o.qZA())}function Os(e,t){if(1&e&&(o.TgZ(0,"span",12),o._uU(1),o.ALo(2,"trans"),o.qZA()),2&e){const e=o.oxw().$implicit;o.xp6(1),o.Oqu(o.xi3(2,1,":count members",o.VKq(4,ks,(null==e?null:e.members_count)||0)))}}function Ss(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",17),o.NdJ("click",function(t){o.CHM(e);const i=o.oxw().$implicit;return o.oxw().openWorkspaceMembersModal(i),t.stopPropagation()}),o._UZ(1,"mat-icon",18),o.qZA()}}function Is(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div",13),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw().selectWorkspace(t)}),o.ALo(1,"async"),o._UZ(2,"mat-icon",14),o.ALo(3,"async"),o.TgZ(4,"div"),o.TgZ(5,"div",15),o._uU(6),o.qZA(),o.TgZ(7,"div",8),o.YNc(8,Zs,2,0,"span",9),o.YNc(9,Os,3,6,"span",9),o.qZA(),o.qZA(),o.YNc(10,Ss,2,0,"button",16),o.qZA()}if(2&e){const e=t.$implicit,i=o.oxw();o.ekj("active",o.lcZ(1,8,i.workspaces.activeId$)===e.id),o.xp6(2),o.ekj("visually-hidden",o.lcZ(3,10,i.workspaces.activeId$)!==e.id),o.xp6(4),o.Oqu(e.name),o.xp6(2),o.Q6J("ngIf",e.default),o.xp6(1),o.Q6J("ngIf",!e.default),o.xp6(1),o.Q6J("ngIf",!e.default)}}function Ts(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div",19),o.NdJ("click",function(){return o.CHM(e),o.oxw().openCrupdateWorkspaceModal()}),o._UZ(1,"mat-icon",20),o.TgZ(2,"span",12),o._uU(3,"Create new workspace"),o.qZA(),o.qZA()}}let Es=(()=>{class e{constructor(e,t,i,n,s,r){this.modal=e,this.workspaces=t,this.currentUser=i,this.toast=n,this.vcr=s,this.cd=r}ngOnInit(){this.workspaces.indexUserWorkspaces().subscribe()}openCrupdateWorkspaceModal(e){i.e(24).then(i.bind(i,77024)).then(t=>{this.modal.open(t.WorkspaceModule.components.crupdateModal,{workspace:e},{viewContainerRef:this.vcr}),this.cd.markForCheck()})}openWorkspaceMembersModal(e){i.e(24).then(i.bind(i,77024)).then(t=>{this.modal.open(t.WorkspaceModule.components.manageMembers,{workspace:e},{viewContainerRef:this.vcr}),this.cd.markForCheck(),this.menuTrigger.closeMenu()})}maybeDeleteWorkspace(e){const t=Object.assign(Object.assign({},ys.M),{replacements:{resource:"workspace"}});this.modal.open(xs.z,t).afterClosed().pipe((0,st.h)(e=>e)).subscribe(()=>{this.workspaces.delete([e.id]).subscribe(()=>{this.toast.open("Workspace deleted.")},e=>{this.toast.open(e.message||ws.v.Default)})})}selectWorkspace(e){this.workspaces.select(e.id),this.menuTrigger.closeMenu()}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(as.u),o.Y36(Je.b),o.Y36(Fe.I),o.Y36(ze.F),o.Y36(o.s_b),o.Y36(o.sBO))},e.\u0275cmp=o.Xpm({type:e,selectors:[["workspace-selector"]],viewQuery:function(e,t){if(1&e&&o.Gf(Pt.p6,5),2&e){let e;o.iGM(e=o.CRH())&&(t.menuTrigger=e.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(e,t){1&e&&(o.YNc(0,As,9,4,"div",0),o.ALo(1,"async"),o.TgZ(2,"mat-menu",1,2),o.YNc(4,Is,11,12,"div",3),o.ALo(5,"async"),o.YNc(6,Ts,4,0,"div",4),o.qZA()),2&e&&(o.Q6J("ngIf",o.lcZ(1,3,t.workspaces.activeWorkspace$)),o.xp6(4),o.Q6J("ngForOf",o.lcZ(5,5,t.workspaces.available$)),o.xp6(2),o.Q6J("ngIf",t.currentUser.hasPermission("workspaces.create")))},directives:[n.O5,Pt.VK,n.sg,Pt.p6,It.P,We.Hw,Pt.OP,Tt.lW],pipes:[n.Ov,$t.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}),e})();const Ps=function(){return{exact:!0}};class Fs{constructor(e,t){this.urls=e,this.store=t}openFolder(e){this.store.dispatch(new h(e))}}Fs.\u0275fac=function(e){return new(e||Fs)(o.Y36(De),o.Y36(a.yh))},Fs.\u0275cmp=o.Xpm({type:Fs,selectors:[["sidebar"]],decls:17,vars:8,consts:[[1,"sidebar-body"],[1,"drive-folders"],["routerLinkActive","active",1,"sidebar-menu-item",3,"routerLink","routerLinkActiveOptions","folderDropTarget"],["svgIcon","arrow-drop-down",1,"toggle-expansion-icon",3,"click"],["svgIcon","network-drive-custom"],["trans","",1,"text"],[3,"folderSelected"],["driveTree",""],["position","drive-sidebar","itemClass","sidebar-menu-item",1,"sidebar-menu"],[1,"usage-container"],["svgIcon","storage"],[1,"sidebar-footer"]],template:function(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div",0),o._UZ(1,"sidebar-action-buttons"),o.TgZ(2,"div",1),o.TgZ(3,"div",2),o.ALo(4,"async"),o.TgZ(5,"mat-icon",3),o.NdJ("click",function(t){return o.CHM(e),o.MAs(10).toggle(),t.stopPropagation()}),o.qZA(),o._UZ(6,"mat-icon",4),o.TgZ(7,"span",5),o._uU(8,"All Files"),o.qZA(),o.qZA(),o.TgZ(9,"folders-tree",6,7),o.NdJ("folderSelected",function(e){return t.openFolder(e)}),o.qZA(),o.qZA(),o._UZ(11,"custom-menu",8),o.TgZ(12,"div",9),o._UZ(13,"mat-icon",10),o._UZ(14,"available-space-indicator"),o.qZA(),o.qZA(),o.TgZ(15,"div",11),o._UZ(16,"workspace-selector"),o.qZA()}if(2&e){const e=o.MAs(10);o.xp6(3),o.Q6J("routerLink",t.urls.driveRoot())("routerLinkActiveOptions",o.DdM(7,Ps))("folderDropTarget",o.lcZ(4,5,t.rootFolder$)),o.xp6(2),o.ekj("expanded",e.expanded)}},directives:[ls,s.Od,s.rH,sn,We.Hw,It.P,cn,ds.K,bs,Es],pipes:[n.Ov],styles:['.be-light-mode sidebar{background-color:var(--be-background-alternative)}sidebar{display:flex;flex-direction:column;width:100%;min-height:100%;color:var(--be-text);position:relative}sidebar .sidebar-body{flex:1 1 auto}sidebar sidebar-action-buttons{padding:28px 0}sidebar .drag-over.can-drop{background-color:var(--be-accent-emphasis)}sidebar .sidebar-menu-item{display:flex;align-items:center;width:100%;height:48px;min-height:inherit;line-height:inherit;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:inherit;outline:none;cursor:pointer;-webkit-user-drag:none}sidebar .sidebar-menu-item.active{color:var(--be-accent-default);background-color:var(--be-accent-emphasis)}sidebar .sidebar-menu-item.active .mat-icon{color:inherit}sidebar .sidebar-menu-item.active .text{font-weight:500}sidebar .sidebar-menu-item:not(.active):not(.drag-over):hover{background-color:var(--be-hover)}sidebar .sidebar-menu-item .mat-icon:not(.toggle-expansion-icon){margin-right:15px}sidebar .sidebar-menu-item .mat-icon{color:var(--be-secondary-text)}sidebar .sidebar-menu-item:not(.active) .text{opacity:.8}sidebar .sidebar-menu .sidebar-menu-item{padding-left:24px;padding-right:24px}sidebar .sidebar-footer:hover{background-color:var(--be-hover)}sidebar workspace-selector{display:block;border-top:1px solid var(--be-divider-default);border-radius:4px;margin:0 20px;height:80px}sidebar .usage-container{display:flex;margin-top:24px;padding:24px 0 0 24px;border-top:1px solid var(--be-divider-default)}sidebar .usage-container .mat-icon{margin-right:15px;margin-top:-4px;color:var(--be-secondary-text)}sidebar folders-tree .mat-tree-node:before{display:block;content:" ";width:24px;flex:0 0 24px}'],encapsulation:2,changeDetection:0}),(0,r.gn)([(0,a.Ph)(Ve.activePage)],Fs.prototype,"activePage$",void 0),(0,r.gn)([(0,a.Ph)(Ve.rootFolder)],Fs.prototype,"rootFolder$",void 0);var Ms=i(11436);const Us=["textArea"];function Ds(e,t){1&e&&(o.ynx(0),o.TgZ(1,"span",3),o._uU(2,"Saving..."),o.qZA(),o.BQk())}function Ls(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div",6),o.TgZ(1,"label",7),o._uU(2,"Description"),o.qZA(),o.TgZ(3,"textarea",8,9),o.NdJ("enterKeybind",function(){return o.CHM(e),o.MAs(4).blur()})("blur",function(){o.CHM(e);const t=o.MAs(4),i=o.oxw(2).ngIf;return o.oxw().updateDescription(i,t.value)}),o.qZA(),o.qZA()}if(2&e){const e=o.oxw(2).ngIf;o.xp6(3),o.Q6J("value",e.description)}}function qs(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div",10),o.NdJ("click",function(){return o.CHM(e),o.oxw(3).editDescription()}),o._uU(1),o.ALo(2,"trans"),o.qZA(),o.TgZ(3,"button",11),o.NdJ("click",function(){return o.CHM(e),o.oxw(3).editDescription()}),o.ALo(4,"trans"),o._UZ(5,"mat-icon",12),o.qZA()}if(2&e){const e=o.oxw(2).ngIf;o.xp6(1),o.Oqu(e.description||o.lcZ(2,2,"Add a description")),o.xp6(2),o.Q6J("matTooltip",o.lcZ(4,4,"Edit description"))}}function Ns(e,t){if(1&e&&(o.YNc(0,Ls,5,1,"div",4),o.ALo(1,"async"),o.YNc(2,qs,6,6,"ng-template",null,5,o.W1O)),2&e){const e=o.MAs(3),t=o.oxw(2);o.Q6J("ngIf",o.lcZ(1,2,t.editingDescription$))("ngIfElse",e)}}function $s(e,t){if(1&e&&(o.ynx(0),o.YNc(1,Ds,3,0,"ng-container",1),o.ALo(2,"async"),o.YNc(3,Ns,4,4,"ng-template",null,2,o.W1O),o.BQk()),2&e){const e=o.MAs(4),t=o.oxw();o.xp6(1),o.Q6J("ngIf",o.lcZ(2,2,t.savingDescription$))("ngIfElse",e)}}class Bs{constructor(e){this.store=e,this.editingDescription$=new ot.X(!1),this.savingDescription$=new ot.X(!1)}ngAfterViewInit(){this.textArea.changes.subscribe(e=>{e.length&&e.first.nativeElement.focus()})}editDescription(){this.editingDescription$.next(!0)}updateDescription(e,t){this.editingDescription$.next(!1),e.description!==t&&(this.savingDescription$.next(!0),this.store.dispatch(new z(e,t)).pipe((0,l.x)(()=>this.savingDescription$.next(!1))).subscribe())}}function Ys(e,t){if(1&e&&o._UZ(0,"img",2),2&e){const e=o.oxw();o.Q6J("src",e.getPreviewUrl(),o.LSH)("ngClass",e.file.type+"-file")}}function Rs(e,t){if(1&e&&o._UZ(0,"file-icon",3),2&e){const e=o.oxw();o.Q6J("type","folder"===e.file.type?e.getFolderIcon():e.file.type)}}Bs.\u0275fac=function(e){return new(e||Bs)(o.Y36(a.yh))},Bs.\u0275cmp=o.Xpm({type:Bs,selectors:[["entry-description-panel"]],viewQuery:function(e,t){if(1&e&&o.Gf(Us,5),2&e){let e;o.iGM(e=o.CRH())&&(t.textArea=e)}},decls:2,vars:3,consts:[[4,"ngIf"],[4,"ngIf","ngIfElse"],["descriptionSaved",""],["trans",""],["class","input-container",4,"ngIf","ngIfElse"],["descriptionEl",""],[1,"input-container"],["for","description","trans","",1,"hidden"],["rows","4","id","description",3,"value","enterKeybind","blur"],["textArea",""],[1,"description-text",3,"click"],["mat-icon-button","",3,"matTooltip","click"],["svgIcon","edit"]],template:function(e,t){1&e&&(o.YNc(0,$s,5,4,"ng-container",0),o.ALo(1,"async")),2&e&&o.Q6J("ngIf",o.lcZ(1,1,t.entry$))},directives:[n.O5,It.P,Tt.lW,Ms.gM,We.Hw],pipes:[n.Ov,$t.R],styles:["entry-description-panel{color:var(--be-text);display:flex;align-items:center;max-width:215px}entry-description-panel .description-text{cursor:text;vertical-align:sub;flex:1 1 auto;opacity:.8}"],encapsulation:2,changeDetection:0}),(0,r.gn)([(0,a.Ph)(Ve.selectedEntryOrActiveFolder)],Bs.prototype,"entry$",void 0);let Qs=(()=>{class e{getPreviewUrl(){let e=this.file.url;if(this.file.thumbnail){const t=e.includes("?")?"&":"?";e+=t+"thumbnail=true"}return e}getFolderIcon(){return this.file.users&&this.file.users.length>1?"shared-folder":"folder"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Xpm({type:e,selectors:[["file-thumbnail"]],inputs:{file:"file"},decls:2,vars:2,consts:[["class","file-color","draggable","false",3,"src","ngClass",4,"ngIf"],[3,"type",4,"ngIf"],["draggable","false",1,"file-color",3,"src","ngClass"],[3,"type"]],template:function(e,t){1&e&&(o.YNc(0,Ys,1,2,"img",0),o.YNc(1,Rs,1,1,"file-icon",1)),2&e&&(o.Q6J("ngIf","image"===t.file.type),o.xp6(1),o.Q6J("ngIf","image"!==t.file.type))},directives:[n.O5,n.mk,Xe],styles:[".be-light-mode file-thumbnail{background-color:var(--be-background-alternative)}file-thumbnail{display:block}file-thumbnail img{display:block;max-width:100%;height:auto}"],encapsulation:2,changeDetection:0}),e})();var js=i(18256);function Js(e,t){if(1&e&&o._UZ(0,"file-thumbnail",16),2&e){const e=o.oxw(2).ngIf;o.Q6J("file",e)}}const zs=function(e){return{workspace:e}};function Vs(e,t){if(1&e&&(o._UZ(0,"mat-icon",17),o.ALo(1,"trans"),o.ALo(2,"async")),2&e){const e=o.oxw(3);let t;o.Q6J("matTooltip",o.xi3(1,1,"Everyone at :workspace workspace",o.VKq(6,zs,null==(t=o.lcZ(2,4,e.workspaces.activeWorkspace$))?null:t.name)))}}function Hs(e,t){if(1&e&&o._UZ(0,"img",18),2&e){const e=t.$implicit;o.Q6J("src",e.avatar,o.LSH)("matTooltip",e.display_name)}}function Gs(e,t){if(1&e&&(o.TgZ(0,"div",7),o.TgZ(1,"div",8),o._uU(2,"Owner"),o.qZA(),o.TgZ(3,"div",10),o._uU(4),o.qZA(),o.qZA()),2&e){const e=t.ngIf;o.xp6(4),o.Oqu(e.display_name)}}function Ws(e,t){if(1&e){const e=o.EpF();o.ynx(0),o.YNc(1,Js,1,1,"file-thumbnail",2),o.TgZ(2,"div",3),o.YNc(3,Vs,3,8,"mat-icon",4),o.YNc(4,Hs,1,2,"img",5),o.qZA(),o.TgZ(5,"div",6),o.TgZ(6,"div",7),o.TgZ(7,"div",8),o._uU(8,"Type"),o.qZA(),o.TgZ(9,"div",9),o._uU(10),o.ALo(11,"trans"),o.qZA(),o.qZA(),o.TgZ(12,"div",7),o.TgZ(13,"div",8),o._uU(14,"Size"),o.qZA(),o.TgZ(15,"div",10),o._uU(16),o.ALo(17,"formattedFileSize"),o.qZA(),o.qZA(),o.TgZ(18,"div",7),o.TgZ(19,"div",8),o._uU(20,"Storage Used"),o.qZA(),o.TgZ(21,"div",10),o._uU(22),o.ALo(23,"formattedFileSize"),o.qZA(),o.qZA(),o.TgZ(24,"div",11),o.TgZ(25,"div",8),o._uU(26,"Location"),o.qZA(),o.TgZ(27,"div",12),o.NdJ("click",function(){return o.CHM(e),o.oxw(2).openLocation()}),o._UZ(28,"mat-icon",13),o.TgZ(29,"span",14),o._uU(30),o.ALo(31,"trans"),o.ALo(32,"async"),o.qZA(),o.qZA(),o.qZA(),o.YNc(33,Gs,5,1,"div",15),o.ALo(34,"async"),o.TgZ(35,"div",7),o.TgZ(36,"div",8),o._uU(37,"Last Updated"),o.qZA(),o.TgZ(38,"div",10),o._uU(39),o.ALo(40,"formattedDate"),o.qZA(),o.qZA(),o.TgZ(41,"div",7),o.TgZ(42,"div",8),o._uU(43,"Created"),o.qZA(),o.TgZ(44,"div",10),o._uU(45),o.ALo(46,"formattedDate"),o.qZA(),o.qZA(),o._UZ(47,"entry-description-panel"),o.qZA(),o.BQk()}if(2&e){const e=o.oxw().ngIf,t=o.oxw();let i;o.xp6(1),o.Q6J("ngIf","image"===e.type),o.xp6(2),o.Q6J("ngIf",e.workspace_id),o.xp6(1),o.Q6J("ngForOf",e.users),o.xp6(6),o.Oqu(o.lcZ(11,10,e.type)),o.xp6(6),o.Oqu(o.lcZ(17,12,e.file_size)),o.xp6(6),o.Oqu(o.lcZ(23,14,e.file_size)),o.xp6(8),o.Oqu(o.lcZ(31,16,(null==(i=o.lcZ(32,18,t.parent$))?null:i.name)||"All Files")),o.xp6(3),o.Q6J("ngIf",o.lcZ(34,20,t.owner$)),o.xp6(6),o.Oqu(o.lcZ(40,22,e.updated_at)),o.xp6(6),o.Oqu(o.lcZ(46,24,e.created_at))}}function Xs(e,t){if(1&e&&(o.ynx(0),o.YNc(1,Ws,48,26,"ng-container",0),o.BQk()),2&e){const e=t.ngIf;o.oxw();const i=o.MAs(3);o.xp6(1),o.Q6J("ngIf",e.updated_at)("ngIfElse",i)}}function Ks(e,t){1&e&&(o.TgZ(0,"div",19),o._UZ(1,"mat-icon",20),o.TgZ(2,"div",21),o._uU(3,"Select file or folder to view its details."),o.qZA(),o.qZA())}class er{constructor(e,t){this.store=e,this.workspaces=t,this.owner$=this.store.select(Ve.selectedEntryOrActiveFolder).pipe((0,Ct.U)(e=>((null==e?void 0:e.users)||[]).find(e=>e.owns_entry)))}openLocation(){const e=this.store.selectSnapshot(Ve.selectedEntryParent);this.store.dispatch(new h(e))}}function tr(e,t){if(1&e&&(o.ynx(0),o._UZ(1,"file-icon",6),o.TgZ(2,"div",7),o._uU(3),o.qZA(),o.BQk()),2&e){const e=o.oxw().ngIf;o.xp6(1),o.Q6J("type",e.type),o.xp6(2),o.Oqu(e.name)}}function ir(e,t){if(1&e&&(o.ynx(0),o.YNc(1,tr,4,2,"ng-container",2),o.BQk()),2&e){const e=t.ngIf;o.oxw();const i=o.MAs(5);o.xp6(1),o.Q6J("ngIf",e.type)("ngIfElse",i)}}function nr(e,t){if(1&e&&(o._UZ(0,"file-icon",8),o.TgZ(1,"div",7),o._uU(2),o.ALo(3,"trans"),o.ALo(4,"async"),o.qZA()),2&e){const e=o.oxw();let t;o.xp6(2),o.Oqu(o.lcZ(3,1,null==(t=o.lcZ(4,3,e.activePage$))?null:t.viewName))}}er.\u0275fac=function(e){return new(e||er)(o.Y36(a.yh),o.Y36(Je.b))},er.\u0275cmp=o.Xpm({type:er,selectors:[["details-panel"]],decls:4,vars:4,consts:[[4,"ngIf","ngIfElse"],["nothingSelected",""],["class","preview",3,"file",4,"ngIf"],[1,"users-list"],["class","users-list-img workspace-img","svgIcon","groups",3,"matTooltip",4,"ngIf"],["class","users-list-img",3,"src","matTooltip",4,"ngFor","ngForOf"],[1,"details-list"],[1,"item"],["trans","",1,"name"],[1,"value","type-value"],[1,"value"],[1,"item","location-item"],[1,"value",3,"click"],["svgIcon","folder"],[1,"text"],["class","item",4,"ngIf"],[1,"preview",3,"file"],["svgIcon","groups",1,"users-list-img","workspace-img",3,"matTooltip"],[1,"users-list-img",3,"src","matTooltip"],[1,"nothing-selected"],["svgIcon","selection-tool-custom",1,"icon"],["trans","",1,"text"]],template:function(e,t){if(1&e&&(o.YNc(0,Xs,2,2,"ng-container",0),o.ALo(1,"async"),o.YNc(2,Ks,4,0,"ng-template",null,1,o.W1O)),2&e){const e=o.MAs(3);o.Q6J("ngIf",o.lcZ(1,2,t.entry$))("ngIfElse",e)}},directives:[n.O5,n.sg,It.P,We.Hw,Bs,Qs,Ms.gM],pipes:[n.Ov,$t.R,gs.y,js.l],styles:["details-panel{display:block;padding:24px}details-panel file-thumbnail{margin-bottom:20px}details-panel .users-list{display:flex;flex-wrap:wrap;margin-bottom:20px}details-panel .users-list-img{width:36px;height:36px;flex:0 0 36px;-o-object-fit:cover;object-fit:cover;margin-right:10px;border-radius:50%;overflow:hidden;color:var(--be-secondary-text)}details-panel .workspace-img{border:2px solid var(--be-secondary-text);border-radius:4px;padding:4px}details-panel .details-list .item{display:flex;align-items:center;margin-bottom:10px}details-panel .details-list .item .name{width:120px;flex-shrink:0;color:var(--be-text);opacity:.8}details-panel .details-list .item .value{flex-shrink:0}details-panel .details-list .item .type-value{text-transform:capitalize}details-panel .nothing-selected{display:flex;align-items:center;font-size:1.7rem;font-weight:400}details-panel .nothing-selected .mat-icon{margin-right:5px;width:36px;height:36px;flex-shrink:0}details-panel .location-item .value{font-weight:500;cursor:pointer}details-panel .location-item .value .mat-icon{color:var(--be-secondary-text);margin-right:4px;vertical-align:bottom}details-panel .location-item .value:hover .text{color:var(--be-link);text-decoration:underline}"],encapsulation:2,changeDetection:0}),(0,r.gn)([(0,a.Ph)(Ve.selectedEntryOrActiveFolder)],er.prototype,"entry$",void 0),(0,r.gn)([(0,a.Ph)(Ve.selectedEntryParent)],er.prototype,"parent$",void 0);class sr{constructor(e){this.store=e}close(){this.store.dispatch(new Z)}}sr.\u0275fac=function(e){return new(e||sr)(o.Y36(a.yh))},sr.\u0275cmp=o.Xpm({type:sr,selectors:[["details-sidebar"]],decls:9,vars:4,consts:[[1,"header"],[1,"title"],[4,"ngIf","ngIfElse"],["defaultTitle",""],["mat-icon-button","",1,"close-button",3,"click"],["svgIcon","close"],[3,"type"],[1,"name"],["type","folder"]],template:function(e,t){if(1&e&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o.YNc(2,ir,2,2,"ng-container",2),o.ALo(3,"async"),o.YNc(4,nr,5,5,"ng-template",null,3,o.W1O),o.TgZ(6,"button",4),o.NdJ("click",function(){return t.close()}),o._UZ(7,"mat-icon",5),o.qZA(),o.qZA(),o.qZA(),o._UZ(8,"details-panel")),2&e){const e=o.MAs(5);o.xp6(2),o.Q6J("ngIf",o.lcZ(3,2,t.entry$))("ngIfElse",e)}},directives:[n.O5,Tt.lW,We.Hw,er,Xe],pipes:[n.Ov,$t.R],styles:["details-sidebar{display:block;padding:28px 0}details-sidebar>.header{margin-bottom:20px;padding:0 24px}details-sidebar>.header .title{display:flex;align-items:center}details-sidebar>.header .title .name{font-size:2.1rem;word-wrap:break-word;overflow:hidden;text-overflow:ellipsis}details-sidebar>.header .title file-icon{width:24px;height:24px;margin-right:18px}details-sidebar>.header .close-button{color:var(--be-secondary-text);margin-left:auto}details-sidebar .mat-tab-label{min-width:50%}"],encapsulation:2,changeDetection:0}),(0,r.gn)([(0,a.Ph)(Ve.selectedEntryOrActiveFolder)],sr.prototype,"entry$",void 0),(0,r.gn)([(0,a.Ph)(Ve.activePage)],sr.prototype,"activePage$",void 0);let rr=(()=>{class e{constructor(){this.driveEntry=!0}get fileId(){return this.entry.id}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Xpm({type:e,selectors:[["files-grid-item"]],hostVars:3,hostBindings:function(e,t){2&e&&(o.uIk("data-id",t.fileId),o.ekj("drive-entry",t.driveEntry))},inputs:{entry:"entry"},decls:6,vars:3,consts:[[1,"preview-container"],[1,"preview",3,"file"],[1,"files-grid-item-footer"],[3,"type"],[1,"text"]],template:function(e,t){1&e&&(o.TgZ(0,"div",0),o._UZ(1,"file-thumbnail",1),o.qZA(),o.TgZ(2,"figcaption",2),o._UZ(3,"file-icon",3),o.TgZ(4,"div",4),o._uU(5),o.qZA(),o.qZA()),2&e&&(o.xp6(1),o.Q6J("file",t.entry),o.xp6(2),o.Q6J("type",t.entry.type),o.xp6(2),o.Oqu(t.entry.name))},directives:[Qs,Xe],styles:["files-grid{display:flex;flex-wrap:wrap;align-content:flex-start;margin:-8px}files-grid:empty{margin:0}files-grid-item{box-shadow:0 1px 5px rgba(50,50,50,.1);border:1px solid var(--be-divider-default);background-color:var(--be-background);flex:0 0 auto;margin:8px;border-radius:4px;overflow:hidden;transition:opacity .2s ease-in-out}@media only screen and (max-width:360px){files-grid-item{width:calc(100% - 16px)}}@media only screen and (min-width:360px) and (max-width:600px){files-grid-item{width:calc(50% - 16px)}}@media only screen and (min-width:600px) and (max-width:950px){files-grid-item{width:calc(33.3333333333% - 16px)}}@media only screen and (min-width:950px) and (max-width:1200px){files-grid-item{width:calc(25% - 16px)}}@media only screen and (min-width:1200px) and (max-width:1470px){files-grid-item{width:calc(20% - 16px)}}@media only screen and (min-width:1470px){files-grid-item{width:calc(16.6666666667% - 16px)}}files-grid-item.drag-over .files-grid-item-footer{background-color:var(--be-accent-emphasis)}files-grid-item.selected{border-color:var(--be-accent-default)}files-grid-item.selected .files-grid-item-footer{background-color:var(--be-accent-emphasis);color:var(--be-accent-default)}files-grid-item .preview-container{width:100%;padding-top:calc(100% - 48px);position:relative}files-grid-item .preview-container .preview{width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0}files-grid-item .preview-container .preview file-icon{width:74px;height:74px;position:absolute;top:0;left:0;bottom:0;right:0;margin:auto}files-grid-item .preview-container .preview img{width:auto;max-width:100%;height:100%;margin:auto;-o-object-fit:cover;object-fit:cover}.files-grid-item-footer{display:flex;align-items:center;padding:16px}.files-grid-item-footer file-icon{width:16px;height:16px;margin-right:16px}.files-grid-item-footer .text{line-height:16px;margin-right:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"],encapsulation:2,changeDetection:0}),e})(),or=(()=>{class e{constructor(e,t){this.store=e,this.cache=t,this.initial={x:0,y:0,scrollTop:0}}start(e){this.cacheClientRects(),this.createSelectBox(),this.bindScroll(),this.gridElements=this.getGridElements(),this.initial=Object.assign(Object.assign({},this.hammerToRelative(e)),{scrollTop:this.cache.scrollCont.scrollTop}),this.selectBox.style.top=this.initial.y+"px",this.selectBox.style.left=this.initial.x+"px"}move(e){this.lastPanEvent=e,this.resizeBox(e)}end(){this.removeSelectBox(),this.dispatchSelectedAction(),this.unbindScroll(),this.gridElements=[]}resizeBox(e){if(e||(e=this.lastPanEvent),!e||!this.selectBox)return;const t=this.getNewSelectorPosition(e);this.scrollAndRepositionSelector(t),this.selectIntersectingElements()}getNewSelectorPosition(e){const t=this.hammerToRelative(e);let i,n=this.initial.x,s=this.initial.y,r=t.x,o=t.y;return n>r&&(i=r,r=n,n=i),s>o&&(i=o,o=s,s=i),{width:r-n,height:o-s,top:s,right:n+(r-n),bottom:s+(o-s),left:n}}reachedAreaEdge(e){const t=this.rectToRelative(this.cache.filesContRect);return e.left<=t.left?"left":e.top<=t.top?"top":e.right>=t.right?"right":e.bottom>=t.bottom&&"bottom"}scrollAndRepositionSelector(e){const t=this.cache.scrollCont,i=this.reachedAreaEdge(e);e.top+=this.initial.scrollTop,"bottom"===i?t.scrollBy({top:4}):"top"===i&&t.scrollBy({top:-4});const n=this.cache.scrollCont.scrollTop-this.initial.scrollTop,s=Math.abs(n);n<0&&(e.top-=s),e.height+=s,"left"===i||"right"===i||e.top+e.height>=this.cache.scrollCont.scrollHeight||this.applyPosition(e)}applyPosition(e){this.selectBox.style.width=e.width+"px",this.selectBox.style.height=e.height+"px",this.selectBox.style.left=e.left+"px",this.selectBox.style.top=e.top+"px"}selectIntersectingElements(){const e=this.selectBox.getBoundingClientRect();this.gridElements.forEach(t=>{const i=t.getBoundingClientRect();i.top+i.height>e.top&&i.left+i.width>e.left&&i.bottom-i.height<e.bottom&&i.right-i.width<e.right?t.classList.add("selected"):t.classList.remove("selected")})}rectToRelative(e){return{width:e.width,height:e.height,left:e.left-this.cache.filesContRect.left,top:e.top-this.cache.filesContRect.top,right:e.right-this.cache.filesContRect.left,bottom:e.bottom-this.cache.filesContRect.top}}hammerToRelative(e){return{x:e.center.x-this.cache.filesContRect.left,y:e.center.y-this.cache.filesContRect.top}}dispatchSelectedAction(){const e=this.gridElements.filter(e=>e.classList.contains("selected")).map(e=>+e.dataset.id),t=this.store.selectSnapshot(Ve.entries).filter(t=>e.indexOf(t.id)>-1);this.store.dispatch(new le(t))}createSelectBox(){this.selectBox=document.createElement("div"),this.selectBox.classList.add("files-select-box"),this.cache.filesCont.appendChild(this.selectBox)}removeSelectBox(){this.selectBox&&(this.selectBox.remove(),this.selectBox=null)}dragging(){return!!this.selectBox}cacheClientRects(){this.cache.filesContRect=this.cache.filesCont.getBoundingClientRect(),this.cache.scrollContRect=this.cache.scrollCont.getBoundingClientRect()}getGridElements(){return Array.from(this.cache.filesCont.querySelectorAll(".drive-entry"))}bindScroll(){this.scrollListener=()=>this.resizeBox(),this.cache.scrollCont.addEventListener("scroll",this.scrollListener)}unbindScroll(){this.cache.scrollCont.removeEventListener("scroll",this.scrollListener)}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(a.yh),o.LFG(wn))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),ar=(()=>{class e{constructor(e,t){this.domCache=e,this.store=t}start(e){this.store.dispatch(new ve)}move(e){this.domCache.dragPreview.style.top=e.center.y+"px",this.domCache.dragPreview.style.left=e.center.x+"px"}end(){this.store.dispatch(new be)}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(wn),o.LFG(a.yh))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),cr=(()=>{class e{constructor(e,t,i,n,s,r){this.zone=e,this.el=t,this.store=i,this.dragSelect=n,this.dragEntry=s,this.domCache=r,this.subscriptions=[]}ngOnInit(){this.bindToHammer();const e=this.store.select(Ve.isMobile).subscribe(e=>{this.hammerManager.get("pan").set({enable:!e}),this.hammerManager.get("doubletap").set({enable:!e})});this.subscriptions.push(e)}ngOnDestroy(){this.dragSelect.removeSelectBox(),this.subscriptions.forEach(e=>e.unsubscribe())}bindToHammer(){this.createHammerManager(),this.onPanStart(),this.onPan(),this.onPanEnd(),this.onTap(),this.onDoubleTap()}createHammerManager(){this.zone.runOutsideAngular(()=>{this.hammerManager=new Hammer.Manager(this.domCache.filesCont);const e=new Hammer.Tap,t=new Hammer.Pan,i=new Hammer.Tap({event:"doubletap",taps:2});this.hammerManager.add([e,i,t]),this.hammerManager.get("doubletap").recognizeWith("tap")})}onPanStart(){this.hammerManager.on("panstart",e=>{const t=this.getEntryEl(e);if(t){this.panService=this.dragEntry;const e=this.getEntryByEl(t);this.store.selectSnapshot(Ve.selectedEntries).find(t=>t.id===e.id)||this.store.dispatch(new f([this.getEntryByEl(t)]))}else this.panService=this.dragSelect;this.panService.start(e)})}onPan(){this.hammerManager.on("pan",e=>{this.panService&&this.panService.move(e)})}onPanEnd(){this.hammerManager.on("panend",()=>{this.panService&&this.panService.end()})}onTap(){this.hammerManager.on("tap",e=>{const t=this.getEntryEl(e);this.dragSelect.removeSelectBox(),t?this.store.dispatch(new pe(this.getEntryByEl(t),e.srcEvent.ctrlKey||e.srcEvent.metaKey)):e.target.closest(".files-container")&&this.store.dispatch(new v)})}onDoubleTap(){this.hammerManager.on("doubletap",e=>{const t=this.getEntryEl(e);t&&this.store.dispatch(new ue(this.getEntryByEl(t)))})}getEntryEl(e){return e.target.closest(".drive-entry")}getEntryByEl(e){const t=+e.dataset.id;return this.store.selectSnapshot(Ve.entries).find(e=>e.id===+t)}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.R0b),o.Y36(o.SBq),o.Y36(a.yh),o.Y36(or),o.Y36(ar),o.Y36(wn))},e.\u0275dir=o.lG2({type:e,selectors:[["","driveHammerInteractions",""]],contentQueries:function(e,t,i){if(1&e&&o.Suo(i,rr,5),2&e){let e;o.iGM(e=o.CRH())&&(t.gridItems=e)}}}),e})();var lr=i(6097);class dr{constructor(e){this.el=e}ngAfterViewInit(){this.selectedEntryIds.subscribe(e=>{const t=this.el.nativeElement.querySelectorAll(".drive-entry");t.length&&Array.from(t).forEach(t=>{e.indexOf(parseInt(t.dataset.id,10))>-1?t.classList.add("selected"):t.classList.remove("selected")})})}}dr.\u0275fac=function(e){return new(e||dr)(o.Y36(o.SBq))},dr.\u0275dir=o.lG2({type:dr,selectors:[["","toggleSelectedClass",""]]}),(0,r.gn)([(0,a.Ph)(Ve.selectedEntryIds)],dr.prototype,"selectedEntryIds",void 0);var pr=i(83106);function ur(e,t=[]){return(0,r.mG)(this,void 0,void 0,function*(){const i=yield(n=e,new Promise(e=>{hr(n.createReader(),e)}));var n;for(const e in i){const n=i[e];n.isDirectory?yield ur(n,t):t.push(yield gr(n))}return t})}function hr(e,t,i=[]){e.readEntries(n=>{n.length?(i=i.concat(n),hr(e,t,i)):t(i)})}function gr(e){return new Promise(t=>{e.file(i=>{t(new pr.D(i,e.fullPath))})})}let fr=(()=>{class e{constructor(e){this.el=e,this.disableDropzoneClick=!1,this.disableDropzone=!1,this.uploadConfig={},this.filesDropped=new o.vpe}ngOnInit(){const e=this.el.nativeElement;e.addEventListener("dragenter",e=>this.handleDragEnter(e)),e.addEventListener("dragover",e=>this.handleDragOver(e)),e.addEventListener("dragleave",e=>this.handleDragLeave(e)),e.addEventListener("drop",e=>this.handleDrop(e)),this.disableDropzoneClick||(this.clickButton?this.clickButton.nativeElement:e).addEventListener("click",()=>this.handleClick())}ngOnDestroy(){this.removeClassesFromDropzone()}handleClick(){this.disableDropzone||(0,Oe.r)(this.uploadConfig).then(e=>{this.emitUploadEvent(e)})}handleDragEnter(e){this.dropzoneDisabled(e)||this.el.nativeElement.classList.add("file-over-dropzone")}handleDragOver(e){return e.preventDefault&&e.preventDefault(),e.dataTransfer.dropEffect=this.dropzoneDisabled(e)?"none":"move",!1}handleDragLeave(e){const t=document.elementFromPoint(e.clientX,e.clientY);this.el.nativeElement.contains(t)||this.removeClassesFromDropzone()}handleDrop(e){return(0,r.mG)(this,void 0,void 0,function*(){if(e.stopPropagation(),e.preventDefault(),this.removeClassesFromDropzone(),this.dropzoneDisabled(e)||!e.dataTransfer.items)return;const t=Array.from(e.dataTransfer.items).filter(e=>"file"===e.kind).map(e=>e.webkitGetAsEntry());t.length&&this.emitUploadEvent(yield function(e){return(0,r.mG)(this,void 0,void 0,function*(){let t=[];for(const i in e){const n=e[i];n.isDirectory?t=t.concat(yield ur(n)):t.push(yield gr(n))}return t})}(t))})}emitUploadEvent(e){this.filesDropped.emit(e)}removeClassesFromDropzone(){this.el.nativeElement.classList.remove("file-over-dropzone")}dropzoneDisabled(e){const t=e.dataTransfer.types.find(e=>"files"===e.toLowerCase());return this.disableDropzone||!t}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.SBq))},e.\u0275dir=o.lG2({type:e,selectors:[["","fileDropzone",""]],inputs:{disableDropzoneClick:"disableDropzoneClick",disableDropzone:"disableDropzone",clickButton:"clickButton",uploadConfig:["fileDropzone","uploadConfig"]},outputs:{filesDropped:"filesDropped"}}),e})(),mr=(()=>{class e{constructor(){this.threshold=50}ngOnInit(){this.el||(this.el=new o.SBq(document)),this.zone.runOutsideAngular(()=>{this.scrollSub=(0,tn.R)(this.getScrollContainer(),"scroll",{capture:!0,passive:!0}).pipe((0,Cn.b)(20)).subscribe(e=>this.onScroll(e.target))})}ngOnDestroy(){this.scrollSub&&this.scrollSub.unsubscribe()}getScrollContainer(){return this.el?this.el.nativeElement:document}onScroll(e){if(!e||e!==this.el.nativeElement||!this.canLoadMore()||this.isLoading())return;const t=parseInt(this.threshold),i=this.el&&void 0!==e.scrollTop;(i?e.scrollTop+e.offsetHeight:window.scrollY+window.innerHeight)>=(i?e.scrollHeight-t:document.documentElement.scrollHeight-t)&&this.zone.run(()=>{this.loadMoreItems()})}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=o.lG2({type:e}),e})(),vr=(()=>{class e extends mr{constructor(e,t,i){super(),this.el=e,this.store=t,this.zone=i}loadMoreItems(){const e=this.store.selectSnapshot(Ve.currentPage)+1;this.store.dispatch(new L({page:e}))}isLoading(){return this.store.selectSnapshot(Ve.loading)}canLoadMore(){return this.store.selectSnapshot(Ve.canLoadMoreEntries)}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.SBq),o.Y36(a.yh),o.Y36(o.R0b))},e.\u0275dir=o.lG2({type:e,selectors:[["","driveInfiniteScroll",""]],features:[o.qOj]}),e})(),br=(()=>{class e{constructor(e,t,i){this.data=e,this.store=t,this.currentUser=i,this.contextMenu=!0,this.store.dispatch(this.data&&this.data.entry?new ge(this.data.entry):new v)}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(Wi,8),o.Y36(a.yh),o.Y36(Fe.I))},e.\u0275cmp=o.Xpm({type:e,selectors:[["drive-context-menu"]],hostVars:2,hostBindings:function(e,t){2&e&&o.ekj("context-menu",t.contextMenu)},decls:1,vars:0,template:function(e,t){1&e&&o._UZ(0,"context-actions-container")},encapsulation:2,changeDetection:0}),e})();var wr=i(19244);function xr(e,t){1&e&&o._UZ(0,"skeleton"),2&e&&o.Q6J("@fadeOut",void 0)}function yr(e,t){1&e&&o._UZ(0,"mat-icon",9)}function _r(e,t){1&e&&o._UZ(0,"mat-icon",10)}function kr(e,t){if(1&e){const e=o.EpF();o.ynx(0),o.TgZ(1,"div",4,5),o.NdJ("click",function(){const t=o.CHM(e),i=t.last,n=t.$implicit,s=o.MAs(2),r=o.oxw(2);return i?r.openContextMenu(n,s):r.openPage(n)}),o.TgZ(3,"span",6),o._uU(4),o.ALo(5,"trans"),o.qZA(),o.YNc(6,yr,1,0,"mat-icon",7),o.qZA(),o.YNc(7,_r,1,0,"mat-icon",8),o.BQk()}if(2&e){const e=t.$implicit,i=t.last,n=t.first;o.xp6(1),o.ekj("no-action",!e.hasActions),o.xp6(3),o.Oqu(n?o.lcZ(5,5,e.viewName):e.viewName),o.xp6(2),o.Q6J("ngIf",i&&e.hasActions),o.xp6(1),o.Q6J("ngIf",!i)}}function Cr(e,t){if(1&e&&(o.TgZ(0,"div",2),o.YNc(1,kr,8,7,"ng-container",3),o.ALo(2,"async"),o.qZA()),2&e){const e=o.oxw();o.Q6J("@fadeIn",void 0),o.xp6(1),o.Q6J("ngForOf",o.lcZ(2,2,e.breadcrumb))}}let Ar=(()=>{class e{constructor(e,t,i,n,s){this.entriesApi=e,this.i18n=t,this.contextMenu=i,this.store=n,this.workspaces=s,this.breadcrumb=new ot.X([]),this.loading$=new ot.X(!0)}ngOnInit(){(0,An.aj)([this.store.select(Ve.meta),this.store.select(Ve.userFoldersLoaded),this.workspaces.activeWorkspace$]).pipe((0,st.h)(([e,t,i])=>e.currentPage&&t&&!!i),(0,vi.q)(1)).subscribe(()=>{this.loading$.next(!1),this.bindToActivePage()})}ngOnDestroy(){this.activePageSub&&this.activePageSub.unsubscribe()}openPage(e){this.store.dispatch(e.folder?new h(e.folder):new Zn.Fg(["/drive/shares"]))}openContextMenu(e,t){let i={originX:"start",overlayX:"start"};switch(e.name){case"trash":return this.contextMenu.open(br,t,i);case"folder":return i=Object.assign({data:{entry:this.store.selectSnapshot(Ve.activeFolder)}},i),this.contextMenu.open(br,t,i)}}generateBreadCrumb(e){var t;const i=[this.getRootBreadcrumb(e)];if(null===(t=e.folder)||void 0===t?void 0:t.id){const t=this.getBreadcrumbForFolder(e.folder);i.push(...t)}this.breadcrumb.next(i)}getBreadcrumbForFolder(e){const t=this.store.selectSnapshot(Ve.flatFolders)||[];return(e.path?e.path.split("/"):[e.id]).map(i=>{const n=e.id===+i?e:t.find(e=>e.id===+i);if(n)return new te(n)}).filter(e=>!!e)}getRootBreadcrumb(e){if("folder"===e.name){const t=this.workspaces.activeId$.value,i=new te(this.store.selectSnapshot(Ve.rootFolder));return t&&e.folder.workspace_id===t?Object.assign(Object.assign({},i),{viewName:this.workspaces.activeWorkspace$.value.name}):this.store.selectSnapshot(Ve.userOwnsActiveFolder)?i:W}return e}bindToActivePage(){this.activePageSub=(0,An.aj)([this.store.select(Ve.activePage),this.store.select(Ve.flatFolders)]).pipe((0,_n.x)(),(0,st.h)(([e])=>{var t;return"folder"!==e.name||(null===(t=e.folder)||void 0===t?void 0:t.name)})).subscribe(([e])=>{this.generateBreadCrumb(e)})}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(Ue),o.Y36(wr.Z),o.Y36(Ki),o.Y36(a.yh),o.Y36(Je.b))},e.\u0275cmp=o.Xpm({type:e,selectors:[["entry-breadcrumbs"]],decls:4,vars:4,consts:[[4,"ngIf","ngIfElse"],["breadcrumbs",""],[1,"breadcrumb-container"],[4,"ngFor","ngForOf"],[1,"breadcrumb-item",3,"click"],["button",""],[1,"name"],["svgIcon","arrow-drop-down",4,"ngIf"],["class","separator","svgIcon","keyboard-arrow-right",4,"ngIf"],["svgIcon","arrow-drop-down"],["svgIcon","keyboard-arrow-right",1,"separator"]],template:function(e,t){if(1&e&&(o.YNc(0,xr,1,1,"skeleton",0),o.ALo(1,"async"),o.YNc(2,Cr,3,4,"ng-template",null,1,o.W1O)),2&e){const e=o.MAs(3);o.Q6J("ngIf",o.lcZ(1,2,t.loading$))("ngIfElse",e)}},directives:[n.O5,hs._,n.sg,We.Hw],pipes:[n.Ov,$t.R],styles:["[_nghost-%COMP%]{display:block;position:relative;min-height:33px;max-width:100%;overflow:hidden}.breadcrumb-container[_ngcontent-%COMP%]{display:flex;align-items:center}skeleton.text[_ngcontent-%COMP%]{position:absolute;max-width:250px;height:1.8rem;margin:auto 0;top:0;bottom:0}.breadcrumb-item[_ngcontent-%COMP%]{font-size:1.8rem;color:var(--be-text);border-radius:8px;padding:4px 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.breadcrumb-item[_ngcontent-%COMP%]:hover{background-color:var(--be-hover)}.breadcrumb-item[_ngcontent-%COMP%]:first-of-type{text-transform:capitalize}.breadcrumb-item[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{vertical-align:middle}.breadcrumb-item[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%], .separator[_ngcontent-%COMP%]{color:var(--be-secondary-text)}"],data:{animation:[ps.B]},changeDetection:0}),e})(),Zr=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Xpm({type:e,selectors:[["drive-toolbar"]],decls:1,vars:0,template:function(e,t){1&e&&o._UZ(0,"entry-breadcrumbs")},directives:[Ar],styles:["drive-toolbar{display:block;padding:14px 28px;width:100%;overflow:hidden}drive-toolbar entry-breadcrumbs{margin:0 -8px}"],encapsulation:2,changeDetection:0}),e})();const Or=[{name:"file_size",viewName:"Size"},{name:"name",viewName:"Name"},{name:"updated_at",viewName:"Last Modified"},{name:"created_at",viewName:"Upload Date"},{name:"type",viewName:"Type"},{name:"extension",viewName:"Extension"}];function Sr(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",9),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw(2).changeSort(t)}),o._UZ(1,"mat-icon",10),o.TgZ(2,"span",11),o._uU(3),o.qZA(),o.qZA()}if(2&e){const e=t.$implicit,i=o.oxw().ngIf;o.ekj("active",i.column===e.name),o.xp6(3),o.Oqu(e.viewName)}}function Ir(e,t){if(1&e){const e=o.EpF();o.ynx(0),o.TgZ(1,"span",1),o._uU(2,"Sort by"),o.qZA(),o.TgZ(3,"button",2),o.TgZ(4,"span",3),o.TgZ(5,"span"),o._uU(6),o.ALo(7,"trans"),o.qZA(),o._UZ(8,"mat-icon",4),o.qZA(),o._UZ(9,"mat-icon",5),o.qZA(),o.TgZ(10,"mat-menu",6,7),o.TgZ(12,"div",8),o._uU(13,"Direction"),o.qZA(),o.TgZ(14,"button",9),o.NdJ("click",function(){return o.CHM(e),o.oxw().changeDirection("asc")}),o._UZ(15,"mat-icon",10),o.TgZ(16,"span",11),o._uU(17,"Ascending"),o.qZA(),o.qZA(),o.TgZ(18,"button",9),o.NdJ("click",function(){return o.CHM(e),o.oxw().changeDirection("desc")}),o._UZ(19,"mat-icon",10),o.TgZ(20,"span",11),o._uU(21,"Descending"),o.qZA(),o.qZA(),o._UZ(22,"div",12),o.TgZ(23,"div",8),o._uU(24,"Sort By"),o.qZA(),o.YNc(25,Sr,4,3,"button",13),o.qZA(),o.BQk()}if(2&e){const e=t.ngIf,i=o.MAs(11),n=o.oxw();o.xp6(3),o.Q6J("matMenuTriggerFor",i)("disabled",n.btnDisabled),o.xp6(3),o.Oqu(o.lcZ(7,8,n.getSortViewName(e.column))),o.xp6(8),o.ekj("active","asc"===e.direction),o.xp6(4),o.ekj("active","desc"===e.direction),o.xp6(7),o.Q6J("ngForOf",n.availableSorts)}}const Tr={column:"updated_at",direction:"desc"};let Er=(()=>{class e{constructor(){this.btnDisabled=!1,this.availableSorts=Or,this.sort$=new ot.X(Tr)}changeSort(e){this.sort$.next(Object.assign(Object.assign({},this.sort$.value),{column:e.name})),this.propagateChange(this.sort$.value)}changeDirection(e){this.sort$.next(Object.assign(Object.assign({},this.sort$.value),{direction:e})),this.propagateChange(this.sort$.value)}getSortViewName(e){return this.availableSorts.find(t=>t.name===e).viewName}writeValue(e){this.sort$.next(e||Tr)}registerOnChange(e){this.propagateChange=e}registerOnTouched(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Xpm({type:e,selectors:[["entries-sort-button"]],inputs:{btnDisabled:"btnDisabled"},features:[o._Bn([{provide:kt.JU,useExisting:e,multi:!0}])],decls:2,vars:3,consts:[[4,"ngIf"],["trans","",1,"label"],[1,"no-style",3,"matMenuTriggerFor","disabled"],[1,"sort-button-content"],["svgIcon","keyboard-arrow-down",1,"arrow-icon"],["svgIcon","sort",1,"mobile-sort-button-content"],[1,"drive-sort-menu"],["menu","matMenu"],["trans","",1,"title"],["mat-menu-item","",3,"click"],["svgIcon","check"],["trans",""],[1,"separator"],["mat-menu-item","",3,"active","click",4,"ngFor","ngForOf"]],template:function(e,t){1&e&&(o.YNc(0,Ir,26,10,"ng-container",0),o.ALo(1,"async")),2&e&&o.Q6J("ngIf",o.lcZ(1,1,t.sort$))},directives:[n.O5,It.P,Pt.p6,We.Hw,Pt.VK,Pt.OP,n.sg],pipes:[n.Ov,$t.R],styles:["entries-sort-button{display:inline-block}entries-sort-button .label{color:var(--be-secondary-text);padding-right:3px}entries-sort-button .arrow-icon{width:14px;height:14px;position:relative;top:2px}entries-sort-button button:disabled{color:var(--be-secondary-text);cursor:default}entries-sort-button .mobile-sort-button-content,entries-sort-button button:disabled .mat-icon{display:none}.drive-sort-menu .mat-menu-item{padding-left:8px;line-height:35px;height:35px;font-size:1.5rem}.drive-sort-menu .mat-menu-item.active{color:var(--be-accent-default)}.drive-sort-menu .mat-menu-item.active .mat-icon{visibility:visible;color:inherit}.drive-sort-menu .mat-menu-item .mat-icon{visibility:hidden;margin-right:8px;width:20px;height:20px}.drive-sort-menu .separator{height:1px;background-color:var(--be-divider-default);margin:5px 0 20px}.drive-sort-menu .title{text-transform:uppercase;padding-left:32px;font-size:1.2rem;font-weight:500;margin-bottom:10px}"],encapsulation:2,changeDetection:0}),e})();const Pr=["moreActionsButton"];function Fr(e,t){1&e&&o._UZ(0,"div",5)}function Mr(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",6),o.NdJ("click",function(){return o.CHM(e),o.oxw(2).$implicit.execute()}),o._UZ(1,"mat-icon",7),o.TgZ(2,"span",8),o._uU(3),o.qZA(),o.qZA()}if(2&e){const e=o.oxw(2).$implicit;o.xp6(1),o.Q6J("svgIcon",e.icon),o.xp6(2),o.Oqu(e.viewName)}}function Ur(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",9),o.NdJ("click",function(){return o.CHM(e),o.oxw(2).$implicit.execute()}),o.ALo(1,"trans"),o._UZ(2,"mat-icon",7),o.qZA()}if(2&e){const e=o.oxw(2).$implicit;o.Q6J("matTooltip",o.lcZ(1,2,e.viewName)),o.xp6(2),o.Q6J("svgIcon",e.icon)}}function Dr(e,t){if(1&e&&(o.ynx(0),o.YNc(1,Fr,1,0,"div",3),o.YNc(2,Mr,4,2,"button",4),o.YNc(3,Ur,3,4,"button",1),o.BQk()),2&e){const e=o.oxw().$implicit,t=o.oxw();o.xp6(1),o.Q6J("ngIf",!t.compact&&e.separatorBefore),o.xp6(1),o.Q6J("ngIf",!t.compact),o.xp6(1),o.Q6J("ngIf",t.compact&&e.showInCompact)}}function Lr(e,t){if(1&e&&(o.ynx(0),o.YNc(1,Dr,4,3,"ng-container",2),o.BQk()),2&e){const e=t.$implicit;o.xp6(1),o.Q6J("ngIf",e.visible())}}function qr(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",9,10),o.NdJ("click",function(){return o.CHM(e),o.oxw().openMoreActionsMenu()}),o.ALo(2,"trans"),o._UZ(3,"mat-icon",11),o.qZA()}2&e&&o.Q6J("matTooltip",o.lcZ(2,1,"More actions"))}let Nr=(()=>{class e{constructor(e,t,i){this.store=e,this.injector=t,this.contextMenu=i,this.compact=!1,this.hasMoreActions$=new ot.X(!1),this.actions$=new ot.X([]),this.subscription=(0,An.aj)([this.store.select(Ve.activePage),this.store.select(Ve.selectedEntry)]).subscribe(e=>{this.setActions(e[0],e[1]),this.hasMoreActions$.next(this.actions$.value.some(e=>!e.showInCompact))})}ngOnDestroy(){this.subscription.unsubscribe()}openMoreActionsMenu(){const e=this.store.selectSnapshot(Ve.selectedEntryOrActiveFolder);this.contextMenu.open(br,this.moreActionsButton.nativeElement,{data:{entry:e}})}setActions(e,t){"trash"!==(null==e?void 0:e.name)||t?"trash"===(null==e?void 0:e.name)&&t?this.actions$.next(this.injector.get(vn).getActions()):"shares"===(null==e?void 0:e.name)&&t?this.setActionsForEntry():(null==e?void 0:e.folder)&&!(null==t?void 0:t.id)?this.actions$.next(this.injector.get(gn).getActions()):"starred"===(null==e?void 0:e.name)||"recent"===(null==e?void 0:e.name)?this.actions$.next(this.injector.get(hn).getActions()):t?this.setActionsForEntry():this.actions$.next([]):this.actions$.next(this.injector.get(bn).getActions())}setActionsForEntry(){var e;const t=this.store.selectSnapshot(Ve.selectedEntries).length?this.store.selectSnapshot(Ve.selectedEntries):[this.store.selectSnapshot(Ve.activeFolder)];let i=this.store.selectSnapshot(Ve.selectedEntries).length?this.store.selectSnapshot(Ve.userOwnsSelectedEntries):this.store.selectSnapshot(Ve.userOwnsActiveFolder);(null===(e=this.store.selectSnapshot(Ve.activeWorkspace))||void 0===e?void 0:e.id)&&(i=t.every(e=>{var t;return e.workspace_id===(null===(t=this.store.selectSnapshot(Ve.activeWorkspace))||void 0===t?void 0:t.id)})),this.actions$.next(i?this.injector.get(hn).getActions():this.injector.get(mn).getActions())}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(a.yh),o.Y36(o.zs3),o.Y36(Ki))},e.\u0275cmp=o.Xpm({type:e,selectors:[["context-actions-container"]],viewQuery:function(e,t){if(1&e&&o.Gf(Pr,5,o.SBq),2&e){let e;o.iGM(e=o.CRH())&&(t.moreActionsButton=e.first)}},hostVars:2,hostBindings:function(e,t){2&e&&o.ekj("compact",t.compact)},inputs:{compact:"compact"},decls:4,vars:6,consts:[[4,"ngFor","ngForOf"],["mat-icon-button","",3,"matTooltip","click",4,"ngIf"],[4,"ngIf"],["class","separator",4,"ngIf"],["class","context-menu-item",3,"click",4,"ngIf"],[1,"separator"],[1,"context-menu-item",3,"click"],[3,"svgIcon"],["trans",""],["mat-icon-button","",3,"matTooltip","click"],["moreActionsButton",""],["svgIcon","more-vert"]],template:function(e,t){1&e&&(o.YNc(0,Lr,2,1,"ng-container",0),o.ALo(1,"async"),o.YNc(2,qr,4,3,"button",1),o.ALo(3,"async")),2&e&&(o.Q6J("ngForOf",o.lcZ(1,2,t.actions$)),o.xp6(2),o.Q6J("ngIf",o.lcZ(3,4,t.compact&&t.hasMoreActions$)))},directives:[n.sg,n.O5,We.Hw,It.P,Tt.lW,Ms.gM],pipes:[n.Ov,$t.R],encapsulation:2,changeDetection:0}),e})();const $r=["moreActionsButton"];class Br{constructor(e,t){this.store=e,this.contextMenu=t}toggleViewMode(){const e=this.store.selectSnapshot(Ve.viewMode);this.store.dispatch(new A("list"===e?"grid":"list"))}ToggleDetails(){this.store.dispatch(new Z)}openMoreActionsMenu(){const e=this.store.selectSnapshot(Ve.selectedEntry);this.contextMenu.open(br,this.moreActionsButton.nativeElement,{data:{entry:e}})}}Br.\u0275fac=function(e){return new(e||Br)(o.Y36(a.yh),o.Y36(Ki))},Br.\u0275cmp=o.Xpm({type:Br,selectors:[["toolbar-actions"]],viewQuery:function(e,t){if(1&e&&o.Gf($r,5,o.SBq),2&e){let e;o.iGM(e=o.CRH())&&(t.moreActionsButton=e.first)}},decls:8,vars:8,consts:[[3,"compact"],[1,"always-visible-actions"],["mat-icon-button","",3,"click"],[3,"svgIcon"],["svgIcon","info"]],template:function(e,t){1&e&&(o._UZ(0,"context-actions-container",0),o.TgZ(1,"div",1),o.TgZ(2,"button",2),o.NdJ("click",function(){return t.toggleViewMode()}),o._UZ(3,"mat-icon",3),o.ALo(4,"async"),o.qZA(),o.TgZ(5,"button",2),o.NdJ("click",function(){return t.ToggleDetails()}),o.ALo(6,"async"),o._UZ(7,"mat-icon",4),o.qZA(),o.qZA()),2&e&&(o.Q6J("compact",!0),o.xp6(3),o.Q6J("svgIcon","list"===o.lcZ(4,4,t.viewMode)?"view-list":"view-module"),o.xp6(2),o.ekj("active",o.lcZ(6,6,t.activityOpen)))},directives:[Nr,Tt.lW,We.Hw],pipes:[n.Ov],styles:["toolbar-actions{display:flex;align-items:center;color:var(--be-secondary-text)}toolbar-actions context-actions-container{border-right:1px solid var(--be-divider-default);padding-right:5px;margin-right:5px}toolbar-actions .always-visible-actions .active{color:var(--be-accent-default)}"],encapsulation:2,changeDetection:0}),(0,r.gn)([(0,a.Ph)(Ve.anythingSelected)],Br.prototype,"anythingSelected",void 0),(0,r.gn)([(0,a.Ph)(Ve.viewMode)],Br.prototype,"viewMode",void 0),(0,r.gn)([(0,a.Ph)(Ve.detailsOpen)],Br.prototype,"activityOpen",void 0),(0,r.gn)([(0,a.Ph)(Ve.multipleEntriesSelected)],Br.prototype,"multipleEntriesSelected$",void 0);class Yr{constructor(e){this.store=e,this.sortFormControl=new kt.NI({column:this.store.selectSnapshot(Ve.sortColumn),direction:this.store.selectSnapshot(Ve.sortDirection)})}ngOnInit(){(0,An.aj)([this.store.select(Ve.sortColumn),this.store.select(Ve.sortDirection)]).subscribe(([e,t])=>{this.sortFormControl.setValue({column:e,direction:t},{emitEvent:!1})}),this.sortFormControl.valueChanges.subscribe(e=>{this.store.dispatch(new q({orderBy:e.column,orderDir:e.direction}))})}}Yr.\u0275fac=function(e){return new(e||Yr)(o.Y36(a.yh))},Yr.\u0275cmp=o.Xpm({type:Yr,selectors:[["file-list-header"]],decls:4,vars:4,consts:[[1,"sort-header"],[3,"btnDisabled","formControl"]],template:function(e,t){if(1&e&&(o.TgZ(0,"div",0),o._UZ(1,"entries-sort-button",1),o.ALo(2,"async"),o.qZA(),o._UZ(3,"toolbar-actions")),2&e){let e;o.xp6(1),o.Q6J("btnDisabled",null==(e=o.lcZ(2,2,t.activePage$))?null:e.disableSort)("formControl",t.sortFormControl)}},directives:[Er,kt.JJ,kt.oH,Br],pipes:[n.Ov],styles:["file-list-header{display:flex;align-items:center;border-bottom:1px solid var(--be-divider-default);padding-bottom:8px;margin:0 28px;color:var(--be-text);max-height:49px}file-list-header toolbar-actions{margin-left:auto}@media only screen and (max-width:450px){file-list-header entries-sort-button .label,file-list-header entries-sort-button .sort-button-content{display:none}file-list-header entries-sort-button .mobile-sort-button-content{display:inline-block}}"],encapsulation:2,changeDetection:0}),(0,r.gn)([(0,a.Ph)(Ve.sortColumn)],Yr.prototype,"sortColumn$",void 0),(0,r.gn)([(0,a.Ph)(Ve.activePage)],Yr.prototype,"activePage$",void 0);const Rr=["scrollContainer"],Qr=["filesContainer"];function jr(e,t){1&e&&(o.ynx(0),o._UZ(1,"drive-toolbar"),o._UZ(2,"file-list-header"),o.BQk())}const Jr=[hn,gn,mn,vn,bn];class zr{constructor(e,t,i,n,s,r,o,a){this.store=e,this.route=t,this.currentUser=i,this.localStorage=n,this.domCache=s,this.breakpoints=r,this.workspaces=o,this.settings=a,this.subscriptions=[]}ngOnInit(){this.setViewMode(),this.cacheDemoElements(),this.observeBreakpointChanges(),this.bindToWorkspace(),this.store.dispatch(new d),this.store.dispatch(new p),this.store.dispatch(new j(this.currentUser.getModel())),this.currentUser.model$.subscribe(e=>{this.store.dispatch(new j(e))})}ngOnDestroy(){this.store.dispatch(R),this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=[]}uploadFiles(e){this.store.dispatch(new S(e))}toggleSidebar(){this.store.dispatch(new O)}cacheDemoElements(){this.domCache.filesCont=this.filesContainer.nativeElement,this.domCache.scrollCont=this.scrollContainer.nativeElement,this.domCache.dragPreview=this.dragPreview.nativeElement}setViewMode(){this.store.dispatch(new A(this.localStorage.get("bedrive.viewMode",this.settings.get("drive.default_view","grid"))))}observeBreakpointChanges(){const e=this.breakpoints.observe("(max-width: 1100px)").subscribe(e=>{this.store.dispatch(new Ae({isMobile:e.matches}))});this.subscriptions.push(e)}bindToWorkspace(){const e=this.workspaces.activeId$.pipe((0,nt.T)(1)).subscribe(()=>{this.store.dispatch([new q({},new te(this.store.selectSnapshot(Ve.rootFolder))),new Ce,new d])}),t=this.workspaces.activeWorkspace$.pipe((0,st.h)(e=>!!e)).subscribe(e=>{this.store.dispatch(new J(e))}),i=this.workspaces.bindToNotificationClick();this.subscriptions.push(e,i,t)}}zr.\u0275fac=function(e){return new(e||zr)(o.Y36(a.yh),o.Y36(s.gz),o.Y36(Fe.I),o.Y36(qe.m),o.Y36(wn),o.Y36(xn.Yg),o.Y36(Je.b),o.Y36(Ot.Z))},zr.\u0275cmp=o.Xpm({type:zr,selectors:[["drive"]],viewQuery:function(e,t){if(1&e&&(o.Gf(Rr,7,o.SBq),o.Gf(Qr,7),o.Gf(it,7,o.SBq)),2&e){let e;o.iGM(e=o.CRH())&&(t.scrollContainer=e.first),o.iGM(e=o.CRH())&&(t.filesContainer=e.first),o.iGM(e=o.CRH())&&(t.dragPreview=e.first)}},features:[o._Bn([...Jr,Ki,Je.b])],decls:27,vars:34,consts:[["menuPosition","drive-navbar",3,"showToggleButton","toggleButtonClick"],[1,"left-sidebar",3,"mode","opened"],["position","end",1,"right-sidebar",3,"opened","mode"],["driveHammerInteractions",""],["slot","ads.drive"],[4,"ngIf"],[1,"loading-overlay-container"],["toggleSelectedClass","","contextMenu","entry","fileDropzone","","driveInfiniteScroll","",1,"files-container",3,"disableContextMenu","disableDropzoneClick","disableDropzone","filesDropped"],["filesContainer","","scrollContainer",""],[1,"overlay",3,"isVisible"]],template:function(e,t){if(1&e&&(o.TgZ(0,"material-navbar",0),o.NdJ("toggleButtonClick",function(){return t.toggleSidebar()}),o.ALo(1,"async"),o._UZ(2,"main-searchbar"),o.qZA(),o.TgZ(3,"mat-sidenav-container"),o.TgZ(4,"mat-sidenav",1),o.ALo(5,"async"),o.ALo(6,"async"),o._UZ(7,"sidebar"),o.qZA(),o.TgZ(8,"mat-sidenav",2),o.ALo(9,"async"),o.ALo(10,"async"),o._UZ(11,"details-sidebar"),o.qZA(),o.TgZ(12,"mat-sidenav-content",3),o._UZ(13,"ad-host",4),o.YNc(14,jr,3,0,"ng-container",5),o.ALo(15,"async"),o.TgZ(16,"div",6),o.TgZ(17,"div",7,8),o.NdJ("filesDropped",function(e){return t.uploadFiles(e)}),o.ALo(20,"async"),o.ALo(21,"async"),o.ALo(22,"async"),o._UZ(23,"router-outlet"),o.qZA(),o._UZ(24,"loading-indicator",9),o.ALo(25,"async"),o.qZA(),o.qZA(),o.qZA(),o._UZ(26,"entry-drag-preview")),2&e){let e;o.Q6J("showToggleButton",o.lcZ(1,14,t.isMobile$)),o.xp6(4),o.Q6J("mode",o.lcZ(5,16,t.isMobile$)?"over":"side")("opened",o.lcZ(6,18,t.sidebarOpen$)),o.xp6(4),o.Q6J("opened",o.lcZ(9,20,t.activityOpen$))("mode",o.lcZ(10,22,t.isMobile$)?"over":"side"),o.xp6(4),o.ekj("has-rek",t.settings.has("ads.drive")&&!t.currentUser.isSubscribed()),o.xp6(2),o.Q6J("ngIf","workspaces"!==(null==(e=o.lcZ(15,24,t.activePage$))?null:e.name)),o.xp6(3),o.ekj("dragging",o.lcZ(20,26,t.dragging)),o.Q6J("disableContextMenu",!o.lcZ(21,28,t.canUpload$))("disableDropzoneClick",!0)("disableDropzone",!o.lcZ(22,30,t.canUpload$)),o.xp6(7),o.Q6J("isVisible",o.lcZ(25,32,t.loading$))}},directives:[yn.e,En,rs,ss,Fs,sr,ns,cr,lr.i,n.O5,dr,en,fr,vr,s.lC,ui.Q,it,Zr,Yr],pipes:[n.Ov],styles:["drive{display:block;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}drive .loading-overlay-container{position:relative;height:calc(100% - 106px)}drive .has-rek ad-host{margin-top:25px}drive .has-rek .loading-overlay-container{height:calc(100% - 281px)}drive .mat-sidenav-container{width:100%;height:calc(100% - 70px)}drive .mat-sidenav-container .left-sidebar{width:220px;flex:0 0 220px;border-right:1px solid var(--be-divider-default)}drive .mat-sidenav-container .right-sidebar{width:300px;flex:0 0 300px;border-left:1px solid var(--be-divider-default);background-color:var(--be-background);color:var(--be-text)}drive .mat-sidenav-container .mat-sidenav-content{position:relative;width:auto;overflow:hidden;height:100%;background-color:var(--be-background)}drive .files-container{height:calc(100% - 4px);border:2px solid transparent;overflow-x:hidden;overflow-y:auto;position:relative;padding:26px}drive .files-container.dragging .selected{opacity:.4}drive .files-container.file-over-dropzone{border-color:var(--be-accent-default);background-color:var(--be-accent-emphasis)}"],encapsulation:2,changeDetection:0}),(0,r.gn)([(0,a.Ph)(Ve.dragging)],zr.prototype,"dragging",void 0),(0,r.gn)([(0,a.Ph)(Ve.detailsOpen)],zr.prototype,"activityOpen$",void 0),(0,r.gn)([(0,a.Ph)(Ve.sidebarOpen)],zr.prototype,"sidebarOpen$",void 0),(0,r.gn)([(0,a.Ph)(Ve.loading)],zr.prototype,"loading$",void 0),(0,r.gn)([(0,a.Ph)(Ve.isMobile)],zr.prototype,"isMobile$",void 0),(0,r.gn)([(0,a.Ph)(Ve.canUpload)],zr.prototype,"canUpload$",void 0),(0,r.gn)([(0,a.Ph)(Ve.activePage)],zr.prototype,"activePage$",void 0);var Vr=i(63868);const Hr=function(e){return{type:"entry",entry:e}};function Gr(e,t){if(1&e&&o._UZ(0,"files-grid-item",1),2&e){const e=t.$implicit,i=o.oxw();o.Q6J("entry",e)("contextMenu",o.VKq(4,Hr,e))("disableContextMenu",i.disableInteractions)("folderDropTarget",e)}}let Wr=(()=>{class e{constructor(){this.disableInteractions=!1}trackById(e,t){return t.id}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Xpm({type:e,selectors:[["files-grid"]],inputs:{entries:"entries",disableInteractions:"disableInteractions"},decls:1,vars:2,consts:[[3,"entry","contextMenu","disableContextMenu","folderDropTarget",4,"ngFor","ngForOf","ngForTrackBy"],[3,"entry","contextMenu","disableContextMenu","folderDropTarget"]],template:function(e,t){1&e&&o.YNc(0,Gr,1,6,"files-grid-item",0),2&e&&o.Q6J("ngForOf",t.entries)("ngForTrackBy",t.trackById)},directives:[n.sg,rr,en,sn],styles:["files-grid{display:flex;flex-wrap:wrap;align-content:flex-start;margin:-8px}files-grid:empty{margin:0}"],encapsulation:2,changeDetection:0}),e})();var Xr=i(99883),Kr=i(1303);function eo(e,t){1&e&&(o._UZ(0,"mat-icon",14),o.ALo(1,"trans")),2&e&&o.Q6J("matTooltip",o.lcZ(1,1,"Starred"))}const to=function(e){return{type:"entry",entry:e}};function io(e,t){if(1&e&&(o.TgZ(0,"tr",5),o.TgZ(1,"td",6),o.TgZ(2,"div",7),o._UZ(3,"file-thumbnail",8),o.TgZ(4,"div",9),o.TgZ(5,"span",10),o._uU(6),o.qZA(),o.YNc(7,eo,2,3,"mat-icon",11),o.qZA(),o.qZA(),o.qZA(),o.TgZ(8,"td",12),o._uU(9),o.ALo(10,"formattedDate"),o.qZA(),o.TgZ(11,"td",13),o._uU(12),o.ALo(13,"formattedFileSize"),o.qZA(),o.qZA()),2&e){const e=t.$implicit,i=o.oxw();o.Q6J("contextMenu",o.VKq(13,to,e))("disableContextMenu",i.disableInteractions)("folderDropTarget",e),o.uIk("data-id",e.id),o.xp6(3),o.Q6J("file",e),o.xp6(3),o.Oqu(e.name),o.xp6(1),o.Q6J("ngIf",i.isStarred(e)),o.xp6(2),o.Oqu(o.lcZ(10,9,e.updated_at)),o.xp6(3),o.Oqu(o.lcZ(13,11,e.file_size))}}let no=(()=>{class e{constructor(e,t){this.store=e,this.datatable=t,this.disableInteractions=!1}ngOnInit(){this.datatable.init({disableSort:this.disableInteractions}),this.datatable.sort$.pipe((0,st.h)(e=>!!Object.keys(e).length)).subscribe(e=>{this.store.dispatch(new q(e))})}ngOnDestroy(){this.datatable.destroy()}isStarred(e){return!!e.tags&&!!e.tags.find(e=>"starred"===e.name)}trackById(e,t){return t.id}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(a.yh),o.Y36(Xr.x))},e.\u0275cmp=o.Xpm({type:e,selectors:[["files-list"]],inputs:{entries:"entries",disableInteractions:"disableInteractions"},features:[o._Bn([Xr.x])],decls:11,vars:2,consts:[[1,"material-table"],["table-sort-header","","trans","",1,"name-column"],["table-sort-header","updated_at","trans","",1,"last-updated-column"],["table-sort-header","file_size","trans","",1,"size-column"],["class","drive-entry",3,"contextMenu","disableContextMenu","folderDropTarget",4,"ngFor","ngForOf","ngForTrackBy"],[1,"drive-entry",3,"contextMenu","disableContextMenu","folderDropTarget"],["data-label","Name",1,"name-column"],[1,"file-name-container"],[3,"file"],[1,"file-name"],[1,"entry-name"],["class","star-icon","svgIcon","star",3,"matTooltip",4,"ngIf"],["data-label","Last Updated",1,"last-updated-column"],["data-label","Size",1,"size-column"],["svgIcon","star",1,"star-icon",3,"matTooltip"]],template:function(e,t){1&e&&(o.TgZ(0,"table",0),o.TgZ(1,"thead"),o.TgZ(2,"tr"),o.TgZ(3,"th",1),o._uU(4,"Name"),o.qZA(),o.TgZ(5,"th",2),o._uU(6,"Last Updated"),o.qZA(),o.TgZ(7,"th",3),o._uU(8,"Size"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(9,"tbody"),o.YNc(10,io,14,15,"tr",4),o.qZA(),o.qZA()),2&e&&(o.xp6(10),o.Q6J("ngForOf",t.entries)("ngForTrackBy",t.trackById))},directives:[Kr.p,It.P,n.sg,en,sn,Qs,n.O5,We.Hw,Ms.gM],pipes:[js.l,gs.y,$t.R],styles:["[_nghost-%COMP%]{display:block}table[_ngcontent-%COMP%]{table-layout:fixed}.last-updated-column[_ngcontent-%COMP%]{width:220px}.size-column[_ngcontent-%COMP%]{width:120px}tr.drag-over[_ngcontent-%COMP%], tr.selected[_ngcontent-%COMP%]{background-color:var(--be-accent-emphasis)}.file-name-container[_ngcontent-%COMP%]{display:flex;align-items:center}.file-name[_ngcontent-%COMP%]{max-width:90%;overflow:hidden;text-overflow:ellipsis}file-thumbnail[_ngcontent-%COMP%]{background-color:transparent!important;margin-right:15px}file-thumbnail[_ngcontent-%COMP%] file-icon, file-thumbnail[_ngcontent-%COMP%] img{width:24px;height:24px;max-width:none;-o-object-fit:cover;object-fit:cover}file-thumbnail[_ngcontent-%COMP%] file-icon{margin-top:3px}.star-icon[_ngcontent-%COMP%]{color:#ffc000;width:18px;height:18px;vertical-align:middle}@media only screen and (max-width:768px){.last-updated-column[_ngcontent-%COMP%], .size-column[_ngcontent-%COMP%], thead[_ngcontent-%COMP%]{display:none}}"],changeDetection:0}),e})();var so=i(2861);let ro=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Xpm({type:e,selectors:[["no-recent-entries"]],decls:6,vars:0,consts:[[1,"no-results-message"],["name","time-management",1,"icon"],["trans","",1,"main"],["trans","",1,"secondary"]],template:function(e,t){1&e&&(o.TgZ(0,"div",0),o._UZ(1,"svg-image",1),o.TgZ(2,"div",2),o._uU(3,"No recent entries."),o.qZA(),o.TgZ(4,"div",3),o._uU(5,"You have not uploaded any files or folders yet."),o.qZA(),o.qZA())},directives:[so.L,It.P],encapsulation:2,changeDetection:0}),e})(),oo=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Xpm({type:e,selectors:[["no-trashed-entries"]],decls:6,vars:0,consts:[[1,"no-results-message"],["name","throw-away",1,"icon"],["trans","",1,"main"],["trans","",1,"secondary"]],template:function(e,t){1&e&&(o.TgZ(0,"div",0),o._UZ(1,"svg-image",1),o.TgZ(2,"div",2),o._uU(3,"Trash is empty."),o.qZA(),o.TgZ(4,"div",3),o._uU(5,"There are no files or folders in your trash currently."),o.qZA(),o.qZA())},directives:[so.L,It.P],encapsulation:2,changeDetection:0}),e})(),ao=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Xpm({type:e,selectors:[["no-starred-entries"]],decls:6,vars:0,consts:[[1,"no-results-message"],["name","loving-it",1,"icon"],["trans","",1,"main"],["trans","",1,"secondary"]],template:function(e,t){1&e&&(o.TgZ(0,"div",0),o._UZ(1,"svg-image",1),o.TgZ(2,"div",2),o._uU(3,"Nothing is starred."),o.qZA(),o.TgZ(4,"div",3),o._uU(5,"Add stars to files and folders that you want to easily find later."),o.qZA(),o.qZA())},directives:[so.L,It.P],encapsulation:2,changeDetection:0}),e})(),co=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Xpm({type:e,selectors:[["no-shared-entries"]],decls:6,vars:0,consts:[[1,"no-results-message"],["name","share",1,"icon"],["trans","",1,"main"],["trans","",1,"secondary"]],template:function(e,t){1&e&&(o.TgZ(0,"div",0),o._UZ(1,"svg-image",1),o.TgZ(2,"div",2),o._uU(3,"Shared with me."),o.qZA(),o.TgZ(4,"div",3),o._uU(5,"Files and folders other people have shared with you."),o.qZA(),o.qZA())},directives:[so.L,It.P],encapsulation:2,changeDetection:0}),e})();function lo(e,t){1&e&&(o.TgZ(0,"div",1),o._UZ(1,"svg-image",2),o.TgZ(2,"div",3),o._uU(3,"Begin typing or select a filter to search"),o.qZA(),o.TgZ(4,"div",4),o._uU(5,"Search for files, folders and other content."),o.qZA(),o.qZA())}function po(e,t){1&e&&(o.TgZ(0,"div",1),o._UZ(1,"svg-image",2),o.TgZ(2,"div",3),o._uU(3,"No matches found."),o.qZA(),o.TgZ(4,"div",4),o._uU(5,"Try another search with different query or filters."),o.qZA(),o.qZA())}let uo=(()=>{class e{constructor(e){this.store=e,this.noQueryOrFilters$=this.store.select(Ve.meta).pipe((0,Ct.U)(e=>!e.query&&!e.filters))}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(a.yh))},e.\u0275cmp=o.Xpm({type:e,selectors:[["no-search-entries"]],decls:4,vars:6,consts:[["class","no-results-message",4,"ngIf"],[1,"no-results-message"],["name","file-searching",1,"icon"],["trans","",1,"main"],["trans","",1,"secondary"]],template:function(e,t){1&e&&(o.YNc(0,lo,6,0,"div",0),o.ALo(1,"async"),o.YNc(2,po,6,0,"div",0),o.ALo(3,"async")),2&e&&(o.Q6J("ngIf",o.lcZ(1,2,t.noQueryOrFilters$)),o.xp6(2),o.Q6J("ngIf",!o.lcZ(3,4,t.noQueryOrFilters$)))},directives:[n.O5,so.L,It.P],pipes:[n.Ov],encapsulation:2,changeDetection:0}),e})();const ho=["clickTarget"];let go=(()=>{class e{constructor(e,t){this.store=e,this.uploadConfig=t}ngAfterViewInit(){this.clickTarget.nativeElement.addEventListener("click",()=>{(0,Oe.r)(this.uploadConfig).then(e=>{this.store.dispatch(new S(e))})})}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(a.yh),o.Y36(Ie))},e.\u0275cmp=o.Xpm({type:e,selectors:[["upload-dropzone"]],viewQuery:function(e,t){if(1&e&&o.Gf(ho,7),2&e){let e;o.iGM(e=o.CRH())&&(t.clickTarget=e.first)}},decls:9,vars:0,consts:[[1,"animation-circle"],[1,"content-circle"],["clickTarget",""],["svgIcon","upload-custom",1,"main-icon"],[1,"text","initial-text"],["trans","",1,"primary"],["trans","",1,"secondary"]],template:function(e,t){1&e&&(o._UZ(0,"div",0),o.TgZ(1,"div",1,2),o._UZ(3,"mat-icon",3),o.TgZ(4,"div",4),o.TgZ(5,"div",5),o._uU(6,"Drop files or folders here"),o.qZA(),o.TgZ(7,"div",6),o._uU(8,"or click to upload."),o.qZA(),o.qZA(),o.qZA())},directives:[We.Hw,It.P],styles:["@-webkit-keyframes pulsate{0%{-webkit-transform:scale(1)}50%{-webkit-transform:scale(1.05)}to{-webkit-transform:scale(1)}}@keyframes pulsate{0%{-webkit-transform:scale(1)}50%{-webkit-transform:scale(1.05)}to{-webkit-transform:scale(1)}}.file-over-dropzone .animation-circle{-webkit-animation:pulsate .7s ease-out;animation:pulsate .7s ease-out;-webkit-animation-iteration-count:15;animation-iteration-count:15;background-color:var(--be-accent-lighter);pointer-events:none}.file-over-dropzone .content-circle{color:var(--be-accent-contrast);pointer-events:none}upload-dropzone{display:block;position:relative;width:400px;height:400px;border:2px solid transparent;margin:auto}upload-dropzone .animation-circle,upload-dropzone .content-circle{position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;width:400px;height:400px;min-height:300px;max-width:90%;max-height:90%;border-radius:50%;overflow:hidden;cursor:pointer}upload-dropzone .animation-circle{background-color:var(--be-background);border:1px solid var(--be-divider-default);z-index:1}upload-dropzone .content-circle{display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:transparent;border-color:transparent;color:var(--be-secondary-text);z-index:2}upload-dropzone .content-circle .main-icon{width:100px;height:100px}upload-dropzone .content-circle .text{text-align:center;margin-top:8px}upload-dropzone .content-circle .text .mat-icon{vertical-align:middle}upload-dropzone .content-circle .text .primary{font-size:1.8rem;font-weight:500;margin-bottom:5px}upload-dropzone .content-circle .text .secondary{font-size:1.5rem}@media only screen and (max-width:500px){upload-dropzone{width:auto}upload-dropzone .animation-circle,upload-dropzone .content-circle{border-radius:0;border:none;max-width:100%;max-height:100%}}"],encapsulation:2,changeDetection:0}),e})(),fo=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Xpm({type:e,selectors:[["no-folder-entries"]],decls:1,vars:0,template:function(e,t){1&e&&o._UZ(0,"upload-dropzone")},directives:[go],encapsulation:2,changeDetection:0}),e})();function mo(e,t){if(1&e&&(o._UZ(0,"files-grid",3),o.ALo(1,"async")),2&e){const e=o.oxw();o.Q6J("entries",o.lcZ(1,1,e.entries$))}}function vo(e,t){if(1&e&&(o._UZ(0,"files-list",3),o.ALo(1,"async")),2&e){const e=o.oxw();o.Q6J("entries",o.lcZ(1,1,e.entries$))}}function bo(e,t){1&e&&o._UZ(0,"no-recent-entries")}function wo(e,t){1&e&&o._UZ(0,"no-trashed-entries")}function xo(e,t){1&e&&o._UZ(0,"no-starred-entries")}function yo(e,t){1&e&&o._UZ(0,"no-shared-entries")}function _o(e,t){1&e&&o._UZ(0,"no-search-entries")}function ko(e,t){1&e&&o._UZ(0,"no-folder-entries")}function Co(e,t){if(1&e&&(o.ynx(0,4),o.ALo(1,"async"),o.YNc(2,bo,1,0,"no-recent-entries",5),o.YNc(3,wo,1,0,"no-trashed-entries",5),o.YNc(4,xo,1,0,"no-starred-entries",5),o.YNc(5,yo,1,0,"no-shared-entries",5),o.YNc(6,_o,1,0,"no-search-entries",5),o.YNc(7,ko,1,0,"no-folder-entries",6),o.BQk()),2&e){const e=o.oxw();o.Q6J("ngSwitch",o.lcZ(1,6,e.activePageName$)),o.xp6(2),o.Q6J("ngSwitchCase","recent"),o.xp6(1),o.Q6J("ngSwitchCase","trash"),o.xp6(1),o.Q6J("ngSwitchCase","starred"),o.xp6(1),o.Q6J("ngSwitchCase","shares"),o.xp6(1),o.Q6J("ngSwitchCase","search")}}class Ao{constructor(e,t,i){this.store=e,this.el=t,this.keybinds=i,this.tabindex=0}ngOnInit(){this.keybindSub=this.keybinds.listenOn(this.el.nativeElement),this.keybinds.addWithPreventDefault("ctrl+a",()=>{this.store.dispatch(new m)}),this.keybinds.addWithPreventDefault("delete",()=>{"trash"===this.store.selectSnapshot(Ve.activePageName)?this.store.dispatch(new C({title:"Delete Forever",body:"This will permanently delete selected items.",bodyBold:"This action can not be undone.",ok:"Delete Forever"},new T)):this.store.dispatch(new b)}),this.keybinds.addWithPreventDefault("enter",()=>{this.store.dispatch(new ue(this.store.selectSnapshot(Ve.selectedEntry)))})}ngOnDestroy(){this.keybindSub.unsubscribe()}}Ao.\u0275fac=function(e){return new(e||Ao)(o.Y36(a.yh),o.Y36(o.SBq),o.Y36(Vr.C))},Ao.\u0275cmp=o.Xpm({type:Ao,selectors:[["entries-container"]],hostVars:1,hostBindings:function(e,t){2&e&&o.uIk("tabindex",t.tabindex)},features:[o._Bn([Vr.C])],decls:6,vars:7,consts:[[3,"entries",4,"ngIf","ngIfElse"],["filesList",""],[3,"ngSwitch",4,"ngIf"],[3,"entries"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"]],template:function(e,t){if(1&e&&(o.YNc(0,mo,2,3,"files-grid",0),o.ALo(1,"async"),o.YNc(2,vo,2,3,"ng-template",null,1,o.W1O),o.YNc(4,Co,8,8,"ng-container",2),o.ALo(5,"async")),2&e){const e=o.MAs(3);o.Q6J("ngIf","grid"===o.lcZ(1,3,t.viewMode$))("ngIfElse",e),o.xp6(4),o.Q6J("ngIf",o.lcZ(5,5,t.noEntries))}},directives:[n.O5,Wr,no,n.RF,n.n9,n.ED,ro,oo,ao,co,uo,fo],pipes:[n.Ov],styles:["entries-container{display:block;height:100%;outline:none}entries-container .no-results-message{margin-top:40px}entries-container .no-results-message .mat-icon{margin-top:15px}"],encapsulation:2,changeDetection:0}),(0,r.gn)([(0,a.Ph)(Ve.entries)],Ao.prototype,"entries$",void 0),(0,r.gn)([(0,a.Ph)(Ve.entriesEmpty)],Ao.prototype,"noEntries",void 0),(0,r.gn)([(0,a.Ph)(Ve.viewMode)],Ao.prototype,"viewMode$",void 0),(0,r.gn)([(0,a.Ph)(Ve.activePageName)],Ao.prototype,"activePageName$",void 0);const Zo=new o.OlP("CURRENT_PREVIEW_FILE"),Oo=new o.OlP("PREVIEW_URL_TRANSFORMER",{factory:()=>e=>e.url,providedIn:"root"});var So=i(39075);let Io=(()=>{class e{constructor(e,t,i,n,s,r){this.file=e,this.transformer=t,this.settings=i,this.http=n,this.sanitizer=s,this.currentUser=r,this.filePreviewWrapper=!0,this.download=new o.vpe}getSrc(){return this.transformer(this.file)}getSafeSrc(){return this.sanitizer.bypassSecurityTrustResourceUrl(this.getSrc())}getContents(){return this.http.get(this.getSrc(),null,{responseType:"text"})}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(Zo),o.Y36(Oo),o.Y36(Ot.Z),o.Y36(Pe.r),o.Y36(So.H7),o.Y36(Fe.I))},e.\u0275dir=o.lG2({type:e,hostVars:2,hostBindings:function(e,t){2&e&&o.ekj("file-preview-wrapper",t.filePreviewWrapper)}}),e})();function To(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",3),o.NdJ("click",function(){return o.CHM(e),o.oxw().download.emit()}),o._uU(1,"Download"),o.qZA()}}let Eo=(()=>{class e extends Io{getMessage(){return this.message||"No file preview available."}}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275cmp=o.Xpm({type:e,selectors:[["default-preview"]],inputs:{message:"message"},features:[o.qOj],decls:5,vars:4,consts:[[1,"panel","preview-object"],[1,"message"],["mat-raised-button","","color","accent","trans","",3,"click",4,"ngIf"],["mat-raised-button","","color","accent","trans","",3,"click"]],template:function(e,t){1&e&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o._uU(2),o.ALo(3,"trans"),o.qZA(),o.YNc(4,To,2,0,"button",2),o.qZA()),2&e&&(o.xp6(2),o.Oqu(o.lcZ(3,2,t.getMessage())),o.xp6(2),o.Q6J("ngIf",t.download.observers.length))},directives:[n.O5,Tt.lW,It.P],pipes:[$t.R],styles:["[_nghost-%COMP%]{display:block;max-width:380px;max-height:150px}.panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:var(--be-background);color:var(--be-text);border-radius:4px;width:100%;height:100%;margin:auto;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)}.message[_ngcontent-%COMP%]{font-size:1.8rem;margin-bottom:15px}.mat-raised-button[_ngcontent-%COMP%]{display:block}"],changeDetection:0}),e})();function Po(e,t){1&e&&o._UZ(0,"default-preview",2)}function Fo(e,t){if(1&e&&(o.TgZ(0,"div",3),o.TgZ(1,"pre"),o._uU(2),o.ALo(3,"async"),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.xp6(2),o.Oqu(o.lcZ(3,1,e.content$))}}let Mo=(()=>{class e extends Io{constructor(){super(...arguments),this.content$=new ot.X(""),this.fileTooLarge$=new ot.X(!1)}ngOnInit(){this.file.file_size>5242880?this.fileTooLarge$.next(!0):this.loadFileContents()}loadFileContents(){this.getContents().subscribe(e=>{this.content$.next(e)})}}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275cmp=o.Xpm({type:e,selectors:[["text-preview"]],features:[o.qOj],decls:4,vars:4,consts:[["message","This file is too large to preview.",4,"ngIf","ngIfElse"],["textPreview",""],["message","This file is too large to preview."],[1,"text-wrapper","preview-object"]],template:function(e,t){if(1&e&&(o.YNc(0,Po,1,0,"default-preview",0),o.ALo(1,"async"),o.YNc(2,Fo,4,3,"ng-template",null,1,o.W1O)),2&e){const e=o.MAs(3);o.Q6J("ngIf",o.lcZ(1,2,t.fileTooLarge$))("ngIfElse",e)}},directives:[n.O5,Eo],pipes:[n.Ov],styles:["[_nghost-%COMP%]{display:block;width:80%;min-height:80%}@media only screen and (max-width:768px){[_nghost-%COMP%]{width:90%}}.text-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;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;color:var(--be-text);padding:20px;overflow:auto}.text-wrapper[_ngcontent-%COMP%], pre[_ngcontent-%COMP%]{word-wrap:break-word}pre[_ngcontent-%COMP%]{display:block;white-space:pre-wrap;margin:0;font-size:1.4rem;font-family:inherit}default-preview[_ngcontent-%COMP%]{margin:auto;position:absolute;top:0;left:0;right:0;bottom:0}"],changeDetection:0}),e})();const Uo=["playerEl"];function Do(e,t){1&e&&o._UZ(0,"default-preview")}let Lo=(()=>{class e extends Io{constructor(){super(...arguments),this.invalidMedia=!1}ngOnInit(){if(this.invalidMedia=!this.canPlayVideo(),!this.invalidMedia){const e=document.createElement("source");e.src=this.getSrc(),e.type=this.file.mime,this.player().appendChild(e),this.player().play()}}canPlayVideo(){return!!this.player().canPlayType(this.file.mime)}player(){return this.playerEl.nativeElement}}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275cmp=o.Xpm({type:e,selectors:[["audio-preview"]],viewQuery:function(e,t){if(1&e&&o.Gf(Uo,7),2&e){let e;o.iGM(e=o.CRH())&&(t.playerEl=e.first)}},features:[o.qOj],decls:3,vars:3,consts:[["controls","controls","controlsList","nodownload noremoteplayback",1,"preview-object"],["playerEl",""],[4,"ngIf"]],template:function(e,t){1&e&&(o._UZ(0,"audio",0,1),o.YNc(2,Do,1,0,"default-preview",2)),2&e&&(o.ekj("hidden",t.invalidMedia),o.xp6(2),o.Q6J("ngIf",t.invalidMedia))},directives:[n.O5,Eo],styles:["[_nghost-%COMP%]{display:block;max-width:80%;height:auto;margin-bottom:40px}@media only screen and (max-width:768px){[_nghost-%COMP%]{width:90%}}audio[_ngcontent-%COMP%]{display:block;max-width:100%;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);max-height:60px}audio[_ngcontent-%COMP%], default-preview[_ngcontent-%COMP%]{margin:auto;position:absolute;top:0;left:0;right:0;bottom:0}"],changeDetection:0}),e})();function qo(e,t){1&e&&o._UZ(0,"default-preview")}let No=(()=>{class e extends Lo{}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275cmp=o.Xpm({type:e,selectors:[["video-preview"]],features:[o.qOj],decls:3,vars:3,consts:[["controls","controls","type","video/mp4","controlsList","nodownload noremoteplayback","playsinline","",1,"preview-object"],["playerEl",""],[4,"ngIf"]],template:function(e,t){1&e&&(o._UZ(0,"video",0,1),o.YNc(2,qo,1,0,"default-preview",2)),2&e&&(o.ekj("hidden",t.invalidMedia),o.xp6(2),o.Q6J("ngIf",t.invalidMedia))},directives:[n.O5,Eo],styles:["[_nghost-%COMP%]{display:block;max-width:100%;max-height:100%;height:auto;margin-bottom:40px}@media only screen and (max-width:768px){[_nghost-%COMP%]{width:90%}}video[_ngcontent-%COMP%]{display:block;max-width:100%;max-height:100%;height:auto;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)}default-preview[_ngcontent-%COMP%], video[_ngcontent-%COMP%]{margin:auto;position:absolute;top:0;left:0;right:0;bottom:0}"],changeDetection:0}),e})(),$o=(()=>{class e extends Io{}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275cmp=o.Xpm({type:e,selectors:[["image-preview"]],features:[o.qOj],decls:1,vars:1,consts:[[1,"preview-object",3,"src"]],template:function(e,t){1&e&&o._UZ(0,"img",0),2&e&&o.Q6J("src",t.getSafeSrc(),o.LSH)},styles:["[_nghost-%COMP%]{display:block;max-width:100%;max-height:100%;height:auto;margin-bottom:40px}@media only screen and (max-width:768px){[_nghost-%COMP%]{width:90%}}img[_ngcontent-%COMP%]{max-width:100%;max-height:100%;height:auto;margin:auto;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);position:absolute;top:0;left:0;right:0;bottom:0;background-color:var(--be-background)}"],changeDetection:0}),e})(),Bo=(()=>{class e extends Io{constructor(){super(...arguments),this.className="preview-object"}getSrc(){return super.getSrc()+"#toolbar=0"}}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275cmp=o.Xpm({type:e,selectors:[["pdf-preview"]],hostVars:2,hostBindings:function(e,t){2&e&&o.Tol(t.className)},features:[o.qOj],decls:1,vars:1,consts:[[3,"src"]],template:function(e,t){1&e&&o._UZ(0,"iframe",0),2&e&&o.Q6J("src",t.getSafeSrc(),o.uOi)},styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;margin:auto;position:absolute;top:0;left:0;right:0;bottom:0}iframe[_ngcontent-%COMP%], object[_ngcontent-%COMP%]{width:100%;height:100%;border:none}"],changeDetection:0}),e})();var Yo=i(24890);const Ro=["iframe"];function Qo(e,t){if(1&e){const e=o.EpF();o.ynx(0),o._UZ(1,"iframe",3,4),o.TgZ(3,"div",5),o.NdJ("click",function(){return o.CHM(e),o.oxw().openInNewWindow()}),o.qZA(),o.BQk()}}function jo(e,t){1&e&&o._UZ(0,"default-preview")}let Jo=(()=>{class e extends Io{constructor(){super(...arguments),this.loading$=new ot.X(!0),this.showDefaultPreview$=new ot.X(!1)}ngAfterViewInit(){if(this.file.file_size>25e6)return this.showDefaultPreview();this.iframe.nativeElement.onload=()=>{clearTimeout(this.timeoutRef),this.stopLoading()},this.getIframeSrc().then(e=>{this.iframe.nativeElement.src=e}).catch(()=>{this.showDefaultPreview()}),this.timeoutRef=setTimeout(()=>{this.showDefaultPreview()},5e3)}stopLoading(){this.loading$.next(!1)}showDefaultPreview(){this.stopLoading(),this.showDefaultPreview$.next(!0)}openInNewWindow(){window.open(window.location.href,"_blank")}getIframeSrc(){return new Promise((e,t)=>{let i=this.getSrc();-1===i.indexOf("shareable_link")?this.http.post(`uploads/${this.file.id}/add-preview-token`).subscribe(t=>{i+=`?preview_token=${t.preview_token}`,e(this.getFullPreviewUrl(i))},()=>t):e(this.getFullPreviewUrl(i))})}getFullPreviewUrl(e){return e=(0,Yo.s)(e)?e:this.settings.getBaseUrl()+"/"+e,"https://view.officeapps.live.com/op/embed.aspx?src="+encodeURIComponent(e)}}return e.\u0275fac=function(){let t;return function(i){return(t||(t=o.n5z(e)))(i||e)}}(),e.\u0275cmp=o.Xpm({type:e,selectors:[["google-docs-viewer"]],viewQuery:function(e,t){if(1&e&&o.Gf(Ro,5),2&e){let e;o.iGM(e=o.CRH())&&(t.iframe=e.first)}},features:[o.qOj],decls:6,vars:7,consts:[[4,"ngIf","ngIfElse"],["defaultPreview",""],[1,"overlay",3,"isVisible"],[1,"preview-object"],["iframe",""],[1,"pop-out-block","office-block",3,"click"]],template:function(e,t){if(1&e&&(o.YNc(0,Qo,4,0,"ng-container",0),o.ALo(1,"async"),o.YNc(2,jo,1,0,"ng-template",null,1,o.W1O),o._UZ(4,"loading-indicator",2),o.ALo(5,"async")),2&e){const e=o.MAs(3);o.Q6J("ngIf",!o.lcZ(1,3,t.showDefaultPreview$))("ngIfElse",e),o.xp6(4),o.Q6J("isVisible",o.lcZ(5,5,t.loading$))}},directives:[n.O5,ui.Q,Eo],pipes:[n.Ov],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;margin:auto;position:absolute;top:0;left:0;right:0;bottom:0}iframe[_ngcontent-%COMP%]{width:100%;height:100%;border:none}loading-indicator.overlay[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;background-color:transparent}default-preview[_ngcontent-%COMP%]{margin:auto;position:absolute;top:0;left:0;right:0;bottom:0}.pop-out-block[_ngcontent-%COMP%]{position:absolute;right:12px;cursor:pointer}.office-block[_ngcontent-%COMP%]{width:25px;height:25px;bottom:0}.gdocs-block[_ngcontent-%COMP%]{width:40px;height:40px;top:12px}"],changeDetection:0}),e})();const zo=new o.OlP("AVAILABLE_PREVIEWS");let Vo=(()=>{class e{constructor(){this.text=Mo,this.video=No,this.audio=Lo,this.image=$o,this.pdf=Bo,this.spreadsheet=Jo,this.powerPoint=Jo,this.word=Jo,this["text/rtf"]=Eo}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac}),e})(),Ho=(()=>{class e{constructor(e,t){this.availablePreviews=e,this.injector=t,this.files=[],this.portal=new ot.X(null),this.meta=new ot.X({}),this.previewUriTransformer=null,this.download=new rt.xQ}pagination(){return this.meta.pipe((0,st.h)(e=>e&&!!e.entry))}getCurrent(){return this.meta.value.entry}getAllEntries(){return this.files}getPortal(){return this.portal.asObservable()}showNext(){this.meta.value.haveNext&&(this.updateMeta("next"),this.updatePortal())}showPrevious(){this.meta.value.havePrevious&&(this.updateMeta("previous"),this.updatePortal())}updateMeta(e){let t=0;if("string"==typeof e){const i=this.meta.value.pointer;t="next"===e?i+1:i-1}else"number"==typeof e&&(t=e);this.meta.next({pointer:t,entry:this.files[t],total:this.files.length,haveNext:t+1<this.files.length,havePrevious:t-1>-1})}updatePortal(){const e=this.getCurrent();this.portal.next(new Hi.C5(this.availablePreviews[null==e?void 0:e.mime]||this.availablePreviews[null==e?void 0:e.type]||Eo,null,this.createInjector()))}set(e,t){e&&0!==e.length&&(this.files=e.filter(e=>"folder"!==e.type),this.updateMeta(t),this.updatePortal())}createInjector(){const e=new WeakMap;return e.set(Zo,this.getCurrent()),this.previewUriTransformer&&e.set(Oo,this.previewUriTransformer),new Hi.nK(this.injector,e)}destroy(){this.meta.next({}),this.files=null,this.portal.next(null)}setPreviewUriTransformer(e){this.previewUriTransformer=e}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(zo),o.LFG(o.zs3))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function Go(e,t){1&e&&(o.TgZ(0,"div",9),o._uU(1,"Password does not match."),o.qZA())}let Wo=(()=>{class e{constructor(e){this.links=e,this.passwordControl=new kt.NI,this.passwordError$=new ot.X(!1),this.passwordValid=new o.vpe(null)}submitPassword(){this.links.checkPassword(this.link.id,this.passwordControl.value).subscribe(e=>{this.handlePasswordCheck(e.matches)},()=>{})}handlePasswordCheck(e){this.passwordError$.next(!e),e&&this.passwordValid.emit(this.passwordControl.value)}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(Gt))},e.\u0275cmp=o.Xpm({type:e,selectors:[["link-preview-password-panel"]],inputs:{link:"link"},outputs:{passwordValid:"passwordValid"},decls:13,vars:4,consts:[["svgIcon","password-custom"],["ngNativeValidate","",1,"content",3,"ngSubmit"],["trans","",1,"message"],[1,"input-container"],["for","password","trans","",1,"hidden"],["type","password","id","password","placeholder","Password","trans-placeholder","","required","",3,"formControl"],[1,"button-container"],["class","error","trans","",4,"ngIf"],["type","submit","mat-raised-button","","color","accent","trans",""],["trans","",1,"error"]],template:function(e,t){1&e&&(o._UZ(0,"mat-icon",0),o.TgZ(1,"form",1),o.NdJ("ngSubmit",function(){return t.submitPassword()}),o.TgZ(2,"div",2),o._uU(3,"The link you are trying to access is password protected."),o.qZA(),o.TgZ(4,"div",3),o.TgZ(5,"label",4),o._uU(6,"Password"),o.qZA(),o._UZ(7,"input",5),o.qZA(),o.TgZ(8,"div",6),o.YNc(9,Go,2,0,"div",7),o.ALo(10,"async"),o.TgZ(11,"button",8),o._uU(12,"Enter"),o.qZA(),o.qZA(),o.qZA()),2&e&&(o.xp6(7),o.Q6J("formControl",t.passwordControl),o.xp6(2),o.Q6J("ngIf",o.lcZ(10,2,t.passwordError$)))},directives:[We.Hw,kt.JL,kt.F,It.P,kt.Fj,kt.Q7,kt.JJ,kt.oH,n.O5,Tt.lW],pipes:[n.Ov],styles:["link-preview-password-panel{display:flex;background-color:var(--be-background);color:var(--be-text);border:1px solid var(--be-divider-default);padding:25px;border-radius:4px;position:absolute;top:0;left:0;right:0;bottom:0;width:500px;height:192px;max-width:90%;max-height:90%;margin:auto}link-preview-password-panel .content{flex:1 1 auto}link-preview-password-panel .content .message{margin-bottom:8px}link-preview-password-panel .button-container{display:flex;align-items:center;margin-top:10px}link-preview-password-panel .button-container button{margin-left:auto}link-preview-password-panel .mat-icon{width:140px;height:140px;flex:0 0 140px;margin-right:10px;margin-left:-25px}"],encapsulation:2,changeDetection:0}),e})();var Xo=i(72100),Ko=i(67310);function ea(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",3),o.NdJ("click",function(){return o.CHM(e),o.oxw().closed.emit(!0)}),o._UZ(1,"mat-icon",4),o.qZA()}}function ta(e,t){if(1&e){const e=o.EpF();o.ynx(0),o.TgZ(1,"div",10),o.TgZ(2,"button",11),o.NdJ("click",function(){return o.CHM(e),o.oxw(2).previewFiles.showPrevious()}),o._UZ(3,"mat-icon",12),o.qZA(),o.TgZ(4,"span",13),o._uU(5),o.ALo(6,"trans"),o.qZA(),o.TgZ(7,"button",14),o.NdJ("click",function(){return o.CHM(e),o.oxw(2).previewFiles.showNext()}),o._UZ(8,"mat-icon",15),o.qZA(),o.qZA(),o.BQk()}if(2&e){const e=t.ngIf;o.xp6(2),o.Q6J("disabled",!e.havePrevious),o.xp6(3),o.lnq("",e.pointer+1," ",o.lcZ(6,5,"of")," ",e.total,""),o.xp6(2),o.Q6J("disabled",!e.haveNext)}}function ia(e,t){if(1&e){const e=o.EpF();o.ynx(0),o.TgZ(1,"div",5),o._UZ(2,"file-icon",6),o._uU(3),o.qZA(),o.YNc(4,ta,9,7,"ng-container",1),o.ALo(5,"async"),o.TgZ(6,"div",7),o.TgZ(7,"button",8),o.NdJ("click",function(){return o.CHM(e),o.oxw().downloadFiles()}),o._UZ(8,"mat-icon",9),o.qZA(),o.Hsn(9),o.qZA(),o.BQk()}if(2&e){const e=t.ngIf,i=o.oxw();o.xp6(2),o.Q6J("type",e.entry.type),o.xp6(1),o.hij(" ",e.entry.name," "),o.xp6(1),o.Q6J("ngIf",o.lcZ(5,4,i.previewFiles.pagination())),o.xp6(3),o.Q6J("disabled",i.disableDownload)}}function na(e,t){if(1&e&&o._UZ(0,"img",18),2&e){const e=o.oxw(2);o.Q6J("src",e.settings.get("branding.logo_light"),o.LSH)}}function sa(e,t){if(1&e&&(o.TgZ(0,"a",16),o.YNc(1,na,1,1,"img",17),o.qZA()),2&e){const e=o.oxw();o.xp6(1),o.Q6J("ngIf",e.showLogo&&e.settings.get("branding.logo_light"))}}const ra=["*"];let oa=(()=>{class e{constructor(e,t){this.previewFiles=e,this.settings=t,this.showLogo=!1,this.disableDownload=!1,this.showCloseButton=!1,this.closed=new o.vpe}downloadFiles(){this.previewFiles.download.next()}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(Ho),o.Y36(Ot.Z))},e.\u0275cmp=o.Xpm({type:e,selectors:[["file-preview-toolbar"]],inputs:{showLogo:"showLogo",disableDownload:"disableDownload",showCloseButton:"showCloseButton"},outputs:{closed:"closed"},ngContentSelectors:ra,decls:4,vars:5,consts:[["mat-icon-button","","class","back-button",3,"click",4,"ngIf"],[4,"ngIf"],["routerLink","/drive","class","logo",4,"ngIf"],["mat-icon-button","",1,"back-button",3,"click"],["svgIcon","arrow-back"],[1,"entry-name"],[3,"type"],[1,"actions"],["mat-icon-button","",3,"disabled","click"],["svgIcon","file-download"],[1,"navigation"],["mat-icon-button","",1,"previous",3,"disabled","click"],["svgIcon","keyboard-arrow-left"],[1,"meta"],["mat-icon-button","",1,"next",3,"disabled","click"],["svgIcon","keyboard-arrow-right"],["routerLink","/drive",1,"logo"],[3,"src",4,"ngIf"],[3,"src"]],template:function(e,t){1&e&&(o.F$t(),o.YNc(0,ea,2,0,"button",0),o.YNc(1,ia,10,6,"ng-container",1),o.ALo(2,"async"),o.YNc(3,sa,2,1,"a",2)),2&e&&(o.Q6J("ngIf",t.showCloseButton),o.xp6(1),o.Q6J("ngIf",o.lcZ(2,3,t.previewFiles.pagination())),o.xp6(2),o.Q6J("ngIf",t.showLogo&&t.settings.has("branding.logo_light")))},directives:[n.O5,Tt.lW,We.Hw,Xe,s.yS],pipes:[n.Ov,$t.R],styles:["file-preview-toolbar{position:fixed;top:0;left:0;display:flex;width:100%;align-items:center;color:var(--be-accent-contrast);height:60px;padding:0 15px;background:linear-gradient(180deg,rgba(0,0,0,.65) 0,transparent);z-index:10}@media only screen and (max-width:550px){file-preview-toolbar{padding:0 5px}}file-preview-toolbar .entry-name{display:block;margin-right:25px;margin-left:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (min-width:550px){file-preview-toolbar .entry-name{max-width:calc(50% - 77.5px)}}file-preview-toolbar .entry-name file-icon{display:inline-block;vertical-align:bottom;margin-right:5px}@media only screen and (min-width:550px){file-preview-toolbar .navigation{position:absolute;left:50%;top:50%;margin-right:-50%;transform:translate(-50%,-50%)}}@media only screen and (max-width:550px){file-preview-toolbar .navigation{position:fixed;bottom:10px;left:5px}}file-preview-toolbar .actions{margin-left:auto;white-space:nowrap}file-preview-toolbar .actions a,file-preview-toolbar .actions button{margin:0 5px}file-preview-toolbar .close-button{margin-right:25px}file-preview-toolbar .logo{position:fixed;bottom:15px;right:15px;opacity:.2;width:150px;height:auto}file-preview-toolbar .logo img{width:100%;height:auto}file-preview-toolbar .mat-icon-button[disabled][disabled]{color:#737373}"],encapsulation:2,changeDetection:0}),e})();function aa(e,t){}function ca(e,t){if(1&e){const e=o.EpF();o.ynx(0),o.YNc(1,aa,0,0,"ng-template",1),o.NdJ("attached",function(t){return o.CHM(e),o.oxw().listenForDownloadClick(t)}),o.BQk()}if(2&e){const e=t.ngIf;o.xp6(1),o.Q6J("cdkPortalOutlet",e)}}let la=(()=>{class e{constructor(e){this.previewFiles=e,this.disableDownload=!1}ngOnChanges(e){this.previewFiles.set(this.files,this.activeFile)}ngOnDestroy(){this.previewFiles.destroy(),this.downloadSub&&this.downloadSub.unsubscribe()}listenForDownloadClick(e){this.downloadSub&&this.downloadSub.unsubscribe(),this.disableDownload||(this.downloadSub=e.instance.download.subscribe(()=>{this.previewFiles.download.next()}))}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(Ho))},e.\u0275cmp=o.Xpm({type:e,selectors:[["preview-container"]],inputs:{files:"files",activeFile:"activeFile",disableDownload:"disableDownload"},features:[o.TTD],decls:2,vars:3,consts:[[4,"ngIf"],[3,"cdkPortalOutlet","attached"]],template:function(e,t){1&e&&(o.YNc(0,ca,2,1,"ng-container",0),o.ALo(1,"async")),2&e&&o.Q6J("ngIf",o.lcZ(1,1,t.previewFiles.getPortal()))},directives:[n.O5,Hi.Pl],pipes:[n.Ov],styles:["[_nghost-%COMP%]{display:flex;width:100%;min-height:100%;align-items:center;justify-content:center;position:relative;overflow:hidden} .file-preview-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;margin:auto}"],changeDetection:0}),e})();const da=["previewContainer"],pa=["moreOptionsButton"];function ua(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",4,5),o.NdJ("click",function(){return o.CHM(e),o.oxw().openContextMenu()}),o._UZ(2,"mat-icon",6),o.qZA()}}let ha=(()=>{class e{constructor(e,t,i,n,s,r,o){this.store=e,this.el=t,this.contextMenu=i,this.overlayRef=n,this.previewFiles=s,this.currentUser=r,this.data=o}ngAfterViewInit(){this.bindToDownload(),setTimeout(()=>{this.previewContainer.nativeElement.addEventListener("click",e=>{e.target.closest(".preview-object")||this.overlayRef.close()})})}ngOnDestroy(){this.downloadSub.unsubscribe()}openContextMenu(){this.contextMenu.open(br,this.optionsButton.nativeElement,{data:{entry:this.previewFiles.getCurrent()}})}closeOverlay(){this.overlayRef.close()}canDownload(){return this.data.entries.every(e=>{var t;e.users||(e.users=[]);const i=e.users&&e.users.find(e=>e.id===this.currentUser.get("id"));return(null===(t=this.data.shareableLink)||void 0===t?void 0:t.allow_download)||i&&(i.owns_entry||i.entry_permissions.download)})}bindToDownload(){this.downloadSub=this.previewFiles.download.subscribe(()=>{const e=this.previewFiles.getCurrent();this.store.dispatch(new F([e],this.data.shareableLink,this.data.password))})}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(a.yh),o.Y36(o.SBq),o.Y36(Ki),o.Y36(Ko.L),o.Y36(Ho),o.Y36(Fe.I),o.Y36(Xo.p))},e.\u0275cmp=o.Xpm({type:e,selectors:[["file-preview-overlay"]],viewQuery:function(e,t){if(1&e&&(o.Gf(da,7,o.SBq),o.Gf(pa,5,o.SBq)),2&e){let e;o.iGM(e=o.CRH())&&(t.previewContainer=e.first),o.iGM(e=o.CRH())&&(t.optionsButton=e.first)}},decls:4,vars:6,consts:[[3,"showCloseButton","disableDownload","closed"],["mat-icon-button","",3,"click",4,"ngIf"],[3,"files","activeFile","disableDownload"],["previewContainer",""],["mat-icon-button","",3,"click"],["moreOptionsButton",""],["svgIcon","more-vert"]],template:function(e,t){1&e&&(o.TgZ(0,"file-preview-toolbar",0),o.NdJ("closed",function(){return t.closeOverlay()}),o.YNc(1,ua,3,0,"button",1),o.qZA(),o._UZ(2,"preview-container",2,3)),2&e&&(o.Q6J("showCloseButton",!0)("disableDownload",!t.canDownload()),o.xp6(1),o.Q6J("ngIf",!t.data.hideMoreOptionsBtn),o.xp6(1),o.Q6J("files",t.data.entries)("activeFile",t.data.activeEntry)("disableDownload",!t.canDownload()))},directives:[oa,n.O5,la,Tt.lW,We.Hw],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;background-color:rgba(0,0,0,.9);color:var(--be-accent-contrast);overflow:auto;position:relative}preview-container[_ngcontent-%COMP%]{margin-top:60px;min-height:calc(100% - 60px)}"],changeDetection:0}),e})();var ga=i(7964),fa=i(76403);const ma=["filesContainer"];function va(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",13),o.NdJ("click",function(){return o.CHM(e),o.oxw().openFolder()}),o._UZ(1,"mat-icon",14),o.qZA()}}function ba(e,t){1&e&&o._UZ(0,"mat-icon",17)}function wa(e,t){if(1&e){const e=o.EpF();o.ynx(0),o.TgZ(1,"div",15),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw().openFolder(t)}),o._uU(2),o.qZA(),o.YNc(3,ba,1,0,"mat-icon",16),o.BQk()}if(2&e){const e=t.$implicit,i=t.last;o.xp6(2),o.Oqu(e.name),o.xp6(1),o.Q6J("ngIf",!i)}}function xa(e,t){if(1&e){const e=o.EpF();o.ynx(0),o.TgZ(1,"button",18),o.NdJ("click",function(){return o.CHM(e),o.oxw().toggleViewMode()}),o.ALo(2,"trans"),o._UZ(3,"mat-icon",19),o.qZA(),o.BQk()}if(2&e){const e=t.ngIf;o.xp6(1),o.Q6J("matTooltip",o.lcZ(2,2,"list"===e?"Grid view":"List view")),o.xp6(2),o.Q6J("svgIcon","list"===e?"view-list":"view-module")}}function ya(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",20),o.NdJ("click",function(){return o.CHM(e),o.oxw().download()}),o.ALo(1,"trans"),o._UZ(2,"mat-icon",21),o.qZA()}2&e&&o.Q6J("matTooltip",o.lcZ(1,1,"Download all"))}function _a(e,t){if(1&e&&o._UZ(0,"files-grid",24),2&e){const e=o.oxw().ngIf;o.Q6J("entries",e.data)("disableInteractions",!0)}}function ka(e,t){if(1&e&&o._UZ(0,"files-list",24),2&e){const e=o.oxw().ngIf;o.Q6J("entries",e.data)("disableInteractions",!0)}}function Ca(e,t){1&e&&(o.TgZ(0,"no-results-message"),o.TgZ(1,"span",25),o._uU(2,"Folder Is Empty"),o.qZA(),o.TgZ(3,"span",26),o._uU(4,"No files have been uploaded to this folder yet."),o.qZA(),o.qZA())}function Aa(e,t){if(1&e&&(o.ynx(0),o.YNc(1,_a,1,2,"files-grid",22),o.ALo(2,"async"),o.YNc(3,ka,1,2,"ng-template",null,23,o.W1O),o.YNc(5,Ca,5,0,"no-results-message",7),o.BQk()),2&e){const e=t.ngIf,i=o.MAs(4),n=o.oxw();o.xp6(1),o.Q6J("ngIf","grid"===o.lcZ(2,3,n.viewMode$))("ngIfElse",i),o.xp6(4),o.Q6J("ngIf",!e.data.length)}}class Za extends mr{constructor(e,t,i,n,s,r){super(),this.store=e,this.overlay=t,this.router=i,this.linkApi=n,this.zone=s,this.el=r,this.loading$=new ot.X(!1),this.breadcrumb$=new ot.X([]),this.pagination$=new ot.X(null),this.allFolders={},this.sortFormControl=new kt.NI({column:"updated_at",direction:"desc"})}get folder(){return this.data.link.entry}get children(){return this.pagination$.value.data}ngOnInit(){super.ngOnInit(),this.sortFormControl.valueChanges.subscribe(e=>{e&&this.loadChildren({},!0)})}ngOnChanges(){this.allFolders[this.folder.id]=this.folder,this.generateBreadcrumb(this.folder),this.setPagination(this.data.folderChildren),this.loading$.next(!1)}download(){this.store.dispatch(new F([this.folder],this.data.link,this.password))}toggleViewMode(){const e=this.store.selectSnapshot(Ve.viewMode);this.store.dispatch(new A("list"===e?"grid":"list"))}openPreviewOverlay(e){const t=this.children.filter(e=>"folder"!==e.type),i=t.findIndex(t=>t.id===e.id);this.overlay.open(ha,{position:"center",origin:"global",panelClass:"file-preview-overlay-container",data:{entries:t.slice(),activeEntry:i,shareableLink:this.data.link,password:this.password,hideMoreOptionsBtn:!0}})}getEntry(e){const t=e.target.closest(".drive-entry");if(t)return this.children.find(e=>e.id===+t.dataset.id)}onClick(e){const t=this.getEntry(e);t&&("folder"===t.type?this.openFolder(t):this.openPreviewOverlay(t))}isSubFolder(){return this.router.url.indexOf(":")>-1}openFolder(e){e&&this.folder.id===e.id||(this.loading$.next(!0),this.router.navigate(["/drive/s",this.makeLinkHash(e)]).then(()=>{this.sortFormControl.reset()}))}generateBreadcrumb(e){this.breadcrumb$.next(e.path.split("/").map(e=>this.allFolders[+e]).filter(e=>!!e))}loadChildren(e,t=!1){var i,n;this.loading$.next(!0);const s=`${(null===(i=this.sortFormControl.value)||void 0===i?void 0:i.column)||"updated_at"}:${(null===(n=this.sortFormControl.value)||void 0===n?void 0:n.direction)||"desc"}`,r=e.page||this.pagination$.value.current_page;this.linkApi.findByHash(this.makeLinkHash(this.folder),{page:r,order:s,withEntries:!0}).pipe((0,l.x)(()=>this.loading$.next(!1))).subscribe(e=>{const i=e.folderChildren;t||(i.data=[...this.children,...i.data]),this.setPagination(i)})}makeLinkHash(e){let t=this.data.link.hash;return e&&(t+=":"+e.hash),t}setPagination(e){e.data=e.data.map(e=>(e.url+=`?shareable_link=${this.data.link.id}`,this.password&&(e.url+=`&password=${this.password}`),e)),this.pagination$.next(e)}loadMoreItems(){this.loadChildren({page:this.pagination$.value.current_page+1},!1)}canLoadMore(){return this.pagination$.value.current_page<this.pagination$.value.last_page}isLoading(){return this.loading$.value}}function Oa(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"link-preview-password-panel",3),o.NdJ("passwordValid",function(t){return o.CHM(e),o.oxw(2).setValidPassword(t)}),o.qZA()}if(2&e){const e=o.oxw().ngIf;o.Q6J("link",e.link)}}function Sa(e,t){if(1&e){const e=o.EpF();o.ynx(0),o._UZ(1,"span",5),o.TgZ(2,"button",6),o.NdJ("click",function(){return o.CHM(e),o.oxw(4).import()}),o._uU(3,"Import"),o.qZA(),o.BQk()}}function Ia(e,t){if(1&e&&(o.ynx(0),o.TgZ(1,"folder-preview",4),o.YNc(2,Sa,4,0,"ng-container",0),o.ALo(3,"async"),o.qZA(),o.BQk()),2&e){const e=o.oxw(2).ngIf,t=o.oxw();o.xp6(1),o.Q6J("data",e)("password",t.password),o.xp6(1),o.Q6J("ngIf",!o.lcZ(3,3,t.entryAlreadyImported$)&&t.currentUser.isLoggedIn())}}function Ta(e,t){1&e&&(o.TgZ(0,"a",12),o._uU(1,"Sign In"),o.qZA())}function Ea(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",6),o.NdJ("click",function(){return o.CHM(e),o.oxw(4).import()}),o._uU(1," Import "),o.qZA()}}Za.\u0275fac=function(e){return new(e||Za)(o.Y36(a.yh),o.Y36(ga.T),o.Y36(s.F0),o.Y36(Gt),o.Y36(o.R0b),o.Y36(o.SBq))},Za.\u0275cmp=o.Xpm({type:Za,selectors:[["folder-preview"]],viewQuery:function(e,t){if(1&e&&o.Gf(ma,7),2&e){let e;o.iGM(e=o.CRH())&&(t.filesContainer=e.first)}},inputs:{data:"data",password:"password"},features:[o.qOj,o.TTD],ngContentSelectors:["*"],decls:20,vars:15,consts:[[1,"toolbar"],[1,"breadcrumb"],["mat-icon-button","","class","home-button",3,"click",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"actions"],[3,"formControl"],[1,"action-separator"],[4,"ngIf"],["mat-icon-button","",3,"matTooltip","click",4,"ngIf"],["slot","ads.file-preview",1,"folder-preview-vert-host"],[1,"files-container",3,"click"],["filesContainer",""],[1,"overlay",3,"isVisible"],["mat-icon-button","",1,"home-button",3,"click"],["svgIcon","home",1,"action-icon"],[1,"breadcrumb-item",3,"click"],["class","separator","svgIcon","keyboard-arrow-right",4,"ngIf"],["svgIcon","keyboard-arrow-right",1,"separator"],["mat-icon-button","",1,"view-toggle-button",3,"matTooltip","click"],[1,"action-icon",3,"svgIcon"],["mat-icon-button","",3,"matTooltip","click"],["svgIcon","file-download",1,"action-icon"],[3,"entries","disableInteractions",4,"ngIf","ngIfElse"],["filesList",""],[3,"entries","disableInteractions"],["primary-text","","trans",""],["secondary-text","","trans",""]],template:function(e,t){1&e&&(o.F$t(),o._UZ(0,"material-navbar"),o.TgZ(1,"div",0),o.TgZ(2,"div",1),o.YNc(3,va,2,0,"button",2),o.YNc(4,wa,4,2,"ng-container",3),o.ALo(5,"async"),o.qZA(),o.TgZ(6,"div",4),o._UZ(7,"entries-sort-button",5),o._UZ(8,"span",6),o.YNc(9,xa,4,4,"ng-container",7),o.ALo(10,"async"),o.YNc(11,ya,3,3,"button",8),o.Hsn(12),o.qZA(),o.qZA(),o._UZ(13,"ad-host",9),o.TgZ(14,"div",10,11),o.NdJ("click",function(e){return t.onClick(e)}),o.YNc(16,Aa,6,5,"ng-container",7),o.ALo(17,"async"),o.qZA(),o._UZ(18,"loading-indicator",12),o.ALo(19,"async")),2&e&&(o.xp6(3),o.Q6J("ngIf",t.isSubFolder()),o.xp6(1),o.Q6J("ngForOf",o.lcZ(5,7,t.breadcrumb$)),o.xp6(3),o.Q6J("formControl",t.sortFormControl),o.xp6(2),o.Q6J("ngIf",o.lcZ(10,9,t.viewMode$)),o.xp6(2),o.Q6J("ngIf",t.data.link.allow_download),o.xp6(5),o.Q6J("ngIf",o.lcZ(17,11,t.pagination$)),o.xp6(2),o.Q6J("isVisible",o.lcZ(19,13,t.loading$)))},directives:[yn.e,n.O5,n.sg,Er,kt.JJ,kt.oH,lr.i,ui.Q,Tt.lW,We.Hw,Ms.gM,Wr,no,fa.U,It.P],pipes:[n.Ov,$t.R],styles:["folder-preview{display:block;max-height:100vh;overflow:auto}folder-preview .files-container{max-width:1280px;margin-left:auto;margin-right:auto;padding:10px 20px}folder-preview .folder-preview-vert-host{margin:30px 0}folder-preview material-navbar:not(.transparent){background-color:var(--be-accent-default)}folder-preview material-navbar:not(.transparent) .mat-raised-button.mat-accent{background-color:#fff;color:var(--be-text)}folder-preview .toolbar{display:flex;padding:15px;margin-bottom:15px;border-bottom:1px solid var(--be-divider-default);color:var(--be-text)}@media only screen and (max-width:768px){folder-preview .toolbar{display:block}folder-preview .toolbar .breadcrumb{margin-bottom:10px}}folder-preview .toolbar .action-icon{color:var(--be-secondary-text)}folder-preview .toolbar .breadcrumb{flex:1 1 auto}folder-preview .toolbar .actions{margin-left:auto}folder-preview .toolbar .action-separator{display:inline-block;vertical-align:middle;background-color:var(--be-divider-default);width:1px;height:40px;margin:0 12px}folder-preview .drive-entry{cursor:pointer;transition-property:all}folder-preview .drive-entry:hover{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)}folder-preview .breadcrumb{display:flex;align-items:center;max-width:100%;overflow:hidden}folder-preview .breadcrumb .breadcrumb-item{font-size:1.8rem;color:var(--be-text);border-radius:4px;padding:4px 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}folder-preview .breadcrumb .breadcrumb-item:hover{background-color:var(--be-hover)}folder-preview .breadcrumb .breadcrumb-item:first-of-type{text-transform:capitalize}folder-preview .breadcrumb .breadcrumb-item .mat-icon{vertical-align:middle;color:var(--be-secondary-text);margin-left:-5px}folder-preview .breadcrumb .separator{color:var(--be-secondary-text)}folder-preview no-results-message{margin-top:40px}@media only screen and (max-width:450px){folder-preview entries-sort-button .label{display:none}}"],encapsulation:2,changeDetection:0}),(0,r.gn)([(0,a.Ph)(Ve.viewMode)],Za.prototype,"viewMode$",void 0);const Pa=function(e){return[e]};function Fa(e,t){if(1&e&&(o.ynx(0),o.TgZ(1,"file-preview-toolbar",7),o.YNc(2,Ta,2,0,"a",8),o.YNc(3,Ea,2,0,"button",9),o.ALo(4,"async"),o.qZA(),o._UZ(5,"ad-host",10),o._UZ(6,"preview-container",11),o.BQk()),2&e){const e=o.oxw(2).ngIf,t=o.oxw();o.xp6(1),o.Q6J("showLogo",!0)("disableDownload",!e.link.allow_download),o.xp6(1),o.Q6J("ngIf",!t.currentUser.isLoggedIn()),o.xp6(1),o.Q6J("ngIf",!o.lcZ(4,7,t.entryAlreadyImported$)&&t.currentUser.isLoggedIn()),o.xp6(3),o.ekj("has-rek",t.settings.has("ads.file-preview")&&!t.currentUser.isSubscribed()),o.Q6J("files",o.VKq(9,Pa,e.link.entry))}}function Ma(e,t){if(1&e&&(o.YNc(0,Ia,4,5,"ng-container",0),o.YNc(1,Fa,7,11,"ng-container",0)),2&e){const e=o.oxw().ngIf;o.Q6J("ngIf","folder"===e.link.entry.type),o.xp6(1),o.Q6J("ngIf","folder"!==e.link.entry.type)}}function Ua(e,t){if(1&e&&(o.ynx(0),o.YNc(1,Oa,1,1,"link-preview-password-panel",1),o.ALo(2,"async"),o.YNc(3,Ma,2,2,"ng-template",null,2,o.W1O),o.BQk()),2&e){const e=o.MAs(4),t=o.oxw();o.xp6(1),o.Q6J("ngIf",o.lcZ(2,2,t.passwordPanelVisible$))("ngIfElse",e)}}let Da=(()=>{class e{constructor(e,t,i,n,s,r,o,a,c,l){this.store=e,this.route=t,this.links=i,this.previewFiles=n,this.settings=s,this.currentUser=r,this.router=o,this.toast=a,this.el=c,this.localStorage=l,this.data$=new ot.X(null),this.passwordPanelVisible$=new ot.X(!1)}get entryAlreadyImported$(){const e=this.currentUser.get("id");return this.data$.pipe((0,Ct.U)(e=>e.link),(0,st.h)(e=>!!e&&!!e.entry&&!!e.entry.users),(0,Ct.U)(e=>e.entry),(0,Ct.U)(t=>!!t.users.find(t=>t.id===e)))}ngOnInit(){this.bindToDownload(),this.disableContextMenu(),this.setViewMode(),this.route.params.subscribe(e=>{this.links.findByHash(e.hash,{withEntries:!0}).subscribe(e=>{const t=e.link.id!==(this.data$.value&&this.data$.value.link.id);this.data$.next(e),this.setBackgroundClass(e.link),!e.link.password||!t&&this.password?(this.togglePasswordPanel(!1),this.showPreview()):this.togglePasswordPanel(!0)},()=>{this.router.navigate(["/404"])})})}ngOnDestroy(){this.downloadSub.unsubscribe()}import(){this.links.importEntry(this.data$.value.link.id,this.password).subscribe(e=>{const t=this.data$.value.link;t.entry.users=e.users,this.data$.next(Object.assign(Object.assign({},this.data$.value),{link:t})),this.toast.open({message:'":name" imported into your drive.',replacements:{name:t.entry.name}})})}togglePasswordPanel(e){this.passwordPanelVisible$.next(e)}bindToDownload(){this.downloadSub=this.previewFiles.download.subscribe(()=>{const e=this.data$.value.link;this.store.dispatch(new F([e.entry],e,this.password))})}showPreview(){const e=this.data$.value;e.link.entry.url+=`?shareable_link=${e.link.id}`,this.password&&(e.link.entry.url+=`&password=${this.password}`),this.data$.next(Object.assign({},e))}setValidPassword(e){this.password=e,this.showPreview(),this.togglePasswordPanel(!1)}setBackgroundClass(e){this.el.nativeElement.classList.add("folder"===e.entry.type?"folder-link":"file-link")}disableContextMenu(){(0,tn.R)(this.el.nativeElement,"contextmenu").subscribe(e=>{e.preventDefault()})}setViewMode(){this.store.dispatch(new A(this.localStorage.get("bedrive.viewMode",this.settings.get("drive.default_view","grid"))))}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(a.yh),o.Y36(s.gz),o.Y36(Gt),o.Y36(Ho),o.Y36(Ot.Z),o.Y36(Fe.I),o.Y36(s.F0),o.Y36(ze.F),o.Y36(o.SBq),o.Y36(qe.m))},e.\u0275cmp=o.Xpm({type:e,selectors:[["link-preview-container"]],features:[o._Bn([Ho])],decls:2,vars:3,consts:[[4,"ngIf"],[3,"link","passwordValid",4,"ngIf","ngIfElse"],["filePreview",""],[3,"link","passwordValid"],[3,"data","password"],[1,"action-separator"],["mat-flat-button","","color","accent","trans","",3,"click"],[3,"showLogo","disableDownload"],["mat-flat-button","","color","accent","routerLink","/login","trans","",4,"ngIf"],["mat-flat-button","","color","accent","trans","",3,"click",4,"ngIf"],["slot","ads.file-preview",1,"file-preview-vert-host"],[3,"files"],["mat-flat-button","","color","accent","routerLink","/login","trans",""]],template:function(e,t){1&e&&(o.YNc(0,Ua,5,4,"ng-container",0),o.ALo(1,"async")),2&e&&o.Q6J("ngIf",o.lcZ(1,1,t.data$))},directives:[n.O5,Wo,Za,Tt.lW,It.P,oa,lr.i,la,Tt.zs,s.yS],pipes:[n.Ov],styles:["link-preview-container{display:block;width:100%;height:100%;position:relative;overflow:hidden}link-preview-container.folder-link{background-color:var(--be-background)}link-preview-container.file-link{background-color:rgba(0,0,0,.9)}link-preview-container preview-container{margin:60px 0;min-height:calc(100% - 120px)}link-preview-container .file-preview-vert-host{margin-top:80px}"],encapsulation:2,changeDetection:0}),e})();var La=i(42690),qa=i(20765);const Na=[{path:"s/:hash",component:Da},{path:"",component:zr,canActivate:[La.a,qa.d],children:[{path:"",component:Ao},{path:"shares",component:Ao},{path:"search",component:Ao},{path:"recent",component:Ao},{path:"starred",component:Ao},{path:"trash",component:Ao},{path:"folders/:hash",component:Ao},{path:"workspaces",loadChildren:()=>i.e(752).then(i.bind(i,72752)).then(e=>e.WorkspaceWrapperModule)}]}];let $a=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({imports:[[n.ez,s.Bz.forChild(Na)],s.Bz]}),e})();function Ba(e,t){if(1&e&&(o.O4$(),o._UZ(0,"circle",3)),2&e){const e=o.oxw();o.Udp("animation-name","mat-progress-spinner-stroke-rotate-"+e._spinnerAnimationLabel)("stroke-dashoffset",e._getStrokeDashOffset(),"px")("stroke-dasharray",e._getStrokeCircumference(),"px")("stroke-width",e._getCircleStrokeWidth(),"%"),o.uIk("r",e._getCircleRadius())}}function Ya(e,t){if(1&e&&(o.O4$(),o._UZ(0,"circle",3)),2&e){const e=o.oxw();o.Udp("stroke-dashoffset",e._getStrokeDashOffset(),"px")("stroke-dasharray",e._getStrokeCircumference(),"px")("stroke-width",e._getCircleStrokeWidth(),"%"),o.uIk("r",e._getCircleRadius())}}function Ra(e,t){if(1&e&&(o.O4$(),o._UZ(0,"circle",3)),2&e){const e=o.oxw();o.Udp("animation-name","mat-progress-spinner-stroke-rotate-"+e._spinnerAnimationLabel)("stroke-dashoffset",e._getStrokeDashOffset(),"px")("stroke-dasharray",e._getStrokeCircumference(),"px")("stroke-width",e._getCircleStrokeWidth(),"%"),o.uIk("r",e._getCircleRadius())}}function Qa(e,t){if(1&e&&(o.O4$(),o._UZ(0,"circle",3)),2&e){const e=o.oxw();o.Udp("stroke-dashoffset",e._getStrokeDashOffset(),"px")("stroke-dasharray",e._getStrokeCircumference(),"px")("stroke-width",e._getCircleStrokeWidth(),"%"),o.uIk("r",e._getCircleRadius())}}const ja=".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:currentColor;stroke:CanvasText}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] svg{animation:mat-progress-spinner-stroke-rotate-fallback 10000ms cubic-bezier(0.87, 0.03, 0.33, 1) infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0deg)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}\n";class Ja{constructor(e){this._elementRef=e}}const za=(0,Ui.pj)(Ja,"primary"),Va=new o.OlP("mat-progress-spinner-default-options",{providedIn:"root",factory:function(){return{diameter:100}}});class Ha extends za{constructor(e,t,i,n,s){super(e),this._elementRef=e,this._document=i,this._diameter=100,this._value=0,this._fallbackAnimation=!1,this.mode="determinate";const r=Ha._diameters;this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),r.has(i.head)||r.set(i.head,new Set([100])),this._fallbackAnimation=t.EDGE||t.TRIDENT,this._noopAnimations="NoopAnimations"===n&&!!s&&!s._forceAnimations,s&&(s.diameter&&(this.diameter=s.diameter),s.strokeWidth&&(this.strokeWidth=s.strokeWidth))}get diameter(){return this._diameter}set diameter(e){this._diameter=(0,yi.su)(e),this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),!this._fallbackAnimation&&this._styleRoot&&this._attachStyleNode()}get strokeWidth(){return this._strokeWidth||this.diameter/10}set strokeWidth(e){this._strokeWidth=(0,yi.su)(e)}get value(){return"determinate"===this.mode?this._value:0}set value(e){this._value=Math.max(0,Math.min(100,(0,yi.su)(e)))}ngOnInit(){const e=this._elementRef.nativeElement;this._styleRoot=(0,Pn.kV)(e)||this._document.head,this._attachStyleNode(),e.classList.add(`mat-progress-spinner-indeterminate${this._fallbackAnimation?"-fallback":""}-animation`)}_getCircleRadius(){return(this.diameter-10)/2}_getViewBox(){const e=2*this._getCircleRadius()+this.strokeWidth;return`0 0 ${e} ${e}`}_getStrokeCircumference(){return 2*Math.PI*this._getCircleRadius()}_getStrokeDashOffset(){return"determinate"===this.mode?this._getStrokeCircumference()*(100-this._value)/100:this._fallbackAnimation&&"indeterminate"===this.mode?.2*this._getStrokeCircumference():null}_getCircleStrokeWidth(){return this.strokeWidth/this.diameter*100}_attachStyleNode(){const e=this._styleRoot,t=this._diameter,i=Ha._diameters;let n=i.get(e);if(!n||!n.has(t)){const s=this._document.createElement("style");s.setAttribute("mat-spinner-animation",this._spinnerAnimationLabel),s.textContent=this._getAnimationText(),e.appendChild(s),n||(n=new Set,i.set(e,n)),n.add(t)}}_getAnimationText(){const e=this._getStrokeCircumference();return"\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n".replace(/START_VALUE/g,""+.95*e).replace(/END_VALUE/g,""+.2*e).replace(/DIAMETER/g,`${this._spinnerAnimationLabel}`)}_getSpinnerAnimationLabel(){return this.diameter.toString().replace(".","_")}}Ha.\u0275fac=function(e){return new(e||Ha)(o.Y36(o.SBq),o.Y36(Pn.t4),o.Y36(n.K0,8),o.Y36(Nn.Qb,8),o.Y36(Va))},Ha.\u0275cmp=o.Xpm({type:Ha,selectors:[["mat-progress-spinner"]],hostAttrs:["role","progressbar","tabindex","-1",1,"mat-progress-spinner"],hostVars:10,hostBindings:function(e,t){2&e&&(o.uIk("aria-valuemin","determinate"===t.mode?0:null)("aria-valuemax","determinate"===t.mode?100:null)("aria-valuenow","determinate"===t.mode?t.value:null)("mode",t.mode),o.Udp("width",t.diameter,"px")("height",t.diameter,"px"),o.ekj("_mat-animation-noopable",t._noopAnimations))},inputs:{color:"color",mode:"mode",diameter:"diameter",strokeWidth:"strokeWidth",value:"value"},exportAs:["matProgressSpinner"],features:[o.qOj],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false","aria-hidden","true",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(e,t){1&e&&(o.O4$(),o.TgZ(0,"svg",0),o.YNc(1,Ba,1,9,"circle",1),o.YNc(2,Ya,1,7,"circle",2),o.qZA()),2&e&&(o.Udp("width",t.diameter,"px")("height",t.diameter,"px"),o.Q6J("ngSwitch","indeterminate"===t.mode),o.uIk("viewBox",t._getViewBox()),o.xp6(1),o.Q6J("ngSwitchCase",!0),o.xp6(1),o.Q6J("ngSwitchCase",!1))},directives:[n.RF,n.n9],styles:[ja],encapsulation:2,changeDetection:0}),Ha._diameters=new WeakMap;let Ga=(()=>{class e extends Ha{constructor(e,t,i,n,s){super(e,t,i,n,s),this.mode="indeterminate"}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(o.SBq),o.Y36(Pn.t4),o.Y36(n.K0,8),o.Y36(Nn.Qb,8),o.Y36(Va))},e.\u0275cmp=o.Xpm({type:e,selectors:[["mat-spinner"]],hostAttrs:["role","progressbar","mode","indeterminate",1,"mat-spinner","mat-progress-spinner"],hostVars:6,hostBindings:function(e,t){2&e&&(o.Udp("width",t.diameter,"px")("height",t.diameter,"px"),o.ekj("_mat-animation-noopable",t._noopAnimations))},inputs:{color:"color"},features:[o.qOj],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false","aria-hidden","true",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(e,t){1&e&&(o.O4$(),o.TgZ(0,"svg",0),o.YNc(1,Ra,1,9,"circle",1),o.YNc(2,Qa,1,7,"circle",2),o.qZA()),2&e&&(o.Udp("width",t.diameter,"px")("height",t.diameter,"px"),o.Q6J("ngSwitch","indeterminate"===t.mode),o.uIk("viewBox",t._getViewBox()),o.xp6(1),o.Q6J("ngSwitchCase",!0),o.xp6(1),o.Q6J("ngSwitchCase",!1))},directives:[n.RF,n.n9],styles:[ja],encapsulation:2,changeDetection:0}),e})(),Wa=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({imports:[[Ui.BQ,n.ez],Ui.BQ]}),e})();var Xa=i(65939);const Ka={entry:br};let ec=(()=>{class e{constructor(e,t,i){this.store=e,this.actions$=t,this.overlay=i,this.actions$.pipe((0,a.nW)(P)).subscribe(e=>{this.overlayRef&&(this.overlayRef.close(),this.overlayRef=null);const t=this.store.selectSnapshot(Ve.entries).filter(e=>"folder"!==e.type),i=this.store.selectSnapshot(Ve.selectedEntry),n=t.findIndex(e=>e.id===(null==i?void 0:i.id));this.overlayRef=this.overlay.open(ha,{position:"center",origin:"global",panelClass:"file-preview-overlay-container",data:{entries:t.slice(),activeEntry:-1===n?0:n}})})}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(a.yh),o.LFG(a.eX),o.LFG(ga.T))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac}),e})();var tc=i(63412);let ic=(()=>{class e{constructor(e,t,i){this.actions$=e,this.store=t,this.settings=i,this.actions$.pipe((0,a.nW)(F)).subscribe(e=>{(0,tc.k)(this.getDownloadUrl(e))})}getDownloadUrl(e){const t=this.getEntryHashes(e.entries);let i=`${this.settings.getBaseUrl()}/secure/uploads/download?hashes=${t}`;return e.link&&(i+=`&shareable_link=${e.link.id}`),e.password&&(i+=`&password=${e.password}`),i}getEntryHashes(e){return e||(e=this.store.selectSnapshot(Ve.selectedEntries)),e.map(e=>e.hash).join(",")}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(a.eX),o.LFG(a.yh),o.LFG(Ot.Z))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac}),e})();var nc=i(77001);let sc=(()=>{class e{constructor(e){this.data=e}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(nc.qD))},e.\u0275cmp=o.Xpm({type:e,selectors:[["loading-toast"]],decls:3,vars:2,consts:[[3,"diameter"],["trans",""]],template:function(e,t){1&e&&(o._UZ(0,"mat-spinner",0),o.TgZ(1,"span",1),o._uU(2),o.qZA()),2&e&&(o.Q6J("diameter",30),o.xp6(2),o.Oqu(t.data.message))},directives:[Ga,It.P],styles:["loading-toast{display:flex;align-items:center}loading-toast .mat-spinner{margin-right:20px}loading-toast .mat-spinner circle{stroke:var(--be-accent-contrast)}"],encapsulation:2,changeDetection:0}),e})(),rc=(()=>{class e{constructor(e,t,i,n){this.actions$=e,this.toast=t,this.store=i,this.router=n,this.entriesDeleted(),this.entriesStarred(),this.entriesUnstarred(),this.entriesMoveFailed(),this.folderCreated(),this.entriesMoved(),this.entriesDeletedForever(),this.entriesRestoredFromTrash(),this.entryRenamed(),this.linkCopiedToClipboard(),this.notEnoughSpace(),this.loadingToast()}entriesDeleted(){this.actions$.pipe((0,a.Lt)(he)).subscribe(e=>{this.toast.open({message:"Deleted :count items.",replacements:{count:e.deletedFiles.length}},{action:"UNDO"}).onAction().subscribe(()=>{this.store.dispatch(new I(e.deletedFiles))})})}entriesStarred(){this.actions$.pipe((0,a.nW)(M)).subscribe(e=>{this.toast.open("Star added.",{action:"UNDO"}).onAction().subscribe(()=>{this.store.dispatch(new U(e.entries))})})}entriesUnstarred(){this.actions$.pipe((0,a.nW)(U)).subscribe(e=>{this.toast.open("Star Removed.",{action:"UNDO"}).onAction().subscribe(()=>{this.store.dispatch(new M(e.entries))})})}entriesMoved(){this.actions$.pipe((0,a.Lt)(we)).subscribe(e=>{this.toast.open({message:"Moved :count items.",replacements:{count:e.entries.length}})})}entriesMoveFailed(){this.actions$.pipe((0,a.Lt)(xe)).subscribe(()=>{this.toast.open("There was an issue with moving selected items.")})}folderCreated(){this.actions$.pipe((0,a.Lt)(fe)).subscribe(()=>{this.toast.open("Folder created.")})}entriesDeletedForever(){this.actions$.pipe((0,a.nW)(ye)).subscribe(e=>{this.toast.open({message:"Permanently deleted :count items.",replacements:{count:e.entries.length}})})}entriesRestoredFromTrash(){this.actions$.pipe((0,a.nW)(_e)).subscribe(e=>{this.toast.open({message:"Restored :count items.",replacements:{count:e.entries.length}})})}entryRenamed(){this.actions$.pipe((0,a.nW)(me)).subscribe(e=>{this.toast.open({message:":oldName renamed to :newName",replacements:{oldName:e.entry.name,newName:e.newName}})})}linkCopiedToClipboard(){this.actions$.pipe((0,a.nW)(ii)).subscribe(()=>{this.toast.open("Link copied to clipboard.")})}notEnoughSpace(){this.actions$.pipe((0,a.nW)(ke)).subscribe(()=>{this.toast.open("You are out of space. Try to delete some files.",{action:"Upgrade"}).onAction().subscribe(()=>{this.router.navigate(["/billing/upgrade"])})})}loadingToast(){let e;this.actions$.pipe((0,a.nW)(B)).subscribe(t=>{e=this.toast.openComponent(sc,{duration:0,data:{message:t.message}})}),this.actions$.pipe((0,a.nW)(Y)).subscribe(()=>{e&&(e.dismiss(),e=null)})}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(a.eX),o.LFG(ze.F),o.LFG(a.yh),o.LFG(s.F0))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac}),e})();var oc=i(39426),ac=i(61927);function cc(e,t){if(1&e&&(o.TgZ(0,"div",9),o._uU(1),o.TgZ(2,"span",10),o._uU(3,"left"),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.xp6(1),o.hij(" ",e.progress.eta," ")}}function lc(e,t){1&e&&(o._UZ(0,"mat-icon",11),o.ALo(1,"trans")),2&e&&o.Q6J("matTooltip",o.lcZ(1,1,t.ngIf))}function dc(e,t){1&e&&o._UZ(0,"mat-icon",14)}function pc(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"span",15),o.NdJ("click",function(){o.CHM(e);const t=o.oxw(2);return t.cancelUpload(t.upload)}),o._uU(1,"Cancel"),o.qZA()}}function uc(e,t){if(1&e&&(o.YNc(0,dc,1,0,"mat-icon",12),o.YNc(1,pc,2,0,"span",13)),2&e){const e=o.oxw();o.Q6J("ngIf",e.upload.completed),o.xp6(1),o.Q6J("ngIf",!e.upload.completed)}}let hc=(()=>{class e{constructor(e,t,i){this.uploadQueue=e,this.store=t,this.cd=i,this.progress={}}ngOnInit(){this.subscription=this.upload.progress$.pipe((0,oc.p)(260,ac.Z,{leading:!0,trailing:!0})).subscribe(e=>{this.progress=e,this.cd.detectChanges()})}ngOnDestroy(){this.subscription.unsubscribe()}cancelUpload(e){this.uploadQueue.remove(e.id),this.uploadQueue.isEmpty()&&this.store.dispatch(new x)}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(Le.A),o.Y36(a.yh),o.Y36(o.sBO))},e.\u0275cmp=o.Xpm({type:e,selectors:[["uploads-panel-item"]],inputs:{upload:"upload"},decls:12,vars:9,consts:[[3,"mime"],[1,"content"],[1,"meta"],[1,"name",3,"matTooltip"],["class","time-left",4,"ngIf"],[1,"actions"],["svgIcon","error","class","error-icon","matTooltipPosition","left",3,"matTooltip",4,"ngIf","ngIfElse"],["noError",""],["mode","determinate","color","accent",3,"value"],[1,"time-left"],["trans",""],["svgIcon","error","matTooltipPosition","left",1,"error-icon",3,"matTooltip"],["svgIcon","check-circle","class","completed-icon",4,"ngIf"],["class","cancel-button","trans","",3,"click",4,"ngIf"],["svgIcon","check-circle",1,"completed-icon"],["trans","",1,"cancel-button",3,"click"]],template:function(e,t){if(1&e&&(o._UZ(0,"file-icon",0),o.TgZ(1,"div",1),o.TgZ(2,"div",2),o.TgZ(3,"div",3),o._uU(4),o.qZA(),o.YNc(5,cc,4,1,"div",4),o.TgZ(6,"div",5),o.YNc(7,lc,2,3,"mat-icon",6),o.ALo(8,"async"),o.YNc(9,uc,2,2,"ng-template",null,7,o.W1O),o.qZA(),o.qZA(),o._UZ(11,"mat-progress-bar",8),o.qZA()),2&e){const e=o.MAs(10);o.Q6J("mime",t.upload.uploadedFile.mime),o.xp6(3),o.Q6J("matTooltip",t.upload.uploadedFile.name),o.xp6(1),o.Oqu(t.upload.uploadedFile.name),o.xp6(1),o.Q6J("ngIf",t.progress.percentage&&t.progress.percentage<100&&!t.upload.error$.value),o.xp6(2),o.Q6J("ngIf",o.lcZ(8,7,t.upload.error$))("ngIfElse",e),o.xp6(4),o.Q6J("value",t.progress.percentage)}},directives:[Xe,Ms.gM,n.O5,us.pW,It.P,We.Hw],pipes:[n.Ov,$t.R],styles:["uploads-panel-item{display:flex;align-items:center;padding:15px;border-bottom:1px solid var(--be-divider-default)}uploads-panel-item file-icon{width:35px;height:35px;flex:0 0 35px;margin-right:10px}uploads-panel-item .content{flex:1 1 auto;margin-bottom:5px;min-width:0}uploads-panel-item .content .meta{display:flex;align-items:center;padding-bottom:4px}uploads-panel-item .name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}uploads-panel-item .time-left{color:var(--be-secondary-text);font-size:1.3rem;padding-left:15px;white-space:nowrap}uploads-panel-item .actions{margin-left:auto;padding-left:20px}uploads-panel-item .actions .mat-icon{vertical-align:middle;width:22px;height:22px;margin-bottom:4px}uploads-panel-item .completed-icon{color:var(--be-accent-default)}uploads-panel-item .error-icon{color:#f44336}uploads-panel-item .cancel-button{color:var(--be-link);cursor:pointer;font-size:1.2rem;text-transform:uppercase;line-height:22px}uploads-panel-item .cancel-button:hover{text-decoration:underline}uploads-panel-item .mat-progress-bar{height:3px;border-radius:3px}uploads-panel-item .mat-progress-bar .mat-progress-bar-buffer{background-color:var(--be-hover)}uploads-panel-item .mat-progress-bar .mat-progress-bar-fill:after{background-color:var(--be-accent-default)}"],encapsulation:2,changeDetection:0}),e})();function gc(e,t){if(1&e&&(o.ynx(0),o._uU(1),o.ALo(2,"trans"),o.ALo(3,"trans"),o.BQk()),2&e){const e=o.oxw().ngIf;o.xp6(1),o.lnq(" ",o.lcZ(2,3,"Uploading")," ",e.pending," ",o.lcZ(3,5,e.pending>1?"Items":"Item")," ")}}function fc(e,t){if(1&e&&(o.ynx(0),o._uU(1),o.ALo(2,"trans"),o.BQk()),2&e){const e=o.oxw().ngIf;o.xp6(1),o.AsE(" ",e.completed," ",o.lcZ(2,2,"items uploaded")," ")}}function mc(e,t){if(1&e&&(o.ynx(0),o.YNc(1,gc,4,7,"ng-container",2),o.YNc(2,fc,3,4,"ng-container",2),o.BQk()),2&e){const e=t.ngIf;o.xp6(1),o.Q6J("ngIf",e.pending>0),o.xp6(1),o.Q6J("ngIf",0===e.pending)}}function vc(e,t){1&e&&o._UZ(0,"mat-icon",10)}function bc(e,t){1&e&&o._UZ(0,"mat-icon",11)}function wc(e,t){1&e&&o._UZ(0,"uploads-panel-item",12),2&e&&o.Q6J("upload",t.$implicit)}let xc=(()=>{class e{constructor(e,t){this.store=e,this.activeUploads=t,this.minimized$=new ot.X(!1)}ngOnDestroy(){this.activeUploads.reset()}toggleMinimized(){this.minimized$.next(!this.minimized$.value)}close(){this.store.dispatch(new x)}trackById(e,t){return t.id}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(a.yh),o.Y36(Le.A))},e.\u0275cmp=o.Xpm({type:e,selectors:[["uploads-panel"]],decls:16,vars:15,consts:[[1,"header"],[1,"info"],[4,"ngIf"],[1,"actions"],["mat-icon-button","",3,"click"],["svgIcon","keyboard-arrow-up","class","minimize-icon",4,"ngIf","ngIfElse"],["notMinimized",""],["svgIcon","close"],[1,"uploads-list"],[3,"upload",4,"ngFor","ngForOf","ngForTrackBy"],["svgIcon","keyboard-arrow-up",1,"minimize-icon"],["svgIcon","keyboard-arrow-down",1,"minimize-icon"],[3,"upload"]],template:function(e,t){if(1&e&&(o.TgZ(0,"div",0),o.TgZ(1,"div",1),o.YNc(2,mc,3,2,"ng-container",2),o.ALo(3,"async"),o.qZA(),o.TgZ(4,"div",3),o.TgZ(5,"button",4),o.NdJ("click",function(){return t.toggleMinimized()}),o.YNc(6,vc,1,0,"mat-icon",5),o.ALo(7,"async"),o.YNc(8,bc,1,0,"ng-template",null,6,o.W1O),o.qZA(),o.TgZ(10,"button",4),o.NdJ("click",function(){return t.close()}),o._UZ(11,"mat-icon",7),o.qZA(),o.qZA(),o.qZA(),o.TgZ(12,"div",8),o.ALo(13,"async"),o.YNc(14,wc,1,1,"uploads-panel-item",9),o.ALo(15,"async"),o.qZA()),2&e){const e=o.MAs(9);o.xp6(2),o.Q6J("ngIf",o.lcZ(3,7,t.activeUploads.count$)),o.xp6(4),o.Q6J("ngIf",o.lcZ(7,9,t.minimized$))("ngIfElse",e),o.xp6(6),o.ekj("hidden",o.lcZ(13,11,t.minimized$)),o.xp6(2),o.Q6J("ngForOf",o.lcZ(15,13,t.activeUploads.uploads$))("ngForTrackBy",t.trackById)}},directives:[n.O5,Tt.lW,We.Hw,n.sg,hc],pipes:[n.Ov,$t.R],styles:["uploads-panel{width:380px;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);background-color:var(--be-background);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}uploads-panel .header{display:flex;align-items:center;background-color:var(--be-accent-default);color:var(--be-accent-contrast);padding:8px}uploads-panel .header .info{padding-left:10px}uploads-panel .header .actions{margin-left:auto}uploads-panel .header .minimize-icon{width:30px;height:30px}uploads-panel .uploads-list{max-height:350px;overflow:auto}"],encapsulation:2,changeDetection:0}),e})();const yc={origin:"global",hasBackdrop:!1,position:{right:"10px",bottom:"10px"},mobilePosition:{left:0,bottom:0}};let _c=(()=>{class e{constructor(e,t,i){this.actions$=e,this.currentUser=t,this.overlayPanel=i,this.actions$.pipe((0,a.nW)(w)).subscribe(()=>{this.openUploadsPanel()}),this.actions$.pipe((0,a.nW)(x)).subscribe(()=>{this.closeUploadsPanel()}),this.currentUser.model$.subscribe(()=>{this.closeUploadsPanel()})}openUploadsPanel(){this.uploadPanelRef||(this.uploadPanelRef=this.overlayPanel.open(xc,yc))}closeUploadsPanel(){this.uploadPanelRef&&(this.uploadPanelRef.close(),this.uploadPanelRef=null)}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(a.eX),o.LFG(Fe.I),o.LFG(ga.T))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac}),e})(),kc=(()=>{class e{constructor(e,t,i){this.actions$=e,this.dialog=t,this.store=i,this.actions$.pipe((0,a.xt)(k)).subscribe(e=>{this.dialog.open(e.dialog,e.data,e.config)}),this.actions$.pipe((0,a.xt)(C)).subscribe(e=>{this.openConfirmDialog(e)})}openConfirmDialog(e){this.dialog.open(xs.z,e.data).beforeClosed().subscribe(t=>{if(t)return this.store.dispatch(e.confirmAction)})}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(a.eX),o.LFG(as.u),o.LFG(a.yh))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac}),e})();var Cc=i(45396),Ac=i(49866),Zc=i(43389),Oc=i(87738),Sc=i(85218);let Ic=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({providers:[as.u],imports:[[n.ez,kt.UX,Ac.N,Zc.p,Cc.rP,Xa.Nh,Zt.Is,Oc.G,We.Ps,Pt.Tx,Tt.ot,Ms.AV,ci.p9,Sc.a]]}),e})(),Tc=(()=>{class e{constructor(e,t){this.actions$=e,this.domCache=t,this.actions$.pipe((0,a.nW)(q)).subscribe(()=>{this.domCache.scrollCont.scrollTo({top:0})})}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(a.eX),o.LFG(wn))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac}),e})(),Ec=(()=>{class e{constructor(e){this.store=e,this.store.select(Ve.activePage).pipe((0,st.h)(e=>!!e)).subscribe(()=>{this.store.dispatch(new v)})}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(a.yh))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac}),e})(),Pc=(()=>{class e{constructor(e,t,i){this.store=e,this.actions$=t,this.currentUser=i,this.actions$.pipe((0,a.nW)(Zn.w8),(0,st.h)(e=>e.event.urlAfterRedirects.indexOf("drive")>-1),(0,st.h)(()=>this.currentUser.isLoggedIn())).subscribe(()=>{const e=this.getPageLoadAction();e&&this.store.dispatch(e)})}getPageLoadAction(){const e=this.getPageUriParams();switch(e.pageName){case"recent":return new ie;case"trash":return new re;case"shares":return new se;case"starred":return new ce;case"search":const t=this.store.selectSnapshot(Zn.uu.state).root.firstChild.queryParams;return new ae({filters:t.filters,query:t.query});case"workspaces":return new oe;case"s":return null;default:return new ne(e.folderHash)}}getPageUriParams(){const e=this.store.selectSnapshot(Zn.uu.url).split("?")[0],[,t,i]=e.split("/").filter(e=>!!e);return{pageName:t,folderHash:i}}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(a.yh),o.LFG(a.eX),o.LFG(Fe.I))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac}),e})(),Fc=(()=>{class e{constructor(e,t){this.actions$=e,this.store=t,this.actions$.pipe((0,a.nW)(U)).pipe((0,st.h)(()=>"starred"===this.store.selectSnapshot(Ve.activePage).name)).subscribe(e=>{this.store.dispatch(new D(e.entries))})}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(a.eX),o.LFG(a.yh))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac}),e})();var Mc=i(18295),Uc=i(98097),Dc=i(95217);let Lc=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({imports:[[n.ez]]}),e})();var qc=i(93410);let Nc=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({providers:[ga.T,Ho,{provide:zo,useClass:Vo}],imports:[[n.ez,Ac.N,Hi.eL,Tt.ot,Zc.p]]}),e})();var $c=i(66705);let Bc=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({imports:[[n.ez,Ac.N,Pt.Tx,Tt.ot,We.Ps]]}),e})();var Yc=i(87446),Rc=i(12414),Qc=i(58193),jc=i(6253);const Jc=[ec,ic,rc,_c,kc,Tc,Ec,Pc,Fc];let zc=(()=>{class e{constructor(e){this.injector=e,Jc.forEach(e=>this.injector.get(e))}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(o.zs3))},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({providers:[ga.T,Ho,ze.F,...Jc,{provide:Vi,useValue:Ka,multi:!0},{provide:Ie,deps:[Ot.Z],useFactory:e=>{const t={multiple:!0},i=e.getJson("drive.validation.allowed_extensions");return i&&(t.extensions=i.map(e=>"."+e)),t}},{provide:Rc.F,useValue:{description:"Workspaces are shared spaces where teams can store, share and collaborate on files and folders."}}],imports:[[n.ez,$c.z,$a,Nc,kt.u5,Ic,Mc.l,Ac.N,Uc.X,kt.UX,Dc.u,Zc.p,Lc,qc.v,Bc,Yc.m,Qc.x,jc.B,Sc.a,os,Qi,Tt.ot,Zt.Is,us.Cv,We.Ps,Ms.AV,Xa.Nh,Wa,Pt.Tx,a.$l.forFeature([Ve,_t,ri])]]}),e})();o.B6R(br,[Nr],[])},79893:function(e,t,i){"use strict";i.d(t,{M:function(){return o},b:function(){return a}});var n=i(83644),s=i(45418),r=i(35866);const o=new n.XQ({type:n.Bq.Select,key:"type",description:"Type of the file",defaultValue:"text",options:[{key:"Text",value:"text"},{key:"Audio",value:"audio"},{key:"Video",value:"video"},{key:"Image",value:"image"},{key:"PDF",value:"pdf"},{key:"Spreadsheet",value:"spreadsheet"},{key:"Word Document",value:"word"},{key:"Photoshop",value:"photoshop"},{key:"Archive",value:"archive"},{key:"Folder",value:"folder"}]}),a=[o,new n.XQ({type:n.Bq.Select,key:"public",label:"status",defaultValue:!1,description:"Whether file is publicly accessible",options:[{key:"Private",value:!1},{key:"Public",value:!0}]}),new s.T7({description:"Date file was uploaded"}),new s.yH({description:"Date file was last changed"}),new n.XQ({type:n.Bq.SelectModel,key:"owner_id",label:"Uploader",description:"User that this file was uploaded by",component:r.y})]},35866:function(e,t,i){"use strict";i.d(t,{y:function(){return b}});var n=i(3679),s=i(54395),r=i(87519),o=i(43190),a=i(5304),c=i(26215),l=i(25917),d=i(37716),p=i(22238),u=i(73429),h=i(15515),g=i(76627),f=i(20616),m=i(38583);function v(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"div",9),d.NdJ("click",function(){const t=d.CHM(e).$implicit;return d.oxw().close(t)}),d._UZ(1,"img",10),d.TgZ(2,"div",11),d.TgZ(3,"div",12),d._uU(4),d.qZA(),d.TgZ(5,"div",13),d._uU(6),d.qZA(),d.qZA(),d.qZA()}if(2&e){const e=t.$implicit;d.xp6(1),d.Q6J("src",e.avatar,d.LSH),d.xp6(3),d.Oqu(e.display_name),d.xp6(2),d.Oqu(e.email)}}let b=(()=>{class e{constructor(e,t){this.dialogRef=e,this.users=t,this.searchFormControl=new n.NI,this.loading$=new c.X(!1),this.users$=new c.X([])}ngOnInit(){this.searchFormControl.valueChanges.pipe((0,s.b)(250),(0,r.x)(),(0,o.w)(e=>this.searchUsers(e)),(0,a.K)(()=>(0,l.of)([]))).subscribe(e=>{this.users$.next(e),this.loading$.next(!1)})}close(e){this.dialogRef.close(this.normalizeUser(e))}searchUsers(e){return this.loading$.next(!0),e?this.users.getAll({query:e}):(0,l.of)([])}normalizeUser(e){return e?{id:e.id,name:e.display_name,image:e.avatar,model_type:e.model_type}:null}}return e.\u0275fac=function(t){return new(t||e)(d.Y36(p.so),d.Y36(u.Q))},e.\u0275cmp=d.Xpm({type:e,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(e,t){1&e&&(d.TgZ(0,"div",0),d.TgZ(1,"h2",1),d._uU(2,"Find User"),d.qZA(),d.TgZ(3,"button",2),d.NdJ("click",function(){return t.close()}),d._UZ(4,"mat-icon",3),d.qZA(),d.qZA(),d.TgZ(5,"mat-dialog-content"),d.TgZ(6,"div",4),d._UZ(7,"input",5),d._UZ(8,"loading-indicator",6),d.ALo(9,"async"),d.qZA(),d.TgZ(10,"div",7),d.YNc(11,v,7,3,"div",8),d.ALo(12,"async"),d.qZA(),d.qZA()),2&e&&(d.xp6(7),d.Q6J("formControl",t.searchFormControl),d.xp6(1),d.Q6J("isVisible",d.lcZ(9,3,t.loading$)),d.xp6(3),d.Q6J("ngForOf",d.lcZ(12,5,t.users$)))},directives:[p.uh,h.P,g.Hw,p.xY,n.Fj,n.JJ,n.oH,f.Q,m.sg],pipes:[m.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}),e})()},63868:function(e,t,i){"use strict";i.d(t,{C:function(){return o}});var n=(()=>(function(e){e[e.ENTER=13]="ENTER",e[e.SPACE=32]="SPACE",e[e.ESCAPE=27]="ESCAPE",e[e.DELETE=46]="DELETE",e[e.ARROW_UP=38]="ARROW_UP",e[e.ARROW_RIGHT=39]="ARROW_RIGHT",e[e.ARROW_DOWN=40]="ARROW_DOWN",e[e.ARROW_LEFT=37]="ARROW_LEFT",e[e.BACKSPACE=8]="BACKSPACE",e[e.TAB=9]="TAB",e[e.S=83]="S",e[e.N=78]="N",e[e.A=65]="A",e[e.T=84]="T",e[e.B=66]="B",e[e.C=67]="C",e[e.O=79]="O",e[e.P=80]="P",e[e.R=82]="R",e[e.F=70]="F",e[e.Y=89]="Y",e[e.Z=90]="Z"}(n||(n={})),n))(),s=i(22759),r=i(37716);let o=(()=>{class e{constructor(){this.bindings=[]}add(e,t){Array.isArray(e)||(e=[e]),e.forEach(e=>{this.bindings.push({keybind:this.parseKeybindString(e),keybindString:e,callback:t})})}addWithPreventDefault(e,t){this.bindings.push({keybind:this.parseKeybindString(e),keybindString:e,callback:t,preventDefault:!0})}listenOn(e,t={}){return(0,s.R)(e,"keydown").subscribe(e=>{!t.fireIfInputFocused&&["input","select"].includes(document.activeElement.nodeName.toLowerCase())||this.executeBindings(e)})}executeBindings(e){this.bindings.forEach(t=>{this.bindingMatches(t.keybind,e)&&(t.preventDefault&&e.preventDefault&&e.preventDefault(),t.callback(e))})}bindingMatches(e,t){return n[e.key.toUpperCase()]===t.keyCode&&(t.ctrlKey===e.ctrl||t.metaKey===e.ctrl)&&t.shiftKey===e.shift}parseKeybindString(e){const t=e.trim().split("+"),i={ctrl:!1,shift:!1,key:""};return t.forEach(e=>{"ctrl"===(e=e.trim().toLowerCase())?i.ctrl=!0:"shift"===e?i.shift=!0:i.key=e}),i}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},44666:function(e,t,i){"use strict";i.d(t,{S:function(){return Z}});var n=i(3679),s=i(26215),r=i(25917),o=i(54395),a=i(87519),c=i(43190),l=i(5304),d=i(37716),p=i(58341),u=i(38583),h=i(21554),g=i(76627),f=i(72458),m=i(63297);const v=["auto"],b=["inputEl"],w=["selectModeTemplate"];function x(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"mat-chip",8),d.NdJ("removed",function(){const t=d.CHM(e).index;return d.oxw().remove(t)}),d._uU(1),d._UZ(2,"mat-icon",9),d.qZA()}if(2&e){const e=t.$implicit,i=d.oxw();d.Q6J("selectable",!1)("removable",!i.selectMode),d.xp6(1),d.hij(" ",i.displayChipValue(e)," ")}}const y=function(e){return{elementRef:e}};function _(e,t){if(1&e){const e=d.EpF();d.TgZ(0,"input",10,11),d.NdJ("matChipInputTokenEnd",function(t){return d.CHM(e),d.oxw().addFromChipInput(t.value)}),d.ALo(2,"trans"),d.qZA()}if(2&e){const e=d.oxw(),t=d.MAs(1),i=d.MAs(6);d.Q6J("placeholder",d.lcZ(2,7,e.placeholder))("type",e.type)("matChipInputFor",t)("matChipInputAddOnBlur",!0)("matAutocomplete",i)("matAutocompleteConnectedTo",d.VKq(9,y,e.el))("formControl",e.formControl)}}function k(e,t){if(1&e&&(d.TgZ(0,"mat-option",12),d._uU(1),d.qZA()),2&e){const e=t.$implicit,i=d.oxw();d.Q6J("value",e),d.xp6(1),d.Oqu(i.displayChipValue(e))}}function C(e,t){if(1&e&&(d.TgZ(0,"mat-option",12),d._uU(1),d.qZA()),2&e){const e=t.$implicit,i=d.oxw(2);d.Q6J("value",e),d.xp6(1),d.Oqu(i.displayChipValue(e))}}function A(e,t){1&e&&d.YNc(0,C,2,2,"mat-option",6),2&e&&d.Q6J("ngForOf",t.suggestions)}let Z=(()=>{class e{constructor(e){this.el=e,this.type="text",this.emailsInput=!1,this.selectMode=!1,this.formControl=new n.NI,this.items$=new s.X([]),this.suggestedValues$=new s.X([])}set suggestedValues(e){this.suggestedValues$.next(e)}ngOnInit(){this.suggestFn&&this.bindToSearchControl()}ngAfterViewInit(){this.emailsInput&&this.parseEmailsOnPaste()}remove(e){const t=[...this.items$.value];t.splice(e,1),this.items$.next(t),this.propagateChange(this.items$.value)}addFromChipInput(e,t=!0){!e||this.matAutocomplete.isOpen||this.selectMode||this.add(e,t)}addFromAutocomplete(e,t=!0){this.add(e,t)}add(e,t=!0){e="string"==typeof e?e.trim():e;const i=this.findValueIndex(e)>-1;e&&!i&&(this.items$.next([...this.items$.value,e]),t&&this.propagateChange(this.items$.value)),this.inputEl&&(this.inputEl.nativeElement.value=""),this.formControl.setValue(null),this.suggestedValues$.next([])}findValueIndex(e){return"string"==typeof e?this.items$.value.indexOf(e):this.items$.value.findIndex(t=>t.id===e.id)}writeValue(e=[]){this.items$.next(e||[])}registerOnChange(e){this.propagateChange=e}registerOnTouched(){}bindToSearchControl(){this.formControl.valueChanges.pipe((0,o.b)(150),(0,a.x)(),(0,c.w)(e=>e?this.suggestFn(e):(0,r.of)([])),(0,l.K)(()=>(0,r.of)([]))).subscribe(e=>{const t=e.filter(e=>-1===this.findValueIndex(e));this.suggestedValues$.next(t)})}displayChipValue(e){return"object"==typeof e?e.name:e}parseEmailsOnPaste(){this.inputEl.nativeElement.addEventListener("paste",e=>{const t=(e.clipboardData||window.clipboardData).getData("text").match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);if(t){e.preventDefault();const i=window.getSelection();i.rangeCount&&(i.deleteFromDocument(),t.forEach(e=>this.add(e)))}})}}return e.\u0275fac=function(t){return new(t||e)(d.Y36(d.SBq))},e.\u0275cmp=d.Xpm({type:e,selectors:[["chip-input"]],viewQuery:function(e,t){if(1&e&&(d.Gf(v,5),d.Gf(b,5),d.Gf(w,5)),2&e){let e;d.iGM(e=d.CRH())&&(t.matAutocomplete=e.first),d.iGM(e=d.CRH())&&(t.inputEl=e.first),d.iGM(e=d.CRH())&&(t.selectModeTemplate=e.first)}},hostVars:2,hostBindings:function(e,t){2&e&&d.ekj("select-mode",t.selectMode)},inputs:{placeholder:"placeholder",type:"type",emailsInput:"emailsInput",suggestFn:"suggestFn",selectMode:"selectMode",suggestedValues:"suggestedValues"},features:[d._Bn([{provide:n.JU,useExisting:e,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(e,t){1&e&&(d.TgZ(0,"mat-chip-list",0,1),d.YNc(2,x,3,3,"mat-chip",2),d.ALo(3,"async"),d.YNc(4,_,3,11,"input",3),d.qZA(),d.TgZ(5,"mat-autocomplete",4,5),d.NdJ("optionSelected",function(e){return t.addFromAutocomplete(e.option.value)}),d.YNc(7,k,2,2,"mat-option",6),d.ALo(8,"async"),d.qZA(),d.YNc(9,A,1,1,"ng-template",null,7,d.W1O)),2&e&&(d.Q6J("selectable",!1),d.xp6(2),d.Q6J("ngForOf",d.lcZ(3,5,t.items$)),d.xp6(2),d.Q6J("ngIf",!t.selectMode),d.xp6(1),d.Q6J("autoActiveFirstOption",!0),d.xp6(2),d.Q6J("ngForOf",d.lcZ(8,7,t.suggestedValues$)))},directives:[p.qn,u.sg,u.O5,h.XC,p.HS,g.Hw,p.qH,p.oH,h.ZL,n.Fj,n.JJ,n.oH,f.ey],pipes:[u.Ov,m.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}),e})()},87738:function(e,t,i){"use strict";i.d(t,{G:function(){return u}});var n=i(38583),s=i(58341),r=i(76627),o=i(3679),a=i(49866),c=i(21554),l=i(51095),d=i(72458),p=i(37716);let u=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=p.oAB({type:e}),e.\u0275inj=p.cJS({imports:[[n.ez,s.Hi,c.Bb,o.UX,a.N,l.ot,r.Ps,d.si]]}),e})()},83326:function(e,t,i){"use strict";i.d(t,{B:function(){return s}});var n=i(17238);const s=[(0,n.X$)("fadeIn",[(0,n.eR)(":enter",[(0,n.oB)({opacity:0}),(0,n.jt)("325ms ease-in",(0,n.oB)({opacity:1}))])]),(0,n.X$)("fadeOut",[(0,n.eR)(":leave",[(0,n.oB)({opacity:1,position:"absolute",left:"0",right:"0"}),(0,n.jt)("325ms ease-out",(0,n.oB)({opacity:0}))])])]},64833:function(e,t,i){"use strict";i.d(t,{_:function(){return r}});var n=i(37716),s=i(84430);let r=(()=>{class e{constructor(e){this.theme=e,this.animation="wave",this.variant="text",this.dark=this.theme.isDarkMode()}get pulsate(){return"pulsate"===this.animation}get wave(){return"wave"===this.animation}get avatar(){return"avatar"===this.variant}get text(){return"text"===this.variant}get rect(){return"rect"===this.variant}get icon(){return"icon"===this.variant}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(s.f))},e.\u0275cmp=n.Xpm({type:e,selectors:[["skeleton"]],hostAttrs:["aria-busy","true","aria-valuemin","0","aria-valuemax","100","aria-valuetext","Loading...","role","progressbar"],hostVars:14,hostBindings:function(e,t){2&e&&n.ekj("dark",t.dark)("pulsate",t.pulsate)("wave",t.wave)("avatar",t.avatar)("text",t.text)("rect",t.rect)("icon",t.icon)},inputs:{animation:"animation",variant:"variant"},decls:0,vars:0,template:function(e,t){},styles:['@charset "UTF-8";[_nghost-%COMP%]{display:inline-block;overflow:hidden;position:relative;background-color:var(--be-divider-lighter);background-repeat:no-repeat;border-radius:4px;width:100%;height:100%;will-change:transform}.wave[_nghost-%COMP%]{-webkit-animation:wave 2s ease-in-out infinite;animation:wave 2s ease-in-out infinite;background-size:200px 100%;background-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.6),hsla(0,0%,100%,0))}.wave.dark[_nghost-%COMP%]{background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.2),transparent)}.pulsate[_nghost-%COMP%]{-webkit-animation:pulse 1.5s ease-in-out infinite;animation:pulse 1.5s ease-in-out infinite;-webkit-animation-delay:.5s;animation-delay:.5s}.avatar[_nghost-%COMP%]{width:40px;height:40px;margin-right:10px;border-radius:4px;flex-shrink:0}.circle[_nghost-%COMP%]{border-radius:50%}.icon[_nghost-%COMP%]{width:24px;height:24px;margin-left:8px;margin-right:8px}.text[_nghost-%COMP%]{height:1.4rem;vertical-align:middle}.text[_nghost-%COMP%]:before{content:"\xa0"}@-webkit-keyframes wave{0%{background-position:-200px 0}to{background-position:calc(200px + 100%) 0}}@keyframes wave{0%{background-position:-200px 0}to{background-position:calc(200px + 100%) 0}}@-webkit-keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}'],changeDetection:0}),e})()},87446:function(e,t,i){"use strict";i.d(t,{m:function(){return r}});var n=i(38583),s=i(37716);let r=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e}),e.\u0275inj=s.cJS({imports:[[n.ez]]}),e})()},24162:function(e,t,i){"use strict";function n(e,t){return e in t}i.d(t,{w:function(){return n}})},84889:function(e,t,i){"use strict";function n(e){const t=Object.assign({},e);return Object.keys(t).forEach(e=>{null!=t[e]&&""!==t[e]||delete t[e]}),t}i.d(t,{N:function(){return n}})},83644:function(e,t,i){"use strict";i.d(t,{XQ:function(){return n},Bq:function(){return s},pg:function(){return r},Hi:function(){return o}});class n{constructor(e){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||r.eq,this.required=!!e.required,this.order=void 0===e.order?1:e.order,this.type=e.type||s.Select,this.inputType=e.inputType,this.options=e.options||[],this.operators=e.operators,this.component=e.component,this.componentData=e.componentData}}var s=(()=>(function(e){e.Select="select",e.DatePicker="datePicker",e.SelectModel="selectModel",e.Input="input",e.StaticValue="staticValue"}(s||(s={})),s))(),r=(()=>(function(e){e.eq="=",e.ne="!=",e.gt=">",e.gte=">=",e.lt="<",e.lte="<=",e.has="has",e.doesntHave="doesntHave"}(r||(r={})),r))();const o=[r.eq,r.ne,r.gt,r.gte,r.lt,r.lte]},45418:function(e,t,i){"use strict";i.d(t,{T7:function(){return r},yH:function(){return o}});var n=i(83644);class s extends n.XQ{constructor(){super(...arguments),this.type=n.Bq.DatePicker,this.operators=n.Hi,this.defaultOperator=n.pg.lte,this.defaultValue=(new Date).toISOString().split("T")[0]}}class r extends s{constructor(){super(...arguments),this.key="created_at",this.label="Created At"}}class o extends s{constructor(){super(...arguments),this.key="updated_at",this.label="Updated At"}}},75499:function(e,t,i){"use strict";i.d(t,{k:function(){return K}});var n=i(37716),s=i(39761),r=i(88002),o=i(87519),a=i(45435),c=i(26215),l=i(90739),d=i(66682),p=i(22759),u=i(15515),h=i(38583),g=i(76627);const f=["filterSuggestion"];function m(e,t){if(1&e){const e=n.EpF();n.TgZ(0,"div",8,9),n.NdJ("click",function(){const t=n.CHM(e).$implicit;return n.oxw().filterSelected.emit(t.value)}),n.TgZ(2,"div",10),n._uU(3),n.qZA(),n.TgZ(4,"div",2),n._uU(5),n.qZA(),n.qZA()}if(2&e){const e=t.$implicit,i=t.index;n.uIk("data-filter-key",e.key)("data-index",i),n.xp6(3),n.Oqu(e.value.label),n.xp6(2),n.Oqu(e.value.description)}}let v=(()=>{class e{constructor(){this.filterSelected=new n.vpe,this.originalOrder=()=>0}anyFocused(){return document.activeElement.classList.contains("filter-suggestion-item")}focusItemAt(e){this.items.get(e).nativeElement.focus()}getFocusedFilter(){if(this.anyFocused()){const e=document.activeElement.dataset.filterKey;return this.filters[e]}}getFocusedIndex(){if(this.anyFocused()){const e=document.activeElement;return parseInt(e.dataset.index)}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=n.Xpm({type:e,selectors:[["filter-suggestions"]],viewQuery:function(e,t){if(1&e&&n.Gf(f,5),2&e){let e;n.iGM(e=n.CRH())&&(t.items=e)}},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(e,t){1&e&&(n.TgZ(0,"div",0),n.TgZ(1,"div",1),n.TgZ(2,"div",2),n._uU(3,"Field"),n.qZA(),n.TgZ(4,"div",2),n._uU(5,"Description"),n.qZA(),n.qZA(),n.TgZ(6,"div",3),n.YNc(7,m,6,4,"div",4),n.ALo(8,"keyvalue"),n.qZA(),n.qZA(),n.TgZ(9,"div",5),n._UZ(10,"mat-icon",6),n.TgZ(11,"div",7),n._uU(12," Use arrows, tab or mouse to navigate added filters. Backspace or delete key to remove them. "),n.qZA(),n.qZA()),2&e&&(n.xp6(7),n.Q6J("ngForOf",n.xi3(8,1,t.filters,t.originalOrder)))},directives:[u.P,h.sg,g.Hw],pipes:[h.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}),e})();var b=i(58480),w=i(95439),x=i(3679),y=i(15381);function _(e,t){if(1&e&&(n.ynx(0),n._UZ(1,"img",2),n.TgZ(2,"div",3),n._uU(3),n.qZA(),n.BQk()),2&e){const e=t.ngIf;n.xp6(1),n.Q6J("src",e.image,n.LSH),n.xp6(2),n.Oqu(e.name)}}function k(e,t){1&e&&(n.TgZ(0,"div",4),n._uU(1,"Click to select"),n.qZA())}let C=(()=>{class e{constructor(e){this.dialog=e,this.value$=new c.X(null)}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}writeValue(e){this.value$.next(e)}onClick(){this.openSelectModelDialog()}openSelectModelDialog(){this.dialog.open(this.filter.component,this.filter.componentData).afterClosed().subscribe(e=>{e&&(this.value$.next(e),this.propagateChange(e))})}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(y.u))},e.\u0275cmp=n.Xpm({type:e,selectors:[["select-model-control"]],hostBindings:function(e,t){1&e&&n.NdJ("click",function(){return t.onClick()})},inputs:{filter:"filter"},features:[n._Bn([{provide:x.JU,useExisting:e,multi:!0}])],decls:4,vars:4,consts:[[4,"ngIf","ngIfElse"],["defaultHint",""],[1,"image",3,"src"],[1,"name"],["trans",""]],template:function(e,t){if(1&e&&(n.YNc(0,_,4,2,"ng-container",0),n.ALo(1,"async"),n.YNc(2,k,2,0,"ng-template",null,1,n.W1O)),2&e){const e=n.MAs(3);n.Q6J("ngIf",n.lcZ(1,2,t.value$))("ngIfElse",e)}},directives:[h.O5,u.P],pipes:[h.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}),e})();const A={"=":"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"};var Z=i(96605);let O=(()=>{class e{constructor(e){this.breakpoints=e}transform(e,t){return t||this.breakpoints.isMobile$.value?e:A[e]}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(Z.S,16))},e.\u0275pipe=n.Yjl({name:"operatorDisplayName",type:e,pure:!0}),e})();const S=["select"];function I(e,t){if(1&e&&(n.TgZ(0,"option",4),n._uU(1),n.ALo(2,"operatorDisplayName"),n.qZA()),2&e){const e=t.$implicit,i=n.oxw();n.Q6J("value",e),n.xp6(1),n.hij(" ",n.xi3(2,2,e,i.compact)," ")}}let T=(()=>{class e{ngAfterViewInit(){this.resizeSelect()}resizeSelect(){var e;const t=null===(e=this.select)||void 0===e?void 0:e.nativeElement;t&&t.selectedIndex>-1&&(t.style.width=`${t.options[t.selectedIndex].label.length+5}ch`)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=n.Xpm({type:e,selectors:[["operator-select"]],viewQuery:function(e,t){if(1&e&&n.Gf(S,5),2&e){let e;n.iGM(e=n.CRH())&&(t.select=e.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(e,t){1&e&&(n.ynx(0,0),n.TgZ(1,"select",1,2),n.NdJ("ngModelChange",function(){return t.resizeSelect()}),n.YNc(3,I,3,5,"option",3),n.qZA(),n.BQk()),2&e&&(n.Q6J("formGroup",t.formGroup),n.xp6(3),n.Q6J("ngForOf",t.operators))},directives:[x.JL,x.sg,x.EJ,x.JJ,x.u,h.sg,x.YN,x.Kr],pipes:[O],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}),e})();const E=["valueInput"];function P(e,t){if(1&e&&n._UZ(0,"operator-select",8),2&e){const e=n.oxw().ngIf,t=n.oxw();n.Q6J("compact",t.compact)("formGroup",e)("operators",t.filter.operators)}}function F(e,t){if(1&e&&(n.TgZ(0,"option",16),n._uU(1),n.qZA()),2&e){const e=t.$implicit;n.Q6J("ngValue",e.value),n.xp6(1),n.hij(" ",e.key||e.value," ")}}function M(e,t){if(1&e){const e=n.EpF();n.TgZ(0,"div",9),n.TgZ(1,"select",10,11),n.NdJ("ngModelChange",function(){return n.CHM(e),n.oxw(2).resizeInput()}),n.YNc(3,F,2,2,"option",12),n.qZA(),n.O4$(),n.TgZ(4,"svg",13),n._UZ(5,"path",14),n._UZ(6,"path",15),n.qZA(),n.qZA()}if(2&e){const e=n.oxw(2);n.xp6(1),n.Q6J("id",e.key)("compareWith",e.compareFilterValueFn),n.xp6(2),n.Q6J("ngForOf",e.filter.options)}}function U(e,t){if(1&e&&(n.TgZ(0,"div",17),n._UZ(1,"input",18,11),n.qZA()),2&e){const e=n.oxw(2);n.xp6(1),n.Q6J("id",e.key)}}function D(e,t){if(1&e&&n._UZ(0,"select-model-control",19,11),2&e){const e=n.oxw(2);n.Q6J("filter",e.filter)("id",e.key)}}function L(e,t){if(1&e){const e=n.EpF();n.TgZ(0,"div",9),n.TgZ(1,"input",20,11),n.NdJ("ngModelChange",function(){return n.CHM(e),n.oxw(2).resizeInput()}),n.qZA(),n.qZA()}if(2&e){const e=n.oxw(2);n.xp6(1),n.Q6J("id",e.key)("type",e.filter.inputType||"text")}}function q(e,t){if(1&e){const e=n.EpF();n.ynx(0,1),n.TgZ(1,"div",2),n.NdJ("click",function(){return n.CHM(e),n.oxw().el.nativeElement.focus()}),n._uU(2),n.qZA(),n.YNc(3,P,1,3,"operator-select",3),n.ynx(4,4),n.YNc(5,M,7,3,"div",5),n.YNc(6,U,3,1,"div",6),n.YNc(7,D,2,2,"select-model-control",7),n.YNc(8,L,3,2,"div",5),n.BQk(),n.BQk()}if(2&e){const e=t.ngIf,i=n.oxw();n.Q6J("formGroup",e),n.xp6(2),n.Oqu(i.filter.label),n.xp6(1),n.Q6J("ngIf",i.filter.operators),n.xp6(1),n.Q6J("ngSwitch",i.filter.type),n.xp6(1),n.Q6J("ngSwitchCase","select"),n.xp6(1),n.Q6J("ngSwitchCase","datePicker"),n.xp6(1),n.Q6J("ngSwitchCase","selectModel"),n.xp6(1),n.Q6J("ngSwitchCase","input")}}let N=(()=>{class e{constructor(e){this.el=e,this.compareFilterValueFn=(e,t)=>w(e,t)}ngAfterViewInit(){this.resizeInput()}focus(){this.el.nativeElement.focus()}focusValueInput(){var e;this.valueInput instanceof C?this.valueInput.openSelectModelDialog():(null===(e=this.valueInput)||void 0===e?void 0:e.nativeElement)&&this.valueInput.nativeElement.focus()}resizeInput(){var e;const t=null===(e=this.valueInput)||void 0===e?void 0:e.nativeElement;if("SELECT"===(null==t?void 0:t.nodeName)){const e=t;e.selectedIndex>-1&&(e.style.width=`${e.options[e.selectedIndex].label.length+5}ch`)}else"INPUT"===(null==t?void 0:t.nodeName)&&"date"!==t.type&&(t.style.width=`${t.value.length+7}ch`)}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(n.SBq))},e.\u0275cmp=n.Xpm({type:e,selectors:[["active-filter"]],viewQuery:function(e,t){if(1&e&&n.Gf(E,5),2&e){let e;n.iGM(e=n.CRH())&&(t.valueInput=e.first)}},hostAttrs:["tabIndex","0","role","button"],hostVars:1,hostBindings:function(e,t){2&e&&n.uIk("data-control-key",t.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(e,t){1&e&&n.YNc(0,q,9,8,"ng-container",0),2&e&&n.Q6J("ngIf",t.form.controls[t.key])},directives:[h.O5,x.JL,x.sg,u.P,h.RF,h.n9,T,x.EJ,x.JJ,x.u,h.sg,x.YN,x.Kr,x.Fj,C,x.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}),e})();function $(e,t){if(1&e&&n._UZ(0,"active-filter",2),2&e){const e=t.ngIf,i=n.oxw(),s=i.$implicit,r=i.index,o=n.oxw();n.Q6J("compact",o.compact)("key",s.key)("form",o.form)("filter",e),n.uIk("data-index",r)}}function B(e,t){if(1&e&&(n.ynx(0),n.YNc(1,$,1,5,"active-filter",1),n.BQk()),2&e){const e=t.$implicit,i=n.oxw();n.xp6(1),n.Q6J("ngIf",i.config[e.value.value.key])}}const Y=["*"];let R=(()=>{class e{constructor(e,t,i){this.fb=e,this.cd=t,this.el=i}add(e,t={}){const i=void 0!==t.value?t.value:e.defaultValue,n=this.fb.group({key:e.key,value:i,operator:t.operator||e.defaultOperator}),s=Object.keys(this.form.controls).length+(0,b.O)(8);this.form.addControl(s,n,{emitEvent:""!==i}),this.cd.detectChanges(),t.focus&&this.filters.last.focusValueInput()}removeByKey(e){this.form.removeControl(e),this.cd.markForCheck()}removeCurrentlyFocused(){const e=document.activeElement;this.removeByKey(e.dataset.controlKey)}anyFocused(){return"ACTIVE-FILTER"===document.activeElement.nodeName}focusLast(){this.filters.last&&this.filters.last.focus()}focusPrevious(){const e=this.getFocusedIndex(),t=this.filters.get(e-1);t&&t.focus()}getByIndex(e){return this.filters.get(e)}lastIsFocused(){return this.getFocusedIndex()===this.filters.length-1}getFocusedIndex(){const e=document.activeElement.dataset.index;return e?parseInt(e):null}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(x.qu),n.Y36(n.sBO),n.Y36(n.SBq))},e.\u0275cmp=n.Xpm({type:e,selectors:[["active-filters"]],viewQuery:function(e,t){if(1&e&&n.Gf(N,5),2&e){let e;n.iGM(e=n.CRH())&&(t.filters=e)}},inputs:{compact:"compact",form:"form",config:"config"},ngContentSelectors:Y,decls:3,vars:3,consts:[[4,"ngFor","ngForOf"],[3,"compact","key","form","filter",4,"ngIf"],[3,"compact","key","form","filter"]],template:function(e,t){1&e&&(n.F$t(),n.YNc(0,B,2,1,"ng-container",0),n.ALo(1,"keyvalue"),n.Hsn(2)),2&e&&n.Q6J("ngForOf",n.lcZ(1,1,t.form.controls))},directives:[h.sg,h.O5,N],pipes:[h.Nd],styles:["[_nghost-%COMP%]{display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center}"],changeDetection:0}),e})();var Q=i(63423),j=i(63868),J=i(51095),z=i(63297);const V=["searchInput"],H=["filterSuggestion"];function G(e,t){if(1&e){const e=n.EpF();n.TgZ(0,"button",8),n.NdJ("click",function(){return n.CHM(e),n.oxw().clearSearch()}),n._UZ(1,"mat-icon",9),n.qZA()}}function W(e,t){1&e&&(n.TgZ(0,"span",13),n._uU(1,"Filter"),n.qZA())}function X(e,t){if(1&e){const e=n.EpF();n.TgZ(0,"button",10),n.NdJ("click",function(){return n.CHM(e),n.oxw().toggleFilterDropdown()}),n._UZ(1,"mat-icon",11),n.YNc(2,W,2,0,"span",12),n.qZA()}if(2&e){const e=n.oxw();n.xp6(2),n.Q6J("ngIf",!e.compact)}}let K=(()=>{class e{constructor(e,t,i,s,r,o){this.fb=e,this.route=t,this.el=i,this.keybinds=s,this.cd=r,this.router=o,this.filterChange=new n.vpe,this.inputFocus=new n.vpe,this.form=this.fb.group({}),this.filterBarHeight=0,this.filterDropdownVisible$=new c.X(!1)}set filters(e){e?(this.keyedFilters={},(e||[]).forEach(e=>{this.keyedFilters[e.key]=e})):this.keyedFilters=null}ngOnInit(){this.haveFiltersOrQuery$=(0,l.aj)([this.searchControl.valueChanges.pipe((0,s.O)(null)),this.form.valueChanges.pipe((0,s.O)(null))]).pipe((0,r.U)(([e,t])=>e||t&&0!==Object.keys(t).length))}ngAfterViewInit(){this.watchForSizeChanges(),this.setFiltersFromQuery(),this.setupKeybinds(),this.subscribeToCloseActions(),this.bindToFormValueChange()}onClick(e){e.target!==this.el.nativeElement&&e.target!==this.activeFilters.el.nativeElement||this.searchInput.nativeElement.focus()}ngOnDestroy(){var e;null===(e=this.closeActionsStream$)||void 0===e||e.unsubscribe()}clearSearch(){Object.keys(this.form.controls).forEach(e=>{this.activeFilters.removeByKey(e)}),this.searchControl.reset(null,{emitEvent:!1}),this.form.reset()}toggleFilterDropdown(){this.filterDropdownVisible$.next(!this.filterDropdownVisible$.value)}addFilterFromDropdownClick(e){this.activeFilters.add(e,{focus:!0}),this.filterDropdownVisible$.next(!1)}searchInputIsFocused(){return document.activeElement===this.searchInput.nativeElement}cursorAtStartOfSearchInput(){return this.searchInputIsFocused()&&0===this.searchInput.nativeElement.selectionStart}cursorAtEndOfSearchInput(){return this.searchInputIsFocused()&&this.searchInput.nativeElement.selectionStart===this.searchInput.nativeElement.value.length}bindToFormValueChange(){this.form.valueChanges.pipe((0,r.U)(e=>Object.keys(e).length?e:null),(0,o.x)()).subscribe(e=>{this.filterChange.emit(e?ee(e):null)})}watchForSizeChanges(){new ResizeObserver(e=>{this.filterBarHeight=e[0].contentRect.height}).observe(this.el.nativeElement,{box:"border-box"})}setFiltersFromQuery(){const e=this.router.routerState.root.snapshot.queryParams;e.filters&&te(e.filters).forEach(e=>{this.activeFilters.add(this.keyedFilters[e.key],e)}),e.query&&this.searchControl.setValue(e.query)}setupKeybinds(){this.keybinds.add(["backspace","delete"],()=>this.cursorAtStartOfSearchInput()?this.activeFilters.focusLast():this.activeFilters.anyFocused()?(this.activeFilters.removeCurrentlyFocused(),this.searchInput.nativeElement.focus()):void 0),this.keybinds.add("arrow_left",e=>{this.cursorAtStartOfSearchInput()?(this.activeFilters.focusLast(),e.preventDefault()):this.activeFilters.anyFocused()&&(this.activeFilters.focusPrevious(),e.preventDefault())}),this.keybinds.add("arrow_right",e=>{if(this.activeFilters.anyFocused()){e.preventDefault();const t=this.activeFilters.getFocusedIndex(),i=this.activeFilters.getByIndex(t+1);i?i.focus():this.activeFilters.lastIsFocused()&&this.searchInput.nativeElement.focus()}}),this.keybinds.add(["arrow_down","tab"],e=>{if(this.cursorAtEndOfSearchInput()||this.suggestions.anyFocused()){e.preventDefault(),this.filterDropdownVisible$.value||this.toggleFilterDropdown();const t=this.suggestions.getFocusedIndex();let i=t>-1?t:0;this.suggestions.anyFocused()&&(i+=1),i>=this.suggestions.items.length&&(i=0),this.suggestions.focusItemAt(i)}}),this.keybinds.add(["arrow_up","shift+tab"],e=>{if(this.suggestions.anyFocused()){e.preventDefault();const t=this.activeFilters.getFocusedIndex();let i=t>-1?t:0;i-=1,-1===i?this.searchInput.nativeElement.focus():this.suggestions.focusItemAt(i)}}),this.keybinds.add("enter",e=>{const t=this.suggestions.getFocusedFilter();t&&(e.preventDefault(),this.activeFilters.add(t,{focus:!0}),this.filterDropdownVisible$.next(!1))}),this.keybinds.add("esc",e=>{this.filterDropdownVisible$.value&&(e.preventDefault(),this.filterDropdownVisible$.next(!1))}),this.keybinds.listenOn(document,{fireIfInputFocused:!0})}subscribeToCloseActions(){this.closeActionsStream$=(0,d.T)((0,p.R)(document,"click"),(0,p.R)(document,"auxclick"),(0,p.R)(document,"touchend")).pipe((0,a.h)(e=>{const t=e.target;return t!==this.el.nativeElement&&!this.el.nativeElement.contains(t)})).subscribe(()=>{this.filterDropdownVisible$.next(!1)})}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(x.qu),n.Y36(Q.gz),n.Y36(n.SBq),n.Y36(j.C),n.Y36(n.sBO),n.Y36(Q.F0))},e.\u0275cmp=n.Xpm({type:e,selectors:[["search-input-with-filters"]],viewQuery:function(e,t){if(1&e&&(n.Gf(V,5),n.Gf(v,5),n.Gf(R,5),n.Gf(H,5)),2&e){let e;n.iGM(e=n.CRH())&&(t.searchInput=e.first),n.iGM(e=n.CRH())&&(t.suggestions=e.first),n.iGM(e=n.CRH())&&(t.activeFilters=e.first),n.iGM(e=n.CRH())&&(t.filterContainers=e)}},hostBindings:function(e,t){1&e&&n.NdJ("click",function(e){return t.onClick(e)})},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(e,t){1&e&&(n.TgZ(0,"active-filters",0),n.TgZ(1,"div",1),n._UZ(2,"mat-icon",2),n.TgZ(3,"input",3,4),n.NdJ("focus",function(){return t.inputFocus.emit()}),n.ALo(5,"trans"),n.qZA(),n.qZA(),n.qZA(),n.YNc(6,G,2,0,"button",5),n.ALo(7,"async"),n.YNc(8,X,3,1,"button",6),n.TgZ(9,"filter-suggestions",7),n.NdJ("filterSelected",function(e){return t.addFilterFromDropdownClick(e)}),n.ALo(10,"async"),n.qZA()),2&e&&(n.Q6J("form",t.form)("config",t.keyedFilters)("compact",t.compact),n.xp6(3),n.Q6J("placeholder",n.lcZ(5,12,"Type to search for "+t.pluralName))("formControl",t.searchControl),n.xp6(3),n.Q6J("ngIf",n.lcZ(7,14,t.haveFiltersOrQuery$)),n.xp6(2),n.Q6J("ngIf",t.keyedFilters),n.xp6(1),n.Udp("top",t.filterBarHeight+5+"px"),n.ekj("visible",n.lcZ(10,16,t.filterDropdownVisible$)),n.Q6J("filters",t.keyedFilters))},directives:[R,g.Hw,x.Fj,x.JJ,x.oH,h.O5,v,J.lW,u.P],pipes:[z.R,h.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}),e})();const ee=e=>{const t=[];return Object.values(e).forEach(e=>{""!==e.value&&t.push(e)}),t.length?encodeURIComponent(btoa(JSON.stringify(t))):""},te=e=>{let t=[];try{t=JSON.parse(atob(decodeURIComponent(e)))}catch(i){}return t}},6253:function(e,t,i){"use strict";i.d(t,{B:function(){return p}});var n=i(38583),s=i(49866),r=i(3679),o=i(76627),a=i(51095),c=i(22238),l=i(43389),d=i(37716);let p=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=d.oAB({type:e}),e.\u0275inj=d.cJS({imports:[[n.ez,s.N,r.UX,o.Ps,a.ot,c.Is,l.p]]}),e})()},58193:function(e,t,i){"use strict";i.d(t,{x:function(){return v}});var n=i(38583),s=i(76627),r=i(49866),o=i(7539),a=i(3679),c=i(51095),l=i(58341),d=i(12178),p=i(87738),u=i(95217),h=i(98097),g=i(6253),f=i(63423),m=i(37716);let v=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=m.oAB({type:e}),e.\u0275inj=m.cJS({imports:[[n.ez,r.N,a.UX,a.u5,p.G,u.u,h.X,g.B,f.Bz,c.ot,s.Ps,o.p9,l.Hi,d.Cv],o.p9]}),e})()},99883:function(e,t,i){"use strict";i.d(t,{x:function(){return S}});var n=i(26215),s=i(90739),r=i(61927),o=i(25917),a=i(88002),c=i(43190),l=i(93342),d=i(37716),p=i(63423),u=i(90299),h=i(90962);let g=(()=>{class e{constructor(e,t,i){this.router=e,this.http=t,this.localStorage=i,this.params$=new n.X({}),this.paginatedOnce$=new n.X(!1),this.loading$=new n.X(!1),this.response$=new n.X(null),this.dontUpdateQueryParams=!1,this.perPageCacheKey=null,this.noResults$=this.response$.pipe((0,a.U)(e=>this.paginatedOnce$.value&&0===e.pagination.data.length))}get params(){return this.params$.value}get currentPage(){var e,t;return null===(t=null===(e=this.response$.value)||void 0===e?void 0:e.pagination)||void 0===t?void 0:t.current_page}paginate(e={},t,i){const n=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}:{}),n),e)),this.subscription||this.init(t,i)}nextPage(){const e=this.response$.value.pagination.current_page||0;this.paginate(Object.assign(Object.assign({},this.params$.value),{page:e+1,cursor:this.response$.value.pagination.next_cursor}))}previousPage(){const e=this.response$.value.pagination.current_page;this.paginate(Object.assign(Object.assign({},this.params$.value),{page:e-1||1,cursor:this.response$.value.pagination.prev_cursor}))}changePerPage(e){var t;e!==(null===(t=this.params$.value)||void 0===t?void 0:t.perPage)&&(this.perPageCacheKey&&this.localStorage.set(this.perPageCacheKey,e),this.paginate(Object.assign(Object.assign({},this.params$.value),{perPage:e})))}currentQueryParams(){return this.router.routerState.root.snapshot.queryParams}init(e,t){this.subscription=this.params$.pipe((0,c.w)(i=>{this.loading$.next(!0);const n=!this.paginatedOnce$.value;return n&&this.perPageCacheKey&&this.localStorage.get(this.perPageCacheKey)&&(i=Object.assign({perPage:this.localStorage.get(this.perPageCacheKey)},i)),(n&&t?(0,o.of)({pagination:t}):this.http.get(e,i)).pipe((0,l.b)(()=>{this.updateQueryParams(i),this.loading$.next(!1),this.paginatedOnce$.next(!0)},()=>{this.loading$.next(!1),this.paginatedOnce$.next(!0)}))})).subscribe(e=>{this.response$.next(e)})}updateQueryParams(e={}){if(!this.dontUpdateQueryParams){for(const t in e)Array.isArray(e[t])&&(e[t]=e[t].join(","));this.router.navigate([],{queryParams:e,replaceUrl:!0})}}canLoadNextPage(){var e;const t=null===(e=this.response$.value)||void 0===e?void 0:e.pagination;return!!t&&(!!t.next_cursor||this.currentPage<t.last_page)}canLoadPrevPage(){var e;const t=null===(e=this.response$.value)||void 0===e?void 0:e.pagination;return!!t&&(!!t.prev_cursor||this.currentPage>1)}}return e.\u0275fac=function(t){return new(t||e)(d.LFG(p.F0),d.LFG(u.r),d.LFG(h.m))},e.\u0275prov=d.Yz7({token:e,factory:e.\u0275fac}),e})();var f=i(54395),m=i(59328),v=i(45435),b=i(84889),w=i(8208),x=i(48358),y=i(80970),_=i(39490);function k(e,t){const i=y.pick(t,e);if((0,_.t6)(i)){const e=Number(i);return e<9007199254740991?e:i}return i}function C(e,t){return e.filter(e=>function(e,t){const i="string"==typeof e?e:A(e),n=t.trim().toLowerCase();return-1!==i.indexOf(n)}(e,t))}function A(e){return Object.keys(e).reduce((t,i)=>t+(e[i]&&"object"==typeof e[i]?A(e[i]):e[i])+"\u25ec","").toLowerCase()}var Z=i(3679),O=i(15381);let S=(()=>{class e{constructor(e,t,i,s){this.modal=e,this.router=t,this.http=i,this.localStorage=s,this.sort$=new n.X({}),this.filters$=new n.X({}),this.searchControl=new Z.NI,this.searchTerm$=new n.X(null),this.staticParams$=new n.X({}),this.paginator=new g(this.router,this.http,this.localStorage),this.ignoreNextParamChange=!1,this.originalData$=new n.X([]),this.data$=new n.X([]),this.selectedRows$=new n.X([])}get data(){return this.data$.value}set data(e){const t=[...e];this.originalData$.next(t),this.data$.next(t),this.ignoreNextParamChange=!0,this.reset()}init(e={}){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){const e=this.router.routerState.root.snapshot.queryParams,t=e.query;this.searchControl.setValue(t),this.searchTerm$.next(t),this.sort$.next({orderBy:e.orderBy,orderDir:e.orderDir})}return this.searchControlSub=this.searchControl.valueChanges.pipe((0,f.b)(300)).subscribe(e=>{this.searchTerm$.next(e)}),this.mainSub=(0,s.aj)([this.sort$,this.filters$,this.searchTerm$.pipe((0,a.U)(e=>({query:e}))),this.staticParams$]).pipe((0,f.b)(0,r.Z),(0,a.U)(e=>Object.assign({},...e))).subscribe(e=>{if(this.ignoreNextParamChange)return this.ignoreNextParamChange=!1;e=(0,b.N)(e),Object.entries(e).forEach(([t,i])=>{"object"==typeof i&&i.id&&(e[`${t}Id`]=i.id,delete e[t])}),this.config.uri?this.paginator.paginate(e,this.config.uri,this.config.initialData):Object.keys(e).length&&this.data.length&&this.applyLocalTransforms(e)}),this}connectToPaginator(){this.paginatorSub=this.paginator.response$.pipe((0,m.G)()).subscribe(([e,t])=>{var i;const n=this.config.infiniteScroll&&(null===(i=null==e?void 0:e.pagination)||void 0===i?void 0:i.current_page)!==t.pagination.current_page?[...this.data$.value,...t.pagination.data]:t.pagination.data;this.data$.next(n)})}applyLocalTransforms(e){let t=[...this.originalData$.value];e.query&&(t=C(t,e.query)),e.orderBy&&e.orderDir&&(t=function(e,t,i){return e.sort((e,n)=>{let s=k(e,t),r=k(n,t);const o=typeof s,a=typeof r;o!==a&&("number"===o&&(s+=""),"number"===a&&(r+=""));let c=0;return null!=s&&null!=r?s>r?c=1:s<r&&(c=-1):null!=s?c=1:null!=r&&(c=-1),c*("asc"===i?1:-1)})}(t,e.orderBy,e.orderDir)),this.data$.next(t)}addFilter(e,t){this.filters$.next(Object.assign(Object.assign({},this.filters$.value),{[e]:t}))}removeFilter(e){const t=Object.assign({},this.filters$.value);delete t[e],this.filters$.next(t)}reset(e=null){this.filters$.next({}),this.sort$.next({}),this.selectedRows$.next([]),e&&this.staticParams$.next(e)}openCrupdateResourceModal(e,t,i){return this.modal.open(e,t,i).beforeClosed().pipe((0,v.h)(e=>!!e),(0,l.b)(()=>this.reset()))}confirmResourceDeletion(e){const t=Object.assign(Object.assign({},x.M),{replacements:{resource:e}});return this.modal.open(w.z,t).afterClosed().pipe((0,v.h)(e=>e))}getCurrentParams(){return Object.assign(Object.assign(Object.assign(Object.assign({},this.sort$.value),this.filters$.value),this.staticParams$.value),this.paginator.params)}destroy(){var e,t,i;null===(e=this.paginatorSub)||void 0===e||e.unsubscribe(),null===(t=this.mainSub)||void 0===t||t.unsubscribe(),null===(i=this.searchControlSub)||void 0===i||i.unsubscribe()}}return e.\u0275fac=function(t){return new(t||e)(d.LFG(O.u),d.LFG(p.F0),d.LFG(u.r),d.LFG(h.m))},e.\u0275prov=d.Yz7({token:e,factory:e.\u0275fac}),e})()},48358:function(e,t,i){"use strict";i.d(t,{M:function(){return n}});const n={title:"Delete :resource",body:"Are you sure you want to delete selected :resource?",ok:"Delete"}},1303:function(e,t,i){"use strict";i.d(t,{p:function(){return g}});var n=i(45435),s=i(36461),r=i(6966),o=i(37716),a=i(99883),c=i(19238),l=i(38583),d=i(76627);const p=["columnName"],u=["table-sort-header",""],h=["*"];let g=(()=>{class e{constructor(e,t,i,n){this.datable=e,this.cd=t,this.focusMonitor=i,this.el=n,this.orderDir=null,this.arrowVisible=!1,this.arrowDirection="down"}get sortDisabled(){var e;return null===(e=this.datable.config)||void 0===e?void 0:e.disableSort}ngOnInit(){this.orderBy||(this.orderBy=(0,r.V)(this.columnName.nativeElement.textContent,"_")),this.sortSub=this.datable.sort$.pipe((0,n.h)(e=>e.orderBy!==this.orderBy)).subscribe(()=>{this.orderDir=null,this.onMouseLeave(),this.cd.markForCheck()})}ngAfterViewInit(){this.focusMonitor.monitor(this.el).subscribe()}ngOnDestroy(){this.sortSub.unsubscribe(),this.focusMonitor.stopMonitoring(this.el)}changeSort(){this.datable.sort$.next({orderBy:this.orderBy,orderDir:this.getDirection(this.orderDir)})}getDirection(e){switch(e){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"}}onMouseEnter(){var e;(null===(e=this.datable.config)||void 0===e?void 0:e.disableSort)||(this.arrowVisible=!0)}onMouseLeave(){this.arrowVisible=!1,this.orderDir||(this.arrowDirection="down")}handleClick(){var e;(null===(e=this.datable.config)||void 0===e?void 0:e.disableSort)||this.changeSort()}handleKeydown(e){var t;(null===(t=this.datable.config)||void 0===t?void 0:t.disableSort)||e.keyCode!==s.L_&&e.keyCode!==s.K5||(e.preventDefault(),this.changeSort())}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(a.x),o.Y36(o.sBO),o.Y36(c.tE),o.Y36(o.SBq))},e.\u0275cmp=o.Xpm({type:e,selectors:[["","table-sort-header",""]],viewQuery:function(e,t){if(1&e&&o.Gf(p,7),2&e){let e;o.iGM(e=o.CRH())&&(t.columnName=e.first)}},hostAttrs:["tabindex","0"],hostVars:4,hostBindings:function(e,t){1&e&&o.NdJ("click",function(){return t.handleClick()})("keydown",function(e){return t.handleKeydown(e)})("mouseenter",function(){return t.onMouseEnter()})("mouseleave",function(){return t.onMouseLeave()}),2&e&&o.ekj("active",t.orderDir)("sort-disabled",t.sortDisabled)},inputs:{orderBy:["table-sort-header","orderBy"]},attrs:u,ngContentSelectors:h,decls:5,vars:3,consts:[[1,"text"],["columnName",""],[1,"icon-wrapper",3,"ngClass"],["svgIcon","arrow-downward",1,"sort-icon"]],template:function(e,t){1&e&&(o.F$t(),o.TgZ(0,"span",0,1),o.Hsn(2),o.qZA(),o.TgZ(3,"span",2),o._UZ(4,"mat-icon",3),o.qZA()),2&e&&(o.xp6(3),o.Q6J("ngClass",t.arrowDirection),o.xp6(1),o.ekj("hint-visible",t.arrowVisible))},directives:[l.mk,d.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}),e})()},52781:function(e,t,i){"use strict";i.d(t,{c:function(){return r}});var n=i(37716),s=i(41880);let r=(()=>{class e{constructor(e){this.el=e,this.config={},this.filesSelected=new n.vpe}ngOnInit(){this.el.nativeElement.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),(0,s.r)(this.config).then(e=>{e&&e.length&&this.filesSelected.emit(e)})})}}return e.\u0275fac=function(t){return new(t||e)(n.Y36(n.SBq))},e.\u0275dir=n.lG2({type:e,selectors:[["","uploadButton",""]],inputs:{config:["uploadButton","config"]},outputs:{filesSelected:"filesSelected"}}),e})()},52644:function(e,t,i){"use strict";i.d(t,{y:function(){return r}});var n=i(1796),s=i(37716);let r=(()=>{class e{transform(e=0,t){return isNaN(parseFloat(String(e)))||!isFinite(e)?"-":(0,n.H)(e,t)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=s.Yjl({name:"formattedFileSize",type:e,pure:!0}),e})()},56456:function(e,t,i){"use strict";i.d(t,{A:function(){return I}});var n=i(79765),s=i(26215),r=i(82298),o=i(58480);class a{constructor(e,t){this.canceled$=new n.xQ,this.processing$=new s.X(!1),this.uploadedResponse$=new r.t(1),this.progress$=new s.X({percentage:0}),this.error$=new s.X(null),this.customData={},this.uploadedFile=e,this.id=t||(0,o.O)()}get completed(){return!this.processing$.value&&100===this.progress$.value.percentage}get inProgress(){return!this.error$.value&&!this.completed}cancel(){this.canceled$.next(!0),this.finalize()}complete(){this.setProgress({percentage:100,eta:null}),this.finalize()}finalize(){this.uploadedResponse$.complete(),this.canceled$.complete(),this.progress$.complete()}finishProcessing(){this.processing$.next(!1),this.processing$.complete()}addError(e){this.error$.next(e)}setProgress(e){this.progress$.next(Object.assign(Object.assign({},this.progress$.value),e))}}var c=i(94402),l=i(40205),d=i(59193),p=i(19773),u=i(5304),h=i(46782),g=i(88002),f=i(45435),m=i(66421),v=i(81769),b=i(37716),w=i(97312),x=i(18715),y=i(68756),_=i(45746),k=i(43256),C=i(16850);let A=(()=>{class e extends x.c{constructor(){super(...arguments),this.DEFAULT_MAX_FILE_SIZE_MB=8,this.showToast=!0}initValidations(){this.validations.push(new y.p({maxSize:this.getMaxFileSize()},this.i18n));const e=this.getAllowedExtensions(),t=this.getBlockedExtensions();e&&e.length&&this.validations.push(new _.G({extensions:e},this.i18n)),t&&t.length&&this.validations.push(new k.u({extensions:t},this.i18n))}getMaxFileSize(){return this.settings.get("uploads.max_size",(0,C.F)(this.DEFAULT_MAX_FILE_SIZE_MB,"MB"))}getAllowedExtensions(){return this.settings.getJson("uploads.allowed_extensions")}getBlockedExtensions(){return this.settings.getJson("uploads.blocked_extensions")}}return e.\u0275fac=function(){let t;return function(i){return(t||(t=b.n5z(e)))(i||e)}}(),e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var Z=i(35718),O=i(24688),S=i(34673);let I=(()=>{class e{constructor(e,t,i,o,a){this.api=e,this.defaultValidator=t,this.toast=i,this.currentUser=o,this.settings=a,this.uploads$=new s.X([]),this.totalProgress$=new r.t(1),this.uploadsAdded$=new n.xQ,this.count$=new s.X({pending:0,completed:0})}isEmpty(){return!this.uploads$.value.length}getAllCompleted(){return this.uploads$.value.filter(e=>e.completed).map(e=>e.fileEntry)}updateTotalProgress(){const e=this.uploads$.value.map(e=>e.progress$.value.percentage||0);this.totalProgress$.next(e.reduce((e,t)=>e+t,0)/e.length)}totalProgress(){return this.totalProgress$.asObservable()}start(e,t={}){const i=t.validator||this.defaultValidator;let n=[];if(Array.isArray(e))n=this.transformUploads(e,i),this.uploads$.next(this.uploads$.value.concat(n)),this.uploadsAdded$.next(n);else{const t=this.uploads$.value.map(t=>{if(e[t.id]){const s=this.transformUploads([e[t.id]],i,t.id)[0];return n.push(s),s}return t});this.uploads$.next(t)}return this.updateCount(),(0,c.D)(n.filter(e=>!e.error$.value)).pipe((0,p.zg)(e=>this.api.upload(e.uploadedFile,t).pipe((0,u.K)(n=>(this.handleUploadFailure(n,e,i),t.bubbleError?(0,l._)(n):d.E)),(0,h.R)(e.canceled$),(0,g.U)(i=>(this.handleUploadEvent(i,e,t.willProcessFiles),i.name===m.b.COMPLETED&&(i.body.queueItemId=e.id),i))),1),(0,f.h)(e=>e.name===m.b.COMPLETED),(0,g.U)(e=>e.body))}updateProgress(e,t){const i=this.find(e);i&&(i.setProgress({eta:t.eta,speed:t.speed,percentage:t.progress,totalBytes:t.totalBytes,completedBytes:t.completedBytes}),this.updateTotalProgress())}completeUpload(e,t){const i=this.find(e);i&&(i.uploadedResponse$.next(t),i.fileEntry=t.fileEntry,i.complete(),this.updateTotalProgress())}errorUpload(e,t){this.find(e).addError(t)}reset(){this.uploads$.value.forEach(e=>e.cancel()),this.uploads$.next([])}remove(e){const t=this.uploads$.value.findIndex(t=>t.id===e),i=this.uploads$.value[t];i.completed?i.finalize():i.cancel(),this.uploads$.value.splice(t,1),this.uploads$.next(this.uploads$.value)}find(e){return this.uploads$.value.find(t=>t.id===e)}transformUploads(e,t,i){return e.map(e=>{const n=new a(e,i);if(t){const i=t.validate(e);i.failed&&n.addError(i.errorMessage)}return n})}handleUploadEvent(e,t,i=!1){e.name===m.b.PROGRESS?(100===e.progress&&(e=Object.assign(Object.assign({},e),{progress:99}),i&&t.processing$.next(!0)),this.updateProgress(t.id,e)):e.name===m.b.COMPLETED&&(this.completeUpload(t.id,e.body),this.updateCount())}handleUploadFailure(e,t,i){var n;let s=null===(n=null==e?void 0:e.errors)||void 0===n?void 0:n.file,r=null;s||(s=v.v.DefaultUpload,r=this.currentUser.isAdmin()&&!this.settings.get("site.hide_docs_buttons")),this.errorUpload(t.id,s),this.updateCount(),this.updateTotalProgress(),i.showToast&&this.toast.open(s,{action:r?"Learn More":null}).onAction().subscribe(()=>{window.open(v.h)})}updateCount(){const e=this.uploads$.value.filter(e=>e.inProgress).length;this.count$.next({pending:e,completed:this.uploads$.value.length-e})}}return e.\u0275fac=function(t){return new(t||e)(b.LFG(w.f),b.LFG(A),b.LFG(Z.F),b.LFG(O.I),b.LFG(S.Z))},e.\u0275prov=b.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},66705:function(e,t,i){"use strict";i.d(t,{z:function(){return c}});var n=i(38583),s=i(51095),r=i(76627),o=i(12178),a=i(37716);let c=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=a.oAB({type:e}),e.\u0275inj=a.cJS({imports:[[n.ez,s.ot,o.Cv,r.Ps]]}),e})()},63412:function(e,t,i){"use strict";function n(e,t){const i=document.createElement("a");i.href=e,t&&(i.download=t),document.body.appendChild(i),i.click(),document.body.removeChild(i)}i.d(t,{k:function(){return n}})},45746:function(e,t,i){"use strict";i.d(t,{G:function(){return s}});var n=i(26232);class s extends n.y{constructor(e,t){super(),this.params=e,this.i18n=t,this.errorMessage=this.i18n.t("Only these file types are allowed: :extensions",{extensions:this.params.extensions.join(", ")})}fails(e){return!this.params.extensions.some(t=>t.toLowerCase()===e.extension.toLowerCase())}}},43256:function(e,t,i){"use strict";i.d(t,{u:function(){return s}});var n=i(26232);class s extends n.y{constructor(e,t){super(),this.params=e,this.i18n=t,this.errorMessage=this.i18n.t("These file types are not allowed: :extensions",{extensions:this.params.extensions.join(", ")})}fails(e){return this.params.extensions.some(t=>t===e.extension)}}},12414:function(e,t,i){"use strict";i.d(t,{F:function(){return n}});const n=new(i(37716).OlP)("WORKSPACE_CONFIG")},87991:function(e,t,i){"use strict";i.d(t,{b:function(){return f}});var n=i(93342),s=i(45435),r=i(26215),o=i(24162),a=i(81769),c=i(37716),l=i(90299),d=i(24688),p=i(58092),u=i(99665),h=i(35718);const g={name:"Default",default:!0,id:null};let f=(()=>{class e{constructor(e,t,i,n,s){this.http=e,this.currentUser=t,this.cookie=i,this.notifications=n,this.toast=s,this.available$=new r.X([g]),this.activeId$=new r.X(this.getIdFromCookie()),this.activeWorkspace$=new r.X(this.getIdFromCookie()?null:g)}currentUserCan(e){var t;const i=null===(t=this.activeWorkspace$.value)||void 0===t?void 0:t.currentUser;return i&&(i.is_owner||i.permissions.findIndex(t=>t.name===e)>-1)}select(e){e!==this.activeId$.value&&(this.cookie.set(this.cookieName(),e),this.activeId$.next(e));const t=this.available$.value.find(e=>e.id===this.activeId$.value);this.activeWorkspace$.next(t||this.available$.value[0])}pushAndSelect(e){this.available$.next([...this.available$.value,e]),this.select(e.id)}replace(e){const t=[...this.available$.value],i=t.findIndex(t=>t.id===e.id);i&&(t[i]=e),this.available$.next(t)}remove(e){const t=[...this.available$.value];e.forEach(e=>{const i=t.findIndex(t=>t.id===e);i&&t.splice(i,1)}),this.available$.next(t),e.includes(this.activeId$.value)&&this.select(null)}indexUserWorkspaces(){return this.http.get(`me/${e.BASE_URI}s`).pipe((0,n.b)(e=>{this.available$.next([...this.available$.value,...e.workspaces]),this.select(this.activeId$.value)}))}get(t){return this.http.get(`${e.BASE_URI}/${t}`)}delete(t){return this.http.delete(`${e.BASE_URI}/${t}`).pipe((0,n.b)(()=>{this.remove(t)}))}create(t){return this.http.post(`${e.BASE_URI}`,t).pipe((0,n.b)(e=>this.pushAndSelect(e.workspace)))}update(t,i){return this.http.put(`${e.BASE_URI}/${t}`,i).pipe((0,n.b)(e=>this.replace(e.workspace)))}invitePeople(t,i){return this.http.post(`${e.BASE_URI}/${t}/invite`,i)}resendInvite(t,i){return this.http.post(`${e.BASE_URI}/${t}/${i}/resend`)}deleteMember(t,i){return this.http.delete(`${e.BASE_URI}/${t}/member/${i}`).pipe((0,n.b)(()=>{i===this.currentUser.get("id")&&this.remove([t])}))}deleteInvite(t){return this.http.delete(`${e.BASE_URI}/invite/${t}`)}changeRole(t,i,n){const s=(0,o.w)("member_id",i)?i.member_id:i.id;return this.http.post(`${e.BASE_URI}/${t}/${i.model_type}/${s}/change-role`,{roleId:n})}join(e){return this.http.get(`workspace/join/${e}`)}bindToNotificationClick(){return this.notifications.clickedOnNotification$.pipe((0,s.h)(e=>"Common\\Workspaces\\Notifications\\WorkspaceInvitation"===e.notification.type)).subscribe(e=>{const t=e.notification.data.inviteId;"join"===e.action.action?this.join(t).subscribe(t=>{this.notifications.delete([e.notification]).subscribe(),this.pushAndSelect(t.workspace),this.toast.open("Joined workspace.")},t=>{this.handleWorkspaceInviteClickError(t,e.notification)}):"decline"===e.action.action&&this.deleteInvite(t).subscribe(()=>{this.notifications.delete([e.notification]).subscribe(),this.toast.open("Declined workspace invite.")},t=>{this.handleWorkspaceInviteClickError(t,e.notification)})})}handleWorkspaceInviteClickError(e,t){404===e.status?(this.notifications.delete([t]).subscribe(),this.toast.open("That invite is no longer valid.")):this.toast.open(a.v.Default)}getIdFromCookie(){let e=this.cookie.get(this.cookieName());return e="string"==typeof e?parseInt(e):e,isNaN(e)?null:e}cookieName(){return`${this.currentUser.get("id")}_activeWorkspace`}}return e.BASE_URI="workspace",e.\u0275fac=function(t){return new(t||e)(c.LFG(l.r),c.LFG(d.I),c.LFG(p.N),c.LFG(u.g),c.LFG(h.F))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()}}]); //# sourceMappingURL=936-es2015.4c349652cd92731bb447.js.map