-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path5137.8d07c0201b613ca7.js
1 lines (1 loc) · 119 KB
/
5137.8d07c0201b613ca7.js
1
"use strict";(self.webpackChunkmaterial_angular_io=self.webpackChunkmaterial_angular_io||[]).push([[5137],{2141:(rt,Se,w)=>{w.d(Se,{Lb:()=>Ce,Zb:()=>_e,P$:()=>y,Ej:()=>ge,gC:()=>E,aq:()=>i,Zf:()=>x,Y5:()=>d,qv:()=>h,br:()=>z,VT:()=>Ve,I$:()=>I,N2:()=>F});var s=w(5879),t=w(2079),M=w(4813),ve=w(3291),V=w(4699),S=w(9016),c=w(1280),H=w(8594),L=w(6124);function ae(u,v,a){return a?ae(u,v).pipe((0,L.U)(_=>(0,c.k)(_)?a(..._):a(_))):new V.y(_=>{const C=(...Z)=>_.next(1===Z.length?Z[0]:Z);let R;try{R=u(C)}catch(Z){return void _.error(Z)}if((0,H.m)(v))return()=>v(C,R)})}var ye=w(7354),le=w(2068),X=w(3075),Y=w(9185),G=w(7734),Ae=w(5434),O=w(6434),q=w(6776),Ee=w(4521),ee=w(1418),N=w(9352),$=w(4014),te=w(254),ce=w(435);const be={leading:!0,trailing:!1};class we{constructor(v,a,_,C){this.duration=v,this.scheduler=a,this.leading=_,this.trailing=C}call(v,a){return a.subscribe(new he(v,this.duration,this.scheduler,this.leading,this.trailing))}}class he extends te.L{constructor(v,a,_,C,R){super(v),this.duration=a,this.scheduler=_,this.leading=C,this.trailing=R,this._hasTrailingValue=!1,this._trailingValue=null}_next(v){this.throttled?this.trailing&&(this._trailingValue=v,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(De,this.duration,{subscriber:this})),this.leading?this.destination.next(v):this.trailing&&(this._trailingValue=v,this._hasTrailingValue=!0))}_complete(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}clearThrottle(){const v=this.throttled;v&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),v.unsubscribe(),this.remove(v),this.throttled=null)}}function De(u){const{subscriber:v}=u;v.clearThrottle()}var oe=w(5705),Te=w(7279),He=w(8835);class ke{constructor(v,a){this.observables=v,this.project=a}call(v,a){return a.subscribe(new Oe(v,this.observables,this.project))}}class Oe extends Te.L{constructor(v,a,_){super(v),this.observables=a,this.project=_,this.toRespond=[];const C=a.length;this.values=new Array(C);for(let R=0;R<C;R++)this.toRespond.push(R);for(let R=0;R<C;R++)this.add((0,He.D)(this,a[R],void 0,R))}notifyNext(v,a,_){this.values[_]=a;const C=this.toRespond;if(C.length>0){const R=C.indexOf(_);-1!==R&&C.splice(R,1)}}notifyComplete(){}_next(v){if(0===this.toRespond.length){const a=[v,...this.values];this.project?this._tryProject(a):this.destination.next(a)}}_tryProject(v){let a;try{a=this.project.apply(this,v)}catch(_){return void this.destination.error(_)}this.destination.next(a)}}var ie=w(6223),pe=w(9388),re=w(6028),J=w(748),de=w(8484),U=w(4300),me=w(6672),Me=w(6814);const I=".cdk-cell, .mat-cell, td",A=".cdk-popover-edit-cell, .mat-popover-edit-cell",T=".cdk-row, .mat-row, tr",Re="table, cdk-table, mat-table",Le="cdk-edit-pane",Ye=`.${Le}, .mat-edit-pane`;function F(u,v){if(!(u instanceof Node))return null;let a=u;for(;null!=a&&!(a instanceof Element);)a=a.parentNode;return a?.closest(v)??null}let Q=(()=>{class u{get editRef(){return this._editRef}constructor(a){this._ngZone=a,this.editing=new t.xQ,this.hovering=new t.xQ,this.focused=new t.xQ,this.allRows=new t.xQ,this.mouseMove=new t.xQ,this.disabledCells=new WeakMap,this._editRef=null,this._distinctUntilChanged=(0,le.x)(),this._startWithNull=(0,X.O)(null),this._distinctShare=(0,M.z)(this._distinctUntilChanged,(0,Y.d)(1)),this._startWithNullDistinct=(0,M.z)(this._startWithNull,this._distinctUntilChanged),this.editingAndEnabled=this.editing.pipe((0,G.h)(_=>null==_||!this.disabledCells.has(_)),(0,Y.d)(1)),this.editingOrFocused=(0,ve.aj)([this.editingAndEnabled.pipe((0,L.U)(_=>F(_,T)),this._startWithNull),this.focused.pipe(this._startWithNull)]).pipe((0,L.U)(([_,C])=>C||_),this._distinctUntilChanged,(0,Ae.e)(0),this._distinctUntilChanged,(0,Y.d)(1)),this._rowsWithHoverContent=new WeakMap,this._currentlyEditing=null,this._hoveredContentStateDistinct=(0,ve.aj)([this._getFirstRowWithHoverContent(),this._getLastRowWithHoverContent(),this.editingOrFocused,this.hovering.pipe((0,le.x)(),(0,O.U)(_=>this.mouseMove.pipe((0,G.h)(C=>_===C),this._startWithNull,(0,q.b)(40))),this._startWithNullDistinct)]).pipe((0,Ee.T)(1),(0,L.U)(We),(0,le.x)(Ne),this._enterZone(),(0,Y.d)(1)),this._editingAndEnabledDistinct=this.editingAndEnabled.pipe((0,le.x)(),this._enterZone(),(0,Y.d)(1)),this._lastSeenRow=null,this._lastSeenRowHoverOrFocus=null,this._editingAndEnabledDistinct.subscribe(_=>{this._currentlyEditing=_})}editingCell(a){let _=null;return this._editingAndEnabledDistinct.pipe((0,L.U)(C=>C===(_||(_=F(a,I)))),this._distinctUntilChanged)}doneEditingCell(a){const _=F(a,I);this._currentlyEditing===_&&this.editing.next(null)}setActiveEditRef(a){this._editRef=a}unsetActiveEditRef(a){this._editRef===a&&(this._editRef=null)}registerRowWithHoverContent(a){this._rowsWithHoverContent.set(a,(this._rowsWithHoverContent.get(a)||0)+1)}deregisterRowWithHoverContent(a){const _=this._rowsWithHoverContent.get(a)||0;_<=1?this._rowsWithHoverContent.delete(a):this._rowsWithHoverContent.set(a,_-1)}hoverOrFocusOnRow(a){return a!==this._lastSeenRow&&(this._lastSeenRow=a,this._lastSeenRowHoverOrFocus=this._hoveredContentStateDistinct.pipe((0,L.U)(_=>_.get(a)||0),this._distinctShare)),this._lastSeenRowHoverOrFocus}_enterZone(){return a=>new V.y(_=>a.subscribe({next:C=>this._ngZone.run(()=>_.next(C)),error:C=>_.error(C),complete:()=>_.complete()}))}_getFirstRowWithHoverContent(){return this._mapAllRowsToSingleRow(a=>{for(let C,_=0;C=a[_];_++)if(this._rowsWithHoverContent.has(C))return C;return null})}_getLastRowWithHoverContent(){return this._mapAllRowsToSingleRow(a=>{for(let C,_=a.length-1;C=a[_];_--)if(this._rowsWithHoverContent.has(C))return C;return null})}_mapAllRowsToSingleRow(a){return this.allRows.pipe((0,L.U)(a),this._startWithNullDistinct)}}return u.\u0275fac=function(a){return new(a||u)(s.LFG(s.R0b))},u.\u0275prov=s.Yz7({token:u,factory:u.\u0275fac}),u})();function We([u,v,a,_]){const C=new Map;for(const R of[u,v,a&&a.previousElementSibling,a&&a.nextElementSibling])R&&C.set(R,1);for(const R of[a,_])R&&C.set(R,2);return C}function Ne(u,v){if(u.size!==v.size)return!1;for(const a of Array.from(u.keys()))if(v.get(a)!==u.get(a))return!1;return!0}let z=(()=>{class u{constructor(a,_,C){this._form=a,this._editEventDispatcher=_,this._ngZone=C,this._finalValueSubject=new t.xQ,this.finalValue=this._finalValueSubject,this._blurredSubject=new t.xQ,this.blurred=this._blurredSubject,this._editEventDispatcher.setActiveEditRef(this)}init(a){this._ngZone.onStable.pipe((0,ee.q)(1)).subscribe(()=>{this.updateRevertValue(),a&&this.reset(a)})}ngOnDestroy(){this._editEventDispatcher.unsetActiveEditRef(this),this._finalValueSubject.next(this._form.value),this._finalValueSubject.complete()}isValid(){return this._form.valid}updateRevertValue(){this._revertFormValue=this._form.value}close(){this._editEventDispatcher.editing.next(null)}blur(){this._blurredSubject.next()}reset(a){this._form.reset(a||this._revertFormValue)}}return u.\u0275fac=function(a){return new(a||u)(s.LFG(ie.gN,2),s.LFG(Q),s.LFG(s.R0b))},u.\u0275prov=s.Yz7({token:u,factory:u.\u0275fac}),u})(),Pe=(()=>{class u{constructor(a){this.directionality=a,this.keyObserver={next:_=>this.handleKeyboardEvent(_)}}moveFocusHorizontally(a,_){const C=Array.from(F(a,Re).querySelectorAll(A)),Z=C.indexOf(a)+_;C[Z]&&C[Z].focus()}moveFocusVertically(a,_){const C=F(a,T),R=Array.from(F(C,Re).querySelectorAll(T)),Z=R.indexOf(C),K=Array.from(C.querySelectorAll(A)).indexOf(a),P=Z+_;if(R[P]){const j=Array.from(R[P].querySelectorAll(A));j[K]&&j[K].focus()}}handleKeyboardEvent(a){const _=F(a.target,A);if(_){switch(a.keyCode){case re.LH:this.moveFocusVertically(_,-1);break;case re.JH:this.moveFocusVertically(_,1);break;case re.oh:this.moveFocusHorizontally(_,"ltr"===this.directionality.value?-1:1);break;case re.SV:this.moveFocusHorizontally(_,"ltr"===this.directionality.value?1:-1);break;default:return}a.preventDefault()}}}return u.\u0275fac=function(a){return new(a||u)(s.LFG(pe.Is))},u.\u0275prov=s.Yz7({token:u,factory:u.\u0275fac,providedIn:"root"}),u})();class Ve{constructor(){this._formValues=new WeakMap}for(v){const a=this._formValues;let _=a.get(v);return _||(_={},a.set(v,_)),_}}let _e=(()=>{class u{constructor(a,_){this.elementRef=a,this.editRef=_,this.destroyed=new t.xQ,this.clickOutBehavior="close",this.preservedFormValueChange=new s.vpe,this.ignoreSubmitUnlessValid=!0}ngOnInit(){this.editRef.init(this.preservedFormValue),this.editRef.finalValue.subscribe(this.preservedFormValueChange),this.editRef.blurred.subscribe(()=>this._handleBlur())}ngOnDestroy(){this.destroyed.next(),this.destroyed.complete()}handleFormSubmit(){this.ignoreSubmitUnlessValid&&!this.editRef.isValid()||(this.editRef.updateRevertValue(),this.editRef.close())}close(){this.editRef.close()}handlePossibleClickOut(a){if(!F(a.target,Ye))switch(this.clickOutBehavior){case"submit":this._triggerFormSubmit(),this.editRef.close();break;case"close":this.editRef.close()}}_handleKeydown(a){"Escape"===a.key&&!(0,re.Vb)(a)&&(this.close(),a.preventDefault())}_handleBlur(){"submit"===this.clickOutBehavior&&this._triggerFormSubmit()}_triggerFormSubmit(){this.elementRef.nativeElement.dispatchEvent(new Event("submit"))}}return u.\u0275fac=function(a){return new(a||u)(s.Y36(s.SBq),s.Y36(z))},u.\u0275dir=s.lG2({type:u,selectors:[["form","cdkEditControl",""]],hostBindings:function(a,_){1&a&&s.NdJ("ngSubmit",function(){return _.handleFormSubmit()})("click",function(R){return _.handlePossibleClickOut(R)},!1,s.evT)("keydown",function(R){return _._handleKeydown(R)})},inputs:{clickOutBehavior:["cdkEditControlClickOutBehavior","clickOutBehavior"],preservedFormValue:["cdkEditControlPreservedFormValue","preservedFormValue"],ignoreSubmitUnlessValid:["cdkEditControlIgnoreSubmitUnlessValid","ignoreSubmitUnlessValid"]},outputs:{preservedFormValueChange:"cdkEditControlPreservedFormValueChange"},features:[s._Bn([z])]}),u})(),ge=(()=>{class u{constructor(a){this.editRef=a,this.type="button"}revertEdit(){this.editRef.reset()}}return u.\u0275fac=function(a){return new(a||u)(s.Y36(z))},u.\u0275dir=s.lG2({type:u,selectors:[["button","cdkEditRevert",""]],hostAttrs:["type","button"],hostBindings:function(a,_){1&a&&s.NdJ("click",function(){return _.revertEdit()})},inputs:{type:"type"}}),u})(),Ce=(()=>{class u{constructor(a,_){this.elementRef=a,this.editRef=_;const C=a.nativeElement;"BUTTON"===C.nodeName&&!C.getAttribute("type")&&C.setAttribute("type","button")}closeEdit(){this.editRef.close()}}return u.\u0275fac=function(a){return new(a||u)(s.Y36(s.SBq),s.Y36(z))},u.\u0275dir=s.lG2({type:u,selectors:[["","cdkEditClose",""]],hostBindings:function(a,_){1&a&&s.NdJ("click",function(){return _.closeEdit()})("keydown.enter",function(){return _.closeEdit()})("keydown.space",function(){return _.closeEdit()})}}),u})(),Ue=(()=>{class u{}return u.\u0275fac=function(a){return new(a||u)},u.\u0275prov=s.Yz7({token:u,factory:u.\u0275fac}),u})(),qe=(()=>{class u extends Ue{constructor(a,_){super(),this.direction=a,this.overlay=_}positionStrategyForCells(a){return this.overlay.position().flexibleConnectedTo(a[0]).withGrowAfterOpen().withPush().withViewportMargin(16).withPositions([{originX:"start",originY:"top",overlayX:"start",overlayY:"top"}])}sizeConfigForCells(a){if(0===a.length)return{};if(1===a.length)return{width:a[0].getBoundingClientRect().width};let _,C;return"ltr"===this.direction.value?(_=a[0],C=a[a.length-1]):(C=a[0],_=a[a.length-1]),{width:C.getBoundingClientRect().right-_.getBoundingClientRect().left}}}return u.\u0275fac=function(a){return new(a||u)(s.LFG(pe.Is),s.LFG(J.aV))},u.\u0275prov=s.Yz7({token:u,factory:u.\u0275fac}),u})(),se=(()=>{class u{constructor(a,_,C,R,Z,K,P,j,Ze){this.directionality=a,this.editEventDispatcher=_,this.focusDispatcher=C,this.focusTrapFactory=R,this.ngZone=Z,this.overlay=K,this.positionFactory=P,this.scrollDispatcher=j,this.viewportRuler=Ze}}return u.\u0275fac=function(a){return new(a||u)(s.LFG(pe.Is),s.LFG(Q),s.LFG(Pe),s.LFG(U.qV),s.LFG(s.R0b),s.LFG(J.aV),s.LFG(Ue),s.LFG(me.mF),s.LFG(me.rL))},u.\u0275prov=s.Yz7({token:u,factory:u.\u0275fac}),u})();class f extends U.iQ{constructor(v,a,_,C){super(v,a,_,C,!0),this._escapeSubject=new t.xQ,this.startAnchorListener=()=>(this._escapeSubject.next(0),!0),this.endAnchorListener=()=>(this._escapeSubject.next(1),!0),this.attachAnchors()}escapes(){return this._escapeSubject}}let b=(()=>{class u{constructor(a,_,C){this._checker=a,this._ngZone=_,this._document=C}create(a){return new f(a,this._checker,this._ngZone,this._document)}}return u.\u0275fac=function(a){return new(a||u)(s.LFG(U.ic),s.LFG(s.R0b),s.LFG(Me.K0))},u.\u0275prov=s.Yz7({token:u,factory:u.\u0275fac,providedIn:"root"}),u})(),E=(()=>{class u{constructor(a,_,C,R){this.elementRef=a,this.editEventDispatcher=_,this.focusDispatcher=C,this.ngZone=R,this.destroyed=new t.xQ}ngAfterViewInit(){this._listenForTableEvents()}ngOnDestroy(){this.destroyed.next(),this.destroyed.complete()}_listenForTableEvents(){const a=this.elementRef.nativeElement,_=C=>(0,L.U)(R=>F(R.target,C));this.ngZone.runOutsideAngular(()=>{(0,S.R)(a,"mouseover").pipe(_(T),(0,N.R)(this.destroyed)).subscribe(this.editEventDispatcher.hovering),(0,S.R)(a,"mouseleave").pipe((0,$.h)(null),(0,N.R)(this.destroyed)).subscribe(this.editEventDispatcher.hovering),(0,S.R)(a,"mousemove").pipe(function ne(u,v=ce.P,a=be){return _=>_.lift(new we(u,v,a.leading,a.trailing))}(10),_(T),(0,N.R)(this.destroyed)).subscribe(this.editEventDispatcher.mouseMove),ae(C=>a.addEventListener("focus",C,!0),C=>a.removeEventListener("focus",C,!0)).pipe(_(T),(0,oe.B)(),(0,N.R)(this.destroyed)).subscribe(this.editEventDispatcher.focused),(0,ye.T)(ae(C=>a.addEventListener("blur",C,!0),C=>a.removeEventListener("blur",C,!0)),(0,S.R)(a,"keydown").pipe((0,G.h)(C=>"Escape"===C.key))).pipe((0,$.h)(null),(0,oe.B)(),(0,N.R)(this.destroyed)).subscribe(this.editEventDispatcher.focused),this.ngZone.onStable.pipe(function fe(...u){return v=>{let a;return"function"==typeof u[u.length-1]&&(a=u.pop()),v.lift(new ke(u,a))}}(this.editEventDispatcher.editingOrFocused),(0,G.h)(([C,R])=>null==R),(0,L.U)(()=>a.querySelectorAll(T)),(0,oe.B)(),(0,N.R)(this.destroyed)).subscribe(this.editEventDispatcher.allRows),(0,S.R)(a,"keydown").pipe((0,G.h)(C=>"Enter"===C.key),_(I),(0,N.R)(this.destroyed)).subscribe(this.editEventDispatcher.editing),(0,S.R)(a,"keydown").pipe((0,N.R)(this.destroyed)).subscribe(this.focusDispatcher.keyObserver)})}}return u.\u0275fac=function(a){return new(a||u)(s.Y36(s.SBq),s.Y36(Q),s.Y36(Pe),s.Y36(s.R0b))},u.\u0275dir=s.lG2({type:u,selectors:[["table","editable",""],["cdk-table","editable",""],["mat-table","editable",""]],features:[s._Bn([Q,se])]}),u})(),i=(()=>{class u{get colspan(){return this._colspan}set colspan(a){this._colspan=a,this.overlayRef&&(this.overlayRef.updatePositionStrategy(this._getPositionStrategy()),this.overlayRef.hasAttached()&&this._updateOverlaySize())}get disabled(){return this._disabled}set disabled(a){this._disabled=a,a?(this.services.editEventDispatcher.doneEditingCell(this.elementRef.nativeElement),this.services.editEventDispatcher.disabledCells.set(this.elementRef.nativeElement,!0)):this.services.editEventDispatcher.disabledCells.delete(this.elementRef.nativeElement)}constructor(a,_,C){this.services=a,this.elementRef=_,this.viewContainerRef=C,this.template=null,this._colspan={},this._disabled=!1,this.destroyed=new t.xQ}ngAfterViewInit(){this._startListeningToEditEvents()}ngOnDestroy(){this.destroyed.next(),this.destroyed.complete(),this.focusTrap&&(this.focusTrap.destroy(),this.focusTrap=void 0),this.overlayRef&&this.overlayRef.dispose()}initFocusTrap(){this.focusTrap=this.services.focusTrapFactory.create(this.overlayRef.overlayElement)}closeEditOverlay(){this.services.editEventDispatcher.doneEditingCell(this.elementRef.nativeElement)}panelClass(){return Le}_startListeningToEditEvents(){this.services.editEventDispatcher.editingCell(this.elementRef.nativeElement).pipe((0,N.R)(this.destroyed)).subscribe(a=>{a&&this.template?(this.overlayRef||this._createEditOverlay(),this._showEditOverlay()):this.overlayRef&&(this._maybeReturnFocusToCell(),this.overlayRef.detach())})}_createEditOverlay(){this.overlayRef=this.services.overlay.create({disposeOnNavigation:!0,panelClass:this.panelClass(),positionStrategy:this._getPositionStrategy(),scrollStrategy:this.services.overlay.scrollStrategies.reposition(),direction:this.services.directionality}),this.initFocusTrap(),this.overlayRef.overlayElement.setAttribute("aria-role","dialog"),this.overlayRef.detachments().subscribe(()=>this.closeEditOverlay())}_showEditOverlay(){this.overlayRef.attach(new de.UE(this.template,this.viewContainerRef,{$implicit:this.context})),this.services.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.focusTrap.focusInitialElement()})}),(0,ye.T)(this.services.scrollDispatcher.scrolled(),this.services.viewportRuler.change()).pipe((0,X.O)(null),(0,N.R)((0,ye.T)(this.overlayRef.detachments(),this.destroyed))).subscribe(()=>{this._updateOverlaySize()})}_getOverlayCells(){const a=F(this.elementRef.nativeElement,I);if(!this._colspan.before&&!this._colspan.after)return[a];const _=F(this.elementRef.nativeElement,T),C=Array.from(_.querySelectorAll(I)),R=C.indexOf(a);return C.slice(R-(this._colspan.before||0),R+(this._colspan.after||0)+1)}_getPositionStrategy(){return this.services.positionFactory.positionStrategyForCells(this._getOverlayCells())}_updateOverlaySize(){this.overlayRef.updateSize(this.services.positionFactory.sizeConfigForCells(this._getOverlayCells()))}_maybeReturnFocusToCell(){F(document.activeElement,Ye)===this.overlayRef.overlayElement&&this.elementRef.nativeElement.focus()}}return u.\u0275fac=function(a){return new(a||u)(s.Y36(se),s.Y36(s.SBq),s.Y36(s.s_b))},u.\u0275dir=s.lG2({type:u,selectors:[["","cdkPopoverEdit","",3,"cdkPopoverEditTabOut",""]],hostAttrs:[1,"cdk-popover-edit-cell"],hostVars:2,hostBindings:function(a,_){2&a&&s.uIk("tabindex",_.disabled?null:0)("aria-haspopup",!_.disabled)},inputs:{template:["cdkPopoverEdit","template"],context:["cdkPopoverEditContext","context"],colspan:["cdkPopoverEditColspan","colspan"],disabled:["cdkPopoverEditDisabled","disabled"]}}),u})(),d=(()=>{class u extends i{constructor(a,_,C,R){super(C,a,_),this.focusEscapeNotifierFactory=R,this.focusTrap=void 0}initFocusTrap(){this.focusTrap=this.focusEscapeNotifierFactory.create(this.overlayRef.overlayElement),this.focusTrap.escapes().pipe((0,N.R)(this.destroyed)).subscribe(a=>{this.services.editEventDispatcher.editRef?.blur(),this.services.focusDispatcher.moveFocusHorizontally(F(this.elementRef.nativeElement,I),0===a?-1:1),this.closeEditOverlay()})}}return u.\u0275fac=function(a){return new(a||u)(s.Y36(s.SBq),s.Y36(s.s_b),s.Y36(se),s.Y36(b))},u.\u0275dir=s.lG2({type:u,selectors:[["","cdkPopoverEdit","","cdkPopoverEditTabOut",""]],hostAttrs:[1,"cdk-popover-edit-cell"],hostVars:2,hostBindings:function(a,_){2&a&&s.uIk("tabindex",_.disabled?null:0)("aria-haspopup",!_.disabled)},inputs:{template:["cdkPopoverEdit","template"],context:["cdkPopoverEditContext","context"],colspan:["cdkPopoverEditColspan","colspan"],disabled:["cdkPopoverEditDisabled","disabled"]},features:[s.qOj]}),u})(),h=(()=>{class u{constructor(a,_,C,R){this.services=a,this.elementRef=_,this.templateRef=C,this.viewContainerRef=R,this.destroyed=new t.xQ,this.viewRef=null}ngAfterViewInit(){this._row=F(this.elementRef.nativeElement,T),this.services.editEventDispatcher.registerRowWithHoverContent(this._row),this._listenForHoverAndFocusEvents()}ngOnDestroy(){this.destroyed.next(),this.destroyed.complete(),this.viewRef&&this.viewRef.destroy(),this._row&&this.services.editEventDispatcher.deregisterRowWithHoverContent(this._row)}initElement(a){}makeElementHiddenButFocusable(a){a.style.opacity="0"}makeElementVisible(a){a.style.opacity=""}_listenForHoverAndFocusEvents(){this.services.editEventDispatcher.hoverOrFocusOnRow(this._row).pipe((0,N.R)(this.destroyed)).subscribe(a=>{2===a||1===a?(this.viewRef?-1===this.viewContainerRef.indexOf(this.viewRef)&&(this.viewContainerRef.insert(this.viewRef),this.viewRef.markForCheck()):(this.viewRef=this.viewContainerRef.createEmbeddedView(this.templateRef,{}),this.initElement(this.viewRef.rootNodes[0]),this.viewRef.markForCheck()),2===a?this.makeElementVisible(this.viewRef.rootNodes[0]):this.makeElementHiddenButFocusable(this.viewRef.rootNodes[0])):this.viewRef&&this.viewContainerRef.detach(this.viewContainerRef.indexOf(this.viewRef))})}}return u.\u0275fac=function(a){return new(a||u)(s.Y36(se),s.Y36(s.SBq),s.Y36(s.Rgc),s.Y36(s.s_b))},u.\u0275dir=s.lG2({type:u,selectors:[["","cdkRowHoverContent",""]]}),u})(),y=(()=>{class u{constructor(a,_){this.elementRef=a,this.editEventDispatcher=_;const C=a.nativeElement;"BUTTON"===C.nodeName&&!C.getAttribute("type")&&C.setAttribute("type","button")}openEdit(a){this.editEventDispatcher.editing.next(F(this.elementRef.nativeElement,I)),a.stopPropagation()}}return u.\u0275fac=function(a){return new(a||u)(s.Y36(s.SBq),s.Y36(Q))},u.\u0275dir=s.lG2({type:u,selectors:[["","cdkEditOpen",""]],hostBindings:function(a,_){1&a&&s.NdJ("click",function(R){return _.openEdit(R)})}}),u})(),x=(()=>{class u{}return u.\u0275fac=function(a){return new(a||u)},u.\u0275mod=s.oAB({type:u}),u.\u0275inj=s.cJS({providers:[{provide:Ue,useClass:qe}],imports:[J.U8]}),u})()},4643:(rt,Se,w)=>{w.d(Se,{$E:()=>ge,Af:()=>ne,D5:()=>te,FT:()=>_e,HT:()=>E,Hx:()=>b,Kb:()=>U,O_:()=>$,QJ:()=>we,Sq:()=>de,T$:()=>Ve,Z4:()=>ce,_J:()=>I,bH:()=>Ce,fe:()=>J,fo:()=>W,hD:()=>he,m$:()=>Pe,nl:()=>oe,oF:()=>Te,pF:()=>z,pN:()=>ee,qM:()=>Me,r2:()=>A,s$:()=>ie,xN:()=>me,zC:()=>se});var s=w(9388),t=w(2495),M=w(8337),ve=w(2831),V=w(6672),S=w(6814),c=w(5879),H=w(2079),L=w(5253),ae=w(5125),ye=w(5363),le=w(9193),X=w(9352),Y=w(1418);const G=[[["caption"]],[["colgroup"],["col"]]],Ae=["caption","colgroup, col"];function O(l,p){if(1&l&&(c.TgZ(0,"th",3),c._uU(1),c.qZA()),2&l){const i=c.oxw();c.Udp("text-align",i.justify),c.xp6(1),c.hij(" ",i.headerText," ")}}function q(l,p){if(1&l&&(c.TgZ(0,"td",4),c._uU(1),c.qZA()),2&l){const i=p.$implicit,d=c.oxw();c.Udp("text-align",d.justify),c.xp6(1),c.hij(" ",d.dataAccessor(i,d.name)," ")}}function Ee(l){return class extends l{get sticky(){return this._sticky}set sticky(p){const i=this._sticky;this._sticky=(0,t.Ig)(p),this._hasStickyChanged=i!==this._sticky}hasStickyChanged(){const p=this._hasStickyChanged;return this._hasStickyChanged=!1,p}resetStickyChanged(){this._hasStickyChanged=!1}constructor(...p){super(...p),this._sticky=!1,this._hasStickyChanged=!1}}}const ee=new c.OlP("CDK_TABLE"),N=new c.OlP("text-column-options");let $=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(c.Rgc))},l.\u0275dir=c.lG2({type:l,selectors:[["","cdkCellDef",""]]}),l})(),te=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(c.Rgc))},l.\u0275dir=c.lG2({type:l,selectors:[["","cdkHeaderCellDef",""]]}),l})(),ce=(()=>{class l{constructor(i){this.template=i}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(c.Rgc))},l.\u0275dir=c.lG2({type:l,selectors:[["","cdkFooterCellDef",""]]}),l})();class be{}const Be=Ee(be);let W=(()=>{class l extends Be{get name(){return this._name}set name(i){this._setNameInput(i)}get stickyEnd(){return this._stickyEnd}set stickyEnd(i){const d=this._stickyEnd;this._stickyEnd=(0,t.Ig)(i),this._hasStickyChanged=d!==this._stickyEnd}constructor(i){super(),this._table=i,this._stickyEnd=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(i){i&&(this._name=i,this.cssClassFriendlyName=i.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(ee,8))},l.\u0275dir=c.lG2({type:l,selectors:[["","cdkColumnDef",""]],contentQueries:function(i,d,h){if(1&i&&(c.Suo(h,$,5),c.Suo(h,te,5),c.Suo(h,ce,5)),2&i){let y;c.iGM(y=c.CRH())&&(d.cell=y.first),c.iGM(y=c.CRH())&&(d.headerCell=y.first),c.iGM(y=c.CRH())&&(d.footerCell=y.first)}},inputs:{sticky:"sticky",name:["cdkColumnDef","name"],stickyEnd:"stickyEnd"},features:[c._Bn([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:l}]),c.qOj]}),l})();class ue{constructor(p,i){i.nativeElement.classList.add(...p._columnCssClassName)}}let ne=(()=>{class l extends ue{constructor(i,d){super(i,d)}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(W),c.Y36(c.SBq))},l.\u0275dir=c.lG2({type:l,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[c.qOj]}),l})(),we=(()=>{class l extends ue{constructor(i,d){if(super(i,d),1===i._table?._elementRef.nativeElement.nodeType){const h=i._table._elementRef.nativeElement.getAttribute("role");d.nativeElement.setAttribute("role","grid"===h||"treegrid"===h?"gridcell":"cell")}}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(W),c.Y36(c.SBq))},l.\u0275dir=c.lG2({type:l,selectors:[["cdk-footer-cell"],["td","cdk-footer-cell",""]],hostAttrs:[1,"cdk-footer-cell"],features:[c.qOj]}),l})(),he=(()=>{class l extends ue{constructor(i,d){if(super(i,d),1===i._table?._elementRef.nativeElement.nodeType){const h=i._table._elementRef.nativeElement.getAttribute("role");d.nativeElement.setAttribute("role","grid"===h||"treegrid"===h?"gridcell":"cell")}}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(W),c.Y36(c.SBq))},l.\u0275dir=c.lG2({type:l,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[c.qOj]}),l})();class De{constructor(){this.tasks=[],this.endTasks=[]}}const oe=new c.OlP("_COALESCED_STYLE_SCHEDULER");let Te=(()=>{class l{constructor(i){this._ngZone=i,this._currentSchedule=null,this._destroyed=new H.xQ}schedule(i){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(i)}scheduleEnd(i){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(i)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new De,this._getScheduleObservable().pipe((0,X.R)(this._destroyed)).subscribe(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){const i=this._currentSchedule;this._currentSchedule=new De;for(const d of i.tasks)d();for(const d of i.endTasks)d()}this._currentSchedule=null}))}_getScheduleObservable(){return this._ngZone.isStable?(0,L.D)(Promise.resolve(void 0)):this._ngZone.onStable.pipe((0,Y.q)(1))}}return l.\u0275fac=function(i){return new(i||l)(c.LFG(c.R0b))},l.\u0275prov=c.Yz7({token:l,factory:l.\u0275fac}),l})(),fe=(()=>{class l{constructor(i,d){this.template=i,this._differs=d}ngOnChanges(i){if(!this._columnsDiffer){const d=i.columns&&i.columns.currentValue||[];this._columnsDiffer=this._differs.find(d).create(),this._columnsDiffer.diff(d)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(i){return this instanceof ie?i.headerCell.template:this instanceof J?i.footerCell.template:i.cell.template}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(c.Rgc),c.Y36(c.ZZ4))},l.\u0275dir=c.lG2({type:l,features:[c.TTD]}),l})();class ke extends fe{}const Oe=Ee(ke);let ie=(()=>{class l extends Oe{constructor(i,d,h){super(i,d),this._table=h}ngOnChanges(i){super.ngOnChanges(i)}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(c.Rgc),c.Y36(c.ZZ4),c.Y36(ee,8))},l.\u0275dir=c.lG2({type:l,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:["cdkHeaderRowDef","columns"],sticky:["cdkHeaderRowDefSticky","sticky"]},features:[c.qOj,c.TTD]}),l})();class pe extends fe{}const re=Ee(pe);let J=(()=>{class l extends re{constructor(i,d,h){super(i,d),this._table=h}ngOnChanges(i){super.ngOnChanges(i)}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(c.Rgc),c.Y36(c.ZZ4),c.Y36(ee,8))},l.\u0275dir=c.lG2({type:l,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:["cdkFooterRowDef","columns"],sticky:["cdkFooterRowDefSticky","sticky"]},features:[c.qOj,c.TTD]}),l})(),de=(()=>{class l extends fe{constructor(i,d,h){super(i,d),this._table=h}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(c.Rgc),c.Y36(c.ZZ4),c.Y36(ee,8))},l.\u0275dir=c.lG2({type:l,selectors:[["","cdkRowDef",""]],inputs:{columns:["cdkRowDefColumns","columns"],when:["cdkRowDefWhen","when"]},features:[c.qOj]}),l})(),U=(()=>{class l{constructor(i){this._viewContainer=i,l.mostRecentCellOutlet=this}ngOnDestroy(){l.mostRecentCellOutlet===this&&(l.mostRecentCellOutlet=null)}}return l.mostRecentCellOutlet=null,l.\u0275fac=function(i){return new(i||l)(c.Y36(c.s_b))},l.\u0275dir=c.lG2({type:l,selectors:[["","cdkCellOutlet",""]]}),l})(),me=(()=>{class l{}return l.\u0275fac=function(i){return new(i||l)},l.\u0275cmp=c.Xpm({type:l,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(i,d){1&i&&c.GkF(0,0)},dependencies:[U],encapsulation:2}),l})(),Me=(()=>{class l{}return l.\u0275fac=function(i){return new(i||l)},l.\u0275cmp=c.Xpm({type:l,selectors:[["cdk-footer-row"],["tr","cdk-footer-row",""]],hostAttrs:["role","row",1,"cdk-footer-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(i,d){1&i&&c.GkF(0,0)},dependencies:[U],encapsulation:2}),l})(),I=(()=>{class l{}return l.\u0275fac=function(i){return new(i||l)},l.\u0275cmp=c.Xpm({type:l,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(i,d){1&i&&c.GkF(0,0)},dependencies:[U],encapsulation:2}),l})(),A=(()=>{class l{constructor(i){this.templateRef=i,this._contentClassName="cdk-no-data-row"}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(c.Rgc))},l.\u0275dir=c.lG2({type:l,selectors:[["ng-template","cdkNoDataRow",""]]}),l})();const T=["top","bottom","left","right"];class Re{constructor(p,i,d,h,y=!0,D=!0,x){this._isNativeHtmlTable=p,this._stickCellCss=i,this.direction=d,this._coalescedStyleScheduler=h,this._isBrowser=y,this._needsPositionStickyOnElement=D,this._positionListener=x,this._cachedCellWidths=[],this._borderCellCss={top:`${i}-border-elem-top`,bottom:`${i}-border-elem-bottom`,left:`${i}-border-elem-left`,right:`${i}-border-elem-right`}}clearStickyPositioning(p,i){const d=[];for(const h of p)if(h.nodeType===h.ELEMENT_NODE){d.push(h);for(let y=0;y<h.children.length;y++)d.push(h.children[y])}this._coalescedStyleScheduler.schedule(()=>{for(const h of d)this._removeStickyStyle(h,i)})}updateStickyColumns(p,i,d,h=!0){if(!p.length||!this._isBrowser||!i.some(C=>C)&&!d.some(C=>C))return void(this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]})));const y=p[0],D=y.children.length,x=this._getCellWidths(y,h),u=this._getStickyStartColumnPositions(x,i),v=this._getStickyEndColumnPositions(x,d),a=i.lastIndexOf(!0),_=d.indexOf(!0);this._coalescedStyleScheduler.schedule(()=>{const C="rtl"===this.direction,R=C?"right":"left",Z=C?"left":"right";for(const K of p)for(let P=0;P<D;P++){const j=K.children[P];i[P]&&this._addStickyStyle(j,R,u[P],P===a),d[P]&&this._addStickyStyle(j,Z,v[P],P===_)}this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:-1===a?[]:x.slice(0,a+1).map((K,P)=>i[P]?K:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:-1===_?[]:x.slice(_).map((K,P)=>d[P+_]?K:null).reverse()}))})}stickRows(p,i,d){if(!this._isBrowser)return;const h="bottom"===d?p.slice().reverse():p,y="bottom"===d?i.slice().reverse():i,D=[],x=[],u=[];for(let a=0,_=0;a<h.length;a++){if(!y[a])continue;D[a]=_;const C=h[a];u[a]=this._isNativeHtmlTable?Array.from(C.children):[C];const R=C.getBoundingClientRect().height;_+=R,x[a]=R}const v=y.lastIndexOf(!0);this._coalescedStyleScheduler.schedule(()=>{for(let a=0;a<h.length;a++){if(!y[a])continue;const _=D[a],C=a===v;for(const R of u[a])this._addStickyStyle(R,d,_,C)}"top"===d?this._positionListener?.stickyHeaderRowsUpdated({sizes:x,offsets:D,elements:u}):this._positionListener?.stickyFooterRowsUpdated({sizes:x,offsets:D,elements:u})})}updateStickyFooterContainer(p,i){if(!this._isNativeHtmlTable)return;const d=p.querySelector("tfoot");this._coalescedStyleScheduler.schedule(()=>{i.some(h=>!h)?this._removeStickyStyle(d,["bottom"]):this._addStickyStyle(d,"bottom",0,!1)})}_removeStickyStyle(p,i){for(const h of i)p.style[h]="",p.classList.remove(this._borderCellCss[h]);T.some(h=>-1===i.indexOf(h)&&p.style[h])?p.style.zIndex=this._getCalculatedZIndex(p):(p.style.zIndex="",this._needsPositionStickyOnElement&&(p.style.position=""),p.classList.remove(this._stickCellCss))}_addStickyStyle(p,i,d,h){p.classList.add(this._stickCellCss),h&&p.classList.add(this._borderCellCss[i]),p.style[i]=`${d}px`,p.style.zIndex=this._getCalculatedZIndex(p),this._needsPositionStickyOnElement&&(p.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(p){const i={top:100,bottom:10,left:1,right:1};let d=0;for(const h of T)p.style[h]&&(d+=i[h]);return d?`${d}`:""}_getCellWidths(p,i=!0){if(!i&&this._cachedCellWidths.length)return this._cachedCellWidths;const d=[],h=p.children;for(let y=0;y<h.length;y++)d.push(h[y].getBoundingClientRect().width);return this._cachedCellWidths=d,d}_getStickyStartColumnPositions(p,i){const d=[];let h=0;for(let y=0;y<p.length;y++)i[y]&&(d[y]=h,h+=p[y]);return d}_getStickyEndColumnPositions(p,i){const d=[];let h=0;for(let y=p.length;y>0;y--)i[y]&&(d[y]=h,h+=p[y]);return d}}const z=new c.OlP("CDK_SPL");let Pe=(()=>{class l{}return l.\u0275fac=function(i){return new(i||l)},l.\u0275dir=c.lG2({type:l,selectors:[["cdk-table","recycleRows",""],["table","cdk-table","","recycleRows",""]],features:[c._Bn([{provide:M.k,useClass:M.eX}])]}),l})(),Ve=(()=>{class l{constructor(i,d){this.viewContainer=i,this.elementRef=d}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(c.s_b),c.Y36(c.SBq))},l.\u0275dir=c.lG2({type:l,selectors:[["","rowOutlet",""]]}),l})(),_e=(()=>{class l{constructor(i,d){this.viewContainer=i,this.elementRef=d}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(c.s_b),c.Y36(c.SBq))},l.\u0275dir=c.lG2({type:l,selectors:[["","headerRowOutlet",""]]}),l})(),ge=(()=>{class l{constructor(i,d){this.viewContainer=i,this.elementRef=d}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(c.s_b),c.Y36(c.SBq))},l.\u0275dir=c.lG2({type:l,selectors:[["","footerRowOutlet",""]]}),l})(),Ce=(()=>{class l{constructor(i,d){this.viewContainer=i,this.elementRef=d}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(c.s_b),c.Y36(c.SBq))},l.\u0275dir=c.lG2({type:l,selectors:[["","noDataRowOutlet",""]]}),l})(),se=(()=>{class l{get trackBy(){return this._trackByFn}set trackBy(i){this._trackByFn=i}get dataSource(){return this._dataSource}set dataSource(i){this._dataSource!==i&&this._switchDataSource(i)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(i){this._multiTemplateDataRows=(0,t.Ig)(i),this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}get fixedLayout(){return this._fixedLayout}set fixedLayout(i){this._fixedLayout=(0,t.Ig)(i),this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}constructor(i,d,h,y,D,x,u,v,a,_,C,R){this._differs=i,this._changeDetectorRef=d,this._elementRef=h,this._dir=D,this._platform=u,this._viewRepeater=v,this._coalescedStyleScheduler=a,this._viewportRuler=_,this._stickyPositioningListener=C,this._ngZone=R,this._onDestroy=new H.xQ,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.contentChanged=new c.vpe,this.viewChange=new ae.X({start:0,end:Number.MAX_VALUE}),y||this._elementRef.nativeElement.setAttribute("role","table"),this._document=x,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}ngOnInit(){this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((i,d)=>this.trackBy?this.trackBy(d.dataIndex,d.data):d),this._viewportRuler.change().pipe((0,X.R)(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentChecked(){this._cacheRowDefs(),this._cacheColumnDefs();const d=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||d,this._forceRecalculateCellWidths=d,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}ngOnDestroy(){[this._rowOutlet.viewContainer,this._headerRowOutlet.viewContainer,this._footerRowOutlet.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(i=>{i.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._onDestroy.next(),this._onDestroy.complete(),(0,M.Z9)(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();const i=this._dataDiffer.diff(this._renderRows);if(!i)return this._updateNoDataRow(),void this.contentChanged.next();const d=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(i,d,(h,y,D)=>this._getEmbeddedViewArgs(h.item,D),h=>h.item.data,h=>{1===h.operation&&h.context&&this._renderCellTemplateForItem(h.record.item.rowDef,h.context)}),this._updateRowIndexContext(),i.forEachIdentityChange(h=>{d.get(h.currentIndex).context.$implicit=h.item.data}),this._updateNoDataRow(),this._ngZone&&c.R0b.isInAngularZone()?this._ngZone.onStable.pipe((0,Y.q)(1),(0,X.R)(this._onDestroy)).subscribe(()=>{this.updateStickyColumnStyles()}):this.updateStickyColumnStyles(),this.contentChanged.next()}addColumnDef(i){this._customColumnDefs.add(i)}removeColumnDef(i){this._customColumnDefs.delete(i)}addRowDef(i){this._customRowDefs.add(i)}removeRowDef(i){this._customRowDefs.delete(i)}addHeaderRowDef(i){this._customHeaderRowDefs.add(i),this._headerRowDefChanged=!0}removeHeaderRowDef(i){this._customHeaderRowDefs.delete(i),this._headerRowDefChanged=!0}addFooterRowDef(i){this._customFooterRowDefs.add(i),this._footerRowDefChanged=!0}removeFooterRowDef(i){this._customFooterRowDefs.delete(i),this._footerRowDefChanged=!0}setNoDataRow(i){this._customNoDataRow=i}updateStickyHeaderRowStyles(){const i=this._getRenderedRows(this._headerRowOutlet),h=this._elementRef.nativeElement.querySelector("thead");h&&(h.style.display=i.length?"":"none");const y=this._headerRowDefs.map(D=>D.sticky);this._stickyStyler.clearStickyPositioning(i,["top"]),this._stickyStyler.stickRows(i,y,"top"),this._headerRowDefs.forEach(D=>D.resetStickyChanged())}updateStickyFooterRowStyles(){const i=this._getRenderedRows(this._footerRowOutlet),h=this._elementRef.nativeElement.querySelector("tfoot");h&&(h.style.display=i.length?"":"none");const y=this._footerRowDefs.map(D=>D.sticky);this._stickyStyler.clearStickyPositioning(i,["bottom"]),this._stickyStyler.stickRows(i,y,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,y),this._footerRowDefs.forEach(D=>D.resetStickyChanged())}updateStickyColumnStyles(){const i=this._getRenderedRows(this._headerRowOutlet),d=this._getRenderedRows(this._rowOutlet),h=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...i,...d,...h],["left","right"]),this._stickyColumnStylesNeedReset=!1),i.forEach((y,D)=>{this._addStickyColumnStyles([y],this._headerRowDefs[D])}),this._rowDefs.forEach(y=>{const D=[];for(let x=0;x<d.length;x++)this._renderRows[x].rowDef===y&&D.push(d[x]);this._addStickyColumnStyles(D,y)}),h.forEach((y,D)=>{this._addStickyColumnStyles([y],this._footerRowDefs[D])}),Array.from(this._columnDefsByName.values()).forEach(y=>y.resetStickyChanged())}_getAllRenderRows(){const i=[],d=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let h=0;h<this._data.length;h++){let y=this._data[h];const D=this._getRenderRowsForData(y,h,d.get(y));this._cachedRenderRowsMap.has(y)||this._cachedRenderRowsMap.set(y,new WeakMap);for(let x=0;x<D.length;x++){let u=D[x];const v=this._cachedRenderRowsMap.get(u.data);v.has(u.rowDef)?v.get(u.rowDef).push(u):v.set(u.rowDef,[u]),i.push(u)}}return i}_getRenderRowsForData(i,d,h){return this._getRowDefs(i,d).map(D=>{const x=h&&h.has(D)?h.get(D):[];if(x.length){const u=x.shift();return u.dataIndex=d,u}return{data:i,rowDef:D,dataIndex:d}})}_cacheColumnDefs(){this._columnDefsByName.clear(),f(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(d=>{this._columnDefsByName.has(d.name),this._columnDefsByName.set(d.name,d)})}_cacheRowDefs(){this._headerRowDefs=f(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=f(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=f(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);const i=this._rowDefs.filter(d=>!d.when);this._defaultRowDef=i[0]}_renderUpdatedColumns(){const i=(D,x)=>D||!!x.getColumnsDiff(),d=this._rowDefs.reduce(i,!1);d&&this._forceRenderDataRows();const h=this._headerRowDefs.reduce(i,!1);h&&this._forceRenderHeaderRows();const y=this._footerRowDefs.reduce(i,!1);return y&&this._forceRenderFooterRows(),d||h||y}_switchDataSource(i){this._data=[],(0,M.Z9)(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),i||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear()),this._dataSource=i}_observeRenderChanges(){if(!this.dataSource)return;let i;(0,M.Z9)(this.dataSource)?i=this.dataSource.connect(this):(0,ye.b)(this.dataSource)?i=this.dataSource:Array.isArray(this.dataSource)&&(i=(0,le.of)(this.dataSource)),this._renderChangeSubscription=i.pipe((0,X.R)(this._onDestroy)).subscribe(d=>{this._data=d||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((i,d)=>this._renderRow(this._headerRowOutlet,i,d)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((i,d)=>this._renderRow(this._footerRowOutlet,i,d)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(i,d){const h=Array.from(d.columns||[]).map(x=>this._columnDefsByName.get(x)),y=h.map(x=>x.sticky),D=h.map(x=>x.stickyEnd);this._stickyStyler.updateStickyColumns(i,y,D,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(i){const d=[];for(let h=0;h<i.viewContainer.length;h++){const y=i.viewContainer.get(h);d.push(y.rootNodes[0])}return d}_getRowDefs(i,d){if(1==this._rowDefs.length)return[this._rowDefs[0]];let h=[];if(this.multiTemplateDataRows)h=this._rowDefs.filter(y=>!y.when||y.when(d,i));else{let y=this._rowDefs.find(D=>D.when&&D.when(d,i))||this._defaultRowDef;y&&h.push(y)}return h}_getEmbeddedViewArgs(i,d){return{templateRef:i.rowDef.template,context:{$implicit:i.data},index:d}}_renderRow(i,d,h,y={}){const D=i.viewContainer.createEmbeddedView(d.template,y,h);return this._renderCellTemplateForItem(d,y),D}_renderCellTemplateForItem(i,d){for(let h of this._getCellTemplates(i))U.mostRecentCellOutlet&&U.mostRecentCellOutlet._viewContainer.createEmbeddedView(h,d);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){const i=this._rowOutlet.viewContainer;for(let d=0,h=i.length;d<h;d++){const D=i.get(d).context;D.count=h,D.first=0===d,D.last=d===h-1,D.even=d%2==0,D.odd=!D.even,this.multiTemplateDataRows?(D.dataIndex=this._renderRows[d].dataIndex,D.renderIndex=d):D.index=this._renderRows[d].dataIndex}}_getCellTemplates(i){return i&&i.columns?Array.from(i.columns,d=>{const h=this._columnDefsByName.get(d);return i.extractCellTemplate(h)}):[]}_applyNativeTableSections(){const i=this._document.createDocumentFragment(),d=[{tag:"thead",outlets:[this._headerRowOutlet]},{tag:"tbody",outlets:[this._rowOutlet,this._noDataRowOutlet]},{tag:"tfoot",outlets:[this._footerRowOutlet]}];for(const h of d){const y=this._document.createElement(h.tag);y.setAttribute("role","rowgroup");for(const D of h.outlets)y.appendChild(D.elementRef.nativeElement);i.appendChild(y)}this._elementRef.nativeElement.appendChild(i)}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){const i=(d,h)=>d||h.hasStickyChanged();this._headerRowDefs.reduce(i,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(i,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(i,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){this._stickyStyler=new Re(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener),(this._dir?this._dir.change:(0,le.of)()).pipe((0,X.R)(this._onDestroy)).subscribe(d=>{this._stickyStyler.direction=d,this.updateStickyColumnStyles()})}_getOwnDefs(i){return i.filter(d=>!d._table||d._table===this)}_updateNoDataRow(){const i=this._customNoDataRow||this._noDataRow;if(!i)return;const d=0===this._rowOutlet.viewContainer.length;if(d===this._isShowingNoDataRow)return;const h=this._noDataRowOutlet.viewContainer;if(d){const y=h.createEmbeddedView(i.templateRef),D=y.rootNodes[0];1===y.rootNodes.length&&D?.nodeType===this._document.ELEMENT_NODE&&(D.setAttribute("role","row"),D.classList.add(i._contentClassName))}else h.clear();this._isShowingNoDataRow=d}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(c.ZZ4),c.Y36(c.sBO),c.Y36(c.SBq),c.$8M("role"),c.Y36(s.Is,8),c.Y36(S.K0),c.Y36(ve.t4),c.Y36(M.k),c.Y36(oe),c.Y36(V.rL),c.Y36(z,12),c.Y36(c.R0b,8))},l.\u0275cmp=c.Xpm({type:l,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(i,d,h){if(1&i&&(c.Suo(h,A,5),c.Suo(h,W,5),c.Suo(h,de,5),c.Suo(h,ie,5),c.Suo(h,J,5)),2&i){let y;c.iGM(y=c.CRH())&&(d._noDataRow=y.first),c.iGM(y=c.CRH())&&(d._contentColumnDefs=y),c.iGM(y=c.CRH())&&(d._contentRowDefs=y),c.iGM(y=c.CRH())&&(d._contentHeaderRowDefs=y),c.iGM(y=c.CRH())&&(d._contentFooterRowDefs=y)}},viewQuery:function(i,d){if(1&i&&(c.Gf(Ve,7),c.Gf(_e,7),c.Gf(ge,7),c.Gf(Ce,7)),2&i){let h;c.iGM(h=c.CRH())&&(d._rowOutlet=h.first),c.iGM(h=c.CRH())&&(d._headerRowOutlet=h.first),c.iGM(h=c.CRH())&&(d._footerRowOutlet=h.first),c.iGM(h=c.CRH())&&(d._noDataRowOutlet=h.first)}},hostAttrs:["ngSkipHydration","",1,"cdk-table"],hostVars:2,hostBindings:function(i,d){2&i&&c.ekj("cdk-table-fixed-layout",d.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:"multiTemplateDataRows",fixedLayout:"fixedLayout"},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[c._Bn([{provide:ee,useExisting:l},{provide:M.k,useClass:M.yy},{provide:oe,useClass:Te},{provide:z,useValue:null}])],ngContentSelectors:Ae,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(i,d){1&i&&(c.F$t(G),c.Hsn(0),c.Hsn(1,1),c.GkF(2,0)(3,1)(4,2)(5,3))},dependencies:[Ve,_e,ge,Ce],styles:[".cdk-table-fixed-layout{table-layout:fixed}"],encapsulation:2}),l})();function f(l,p){return l.concat(Array.from(p))}let b=(()=>{class l{get name(){return this._name}set name(i){this._name=i,this._syncColumnDefName()}constructor(i,d){this._table=i,this._options=d,this.justify="start",this._options=d||{}}ngOnInit(){this._syncColumnDefName(),void 0===this.headerText&&(this.headerText=this._createDefaultHeaderText()),this.dataAccessor||(this.dataAccessor=this._options.defaultDataAccessor||((i,d)=>i[d])),this._table&&(this.columnDef.cell=this.cell,this.columnDef.headerCell=this.headerCell,this._table.addColumnDef(this.columnDef))}ngOnDestroy(){this._table&&this._table.removeColumnDef(this.columnDef)}_createDefaultHeaderText(){const i=this.name;return this._options&&this._options.defaultHeaderTextTransform?this._options.defaultHeaderTextTransform(i):i[0].toUpperCase()+i.slice(1)}_syncColumnDefName(){this.columnDef&&(this.columnDef.name=this.name)}}return l.\u0275fac=function(i){return new(i||l)(c.Y36(se,8),c.Y36(N,8))},l.\u0275cmp=c.Xpm({type:l,selectors:[["cdk-text-column"]],viewQuery:function(i,d){if(1&i&&(c.Gf(W,7),c.Gf($,7),c.Gf(te,7)),2&i){let h;c.iGM(h=c.CRH())&&(d.columnDef=h.first),c.iGM(h=c.CRH())&&(d.cell=h.first),c.iGM(h=c.CRH())&&(d.headerCell=h.first)}},inputs:{name:"name",headerText:"headerText",dataAccessor:"dataAccessor",justify:"justify"},decls:3,vars:0,consts:[["cdkColumnDef",""],["cdk-header-cell","",3,"text-align",4,"cdkHeaderCellDef"],["cdk-cell","",3,"text-align",4,"cdkCellDef"],["cdk-header-cell",""],["cdk-cell",""]],template:function(i,d){1&i&&(c.ynx(0,0),c.YNc(1,O,2,3,"th",1),c.YNc(2,q,2,3,"td",2),c.BQk())},dependencies:[$,te,W,he,ne],encapsulation:2}),l})(),E=(()=>{class l{}return l.\u0275fac=function(i){return new(i||l)},l.\u0275mod=c.oAB({type:l}),l.\u0275inj=c.cJS({imports:[V.Cl]}),l})()},5137:(rt,Se,w)=>{w.r(Se),w.d(Se,{CdkPopoverEditCdkTableExample:()=>Pe,CdkPopoverEditCdkTableFlexExample:()=>We,CdkPopoverEditCellSpanVanillaTableExample:()=>ge,CdkPopoverEditTabOutVanillaTableExample:()=>Ue,CdkPopoverEditVanillaTableExample:()=>se});var s=w(8337),t=w(5879),M=w(6223),ve=w(5125),V=w(2141),S=w(4643),c=w(6814);function H(f,b){if(1&f){const m=t.EpF();t.TgZ(0,"div",12)(1,"form",13,14),t.NdJ("ngSubmit",function(){const p=t.CHM(m).$implicit,i=t.MAs(2),d=t.oxw();return t.KtG(d.onSubmitWeight(p,i))})("cdkEditControlPreservedFormValueChange",function(l){const i=t.CHM(m).$implicit,d=t.oxw();return t.KtG(d.preservedWeightValues.set(i,l))}),t._uU(3," Edit b: "),t._UZ(4,"input",15)(5,"br"),t.TgZ(6,"button",16),t._uU(7,"Confirm"),t.qZA(),t.TgZ(8,"button",17),t._uU(9,"Revert"),t.qZA(),t.TgZ(10,"button",18),t._uU(11,"Close"),t.qZA()()()}if(2&f){const m=b.$implicit,E=t.oxw();t.xp6(1),t.Q6J("cdkEditControlPreservedFormValue",E.preservedWeightValues.get(m)),t.xp6(3),t.Q6J("ngModel",m.weight)}}function L(f,b){1&f&&(t.TgZ(0,"cdk-header-cell"),t._uU(1," No. "),t.qZA())}function ae(f,b){if(1&f&&(t.TgZ(0,"cdk-cell"),t._uU(1),t.qZA()),2&f){const m=b.$implicit;t.xp6(1),t.hij(" ",m.position," ")}}function ye(f,b){1&f&&(t.TgZ(0,"cdk-header-cell"),t._uU(1," Name "),t.qZA())}function le(f,b){if(1&f){const m=t.EpF();t.TgZ(0,"div",12)(1,"form",13,14),t.NdJ("ngSubmit",function(){t.CHM(m);const l=t.MAs(2),p=t.oxw().$implicit,i=t.oxw();return t.KtG(i.onSubmitName(p,l))})("cdkEditControlPreservedFormValueChange",function(l){t.CHM(m);const p=t.oxw().$implicit,i=t.oxw();return t.KtG(i.preservedNameValues.set(p,l))}),t._uU(3," Edit a: "),t._UZ(4,"input",22)(5,"br"),t.TgZ(6,"button",16),t._uU(7,"Confirm"),t.qZA(),t.TgZ(8,"button",17),t._uU(9,"Revert"),t.qZA(),t.TgZ(10,"button",18),t._uU(11,"Close"),t.qZA()()()}if(2&f){const m=t.oxw().$implicit,E=t.oxw();t.xp6(1),t.Q6J("cdkEditControlPreservedFormValue",E.preservedNameValues.get(m)),t.xp6(3),t.Q6J("ngModel",m.name)}}function X(f,b){1&f&&(t.TgZ(0,"span")(1,"button",23),t._uU(2,"Edit"),t.qZA()())}function Y(f,b){if(1&f&&(t.TgZ(0,"cdk-cell",19),t._uU(1),t.YNc(2,le,12,2,"ng-template",null,20,t.W1O),t.YNc(4,X,3,0,"span",21),t.qZA()),2&f){const m=b.$implicit,E=t.MAs(3);t.Q6J("cdkPopoverEdit",E),t.xp6(1),t.hij(" ",m.name," ")}}function G(f,b){1&f&&(t.TgZ(0,"cdk-header-cell"),t._uU(1," Weight "),t.qZA())}function Ae(f,b){1&f&&(t.TgZ(0,"span")(1,"button",23),t._uU(2,"Edit"),t.qZA()())}function O(f,b){if(1&f&&(t.TgZ(0,"cdk-cell",24),t._uU(1),t.YNc(2,Ae,3,0,"span",21),t.qZA()),2&f){const m=b.$implicit;t.oxw();const E=t.MAs(2);t.Q6J("cdkPopoverEdit",E)("cdkPopoverEditContext",m),t.xp6(1),t.hij(" ",m.weight," ")}}function q(f,b){1&f&&(t.TgZ(0,"cdk-header-cell"),t._uU(1," Symbol "),t.qZA())}function Ee(f,b){if(1&f&&(t.TgZ(0,"cdk-cell"),t._uU(1),t.qZA()),2&f){const m=b.$implicit;t.xp6(1),t.hij(" ",m.symbol," ")}}function ee(f,b){1&f&&t._UZ(0,"cdk-header-row")}function N(f,b){1&f&&t._UZ(0,"cdk-row")}function $(f,b){if(1&f){const m=t.EpF();t.TgZ(0,"div",12)(1,"form",13,14),t.NdJ("ngSubmit",function(){const p=t.CHM(m).$implicit,i=t.MAs(2),d=t.oxw();return t.KtG(d.onSubmitWeight(p,i))})("cdkEditControlPreservedFormValueChange",function(l){const i=t.CHM(m).$implicit,d=t.oxw();return t.KtG(d.preservedWeightValues.set(i,l))}),t._uU(3," Edit b: "),t._UZ(4,"input",15)(5,"br"),t.TgZ(6,"button",16),t._uU(7,"Confirm"),t.qZA(),t.TgZ(8,"button",17),t._uU(9,"Revert and close"),t.qZA()()()}if(2&f){const m=b.$implicit,E=t.oxw();t.xp6(1),t.Q6J("cdkEditControlPreservedFormValue",E.preservedWeightValues.get(m)),t.xp6(3),t.Q6J("ngModel",m.weight)}}function te(f,b){1&f&&(t.TgZ(0,"th",18),t._uU(1," No. "),t.qZA())}function ce(f,b){if(1&f&&(t.TgZ(0,"td",19),t._uU(1),t.qZA()),2&f){const m=b.$implicit;t.xp6(1),t.hij(" ",m.position," ")}}function be(f,b){1&f&&(t.TgZ(0,"th",18),t._uU(1," Name "),t.qZA())}function Be(f,b){if(1&f){const m=t.EpF();t.TgZ(0,"div",12)(1,"form",13,14),t.NdJ("ngSubmit",function(){t.CHM(m);const l=t.MAs(2),p=t.oxw().$implicit,i=t.oxw();return t.KtG(i.onSubmitName(p,l))})("cdkEditControlPreservedFormValueChange",function(l){t.CHM(m);const p=t.oxw().$implicit,i=t.oxw();return t.KtG(i.preservedNameValues.set(p,l))}),t._uU(3," Edit a: "),t._UZ(4,"input",23)(5,"br"),t.TgZ(6,"button",16),t._uU(7,"Confirm"),t.qZA(),t.TgZ(8,"button",24),t._uU(9,"Revert"),t.qZA(),t.TgZ(10,"button",25),t._uU(11,"Close"),t.qZA()()()}if(2&f){const m=t.oxw().$implicit,E=t.oxw();t.xp6(1),t.Q6J("cdkEditControlPreservedFormValue",E.preservedNameValues.get(m)),t.xp6(3),t.Q6J("ngModel",m.name)}}function W(f,b){1&f&&(t.TgZ(0,"span")(1,"button",26),t._uU(2,"Edit"),t.qZA()())}function ue(f,b){if(1&f&&(t.TgZ(0,"td",20),t._uU(1),t.YNc(2,Be,12,2,"ng-template",null,21,t.W1O),t.YNc(4,W,3,0,"span",22),t.qZA()),2&f){const m=b.$implicit,E=t.MAs(3);t.Q6J("cdkPopoverEdit",E),t.xp6(1),t.hij(" ",m.name," ")}}function ne(f,b){1&f&&(t.TgZ(0,"th",18),t._uU(1," Weight "),t.qZA())}function we(f,b){1&f&&(t.TgZ(0,"span")(1,"button",26),t._uU(2,"Edit"),t.qZA()())}function he(f,b){if(1&f&&(t.TgZ(0,"td",27),t._uU(1),t.YNc(2,we,3,0,"span",22),t.qZA()),2&f){const m=b.$implicit;t.oxw();const E=t.MAs(2);t.Q6J("cdkPopoverEdit",E)("cdkPopoverEditContext",m),t.xp6(1),t.hij(" ",m.weight," ")}}function De(f,b){1&f&&(t.TgZ(0,"th",18),t._uU(1," Symbol "),t.qZA())}function oe(f,b){if(1&f&&(t.TgZ(0,"td",19),t._uU(1),t.qZA()),2&f){const m=b.$implicit;t.xp6(1),t.hij(" ",m.symbol," ")}}function Te(f,b){1&f&&t._UZ(0,"tr",28)}function He(f,b){1&f&&t._UZ(0,"tr",29)}function fe(f,b){if(1&f){const m=t.EpF();t.TgZ(0,"div",3)(1,"form",4,5),t.NdJ("ngSubmit",function(){const p=t.CHM(m).$implicit,i=t.MAs(2),d=t.oxw();return t.KtG(d.onSubmit(p.person,i))})("cdkEditControlPreservedFormValueChange",function(l){const i=t.CHM(m).$implicit,d=t.oxw();return t.KtG(d.preservedValues.set(i.person,l))}),t.TgZ(3,"div",6),t._UZ(4,"input",7)(5,"input",8)(6,"input",9),t.qZA(),t._UZ(7,"br")(8,"br"),t.TgZ(9,"button",10),t._uU(10,"Confirm"),t.qZA(),t.TgZ(11,"button",11),t._uU(12,"Revert"),t.qZA(),t.TgZ(13,"button",12),t._uU(14,"Close"),t.qZA()()()}if(2&f){const m=b.$implicit,E=t.oxw();t.xp6(1),t.Q6J("cdkEditControlPreservedFormValue",E.preservedValues.get(m.person)),t.xp6(3),t.Q6J("ngModel",m.person.firstName),t.uIk("cdkFocusInitial","firstName"===m.focus||null),t.xp6(1),t.Q6J("ngModel",m.person.middleName),t.uIk("cdkFocusInitial","middleName"===m.focus||null),t.xp6(1),t.Q6J("ngModel",m.person.lastName),t.uIk("cdkFocusInitial","lastName"===m.focus||null)}}function ke(f,b){1&f&&(t.TgZ(0,"span")(1,"button",15),t._uU(2,"Edit"),t.qZA()())}function Oe(f,b){1&f&&(t.TgZ(0,"span")(1,"button",15),t._uU(2,"Edit"),t.qZA()())}function ie(f,b){1&f&&(t.TgZ(0,"span")(1,"button",15),t._uU(2,"Edit"),t.qZA()())}const pe=function(f){return{person:f,focus:"firstName"}},re=function(){return{after:2}},J=function(f){return{person:f,focus:"middleName"}},de=function(){return{before:1,after:1}},U=function(f){return{person:f,focus:"lastName"}},me=function(){return{before:2}};function Me(f,b){if(1&f&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",13),t._uU(4),t.YNc(5,ke,3,0,"span",14),t.qZA(),t.TgZ(6,"td",13),t._uU(7),t.YNc(8,Oe,3,0,"span",14),t.qZA(),t.TgZ(9,"td",13),t._uU(10),t.YNc(11,ie,3,0,"span",14),t.qZA()()),2&f){const m=b.$implicit;t.oxw();const E=t.MAs(2);t.xp6(2),t.hij(" ",m.id," "),t.xp6(1),t.Q6J("cdkPopoverEdit",E)("cdkPopoverEditContext",t.VKq(13,pe,m))("cdkPopoverEditColspan",t.DdM(15,re)),t.xp6(1),t.hij(" ",m.firstName," "),t.xp6(2),t.Q6J("cdkPopoverEdit",E)("cdkPopoverEditContext",t.VKq(16,J,m))("cdkPopoverEditColspan",t.DdM(18,de)),t.xp6(1),t.hij(" ",m.middleName," "),t.xp6(2),t.Q6J("cdkPopoverEdit",E)("cdkPopoverEditContext",t.VKq(19,U,m))("cdkPopoverEditColspan",t.DdM(21,me)),t.xp6(1),t.hij(" ",m.lastName," ")}}function I(f,b){if(1&f){const m=t.EpF();t.TgZ(0,"div",3)(1,"form",4,5),t.NdJ("ngSubmit",function(){const p=t.CHM(m).$implicit,i=t.MAs(2),d=t.oxw();return t.KtG(d.onSubmitWeight(p,i))})("cdkEditControlPreservedFormValueChange",function(l){const i=t.CHM(m).$implicit,d=t.oxw();return t.KtG(d.preservedWeightValues.set(i,l))}),t._UZ(3,"input",6),t.qZA()()}if(2&f){const m=b.$implicit,E=t.oxw();t.xp6(1),t.Q6J("cdkEditControlPreservedFormValue",E.preservedWeightValues.get(m)),t.xp6(2),t.Q6J("ngModel",m.weight)}}function A(f,b){if(1&f){const m=t.EpF();t.TgZ(0,"div",3)(1,"form",4,5),t.NdJ("ngSubmit",function(){t.CHM(m);const l=t.MAs(2),p=t.oxw().$implicit,i=t.oxw();return t.KtG(i.onSubmitName(p,l))})("cdkEditControlPreservedFormValueChange",function(l){t.CHM(m);const p=t.oxw().$implicit,i=t.oxw();return t.KtG(i.preservedNameValues.set(p,l))}),t._UZ(3,"input",10)(4,"br"),t.TgZ(5,"button",11),t._uU(6,"Confirm"),t.qZA()()()}if(2&f){const m=t.oxw().$implicit,E=t.oxw();t.xp6(1),t.Q6J("cdkEditControlPreservedFormValue",E.preservedNameValues.get(m)),t.xp6(2),t.Q6J("ngModel",m.name)}}function T(f,b){if(1&f&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",7),t._uU(4),t.YNc(5,A,7,2,"ng-template",null,8,t.W1O),t.qZA(),t.TgZ(7,"td",9),t._uU(8),t.qZA(),t.TgZ(9,"td"),t._uU(10),t.qZA()()),2&f){const m=b.$implicit,E=t.MAs(6);t.oxw();const l=t.MAs(2);t.xp6(2),t.hij(" ",m.position," "),t.xp6(1),t.Q6J("cdkPopoverEdit",E),t.xp6(1),t.hij(" ",m.name," "),t.xp6(3),t.Q6J("cdkPopoverEdit",l)("cdkPopoverEditContext",m),t.xp6(1),t.hij(" ",m.weight," "),t.xp6(2),t.hij(" ",m.symbol," ")}}function Re(f,b){if(1&f){const m=t.EpF();t.TgZ(0,"div",3)(1,"form",4,5),t.NdJ("ngSubmit",function(){const p=t.CHM(m).$implicit,i=t.MAs(2),d=t.oxw();return t.KtG(d.onSubmitWeight(p,i))})("cdkEditControlPreservedFormValueChange",function(l){const i=t.CHM(m).$implicit,d=t.oxw();return t.KtG(d.preservedWeightValues.set(i,l))}),t._uU(3," Edit b: "),t._UZ(4,"input",6)(5,"br"),t.TgZ(6,"button",7),t._uU(7,"Confirm"),t.qZA(),t.TgZ(8,"button",8),t._uU(9,"Revert"),t.qZA(),t.TgZ(10,"button",9),t._uU(11,"Close"),t.qZA()()()}if(2&f){const m=b.$implicit,E=t.oxw();t.xp6(1),t.Q6J("cdkEditControlPreservedFormValue",E.preservedWeightValues.get(m)),t.xp6(3),t.Q6J("ngModel",m.weight)}}function Le(f,b){if(1&f){const m=t.EpF();t.TgZ(0,"div",3)(1,"form",4,5),t.NdJ("ngSubmit",function(){t.CHM(m);const l=t.MAs(2),p=t.oxw().$implicit,i=t.oxw();return t.KtG(i.onSubmitName(p,l))})("cdkEditControlPreservedFormValueChange",function(l){t.CHM(m);const p=t.oxw().$implicit,i=t.oxw();return t.KtG(i.preservedNameValues.set(p,l))}),t._uU(3," Edit a: "),t._UZ(4,"input",14)(5,"br"),t.TgZ(6,"button",7),t._uU(7,"Confirm"),t.qZA(),t.TgZ(8,"button",8),t._uU(9,"Revert"),t.qZA(),t.TgZ(10,"button",9),t._uU(11,"Close"),t.qZA()()()}if(2&f){const m=t.oxw().$implicit,E=t.oxw();t.xp6(1),t.Q6J("cdkEditControlPreservedFormValue",E.preservedNameValues.get(m)),t.xp6(3),t.Q6J("ngModel",m.name)}}function Ye(f,b){1&f&&(t.TgZ(0,"span")(1,"button",15),t._uU(2,"Edit"),t.qZA()())}function F(f,b){1&f&&(t.TgZ(0,"span")(1,"button",15),t._uU(2,"Edit"),t.qZA()())}function Ge(f,b){if(1&f&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td",10),t._uU(4),t.YNc(5,Le,12,2,"ng-template",null,11,t.W1O),t.YNc(7,Ye,3,0,"span",12),t.qZA(),t.TgZ(8,"td",13),t._uU(9),t.YNc(10,F,3,0,"span",12),t.qZA(),t.TgZ(11,"td"),t._uU(12),t.qZA()()),2&f){const m=b.$implicit,E=t.MAs(6);t.oxw();const l=t.MAs(2);t.xp6(2),t.hij(" ",m.position," "),t.xp6(1),t.Q6J("cdkPopoverEdit",E),t.xp6(1),t.hij(" ",m.name," "),t.xp6(4),t.Q6J("cdkPopoverEdit",l)("cdkPopoverEditContext",m),t.xp6(1),t.hij(" ",m.weight," "),t.xp6(3),t.hij(" ",m.symbol," ")}}const Q=[{position:1,name:"Hydrogen",weight:1.0079,symbol:"H"},{position:2,name:"Helium",weight:4.0026,symbol:"He"},{position:3,name:"Lithium",weight:6.941,symbol:"Li"},{position:4,name:"Beryllium",weight:9.0122,symbol:"Be"},{position:5,name:"Boron",weight:10.811,symbol:"B"},{position:6,name:"Carbon",weight:12.0107,symbol:"C"},{position:7,name:"Nitrogen",weight:14.0067,symbol:"N"},{position:8,name:"Oxygen",weight:15.9994,symbol:"O"},{position:9,name:"Fluorine",weight:18.9984,symbol:"F"},{position:10,name:"Neon",weight:20.1797,symbol:"Ne"},{position:11,name:"Sodium",weight:22.9897,symbol:"Na"},{position:12,name:"Magnesium",weight:24.305,symbol:"Mg"},{position:13,name:"Aluminum",weight:26.9815,symbol:"Al"},{position:14,name:"Silicon",weight:28.0855,symbol:"Si"},{position:15,name:"Phosphorus",weight:30.9738,symbol:"P"},{position:16,name:"Sulfur",weight:32.065,symbol:"S"},{position:17,name:"Chlorine",weight:35.453,symbol:"Cl"},{position:18,name:"Argon",weight:39.948,symbol:"Ar"},{position:19,name:"Potassium",weight:39.0983,symbol:"K"},{position:20,name:"Calcium",weight:40.078,symbol:"Ca"}];let We=(()=>{class f{constructor(){this.displayedColumns=["position","name","weight","symbol"],this.dataSource=new Ne,this.preservedNameValues=new WeakMap,this.preservedWeightValues=new WeakMap}onSubmitName(m,E){E.valid&&(m.name=E.value.name)}onSubmitWeight(m,E){E.valid&&(m.weight=E.value.weight)}}return f.\u0275fac=function(m){return new(m||f)},f.\u0275cmp=t.Xpm({type:f,selectors:[["cdk-popover-edit-cdk-table-flex-example"]],standalone:!0,features:[t.jDz],decls:17,vars:3,consts:[["editable","",1,"example-table",3,"dataSource"],["weightEdit",""],["cdkColumnDef","position"],[4,"cdkHeaderCellDef"],[4,"cdkCellDef"],["cdkColumnDef","name"],[3,"cdkPopoverEdit",4,"cdkCellDef"],["cdkColumnDef","weight"],[3,"cdkPopoverEdit","cdkPopoverEditContext",4,"cdkCellDef"],["cdkColumnDef","symbol"],[4,"cdkHeaderRowDef"],[4,"cdkRowDef","cdkRowDefColumns"],[2,"background-color","white"],["cdkEditControl","",3,"cdkEditControlPreservedFormValue","ngSubmit","cdkEditControlPreservedFormValueChange"],["f","ngForm"],["type","number","name","weight","required","",3,"ngModel"],["type","submit"],["cdkEditRevert",""],["cdkEditClose",""],[3,"cdkPopoverEdit"],["nameEdit",""],[4,"cdkRowHoverContent"],["name","name","required","",3,"ngModel"],["cdkEditOpen",""],[3,"cdkPopoverEdit","cdkPopoverEditContext"]],template:function(m,E){1&m&&(t.TgZ(0,"cdk-table",0),t.YNc(1,H,12,2,"ng-template",null,1,t.W1O),t.ynx(3,2),t.YNc(4,L,2,0,"cdk-header-cell",3),t.YNc(5,ae,2,1,"cdk-cell",4),t.BQk(),t.ynx(6,5),t.YNc(7,ye,2,0,"cdk-header-cell",3),t.YNc(8,Y,5,2,"cdk-cell",6),t.BQk(),t.ynx(9,7),t.YNc(10,G,2,0,"cdk-header-cell",3),t.YNc(11,O,3,3,"cdk-cell",8),t.BQk(),t.ynx(12,9),t.YNc(13,q,2,0,"cdk-header-cell",3),t.YNc(14,Ee,2,1,"cdk-cell",4),t.BQk(),t.YNc(15,ee,1,0,"cdk-header-row",10),t.YNc(16,N,1,0,"cdk-row",11),t.qZA()),2&m&&(t.Q6J("dataSource",E.dataSource),t.xp6(15),t.Q6J("cdkHeaderRowDef",E.displayedColumns),t.xp6(1),t.Q6J("cdkRowDefColumns",E.displayedColumns))},dependencies:[S.HT,S.zC,S.Sq,S.O_,S.D5,S.fo,S.hD,S._J,S.Af,S.xN,S.s$,V.Zf,V.aq,V.qv,V.Zb,V.Ej,V.Lb,V.gC,V.P$,M.u5,M._Y,M.Fj,M.wV,M.JJ,M.JL,M.Q7,M.On,M.F],styles:["\n\n\n\n.example-table[_ngcontent-%COMP%] cdk-row[_ngcontent-%COMP%], cdk-header-row[_ngcontent-%COMP%], cdk-footer-row[_ngcontent-%COMP%] {\n display: flex;\n}\n\n.example-table[_ngcontent-%COMP%] cdk-cell[_ngcontent-%COMP%], cdk-header-cell[_ngcontent-%COMP%], cdk-footer-cell[_ngcontent-%COMP%] {\n flex: 1;\n}"]}),f})();class Ne extends s.o2{constructor(){super(...arguments),this.data=new ve.X(Q)}connect(){return this.data}disconnect(){}}const z=[{position:1,name:"Hydrogen",weight:1.0079,symbol:"H"},{position:2,name:"Helium",weight:4.0026,symbol:"He"},{position:3,name:"Lithium",weight:6.941,symbol:"Li"},{position:4,name:"Beryllium",weight:9.0122,symbol:"Be"},{position:5,name:"Boron",weight:10.811,symbol:"B"},{position:6,name:"Carbon",weight:12.0107,symbol:"C"},{position:7,name:"Nitrogen",weight:14.0067,symbol:"N"},{position:8,name:"Oxygen",weight:15.9994,symbol:"O"},{position:9,name:"Fluorine",weight:18.9984,symbol:"F"},{position:10,name:"Neon",weight:20.1797,symbol:"Ne"},{position:11,name:"Sodium",weight:22.9897,symbol:"Na"},{position:12,name:"Magnesium",weight:24.305,symbol:"Mg"},{position:13,name:"Aluminum",weight:26.9815,symbol:"Al"},{position:14,name:"Silicon",weight:28.0855,symbol:"Si"},{position:15,name:"Phosphorus",weight:30.9738,symbol:"P"},{position:16,name:"Sulfur",weight:32.065,symbol:"S"},{position:17,name:"Chlorine",weight:35.453,symbol:"Cl"},{position:18,name:"Argon",weight:39.948,symbol:"Ar"},{position:19,name:"Potassium",weight:39.0983,symbol:"K"},{position:20,name:"Calcium",weight:40.078,symbol:"Ca"}];let Pe=(()=>{class f{constructor(){this.displayedColumns=["position","name","weight","symbol"],this.dataSource=new Ve,this.preservedNameValues=new WeakMap,this.preservedWeightValues=new WeakMap}onSubmitName(m,E){E.valid&&(m.name=E.value.name)}onSubmitWeight(m,E){E.valid&&(m.weight=E.value.weight)}}return f.\u0275fac=function(m){return new(m||f)},f.\u0275cmp=t.Xpm({type:f,selectors:[["cdk-popover-edit-cdk-table-example"]],standalone:!0,features:[t.jDz],decls:17,vars:3,consts:[["cdk-table","","editable","",1,"example-table",3,"dataSource"],["weightEdit",""],["cdkColumnDef","position"],["cdk-header-cell","",4,"cdkHeaderCellDef"],["cdk-cell","",4,"cdkCellDef"],["cdkColumnDef","name"],["cdk-cell","",3,"cdkPopoverEdit",4,"cdkCellDef"],["cdkColumnDef","weight"],["cdk-cell","",3,"cdkPopoverEdit","cdkPopoverEditContext",4,"cdkCellDef"],["cdkColumnDef","symbol"],["cdk-header-row","",4,"cdkHeaderRowDef"],["cdk-row","",4,"cdkRowDef","cdkRowDefColumns"],[2,"background-color","white"],["cdkEditControl","",3,"cdkEditControlPreservedFormValue","ngSubmit","cdkEditControlPreservedFormValueChange"],["f","ngForm"],["type","number","name","weight","required","",3,"ngModel"],["type","submit"],["cdkEditRevert","","cdkEditClose",""],["cdk-header-cell",""],["cdk-cell",""],["cdk-cell","",3,"cdkPopoverEdit"],["nameEdit",""],[4,"cdkRowHoverContent"],["name","name","required","",3,"ngModel"],["cdkEditRevert",""],["cdkEditClose",""],["cdkEditOpen",""],["cdk-cell","",3,"cdkPopoverEdit","cdkPopoverEditContext"],["cdk-header-row",""],["cdk-row",""]],template:function(m,E){1&m&&(t.TgZ(0,"table",0),t.YNc(1,$,10,2,"ng-template",null,1,t.W1O),t.ynx(3,2),t.YNc(4,te,2,0,"th",3),t.YNc(5,ce,2,1,"td",4),t.BQk(),t.ynx(6,5),t.YNc(7,be,2,0,"th",3),t.YNc(8,ue,5,2,"td",6),t.BQk(),t.ynx(9,7),t.YNc(10,ne,2,0,"th",3),t.YNc(11,he,3,3,"td",8),t.BQk(),t.ynx(12,9),t.YNc(13,De,2,0,"th",3),t.YNc(14,oe,2,1,"td",4),t.BQk(),t.YNc(15,Te,1,0,"tr",10),t.YNc(16,He,1,0,"tr",11),t.qZA()),2&m&&(t.Q6J("dataSource",E.dataSource),t.xp6(15),t.Q6J("cdkHeaderRowDef",E.displayedColumns),t.xp6(1),t.Q6J("cdkRowDefColumns",E.displayedColumns))},dependencies:[S.HT,S.zC,S.Sq,S.O_,S.D5,S.fo,S.hD,S._J,S.Af,S.xN,S.s$,V.Zf,V.aq,V.qv,V.Zb,V.Ej,V.Lb,V.gC,V.P$,M.u5,M._Y,M.Fj,M.wV,M.JJ,M.JL,M.Q7,M.On,M.F],styles:[".example-table[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n.example-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n text-align: left;\n}\n\n.example-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .example-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n width: 25%;\n}"]}),f})();class Ve extends s.o2{constructor(){super(...arguments),this.data=new ve.X(z)}connect(){return this.data}disconnect(){}}const _e=[{id:1,firstName:"Terra",middleName:"Maduin",lastName:"Branford"},{id:2,firstName:"Locke",middleName:"",lastName:"Cole"},{id:3,firstName:"Celes",middleName:"Gestahl",lastName:"Chere"},{id:4,firstName:"Edgar",middleName:"Roni",lastName:"Figaro"},{id:5,firstName:"Sabin",middleName:"Rene",lastName:"Figaro"},{id:6,firstName:"Clyde",middleName:'"Shadow"',lastName:"Arrowny"},{id:7,firstName:"Setzer",middleName:"",lastName:"Gabbiani"},{id:8,firstName:"Cid",middleName:"Del Norte",lastName:"Marquez"},{id:9,firstName:"Mog",middleName:"",lastName:"McMoogle"}];let ge=(()=>{class f{constructor(){this.preservedValues=new WeakMap,this.persons=_e}onSubmit(m,E){E.valid&&(m.firstName=E.value.firstName,m.middleName=E.value.middleName,m.lastName=E.value.lastName)}}return f.\u0275fac=function(m){return new(m||f)},f.\u0275cmp=t.Xpm({type:f,selectors:[["cdk-popover-edit-cell-span-vanilla-table-example"]],standalone:!0,features:[t.jDz],decls:13,vars:1,consts:[["editable","",1,"example-table"],["nameEdit",""],[4,"ngFor","ngForOf"],[2,"background-color","#ddd","width","100%"],["cdkEditControl","",3,"cdkEditControlPreservedFormValue","ngSubmit","cdkEditControlPreservedFormValueChange"],["f","ngForm"],[1,"example-input-container"],["name","firstName","required","",3,"ngModel"],["name","middleName",3,"ngModel"],["name","lastName","required","",3,"ngModel"],["type","submit"],["cdkEditRevert",""],["cdkEditClose",""],[3,"cdkPopoverEdit","cdkPopoverEditContext","cdkPopoverEditColspan"],[4,"cdkRowHoverContent"],["cdkEditOpen",""]],template:function(m,E){1&m&&(t.TgZ(0,"table",0),t.YNc(1,fe,15,7,"ng-template",null,1,t.W1O),t.TgZ(3,"tr")(4,"th"),t._uU(5," No. "),t.qZA(),t.TgZ(6,"th"),t._uU(7," First name "),t.qZA(),t.TgZ(8,"th"),t._uU(9," Middle name "),t.qZA(),t.TgZ(10,"th"),t._uU(11," Last name "),t.qZA()(),t.YNc(12,Me,12,22,"tr",2),t.qZA()),2&m&&(t.xp6(12),t.Q6J("ngForOf",E.persons))},dependencies:[V.Zf,V.aq,V.qv,V.Zb,V.Ej,V.Lb,V.gC,V.P$,M.u5,M._Y,M.Fj,M.JJ,M.JL,M.Q7,M.On,M.F,c.ax],styles:[".example-table[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n.example-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n text-align: left;\n}\n\n.example-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .example-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n min-width: 300px;\n width: 25%;\n}\n\n.example-input-container[_ngcontent-%COMP%] {\n display: flex;\n justify-content: stretch;\n}\n\n.example-input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n flex: 1;\n font-size: 14px;\n}"]}),f})();const Ce=[{position:1,name:"Hydrogen",weight:1.0079,symbol:"H"},{position:2,name:"Helium",weight:4.0026,symbol:"He"},{position:3,name:"Lithium",weight:6.941,symbol:"Li"},{position:4,name:"Beryllium",weight:9.0122,symbol:"Be"},{position:5,name:"Boron",weight:10.811,symbol:"B"},{position:6,name:"Carbon",weight:12.0107,symbol:"C"},{position:7,name:"Nitrogen",weight:14.0067,symbol:"N"},{position:8,name:"Oxygen",weight:15.9994,symbol:"O"},{position:9,name:"Fluorine",weight:18.9984,symbol:"F"},{position:10,name:"Neon",weight:20.1797,symbol:"Ne"},{position:11,name:"Sodium",weight:22.9897,symbol:"Na"},{position:12,name:"Magnesium",weight:24.305,symbol:"Mg"},{position:13,name:"Aluminum",weight:26.9815,symbol:"Al"},{position:14,name:"Silicon",weight:28.0855,symbol:"Si"},{position:15,name:"Phosphorus",weight:30.9738,symbol:"P"},{position:16,name:"Sulfur",weight:32.065,symbol:"S"},{position:17,name:"Chlorine",weight:35.453,symbol:"Cl"},{position:18,name:"Argon",weight:39.948,symbol:"Ar"},{position:19,name:"Potassium",weight:39.0983,symbol:"K"},{position:20,name:"Calcium",weight:40.078,symbol:"Ca"}];let Ue=(()=>{class f{constructor(){this.preservedNameValues=new WeakMap,this.preservedWeightValues=new WeakMap,this.elements=Ce}onSubmitName(m,E){E.valid&&(m.name=E.value.name)}onSubmitWeight(m,E){E.valid&&(m.weight=E.value.weight)}}return f.\u0275fac=function(m){return new(m||f)},f.\u0275cmp=t.Xpm({type:f,selectors:[["cdk-popover-edit-tab-out-vanilla-table-example"]],standalone:!0,features:[t.jDz],decls:13,vars:1,consts:[["editable","",1,"example-table"],["weightEdit",""],[4,"ngFor","ngForOf"],[2,"background-color","white","width","100%"],["cdkEditControl","","cdkEditControlClickOutBehavior","submit",3,"cdkEditControlPreservedFormValue","ngSubmit","cdkEditControlPreservedFormValueChange"],["f","ngForm"],["type","number","name","weight","required","",3,"ngModel"],["cdkPopoverEditTabOut","","cdkEditOpen","",3,"cdkPopoverEdit"],["nameEdit",""],["cdkPopoverEditTabOut","","cdkEditOpen","",3,"cdkPopoverEdit","cdkPopoverEditContext"],["name","name","required","",3,"ngModel"],["type","submit"]],template:function(m,E){1&m&&(t.TgZ(0,"table",0),t.YNc(1,I,4,2,"ng-template",null,1,t.W1O),t.TgZ(3,"tr")(4,"th"),t._uU(5," No. "),t.qZA(),t.TgZ(6,"th"),t._uU(7," Name "),t.qZA(),t.TgZ(8,"th"),t._uU(9," Weight "),t.qZA(),t.TgZ(10,"th"),t._uU(11," Symbol "),t.qZA()(),t.YNc(12,T,11,7,"tr",2),t.qZA()),2&m&&(t.xp6(12),t.Q6J("ngForOf",E.elements))},dependencies:[V.Zf,V.Y5,V.Zb,V.gC,V.P$,M.u5,M._Y,M.Fj,M.wV,M.JJ,M.JL,M.Q7,M.On,M.F,c.ax],styles:[".example-table[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n.example-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n text-align: left;\n}\n\n.example-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .example-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n min-width: 300px;\n width: 25%;\n}"]}),f})();const qe=[{position:1,name:"Hydrogen",weight:1.0079,symbol:"H"},{position:2,name:"Helium",weight:4.0026,symbol:"He"},{position:3,name:"Lithium",weight:6.941,symbol:"Li"},{position:4,name:"Beryllium",weight:9.0122,symbol:"Be"},{position:5,name:"Boron",weight:10.811,symbol:"B"},{position:6,name:"Carbon",weight:12.0107,symbol:"C"},{position:7,name:"Nitrogen",weight:14.0067,symbol:"N"},{position:8,name:"Oxygen",weight:15.9994,symbol:"O"},{position:9,name:"Fluorine",weight:18.9984,symbol:"F"},{position:10,name:"Neon",weight:20.1797,symbol:"Ne"},{position:11,name:"Sodium",weight:22.9897,symbol:"Na"},{position:12,name:"Magnesium",weight:24.305,symbol:"Mg"},{position:13,name:"Aluminum",weight:26.9815,symbol:"Al"},{position:14,name:"Silicon",weight:28.0855,symbol:"Si"},{position:15,name:"Phosphorus",weight:30.9738,symbol:"P"},{position:16,name:"Sulfur",weight:32.065,symbol:"S"},{position:17,name:"Chlorine",weight:35.453,symbol:"Cl"},{position:18,name:"Argon",weight:39.948,symbol:"Ar"},{position:19,name:"Potassium",weight:39.0983,symbol:"K"},{position:20,name:"Calcium",weight:40.078,symbol:"Ca"}];let se=(()=>{class f{constructor(){this.preservedNameValues=new WeakMap,this.preservedWeightValues=new WeakMap,this.elements=qe}onSubmitName(m,E){E.valid&&(m.name=E.value.name)}onSubmitWeight(m,E){E.valid&&(m.weight=E.value.weight)}}return f.\u0275fac=function(m){return new(m||f)},f.\u0275cmp=t.Xpm({type:f,selectors:[["cdk-popover-edit-vanilla-table-example"]],standalone:!0,features:[t.jDz],decls:13,vars:1,consts:[["editable","",1,"example-table"],["weightEdit",""],[4,"ngFor","ngForOf"],[2,"background-color","white","width","100%"],["cdkEditControl","",3,"cdkEditControlPreservedFormValue","ngSubmit","cdkEditControlPreservedFormValueChange"],["f","ngForm"],["type","number","name","weight","required","",3,"ngModel"],["type","submit"],["cdkEditRevert",""],["cdkEditClose",""],[3,"cdkPopoverEdit"],["nameEdit",""],[4,"cdkRowHoverContent"],[3,"cdkPopoverEdit","cdkPopoverEditContext"],["name","name","required","",3,"ngModel"],["cdkEditOpen",""]],template:function(m,E){1&m&&(t.TgZ(0,"table",0),t.YNc(1,Re,12,2,"ng-template",null,1,t.W1O),t.TgZ(3,"tr")(4,"th"),t._uU(5," No. "),t.qZA(),t.TgZ(6,"th"),t._uU(7," Name "),t.qZA(),t.TgZ(8,"th"),t._uU(9," Weight "),t.qZA(),t.TgZ(10,"th"),t._uU(11," Symbol "),t.qZA()(),t.YNc(12,Ge,13,7,"tr",2),t.qZA()),2&m&&(t.xp6(12),t.Q6J("ngForOf",E.elements))},dependencies:[V.Zf,V.aq,V.qv,V.Zb,V.Ej,V.Lb,V.gC,V.P$,M.u5,M._Y,M.Fj,M.wV,M.JJ,M.JL,M.Q7,M.On,M.F,c.ax],styles:[".example-table[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n.example-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n text-align: left;\n}\n\n.example-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .example-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n min-width: 300px;\n width: 25%;\n}"]}),f})()},6223:(rt,Se,w)=>{w.d(Se,{Cf:()=>O,EJ:()=>nt,F:()=>et,Fj:()=>Y,JJ:()=>F,JL:()=>Ge,JU:()=>H,Kr:()=>Pt,NI:()=>je,On:()=>ct,Q7:()=>ot,UX:()=>Sn,Wl:()=>ae,YN:()=>Ft,Zs:()=>vt,_Y:()=>xt,a5:()=>T,cw:()=>C,eT:()=>ht,gN:()=>A,kI:()=>ee,oH:()=>pt,qu:()=>Vn,sg:()=>tt,u:()=>gt,u5:()=>xn,wV:()=>ut});var s=w(5879),t=w(6814),M=w(5253),ve=w(7504),V=w(6124);let S=(()=>{class o{constructor(e,r){this._renderer=e,this._elementRef=r,this.onChange=g=>{},this.onTouched=()=>{}}setProperty(e,r){this._renderer.setProperty(this._elementRef.nativeElement,e,r)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return o.\u0275fac=function(e){return new(e||o)(s.Y36(s.Qsj),s.Y36(s.SBq))},o.\u0275dir=s.lG2({type:o}),o})(),c=(()=>{class o extends S{}return o.\u0275fac=function(){let n;return function(r){return(n||(n=s.n5z(o)))(r||o)}}(),o.\u0275dir=s.lG2({type:o,features:[s.qOj]}),o})();const H=new s.OlP("NgValueAccessor"),L={provide:H,useExisting:(0,s.Gpc)(()=>ae),multi:!0};let ae=(()=>{class o extends c{writeValue(e){this.setProperty("checked",e)}}return o.\u0275fac=function(){let n;return function(r){return(n||(n=s.n5z(o)))(r||o)}}(),o.\u0275dir=s.lG2({type:o,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,r){1&e&&s.NdJ("change",function(k){return r.onChange(k.target.checked)})("blur",function(){return r.onTouched()})},features:[s._Bn([L]),s.qOj]}),o})();const ye={provide:H,useExisting:(0,s.Gpc)(()=>Y),multi:!0},X=new s.OlP("CompositionEventMode");let Y=(()=>{class o extends S{constructor(e,r,g){super(e,r),this._compositionMode=g,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function le(){const o=(0,t.q)()?(0,t.q)().getUserAgent():"";return/android (\d+)/.test(o.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return o.\u0275fac=function(e){return new(e||o)(s.Y36(s.Qsj),s.Y36(s.SBq),s.Y36(X,8))},o.\u0275dir=s.lG2({type:o,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,r){1&e&&s.NdJ("input",function(k){return r._handleInput(k.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(k){return r._compositionEnd(k.target.value)})},features:[s._Bn([ye]),s.qOj]}),o})();function G(o){return null==o||("string"==typeof o||Array.isArray(o))&&0===o.length}function Ae(o){return null!=o&&"number"==typeof o.length}const O=new s.OlP("NgValidators"),q=new s.OlP("NgAsyncValidators"),Ee=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class ee{static min(n){return function N(o){return n=>{if(G(n.value)||G(o))return null;const e=parseFloat(n.value);return!isNaN(e)&&e<o?{min:{min:o,actual:n.value}}:null}}(n)}static max(n){return function $(o){return n=>{if(G(n.value)||G(o))return null;const e=parseFloat(n.value);return!isNaN(e)&&e>o?{max:{max:o,actual:n.value}}:null}}(n)}static required(n){return te(n)}static requiredTrue(n){return ce(n)}static email(n){return function be(o){return G(o.value)||Ee.test(o.value)?null:{email:!0}}(n)}static minLength(n){return function Be(o){return n=>G(n.value)||!Ae(n.value)?null:n.value.length<o?{minlength:{requiredLength:o,actualLength:n.value.length}}:null}(n)}static maxLength(n){return function W(o){return n=>Ae(n.value)&&n.value.length>o?{maxlength:{requiredLength:o,actualLength:n.value.length}}:null}(n)}static pattern(n){return function ue(o){if(!o)return ne;let n,e;return"string"==typeof o?(e="","^"!==o.charAt(0)&&(e+="^"),e+=o,"$"!==o.charAt(o.length-1)&&(e+="$"),n=new RegExp(e)):(e=o.toString(),n=o),r=>{if(G(r.value))return null;const g=r.value;return n.test(g)?null:{pattern:{requiredPattern:e,actualValue:g}}}}(n)}static nullValidator(n){return null}static compose(n){return fe(n)}static composeAsync(n){return Oe(n)}}function te(o){return G(o.value)?{required:!0}:null}function ce(o){return!0===o.value?null:{required:!0}}function ne(o){return null}function we(o){return null!=o}function he(o){return(0,s.QGY)(o)?(0,M.D)(o):o}function De(o){let n={};return o.forEach(e=>{n=null!=e?{...n,...e}:n}),0===Object.keys(n).length?null:n}function oe(o,n){return n.map(e=>e(o))}function He(o){return o.map(n=>function Te(o){return!o.validate}(n)?n:e=>n.validate(e))}function fe(o){if(!o)return null;const n=o.filter(we);return 0==n.length?null:function(e){return De(oe(e,n))}}function ke(o){return null!=o?fe(He(o)):null}function Oe(o){if(!o)return null;const n=o.filter(we);return 0==n.length?null:function(e){const r=oe(e,n).map(he);return(0,ve.D)(r).pipe((0,V.U)(De))}}function ie(o){return null!=o?Oe(He(o)):null}function pe(o,n){return null===o?[n]:Array.isArray(o)?[...o,n]:[o,n]}function re(o){return o._rawValidators}function J(o){return o._rawAsyncValidators}function de(o){return o?Array.isArray(o)?o:[o]:[]}function U(o,n){return Array.isArray(o)?o.includes(n):o===n}function me(o,n){const e=de(n);return de(o).forEach(g=>{U(e,g)||e.push(g)}),e}function Me(o,n){return de(n).filter(e=>!U(o,e))}class I{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=ke(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=ie(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n=void 0){this.control&&this.control.reset(n)}hasError(n,e){return!!this.control&&this.control.hasError(n,e)}getError(n,e){return this.control?this.control.getError(n,e):null}}class A extends I{get formDirective(){return null}get path(){return null}}class T extends I{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Re{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let F=(()=>{class o extends Re{constructor(e){super(e)}}return o.\u0275fac=function(e){return new(e||o)(s.Y36(T,2))},o.\u0275dir=s.lG2({type:o,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,r){2&e&&s.ekj("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[s.qOj]}),o})(),Ge=(()=>{class o extends Re{constructor(e){super(e)}}return o.\u0275fac=function(e){return new(e||o)(s.Y36(A,10))},o.\u0275dir=s.lG2({type:o,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,r){2&e&&s.ekj("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},features:[s.qOj]}),o})();const l="VALID",p="INVALID",i="PENDING",d="DISABLED";function h(o){return(u(o)?o.validators:o)||null}function D(o,n){return(u(n)?n.asyncValidators:o)||null}function u(o){return null!=o&&!Array.isArray(o)&&"object"==typeof o}function v(o,n,e){const r=o.controls;if(!(n?Object.keys(r):r).length)throw new s.vHH(1e3,"");if(!r[e])throw new s.vHH(1001,"")}function a(o,n,e){o._forEachChild((r,g)=>{if(void 0===e[g])throw new s.vHH(1002,"")})}class _{constructor(n,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===l}get invalid(){return this.status===p}get pending(){return this.status==i}get disabled(){return this.status===d}get enabled(){return this.status!==d}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(me(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(me(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(Me(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(Me(n,this._rawAsyncValidators))}hasValidator(n){return U(this._rawValidators,n)}hasAsyncValidator(n){return U(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=i,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=d,this.errors=null,this._forEachChild(r=>{r.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(r=>r(!0))}enable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=l,this._forEachChild(r=>{r.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===l||this.status===i)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?d:l}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=i,this._hasOwnPendingAsyncValidator=!0;const e=he(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(r=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(r,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(!1!==e.emitEvent)}get(n){let e=n;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((r,g)=>r&&r._find(g),this)}getError(n,e){const r=e?this.get(e):this;return r&&r.errors?r.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new s.vpe,this.statusChanges=new s.vpe}_calculateStatus(){return this._allControlsDisabled()?d:this.errors?p:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(i)?i:this._anyControlsHaveStatus(p)?p:l}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){u(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function y(o){return Array.isArray(o)?ke(o):o||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function x(o){return Array.isArray(o)?ie(o):o||null}(this._rawAsyncValidators)}}class C extends _{constructor(n,e,r){super(h(e),D(r,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,r={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,r={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){a(this,0,n),Object.keys(n).forEach(r=>{v(this,!0,r),this.controls[r].setValue(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(Object.keys(n).forEach(r=>{const g=this.controls[r];g&&g.patchValue(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((r,g)=>{r.reset(n[g],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(n,e,r)=>(n[r]=e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,r)=>!!r._syncPendingControls()||e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(e=>{const r=this.controls[e];r&&n(r,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[e,r]of Object.entries(this.controls))if(this.contains(e)&&n(r))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,r,g)=>((r.enabled||this.disabled)&&(e[g]=r.value),e))}_reduceChildren(n,e){let r=n;return this._forEachChild((g,k)=>{r=e(r,g,k)}),r}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}class K extends C{}const j=new s.OlP("CallSetDisabledState",{providedIn:"root",factory:()=>Ze}),Ze="always";function Qe(o,n){return[...n.path,o]}function $e(o,n,e=Ze){st(o,n),n.valueAccessor.writeValue(o.value),(o.disabled||"always"===e)&&n.valueAccessor.setDisabledState?.(o.disabled),function Jt(o,n){n.valueAccessor.registerOnChange(e=>{o._pendingValue=e,o._pendingChange=!0,o._pendingDirty=!0,"change"===o.updateOn&&Et(o,n)})}(o,n),function zt(o,n){const e=(r,g)=>{n.valueAccessor.writeValue(r),g&&n.viewToModelUpdate(r)};o.registerOnChange(e),n._registerOnDestroy(()=>{o._unregisterOnChange(e)})}(o,n),function Qt(o,n){n.valueAccessor.registerOnTouched(()=>{o._pendingTouched=!0,"blur"===o.updateOn&&o._pendingChange&&Et(o,n),"submit"!==o.updateOn&&o.markAsTouched()})}(o,n),function $t(o,n){if(n.valueAccessor.setDisabledState){const e=r=>{n.valueAccessor.setDisabledState(r)};o.registerOnDisabledChange(e),n._registerOnDestroy(()=>{o._unregisterOnDisabledChange(e)})}}(o,n)}function ze(o,n,e=!0){const r=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(r),n.valueAccessor.registerOnTouched(r)),Xe(o,n),o&&(n._invokeOnDestroyCallbacks(),o._registerOnCollectionChange(()=>{}))}function Ke(o,n){o.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function st(o,n){const e=re(o);null!==n.validator?o.setValidators(pe(e,n.validator)):"function"==typeof e&&o.setValidators([e]);const r=J(o);null!==n.asyncValidator?o.setAsyncValidators(pe(r,n.asyncValidator)):"function"==typeof r&&o.setAsyncValidators([r]);const g=()=>o.updateValueAndValidity();Ke(n._rawValidators,g),Ke(n._rawAsyncValidators,g)}function Xe(o,n){let e=!1;if(null!==o){if(null!==n.validator){const g=re(o);if(Array.isArray(g)&&g.length>0){const k=g.filter(B=>B!==n.validator);k.length!==g.length&&(e=!0,o.setValidators(k))}}if(null!==n.asyncValidator){const g=J(o);if(Array.isArray(g)&&g.length>0){const k=g.filter(B=>B!==n.asyncValidator);k.length!==g.length&&(e=!0,o.setAsyncValidators(k))}}}const r=()=>{};return Ke(n._rawValidators,r),Ke(n._rawAsyncValidators,r),e}function Et(o,n){o._pendingDirty&&o.markAsDirty(),o.setValue(o._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(o._pendingValue),o._pendingChange=!1}function bt(o,n){st(o,n)}function lt(o,n){if(!o.hasOwnProperty("model"))return!1;const e=o.model;return!!e.isFirstChange()||!Object.is(n,e.currentValue)}function wt(o,n){o._syncPendingControls(),n.forEach(e=>{const r=e.control;"submit"===r.updateOn&&r._pendingChange&&(e.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}function dt(o,n){if(!n)return null;let e,r,g;return Array.isArray(n),n.forEach(k=>{k.constructor===Y?e=k:function en(o){return Object.getPrototypeOf(o.constructor)===c}(k)?r=k:g=k}),g||r||e||null}const nn={provide:A,useExisting:(0,s.Gpc)(()=>et)},Je=(()=>Promise.resolve())();let et=(()=>{class o extends A{constructor(e,r,g){super(),this.callSetDisabledState=g,this.submitted=!1,this._directives=new Set,this.ngSubmit=new s.vpe,this.form=new C({},ke(e),ie(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Je.then(()=>{const r=this._findContainer(e.path);e.control=r.registerControl(e.name,e.control),$e(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Je.then(()=>{const r=this._findContainer(e.path);r&&r.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Je.then(()=>{const r=this._findContainer(e.path),g=new C({});bt(g,e),r.registerControl(e.name,g),g.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Je.then(()=>{const r=this._findContainer(e.path);r&&r.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,r){Je.then(()=>{this.form.get(e.path).setValue(r)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,wt(this.form,this._directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}return o.\u0275fac=function(e){return new(e||o)(s.Y36(O,10),s.Y36(q,10),s.Y36(j,8))},o.\u0275dir=s.lG2({type:o,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,r){1&e&&s.NdJ("submit",function(k){return r.onSubmit(k)})("reset",function(){return r.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[s._Bn([nn]),s.qOj]}),o})();function Dt(o,n){const e=o.indexOf(n);e>-1&&o.splice(e,1)}function kt(o){return"object"==typeof o&&null!==o&&2===Object.keys(o).length&&"value"in o&&"disabled"in o}const je=class extends _{constructor(n=null,e,r){super(h(e),D(r,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),u(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=kt(n)?n.value:n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){Dt(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){Dt(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){kt(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}},sn={provide:T,useExisting:(0,s.Gpc)(()=>ct)},Vt=(()=>Promise.resolve())();let ct=(()=>{class o extends T{constructor(e,r,g,k,B,xe){super(),this._changeDetectorRef=B,this.callSetDisabledState=xe,this.control=new je,this._registered=!1,this.name="",this.update=new s.vpe,this._parent=e,this._setValidators(r),this._setAsyncValidators(g),this.valueAccessor=dt(0,k)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const r=e.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),lt(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){$e(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(e){Vt.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const r=e.isDisabled.currentValue,g=0!==r&&(0,s.VuI)(r);Vt.then(()=>{g&&!this.control.disabled?this.control.disable():!g&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Qe(e,this._parent):[e]}}return o.\u0275fac=function(e){return new(e||o)(s.Y36(A,9),s.Y36(O,10),s.Y36(q,10),s.Y36(H,10),s.Y36(s.sBO,8),s.Y36(j,8))},o.\u0275dir=s.lG2({type:o,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[s._Bn([sn]),s.qOj,s.TTD]}),o})(),xt=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275dir=s.lG2({type:o,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),o})();const an={provide:H,useExisting:(0,s.Gpc)(()=>ut),multi:!0};let ut=(()=>{class o extends c{writeValue(e){this.setProperty("value",e??"")}registerOnChange(e){this.onChange=r=>{e(""==r?null:parseFloat(r))}}}return o.\u0275fac=function(){let n;return function(r){return(n||(n=s.n5z(o)))(r||o)}}(),o.\u0275dir=s.lG2({type:o,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,r){1&e&&s.NdJ("input",function(k){return r.onChange(k.target.value)})("blur",function(){return r.onTouched()})},features:[s._Bn([an]),s.qOj]}),o})(),St=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=s.oAB({type:o}),o.\u0275inj=s.cJS({}),o})();const cn={provide:H,useExisting:(0,s.Gpc)(()=>ht),multi:!0};let ht=(()=>{class o extends c{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=r=>{e(""==r?null:parseFloat(r))}}}return o.\u0275fac=function(){let n;return function(r){return(n||(n=s.n5z(o)))(r||o)}}(),o.\u0275dir=s.lG2({type:o,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,r){1&e&&s.NdJ("change",function(k){return r.onChange(k.target.value)})("input",function(k){return r.onChange(k.target.value)})("blur",function(){return r.onTouched()})},features:[s._Bn([cn]),s.qOj]}),o})();const ft=new s.OlP("NgModelWithFormControlWarning"),un={provide:T,useExisting:(0,s.Gpc)(()=>pt)};let pt=(()=>{class o extends T{set isDisabled(e){}constructor(e,r,g,k,B){super(),this._ngModelWarningConfig=k,this.callSetDisabledState=B,this.update=new s.vpe,this._ngModelWarningSent=!1,this._setValidators(e),this._setAsyncValidators(r),this.valueAccessor=dt(0,g)}ngOnChanges(e){if(this._isControlChanged(e)){const r=e.form.previousValue;r&&ze(r,this,!1),$e(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}lt(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&ze(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}}return o._ngModelWarningSentOnce=!1,o.\u0275fac=function(e){return new(e||o)(s.Y36(O,10),s.Y36(q,10),s.Y36(H,10),s.Y36(ft,8),s.Y36(j,8))},o.\u0275dir=s.lG2({type:o,selectors:[["","formControl",""]],inputs:{form:["formControl","form"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[s._Bn([un]),s.qOj,s.TTD]}),o})();const hn={provide:A,useExisting:(0,s.Gpc)(()=>tt)};let tt=(()=>{class o extends A{constructor(e,r,g){super(),this.callSetDisabledState=g,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new s.vpe,this._setValidators(e),this._setAsyncValidators(r)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Xe(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const r=this.form.get(e.path);return $e(r,e,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),r}getControl(e){return this.form.get(e.path)}removeControl(e){ze(e.control||null,e,!1),function tn(o,n){const e=o.indexOf(n);e>-1&&o.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,r){this.form.get(e.path).setValue(r)}onSubmit(e){return this.submitted=!0,wt(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const r=e.control,g=this.form.get(e.path);r!==g&&(ze(r||null,e),(o=>o instanceof je)(g)&&($e(g,e,this.callSetDisabledState),e.control=g))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const r=this.form.get(e.path);bt(r,e),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const r=this.form.get(e.path);r&&function Kt(o,n){return Xe(o,n)}(r,e)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){st(this.form,this),this._oldForm&&Xe(this._oldForm,this)}_checkFormPresent(){}}return o.\u0275fac=function(e){return new(e||o)(s.Y36(O,10),s.Y36(q,10),s.Y36(j,8))},o.\u0275dir=s.lG2({type:o,selectors:[["","formGroup",""]],hostBindings:function(e,r){1&e&&s.NdJ("submit",function(k){return r.onSubmit(k)})("reset",function(){return r.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[s._Bn([hn]),s.qOj,s.TTD]}),o})();const mn={provide:T,useExisting:(0,s.Gpc)(()=>gt)};let gt=(()=>{class o extends T{set isDisabled(e){}constructor(e,r,g,k,B){super(),this._ngModelWarningConfig=B,this._added=!1,this.name=null,this.update=new s.vpe,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(r),this._setAsyncValidators(g),this.valueAccessor=dt(0,k)}ngOnChanges(e){this._added||this._setUpControl(),lt(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Qe(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return o._ngModelWarningSentOnce=!1,o.\u0275fac=function(e){return new(e||o)(s.Y36(A,13),s.Y36(O,10),s.Y36(q,10),s.Y36(H,10),s.Y36(ft,8))},o.\u0275dir=s.lG2({type:o,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[s._Bn([mn]),s.qOj,s.TTD]}),o})();const _n={provide:H,useExisting:(0,s.Gpc)(()=>nt),multi:!0};function Ot(o,n){return null==o?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${o}: ${n}`.slice(0,50))}let nt=(()=>{class o extends c{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const g=Ot(this._getOptionId(e),e);this.setProperty("value",g)}registerOnChange(e){this.onChange=r=>{this.value=this._getOptionValue(r),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r),e))return r;return null}_getOptionValue(e){const r=function gn(o){return o.split(":")[0]}(e);return this._optionMap.has(r)?this._optionMap.get(r):e}}return o.\u0275fac=function(){let n;return function(r){return(n||(n=s.n5z(o)))(r||o)}}(),o.\u0275dir=s.lG2({type:o,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,r){1&e&&s.NdJ("change",function(k){return r.onChange(k.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[s._Bn([_n]),s.qOj]}),o})(),Ft=(()=>{class o{constructor(e,r,g){this._element=e,this._renderer=r,this._select=g,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(Ot(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return o.\u0275fac=function(e){return new(e||o)(s.Y36(s.SBq),s.Y36(s.Qsj),s.Y36(nt,9))},o.\u0275dir=s.lG2({type:o,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),o})();const Cn={provide:H,useExisting:(0,s.Gpc)(()=>Ct),multi:!0};function Nt(o,n){return null==o?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${o}: ${n}`.slice(0,50))}let Ct=(()=>{class o extends c{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let r;if(this.value=e,Array.isArray(e)){const g=e.map(k=>this._getOptionId(k));r=(k,B)=>{k._setSelected(g.indexOf(B.toString())>-1)}}else r=(g,k)=>{g._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(e){this.onChange=r=>{const g=[],k=r.selectedOptions;if(void 0!==k){const B=k;for(let xe=0;xe<B.length;xe++){const yt=this._getOptionValue(B[xe].value);g.push(yt)}}else{const B=r.options;for(let xe=0;xe<B.length;xe++){const it=B[xe];if(it.selected){const yt=this._getOptionValue(it.value);g.push(yt)}}}this.value=g,e(g)}}_registerOption(e){const r=(this._idCounter++).toString();return this._optionMap.set(r,e),r}_getOptionId(e){for(const r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r)._value,e))return r;return null}_getOptionValue(e){const r=function vn(o){return o.split(":")[0]}(e);return this._optionMap.has(r)?this._optionMap.get(r)._value:e}}return o.\u0275fac=function(){let n;return function(r){return(n||(n=s.n5z(o)))(r||o)}}(),o.\u0275dir=s.lG2({type:o,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(e,r){1&e&&s.NdJ("change",function(k){return r.onChange(k.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[s._Bn([Cn]),s.qOj]}),o})(),Pt=(()=>{class o{constructor(e,r,g){this._element=e,this._renderer=r,this._select=g,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(Nt(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(Nt(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return o.\u0275fac=function(e){return new(e||o)(s.Y36(s.SBq),s.Y36(s.Qsj),s.Y36(Ct,9))},o.\u0275dir=s.lG2({type:o,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),o})(),Ie=(()=>{class o{constructor(){this._validator=ne}ngOnChanges(e){if(this.inputName in e){const r=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):ne,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275dir=s.lG2({type:o,features:[s.TTD]}),o})();const bn={provide:O,useExisting:(0,s.Gpc)(()=>ot),multi:!0},wn={provide:O,useExisting:(0,s.Gpc)(()=>vt),multi:!0};let ot=(()=>{class o extends Ie{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=s.VuI,this.createValidator=e=>te}enabled(e){return e}}return o.\u0275fac=function(){let n;return function(r){return(n||(n=s.n5z(o)))(r||o)}}(),o.\u0275dir=s.lG2({type:o,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,r){2&e&&s.uIk("required",r._enabled?"":null)},inputs:{required:"required"},features:[s._Bn([bn]),s.qOj]}),o})(),vt=(()=>{class o extends ot{constructor(){super(...arguments),this.createValidator=e=>ce}}return o.\u0275fac=function(){let n;return function(r){return(n||(n=s.n5z(o)))(r||o)}}(),o.\u0275dir=s.lG2({type:o,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(e,r){2&e&&s.uIk("required",r._enabled?"":null)},features:[s._Bn([wn]),s.qOj]}),o})(),Wt=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=s.oAB({type:o}),o.\u0275inj=s.cJS({imports:[St]}),o})();class jt extends _{constructor(n,e,r){super(h(e),D(r,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[this._adjustIndex(n)]}push(n,e={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(n,e,r={}){this.controls.splice(n,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(n,e={}){let r=this._adjustIndex(n);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(n,e,r={}){let g=this._adjustIndex(n);g<0&&(g=0),this.controls[g]&&this.controls[g]._registerOnCollectionChange(()=>{}),this.controls.splice(g,1),e&&(this.controls.splice(g,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,e={}){a(this,0,n),n.forEach((r,g)=>{v(this,!1,g),this.at(g).setValue(r,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(n.forEach((r,g)=>{this.at(g)&&this.at(g).patchValue(r,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n=[],e={}){this._forEachChild((r,g)=>{r.reset(n[g],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((e,r)=>!!r._syncPendingControls()||e,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((e,r)=>{n(e,r)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(e=>e.enabled&&n(e))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(const n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}}function qt(o){return!!o&&(void 0!==o.asyncValidators||void 0!==o.validators||void 0!==o.updateOn)}let Vn=(()=>{class o{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new o;return e.useNonNullable=!0,e}group(e,r=null){const g=this._reduceControls(e);let k={};return qt(r)?k=r:null!==r&&(k.validators=r.validator,k.asyncValidators=r.asyncValidator),new C(g,k)}record(e,r=null){const g=this._reduceControls(e);return new K(g,r)}control(e,r,g){let k={};return this.useNonNullable?(qt(r)?k=r:(k.validators=r,k.asyncValidators=g),new je(e,{...k,nonNullable:!0})):new je(e,r,g)}array(e,r,g){const k=e.map(B=>this._createControl(B));return new jt(k,r,g)}_reduceControls(e){const r={};return Object.keys(e).forEach(g=>{r[g]=this._createControl(e[g])}),r}_createControl(e){return e instanceof je||e instanceof _?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=s.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})(),xn=(()=>{class o{static withConfig(e){return{ngModule:o,providers:[{provide:j,useValue:e.callSetDisabledState??Ze}]}}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=s.oAB({type:o}),o.\u0275inj=s.cJS({imports:[Wt]}),o})(),Sn=(()=>{class o{static withConfig(e){return{ngModule:o,providers:[{provide:ft,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:j,useValue:e.callSetDisabledState??Ze}]}}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=s.oAB({type:o}),o.\u0275inj=s.cJS({imports:[Wt]}),o})()}}]);