@qaecy/cue-ui 0.0.47 → 0.0.48

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
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[673],{5903(j,z,r){r.d(z,{L:()=>Ae});var c=r(7705),a=r(5802),g=r(2271),k=r(4853),F=r(9495),s=r(467),h=r(9352),_=r(5745),v=r(5381),x=r(5971),y=r(2245),w=r(9421),P=r(8957),R=r(5448),V=r(2444),m=r(9417),C=r(7374),d=r.n(C),M=r(3319),e=r(5547);const H=(o,u)=>u.date;function $(o,u){if(1&o&&(e.j41(0,"cue-typography",11),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o){const t=u.$implicit,i=e.XpG();e.Y8G("size",i.size()),e.R7$(),e.JRh(e.bMT(2,2,t))}}function L(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-button",13),e.bIt("click",function(){const n=a.eBV(t).$implicit,l=e.XpG();return a.Njj(l.selectDay(n))}),e.j41(1,"cue-button-label"),e.EFF(2),e.k0s()()}if(2&o){const t=u.$implicit,i=e.XpG();e.AVh("other-month",!t.isCurrentMonth)("today",t.isToday),e.Y8G("selected",t.isSelected)("size",i.size()),e.R7$(2),e.JRh(t.day)}}let X=(()=>{class o{date=c.geq.required();size=(0,c.hFB)("m");weekdays=["mon","tue","wed","thu","fri","sat","sun"].map(t=>`common.weekdaysShort.${t}`);yearOptions=Array.from({length:101},(t,i)=>(d()().year()-50+i).toString()).reverse();monthOptions=Array.from({length:12},(t,i)=>(i+1).toString());chevronSize=(0,g.EW)(()=>{const t=this.size();return"l"===t?"m":"m"===t?"s":"s"===t?"xs":"s"});monthLabels={1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"};today=(0,g.EW)(()=>d()().format("YYYY-MM-DD"));calendarDays=(0,g.EW)(()=>{const t=this.year(),i=this.month(),n=d()(this.date()),l=this.today(),p=d()(`${t}-${i}-01`),f=p.endOf("month"),O=0===p.day()?p.subtract(6,"day"):p.subtract(p.day()-1,"day"),E=0===f.day()?f:f.add(7-f.day(),"day"),D=[];let b=O;for(;b.isBefore(E)||b.isSame(E);){const A=b.format("YYYY-MM-DD");D.push({date:A,day:b.date(),isCurrentMonth:b.month()+1===i,isSelected:b.isSame(n,"day"),isToday:A===l,dayjs:b}),b=b.add(1,"day")}return D});jsDate=(0,g.EW)(()=>d()(this.date()));year=(0,g.uu)(()=>this.jsDate().year());month=(0,g.uu)(()=>this.jsDate().month()+1);day=(0,g.uu)(()=>this.jsDate().date());updateDate(){const t=d()(new Date(this.year(),this.month()-1,this.day())).format("YYYY-MM-DD");this.date.set(t)}navigateMonth(t="next"){const i=d()(this.date()),n="next"===t?i.add(1,"month"):i.subtract(1,"month");this.date.set(n.format("YYYY-MM-DD"))}navigateYear(t="next"){const i=d()(this.date()),n="next"===t?i.add(1,"year"):i.subtract(1,"year");this.date.set(n.format("YYYY-MM-DD"))}selectDay(t){this.date.set(t.date),t.isCurrentMonth||(this.year.set(t.dayjs.year()),this.month.set(t.dayjs.month()+1))}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-datepicker"]],inputs:{date:[1,"date"],size:[1,"size"]},outputs:{date:"dateChange"},decls:17,vars:10,consts:[["direction","column"],["gap","m","justify","center","align","center",2,"width","100%"],["variant","ghost",3,"size"],["icon","paginator-first",3,"click"],["icon","paginator-back",3,"click"],["justify","center",2,"width","200px"],["label","Month",3,"valueChange","size","options","labelMap","value"],["label","Year",3,"valueChange","size","options","value"],["icon","paginator-next",3,"click"],["icon","paginator-last",3,"click"],[1,"calendar-grid"],[3,"size"],["variant","ghost",3,"other-month","today","selected","size"],["variant","ghost",3,"click","selected","size"]],template:function(i,n){1&i&&(e.j41(0,"cue-flexcontainer",0)(1,"cue-flexcontainer",1)(2,"cue-button",2)(3,"cue-button-icon",3),e.bIt("click",function(){return n.navigateYear("prev")}),e.k0s(),e.j41(4,"cue-button-icon",4),e.bIt("click",function(){return n.navigateMonth("prev")}),e.k0s()(),e.j41(5,"cue-flexcontainer",5)(6,"cue-select",6),e.mxI("valueChange",function(p){return e.DH7(n.month,p)||(n.month=p),p}),e.bIt("valueChange",function(){return n.updateDate()}),e.k0s(),e.j41(7,"cue-select",7),e.mxI("valueChange",function(p){return e.DH7(n.year,p)||(n.year=p),p}),e.bIt("valueChange",function(){return n.updateDate()}),e.k0s()(),e.j41(8,"cue-button",2)(9,"cue-button-icon",8),e.bIt("click",function(){return n.navigateMonth("next")}),e.k0s()(),e.j41(10,"cue-button",2)(11,"cue-button-icon",9),e.bIt("click",function(){return n.navigateYear("next")}),e.k0s()()(),e.j41(12,"div",10),e.Z7z(13,$,3,4,"cue-typography",11,e.Vm6),e.Z7z(15,L,3,7,"cue-button",12,H),e.k0s()()),2&i&&(e.R7$(2),e.Y8G("size",n.chevronSize()),e.R7$(4),e.Y8G("size",n.size())("options",n.monthOptions)("labelMap",n.monthLabels),e.R50("value",n.month),e.R7$(),e.Y8G("size",n.size())("options",n.yearOptions),e.R50("value",n.year),e.R7$(),e.Y8G("size",n.chevronSize()),e.R7$(2),e.Y8G("size",n.chevronSize()),e.R7$(3),e.Dyx(n.weekdays),e.R7$(2),e.Dyx(n.calendarDays()))},dependencies:[v.n,V.l,x.$,R.L,y.Typography,M.a,h.Kj],styles:[".calendar-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;margin-top:12px}.other-month[_ngcontent-%COMP%]{opacity:.4}"],changeDetection:0})}return o})();var W=r(7023),K=r(5187);const Q=["inputField"];function J(o,u){1&o&&e.EFF(0," * ")}function U(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-card",8)(1,"cue-datepicker",9),e.mxI("dateChange",function(n){a.eBV(t);const l=e.XpG();return e.DH7(l.internalDateValue,n)||(l.internalDateValue=n),a.Njj(n)}),e.bIt("dateChange",function(n){a.eBV(t);const l=e.XpG();return a.Njj(l.onDateChange(n))})("click",function(n){return n.stopPropagation()}),e.k0s()()}if(2&o){const t=e.XpG();e.R7$(),e.R50("date",t.internalDateValue)}}function Z(o,u){if(1&o&&(e.j41(0,"cue-typography",7),e.EFF(1),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.JRh(t.error())}}let q=(()=>{class o{value=(0,c.geq)("");label=(0,c.hFB)("");placeholder=(0,c.hFB)("");error=(0,c.hFB)(void 0);required=(0,c.hFB)(!1);size=(0,c.hFB)("m");datePickerPositioning=(0,c.hFB)(void 0);isFocused=!1;disabled=!1;iconSize=(0,g.EW)(()=>{switch(this.size()){case"l":return"m";case"m":default:return"s";case"s":case"xs":return"xs"}});contextMenuRef=null;inputField;internalDateValue=(0,g.uu)(()=>{const t=this.value();if(t){if(d()(t,"YYYY-MM-DD",!0).isValid())return t;const i=d()(t);return i.isValid()?i.format("YYYY-MM-DD"):d()().format("YYYY-MM-DD")}return d()().format("YYYY-MM-DD")});formattedDateValue=(0,g.EW)(()=>{const t=this.value();if(t){const i=d()(t);return i.isValid()?i.format("MMM D, YYYY"):t}return""});onValueChange=(0,a.QZP)(()=>this.valueChange.emit(this.value()));valueChange=(0,c.CGW)();onChange=t=>{};onTouched=()=>{};writeValue(t){this.value.set(t||"")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}emitValue(t){const i=t.target.value;this.value.set(i),this.onChange(i)}focus(){this.isFocused=!0,this.inputField?.nativeElement&&this.inputField.nativeElement.focus()}onBlur(){this.isFocused=!1,this.onTouched()}onDateChange(t){this.value.set(t),this.onChange(t)}onDatePickerOpen(t){this.contextMenuRef=t}onDatePickerClose(){this.contextMenuRef=null}closeDatePicker(){this.contextMenuRef&&document.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-input-date"]],viewQuery:function(i,n){if(1&i&&e.GBs(Q,5),2&i){let l;e.mGM(l=e.lsd())&&(n.inputField=l.first)}},inputs:{value:[1,"value"],label:[1,"label"],placeholder:[1,"placeholder"],error:[1,"error"],required:[1,"required"],size:[1,"size"],datePickerPositioning:[1,"datePickerPositioning"]},outputs:{value:"valueChange",valueChange:"valueChange"},features:[e.Jv_([{provide:m.kq,useExisting:(0,a.Rfq)(()=>o),multi:!0}])],decls:11,vars:15,consts:[["inputField",""],["datePickerTemplate",""],[1,"form-field"],["size","s",1,"label"],["type","text","readonly","","trigger","leftclick",1,"input",3,"focus","blur","contextMenuOpen","contextMenuClose","value","placeholder","disabled","cueContextMenu","positioning"],["variant","ghost","trigger","leftclick",1,"calendar-button",3,"size","cueContextMenu","positioning"],["icon","calendar"],["size","s",1,"error-text"],[1,"date-picker-overlay","clickoutside-ignore"],["size","s",1,"clickoutside-ignore",3,"dateChange","click","date"]],template:function(i,n){if(1&i&&(e.j41(0,"div",2)(1,"cue-typography",3),e.EFF(2),e.nVh(3,J,1,0),e.k0s(),e.j41(4,"input",4,0),e.bIt("focus",function(){return n.isFocused=!0})("blur",function(){return n.onBlur()})("contextMenuOpen",function(p){return n.onDatePickerOpen(p)})("contextMenuClose",function(){return n.onDatePickerClose()}),e.k0s(),e.j41(6,"cue-button",5),e.nrm(7,"cue-button-icon",6),e.k0s(),e.DNE(8,U,2,1,"ng-template",null,1,e.C5r),e.nVh(10,Z,2,1,"cue-typography",7),e.k0s()),2&i){const l=e.sdS(9);e.HbH("size-"+n.size()),e.AVh("focused",n.isFocused||n.value()),e.R7$(2),e.SpI(" ",n.label()," "),e.R7$(),e.vxM(n.required()?3:-1),e.R7$(),e.Y8G("value",n.formattedDateValue())("placeholder",n.placeholder())("disabled",n.disabled)("cueContextMenu",l)("positioning",n.datePickerPositioning()??"bottomright"),e.R7$(2),e.Y8G("size",n.iconSize())("cueContextMenu",l)("positioning",n.datePickerPositioning()??"bottomright"),e.R7$(4),e.vxM(n.error()?10:-1)}},dependencies:[y.Typography,X,W.Q,K.Z,M.a,x.$],styles:['.form-field[_ngcontent-%COMP%]{position:relative}.input[_ngcontent-%COMP%]{color:var(--cue-input-value-color);width:100%;border:none;border-bottom:1px solid var(--cue-input-border-bottom-color);background:none;outline:none;font-family:var(--cue-font-family)}.size-xs[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-xs-padding);font-size:var(--cue-input-xs-font-size)}.size-s[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-s-padding);font-size:var(--cue-input-s-font-size)}.size-m[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-m-padding);font-size:var(--cue-input-m-font-size)}.size-l[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-l-padding);font-size:var(--cue-input-l-font-size)}.input[_ngcontent-%COMP%]::placeholder{color:var(--cue-input-placeholder-color);font-family:var(--cue-font-family)}.input[_ngcontent-%COMP%]:-webkit-autofill, .input[_ngcontent-%COMP%]:-webkit-autofill:hover, .input[_ngcontent-%COMP%]:-webkit-autofill:focus{-webkit-box-shadow:0 0 0px 1000px transparent inset;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;-webkit-text-fill-color:var(--cue-input-value-color)}.label[_ngcontent-%COMP%]{position:absolute;pointer-events:none;transition:all .2s ease}.size-xs[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-top);left:var(--cue-input-xs-label-left)}.size-s[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-top);left:var(--cue-input-s-label-left)}.size-m[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-top);left:var(--cue-input-m-label-left)}.size-l[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-top);left:var(--cue-input-l-label-left)}.form-field.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{color:var(--cue-input-value-color)}.size-xs.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-focused-top);font-size:var(--cue-input-xs-label-focused-font-size)}.size-s.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-focused-top);font-size:var(--cue-input-s-label-focused-font-size)}.size-m.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-focused-top);font-size:var(--cue-input-m-label-focused-font-size)}.size-l.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-focused-top);font-size:var(--cue-input-l-label-focused-font-size)}.underline[_ngcontent-%COMP%]{content:"";position:absolute;bottom:0;left:0;height:1px;width:0;background-color:var(--cue-input-border-bottom-color);transition:width .3s ease}.form-field.focused[_ngcontent-%COMP%] .underline[_ngcontent-%COMP%]{width:100%}.error-text[_ngcontent-%COMP%]{color:var(--cue-error);margin-top:4px;min-height:18px}.date-picker-overlay[_ngcontent-%COMP%]{box-shadow:0 4px 12px #00000026;min-width:320px;position:relative;z-index:10001}.date-picker-overlay[_ngcontent-%COMP%] [_ngcontent-%COMP%]:deep(cue-menu){z-index:10002!important}.date-picker-overlay[_ngcontent-%COMP%] [_ngcontent-%COMP%]:deep(.clickoutside-ignore){pointer-events:auto}.calendar-button[_ngcontent-%COMP%]{position:absolute;right:8px;top:50%;transform:translateY(-50%);z-index:10;opacity:.7;transition:opacity .2s ease}.calendar-button[_ngcontent-%COMP%]:hover{opacity:1}.input[_ngcontent-%COMP%]{padding-right:40px;box-sizing:border-box}.form-field[_ngcontent-%COMP%]{width:100%;max-width:none;box-sizing:border-box}'],changeDetection:0})}return o})();var ee=r(9695),N=r(1413),te=r(7421),ne=r(3293),I=r(7384),ie=r(3798);let oe=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(i,n){},styles:["textarea.cdk-textarea-autosize {\n resize: none;\n}\n\ntextarea.cdk-textarea-autosize-measuring {\n padding: 2px 0 !important;\n box-sizing: content-box !important;\n height: auto !important;\n overflow: hidden !important;\n}\n\ntextarea.cdk-textarea-autosize-measuring-firefox {\n padding: 2px 0 !important;\n box-sizing: content-box !important;\n height: 0 !important;\n}\n\n@keyframes cdk-text-field-autofill-start { /*!*/ }\n@keyframes cdk-text-field-autofill-end { /*!*/ }\n.cdk-text-field-autofill-monitored:-webkit-autofill {\n animation: cdk-text-field-autofill-start 0s 1ms;\n}\n\n.cdk-text-field-autofill-monitored:not(:-webkit-autofill) {\n animation: cdk-text-field-autofill-end 0s 1ms;\n}\n"],encapsulation:2,changeDetection:0})}return o})(),le=(()=>{class o{_elementRef=(0,a.WQX)(e.aKT);_platform=(0,a.WQX)(te.O);_ngZone=(0,a.WQX)(a.SKi);_renderer=(0,a.WQX)(e.sFG);_resizeEvents=new N.B;_previousValue;_initialHeight;_destroyed=new N.B;_listenerCleanups;_minRows;_maxRows;_enabled=!0;_previousMinRows=-1;_textareaElement;get minRows(){return this._minRows}set minRows(t){this._minRows=(0,I.OE)(t),this._setMinHeight()}get maxRows(){return this._maxRows}set maxRows(t){this._maxRows=(0,I.OE)(t),this._setMaxHeight()}get enabled(){return this._enabled}set enabled(t){this._enabled!==t&&((this._enabled=t)?this.resizeToFitContent(!0):this.reset())}get placeholder(){return this._textareaElement.placeholder}set placeholder(t){this._cachedPlaceholderHeight=void 0,t?this._textareaElement.setAttribute("placeholder",t):this._textareaElement.removeAttribute("placeholder"),this._cacheTextareaPlaceholderHeight()}_cachedLineHeight;_cachedPlaceholderHeight;_document=(0,a.WQX)(a.qQL);_hasFocus=!1;_isViewInited=!1;constructor(){(0,a.WQX)(ne.l).load(oe),this._textareaElement=this._elementRef.nativeElement}_setMinHeight(){const t=this.minRows&&this._cachedLineHeight?this.minRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.minHeight=t)}_setMaxHeight(){const t=this.maxRows&&this._cachedLineHeight?this.maxRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.maxHeight=t)}ngAfterViewInit(){this._platform.isBrowser&&(this._initialHeight=this._textareaElement.style.height,this.resizeToFitContent(),this._ngZone.runOutsideAngular(()=>{this._listenerCleanups=[this._renderer.listen("window","resize",()=>this._resizeEvents.next()),this._renderer.listen(this._textareaElement,"focus",this._handleFocusEvent),this._renderer.listen(this._textareaElement,"blur",this._handleFocusEvent)],this._resizeEvents.pipe((0,ie.Z)(16)).subscribe(()=>{this._cachedLineHeight=this._cachedPlaceholderHeight=void 0,this.resizeToFitContent(!0)})}),this._isViewInited=!0,this.resizeToFitContent(!0))}ngOnDestroy(){this._listenerCleanups?.forEach(t=>t()),this._resizeEvents.complete(),this._destroyed.next(),this._destroyed.complete()}_cacheTextareaLineHeight(){if(this._cachedLineHeight)return;const t=this._textareaElement.cloneNode(!1),i=t.style;t.rows=1,i.position="absolute",i.visibility="hidden",i.border="none",i.padding="0",i.height="",i.minHeight="",i.maxHeight="",i.top=i.bottom=i.left=i.right="auto",i.overflow="hidden",this._textareaElement.parentNode.appendChild(t),this._cachedLineHeight=t.clientHeight,t.remove(),this._setMinHeight(),this._setMaxHeight()}_measureScrollHeight(){const t=this._textareaElement,i=t.style.marginBottom||"",l=this._hasFocus,p=this._platform.FIREFOX?"cdk-textarea-autosize-measuring-firefox":"cdk-textarea-autosize-measuring";l&&(t.style.marginBottom=`${t.clientHeight}px`),t.classList.add(p);const f=t.scrollHeight-4;return t.classList.remove(p),l&&(t.style.marginBottom=i),f}_cacheTextareaPlaceholderHeight(){if(!this._isViewInited||null!=this._cachedPlaceholderHeight)return;if(!this.placeholder)return void(this._cachedPlaceholderHeight=0);const t=this._textareaElement.value;this._textareaElement.value=this._textareaElement.placeholder,this._cachedPlaceholderHeight=this._measureScrollHeight(),this._textareaElement.value=t}_handleFocusEvent=t=>{this._hasFocus="focus"===t.type};ngDoCheck(){this._platform.isBrowser&&this.resizeToFitContent()}resizeToFitContent(t=!1){if(!this._enabled||(this._cacheTextareaLineHeight(),this._cacheTextareaPlaceholderHeight(),!this._cachedLineHeight))return;const i=this._elementRef.nativeElement,n=i.value;if(!t&&this._minRows===this._previousMinRows&&n===this._previousValue)return;const l=this._measureScrollHeight(),p=Math.max(l,this._cachedPlaceholderHeight||0);i.style.height=`${p}px`,this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame<"u"?requestAnimationFrame(()=>this._scrollToCaretPosition(i)):setTimeout(()=>this._scrollToCaretPosition(i))}),this._previousValue=n,this._previousMinRows=this._minRows}reset(){void 0!==this._initialHeight&&(this._textareaElement.style.height=this._initialHeight)}_noopInputHandler(){}_scrollToCaretPosition(t){const{selectionStart:i,selectionEnd:n}=t;!this._destroyed.isStopped&&this._hasFocus&&t.setSelectionRange(i,n)}static \u0275fac=function(i){return new(i||o)};static \u0275dir=e.FsC({type:o,selectors:[["textarea","cdkTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize"],hostBindings:function(i,n){1&i&&e.bIt("input",function(){return n._noopInputHandler()})},inputs:{minRows:[0,"cdkAutosizeMinRows","minRows"],maxRows:[0,"cdkAutosizeMaxRows","maxRows"],enabled:[2,"cdkTextareaAutosize","enabled",c.L39],placeholder:"placeholder"},exportAs:["cdkTextareaAutosize"]})}return o})(),ae=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e.$C({type:o});static \u0275inj=a.G2t({})}return o})();var G=r(29);const se=["inputField"];function ce(o,u){1&o&&e.EFF(0," * ")}function re(o,u){if(1&o&&(e.j41(0,"span",5),e.nrm(1,"cue-svg-icon",8),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.Y8G("name",t.icon())}}function ue(o,u){if(1&o&&(e.j41(0,"cue-typography",7),e.EFF(1),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.JRh(t.error())}}let de=(()=>{class o{value=(0,c.geq)("");_displayValue=(0,a.vPA)("");label=(0,c.hFB)("");info=(0,c.hFB)("");placeholder=(0,c.hFB)("");error=(0,c.hFB)(void 0);required=(0,c.hFB)(!1);icon=(0,c.hFB)(void 0);size=(0,c.hFB)("m");isFocused=!1;disabled=!1;inputField;valueChange=(0,c.CGW)();_syncDisplay=(0,a.QZP)(()=>{const t=this.value()||"";!this.isFocused&&t!==this._displayValue()&&this._displayValue.set(t)});onChange=t=>{};onTouched=()=>{};writeValue(t){const i=t||"";this.value.set(i),this.isFocused||this._displayValue.set(i)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}emitValue(t){const i=t.target.value;this.valueChange.emit(i),this.onChange(i)}focus(){this.isFocused=!0,this._displayValue.set(this.value()||""),this.inputField?.nativeElement&&this.inputField.nativeElement.focus()}onBlur(){this.isFocused=!1;const t=this.inputField?.nativeElement.value??this._displayValue();this._displayValue.set(t),this.onTouched()}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-input-multiline"]],viewQuery:function(i,n){if(1&i&&e.GBs(se,5),2&i){let l;e.mGM(l=e.lsd())&&(n.inputField=l.first)}},inputs:{value:[1,"value"],label:[1,"label"],info:[1,"info"],placeholder:[1,"placeholder"],error:[1,"error"],required:[1,"required"],icon:[1,"icon"],size:[1,"size"]},outputs:{value:"valueChange",valueChange:"valueChange"},features:[e.Jv_([{provide:m.kq,useExisting:(0,a.Rfq)(()=>o),multi:!0}])],decls:10,vars:14,consts:[["inputField",""],[1,"form-field"],["size","s",1,"label",3,"info"],[1,"input-container"],["align","center","gap","s"],[2,"height","12px"],["cdkTextareaAutosize","",1,"input","textarea",2,"resize","none","overflow","hidden",3,"input","focus","blur","cdkAutosizeMinRows","cdkAutosizeMaxRows","placeholder","value","disabled"],["size","s",1,"error-text"],[3,"name"]],template:function(i,n){1&i&&(e.j41(0,"div",1)(1,"cue-typography",2),e.EFF(2),e.nVh(3,ce,1,0),e.k0s(),e.j41(4,"div",3)(5,"cue-flexcontainer",4),e.nVh(6,re,2,1,"span",5),e.j41(7,"textarea",6,0),e.bIt("input",function(p){return n.emitValue(p)})("focus",function(){return n.isFocused=!0})("blur",function(){return n.onBlur()}),e.k0s()()(),e.nVh(9,ue,2,1,"cue-typography",7),e.k0s()),2&i&&(e.HbH("size-"+n.size()),e.AVh("focused",n.isFocused||n._displayValue()),e.R7$(),e.Y8G("info",n.info()),e.R7$(),e.SpI(" ",n.label()," "),e.R7$(),e.vxM(n.required()?3:-1),e.R7$(3),e.vxM(n.icon()?6:-1),e.R7$(),e.Y8G("cdkAutosizeMinRows",1)("cdkAutosizeMaxRows",8)("placeholder",n.placeholder())("value",n._displayValue())("disabled",n.disabled),e.R7$(2),e.vxM(n.error()?9:-1))},dependencies:[y.Typography,v.n,G.A,ae,le],styles:[".form-field[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column}.input-container[_ngcontent-%COMP%]{position:relative;z-index:2}.input.textarea[_ngcontent-%COMP%]{width:100%;min-height:32px;border:none;border-bottom:1px solid var(--cue-input-border-bottom-color);background:none;outline:none;font-family:var(--cue-font-family);resize:none;overflow:hidden;color:var(--cue-input-value-color);position:relative;z-index:2;padding-bottom:8px}.size-xs[_ngcontent-%COMP%] .input.textarea[_ngcontent-%COMP%]{padding:var(--cue-input-xs-padding);font-size:var(--cue-input-xs-font-size)}.size-s[_ngcontent-%COMP%] .input.textarea[_ngcontent-%COMP%]{padding:var(--cue-input-s-padding);font-size:var(--cue-input-s-font-size)}.size-m[_ngcontent-%COMP%] .input.textarea[_ngcontent-%COMP%]{padding:var(--cue-input-m-padding);font-size:var(--cue-input-m-font-size)}.size-l[_ngcontent-%COMP%] .input.textarea[_ngcontent-%COMP%]{padding:var(--cue-input-l-padding);font-size:var(--cue-input-l-font-size)}.input.textarea[_ngcontent-%COMP%]::placeholder{color:var(--cue-input-placeholder-color);font-family:var(--cue-font-family)}.input[_ngcontent-%COMP%]:-webkit-autofill, .input[_ngcontent-%COMP%]:-webkit-autofill:hover, .input[_ngcontent-%COMP%]:-webkit-autofill:focus{-webkit-box-shadow:0 0 0px 1000px transparent inset;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;-webkit-text-fill-color:var(--cue-input-value-color)}.label[_ngcontent-%COMP%]{position:absolute;pointer-events:none;transition:all .2s ease;z-index:1;padding:0 4px;left:0}.size-xs[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-top);left:var(--cue-input-xs-label-left)}.size-s[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-top);left:var(--cue-input-s-label-left)}.size-m[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-top);left:var(--cue-input-m-label-left)}.size-l[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-top);left:var(--cue-input-l-label-left)}.form-field.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--cue-input-value-color)}.size-xs.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-focused-top);font-size:var(--cue-input-xs-label-focused-font-size)}.size-s.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-focused-top);font-size:var(--cue-input-s-label-focused-font-size)}.size-m.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-focused-top);font-size:var(--cue-input-m-label-focused-font-size)}.size-l.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-focused-top);font-size:var(--cue-input-l-label-focused-font-size)}.error-text[_ngcontent-%COMP%]{color:var(--cue-error);margin-top:4px;min-height:18px}.form-field[_ngcontent-%COMP%]:not(.focused) .input-container[_ngcontent-%COMP%]{margin-top:24px}.form-field.focused[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{margin-top:12px}"],changeDetection:0})}return o})();var T=r(6117),pe=r(356),ge=r(6279),_e=r(1359),me=r(7851);function he(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-typography",11),e.bIt("click",function(){a.eBV(t);const n=e.XpG();return a.Njj(!n.disabled()&&n.openMenu())}),e.EFF(1),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("info",t.info()),e.R7$(),e.JRh(t.label())}}function fe(o,u){if(1&o&&e.nrm(0,"cue-svg-icon",12),2&o){const t=e.XpG();e.xc7("--cue-icon-width",t.iconSize()),e.Y8G("name",u)}}function ve(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input",13),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG();return e.DH7(l.filterValue,n)||(l.filterValue=n),a.Njj(n)}),e.k0s(),e.nrm(2,"div",14)}if(2&o){const t=e.XpG();e.R50("value",t.filterValue),e.Y8G("placeholder",e.bMT(1,2,"components.input.select.placeholderFilter"))}}function Me(o,u){1&o&&e.nrm(0,"cue-svg-icon",17),2&o&&e.Y8G("name",u)}function be(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-menu-item",15),e.bIt("click",function(n){const l=a.eBV(t).$implicit,p=e.XpG();return a.Njj(p.handleSelect(n,l.value))})("mousedown",function(n){a.eBV(t);const l=e.XpG();return a.Njj(l.preventEventBubbling(n))}),e.j41(1,"cue-checkbox",16),e.bIt("mousedown",function(n){a.eBV(t);const l=e.XpG();return a.Njj(l.preventEventBubbling(n))}),e.k0s(),e.nVh(2,Me,1,1,"cue-svg-icon",17),e.EFF(3),e.k0s()}if(2&o){let t;const i=u.$implicit,n=e.XpG();e.Y8G("size",n.size())("disabled",n.isFixedValue(i.value)&&n.isSelected(i.value))("selected",n.isSelected(i.value)),e.R7$(),e.Y8G("checked",n.isSelected(i.value))("disabled",n.isFixedValue(i.value)&&n.isSelected(i.value)),e.R7$(),e.vxM((t=n.icon(i.value))?2:-1,t),e.R7$(),e.SpI(" ",i.label," ")}}function Ce(o,u){if(1&o&&(e.j41(0,"cue-typography",10),e.EFF(1),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.JRh(t.error())}}let ye=(()=>{class o{label=(0,c.hFB)("");info=(0,c.hFB)("");placeholder=(0,c.hFB)(void 0);menuPosition=(0,c.hFB)(void 0);options=(0,c.hFB)();labelMap=(0,c.hFB)({});iconMap=(0,c.hFB)({});value=(0,c.geq)([]);fixedValues=(0,c.hFB)([]);size=(0,c.hFB)("xs");disabled=(0,c.hFB)(!1);showFilter=(0,c.hFB)(!1);underline=(0,c.hFB)(!0);error=(0,c.hFB)(void 0);maxHeight=(0,c.hFB)(void 0);loading=(0,c.hFB)(!1);optionLabels=(0,g.EW)(()=>{const t=this.labelMap();return(this.options()??[]).map(n=>t[n]?t[n]:n.toString())});_multiSelectCount=(0,g.EW)(()=>(this.value()||[]).length);_multiSelectTranslated=(0,h.Xx)("components.input.multiSelect.itemsSelected",(0,g.EW)(()=>({count:this._multiSelectCount()})));_defaultPlaceholder=(0,h.Xx)("components.input.multiSelect.placeholderSelect");_placeholder=(0,g.EW)(()=>this.placeholder()??this._defaultPlaceholder());valueLabel=(0,g.EW)(()=>{const t=this.labelMap(),i=this.value()||[],n=this._multiSelectTranslated();let l;if(0===i.length)l="";else if(1===i.length){const p=i[0];l=t[p]?t[p]:p.toString()}else l=n;return l});menuIsOpen=(0,a.vPA)(void 0);filterInputEl=(0,c.ebz)(P.p);menuEl=(0,c.ebz)(T.W);filterValue=(0,a.vPA)("");optionsFiltered=(0,g.EW)(()=>this._appendFilter(this.options()??[],this.filterValue(),this.labelMap()));iconSize=(0,g.EW)(()=>`var(--cue-input-${this.size()}-font-size)`);handleSelect(t,i){const l=t.target.closest("cue-multi-select");(null!==l?.closest(".ag-filter-wrapper")||null!==l?.closest(".ag-popup")||null!==l?.closest(".ag-filter-apply-panel")||null!==l?.closest('[class*="ag-"]')||null!==document.querySelector(".ag-filter-wrapper"))&&t.stopPropagation(),t.preventDefault();const f=this.value()||[],O=f.includes(i),E=this.fixedValues().includes(i);if(O&&E)return;let D;D=O?f.filter(b=>b!==i):[...f,i],this.value.update(()=>[...D])}preventEventBubbling(t){const n=t.target.closest("cue-multi-select");(null!==n?.closest(".ag-filter-wrapper")||null!==n?.closest(".ag-popup")||null!==n?.closest(".ag-filter-apply-panel")||null!==n?.closest('[class*="ag-"]')||null!==document.querySelector(".ag-filter-wrapper"))&&(t.stopPropagation(),t.stopImmediatePropagation())}onMenuClosed(){this.menuIsOpen.set(!1)}openMenu(){this.menuIsOpen.set(!0),this.filterValue.set("")}handleSpace(t){t.preventDefault(),this.openMenu()}isSelected(t){return(this.value()||[]).includes(t)}isFixedValue(t){return this.fixedValues().includes(t)}constructor(){(0,a.QZP)(()=>{this.showFilter()&&this.menuIsOpen()&&setTimeout(()=>this.filterInputEl()?.focus(),20)}),(0,a.QZP)(()=>{const t=this.value()||[],n=this.fixedValues().filter(l=>!t.includes(l));if(n.length>0){const l=[...t,...n];this.value.set(l)}})}icon(t){if(void 0!==t)return this.iconMap()[t]}_appendFilter(t,i,n){const l=i.toLowerCase();return(""===i?t:t.filter(f=>(n[f]?n[f].toLowerCase():f.toString().toLowerCase()).startsWith(l))).map(f=>({value:f,label:n[f]?n[f]:f.toString()}))}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-multi-select"]],viewQuery:function(i,n){1&i&&e.wEZ(n.filterInputEl,P.p,5)(n.menuEl,T.W,5),2&i&&e.NyB(2)},inputs:{label:[1,"label"],info:[1,"info"],placeholder:[1,"placeholder"],menuPosition:[1,"menuPosition"],options:[1,"options"],labelMap:[1,"labelMap"],iconMap:[1,"iconMap"],value:[1,"value"],fixedValues:[1,"fixedValues"],size:[1,"size"],disabled:[1,"disabled"],showFilter:[1,"showFilter"],underline:[1,"underline"],error:[1,"error"],maxHeight:[1,"maxHeight"],loading:[1,"loading"]},outputs:{value:"valueChange"},decls:15,vars:23,consts:[["trigger",""],[1,"form-field"],["size","s",1,"label",3,"info"],[3,"menuClosed","positioning","contextEnabled"],["trigger","","tabindex","0",1,"select-trigger",3,"click","keydown.enter","keydown.space"],["align","center","gap","s",1,"select-value"],[3,"--cue-icon-width","name"],["name","arrow-dropdown",1,"select-arrow"],["menu","",1,"menu",3,"maxHeight","cueLogoLoader"],[3,"size","disabled","selected"],["size","s",1,"error-text"],["size","s",1,"label",3,"click","info"],[3,"name"],[3,"valueChange","value","placeholder"],[2,"height","6px"],[3,"click","mousedown","size","disabled","selected"],["before","",3,"mousedown","checked","disabled"],["before","",3,"name"]],template:function(i,n){if(1&i&&(e.j41(0,"div",1),e.nVh(1,he,2,2,"cue-typography",2),e.j41(2,"cue-menu",3),e.bIt("menuClosed",function(){return n.onMenuClosed()}),e.EFF(3,"> "),e.j41(4,"div",4,0),e.bIt("click",function(){return!n.disabled()&&n.openMenu()})("keydown.enter",function(){return!n.disabled()&&n.openMenu()})("keydown.space",function(p){return!n.disabled()&&n.handleSpace(p)}),e.j41(6,"cue-flexcontainer",5),e.nVh(7,fe,1,3,"cue-svg-icon",6),e.EFF(8),e.k0s(),e.nrm(9,"cue-svg-icon",7),e.k0s(),e.j41(10,"cue-menu-wrap",8),e.nVh(11,ve,3,4),e.Z7z(12,be,4,7,"cue-menu-item",9,e.Vm6),e.k0s()(),e.nVh(14,Ce,2,1,"cue-typography",10),e.k0s()),2&i){let l;e.HbH("size-"+n.size()),e.AVh("focused",n.value()&&n.value().length>0||""!==n.placeholder())("menu-open",n.menuIsOpen())("underline",n.underline())("no-label",!n.label()),e.R7$(),e.vxM(n.label()?1:-1),e.R7$(),e.Y8G("positioning",n.menuPosition())("contextEnabled",!n.disabled()),e.R7$(2),e.AVh("disabled",n.disabled()),e.R7$(3),e.vxM((l=n.icon(1===n.value().length?n.value()[0]:void 0))?7:-1,l),e.R7$(),e.SpI(" ",n.value()&&n.value().length>0?n.valueLabel():n._placeholder()," "),e.R7$(2),e.xc7("min-height",n.loading()?"200px":null),e.Y8G("maxHeight",n.maxHeight())("cueLogoLoader",n.loading()),e.R7$(),e.vxM(n.showFilter()?11:-1),e.R7$(),e.Dyx(n.optionsFiltered()),e.R7$(2),e.vxM(n.error()?14:-1)}},dependencies:[T.W,pe.M,ge.D,y.Typography,P.p,_e.S,G.A,v.n,me.k,h.Kj],styles:[".form-field[_ngcontent-%COMP%]{position:relative}.select-trigger[_ngcontent-%COMP%]{color:var(--cue-input-value-color);width:100%;border:none;background:none;outline:none;font-family:var(--cue-font-family);display:flex;justify-content:space-between;align-items:center;cursor:pointer;box-sizing:border-box}.form-field.underline[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{border-bottom:1px solid var(--cue-input-border-bottom-color)}.form-field[_ngcontent-%COMP%]:not(.underline) .select-trigger[_ngcontent-%COMP%]{align-items:flex-start;padding-top:2px;padding-bottom:1px}.select-trigger.disabled[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.6}.select-trigger[_ngcontent-%COMP%]:focus{outline:none}.size-xs[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-xs-padding);font-size:var(--cue-input-xs-font-size)}.size-s[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-s-padding);font-size:var(--cue-input-s-font-size)}.size-m[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-m-padding);font-size:var(--cue-input-m-font-size)}.size-l[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-l-padding);font-size:var(--cue-input-l-font-size)}.form-field.no-label.size-xs[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%], .form-field.no-label.size-s[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%], .form-field.no-label.size-m[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%], .form-field.no-label.size-l[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding-top:0}.select-value[_ngcontent-%COMP%]{color:var(--cue-input-value-color);font-family:var(--cue-font-family);flex:1;text-align:left}.form-field[_ngcontent-%COMP%]:not(.focused) .select-value[_ngcontent-%COMP%]{color:var(--cue-input-placeholder-color)}.select-arrow[_ngcontent-%COMP%]{color:var(--cue-input-value-color);margin-left:8px;display:inline-block;transition:transform .2s ease}.form-field.menu-open[_ngcontent-%COMP%] .select-arrow[_ngcontent-%COMP%]{transform:rotate(180deg)}.label[_ngcontent-%COMP%]{position:absolute;pointer-events:auto;transition:all .2s ease;cursor:pointer}.size-xs[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-top);left:var(--cue-input-xs-label-left)}.size-s[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-top);left:var(--cue-input-s-label-left)}.size-m[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-top);left:var(--cue-input-m-label-left)}.size-l[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-top);left:var(--cue-input-l-label-left)}.form-field.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .form-field.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{color:var(--cue-input-value-color)}.size-xs.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-xs.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-focused-top);font-size:var(--cue-input-xs-label-focused-font-size)}.size-s.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-s.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-focused-top);font-size:var(--cue-input-s-label-focused-font-size)}.size-m.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-m.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-focused-top);font-size:var(--cue-input-m-label-focused-font-size)}.size-l.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-l.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-focused-top);font-size:var(--cue-input-l-label-focused-font-size)}cue-menu[_ngcontent-%COMP%]{width:100%}.error-text[_ngcontent-%COMP%]{color:var(--cue-error);margin-top:4px;min-height:18px}"],changeDetection:0})}return o})();const xe=["*"],B=()=>[],S=()=>({});function Pe(o,u){if(1&o&&(e.j41(0,"cue-typography"),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2);e.R7$(),e.JRh(t.config().message)}}function Oe(o,u){if(1&o&&(e.nrm(0,"cue-key-val",4),e.nI1(1,"transloco")),2&o){const t=e.XpG(2);e.Y8G("key",e.mNQ(e.bMT(1,3,"components.modals.rdfEdit.labelExistingValue")))("val",t.existingValue())}}function De(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input",15),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("error",t.valueError())}}function ze(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input",16),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("error",t.valueError())}}function ke(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input-date",17),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("error",t.valueError())}}function Ve(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",8)(1,"cue-typography"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"cue-input-switch",18),e.bIt("checkedChange",function(n){a.eBV(t);const l=e.XpG(2);return a.Njj(l.onBooleanChange(n))}),e.k0s()()}if(2&o){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,2,"components.modals.rdfEdit.labelSetNewValue")),e.R7$(2),e.Y8G("checked","true"===t.newValue())}}function Ee(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-select",19),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,7,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("options",t.config().options||e.lJ4(9,B))("labelMap",t.config().optionLabelMap||e.lJ4(10,S))("showFilter",t.optionsCount()>5)("error",t.valueError())}}function Fe(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-multi-select",19),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,7,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("options",t.config().options||e.lJ4(9,B))("labelMap",t.config().optionLabelMap||e.lJ4(10,S))("showFilter",t.optionsCount()>5)("error",t.valueError())}}function Re(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input-multiline",20),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.comment,n)||(l.comment=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,3,"components.modals.rdfEdit.labelComment"))),e.R50("value",t.comment)}}function we(o,u){if(1&o&&(e.j41(0,"cue-typography",11),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2);e.R7$(),e.JRh(t.error())}}function Te(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-modal",1),e.bIt("close",function(){a.eBV(t);const n=e.XpG();return a.Njj(n.onClose())}),e.j41(1,"cue-flexcontainer",2),e.SdG(2),e.nVh(3,Pe,2,1,"cue-typography"),e.j41(4,"cue-flexcontainer",3),e.nVh(5,Oe,2,5,"cue-key-val",4),e.nVh(6,De,2,6,"cue-input",5),e.nVh(7,ze,2,6,"cue-input",6),e.nVh(8,ke,2,6,"cue-input-date",7),e.nVh(9,Ve,5,4,"cue-flexcontainer",8),e.nVh(10,Ee,2,11,"cue-select",9),e.nVh(11,Fe,2,11,"cue-multi-select",9),e.k0s(),e.nVh(12,Re,2,5,"cue-input-multiline",10),e.nVh(13,we,2,1,"cue-typography",11),e.j41(14,"cue-flexcontainer",12)(15,"cue-button",13),e.bIt("click",function(){a.eBV(t);const n=e.XpG();return a.Njj(n.onClose())}),e.j41(16,"cue-button-label"),e.EFF(17),e.nI1(18,"transloco"),e.k0s()(),e.j41(19,"cue-button",14),e.bIt("click",function(){a.eBV(t);const n=e.XpG();return a.Njj(n.onSave())}),e.j41(20,"cue-button-label"),e.EFF(21),e.nI1(22,"transloco"),e.k0s()()()()()}if(2&o){const t=e.XpG();e.Y8G("displayCloseBtn",!1)("closeOnBackgroundClick",!1),e.R7$(3),e.vxM(t.config().message?3:-1),e.R7$(2),e.vxM("boolean"!==t.config().dataType?5:-1),e.R7$(),e.vxM("string"===t.config().dataType?6:-1),e.R7$(),e.vxM("number"===t.config().dataType?7:-1),e.R7$(),e.vxM("date"===t.config().dataType?8:-1),e.R7$(),e.vxM("boolean"===t.config().dataType?9:-1),e.R7$(),e.vxM("select"===t.config().dataType?10:-1),e.R7$(),e.vxM("multiselect"===t.config().dataType?11:-1),e.R7$(),e.vxM(t.identical()?-1:12),e.R7$(),e.vxM(t.error()?13:-1),e.R7$(2),e.Y8G("disabled",t.saving()),e.R7$(2),e.JRh(e.bMT(18,17,"components.modals.rdfEdit.buttonCancel")),e.R7$(2),e.Y8G("disabled",t.saving()||t.identical())("loading",t.saving()),e.R7$(2),e.JRh(e.bMT(22,19,"components.modals.rdfEdit.buttonSave"))}}let je=(()=>{class o{visible=(0,c.geq)(!0);config=c.hFB.required();close=(0,c.CGW)();existingValue=(0,g.EW)(()=>{let t="";return t=Array.isArray(this.config().existingValue)?this.config().existingValue.map(n=>this._getLabel(n)).join(", "):this._getLabel(this.config().existingValue),t});newValue=(0,g.uu)(()=>this.config().existingValue);comment=(0,a.vPA)("");errorID=(0,c.geq)("");error=(0,h.Xx)(this.errorID);saving=(0,a.vPA)(!1);pristine=(0,a.vPA)(!0);identical=(0,g.EW)(()=>!this.config().hasExternalChanges&&this.newValue()===this.config().existingValue);valueErrorID=(0,g.EW)(()=>this.pristine()?"":this.identical()?"components.modals.rdfEdit.errorIdenticalValue":"");valueError=(0,h.Xx)(this.valueErrorID);optionsCount=(0,g.EW)(()=>this.config().options?.length||0);constructor(){(0,a.QZP)(()=>{this.pristine()&&this.newValue()!==this.config().existingValue&&this.pristine.set(!1)})}onSave(){var t=this;return(0,s.A)(function*(){t.saving.set(!0),t.errorID.set("");try{const i=t.config();yield i.requestSave({newValue:t.newValue(),comment:t.comment(),previousValue:i.existingValue}),t.visible.set(!1),t.close.emit(t.newValue())}catch(i){console.error("Error saving RDF edit:",i),t.errorID.set("components.modals.rdfEdit.errorSaving")}t.saving.set(!1)})()}onClose(){this.visible.set(!1),this.close.emit(null)}onBooleanChange(t){this.newValue.set(t?"true":"false")}_getLabel(t){const i=this.config().optionLabelMap;return void 0!==i&&i[t]||t}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-modal-rdf-edit"]],inputs:{visible:[1,"visible"],config:[1,"config"],errorID:[1,"errorID"]},outputs:{visible:"visibleChange",close:"close",errorID:"errorIDChange"},ngContentSelectors:xe,decls:1,vars:1,consts:[[3,"displayCloseBtn","closeOnBackgroundClick"],[3,"close","displayCloseBtn","closeOnBackgroundClick"],["direction","column","align","center"],["direction","column","gap","m"],[3,"key","val"],["type","text",3,"label","value","error"],["type","number",3,"label","value","error"],[3,"label","value","error"],["direction","row","align","center","justify","space-between","gap","l"],[3,"value","options","labelMap","label","showFilter","error"],[2,"width","100%",3,"label","value"],[2,"color","var(--cue-error)"],["direction","row","justify","center",2,"width","100%"],[3,"click","disabled"],["variant","secondary",3,"click","disabled","loading"],["type","text",3,"valueChange","label","value","error"],["type","number",3,"valueChange","label","value","error"],[3,"valueChange","label","value","error"],[3,"checkedChange","checked"],[3,"valueChange","value","options","labelMap","label","showFilter","error"],[2,"width","100%",3,"valueChange","label","value"]],template:function(i,n){1&i&&(e.NAR(),e.nVh(0,Te,23,21,"cue-modal",0)),2&i&&e.vxM(n.visible()?0:-1)},dependencies:[_.a,v.n,x.$,y.Typography,w.F,P.p,R.L,V.l,ye,q,ee.d,de,h.Kj],styles:[".col[_ngcontent-%COMP%]{flex:1;min-width:0;height:100%}"]})}return o})();var Y=r(7335);function Ne(o,u){1&o&&(e.j41(0,"span",7),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(),e.SpI("(",e.bMT(2,1,"components.keyVal.edited"),")"))}function Ie(o,u){if(1&o){const t=e.RV6();e.j41(0,"span",5),e.bIt("click",function(){a.eBV(t);const n=e.XpG();return a.Njj(n.onReadClick())}),e.j41(1,"span",6),e.EFF(2),e.k0s(),e.nVh(3,Ne,3,3,"span",7),e.k0s()}if(2&o){const t=e.XpG();e.AVh("interactive",!t.editDisabled()),e.Y8G("menuItems",t.hoverMenu()),e.R7$(2),e.Lme("",t.valueFormatted()," ",t.suffix()),e.R7$(),e.vxM(t.isDirty()?3:-1)}}function Ge(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-select",10),e.bIt("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return a.Njj(l.selectionChange(n))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("value",t.newValue())("options",t.options())}}function Be(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-inline-input",11),e.bIt("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return a.Njj(l.inputChange(n))}),e.k0s(),e.EFF(1)}if(2&o){const t=e.XpG(2);e.Y8G("value",t.valueFormatted()),e.R7$(),e.SpI(" ",t.suffix()," ")}}function Se(o,u){if(1&o&&(e.j41(0,"cue-flexcontainer",3),e.nVh(1,Ge,1,2,"cue-select",8)(2,Be,2,2),e.nrm(3,"cue-entity-menu",9),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.vxM(void 0!==t.options()&&t.options().length?1:2),e.R7$(2),e.Y8G("items",t.saveCancelMenu())}}function Ye(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-modal-rdf-edit",12),e.mxI("visibleChange",function(n){a.eBV(t);const l=e.XpG();return e.DH7(l.rdfModalVisible,n)||(l.rdfModalVisible=n),a.Njj(n)}),e.bIt("close",function(n){a.eBV(t);const l=e.XpG();return a.Njj(l.onRdfModalClose(n))}),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("config",u),e.R50("visible",t.rdfModalVisible)}}let Ae=(()=>{class o{entityMenuDirective;size=(0,c.hFB)("m");key=c.hFB.required();val=c.geq.required();originalValue=(0,c.hFB)(void 0);options=(0,c.hFB)([]);suffix=(0,c.hFB)("");rdfConfig=(0,c.hFB)();editDisabled=(0,c.hFB)(!1);valueChange=(0,c.CGW)();editModeEnabled=(0,a.vPA)(!1);isDirty=(0,g.EW)(()=>{const t=this.originalValue();return void 0!==t&&this.val()!==t});valueChanged=(0,g.EW)(()=>this.val()!==this.newValue());newValue=(0,g.uu)(()=>this.val());rdfModalVisible=(0,a.vPA)(!1);valueFormatted=(0,g.EW)(()=>this._idToString(this.val()));hoverMenu=(0,g.EW)(()=>{if(this.editModeEnabled()||this.editDisabled())return[];const t=[{icon:"edit",label:"Edit",action:()=>this.onReadClick()}];return this.isDirty()&&t.push({icon:"close",label:"Revert to original",action:()=>this._revert()}),t});onReadClick(){this.editDisabled()||(this.rdfConfig()?this.rdfModalVisible.set(!0):this.editModeEnabled.set(!0),this.entityMenuDirective?.removeOverlayMenu())}labelSize=(0,g.EW)(()=>{switch(this.size()){case"s":return"xs";case"m":return"s";case"l":return"m";case"xl":return"l"}});onKeyPress(t){this.editModeEnabled()&&("Escape"===t.key?(this._reset(),t.stopPropagation()):"Enter"===t.key&&this._emitChange())}saveCancelMenu=(0,g.EW)(()=>{const t=[{icon:"close",label:"Cancel",action:()=>this._reset()}];return this.valueChanged()&&t.push({icon:"save",label:"Save",action:()=>this._emitChange()}),t});selectionChange(t){this.newValue.set(t?.toString()??"")}inputChange(t){this.newValue.set(t)}_emitChange(){this.valueChange.emit(this.newValue()),this.val.set(this.newValue()),this.editModeEnabled.set(!1)}_reset(){this.newValue.set(this.val()),this.editModeEnabled.set(!1)}_revert(){const t=this.originalValue();void 0!==t&&(this.val.set(t),this.newValue.set(t),this.valueChange.emit(t),this.entityMenuDirective?.removeOverlayMenu())}_idToString(t){const i=this.rdfConfig()?.optionLabelMap;return i?i[t]??t:t}onRdfModalClose(t){if(this.rdfModalVisible.set(!1),null===t)return;const i=Array.isArray(t)?t.join(", "):t;this.val.set(i)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-key-val-editable"]],viewQuery:function(i,n){if(1&i&&e.GBs(Y.e,5),2&i){let l;e.mGM(l=e.lsd())&&(n.entityMenuDirective=l.first)}},hostBindings:function(i,n){1&i&&e.bIt("keydown",function(p){return n.onKeyPress(p)},e.EBC)},inputs:{size:[1,"size"],key:[1,"key"],val:[1,"val"],originalValue:[1,"originalValue"],options:[1,"options"],suffix:[1,"suffix"],rdfConfig:[1,"rdfConfig"],editDisabled:[1,"editDisabled"]},outputs:{val:"valChange",valueChange:"valueChange"},decls:9,vars:5,consts:[[1,"key-val-container"],[3,"size"],["cueEntityMenu","",1,"read-mode-container",3,"interactive","menuItems"],["direction","row","align","center"],[3,"config","visible"],["cueEntityMenu","",1,"read-mode-container",3,"click","menuItems"],[1,"value-content"],[1,"dirty-indicator"],[3,"value","options"],[3,"items"],[3,"valueChange","value","options"],[3,"valueChange","value"],[3,"visibleChange","close","config","visible"]],template:function(i,n){if(1&i&&(e.j41(0,"dl",0)(1,"dt")(2,"cue-typography",1),e.EFF(3),e.k0s()(),e.j41(4,"dd")(5,"cue-typography",1),e.nVh(6,Ie,4,6,"span",2)(7,Se,4,2,"cue-flexcontainer",3),e.k0s()()(),e.nVh(8,Ye,1,2,"cue-modal-rdf-edit",4)),2&i){let l;e.R7$(2),e.Y8G("size",n.labelSize()),e.R7$(),e.JRh(n.key()),e.R7$(2),e.Y8G("size",n.size()),e.R7$(),e.vxM(n.editModeEnabled()?n.rdfConfig()?-1:7:6),e.R7$(2),e.vxM((l=n.rdfConfig())?8:-1,l)}},dependencies:[y.Typography,Y.e,V.l,k.H,v.n,F.I,je,h.Kj],styles:[".key-val-container[_ngcontent-%COMP%]{margin:0;display:flex;flex-direction:column;gap:var(--cue-grid-gap-s, 8px)}dt[_ngcontent-%COMP%], dd[_ngcontent-%COMP%]{margin:0}.read-mode-container[_ngcontent-%COMP%]{display:inline-flex;align-items:center;width:100%;position:relative}.read-mode-container.interactive[_ngcontent-%COMP%]:hover{cursor:pointer}.value-content[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%]{color:var(--cue-typography-text-color, inherit)}dt[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%], dd[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%], .value-content[_ngcontent-%COMP%]{color:var(--cue-typography-text-color, inherit)!important}dt[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%] div[_ngcontent-%COMP%], dd[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{color:var(--cue-typography-text-color, inherit)!important}[_ngcontent-%COMP%]:deep(cue-svg-icon), [_ngcontent-%COMP%]:deep(cue-entity-menu cue-svg-icon){color:var(--cue-icon-color, inherit)!important}.dirty-indicator[_ngcontent-%COMP%]{opacity:.8;margin-left:4px;color:var(--cue-typography-text-color, inherit)!important;font-weight:700;font-size:.4em;transform:translateY(-1em)}"]})}return o})()},8547(j,z,r){r.d(z,{T:()=>V});var c=r(7705),a=r(29),g=r(6117),k=r(6279),F=r(356),s=r(5547),h=r(5802);const _=(m,C)=>C.label;function v(m,C){if(1&m&&s.nrm(0,"cue-svg-icon",4),2&m){const d=s.XpG(2).$implicit;s.Y8G("name",d.icon)}}function x(m,C){if(1&m&&s.nrm(0,"cue-menu-nested",6),2&m){const d=s.XpG(2).$implicit,M=s.XpG();s.Y8G("items",d.children)("size",M.size())}}function y(m,C){if(1&m&&(s.j41(0,"cue-menu",1)(1,"cue-menu-item",3),s.nVh(2,v,1,1,"cue-svg-icon",4),s.EFF(3),s.nrm(4,"cue-svg-icon",5),s.k0s(),s.nVh(5,x,1,2,"cue-menu-nested",6),s.k0s()),2&m){const d=s.XpG().$implicit,M=s.XpG();s.Y8G("size",M.size()),s.R7$(),s.Y8G("title",d.tooltip),s.R7$(),s.vxM(d.icon?2:-1),s.R7$(),s.SpI(" ",d.label," "),s.R7$(2),s.vxM(d.children?5:-1)}}function w(m,C){if(1&m&&s.nrm(0,"cue-svg-icon",4),2&m){const d=s.XpG(2).$implicit;s.Y8G("name",d.icon)}}function P(m,C){if(1&m){const d=s.RV6();s.j41(0,"cue-menu-item",7),s.bIt("click",function(){h.eBV(d);const e=s.XpG().$implicit;return h.Njj(null==e.action?null:e.action())}),s.nVh(1,w,1,1,"cue-svg-icon",4),s.EFF(2),s.k0s()}if(2&m){const d=s.XpG().$implicit;s.Y8G("title",d.tooltip),s.R7$(),s.vxM(d.icon?1:-1),s.R7$(),s.SpI(" ",d.label," ")}}function R(m,C){if(1&m&&s.nVh(0,y,6,5,"cue-menu",1)(1,P,3,3,"cue-menu-item",2),2&m){const d=C.$implicit;s.vxM(null!=d.children&&d.children.length?0:1)}}let V=(()=>{class m{items=c.hFB.required();size=(0,c.hFB)("m");static \u0275fac=function(M){return new(M||m)};static \u0275cmp=s.VBU({type:m,selectors:[["cue-menu-nested"]],inputs:{items:[1,"items"],size:[1,"size"]},decls:3,vars:1,consts:[[3,"size"],["trigger","hover",3,"size"],[3,"title"],["trigger","",3,"title"],["before","",3,"name"],["after","","name","paginator-next"],["menu","",3,"items","size"],[3,"click","title"]],template:function(M,e){1&M&&(s.j41(0,"cue-menu-wrap",0),s.Z7z(1,R,2,1,null,null,_),s.k0s()),2&M&&(s.Y8G("size",e.size()),s.R7$(),s.Dyx(e.items()))},dependencies:[m,g.W,k.D,F.M,a.A],encapsulation:2})}return m})()},2065(j,z,r){function g(s,h,_="text/plain"){return function c(s,h="data.zip"){const _=document.createElement("a"),v=URL.createObjectURL(s);_.href=v,_.download=h,document.body.appendChild(_),_.click(),document.body.removeChild(_),URL.revokeObjectURL(v)}(new Blob([s],{type:_}),h)}function k(s,h){const _=document.createElement("a");_.style.display="hidden",_.setAttribute("href",window.URL.createObjectURL(s)),_.setAttribute("download",h),document.body.appendChild(_),_.click(),_.remove()}r.d(z,{KE:()=>k,YN:()=>g})}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[773],{5903(j,O,r){r.d(O,{L:()=>Ae});var s=r(7705),a=r(5802),p=r(2271),E=r(4853),F=r(9495),c=r(467),f=r(9352),R=r(5745),C=r(5381),D=r(5971),b=r(2245),w=r(9421),y=r(8957),V=r(5448),z=r(2444),_=r(9417),M=r(7374),d=r.n(M),h=r(3319),e=r(5547);const H=(o,u)=>u.date;function $(o,u){if(1&o&&(e.j41(0,"cue-typography",11),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o){const t=u.$implicit,i=e.XpG();e.Y8G("size",i.size()),e.R7$(),e.JRh(e.bMT(2,2,t))}}function X(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-button",13),e.bIt("click",function(){const n=a.eBV(t).$implicit,l=e.XpG();return a.Njj(l.selectDay(n))}),e.j41(1,"cue-button-label"),e.EFF(2),e.k0s()()}if(2&o){const t=u.$implicit,i=e.XpG();e.AVh("other-month",!t.isCurrentMonth)("today",t.isToday),e.Y8G("selected",t.isSelected)("size",i.size()),e.R7$(2),e.JRh(t.day)}}let L=(()=>{class o{date=s.geq.required();size=(0,s.hFB)("m");weekdays=["mon","tue","wed","thu","fri","sat","sun"].map(t=>`common.weekdaysShort.${t}`);yearOptions=Array.from({length:101},(t,i)=>(d()().year()-50+i).toString()).reverse();monthOptions=Array.from({length:12},(t,i)=>(i+1).toString());chevronSize=(0,p.EW)(()=>{const t=this.size();return"l"===t?"m":"m"===t?"s":"s"===t?"xs":"s"});monthLabels={1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"};today=(0,p.EW)(()=>d()().format("YYYY-MM-DD"));calendarDays=(0,p.EW)(()=>{const t=this.year(),i=this.month(),n=d()(this.date()),l=this.today(),g=d()(`${t}-${i}-01`),m=g.endOf("month"),x=0===g.day()?g.subtract(6,"day"):g.subtract(g.day()-1,"day"),k=0===m.day()?m:m.add(7-m.day(),"day"),P=[];let v=x;for(;v.isBefore(k)||v.isSame(k);){const A=v.format("YYYY-MM-DD");P.push({date:A,day:v.date(),isCurrentMonth:v.month()+1===i,isSelected:v.isSame(n,"day"),isToday:A===l,dayjs:v}),v=v.add(1,"day")}return P});jsDate=(0,p.EW)(()=>d()(this.date()));year=(0,p.uu)(()=>this.jsDate().year());month=(0,p.uu)(()=>this.jsDate().month()+1);day=(0,p.uu)(()=>this.jsDate().date());updateDate(){const t=d()(new Date(this.year(),this.month()-1,this.day())).format("YYYY-MM-DD");this.date.set(t)}navigateMonth(t="next"){const i=d()(this.date()),n="next"===t?i.add(1,"month"):i.subtract(1,"month");this.date.set(n.format("YYYY-MM-DD"))}navigateYear(t="next"){const i=d()(this.date()),n="next"===t?i.add(1,"year"):i.subtract(1,"year");this.date.set(n.format("YYYY-MM-DD"))}selectDay(t){this.date.set(t.date),t.isCurrentMonth||(this.year.set(t.dayjs.year()),this.month.set(t.dayjs.month()+1))}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-datepicker"]],inputs:{date:[1,"date"],size:[1,"size"]},outputs:{date:"dateChange"},decls:17,vars:10,consts:[["direction","column"],["gap","m","justify","center","align","center",2,"width","100%"],["variant","ghost",3,"size"],["icon","paginator-first",3,"click"],["icon","paginator-back",3,"click"],["justify","center",2,"width","200px"],["label","Month",3,"valueChange","size","options","labelMap","value"],["label","Year",3,"valueChange","size","options","value"],["icon","paginator-next",3,"click"],["icon","paginator-last",3,"click"],[1,"calendar-grid"],[3,"size"],["variant","ghost",3,"other-month","today","selected","size"],["variant","ghost",3,"click","selected","size"]],template:function(i,n){1&i&&(e.j41(0,"cue-flexcontainer",0)(1,"cue-flexcontainer",1)(2,"cue-button",2)(3,"cue-button-icon",3),e.bIt("click",function(){return n.navigateYear("prev")}),e.k0s(),e.j41(4,"cue-button-icon",4),e.bIt("click",function(){return n.navigateMonth("prev")}),e.k0s()(),e.j41(5,"cue-flexcontainer",5)(6,"cue-select",6),e.mxI("valueChange",function(g){return e.DH7(n.month,g)||(n.month=g),g}),e.bIt("valueChange",function(){return n.updateDate()}),e.k0s(),e.j41(7,"cue-select",7),e.mxI("valueChange",function(g){return e.DH7(n.year,g)||(n.year=g),g}),e.bIt("valueChange",function(){return n.updateDate()}),e.k0s()(),e.j41(8,"cue-button",2)(9,"cue-button-icon",8),e.bIt("click",function(){return n.navigateMonth("next")}),e.k0s()(),e.j41(10,"cue-button",2)(11,"cue-button-icon",9),e.bIt("click",function(){return n.navigateYear("next")}),e.k0s()()(),e.j41(12,"div",10),e.Z7z(13,$,3,4,"cue-typography",11,e.Vm6),e.Z7z(15,X,3,7,"cue-button",12,H),e.k0s()()),2&i&&(e.R7$(2),e.Y8G("size",n.chevronSize()),e.R7$(4),e.Y8G("size",n.size())("options",n.monthOptions)("labelMap",n.monthLabels),e.R50("value",n.month),e.R7$(),e.Y8G("size",n.size())("options",n.yearOptions),e.R50("value",n.year),e.R7$(),e.Y8G("size",n.chevronSize()),e.R7$(2),e.Y8G("size",n.chevronSize()),e.R7$(3),e.Dyx(n.weekdays),e.R7$(2),e.Dyx(n.calendarDays()))},dependencies:[C.n,z.l,D.$,V.L,b.Typography,h.a,f.Kj],styles:[".calendar-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;margin-top:12px}.other-month[_ngcontent-%COMP%]{opacity:.4}"],changeDetection:0})}return o})();var W=r(7023),K=r(5187);const Q=["inputField"];function J(o,u){1&o&&e.EFF(0," * ")}function Z(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-card",8)(1,"cue-datepicker",9),e.mxI("dateChange",function(n){a.eBV(t);const l=e.XpG();return e.DH7(l.internalDateValue,n)||(l.internalDateValue=n),a.Njj(n)}),e.bIt("dateChange",function(n){a.eBV(t);const l=e.XpG();return a.Njj(l.onDateChange(n))})("click",function(n){return n.stopPropagation()}),e.k0s()()}if(2&o){const t=e.XpG();e.R7$(),e.R50("date",t.internalDateValue)}}function U(o,u){if(1&o&&(e.j41(0,"cue-typography",7),e.EFF(1),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.JRh(t.error())}}let q=(()=>{class o{value=(0,s.geq)("");label=(0,s.hFB)("");placeholder=(0,s.hFB)("");error=(0,s.hFB)(void 0);required=(0,s.hFB)(!1);size=(0,s.hFB)("m");datePickerPositioning=(0,s.hFB)(void 0);isFocused=!1;disabled=!1;iconSize=(0,p.EW)(()=>{switch(this.size()){case"l":return"m";case"m":default:return"s";case"s":case"xs":return"xs"}});contextMenuRef=null;inputField;internalDateValue=(0,p.uu)(()=>{const t=this.value();if(t){if(d()(t,"YYYY-MM-DD",!0).isValid())return t;const i=d()(t);return i.isValid()?i.format("YYYY-MM-DD"):d()().format("YYYY-MM-DD")}return d()().format("YYYY-MM-DD")});formattedDateValue=(0,p.EW)(()=>{const t=this.value();if(t){const i=d()(t);return i.isValid()?i.format("MMM D, YYYY"):t}return""});onValueChange=(0,a.QZP)(()=>this.valueChange.emit(this.value()));valueChange=(0,s.CGW)();onChange=t=>{};onTouched=()=>{};writeValue(t){this.value.set(t||"")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}emitValue(t){const i=t.target.value;this.value.set(i),this.onChange(i)}focus(){this.isFocused=!0,this.inputField?.nativeElement&&this.inputField.nativeElement.focus()}onBlur(){this.isFocused=!1,this.onTouched()}onDateChange(t){this.value.set(t),this.onChange(t)}onDatePickerOpen(t){this.contextMenuRef=t}onDatePickerClose(){this.contextMenuRef=null}closeDatePicker(){this.contextMenuRef&&document.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-input-date"]],viewQuery:function(i,n){if(1&i&&e.GBs(Q,5),2&i){let l;e.mGM(l=e.lsd())&&(n.inputField=l.first)}},inputs:{value:[1,"value"],label:[1,"label"],placeholder:[1,"placeholder"],error:[1,"error"],required:[1,"required"],size:[1,"size"],datePickerPositioning:[1,"datePickerPositioning"]},outputs:{value:"valueChange",valueChange:"valueChange"},features:[e.Jv_([{provide:_.kq,useExisting:(0,a.Rfq)(()=>o),multi:!0}])],decls:11,vars:15,consts:[["inputField",""],["datePickerTemplate",""],[1,"form-field"],["size","s",1,"label"],["type","text","readonly","","trigger","leftclick",1,"input",3,"focus","blur","contextMenuOpen","contextMenuClose","value","placeholder","disabled","cueContextMenu","positioning"],["variant","ghost","trigger","leftclick",1,"calendar-button",3,"size","cueContextMenu","positioning"],["icon","calendar"],["size","s",1,"error-text"],[1,"date-picker-overlay","clickoutside-ignore"],["size","s",1,"clickoutside-ignore",3,"dateChange","click","date"]],template:function(i,n){if(1&i&&(e.j41(0,"div",2)(1,"cue-typography",3),e.EFF(2),e.nVh(3,J,1,0),e.k0s(),e.j41(4,"input",4,0),e.bIt("focus",function(){return n.isFocused=!0})("blur",function(){return n.onBlur()})("contextMenuOpen",function(g){return n.onDatePickerOpen(g)})("contextMenuClose",function(){return n.onDatePickerClose()}),e.k0s(),e.j41(6,"cue-button",5),e.nrm(7,"cue-button-icon",6),e.k0s(),e.DNE(8,Z,2,1,"ng-template",null,1,e.C5r),e.nVh(10,U,2,1,"cue-typography",7),e.k0s()),2&i){const l=e.sdS(9);e.HbH("size-"+n.size()),e.AVh("focused",n.isFocused||n.value()),e.R7$(2),e.SpI(" ",n.label()," "),e.R7$(),e.vxM(n.required()?3:-1),e.R7$(),e.Y8G("value",n.formattedDateValue())("placeholder",n.placeholder())("disabled",n.disabled)("cueContextMenu",l)("positioning",n.datePickerPositioning()??"bottomright"),e.R7$(2),e.Y8G("size",n.iconSize())("cueContextMenu",l)("positioning",n.datePickerPositioning()??"bottomright"),e.R7$(4),e.vxM(n.error()?10:-1)}},dependencies:[b.Typography,L,W.Q,K.Z,h.a,D.$],styles:['.form-field[_ngcontent-%COMP%]{position:relative}.input[_ngcontent-%COMP%]{color:var(--cue-input-value-color);width:100%;border:none;border-bottom:1px solid var(--cue-input-border-bottom-color);background:none;outline:none;font-family:var(--cue-font-family)}.size-xs[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-xs-padding);font-size:var(--cue-input-xs-font-size)}.size-s[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-s-padding);font-size:var(--cue-input-s-font-size)}.size-m[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-m-padding);font-size:var(--cue-input-m-font-size)}.size-l[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-l-padding);font-size:var(--cue-input-l-font-size)}.input[_ngcontent-%COMP%]::placeholder{color:var(--cue-input-placeholder-color);font-family:var(--cue-font-family)}.input[_ngcontent-%COMP%]:-webkit-autofill, .input[_ngcontent-%COMP%]:-webkit-autofill:hover, .input[_ngcontent-%COMP%]:-webkit-autofill:focus{-webkit-box-shadow:0 0 0px 1000px transparent inset;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;-webkit-text-fill-color:var(--cue-input-value-color)}.label[_ngcontent-%COMP%]{position:absolute;pointer-events:none;transition:all .2s ease}.size-xs[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-top);left:var(--cue-input-xs-label-left)}.size-s[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-top);left:var(--cue-input-s-label-left)}.size-m[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-top);left:var(--cue-input-m-label-left)}.size-l[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-top);left:var(--cue-input-l-label-left)}.form-field.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{color:var(--cue-input-value-color)}.size-xs.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-focused-top);font-size:var(--cue-input-xs-label-focused-font-size)}.size-s.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-focused-top);font-size:var(--cue-input-s-label-focused-font-size)}.size-m.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-focused-top);font-size:var(--cue-input-m-label-focused-font-size)}.size-l.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-focused-top);font-size:var(--cue-input-l-label-focused-font-size)}.underline[_ngcontent-%COMP%]{content:"";position:absolute;bottom:0;left:0;height:1px;width:0;background-color:var(--cue-input-border-bottom-color);transition:width .3s ease}.form-field.focused[_ngcontent-%COMP%] .underline[_ngcontent-%COMP%]{width:100%}.error-text[_ngcontent-%COMP%]{color:var(--cue-error);margin-top:4px;min-height:18px}.date-picker-overlay[_ngcontent-%COMP%]{box-shadow:0 4px 12px #00000026;min-width:320px;position:relative;z-index:10001}.date-picker-overlay[_ngcontent-%COMP%] [_ngcontent-%COMP%]:deep(cue-menu){z-index:10002!important}.date-picker-overlay[_ngcontent-%COMP%] [_ngcontent-%COMP%]:deep(.clickoutside-ignore){pointer-events:auto}.calendar-button[_ngcontent-%COMP%]{position:absolute;right:8px;top:50%;transform:translateY(-50%);z-index:10;opacity:.7;transition:opacity .2s ease}.calendar-button[_ngcontent-%COMP%]:hover{opacity:1}.input[_ngcontent-%COMP%]{padding-right:40px;box-sizing:border-box}.form-field[_ngcontent-%COMP%]{width:100%;max-width:none;box-sizing:border-box}'],changeDetection:0})}return o})();var ee=r(9695),N=r(1413),te=r(7421),ne=r(3293),I=r(7384),ie=r(3798);let oe=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(i,n){},styles:["textarea.cdk-textarea-autosize {\n resize: none;\n}\n\ntextarea.cdk-textarea-autosize-measuring {\n padding: 2px 0 !important;\n box-sizing: content-box !important;\n height: auto !important;\n overflow: hidden !important;\n}\n\ntextarea.cdk-textarea-autosize-measuring-firefox {\n padding: 2px 0 !important;\n box-sizing: content-box !important;\n height: 0 !important;\n}\n\n@keyframes cdk-text-field-autofill-start { /*!*/ }\n@keyframes cdk-text-field-autofill-end { /*!*/ }\n.cdk-text-field-autofill-monitored:-webkit-autofill {\n animation: cdk-text-field-autofill-start 0s 1ms;\n}\n\n.cdk-text-field-autofill-monitored:not(:-webkit-autofill) {\n animation: cdk-text-field-autofill-end 0s 1ms;\n}\n"],encapsulation:2,changeDetection:0})}return o})(),le=(()=>{class o{_elementRef=(0,a.WQX)(e.aKT);_platform=(0,a.WQX)(te.O);_ngZone=(0,a.WQX)(a.SKi);_renderer=(0,a.WQX)(e.sFG);_resizeEvents=new N.B;_previousValue;_initialHeight;_destroyed=new N.B;_listenerCleanups;_minRows;_maxRows;_enabled=!0;_previousMinRows=-1;_textareaElement;get minRows(){return this._minRows}set minRows(t){this._minRows=(0,I.OE)(t),this._setMinHeight()}get maxRows(){return this._maxRows}set maxRows(t){this._maxRows=(0,I.OE)(t),this._setMaxHeight()}get enabled(){return this._enabled}set enabled(t){this._enabled!==t&&((this._enabled=t)?this.resizeToFitContent(!0):this.reset())}get placeholder(){return this._textareaElement.placeholder}set placeholder(t){this._cachedPlaceholderHeight=void 0,t?this._textareaElement.setAttribute("placeholder",t):this._textareaElement.removeAttribute("placeholder"),this._cacheTextareaPlaceholderHeight()}_cachedLineHeight;_cachedPlaceholderHeight;_document=(0,a.WQX)(a.qQL);_hasFocus=!1;_isViewInited=!1;constructor(){(0,a.WQX)(ne.l).load(oe),this._textareaElement=this._elementRef.nativeElement}_setMinHeight(){const t=this.minRows&&this._cachedLineHeight?this.minRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.minHeight=t)}_setMaxHeight(){const t=this.maxRows&&this._cachedLineHeight?this.maxRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.maxHeight=t)}ngAfterViewInit(){this._platform.isBrowser&&(this._initialHeight=this._textareaElement.style.height,this.resizeToFitContent(),this._ngZone.runOutsideAngular(()=>{this._listenerCleanups=[this._renderer.listen("window","resize",()=>this._resizeEvents.next()),this._renderer.listen(this._textareaElement,"focus",this._handleFocusEvent),this._renderer.listen(this._textareaElement,"blur",this._handleFocusEvent)],this._resizeEvents.pipe((0,ie.Z)(16)).subscribe(()=>{this._cachedLineHeight=this._cachedPlaceholderHeight=void 0,this.resizeToFitContent(!0)})}),this._isViewInited=!0,this.resizeToFitContent(!0))}ngOnDestroy(){this._listenerCleanups?.forEach(t=>t()),this._resizeEvents.complete(),this._destroyed.next(),this._destroyed.complete()}_cacheTextareaLineHeight(){if(this._cachedLineHeight)return;const t=this._textareaElement.cloneNode(!1),i=t.style;t.rows=1,i.position="absolute",i.visibility="hidden",i.border="none",i.padding="0",i.height="",i.minHeight="",i.maxHeight="",i.top=i.bottom=i.left=i.right="auto",i.overflow="hidden",this._textareaElement.parentNode.appendChild(t),this._cachedLineHeight=t.clientHeight,t.remove(),this._setMinHeight(),this._setMaxHeight()}_measureScrollHeight(){const t=this._textareaElement,i=t.style.marginBottom||"",l=this._hasFocus,g=this._platform.FIREFOX?"cdk-textarea-autosize-measuring-firefox":"cdk-textarea-autosize-measuring";l&&(t.style.marginBottom=`${t.clientHeight}px`),t.classList.add(g);const m=t.scrollHeight-4;return t.classList.remove(g),l&&(t.style.marginBottom=i),m}_cacheTextareaPlaceholderHeight(){if(!this._isViewInited||null!=this._cachedPlaceholderHeight)return;if(!this.placeholder)return void(this._cachedPlaceholderHeight=0);const t=this._textareaElement.value;this._textareaElement.value=this._textareaElement.placeholder,this._cachedPlaceholderHeight=this._measureScrollHeight(),this._textareaElement.value=t}_handleFocusEvent=t=>{this._hasFocus="focus"===t.type};ngDoCheck(){this._platform.isBrowser&&this.resizeToFitContent()}resizeToFitContent(t=!1){if(!this._enabled||(this._cacheTextareaLineHeight(),this._cacheTextareaPlaceholderHeight(),!this._cachedLineHeight))return;const i=this._elementRef.nativeElement,n=i.value;if(!t&&this._minRows===this._previousMinRows&&n===this._previousValue)return;const l=this._measureScrollHeight(),g=Math.max(l,this._cachedPlaceholderHeight||0);i.style.height=`${g}px`,this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame<"u"?requestAnimationFrame(()=>this._scrollToCaretPosition(i)):setTimeout(()=>this._scrollToCaretPosition(i))}),this._previousValue=n,this._previousMinRows=this._minRows}reset(){void 0!==this._initialHeight&&(this._textareaElement.style.height=this._initialHeight)}_noopInputHandler(){}_scrollToCaretPosition(t){const{selectionStart:i,selectionEnd:n}=t;!this._destroyed.isStopped&&this._hasFocus&&t.setSelectionRange(i,n)}static \u0275fac=function(i){return new(i||o)};static \u0275dir=e.FsC({type:o,selectors:[["textarea","cdkTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize"],hostBindings:function(i,n){1&i&&e.bIt("input",function(){return n._noopInputHandler()})},inputs:{minRows:[0,"cdkAutosizeMinRows","minRows"],maxRows:[0,"cdkAutosizeMaxRows","maxRows"],enabled:[2,"cdkTextareaAutosize","enabled",s.L39],placeholder:"placeholder"},exportAs:["cdkTextareaAutosize"]})}return o})(),ae=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e.$C({type:o});static \u0275inj=a.G2t({})}return o})();var G=r(29);const se=["inputField"];function ce(o,u){1&o&&e.EFF(0," * ")}function re(o,u){if(1&o&&(e.j41(0,"span",5),e.nrm(1,"cue-svg-icon",8),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.Y8G("name",t.icon())}}function ue(o,u){if(1&o&&(e.j41(0,"cue-typography",7),e.EFF(1),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.JRh(t.error())}}let de=(()=>{class o{value=(0,s.geq)("");_displayValue=(0,a.vPA)("");label=(0,s.hFB)("");info=(0,s.hFB)("");placeholder=(0,s.hFB)("");error=(0,s.hFB)(void 0);required=(0,s.hFB)(!1);icon=(0,s.hFB)(void 0);size=(0,s.hFB)("m");isFocused=!1;disabled=!1;inputField;valueChange=(0,s.CGW)();_syncDisplay=(0,a.QZP)(()=>{const t=this.value()||"";!this.isFocused&&t!==this._displayValue()&&this._displayValue.set(t)});onChange=t=>{};onTouched=()=>{};writeValue(t){const i=t||"";this.value.set(i),this.isFocused||this._displayValue.set(i)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}emitValue(t){const i=t.target.value;this.valueChange.emit(i),this.onChange(i)}focus(){this.isFocused=!0,this._displayValue.set(this.value()||""),this.inputField?.nativeElement&&this.inputField.nativeElement.focus()}onBlur(){this.isFocused=!1;const t=this.inputField?.nativeElement.value??this._displayValue();this._displayValue.set(t),this.onTouched()}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-input-multiline"]],viewQuery:function(i,n){if(1&i&&e.GBs(se,5),2&i){let l;e.mGM(l=e.lsd())&&(n.inputField=l.first)}},inputs:{value:[1,"value"],label:[1,"label"],info:[1,"info"],placeholder:[1,"placeholder"],error:[1,"error"],required:[1,"required"],icon:[1,"icon"],size:[1,"size"]},outputs:{value:"valueChange",valueChange:"valueChange"},features:[e.Jv_([{provide:_.kq,useExisting:(0,a.Rfq)(()=>o),multi:!0}])],decls:10,vars:14,consts:[["inputField",""],[1,"form-field"],["size","s",1,"label",3,"info"],[1,"input-container"],["align","center","gap","s"],[2,"height","12px"],["cdkTextareaAutosize","",1,"input","textarea",2,"resize","none","overflow","hidden",3,"input","focus","blur","cdkAutosizeMinRows","cdkAutosizeMaxRows","placeholder","value","disabled"],["size","s",1,"error-text"],[3,"name"]],template:function(i,n){1&i&&(e.j41(0,"div",1)(1,"cue-typography",2),e.EFF(2),e.nVh(3,ce,1,0),e.k0s(),e.j41(4,"div",3)(5,"cue-flexcontainer",4),e.nVh(6,re,2,1,"span",5),e.j41(7,"textarea",6,0),e.bIt("input",function(g){return n.emitValue(g)})("focus",function(){return n.isFocused=!0})("blur",function(){return n.onBlur()}),e.k0s()()(),e.nVh(9,ue,2,1,"cue-typography",7),e.k0s()),2&i&&(e.HbH("size-"+n.size()),e.AVh("focused",n.isFocused||n._displayValue()),e.R7$(),e.Y8G("info",n.info()),e.R7$(),e.SpI(" ",n.label()," "),e.R7$(),e.vxM(n.required()?3:-1),e.R7$(3),e.vxM(n.icon()?6:-1),e.R7$(),e.Y8G("cdkAutosizeMinRows",1)("cdkAutosizeMaxRows",8)("placeholder",n.placeholder())("value",n._displayValue())("disabled",n.disabled),e.R7$(2),e.vxM(n.error()?9:-1))},dependencies:[b.Typography,C.n,G.A,ae,le],styles:[".form-field[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column}.input-container[_ngcontent-%COMP%]{position:relative;z-index:2}.input.textarea[_ngcontent-%COMP%]{width:100%;min-height:32px;border:none;border-bottom:1px solid var(--cue-input-border-bottom-color);background:none;outline:none;font-family:var(--cue-font-family);resize:none;overflow:hidden;color:var(--cue-input-value-color);position:relative;z-index:2;padding-bottom:8px}.size-xs[_ngcontent-%COMP%] .input.textarea[_ngcontent-%COMP%]{padding:var(--cue-input-xs-padding);font-size:var(--cue-input-xs-font-size)}.size-s[_ngcontent-%COMP%] .input.textarea[_ngcontent-%COMP%]{padding:var(--cue-input-s-padding);font-size:var(--cue-input-s-font-size)}.size-m[_ngcontent-%COMP%] .input.textarea[_ngcontent-%COMP%]{padding:var(--cue-input-m-padding);font-size:var(--cue-input-m-font-size)}.size-l[_ngcontent-%COMP%] .input.textarea[_ngcontent-%COMP%]{padding:var(--cue-input-l-padding);font-size:var(--cue-input-l-font-size)}.input.textarea[_ngcontent-%COMP%]::placeholder{color:var(--cue-input-placeholder-color);font-family:var(--cue-font-family)}.input[_ngcontent-%COMP%]:-webkit-autofill, .input[_ngcontent-%COMP%]:-webkit-autofill:hover, .input[_ngcontent-%COMP%]:-webkit-autofill:focus{-webkit-box-shadow:0 0 0px 1000px transparent inset;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;-webkit-text-fill-color:var(--cue-input-value-color)}.label[_ngcontent-%COMP%]{position:absolute;pointer-events:none;transition:all .2s ease;z-index:1;padding:0 4px;left:0}.size-xs[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-top);left:var(--cue-input-xs-label-left)}.size-s[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-top);left:var(--cue-input-s-label-left)}.size-m[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-top);left:var(--cue-input-m-label-left)}.size-l[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-top);left:var(--cue-input-l-label-left)}.form-field.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--cue-input-value-color)}.size-xs.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-focused-top);font-size:var(--cue-input-xs-label-focused-font-size)}.size-s.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-focused-top);font-size:var(--cue-input-s-label-focused-font-size)}.size-m.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-focused-top);font-size:var(--cue-input-m-label-focused-font-size)}.size-l.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-focused-top);font-size:var(--cue-input-l-label-focused-font-size)}.error-text[_ngcontent-%COMP%]{color:var(--cue-error);margin-top:4px;min-height:18px}.form-field[_ngcontent-%COMP%]:not(.focused) .input-container[_ngcontent-%COMP%]{margin-top:24px}.form-field.focused[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{margin-top:12px}"],changeDetection:0})}return o})();var T=r(6117),ge=r(356),pe=r(6279),_e=r(1359),me=r(7851);function he(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-typography",11),e.bIt("click",function(){a.eBV(t);const n=e.XpG();return a.Njj(!n.disabled()&&n.openMenu())}),e.EFF(1),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("info",t.info()),e.R7$(),e.JRh(t.label())}}function fe(o,u){if(1&o&&e.nrm(0,"cue-svg-icon",12),2&o){const t=e.XpG();e.xc7("--cue-icon-width",t.iconSize()),e.Y8G("name",u)}}function ve(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input",13),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG();return e.DH7(l.filterValue,n)||(l.filterValue=n),a.Njj(n)}),e.k0s(),e.nrm(2,"div",14)}if(2&o){const t=e.XpG();e.R50("value",t.filterValue),e.Y8G("placeholder",e.bMT(1,2,"components.input.select.placeholderFilter"))}}function Me(o,u){1&o&&e.nrm(0,"cue-svg-icon",17),2&o&&e.Y8G("name",u)}function be(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-menu-item",15),e.bIt("click",function(n){const l=a.eBV(t).$implicit,g=e.XpG();return a.Njj(g.handleSelect(n,l.value))})("mousedown",function(n){a.eBV(t);const l=e.XpG();return a.Njj(l.preventEventBubbling(n))}),e.j41(1,"cue-checkbox",16),e.bIt("mousedown",function(n){a.eBV(t);const l=e.XpG();return a.Njj(l.preventEventBubbling(n))}),e.k0s(),e.nVh(2,Me,1,1,"cue-svg-icon",17),e.EFF(3),e.k0s()}if(2&o){let t;const i=u.$implicit,n=e.XpG();e.Y8G("size",n.size())("disabled",n.isFixedValue(i.value)&&n.isSelected(i.value))("selected",n.isSelected(i.value)),e.R7$(),e.Y8G("checked",n.isSelected(i.value))("disabled",n.isFixedValue(i.value)&&n.isSelected(i.value)),e.R7$(),e.vxM((t=n.icon(i.value))?2:-1,t),e.R7$(),e.SpI(" ",i.label," ")}}function Ce(o,u){if(1&o&&(e.j41(0,"cue-typography",10),e.EFF(1),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.JRh(t.error())}}let ye=(()=>{class o{label=(0,s.hFB)("");info=(0,s.hFB)("");placeholder=(0,s.hFB)(void 0);menuPosition=(0,s.hFB)(void 0);options=(0,s.hFB)();labelMap=(0,s.hFB)({});iconMap=(0,s.hFB)({});value=(0,s.geq)([]);fixedValues=(0,s.hFB)([]);size=(0,s.hFB)("xs");disabled=(0,s.hFB)(!1);showFilter=(0,s.hFB)(!1);underline=(0,s.hFB)(!0);error=(0,s.hFB)(void 0);maxHeight=(0,s.hFB)(void 0);loading=(0,s.hFB)(!1);optionLabels=(0,p.EW)(()=>{const t=this.labelMap();return(this.options()??[]).map(n=>t[n]?t[n]:n.toString())});_multiSelectCount=(0,p.EW)(()=>(this.value()||[]).length);_multiSelectTranslated=(0,f.Xx)("components.input.multiSelect.itemsSelected",(0,p.EW)(()=>({count:this._multiSelectCount()})));_defaultPlaceholder=(0,f.Xx)("components.input.multiSelect.placeholderSelect");_placeholder=(0,p.EW)(()=>this.placeholder()??this._defaultPlaceholder());valueLabel=(0,p.EW)(()=>{const t=this.labelMap(),i=this.value()||[],n=this._multiSelectTranslated();let l;if(0===i.length)l="";else if(1===i.length){const g=i[0];l=t[g]?t[g]:g.toString()}else l=n;return l});menuIsOpen=(0,a.vPA)(void 0);filterInputEl=(0,s.ebz)(y.p);menuEl=(0,s.ebz)(T.W);filterValue=(0,a.vPA)("");optionsFiltered=(0,p.EW)(()=>this._appendFilter(this.options()??[],this.filterValue(),this.labelMap()));iconSize=(0,p.EW)(()=>`var(--cue-input-${this.size()}-font-size)`);handleSelect(t,i){const l=t.target.closest("cue-multi-select");(null!==l?.closest(".ag-filter-wrapper")||null!==l?.closest(".ag-popup")||null!==l?.closest(".ag-filter-apply-panel")||null!==l?.closest('[class*="ag-"]')||null!==document.querySelector(".ag-filter-wrapper"))&&t.stopPropagation(),t.preventDefault();const m=this.value()||[],x=m.includes(i),k=this.fixedValues().includes(i);if(x&&k)return;let P;P=x?m.filter(v=>v!==i):[...m,i],this.value.update(()=>[...P])}preventEventBubbling(t){const n=t.target.closest("cue-multi-select");(null!==n?.closest(".ag-filter-wrapper")||null!==n?.closest(".ag-popup")||null!==n?.closest(".ag-filter-apply-panel")||null!==n?.closest('[class*="ag-"]')||null!==document.querySelector(".ag-filter-wrapper"))&&(t.stopPropagation(),t.stopImmediatePropagation())}onMenuClosed(){this.menuIsOpen.set(!1)}openMenu(){this.menuIsOpen.set(!0),this.filterValue.set("")}handleSpace(t){t.preventDefault(),this.openMenu()}isSelected(t){return(this.value()||[]).includes(t)}isFixedValue(t){return this.fixedValues().includes(t)}constructor(){(0,a.QZP)(()=>{this.showFilter()&&this.menuIsOpen()&&setTimeout(()=>this.filterInputEl()?.focus(),20)}),(0,a.QZP)(()=>{const t=this.value()||[],n=this.fixedValues().filter(l=>!t.includes(l));if(n.length>0){const l=[...t,...n];this.value.set(l)}})}icon(t){if(void 0!==t)return this.iconMap()[t]}_appendFilter(t,i,n){const l=i.toLowerCase();return(""===i?t:t.filter(m=>(n[m]?n[m].toLowerCase():m.toString().toLowerCase()).startsWith(l))).map(m=>({value:m,label:n[m]?n[m]:m.toString()}))}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-multi-select"]],viewQuery:function(i,n){1&i&&e.wEZ(n.filterInputEl,y.p,5)(n.menuEl,T.W,5),2&i&&e.NyB(2)},inputs:{label:[1,"label"],info:[1,"info"],placeholder:[1,"placeholder"],menuPosition:[1,"menuPosition"],options:[1,"options"],labelMap:[1,"labelMap"],iconMap:[1,"iconMap"],value:[1,"value"],fixedValues:[1,"fixedValues"],size:[1,"size"],disabled:[1,"disabled"],showFilter:[1,"showFilter"],underline:[1,"underline"],error:[1,"error"],maxHeight:[1,"maxHeight"],loading:[1,"loading"]},outputs:{value:"valueChange"},decls:15,vars:23,consts:[["trigger",""],[1,"form-field"],["size","s",1,"label",3,"info"],[3,"menuClosed","positioning","contextEnabled"],["trigger","","tabindex","0",1,"select-trigger",3,"click","keydown.enter","keydown.space"],["align","center","gap","s",1,"select-value"],[3,"--cue-icon-width","name"],["name","arrow-dropdown",1,"select-arrow"],["menu","",1,"menu",3,"maxHeight","cueLogoLoader"],[3,"size","disabled","selected"],["size","s",1,"error-text"],["size","s",1,"label",3,"click","info"],[3,"name"],[3,"valueChange","value","placeholder"],[2,"height","6px"],[3,"click","mousedown","size","disabled","selected"],["before","",3,"mousedown","checked","disabled"],["before","",3,"name"]],template:function(i,n){if(1&i&&(e.j41(0,"div",1),e.nVh(1,he,2,2,"cue-typography",2),e.j41(2,"cue-menu",3),e.bIt("menuClosed",function(){return n.onMenuClosed()}),e.EFF(3,"> "),e.j41(4,"div",4,0),e.bIt("click",function(){return!n.disabled()&&n.openMenu()})("keydown.enter",function(){return!n.disabled()&&n.openMenu()})("keydown.space",function(g){return!n.disabled()&&n.handleSpace(g)}),e.j41(6,"cue-flexcontainer",5),e.nVh(7,fe,1,3,"cue-svg-icon",6),e.EFF(8),e.k0s(),e.nrm(9,"cue-svg-icon",7),e.k0s(),e.j41(10,"cue-menu-wrap",8),e.nVh(11,ve,3,4),e.Z7z(12,be,4,7,"cue-menu-item",9,e.Vm6),e.k0s()(),e.nVh(14,Ce,2,1,"cue-typography",10),e.k0s()),2&i){let l;e.HbH("size-"+n.size()),e.AVh("focused",n.value()&&n.value().length>0||""!==n.placeholder())("menu-open",n.menuIsOpen())("underline",n.underline())("no-label",!n.label()),e.R7$(),e.vxM(n.label()?1:-1),e.R7$(),e.Y8G("positioning",n.menuPosition())("contextEnabled",!n.disabled()),e.R7$(2),e.AVh("disabled",n.disabled()),e.R7$(3),e.vxM((l=n.icon(1===n.value().length?n.value()[0]:void 0))?7:-1,l),e.R7$(),e.SpI(" ",n.value()&&n.value().length>0?n.valueLabel():n._placeholder()," "),e.R7$(2),e.xc7("min-height",n.loading()?"200px":null),e.Y8G("maxHeight",n.maxHeight())("cueLogoLoader",n.loading()),e.R7$(),e.vxM(n.showFilter()?11:-1),e.R7$(),e.Dyx(n.optionsFiltered()),e.R7$(2),e.vxM(n.error()?14:-1)}},dependencies:[T.W,ge.M,pe.D,b.Typography,y.p,_e.S,G.A,C.n,me.k,f.Kj],styles:[".form-field[_ngcontent-%COMP%]{position:relative}.select-trigger[_ngcontent-%COMP%]{color:var(--cue-input-value-color);width:100%;border:none;background:none;outline:none;font-family:var(--cue-font-family);display:flex;justify-content:space-between;align-items:center;cursor:pointer;box-sizing:border-box}.form-field.underline[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{border-bottom:1px solid var(--cue-input-border-bottom-color)}.form-field[_ngcontent-%COMP%]:not(.underline) .select-trigger[_ngcontent-%COMP%]{align-items:flex-start;padding-top:2px;padding-bottom:1px}.select-trigger.disabled[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.6}.select-trigger[_ngcontent-%COMP%]:focus{outline:none}.size-xs[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-xs-padding);font-size:var(--cue-input-xs-font-size)}.size-s[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-s-padding);font-size:var(--cue-input-s-font-size)}.size-m[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-m-padding);font-size:var(--cue-input-m-font-size)}.size-l[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-l-padding);font-size:var(--cue-input-l-font-size)}.form-field.no-label.size-xs[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%], .form-field.no-label.size-s[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%], .form-field.no-label.size-m[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%], .form-field.no-label.size-l[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding-top:0}.select-value[_ngcontent-%COMP%]{color:var(--cue-input-value-color);font-family:var(--cue-font-family);flex:1;text-align:left}.form-field[_ngcontent-%COMP%]:not(.focused) .select-value[_ngcontent-%COMP%]{color:var(--cue-input-placeholder-color)}.select-arrow[_ngcontent-%COMP%]{color:var(--cue-input-value-color);margin-left:8px;display:inline-block;transition:transform .2s ease}.form-field.menu-open[_ngcontent-%COMP%] .select-arrow[_ngcontent-%COMP%]{transform:rotate(180deg)}.label[_ngcontent-%COMP%]{position:absolute;pointer-events:auto;transition:all .2s ease;cursor:pointer}.size-xs[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-top);left:var(--cue-input-xs-label-left)}.size-s[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-top);left:var(--cue-input-s-label-left)}.size-m[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-top);left:var(--cue-input-m-label-left)}.size-l[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-top);left:var(--cue-input-l-label-left)}.form-field.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .form-field.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{color:var(--cue-input-value-color)}.size-xs.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-xs.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-focused-top);font-size:var(--cue-input-xs-label-focused-font-size)}.size-s.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-s.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-focused-top);font-size:var(--cue-input-s-label-focused-font-size)}.size-m.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-m.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-focused-top);font-size:var(--cue-input-m-label-focused-font-size)}.size-l.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-l.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-focused-top);font-size:var(--cue-input-l-label-focused-font-size)}cue-menu[_ngcontent-%COMP%]{width:100%}.error-text[_ngcontent-%COMP%]{color:var(--cue-error);margin-top:4px;min-height:18px}"],changeDetection:0})}return o})();const xe=["*"],B=()=>[],S=()=>({});function Pe(o,u){if(1&o&&(e.j41(0,"cue-typography"),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2);e.R7$(),e.JRh(t.config().message)}}function Oe(o,u){if(1&o&&(e.nrm(0,"cue-key-val",4),e.nI1(1,"transloco")),2&o){const t=e.XpG(2);e.Y8G("key",e.mNQ(e.bMT(1,3,"components.modals.rdfEdit.labelExistingValue")))("val",t.existingValue())}}function De(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input",15),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("error",t.valueError())}}function ze(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input",16),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("error",t.valueError())}}function ke(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input-date",17),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("error",t.valueError())}}function Ve(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",8)(1,"cue-typography"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"cue-input-switch",18),e.bIt("checkedChange",function(n){a.eBV(t);const l=e.XpG(2);return a.Njj(l.onBooleanChange(n))}),e.k0s()()}if(2&o){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,2,"components.modals.rdfEdit.labelSetNewValue")),e.R7$(2),e.Y8G("checked","true"===t.newValue())}}function Ee(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-select",19),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,7,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("options",t.config().options||e.lJ4(9,B))("labelMap",t.config().optionLabelMap||e.lJ4(10,S))("showFilter",t.optionsCount()>5)("error",t.valueError())}}function Fe(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-multi-select",19),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,7,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("options",t.config().options||e.lJ4(9,B))("labelMap",t.config().optionLabelMap||e.lJ4(10,S))("showFilter",t.optionsCount()>5)("error",t.valueError())}}function Re(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input-multiline",20),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.comment,n)||(l.comment=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,3,"components.modals.rdfEdit.labelComment"))),e.R50("value",t.comment)}}function we(o,u){if(1&o&&(e.j41(0,"cue-typography",11),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2);e.R7$(),e.JRh(t.error())}}function Te(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-modal",1),e.bIt("close",function(){a.eBV(t);const n=e.XpG();return a.Njj(n.onClose())}),e.j41(1,"cue-flexcontainer",2),e.SdG(2),e.nVh(3,Pe,2,1,"cue-typography"),e.j41(4,"cue-flexcontainer",3),e.nVh(5,Oe,2,5,"cue-key-val",4),e.nVh(6,De,2,6,"cue-input",5),e.nVh(7,ze,2,6,"cue-input",6),e.nVh(8,ke,2,6,"cue-input-date",7),e.nVh(9,Ve,5,4,"cue-flexcontainer",8),e.nVh(10,Ee,2,11,"cue-select",9),e.nVh(11,Fe,2,11,"cue-multi-select",9),e.k0s(),e.nVh(12,Re,2,5,"cue-input-multiline",10),e.nVh(13,we,2,1,"cue-typography",11),e.j41(14,"cue-flexcontainer",12)(15,"cue-button",13),e.bIt("click",function(){a.eBV(t);const n=e.XpG();return a.Njj(n.onClose())}),e.j41(16,"cue-button-label"),e.EFF(17),e.nI1(18,"transloco"),e.k0s()(),e.j41(19,"cue-button",14),e.bIt("click",function(){a.eBV(t);const n=e.XpG();return a.Njj(n.onSave())}),e.j41(20,"cue-button-label"),e.EFF(21),e.nI1(22,"transloco"),e.k0s()()()()()}if(2&o){const t=e.XpG();e.Y8G("displayCloseBtn",!1)("closeOnBackgroundClick",!1),e.R7$(3),e.vxM(t.config().message?3:-1),e.R7$(2),e.vxM("boolean"!==t.config().dataType?5:-1),e.R7$(),e.vxM("string"===t.config().dataType?6:-1),e.R7$(),e.vxM("number"===t.config().dataType?7:-1),e.R7$(),e.vxM("date"===t.config().dataType?8:-1),e.R7$(),e.vxM("boolean"===t.config().dataType?9:-1),e.R7$(),e.vxM("select"===t.config().dataType?10:-1),e.R7$(),e.vxM("multiselect"===t.config().dataType?11:-1),e.R7$(),e.vxM(t.identical()?-1:12),e.R7$(),e.vxM(t.error()?13:-1),e.R7$(2),e.Y8G("disabled",t.saving()),e.R7$(2),e.JRh(e.bMT(18,17,"components.modals.rdfEdit.buttonCancel")),e.R7$(2),e.Y8G("disabled",t.saving()||t.identical())("loading",t.saving()),e.R7$(2),e.JRh(e.bMT(22,19,"components.modals.rdfEdit.buttonSave"))}}let je=(()=>{class o{visible=(0,s.geq)(!0);config=s.hFB.required();close=(0,s.CGW)();existingValue=(0,p.EW)(()=>{let t="";return t=Array.isArray(this.config().existingValue)?this.config().existingValue.map(n=>this._getLabel(n)).join(", "):this._getLabel(this.config().existingValue),t});newValue=(0,p.uu)(()=>this.config().existingValue);comment=(0,a.vPA)("");errorID=(0,s.geq)("");error=(0,f.Xx)(this.errorID);saving=(0,a.vPA)(!1);pristine=(0,a.vPA)(!0);identical=(0,p.EW)(()=>!this.config().hasExternalChanges&&this.newValue()===this.config().existingValue);valueErrorID=(0,p.EW)(()=>this.pristine()?"":this.identical()?"components.modals.rdfEdit.errorIdenticalValue":"");valueError=(0,f.Xx)(this.valueErrorID);optionsCount=(0,p.EW)(()=>this.config().options?.length||0);constructor(){(0,a.QZP)(()=>{this.pristine()&&this.newValue()!==this.config().existingValue&&this.pristine.set(!1)})}onSave(){var t=this;return(0,c.A)(function*(){t.saving.set(!0),t.errorID.set("");try{const i=t.config();yield i.requestSave({newValue:t.newValue(),comment:t.comment(),previousValue:i.existingValue}),t.visible.set(!1),t.close.emit(t.newValue())}catch(i){console.error("Error saving RDF edit:",i),t.errorID.set("components.modals.rdfEdit.errorSaving")}t.saving.set(!1)})()}onClose(){this.visible.set(!1),this.close.emit(null)}onBooleanChange(t){this.newValue.set(t?"true":"false")}_getLabel(t){const i=this.config().optionLabelMap;return void 0!==i&&i[t]||t}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-modal-rdf-edit"]],inputs:{visible:[1,"visible"],config:[1,"config"],errorID:[1,"errorID"]},outputs:{visible:"visibleChange",close:"close",errorID:"errorIDChange"},ngContentSelectors:xe,decls:1,vars:1,consts:[[3,"displayCloseBtn","closeOnBackgroundClick"],[3,"close","displayCloseBtn","closeOnBackgroundClick"],["direction","column","align","center"],["direction","column","gap","m"],[3,"key","val"],["type","text",3,"label","value","error"],["type","number",3,"label","value","error"],[3,"label","value","error"],["direction","row","align","center","justify","space-between","gap","l"],[3,"value","options","labelMap","label","showFilter","error"],[2,"width","100%",3,"label","value"],[2,"color","var(--cue-error)"],["direction","row","justify","center",2,"width","100%"],[3,"click","disabled"],["variant","secondary",3,"click","disabled","loading"],["type","text",3,"valueChange","label","value","error"],["type","number",3,"valueChange","label","value","error"],[3,"valueChange","label","value","error"],[3,"checkedChange","checked"],[3,"valueChange","value","options","labelMap","label","showFilter","error"],[2,"width","100%",3,"valueChange","label","value"]],template:function(i,n){1&i&&(e.NAR(),e.nVh(0,Te,23,21,"cue-modal",0)),2&i&&e.vxM(n.visible()?0:-1)},dependencies:[R.a,C.n,D.$,b.Typography,w.F,y.p,V.L,z.l,ye,q,ee.d,de,f.Kj],styles:[".col[_ngcontent-%COMP%]{flex:1;min-width:0;height:100%}"]})}return o})();var Y=r(7335);function Ne(o,u){1&o&&(e.j41(0,"span",7),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(),e.SpI("(",e.bMT(2,1,"components.keyVal.edited"),")"))}function Ie(o,u){if(1&o){const t=e.RV6();e.j41(0,"span",5),e.bIt("click",function(){a.eBV(t);const n=e.XpG();return a.Njj(n.onReadClick())}),e.j41(1,"span",6),e.EFF(2),e.k0s(),e.nVh(3,Ne,3,3,"span",7),e.k0s()}if(2&o){const t=e.XpG();e.AVh("interactive",!t.editDisabled()),e.Y8G("menuItems",t.hoverMenu()),e.R7$(2),e.Lme("",t.valueFormatted()," ",t.suffix()),e.R7$(),e.vxM(t.isDirty()?3:-1)}}function Ge(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-select",10),e.bIt("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return a.Njj(l.selectionChange(n))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("value",t.newValue())("options",t.options())}}function Be(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-inline-input",11),e.bIt("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return a.Njj(l.inputChange(n))}),e.k0s(),e.EFF(1)}if(2&o){const t=e.XpG(2);e.Y8G("value",t.valueFormatted()),e.R7$(),e.SpI(" ",t.suffix()," ")}}function Se(o,u){if(1&o&&(e.j41(0,"cue-flexcontainer",3),e.nVh(1,Ge,1,2,"cue-select",8)(2,Be,2,2),e.nrm(3,"cue-entity-menu",9),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.vxM(void 0!==t.options()&&t.options().length?1:2),e.R7$(2),e.Y8G("items",t.saveCancelMenu())}}function Ye(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-modal-rdf-edit",12),e.mxI("visibleChange",function(n){a.eBV(t);const l=e.XpG();return e.DH7(l.rdfModalVisible,n)||(l.rdfModalVisible=n),a.Njj(n)}),e.bIt("close",function(n){a.eBV(t);const l=e.XpG();return a.Njj(l.onRdfModalClose(n))}),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("config",u),e.R50("visible",t.rdfModalVisible)}}let Ae=(()=>{class o{entityMenuDirective;size=(0,s.hFB)("m");key=s.hFB.required();val=s.geq.required();originalValue=(0,s.hFB)(void 0);options=(0,s.hFB)([]);suffix=(0,s.hFB)("");rdfConfig=(0,s.hFB)();editDisabled=(0,s.hFB)(!1);valueChange=(0,s.CGW)();editModeEnabled=(0,a.vPA)(!1);isDirty=(0,p.EW)(()=>{const t=this.originalValue();return void 0!==t&&this.val()!==t});valueChanged=(0,p.EW)(()=>this.val()!==this.newValue());newValue=(0,p.uu)(()=>this.val());rdfModalVisible=(0,a.vPA)(!1);valueFormatted=(0,p.EW)(()=>this._idToString(this.val()));hoverMenu=(0,p.EW)(()=>{if(this.editModeEnabled()||this.editDisabled())return[];const t=[{icon:"edit",label:"Edit",action:()=>this.onReadClick()}];return this.isDirty()&&t.push({icon:"close",label:"Revert to original",action:()=>this._revert()}),t});onReadClick(){this.editDisabled()||(this.rdfConfig()?this.rdfModalVisible.set(!0):this.editModeEnabled.set(!0),this.entityMenuDirective?.removeOverlayMenu())}labelSize=(0,p.EW)(()=>{switch(this.size()){case"s":return"xs";case"m":return"s";case"l":return"m";case"xl":return"l"}});onKeyPress(t){this.editModeEnabled()&&("Escape"===t.key?(this._reset(),t.stopPropagation()):"Enter"===t.key&&this._emitChange())}saveCancelMenu=(0,p.EW)(()=>{const t=[{icon:"close",label:"Cancel",action:()=>this._reset()}];return this.valueChanged()&&t.push({icon:"save",label:"Save",action:()=>this._emitChange()}),t});selectionChange(t){this.newValue.set(t?.toString()??"")}inputChange(t){this.newValue.set(t)}_emitChange(){this.valueChange.emit(this.newValue()),this.val.set(this.newValue()),this.editModeEnabled.set(!1)}_reset(){this.newValue.set(this.val()),this.editModeEnabled.set(!1)}_revert(){const t=this.originalValue();void 0!==t&&(this.val.set(t),this.newValue.set(t),this.valueChange.emit(t),this.entityMenuDirective?.removeOverlayMenu())}_idToString(t){const i=this.rdfConfig()?.optionLabelMap;return i?i[t]??t:t}onRdfModalClose(t){if(this.rdfModalVisible.set(!1),null===t)return;const i=Array.isArray(t)?t.join(", "):t;this.val.set(i)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-key-val-editable"]],viewQuery:function(i,n){if(1&i&&e.GBs(Y.e,5),2&i){let l;e.mGM(l=e.lsd())&&(n.entityMenuDirective=l.first)}},hostBindings:function(i,n){1&i&&e.bIt("keydown",function(g){return n.onKeyPress(g)},e.EBC)},inputs:{size:[1,"size"],key:[1,"key"],val:[1,"val"],originalValue:[1,"originalValue"],options:[1,"options"],suffix:[1,"suffix"],rdfConfig:[1,"rdfConfig"],editDisabled:[1,"editDisabled"]},outputs:{val:"valChange",valueChange:"valueChange"},decls:9,vars:5,consts:[[1,"key-val-container"],[3,"size"],["cueEntityMenu","",1,"read-mode-container",3,"interactive","menuItems"],["direction","row","align","center"],[3,"config","visible"],["cueEntityMenu","",1,"read-mode-container",3,"click","menuItems"],[1,"value-content"],[1,"dirty-indicator"],[3,"value","options"],[3,"items"],[3,"valueChange","value","options"],[3,"valueChange","value"],[3,"visibleChange","close","config","visible"]],template:function(i,n){if(1&i&&(e.j41(0,"dl",0)(1,"dt")(2,"cue-typography",1),e.EFF(3),e.k0s()(),e.j41(4,"dd")(5,"cue-typography",1),e.nVh(6,Ie,4,6,"span",2)(7,Se,4,2,"cue-flexcontainer",3),e.k0s()()(),e.nVh(8,Ye,1,2,"cue-modal-rdf-edit",4)),2&i){let l;e.R7$(2),e.Y8G("size",n.labelSize()),e.R7$(),e.JRh(n.key()),e.R7$(2),e.Y8G("size",n.size()),e.R7$(),e.vxM(n.editModeEnabled()?n.rdfConfig()?-1:7:6),e.R7$(2),e.vxM((l=n.rdfConfig())?8:-1,l)}},dependencies:[b.Typography,Y.e,z.l,E.H,C.n,F.I,je,f.Kj],styles:[".key-val-container[_ngcontent-%COMP%]{margin:0;display:flex;flex-direction:column;gap:var(--cue-grid-gap-s, 8px)}dt[_ngcontent-%COMP%], dd[_ngcontent-%COMP%]{margin:0}.read-mode-container[_ngcontent-%COMP%]{display:inline-flex;align-items:center;width:100%;position:relative}.read-mode-container.interactive[_ngcontent-%COMP%]:hover{cursor:pointer}.value-content[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%]{color:var(--cue-typography-text-color, inherit)}dt[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%], dd[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%], .value-content[_ngcontent-%COMP%]{color:var(--cue-typography-text-color, inherit)!important}dt[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%] div[_ngcontent-%COMP%], dd[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{color:var(--cue-typography-text-color, inherit)!important}[_ngcontent-%COMP%]:deep(cue-svg-icon), [_ngcontent-%COMP%]:deep(cue-entity-menu cue-svg-icon){color:var(--cue-icon-color, inherit)!important}.dirty-indicator[_ngcontent-%COMP%]{opacity:.8;margin-left:4px;color:var(--cue-typography-text-color, inherit)!important;font-weight:700;font-size:.4em;transform:translateY(-1em)}"]})}return o})()},8547(j,O,r){r.d(O,{T:()=>z});var s=r(7705),a=r(29),p=r(6117),E=r(6279),F=r(356),c=r(5547),f=r(5802);const R=(_,M)=>M.label;function C(_,M){if(1&_&&c.nrm(0,"cue-svg-icon",4),2&_){const d=c.XpG(2).$implicit;c.Y8G("name",d.icon)}}function D(_,M){if(1&_&&c.nrm(0,"cue-menu-nested",6),2&_){const d=c.XpG(2).$implicit,h=c.XpG();c.Y8G("items",d.children)("size",h.size())}}function b(_,M){if(1&_&&(c.j41(0,"cue-menu",1)(1,"cue-menu-item",3),c.nVh(2,C,1,1,"cue-svg-icon",4),c.EFF(3),c.nrm(4,"cue-svg-icon",5),c.k0s(),c.nVh(5,D,1,2,"cue-menu-nested",6),c.k0s()),2&_){const d=c.XpG().$implicit,h=c.XpG();c.Y8G("size",h.size()),c.R7$(),c.Y8G("title",d.tooltip),c.R7$(),c.vxM(d.icon?2:-1),c.R7$(),c.SpI(" ",d.label," "),c.R7$(2),c.vxM(d.children?5:-1)}}function w(_,M){if(1&_&&c.nrm(0,"cue-svg-icon",4),2&_){const d=c.XpG(2).$implicit;c.Y8G("name",d.icon)}}function y(_,M){if(1&_){const d=c.RV6();c.j41(0,"cue-menu-item",7),c.bIt("click",function(){f.eBV(d);const e=c.XpG().$implicit;return f.Njj(null==e.action?null:e.action())}),c.nVh(1,w,1,1,"cue-svg-icon",4),c.EFF(2),c.k0s()}if(2&_){const d=c.XpG().$implicit;c.Y8G("title",d.tooltip),c.R7$(),c.vxM(d.icon?1:-1),c.R7$(),c.SpI(" ",d.label," ")}}function V(_,M){if(1&_&&c.nVh(0,b,6,5,"cue-menu",1)(1,y,3,3,"cue-menu-item",2),2&_){const d=M.$implicit;c.vxM(null!=d.children&&d.children.length?0:1)}}let z=(()=>{class _{items=s.hFB.required();size=(0,s.hFB)("m");static \u0275fac=function(h){return new(h||_)};static \u0275cmp=c.VBU({type:_,selectors:[["cue-menu-nested"]],inputs:{items:[1,"items"],size:[1,"size"]},decls:3,vars:1,consts:[[3,"size"],["trigger","hover",3,"size"],[3,"title"],["trigger","",3,"title"],["before","",3,"name"],["after","","name","paginator-next"],["menu","",3,"items","size"],[3,"click","title"]],template:function(h,e){1&h&&(c.j41(0,"cue-menu-wrap",0),c.Z7z(1,V,2,1,null,null,R),c.k0s()),2&h&&(c.Y8G("size",e.size()),c.R7$(),c.Dyx(e.items()))},dependencies:[_,p.W,E.D,F.M,a.A],encapsulation:2})}return _})()},7573(j,O,r){r.d(O,{E:()=>s});const s={qcy:"https://dev.qaecy.com/ont#","qcy-e":"https://dev.qaecy.com/enum#","qcy-f":"https://dev.qaecy.com/functions#",obc:"https://w3id.org/obc#",dicc:"https://w3id.org/digitalconstruction/0.5/Contexts#",dicv:"https://w3id.org/digitalconstruction/0.5/Variables#",dice:"https://w3id.org/digitalconstruction/0.5/Entities#",dicp:"https://w3id.org/digitalconstruction/0.5/Processes#",dica:"https://w3id.org/digitalconstruction/0.5/Agents#",dici:"https://w3id.org/digitalconstruction/0.5/Information#",dicbm:"https://w3id.org/digitalconstruction/0.5/Materials#",dicob:"https://w3id.org/digitalconstruction/0.5/Occupancy#",dicl:"https://w3id.org/digitalconstruction/0.5/Lifecycle#",dices:"https://w3id.org/digitalconstruction/0.5/Energy#",dicu:"https://w3id.org/digitalconstruction/0.5/Units#",diclvl:"https://w3id.org/digitalconstruction/0.5/Levels#",dicstg:"https://w3id.org/digitalconstruction/0.5/Stages#"}}}]);
package/791.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[791],{8791(I,w,m){m.d(w,{CueDocumentList:()=>R});var D=m(467),i=m(7705),u=m(5802),v=m(2271),O=m(4879),g=m(2065),_=m(4372),a=m(5381),p=m(2245),b=m(7851),L=m(7293),s=m(5547);function E(c,y){if(1&c&&(s.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),s.EFF(2),s.k0s()()),2&c){const t=s.XpG();s.R7$(2),s.SpI(" ",t.errorMessage()," ")}}function A(c,y){if(1&c&&s.nrm(0,"cue-logo-link",4),2&c){const t=s.XpG(2);s.Y8G("projectId",t.projectId())}}function j(c,y){if(1&c){const t=s.RV6();s.j41(0,"div",1)(1,"cue-doc-list",3),s.bIt("clickedDocument",function(o){u.eBV(t);const n=s.XpG();return u.Njj(n.clickedDocument.emit(o))})("clickedDownloadDocument",function(o){u.eBV(t);const n=s.XpG();return u.Njj(n.clickedDownloadDocument.emit(o))})("clickedOpenInDir",function(o){u.eBV(t);const n=s.XpG();return u.Njj(n.clickedOpenInDir.emit(o))})("clickedOpen",function(o){u.eBV(t);const n=s.XpG();return u.Njj(n.clickedOpen.emit(o))}),s.k0s(),s.nVh(2,A,1,1,"cue-logo-link",4),s.k0s()}if(2&c){const t=s.XpG();s.Y8G("cueLogoLoader","loading"===t.state()),s.R7$(),s.Y8G("documentRefs",t.documentRefs())("documentData",t.documentData())("handlers",t.handlers())("availableContentCategories",t.availableContentCategories())("detailedView",t.detailedView())("simple",t.simple())("pageSize",t.pageSize())("prefetchPages",t.prefetchPages())("showOpenInDocumentViewerAction",t.showOpenInDocumentViewerAction())("showOpenInFileManagerAction",t.showOpenInFileManagerAction())("customOverlayActions",t.customOverlayActions())("variant",t.variant()),s.R7$(),s.vxM(t.showLogo()?2:-1)}}function M(c){return c.split("?")[0].trim()}let R=(()=>{class c{projectId=(0,i.hFB)(void 0);uuids=(0,i.hFB)([]);suffixes=(0,i.hFB)(void 0);mimeTypes=(0,i.hFB)(void 0);contentCategories=(0,i.hFB)(void 0);sdkState=(0,i.hFB)(void 0);detailedView=(0,i.hFB)(!1,{transform:i.L39});simple=(0,i.hFB)(!1,{transform:i.L39});pageSize=(0,i.hFB)(10,{transform:i.Udg});prefetchPages=(0,i.hFB)(3,{transform:i.Udg});showOpenInDocumentViewerAction=(0,i.hFB)(!1,{transform:i.L39});showOpenInFileManagerAction=(0,i.hFB)(!1,{transform:i.L39});customMenuItems=(0,i.hFB)([]);showLogo=(0,i.hFB)(!1,{transform:i.L39});variant=(0,i.hFB)("none");clickedDocument=(0,i.CGW)();clickedDownloadDocument=(0,i.CGW)();clickedOpenInDir=(0,i.CGW)();clickedOpen=(0,i.CGW)();state=(0,u.vPA)("idle");errorMessage=(0,u.vPA)(null);documentData=(0,u.vPA)({});availableContentCategories=(0,u.vPA)(void 0);_filterResolvedUuids=(0,u.vPA)(void 0);documentRefs=(0,v.EW)(()=>{const t=new Set;return(void 0!==this._filterResolvedUuids()?this._filterResolvedUuids()??[]:this.uuids()??[]).map(M).filter(o=>!!o).filter(o=>!t.has(o)&&(t.add(o),!0)).map(o=>({id:o}))});customOverlayActions=(0,v.EW)(()=>{const t=this.projectId();return[...t?[{label:"Open in Cue",icon:"external-link",action:n=>{const d=n.rowData;window.open(`https://cue.qaecy.com/r/${encodeURIComponent(t)}/${encodeURIComponent(d.id)}`,"_blank","noopener,noreferrer")}}]:[],...(this.customMenuItems()||[]).map(n=>({label:n.label,icon:n.icon,action:d=>{n.action(d.rowData,d)}}))]});handlers=(0,v.EW)(()=>{var t=this;const e=this._docs();if(e)return{requestData:(o=(0,D.A)(function*(n){const d=n.map(M).filter(l=>!!l),r=d.filter(l=>!t.documentData()[l]);if(console.debug("[CueDocumentListWC] requestData",{requestedCount:d.length,missingCount:r.length,missing:r}),r.length)try{const l=e,h=t.simple()&&l.fetchDocumentDataSimple?yield l.fetchDocumentDataSimple(r):yield e.fetchDocumentData(r);console.debug("[CueDocumentListWC] fetchDocumentData resolved",{fetchedCount:Object.keys(h).length,ids:Object.keys(h)});const C={};Object.values(h).forEach(f=>{C[f.id]=function P(c){return{id:c.id,path:c.path,suffix:c.suffix,size:c.size,contentIRI:c.contentIRI,providerId:c.providerId,tags:c.tags??[],summary:c.summary??"",categories:c.categories??[],subject:c.subject,relevance:0}}(f)}),Object.keys(C).length>0&&t.documentData.update(f=>({...f,...C}))}catch(l){console.error("[CueDocumentListWC] Failed to fetch document data:",l),t.errorMessage.set(l instanceof Error?l.message:String(l)),t.state.set("error")}}),function(d){return o.apply(this,arguments)}),requestDownload:function(){var o=(0,D.A)(function*(n){const d=t._cue(),r=t.projectId();if(d&&r)try{const l=yield d.storage.getDownloadUrl(r,n.id,n.suffix,"raw"),h=yield fetch(l);if(!h.ok)throw new Error(`Download failed: ${h.status} ${h.statusText}`);const C=yield h.blob(),f=(0,_.M)(n.path)||`${n.id}${n.suffix||""}`;(0,g.KE)(C,f)}catch(l){console.error("[CueDocumentListWC] Failed to download document:",l)}});return function(d){return o.apply(this,arguments)}}(),requestOpen:(o,n)=>{console.log("[CueDocumentListWC] requestOpen",{documentUUID:o,document:n})},requestOpenInDir:(o,n)=>{console.log("[CueDocumentListWC] requestOpenInDir",{documentUUID:o,document:n})}};var o});_cue=(0,u.vPA)(void 0);_docs=(0,u.vPA)(void 0);_ownedView;_inputWarningTimer;_unsubscribeCategories;_lastSetupSignature;constructor(){this._inputWarningTimer=setTimeout(()=>{this.projectId()||console.warn('[cue-document-list] Required input "projectId" is not set. Pass the Cue project ID to load documents.'),this.sdkState()||console.warn('[cue-document-list] Required input "sdkState" is not set. Pass a { cue, view, or documents } object to enable document loading.')},3e3),(0,u.QZP)(()=>{const t=this.projectId(),e=this.sdkState(),o=e?.language??"en";if(console.debug("[CueDocumentListWC] input state changed",{projectId:t,uuids:this.uuids().length,hasSdkState:!!e,hasCue:!!e?.cue,hasView:!!e?.view,hasDocuments:!!e?.documents}),!t||!e)return this._clearRuntimeState(),void this.state.set("idle");const n={projectId:t,cue:e.cue,view:e.view,documents:e.documents,language:o,simple:this.simple()};if(this._isSameSetupSignature(n))return this.state.set("ready"),void this.errorMessage.set(null);this._setupFromSdkState(t,e),this._lastSetupSignature=n,this.state.set("ready"),this.errorMessage.set(null)}),(0,u.QZP)(()=>{const t=this.suffixes(),e=this.mimeTypes(),o=this.contentCategories(),n=this._docs();void 0!==t||void 0!==e||void 0!==o?this._fetchByFilter(t,e,o,n):this._filterResolvedUuids.set(void 0)}),(0,u.QZP)(()=>{const t=new Set(this.documentRefs().map(e=>e.id));this.documentData.update(e=>Object.fromEntries(Object.entries(e).filter(([n])=>t.has(n))))})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0}_setupFromSdkState(t,e){const o=e.language??"en";if(this.documentData.set({}),this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0,this.availableContentCategories.set(e.availableContentCategories?e.availableContentCategories:void 0),e.documents)return e.documents.setLanguage(o),this._docs.set(e.documents),void this._cue.set(e.cue);if(e.view)return e.view.setLanguage(o),this._docs.set(e.view.documents),this._cue.set(e.cue),void(this.simple()||this._bindCategoriesFromView(e.view));if(e.cue){if(this.simple())return this._docs.set(e.cue.createProjectDocuments(t)),this._cue.set(e.cue),void this.availableContentCategories.set(void 0);const n=e.cue.createProjectView(t,{language:o});return this._ownedView=n,this._docs.set(n.documents),this._cue.set(e.cue),void this._bindCategoriesFromView(n)}this._docs.set(void 0),this._cue.set(void 0),this.errorMessage.set("sdkState must include cue, view, or documents to load data."),this.state.set("error")}_bindCategoriesFromView(t){const e=()=>{this.availableContentCategories.set(t.availableContentCategories.get())};e(),this._unsubscribeCategories=t.availableContentCategories.subscribe(e)}_clearRuntimeState(){this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0,this._docs.set(void 0),this._cue.set(void 0),this.documentData.set({}),this.availableContentCategories.set(void 0),this.errorMessage.set(null),this._lastSetupSignature=void 0}_cleanupOwnedView(){this._ownedView&&(this._ownedView.destroy(),this._ownedView=void 0)}_fetchByFilter(t,e,o,n){var d=this;return(0,D.A)(function*(){if(n){d.state.set("loading");try{let r;if(void 0!==t&&t.length>0)r=yield n.documentsBySuffix(t);else if(void 0!==e&&e.length>0)r=yield n.documentsByMime(e);else{if(!(void 0!==o&&o.length>0))return d._filterResolvedUuids.set([]),void d.state.set("ready");r=yield n.documentsByContentCategory(o)}d._filterResolvedUuids.set(r.map(l=>l.uuid)),d.state.set("ready")}catch(r){console.error("[CueDocumentListWC] Failed to fetch documents by filter",r),d.errorMessage.set(r instanceof Error?r.message:"Failed to load documents."),d.state.set("error")}}else d._filterResolvedUuids.set([])})()}_isSameSetupSignature(t){const e=this._lastSetupSignature;return!!e&&e.projectId===t.projectId&&e.cue===t.cue&&e.view===t.view&&e.documents===t.documents&&e.language===t.language&&e.simple===t.simple}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=s.VBU({type:c,selectors:[["cue-document-list"]],inputs:{projectId:[1,"projectId"],uuids:[1,"uuids"],suffixes:[1,"suffixes"],mimeTypes:[1,"mimeTypes"],contentCategories:[1,"contentCategories"],sdkState:[1,"sdkState"],detailedView:[1,"detailedView"],simple:[1,"simple"],pageSize:[1,"pageSize"],prefetchPages:[1,"prefetchPages"],showOpenInDocumentViewerAction:[1,"showOpenInDocumentViewerAction"],showOpenInFileManagerAction:[1,"showOpenInFileManagerAction"],customMenuItems:[1,"customMenuItems"],showLogo:[1,"showLogo"],variant:[1,"variant"]},outputs:{clickedDocument:"clickedDocument",clickedDownloadDocument:"clickedDownloadDocument",clickedOpenInDir:"clickedOpenInDir",clickedOpen:"clickedOpen"},decls:2,vars:1,consts:[["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","relative","width","100%",3,"cueLogoLoader"],[2,"color","#c44","font-size","13px"],[3,"clickedDocument","clickedDownloadDocument","clickedOpenInDir","clickedOpen","documentRefs","documentData","handlers","availableContentCategories","detailedView","simple","pageSize","prefetchPages","showOpenInDocumentViewerAction","showOpenInFileManagerAction","customOverlayActions","variant"],[2,"position","absolute","top","8px","left","8px","z-index","5",3,"projectId"]],template:function(e,o){1&e&&s.nVh(0,E,3,1,"cue-flexcontainer",0)(1,j,3,14,"div",1),2&e&&s.vxM("error"===o.state()?0:1)},dependencies:[O.g,a.n,p.Typography,b.k,L.x],styles:["[_nghost-%COMP%]{display:block;width:100%}"],changeDetection:0})}return c})()},2065(I,w,m){function u(g,_,a="text/plain"){return function D(g,_="data.zip"){const a=document.createElement("a"),p=URL.createObjectURL(g);a.href=p,a.download=_,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(p)}(new Blob([g],{type:a}),_)}function v(g,_){const a=document.createElement("a");a.style.display="hidden",a.setAttribute("href",window.URL.createObjectURL(g)),a.setAttribute("download",_),document.body.appendChild(a),a.click(),a.remove()}m.d(w,{KE:()=>v,YN:()=>u})}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[791],{8791(R,v,l){l.d(v,{CueDocumentList:()=>j});var h=l(467),o=l(7705),u=l(5802),p=l(2271),C=l(4879),w=l(2065),b=l(4372),M=l(5381),O=l(2245),I=l(7851),y=l(7293),i=l(5547);function E(c,D){if(1&c&&(i.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),i.EFF(2),i.k0s()()),2&c){const t=i.XpG();i.R7$(2),i.SpI(" ",t.errorMessage()," ")}}function L(c,D){if(1&c&&i.nrm(0,"cue-logo-link",4),2&c){const t=i.XpG(2);i.Y8G("projectId",t.projectId())}}function P(c,D){if(1&c){const t=i.RV6();i.j41(0,"div",1)(1,"cue-doc-list",3),i.bIt("clickedDocument",function(s){u.eBV(t);const n=i.XpG();return u.Njj(n.clickedDocument.emit(s))})("clickedDownloadDocument",function(s){u.eBV(t);const n=i.XpG();return u.Njj(n.clickedDownloadDocument.emit(s))})("clickedOpenInDir",function(s){u.eBV(t);const n=i.XpG();return u.Njj(n.clickedOpenInDir.emit(s))})("clickedOpen",function(s){u.eBV(t);const n=i.XpG();return u.Njj(n.clickedOpen.emit(s))}),i.k0s(),i.nVh(2,L,1,1,"cue-logo-link",4),i.k0s()}if(2&c){const t=i.XpG();i.Y8G("cueLogoLoader","loading"===t.state()),i.R7$(),i.Y8G("documentRefs",t.documentRefs())("documentData",t.documentData())("handlers",t.handlers())("availableContentCategories",t.availableContentCategories())("detailedView",t.detailedView())("simple",t.simple())("pageSize",t.pageSize())("prefetchPages",t.prefetchPages())("showOpenInDocumentViewerAction",t.showOpenInDocumentViewerAction())("showOpenInFileManagerAction",t.showOpenInFileManagerAction())("customOverlayActions",t.customOverlayActions())("variant",t.variant()),i.R7$(),i.vxM(t.showLogo()?2:-1)}}function f(c){return c.split("?")[0].trim()}let j=(()=>{class c{projectId=(0,o.hFB)(void 0);uuids=(0,o.hFB)([]);suffixes=(0,o.hFB)(void 0);mimeTypes=(0,o.hFB)(void 0);contentCategories=(0,o.hFB)(void 0);sdkState=(0,o.hFB)(void 0);detailedView=(0,o.hFB)(!1,{transform:o.L39});simple=(0,o.hFB)(!1,{transform:o.L39});pageSize=(0,o.hFB)(10,{transform:o.Udg});prefetchPages=(0,o.hFB)(3,{transform:o.Udg});showOpenInDocumentViewerAction=(0,o.hFB)(!1,{transform:o.L39});showOpenInFileManagerAction=(0,o.hFB)(!1,{transform:o.L39});customMenuItems=(0,o.hFB)([]);showLogo=(0,o.hFB)(!1,{transform:o.L39});variant=(0,o.hFB)("none");clickedDocument=(0,o.CGW)();clickedDownloadDocument=(0,o.CGW)();clickedOpenInDir=(0,o.CGW)();clickedOpen=(0,o.CGW)();state=(0,u.vPA)("idle");errorMessage=(0,u.vPA)(null);documentData=(0,u.vPA)({});availableContentCategories=(0,u.vPA)(void 0);_filterResolvedUuids=(0,u.vPA)(void 0);documentRefs=(0,p.EW)(()=>{const t=new Set;return(void 0!==this._filterResolvedUuids()?this._filterResolvedUuids()??[]:this.uuids()??[]).map(f).filter(s=>!!s).filter(s=>!t.has(s)&&(t.add(s),!0)).map(s=>({id:s}))});customOverlayActions=(0,p.EW)(()=>{const t=this.projectId();return[...t?[{label:"Open in Cue",icon:"external-link",action:n=>{const a=n.rowData;window.open(`https://cue.qaecy.com/r/${encodeURIComponent(t)}/${encodeURIComponent(a.id)}`,"_blank","noopener,noreferrer")}}]:[],...(this.customMenuItems()||[]).map(n=>({label:n.label,icon:n.icon,action:a=>{n.action(a.rowData,a)}}))]});handlers=(0,p.EW)(()=>{var t=this;const e=this._docs();if(e)return{requestData:(s=(0,h.A)(function*(n){const a=n.map(f).filter(d=>!!d),r=a.filter(d=>!t.documentData()[d]);if(console.debug("[CueDocumentListWC] requestData",{requestedCount:a.length,missingCount:r.length,missing:r}),r.length)try{const d=e,m=t.simple()&&d.fetchDocumentDataSimple?yield d.fetchDocumentDataSimple(r):yield e.fetchDocumentData(r);console.debug("[CueDocumentListWC] fetchDocumentData resolved",{fetchedCount:Object.keys(m).length,ids:Object.keys(m)});const g={};Object.values(m).forEach(_=>{g[_.id]=function A(c){return{id:c.id,path:c.path,suffix:c.suffix,size:c.size,contentIRI:c.contentIRI,providerId:c.providerId,tags:c.tags??[],summary:c.summary??"",categories:c.categories??[],subject:c.subject,relevance:0}}(_)}),Object.keys(g).length>0&&t.documentData.update(_=>({..._,...g}))}catch(d){console.error("[CueDocumentListWC] Failed to fetch document data:",d),t.errorMessage.set(d instanceof Error?d.message:String(d)),t.state.set("error")}}),function(a){return s.apply(this,arguments)}),requestDownload:function(){var s=(0,h.A)(function*(n){const a=t._cue(),r=t.projectId();if(a&&r)try{const d=yield a.storage.getDownloadUrl(r,n.id,n.suffix,"raw"),m=yield fetch(d);if(!m.ok)throw new Error(`Download failed: ${m.status} ${m.statusText}`);const g=yield m.blob(),_=(0,b.M)(n.path)||`${n.id}${n.suffix||""}`;(0,w.KE)(g,_)}catch(d){console.error("[CueDocumentListWC] Failed to download document:",d)}});return function(a){return s.apply(this,arguments)}}(),requestOpen:(s,n)=>{console.log("[CueDocumentListWC] requestOpen",{documentUUID:s,document:n})},requestOpenInDir:(s,n)=>{console.log("[CueDocumentListWC] requestOpenInDir",{documentUUID:s,document:n})}};var s});_cue=(0,u.vPA)(void 0);_docs=(0,u.vPA)(void 0);_ownedView;_inputWarningTimer;_unsubscribeCategories;_lastSetupSignature;constructor(){this._inputWarningTimer=setTimeout(()=>{this.projectId()||console.warn('[cue-document-list] Required input "projectId" is not set. Pass the Cue project ID to load documents.'),this.sdkState()||console.warn('[cue-document-list] Required input "sdkState" is not set. Pass a { cue, view, or documents } object to enable document loading.')},3e3),(0,u.QZP)(()=>{const t=this.projectId(),e=this.sdkState(),s=e?.language??"en";if(console.debug("[CueDocumentListWC] input state changed",{projectId:t,uuids:this.uuids().length,hasSdkState:!!e,hasCue:!!e?.cue,hasView:!!e?.view,hasDocuments:!!e?.documents}),!t||!e)return this._clearRuntimeState(),void this.state.set("idle");const n={projectId:t,cue:e.cue,view:e.view,documents:e.documents,language:s,simple:this.simple()};if(this._isSameSetupSignature(n))return this.state.set("ready"),void this.errorMessage.set(null);this._setupFromSdkState(t,e),this._lastSetupSignature=n,this.state.set("ready"),this.errorMessage.set(null)}),(0,u.QZP)(()=>{const t=this.suffixes(),e=this.mimeTypes(),s=this.contentCategories(),n=this._docs();void 0!==t||void 0!==e||void 0!==s?this._fetchByFilter(t,e,s,n):this._filterResolvedUuids.set(void 0)}),(0,u.QZP)(()=>{const t=new Set(this.documentRefs().map(e=>e.id));this.documentData.update(e=>Object.fromEntries(Object.entries(e).filter(([n])=>t.has(n))))})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0}_setupFromSdkState(t,e){const s=e.language??"en";if(this.documentData.set({}),this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0,this.availableContentCategories.set(e.availableContentCategories?e.availableContentCategories:void 0),e.documents)return e.documents.setLanguage(s),this._docs.set(e.documents),void this._cue.set(e.cue);if(e.view)return e.view.setLanguage(s),this._docs.set(e.view.documents),this._cue.set(e.cue),void(this.simple()||this._bindCategoriesFromView(e.view));if(e.cue){if(this.simple())return this._docs.set(e.cue.createProjectDocuments(t)),this._cue.set(e.cue),void this.availableContentCategories.set(void 0);const n=e.cue.createProjectView(t,{language:s});return this._ownedView=n,this._docs.set(n.documents),this._cue.set(e.cue),void this._bindCategoriesFromView(n)}this._docs.set(void 0),this._cue.set(void 0),this.errorMessage.set("sdkState must include cue, view, or documents to load data."),this.state.set("error")}_bindCategoriesFromView(t){const e=()=>{this.availableContentCategories.set(t.availableContentCategories.get())};e(),this._unsubscribeCategories=t.availableContentCategories.subscribe(e)}_clearRuntimeState(){this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0,this._docs.set(void 0),this._cue.set(void 0),this.documentData.set({}),this.availableContentCategories.set(void 0),this.errorMessage.set(null),this._lastSetupSignature=void 0}_cleanupOwnedView(){this._ownedView&&(this._ownedView.destroy(),this._ownedView=void 0)}_fetchByFilter(t,e,s,n){var a=this;return(0,h.A)(function*(){if(n){a.state.set("loading");try{let r;if(void 0!==t&&t.length>0)r=yield n.documentsBySuffix(t);else if(void 0!==e&&e.length>0)r=yield n.documentsByMime(e);else{if(!(void 0!==s&&s.length>0))return a._filterResolvedUuids.set([]),void a.state.set("ready");r=yield n.documentsByContentCategory(s)}a._filterResolvedUuids.set(r.map(d=>d.uuid)),a.state.set("ready")}catch(r){console.error("[CueDocumentListWC] Failed to fetch documents by filter",r),a.errorMessage.set(r instanceof Error?r.message:"Failed to load documents."),a.state.set("error")}}else a._filterResolvedUuids.set([])})()}_isSameSetupSignature(t){const e=this._lastSetupSignature;return!!e&&e.projectId===t.projectId&&e.cue===t.cue&&e.view===t.view&&e.documents===t.documents&&e.language===t.language&&e.simple===t.simple}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=i.VBU({type:c,selectors:[["cue-document-list"]],inputs:{projectId:[1,"projectId"],uuids:[1,"uuids"],suffixes:[1,"suffixes"],mimeTypes:[1,"mimeTypes"],contentCategories:[1,"contentCategories"],sdkState:[1,"sdkState"],detailedView:[1,"detailedView"],simple:[1,"simple"],pageSize:[1,"pageSize"],prefetchPages:[1,"prefetchPages"],showOpenInDocumentViewerAction:[1,"showOpenInDocumentViewerAction"],showOpenInFileManagerAction:[1,"showOpenInFileManagerAction"],customMenuItems:[1,"customMenuItems"],showLogo:[1,"showLogo"],variant:[1,"variant"]},outputs:{clickedDocument:"clickedDocument",clickedDownloadDocument:"clickedDownloadDocument",clickedOpenInDir:"clickedOpenInDir",clickedOpen:"clickedOpen"},decls:2,vars:1,consts:[["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","relative","width","100%",3,"cueLogoLoader"],[2,"color","#c44","font-size","13px"],[3,"clickedDocument","clickedDownloadDocument","clickedOpenInDir","clickedOpen","documentRefs","documentData","handlers","availableContentCategories","detailedView","simple","pageSize","prefetchPages","showOpenInDocumentViewerAction","showOpenInFileManagerAction","customOverlayActions","variant"],[2,"position","absolute","top","8px","left","8px","z-index","5",3,"projectId"]],template:function(e,s){1&e&&i.nVh(0,E,3,1,"cue-flexcontainer",0)(1,P,3,14,"div",1),2&e&&i.vxM("error"===s.state()?0:1)},dependencies:[C.g,M.n,O.Typography,I.k,y.x],styles:["[_nghost-%COMP%]{display:block;width:100%}"],changeDetection:0})}return c})()}}]);
package/839.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[839],{2014(k,D,o){o.d(D,{z:()=>_});var C=o(7705),s=o(2271),d=o(5547);const m=["*"];let _=(()=>{class h{justify=(0,C.hFB)("start");size=(0,C.hFB)("l");widthStyle=(0,s.EW)(()=>`var(--cue-button-label-padding-${this.size()}-x)`);static \u0275fac=function(f){return new(f||h)};static \u0275cmp=d.VBU({type:h,selectors:[["cue-button-padder"]],inputs:{justify:[1,"justify"],size:[1,"size"]},ngContentSelectors:m,decls:2,vars:4,template:function(f,b){1&f&&(d.NAR(),d.rj2(0,"div"),d.SdG(1),d.eux()),2&f&&d.xc7("justify-content",b.justify())("min-width",b.widthStyle())},styles:["div[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1px}"]})}return h})()},2839(k,D,o){o.d(D,{u:()=>F});var C=o(467),s=o(5802),d=o(7705),m=o(2271),_=o(2611),h=o(9352),L=o(1951),M=o(6455),f=o(8334),b=o(5949),x=o(2843),P=o(3646),g=o(8017),y=o(2306),u=o(6103);let p=(()=>{class l{mapboxToken=(0,s.vPA)(void 0);entityData=(0,s.vPA)({});availableEntityRelationships=(0,s.vPA)([]);settings=(0,m.EW)(()=>{const t=this.mapboxToken();if(!t)return;const e=new y.yY;return e.mapboxToken=t,e.contextMenu.showFlyTo=!1,e.contextMenu.showProperties=!1,e});layers=(0,m.EW)(()=>{const t=this.entityData(),e=this.availableEntityRelationships();return(0,u.N)({entityData:t,availableEntityRelationships:e})});static \u0275fac=function(e){return new(e||l)};static \u0275prov=s.jDH({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var A=o(3183),R=o(5902);let B=(()=>{class l{entities=(0,s.vPA)([]);entityData=(0,s.vPA)({});orderByMentionCount=(0,s.vPA)(!1);availableEntityCategories=(0,s.vPA)(void 0);labelValue=(0,h.Xx)("components.entityList.labelValue");labelCategories=(0,h.Xx)("components.entityList.labelCategories");labelMentions=(0,h.Xx)("components.entityList.labelMentionCount");_filterChangeCounter=(0,s.vPA)(0);filterChangeCounter=this._filterChangeCounter.asReadonly();onFilterChanged(){this._filterChangeCounter.update(t=>t+1)}columnDefs=(0,m.EW)(()=>{const t=[{field:"value",headerName:this.labelValue(),flex:2,filter:R.U,valueGetter:e=>!e.data?.value&&e.data?.loading?"Loading...":e.data?.value||e.data?.entity},{field:"categories",headerName:this.labelCategories(),flex:1.5,filter:A.A,valueGetter:e=>{const n=e.data?.categories;if(!n)return e.data?.loading?"...":"";const a=Array.isArray(n)?n:[n],r=this._leafEntityCategoryIris();return(r?a.filter(v=>r.has(v)):a).map(v=>this._getEntityCategoryLabel(v)).join(", ")}}];return this.orderByMentionCount()&&t.push({field:"mentionCount",headerName:this.labelMentions(),flex:1,filter:"agNumberColumnFilter",valueGetter:e=>{const n=e.data;if(n?.loading)return"...";const a=n?.mentionCount??0;return a>0?a:""},cellStyle:{textAlign:"center"}}),t});rows=(0,m.EW)(()=>{const t=this.entities()||[],e=this.entityData()||{},n=t.map(a=>{const r=e[a];return{entity:a,value:r?.value,categories:r?.categories,mentionCount:r?.mentionCount,loading:!r}});return this.orderByMentionCount()?n.sort((a,r)=>(r.mentionCount||0)-(a.mentionCount||0)):n});_leafEntityCategoryIris=(0,m.EW)(()=>{const t=this.availableEntityCategories();if(!t)return null;const e=new Set(t.map(n=>n.parent).filter(n=>!!n));return new Set(t.filter(n=>!e.has(n.iri)).map(n=>n.iri))});_getEntityCategoryLabel(t){const e=this.availableEntityCategories();if(void 0!==e){const n=e.find(a=>a.iri===t);if(n)return n.label}return this._prettifyCategory(t)}_prettifyCategory(t){if(!t)return"";const e=t.split("#");return(e[e.length-1]||t).replace(/([A-Z])/g," $1").trim()}static \u0275fac=function(e){return new(e||l)};static \u0275prov=s.jDH({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var T=o(5971),w=o(5448),O=o(2014),G=o(5381),i=o(5547);function U(l,z){if(1&l){const t=i.RV6();i.j41(0,"cue-flexcontainer",2)(1,"cue-button",5),i.bIt("click",function(){s.eBV(t);const n=i.XpG();return s.Njj(n.onOrderByMentionCountClick())}),i.nrm(2,"cue-button-padder"),i.j41(3,"cue-button-label"),i.EFF(4),i.nI1(5,"transloco"),i.k0s(),i.nrm(6,"cue-button-padder"),i.k0s()()}if(2&l){const t=i.XpG();i.R7$(),i.Y8G("tooltip",t.infoOrderByMentionCount()),i.R7$(3),i.JRh(i.bMT(5,2,"components.entityList.labelOrderByMentionCount"))}}function j(l,z){if(1&l){const t=i.RV6();i.j41(0,"cue-tab",1),i.nI1(1,"transloco"),i.j41(2,"cue-map",6),i.bIt("clickedFeature",function(n){s.eBV(t);const a=i.XpG();return s.Njj(a.onMapFeatureClick(n))}),i.k0s()()}if(2&l){i.XpG();const t=i.r8f(6),e=i.r8f(7);i.Y8G("label",i.bMT(1,3,"components.entityList.tabMap")),i.R7$(2),i.Y8G("layers",e)("settings",t)}}let F=(()=>{class l{map=(0,s.WQX)(p);table=(0,s.WQX)(B);entities=d.hFB.required();mapboxToken=(0,d.hFB)(void 0);handlers=d.hFB.required();availableEntityCategories=(0,d.hFB)(void 0);availableEntityRelationships=(0,d.hFB)();entityData=(0,d.hFB)({});paginationPageSize=(0,d.hFB)(10);prefetchPages=(0,d.hFB)(3);variant=(0,d.hFB)("none");rowClicked=(0,d.CGW)();clickedOpen=(0,d.CGW)();_gridApi=null;_requestedIris=new Set;_requestedLocationIris=new Set;_isSorted=!1;_pendingMapClickIri=(0,s.vPA)(null);_bufferedUntilIndex=(0,s.vPA)(0);_locationBufferedUntilIndex=0;_lastEntitiesKey="";_destroyed=!1;labelOpenInEntityViewer=(0,h.Xx)("components.entityList.labelOpenInEntityViewer");infoOrderByMentionCount=(0,h.Xx)("components.entityList.infoOrderByMentionCount");overlaySettings={...new L.K,mode:"row"};overlayActions=(0,m.EW)(()=>[{label:this.labelOpenInEntityViewer(),icon:"info",action:t=>{this.handlers().requestOpen?.(t.rowData),this.clickedOpen.emit(t.rowData)}}]);constructor(){(0,s.QZP)(()=>this.map.mapboxToken.set(this.mapboxToken())),(0,s.QZP)(()=>{const t=this.entityData();this.map.entityData.update(e=>{let n=!1;const a={...e};for(const[r,c]of Object.entries(t))(c.directMapGeometries?.length||c.indirectMapGeometries?.length)&&(a[r]={value:"",categories:[],directMapGeometries:c.directMapGeometries,indirectMapGeometries:c.indirectMapGeometries},n=!0);return n?a:e})}),(0,s.QZP)(()=>this.map.availableEntityRelationships.set(this.availableEntityRelationships()??[])),(0,s.QZP)(()=>this.table.availableEntityCategories.set(this.availableEntityCategories())),(0,s.QZP)(()=>this.table.entities.set(this.entities())),(0,s.QZP)(()=>this.table.entityData.set(this.entityData())),(0,s.QZP)(()=>{const t=this._pendingMapClickIri();if(!t)return;const e=this.entityData()[t];e&&(this._pendingMapClickIri.set(null),this.rowClicked.emit({entity:t,value:e.value,categories:e.categories,mentionCount:e.mentionCount,loading:!1}))}),(0,s.QZP)(()=>{const e=this.entities().join("|");if(e!==this._lastEntitiesKey)if(this._lastEntitiesKey=e,this._requestedIris.clear(),this._requestedLocationIris.clear(),this._bufferedUntilIndex.set(0),this._locationBufferedUntilIndex=0,this.handlers().checkHasLocations&&this.handlers().requestLocations){const n=(this.availableEntityCategories()??[]).map(a=>a.iri);this.handlers().checkHasLocations(n).then(a=>{a&&!this._destroyed&&this._requestLocationBatch()})}else this.handlers().requestLocations&&setTimeout(()=>this._requestLocationBatch())}),(0,s.QZP)(()=>{const t=this.table.orderByMentionCount(),e=this.table.filterChangeCounter();if(t||e>0){const r=this.entities().filter(c=>!this._requestedIris.has(c));r.length>0&&(r.forEach(c=>this._requestedIris.add(c)),this.handlers().requestData(r,t))}})}rowSelection={mode:"singleRow",checkboxes:!1,enableClickSelection:!0};onGridReady(t){this._gridApi=t,t.addEventListener("viewportChanged",()=>this._checkViewport()),t.addEventListener("modelUpdated",()=>this._checkViewport()),t.addEventListener("paginationChanged",()=>this._checkViewport()),t.addEventListener("sortChanged",()=>{const e=t.getColumnState();this._isSorted=e.some(n=>null!=n.sort),this._isSorted&&this._requestAllUnloaded()}),t.addEventListener("filterChanged",()=>{this.table.onFilterChanged()}),setTimeout(()=>this._checkViewport(),100)}onMapFeatureClick(t){var e=this;return(0,C.A)(function*(){const a=t.feature.properties?.iri;a&&(e._pendingMapClickIri.set(a),yield e.handlers().requestData?.([a],e.table.orderByMentionCount()))})()}_checkViewport(){if(!this._gridApi||this._gridApi.isDestroyed?.())return;if(this._isSorted)return void this._requestAllUnloaded();const t=this.entities(),e=t.length;if(!e)return;const n=Math.max(1,this._gridApi.paginationGetPageSize?.()??this.paginationPageSize()),r=Math.max(0,this._gridApi.paginationGetCurrentPage?.()??0)*n,c=Math.min(e,r+n),v=this._bufferedUntilIndex();let E=null;if(0===v?E=0:(r>=Math.max(0,v-n)||c>v)&&(E=v),null===E||E>=e)return;const V=n*Math.max(1,this.prefetchPages()),N=Math.min(e,E+V),S=t.slice(E,N).filter(I=>!this._requestedIris.has(I));this._bufferedUntilIndex.set(Math.max(v,N)),S.length&&(S.forEach(I=>this._requestedIris.add(I)),setTimeout(()=>this.handlers().requestData(S,this.table.orderByMentionCount())))}_requestLocationBatch(){if(!this.handlers().requestLocations)return;const t=this.entities(),e=t.length;if(this._locationBufferedUntilIndex>=e)return;const a=Math.min(e,this._locationBufferedUntilIndex+500),r=t.slice(this._locationBufferedUntilIndex,a).filter(c=>!this._requestedLocationIris.has(c));this._locationBufferedUntilIndex=a,r.length>0&&(r.forEach(c=>this._requestedLocationIris.add(c)),setTimeout(()=>this.handlers().requestLocations(r))),a<e&&!this._destroyed&&setTimeout(()=>this._requestLocationBatch(),200)}ngOnDestroy(){this._destroyed=!0,this._gridApi=null}_requestAllUnloaded(){if(!this._gridApi)return;const t=[];if(this._gridApi.forEachNode(e=>{const n=e.data;n?.loading&&!this._requestedIris.has(n.entity)&&t.push(n.entity)}),t.length>0){const e=Array.from(new Set(t));e.forEach(n=>this._requestedIris.add(n)),this.handlers().requestData(e,this.table.orderByMentionCount())}}onOrderByMentionCountClick(){this.table.orderByMentionCount.set(!this.table.orderByMentionCount())}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=i.VBU({type:l,selectors:[["cue-ent-list-inner"]],inputs:{entities:[1,"entities"],mapboxToken:[1,"mapboxToken"],handlers:[1,"handlers"],availableEntityCategories:[1,"availableEntityCategories"],availableEntityRelationships:[1,"availableEntityRelationships"],entityData:[1,"entityData"],paginationPageSize:[1,"paginationPageSize"],prefetchPages:[1,"prefetchPages"],variant:[1,"variant"]},outputs:{rowClicked:"rowClicked",clickedOpen:"clickedOpen"},features:[i.Jv_([b.u,x.M,P.B,p,B])],decls:9,vars:14,consts:[[2,"position","relative","width","100%","height","100%","display","flex","flex-direction","column","gap","12px",3,"variant"],[3,"label"],["direction","row","justify","end",2,"width","100%","padding-bottom","6px"],[2,"flex","1","min-height","0","position","relative","display","flex","flex-direction","column"],["height","100%",2,"flex","1","min-height","0",3,"gridApiReady","selectedRows","columnDefs","rowData","rowSelection","paginationPageSize","overlaySettings","overlayActions"],["size","xs","variant","secondary",3,"click","tooltip"],[3,"clickedFeature","layers","settings"]],template:function(e,n){if(1&e&&(i.j41(0,"cue-tabs",0)(1,"cue-tab",1),i.nI1(2,"transloco"),i.nVh(3,U,7,4,"cue-flexcontainer",2),i.j41(4,"div",3)(5,"cue-ag-grid",4),i.bIt("gridApiReady",function(r){return n.onGridReady(r)})("selectedRows",function(r){return r[0]&&n.rowClicked.emit(r[0])}),i.k0s()()(),i.SS7(6)(7),i.nVh(8,j,3,5,"cue-tab",1),i.k0s()),2&e){i.Y8G("variant",n.variant()),i.R7$(),i.Y8G("label",i.bMT(2,10,"components.entityList.tabList")),i.R7$(2),i.vxM(n.table.orderByMentionCount()?-1:3),i.R7$(2),i.Y8G("columnDefs",n.table.columnDefs())("rowData",n.table.rows())("rowSelection",n.rowSelection)("paginationPageSize",n.paginationPageSize())("overlaySettings",n.overlaySettings)("overlayActions",n.overlayActions()),i.R7$();const a=i.bH3(n.map.settings());i.R7$();const r=i.bH3(n.map.layers());i.R7$(),i.vxM(r.length>0&&a?8:-1)}},dependencies:[_.R,M.t,f.o,g.T,T.$,w.L,O.z,G.n,h.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return l})()},6103(k,D,o){o.d(D,{N:()=>m});var C=o(2306),s=o(140),d=o(58);function m({entityData:_,availableEntityRelationships:h}){const L=g=>h.find(y=>y.iri===g)?.label??g.split("#").pop()??g,M=[],f={};for(const[g,y]of Object.entries(_)){for(const u of y.directMapGeometries??[])M.push({iri:g,wkt:u.wkt});for(const u of y.indirectMapGeometries??[]){f[u.rel]||(f[u.rel]=[]);for(const p of u.geometries)f[u.rel].push({iri:u.entityUUID,wkt:p.wkt})}}const b=(g,y,u)=>{if(!y.length)return null;const p=new C.ux(g,g);return p.category=u,p.collection=new s.o(y.flatMap(({iri:A,wkt:R})=>{const B=(0,d.S)(R);return B?[{type:"Feature",geometry:(0,d.n)(B),properties:{iri:A}}]:[]})),p},x=[],P=b("direct",M,"Direct");P&&x.push(P);for(const[g,y]of Object.entries(f)){const u=L(g),p=b(u,y,u);p&&x.push(p)}return x}}}]);
package/855.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[855],{3183(P,x,o){o.d(x,{A:()=>C});var E=o(7705),_=o(5802),p=o(9417),m=o(1359),M=o(8957),T=o(2245),D=o(5381),a=o(5547);const r=(g,c)=>c.value;function v(g,c){if(1&g){const n=a.RV6();a.j41(0,"cue-input",6),a.bIt("valueChange",function(s){_.eBV(n);const t=a.XpG();return t.searchText=s,_.Njj(t.onSearchChange())}),a.k0s()}if(2&g){const n=a.XpG();a.Y8G("value",n.searchText)}}function i(g,c){if(1&g){const n=a.RV6();a.j41(0,"cue-checkbox",7),a.bIt("checkedChange",function(s){const t=_.eBV(n).$implicit,f=a.XpG();return t.selected=s,_.Njj(f.onSelectionChange())}),a.k0s()}if(2&g){const n=c.$implicit;a.Y8G("label",n.value||"(blank)")("checked",n.selected)}}function b(g,c){1&g&&(a.j41(0,"cue-typography",5),a.EFF(1,"No results"),a.k0s())}let C=(()=>{class g{_cdr=(0,_.WQX)(E.gRc);_params;options=[];filteredOptions=[];searchText="";agInit(n){this._params=n}afterGuiAttached(n){this._refreshOptions(),this._cdr.markForCheck()}onNewRowsLoaded(){this._refreshOptions(),this._cdr.markForCheck()}isFilterActive(){return this.options.some(n=>!n.selected)}doesFilterPass(n){const l=new Set(this.options.filter(e=>e.selected).map(e=>e.value)),s=this._params.getValue(n.node),t=null==s?"":String(s);return"..."===t||"Loading..."===t||(""===t?l.has(""):t.split(", ").map(e=>e.trim()).some(e=>l.has(e)))}getModel(){return this.isFilterActive()?{selectedValues:this.options.filter(n=>n.selected).map(n=>n.value)}:null}setModel(n){if(n){const l=new Set(n.selectedValues);this.options.forEach(s=>s.selected=l.has(s.value))}else this.options.forEach(l=>l.selected=!0);this._applySearch(),this._cdr.markForCheck()}onSelectionChange(){this._params.filterChangedCallback(),this._cdr.markForCheck()}onSearchChange(){this._applySearch(),this._cdr.markForCheck()}get allSelected(){return this.options.length>0&&this.options.every(n=>n.selected)}toggleAll(n){this.options.forEach(l=>l.selected=n),this._applySearch(),this._params.filterChangedCallback(),this._cdr.markForCheck()}_refreshOptions(){const n=new Set;this._params.api.forEachNode(s=>{const t=this._params.getValue(s);if(null==t||""===t)n.add("");else{const f=String(t);if("..."===f||"Loading..."===f)return;const e=f.split(", ").map(u=>u.trim());for(const u of e)n.add(u)}});const l=new Map(this.options.map(s=>[s.value,s.selected]));this.options=Array.from(n).sort((s,t)=>s.localeCompare(t)).map(s=>({value:s,selected:l.get(s)??!0})),this._applySearch()}_applySearch(){const n=this.searchText.toLowerCase().trim();this.filteredOptions=n?this.options.filter(l=>l.value.toLowerCase().includes(n)):this.options}static \u0275fac=function(l){return new(l||g)};static \u0275cmp=a.VBU({type:g,selectors:[["cue-multi-select-filter"]],decls:7,vars:3,consts:[["direction","column","gap","s"],["placeholder","Search...","size","s",3,"value"],["size","s","label","Select all",3,"checkedChange","checked"],[1,"msf-list"],["size","s",3,"label","checked"],["size","s"],["placeholder","Search...","size","s",3,"valueChange","value"],["size","s",3,"checkedChange","label","checked"]],template:function(l,s){1&l&&(a.j41(0,"cue-flexcontainer",0),a.nVh(1,v,1,1,"cue-input",1),a.j41(2,"cue-checkbox",2),a.bIt("checkedChange",function(f){return s.toggleAll(f)}),a.k0s(),a.j41(3,"div",3),a.Z7z(4,i,1,2,"cue-checkbox",4,r),a.nVh(6,b,2,0,"cue-typography",5),a.k0s()()),2&l&&(a.R7$(),a.vxM(s.options.length>10?1:-1),a.R7$(),a.Y8G("checked",s.allSelected),a.R7$(2),a.Dyx(s.filteredOptions),a.R7$(2),a.vxM(0===s.filteredOptions.length?6:-1))},dependencies:[p.YN,m.S,M.p,T.Typography,D.n],styles:["[_nghost-%COMP%]{display:block;padding:var(--cue-card-padding-y) var(--cue-card-padding-x);min-width:200px;max-width:300px;box-sizing:border-box}.msf-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;max-height:200px;overflow-y:auto}"],changeDetection:0})}return g})()},5902(P,x,o){o.d(x,{U:()=>b});var E=o(7705),_=o(5802),p=o(2271),m=o(9352),M=o(8957),T=o(2444),D=o(2245),a=o(5381),r=o(5547);function v(C,g){if(1&C){const c=r.RV6();r.j41(0,"cue-input",4),r.bIt("valueChange",function(l){_.eBV(c);const s=r.XpG();return _.Njj(s.onValueChange(l))}),r.k0s()}if(2&C){const c=r.XpG();r.Y8G("value",c.filterText)}}function i(C,g){if(1&C){const c=r.RV6();r.j41(0,"cue-typography",5),r.bIt("click",function(){_.eBV(c);const l=r.XpG();return _.Njj(l.clear())}),r.EFF(1,"Clear"),r.k0s()}}let b=(()=>{class C{_cdr=(0,_.WQX)(E.gRc);_params;filterText="";filterType="contains";filterTypeOptions=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"];_labelContains=(0,m.Xx)("components.agGridColumnSelect.textFilterContains");_labelNotContains=(0,m.Xx)("components.agGridColumnSelect.textFilterNotContains");_labelEquals=(0,m.Xx)("components.agGridColumnSelect.textFilterEquals");_labelNotEqual=(0,m.Xx)("components.agGridColumnSelect.textFilterNotEqual");_labelStartsWith=(0,m.Xx)("components.agGridColumnSelect.textFilterStartsWith");_labelEndsWith=(0,m.Xx)("components.agGridColumnSelect.textFilterEndsWith");_labelBlank=(0,m.Xx)("components.agGridColumnSelect.textFilterBlank");_labelNotBlank=(0,m.Xx)("components.agGridColumnSelect.textFilterNotBlank");filterTypeLabelMap=(0,p.EW)(()=>({contains:this._labelContains(),notContains:this._labelNotContains(),equals:this._labelEquals(),notEqual:this._labelNotEqual(),startsWith:this._labelStartsWith(),endsWith:this._labelEndsWith(),blank:this._labelBlank(),notBlank:this._labelNotBlank()}));showTextInput=(0,p.EW)(()=>!["blank","notBlank"].includes(this.filterType));agInit(c){this._params=c}afterGuiAttached(c){this._cdr.markForCheck()}isFilterActive(){return!!["blank","notBlank"].includes(this.filterType)||this.filterText.trim().length>0}doesFilterPass(c){const n=this._params.getValue(c.node),l=null==n?"":String(n),s=this.filterText.toLowerCase().trim(),t=l.toLowerCase();switch(this.filterType){case"contains":default:return t.includes(s);case"notContains":return!t.includes(s);case"equals":return t===s;case"notEqual":return t!==s;case"startsWith":return t.startsWith(s);case"endsWith":return t.endsWith(s);case"blank":return""===l;case"notBlank":return""!==l}}getModel(){return this.isFilterActive()?{filterType:"text",type:this.filterType,filter:this.filterText}:null}setModel(c){this.filterText=c?.filter??"",this.filterType=c?.type??"contains",this._cdr.markForCheck()}onValueChange(c){this.filterText=c,this._params.filterChangedCallback(),this._cdr.markForCheck()}onFilterTypeChange(c){this.filterType=String(c||"contains"),["blank","notBlank"].includes(this.filterType)&&(this.filterText=""),this._params.filterChangedCallback(),this._cdr.markForCheck()}clear(){this.filterText="",this.filterType="contains",this._params.filterChangedCallback(),this._cdr.markForCheck()}static \u0275fac=function(n){return new(n||C)};static \u0275cmp=r.VBU({type:C,selectors:[["cue-text-filter"]],decls:4,vars:5,consts:[["direction","column","gap","s"],["size","s",3,"valueChange","value","options","labelMap"],["placeholder","Filter...","size","s",3,"value"],["size","s",2,"cursor","pointer","text-align","right"],["placeholder","Filter...","size","s",3,"valueChange","value"],["size","s",2,"cursor","pointer","text-align","right",3,"click"]],template:function(n,l){1&n&&(r.j41(0,"cue-flexcontainer",0)(1,"cue-select",1),r.bIt("valueChange",function(t){return l.onFilterTypeChange(t)}),r.k0s(),r.nVh(2,v,1,1,"cue-input",2),r.nVh(3,i,2,0,"cue-typography",3),r.k0s()),2&n&&(r.R7$(),r.Y8G("value",l.filterType)("options",l.filterTypeOptions)("labelMap",l.filterTypeLabelMap()),r.R7$(),r.vxM(l.showTextInput()?2:-1),r.R7$(),r.vxM(l.filterText||"contains"!==l.filterType?3:-1))},dependencies:[M.p,T.l,D.Typography,a.n],styles:["[_nghost-%COMP%]{display:block;padding:var(--cue-card-padding-y) var(--cue-card-padding-x);min-width:180px;max-width:280px;box-sizing:border-box}"],changeDetection:0})}return C})()},5448(P,x,o){o.d(x,{L:()=>M});var E=o(7705),_=o(2245),p=o(5547);const m=["*"];let M=(()=>{class T{fontSize=(0,E.hFB)("m");italic=(0,E.hFB)(!1);noWrap=(0,E.hFB)(!0);static \u0275fac=function(r){return new(r||T)};static \u0275cmp=p.VBU({type:T,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:m,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(r,v){1&r&&(p.NAR(),p.j41(0,"div")(1,"cue-typography",0),p.SdG(2),p.k0s()()),2&r&&(p.R7$(),p.Y8G("size",v.fontSize())("italic",v.italic())("noWrap",v.noWrap()))},dependencies:[_.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return T})()},7643(P,x,o){o.d(x,{CueEntityList:()=>s});var E=o(467),_=o(7705),p=o(5802),m=o(2271),M=o(2839),T=o(5381),D=o(2245),a=o(9769),r=o(7851),v=o(7293),i=o(5547);function b(t,f){if(1&t&&(i.j41(0,"cue-flexcontainer",2)(1,"cue-typography",4),i.EFF(2),i.k0s()()),2&t){const e=i.XpG(2);i.R7$(2),i.SpI(" ",e.errorMessage()," ")}}function C(t,f){if(1&t){const e=i.RV6();i.j41(0,"cue-ent-list-inner",7),i.bIt("rowClicked",function(d){p.eBV(e);const h=i.XpG(3);return p.Njj(h.rowClicked.emit(d))})("clickedOpen",function(d){p.eBV(e);const h=i.XpG(3);return p.Njj(h.clickedOpen.emit(d))}),i.k0s()}if(2&t){const e=i.XpG(3);i.Y8G("entities",e._displayIris())("entityData",e.entityData())("handlers",e.handlers())("mapboxToken",e.mapboxToken())("paginationPageSize",e.paginationPageSize())("variant",e.variant())}}function g(t,f){1&t&&(i.j41(0,"cue-flexcontainer",2)(1,"cue-typography",8),i.EFF(2," No project connected. "),i.k0s()())}function c(t,f){if(1&t&&i.nrm(0,"cue-logo-link",6),2&t){let e;const u=i.XpG(3);i.Y8G("projectId",null==(e=u.sdkState())?null:e.projectId)}}function n(t,f){if(1&t&&(i.j41(0,"div",3),i.nVh(1,C,1,6,"cue-ent-list-inner",5)(2,g,3,0,"cue-flexcontainer",2),i.nVh(3,c,1,1,"cue-logo-link",6),i.k0s()),2&t){const e=i.XpG(2);i.Y8G("cueLogoLoader","loading"===e.state()),i.R7$(),i.vxM(e.handlers()?1:"loading"!==e.state()?2:-1),i.R7$(2),i.vxM(e.showLogo()?3:-1)}}function l(t,f){if(1&t&&i.nVh(0,b,3,1,"cue-flexcontainer",2)(1,n,4,3,"div",3),2&t){const e=i.XpG();i.vxM("error"===e.state()?0:1)}}let s=(()=>{class t{iris=(0,_.hFB)([]);categoryIris=(0,_.hFB)(void 0);sdkState=(0,_.hFB)(void 0);mapboxToken=(0,_.hFB)(void 0);paginationPageSize=(0,_.hFB)(10,{transform:_.Udg});variant=(0,_.hFB)("none");showLogo=(0,_.hFB)(!1,{transform:_.L39});rowClicked=(0,_.CGW)();clickedOpen=(0,_.CGW)();state=(0,p.vPA)("idle");errorMessage=(0,p.vPA)(null);entityData=(0,p.vPA)({});_entities=(0,p.vPA)(void 0);_categoryResolvedIris=(0,p.vPA)([]);_displayIris=(0,m.EW)(()=>void 0!==this.categoryIris()?this._categoryResolvedIris():this.iris());_unsubscribe;_inputWarningTimer;handlers=(0,m.EW)(()=>{var e=this;const u=this._entities();if(u)return{requestData:(d,h)=>{const y=d.map(k=>k.split("/").pop()).filter(Boolean);u.requestEntityData(y,h)},requestLocations:d=>{if(!this.mapboxToken())return void console.warn("[cue-entity-list] No mapboxToken provided \u2014 skipping map location fetch.");const h=d.map(y=>y.split("/").pop()).filter(Boolean);u.requestEntityLocations(h)},checkHasLocations:(d=(0,E.A)(function*(h){const y=e.sdkState()?.cue,k=e.sdkState()?.projectId;if(!(e.mapboxToken()&&y&&k&&h.length))return!1;const L=`PREFIX qcy: <https://dev.qaecy.com/ont#>\nASK WHERE {\n ?entity qcy:hasEntityCategory ?cat .\n FILTER(?cat IN (${h.map(S=>`<${S}>`).join(" ")}))\n { ?entity qcy:similarTo ?osm . FILTER(STRSTARTS(STR(?osm), "https://www.openstreetmap.org/")) }\n UNION\n { ?entity qcy:relatedEntity ?loc . ?loc qcy:similarTo ?osm . FILTER(STRSTARTS(STR(?osm), "https://www.openstreetmap.org/")) }\n}`;try{return!0===(yield y.api.sparql(L,k))?.boolean}catch{return!1}}),function(y){return d.apply(this,arguments)})};var d});constructor(){this._inputWarningTimer=setTimeout(()=>{this.sdkState()||console.warn('[cue-entity-list] Required input "sdkState" is not set. Pass a { entities: CueProjectEntities } (or include a `cue` instance) object to load entity data.')},3e3),(0,p.QZP)(()=>{this._setupEntities(this.sdkState()?.entities)}),(0,p.QZP)(()=>{const e=this.categoryIris(),u=this._entities();void 0!==e&&this._fetchByCategories(e,u)})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._teardown()}_setupEntities(e){if(this._teardown(),!e)return this._entities.set(void 0),this.entityData.set({}),void this.state.set("idle");this._entities.set(e),this.state.set("ready"),this._syncEntityData(e),this._unsubscribe=e.entityInfoMap.subscribe(()=>{this._syncEntityData(e)})}_syncEntityData(e){const u=e.entityInfoMap.get(),d={};for(const h of Object.keys(u)){const y=u[h],k=Array.isArray(y.documentRefs)?y.documentRefs.map(O=>"string"==typeof O?{id:O}:O):y.documentRefs;d[e.entityIri(h)]={...y,documentRefs:k}}this.entityData.set(d)}_fetchByCategories(e,u){var d=this;return(0,E.A)(function*(){if(u&&e.length){d.state.set("loading");try{const h=yield u.entitiesByCategory(e);d._categoryResolvedIris.set(h.map(y=>y.iri)),d.state.set("ready")}catch(h){console.error("[cue-entity-list] Failed to fetch entities by category",h),d.errorMessage.set("Failed to load entities for the given categories."),d.state.set("error")}}else d._categoryResolvedIris.set([])})()}_teardown(){this._unsubscribe?.(),this._unsubscribe=void 0}static \u0275fac=function(u){return new(u||t)};static \u0275cmp=i.VBU({type:t,selectors:[["cue-entity-list"]],inputs:{iris:[1,"iris"],categoryIris:[1,"categoryIris"],sdkState:[1,"sdkState"],mapboxToken:[1,"mapboxToken"],paginationPageSize:[1,"paginationPageSize"],variant:[1,"variant"],showLogo:[1,"showLogo"]},outputs:{rowClicked:"rowClicked",clickedOpen:"clickedOpen"},decls:3,vars:1,consts:[["body",""],[3,"ngTemplateOutlet"],["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","relative","height","100%","width","100%",3,"cueLogoLoader"],[2,"color","#c44","font-size","13px"],[2,"height","100%",3,"entities","entityData","handlers","mapboxToken","paginationPageSize","variant"],[2,"position","absolute","top","12px","right","12px","z-index","5",3,"projectId"],[2,"height","100%",3,"rowClicked","clickedOpen","entities","entityData","handlers","mapboxToken","paginationPageSize","variant"],[2,"color","#9ca3af","font-size","13px"]],template:function(u,d){if(1&u&&(i.DNE(0,l,2,1,"ng-template",null,0,i.C5r),i.eu8(2,1)),2&u){const h=i.sdS(1);i.R7$(2),i.Y8G("ngTemplateOutlet",h)}},dependencies:[M.u,T.n,D.Typography,a.T3,r.k,v.x],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return t})()}}]);