1import{$b as m,Aa as V,Ab as b,Bh as z,Ch as c,Df as P,Ga as q,Ha as _,Hb as M,Sa as a,Tc as J,Uc as X,Vb as F,Wb as x,Xb as T,Yb as B,Za as y,Zb as W,_a as l,_b as h,a as $,ad as U,bj as ee,cf as j,d as H,dd as w,df as D,eb as L,fc as A,gb as I,gf as Z,hd as G,hf as u,ic as g,ja as N,jb as S,kb as R,kc as E,pb as f,wc as v,yb as d,za as C,zb as p,zh as Y}from"./chunk-Y7YV4OAR.js";var ie=["*"];function ae(n,s){if(n&1&&(p(0,"span",4),g(1),b()),n&2){let e=F(2);a(),E("(",e.textFor("optional"),")")}}function ce(n,s){if(n&1&&(p(0,"label",2),g(1),R(2,ae,2,1,"span",3),b()),n&2){let e=F();d("ngClass",e.labelCssClass)("ngStyle",e.labelCssStyle)("for",e.id),f("id",e.labelId),a(),E(" ",e.text),a(),d("ngIf",e.optional)}}function de(n,s){if(n&1&&(p(0,"span",3),g(1),b()),n&2){let e=F();a(),E("(",e.textFor("optional"),")")}}var ue=n=>n instanceof HTMLElement,fe=(n,s)=>n.hasAttribute(s),pe=n=>n.querySelector("kendo-label > input, kendo-label > textarea, kendo-label > select"),be=n=>{if(!n)return null;let s=n;for(;s.parentElement;)s=s.parentElement;return s},ne=["BUTTON","INPUT","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"],K=(()=>{class n{label;renderer;zone;for;get labelFor(){if(typeof this.for=="string")return this.for;if(!D())return null;let e=this.getFocusableComponent()||{};return ue(e)&&!fe(e,"id")&&this.renderer.setAttribute(e,"id",`k-${u()}`),e.focusableId||e.id||null}labelClass=!0;clickListener;constructor(e,t,i){this.label=e,this.renderer=t,this.zone=i}ngAfterViewInit(){this.setAriaLabelledby(),this.zone.runOutsideAngular(()=>this.clickListener=this.renderer.listen(this.label.nativeElement,"click",this.handleClick))}ngOnDestroy(){this.clickListener&&this.clickListener()}setAriaLabelledby(){if(!D())return;let e=this.getFocusableComponent();if(e&&e.focusableId){let i=be(this.label.nativeElement).querySelector(`#${e.focusableId}`),o=this.label.nativeElement,r=o.id||`k-${u()}`;if(o.getAttribute("id")||this.renderer.setAttribute(o,"id",r),e.focusableId.startsWith("k-editor")&&e.iframe&&e.contentAreaLoaded.subscribe(()=>{this.zone.runOutsideAngular(()=>{setTimeout(()=>{let re=e.container.element.nativeElement.contentDocument.body.firstElementChild;this.renderer.setAttribute(re,"aria-label",o.textContent)})})}),!i)return;let k=i.hasAttribute("aria-labelledby")&&i.getAttribute("aria-labelledby");this.renderer.setAttribute(i,ne.includes(i.tagName)?"data-kendo-label-id":"aria-labelledby",k&&k!==r?`${k} ${r}`:r)}}getFocusableComponent(){let e=this.for;return e&&e.focus!==void 0?e:null}handleClick=()=>{let e=this.getFocusableComponent();e&&e.focus&&e.focus()};static \u0275fac=function(t){return new(t||n)(l(_),l(y),l(V))};static \u0275dir=I({type:n,selectors:[["label","for",""]],hostVars:3,hostBindings:function(t,i){t&2&&(f("for",i.labelFor),A("k-label",i.labelClass))},inputs:{for:"for",labelClass:"labelClass"}})}return n})(),se={name:"@progress/kendo-angular-label",productName:"Kendo UI for Angular",productCode:"KENDOUIANGULAR",productCodes:["KENDOUIANGULAR"],publishDate:1763638839,version:"21.1.0",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/"},Q=class{component;onFocus;onBlur;autoFillStart;autoFillEnd;onValueChange;get focusableId(){let s=this.component;return"focusableId"in s?s.focusableId:"id"in s?s.id:""}set focusableId(s){let e=this.component;"focusableId"in e?e.focusableId=s:"id"in e&&(e.id=s)}constructor(s,e){this.component=s;let t=i=>i instanceof H||i instanceof C;t(s.onFocus)&&(this.onFocus=s.onFocus),t(s.autoFillStart)&&(this.autoFillStart=s.autoFillStart),t(s.autoFillEnd)&&(this.autoFillEnd=s.autoFillEnd),t(s.onBlur)&&(this.onBlur=s.onBlur),e?this.onValueChange=e.valueChanges:s.valueChange&&(this.onValueChange=s.valueChange)}},O=(()=>{class n extends Y{optional;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(n)))(i||n)}})();static \u0275dir=I({type:n,selectors:[["kendo-label-messages-base"]],inputs:{optional:"optional"},standalone:!1,features:[S]})}return n})(),oe=(()=>{class n extends O{service;constructor(e){super(),this.service=e}static \u0275fac=function(t){return new(t||n)(l(c))};static \u0275dir=I({type:n,selectors:[["","kendoLabelLocalizedMessages",""],["","kendoFloatingLabelLocalizedMessages",""]],features:[v([{provide:O,useExisting:N(()=>n)}]),S]})}return n})(),te=n=>Object.prototype.toString.call(n)==="[object Function]",he=(()=>{class n{elementRef;renderer;changeDetectorRef;localization;get labelPosition(){return this.empty?this.focused?"Out":"In":"Out"}hostClasses=!0;get focusedClass(){return this.focused}get invalidClass(){return this.invalid}direction;labelCssStyle;labelCssClass;
1id;text;optional;positionChange=new C;kendoInput;formControl;focused=!1;empty=!0;invalid=!1;labelId=`k-${u()}`;subscription;autoFillStarted=!1;constructor(e,t,i,o){this.elementRef=e,this.renderer=t,this.changeDetectorRef=i,this.localization=o,j(se),this.direction=o.rtl?"rtl":"ltr",this.renderer.removeAttribute(this.elementRef.nativeElement,"id")}ngAfterContentInit(){if(!D())return;this.validateSetup();let e=new Q(this.kendoInput||this.formControl.valueAccessor,this.formControl);this.addHandlers(e),this.setLabelFor(e)}ngAfterViewInit(){this.kendoInput&&this.setAriaLabelledby(this.kendoInput)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}textFor(e){return this.localization.get(e)}subscribe(e,t,i){if(e[t]instanceof C){let o=e[t].subscribe(i);this.subscription?this.subscription.add(o):this.subscription=o}}updateState(){let e=i=>i===0||i===!1?!1:Array.isArray(i)&&!i.length?!0:!i,t=this.formControl;if(t){let i=t.valueAccessor;te(i.isEmpty)?this.empty=i.isEmpty():this.empty=e(t.value),this.invalid=t.invalid&&(t.touched||t.dirty)}else this.empty=te(this.kendoInput.isEmpty)?this.kendoInput.isEmpty():e(this.kendoInput.value);this.empty?this.renderer.addClass(this.elementRef.nativeElement,"k-empty"):this.renderer.removeClass(this.elementRef.nativeElement,"k-empty"),this.changeDetectorRef.markForCheck()}setAriaLabelledby(e){let t=e.focusableId||e.id;if(t){let i=this.elementRef.nativeElement.querySelector(`#${t}`);if(!i)return;let o=i.hasAttribute("aria-labelledby")&&i.getAttribute("aria-labelledby");this.renderer.setAttribute(i,ne.includes(i.tagName)?"data-kendo-label-id":"aria-labelledby",o&&o!==this.labelId?`${o} ${this.labelId}`:this.labelId)}}setLabelFor(e){let t=e.focusableId||e.id;if(this.id&&t)this.id=t;else if(this.id)e.focusableId=this.id;else if(t)this.id=t;else{let i=`k-${u()}`;e.focusableId=i,this.id=i}}handleAutofill(e){this.subscribe(e,"autoFillStart",()=>{this.autoFillStarted=!0,this.renderer.removeClass(this.elementRef.nativeElement,"k-empty")}),this.subscribe(e,"autoFillEnd",()=>{this.autoFillStarted&&(this.autoFillStarted=!1,this.empty&&this.renderer.addClass(this.elementRef.nativeElement,"k-empty"))})}addHandlers(e){let t=o=>()=>{this.focused=o,this.updateState(),this.empty&&Z(this.positionChange)&&this.positionChange.emit(o?"Out":"In")};
1this.subscribe(e,"onFocus",t(!0)),this.subscribe(e,"onBlur",t(!1)),this.handleAutofill(e);let i=()=>this.updateState();i(),this.subscribe(e,"onValueChange",i)}validateSetup(){if(!this.formControl&&!this.kendoInput){if(J())throw new Error("The FloatingLabelComponent requires a Kendo Input component or a forms-bound component to function properly.");return}}static \u0275fac=function(t){return new(t||n)(l(_),l(y),l(X),l(c))};static \u0275cmp=L({type:n,selectors:[["kendo-floatinglabel"]],contentQueries:function(t,i,o){if(t&1&&B(o,P,5)(o,ee,5),t&2){let r;h(r=m())&&(i.kendoInput=r.first),h(r=m())&&(i.formControl=r.first)}},hostVars:7,hostBindings:function(t,i){t&2&&(f("dir",i.direction),A("k-floating-label-container",i.hostClasses)("k-focus",i.focusedClass)("k-invalid",i.invalidClass))},inputs:{labelCssStyle:"labelCssStyle",labelCssClass:"labelCssClass",id:"id",text:"text",optional:"optional"},outputs:{positionChange:"positionChange"},exportAs:["kendoFloatingLabel"],features:[v([c,{provide:z,useValue:"kendo.floatinglabel"}])],ngContentSelectors:ie,decls:3,vars:1,consts:()=>{let e;return e=$localize`:kendo.floatinglabel.optional|The text for the optional segment of a FloatingLabel component:Optional`,[["kendoFloatingLabelLocalizedMessages","","optional",e],["class","k-floating-label",3,"ngClass","ngStyle","for",4,"ngIf"],[1,"k-floating-label",3,"ngClass","ngStyle","for"],["class","k-label-optional",4,"ngIf"],[1,"k-label-optional"]]},template:function(t,i){t&1&&(x(),M(0,0),T(1),R(2,ce,3,6,"label",1)),t&2&&(a(2),d("ngIf",i.text))},dependencies:[oe,w,U,G],encapsulation:2})}return n})(),me=(()=>{class n{elementRef;renderer;localization;direction;text;set for(e){e!==this._for&&(this._for=e,this.control=e)}get for(){return this._for}optional;labelCssStyle;labelCssClass;labelDirective;kendoInput;control;subscriptions=new $;_for;constructor(e,t,i){this.elementRef=e,this.renderer=t,this.localization=i,j(se),this.direction=i.rtl?"rtl":"ltr",this.renderer.removeAttribute(this.elementRef.nativeElement,"id")}ngAfterContentInit(){if(this.for)return;let e=pe(this.elementRef.nativeElement);if(e){e.hasAttribute("id")||this.renderer.setAttribute(e,"id",`k-${u()}`),this.control=e;return}this.control=this.kendoInput}ngOnInit(){this.subscriptions.add(this.localization.changes.subscribe(({rtl:e})=>{this.direction=e?"rtl":"ltr"}))}ngAfterViewInit(){this.labelDirective.setAriaLabelledby()}ngOnDestroy(){this.subscriptions&&this.subscriptions.unsubscribe()}textFor(e){return this.localization.get(e)}static \u0275fac=function(t){return new(t||n)(l(_),l(y),l(c))};static \u0275cmp=L({type:n,selectors:[["kendo-label"]],contentQueries:function(t,i,o){if(t&1&&B(o,P,7),t&2){let r;h(r=m())&&(i.kendoInput=r.first)}},viewQuery:function(t,i){if(t&1&&W(K,7),t&2){let o;h(o=m())&&(i.labelDirective=o.first)}},hostVars:1,hostBindings:function(t,i){t&2&&f("dir",i.direction)},inputs:{text:"text",for:"for",optional:"optional",labelCssStyle:"labelCssStyle",labelCssClass:"labelCssClass"},exportAs:["kendoLabel"],features:[v([c,{provide:z,useValue:"kendo.label"}])],ngContentSelectors:ie,decls:5,vars:7,consts:()=>{let e;return e=$localize`:kendo.label.optional|The text for the optional segment of a Label component:Optional`,[["kendoLabelLocalizedMessages","","optional",e],[3,"for","ngClass","ngStyle"],["class","k-label-optional",4,"ngIf"],[1,"k-label-optional"]]},template:function(t,i){t&1&&(x(),M(0,0),p(1,"label",1),g(2),R(3,de,2,1,"span",2),b(),T(4)),t&2&&(a(),A("k-label-empty",!i.text),d("for",i.control)("ngClass",i.labelCssClass)("ngStyle",i.labelCssStyle),a(),E(" ",i.text),a(),d("ngIf",i.optional))},dependencies:[oe,K,U,G,w],encapsulation:2})}return n})(),le=(()=>{class n extends O{service;constructor(e){super(),this.service=e}get override(){return!0}static \u0275fac=function(t){return new(t||n)(l(c))};static \u0275cmp=L({type:n,selectors:[["kendo-label-messages"],["kendo-floatinglabel-messages"]],features:[v([{provide:O,useExisting:N(()=>n)}]),S],decls:0,vars:0,template:function(t,i){},encapsulation:2})}return n})(),ge=[K,me,le],Ee=[he,le],we=[...ge,...Ee];export{K as a,he as b,me as c};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.