@uipath/du-validation-station-wc 1.0.0-beta.1 → 1.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{$ as f,$a as It,$b as Ht,A as F,D as St,Ea as kt,Fa as nt,Ga as wt,H as _t,Ha as U,I as xt,J as Ct,Kb as Qt,La as rt,M as vt,N as zt,O as y,P as T,Qb as Zt,R as E,Ra as yt,S as q,Ta as V,U as me,Va as j,Xa as Tt,Y as bt,Ya as Et,Z as $,Za as Pt,Zb as S,_a as N,_b as Jt,ab as Ot,b as ft,ba as P,bb as Gt,bc as x,c as H,ca as I,cc as c,ea as Mt,eb as Bt,ec as Wt,fa as X,fb as Rt,fc as qt,gb as Ft,gc as z,hb as $t,ia as Dt,ib as Ut,ic as D,jb as Vt,jc as Xt,kc as ut,l as W,lb as jt,lc as te,mb as g,na as tt,nb as st,o as R,ob as at,pc as ee,pf as G,q as At,qc as ie,s as A,sa as O,sf as Ae,tb as ot,uc as fe,v as M,va as et,vb as Nt,w,wb as Kt,xb as Yt,yb as Lt,za as it,zb as lt}from"./chunk-TYL6NO3L.js";import{f as pe}from"./chunk-3ONYU5UZ.js";function _e(n,r){n&1&&$t(0)}function xe(n,r){if(n&1&&(Rt(0),rt(1,_e,1,0,"ng-container",5),Ft()),n&2){let o=r.$implicit,t=g(3),e=t.$implicit,i=t.$index,s=t.$index,a=g();O(),N("ngTemplateOutlet",a.customGutter().template)("ngTemplateOutletContext",Zt(3,Se,e,a._areas()[i+1],i+1,s===0,i===a._areas().length-2,a.draggedGutterIndex()===i))("ngTemplateOutletInjector",o)}}function Ce(n,r){if(n&1&&rt(0,xe,2,10,"ng-container",4),n&2){let o=g(2).$index;N("asSplitGutterDynamicInjector",o+1)}}function ve(n,r){n&1&&Gt(0,"div",3)}function ze(n,r){if(n&1){let o=Ut();It(0,"div",2,0),jt("asSplitCustomClick",function(){P(o);let e=g().$index,i=g();return I(i.gutterClicked(e))})("asSplitCustomDblClick",function(){P(o);let e=g().$index,i=g();return I(i.gutterDoubleClicked(e))})("asSplitCustomMouseDown",function(e){P(o);let i=Kt(1),s=g().$index,a=g();return I(a.gutterMouseDown(e,i,s,s,s+1))})("asSplitCustomKeyDown",function(e){P(o);let i=g().$index,s=g();return I(s.gutterKeyDown(e,i,i,i+1))}),V(2,Ce,1,1,"ng-container")(3,ve,1,0,"div",3),Ot()}if(n&2){let o,t=g(),e=t.$implicit,i=t.$index,s=g();Lt("as-dragged",s.draggedGutterIndex()===i),N("ngStyle",s.getGutterGridStyle(i+1))("asSplitCustomMultiClickThreshold",s.gutterDblClickDuration())("asSplitCustomClickDeltaInPx",s.gutterClickDeltaPx()),yt("aria-label",s.gutterAriaLabel())("aria-orientation",s.direction())("aria-valuemin",s.getAriaValue(e.minSize()))("aria-valuemax",s.getAriaValue(e.maxSize()))("aria-valuenow",s.getAriaValue(e._internalSize()))("aria-valuetext",s.getAriaAreaSizeText(e)),O(2),j((o=s.customGutter())!=null&&o.template?2:3)}}function be(n,r){if(n&1&&V(0,ze,4,12,"div",1),n&2){let o=r.$index,t=r.$count;j(o!==t-1?0:-1)}}function Me(n,r){n&1&&Bt(0,"div",0)}function B(n){if((o=>window.TouchEvent&&n instanceof TouchEvent)(n)){if(n.changedTouches.length===0)return;let{clientX:o,clientY:t}=n.changedTouches[0];return{x:o,y:t}}if(n instanceof KeyboardEvent){let o=n.target;return{x:o.offsetLeft+o.offsetWidth/2,y:o.offsetTop+o.offsetHeight/2}}return{x:n.clientX,y:n.clientY}}function le(n,r,o,t){if(!t.contains(n.target)||!t.contains(r.target))return!1;let e=B(n),i=B(r);return Math.abs(i.x-e.x)<=o&&Math.abs(i.y-e.y)<=o}function re(n){return M(A(n,"mousedown").pipe(w(r=>r.button===0)),A(n,"touchstart",{passive:!1}))}function ct(n){return M(A(n,"mousemove"),A(n,"touchmove"))}function Y(n,r=!1){let o=M(A(n,"mouseup"),A(n,"touchend"));return r?M(o,A(n,"touchcancel")):o}function dt(n,r){return n.reduce((o,t)=>o+r(t),0)}function Te(n,r){return n.reduce((o,t,e)=>{let[i,s]=r(t,e);return o[i]=s,o},{})}function ue(n){return Object.entries(n).filter(([,r])=>r).map(([r])=>r).join(" ")}function ht(){return n=>new ft(r=>f(et).runOutsideAngular(()=>n.subscribe(r)))}function se(n,r,o){if(n.length===0)return!0;let t=n.map(s=>{let a=s.size();return a==="auto"?"*":a}),e=t.filter(s=>s==="*");if(e.length>1)return o&&console.warn("as-split: Maximum one * area is allowed"),!1;if(r==="pixel")return e.length===1?!0:(o&&console.warn("as-split: Pixel mode must have exactly one * area"),!1);let i=dt(t,s=>s==="*"?0:s);return e.length===1?i<=100.1?!0:(o&&console.warn("as-split: Percent areas must total 100%"),!1):i<99.9||i>100.1?(o&&console.warn("as-split: Percent areas must total 100%"),!1):!0}var oe,Se,De,ke,ne,we,ye,K,Ee,Pe,gt,Ie,ce,Oe,ae,Qe,Ze,Ge=pe(()=>{"use strict";te();te();fe();Ae();me();oe=["*"],Se=(n,r,o,t,e,i)=>({areaBefore:n,areaAfter:r,gutterNum:o,first:t,last:e,isDragged:i});De={dir:"ltr",direction:"horizontal",disabled:!1,gutterDblClickDuration:0,gutterSize:11,gutterStep:1,gutterClickDeltaPx:2,restrictMove:!1,unit:"percent",useTransition:!1},ke=new $("angular-split-global-config",{providedIn:"root",factory:()=>De}),ne=(()=>{let r=class r{constructor(){this.template=f(it),this._gutterToHandleElementMap=new Map,this._gutterToExcludeDragElementMap=new Map}_canStartDragging(t,e){return this._gutterToExcludeDragElementMap.has(e)&&this._gutterToExcludeDragElementMap.get(e).some(s=>s.nativeElement.contains(t))?!1:this._gutterToHandleElementMap.has(e)?this._gutterToHandleElementMap.get(e).some(i=>i.nativeElement.contains(t)):!0}_addToMap(t,e,i){t.has(e)?t.get(e).push(i):t.set(e,[i])}_removedFromMap(t,e,i){let s=t.get(e);s.splice(s.indexOf(i),1),s.length===0&&t.delete(e)}static ngTemplateContextGuard(t,e){return!0}};r.\u0275fac=function(e){return new(e||r)},r.\u0275dir=U({type:r,selectors:[["","asSplitGutter",""]]});let n=r;return n})(),we=new $("Gutter num"),ye=(()=>{let r=class r{constructor(){this.vcr=f(kt),this.templateRef=f(it),this.gutterNum=c.required({alias:"asSplitGutterDynamicInjector"}),Jt(()=>{this.vcr.clear();let t=Mt.create({providers:[{provide:we,useValue:this.gutterNum()}],parent:this.vcr.injector});this.vcr.createEmbeddedView(this.templateRef,{$implicit:t})})}static ngTemplateContextGuard(t,e){return!0}};r.\u0275fac=function(e){return new(e||r)},r.\u0275dir=U({type:r,selectors:[["","asSplitGutterDynamicInjector",""]],inputs:{gutterNum:[1,"asSplitGutterDynamicInjector","gutterNum"]}});let n=r;return n})();K=n=>r=>Xt(r,n),Ee=(n,r)=>{throw new Error(`as-split: unknown value "${n}" for "${r}"`)},Pe=(()=>{let r=class r{constructor(){this.elementRef=f(tt),this.document=f(X),this.multiClickThreshold=c.required({alias:"asSplitCustomMultiClickThreshold"}),this.deltaInPx=c.required({alias:"asSplitCustomClickDeltaInPx"}),this.mouseDown=x({alias:"asSplitCustomMouseDown"}),this.click=x({alias:"asSplitCustomClick"}),this.dblClick=x({alias:"asSplitCustomDblClick"}),this.keyDown=x({alias:"asSplitCustomKeyDown"}),A(this.elementRef.nativeElement,"keydown").pipe(ht(),G()).subscribe(e=>this.keyDown.emit(e));let t=re(this.elementRef.nativeElement).pipe(y(e=>ct(this.document).pipe(w(i=>!le(e,i,this.deltaInPx(),this.elementRef.nativeElement)),F(1),R(()=>!0),T(Y(this.document)))));re(this.elementRef.nativeElement).pipe(E(e=>this.mouseDown.emit(e)),q(),Ct((e,{interval:i})=>i>=this.multiClickThreshold()?1:e+1,0),y(e=>Y(this.elementRef.nativeElement).pipe(q(),F(1),e===2?R(()=>e):At(({interval:i})=>i>=this.multiClickThreshold()?W(e):W(e).pipe(St(this.multiClickThreshold()-i))))),T(t),xt(),ht(),G()).subscribe(e=>{e===1?this.click.emit():e===2&&this.dblClick.emit()})}};r.\u0275fac=function(e){return new(e||r)},r.\u0275dir=U({type:r,selectors:[["","asSplitCustomEventsBehavior",""]],inputs:{multiClickThreshold:[1,"asSplitCustomMultiClickThreshold","multiClickThreshold"],deltaInPx:[1,"asSplitCustomClickDeltaInPx","deltaInPx"]},outputs:{mouseDown:"asSplitCustomMouseDown",click:"asSplitCustomClick",dblClick:"asSplitCustomDblClick",keyDown:"asSplitCustomKeyDown"}});let n=r;return n})();gt=new $("Split Area Contract"),Ie=(()=>{let r=class r{get hostClassesBinding(){return this.hostClasses()}get hostDirBinding(){return this.dir()}constructor(){this.document=f(X),this.elementRef=f(tt),this.ngZone=f(et),this.defaultOptions=f(ke),this.gutterMouseDownSubject=new H,this.dragProgressSubject=new H,this._areas=qt(gt),this.customGutter=Wt(ne),this.gutterSize=c(this.defaultOptions.gutterSize,{transform:K(this.defaultOptions.gutterSize)}),this.gutterStep=c(this.defaultOptions.gutterStep,{transform:K(this.defaultOptions.gutterStep)}),this.disabled=c(this.defaultOptions.disabled,{transform:D}),this.gutterClickDeltaPx=c(this.defaultOptions.gutterClickDeltaPx,{transform:K(this.defaultOptions.gutterClickDeltaPx)}),this.direction=c(this.defaultOptions.direction),this.dir=c(this.defaultOptions.dir),this.unit=c(this.defaultOptions.unit),this.gutterAriaLabel=c(),this.restrictMove=c(this.defaultOptions.restrictMove,{transform:D}),this.useTransition=c(this.defaultOptions.useTransition,{transform:D}),this.gutterDblClickDuration=c(this.defaultOptions.gutterDblClickDuration,{transform:K(this.defaultOptions.gutterDblClickDuration)}),this.gutterClick=x(),this.gutterDblClick=x(),this.dragStart=x(),this.dragEnd=x(),this.transitionEnd=x(),this.dragProgress$=this.dragProgressSubject.asObservable(),this._visibleAreas=S(()=>this._areas().filter(t=>t.visible())),this.gridTemplateColumnsStyle=S(()=>this.createGridTemplateColumnsStyle()),this.hostClasses=S(()=>ue({[`as-${this.direction()}`]:!0,[`as-${this.unit()}`]:!0,"as-disabled":this.disabled(),"as-dragging":this._isDragging(),"as-transition":this.useTransition()&&!this._isDragging()})),this.draggedGutterIndex=Dt(void 0),this._isDragging=S(()=>this.draggedGutterIndex()!==void 0),this._alignedVisibleAreasSizes=S(()=>this.createAlignedVisibleAreasSize()),z()&&ut({read:()=>{this.unit()==="percent"&&this._visibleAreas().every(t=>t.size()==="auto")||se(this._visibleAreas(),this.unit(),!0)}}),ut({write:()=>{this.elementRef.nativeElement.style.gridTemplate=this.gridTemplateColumnsStyle()}}),this.gutterMouseDownSubject.pipe(w(t=>!this.customGutter()||this.customGutter()._canStartDragging(t.mouseDownEvent.target,t.gutterIndex+1)),y(t=>ct(this.document).pipe(zt(t.mouseDownEvent),_t(),vt(([,e])=>le(t.mouseDownEvent,e,this.gutterClickDeltaPx(),t.gutterElement)),F(1),T(M(Y(this.document,!0),A(this.document,"blur"))),E(()=>{this.ngZone.run(()=>{this.dragStart.emit(this.createDragInteractionEvent(t.gutterIndex)),this.draggedGutterIndex.set(t.gutterIndex)})}),R(([e])=>this.createDragStartContext(e,t.areaBeforeGutterIndex,t.areaAfterGutterIndex)),y(e=>ct(this.document).pipe(E(i=>this.mouseDragMove(i,e)),T(Y(this.document,!0)),E({complete:()=>this.ngZone.run(()=>{this.dragEnd.emit(this.createDragInteractionEvent(this.draggedGutterIndex())),this.draggedGutterIndex.set(void 0)})}))))),G()).subscribe(),A(this.elementRef.nativeElement,"transitionend").pipe(w(t=>t.propertyName.startsWith("grid-template")),ht(),G()).subscribe(()=>this.ngZone.run(()=>this.transitionEnd.emit(this.createAreaSizes())))}gutterClicked(t){this.ngZone.run(()=>this.gutterClick.emit(this.createDragInteractionEvent(t)))}gutterDoubleClicked(t){this.ngZone.run(()=>this.gutterDblClick.emit(this.createDragInteractionEvent(t)))}gutterMouseDown(t,e,i,s,a){t.preventDefault(),t.stopPropagation(),!this.disabled()&&this.gutterMouseDownSubject.next({mouseDownEvent:t,gutterElement:e,gutterIndex:i,areaBeforeGutterIndex:s,areaAfterGutterIndex:a})}gutterKeyDown(t,e,i,s){if(this.disabled())return;let a=50,u=10,d=0,l=0;if(this.direction()==="horizontal")switch(t.key){case"ArrowLeft":d-=a;break;case"ArrowRight":d+=a;break;case"PageUp":this.dir()==="rtl"?d-=a*u:d+=a*u;break;case"PageDown":this.dir()==="rtl"?d+=a*u:d-=a*u;break;default:return}else switch(t.key){case"ArrowUp":l-=a;break;case"ArrowDown":l+=a;break;case"PageUp":l-=a*u;break;case"PageDown":l+=a*u;break;default:return}t.preventDefault(),t.stopPropagation();let p=B(t),h=this.createDragStartContext(t,i,s);this.ngZone.run(()=>{this.dragStart.emit(this.createDragInteractionEvent(e)),this.draggedGutterIndex.set(e)}),this.dragMoveToPoint({x:p.x+d,y:p.y+l},h),this.ngZone.run(()=>{this.dragEnd.emit(this.createDragInteractionEvent(e)),this.draggedGutterIndex.set(void 0)})}getGutterGridStyle(t){let e=t*2,i=`${e} / ${e}`;return{"grid-column":this.direction()==="horizontal"?i:"1","grid-row":this.direction()==="vertical"?i:"1"}}getAriaAreaSizeText(t){let e=t._internalSize();if(e!=="*")return`${e.toFixed(0)} ${this.unit()}`}getAriaValue(t){return t==="*"?void 0:t}createDragInteractionEvent(t){return{gutterNum:t+1,sizes:this.createAreaSizes()}}createAreaSizes(){return this._visibleAreas().map(t=>t._internalSize())}createDragStartContext(t,e,i){let s=this.elementRef.nativeElement.getBoundingClientRect(),u=(this.direction()==="horizontal"?s.width:s.height)-(this._visibleAreas().length-1)*this.gutterSize(),d=this._areas().map(h=>{if(this.unit()==="pixel")return h._internalSize();{let _=h._internalSize();return _==="*"?_:_/100*u}}),l=Math.max(0,u-dt(d,h=>h==="*"?0:h)),p=d.map(h=>h==="*"?l:h);return{startEvent:t,areaBeforeGutterIndex:e,areaAfterGutterIndex:i,areasPixelSizes:p,totalAreasPixelSize:u,areaIndexToBoundaries:Te(this._areas(),(h,_)=>{let v=k=>k/100*u,b=this.unit()==="pixel"?{min:h._normalizedMinSize(),max:h._normalizedMaxSize()}:{min:v(h._normalizedMinSize()),max:v(h._normalizedMaxSize())};return[_.toString(),b]})}}mouseDragMove(t,e){t.preventDefault(),t.stopPropagation();let i=B(t);this.dragMoveToPoint(i,e)}dragMoveToPoint(t,e){let i=B(e.startEvent),s=this.direction()==="horizontal"?t.x-i.x:t.y-i.y,a=this.direction()==="horizontal"&&this.dir()==="rtl"?-s:s,u=a>0,d=Math.abs(Math.round(a/this.gutterStep())*this.gutterStep()),l=[...e.areasPixelSizes],p=l.map((m,C)=>C),h=this.restrictMove()?[e.areaBeforeGutterIndex]:p.slice(0,e.areaBeforeGutterIndex+1).filter(m=>this._areas()[m].visible()).reverse(),_=this.restrictMove()?[e.areaAfterGutterIndex]:p.slice(e.areaAfterGutterIndex).filter(m=>this._areas()[m].visible()),v=u?_:h,b=u?h:_,k=d,L=0,Q=0;for(;k!==0&&L<v.length&&Q<b.length;){let m=v[L],C=b[Q],Z=l[m],de=l[C],pt=e.areaIndexToBoundaries[m].min,mt=e.areaIndexToBoundaries[C].max,he=Z-pt,ge=mt-de,J=Math.min(he,ge,k);l[m]-=J,l[C]+=J,k-=J,l[m]===pt&&L++,l[C]===mt&&Q++}this._areas().forEach((m,C)=>{if(m._internalSize()!=="*")if(this.unit()==="pixel")m._internalSize.set(l[C]);else{let Z=l[C]/e.totalAreasPixelSize*100;m._internalSize.set(parseFloat(Z.toFixed(10)))}}),this.dragProgressSubject.next(this.createDragInteractionEvent(this.draggedGutterIndex()))}createGridTemplateColumnsStyle(){let t=[],e=dt(this._visibleAreas(),a=>{let u=a._internalSize();return u==="*"?0:u}),i=this._visibleAreas().length,s=0;return this._areas().forEach((a,u,d)=>{let l=this.unit(),p=a._internalSize();if(!a.visible())t.push(l==="percent"||p==="*"?"0fr":"0px");else{if(l==="pixel"){let v=p==="*"?"1fr":`${p}px`;t.push(v)}else{let b=`${p==="*"?100-e:p}fr`;t.push(b)}s++}if(u===d.length-1)return;let _=i-s;a.visible()&&_>0?t.push(`${this.gutterSize()}px`):t.push("0px")}),this.direction()==="horizontal"?`1fr / ${t.join(" ")}`:`${t.join(" ")} / 1fr`}createAlignedVisibleAreasSize(){let t=this._visibleAreas().map(s=>{let a=s.size();return a==="auto"?"*":a});if(se(this._visibleAreas(),this.unit(),!1))return t;let i=this.unit();if(i==="percent"){let s=100/t.length;return t.map(()=>s)}if(i==="pixel"){if(t.filter(a=>a==="*").length===0)return["*",...t.slice(1)];{let a=t.findIndex(d=>d==="*"),u=100;return t.map((d,l)=>l===a||d!=="*"?d:u)}}return Ee(i,"SplitUnit")}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=nt({type:r,selectors:[["as-split"]],contentQueries:function(e,i,s){e&1&&(ot(s,i._areas,gt,4),ot(s,i.customGutter,ne,5)),e&2&&Nt(2)},hostVars:3,hostBindings:function(e,i){e&2&&(Vt("dir",i.hostDirBinding),lt(i.hostClassesBinding))},inputs:{gutterSize:[1,"gutterSize"],gutterStep:[1,"gutterStep"],disabled:[1,"disabled"],gutterClickDeltaPx:[1,"gutterClickDeltaPx"],direction:[1,"direction"],dir:[1,"dir"],unit:[1,"unit"],gutterAriaLabel:[1,"gutterAriaLabel"],restrictMove:[1,"restrictMove"],useTransition:[1,"useTransition"],gutterDblClickDuration:[1,"gutterDblClickDuration"]},outputs:{gutterClick:"gutterClick",gutterDblClick:"gutterDblClick",dragStart:"dragStart",dragEnd:"dragEnd",transitionEnd:"transitionEnd"},exportAs:["asSplit"],ngContentSelectors:oe,decls:3,vars:0,consts:[["gutter",""],["role","separator","tabindex","0","asSplitCustomEventsBehavior","",1,"as-split-gutter",3,"ngStyle","as-dragged","asSplitCustomMultiClickThreshold","asSplitCustomClickDeltaInPx"],["role","separator","tabindex","0","asSplitCustomEventsBehavior","",1,"as-split-gutter",3,"asSplitCustomClick","asSplitCustomDblClick","asSplitCustomMouseDown","asSplitCustomKeyDown","ngStyle","asSplitCustomMultiClickThreshold","asSplitCustomClickDeltaInPx"],[1,"as-split-gutter-icon"],[4,"asSplitGutterDynamicInjector"],[4,"ngTemplateOutlet","ngTemplateOutletContext","ngTemplateOutletInjector"]],template:function(e,i){e&1&&(st(),at(0),Et(1,be,1,1,null,null,Tt)),e&2&&(O(),Pt(i._areas()))},dependencies:[ee,Pe,ye,ie],styles:['@property --as-gutter-background-color{syntax: "<color>"; inherits: true; initial-value: #eeeeee;}@property --as-gutter-icon-horizontal{syntax: "<url>"; inherits: true; initial-value: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==);}@property --as-gutter-icon-vertical{syntax: "<url>"; inherits: true; initial-value: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFCAMAAABl/6zIAAAABlBMVEUAAADMzMzIT8AyAAAAAXRSTlMAQObYZgAAABRJREFUeAFjYGRkwIMJSeMHlBkOABP7AEGzSuPKAAAAAElFTkSuQmCC);}@property --as-gutter-icon-disabled{syntax: "<url>"; inherits: true; initial-value: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==);}@property --as-transition-duration{syntax: "<time>"; inherits: true; initial-value: .3s;}@property --as-gutter-disabled-cursor{syntax: "*"; inherits: true; initial-value: default;}[_nghost-%COMP%]{--_as-gutter-background-color: var(--as-gutter-background-color, #eeeeee);--_as-gutter-icon-horizontal: var( --as-gutter-icon-horizontal, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==) );--_as-gutter-icon-vertical: var( --as-gutter-icon-vertical, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFCAMAAABl/6zIAAAABlBMVEUAAADMzMzIT8AyAAAAAXRSTlMAQObYZgAAABRJREFUeAFjYGRkwIMJSeMHlBkOABP7AEGzSuPKAAAAAElFTkSuQmCC) );--_as-gutter-icon-disabled: var( --as-gutter-icon-disabled, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==) );--_as-transition-duration: var(--as-transition-duration, .3s);--_as-gutter-disabled-cursor: var(--as-gutter-disabled-cursor, default)}[_nghost-%COMP%]{display:grid;overflow:hidden;height:100%;width:100%}.as-transition[_nghost-%COMP%]{transition:grid-template var(--_as-transition-duration)}.as-split-gutter[_ngcontent-%COMP%]{background-color:var(--_as-gutter-background-color);display:flex;align-items:center;justify-content:center;touch-action:none}.as-horizontal[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%]{cursor:col-resize;height:100%}.as-vertical[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%]{cursor:row-resize;width:100%}.as-disabled[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%]{cursor:var(--_as-gutter-disabled-cursor)}.as-split-gutter-icon[_ngcontent-%COMP%]{width:100%;height:100%;background-position:center center;background-repeat:no-repeat}.as-horizontal[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%] > .as-split-gutter-icon[_ngcontent-%COMP%]{background-image:var(--_as-gutter-icon-horizontal)}.as-vertical[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%] > .as-split-gutter-icon[_ngcontent-%COMP%]{background-image:var(--_as-gutter-icon-vertical)}.as-disabled[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%] > .as-split-gutter-icon[_ngcontent-%COMP%]{background-image:var(--_as-gutter-icon-disabled)}'],changeDetection:0});let n=r;return n})(),ce=n=>n==null||n==="*"?"*":+n,Oe=n=>ce(n),ae=n=>ce(n),Qe=(()=>{let r=class r{constructor(){this.split=f(Ie),this.size=c("auto",{transform:Oe}),this.minSize=c("*",{transform:ae}),this.maxSize=c("*",{transform:ae}),this.lockSize=c(!1,{transform:D}),this.visible=c(!0,{transform:D}),this._internalSize=Ht(()=>{if(!this.visible())return 0;let t=this.split._visibleAreas().findIndex(e=>e===this);return this.split._alignedVisibleAreasSizes()[t]}),this._normalizedMinSize=S(()=>this.normalizeMinSize()),this._normalizedMaxSize=S(()=>this.normalizeMaxSize()),this.index=S(()=>this.split._areas().findIndex(t=>t===this)),this.gridAreaNum=S(()=>this.index()*2+1),this.hostClasses=S(()=>ue({"as-split-area":!0,"as-min":this.visible()&&this._internalSize()===this._normalizedMinSize(),"as-max":this.visible()&&this._internalSize()===this._normalizedMaxSize(),"as-hidden":!this.visible()}))}get hostClassesBinding(){return this.hostClasses()}get hostGridColumnStyleBinding(){return this.split.direction()==="horizontal"?`${this.gridAreaNum()} / ${this.gridAreaNum()}`:void 0}get hostGridRowStyleBinding(){return this.split.direction()==="vertical"?`${this.gridAreaNum()} / ${this.gridAreaNum()}`:void 0}get hostPositionStyleBinding(){return this.split._isDragging()?"relative":void 0}normalizeMinSize(){if(!this.visible())return 0;let e=this.normalizeSizeBoundary(this.minSize,0),i=this.size();return i!=="*"&&i!=="auto"&&i<e?(z()&&console.warn("as-split: size cannot be smaller than minSize"),0):e}normalizeMaxSize(){if(!this.visible())return 1/0;let e=this.normalizeSizeBoundary(this.maxSize,1/0),i=this.size();return i!=="*"&&i!=="auto"&&i>e?(z()&&console.warn("as-split: size cannot be larger than maxSize"),1/0):e}normalizeSizeBoundary(t,e){let i=this.size(),s=this.lockSize(),a=t();return s?(z()&&a!=="*"&&console.warn("as-split: lockSize overwrites maxSize/minSize"),i==="*"||i==="auto"?(z()&&console.warn("as-split: lockSize isn't supported on area with * size or without size"),e):i):a==="*"?e:i==="*"||i==="auto"?(z()&&console.warn("as-split: maxSize/minSize not allowed on * or without size"),e):a}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=nt({type:r,selectors:[["as-split-area"]],hostVars:8,hostBindings:function(e,i){e&2&&(lt(i.hostClassesBinding),Yt("grid-column",i.hostGridColumnStyleBinding)("grid-row",i.hostGridRowStyleBinding)("position",i.hostPositionStyleBinding))},inputs:{size:[1,"size"],minSize:[1,"minSize"],maxSize:[1,"maxSize"],lockSize:[1,"lockSize"],visible:[1,"visible"]},exportAs:["asSplitArea"],features:[Qt([{provide:gt,useExisting:r}])],ngContentSelectors:oe,decls:2,vars:1,consts:[[1,"as-iframe-fix"]],template:function(e,i){e&1&&(st(),at(0),V(1,Me,1,0,"div",0)),e&2&&(O(),j(i.split._isDragging()?1:-1))},styles:["[_nghost-%COMP%]{overflow-x:hidden;overflow-y:auto}.as-horizontal > [_nghost-%COMP%]{height:100%}.as-vertical > [_nghost-%COMP%]{width:100%}.as-iframe-fix[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}"],changeDetection:0});let n=r;return n})(),Ze=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=wt({type:r}),r.\u0275inj=bt({});let n=r;return n})()});export{Ie as a,Qe as b,Ze as c,Ge as d};
1
+ import{$ as f,$a as It,$b as Ht,A as F,D as St,Ea as kt,Fa as nt,Ga as wt,H as _t,Ha as U,I as xt,J as Ct,Kb as Qt,La as rt,M as vt,N as zt,O as y,P as T,Qb as Zt,R as E,Ra as yt,S as q,Ta as V,U as me,Va as j,Xa as Tt,Y as bt,Ya as Et,Z as $,Za as Pt,Zb as S,_a as N,_b as Jt,ab as Ot,b as ft,ba as P,bb as Gt,bc as x,c as H,ca as I,cc as c,ea as Mt,eb as Bt,ec as Wt,fa as X,fb as Rt,fc as qt,gb as Ft,gc as z,hb as $t,ia as Dt,ib as Ut,ic as D,jb as Vt,jc as Xt,kc as ut,l as W,lb as jt,lc as te,mb as g,na as tt,nb as st,o as R,ob as at,pc as ee,pf as G,q as At,qc as ie,s as A,sa as O,sf as Ae,tb as ot,uc as fe,v as M,va as et,vb as Nt,w,wb as Kt,xb as Yt,yb as Lt,za as it,zb as lt}from"./chunk-5LGMGLPM.js";import{f as pe}from"./chunk-3ONYU5UZ.js";function _e(n,r){n&1&&$t(0)}function xe(n,r){if(n&1&&(Rt(0),rt(1,_e,1,0,"ng-container",5),Ft()),n&2){let o=r.$implicit,t=g(3),e=t.$implicit,i=t.$index,s=t.$index,a=g();O(),N("ngTemplateOutlet",a.customGutter().template)("ngTemplateOutletContext",Zt(3,Se,e,a._areas()[i+1],i+1,s===0,i===a._areas().length-2,a.draggedGutterIndex()===i))("ngTemplateOutletInjector",o)}}function Ce(n,r){if(n&1&&rt(0,xe,2,10,"ng-container",4),n&2){let o=g(2).$index;N("asSplitGutterDynamicInjector",o+1)}}function ve(n,r){n&1&&Gt(0,"div",3)}function ze(n,r){if(n&1){let o=Ut();It(0,"div",2,0),jt("asSplitCustomClick",function(){P(o);let e=g().$index,i=g();return I(i.gutterClicked(e))})("asSplitCustomDblClick",function(){P(o);let e=g().$index,i=g();return I(i.gutterDoubleClicked(e))})("asSplitCustomMouseDown",function(e){P(o);let i=Kt(1),s=g().$index,a=g();return I(a.gutterMouseDown(e,i,s,s,s+1))})("asSplitCustomKeyDown",function(e){P(o);let i=g().$index,s=g();return I(s.gutterKeyDown(e,i,i,i+1))}),V(2,Ce,1,1,"ng-container")(3,ve,1,0,"div",3),Ot()}if(n&2){let o,t=g(),e=t.$implicit,i=t.$index,s=g();Lt("as-dragged",s.draggedGutterIndex()===i),N("ngStyle",s.getGutterGridStyle(i+1))("asSplitCustomMultiClickThreshold",s.gutterDblClickDuration())("asSplitCustomClickDeltaInPx",s.gutterClickDeltaPx()),yt("aria-label",s.gutterAriaLabel())("aria-orientation",s.direction())("aria-valuemin",s.getAriaValue(e.minSize()))("aria-valuemax",s.getAriaValue(e.maxSize()))("aria-valuenow",s.getAriaValue(e._internalSize()))("aria-valuetext",s.getAriaAreaSizeText(e)),O(2),j((o=s.customGutter())!=null&&o.template?2:3)}}function be(n,r){if(n&1&&V(0,ze,4,12,"div",1),n&2){let o=r.$index,t=r.$count;j(o!==t-1?0:-1)}}function Me(n,r){n&1&&Bt(0,"div",0)}function B(n){if((o=>window.TouchEvent&&n instanceof TouchEvent)(n)){if(n.changedTouches.length===0)return;let{clientX:o,clientY:t}=n.changedTouches[0];return{x:o,y:t}}if(n instanceof KeyboardEvent){let o=n.target;return{x:o.offsetLeft+o.offsetWidth/2,y:o.offsetTop+o.offsetHeight/2}}return{x:n.clientX,y:n.clientY}}function le(n,r,o,t){if(!t.contains(n.target)||!t.contains(r.target))return!1;let e=B(n),i=B(r);return Math.abs(i.x-e.x)<=o&&Math.abs(i.y-e.y)<=o}function re(n){return M(A(n,"mousedown").pipe(w(r=>r.button===0)),A(n,"touchstart",{passive:!1}))}function ct(n){return M(A(n,"mousemove"),A(n,"touchmove"))}function Y(n,r=!1){let o=M(A(n,"mouseup"),A(n,"touchend"));return r?M(o,A(n,"touchcancel")):o}function dt(n,r){return n.reduce((o,t)=>o+r(t),0)}function Te(n,r){return n.reduce((o,t,e)=>{let[i,s]=r(t,e);return o[i]=s,o},{})}function ue(n){return Object.entries(n).filter(([,r])=>r).map(([r])=>r).join(" ")}function ht(){return n=>new ft(r=>f(et).runOutsideAngular(()=>n.subscribe(r)))}function se(n,r,o){if(n.length===0)return!0;let t=n.map(s=>{let a=s.size();return a==="auto"?"*":a}),e=t.filter(s=>s==="*");if(e.length>1)return o&&console.warn("as-split: Maximum one * area is allowed"),!1;if(r==="pixel")return e.length===1?!0:(o&&console.warn("as-split: Pixel mode must have exactly one * area"),!1);let i=dt(t,s=>s==="*"?0:s);return e.length===1?i<=100.1?!0:(o&&console.warn("as-split: Percent areas must total 100%"),!1):i<99.9||i>100.1?(o&&console.warn("as-split: Percent areas must total 100%"),!1):!0}var oe,Se,De,ke,ne,we,ye,K,Ee,Pe,gt,Ie,ce,Oe,ae,Qe,Ze,Ge=pe(()=>{"use strict";te();te();fe();Ae();me();oe=["*"],Se=(n,r,o,t,e,i)=>({areaBefore:n,areaAfter:r,gutterNum:o,first:t,last:e,isDragged:i});De={dir:"ltr",direction:"horizontal",disabled:!1,gutterDblClickDuration:0,gutterSize:11,gutterStep:1,gutterClickDeltaPx:2,restrictMove:!1,unit:"percent",useTransition:!1},ke=new $("angular-split-global-config",{providedIn:"root",factory:()=>De}),ne=(()=>{let r=class r{constructor(){this.template=f(it),this._gutterToHandleElementMap=new Map,this._gutterToExcludeDragElementMap=new Map}_canStartDragging(t,e){return this._gutterToExcludeDragElementMap.has(e)&&this._gutterToExcludeDragElementMap.get(e).some(s=>s.nativeElement.contains(t))?!1:this._gutterToHandleElementMap.has(e)?this._gutterToHandleElementMap.get(e).some(i=>i.nativeElement.contains(t)):!0}_addToMap(t,e,i){t.has(e)?t.get(e).push(i):t.set(e,[i])}_removedFromMap(t,e,i){let s=t.get(e);s.splice(s.indexOf(i),1),s.length===0&&t.delete(e)}static ngTemplateContextGuard(t,e){return!0}};r.\u0275fac=function(e){return new(e||r)},r.\u0275dir=U({type:r,selectors:[["","asSplitGutter",""]]});let n=r;return n})(),we=new $("Gutter num"),ye=(()=>{let r=class r{constructor(){this.vcr=f(kt),this.templateRef=f(it),this.gutterNum=c.required({alias:"asSplitGutterDynamicInjector"}),Jt(()=>{this.vcr.clear();let t=Mt.create({providers:[{provide:we,useValue:this.gutterNum()}],parent:this.vcr.injector});this.vcr.createEmbeddedView(this.templateRef,{$implicit:t})})}static ngTemplateContextGuard(t,e){return!0}};r.\u0275fac=function(e){return new(e||r)},r.\u0275dir=U({type:r,selectors:[["","asSplitGutterDynamicInjector",""]],inputs:{gutterNum:[1,"asSplitGutterDynamicInjector","gutterNum"]}});let n=r;return n})();K=n=>r=>Xt(r,n),Ee=(n,r)=>{throw new Error(`as-split: unknown value "${n}" for "${r}"`)},Pe=(()=>{let r=class r{constructor(){this.elementRef=f(tt),this.document=f(X),this.multiClickThreshold=c.required({alias:"asSplitCustomMultiClickThreshold"}),this.deltaInPx=c.required({alias:"asSplitCustomClickDeltaInPx"}),this.mouseDown=x({alias:"asSplitCustomMouseDown"}),this.click=x({alias:"asSplitCustomClick"}),this.dblClick=x({alias:"asSplitCustomDblClick"}),this.keyDown=x({alias:"asSplitCustomKeyDown"}),A(this.elementRef.nativeElement,"keydown").pipe(ht(),G()).subscribe(e=>this.keyDown.emit(e));let t=re(this.elementRef.nativeElement).pipe(y(e=>ct(this.document).pipe(w(i=>!le(e,i,this.deltaInPx(),this.elementRef.nativeElement)),F(1),R(()=>!0),T(Y(this.document)))));re(this.elementRef.nativeElement).pipe(E(e=>this.mouseDown.emit(e)),q(),Ct((e,{interval:i})=>i>=this.multiClickThreshold()?1:e+1,0),y(e=>Y(this.elementRef.nativeElement).pipe(q(),F(1),e===2?R(()=>e):At(({interval:i})=>i>=this.multiClickThreshold()?W(e):W(e).pipe(St(this.multiClickThreshold()-i))))),T(t),xt(),ht(),G()).subscribe(e=>{e===1?this.click.emit():e===2&&this.dblClick.emit()})}};r.\u0275fac=function(e){return new(e||r)},r.\u0275dir=U({type:r,selectors:[["","asSplitCustomEventsBehavior",""]],inputs:{multiClickThreshold:[1,"asSplitCustomMultiClickThreshold","multiClickThreshold"],deltaInPx:[1,"asSplitCustomClickDeltaInPx","deltaInPx"]},outputs:{mouseDown:"asSplitCustomMouseDown",click:"asSplitCustomClick",dblClick:"asSplitCustomDblClick",keyDown:"asSplitCustomKeyDown"}});let n=r;return n})();gt=new $("Split Area Contract"),Ie=(()=>{let r=class r{get hostClassesBinding(){return this.hostClasses()}get hostDirBinding(){return this.dir()}constructor(){this.document=f(X),this.elementRef=f(tt),this.ngZone=f(et),this.defaultOptions=f(ke),this.gutterMouseDownSubject=new H,this.dragProgressSubject=new H,this._areas=qt(gt),this.customGutter=Wt(ne),this.gutterSize=c(this.defaultOptions.gutterSize,{transform:K(this.defaultOptions.gutterSize)}),this.gutterStep=c(this.defaultOptions.gutterStep,{transform:K(this.defaultOptions.gutterStep)}),this.disabled=c(this.defaultOptions.disabled,{transform:D}),this.gutterClickDeltaPx=c(this.defaultOptions.gutterClickDeltaPx,{transform:K(this.defaultOptions.gutterClickDeltaPx)}),this.direction=c(this.defaultOptions.direction),this.dir=c(this.defaultOptions.dir),this.unit=c(this.defaultOptions.unit),this.gutterAriaLabel=c(),this.restrictMove=c(this.defaultOptions.restrictMove,{transform:D}),this.useTransition=c(this.defaultOptions.useTransition,{transform:D}),this.gutterDblClickDuration=c(this.defaultOptions.gutterDblClickDuration,{transform:K(this.defaultOptions.gutterDblClickDuration)}),this.gutterClick=x(),this.gutterDblClick=x(),this.dragStart=x(),this.dragEnd=x(),this.transitionEnd=x(),this.dragProgress$=this.dragProgressSubject.asObservable(),this._visibleAreas=S(()=>this._areas().filter(t=>t.visible())),this.gridTemplateColumnsStyle=S(()=>this.createGridTemplateColumnsStyle()),this.hostClasses=S(()=>ue({[`as-${this.direction()}`]:!0,[`as-${this.unit()}`]:!0,"as-disabled":this.disabled(),"as-dragging":this._isDragging(),"as-transition":this.useTransition()&&!this._isDragging()})),this.draggedGutterIndex=Dt(void 0),this._isDragging=S(()=>this.draggedGutterIndex()!==void 0),this._alignedVisibleAreasSizes=S(()=>this.createAlignedVisibleAreasSize()),z()&&ut({read:()=>{this.unit()==="percent"&&this._visibleAreas().every(t=>t.size()==="auto")||se(this._visibleAreas(),this.unit(),!0)}}),ut({write:()=>{this.elementRef.nativeElement.style.gridTemplate=this.gridTemplateColumnsStyle()}}),this.gutterMouseDownSubject.pipe(w(t=>!this.customGutter()||this.customGutter()._canStartDragging(t.mouseDownEvent.target,t.gutterIndex+1)),y(t=>ct(this.document).pipe(zt(t.mouseDownEvent),_t(),vt(([,e])=>le(t.mouseDownEvent,e,this.gutterClickDeltaPx(),t.gutterElement)),F(1),T(M(Y(this.document,!0),A(this.document,"blur"))),E(()=>{this.ngZone.run(()=>{this.dragStart.emit(this.createDragInteractionEvent(t.gutterIndex)),this.draggedGutterIndex.set(t.gutterIndex)})}),R(([e])=>this.createDragStartContext(e,t.areaBeforeGutterIndex,t.areaAfterGutterIndex)),y(e=>ct(this.document).pipe(E(i=>this.mouseDragMove(i,e)),T(Y(this.document,!0)),E({complete:()=>this.ngZone.run(()=>{this.dragEnd.emit(this.createDragInteractionEvent(this.draggedGutterIndex())),this.draggedGutterIndex.set(void 0)})}))))),G()).subscribe(),A(this.elementRef.nativeElement,"transitionend").pipe(w(t=>t.propertyName.startsWith("grid-template")),ht(),G()).subscribe(()=>this.ngZone.run(()=>this.transitionEnd.emit(this.createAreaSizes())))}gutterClicked(t){this.ngZone.run(()=>this.gutterClick.emit(this.createDragInteractionEvent(t)))}gutterDoubleClicked(t){this.ngZone.run(()=>this.gutterDblClick.emit(this.createDragInteractionEvent(t)))}gutterMouseDown(t,e,i,s,a){t.preventDefault(),t.stopPropagation(),!this.disabled()&&this.gutterMouseDownSubject.next({mouseDownEvent:t,gutterElement:e,gutterIndex:i,areaBeforeGutterIndex:s,areaAfterGutterIndex:a})}gutterKeyDown(t,e,i,s){if(this.disabled())return;let a=50,u=10,d=0,l=0;if(this.direction()==="horizontal")switch(t.key){case"ArrowLeft":d-=a;break;case"ArrowRight":d+=a;break;case"PageUp":this.dir()==="rtl"?d-=a*u:d+=a*u;break;case"PageDown":this.dir()==="rtl"?d+=a*u:d-=a*u;break;default:return}else switch(t.key){case"ArrowUp":l-=a;break;case"ArrowDown":l+=a;break;case"PageUp":l-=a*u;break;case"PageDown":l+=a*u;break;default:return}t.preventDefault(),t.stopPropagation();let p=B(t),h=this.createDragStartContext(t,i,s);this.ngZone.run(()=>{this.dragStart.emit(this.createDragInteractionEvent(e)),this.draggedGutterIndex.set(e)}),this.dragMoveToPoint({x:p.x+d,y:p.y+l},h),this.ngZone.run(()=>{this.dragEnd.emit(this.createDragInteractionEvent(e)),this.draggedGutterIndex.set(void 0)})}getGutterGridStyle(t){let e=t*2,i=`${e} / ${e}`;return{"grid-column":this.direction()==="horizontal"?i:"1","grid-row":this.direction()==="vertical"?i:"1"}}getAriaAreaSizeText(t){let e=t._internalSize();if(e!=="*")return`${e.toFixed(0)} ${this.unit()}`}getAriaValue(t){return t==="*"?void 0:t}createDragInteractionEvent(t){return{gutterNum:t+1,sizes:this.createAreaSizes()}}createAreaSizes(){return this._visibleAreas().map(t=>t._internalSize())}createDragStartContext(t,e,i){let s=this.elementRef.nativeElement.getBoundingClientRect(),u=(this.direction()==="horizontal"?s.width:s.height)-(this._visibleAreas().length-1)*this.gutterSize(),d=this._areas().map(h=>{if(this.unit()==="pixel")return h._internalSize();{let _=h._internalSize();return _==="*"?_:_/100*u}}),l=Math.max(0,u-dt(d,h=>h==="*"?0:h)),p=d.map(h=>h==="*"?l:h);return{startEvent:t,areaBeforeGutterIndex:e,areaAfterGutterIndex:i,areasPixelSizes:p,totalAreasPixelSize:u,areaIndexToBoundaries:Te(this._areas(),(h,_)=>{let v=k=>k/100*u,b=this.unit()==="pixel"?{min:h._normalizedMinSize(),max:h._normalizedMaxSize()}:{min:v(h._normalizedMinSize()),max:v(h._normalizedMaxSize())};return[_.toString(),b]})}}mouseDragMove(t,e){t.preventDefault(),t.stopPropagation();let i=B(t);this.dragMoveToPoint(i,e)}dragMoveToPoint(t,e){let i=B(e.startEvent),s=this.direction()==="horizontal"?t.x-i.x:t.y-i.y,a=this.direction()==="horizontal"&&this.dir()==="rtl"?-s:s,u=a>0,d=Math.abs(Math.round(a/this.gutterStep())*this.gutterStep()),l=[...e.areasPixelSizes],p=l.map((m,C)=>C),h=this.restrictMove()?[e.areaBeforeGutterIndex]:p.slice(0,e.areaBeforeGutterIndex+1).filter(m=>this._areas()[m].visible()).reverse(),_=this.restrictMove()?[e.areaAfterGutterIndex]:p.slice(e.areaAfterGutterIndex).filter(m=>this._areas()[m].visible()),v=u?_:h,b=u?h:_,k=d,L=0,Q=0;for(;k!==0&&L<v.length&&Q<b.length;){let m=v[L],C=b[Q],Z=l[m],de=l[C],pt=e.areaIndexToBoundaries[m].min,mt=e.areaIndexToBoundaries[C].max,he=Z-pt,ge=mt-de,J=Math.min(he,ge,k);l[m]-=J,l[C]+=J,k-=J,l[m]===pt&&L++,l[C]===mt&&Q++}this._areas().forEach((m,C)=>{if(m._internalSize()!=="*")if(this.unit()==="pixel")m._internalSize.set(l[C]);else{let Z=l[C]/e.totalAreasPixelSize*100;m._internalSize.set(parseFloat(Z.toFixed(10)))}}),this.dragProgressSubject.next(this.createDragInteractionEvent(this.draggedGutterIndex()))}createGridTemplateColumnsStyle(){let t=[],e=dt(this._visibleAreas(),a=>{let u=a._internalSize();return u==="*"?0:u}),i=this._visibleAreas().length,s=0;return this._areas().forEach((a,u,d)=>{let l=this.unit(),p=a._internalSize();if(!a.visible())t.push(l==="percent"||p==="*"?"0fr":"0px");else{if(l==="pixel"){let v=p==="*"?"1fr":`${p}px`;t.push(v)}else{let b=`${p==="*"?100-e:p}fr`;t.push(b)}s++}if(u===d.length-1)return;let _=i-s;a.visible()&&_>0?t.push(`${this.gutterSize()}px`):t.push("0px")}),this.direction()==="horizontal"?`1fr / ${t.join(" ")}`:`${t.join(" ")} / 1fr`}createAlignedVisibleAreasSize(){let t=this._visibleAreas().map(s=>{let a=s.size();return a==="auto"?"*":a});if(se(this._visibleAreas(),this.unit(),!1))return t;let i=this.unit();if(i==="percent"){let s=100/t.length;return t.map(()=>s)}if(i==="pixel"){if(t.filter(a=>a==="*").length===0)return["*",...t.slice(1)];{let a=t.findIndex(d=>d==="*"),u=100;return t.map((d,l)=>l===a||d!=="*"?d:u)}}return Ee(i,"SplitUnit")}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=nt({type:r,selectors:[["as-split"]],contentQueries:function(e,i,s){e&1&&(ot(s,i._areas,gt,4),ot(s,i.customGutter,ne,5)),e&2&&Nt(2)},hostVars:3,hostBindings:function(e,i){e&2&&(Vt("dir",i.hostDirBinding),lt(i.hostClassesBinding))},inputs:{gutterSize:[1,"gutterSize"],gutterStep:[1,"gutterStep"],disabled:[1,"disabled"],gutterClickDeltaPx:[1,"gutterClickDeltaPx"],direction:[1,"direction"],dir:[1,"dir"],unit:[1,"unit"],gutterAriaLabel:[1,"gutterAriaLabel"],restrictMove:[1,"restrictMove"],useTransition:[1,"useTransition"],gutterDblClickDuration:[1,"gutterDblClickDuration"]},outputs:{gutterClick:"gutterClick",gutterDblClick:"gutterDblClick",dragStart:"dragStart",dragEnd:"dragEnd",transitionEnd:"transitionEnd"},exportAs:["asSplit"],ngContentSelectors:oe,decls:3,vars:0,consts:[["gutter",""],["role","separator","tabindex","0","asSplitCustomEventsBehavior","",1,"as-split-gutter",3,"ngStyle","as-dragged","asSplitCustomMultiClickThreshold","asSplitCustomClickDeltaInPx"],["role","separator","tabindex","0","asSplitCustomEventsBehavior","",1,"as-split-gutter",3,"asSplitCustomClick","asSplitCustomDblClick","asSplitCustomMouseDown","asSplitCustomKeyDown","ngStyle","asSplitCustomMultiClickThreshold","asSplitCustomClickDeltaInPx"],[1,"as-split-gutter-icon"],[4,"asSplitGutterDynamicInjector"],[4,"ngTemplateOutlet","ngTemplateOutletContext","ngTemplateOutletInjector"]],template:function(e,i){e&1&&(st(),at(0),Et(1,be,1,1,null,null,Tt)),e&2&&(O(),Pt(i._areas()))},dependencies:[ee,Pe,ye,ie],styles:['@property --as-gutter-background-color{syntax: "<color>"; inherits: true; initial-value: #eeeeee;}@property --as-gutter-icon-horizontal{syntax: "<url>"; inherits: true; initial-value: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==);}@property --as-gutter-icon-vertical{syntax: "<url>"; inherits: true; initial-value: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFCAMAAABl/6zIAAAABlBMVEUAAADMzMzIT8AyAAAAAXRSTlMAQObYZgAAABRJREFUeAFjYGRkwIMJSeMHlBkOABP7AEGzSuPKAAAAAElFTkSuQmCC);}@property --as-gutter-icon-disabled{syntax: "<url>"; inherits: true; initial-value: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==);}@property --as-transition-duration{syntax: "<time>"; inherits: true; initial-value: .3s;}@property --as-gutter-disabled-cursor{syntax: "*"; inherits: true; initial-value: default;}[_nghost-%COMP%]{--_as-gutter-background-color: var(--as-gutter-background-color, #eeeeee);--_as-gutter-icon-horizontal: var( --as-gutter-icon-horizontal, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==) );--_as-gutter-icon-vertical: var( --as-gutter-icon-vertical, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFCAMAAABl/6zIAAAABlBMVEUAAADMzMzIT8AyAAAAAXRSTlMAQObYZgAAABRJREFUeAFjYGRkwIMJSeMHlBkOABP7AEGzSuPKAAAAAElFTkSuQmCC) );--_as-gutter-icon-disabled: var( --as-gutter-icon-disabled, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==) );--_as-transition-duration: var(--as-transition-duration, .3s);--_as-gutter-disabled-cursor: var(--as-gutter-disabled-cursor, default)}[_nghost-%COMP%]{display:grid;overflow:hidden;height:100%;width:100%}.as-transition[_nghost-%COMP%]{transition:grid-template var(--_as-transition-duration)}.as-split-gutter[_ngcontent-%COMP%]{background-color:var(--_as-gutter-background-color);display:flex;align-items:center;justify-content:center;touch-action:none}.as-horizontal[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%]{cursor:col-resize;height:100%}.as-vertical[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%]{cursor:row-resize;width:100%}.as-disabled[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%]{cursor:var(--_as-gutter-disabled-cursor)}.as-split-gutter-icon[_ngcontent-%COMP%]{width:100%;height:100%;background-position:center center;background-repeat:no-repeat}.as-horizontal[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%] > .as-split-gutter-icon[_ngcontent-%COMP%]{background-image:var(--_as-gutter-icon-horizontal)}.as-vertical[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%] > .as-split-gutter-icon[_ngcontent-%COMP%]{background-image:var(--_as-gutter-icon-vertical)}.as-disabled[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%] > .as-split-gutter-icon[_ngcontent-%COMP%]{background-image:var(--_as-gutter-icon-disabled)}'],changeDetection:0});let n=r;return n})(),ce=n=>n==null||n==="*"?"*":+n,Oe=n=>ce(n),ae=n=>ce(n),Qe=(()=>{let r=class r{constructor(){this.split=f(Ie),this.size=c("auto",{transform:Oe}),this.minSize=c("*",{transform:ae}),this.maxSize=c("*",{transform:ae}),this.lockSize=c(!1,{transform:D}),this.visible=c(!0,{transform:D}),this._internalSize=Ht(()=>{if(!this.visible())return 0;let t=this.split._visibleAreas().findIndex(e=>e===this);return this.split._alignedVisibleAreasSizes()[t]}),this._normalizedMinSize=S(()=>this.normalizeMinSize()),this._normalizedMaxSize=S(()=>this.normalizeMaxSize()),this.index=S(()=>this.split._areas().findIndex(t=>t===this)),this.gridAreaNum=S(()=>this.index()*2+1),this.hostClasses=S(()=>ue({"as-split-area":!0,"as-min":this.visible()&&this._internalSize()===this._normalizedMinSize(),"as-max":this.visible()&&this._internalSize()===this._normalizedMaxSize(),"as-hidden":!this.visible()}))}get hostClassesBinding(){return this.hostClasses()}get hostGridColumnStyleBinding(){return this.split.direction()==="horizontal"?`${this.gridAreaNum()} / ${this.gridAreaNum()}`:void 0}get hostGridRowStyleBinding(){return this.split.direction()==="vertical"?`${this.gridAreaNum()} / ${this.gridAreaNum()}`:void 0}get hostPositionStyleBinding(){return this.split._isDragging()?"relative":void 0}normalizeMinSize(){if(!this.visible())return 0;let e=this.normalizeSizeBoundary(this.minSize,0),i=this.size();return i!=="*"&&i!=="auto"&&i<e?(z()&&console.warn("as-split: size cannot be smaller than minSize"),0):e}normalizeMaxSize(){if(!this.visible())return 1/0;let e=this.normalizeSizeBoundary(this.maxSize,1/0),i=this.size();return i!=="*"&&i!=="auto"&&i>e?(z()&&console.warn("as-split: size cannot be larger than maxSize"),1/0):e}normalizeSizeBoundary(t,e){let i=this.size(),s=this.lockSize(),a=t();return s?(z()&&a!=="*"&&console.warn("as-split: lockSize overwrites maxSize/minSize"),i==="*"||i==="auto"?(z()&&console.warn("as-split: lockSize isn't supported on area with * size or without size"),e):i):a==="*"?e:i==="*"||i==="auto"?(z()&&console.warn("as-split: maxSize/minSize not allowed on * or without size"),e):a}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=nt({type:r,selectors:[["as-split-area"]],hostVars:8,hostBindings:function(e,i){e&2&&(lt(i.hostClassesBinding),Yt("grid-column",i.hostGridColumnStyleBinding)("grid-row",i.hostGridRowStyleBinding)("position",i.hostPositionStyleBinding))},inputs:{size:[1,"size"],minSize:[1,"minSize"],maxSize:[1,"maxSize"],lockSize:[1,"lockSize"],visible:[1,"visible"]},exportAs:["asSplitArea"],features:[Qt([{provide:gt,useExisting:r}])],ngContentSelectors:oe,decls:2,vars:1,consts:[[1,"as-iframe-fix"]],template:function(e,i){e&1&&(st(),at(0),V(1,Me,1,0,"div",0)),e&2&&(O(),j(i.split._isDragging()?1:-1))},styles:["[_nghost-%COMP%]{overflow-x:hidden;overflow-y:auto}.as-horizontal > [_nghost-%COMP%]{height:100%}.as-vertical > [_nghost-%COMP%]{width:100%}.as-iframe-fix[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}"],changeDetection:0});let n=r;return n})(),Ze=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=wt({type:r}),r.\u0275inj=bt({});let n=r;return n})()});export{Ie as a,Qe as b,Ze as c,Ge as d};
@@ -1,2 +1,2 @@
1
- import{a as Yi,b as kn}from"./chunk-FLLVJZW7.js";import{a as Zi,b as Gn,c as xe,d as en,e as Tt,f as nn,i as pt,j as Mt,k as he,l as ut,m as on,n as an,o as rn,p as ln,q as sn,r as dn,s as cn,t as pn,u as un,v as qn}from"./chunk-VHTAX7UN.js";import{a as qi,b as $i,c as zi,d as Wi}from"./chunk-YWO5KYCW.js";import{b as Ke,c as Pi,d as wi,e as Fi,f as Ui,g as Ri,h as Ni,j as Un,k as Ji,l as Hn,n as tn,o as Kn}from"./chunk-ZCYTIBW4.js";import{$ as x,$a as l,$e as et,$j as Ce,A as qe,Ab as f,Ae as ii,Af as gi,Ai as Li,Bb as j,Be as ni,Bf as vi,Bk as Xi,Cb as V,Ce as oi,Ck as An,Df as fi,Eb as P,Ed as Yt,Ef as Ci,Fa as U,Fb as O,Fd as Ae,Ff as xi,Gb as C,Gd as Qt,H as Vt,Hb as Ie,Hd as Qe,Id as Ct,If as hi,Jb as se,Jc as Kt,Kb as Ut,Kh as Ei,La as $e,Lb as Rt,Lf as ht,Lh as Fn,Mb as pe,Mf as Te,Mh as Ii,Nb as Le,Nd as K,Nf as Si,Nh as Di,Ni as Rn,O as Et,Ob as Nt,Oc as qt,Od as q,Oh as Oi,Pb as Lt,Pc as $t,Pd as $,Qa as Ot,Ra as E,Re as ae,Ri as we,Rj as Me,Sb as m,Se as Y,Si as Ai,Sj as Nn,Ta as S,Tb as _,Te as ee,U as vt,Ub as X,Ui as at,Va as y,Vc as zt,Vf as St,Vi as H,Wb as At,Wi as z,Xa as Pt,Xi as ki,Ya as J,Yi as rt,Za as Z,Zb as c,Zi as Bi,_a as u,_b as ue,_e as Oe,_i as de,a as bt,ab as d,af as ke,ak as Gi,ba as g,bb as D,bc as ft,bk as Q,ca as v,cc as M,ch as Pe,cj as Hi,dc as je,dh as Mi,dj as ge,dk as Ki,ee as Je,ef as ai,ej as lt,ek as Fe,fb as k,fd as De,fe as Ze,ff as ri,fj as st,ga as It,gb as B,ge as N,gf as li,gg as yi,gh as yt,gk as Ue,hb as wt,hh as bi,ia as G,ib as b,ka as wn,ke as A,kf as si,kg as Ti,kh as Vi,kk as ji,kl as Qi,l as Ve,lb as T,lc as R,le as L,lf as di,lh as He,mb as s,mc as kt,mf as tt,mg as me,mk as Ln,ml as Bn,na as Ne,nd as Ye,nf as it,o as gt,of as nt,pd as ne,pf as xt,qc as Bt,qd as oe,qf as ci,qh as F,ra as Dt,rf as Be,rj as dt,sa as a,sc as Ht,se as Jt,sf as pi,sh as ot,sj as ct,tc as Gt,ub as ze,uc as Xe,ue as Zt,uh as _e,uj as ve,vb as We,vj as W,w as Ee,wb as ce,xb as Ft,xd as Wt,xf as ui,yb as ie,yd as jt,ye as ei,yf as mi,yh as Ge,yj as fe,zd as Xt,ze as ti,zf as _i}from"./chunk-TYL6NO3L.js";import"./chunk-ZOBGFIAP.js";import"./chunk-7LF7TUYR.js";import"./chunk-QSPXPEUM.js";import"./chunk-MHF6VH7J.js";import"./chunk-OC2CZ3QN.js";import"./chunk-S75KSQCC.js";import"./chunk-F3WKVTVT.js";import"./chunk-TX6COQKF.js";import"./chunk-B3JIB7CB.js";import"./chunk-AV2XMJZK.js";import"./chunk-TLNUV6LJ.js";import"./chunk-X3MDAFQV.js";import"./chunk-LE344D6P.js";import"./chunk-BSSTUKEO.js";import"./chunk-SLCVE5JY.js";import"./chunk-NWYS2Y26.js";import"./chunk-5ORQKHAE.js";import"./chunk-NNIW76YM.js";import"./chunk-GN4LVN6F.js";import"./chunk-Q3TZ5E3J.js";import"./chunk-THUL57GX.js";import"./chunk-7FN55G7Q.js";import"./chunk-JA4SO6QN.js";import"./chunk-DJJWZ6ME.js";import"./chunk-BME7YW2F.js";import"./chunk-ZHEQ3EZZ.js";import"./chunk-LIP7LW4Z.js";import"./chunk-OCJB2TQU.js";import"./chunk-UFSYSDPG.js";import"./chunk-NVYUSY5M.js";import"./chunk-DP4VB7EI.js";import"./chunk-FBLIPTM4.js";import"./chunk-3JRA4PLP.js";import"./chunk-RQKBBL3R.js";import"./chunk-ZTKCIUS4.js";import"./chunk-FEFKMD5S.js";import"./chunk-5ORJAWGA.js";import"./chunk-YTZYL6W2.js";import"./chunk-JBS3UN52.js";import{a as w,b as ye,f as le}from"./chunk-3ONYU5UZ.js";function Wn(i,r){i&1&&(D(0,"mat-progress-spinner",4),m(1,"translate"),m(2,"translate")),i&2&&(u("matTooltip",_(1,2,"VS_COMPACT_BUSINESS_RULES_LOADING")),E("aria-label",_(2,4,"VS_COMPACT_BUSINESS_RULES_LOADING")))}function jn(i,r){if(i&1){let e=b();l(0,"mat-chip-listbox",9),m(1,"translate"),T("change",function(n){g(e);let o=s();return v(o.setFilterValue(n))}),l(2,"mat-chip-option",10),f(3),m(4,"translate"),d(),l(5,"mat-chip-option",11),f(6),m(7,"translate"),d()()}if(i&2){let e=s();E("aria-label",_(1,5,"VS_COMPACT_BUSINESS_RULES_CHIPS_GROUP_ARIA_LABEL")),a(2),u("value",e.AlertType.Error),a(),V(" ",X(4,7,"VS_COMPACT_BUSINESS_RULES_ERRORS",pe(13,mn,e.nrOfErrors()))," "),a(2),u("value",e.AlertType.Warning),a(),V(" ",X(7,10,"VS_COMPACT_BUSINESS_RULES_WARNINGS",pe(15,mn,e.nrOfWarnings()))," ")}}function Xn(i,r){if(i&1){let e=b();l(0,"ui-alert-bar",12),T("clicked",function(){let n=g(e).$implicit,o=s();return v(o.onRuleClick(n))}),f(1),m(2,"translate"),d()}if(i&2){let e=r.$implicit;u("focusable",!0)("status",e.level)("showCloseButton",!1),E("data-testid","business-rule-item_"+e.id),a(),V(" ",X(2,5,e.messageKey,e.messageParams)," ")}}function Yn(i,r){if(i&1&&(l(0,"ui-alert-bar",8),f(1),m(2,"translate"),d()),i&2){let e=s();u("status",e.AlertType.Info)("showCloseButton",!1),a(),V(" ",_(2,3,"VS_COMPACT_BUSINESS_RULES_ALL_HONOURED")," ")}}var mn,zn,_n,gn=le(()=>{"use strict";R();oe();nt();Ri();ee();li();$();L();de();fe();He();R();Ri();nt();ee();$();oe();li();L();mn=i=>({nr:i}),zn=(i,r)=>r.id;_n=(()=>{class i{_rulesManagerService=x(st);_extractionValidationService=x(ve);toggle=ft();ruleClick=ft();AlertType=Pe;filteredRules=c(()=>this._allInvalidRules().filter(e=>!this._selectedAlertTypeFilter()||e.level===this._selectedAlertTypeFilter()));nrOfErrors=c(()=>this._allInvalidRules().filter(e=>e.level===Pe.Error).length);nrOfWarnings=c(()=>this._allInvalidRules().filter(e=>e.level===Pe.Warning).length);rulesLoaded=c(()=>this._rulesManagerService.status().loaded);_allRuleSets=c(()=>Bi(this._extractionValidationService.validationResultsAsEvaluatedRuleSets(),this._rulesManagerService.entities()));_allInvalidRules=c(()=>this._allRuleSets()?.filter(e=>!e.isValid)?.flatMap(e=>e.rules.filter(t=>!t.isValid).map(t=>({id:`${e.fieldId}-${e.valueIndex}-${t.name}`,fieldId:e.fieldId,fieldValueIndex:e.valueIndex,level:this._getAlertLevelForRuleSet(e),messageKey:t.message?.key??"",messageParams:t.message?.params??{}})))??[]);_selectedAlertTypeFilter=G(null);_expansionPanelElement=je.required(Ke);onExpansionPanelToggle(e){this.toggle.emit(e)}setFilterValue(e){this._selectedAlertTypeFilter.set(e.value??null),this._expansionPanelElement().open()}onRuleClick(e){this.ruleClick.emit(e)}_getAlertLevelForRuleSet(e){switch(e.criticality){case"Must":return Pe.Error;default:return Pe.Warning}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=U({type:i,selectors:[["ui-du-compact-business-rules"]],viewQuery:function(t,n){t&1&&ze(n._expansionPanelElement,Ke,5),t&2&&We()},outputs:{toggle:"toggle",ruleClick:"ruleClick"},decls:22,vars:14,consts:[["businessRulesPanel",""],["hideToggle","","togglePosition","before",1,"compact-business-rules-panel",3,"opened","afterCollapse"],["role","group"],["mat-icon-button","","data-testid","business-rules-expand-toggle",3,"matTooltip"],["mode","indeterminate","diameter","19","strokeWidth","2","data-testid","business-rules-loading-spinner","tabIndex","0",3,"matTooltip"],["hideSingleSelectionIndicator",""],["data-testid","business-rules-list",1,"rules-list"],[3,"focusable","status","showCloseButton"],[3,"status","showCloseButton"],["hideSingleSelectionIndicator","",3,"change"],["data-testid","business-rules-filter-errors","uiKeydownStopEventPropagation","",3,"value"],["data-testid","business-rules-filter-warnings","uiKeydownStopEventPropagation","",3,"value"],[3,"clicked","focusable","status","showCloseButton"]],template:function(t,n){if(t&1){let o=b();P(0),m(1,"translate"),l(2,"mat-expansion-panel",1,0),T("opened",function(){return g(o),v(n.onExpansionPanelToggle(!0))})("afterCollapse",function(){return g(o),v(n.onExpansionPanelToggle(!1))}),l(4,"mat-expansion-panel-header",2)(5,"mat-panel-title"),P(6),m(7,"translate"),P(8),m(9,"translate"),l(10,"button",3)(11,"mat-icon"),f(12),d()(),l(13,"span"),f(14),d()(),l(15,"mat-panel-description"),S(16,Wn,3,6,"mat-progress-spinner",4)(17,jn,8,17,"mat-chip-listbox",5),d()(),l(18,"div",6),J(19,Xn,3,8,"ui-alert-bar",7,zn,!1,Yn,3,5,"ui-alert-bar",8),d()()}if(t&2){let o=ce(3),p=_(1,8,"VS_COMPACT_BUSINESS_RULES_TITLE");a(4),E("aria-label",p);let h=_(7,10,"VS_COMPACT_BUSINESS_RULES_COLLAPSE_TOOLTIP"),I=_(9,12,"VS_COMPACT_BUSINESS_RULES_EXPAND_TOOLTIP");a(6),u("matTooltip",o.expanded?h:I),E("aria-label",o.expanded?h:I)("aria-expanded",o.expanded),a(2),j(o.expanded?"expand_less":"expand_more"),a(2),j(p),a(2),y(n.rulesLoaded()?17:16),a(3),Z(n.filteredRules())}},dependencies:[Ui,Ke,Pi,Fi,wi,it,tt,di,Y,ae,q,K,ne,De,ri,ai,A,Mi,yi,N],styles:[`:host{display:flex;flex-direction:column;overflow:hidden;font-size:14px;height:100%}.compact-business-rules-panel.mat-expansion-panel{display:flex;flex-direction:column;height:100%}.compact-business-rules-panel.mat-expansion-panel .mat-expansion-panel-header{background-color:var(--mat-expansion-header-hover-state-layer-color);min-height:38px;flex-shrink:0;padding-left:0}.compact-business-rules-panel.mat-expansion-panel .mat-expansion-panel-header .mat-content-hide-toggle{margin-left:0}.compact-business-rules-panel.mat-expansion-panel .mat-expansion-panel-header .mat-expansion-panel-header-title{background-color:unset}.compact-business-rules-panel.mat-expansion-panel .mat-expansion-panel-header .mat-expansion-panel-header-description{flex-grow:1;flex-shrink:0;justify-content:end}.compact-business-rules-panel.mat-expansion-panel .mat-expansion-panel-header .mat-expansion-panel-header-description .mat-mdc-chip-selected{background-color:var(--color-selection-indicator)}.compact-business-rules-panel.mat-expansion-panel .mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-collapsed-state-height)}.compact-business-rules-panel.mat-expansion-panel .mat-expansion-panel-content-wrapper{height:100%;overflow:auto}.compact-business-rules-panel.mat-expansion-panel mat-chip-option{padding-left:8px;padding-right:8px;font-weight:400}.compact-business-rules-panel.mat-expansion-panel .rules-list{display:flex;flex-direction:column;gap:4px;margin-top:4px;overflow:auto}.compact-business-rules-panel.mat-expansion-panel .rules-list ui-alert-bar{cursor:pointer}
1
+ import{a as Yi,b as kn}from"./chunk-GUD4Q5ED.js";import{a as Zi,b as Gn,c as xe,d as en,e as Tt,f as nn,i as pt,j as Mt,k as he,l as ut,m as on,n as an,o as rn,p as ln,q as sn,r as dn,s as cn,t as pn,u as un,v as qn}from"./chunk-MEJRHTNP.js";import{a as qi,b as $i,c as zi,d as Wi}from"./chunk-OCUVVNK2.js";import{b as Ke,c as Pi,d as wi,e as Fi,f as Ui,g as Ri,h as Ni,j as Un,k as Ji,l as Hn,n as tn,o as Kn}from"./chunk-6AEFIYR5.js";import{$ as x,$a as l,$e as et,$j as Ce,A as qe,Ab as f,Ae as ii,Af as gi,Ai as Li,Bb as j,Be as ni,Bf as vi,Bk as Xi,Cb as V,Ce as oi,Ck as An,Df as fi,Eb as P,Ed as Yt,Ef as Ci,Fa as U,Fb as O,Fd as Ae,Ff as xi,Gb as C,Gd as Qt,H as Vt,Hb as Ie,Hd as Qe,Id as Ct,If as hi,Jb as se,Jc as Kt,Kb as Ut,Kh as Ei,La as $e,Lb as Rt,Lf as ht,Lh as Fn,Mb as pe,Mf as Te,Mh as Ii,Nb as Le,Nd as K,Nf as Si,Nh as Di,Ni as Rn,O as Et,Ob as Nt,Oc as qt,Od as q,Oh as Oi,Pb as Lt,Pc as $t,Pd as $,Qa as Ot,Ra as E,Re as ae,Ri as we,Rj as Me,Sb as m,Se as Y,Si as Ai,Sj as Nn,Ta as S,Tb as _,Te as ee,U as vt,Ub as X,Ui as at,Va as y,Vc as zt,Vf as St,Vi as H,Wb as At,Wi as z,Xa as Pt,Xi as ki,Ya as J,Yi as rt,Za as Z,Zb as c,Zi as Bi,_a as u,_b as ue,_e as Oe,_i as de,a as bt,ab as d,af as ke,ak as Gi,ba as g,bb as D,bc as ft,bk as Q,ca as v,cc as M,ch as Pe,cj as Hi,dc as je,dh as Mi,dj as ge,dk as Ki,ee as Je,ef as ai,ej as lt,ek as Fe,fb as k,fd as De,fe as Ze,ff as ri,fj as st,ga as It,gb as B,ge as N,gf as li,gg as yi,gh as yt,gk as Ue,hb as wt,hh as bi,ia as G,ib as b,ka as wn,ke as A,kf as si,kg as Ti,kh as Vi,kk as ji,kl as Qi,l as Ve,lb as T,lc as R,le as L,lf as di,lh as He,mb as s,mc as kt,mf as tt,mg as me,mk as Ln,ml as Bn,na as Ne,nd as Ye,nf as it,o as gt,of as nt,pd as ne,pf as xt,qc as Bt,qd as oe,qf as ci,qh as F,ra as Dt,rf as Be,rj as dt,sa as a,sc as Ht,se as Jt,sf as pi,sh as ot,sj as ct,tc as Gt,ub as ze,uc as Xe,ue as Zt,uh as _e,uj as ve,vb as We,vj as W,w as Ee,wb as ce,xb as Ft,xd as Wt,xf as ui,yb as ie,yd as jt,ye as ei,yf as mi,yh as Ge,yj as fe,zd as Xt,ze as ti,zf as _i}from"./chunk-5LGMGLPM.js";import"./chunk-ZOBGFIAP.js";import"./chunk-7LF7TUYR.js";import"./chunk-QSPXPEUM.js";import"./chunk-MHF6VH7J.js";import"./chunk-OC2CZ3QN.js";import"./chunk-S75KSQCC.js";import"./chunk-F3WKVTVT.js";import"./chunk-TX6COQKF.js";import"./chunk-B3JIB7CB.js";import"./chunk-AV2XMJZK.js";import"./chunk-TLNUV6LJ.js";import"./chunk-X3MDAFQV.js";import"./chunk-LE344D6P.js";import"./chunk-BSSTUKEO.js";import"./chunk-SLCVE5JY.js";import"./chunk-NWYS2Y26.js";import"./chunk-5ORQKHAE.js";import"./chunk-NNIW76YM.js";import"./chunk-GN4LVN6F.js";import"./chunk-Q3TZ5E3J.js";import"./chunk-THUL57GX.js";import"./chunk-7FN55G7Q.js";import"./chunk-JA4SO6QN.js";import"./chunk-DJJWZ6ME.js";import"./chunk-BME7YW2F.js";import"./chunk-ZHEQ3EZZ.js";import"./chunk-LIP7LW4Z.js";import"./chunk-OCJB2TQU.js";import"./chunk-UFSYSDPG.js";import"./chunk-NVYUSY5M.js";import"./chunk-DP4VB7EI.js";import"./chunk-FBLIPTM4.js";import"./chunk-3JRA4PLP.js";import"./chunk-RQKBBL3R.js";import"./chunk-ZTKCIUS4.js";import"./chunk-FEFKMD5S.js";import"./chunk-5ORJAWGA.js";import"./chunk-YTZYL6W2.js";import"./chunk-JBS3UN52.js";import{a as w,b as ye,f as le}from"./chunk-3ONYU5UZ.js";function Wn(i,r){i&1&&(D(0,"mat-progress-spinner",4),m(1,"translate"),m(2,"translate")),i&2&&(u("matTooltip",_(1,2,"VS_COMPACT_BUSINESS_RULES_LOADING")),E("aria-label",_(2,4,"VS_COMPACT_BUSINESS_RULES_LOADING")))}function jn(i,r){if(i&1){let e=b();l(0,"mat-chip-listbox",9),m(1,"translate"),T("change",function(n){g(e);let o=s();return v(o.setFilterValue(n))}),l(2,"mat-chip-option",10),f(3),m(4,"translate"),d(),l(5,"mat-chip-option",11),f(6),m(7,"translate"),d()()}if(i&2){let e=s();E("aria-label",_(1,5,"VS_COMPACT_BUSINESS_RULES_CHIPS_GROUP_ARIA_LABEL")),a(2),u("value",e.AlertType.Error),a(),V(" ",X(4,7,"VS_COMPACT_BUSINESS_RULES_ERRORS",pe(13,mn,e.nrOfErrors()))," "),a(2),u("value",e.AlertType.Warning),a(),V(" ",X(7,10,"VS_COMPACT_BUSINESS_RULES_WARNINGS",pe(15,mn,e.nrOfWarnings()))," ")}}function Xn(i,r){if(i&1){let e=b();l(0,"ui-alert-bar",12),T("clicked",function(){let n=g(e).$implicit,o=s();return v(o.onRuleClick(n))}),f(1),m(2,"translate"),d()}if(i&2){let e=r.$implicit;u("focusable",!0)("status",e.level)("showCloseButton",!1),E("data-testid","business-rule-item_"+e.id),a(),V(" ",X(2,5,e.messageKey,e.messageParams)," ")}}function Yn(i,r){if(i&1&&(l(0,"ui-alert-bar",8),f(1),m(2,"translate"),d()),i&2){let e=s();u("status",e.AlertType.Info)("showCloseButton",!1),a(),V(" ",_(2,3,"VS_COMPACT_BUSINESS_RULES_ALL_HONOURED")," ")}}var mn,zn,_n,gn=le(()=>{"use strict";R();oe();nt();Ri();ee();li();$();L();de();fe();He();R();Ri();nt();ee();$();oe();li();L();mn=i=>({nr:i}),zn=(i,r)=>r.id;_n=(()=>{class i{_rulesManagerService=x(st);_extractionValidationService=x(ve);toggle=ft();ruleClick=ft();AlertType=Pe;filteredRules=c(()=>this._allInvalidRules().filter(e=>!this._selectedAlertTypeFilter()||e.level===this._selectedAlertTypeFilter()));nrOfErrors=c(()=>this._allInvalidRules().filter(e=>e.level===Pe.Error).length);nrOfWarnings=c(()=>this._allInvalidRules().filter(e=>e.level===Pe.Warning).length);rulesLoaded=c(()=>this._rulesManagerService.status().loaded);_allRuleSets=c(()=>Bi(this._extractionValidationService.validationResultsAsEvaluatedRuleSets(),this._rulesManagerService.entities()));_allInvalidRules=c(()=>this._allRuleSets()?.filter(e=>!e.isValid)?.flatMap(e=>e.rules.filter(t=>!t.isValid).map(t=>({id:`${e.fieldId}-${e.valueIndex}-${t.name}`,fieldId:e.fieldId,fieldValueIndex:e.valueIndex,level:this._getAlertLevelForRuleSet(e),messageKey:t.message?.key??"",messageParams:t.message?.params??{}})))??[]);_selectedAlertTypeFilter=G(null);_expansionPanelElement=je.required(Ke);onExpansionPanelToggle(e){this.toggle.emit(e)}setFilterValue(e){this._selectedAlertTypeFilter.set(e.value??null),this._expansionPanelElement().open()}onRuleClick(e){this.ruleClick.emit(e)}_getAlertLevelForRuleSet(e){switch(e.criticality){case"Must":return Pe.Error;default:return Pe.Warning}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=U({type:i,selectors:[["ui-du-compact-business-rules"]],viewQuery:function(t,n){t&1&&ze(n._expansionPanelElement,Ke,5),t&2&&We()},outputs:{toggle:"toggle",ruleClick:"ruleClick"},decls:22,vars:14,consts:[["businessRulesPanel",""],["hideToggle","","togglePosition","before",1,"compact-business-rules-panel",3,"opened","afterCollapse"],["role","group"],["mat-icon-button","","data-testid","business-rules-expand-toggle",3,"matTooltip"],["mode","indeterminate","diameter","19","strokeWidth","2","data-testid","business-rules-loading-spinner","tabIndex","0",3,"matTooltip"],["hideSingleSelectionIndicator",""],["data-testid","business-rules-list",1,"rules-list"],[3,"focusable","status","showCloseButton"],[3,"status","showCloseButton"],["hideSingleSelectionIndicator","",3,"change"],["data-testid","business-rules-filter-errors","uiKeydownStopEventPropagation","",3,"value"],["data-testid","business-rules-filter-warnings","uiKeydownStopEventPropagation","",3,"value"],[3,"clicked","focusable","status","showCloseButton"]],template:function(t,n){if(t&1){let o=b();P(0),m(1,"translate"),l(2,"mat-expansion-panel",1,0),T("opened",function(){return g(o),v(n.onExpansionPanelToggle(!0))})("afterCollapse",function(){return g(o),v(n.onExpansionPanelToggle(!1))}),l(4,"mat-expansion-panel-header",2)(5,"mat-panel-title"),P(6),m(7,"translate"),P(8),m(9,"translate"),l(10,"button",3)(11,"mat-icon"),f(12),d()(),l(13,"span"),f(14),d()(),l(15,"mat-panel-description"),S(16,Wn,3,6,"mat-progress-spinner",4)(17,jn,8,17,"mat-chip-listbox",5),d()(),l(18,"div",6),J(19,Xn,3,8,"ui-alert-bar",7,zn,!1,Yn,3,5,"ui-alert-bar",8),d()()}if(t&2){let o=ce(3),p=_(1,8,"VS_COMPACT_BUSINESS_RULES_TITLE");a(4),E("aria-label",p);let h=_(7,10,"VS_COMPACT_BUSINESS_RULES_COLLAPSE_TOOLTIP"),I=_(9,12,"VS_COMPACT_BUSINESS_RULES_EXPAND_TOOLTIP");a(6),u("matTooltip",o.expanded?h:I),E("aria-label",o.expanded?h:I)("aria-expanded",o.expanded),a(2),j(o.expanded?"expand_less":"expand_more"),a(2),j(p),a(2),y(n.rulesLoaded()?17:16),a(3),Z(n.filteredRules())}},dependencies:[Ui,Ke,Pi,Fi,wi,it,tt,di,Y,ae,q,K,ne,De,ri,ai,A,Mi,yi,N],styles:[`:host{display:flex;flex-direction:column;overflow:hidden;font-size:14px;height:100%}.compact-business-rules-panel.mat-expansion-panel{display:flex;flex-direction:column;height:100%}.compact-business-rules-panel.mat-expansion-panel .mat-expansion-panel-header{background-color:var(--mat-expansion-header-hover-state-layer-color);min-height:38px;flex-shrink:0;padding-left:0}.compact-business-rules-panel.mat-expansion-panel .mat-expansion-panel-header .mat-content-hide-toggle{margin-left:0}.compact-business-rules-panel.mat-expansion-panel .mat-expansion-panel-header .mat-expansion-panel-header-title{background-color:unset}.compact-business-rules-panel.mat-expansion-panel .mat-expansion-panel-header .mat-expansion-panel-header-description{flex-grow:1;flex-shrink:0;justify-content:end}.compact-business-rules-panel.mat-expansion-panel .mat-expansion-panel-header .mat-expansion-panel-header-description .mat-mdc-chip-selected{background-color:var(--color-selection-indicator)}.compact-business-rules-panel.mat-expansion-panel .mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-collapsed-state-height)}.compact-business-rules-panel.mat-expansion-panel .mat-expansion-panel-content-wrapper{height:100%;overflow:auto}.compact-business-rules-panel.mat-expansion-panel mat-chip-option{padding-left:8px;padding-right:8px;font-weight:400}.compact-business-rules-panel.mat-expansion-panel .rules-list{display:flex;flex-direction:column;gap:4px;margin-top:4px;overflow:auto}.compact-business-rules-panel.mat-expansion-panel .rules-list ui-alert-bar{cursor:pointer}
2
2
  `],encapsulation:2,changeDetection:0})}return i})()});function to(i,r){if(i&1){let e=b();l(0,"button",9),T("click",function(){g(e);let n=s();return v(n.deleteRow())}),l(1,"mat-icon"),f(2,"delete"),d(),l(3,"span"),f(4),m(5,"translate"),d()()}i&2&&(a(4),j(_(5,1,"VS_TABLE_DELETE_ROW")))}function io(i,r){i&1&&D(0,"mat-divider")}function no(i,r){if(i&1&&(l(0,"div"),wt(1,10),S(2,io,1,0,"mat-divider"),d()),i&2){let e=r.$implicit,t=r.$index,n=r.$count,o=s();E("data-testid","child-value_"+t+"_"+o.valueId()),a(),u("ngTemplateOutlet",o.fieldTemplate())("ngTemplateOutletContext",Lt(4,Zn,e,t,o.valueIndex(),o.level()+1)),a(),y(t!==n-1?2:-1)}}var Jn,Zn,eo,vn,fn=le(()=>{"use strict";Xe();R();pi();oe();oi();ke();ee();vi();$();L();de();fe();R();Xe();oe();ee();$();oi();ke();vi();Jn=(i,r,e)=>({currentNr:i,totalNr:r,valuesSummary:e}),Zn=(i,r,e,t)=>({$implicit:i,indexInParent:r,parentValueIndex:e,level:t}),eo=(i,r)=>r.id;vn=(()=>{class i{_translateService=x(Je);_extractionManagerService=x(W);_derivedPartsService=x(dt);fieldTemplate=M.required();field=M.required();taxonomy=M.required();valueId=M.required();valueIndex=M.required();level=M.required();isReadonly=M.required();value=c(()=>this._extractionManagerService.getById(this.valueId()));childValues=c(()=>this.value().valueIds.map(e=>this._extractionManagerService.getById(e)));color=c(()=>this.taxonomy().color);ConfirmationStatus=z;isAnyChildSelected=c(()=>!!this._extractionManagerService.selectedParentValueIdMap()[this.valueId()]||this.valueId()===this._extractionManagerService.selectedValueId());currentNr=c(()=>this.valueIndex()+1);totalNr=c(()=>this.field().valueIds.length);_translatedIsMissingMessage=Be(this._translateService.stream("VS_SIMPLE_FIELD_NO_DATA_MESSAGE"));_translatedNotExtractedMessage=Be(this._translateService.stream("VS_SIMPLE_FIELD_REMOVED_MESSAGE"));valuesSummary=c(()=>{let e=this._translatedIsMissingMessage(),t=this._translatedNotExtractedMessage();return this._collectLeafValues(this.childValues(),5).map(o=>this._formatValue(o,e,t)).join(", ")});deleteRow(){this._extractionManagerService.removeExtractedValues(this.field().id,[this.valueId()])}highlightRow(){this._extractionManagerService.setSelectedValue(this.valueId())}setRowConfirmedStatus(e){this._extractionManagerService.changeValueConfirmation(this.valueId(),e.checked)}_collectLeafValues(e,t){let n=[],o=p=>{if(!(n.length>=t))for(let h of p){if(n.length>=t)break;if(h.type===H.Primary||!h.valueIds.length)n.push(h);else{let I=h.valueIds.map(re=>this._extractionManagerService.getById(re));o(I)}}};return o(e),n.slice(0,t)}_formatValue(e,t,n){return e.type===H.Primary?this._derivedPartsService.format(e):ki(e.confirmationStatus)?n:t}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=U({type:i,selectors:[["ui-du-compact-field-group-row"]],hostVars:4,hostBindings:function(t,n){t&2&&(Ft("border-color",n.color()),ie("selected",n.isAnyChildSelected()))},inputs:{fieldTemplate:[1,"fieldTemplate"],field:[1,"field"],taxonomy:[1,"taxonomy"],valueId:[1,"valueId"],valueIndex:[1,"valueIndex"],level:[1,"level"],isReadonly:[1,"isReadonly"]},decls:25,vars:24,consts:[["bodyMenu",""],[1,"row-info"],[1,"summary",3,"matTooltip"],[1,"actions"],["data-testid","field-group-row-confirmed-checkbox","tabindex","-1",1,"row-confirm-checkbox",3,"change","click","matTooltip","aria-label","checked","indeterminate","disabled"],["mat-icon-button","","data-testid","fg-actions-menu-trigger",3,"matMenuTriggerFor"],["mat-menu-item","","data-testid","highlight-row",3,"click"],["mat-menu-item","","data-testid","delete-row"],[1,"values"],["mat-menu-item","","data-testid","delete-row",3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,n){if(t&1){let o=b();l(0,"section",1),P(1),m(2,"translate"),l(3,"div",2),f(4),d(),l(5,"div",3),P(6),m(7,"translate"),l(8,"mat-checkbox",4),T("change",function(h){return g(o),v(n.setRowConfirmedStatus(h))})("click",function(h){return g(o),v(h.stopPropagation())}),d(),l(9,"button",5),m(10,"translate"),l(11,"mat-icon"),f(12,"more_vert"),d()(),l(13,"mat-menu",null,0)(15,"button",6),T("click",function(){return g(o),v(n.highlightRow())}),l(16,"mat-icon"),f(17,"select_all"),d(),l(18,"span"),f(19),m(20,"translate"),d()(),S(21,to,6,3,"button",7),d()()(),l(22,"section",8),J(23,no,3,9,"div",null,eo),d()}if(t&2){let o=ce(14),p=n.value(),h=X(2,11,"VS_FIELD_GROUP_ROW_INFO",Nt(20,Jn,n.currentNr(),n.totalNr(),n.valuesSummary()));a(3),u("matTooltip",h),a(),V(" ",h," ");let I=_(7,14,"VS_ROW_CONFIRM_TOOLTIP");a(4),u("matTooltip",I),Ot("aria-label",I),u("checked",p.confirmationStatus===n.ConfirmationStatus.Confirmed)("indeterminate",p.confirmationStatus===n.ConfirmationStatus.PartiallyConfirmed)("disabled",n.isReadonly()),a(),u("matMenuTriggerFor",o),E("aria-label",_(10,16,"VS_TABLE_FIELD_CONFIRM_IS_MISSING_TOOLTIP")),a(10),j(_(20,18,"VS_TABLE_HIGHLIGHT_ROW")),a(2),y(n.isReadonly()?-1:21),a(2),Z(n.childValues())}},dependencies:[Gt,Bt,ne,De,Y,ae,q,K,ni,ii,et,Oe,gi,mi,ui,_i,N],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:start;padding-left:8px;border-left:4px solid transparent}.row-info[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:space-between;align-items:center}.row-info[_ngcontent-%COMP%] .summary[_ngcontent-%COMP%]{flex-grow:1;align-items:center;padding:2px 0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-style:italic;font-weight:700}.row-info[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;align-self:flex-end;gap:8px;padding-right:2px}.values[_ngcontent-%COMP%]{flex-grow:1;width:100%;align-self:flex-end}"],changeDetection:0})}return i})()});function oo(i,r){i&1&&(l(0,"span",3),m(1,"translate"),f(2),m(3,"translate"),d()),i&2&&(u("matTooltip",_(1,2,"VS_SIMPLE_FIELD_REMOVED_MESSAGE_TOOLTIP")),a(2),V(" ",_(3,4,"VS_SIMPLE_FIELD_REMOVED_MESSAGE")," "))}function ao(i,r){i&1&&(l(0,"span",3),m(1,"translate"),f(2),m(3,"translate"),d()),i&2&&(u("matTooltip",_(1,2,"VS_SIMPLE_FIELD_NO_DATA_MESSAGE_TOOLTIP")),a(2),V(" ",_(3,4,"VS_SIMPLE_FIELD_NO_DATA_MESSAGE")," "))}var Cn,xn,hn=le(()=>{"use strict";R();oe();ee();$();L();Ge();de();fe();He();Ue();ut();R();ee();oe();$();L();Cn=(i,r)=>[i,r];xn=(()=>{class i{_configurationsManagerService=x(ge);_extractionManagerService=x(W);_valuesFactoryService=x(ct);_vsKeyboardShortcutsService=x(Q);_bridgeService=x(Ce);field=M.required();taxonomy=M.required();changeValueShortcut=c(()=>this._vsKeyboardShortcutsService.fields()?.changeValue);revertShortcut=c(()=>this._vsKeyboardShortcutsService.fields()?.revert);hasHistory=c(()=>!!this._extractionManagerService.historyMap()[this.field().id]?.history?.length);ConfirmationStatus=z;_fieldConfiguration=c(()=>this._configurationsManagerService.getFieldCustomization(this.taxonomy().id));_pdfSelectionAsPrimaryValue=this._bridgeService.pdfSelectionAsPrimaryValue;canCreateValueWithReference=c(()=>{let e=this._pdfSelectionAsPrimaryValue();return Fe(e,this._fieldConfiguration().referenceEditModes)});createValueTooltip=c(()=>this.canCreateValueWithReference()?"VS_SIMPLE_FIELD_CHANGE_VALUE_TOOLTIP":this.taxonomy().requiresReference?"":"VS_SIMPLE_FIELD_CHANGE_EMPTY_REFERENCE_VALUE_TOOLTIP");selectField(){this._extractionManagerService.setSelectedValue(this.field().id)}addNewValueToField(){if(this.taxonomy().type===F.FieldGroup){let t=this._valuesFactoryService.generateRowOfFields(this.field().fieldId,this.field().id);this._extractionManagerService.addMultipleExtractedValues(this.field().id,[t.value,...t.childValues]);return}let e=w(w({},this._valuesFactoryService.generatePrimaryValue(this.field().fieldId,this.field().id)),this._pdfSelectionAsPrimaryValue());this._extractionManagerService.addExtractedPrimaryValue(this.field().id,e)}revertToPreviousValue(){this._extractionManagerService.restorePreviousValue(this.field().id)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=U({type:i,selectors:[["ui-du-compact-missing-value"]],inputs:{field:[1,"field"],taxonomy:[1,"taxonomy"]},decls:19,vars:29,consts:[[1,"compact-missing-value",3,"field","taxonomy","value","valueIndex"],["ngProjectAs","content",5,["content"]],["data-testid","missing-value-message",1,"text"],[3,"matTooltip"],["ngProjectAs","pre-suffix-content",5,["pre-suffix-content"]],["mat-icon-button","","data-testid","missing-value-create-value","type","button","color","primary",3,"click","disabled","matTooltip"],["ngProjectAs","post-suffix-content",5,["post-suffix-content"]],["mat-icon-button","","data-testid","missing-value-revert-to-previous-value-button","type","button",3,"click","disabled","matTooltip"]],template:function(t,n){if(t&1&&(l(0,"ui-du-compact-value-shell",0),k(1,1),l(2,"i",2),S(3,oo,4,6,"span",3)(4,ao,4,6,"span",3),d(),B(),k(5,4),l(6,"button",5),m(7,"translate"),m(8,"uiHotkeysComboDisplay"),m(9,"translate"),T("click",function(){return n.addNewValueToField()}),l(10,"mat-icon"),f(11,"add_circle_outline"),d()(),B(),k(12,6),l(13,"button",7),m(14,"translate"),m(15,"uiHotkeysComboDisplay"),m(16,"translate"),T("click",function(){return n.revertToPreviousValue()}),l(17,"mat-icon"),f(18,"undo"),d()(),B(),d()),t&2){let o,p;u("field",n.field())("taxonomy",n.taxonomy())("value",null)("valueIndex",-1),a(3),y(n.field().confirmationStatus===n.ConfirmationStatus.Confirmed?3:4),a(3),u("disabled",n.taxonomy().requiresReference&&!n.canCreateValueWithReference())("matTooltip",Le(23,Cn,_(7,11,n.createValueTooltip()),_(8,13,(o=n.changeValueShortcut())==null?null:o.combos)).join(" ")),E("aria-label",_(9,15,n.createValueTooltip())),a(7),u("disabled",!n.hasHistory())("matTooltip",Le(26,Cn,_(14,17,"VS_SIMPLE_FIELD_REVERT_TOOLTIP"),_(15,19,(p=n.revertShortcut())==null?null:p.combos)).join(" ")),E("aria-label",_(16,21,"VS_SIMPLE_FIELD_REVERT_TOOLTIP"))}},dependencies:[Y,ae,ne,De,q,K,A,he,N,me],styles:[".compact-missing-value[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:20px}"],changeDetection:0})}return i})()});function ro(i,r){if(i&1&&(l(0,"div",2)(1,"div",5)(2,"span"),f(3),m(4,"translate"),d()()()),i&2){let e=s();a(3),j(_(4,1,e.stringValue()))}}function lo(i,r){i&1&&(l(0,"span",6),m(1,"translate"),f(2),m(3,"translate"),d()),i&2&&(u("matTooltip",_(1,2,"VS_SIMPLE_FIELD_REMOVED_MESSAGE_TOOLTIP")),a(2),V(" ",_(3,4,"VS_SIMPLE_FIELD_REMOVED_MESSAGE")," "))}function so(i,r){i&1&&(l(0,"span",6),m(1,"translate"),f(2),m(3,"translate"),d()),i&2&&(u("matTooltip",_(1,2,"VS_SIMPLE_FIELD_NO_DATA_MESSAGE_TOOLTIP")),a(2),V(" ",_(3,4,"VS_SIMPLE_FIELD_NO_DATA_MESSAGE")," "))}function co(i,r){if(i&1&&(l(0,"i",3),S(1,lo,4,6,"span",6)(2,so,4,6,"span",6),d()),i&2){let e=s();a(),y(e.field().confirmationStatus===e.ConfirmationStatus.Confirmed?1:2)}}function po(i,r){if(i&1&&(k(0,4),D(1,"ui-du-compact-validator-notes",7),B()),i&2){let e=s(),t=C(4),n=C(5),o=C(6);a(),u("valueId",t.id)("fieldId",e.field().id)("taxonomy",n)("notes",o)("appInReadonlyMode",!0)}}var Sn,yn=le(()=>{"use strict";R();$();L();Ge();de();ut();en();R();$();L();Sn=(()=>{class i{field=M.required();taxonomy=M.required();value=M.required();valueIndex=M.required();TaxonomyDefinitionType=F;ConfirmationStatus=z;validatorNotesTaxonomy=c(()=>{let e=this.taxonomy();if(e.type===F.Field)return e.validatorNotes});validatorNotes=c(()=>this.validatorNotesTaxonomy()?.enabled?this.value()?.validatorNotes:void 0);validatorNotesLevel=_e;stringValue=c(()=>{let e=this.taxonomy();if(e.type===F.DocumentType)return e.name;if(e.type===F.Table)return"VS_TABLE_FIELD_TITLE";let t=this.value()?.value??"";return t?e.type===F.Field&&e.contentType===ot.Set?e.values.find(n=>n===t)??"":t:""});isMissing=c(()=>!this.value());static \u0275fac=function(t){return new(t||i)};static \u0275cmp=U({type:i,selectors:[["ui-du-compact-readonly-value"]],inputs:{field:[1,"field"],taxonomy:[1,"taxonomy"],value:[1,"value"],valueIndex:[1,"valueIndex"]},decls:8,vars:10,consts:[[3,"field","taxonomy","value","valueIndex","readonly"],["ngProjectAs","content",5,["content"]],["tabindex","0"],["data-testid","missing-value",1,"text"],["ngProjectAs","validator-notes-value-level",5,["validator-notes-value-level"]],[1,"text"],[3,"matTooltip"],["data-testid","validator-notes",3,"valueId","fieldId","taxonomy","notes","appInReadonlyMode"]],template:function(t,n){if(t&1&&(l(0,"ui-du-compact-value-shell",0),k(1,1),S(2,ro,5,3,"div",2)(3,co,3,1,"i",3),B(),P(4)(5)(6),S(7,po,2,5,"ng-container",4),d()),t&2){u("field",n.field())("taxonomy",n.taxonomy())("value",n.value())("valueIndex",n.valueIndex())("readonly",!0),a(2),y(n.isMissing()?3:2),a(2);let o=O(n.value());a();let p=O(n.validatorNotesTaxonomy());a(),O(n.validatorNotes()),a(),y(p&&p.enabled&&p.level===n.validatorNotesLevel.Value&&o?7:-1)}},dependencies:[q,K,A,he,xe,N],encapsulation:2,changeDetection:0})}return i})()});function mo(i,r){if(i&1){let e=b();l(0,"ui-du-compact-document-type-input",6),m(1,"translate"),T("panelOpenChange",function(n){g(e);let o=s();return v(o.panelOpen.set(n))}),d()}i&2&&E("aria-label",_(1,1,"A11Y_CS_DOCUMENT_TYPE_SELECT"))}function _o(i,r){if(i&1){let e=b();l(0,"ui-du-compact-boolean-input",15),T("valueChange",function(n){g(e);let o=s(2);return v(o.onInputValueChanges(n))}),d()}if(i&2){let e=s(2);u("value",e.value().value??"")("validationError",e.validationError())}}function go(i,r){if(i&1){let e=b();l(0,"ui-du-compact-set-input",16),T("panelOpenChange",function(n){g(e);let o=s(2);return v(o.panelOpen.set(n))})("valueChange",function(n){g(e);let o=s(2);return v(o.onInputValueChanges(n))}),d()}if(i&2){let e=s(2),t=C(1);u("value",e.value().value??"")("validationError",e.validationError())("options",t.values||Rt(3,uo))}}function vo(i,r){if(i&1){let e=b();l(0,"ui-du-compact-number-input",17),T("valueChange",function(n){g(e);let o=s(2);return v(o.onInputValueChanges(n))}),d()}if(i&2){let e=s(2);u("value",e.value().value??"")("validationError",e.validationError())("valueUniqueId",e.value().id)("derivedParts",e.value().derivedParts)("textDirection",e.textDirection())("decimalSeparator",e.docTypeMetadata().decimalSeparator)("thousandsSeparator",e.docTypeMetadata().thousandsSeparator)}}function fo(i,r){if(i&1){let e=b();l(0,"ui-du-compact-monetary-input",18),T("valueChange",function(n){g(e);let o=s(2);return v(o.onInputValueChanges(n))})("derivedPartsChange",function(n){g(e);let o=s(2);return v(o.onDerivedPartsChange(n,!0))}),d()}if(i&2){let e=s(2);u("value",e.value().value??"")("validationError",e.validationError())("valueUniqueId",e.value().id)("derivedParts",e.value().derivedParts)("textDirection",e.textDirection())("decimalSeparator",e.docTypeMetadata().decimalSeparator)("thousandsSeparator",e.docTypeMetadata().thousandsSeparator)}}function Co(i,r){if(i&1){let e=b();l(0,"ui-du-compact-date-input",19),T("panelOpenChange",function(n){g(e);let o=s(2);return v(o.panelOpen.set(n))})("valueChange",function(n){g(e);let o=s(2);return v(o.onInputValueChanges(n))})("derivedPartsChange",function(n){g(e);let o=s(2);return v(o.onDerivedPartsChange(n))}),d()}if(i&2){let e=s(2),t=C(0);u("fieldId",t.id)("value",e.value().value??"")("valueUniqueId",e.value().id)("derivedParts",e.value().derivedParts)("validationError",e.validationError())("textDirection",e.textDirection())("displayFormat",e.docTypeMetadata().dateDisplayFormat)}}function xo(i,r){if(i&1){let e=b();l(0,"ui-du-compact-address-input",20),T("valueChange",function(n){g(e);let o=s(2);return v(o.onInputValueChanges(n,!0))})("derivedPartsChange",function(n){g(e);let o=s(2);return v(o.onDerivedPartsChange(n))})("panelOpenChange",function(n){g(e);let o=s(2);return v(o.panelOpen.set(n))}),d()}if(i&2){let e=s(2);u("value",e.value().value??"")("valueUniqueId",e.value().id)("derivedParts",e.value().derivedParts)("validationError",e.validationError())("maxRows",4)("textDirection",e.textDirection())}}function ho(i,r){if(i&1){let e=b();l(0,"ui-du-compact-name-input",21),T("valueChange",function(n){g(e);let o=s(2);return v(o.onInputValueChanges(n,!0))})("derivedPartsChange",function(n){g(e);let o=s(2);return v(o.onDerivedPartsChange(n))})("panelOpenChange",function(n){g(e);let o=s(2);return v(o.panelOpen.set(n))}),d()}if(i&2){let e=s(2);u("value",e.value().value??"")("valueUniqueId",e.value().id)("derivedParts",e.value().derivedParts)("validationError",e.validationError())("maxRows",4)("textDirection",e.textDirection())}}function So(i,r){if(i&1){let e=b();l(0,"ui-du-compact-text-input",22),T("valueChange",function(n){g(e);let o=s(2);return v(o.onInputValueChanges(n))}),d()}if(i&2){let e=s(2);u("value",e.value().value??"")("validationError",e.validationError())("maxRows",4)("textDirection",e.textDirection())}}function yo(i,r){if(i&1&&S(0,_o,1,2,"ui-du-compact-boolean-input",7)(1,go,1,4,"ui-du-compact-set-input",8)(2,vo,1,7,"ui-du-compact-number-input",9)(3,fo,1,7,"ui-du-compact-monetary-input",10)(4,Co,1,7,"ui-du-compact-date-input",11)(5,xo,1,6,"ui-du-compact-address-input",12)(6,ho,1,6,"ui-du-compact-name-input",13)(7,So,1,4,"ui-du-compact-text-input",14),i&2){let e,t=s(),n=C(1);y((e=n.contentType)===t.FieldType.Boolean?0:e===t.FieldType.Set?1:e===t.FieldType.Number?2:e===t.FieldType.MonetaryQuantity?3:e===t.FieldType.Date?4:e===t.FieldType.Address?5:e===t.FieldType.Name?6:7)}}function To(i,r){if(i&1&&(k(0,5),D(1,"ui-du-compact-validator-notes",23),B()),i&2){let e=s(),t=C(0),n=C(8),o=C(9);a(),u("fieldId",t.id)("valueId",e.value().id)("taxonomy",n)("notes",o)("appInReadonlyMode",!1)}}var uo,Tn,Mn=le(()=>{"use strict";Ct();R();L();Ge();de();fe();Ue();Bn();Mt();qn();ut();R();L();uo=()=>[];Tn=(()=>{class i{_configurationsManagerService=x(ge);_extractionManagerService=x(W);_derivedPartsService=x(dt);_bridgeService=x(Ce);_vsKeyboardShortcutsService=x(Q);_extractionValidationService=x(ve);field=M.required();taxonomy=M.required();value=M.required();valueIndex=M.required();TaxonomyDefinitionType=F;FieldType=ot;panelOpen=G(!1);menuOpen=G(!1);textDirection=G("auto");validationError=c(()=>this._extractionValidationService.invalidPrimaryValuesMap()[this.value().id]?.validationError??null);docTypeMetadata=this._extractionManagerService.documentTypeTaxonomy;hasHistory=c(()=>!!this._extractionManagerService.historyMap()[this.value().id]?.history?.length);displayRTLFeatures=c(()=>this._configurationsManagerService.isRTLFeaturesEnabled()&&Qi(this.taxonomy()));hotkeys=this._vsKeyboardShortcutsService.fields;validatorNotesTaxonomy=c(()=>{let e=this.taxonomy();if(e.type===F.Field)return e.validatorNotes});validatorNotes=c(()=>this.validatorNotesTaxonomy()?.enabled?this.value()?.validatorNotes:void 0);validatorNotesLevel=_e;_fieldConfiguration=c(()=>this._configurationsManagerService.getFieldCustomization(this.taxonomy().id));_pdfSelectionAsPrimaryValue=this._bridgeService.pdfSelectionAsPrimaryValue;pdfHasValidSelectionForValue=c(()=>{let e=this._pdfSelectionAsPrimaryValue();return Fe(e,this._fieldConfiguration().referenceEditModes)&&!at(e?.reference,this.value()?.reference)});changeExtractedValue(){if(!this.pdfHasValidSelectionForValue())return;let e=w(w({},this.value()),this._pdfSelectionAsPrimaryValue());this._extractionManagerService.updateExtractedPrimaryValue(e)}revertToPreviousValue(){this._extractionManagerService.restorePreviousValue(this.value().id)}removeExtractedValue(){this._extractionManagerService.removeExtractedValues(this.field().id,[this.value().id])}onTextDirectionChange(e){this.textDirection.set(e)}reverseWords(){if(!this.value().reference)return;let t=this._bridgeService.reverseWordsInPrimaryValue(this.value());this._extractionManagerService.updateExtractedPrimaryValue(t)}confirmValue(){this._extractionManagerService.changeValueConfirmation(this.value().id,!0)}unconfirmValue(){this._extractionManagerService.changeValueConfirmation(this.value().id,!1)}onInputValueChanges(e,t=!1){let n=this.taxonomy();if(n.type!==F.Field)return;let o=t,p=this.value(),h=w({},p);!e&&p.value!==p.unformattedValue?(h.value=p.unformattedValue,h.derivedParts=p.derivedParts.map(I=>ye(w({},I),{value:""})),o=!1):(h.value=this._derivedPartsService.convertFormattedValueToValue(n.contentType,e)??e,h.derivedParts=this._derivedPartsService.convertFormattedValueToDerivedParts(n.contentType,e),h.reference||(h.unformattedValue=e)),this._extractionManagerService.updateExtractedPrimaryValue(h,o,!0)}onDerivedPartsChange(e,t=!1){let n=w(w({},this.value()),this._derivedPartsService.derivedPartsToValueUpdate(this.value(),e));this._extractionManagerService.updateExtractedPrimaryValue(n,!1,t)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=U({type:i,selectors:[["ui-du-compact-simple-value"]],inputs:{field:[1,"field"],taxonomy:[1,"taxonomy"],value:[1,"value"],valueIndex:[1,"valueIndex"]},decls:11,vars:20,consts:[[3,"field","taxonomy","value","valueIndex","positionCropHorizontally","textDirection"],["ngProjectAs","content",5,["content"]],["data-testid","doc-type-select"],["ngProjectAs","post-suffix-content",5,["post-suffix-content"]],[3,"change","revert","remove","textDirectionChange","reverseWords","stateChange","disableChange","disableRevert","displayRemove","displayTextDirection","displayReverseWords","shouldMarkAsMissingInsteadOfRemove","shouldAddInsteadOfChange","hotkeys"],["ngProjectAs","validator-notes-value-level",5,["validator-notes-value-level"]],["data-testid","doc-type-select",3,"panelOpenChange"],["data-testid","boolean-input",3,"value","validationError"],["data-testid","set-input",3,"value","validationError","options"],["data-testid","number-input",3,"value","validationError","valueUniqueId","derivedParts","textDirection","decimalSeparator","thousandsSeparator"],["data-testid","monetary-quantity-input",3,"value","validationError","valueUniqueId","derivedParts","textDirection","decimalSeparator","thousandsSeparator"],["data-testid","date-input",3,"fieldId","value","valueUniqueId","derivedParts","validationError","textDirection","displayFormat"],["data-testid","address-input",3,"value","valueUniqueId","derivedParts","validationError","maxRows","textDirection"],["data-testid","name-input",3,"value","valueUniqueId","derivedParts","validationError","maxRows","textDirection"],["data-testid","text-input",3,"value","validationError","maxRows","textDirection"],["data-testid","boolean-input",3,"valueChange","value","validationError"],["data-testid","set-input",3,"panelOpenChange","valueChange","value","validationError","options"],["data-testid","number-input",3,"valueChange","value","validationError","valueUniqueId","derivedParts","textDirection","decimalSeparator","thousandsSeparator"],["data-testid","monetary-quantity-input",3,"valueChange","derivedPartsChange","value","validationError","valueUniqueId","derivedParts","textDirection","decimalSeparator","thousandsSeparator"],["data-testid","date-input",3,"panelOpenChange","valueChange","derivedPartsChange","fieldId","value","valueUniqueId","derivedParts","validationError","textDirection","displayFormat"],["data-testid","address-input",3,"valueChange","derivedPartsChange","panelOpenChange","value","valueUniqueId","derivedParts","validationError","maxRows","textDirection"],["data-testid","name-input",3,"valueChange","derivedPartsChange","panelOpenChange","value","valueUniqueId","derivedParts","validationError","maxRows","textDirection"],["data-testid","text-input",3,"valueChange","value","validationError","maxRows","textDirection"],["data-testid","validator-notes",1,"validator-notes",3,"fieldId","valueId","taxonomy","notes","appInReadonlyMode"]],template:function(t,n){if(t&1){let o=b();P(0)(1),l(2,"ui-du-compact-value-shell",0),k(3,1),S(4,mo,2,3,"ui-du-compact-document-type-input",2)(5,yo,8,1),B(),k(6,3),l(7,"ui-compact-actions-menu",4),T("change",function(){return g(o),v(n.changeExtractedValue())})("revert",function(){return g(o),v(n.revertToPreviousValue())})("remove",function(){return g(o),v(n.removeExtractedValue())})("textDirectionChange",function(h){return g(o),v(n.onTextDirectionChange(h))})("reverseWords",function(){return g(o),v(n.reverseWords())})("stateChange",function(h){return g(o),v(n.menuOpen.set(h==="open"))}),d(),B(),P(8)(9),S(10,To,2,5,"ng-container",5),d()}if(t&2){let o=O(n.field());a();let p=O(n.taxonomy());a(),u("field",o)("taxonomy",p)("value",n.value())("valueIndex",n.valueIndex())("positionCropHorizontally",n.panelOpen()||n.menuOpen())("textDirection",n.textDirection()),a(2),y(p.type===n.TaxonomyDefinitionType.DocumentType?4:5),a(3),u("disableChange",!n.pdfHasValidSelectionForValue())("disableRevert",!n.hasHistory())("displayRemove",p.type!==n.TaxonomyDefinitionType.DocumentType)("displayTextDirection",n.displayRTLFeatures())("displayReverseWords",n.displayRTLFeatures())("shouldMarkAsMissingInsteadOfRemove",o.valueIds.length===1)("shouldAddInsteadOfChange",o.valueIds.length===0)("hotkeys",n.hotkeys()),a();let h=O(n.validatorNotesTaxonomy());a(),O(n.validatorNotes()),a(),y(h&&h.enabled&&h.level===n.validatorNotesLevel.Value?10:-1)}},dependencies:[Qe,A,rn,on,an,ln,sn,dn,pn,cn,un,he,xe,pt,N],encapsulation:2,changeDetection:0})}return i})()});function bo(i,r){if(i&1){let e=b();l(0,"div",7)(1,"mat-radio-button",8),T("click",function(){let n=g(e).$index,o=s(2);return v(o.onCheckboxClick(n))}),d(),l(2,"div",9),T("click",function(){let n=g(e).$index,o=s(2);return v(o.highlightedSuggestionIndex.set(n))}),l(3,"ui-attention-pill",10),f(4),m(5,"percent"),d(),l(6,"span",11),f(7),d()()()}if(i&2){let e=r.$implicit,t=r.$index,n=s(2);ie("highlighted",n.highlightedSuggestionIndex()===t),E("data-testid","suggestion-item_"+t+"_"+e.id),a(),u("checked",n.selectedSuggestionIndex()===t)("disabled",n.readonly()),E("aria-hidden",!0),a(),u("id","suggestion-option-id-"+e.id),E("aria-labelledby","suggestion-option-id-"+e.id)("aria-selected",n.selectedSuggestionIndex()===t),a(),u("level",n.confidenceLevelToAttentionLevelMap[e.confidenceLevel]),E("data-testid","suggestion-confidence-level-"+e.confidenceLevel),a(),V(" ",_(5,13,e.confidence)," "),a(3),j(e.value)}}function Vo(i,r){if(i&1){let e=b();l(0,"div",3)(1,"div",4),f(2," VS_COMPACT_FIELD_VALUE_SUGGESTIONS_TITLE "),l(3,"span"),f(4),d()(),l(5,"div",5),m(6,"translate"),T("keyup.arrowup",function(){g(e);let n=s();return v(n.navigateThroughOptions("up"))})("keyup.arrowleft",function(){g(e);let n=s();return v(n.navigateThroughOptions("up"))})("keyup.arrowdown",function(){g(e);let n=s();return v(n.navigateThroughOptions("down"))})("keyup.arrowright",function(){g(e);let n=s();return v(n.navigateThroughOptions("down"))})("keydown.enter",function(n){g(e);let o=s();return v(o.replaceSuggestionViaKeyboard(n))})("keydown.space",function(n){g(e);let o=s();return v(o.replaceSuggestionViaKeyboard(n))})("keydown.tab",function(){g(e);let n=s();return v(n.onClose())})("keydown.shift.tab",function(){g(e);let n=s();return v(n.onClose())}),J(7,bo,8,15,"div",6,Mo),d()()}if(i&2){let e=s(),t=C(0),n=C(2);u("cdkTrapFocusAutoCapture",!0),a(4),j(t),a(),E("aria-label",_(6,4,"VS_COMPACT_FIELD_VALUE_SUGGESTIONS_TITLE"))("aria-activedescendant","suggestion-option-id-"+e.highlightedSuggestion().id),a(2),Z(n)}}var Mo,bn,Vn=le(()=>{"use strict";zt();Ct();Xe();R();xi();L();de();fe();He();St();vt();Ue();kn();Mt();R();zt();Ct();xi();L();Mo=(i,r)=>r.id;bn=(()=>{class i{_overlay=x(Yt);_focusMonitor=x(Kt);_extractionManagerService=x(W);_vsKeyboardShortcutsService=x(Q);_bridgeService=x(Ce);field=M.required();taxonomy=M.required();readonly=M(!1);_triggerButton=je.required(Ae,{read:Ne});_suggestionsAsPrimaryValues=c(()=>this._extractionManagerService.suggestionsByParentId()[this.field().id]??[]);suggestionModels=c(()=>this._suggestionsAsPrimaryValues().map(e=>ye(w({},e),{confidenceLevel:nn(e.confidence,this.taxonomy().extractionConfidenceThreshold)})));isOpen=G(!1);highlightedSuggestionIndex=G(0);highlightedSuggestion=c(()=>this.suggestionModels()[this.highlightedSuggestionIndex()]);selectedValue=c(()=>{let e=this.field().valueIds[0];return this._extractionManagerService.getById(e)});isFieldSelected=c(()=>!!this._extractionManagerService.selectedParentValueIdMap()[this.field().id]);selectedSuggestionIndex=c(()=>this.suggestionModels().findIndex(e=>this.selectedValue().value===e.value));confidenceLevelToAttentionLevelMap={[Tt.High]:yt.Success,[Tt.Low]:yt.Error};toggleSuggestionsShortcut=c(()=>this._vsKeyboardShortcutsService.fields()?.toggleSuggestions);scrollStrategy=this._overlay.scrollStrategies.reposition();constructor(){ue(()=>{if(this.isOpen()){let e=this.highlightedSuggestion();this._bridgeService.activeHighlight([e.id])}}),ue(e=>{let t=this._registerHotKeys();e(()=>t?.unsubscribe())})}onKeyDown(e){this.isOpen()&&e.stopPropagation()}onToggle(){return this.isOpen()?this.onClose():this.onOpen()}onOpen(){this.isOpen.set(!0);let e=this.suggestionModels().map(t=>t.id);this._bridgeService.passiveHighlight(e)}onClose(e=!0){this.isOpen()&&(this.isOpen.set(!1),this._bridgeService.activeHighlight([]),this._bridgeService.passiveHighlight([]),e&&(this.isFieldSelected()?this._extractionManagerService.setSelectedValue(this.selectedValue().id):this._focusMonitor.focusVia(this._triggerButton().nativeElement,"keyboard",{preventScroll:!0})))}navigateThroughOptions(e){this.highlightedSuggestionIndex.update(t=>{let n=e==="up"?t-1:t+1;return hi(n,0,this._suggestionsAsPrimaryValues().length-1)})}onCheckboxClick(e){this._replaceSuggestion(e)}replaceSuggestionViaKeyboard(e){e.preventDefault(),this._replaceSuggestion(this.highlightedSuggestionIndex())}_replaceSuggestion(e){let t=this._suggestionsAsPrimaryValues()[e],n=this.selectedValue();!this.readonly()&&n.value!==t.value&&(this._extractionManagerService.updateExtractedPrimaryValue(ye(w({},t),{id:n.id,confirmationStatus:z.Confirmed,isSuggestion:!1})),this.highlightedSuggestionIndex.set(e)),this.onClose(!1)}_registerHotKeys(){let t=[this.toggleSuggestionsShortcut()].filter(Te);return this._vsKeyboardShortcutsService.listen$(t).pipe(Ee(()=>this.isFieldSelected())).subscribe(()=>this.onToggle())}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=U({type:i,selectors:[["ui-du-compact-suggestions"]],viewQuery:function(t,n){t&1&&ze(n._triggerButton,Ae,5,Ne),t&2&&We()},hostBindings:function(t,n){t&1&&T("keydown",function(p){return n.onKeyDown(p)},Dt)},inputs:{field:[1,"field"],taxonomy:[1,"taxonomy"],readonly:[1,"readonly"]},decls:7,vars:15,consts:[["trigger","cdkOverlayOrigin"],["cdkOverlayOrigin","","data-testid","suggestions-trigger-button","tabindex","-1",3,"click","tooltip","value","active"],["cdkConnectedOverlay","","cdkConnectedOverlayBackdropClass","overlay-backdrop",3,"overlayOutsideClick","detach","cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayScrollStrategy"],["data-testid","popover-root","cdkFocusInitial","","cdkTrapFocus","",1,"popover",3,"cdkTrapFocusAutoCapture"],["translate","",1,"title"],["data-testid","suggestions-list","tabindex","0","role","listbox",1,"suggestions",3,"keyup.arrowup","keyup.arrowleft","keyup.arrowdown","keyup.arrowright","keydown.enter","keydown.space","keydown.tab","keydown.shift.tab"],[1,"suggestion",3,"highlighted"],[1,"suggestion"],["tabindex","-1",1,"radio-button",3,"click","checked","disabled"],["role","option","data-testid","suggestion-option",1,"option-item",3,"click","id"],[3,"level"],[1,"value"]],template:function(t,n){if(t&1){let o=b();P(0),m(1,"uiHotkeysComboDisplay"),P(2),l(3,"ui-counter",1,0),m(5,"translate"),T("click",function(){return g(o),v(n.onToggle())}),d(),$e(6,Vo,9,6,"ng-template",2),T("overlayOutsideClick",function(){return g(o),v(n.onClose())})("detach",function(){return g(o),v(n.onClose())})}if(t&2){let o,p=ce(4),h=O(_(1,9,(o=n.toggleSuggestionsShortcut())==null?null:o.combos)??"");a(2);let I=O(n.suggestionModels());a(),u("tooltip",se("",_(5,13,"VS_FIELD_VALUE_SUGGESTION_COUNTER_TOOLTIP")," ",h))("value",I.length)("active",n.isOpen()),a(3),u("cdkConnectedOverlayHasBackdrop",!0)("cdkConnectedOverlayOrigin",p)("cdkConnectedOverlayOpen",n.isOpen())("cdkConnectedOverlayScrollStrategy",n.scrollStrategy)}},dependencies:[$t,qt,Qe,Qt,Ae,Ci,fi,A,Ze,bi,Yi,Ht,N,me],styles:[".popover[_ngcontent-%COMP%]{min-width:300px;background:var(--color-background-secondary);border-radius:4px;box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f;display:flex;flex-direction:column;gap:2px}.popover[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin:8px;padding:0 12px;font-size:14px;font-weight:600;line-height:20px;color:var(--color-foreground)}.popover[_ngcontent-%COMP%] .suggestions[_ngcontent-%COMP%]{max-height:300px;overflow-y:auto;padding:4px 0;display:flex;flex-direction:column}.popover[_ngcontent-%COMP%] .suggestions[_ngcontent-%COMP%]:focus-visible{outline:none}.popover[_ngcontent-%COMP%] .suggestions[_ngcontent-%COMP%] .suggestion[_ngcontent-%COMP%]{flex:1;display:flex;padding:2px 0;gap:8px}.popover[_ngcontent-%COMP%] .suggestions[_ngcontent-%COMP%] .suggestion[_ngcontent-%COMP%]:hover{background-color:var(--color-background-hover)}.popover[_ngcontent-%COMP%] .suggestions[_ngcontent-%COMP%] .suggestion[_ngcontent-%COMP%]:active{background-color:var(--color-background-pressed)}.popover[_ngcontent-%COMP%] .suggestions[_ngcontent-%COMP%] .suggestion.highlighted[_ngcontent-%COMP%]{background-color:var(--color-background-selected)}.popover[_ngcontent-%COMP%] .suggestions[_ngcontent-%COMP%] .suggestion[_ngcontent-%COMP%]:not(:first-child){border-top:1px solid var(--color-border-de-emp)}.popover[_ngcontent-%COMP%] .suggestions[_ngcontent-%COMP%] .suggestion[_ngcontent-%COMP%] .radio-button[_ngcontent-%COMP%]{padding-left:12px}.popover[_ngcontent-%COMP%] .suggestions[_ngcontent-%COMP%] .suggestion[_ngcontent-%COMP%] .option-item[_ngcontent-%COMP%]{cursor:pointer;flex:1;display:flex;gap:8px;align-items:center}.popover[_ngcontent-%COMP%] .suggestions[_ngcontent-%COMP%] .suggestion[_ngcontent-%COMP%] .option-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:20px;color:var(--color-foreground-de-emp)}"],changeDetection:0})}return i})()});function Eo(i,r){i&1&&(l(0,"mat-icon",9),f(1,"table_chart"),d(),l(2,"span"),f(3),m(4,"translate"),d()),i&2&&(a(3),j(_(4,1,"VS_TABLE_FIELD_TITLE")))}function Io(i,r){i&1&&(l(0,"ui-du-compact-input-error",10),f(1),m(2,"translate"),d()),i&2&&(a(),V(" ",_(2,1,"VS_TABLE_FIELD_BODY_IS_REQUIRED_ERROR_MSG")," "))}function Do(i,r){i&1&&(l(0,"ui-du-compact-input-error",10),f(1),m(2,"translate"),d()),i&2&&(a(),V(" ",_(2,1,"VS_TABLE_FIELD_INVALID_CELL_VALUE_ERROR_MSG")," "))}function Oo(i,r){if(i&1&&(S(0,Io,3,3,"ui-du-compact-input-error",10),S(1,Do,3,3,"ui-du-compact-input-error",10)),i&2){let e=s(),t=e.validationError();y(t===e.ValidationCode.TableBodyRequired?0:-1),a(),y(t===e.ValidationCode.InvalidCells?1:-1)}}function Po(i,r){i&1&&(l(0,"span",11),m(1,"translate"),f(2),m(3,"translate"),d()),i&2&&(u("matTooltip",_(1,2,"VS_SIMPLE_FIELD_REMOVED_MESSAGE_TOOLTIP")),a(2),V(" ",_(3,4,"VS_SIMPLE_FIELD_REMOVED_MESSAGE")," "))}function wo(i,r){i&1&&(l(0,"span",11),m(1,"translate"),f(2),m(3,"translate"),d()),i&2&&(u("matTooltip",_(1,2,"VS_SIMPLE_FIELD_NO_DATA_MESSAGE_TOOLTIP")),a(2),V(" ",_(3,4,"VS_SIMPLE_FIELD_NO_DATA_MESSAGE")," "))}function Fo(i,r){if(i&1&&(l(0,"i",5),S(1,Po,4,6,"span",11)(2,wo,4,6,"span",11),d()),i&2){let e=s(),t=C(0);a(),y(t.confirmationStatus===e.ConfirmationStatus.Confirmed?1:2)}}function Uo(i,r){if(i&1&&(k(0,6),D(1,"ui-du-compact-validator-notes",12),B()),i&2){s();let e=C(0),t=C(9),n=C(10);a(),u("fieldId",e.id)("taxonomy",t)("notes",n)("appInReadonlyMode",!1)}}var En,In=le(()=>{"use strict";R();ee();$();L();Ge();de();fe();Ln();Kn();Ue();Mt();Gn();ut();R();ee();$();L();En=(()=>{class i{_extractionManagerService=x(W);_extractionValidationService=x(ve);_tableService=x(tn);_vsKeyboardShortcutsService=x(Q);field=M.required();taxonomy=M.required();readonly=M.required();dummyPrimaryValue=c(()=>{let e=this.field();return e.valueIds.length?ye(w({},e),{type:H.Primary,parentId:e.id,value:null,unformattedValue:null,isAnchorBased:!1,reference:null,derivedParts:[]}):null});validationError=c(()=>this._extractionValidationService.invalidTableFieldValuesMap()[this.field().id]?.validationError);hasHistory=c(()=>!!this._extractionManagerService.historyMap()[this.field().id]?.history?.length);hotkeys=this._vsKeyboardShortcutsService.fields;validatorNotesTaxonomy=c(()=>this.taxonomy().validatorNotes);validatorNotes=c(()=>this.validatorNotesTaxonomy()?.enabled?this.field().validatorNotes:void 0);isSelected=c(()=>this._tableService.selectedTableId()===this.field().id);validatorNotesLevel=_e;ValidationCode=ji;ConfirmationStatus=z;openTableEditor(){this._tableService.selectedTableId()===this.field().id&&this._tableService.isTableEditorVisible.set(!0)}revertToPreviousValue(){this._extractionManagerService.restorePreviousValue(this.field().id)}removeExtractedValue(){let e=this.field().id;this._extractionManagerService.setSelectedValue(e),this._extractionManagerService.removeExtractedValues(e,this.field().valueIds),this._tableService.isTableEditorVisible.set(!1)}onHotkeyPress(e){switch(e){case"revert":this.revertToPreviousValue();break;case"remove":this.removeExtractedValue();break;default:break}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=U({type:i,selectors:[["ui-du-compact-table-value"]],inputs:{field:[1,"field"],taxonomy:[1,"taxonomy"],readonly:[1,"readonly"]},decls:14,vars:20,consts:[[3,"click","field","taxonomy","value","valueIndex","readonly"],["ngProjectAs","content",5,["content"]],[1,"content-wrapper"],[1,"top-side"],[1,"bottom-side"],["data-testid","missing-value-message",1,"text"],["ngProjectAs","validator-notes-value-level",5,["validator-notes-value-level"]],["ngProjectAs","post-suffix-content",5,["post-suffix-content"]],[3,"revert","remove","disableRevert","disableRemove","displayChange","displayTextDirection","displayReverseWords","shouldAddInsteadOfChange","hotkeys"],["fontSet","material-icons-outlined"],["data-testid","error"],[3,"matTooltip"],["data-testid","validator-notes",1,"validator-notes",3,"fieldId","taxonomy","notes","appInReadonlyMode"]],template:function(t,n){if(t&1){let o=b();P(0),l(1,"ui-du-compact-value-shell",0),T("click",function(){return g(o),v(n.openTableEditor())}),k(2,1),l(3,"div",2)(4,"div",3),S(5,Eo,5,3),d(),l(6,"div",4),S(7,Oo,2,2)(8,Fo,3,1,"i",5),d()(),B(),P(9)(10),S(11,Uo,2,4,"ng-container",6),k(12,7),l(13,"ui-compact-actions-menu",8),T("revert",function(){return g(o),v(n.revertToPreviousValue())})("remove",function(){return g(o),v(n.removeExtractedValue())}),d(),B(),d()}if(t&2){let o=O(n.field()),p=!o.valueIds.length;a(),u("field",o)("taxonomy",n.taxonomy())("value",n.dummyPrimaryValue())("valueIndex",0)("readonly",n.readonly()),a(2),ie("no-values",p),a(2),y(p?-1:5),a(2),y(p?8:7),a(2);let h=O(n.validatorNotesTaxonomy());a(),O(n.validatorNotes()),a(),y(h&&h.enabled&&h.level===n.validatorNotesLevel.Value&&!p?11:-1),a(2),u("disableRevert",!n.hasHistory())("disableRemove",p)("displayChange",!1)("displayTextDirection",!1)("displayReverseWords",!1)("shouldAddInsteadOfChange",!0)("hotkeys",n.hotkeys())}},dependencies:[Y,ae,q,K,A,he,Zi,pt,xe,N],styles:[".content-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-left:8px}.content-wrapper[_ngcontent-%COMP%] .top-side[_ngcontent-%COMP%]{height:48px;display:flex;justify-content:flex-start;align-items:center;gap:12px;padding-left:4px}.content-wrapper[_ngcontent-%COMP%] .bottom-side[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:42px}.content-wrapper.no-values[_ngcontent-%COMP%]{flex-direction:row;padding-left:0}"],changeDetection:0})}return i})()});function Lo(i,r){i&1&&(l(0,"mat-icon",12),m(1,"translate"),f(2," anchor "),d()),i&2&&u("matTooltip",Ie(_(1,2,"VS_FIELD_EDIT_CAPABILITIES_ANCHORS_TOOLTIP")))}function Ao(i,r){i&1&&(l(0,"mat-icon",13),m(1,"translate"),f(2,"crop_free"),d()),i&2&&u("matTooltip",Ie(_(1,2,"VS_FIELD_EDIT_CAPABILITIES_AREA_ONLY_TOOLTIP")))}function ko(i,r){i&1&&(l(0,"mat-icon",14),m(1,"translate"),f(2,"short_text"),d()),i&2&&u("matTooltip",Ie(_(1,2,"VS_FIELD_EDIT_CAPABILITIES_TOKENS_ONLY_TOOLTIP")))}function Bo(i,r){if(i&1&&(l(0,"span",6),S(1,Lo,3,4,"mat-icon",12),S(2,Ao,3,4,"mat-icon",13),S(3,ko,3,4,"mat-icon",14),d()),i&2){let e=s(2);a(),y(e.showAnchorIcon()?1:-1),a(),y(e.showAreaIcon()?2:-1),a(),y(e.showTokensIcon()?3:-1)}}function Ho(i,r){i&1&&(l(0,"mat-chip-listbox")(1,"mat-chip",15),f(2),m(3,"translate"),d()()),i&2&&(a(2),V(" ",_(3,1,"TAXO_FIELD_DEFAULT_VALUE")," "))}function Go(i,r){if(i&1&&D(0,"ui-du-compact-suggestions",8),i&2){let e=s(2),t=C(2),n=C(3);u("field",t)("taxonomy",n)("readonly",e.readonly())}}function Ko(i,r){if(i&1&&D(0,"ui-du-compact-validator-notes",16),i&2){s();let e=C(0),t=C(1),n=s(2),o=C(2);u("fieldId",o.id)("taxonomy",e)("notes",t)("appInReadonlyMode",n.readonly())}}function qo(i,r){if(i&1&&(P(0)(1),S(2,Ko,1,4,"ui-du-compact-validator-notes",16)),i&2){let e=s(2),t=C(2),n=C(3),o=O(n.validatorNotes);a(),O(t.validatorNotes),a(),y(o&&o.enabled&&o.level===e.ValidatorNotesLevel.Field?2:-1)}}function $o(i,r){if(i&1&&D(0,"ui-du-compact-table-value",10),i&2){let e=s(2),t=C(2),n=C(3),o=t.valueIds.length?(e.readonly()?"readonly-":"")+"field-value_0_0":"missing-field-value";u("field",t)("taxonomy",n)("readonly",e.readonly()),E("data-testid",o)}}function zo(i,r){if(i&1&&D(0,"ui-du-compact-field-group-row",17),i&2){let e=r.$implicit,t=r.$index,n=s(3),o=ce(7),p=C(2),h=C(3),I="field-value_"+t+"_"+e;u("field",p)("taxonomy",h)("valueId",e)("valueIndex",t)("level",n.level())("fieldTemplate",o)("isReadonly",n.readonly()),E("data-testid",I)}}function Wo(i,r){if(i&1&&D(0,"ui-du-compact-readonly-value",18),i&2){s(4);let e=C(2),t=C(3);u("field",e)("taxonomy",t)("value",null)("valueIndex",-1)}}function jo(i,r){if(i&1&&D(0,"ui-du-compact-missing-value",19),i&2){s(4);let e=C(2),t=C(3);u("field",e)("taxonomy",t)}}function Xo(i,r){if(i&1&&S(0,Wo,1,4,"ui-du-compact-readonly-value",18)(1,jo,1,2,"ui-du-compact-missing-value",19),i&2){let e=s(3);y(e.readonly()?0:1)}}function Yo(i,r){if(i&1&&J(0,zo,1,8,"ui-du-compact-field-group-row",17,Pt,!1,Xo,2,1),i&2){s(2);let e=C(2);Z(e.valueIds)}}function Qo(i,r){if(i&1&&D(0,"ui-du-compact-readonly-value",20),i&2){let e=s(),t=e.$implicit,n=e.$index,o=C(0),p=s(3),h=C(2),I=C(3);u("field",h)("taxonomy",I)("value",t)("valueIndex",p.parentValueIndex()??n),E("data-testid","readonly-"+o)}}function Jo(i,r){if(i&1&&D(0,"ui-du-compact-simple-value",20),i&2){let e=s(),t=e.$implicit,n=e.$index,o=C(0),p=s(3),h=C(2),I=C(3);u("field",h)("taxonomy",I)("value",t)("valueIndex",p.parentValueIndex()??n),E("data-testid",o)}}function Zo(i,r){i&1&&D(0,"mat-divider")}function ea(i,r){if(i&1&&(P(0),S(1,Qo,1,5,"ui-du-compact-readonly-value",20)(2,Jo,1,5,"ui-du-compact-simple-value",20),S(3,Zo,1,0,"mat-divider")),i&2){let e=r.$implicit,t=r.$index,n=r.$count,o=s(3),p=C(3);O("field-value_"+t+"_"+e.id),a(),y(o.readonly()?1:p.type!==o.TaxonomyDefinitionType.FieldGroup&&p.type!==o.TaxonomyDefinitionType.Table?2:-1),a(2),y(t!==n-1?3:-1)}}function ta(i,r){if(i&1&&D(0,"ui-du-compact-readonly-value",18),i&2){s(4);let e=C(2),t=C(3);u("field",e)("taxonomy",t)("value",null)("valueIndex",-1)}}function ia(i,r){if(i&1&&D(0,"ui-du-compact-missing-value",19),i&2){s(4);let e=C(2),t=C(3);u("field",e)("taxonomy",t)}}function na(i,r){if(i&1&&S(0,ta,1,4,"ui-du-compact-readonly-value",18)(1,ia,1,2,"ui-du-compact-missing-value",19),i&2){let e=s(3),t=C(4);y(e.readonly()?0:t?-1:1)}}function oa(i,r){if(i&1&&J(0,ea,4,3,null,null,No,!1,na,2,1),i&2){let e=s(2);Z(e.fieldValues())}}function aa(i,r){if(i&1){let e=b();l(0,"div",11)(1,"button",21),m(2,"translate"),m(3,"uiHotkeysComboDisplay"),m(4,"translate"),T("click",function(){g(e);let n=s(2);return v(n.addNewValueToField())}),l(5,"mat-icon"),f(6,"add"),d(),f(7),m(8,"translate"),d()()}if(i&2){let e,t=s(2);a(),u("matTooltip",se("",_(2,6,t.multiValueButtonTooltip())," ",_(3,8,(e=t.addValueShortcut())==null?null:e.combos)))("disabled",!t.canAddNewValue()),E("aria-label",_(4,10,t.multiValueButtonTooltip())),a(6),V(" ",_(8,12,"VS_COMPACT_FIELD_ADD_TO_MULTI_VALUE_BUTTON")," ")}}function ra(i,r){if(i&1&&(l(0,"div",2)(1,"div",3)(2,"div",4),D(3,"ui-du-shared-field-hotkey-button",5),m(4,"translate"),S(5,Bo,4,3,"span",6),l(6,"span",7),f(7),m(8,"translate"),d(),S(9,Ho,4,3,"mat-chip-listbox"),S(10,Go,1,3,"ui-du-compact-suggestions",8),d(),S(11,qo,3,3),l(12,"div",9),S(13,$o,1,4,"ui-du-compact-table-value",10)(14,Yo,3,1)(15,oa,3,1),d(),S(16,aa,9,14,"div",11),d()()),i&2){let e=s(),t=C(0),n=C(2),o=C(3),p=C(4);ie("is-document-type",p),a(),ie("has-multiple-values",e.hasMultipleValues())("inline-values",e.inlineValues())("offset-children",o.type===e.TaxonomyDefinitionType.FieldGroup&&!!n.valueIds.length),a(),u("ngClass","level-"+e.level()),a(),u("fieldId",n.fieldId)("disableInteraction",!0)("color",o.color)("hotkey",t)("hotkeyTooltipKey",X(4,24,e.assignHotkeyTooltip(),pe(29,Ro,t)))("disabled",e.readonly()),a(2),y(e.showCapabilitiesIcons()?5:-1),a(2),V(" ",p?_(8,27,"VS_DOCTYPE_LABEL"):o.name," "),a(2),y(n.dataSource===e.ExtractionSource.Defaulted?9:-1),a(),y(e.hasSuggestions()&&n.type===e.ValueType.Field&&o.type===e.TaxonomyDefinitionType.Field?10:-1),a(),y(o.type!==e.TaxonomyDefinitionType.DocumentType?11:-1),a(),ie("full-height",n.valueIds.length===1),a(),y(o.type===e.TaxonomyDefinitionType.Table&&n.type===e.ValueType.Table?13:o.type===e.TaxonomyDefinitionType.FieldGroup&&n.type===e.ValueType.FieldGroup?14:15),a(3),y(!e.readonly()&&o.type!==e.TaxonomyDefinitionType.DocumentType&&o.type!==e.TaxonomyDefinitionType.Table&&o.multiValued&&n.valueIds.length?16:-1)}}function la(i,r){if(i&1&&D(0,"ui-du-compact-field",22),i&2){let e=r.$implicit,t=r.parentValueIndex,n=r.level,o=s(),p="inner-field_"+t+"_"+e.fieldId;u("field",e)("readonly",o.readonly())("inlineValues",o.inlineValues())("assignHotkeyDisabled",!0)("parentValueIndex",t)("level",n),E("data-testid",p)}}var Ro,No,Dn,On=le(()=>{"use strict";Xe();R();oe();nt();ke();ee();$();L();Ge();Un();de();fe();He();St();vt();Ue();Hn();en();fn();hn();yn();Mn();Vn();In();R();ee();oe();$();nt();L();Ro=i=>({key:i}),No=(i,r)=>r.id;Dn=(()=>{class i{_configurationsManagerService=x(ge);_taxonomyManagerService=x(lt);_extractionManagerService=x(W);_valuesFactoryService=x(ct);_bridgeService=x(Ce);_vsKeyboardShortcutsService=x(Q);field=M.required();parentValueIndex=M();level=M(0);inlineValues=M(!1);readonly=M(!1);assignHotkeyDisabled=M(!1);documentTypeId=c(()=>this._extractionManagerService.selectedDocumentTypeId());taxonomy=c(()=>this._taxonomyManagerService.getById(this.field().fieldId));TaxonomyDefinitionType=F;ValidatorNotesLevel=_e;ValueType=H;ExtractionSource=Ai;fieldValues=c(()=>this.field().valueIds.map(e=>this._extractionManagerService.getById(e)).filter(Te).filter(e=>e.type===H.Primary));isSelected=c(()=>{let e=this._extractionManagerService.selectedValueId(),t=this.field().id;return t===e||!!this._extractionManagerService.selectedParentValueIdMap()[t]});hasSuggestions=c(()=>{let e=this.field();return!!this._extractionManagerService.suggestionsByParentId()[e.id]?.length});changeValueShortcut=c(()=>this.readonly()?void 0:this._vsKeyboardShortcutsService.fields()?.changeValue);addValueShortcut=c(()=>this.readonly()?void 0:this._vsKeyboardShortcutsService.fields()?.addValue);assignHotkey=c(()=>this._vsKeyboardShortcutsService.areShortcutsEnabled()&&!this.assignHotkeyDisabled()?Ki(this.taxonomy()):void 0);assignHotkeyTooltip=c(()=>this.assignHotkey()!=null?"VS_FIELD_COLOR_CODED_HOTKEY_TOOLTIP":"VS_FIELD_COLOR_CODED_HOTKEY_MISSING_TOOLTIP");showCapabilitiesIcons=c(()=>!this._allowsOnlyAnchorsAndFeatureIsDisabled()&&!this._editReferenceCapabilities().includes(we.all));showAnchorIcon=c(()=>this._configurationsManagerService.globalCustomizations().isAnchorSelectionAllowed&&this._editReferenceCapabilities().includes(we.anchor));showAreaIcon=c(()=>this._editReferenceCapabilities().includes(we.area));showTokensIcon=c(()=>this._editReferenceCapabilities().includes(we.tokens));_fieldConfiguration=c(()=>this._configurationsManagerService.getFieldCustomization(this.taxonomy().id));_pdfSelectionAsPrimaryValue=this._bridgeService.pdfSelectionAsPrimaryValue;_pdfHasValidSelectionForField=c(()=>{let e=this._pdfSelectionAsPrimaryValue();return Fe(e,this._fieldConfiguration().referenceEditModes)&&this.field().valueIds.every(t=>{let n=this._extractionManagerService.getById(t);return!at(e?.reference,n?.reference)})});_canChangeExistingValueOnFieldHotkey=c(()=>{let e=this.taxonomy();if(this.readonly()||e.type===F.Table||e.type===F.FieldGroup||e.type!==F.DocumentType&&e.multiValued||this.field().valueIds.length!==1)return!1;let t=this._pdfSelectionAsPrimaryValue();return!e.requiresReference&&!t||this._pdfHasValidSelectionForField()});canAddNewValue=c(()=>{let e=this.taxonomy();if(this.readonly()||e.type===F.Table)return!1;let t=this.field(),n=this._pdfSelectionAsPrimaryValue(),o=!e.requiresReference&&!n||this._pdfHasValidSelectionForField();return t.valueIds.length?o&&this.isMultiValued():o});multiValueButtonTooltip=c(()=>this.canAddNewValue()?"":this._pdfSelectionAsPrimaryValue()?"VS_FIELD_ADD_TO_MULTI_VALUE_TOOLTIP":"VS_SIMPLE_FIELD_CHANGE_EMPTY_REFERENCE_VALUE_TOOLTIP");isMultiValued=c(()=>{let e=this.taxonomy();return e.type!==F.DocumentType&&e.multiValued});hasMultipleValues=c(()=>{let e=this.field();return e.type===H.Field&&e.valueIds.length>1});_editReferenceCapabilities=c(()=>this._configurationsManagerService.getFieldCustomization(this.field().fieldId).referenceEditModes);_allowsOnlyAnchors=c(()=>this._editReferenceCapabilities().length===1&&this._editReferenceCapabilities()[0]===we.anchor);_allowsOnlyAnchorsAndFeatureIsDisabled=c(()=>this._allowsOnlyAnchors()&&!this._configurationsManagerService.globalCustomizations().isAnchorSelectionAllowed);_valueToSelect=c(()=>{let e=this.field();return e.type===H.Table||e.type===H.FieldGroup?e.id:e.valueIds[0]??e.id});constructor(){ue(e=>{let t=this._registerHotKeys();e(()=>t?.unsubscribe())})}addNewValueToField(){if(!this.canAddNewValue())return;if(this.taxonomy().type===F.FieldGroup){let t=this._valuesFactoryService.generateRowOfFields(this.field().fieldId,this.field().id);this._extractionManagerService.addMultipleExtractedValues(this.field().id,[t.value,...t.childValues]);return}let e=w(w({},this._valuesFactoryService.generatePrimaryValue(this.field().fieldId,this.field().id)),this._pdfSelectionAsPrimaryValue());this._extractionManagerService.addExtractedPrimaryValue(this.field().id,e)}_handleAssignHotkeyPress(){let e=this._valueToSelect();e&&this._extractionManagerService.setFocusedValue(e);let t=this._pdfSelectionAsPrimaryValue();if(!t){this.isSelected()||this._selectCurrentValue();return}if(this._canChangeExistingValueOnFieldHotkey()){let n=this._extractionManagerService.getById(this.field().valueIds[0]),o=w(w({},n),t);this._extractionManagerService.updateExtractedPrimaryValue(o);return}if(this.canAddNewValue()&&this.taxonomy().type!==F.FieldGroup){let n=w(w({},this._valuesFactoryService.generatePrimaryValue(this.field().fieldId,this.field().id)),t);this._extractionManagerService.addExtractedPrimaryValue(this.field().id,n);return}this.isSelected()||this._selectCurrentValue()}_selectCurrentValue(){this._extractionManagerService.setSelectedValue(this._valueToSelect())}_registerHotKeys(){let e=new bt,t=this.addValueShortcut(),n=this.assignHotkey(),o=[t,n].filter(Te);return e.add(this._vsKeyboardShortcutsService.listen$(o).subscribe(p=>{switch(p.shortcut){case t:this.isSelected()&&this.addNewValueToField();break;case n:this._handleAssignHotkeyPress();break}})),e}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=U({type:i,selectors:[["ui-du-compact-field"]],inputs:{field:[1,"field"],parentValueIndex:[1,"parentValueIndex"],level:[1,"level"],inlineValues:[1,"inlineValues"],readonly:[1,"readonly"],assignHotkeyDisabled:[1,"assignHotkeyDisabled"]},features:[Ut([...Ji])],decls:8,vars:8,consts:[["fieldTemplate",""],[1,"ui-compact-field",3,"is-document-type"],[1,"ui-compact-field"],[1,"data-point"],[1,"name-container",3,"ngClass"],["data-testid","assign-hotkey-button",3,"fieldId","disableInteraction","color","hotkey","hotkeyTooltipKey","disabled"],[1,"edit-reference-capabilities-icon"],["uiDuSharedSetTitleWhenEllipsesActive","","data-testid","field-name",1,"field-name"],["data-testid","value-suggestions",3,"field","taxonomy","readonly"],["data-testid","field-values",1,"values"],[3,"field","taxonomy","readonly"],[1,"add-value"],["data-testid","capabilities-icon-anchor",3,"matTooltip"],["data-testid","capabilities-icon-area","color","warn",3,"matTooltip"],["data-testid","capabilities-icon-tokens","color","primary",3,"matTooltip"],["data-testid","defaulted-chip","disableRipple","true",1,"chip-mini","validated-chip"],["data-testid","validator-notes",1,"validator-notes",3,"fieldId","taxonomy","notes","appInReadonlyMode"],[3,"field","taxonomy","valueId","valueIndex","level","fieldTemplate","isReadonly"],["data-testid","readonly-missing-field-value",3,"field","taxonomy","value","valueIndex"],["data-testid","missing-field-value",3,"field","taxonomy"],[3,"field","taxonomy","value","valueIndex"],["mat-button","","data-testid","create-value","color","primary",3,"click","matTooltip","disabled"],[3,"field","readonly","inlineValues","assignHotkeyDisabled","parentValueIndex","level"]],template:function(t,n){if(t&1&&(P(0),m(1,"uiHotkeysComboDisplay"),P(2)(3)(4),S(5,ra,17,31,"div",1),$e(6,la,1,7,"ng-template",null,0,At)),t&2){let o;O(X(1,1,(o=n.assignHotkey())==null?null:o.combos,!1)??""),a(2);let p=O(n.field());a();let h=O(n.taxonomy()),I=n.documentTypeId();a(),O(h.type===n.TaxonomyDefinitionType.DocumentType),a(),y(I&&p?5:-1)}},dependencies:[i,kt,Y,ae,ne,Ye,q,K,it,si,tt,A,Ni,Vi,bn,xe,En,Sn,Tn,xn,vn,Oe,N,me],styles:['.ui-compact-field[_ngcontent-%COMP%]{padding:0 2px}.ui-compact-field[_ngcontent-%COMP%] .data-point[_ngcontent-%COMP%]{position:relative;padding:2px 0;display:grid;grid-template-areas:"field-name" "validator-notes" "values" "add-value";grid-template-columns:minmax(200px,1fr)}.ui-compact-field[_ngcontent-%COMP%] .data-point.inline-values[_ngcontent-%COMP%]:not(.offset-children){grid-template-areas:"field-name values" ". add-value" "validator-notes validator-notes";grid-template-columns:minmax(200px,2fr) 3fr}.ui-compact-field[_ngcontent-%COMP%] .data-point.offset-children[_ngcontent-%COMP%] > .name-container.level-0[_ngcontent-%COMP%], .ui-compact-field[_ngcontent-%COMP%] .data-point.has-multiple-values[_ngcontent-%COMP%] > .name-container.level-0[_ngcontent-%COMP%]{position:sticky;top:0;z-index:10}.ui-compact-field[_ngcontent-%COMP%] .data-point.offset-children[_ngcontent-%COMP%] > .name-container.level-1[_ngcontent-%COMP%], .ui-compact-field[_ngcontent-%COMP%] .data-point.has-multiple-values[_ngcontent-%COMP%] > .name-container.level-1[_ngcontent-%COMP%]{position:sticky;top:40px;z-index:9}.ui-compact-field[_ngcontent-%COMP%] .data-point.offset-children[_ngcontent-%COMP%] > .name-container.level-2[_ngcontent-%COMP%], .ui-compact-field[_ngcontent-%COMP%] .data-point.has-multiple-values[_ngcontent-%COMP%] > .name-container.level-2[_ngcontent-%COMP%]{position:sticky;top:80px;z-index:8}.ui-compact-field[_ngcontent-%COMP%] .data-point.offset-children[_ngcontent-%COMP%] > .name-container.level-3[_ngcontent-%COMP%], .ui-compact-field[_ngcontent-%COMP%] .data-point.has-multiple-values[_ngcontent-%COMP%] > .name-container.level-3[_ngcontent-%COMP%]{position:sticky;top:120px;z-index:7}.ui-compact-field[_ngcontent-%COMP%] .data-point.offset-children[_ngcontent-%COMP%] > .name-container.level-4[_ngcontent-%COMP%], .ui-compact-field[_ngcontent-%COMP%] .data-point.has-multiple-values[_ngcontent-%COMP%] > .name-container.level-4[_ngcontent-%COMP%]{position:sticky;top:160px;z-index:6}.ui-compact-field[_ngcontent-%COMP%] .data-point[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%]{background-color:var(--color-background);grid-area:field-name;align-self:start;min-height:40px;display:flex;gap:8px;align-items:center;white-space:nowrap;overflow-x:hidden}.ui-compact-field[_ngcontent-%COMP%] .data-point[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%] .field-name[_ngcontent-%COMP%]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:14px;line-height:20px;font-weight:400;color:var(--color-foreground)}.ui-compact-field[_ngcontent-%COMP%] .data-point[_ngcontent-%COMP%] .name-container[_ngcontent-%COMP%] .edit-reference-capabilities-icon[_ngcontent-%COMP%]{display:inline-flex}.ui-compact-field[_ngcontent-%COMP%] .data-point[_ngcontent-%COMP%] .validator-notes[_ngcontent-%COMP%]{grid-area:validator-notes}.ui-compact-field[_ngcontent-%COMP%] .data-point[_ngcontent-%COMP%] .values[_ngcontent-%COMP%]{grid-area:values;grid-column-end:none;position:relative;display:flex;flex-direction:column;overflow:visible;gap:8px}.ui-compact-field[_ngcontent-%COMP%] .data-point[_ngcontent-%COMP%] .values.full-height[_ngcontent-%COMP%]{max-height:none}.ui-compact-field[_ngcontent-%COMP%] .data-point[_ngcontent-%COMP%] .add-value[_ngcontent-%COMP%]{grid-area:add-value}'],changeDetection:0})}return i})()});function ua(i,r){i&1&&D(0,"mat-divider")}function ma(i,r){if(i&1&&(D(0,"ui-du-compact-field",9),S(1,ua,1,0,"mat-divider")),i&2){let e,t=r.$implicit,n=r.$index,o=r.$count,p=s(2),h=C(0),I=t.fieldId===((e=p.documentTypeTaxonomy())==null?null:e.id),re=p.shouldHideDocumentTypeField()?n:n-1,te=I?"doc-type-field":"field_"+re+"_"+t.fieldId;u("field",t)("readonly",p.readonly())("inlineValues",h),E("data-testid",te),a(),y(n!==o-1?1:-1)}}function _a(i,r){i&1&&(l(0,"span",18),f(1,"VS_EXTRACTION_RESULTS_MAIN_SAVEDRAFT_LOADING_STATE_BUTTON"),d())}function ga(i,r){i&1&&(l(0,"span",18),f(1,"VS_EXTRACTION_RESULTS_MAIN_SAVEDRAFT_BUTTON"),d())}function va(i,r){if(i&1){let e=b();l(0,"button",17),m(1,"translate"),m(2,"uiHotkeysComboDisplay"),T("click",function(){g(e);let n=s(4);return v(n.onSave())}),S(3,_a,2,0,"span",18)(4,ga,2,0,"span",18),d()}if(i&2){let e,t=s(4),n=t.saveMode()===t.SavingState.ASDRAFT&&t.isSaving();u("matTooltip",se("",_(1,6,"VS_EXTRACTION_RESULTS_MAIN_SAVEDRAFT_BUTTON_TOOLTIP")," ",_(2,8,(e=t.saveAsDraftExtractionResultsShortcut())==null?null:e.combos)))("disabled",!t.canSave())("progressButtonLoading",n),a(3),y(n?3:4)}}function fa(i,r){i&1&&(l(0,"span",18),f(1,"VS_EXTRACTION_RESULTS_MAIN_SAVE_LOADING_STATE_BUTTON"),d())}function Ca(i,r){i&1&&(l(0,"span",18),f(1,"VS_EXTRACTION_RESULTS_MAIN_SAVE_BUTTON"),d())}function xa(i,r){if(i&1){let e=b();l(0,"div",15),m(1,"translate"),l(2,"button",19),m(3,"translate"),m(4,"uiHotkeysComboDisplay"),T("click",function(){g(e);let n=s(4);return v(n.onSubmit())}),S(5,fa,2,0,"span",18)(6,Ca,2,0,"span",18),d()()}if(i&2){let e,t=s(4);u("matTooltip",Ie(t.hasInvalidRules()?_(1,8,"VS_SAVE_BUSINESS_RULES_VALIDATION_ERROR"):""));let n=t.saveMode()===t.SavingState.SUBMIT&&t.isSaving();a(2),u("matTooltip",se("",_(3,10,"VS_EXTRACTION_RESULTS_MAIN_SAVE_BUTTON_TOOLTIP")," ",_(4,12,(e=t.saveExtractionResultsShortcut())==null?null:e.combos)))("disabled",!t.canSave()||t.hasInvalidRules())("progressButtonLoading",n),a(3),y(n?5:6)}}function ha(i,r){if(i&1){let e=b();l(0,"button",20),m(1,"translate"),m(2,"uiHotkeysComboDisplay"),T("click",function(){g(e);let n=s(4);return v(n.onReportException())}),f(3," ! "),d()}if(i&2){let e,t=s(4);u("matTooltip",se("",_(1,4,"VS_EXTRACTION_RESULTS_REPORT_DOCUMENT_AS_EXCEPTION_TOOLTIP")," ",_(2,6,(e=t.reportDocumentAsExceptionShortcut())==null?null:e.combos)))("disabled",t.isSaving()||t.isFormattingDerivedParts())}}function Sa(i,r){if(i&1){let e=b();l(0,"div",10)(1,"button",12),m(2,"translate"),m(3,"uiHotkeysComboDisplay"),T("click",function(){g(e);let n=s(3);return v(n.onDiscardChanges())}),f(4),m(5,"translate"),d(),l(6,"div",13),S(7,va,5,10,"button",14),S(8,xa,7,14,"div",15),d(),S(9,ha,4,8,"button",16),d()}if(i&2){let e,t=s(3);a(),u("matTooltip",se("",_(2,8,"VS_EXTRACTION_RESULTS_DISCARD_CHANGES_TOOLTIP")," ",_(3,10,(e=t.discardChangesShortcut())==null?null:e.combos)))("disabled",!t.canDiscardChanges()),a(3),V(" ",_(5,12,"VS_EXTRACTION_RESULT_DISCARD_CHANGES_BUTTON")," "),a(3),y(t.enableSaveAsDraft()?7:-1),a(),y(t.options().hideSubmitButton?-1:8),a(),y(!t.options().hideReportAsExceptionButton&&t.isReportExceptionAllowed()?9:-1)}}function ya(i,r){if(i&1&&(f(0),m(1,"translate")),i&2){let e=s(4);V(" ",X(1,1,"VS_EXTRACTION_RESULTS_UNCONFIRMED_REGULAR_AND_TABLE_FIELDS_DECIDE_MESSAGE",Le(4,sa,e.numberOfUnconfirmedRegularValues(),e.numberOfUnconfirmedTableValues()))," ")}}function Ta(i,r){if(i&1&&(f(0),m(1,"translate")),i&2){let e=s(4);V(" ",X(1,1,"VS_EXTRACTION_RESULTS_UNCONFIRMED_REGULAR_FIELDS_DECIDE_MESSAGE",pe(4,da,e.numberOfUnconfirmedRegularValues()))," ")}}function Ma(i,r){if(i&1&&(f(0),m(1,"translate")),i&2){let e=s(4);V(" ",X(1,1,"VS_EXTRACTION_RESULTS_UNCONFIRMED_TABLE_FIELDS_DECIDE_MESSAGE",pe(4,ca,e.numberOfUnconfirmedTableValues()))," ")}}function ba(i,r){if(i&1){let e=b();l(0,"div",11)(1,"div",21)(2,"span"),S(3,ya,2,7)(4,Ta,2,6)(5,Ma,2,6),d(),l(6,"span",18),f(7," VS_EXTRACTION_RESULTS_UNCONFIRMED_FIELDS_CONTINUE_QUESTION "),d()(),l(8,"div",22)(9,"button",23),T("click",function(){g(e);let n=s(3);return v(n.onContinueAndSave())}),f(10),m(11,"translate"),d(),l(12,"button",24),T("click",function(){g(e);let n=s(3);return v(n.onCancelDecisionMode())}),f(13),m(14,"translate"),d()()()}if(i&2){let e=s(3);a(3),y(e.numberOfUnconfirmedRegularValues()>0&&e.numberOfUnconfirmedTableValues()>0?3:e.numberOfUnconfirmedRegularValues()>0?4:e.numberOfUnconfirmedTableValues()>0?5:-1),a(7),V(" ",_(11,3,"VS_EXTRACTION_RESULTS_CONTINUE_AND_SAVE_BUTTON")," "),a(3),V(" ",_(14,5,"VS_EXTRACTION_RESULTS_NO_CONTINUE_BUTTON")," ")}}function Va(i,r){if(i&1&&(l(0,"div",7),S(1,Sa,10,14,"div",10)(2,ba,15,7,"div",11),d()),i&2){let e=s(2);a(),y(e.isInDecidingMode()?2:1)}}function Ea(i,r){i&1&&(l(0,"div",8)(1,"span",25),f(2,"VS_EXTRACTION_RESULTS_READONLY_LABEL"),d()())}function Ia(i,r){if(i&1){let e=b();l(0,"form",1),T("submit",function(n){return g(e),v(n.preventDefault())}),l(1,"as-split",2)(2,"as-split-area",3)(3,"div",4),J(4,ma,2,5,null,null,pa),d()(),l(6,"as-split-area",5)(7,"ui-du-compact-business-rules",6),T("toggle",function(n){g(e);let o=s();return v(o.onBusinessRulesToggle(n))})("ruleClick",function(n){g(e);let o=s();return v(o.onBusinessRuleClick(n))}),d()()(),S(8,Va,3,1,"div",7)(9,Ea,3,0,"div",8),d()}if(i&2){let e=s(),t=C(0);E("data-testid","compact-fields-container_"+(t?"inline":"stacked")),a(),u("unit",e.businessRulesExpanded()?"percent":"pixel")("disabled",!e.businessRulesExpanded()),a(),u("size",e.businessRulesExpanded()?70:"*"),a(2),Z(e.fieldValuesToRender()),a(2),u("size",e.businessRulesExpanded()?30:38)("maxSize",70),a(2),y(e.readonly()?9:8)}}var sa,da,ca,pa,Da,Hs,Oa=le(()=>{Xt();R();pi();ti();oe();ke();ee();$();L();Fn();Oi();Rn();de();fe();He();St();Wi();vt();wn();Nn();An();Ue();gn();On();R();ti();Xt();oe();$();ke();L();Wi();Oi();sa=(i,r)=>({notConfirmedFields:i,notConfirmedTables:r}),da=i=>({notConfirmedFields:i}),ca=i=>({notConfirmedTables:i}),pa=(i,r)=>r.id;Da=550,Hs=(()=>{class i{_destroyRef=x(It);_configurationManagerService=x(ge);_taxonomyManagerService=x(lt);_extractionManagerService=x(W);_rulesManagerService=x(st);_vsKeyboardShortcutsService=x(Q);_businessTelemetryService=x(Xi);_errorService=x(Hi);_snackBarService=x(Ei);_translateService=x(Je);_extractionValidationService=x(ve);_externalInteractions=x(Gi);_dialogService=x(Li);readonly=M(!1);enableSaveAsDraft=M(!1);options=M({});businessRulesExpanded=G(!1);SavingState=Me;isReportExceptionAllowed=c(()=>this._configurationManagerService.globalCustomizations().isReportExceptionAllowed);isSaving=c(()=>this._extractionManagerService.status().saving);saveMode=G(Me.ASDRAFT);shouldInlineFieldsForm=G(null);isInDecidingMode=G(!1);isFormattingDerivedParts=c(()=>Object.values(this._extractionManagerService.formattingDerivedPartsPerValueMap()).some(ht));hasInvalidRules=this._rulesManagerService.hasInvalidRules;canSave=c(()=>![this.isFormattingDerivedParts(),this.isInDecidingMode(),this.isSaving(),this.readonly()].some(ht));canDiscardChanges=c(()=>!this.isSaving()&&!this.readonly()&&this._extractionManagerService.hasHistory());hasUnconfirmedValues=c(()=>this._extractionManagerService.entities().some(e=>e.confirmationStatus!==z.Confirmed));numberOfUnconfirmedRegularValues=c(()=>this._extractionManagerService.navigableFieldValueIds().map(e=>this._extractionManagerService.getById(e)).filter(e=>e.type!==H.Table&&e.confirmationStatus!==z.Confirmed).length);numberOfUnconfirmedTableValues=c(()=>this._extractionManagerService.navigableFieldValueIds().map(e=>this._extractionManagerService.getById(e)).filter(e=>e.type===H.Table&&e.confirmationStatus!==z.Confirmed).length);moveToNextShortcut=c(()=>this._vsKeyboardShortcutsService.fields()?.moveToNext);moveToPreviousShortcut=c(()=>this._vsKeyboardShortcutsService.fields()?.moveToPrevious);saveExtractionResultsShortcut=c(()=>this.readonly()?void 0:this._vsKeyboardShortcutsService.general()?.saveExtractionResults);discardChangesShortcut=c(()=>this.readonly()?void 0:this._vsKeyboardShortcutsService.general()?.discardChanges);reportDocumentAsExceptionShortcut=c(()=>this.readonly()?void 0:this._vsKeyboardShortcutsService.general()?.reportDocumentAsException);saveUnconfirmedDataShortcut=c(()=>!this.readonly()&&this.isInDecidingMode()?this._vsKeyboardShortcutsService.general()?.saveUnconfirmedData:void 0);cancelSaveUnconfirmedDataShortcut=c(()=>!this.readonly()&&this.isInDecidingMode()?this._vsKeyboardShortcutsService.general()?.cancelSaveUnconfirmedData:void 0);saveAsDraftExtractionResultsShortcut=c(()=>!this.readonly()&&this.enableSaveAsDraft()?this._vsKeyboardShortcutsService.general()?.saveAsDraftExtractionResults:void 0);documentTypeTaxonomy=c(()=>{let e=this._extractionManagerService.selectedDocumentTypeId();return e?this._taxonomyManagerService.getById(e):null});shouldHideDocumentTypeField=c(()=>!!this.options().hideDocumentTypeField);fieldValuesToRender=c(()=>{let e=this._extractionManagerService.selectedDocumentTypeId();if(!e)return[];let t=this.shouldHideDocumentTypeField(),n=this._extractionManagerService.getById(e),o=this._extractionManagerService.entities().filter(p=>p.parentId===e).filter(rt);return[...t?[]:[n],...o]});_resizeObserver=new ResizeObserver(Ti(([e])=>this._handleResize(e),10));_hostElement=x(Ne).nativeElement;_saveResult$=ci(this._extractionManagerService.status).pipe(Vt(),Ee(([e,t])=>e.saving&&(t.saved||!!t.saveError)),gt(([,e])=>e.saveError??Si(!0)));_saveResult=Be(this._saveResult$);constructor(){ue(e=>{let t=this._registerHotKeys();e(()=>t?.unsubscribe())}),ue(()=>{let e=this._saveResult();if(e?.isSuccess)this._showSaveSuccessMessage();else if(e?.hasErrors){let t=e.errorMessageKey?this._translateService.instant(e.errorMessageKey,e.errorMessageParams):e.errorMessage;this._businessTelemetryService.submitErrorEvent(0,t)}})}ngOnInit(){this._externalInteractions.save$.pipe(Et(e=>this._onExternalSave(!e)),xt(this._destroyRef)).subscribe(e=>this._externalInteractions.saveResult$.next(e)),this._attachResizeObserver()}ngOnDestroy(){this._resizeObserver.disconnect()}onBusinessRulesToggle(e){this.businessRulesExpanded.set(e)}onBusinessRuleClick(e){let t=this._taxonomyManagerService.fieldIdToParentFieldIdDictionary()[e.fieldId];if(t){let p=this._extractionManagerService.entities().filter(rt).find(te=>te.fieldId===t&&te.type!==H.Field);if(!p)return;if(e.fieldValueIndex<0){this._extractionManagerService.setSelectedValue(p.id);return}let h=p.valueIds[e.fieldValueIndex],I=this._extractionManagerService.getById(h).valueIds.map(te=>this._extractionManagerService.getById(te)).find(te=>te.fieldId===e.fieldId),re=I?.valueIds[0]??I?.id;re&&this._extractionManagerService.setSelectedValue(re);return}let n=this._extractionManagerService.entities().filter(rt).find(p=>p.fieldId===e.fieldId),o=e.fieldValueIndex>=0?n?.valueIds[e.fieldValueIndex]:n?.id;o&&this._extractionManagerService.setSelectedValue(o)}onSave(){this.saveMode.set(Me.ASDRAFT),this.canSave()&&this._extractionManagerService.save(!0)}onSubmit(){if(this.saveMode.set(Me.SUBMIT),!!this.canSave()&&this._validateFieldsForm()){if(this.hasUnconfirmedValues()){this.isInDecidingMode.set(!0);return}if(this.hasInvalidRules()){this._showInvalidBusinessRuleErrorMessage(!0);return}this._extractionManagerService.save(!1)}}onCancelDecisionMode(){this.isInDecidingMode.set(!1)}onContinueAndSave(){this.isInDecidingMode.set(!1),this.canSave()&&(this._extractionManagerService.confirmAll(),this.onSubmit())}onReportException(){if(this.readonly())return;let e=this._taxonomyManagerService.reportAsExceptionReasons(),t=this._dialogService.openReportAsExceptionDialog(e);t&&t.afterClosed().pipe(qe(1),Ee(n=>!!n&&n.result)).subscribe(n=>this._extractionManagerService.reportAsException(n?.message))}onDiscardChanges(){if(!this.canDiscardChanges())return;let e=this._dialogService.openDiscardChangesDialog();e&&e.afterClosed().pipe(qe(1),Ee(t=>!!t&&t.result)).subscribe(()=>{this._extractionManagerService.discardAllChanges()})}_onExternalSave(e){return this.saveMode.set(e?Me.ASDRAFT:Me.SUBMIT),this.isSaving()?Ve({success:!1,error:"Saving is already in progress."}):this.readonly()?Ve({success:!1,error:"Saving is disabled in readonly mode."}):this.isFormattingDerivedParts()?Ve({success:!1,error:"Values are formatting. Try saving again."}):!e&&this.hasInvalidRules()?Ve({success:!1,error:"There are invalid business rules."}):!e&&!this._validateFieldsForm()?Ve({success:!1,error:"There are invalid values in the form."}):(e||this._extractionManagerService.confirmAll(),this._extractionManagerService.save(e),this._saveResult$.pipe(gt(t=>({success:t.isSuccess,error:t.errorMessageKey??t.errorMessage})),xt(this._destroyRef),qe(1)))}_showSaveSuccessMessage=()=>{let e=this._translateService.instant("VS_EXTRACTION_RESULTS_SAVE_SUCCESS_MESSAGE");this._snackBarService.success(e)};_showSaveErrorMessage=e=>{let n=e.details??e.message;this._snackBarService.error(n,{duration:0})};_showInvalidBusinessRuleErrorMessage(e){if(!e)return;let t=this._translateService.instant("VS_SAVE_BUSINESS_RULES_VALIDATION_ERROR");this._showSaveErrorMessage({message:t})}_validateFieldsForm(){let e=this._extractionValidationService.invalidPrimaryValues()[0];return e?(this._extractionManagerService.setSelectedValue(e.value.id),!1):!0}_registerHotKeys(){let e=this.moveToNextShortcut(),t=this.moveToPreviousShortcut(),n=this.saveExtractionResultsShortcut(),o=this.discardChangesShortcut(),p=this.reportDocumentAsExceptionShortcut(),h=this.saveUnconfirmedDataShortcut(),I=this.cancelSaveUnconfirmedDataShortcut(),re=this.saveAsDraftExtractionResultsShortcut(),te=[e,t,n,o,p,h,I,re].filter(Te);return this._vsKeyboardShortcutsService.listen$(te).subscribe(Pn=>{switch(Pn.shortcut){case e:this._extractionManagerService.navigateToNextValue(!this.readonly());break;case t:this._extractionManagerService.navigateToPreviousValue(!this.readonly());break;case n:this.onSubmit();break;case o:this.onDiscardChanges();break;case p:this.onReportException();break;case h:this.onContinueAndSave();break;case I:this.onCancelDecisionMode();break;case re:this.onSave();break;default:break}})}_attachResizeObserver(){this._resizeObserver.observe(this._hostElement)}_handleResize(e){let t=e.contentRect.width,n=this.shouldInlineFieldsForm(),o=t>=Da;n!==o&&this.shouldInlineFieldsForm.set(o)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=U({type:i,selectors:[["ui-du-compact-fields-form"]],inputs:{readonly:[1,"readonly"],enableSaveAsDraft:[1,"enableSaveAsDraft"],options:[1,"options"]},decls:2,vars:2,consts:[["tabindex","0",1,"compact-fields-form"],["tabindex","0",1,"compact-fields-form",3,"submit"],["direction","vertical",1,"form-content",3,"unit","disabled"],[1,"fields-split-area",3,"size"],["cdkScrollable","","data-testid","compact-fields",1,"compact-fields"],[3,"size","maxSize"],[1,"compact-business-rules",3,"toggle","ruleClick"],[1,"footer"],[1,"footer","readonly"],[3,"field","readonly","inlineValues"],[1,"buttons"],["data-testid","decide-unconfirmed-fields",1,"decide-unconfirmed-fields"],["mat-button","","data-testid","btn-discard-changes",1,"discard","btn-small",3,"click","matTooltip","disabled"],[1,"save-buttons"],["ui-progress-button","","mat-stroked-button","","color","secondary","data-testid","save-as-draft-button",1,"save-as-draft","btn-small",3,"matTooltip","disabled","progressButtonLoading"],[3,"matTooltip"],["mat-flat-button","","data-testid","report-exception-button","color","warn",1,"report","btn-small",3,"matTooltip","disabled"],["ui-progress-button","","mat-stroked-button","","color","secondary","data-testid","save-as-draft-button",1,"save-as-draft","btn-small",3,"click","matTooltip","disabled","progressButtonLoading"],["translate",""],["ui-progress-button","","mat-flat-button","","color","primary","data-testid","save-button","type","button",1,"save","btn-small",3,"click","matTooltip","disabled","progressButtonLoading"],["mat-flat-button","","data-testid","report-exception-button","color","warn",1,"report","btn-small",3,"click","matTooltip","disabled"],["data-testid","decide-message",1,"decide-message"],[1,"decide-buttons"],["mat-flat-button","","color","primary","data-testid","continue-and-save",1,"btn-small",3,"click"],["mat-flat-button","","color","warn","data-testid","cancel-save",1,"btn-small",3,"click"],["data-testid","readonly-label","translate","",1,"readonly-label"]],template:function(t,n){if(t&1&&(P(0),S(1,Ia,10,7,"form",0)),t&2){let o=O(n.shouldInlineFieldsForm());a(),y(o!==null?1:-1)}},dependencies:[ei,Zt,Jt,jt,Wt,Y,ne,Ye,q,K,et,Oe,A,Ze,zi,qi,$i,Di,Ii,Dn,_n,N,me],styles:[".compact-fields-form[_ngcontent-%COMP%]{height:100%;position:relative;display:flex;flex-direction:column}.compact-fields-form[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%]{flex-grow:1}.compact-fields-form[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%] .fields-split-area[_ngcontent-%COMP%]{overflow:hidden}.compact-fields-form[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%] .fields-split-area[_ngcontent-%COMP%] .compact-fields[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;flex-direction:column;height:100%;overflow:auto}.compact-fields-form[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;flex-wrap:wrap;border-top-width:1.2px;border-top-style:solid;padding:10px 20px}.compact-fields-form[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .ui-select[_ngcontent-%COMP%] .mat-mdc-form-field[_ngcontent-%COMP%]{font-size:14px;max-width:85px}.compact-fields-form[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;flex-grow:1;justify-content:flex-end;gap:10px;align-items:center}.compact-fields-form[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .report[_ngcontent-%COMP%]{min-width:37px}.compact-fields-form[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .save-buttons[_ngcontent-%COMP%]{display:flex;gap:10px}.compact-fields-form[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .save-buttons[_ngcontent-%COMP%] .save[_ngcontent-%COMP%], .compact-fields-form[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .save-buttons[_ngcontent-%COMP%] .save-as-draft[_ngcontent-%COMP%]{min-width:95px}.compact-fields-form[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .decide-unconfirmed-fields[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;width:100%}.compact-fields-form[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .decide-unconfirmed-fields[_ngcontent-%COMP%] .decide-message[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-grow:1;align-items:flex-end;margin-right:20px;text-align:right}.compact-fields-form[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .decide-unconfirmed-fields[_ngcontent-%COMP%] .decide-message[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:first-child{font-size:10px}.compact-fields-form[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .decide-unconfirmed-fields[_ngcontent-%COMP%] .decide-message[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:nth-child(2){font-size:12px}.compact-fields-form[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .decide-unconfirmed-fields[_ngcontent-%COMP%] .decide-buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center}.compact-fields-form[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .decide-unconfirmed-fields[_ngcontent-%COMP%] .decide-buttons[_ngcontent-%COMP%] .mat-mdc-unelevated-button[_ngcontent-%COMP%]:nth-child(2){margin-left:10px}.compact-fields-form[_ngcontent-%COMP%] .footer.readonly[_ngcontent-%COMP%] .readonly-label[_ngcontent-%COMP%]{height:24px;flex-grow:1;text-align:center}"],changeDetection:0})}return i})()});Oa();export{Hs as UiCompactFieldsFormComponent};
package/index.html CHANGED
@@ -11,6 +11,6 @@
11
11
 
12
12
  <body class="apollo-design light">
13
13
  <ui-du-validation-station-wc-element id="du-vs-wc"></ui-du-validation-station-wc-element>
14
- <link rel="modulepreload" href="chunk-35GSIIPT.js"><link rel="modulepreload" href="chunk-YWO5KYCW.js"><link rel="modulepreload" href="chunk-ZCYTIBW4.js"><link rel="modulepreload" href="chunk-TYL6NO3L.js"><link rel="modulepreload" href="chunk-ZOBGFIAP.js"><link rel="modulepreload" href="chunk-7LF7TUYR.js"><link rel="modulepreload" href="chunk-QSPXPEUM.js"><link rel="modulepreload" href="chunk-MHF6VH7J.js"><link rel="modulepreload" href="chunk-OC2CZ3QN.js"><link rel="modulepreload" href="chunk-S75KSQCC.js"><script src="polyfills.js" type="module"></script><script src="main.js" type="module"></script></body>
14
+ <link rel="modulepreload" href="chunk-4RC3DPEI.js"><link rel="modulepreload" href="chunk-OCUVVNK2.js"><link rel="modulepreload" href="chunk-6AEFIYR5.js"><link rel="modulepreload" href="chunk-5LGMGLPM.js"><link rel="modulepreload" href="chunk-ZOBGFIAP.js"><link rel="modulepreload" href="chunk-7LF7TUYR.js"><link rel="modulepreload" href="chunk-QSPXPEUM.js"><link rel="modulepreload" href="chunk-MHF6VH7J.js"><link rel="modulepreload" href="chunk-OC2CZ3QN.js"><link rel="modulepreload" href="chunk-S75KSQCC.js"><script src="polyfills.js" type="module"></script><script src="main.js" type="module"></script></body>
15
15
 
16
16
  </html>