import{Ar as Tu,Cr as T3,Da as e5,Eo as kb,F as Cx,Ga as g$,Go as m5,Gr as Va,Ia as f$,Is as rh,J as EI,Kn as Pw,L as D3,Ls as rx,Nc as yx,Nt as Hxe,Pa as eh,Pr as Ub,Vc as zt,Vr as Uxe,Wa as g,Ws as sh,Yi as bI,Za as gx,_t as Gb,as as oA,bc as x,c as A$,ec as th,fo as ih,fr as S,ho as j$,ht as Fxe,it as FB,lt as Fb,mo as iu,nc as tx,nr as RI,p as Au,pr as S3,ss as oh,t as $b,ts as nh,u as AV,vc as wp,vn as N$,wt as Hb,xc as x2}from"./chunk-B_pj7Jpm.js";import{F as Y,L as Z,N as Wt,U as ge$1,m as I,nt as rn}from"./chunk-COgN00_S.js";var ae=(()=>{class n extends rn{pathId;onInit(){this.pathId=`url(#`+Wt()+`)`}static ɵfac=(()=>{let e;return function(t){return(e||(e=iu(n)))(t||n)}})();static ɵcmp=Va({type:n,selectors:[[``,`data-p-icon`,`times-circle`]],features:[tx],decls:5,vars:2,consts:[[`fill-rule`,`evenodd`,`clip-rule`,`evenodd`,`d`,`M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z`,`fill`,`currentColor`],[3,`id`],[`width`,`14`,`height`,`14`,`fill`,`white`]],template:function(i,t){i&1&&(RI(),Fb(0,`g`),yx(1,`path`,0),Ub(),Fb(2,`defs`)(3,`clipPath`,1),yx(4,`rect`,2),Ub()()),i&2&&(eh(`clip-path`,t.pathId),FB(3),Cx(`id`,t.pathId))},encapsulation:2,changeDetection:1})}return n})();var pe=`
    .p-chip {
        display: inline-flex;
        align-items: center;
        background: dt('chip.background');
        color: dt('chip.color');
        border-radius: dt('chip.border.radius');
        padding-block: dt('chip.padding.y');
        padding-inline: dt('chip.padding.x');
        gap: dt('chip.gap');
    }

    .p-chip-icon {
        color: dt('chip.icon.color');
        font-size: dt('chip.icon.size');
        width: dt('chip.icon.size');
        height: dt('chip.icon.size');
    }

    .p-chip-image {
        border-radius: 50%;
        width: dt('chip.image.width');
        height: dt('chip.image.height');
        margin-inline-start: calc(-1 * dt('chip.padding.y'));
    }

    .p-chip:has(.p-chip-remove-icon) {
        padding-inline-end: dt('chip.padding.y');
    }

    .p-chip:has(.p-chip-image) {
        padding-block-start: calc(dt('chip.padding.y') / 2);
        padding-block-end: calc(dt('chip.padding.y') / 2);
    }

    .p-chip-remove-icon {
        cursor: pointer;
        font-size: dt('chip.remove.icon.size');
        width: dt('chip.remove.icon.size');
        height: dt('chip.remove.icon.size');
        color: dt('chip.remove.icon.color');
        border-radius: 50%;
        transition:
            outline-color dt('chip.transition.duration'),
            box-shadow dt('chip.transition.duration');
        outline-color: transparent;
    }

    .p-chip-remove-icon:focus-visible {
        box-shadow: dt('chip.remove.icon.focus.ring.shadow');
        outline: dt('chip.remove.icon.focus.ring.width') dt('chip.remove.icon.focus.ring.style') dt('chip.remove.icon.focus.ring.color');
        outline-offset: dt('chip.remove.icon.focus.ring.offset');
    }
`;var me=[`removeicon`];var _e=[`*`];function fe(n,p){if(n&1){let e=AV();wp(0,`img`,4),rh(`error`,function(t){EI(e);return bI(f$().imageError(t))}),kb()}if(n&2){let e=f$();N$(e.cx(`image`)),gx(`pBind`,e.ptm(`image`))(`src`,e.image,Pw)(`alt`,e.alt)}}function ge(n,p){if(n&1&&th(0,`span`,6),n&2){let e=f$(2);N$(e.icon),gx(`pBind`,e.ptm(`icon`))(`ngClass`,e.cx(`icon`))}}function he(n,p){if(n&1&&rx(0,ge,1,4,`span`,5),n&2)gx(`ngIf`,f$().icon)}function ue(n,p){if(n&1&&(wp(0,`div`,7),j$(1),kb()),n&2){let e=f$();N$(e.cx(`label`)),gx(`pBind`,e.ptm(`label`)),FB(),oA(e.label)}}function Ce(n,p){if(n&1){let e=AV();wp(0,`span`,11),rh(`click`,function(t){EI(e);return bI(f$(3).close(t))})(`keydown`,function(t){EI(e);return bI(f$(3).onKeydown(t))}),kb()}if(n&2){let e=f$(3);N$(e.removeIcon),gx(`pBind`,e.ptm(`removeIcon`))(`ngClass`,e.cx(`removeIcon`)),eh(`tabindex`,e.disabled?-1:0)(`aria-label`,e.removeAriaLabel)}}function ve(n,p){if(n&1){let e=AV();RI(),wp(0,`svg`,12),rh(`click`,function(t){EI(e);return bI(f$(3).close(t))})(`keydown`,function(t){EI(e);return bI(f$(3).onKeydown(t))}),kb()}if(n&2){let e=f$(3);N$(e.cx(`removeIcon`)),gx(`pBind`,e.ptm(`removeIcon`)),eh(`tabindex`,e.disabled?-1:0)(`aria-label`,e.removeAriaLabel)}}function ye(n,p){if(n&1&&(Hb(0),rx(1,Ce,1,6,`span`,9)(2,ve,1,5,`svg`,10),nh()),n&2){let e=f$(2);FB(),gx(`ngIf`,e.removeIcon),FB(),gx(`ngIf`,!e.removeIcon)}}function be(n,p){}function Ie(n,p){n&1&&rx(0,be,0,0,`ng-template`)}function xe(n,p){if(n&1){let e=AV();wp(0,`span`,13),rh(`click`,function(t){EI(e);return bI(f$(2).close(t))})(`keydown`,function(t){EI(e);return bI(f$(2).onKeydown(t))}),rx(1,Ie,1,0,null,14),kb()}if(n&2){let e=f$(2);N$(e.cx(`removeIcon`)),gx(`pBind`,e.ptm(`removeIcon`)),eh(`tabindex`,e.disabled?-1:0)(`aria-label`,e.removeAriaLabel),FB(),gx(`ngTemplateOutlet`,e.removeIconTemplate||e._removeIconTemplate)}}function we(n,p){if(n&1&&(Hb(0),rx(1,ye,3,2,`ng-container`,3)(2,xe,2,6,`span`,8),nh()),n&2){let e=f$();FB(),gx(`ngIf`,!e.removeIconTemplate&&!e._removeIconTemplate),FB(),gx(`ngIf`,e.removeIconTemplate||e._removeIconTemplate)}}var Te={root:({instance:n})=>({display:!n.visible&&`none`})};var ke={root:({instance:n})=>[`p-chip p-component`,{"p-disabled":n.disabled}],image:`p-chip-image`,icon:`p-chip-icon`,label:`p-chip-label`,removeIcon:`p-chip-remove-icon`};var se=(()=>{class n extends I{name=`chip`;style=pe;classes=ke;inlineStyles=Te;static ɵfac=(()=>{let e;return function(t){return(e||(e=iu(n)))(t||n)}})();static ɵprov=S({token:n,factory:n.ɵfac})}return n})();var le=new x(`CHIP_INSTANCE`);var Xe=(()=>{class n extends Y{componentName=`Chip`;$pcChip=g(le,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=g(Z,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms([`host`,`root`]))}label;icon;image;alt;styleClass;disabled=!1;removable=!1;removeIcon;onRemove=new zt;onImageError=new zt;visible=!0;get removeAriaLabel(){return this.config.getTranslation(Hxe.ARIA).removeLabel}get chipProps(){return this._chipProps}set chipProps(e){this._chipProps=e,e&&typeof e==`object`&&Object.entries(e).forEach(([i,t])=>this[`_${i}`]!==t&&(this[`_${i}`]=t))}_chipProps;_componentStyle=g(se);removeIconTemplate;templates;_removeIconTemplate;onAfterContentInit(){this.templates.forEach(e=>{e.getType()===`removeicon`?this._removeIconTemplate=e.template:this._removeIconTemplate=e.template})}onChanges(e){if(e.chipProps&&e.chipProps.currentValue){let{currentValue:i}=e.chipProps;i.label!==void 0&&(this.label=i.label),i.icon!==void 0&&(this.icon=i.icon),i.image!==void 0&&(this.image=i.image),i.alt!==void 0&&(this.alt=i.alt),i.styleClass!==void 0&&(this.styleClass=i.styleClass),i.removable!==void 0&&(this.removable=i.removable),i.removeIcon!==void 0&&(this.removeIcon=i.removeIcon)}}close(e){this.visible=!1,this.onRemove.emit(e)}onKeydown(e){(e.key===`Enter`||e.key===`Backspace`)&&this.close(e)}imageError(e){this.onImageError.emit(e)}get dataP(){return this.cn({removable:this.removable})}static ɵfac=(()=>{let e;return function(t){return(e||(e=iu(n)))(t||n)}})();static ɵcmp=Va({type:n,selectors:[[`p-chip`]],contentQueries:function(i,t,o){if(i&1&&sh(o,me,4)(o,Fxe,4),i&2){let y;$b(y=Gb())&&(t.removeIconTemplate=y.first),$b(y=Gb())&&(t.templates=y)}},hostVars:6,hostBindings:function(i,t){i&2&&(eh(`aria-label`,t.label)(`data-p`,t.dataP),A$(t.sx(`root`)),N$(t.cn(t.cx(`root`),t.styleClass)))},inputs:{label:`label`,icon:`icon`,image:`image`,alt:`alt`,styleClass:`styleClass`,disabled:[2,`disabled`,`disabled`,Tu],removable:[2,`removable`,`removable`,Tu],removeIcon:`removeIcon`,chipProps:`chipProps`},outputs:{onRemove:`onRemove`,onImageError:`onImageError`},features:[e5([se,{provide:le,useExisting:n},{provide:ge$1,useExisting:n}]),x2([Z]),tx],ngContentSelectors:_e,decls:6,vars:4,consts:[[`iconTemplate`,``],[3,`pBind`,`class`,`src`,`alt`,`error`,4,`ngIf`,`ngIfElse`],[3,`pBind`,`class`,4,`ngIf`],[4,`ngIf`],[3,`error`,`pBind`,`src`,`alt`],[3,`pBind`,`class`,`ngClass`,4,`ngIf`],[3,`pBind`,`ngClass`],[3,`pBind`],[`role`,`button`,3,`pBind`,`class`,`click`,`keydown`,4,`ngIf`],[`role`,`button`,3,`pBind`,`class`,`ngClass`,`click`,`keydown`,4,`ngIf`],[`data-p-icon`,`times-circle`,`role`,`button`,3,`pBind`,`class`,`click`,`keydown`,4,`ngIf`],[`role`,`button`,3,`click`,`keydown`,`pBind`,`ngClass`],[`data-p-icon`,`times-circle`,`role`,`button`,3,`click`,`keydown`,`pBind`],[`role`,`button`,3,`click`,`keydown`,`pBind`],[4,`ngTemplateOutlet`]],template:function(i,t){if(i&1&&(oh(),ih(0),rx(1,fe,1,5,`img`,1)(2,he,1,1,`ng-template`,null,0,m5)(4,ue,2,4,`div`,2)(5,we,3,2,`ng-container`,3)),i&2){let o=g$(3);FB(),gx(`ngIf`,t.image)(`ngIfElse`,o),FB(3),gx(`ngIf`,t.label),FB(),gx(`ngIf`,t.removable)}},dependencies:[Au,S3,T3,D3,ae,Uxe,Z],encapsulation:2})}return n})();export{ae as n,Xe as t};
//# debugId=bef4a89e-b441-5a9d-977d-8ed45c839ee7
//# sourceMappingURL=chunk-BkYXs1tH.js.map