@qaecy/cue-ui 0.0.22 → 0.0.23
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.
- package/112.js +1 -0
- package/149.js +1 -0
- package/245.js +1 -1
- package/247.js +3 -0
- package/284.js +1 -1
- package/{236.js → 311.js} +1 -1
- package/334.js +1 -0
- package/336.js +1 -1
- package/376.js +1 -1
- package/382.js +1 -0
- package/393.js +1 -0
- package/418.js +1 -1
- package/419.js +1 -1
- package/523.js +1 -1
- package/540.js +1 -0
- package/544.js +1 -0
- package/560.js +1 -1
- package/571.js +1 -0
- package/60.js +1 -1
- package/722.js +1 -0
- package/740.js +1 -0
- package/741.js +1 -1
- package/903.js +1 -0
- package/911.js +1 -0
- package/960.js +1 -0
- package/995.js +1 -0
- package/README.md +127 -288
- package/common.js +1 -1
- package/index.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/runtime.js +1 -1
- package/344.js +0 -1
- package/371.js +0 -1
- package/443.js +0 -1
- package/570.js +0 -1
- package/613.js +0 -1
- package/710.js +0 -1
- package/774.js +0 -1
- package/83.js +0 -1
package/443.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[443],{4853(G,T,u){u.d(T,{H:()=>A});var h=u(7705),s=u(5802),l=u(7089),g=u(7023),e=u(5381),m=u(1696),P=u(3319),y=u(356),z=u(6279),_=u(5547);const x=()=>({position:"bottomleft"}),M=(v,V)=>V.label||v;function k(v,V){if(1&v){const f=_.RV6();_.j41(0,"cue-menu-item",4),_.bIt("click",function(){const w=s.eBV(f).$implicit;return s.Njj(w.action())}),_.EFF(1),_.k0s()}if(2&v){const f=V.$implicit;_.Y8G("selected",f.selected),_.R7$(),_.JRh(f.label)}}function R(v,V){if(1&v&&(_.j41(0,"cue-menu-wrap"),_.Z7z(1,k,2,2,"cue-menu-item",3,M),_.k0s()),2&v){const f=_.XpG();_.R7$(),_.Dyx(f.contextMenuItems())}}function F(v,V){if(1&v){const f=_.RV6();_.j41(0,"cue-button",5),_.bIt("click",function(w){const j=s.eBV(f).$implicit,O=_.XpG();return s.Njj(O.handleClick(w,j))}),_.nrm(1,"cue-button-icon",6),_.k0s()}if(2&v){const f=V.$implicit,b=_.XpG(),w=_.sdS(1);_.Y8G("cueTooltip",f.label)("variant",f.variant?f.variant:b.variant())("size",b.size())("cueContextMenu",w)("contextMenuData",_.lJ4(7,x))("cueContextEnabled",void 0!==f.contextMenuItems&&f.contextMenuItems.length>0),_.R7$(),_.Y8G("icon",f.icon)}}let A=(()=>{class v{items=h.hFB.required();noGap=(0,h.hFB)(!0);direction=(0,h.hFB)("row");size=(0,h.hFB)("xs");variant=(0,h.hFB)("tertiary");mouseEnter=(0,h.CGW)();mouseLeave=(0,h.CGW)();contextMenuItems=(0,s.vPA)([]);handleClick(f,b){f.stopPropagation(),b.contextMenuItems&&b.contextMenuItems.length>0?this.contextMenuItems.set(b.contextMenuItems):b.action&&(this.contextMenuItems.set([]),b.action())}static \u0275fac=function(b){return new(b||v)};static \u0275cmp=_.VBU({type:v,selectors:[["cue-entity-menu"]],inputs:{items:[1,"items"],noGap:[1,"noGap"],direction:[1,"direction"],size:[1,"size"],variant:[1,"variant"]},outputs:{mouseEnter:"mouseEnter",mouseLeave:"mouseLeave"},decls:5,vars:2,consts:[["contextMenu",""],["gap","s","justify","end",2,"width","100%",3,"mouseenter","mouseleave","direction","noGap"],["trigger","leftclick",3,"cueTooltip","variant","size","cueContextMenu","contextMenuData","cueContextEnabled"],[3,"selected"],[3,"click","selected"],["trigger","leftclick",3,"click","cueTooltip","variant","size","cueContextMenu","contextMenuData","cueContextEnabled"],[3,"icon"]],template:function(b,w){1&b&&(_.DNE(0,R,3,0,"ng-template",null,0,_.C5r),_.j41(2,"cue-flexcontainer",1),_.bIt("mouseenter",function(){return w.mouseEnter.emit()})("mouseleave",function(){return w.mouseLeave.emit()}),_.Z7z(3,F,2,8,"cue-button",2,M),_.k0s()),2&b&&(_.R7$(2),_.Y8G("direction",w.direction())("noGap",w.noGap()),_.R7$(),_.Dyx(w.items()))},dependencies:[e.n,m.$,l.d,P.a,g.Q,y.M,z.D],encapsulation:2,changeDetection:0})}return v})()},1024(G,T,u){u.d(T,{p:()=>l});var h=u(5547);const s=["*"];let l=(()=>{class g{static \u0275fac=function(P){return new(P||g)};static \u0275cmp=h.VBU({type:g,selectors:[["cue-key-val-list"]],ngContentSelectors:s,decls:2,vars:0,consts:[[1,"key-val-list"]],template:function(P,y){1&P&&(h.NAR(),h.rj2(0,"div",0),h.SdG(1),h.eux())},styles:[".key-val-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cue-grid-gap-s)}"]})}return g})()},9421(G,T,u){u.d(T,{F:()=>P});var h=u(7705),s=u(5802),l=u(2271),g=u(7335),e=u(2245),m=u(5547);let P=(()=>{class y{entityMenuDirective;size=(0,h.hFB)("m");key=h.hFB.required();val=h.geq.required();options=(0,h.hFB)([]);suffix=(0,h.hFB)("");valueChange=(0,h.CGW)();editModeEnabled=(0,s.vPA)(!1);valueChanged=(0,l.EW)(()=>this.val()!==this.newValue());newValue=(0,l.uu)(()=>this.val());labelSize=(0,l.EW)(()=>{switch(this.size()){case"s":return"xs";case"m":return"s";case"l":return"m";case"xl":return"l"}});onKeyPress(_){this.editModeEnabled()&&("Escape"===_.key?(this._reset(),_.stopPropagation()):"Enter"===_.key&&this._emitChange())}saveCancelMenu=(0,l.EW)(()=>{const _=[{icon:"close",label:"Cancel",action:()=>this._reset()}];return this.valueChanged()&&_.push({icon:"save",label:"Save",action:()=>this._emitChange()}),_});selectionChange(_){this.newValue.set(_?.toString()??"")}inputChange(_){this.newValue.set(_)}_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)}static \u0275fac=function(x){return new(x||y)};static \u0275cmp=m.VBU({type:y,selectors:[["cue-key-val"]],viewQuery:function(x,M){if(1&x&&m.GBs(g.e,5),2&x){let k;m.mGM(k=m.lsd())&&(M.entityMenuDirective=k.first)}},hostBindings:function(x,M){1&x&&m.bIt("keydown",function(R){return M.onKeyPress(R)},m.EBC)},inputs:{size:[1,"size"],key:[1,"key"],val:[1,"val"],options:[1,"options"],suffix:[1,"suffix"]},outputs:{val:"valChange",valueChange:"valueChange"},decls:8,vars:5,consts:[[1,"key-val-container"],[3,"size"],[1,"value-content"]],template:function(x,M){1&x&&(m.j41(0,"dl",0)(1,"dt")(2,"cue-typography",1),m.EFF(3),m.k0s()(),m.j41(4,"dd")(5,"cue-typography",1)(6,"span",2),m.EFF(7),m.k0s()()()()),2&x&&(m.R7$(2),m.Y8G("size",M.labelSize()),m.R7$(),m.JRh(M.key()),m.R7$(2),m.Y8G("size",M.size()),m.R7$(2),m.Lme("",M.val()," ",M.suffix()))},dependencies:[e.o],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 y})()},7335(G,T,u){u.d(T,{e:()=>y});var h=u(7705),s=u(5802),l=u(5547),g=u(8359),e=u(6939),m=u(63),P=u(4853);let y=(()=>{class z{_targetEl=(0,s.WQX)(l.aKT);_overlay=(0,s.WQX)(m.hJ);_overlayRef;_isOverlayHovered=!1;_subscriptions;display=(0,h.hFB)("on-hover");menuItems=h.hFB.required();menuEnabled=(0,h.hFB)(!0);onMouseEnter(){if("on-hover"===this.display()){if(!this.menuItems().length)return void this.removeOverlayMenu();this.appendOverlayMenu()}}onMouseLeave(){this._checkShouldRemoveOverlay()}appendOverlayMenu(){if(!this.menuItems().length||this._overlayRef)return;const x=this._overlay.create({positionStrategy:this._overlay.position().flexibleConnectedTo(this._targetEl).withPositions([{originX:"end",originY:"center",overlayX:"start",overlayY:"center",offsetX:2,offsetY:0}])});this._overlayRef=x;const M=window.getComputedStyle(this._targetEl.nativeElement).color;x.overlayElement.style.color=M;const k=new e.A8(P.H),R=x.attach(k);R.instance.items=this.menuItems,this._subscriptions&&this._subscriptions.unsubscribe(),this._subscriptions=new g.yU,this._subscriptions.add(R.instance.mouseEnter.subscribe(()=>{this._isOverlayHovered=!0})),this._subscriptions.add(R.instance.mouseLeave.subscribe(()=>{this._isOverlayHovered=!1,this._checkShouldRemoveOverlay()}))}removeOverlayMenu(){this._overlayRef&&(this._subscriptions&&(this._subscriptions.unsubscribe(),this._subscriptions=void 0),this._overlayRef.detach(),this._overlayRef.dispose(),this._overlayRef=void 0)}_checkShouldRemoveOverlay(){setTimeout(()=>{this._isOverlayHovered||this.removeOverlayMenu()},300)}static \u0275fac=function(M){return new(M||z)};static \u0275dir=l.FsC({type:z,selectors:[["","cueEntityMenu",""]],hostBindings:function(M,k){1&M&&l.bIt("mouseenter",function(){return k.onMouseEnter()})("mouseleave",function(){return k.onMouseLeave()})},inputs:{display:[1,"display"],menuItems:[1,"menuItems"],menuEnabled:[1,"menuEnabled"]}})}return z})()},9443(G,T,u){u.d(T,{CueDocumentViewer:()=>$t});var h=u(467),s=u(7705),l=u(5802),g=u(2271),e=u(5547),m=u(9769),P=u(5381),y=u(2245),z=u(1024),_=u(9421),x=u(4853);const M=["inputEl"],k=["measureEl"];let R=(()=>{class o{value=(0,s.geq)("");inputWidth=(0,l.vPA)(0);valueChange=(0,s.CGW)();save=(0,s.CGW)();cancel=(0,s.CGW)();inputEl;measureEl;ngAfterViewInit(){this.updateInputWidth()}onInput(t){this.value.set(t.target.value),this.updateInputWidth(),this.valueChange.emit(this.value())}onEnter(t){t.preventDefault(),this.save.emit()}onEscape(t){t.preventDefault(),this.cancel.emit()}onBlur(){this.save.emit()}updateInputWidth(){if(this.measureEl&&this.inputEl){const t=this.value()||"";this.measureEl.nativeElement.innerText=""===t?" ":t,this.inputWidth.set(this.measureEl.nativeElement.offsetWidth+2)}}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-inline-input"]],viewQuery:function(i,n){if(1&i&&e.GBs(M,5)(k,5),2&i){let a;e.mGM(a=e.lsd())&&(n.inputEl=a.first),e.mGM(a=e.lsd())&&(n.measureEl=a.first)}},inputs:{value:[1,"value"]},outputs:{value:"valueChange",valueChange:"valueChange",save:"save",cancel:"cancel"},decls:4,vars:4,consts:[["measureEl",""],["inputEl",""],[1,"measure",3,"innerText"],["type","text",3,"input","keydown.enter","keydown.escape","blur","value"]],template:function(i,n){1&i&&(e.Hgh(0,"div",2,0),e.rj2(2,"input",3,1),e.VwU("input",function(r){return n.onInput(r)})("keydown.enter",function(r){return n.onEnter(r)})("keydown.escape",function(r){return n.onEscape(r)})("blur",function(){return n.onBlur()}),e.eux()),2&i&&(e.Avn("innerText",n.value()),e.R7$(2),e.xc7("width",n.inputWidth(),"px"),e.Avn("value",n.value()))},styles:["[_nghost-%COMP%]{display:inline-block;position:relative}.measure[_ngcontent-%COMP%]{position:absolute;visibility:hidden;white-space:pre;font:inherit;font-size:inherit;padding:0}input[_ngcontent-%COMP%]{border:1px;background:transparent;font:inherit;font-size:inherit;color:inherit;min-width:2ch;padding:0;margin:0;outline:none;border-bottom:1px solid}"],changeDetection:0})}return o})();var F=u(4015),A=u(5745),v=u(1696),V=u(8957),f=u(5448),b=u(2444),w=u(9417),j=u(7374),O=u.n(j),N=u(3319);const ne=(o,c)=>c.date;function ie(o,c){if(1&o&&(e.j41(0,"cue-typography",11),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o){const t=c.$implicit,i=e.XpG();e.Y8G("size",i.size()),e.R7$(),e.JRh(e.bMT(2,2,t))}}function oe(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-button",13),e.bIt("click",function(){const n=l.eBV(t).$implicit,a=e.XpG();return l.Njj(a.selectDay(n))}),e.j41(1,"cue-button-label"),e.EFF(2),e.k0s()()}if(2&o){const t=c.$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 ae=(()=>{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)=>(O()().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)(()=>O()().format("YYYY-MM-DD"));calendarDays=(0,g.EW)(()=>{const t=this.year(),i=this.month(),n=O()(this.date()),a=this.today(),r=O()(`${t}-${i}-01`),d=r.endOf("month"),p=0===r.day()?r.subtract(6,"day"):r.subtract(r.day()-1,"day"),C=0===d.day()?d:d.add(7-d.day(),"day"),E=[];let D=p;for(;D.isBefore(C)||D.isSame(C);){const I=D.format("YYYY-MM-DD");E.push({date:I,day:D.date(),isCurrentMonth:D.month()+1===i,isSelected:D.isSame(n,"day"),isToday:I===a,dayjs:D}),D=D.add(1,"day")}return E});jsDate=(0,g.EW)(()=>O()(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=O()(new Date(this.year(),this.month()-1,this.day())).format("YYYY-MM-DD");this.date.set(t)}navigateMonth(t="next"){const i=O()(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=O()(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(r){return e.DH7(n.month,r)||(n.month=r),r}),e.bIt("valueChange",function(){return n.updateDate()}),e.k0s(),e.j41(7,"cue-select",7),e.mxI("valueChange",function(r){return e.DH7(n.year,r)||(n.year=r),r}),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,ie,3,4,"cue-typography",11,e.Vm6),e.Z7z(15,oe,3,7,"cue-button",12,ne),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:[P.n,b.l,v.$,f.L,y.o,N.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 le=u(7023),se=u(5187);const re=["inputField"];function ce(o,c){1&o&&e.EFF(0,"*")}function ue(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-card",8)(1,"cue-datepicker",9),e.mxI("dateChange",function(n){l.eBV(t);const a=e.XpG();return e.DH7(a.internalDateValue,n)||(a.internalDateValue=n),l.Njj(n)}),e.bIt("dateChange",function(n){l.eBV(t);const a=e.XpG();return l.Njj(a.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 de(o,c){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 ge=(()=>{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,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(O()(t,"YYYY-MM-DD",!0).isValid())return t;const i=O()(t);return i.isValid()?i.format("YYYY-MM-DD"):O()().format("YYYY-MM-DD")}return O()().format("YYYY-MM-DD")});formattedDateValue=(0,g.EW)(()=>{const t=this.value();if(t){const i=O()(t);return i.isValid()?i.format("MMM D, YYYY"):t}return""});onValueChange=(0,l.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(re,5),2&i){let a;e.mGM(a=e.lsd())&&(n.inputField=a.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:w.kq,useExisting:(0,l.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,ce,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(r){return n.onDatePickerOpen(r)})("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,ue,2,1,"ng-template",null,1,e.C5r),e.nVh(10,de,2,1,"cue-typography",7),e.k0s()),2&i){const a=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",a)("positioning",n.datePickerPositioning()??"bottomright"),e.R7$(2),e.Y8G("size",n.iconSize())("cueContextMenu",a)("positioning",n.datePickerPositioning()??"bottomright"),e.R7$(4),e.vxM(n.error()?10:-1)}},dependencies:[y.o,ae,le.Q,se.Z,N.a,v.$],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 H=u(9695),Y=u(1413),_e=u(7421),pe=u(3293),W=u(7384),he=u(3798);let me=(()=>{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{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}\n"],encapsulation:2,changeDetection:0})}return o})(),fe=(()=>{class o{_elementRef=(0,l.WQX)(e.aKT);_platform=(0,l.WQX)(_e.O);_ngZone=(0,l.WQX)(l.SKi);_renderer=(0,l.WQX)(e.sFG);_resizeEvents=new Y.B;_previousValue;_initialHeight;_destroyed=new Y.B;_listenerCleanups;_minRows;_maxRows;_enabled=!0;_previousMinRows=-1;_textareaElement;get minRows(){return this._minRows}set minRows(t){this._minRows=(0,W.OE)(t),this._setMinHeight()}get maxRows(){return this._maxRows}set maxRows(t){this._maxRows=(0,W.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,l.WQX)(l.qQL);_hasFocus=!1;_isViewInited=!1;constructor(){(0,l.WQX)(pe.l).load(me),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,he.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||"",a=this._hasFocus,r=this._platform.FIREFOX?"cdk-textarea-autosize-measuring-firefox":"cdk-textarea-autosize-measuring";a&&(t.style.marginBottom=`${t.clientHeight}px`),t.classList.add(r);const d=t.scrollHeight-4;return t.classList.remove(r),a&&(t.style.marginBottom=i),d}_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 a=this._measureScrollHeight(),r=Math.max(a,this._cachedPlaceholderHeight||0);i.style.height=`${r}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})(),ve=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e.$C({type:o});static \u0275inj=l.G2t({})}return o})();var L=u(29);const Me=["inputField"];function be(o,c){1&o&&e.EFF(0,"*")}function Ce(o,c){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 ye(o,c){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 xe=(()=>{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);icon=(0,s.hFB)(void 0);size=(0,s.hFB)("m");isFocused=!1;disabled=!1;inputField;valueChange=(0,s.CGW)();onChange=t=>{};onTouched=()=>{};constructor(){(0,l.QZP)(()=>{this.valueChange.emit(this.value())})}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()}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(Me,5),2&i){let a;e.mGM(a=e.lsd())&&(n.inputField=a.first)}},inputs:{value:[1,"value"],label:[1,"label"],placeholder:[1,"placeholder"],error:[1,"error"],required:[1,"required"],icon:[1,"icon"],size:[1,"size"]},outputs:{value:"valueChange",valueChange:"valueChange"},features:[e.Jv_([{provide:w.kq,useExisting:(0,l.Rfq)(()=>o),multi:!0}])],decls:10,vars:13,consts:[["inputField",""],[1,"form-field"],["size","s",1,"label"],[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,be,1,0),e.k0s(),e.j41(4,"div",3)(5,"cue-flexcontainer",4),e.nVh(6,Ce,2,1,"span",5),e.j41(7,"textarea",6,0),e.bIt("input",function(r){return n.emitValue(r)})("focus",function(){return n.isFocused=!0})("blur",function(){return n.onBlur()}),e.k0s()()(),e.nVh(9,ye,2,1,"cue-typography",7),e.k0s()),2&i&&(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$(3),e.vxM(n.icon()?6:-1),e.R7$(),e.Y8G("cdkAutosizeMinRows",1)("cdkAutosizeMaxRows",8)("placeholder",n.placeholder())("value",n.value())("disabled",n.disabled),e.R7$(2),e.vxM(n.error()?9:-1))},dependencies:[y.o,P.n,L.A,ve,fe],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}.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 B=u(6117),X=u(356),U=u(6279),Pe=u(1359);function De(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-typography",11),e.bIt("click",function(){l.eBV(t);const n=e.XpG();return l.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 Ee(o,c){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",c)}}function Oe(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-input",13),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){l.eBV(t);const a=e.XpG();return e.DH7(a.filterValue,n)||(a.filterValue=n),l.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 Fe(o,c){1&o&&e.nrm(0,"cue-svg-icon",17),2&o&&e.Y8G("name",c)}function we(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-menu-item",15),e.bIt("click",function(n){const a=l.eBV(t).$implicit,r=e.XpG();return l.Njj(r.handleSelect(n,a.value))})("mousedown",function(n){l.eBV(t);const a=e.XpG();return l.Njj(a.preventEventBubbling(n))}),e.j41(1,"cue-checkbox",16),e.bIt("click",function(n){const a=l.eBV(t).$implicit,r=e.XpG();return l.Njj(r.handleSelect(n,a.value))})("mousedown",function(n){l.eBV(t);const a=e.XpG();return l.Njj(a.preventEventBubbling(n))}),e.k0s(),e.nVh(2,Fe,1,1,"cue-svg-icon",17),e.EFF(3),e.k0s()}if(2&o){let t;const i=c.$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 ke(o,c){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 Re=(()=>{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)([]);valueChange=(0,s.CGW)();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);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,F.Xx)("components.input.multiSelect.itemsSelected",(0,g.EW)(()=>({count:this._multiSelectCount()})));_defaultPlaceholder=(0,F.Xx)("components.input.multiSelect.placeholderSelect");_placeholder=(0,g.EW)(()=>this.placeholder()??this._defaultPlaceholder());valueLabel=(0,g.EW)(()=>{const t=this.labelMap(),i=this.value()||[];if(0===i.length)return"";if(1===i.length){const n=i[0];return t[n]?t[n]:n.toString()}return this._multiSelectTranslated()});menuIsOpen=(0,l.vPA)(void 0);filterInputEl=(0,s.ebz)(V.p);menuEl=(0,s.ebz)(B.W);filterValue=(0,l.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 a=t.target.closest("cue-multi-select");(null!==a?.closest(".ag-filter-wrapper")||null!==a?.closest(".ag-popup")||null!==a?.closest(".ag-filter-apply-panel")||null!==a?.closest('[class*="ag-"]')||null!==document.querySelector(".ag-filter-wrapper"))&&t.stopPropagation(),t.preventDefault();const d=this.value()||[],p=d.includes(i),C=this.fixedValues().includes(i);if(p&&C)return;let E;E=p?d.filter(D=>D!==i):[...d,i],this.value.update(()=>[...E]),this.valueChange.emit(E)}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,l.QZP)(()=>{this.showFilter()&&this.menuIsOpen()&&setTimeout(()=>this.filterInputEl()?.focus(),20)}),(0,l.QZP)(()=>{const t=this.value()||[],n=this.fixedValues().filter(a=>!t.includes(a));if(n.length>0){const a=[...t,...n];this.value.set(a)}})}icon(t){if(void 0!==t)return this.iconMap()[t]}_appendFilter(t,i,n){const a=i.toLowerCase();return(""===i?t:t.filter(d=>(n[d]?n[d].toLowerCase():d.toString().toLowerCase()).startsWith(a))).map(d=>({value:d,label:n[d]?n[d]:d.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,V.p,5)(n.menuEl,B.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"]},outputs:{value:"valueChange",valueChange:"valueChange"},decls:15,vars:20,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"],[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,"click","mousedown","checked","disabled"],["before","",3,"name"]],template:function(i,n){if(1&i&&(e.j41(0,"div",1),e.nVh(1,De,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(r){return!n.disabled()&&n.handleSpace(r)}),e.j41(6,"cue-flexcontainer",5),e.nVh(7,Ee,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,Oe,3,4),e.Z7z(12,we,4,7,"cue-menu-item",9,e.Vm6),e.k0s()(),e.nVh(14,ke,2,1,"cue-typography",10),e.k0s()),2&i){let a;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((a=n.icon(1===n.value().length?n.value()[0]:void 0))?7:-1,a),e.R7$(),e.SpI(" ",n.value()&&n.value().length>0?n.valueLabel():n._placeholder()," "),e.R7$(2),e.Y8G("maxHeight",n.maxHeight()),e.R7$(),e.vxM(n.showFilter()?11:-1),e.R7$(),e.Dyx(n.optionsFiltered()),e.R7$(2),e.vxM(n.error()?14:-1)}},dependencies:[B.W,X.M,U.D,y.o,V.p,Pe.S,L.A,P.n,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 Ve=["*"],K=()=>[],Q=()=>({});function Te(o,c){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 Ie(o,c){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 ze(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-input",15),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){l.eBV(t);const a=e.XpG(2);return e.DH7(a.newValue,n)||(a.newValue=n),l.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 je(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-input",16),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){l.eBV(t);const a=e.XpG(2);return e.DH7(a.newValue,n)||(a.newValue=n),l.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 Ne(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-input-date",17),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){l.eBV(t);const a=e.XpG(2);return e.DH7(a.newValue,n)||(a.newValue=n),l.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 Be(o,c){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){l.eBV(t);const a=e.XpG(2);return l.Njj(a.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 Se(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-select",19),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){l.eBV(t);const a=e.XpG(2);return e.DH7(a.newValue,n)||(a.newValue=n),l.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,K))("labelMap",t.config().optionLabelMap||e.lJ4(10,Q))("showFilter",t.optionsCount()>5)("error",t.valueError())}}function Ge(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-multi-select",19),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){l.eBV(t);const a=e.XpG(2);return e.DH7(a.newValue,n)||(a.newValue=n),l.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,K))("labelMap",t.config().optionLabelMap||e.lJ4(10,Q))("showFilter",t.optionsCount()>5)("error",t.valueError())}}function Ae(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-input-multiline",20),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){l.eBV(t);const a=e.XpG(2);return e.DH7(a.comment,n)||(a.comment=n),l.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 Le(o,c){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 $e(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-modal",1),e.bIt("close",function(){l.eBV(t);const n=e.XpG();return l.Njj(n.onClose())}),e.j41(1,"cue-flexcontainer",2),e.SdG(2),e.nVh(3,Te,2,1,"cue-typography"),e.j41(4,"cue-flexcontainer",3),e.nVh(5,Ie,2,5,"cue-key-val",4),e.nVh(6,ze,2,6,"cue-input",5),e.nVh(7,je,2,6,"cue-input",6),e.nVh(8,Ne,2,6,"cue-input-date",7),e.nVh(9,Be,5,4,"cue-flexcontainer",8),e.nVh(10,Se,2,11,"cue-select",9),e.nVh(11,Ge,2,11,"cue-multi-select",9),e.k0s(),e.nVh(12,Ae,2,5,"cue-input-multiline",10),e.nVh(13,Le,2,1,"cue-typography",11),e.j41(14,"cue-flexcontainer",12)(15,"cue-button",13),e.bIt("click",function(){l.eBV(t);const n=e.XpG();return l.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(){l.eBV(t);const n=e.XpG();return l.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 He=(()=>{class o{visible=(0,s.geq)(!0);config=s.hFB.required();close=(0,s.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,l.vPA)("");errorID=(0,s.geq)("");error=(0,F.Xx)(this.errorID);saving=(0,l.vPA)(!1);pristine=(0,l.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,F.Xx)(this.valueErrorID);optionsCount=(0,g.EW)(()=>this.config().options?.length||0);constructor(){(0,l.QZP)(()=>{this.pristine()&&this.newValue()!==this.config().existingValue&&this.pristine.set(!1)})}onSave(){var t=this;return(0,h.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:Ve,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,$e,23,21,"cue-modal",0)),2&i&&e.vxM(n.visible()?0:-1)},dependencies:[A.a,P.n,v.$,y.o,_.F,V.p,f.L,b.l,Re,ge,H.d,xe,F.Kj],styles:[".col[_ngcontent-%COMP%]{flex:1;min-width:0;height:100%}"]})}return o})();var J=u(7335);function Ye(o,c){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 We(o,c){if(1&o){const t=e.RV6();e.j41(0,"span",5),e.bIt("click",function(){l.eBV(t);const n=e.XpG();return l.Njj(n.onReadClick())}),e.j41(1,"span",6),e.EFF(2),e.k0s(),e.nVh(3,Ye,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 Xe(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-select",10),e.bIt("valueChange",function(n){l.eBV(t);const a=e.XpG(2);return l.Njj(a.selectionChange(n))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("value",t.newValue())("options",t.options())}}function Ue(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-inline-input",11),e.bIt("valueChange",function(n){l.eBV(t);const a=e.XpG(2);return l.Njj(a.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 Ke(o,c){if(1&o&&(e.j41(0,"cue-flexcontainer",3),e.nVh(1,Xe,1,2,"cue-select",8)(2,Ue,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 Qe(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-modal-rdf-edit",12),e.mxI("visibleChange",function(n){l.eBV(t);const a=e.XpG();return e.DH7(a.rdfModalVisible,n)||(a.rdfModalVisible=n),l.Njj(n)}),e.bIt("close",function(n){l.eBV(t);const a=e.XpG();return l.Njj(a.onRdfModalClose(n))}),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("config",c),e.R50("visible",t.rdfModalVisible)}}let Je=(()=>{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,l.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,l.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(J.e,5),2&i){let a;e.mGM(a=e.lsd())&&(n.entityMenuDirective=a.first)}},hostBindings:function(i,n){1&i&&e.bIt("keydown",function(r){return n.onKeyPress(r)},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,We,4,6,"span",2)(7,Ke,4,2,"cue-flexcontainer",3),e.k0s()()(),e.nVh(8,Qe,1,2,"cue-modal-rdf-edit",4)),2&i){let a;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((a=n.rdfConfig())?8:-1,a)}},dependencies:[y.o,J.e,b.l,x.H,P.n,R,He,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})();const Ze=(o,c)=>c.label;function qe(o,c){if(1&o&&e.nrm(0,"cue-svg-icon",3),2&o){const t=e.XpG(2).$implicit;e.Y8G("name",t.icon)}}function et(o,c){if(1&o&&e.nrm(0,"cue-menu-nested",5),2&o){const t=e.XpG(2).$implicit,i=e.XpG();e.Y8G("items",t.children)("positioning",i.positioning())}}function tt(o,c){if(1&o&&(e.j41(0,"cue-menu",0)(1,"cue-menu-item",2),e.nVh(2,qe,1,1,"cue-svg-icon",3),e.EFF(3),e.nrm(4,"cue-svg-icon",4),e.k0s(),e.nVh(5,et,1,2,"cue-menu-nested",5),e.k0s()),2&o){const t=e.XpG().$implicit,i=e.XpG();e.Y8G("positioning",i.positioning()),e.R7$(),e.Y8G("title",t.tooltip),e.R7$(),e.vxM(t.icon?2:-1),e.R7$(),e.SpI(" ",t.label," "),e.R7$(2),e.vxM(t.children?5:-1)}}function nt(o,c){if(1&o&&e.nrm(0,"cue-svg-icon",3),2&o){const t=e.XpG(2).$implicit;e.Y8G("name",t.icon)}}function it(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-menu-item",6),e.bIt("click",function(){l.eBV(t);const n=e.XpG().$implicit;return l.Njj(null==n.action?null:n.action())}),e.nVh(1,nt,1,1,"cue-svg-icon",3),e.EFF(2),e.k0s()}if(2&o){const t=e.XpG().$implicit;e.Y8G("title",t.tooltip),e.R7$(),e.vxM(t.icon?1:-1),e.R7$(),e.SpI(" ",t.label," ")}}function ot(o,c){if(1&o&&e.nVh(0,tt,6,5,"cue-menu",0)(1,it,3,3,"cue-menu-item",1),2&o){const t=c.$implicit;e.vxM(null!=t.children&&t.children.length?0:1)}}let at=(()=>{class o{items=s.hFB.required();positioning=(0,s.hFB)(void 0);static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-menu-nested"]],inputs:{items:[1,"items"],positioning:[1,"positioning"]},decls:3,vars:0,consts:[["trigger","hover",3,"positioning"],[3,"title"],["trigger","",3,"title"],["before","",3,"name"],["after","","name","paginator-next"],["menu","",3,"items","positioning"],[3,"click","title"]],template:function(i,n){1&i&&(e.j41(0,"cue-menu-wrap"),e.Z7z(1,ot,2,1,null,null,Ze),e.k0s()),2&i&&(e.R7$(),e.Dyx(n.items()))},dependencies:[o,B.W,U.D,X.M,L.A],encapsulation:2})}return o})();var lt=u(7573);const st=(o,c)=>t=>t.isHighlight;function rt(o,c){if(1&o&&(e.j41(0,"span",3),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2).$implicit;e.R7$(),e.JRh(t.highlight.label)}}function ct(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-button",5),e.bIt("click",function(n){l.eBV(t);const a=e.XpG(2).$implicit,r=e.XpG();return l.Njj(r.onDeleteHighlight(n,a.highlight))}),e.nrm(1,"cue-button-icon",6),e.k0s()}}function ut(o,c){if(1&o){const t=e.RV6();e.j41(0,"span",2),e.bIt("click",function(){l.eBV(t);const n=e.XpG().$implicit,a=e.XpG();return l.Njj(a.onHighlightClick(n.highlight))}),e.nVh(1,rt,2,1,"span",3),e.EFF(2),e.nVh(3,ct,2,0,"cue-button",4),e.k0s()}if(2&o){const t=e.XpG().$implicit,i=e.XpG();e.BMQ("data-segment-start",t.segmentStart),e.R7$(),e.vxM(t.highlight.label?1:-1),e.R7$(),e.SpI(" ",t.text," "),e.R7$(),e.vxM(i.allowDelete()?3:-1)}}function dt(o,c){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const t=e.XpG().$implicit;e.BMQ("data-segment-start",t.segmentStart),e.R7$(),e.JRh(t.text)}}function gt(o,c){if(1&o&&e.nVh(0,ut,4,4,"span",1)(1,dt,2,2,"span"),2&o){const t=c.$implicit;e.vxM(t.isHighlight&&t.highlight?0:1)}}let _t=(()=>{class o{path=s.hFB.required();highlights=(0,s.hFB)([]);allowDelete=(0,s.hFB)(!1);allowAdd=(0,s.hFB)(!1);size=(0,s.hFB)("m");highlightClick=(0,s.CGW)();deleteHighlight=(0,s.CGW)();textSelected=(0,s.CGW)();segments=(0,g.EW)(()=>this.parseSegments(this.path(),this.highlights()));parseSegments(t,i){const n=i.filter(p=>p.path===t);if(0===n.length)return[{text:t,isHighlight:!1,segmentStart:0}];const a=[...n].sort((p,C)=>p.start-C.start),r=[];let d=0;for(const p of a)p.start>d&&r.push({text:t.substring(d,p.start),isHighlight:!1,segmentStart:d}),r.push({text:t.substring(p.start,p.end),isHighlight:!0,highlight:p,segmentStart:p.start}),d=p.end;return d<t.length&&r.push({text:t.substring(d),isHighlight:!1,segmentStart:d}),r}onHighlightClick(t){const i=this.path().substring(t.start,t.end);this.highlightClick.emit({path:this.path(),highlight:t,text:i})}onDeleteHighlight(t,i){t.stopPropagation(),this.deleteHighlight.emit({path:this.path(),highlight:i})}onMouseUp(t){if(!this.allowAdd())return;const i=window.getSelection();if(!i||i.isCollapsed||!i.rangeCount||!i.toString().trim())return;const a=i.getRangeAt(0),r=t.currentTarget,d=this.getAbsoluteOffset(r,a.startContainer,a.startOffset),p=this.getAbsoluteOffset(r,a.endContainer,a.endOffset);i.removeAllRanges(),p>d&&this.textSelected.emit({path:this.path(),start:d,end:p,text:this.path().substring(d,p)})}getAbsoluteOffset(t,i,n){let a=i.nodeType===Node.TEXT_NODE?i.parentElement:i;for(;a&&a!==t;){if(a instanceof HTMLElement&&a.hasAttribute("data-segment-start")){const C=parseInt(a.getAttribute("data-segment-start"),10);let E=0;const D=document.createTreeWalker(a,NodeFilter.SHOW_TEXT);let I=D.nextNode();for(;I&&I!==i;)E+=I.textContent?.length??0,I=D.nextNode();return C+E+n}a=a.parentElement}const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let d=0,p=r.nextNode();for(;p&&p!==i;)d+=p.textContent?.length??0,p=r.nextNode();return d+n}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-file-path-viewer"]],inputs:{path:[1,"path"],highlights:[1,"highlights"],allowDelete:[1,"allowDelete"],allowAdd:[1,"allowAdd"],size:[1,"size"]},outputs:{highlightClick:"highlightClick",deleteHighlight:"deleteHighlight",textSelected:"textSelected"},decls:3,vars:7,consts:[[1,"path-content",3,"mouseup"],[1,"highlight-segment"],[1,"highlight-segment",3,"click"],[1,"highlight-label"],["size","xs","aria-label","Remove highlight",1,"delete-button"],["size","xs","aria-label","Remove highlight",1,"delete-button",3,"click"],["icon","close"]],template:function(i,n){1&i&&(e.j41(0,"div",0),e.bIt("mouseup",function(r){return n.onMouseUp(r)}),e.Z7z(1,gt,2,1,null,null,e.Vm6),e.k0s()),2&i&&(e.AVh("size-s","s"===n.size())("allow-add",n.allowAdd())("has-highlights",n.segments().some(e._m7(6,st,n))),e.R7$(),e.Dyx(n.segments()))},dependencies:[m.MD,v.$,N.a],styles:["[_nghost-%COMP%]{display:contents}.path-content[_ngcontent-%COMP%]{display:block;flex:1;min-width:0;word-break:break-all;text-align:start;font-family:var(--cue-font-family);font-size:var(--cue-font-m-size);line-height:var(--cue-font-m-line-height);letter-spacing:var(--cue-font-m-letter-spacing);font-weight:var(--cue-font-weight-regular)}.path-content.size-s[_ngcontent-%COMP%]{font-size:var(--cue-font-s-size);line-height:var(--cue-font-s-line-height);letter-spacing:var(--cue-font-s-letter-spacing)}.path-content.allow-add[_ngcontent-%COMP%]{cursor:text;-webkit-user-select:text;user-select:text}.path-content.has-highlights[_ngcontent-%COMP%]{padding-top:.8rem;line-height:2.3rem}.highlight-segment[_ngcontent-%COMP%]{display:inline-block;vertical-align:text-bottom;position:relative;line-height:normal;font-weight:var(--cue-font-weight-medium);cursor:pointer;padding:0 .2rem;border-radius:3px;border:1px solid currentColor;transition:all .2s ease}.highlight-segment[_ngcontent-%COMP%] .highlight-label[_ngcontent-%COMP%]{font-family:var(--cue-font-family);position:absolute;bottom:100%;left:0;font-size:.5rem;line-height:1;opacity:.7;margin-bottom:.15rem;white-space:nowrap;pointer-events:none}.highlight-segment[_ngcontent-%COMP%] .delete-button[_ngcontent-%COMP%]{position:absolute;top:-12px;right:-12px;z-index:10;opacity:0;transition:opacity .2s ease;pointer-events:none}.highlight-segment[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,currentColor 12%,transparent)}.highlight-segment[_ngcontent-%COMP%]:hover .delete-button[_ngcontent-%COMP%]{opacity:1;pointer-events:all}"],changeDetection:0})}return o})();var pt=u(6950);const Z=o=>({count:o}),ht=(o,c)=>t=>t.iri;function mt(o,c){1&o&&(e.j41(0,"cue-typography",11),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(),e.JRh(e.bMT(2,1,"components.documentInfo.infoLoadingFilePaths")))}function ft(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-ag-grid",16),e.bIt("selectedRows",function(n){l.eBV(t);const a=e.XpG(4);return l.Njj(a.onMatchedPathsSelectionChange(n))}),e.k0s()}if(2&o){const t=e.XpG(4);e.Y8G("rowData",t._matchTableRowData())("columnDefs",t._matchTableColDefs())("rowSelection",t._matchTableRowSelection)}}function vt(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",12)(1,"cue-button",13),e.bIt("click",function(){l.eBV(t);const n=e.XpG(3);return l.Njj(n._matchTableExpanded.set(!n._matchTableExpanded()))}),e.nrm(2,"cue-button-icon",14),e.j41(3,"cue-button-label"),e.EFF(4),e.nI1(5,"transloco"),e.k0s()(),e.nVh(6,ft,1,3,"cue-ag-grid",15),e.k0s(),e.j41(7,"cue-typography",11),e.EFF(8),e.nI1(9,"transloco"),e.k0s()}if(2&o){const t=e.XpG(3);e.R7$(2),e.Y8G("icon",t._matchTableExpanded()?"arrow-up":"arrow-dropdown"),e.R7$(2),e.JRh(e.i5U(5,4,1===t._matchCount()?"components.documentInfo.filePathMatched":"components.documentInfo.filePathsMatched",e.eq3(10,Z,t._matchCount()))),e.R7$(2),e.vxM(t._matchTableExpanded()?6:-1),e.R7$(2),e.JRh(e.i5U(9,7,"components.documentInfo.applyToNPaths",e.eq3(12,Z,t._selectedPaths().length)))}}function Mt(o,c){if(1&o&&e.nVh(0,mt,3,3,"cue-typography",11)(1,vt,10,14),2&o){const t=e.XpG(2);e.vxM(t._fileLocationsLoading()?0:null!==t._fileLocations()?1:-1)}}function bt(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",9)(1,"cue-input-switch",10),e.bIt("toggleChange",function(n){l.eBV(t);const a=e.XpG();return l.Njj(a.onApplyToAllChange(n))}),e.k0s(),e.j41(2,"cue-typography",11),e.EFF(3),e.nI1(4,"transloco"),e.k0s()(),e.nVh(5,Mt,2,1)}if(2&o){const t=e.XpG();e.R7$(),e.Y8G("checked",t._applyToAllFiles()),e.R7$(2),e.JRh(e.bMT(4,3,"components.documentInfo.applyToAllFiles")),e.R7$(2),e.vxM(t._applyToAllFiles()?5:-1)}}function Ct(o,c){if(1&o&&(e.j41(0,"cue-typography",8),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.Lme("",e.bMT(2,2,"components.documentInfo.errorSavingEntityMention"),": ",t._saveError())}}let yt=(()=>{class o{selection=s.hFB.required();availableEntityCategories=(0,s.hFB)([]);fileLocations=(0,s.hFB)([]);requestFileLocations=(0,s.hFB)(void 0);requestFilePathEntityAdd=(0,s.hFB)(void 0);confirm=(0,s.CGW)();cancel=(0,s.CGW)();_selectedEntityCategory=(0,l.vPA)("");_applyToAllFiles=(0,l.vPA)(!1);_fileLocations=(0,l.vPA)(null);_fileLocationsLoading=(0,l.vPA)(!1);_matchTableExpanded=(0,l.vPA)(!1);_selectedPaths=(0,l.vPA)([]);_saving=(0,l.vPA)(!1);_saveError=(0,l.vPA)(null);_dirPrefix=(0,g.EW)(()=>{const t=this.selection();return t.path.substring(0,t.end)});_matchedLocations=(0,g.EW)(()=>{const t=this._fileLocations();if(!t)return[];const i=this._dirPrefix();return t.filter(n=>n.path.startsWith(i))});_matchCount=(0,g.EW)(()=>this._matchedLocations().length);_matchTableRowData=(0,g.EW)(()=>this._matchedLocations().map(t=>({iri:t.iri,path:t.path,providerId:t.providerId})));_entityCategoryLabelMap=(0,g.EW)(()=>this.availableEntityCategories().reduce((t,i)=>(t[i.iri]=i.label,t),{}));_matchTableRowSelection={mode:"multiRow",selectAll:"filtered"};_filePathLabel=(0,F.Xx)("components.contentBlocks.documentViewer.labelFilePath");_matchTableColDefs=(0,g.EW)(()=>[{headerName:this._filePathLabel(),field:"path",flex:1,filter:!0,sortable:!0}]);onEntityCategoryChange(t){this._selectedEntityCategory.set("string"==typeof t?t:String(t??""))}onApplyToAllChange(t){var i=this;return(0,h.A)(function*(){if(i._applyToAllFiles.set(t),i._matchTableExpanded.set(!1),!t)return i._fileLocations.set(null),void i._selectedPaths.set([]);const n=i.requestFileLocations();if(n){i._fileLocationsLoading.set(!0);try{const a=yield n();i._fileLocations.set(a);const r=i._dirPrefix();i._selectedPaths.set(a.filter(d=>d.path.startsWith(r)))}finally{i._fileLocationsLoading.set(!1)}}})()}onMatchedPathsSelectionChange(t){const i=this._fileLocations()??[];this._selectedPaths.set(t.map(n=>i.find(a=>a.path===n.path)??{iri:"",path:n.path}))}onConfirm(){var t=this;return(0,h.A)(function*(){const i=t._selectedEntityCategory();if(!i)return;const n=t.selection().path,a=t._fileLocations()?.find(p=>p.path===n)??t.fileLocations().find(p=>p.path===n)??{iri:"",path:n},r=t._applyToAllFiles()&&t._selectedPaths().length>0?t._selectedPaths():[a],d=t.requestFilePathEntityAdd();if(d){t._saving.set(!0),t._saveError.set(null);try{yield d(i,r)}catch(p){return console.error("[EntityMentionModal] Failed to save entity mention:",p),t._saveError.set(p instanceof Error?p.message:String(p)),void t._saving.set(!1)}t._saving.set(!1)}t.confirm.emit({entityCategory:i,paths:r})})()}onCancel(){this.cancel.emit()}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-entity-mention-modal"]],inputs:{selection:[1,"selection"],availableEntityCategories:[1,"availableEntityCategories"],fileLocations:[1,"fileLocations"],requestFileLocations:[1,"requestFileLocations"],requestFilePathEntityAdd:[1,"requestFilePathEntityAdd"]},outputs:{confirm:"confirm",cancel:"cancel"},decls:18,vars:24,consts:[[3,"close","displayCloseBtn","closeOnBackgroundClick"],[1,"modal-content"],["direction","column","gap","m"],[3,"key","val"],[3,"valueChange","value","options","labelMap","label","showFilter"],["direction","row","justify","center"],[3,"click","disabled"],["variant","secondary",3,"click","disabled"],["size","s",2,"color","var(--cue-error)"],["direction","row","gap","s","align","center"],[3,"toggleChange","checked"],["size","s"],["direction","column","gap","xs"],["variant","ghost","size","xs",3,"click"],[3,"icon"],["size","s","height","220px",3,"rowData","columnDefs","rowSelection"],["size","s","height","220px",3,"selectedRows","rowData","columnDefs","rowSelection"]],template:function(i,n){1&i&&(e.j41(0,"cue-modal",0),e.bIt("close",function(){return n.onCancel()}),e.j41(1,"div",1)(2,"cue-flexcontainer",2),e.nrm(3,"cue-key-val",3),e.nI1(4,"transloco"),e.j41(5,"cue-select",4),e.nI1(6,"transloco"),e.bIt("valueChange",function(r){return n.onEntityCategoryChange(r)}),e.k0s(),e.nVh(7,bt,6,5),e.j41(8,"cue-flexcontainer",5)(9,"cue-button",6),e.bIt("click",function(){return n.onCancel()}),e.j41(10,"cue-button-label"),e.EFF(11),e.nI1(12,"transloco"),e.k0s()(),e.j41(13,"cue-button",7),e.bIt("click",function(){return n.onConfirm()}),e.j41(14,"cue-button-label"),e.EFF(15),e.nI1(16,"transloco"),e.k0s()()(),e.nVh(17,Ct,3,4,"cue-typography",8),e.k0s()()()),2&i&&(e.Y8G("displayCloseBtn",!1)("closeOnBackgroundClick",!1),e.R7$(3),e.Y8G("key",e.bMT(4,15,"components.documentInfo.labelSelectedText"))("val",n.selection().text),e.R7$(2),e.Y8G("value",n._selectedEntityCategory())("options",n.availableEntityCategories().map(e._m7(17,ht,n)))("labelMap",n._entityCategoryLabelMap())("label",e.bMT(6,18,"components.entityInfo.labelEntityCategory"))("showFilter",n.availableEntityCategories().length>5),e.R7$(2),e.vxM(n.requestFileLocations()?7:-1),e.R7$(2),e.Y8G("disabled",n._saving()),e.R7$(2),e.JRh(e.bMT(12,20,"components.modals.rdfEdit.buttonCancel")),e.R7$(2),e.Y8G("disabled",!n._selectedEntityCategory()||n._saving()),e.R7$(2),e.JRh(e.bMT(16,22,"components.modals.rdfEdit.buttonSave")),e.R7$(2),e.vxM(n._saveError()?17:-1))},dependencies:[P.n,_.F,N.a,v.$,f.L,y.o,A.a,b.l,H.d,pt.R,F.Kj],styles:[".modal-content[_ngcontent-%COMP%]{width:640px;max-width:calc(100vw - 32px)}"],changeDetection:0})}return o})();const xt=()=>[];function Pt(o,c){if(1&o&&(e.nrm(0,"cue-key-val",6),e.nI1(1,"transloco")),2&o){const t=e.XpG(2);e.Y8G("key",e.bMT(1,2,"components.contentBlocks.documentViewer.labelSubject"))("val",t.subject())}}function Dt(o,c){if(1&o&&(e.j41(0,"cue-key-val-list"),e.nVh(1,Pt,2,4,"cue-key-val",6),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.vxM(t.subject()?1:-1)}}function Et(o,c){if(1&o&&(e.j41(0,"cue-flexcontainer",4)(1,"cue-menu",7)(2,"cue-button",8,0),e.nrm(4,"cue-button-icon",9),e.k0s(),e.nrm(5,"cue-menu-nested",10),e.k0s()()),2&o){const t=e.XpG();e.R7$(5),e.Y8G("items",t.menuItems())}}function Ot(o,c){if(1&o&&(e.nrm(0,"cue-key-val-editable",11),e.nI1(1,"transloco"),e.nI1(2,"transloco")),2&o){const t=e.XpG(2);e.Y8G("key",1===t.contentCategories().length?e.bMT(1,4,"components.contentBlocks.documentViewer.labelContentCategory"):e.bMT(2,6,"components.contentBlocks.documentViewer.labelContentCategories"))("val",t.contentCategoriesString())("rdfConfig",t.rdfEditConfig())("editDisabled",!t.contentCategoriesEditable())}}function Ft(o,c){if(1&o&&(e.j41(0,"span",15),e.EFF(1),e.k0s()),2&o){const t=e.XpG(3);e.R7$(),e.Lme("(",t.currentFilePathIndex()+1,"/",t.fileLocations().length,")")}}function wt(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-button",19),e.bIt("click",function(){l.eBV(t);const n=e.XpG(3);return l.Njj(n.prevFilePath())}),e.nrm(1,"cue-button-icon",20),e.k0s()}if(2&o){const t=e.XpG(3);e.Y8G("disabled",0===t.currentFilePathIndex())}}function kt(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-button",19),e.bIt("click",function(){l.eBV(t);const n=e.XpG(3);return l.Njj(n.nextFilePath())}),e.nrm(1,"cue-button-icon",21),e.k0s()}if(2&o){const t=e.XpG(3);e.Y8G("disabled",t.currentFilePathIndex()===t.fileLocations().length-1)}}function Rt(o,c){if(1&o){const t=e.RV6();e.j41(0,"dl",12)(1,"dt",13)(2,"cue-typography",14),e.EFF(3),e.nI1(4,"transloco"),e.nVh(5,Ft,2,2,"span",15),e.k0s()(),e.j41(6,"dd",16),e.nVh(7,wt,2,1,"cue-button",17),e.j41(8,"cue-file-path-viewer",18),e.bIt("textSelected",function(n){l.eBV(t);const a=e.XpG(2);return l.Njj(a.onTextSelected(n))}),e.k0s(),e.nVh(9,kt,2,1,"cue-button",17),e.k0s()()}if(2&o){const t=e.XpG(2);e.R7$(3),e.SpI(" ",e.bMT(4,8,"components.contentBlocks.documentViewer.labelFilePath")," "),e.R7$(2),e.vxM(t.fileLocations().length>1?5:-1),e.R7$(2),e.vxM(t.fileLocations().length>1?7:-1),e.R7$(),e.Y8G("path",t.fileLocations()[t.currentFilePathIndex()].path)("highlights",t.filePathEntitiesVisible()?t.filePathHighlights():e.lJ4(10,xt))("allowDelete",t.filePathEntitiesEditable())("allowAdd",t.filePathEntitiesEditable()),e.R7$(),e.vxM(t.fileLocations().length>1?9:-1)}}function Vt(o,c){if(1&o&&(e.j41(0,"cue-key-val-list"),e.nrm(1,"hr"),e.nVh(2,Ot,3,8,"cue-key-val-editable",11),e.nVh(3,Rt,10,11,"dl",12),e.k0s()),2&o){const t=e.XpG();e.R7$(2),e.vxM(t.contentCategories()&&t.contentCategories().length>0?2:-1),e.R7$(),e.vxM(t.fileLocations().length>0?3:-1)}}function Tt(o,c){if(1&o){const t=e.RV6();e.j41(0,"cue-entity-mention-modal",22),e.bIt("confirm",function(n){l.eBV(t);const a=e.XpG();return l.Njj(a.onEntityMentionConfirm(n))})("cancel",function(){l.eBV(t);const n=e.XpG();return l.Njj(n.onEntityMentionCancel())}),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("selection",t._pendingSelection())("availableEntityCategories",t.availableEntityCategories())("fileLocations",t.fileLocations())("requestFileLocations",t._fileLocationsProvider())("requestFilePathEntityAdd",t._requestFilePathEntityAdd())}}let It=(()=>{class o{subject=s.hFB.required();handlers=s.hFB.required();dataChanged=(0,s.CGW)();filePathEntityAdded=(0,s.CGW)();fileLocations=(0,s.hFB)([]);_fileLocationsProvider=(0,g.EW)(()=>{const t=this.handlers().requestFileLocations;if(t)return t;const i=this.fileLocations();return i.length?()=>Promise.resolve(i):void 0});filePathEntities=(0,s.geq)([]);contentCategories=(0,s.hFB)([]);contentCategoriesEditable=(0,s.hFB)(!1);filePathEntitiesVisible=(0,s.hFB)(!1);filePathEntitiesEditable=(0,s.hFB)(!1);menuItems=(0,s.hFB)([]);availableContentCategories=(0,s.hFB)([]);availableEntityCategories=(0,s.hFB)([]);collapsed=(0,s.hFB)(!1);hasDocInfo=(0,g.EW)(()=>{const t=""!==this.subject(),i=this.fileLocations().length>0;return t||i});currentFilePathIndex=(0,l.vPA)(0);_entityCategoryModalVisible=(0,l.vPA)(!1);_pendingSelection=(0,l.vPA)(null);_requestFilePathEntityAdd=(0,g.EW)(()=>{var t=this;const i=this.handlers().requestFilePathEntityAdd;if(i)return function(){var n=(0,h.A)(function*(a,r){const d=t._pendingSelection();d&&(yield i({paths:r,start:d.start,end:d.end,text:d.text,entityCategory:a,folderPath:d.path.substring(0,d.end)}))});return function(a,r){return n.apply(this,arguments)}}()});prevFilePath(){this.currentFilePathIndex()>0&&this.currentFilePathIndex.update(t=>t-1)}nextFilePath(){this.currentFilePathIndex()<this.fileLocations().length-1&&this.currentFilePathIndex.update(t=>t+1)}filePathHighlights=(0,g.EW)(()=>this.filePathEntities().map(t=>({path:t.path,start:t.startIndex,end:t.endIndex,label:this.availableEntityCategories().find(i=>i.iri===t.entityCategory)?.label??t.entityCategory.split("/").pop()??t.entityCategory})));entityCategoryLabelMap=(0,g.EW)(()=>this.availableEntityCategories().reduce((t,i)=>(t[i.iri]=i.label,t),{}));onTextSelected(t){this._pendingSelection.set(t),this._entityCategoryModalVisible.set(!0)}onEntityMentionConfirm(t){const i=this._pendingSelection();i&&(this.filePathEntities.update(n=>[...n,...t.paths.map(a=>({path:a.path,entityCategory:t.entityCategory,startIndex:i.start,endIndex:i.end}))]),this.filePathEntityAdded.emit({paths:t.paths,start:i.start,end:i.end,text:i.text,entityCategory:t.entityCategory,folderPath:i.path.substring(0,i.end)}),this._entityCategoryModalVisible.set(!1),this._pendingSelection.set(null))}onEntityMentionCancel(){this._entityCategoryModalVisible.set(!1),this._pendingSelection.set(null)}_contentCategories=(0,g.uu)(()=>this.contentCategories());contentCategoriesString=(0,g.EW)(()=>this._contentCategories().map(t=>this._iriToString(t)).sort().join(", "));_iriToString(t){const i=this.availableContentCategories()?.find(n=>n.iri===t);return i?i.label:t}infoChangeContentCategory=(0,F.Xx)("components.documentInfo.infoChangeContentCategory");rdfEditConfig=(0,g.EW)(()=>{var t=this;const i=this.handlers()?.requestRDFChange;var n;if(void 0!==i)return{message:this.infoChangeContentCategory(),existingValue:this._contentCategories(),dataType:"multiselect",options:this.availableContentCategories()?.map(n=>n.iri),optionLabelMap:this.availableContentCategories()?.reduce((n,a)=>(n[a.iri]=a.label,n),{}),requestSave:(n=(0,h.A)(function*(a){console.log(a);const r={subject:t.subject(),predicate:`${lt.E.qcy}contentCategory`,objects:t._contentCategories(),newObjects:a.newValue,type:"contentCategory",comment:a.comment};yield i(r),t._contentCategories.set(a.newValue),t.dataChanged.emit({contentCategories:a.newValue})}),function(r){return n.apply(this,arguments)})};console.warn("No RDF change request handler defined")});static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-document-info"]],inputs:{subject:[1,"subject"],handlers:[1,"handlers"],fileLocations:[1,"fileLocations"],filePathEntities:[1,"filePathEntities"],contentCategories:[1,"contentCategories"],contentCategoriesEditable:[1,"contentCategoriesEditable"],filePathEntitiesVisible:[1,"filePathEntitiesVisible"],filePathEntitiesEditable:[1,"filePathEntitiesEditable"],menuItems:[1,"menuItems"],availableContentCategories:[1,"availableContentCategories"],availableEntityCategories:[1,"availableEntityCategories"],collapsed:[1,"collapsed"]},outputs:{dataChanged:"dataChanged",filePathEntityAdded:"filePathEntityAdded",filePathEntities:"filePathEntitiesChange"},decls:7,vars:4,consts:[["trigger",""],["direction","column",2,"min-height","50px"],["direction","row"],["direction","column",2,"flex","1 1"],["direction","column",2,"width","50px"],[3,"selection","availableEntityCategories","fileLocations","requestFileLocations","requestFilePathEntityAdd"],["size","l",3,"key","val"],["positioning","bottomleft"],["trigger","","variant","tertiary"],["icon","more-vert"],["menu","",3,"items"],["size","s",3,"key","val","rdfConfig","editDisabled"],[1,"file-path-nav-container"],[1,"file-path-label"],["size","xs"],[1,"path-counter"],[1,"file-path-row"],["variant","tertiary","size","xs",3,"disabled"],["size","s",3,"textSelected","path","highlights","allowDelete","allowAdd"],["variant","tertiary","size","xs",3,"click","disabled"],["icon","paginator-back"],["icon","paginator-next"],[3,"confirm","cancel","selection","availableEntityCategories","fileLocations","requestFileLocations","requestFilePathEntityAdd"]],template:function(i,n){1&i&&(e.j41(0,"cue-flexcontainer",1)(1,"cue-flexcontainer",2)(2,"cue-flexcontainer",3),e.nVh(3,Dt,2,1,"cue-key-val-list"),e.k0s(),e.nVh(4,Et,6,1,"cue-flexcontainer",4),e.k0s(),e.nVh(5,Vt,4,2,"cue-key-val-list"),e.k0s(),e.nVh(6,Tt,1,5,"cue-entity-mention-modal",5)),2&i&&(e.R7$(3),e.vxM(n.fileLocations().length>0||n.subject()?3:-1),e.R7$(),e.vxM(n.menuItems().length>0?4:-1),e.R7$(),e.vxM(!n.collapsed()&&n.hasDocInfo()?5:-1),e.R7$(),e.vxM(n._entityCategoryModalVisible()&&n._pendingSelection()?6:-1))},dependencies:[P.n,z.p,_.F,Je,B.W,at,N.a,v.$,_t,y.o,yt,F.Kj],styles:[".file-path-nav-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.file-path-label[_ngcontent-%COMP%]{display:block;margin:0}.file-path-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;margin:0;overflow:visible;padding:1px}.file-path-row[_ngcontent-%COMP%] cue-file-path-viewer[_ngcontent-%COMP%]{flex:1;overflow:visible;min-width:0}.path-counter[_ngcontent-%COMP%]{opacity:.6}"],changeDetection:0})}return o})();class zt{requestRDFChange;requestFileLocations;requestFilePathEntityAdd}var jt=u(2065);const Nt=["viewerHost"];function Bt(o,c){if(1&o&&e.nrm(0,"cue-document-info",2),2&o){const t=e.XpG();e.Y8G("subject",t._docSubject())("handlers",t._docInfoHandlers)("menuItems",t._menuItems())}}function St(o,c){1&o&&(e.j41(0,"cue-flexcontainer",3)(1,"cue-typography"),e.EFF(2,"Loading\u2026"),e.k0s()())}function Gt(o,c){if(1&o&&(e.j41(0,"cue-flexcontainer",3)(1,"cue-typography",5),e.EFF(2),e.k0s()()),2&o){const t=e.XpG();e.R7$(2),e.JRh(t.errorMessage())}}const At=[".fragments",".dxf",".pdf",".png",".jpg",".jpeg",".xlsx",".xls",".csv",".txt",".md"];function q(o){const[c,t]=o.split("?"),i=c.trim();let n=null;if(t){const r=new URLSearchParams(t).get("page");if(null!==r){const d=parseInt(r,10);!isNaN(d)&&d>0&&(n=d)}}return{uuid:i,page:n}}let $t=(()=>{class o{viewerHost;currentViewerRef;cue=(0,s.hFB)(void 0);uuid=(0,s.hFB)(void 0);projectId=(0,s.hFB)(void 0);showDocumentInfo=(0,s.hFB)(!0);extraMenuItems=(0,s.hFB)([]);portalBaseURL=(0,s.hFB)("https://cue.qaecy.com");state=(0,l.vPA)("idle");errorMessage=(0,l.vPA)(null);resolvedUrl=(0,l.vPA)(null);resolvedSuffix=(0,l.vPA)(null);_docSubject=(0,l.vPA)("");_alternatives=(0,l.vPA)([]);_originalUuid=(0,l.vPA)(null);_originalDocSuffix=(0,l.vPA)(null);_cueSnapshot=null;_projectIdSnapshot=null;_docInfoHandlers=new zt;_menuItems=(0,g.EW)(()=>{const t=[],i=this._originalUuid(),n=this._originalDocSuffix();i&&n&&t.push({icon:"download",label:"Download file",action:()=>this._downloadOriginal()});const a=this.uuid(),r=this.projectId();if(a&&r){const{uuid:p}=q(a),C=this.portalBaseURL().replace(/\/$/,"");t.push({icon:"external-link",label:"Open in Cue",action:()=>window.open(`${C}/r/${r}/${p}`,"_blank","noopener,noreferrer")})}const d=this._alternatives();if(d.length>1){const p=this.resolvedSuffix();t.push({icon:"document",label:"Alternative representation",children:d.map(C=>({label:C.original?`Original (${C.suffix.replace(".","").toUpperCase()})`:C.suffix.replace(".","").toUpperCase(),tooltip:p===C.suffix?"Currently shown":void 0,action:()=>this._switchToAlternative(C)}))})}return t.push(...this.extraMenuItems()),t});constructor(){(0,l.QZP)(()=>{const t=this.cue(),i=this.uuid(),n=this.projectId();t&&i&&n?this._load(t,i,n):this.state.set("idle")})}_load(t,i,n){var a=this;return(0,h.A)(function*(){if(t&&i&&n){a.state.set("loading"),a.resolvedUrl.set(null),a.resolvedSuffix.set(null),a.errorMessage.set(null),a._docSubject.set(""),a._originalUuid.set(null),a._originalDocSuffix.set(null),a._alternatives.set([]),a.viewerHost.clear(),a.currentViewerRef?.destroy(),a.currentViewerRef=void 0;try{a._cueSnapshot=t,a._projectIdSnapshot=n;const{uuid:r,page:d}=q(i),p=t.createProjectDocuments(n),E=(yield p.fetchDocumentData([r]))[r];if(!E)throw new Error(`Document '${r}' not found in project '${n}'.`);a._docSubject.set(E.subject??""),a._originalUuid.set(r),a._originalDocSuffix.set(E.suffix);const D=yield p.fetchAlternativeRepresentations(r);a._alternatives.set([{uuid:r,suffix:E.suffix,original:!0},...D.filter(S=>S.id!==r).map(S=>({uuid:S.id,suffix:S.suffix,original:!1,remoteRelativePath:S.remoteRelativePath}))]);const{uuid:I,suffix:$,remoteRelativePath:ee}=function Lt(o,c){const t=[o,...c];let i,n=1/0;for(const a of t){const r=At.indexOf(a.suffix);-1!==r&&r<n&&(n=r,i=a)}return i?{uuid:i.id,suffix:i.suffix,remoteRelativePath:i.remoteRelativePath}:{uuid:o.id,suffix:o.suffix}}(E,D),te=ee?yield t.storage.getAltRepDownloadUrl(ee):yield t.storage.getDownloadUrl(n,I,$);a.resolvedUrl.set(te),a.resolvedSuffix.set($),yield a._renderViewer(te,$,d),a.state.set("ready")}catch(r){const d=r instanceof Error?r.message:String(r);console.error("[CueDocumentViewerWC] Failed to load document:",d),a.errorMessage.set(d),a.state.set("error")}}else a.state.set("idle")})()}_renderViewer(t,i,n){var a=this;return(0,h.A)(function*(){try{const{DocumentViewer:r}=yield Promise.all([u.e(418),u.e(76),u.e(741)]).then(u.bind(u,1741)),{DocumentViewerSettings:d}=yield u.e(418).then(u.bind(u,3418));a.viewerHost.clear(),a.currentViewerRef?.destroy();const p=new d;null!==n&&(p.pdf.page=String(n)),a.currentViewerRef=a.viewerHost.createComponent(r),a.currentViewerRef.setInput("url",t),a.currentViewerRef.setInput("suffix",i),a.currentViewerRef.setInput("settings",p)}catch(r){throw new Error(`Failed to load viewer component: ${r instanceof Error?r.message:String(r)}`)}})()}_switchToAlternative(t){var i=this;return(0,h.A)(function*(){const n=i._cueSnapshot,a=i._projectIdSnapshot;if(n&&a)try{const r=t.remoteRelativePath?yield n.storage.getAltRepDownloadUrl(t.remoteRelativePath):yield n.storage.getDownloadUrl(a,t.uuid,t.suffix);i.resolvedUrl.set(r),i.resolvedSuffix.set(t.suffix),yield i._renderViewer(r,t.suffix,null)}catch(r){console.error("[CueDocumentViewerWC] Failed to switch to alternative:",r)}})()}_downloadOriginal(){var t=this;return(0,h.A)(function*(){const i=t._cueSnapshot,n=t._projectIdSnapshot,a=t._originalUuid(),r=t._originalDocSuffix();if(i&&n&&a&&r)try{const d=yield i.storage.getDownloadUrl(n,a,r),C=yield(yield fetch(d)).blob();(0,jt.KE)(C,`${a}${r}`)}catch(d){console.error("[CueDocumentViewerWC] Failed to download original:",d)}})()}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-document-viewer-wc"]],viewQuery:function(i,n){if(1&i&&e.GBs(Nt,7,e.c1b),2&i){let a;e.mGM(a=e.lsd())&&(n.viewerHost=a.first)}},inputs:{cue:[1,"cue"],uuid:[1,"uuid"],projectId:[1,"projectId"],showDocumentInfo:[1,"showDocumentInfo"],extraMenuItems:[1,"extraMenuItems"],portalBaseURL:[1,"portalBaseURL"]},decls:7,vars:2,consts:[["viewerHost",""],[2,"display","flex","flex-direction","column","height","100%","width","100%"],[3,"subject","handlers","menuItems"],["direction","column","align","center","justify","center",2,"flex","1","width","100%"],[2,"flex","1","min-height","0","overflow","hidden"],[2,"color","#c44","font-size","13px"]],template:function(i,n){1&i&&(e.j41(0,"div",1),e.nVh(1,Bt,1,3,"cue-document-info",2),e.nVh(2,St,3,0,"cue-flexcontainer",3)(3,Gt,3,1,"cue-flexcontainer",3),e.j41(4,"div",4),e.eu8(5,null,0),e.k0s()()),2&i&&(e.R7$(),e.vxM(n.showDocumentInfo()&&"ready"===n.state()?1:-1),e.R7$(),e.vxM("loading"===n.state()?2:"error"===n.state()?3:-1))},dependencies:[m.MD,P.n,y.o,It],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return o})()}}]);
|
package/570.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[570],{3319(_e,G,A){A.d(G,{a:()=>H});var z=A(7705),F=A(29),P=A(5547);let H=(()=>{class k{icon=(0,z.hFB)(void 0);slot=(0,z.hFB)("before");static \u0275fac=function(x){return new(x||k)};static \u0275cmp=P.VBU({type:k,selectors:[["cue-button-icon"]],inputs:{icon:[1,"icon"],slot:[1,"slot"]},decls:1,vars:2,consts:[[3,"slot","name"]],template:function(x,K){1&x&&P.nrm(0,"cue-svg-icon",0),2&x&&P.Y8G("slot",K.slot())("name",K.icon())},dependencies:[F.A],encapsulation:2})}return k})()},1696(_e,G,A){A.d(G,{$:()=>$});var z=A(9769),F=A(7705),P=A(2271),H=A(7089),k=A(5802),B=A(5547);let Y=(()=>{class c{el=(0,k.WQX)(B.aKT);renderer=(0,k.WQX)(B.sFG);cuePulse=(0,F.hFB)(!1);cuePulseColor=(0,F.hFB)("");cuePulseMode=(0,F.hFB)("border");activeClass="";constructor(){this.ensureGlobalStyles()}onPulseChanged=(0,k.QZP)(()=>{const _=this.cuePulse(),b=this.cuePulseColor(),m=this.cuePulseMode(),v=this.el.nativeElement;if(this.activeClass&&(this.renderer.removeClass(v,this.activeClass),this.activeClass=""),this.renderer.removeStyle(v,"--cue-pulse-color"),this.renderer.removeStyle(v,"border-radius"),_){const N="text"===m?"cue-pulse-text":"cue-pulse-border";this.renderer.addClass(v,N),this.activeClass=N,b&&this.renderer.setStyle(v,"--cue-pulse-color",b),"border"===m&&setTimeout(()=>{const y=v.firstElementChild;if(y){const D=getComputedStyle(y).borderRadius;D&&"0px"!==D&&this.renderer.setStyle(v,"border-radius",D)}})}});ngOnDestroy(){const _=this.el.nativeElement;this.activeClass&&this.renderer.removeClass(_,this.activeClass),this.renderer.removeStyle(_,"border-radius")}ensureGlobalStyles(){const _="cue-pulse-global-styles";if(document.getElementById(_))return;const b=document.createElement("style");b.id=_,b.textContent="\n @keyframes cue-pulse-border-anim {\n 0% {\n box-shadow: 0 0 0 0 var(--cue-pulse-color, currentColor);\n }\n 70% {\n box-shadow: 0 0 0 8px transparent;\n }\n 100% {\n box-shadow: 0 0 0 0 transparent;\n }\n }\n\n @keyframes cue-pulse-text-anim {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n }\n\n .cue-pulse-border {\n animation: cue-pulse-border-anim 1.5s infinite ease-in-out;\n }\n\n .cue-pulse-text {\n animation: cue-pulse-text-anim 1.5s infinite ease-in-out;\n }\n ",document.head.appendChild(b)}static \u0275fac=function(b){return new(b||c)};static \u0275dir=B.FsC({type:c,selectors:[["","cuePulse",""]],inputs:{cuePulse:[1,"cuePulse"],cuePulseColor:[1,"cuePulseColor"],cuePulseMode:[1,"cuePulseMode"]}})}return c})();const x=["buttonElement"],K=["*"];let $=(()=>{class c{variant=(0,F.hFB)("primary");size=(0,F.hFB)("m");tooltip=(0,F.hFB)("");disabled=(0,F.hFB)(!1);selected=(0,F.geq)(!1);toggleButton=(0,F.hFB)(!1);loading=(0,F.hFB)(!1);fitParentWidth=(0,F.hFB)(!1);noWrap=(0,F.hFB)(!0);buttonElement=F.ebz.required("buttonElement");getStyles=(0,P.EW)(()=>[`\n padding: 0 var(--cue-button-${this.size()}-padding-x);\n\n --focus-color: var(--cue-button-${this.variant()}-focus-color);\n --cue-button-border-color: var(--cue-button-${this.variant()}-border-color);\n color: var(--cue-button-${this.variant()}-foreground);\n --background-color: var(--cue-button-${this.variant()}-background);\n\n --cue-icon-width: var(--cue-button-${this.size()}-icon-width);\n --button-height: var(--cue-button-${this.size()}-height);\n --cue-button-border-radius: var(--cue-button-border-radius, 9999px);\n --button-label-padding-x: var(--cue-button-${this.size()}-label-padding-x);\n `,this.disabled()?`\n color: var(--cue-button-${this.variant()}-disabled-foreground);\n --cue-button-border-color: var(--cue-button-${this.variant()}-disabled-border-color);\n --background-color: var(--cue-button-${this.variant()}-disabled-background);\n `:""].join(""));handleClick(_){_.detail>0&&this.buttonElement().nativeElement.blur(),this.toggleButton()&&(_.stopPropagation(),this.selected.set(!this.selected()))}static \u0275fac=function(b){return new(b||c)};static \u0275cmp=B.VBU({type:c,selectors:[["cue-button"]],viewQuery:function(b,m){1&b&&B.wEZ(m.buttonElement,x,5),2&b&&B.NyB()},inputs:{variant:[1,"variant"],size:[1,"size"],tooltip:[1,"tooltip"],disabled:[1,"disabled"],selected:[1,"selected"],toggleButton:[1,"toggleButton"],loading:[1,"loading"],fitParentWidth:[1,"fitParentWidth"],noWrap:[1,"noWrap"]},outputs:{selected:"selectedChange"},ngContentSelectors:K,decls:3,vars:18,consts:[["buttonElement",""],["tooltipSize","small",3,"click","disabled","cueTooltip","tooltipPlacement","cuePulse"]],template:function(b,m){1&b&&(B.NAR(),B.j41(0,"button",1,0),B.bIt("click",function(N){return m.handleClick(N)}),B.SdG(2),B.k0s()),2&b&&(B.Aen(m.getStyles()),B.xc7("white-space",m.noWrap()?"nowrap":"normal")("flex-basis",m.noWrap()?null:"auto")("min-width",m.noWrap()?null:"fit-content"),B.AVh("selected",m.selected())("ghost","ghost"===m.variant())("fit-parent-width",m.fitParentWidth()),B.Y8G("disabled",m.disabled())("cueTooltip",m.tooltip())("tooltipPlacement","top")("cuePulse",m.loading()))},dependencies:[z.MD,H.d,Y],styles:['[_nghost-%COMP%]:has(.fit-parent-width){display:contents}@keyframes _ngcontent-%COMP%_pulse-border{0%{box-shadow:0 0 0 0 var(--focus-color)}50%{box-shadow:0 0 0 8px transparent}to{box-shadow:0 0 0 0 transparent}}button[_ngcontent-%COMP%]{min-width:0;pulse-border-radius:var(--cue-button-border-radius);appearance:none;padding:0;font:inherit;border:var(--cue-button-border-width) var(--cue-button-border-style) var(--cue-button-border-color);display:flex;justify-content:space-between;align-items:center;gap:var(--cue-button-gap);min-height:var(--button-height);height:auto;background-color:var(--background-color);border-radius:var(--cue-button-border-radius, 9999px);margin:3px;position:relative}button[style*="white-space: normal"][_ngcontent-%COMP%]{border-radius:30px!important;padding:10px!important}button.fit-parent-width[_ngcontent-%COMP%]{width:100%;min-width:0}button[_ngcontent-%COMP%]:not(.fit-parent-width){min-width:fit-content;width:auto}button[_ngcontent-%COMP%]:focus{outline:none}button[_ngcontent-%COMP%]:hover:not(:disabled), button[_ngcontent-%COMP%]:focus-within:not(:disabled){outline:1px solid var(--focus-color);outline-offset:2px;cursor:pointer}button.selected[_ngcontent-%COMP%]{outline:1px solid currentColor!important;outline-offset:2px;margin:3px}button.ghost[_ngcontent-%COMP%]:not(.selected){border:none}']})}return c})()},9769(_e,G,A){A.d(G,{B3:()=>Re,MD:()=>en,T3:()=>ke});var $=A(7705),c=A(5802),i=A(5547);A(2271);let Re=(()=>{class e{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(t,n,r){this._ngEl=t,this._differs=n,this._renderer=r}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,n){const[r,s]=t.split("."),o=-1===r.indexOf("-")?void 0:i.czy.DashCase;null!=n?this._renderer.setStyle(this._ngEl.nativeElement,r,s?`${n}${s}`:n,o):this._renderer.removeStyle(this._ngEl.nativeElement,r,o)}_applyChanges(t){t.forEachRemovedItem(n=>this._setStyle(n.key,null)),t.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),t.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}static \u0275fac=function(n){return new(n||e)(i.rXU(i.aKT),i.rXU($.MKu),i.rXU(i.sFG))};static \u0275dir=i.FsC({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return e})(),ke=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=(0,c.WQX)(c.zZn);constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){const n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet)return void(this._viewRef=null);const r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this._getInjector()})}}_getInjector(){return"outlet"===this.ngTemplateOutletInjector?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,n,r)=>!!this.ngTemplateOutletContext&&Reflect.set(this.ngTemplateOutletContext,n,r),get:(t,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static \u0275fac=function(n){return new(n||e)(i.rXU(i.c1b))};static \u0275dir=i.FsC({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[i.OA$]})}return e})(),en=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=i.$C({type:e});static \u0275inj=c.G2t({})}return e})()}}]);
|
package/613.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[613],{4613(M,d,o){o.d(d,{Logo:()=>v});var h=o(7705),m=o(5802),n=o(5547),g=o(2271),f=o(6170);let v=(()=>{class u{size=(0,h.hFB)("m");active=(0,h.hFB)(!0,{transform:h.L39});continuous=(0,h.hFB)(!1,{transform:h.L39});isDarkMode=(0,h.geq)(!1);handleDarkModeChange(t){this.isDarkMode.set(t),-1===this.raf&&this.animate()}colorA=(0,g.EW)(()=>this.isDarkMode()?[221,246,18]:[18,28,43]);colorB=[0,202,204];paths=[];raf=-1;appearTime=0;disappearTime=0;tip=0;toe=0;mix=[0,0,0];norm=0;animate=t=>{if(void 0!==t&&(this.tip=Math.min(1,6e-4*(t-this.appearTime)),this.active()||(this.toe=Math.min(1,6e-4*(t-this.disappearTime)))),this.paths.forEach((i,e)=>{this.norm=1/this.paths.length*e,this.mix=this.mixRgb(this.colorA(),this.colorB,Math.max(0,Math.min(1,15*(this.tip-this.norm)))),i.setAttribute("stroke",this.tip*this.paths.length>e&&(this.active()||this.toe*this.paths.length<e)?this.rgbToSvg(this.mix):"transparent")}),this.tip>=1&&(this.active()||this.toe>=1))return this.continuous()?void setTimeout(()=>{this.appearTime=performance.now(),this.tip=0,this.toe=0,this.raf=requestAnimationFrame(this.animate)},500):void(this.raf=-1);this.raf=requestAnimationFrame(this.animate)};activate(){this.appearTime=performance.now(),this.animate(this.appearTime)}deactivate(){this.disappearTime=performance.now(),-1===this.raf&&this.animate(this.disappearTime)}mixChannel(t,i,e){return parseInt((t*e+i*(1-e)).toFixed())}mixRgb(t,i,e){return[this.mixChannel(t[0],i[0],e),this.mixChannel(t[1],i[1],e),this.mixChannel(t[2],i[2],e)]}rgbToSvg(t){return`rgb(${t[0]},${t[1]},${t[2]})`}constructor(){(0,m.QZP)(()=>{this.active()?this.activate():this.deactivate()}),(0,m.QZP)(()=>{this.isDarkMode(),this.animate()});const t=(0,m.WQX)(n.aKT);(0,n.mal)({read:()=>{if(this.paths.length)return;const i=t.nativeElement.querySelector("svg"),e=t.nativeElement.querySelector("#original-path");if(!e)return;const p=e.getTotalLength(),a=[];for(let l=0;l<400;l++){const s=e.getPointAtLength(p/400*l);a.push({x:parseFloat(s.x.toFixed(2)),y:parseFloat(s.y.toFixed(2))})}a.push(e.getPointAtLength(p)),a.reverse(),a.forEach((l,s)=>{if(0===s||1===s)return;const r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("d",`M${a[s-2].x},${a[s-2].y}L${a[s-1].x},${a[s-1].y}L${l.x},${l.y}`),r.setAttribute("fill","none"),r.setAttribute("stroke","transparent"),r.setAttribute("stroke-width",e?.getAttribute("stroke-width")||"1"),r.setAttribute("stroke-miterlimit",e?.getAttribute("stroke-miterlimit")||"1"),i.appendChild(r),this.paths.push(r)})}})}ngOnDestroy(){this.paths=[],cancelAnimationFrame(this.raf),this.raf=-1}static \u0275fac=function(i){return new(i||u)};static \u0275cmp=n.VBU({type:u,selectors:[["cue-logo"]],inputs:{size:[1,"size"],active:[1,"active"],continuous:[1,"continuous"],isDarkMode:[1,"isDarkMode"]},outputs:{isDarkMode:"isDarkModeChange"},decls:2,vars:0,consts:[["cueDarkMode","","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 221.545 86.191","width","222","height","86","overflow","visible",3,"darkModeChange"],["id","original-path","fill","none","stroke","transparent","stroke-miterlimit","10","stroke-width","12","d","M216.046 56.638s-10.561 24.201-36.192 22.991c-25.631-1.21-22.771-24.751-20.351-37.622 2.42-12.871 10.451-20.351 16.831-18.041 6.283 2.275 8.03 9.68 2.09 21.891-5.94 12.211-21.341 37.567-35.862 33.992-12.413-3.056-13.281-23.162-13.281-23.162V29.762v26.925c0 14.471-12.47 23.212-24.672 23.212s-24.672-8.301-24.672-23.212V29.829l-.006.105v13.031c0 20.416-16.55 36.966-36.966 36.966S6 63.381 6 42.966 22.55 6 42.966 6c6.91 0 13.377 1.896 18.91 5.196"]],template:function(i,e){1&i&&(m.qSk(),n.j41(0,"svg",0),n.bIt("darkModeChange",function(c){return e.handleDarkModeChange(c)}),n.nrm(1,"path",1),n.k0s())},dependencies:[f.R],styles:["[_nghost-%COMP%]{display:block}svg[_ngcontent-%COMP%]{flex:1;display:block;width:100%;height:auto}"]})}return u})()}}]);
|
package/710.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[710],{710(ce,N,m){m.d(N,{IDBuilder:()=>ue});for(var s=m(5802),c=[],w=0;w<256;++w)c.push((w+256).toString(16).slice(1));const V=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i,G=function U(t){if(!function F(t){return"string"==typeof t&&V.test(t)}(t))throw TypeError("Invalid UUID");var o,e=new Uint8Array(16);return e[0]=(o=parseInt(t.slice(0,8),16))>>>24,e[1]=o>>>16&255,e[2]=o>>>8&255,e[3]=255&o,e[4]=(o=parseInt(t.slice(9,13),16))>>>8,e[5]=255&o,e[6]=(o=parseInt(t.slice(14,18),16))>>>8,e[7]=255&o,e[8]=(o=parseInt(t.slice(19,23),16))>>>8,e[9]=255&o,e[10]=(o=parseInt(t.slice(24,36),16))/1099511627776&255,e[11]=o/4294967296&255,e[12]=o>>>24&255,e[13]=o>>>16&255,e[14]=o>>>8&255,e[15]=255&o,e};function R(t,o,e,n){switch(t){case 0:return o&e^~o&n;case 1:case 3:return o^e^n;case 2:return o&e^o&n^e&n}}function y(t,o){return t<<o|t>>>32-o}const $=function z(t,o,e){function n(i,r,u,d){var f;if("string"==typeof i&&(i=function L(t){t=unescape(encodeURIComponent(t));for(var o=[],e=0;e<t.length;++e)o.push(t.charCodeAt(e));return o}(i)),"string"==typeof r&&(r=G(r)),16!==(null===(f=r)||void 0===f?void 0:f.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var h=new Uint8Array(16+i.length);if(h.set(r),h.set(i,r.length),(h=e(h))[6]=15&h[6]|o,h[8]=63&h[8]|128,u){d=d||0;for(var g=0;g<16;++g)u[d+g]=h[g];return u}return function D(t,o=0){return(c[t[o+0]]+c[t[o+1]]+c[t[o+2]]+c[t[o+3]]+"-"+c[t[o+4]]+c[t[o+5]]+"-"+c[t[o+6]]+c[t[o+7]]+"-"+c[t[o+8]]+c[t[o+9]]+"-"+c[t[o+10]]+c[t[o+11]]+c[t[o+12]]+c[t[o+13]]+c[t[o+14]]+c[t[o+15]]).toLowerCase()}(h)}try{n.name=t}catch{}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}("v5",80,function X(t){var o=[1518500249,1859775393,2400959708,3395469782],e=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){var n=unescape(encodeURIComponent(t));t=[];for(var i=0;i<n.length;++i)t.push(n.charCodeAt(i))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var u=Math.ceil((t.length/4+2)/16),d=new Array(u),f=0;f<u;++f){for(var h=new Uint32Array(16),g=0;g<16;++g)h[g]=t[64*f+4*g]<<24|t[64*f+4*g+1]<<16|t[64*f+4*g+2]<<8|t[64*f+4*g+3];d[f]=h}d[u-1][14]=8*(t.length-1)/Math.pow(2,32),d[u-1][14]=Math.floor(d[u-1][14]),d[u-1][15]=8*(t.length-1)&4294967295;for(var P=0;P<u;++P){for(var p=new Uint32Array(80),b=0;b<16;++b)p[b]=d[P][b];for(var v=16;v<80;++v)p[v]=y(p[v-3]^p[v-8]^p[v-14]^p[v-16],1);for(var M=e[0],x=e[1],_=e[2],S=e[3],B=e[4],C=0;C<80;++C){var I=Math.floor(C/20),le=y(M,5)+R(I,x,_,S)+B+o[I]+p[C]>>>0;B=S,S=_,_=y(x,30)>>>0,x=M,M=le}e[0]=e[0]+M>>>0,e[1]=e[1]+x>>>0,e[2]=e[2]+_>>>0,e[3]=e[3]+S>>>0,e[4]=e[4]+B>>>0}return[e[0]>>24&255,e[0]>>16&255,e[0]>>8&255,255&e[0],e[1]>>24&255,e[1]>>16&255,e[1]>>8&255,255&e[1],e[2]>>24&255,e[2]>>16&255,e[2]>>8&255,255&e[2],e[3]>>24&255,e[3]>>16&255,e[3]>>8&255,255&e[3],e[4]>>24&255,e[4]>>16&255,e[4]>>8&255,255&e[4]]}),O={\u00e4:"ae",a\u0308:"ae",\u00c4:"AE",\u00f6:"oe",\u00d6:"OE",\u00fc:"ue",u\u0308:"ue",\u00dc:"UE",U\u0308:"UE",\u00df:"ss",\u00e6:"ae",\u00c6:"AE",\u00f8:"oe",\u00d8:"OE",\u00e5:"aa",\u00c5:"AA",\u00e1:"a",\u00c1:"A",\u00f0:"d",\u00d0:"D",\u00e9:"e",\u00c9:"E",\u00ed:"i",\u00cd:"I",\u00f3:"o",\u00d3:"O",\u00fa:"u",\u00da:"U",\u00fd:"y",\u00dd:"Y",\u00fe:"th",\u00de:"Th"};var a=m(5547),l=m(7705),E=m(2271),K=m(1696),Q=m(3319),Z=m(7089);let J=(()=>{class t{element;enabled=(0,l.hFB)(!1,{alias:"cueAutoMultiline"});value=(0,l.hFB)("",{alias:"autoMultilineValue"});buttonOffset=(0,l.hFB)(0,{alias:"autoMultilineButtonOffset"});shouldSwitchToMultiline=(0,l.CGW)();multilinePasted=(0,l.CGW)();measureSpan;hasSwitched=!1;constructor(e){this.element=e,(0,s.QZP)(()=>{this.value();this.enabled()&&this.measureSpan&&!this.hasSwitched&&setTimeout(()=>this.checkOverflow(),0)})}ngAfterViewInit(){this.enabled()&&(this.createMeasurementSpan(),setTimeout(()=>this.checkOverflow(),0))}onPaste(e){if(!this.enabled()||this.hasSwitched)return;const n=e.clipboardData?.getData("text");if(n&&n.includes("\n")){e.preventDefault();const i=this.element.nativeElement,r=i.selectionStart||0,u=i.value,d=u.substring(0,r)+n+u.substring(i.selectionEnd||r);this.hasSwitched=!0,this.multilinePasted.emit(d)}}createMeasurementSpan(){this.measureSpan=document.createElement("span"),this.measureSpan.style.position="absolute",this.measureSpan.style.visibility="hidden",this.measureSpan.style.whiteSpace="nowrap",this.measureSpan.style.pointerEvents="none";const e=this.element.nativeElement,n=window.getComputedStyle(e);this.measureSpan.style.font=n.font,this.measureSpan.style.padding=n.padding,e.parentElement?.appendChild(this.measureSpan)}checkOverflow(){if(!this.enabled()||!this.measureSpan||this.hasSwitched)return;const e=this.element.nativeElement;this.measureSpan.textContent=this.value(),this.measureSpan.offsetWidth>e.offsetWidth-this.buttonOffset()&&(this.hasSwitched=!0,this.shouldSwitchToMultiline.emit())}ngOnDestroy(){this.measureSpan&&this.measureSpan.remove()}static \u0275fac=function(n){return new(n||t)(a.rXU(a.aKT))};static \u0275dir=a.FsC({type:t,selectors:[["","cueAutoMultiline",""]],hostBindings:function(n,i){1&n&&a.bIt("paste",function(u){return i.onPaste(u)})},inputs:{enabled:[1,"cueAutoMultiline","enabled"],value:[1,"autoMultilineValue","value"],buttonOffset:[1,"autoMultilineButtonOffset","buttonOffset"]},outputs:{shouldSwitchToMultiline:"shouldSwitchToMultiline",multilinePasted:"multilinePasted"}})}return t})(),q=(()=>{class t{element;enabled=(0,l.hFB)(!0,{alias:"cueShiftEnter"});shiftEnterPressed=(0,l.CGW)();constructor(e){this.element=e}onKeyDown(e){if(this.enabled()&&"Enter"===e.key&&e.shiftKey){e.preventDefault();const n=this.element.nativeElement,i=n.selectionStart||0,r=n.value,u=r.substring(0,i)+"\n"+r.substring(i);this.shiftEnterPressed.emit({newValue:u,cursorPosition:i+1})}}static \u0275fac=function(n){return new(n||t)(a.rXU(a.aKT))};static \u0275dir=a.FsC({type:t,selectors:[["","cueShiftEnter",""]],hostBindings:function(n,i){1&n&&a.bIt("keydown",function(u){return i.onKeyDown(u)})},inputs:{enabled:[1,"cueShiftEnter","enabled"]},outputs:{shiftEnterPressed:"shiftEnterPressed"}})}return t})();const ee=["inputElement"],te=["textareaElement"];function ne(t,o){if(1&t){const e=a.RV6();a.j41(0,"input",4,0),a.mxI("valueChange",function(i){s.eBV(e);const r=a.XpG();return a.DH7(r.value,i)||(r.value=i),s.Njj(i)}),a.bIt("shiftEnterPressed",function(i){s.eBV(e);const r=a.XpG();return s.Njj(r.handleShiftEnter(i))})("shouldSwitchToMultiline",function(){s.eBV(e);const i=a.XpG();return s.Njj(i.switchToMultiline())})("multilinePasted",function(i){s.eBV(e);const r=a.XpG();return s.Njj(r.handleMultilinePaste(i))})("keyup",function(i){s.eBV(e);const r=a.XpG();return s.Njj(r.update(i))})("input",function(i){s.eBV(e);const r=a.XpG();return s.Njj(r.update(i))}),a.k0s()}if(2&t){const e=a.XpG();a.R50("value",e.value),a.Y8G("placeholder",e.placeholder())("cueShiftEnter",e.responsiveMode())("cueAutoMultiline",e.responsiveMode())("autoMultilineValue",e.value())("autoMultilineButtonOffset",e.showSubmitButton()?60:0)}}function ie(t,o){if(1&t){const e=a.RV6();a.j41(0,"textarea",5,1),a.mxI("valueChange",function(i){s.eBV(e);const r=a.XpG();return a.DH7(r.value,i)||(r.value=i),s.Njj(i)}),a.bIt("keyup",function(i){s.eBV(e);const r=a.XpG();return s.Njj(r.update(i))}),a.k0s(),a.j41(2,"div",6),a.bIt("mousedown",function(i){s.eBV(e);const r=a.XpG();return s.Njj(r.startDrag(i))}),a.nrm(3,"div",7),a.k0s()}if(2&t){const e=a.XpG();a.R50("value",e.value),a.Y8G("placeholder",e.placeholder())}}function ae(t,o){if(1&t){const e=a.RV6();a.j41(0,"cue-button",8),a.bIt("click",function(){s.eBV(e);const i=a.XpG();return s.Njj(i.searchInProgress()?i.cancel():i.submit())}),a.nrm(1,"cue-button-icon",9),a.k0s()}if(2&t){const e=a.XpG();a.AVh("multiline-button",e.effectiveMultiLineMode()),a.Y8G("variant",e.buttonVariant())("size",e.buttonSize())("cueTooltip",e.buttonTooltip()),a.R7$(),a.Y8G("icon",e.searchInProgress()?e.cancelIcon():e.submitIcon())}}let oe=(()=>{class t{renderer=(0,s.WQX)(a.sFG);placeholder=(0,l.hFB)("Search...");value=(0,l.geq)("");searchInProgress=(0,l.geq)(!1);searchFailed=(0,l.hFB)(!1);size=(0,l.hFB)("l");debounceTime=(0,l.hFB)(200);variant=(0,l.hFB)("secondary");showSubmitButton=(0,l.hFB)(!0);submitIcon=(0,l.hFB)("search");cancelIcon=(0,l.hFB)("close");buttonTooltip=(0,l.hFB)("");buttonVariant=(0,l.hFB)("accent");multiLineMode=(0,l.hFB)(!1);responsiveMode=(0,l.hFB)(!1);autoMultiLineMode=(0,s.vPA)(!1);effectiveMultiLineMode=(0,E.EW)(()=>this.multiLineMode()||this.responsiveMode()&&this.autoMultiLineMode());inputElement=(0,l.ebz)("inputElement");textareaElement=(0,l.ebz)("textareaElement");valueChange=(0,l.CGW)();valueSubmit=(0,l.CGW)();_debounceTimer;_value="";isDragging=(0,s.vPA)(!1);dragStartY=0;dragStartHeight=0;constructor(){(0,s.QZP)(()=>{this.effectiveMultiLineMode()&&this.responsiveMode()&&setTimeout(()=>{const n=this.textareaElement()?.nativeElement;if(n){n.focus();const i=n.value.length;n.setSelectionRange(i,i)}},0)}),(0,s.QZP)(()=>{this.value();const n=this.textareaElement()?.nativeElement;if(n&&this.effectiveMultiLineMode()){n.style.height="auto";const i=Math.min(n.scrollHeight,250);n.style.height=`${i}px`}})}startDrag(e){e.preventDefault();const n=this.textareaElement()?.nativeElement;if(!n)return;this.isDragging.set(!0),this.dragStartY=e.clientY;const i=window.getComputedStyle(n),r=parseFloat(i.height);this.dragStartHeight=r,n.style.height=`${r}px`;const u=this.onDragMove.bind(this),d=this.onDragEnd.bind(this);this.renderer.listen("document","mousemove",u);const f=this.renderer.listen("document","mouseup",h=>{d(h),f()})}onDragMove(e){if(!this.isDragging())return;const n=this.textareaElement()?.nativeElement;if(!n)return;const r=Math.max(64,this.dragStartHeight+(e.clientY-this.dragStartY));n.style.height=`${r}px`}onDragEnd(e){this.isDragging.set(!1)}switchToMultiline(){this.autoMultiLineMode.set(!0)}handleShiftEnter(e){this.value.set(e.newValue),this._value=e.newValue,this.autoMultiLineMode.set(!0),setTimeout(()=>{const n=this.textareaElement()?.nativeElement;n&&(n.focus(),n.setSelectionRange(e.cursorPosition,e.cursorPosition))},0)}handleMultilinePaste(e){this.value.set(e),this._value=e,this.autoMultiLineMode.set(!0),setTimeout(()=>{const n=this.textareaElement()?.nativeElement;if(n){n.focus();const i=n.value.length;n.setSelectionRange(i,i)}},0)}handleEnterKey(){this.multiLineMode()||this.responsiveMode()&&this.effectiveMultiLineMode()||this.submit()}update(e){this._value=e.target.value,this.value.set(this._value),clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>{this.valueChange.emit(this._value)},this.debounceTime())}submit(){this.valueSubmit.emit(this._value);const e=this.textareaElement()?.nativeElement;e&&(e.style.height="")}cancel(){this._value="",this.searchInProgress.set(!1),this.valueChange.emit(this._value)}buttonSize=(0,E.EW)(()=>"s"===this.size()?"xs":"m");hostStyles=(0,E.EW)(()=>{const n="s"===this.size()?"--height: calc(32rem / 16); --search-button-right: calc(4rem / 16); --search-input-padding-x: 1em; --search-font-size: 0.875em;":"";return`\n color: var(--cue-${this.variant()}Contrast);\n background-color: var(--cue-${this.variant()});\n ${n}\n `});static \u0275fac=function(n){return new(n||t)};static \u0275cmp=a.VBU({type:t,selectors:[["cue-search-bar"]],viewQuery:function(n,i){1&n&&a.wEZ(i.inputElement,ee,5)(i.textareaElement,te,5),2&n&&a.NyB(2)},hostVars:6,hostBindings:function(n,i){1&n&&a.bIt("keydown.enter",function(){return i.handleEnterKey()},a.EBC),2&n&&(a.Aen(i.hostStyles()),a.AVh("pulsing",i.searchInProgress()&&!i.searchFailed())("failed",i.searchFailed()))},inputs:{placeholder:[1,"placeholder"],value:[1,"value"],searchInProgress:[1,"searchInProgress"],searchFailed:[1,"searchFailed"],size:[1,"size"],debounceTime:[1,"debounceTime"],variant:[1,"variant"],showSubmitButton:[1,"showSubmitButton"],submitIcon:[1,"submitIcon"],cancelIcon:[1,"cancelIcon"],buttonTooltip:[1,"buttonTooltip"],buttonVariant:[1,"buttonVariant"],multiLineMode:[1,"multiLineMode"],responsiveMode:[1,"responsiveMode"]},outputs:{value:"valueChange",searchInProgress:"searchInProgressChange",valueChange:"valueChange",valueSubmit:"valueSubmit"},decls:3,vars:2,consts:[["inputElement",""],["textareaElement",""],["type","text",1,"search-input",3,"value","placeholder","cueShiftEnter","cueAutoMultiline","autoMultilineValue","autoMultilineButtonOffset"],[1,"search-button",3,"multiline-button","variant","size","cueTooltip"],["type","text",1,"search-input",3,"valueChange","shiftEnterPressed","shouldSwitchToMultiline","multilinePasted","keyup","input","value","placeholder","cueShiftEnter","cueAutoMultiline","autoMultilineValue","autoMultilineButtonOffset"],["rows","1",1,"search-input","multiline",3,"valueChange","keyup","value","placeholder"],[1,"drag-handle",3,"mousedown"],[1,"drag-handle-icon"],[1,"search-button",3,"click","variant","size","cueTooltip"],[3,"icon"]],template:function(n,i){1&n&&(a.nVh(0,ne,2,6,"input",2)(1,ie,4,2),a.nVh(2,ae,2,6,"cue-button",3)),2&n&&(a.vxM(i.effectiveMultiLineMode()?1:0),a.R7$(2),a.vxM(i.showSubmitButton()?2:-1))},dependencies:[K.$,Q.a,Z.d,J,q],styles:['[_nghost-%COMP%]{--height: 4rem ;border-radius:var(--height);font-family:var(--cue-font-family);position:relative;height:var(--height);display:flex;align-items:stretch}@container cue-container (width < 20em){[_nghost-%COMP%]{--height: 2.125rem }}[_nghost-%COMP%]:has(textarea.multiline){border-radius:1.25rem;min-height:var(--height);height:auto}.pulsing[_nghost-%COMP%]{animation:pulse-border 1.5s infinite ease-in-out}.failed[_nghost-%COMP%]{animation:_ngcontent-%COMP%_pulse-border-red 1.5s infinite ease-in-out}@keyframes _ngcontent-%COMP%_pulse-border-red{0%,to{box-shadow:0 0 #ef444466}50%{box-shadow:0 0 0 8px #ef44441a}}cue-button[_ngcontent-%COMP%]{position:absolute;right:var(--search-button-right, .625em);top:50%;transform:translateY(-50%)}cue-button.multiline-button[_ngcontent-%COMP%]{bottom:.625em;top:auto;transform:none}@container cue-container (width < 20em){cue-button[_ngcontent-%COMP%]{right:.25em}cue-button.multiline-button[_ngcontent-%COMP%]{bottom:.25em}}cue-typography[_ngcontent-%COMP%]{display:contents}cue-typography[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1;display:flex;align-items:stretch}input[_ngcontent-%COMP%], textarea[_ngcontent-%COMP%]{all:unset;font:inherit;font-size:var(--search-font-size, 1em);padding:0 var(--search-input-padding-x, 2em);flex:1;min-width:0;width:100%;height:100%;background-color:transparent;color:inherit;border-radius:4rem}input[_ngcontent-%COMP%]:focus-visible, textarea[_ngcontent-%COMP%]:focus-visible{outline:1px solid currentColor;outline-offset:2px}input[_ngcontent-%COMP%]::placeholder, textarea[_ngcontent-%COMP%]::placeholder{color:currentColor;opacity:.6}input[_ngcontent-%COMP%]::-ms-input-placeholder, textarea[_ngcontent-%COMP%]::-ms-input-placeholder{color:currentColor}@container cue-container (width < 20em){input[_ngcontent-%COMP%], textarea[_ngcontent-%COMP%]{padding:0 1em}}textarea.multiline[_ngcontent-%COMP%]{font-size:.875em;line-height:1.5;padding:1em 4em 2em 2em;resize:none;min-height:var(--height);border-radius:1.25rem;box-sizing:border-box;overflow-y:auto;scrollbar-gutter:stable}textarea.multiline[_ngcontent-%COMP%]::-webkit-scrollbar{width:10px}textarea.multiline[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#ffffff1a;border-top:28px solid transparent;border-bottom:28px solid transparent;background-clip:content-box}textarea.multiline[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background-color:#fff6;border-radius:5px;border:2px solid transparent;background-clip:content-box}textarea.multiline[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background-color:#ffffff80}@container cue-container (width < 20em){textarea.multiline[_ngcontent-%COMP%]{padding:.75em 3em 1.75em 1em}}.drag-handle[_ngcontent-%COMP%]{position:absolute;bottom:4px;left:50%;transform:translate(-50%);width:48px;height:24px;display:flex;align-items:center;justify-content:center;cursor:ns-resize;z-index:2;transition:opacity .2s ease;opacity:.6}.drag-handle[_ngcontent-%COMP%]:hover, .drag-handle[_ngcontent-%COMP%]:active{opacity:1}.drag-handle-icon[_ngcontent-%COMP%]{position:relative;width:24px;height:12px}.drag-handle-icon[_ngcontent-%COMP%]:before, .drag-handle-icon[_ngcontent-%COMP%]:after{content:"";position:absolute;width:16px;height:2px;background-color:currentColor;border-radius:1px;left:50%;transform:translate(-50%)}.drag-handle-icon[_ngcontent-%COMP%]:before{top:2px}.drag-handle-icon[_ngcontent-%COMP%]:after{bottom:2px}'],changeDetection:0})}return t})();var re=m(5381),se=m(2245);let ue=(()=>{class t{id=(0,s.vPA)("");updateId(e){this.id.set(function T(t,o=!1){return t=function W(t,o=!1){let e=t;for(const n in O)e=e.replace(new RegExp(n,"g"),O[n]);return o&&e!==t&&console.info(`${t} -> ${e}`),e}(t,o),$(t,"daca0510-72b5-48ba-9091-b918ca18136b")}(e))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=a.VBU({type:t,selectors:[["cue-id-builder"]],decls:4,vars:2,consts:[["direction","column","align","center"],["placeholder","Text string...",2,"width","100%","text-align","start",3,"valueChange","showSubmitButton"]],template:function(n,i){1&n&&(a.j41(0,"cue-flexcontainer",0)(1,"cue-search-bar",1),a.bIt("valueChange",function(u){return i.updateId(u)}),a.k0s(),a.j41(2,"cue-typography"),a.EFF(3),a.k0s()()),2&n&&(a.R7$(),a.Y8G("showSubmitButton",!1),a.R7$(2),a.JRh(i.id()))},dependencies:[oe,re.n,se.o],encapsulation:2})}return t})()}}]);
|