import{a as rt}from"./chunk-LAJI7RPC.js";import{$ as V,Aa as s,B as ze,Ba as S,C as He,De as Se,Df as L,Ea as se,Ef as bt,Fe as Le,G as ut,Hf as Ve,Ie as Je,If as J,J as K,Ja as mt,Je as Ge,Ka as k,Ke as ft,Kf as it,Ma as ve,Na as c,O as De,Oa as z,Oe as gt,Of as ke,P as Ee,Pa as u,Q as m,Qe as zt,Ra as re,Re as yt,S as ye,Sa as oe,Se as we,Td as Qe,Te as _e,Ue as et,V as Ze,Va as r,W as w,Wa as Re,X as dt,_ as f,_a as X,_d as Q,a as $,b as Fe,bb as Ke,be as B,ca as p,ch as Ct,d as We,dh as vt,eh as st,ga as C,gb as H,ha as v,jf as Ue,kf as xe,l as N,nf as Oe,pa as P,pf as tt,pg as G,q as ct,qa as be,qf as nt,qg as F,r as b,ra as qe,rg as ae,sg as _,ta as Be,u as Ie,ua as ht,uf as x,w as $e,wa as j,xa as Ce,y as ie,ya as g}from"./chunk-SKPDQO4E.js";var ee=class i{constructor(){this.icon=null,this.type=null,this.template=null}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[],target:p.Component})}static{this.\u0275cmp=z({minVersion:"17.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"[nz-input-group-slot]",inputs:{icon:"icon",type:"type",template:"template"},host:{properties:{"class.ant-input-group-addon":"type === 'addon'","class.ant-input-prefix":"type === 'prefix'","class.ant-input-suffix":"type === 'suffix'"}},ngImport:r,template:`
    @if (icon) {
      <span nz-icon [nzType]="icon"></span>
    }
    <ng-container *nzStringTemplateOutlet="template">{{ template }}</ng-container>
    <ng-content></ng-content>
  `,isInline:!0,dependencies:[{kind:"ngmodule",type:J},{kind:"directive",type:Ve,selector:"[nz-icon]",inputs:["nzSpin","nzRotate","nzType","nzTheme","nzTwotoneColor","nzIconfont"],exportAs:["nzIcon"]},{kind:"ngmodule",type:xe},{kind:"directive",type:Ue,selector:"[nzStringTemplateOutlet]",inputs:["nzStringTemplateOutletContext","nzStringTemplateOutlet"],exportAs:["nzStringTemplateOutlet"]}],changeDetection:f.OnPush,encapsulation:V.None})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:ee,decorators:[{type:g,args:[{selector:"[nz-input-group-slot]",preserveWhitespaces:!1,encapsulation:V.None,changeDetection:f.OnPush,template:`
    @if (icon) {
      <span nz-icon [nzType]="icon"></span>
    }
    <ng-container *nzStringTemplateOutlet="template">{{ template }}</ng-container>
    <ng-content></ng-content>
  `,host:{"[class.ant-input-group-addon]":"type === 'addon'","[class.ant-input-prefix]":"type === 'prefix'","[class.ant-input-suffix]":"type === 'suffix'"},imports:[J,xe],standalone:!0}]}],propDecorators:{icon:[{type:s}],type:[{type:s}],template:[{type:s}]}});var I=class i{get disabled(){return this.ngControl&&this.ngControl.disabled!==null?this.ngControl.disabled:this._disabled}set disabled(e){this._disabled=e!=null&&`${e}`!="false"}constructor(e,t,n,o,a,l,h){this.ngControl=e,this.renderer=t,this.elementRef=n,this.hostView=o,this.directionality=a,this.nzFormStatusService=l,this.nzFormNoStatusService=h,this.nzBorderless=!1,this.nzSize="default",this.nzStepperless=!0,this.nzStatus="",this._disabled=!1,this.disabled$=new N,this.dir="ltr",this.prefixCls="ant-input",this.status="",this.statusCls={},this.hasFeedback=!1,this.feedbackRef=null,this.components=[],this.destroy$=new N}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(K((e,t)=>e.status===t.status&&e.hasFeedback===t.hasFeedback),m(this.destroy$)).subscribe(({status:e,hasFeedback:t})=>{this.setStatusStyles(e,t)}),this.ngControl&&this.ngControl.statusChanges?.pipe(He(()=>this.ngControl.disabled!==null),m(this.destroy$)).subscribe(()=>{this.disabled$.next(this.ngControl.disabled)}),this.dir=this.directionality.value,this.directionality.change?.pipe(m(this.destroy$)).subscribe(e=>{this.dir=e})}ngOnChanges(e){let{disabled:t,nzStatus:n}=e;t&&this.disabled$.next(this.disabled),n&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setStatusStyles(e,t){this.status=e,this.hasFeedback=t,this.renderFeedbackIcon(),this.statusCls=L(this.prefixCls,e,t),Object.keys(this.statusCls).forEach(n=>{this.statusCls[n]?this.renderer.addClass(this.elementRef.nativeElement,n):this.renderer.removeClass(this.elementRef.nativeElement,n)})}renderFeedbackIcon(){if(!this.status||!this.hasFeedback||this.nzFormNoStatusService){this.hostView.clear(),this.feedbackRef=null;return}this.feedbackRef=this.feedbackRef||this.hostView.createComponent(ae),this.feedbackRef.location.nativeElement.classList.add("ant-input-suffix"),this.feedbackRef.instance.status=this.status,this.feedbackRef.instance.updateIcon()}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[{token:Je,optional:!0,self:!0},{token:P},{token:C},{token:qe},{token:B,optional:!0},{token:G,optional:!0},{token:F,optional:!0}],target:p.Directive})}static{this.\u0275dir=ve({minVersion:"14.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"input[nz-input],textarea[nz-input]",inputs:{nzBorderless:"nzBorderless",nzSize:"nzSize",nzStepperless:"nzStepperless",nzStatus:"nzStatus",disabled:"disabled"},host:{properties:{"class.ant-input-disabled":"disabled","class.ant-input-borderless":"nzBorderless","class.ant-input-lg":"nzSize === 'large'","class.ant-input-sm":"nzSize === 'small'","attr.disabled":"disabled || null","class.ant-input-rtl":"dir=== 'rtl'","class.ant-input-stepperless":"nzStepperless"},classAttribute:"ant-input"},exportAs:["nzInput"],usesOnChanges:!0,ngImport:r})}};b([x()],I.prototype,"nzBorderless",void 0);b([x()],I.prototype,"nzStepperless",void 0);c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:I,decorators:[{type:Ce,args:[{selector:"input[nz-input],textarea[nz-input]",exportAs:"nzInput",host:{class:"ant-input","[class.ant-input-disabled]":"disabled","[class.ant-input-borderless]":"nzBorderless","[class.ant-input-lg]":"nzSize === 'large'","[class.ant-input-sm]":"nzSize === 'small'","[attr.disabled]":"disabled || null","[class.ant-input-rtl]":"dir=== 'rtl'","[class.ant-input-stepperless]":"nzStepperless"},standalone:!0}]}],ctorParameters:()=>[{type:Je,decorators:[{type:w},{type:dt}]},{type:P},{type:C},{type:qe},{type:B,decorators:[{type:w}]},{type:G,decorators:[{type:w}]},{type:F,decorators:[{type:w}]}],propDecorators:{nzBorderless:[{type:s}],nzSize:[{type:s}],nzStepperless:[{type:s}],nzStatus:[{type:s}],disabled:[{type:s}]}});var le=class i{constructor(e){this.elementRef=e}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[{token:C}],target:p.Directive})}static{this.\u0275dir=ve({minVersion:"14.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"nz-input-group[nzSuffix], nz-input-group[nzPrefix]",ngImport:r})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:le,decorators:[{type:Ce,args:[{selector:"nz-input-group[nzSuffix], nz-input-group[nzPrefix]",standalone:!0}]}],ctorParameters:()=>[{type:C}]});var T=class i{constructor(e,t,n,o,a,l,h){this.focusMonitor=e,this.elementRef=t,this.renderer=n,this.cdr=o,this.directionality=a,this.nzFormStatusService=l,this.nzFormNoStatusService=h,this.nzAddOnBeforeIcon=null,this.nzAddOnAfterIcon=null,this.nzPrefixIcon=null,this.nzSuffixIcon=null,this.nzStatus="",this.nzSize="default",this.nzSearch=!1,this.nzCompact=!1,this.isLarge=!1,this.isSmall=!1,this.isAffix=!1,this.isAddOn=!1,this.isFeedback=!1,this.focused=!1,this.disabled=!1,this.dir="ltr",this.prefixCls="ant-input",this.affixStatusCls={},this.groupStatusCls={},this.affixInGroupStatusCls={},this.status="",this.hasFeedback=!1,this.destroy$=new N}updateChildrenInputSize(){this.listOfNzInputDirective&&this.listOfNzInputDirective.forEach(e=>e.nzSize=this.nzSize)}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(K((e,t)=>e.status===t.status&&e.hasFeedback===t.hasFeedback),m(this.destroy$)).subscribe(({status:e,hasFeedback:t})=>{this.setStatusStyles(e,t)}),this.focusMonitor.monitor(this.elementRef,!0).pipe(m(this.destroy$)).subscribe(e=>{this.focused=!!e,this.cdr.markForCheck()}),this.dir=this.directionality.value,this.directionality.change?.pipe(m(this.destroy$)).subscribe(e=>{this.dir=e})}ngAfterContentInit(){this.updateChildrenInputSize();let e=this.listOfNzInputDirective.changes.pipe(De(this.listOfNzInputDirective));e.pipe(Ee(t=>ze(e,...t.map(n=>n.disabled$))),$e(()=>e),Ie(t=>t.some(n=>n.disabled)),m(this.destroy$)).subscribe(t=>{this.disabled=t,this.cdr.markForCheck()})}ngOnChanges(e){let{nzSize:t,nzSuffix:n,nzPrefix:o,nzPrefixIcon:a,nzSuffixIcon:l,nzAddOnAfter:h,nzAddOnBefore:D,nzAddOnAfterIcon:A,nzAddOnBeforeIcon:y,nzStatus:R}=e;t&&(this.updateChildrenInputSize(),this.isLarge=this.nzSize==="large",this.isSmall=this.nzSize==="small"),(n||o||a||l)&&(this.isAffix=!!(this.nzSuffix||this.nzPrefix||this.nzPrefixIcon||this.nzSuffixIcon)),(h||D||A||y)&&(this.isAddOn=!!(this.nzAddOnAfter||this.nzAddOnBefore||this.nzAddOnAfterIcon||this.nzAddOnBeforeIcon),this.nzFormNoStatusService?.noFormStatus?.next(this.isAddOn)),R&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.elementRef),this.destroy$.next(),this.destroy$.complete()}setStatusStyles(e,t){this.status=e,this.hasFeedback=t,this.isFeedback=!!e&&t;let n=!!(this.nzSuffix||this.nzPrefix||this.nzPrefixIcon||this.nzSuffixIcon);this.isAffix=n||!this.isAddOn&&t,this.affixInGroupStatusCls=this.isAffix||this.isFeedback?this.affixStatusCls=L(`${this.prefixCls}-affix-wrapper`,e,t):{},this.cdr.markForCheck(),this.affixStatusCls=L(`${this.prefixCls}-affix-wrapper`,this.isAddOn?"":e,this.isAddOn?!1:t),this.groupStatusCls=L(`${this.prefixCls}-group-wrapper`,this.isAddOn?e:"",this.isAddOn?t:!1);let o=$($({},this.affixStatusCls),this.groupStatusCls);Object.keys(o).forEach(a=>{o[a]?this.renderer.addClass(this.elementRef.nativeElement,a):this.renderer.removeClass(this.elementRef.nativeElement,a)})}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[{token:Q},{token:C},{token:P},{token:k},{token:B,optional:!0},{token:G,optional:!0},{token:F,optional:!0}],target:p.Component})}static{this.\u0275cmp=z({minVersion:"17.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"nz-input-group",inputs:{nzAddOnBeforeIcon:"nzAddOnBeforeIcon",nzAddOnAfterIcon:"nzAddOnAfterIcon",nzPrefixIcon:"nzPrefixIcon",nzSuffixIcon:"nzSuffixIcon",nzAddOnBefore:"nzAddOnBefore",nzAddOnAfter:"nzAddOnAfter",nzPrefix:"nzPrefix",nzStatus:"nzStatus",nzSuffix:"nzSuffix",nzSize:"nzSize",nzSearch:"nzSearch",nzCompact:"nzCompact"},host:{properties:{"class.ant-input-group-compact":"nzCompact","class.ant-input-search-enter-button":"nzSearch","class.ant-input-search":"nzSearch","class.ant-input-search-rtl":"dir === 'rtl'","class.ant-input-search-sm":"nzSearch && isSmall","class.ant-input-search-large":"nzSearch && isLarge","class.ant-input-group-wrapper":"isAddOn","class.ant-input-group-wrapper-rtl":"dir === 'rtl'","class.ant-input-group-wrapper-lg":"isAddOn && isLarge","class.ant-input-group-wrapper-sm":"isAddOn && isSmall","class.ant-input-affix-wrapper":"isAffix && !isAddOn","class.ant-input-affix-wrapper-rtl":"dir === 'rtl'","class.ant-input-affix-wrapper-focused":"isAffix && focused","class.ant-input-affix-wrapper-disabled":"isAffix && disabled","class.ant-input-affix-wrapper-lg":"isAffix && !isAddOn && isLarge","class.ant-input-affix-wrapper-sm":"isAffix && !isAddOn && isSmall","class.ant-input-group":"!isAffix && !isAddOn","class.ant-input-group-rtl":"dir === 'rtl'","class.ant-input-group-lg":"!isAffix && !isAddOn && isLarge","class.ant-input-group-sm":"!isAffix && !isAddOn && isSmall"}},providers:[F],queries:[{propertyName:"listOfNzInputDirective",predicate:I}],exportAs:["nzInputGroup"],usesOnChanges:!0,ngImport:r,template:`
    @if (isAddOn) {
      <span class="ant-input-wrapper ant-input-group">
        @if (nzAddOnBefore || nzAddOnBeforeIcon) {
          <span nz-input-group-slot type="addon" [icon]="nzAddOnBeforeIcon" [template]="nzAddOnBefore"></span>
        }

        @if (isAffix || hasFeedback) {
          <span
            class="ant-input-affix-wrapper"
            [class.ant-input-affix-wrapper-disabled]="disabled"
            [class.ant-input-affix-wrapper-sm]="isSmall"
            [class.ant-input-affix-wrapper-lg]="isLarge"
            [class.ant-input-affix-wrapper-focused]="focused"
            [ngClass]="affixInGroupStatusCls"
          >
            <ng-template [ngTemplateOutlet]="affixTemplate"></ng-template>
          </span>
        } @else {
          <ng-template [ngTemplateOutlet]="contentTemplate" />
        }
        @if (nzAddOnAfter || nzAddOnAfterIcon) {
          <span nz-input-group-slot type="addon" [icon]="nzAddOnAfterIcon" [template]="nzAddOnAfter"></span>
        }
      </span>
    } @else {
      @if (isAffix) {
        <ng-template [ngTemplateOutlet]="affixTemplate" />
      } @else {
        <ng-template [ngTemplateOutlet]="contentTemplate" />
      }
    }

    <!-- affix template -->
    <ng-template #affixTemplate>
      @if (nzPrefix || nzPrefixIcon) {
        <span nz-input-group-slot type="prefix" [icon]="nzPrefixIcon" [template]="nzPrefix"></span>
      }
      <ng-template [ngTemplateOutlet]="contentTemplate" />
      @if (nzSuffix || nzSuffixIcon || isFeedback) {
        <span nz-input-group-slot type="suffix" [icon]="nzSuffixIcon" [template]="nzSuffix">
          @if (isFeedback) {
            <nz-form-item-feedback-icon [status]="status" />
          }
        </span>
      }
    </ng-template>

    <!-- content template -->
    <ng-template #contentTemplate>
      <ng-content></ng-content>
      @if (!isAddOn && !isAffix && isFeedback) {
        <span nz-input-group-slot type="suffix">
          <nz-form-item-feedback-icon [status]="status" />
        </span>
      }
    </ng-template>
  `,isInline:!0,dependencies:[{kind:"component",type:ee,selector:"[nz-input-group-slot]",inputs:["icon","type","template"]},{kind:"directive",type:X,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:H,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"ngmodule",type:_},{kind:"component",type:ae,selector:"nz-form-item-feedback-icon",inputs:["status"],exportAs:["nzFormFeedbackIcon"]}],changeDetection:f.OnPush,encapsulation:V.None})}};b([x()],T.prototype,"nzSearch",void 0);b([x()],T.prototype,"nzCompact",void 0);c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:T,decorators:[{type:g,args:[{selector:"nz-input-group",exportAs:"nzInputGroup",preserveWhitespaces:!1,encapsulation:V.None,changeDetection:f.OnPush,providers:[F],template:`
    @if (isAddOn) {
      <span class="ant-input-wrapper ant-input-group">
        @if (nzAddOnBefore || nzAddOnBeforeIcon) {
          <span nz-input-group-slot type="addon" [icon]="nzAddOnBeforeIcon" [template]="nzAddOnBefore"></span>
        }

        @if (isAffix || hasFeedback) {
          <span
            class="ant-input-affix-wrapper"
            [class.ant-input-affix-wrapper-disabled]="disabled"
            [class.ant-input-affix-wrapper-sm]="isSmall"
            [class.ant-input-affix-wrapper-lg]="isLarge"
            [class.ant-input-affix-wrapper-focused]="focused"
            [ngClass]="affixInGroupStatusCls"
          >
            <ng-template [ngTemplateOutlet]="affixTemplate"></ng-template>
          </span>
        } @else {
          <ng-template [ngTemplateOutlet]="contentTemplate" />
        }
        @if (nzAddOnAfter || nzAddOnAfterIcon) {
          <span nz-input-group-slot type="addon" [icon]="nzAddOnAfterIcon" [template]="nzAddOnAfter"></span>
        }
      </span>
    } @else {
      @if (isAffix) {
        <ng-template [ngTemplateOutlet]="affixTemplate" />
      } @else {
        <ng-template [ngTemplateOutlet]="contentTemplate" />
      }
    }

    <!-- affix template -->
    <ng-template #affixTemplate>
      @if (nzPrefix || nzPrefixIcon) {
        <span nz-input-group-slot type="prefix" [icon]="nzPrefixIcon" [template]="nzPrefix"></span>
      }
      <ng-template [ngTemplateOutlet]="contentTemplate" />
      @if (nzSuffix || nzSuffixIcon || isFeedback) {
        <span nz-input-group-slot type="suffix" [icon]="nzSuffixIcon" [template]="nzSuffix">
          @if (isFeedback) {
            <nz-form-item-feedback-icon [status]="status" />
          }
        </span>
      }
    </ng-template>

    <!-- content template -->
    <ng-template #contentTemplate>
      <ng-content></ng-content>
      @if (!isAddOn && !isAffix && isFeedback) {
        <span nz-input-group-slot type="suffix">
          <nz-form-item-feedback-icon [status]="status" />
        </span>
      }
    </ng-template>
  `,host:{"[class.ant-input-group-compact]":"nzCompact","[class.ant-input-search-enter-button]":"nzSearch","[class.ant-input-search]":"nzSearch","[class.ant-input-search-rtl]":"dir === 'rtl'","[class.ant-input-search-sm]":"nzSearch && isSmall","[class.ant-input-search-large]":"nzSearch && isLarge","[class.ant-input-group-wrapper]":"isAddOn","[class.ant-input-group-wrapper-rtl]":"dir === 'rtl'","[class.ant-input-group-wrapper-lg]":"isAddOn && isLarge","[class.ant-input-group-wrapper-sm]":"isAddOn && isSmall","[class.ant-input-affix-wrapper]":"isAffix && !isAddOn","[class.ant-input-affix-wrapper-rtl]":"dir === 'rtl'","[class.ant-input-affix-wrapper-focused]":"isAffix && focused","[class.ant-input-affix-wrapper-disabled]":"isAffix && disabled","[class.ant-input-affix-wrapper-lg]":"isAffix && !isAddOn && isLarge","[class.ant-input-affix-wrapper-sm]":"isAffix && !isAddOn && isSmall","[class.ant-input-group]":"!isAffix && !isAddOn","[class.ant-input-group-rtl]":"dir === 'rtl'","[class.ant-input-group-lg]":"!isAffix && !isAddOn && isLarge","[class.ant-input-group-sm]":"!isAffix && !isAddOn && isSmall"},imports:[ee,X,H,_],standalone:!0}]}],ctorParameters:()=>[{type:Q},{type:C},{type:P},{type:k},{type:B,decorators:[{type:w}]},{type:G,decorators:[{type:w}]},{type:F,decorators:[{type:w}]}],propDecorators:{listOfNzInputDirective:[{type:Be,args:[I]}],nzAddOnBeforeIcon:[{type:s}],nzAddOnAfterIcon:[{type:s}],nzPrefixIcon:[{type:s}],nzSuffixIcon:[{type:s}],nzAddOnBefore:[{type:s}],nzAddOnAfter:[{type:s}],nzPrefix:[{type:s}],nzStatus:[{type:s}],nzSuffix:[{type:s}],nzSize:[{type:s}],nzSearch:[{type:s}],nzCompact:[{type:s}]}});var pe=class i{set nzAutosize(e){typeof e=="string"||e===!0?this.autosize=!0:(n=>typeof n!="string"&&typeof n!="boolean"&&(!!n.maxRows||!!n.minRows))(e)&&(this.autosize=!0,this.minRows=e.minRows,this.maxRows=e.maxRows,this.maxHeight=this.setMaxHeight(),this.minHeight=this.setMinHeight())}resizeToFitContent(e=!1){if(this.cacheTextareaLineHeight(),!this.cachedLineHeight)return;let t=this.el,n=t.value;if(!e&&this.minRows===this.previousMinRows&&n===this.previousValue)return;let o=t.placeholder;t.classList.add("nz-textarea-autosize-measuring"),t.placeholder="";let a=Math.round((t.scrollHeight-this.inputGap)/this.cachedLineHeight)*this.cachedLineHeight+this.inputGap;this.maxHeight!==null&&a>this.maxHeight&&(a=this.maxHeight),this.minHeight!==null&&a<this.minHeight&&(a=this.minHeight),t.style.height=`${a}px`,t.classList.remove("nz-textarea-autosize-measuring"),t.placeholder=o,typeof requestAnimationFrame<"u"&&this.ngZone.runOutsideAngular(()=>requestAnimationFrame(()=>{let{selectionStart:l,selectionEnd:h}=t;!this.destroy$.isStopped&&document.activeElement===t&&t.setSelectionRange(l,h)})),this.previousValue=n,this.previousMinRows=this.minRows}cacheTextareaLineHeight(){if(this.cachedLineHeight>=0||!this.el.parentNode)return;let e=this.el.cloneNode(!1);e.rows=1,e.style.position="absolute",e.style.visibility="hidden",e.style.border="none",e.style.padding="0",e.style.height="",e.style.minHeight="",e.style.maxHeight="",e.style.overflow="hidden",this.el.parentNode.appendChild(e),this.cachedLineHeight=e.clientHeight-this.inputGap,this.el.parentNode.removeChild(e),this.maxHeight=this.setMaxHeight(),this.minHeight=this.setMinHeight()}setMinHeight(){let e=this.minRows&&this.cachedLineHeight?this.minRows*this.cachedLineHeight+this.inputGap:null;return e!==null&&(this.el.style.minHeight=`${e}px`),e}setMaxHeight(){let e=this.maxRows&&this.cachedLineHeight?this.maxRows*this.cachedLineHeight+this.inputGap:null;return e!==null&&(this.el.style.maxHeight=`${e}px`),e}noopInputHandler(){}constructor(e,t,n,o){this.elementRef=e,this.ngZone=t,this.platform=n,this.resizeService=o,this.autosize=!1,this.el=this.elementRef.nativeElement,this.maxHeight=null,this.minHeight=null,this.destroy$=new N,this.inputGap=10}ngAfterViewInit(){this.autosize&&this.platform.isBrowser&&(this.resizeToFitContent(),this.resizeService.subscribe().pipe(m(this.destroy$)).subscribe(()=>this.resizeToFitContent(!0)))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}ngDoCheck(){this.autosize&&this.platform.isBrowser&&this.resizeToFitContent()}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[{token:C},{token:be},{token:Qe},{token:it}],target:p.Directive})}static{this.\u0275dir=ve({minVersion:"14.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"textarea[nzAutosize]",inputs:{nzAutosize:"nzAutosize"},host:{attributes:{rows:"1"},listeners:{input:"noopInputHandler()"}},exportAs:["nzAutosize"],ngImport:r})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:pe,decorators:[{type:Ce,args:[{selector:"textarea[nzAutosize]",exportAs:"nzAutosize",host:{rows:"1","(input)":"noopInputHandler()"},standalone:!0}]}],ctorParameters:()=>[{type:C},{type:be},{type:Qe},{type:it}],propDecorators:{nzAutosize:[{type:s}]}});var ce=class i{constructor(e,t){this.renderer=e,this.elementRef=t,this.nzMaxCharacterCount=0,this.nzComputeCharacterCount=n=>n.length,this.nzFormatter=(n,o)=>`${n}${o>0?`/${o}`:""}`,this.configChange$=new N,this.destroy$=new N}ngAfterContentInit(){if(!this.nzInputDirective&&mt())throw new Error("[nz-textarea-count]: Could not find matching textarea[nz-input] child.");if(this.nzInputDirective.ngControl){let e=this.nzInputDirective.ngControl.valueChanges||ct;ze(e,this.configChange$).pipe(m(this.destroy$),Ie(()=>this.nzInputDirective.ngControl.value),De(this.nzInputDirective.ngControl.value)).subscribe(t=>{this.setDataCount(t)})}}setDataCount(e){let t=Oe(e)?String(e):"",n=this.nzComputeCharacterCount(t),o=this.nzFormatter(n,this.nzMaxCharacterCount);this.renderer.setAttribute(this.elementRef.nativeElement,"data-count",o)}ngOnDestroy(){this.configChange$.complete(),this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[{token:P},{token:C}],target:p.Component})}static{this.\u0275cmp=z({minVersion:"14.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"nz-textarea-count",inputs:{nzMaxCharacterCount:"nzMaxCharacterCount",nzComputeCharacterCount:"nzComputeCharacterCount",nzFormatter:"nzFormatter"},host:{classAttribute:"ant-input-textarea-show-count"},queries:[{propertyName:"nzInputDirective",first:!0,predicate:I,descendants:!0,static:!0}],ngImport:r,template:' <ng-content select="textarea[nz-input]"></ng-content> ',isInline:!0,changeDetection:f.OnPush})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:ce,decorators:[{type:g,args:[{selector:"nz-textarea-count",template:' <ng-content select="textarea[nz-input]"></ng-content> ',host:{class:"ant-input-textarea-show-count"},changeDetection:f.OnPush,standalone:!0}]}],ctorParameters:()=>[{type:P},{type:C}],propDecorators:{nzInputDirective:[{type:ht,args:[I,{static:!0}]}],nzMaxCharacterCount:[{type:s}],nzComputeCharacterCount:[{type:s}],nzFormatter:[{type:s}]}});var ot=class i{static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[],target:p.NgModule})}static{this.\u0275mod=oe({minVersion:"14.0.0",version:"17.3.8",ngImport:r,type:i,imports:[ce,I,T,pe,ee,le],exports:[ce,I,T,pe,le]})}static{this.\u0275inj=re({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,imports:[T,ee]})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:ot,decorators:[{type:se,args:[{imports:[ce,I,T,pe,ee,le],exports:[ce,I,T,pe,le]}]}]});var O=class i{onModelChange(e){this.parsedValue=this.nzParser(e),this.inputElement.nativeElement.value=`${this.parsedValue}`;let t=this.getCurrentValidValue(this.parsedValue);this.setValue(t)}getCurrentValidValue(e){let t=e;return t===""?t="":this.isNotCompleteNumber(t)?t=this.value:t=`${this.getValidValue(t)}`,this.toNumber(t)}isNotCompleteNumber(e){return isNaN(e)||e===""||e===null||!!(e&&e.toString().indexOf(".")===e.toString().length-1)}getValidValue(e){let t=parseFloat(e);return isNaN(t)?e:(t<this.nzMin&&(t=this.nzMin),t>this.nzMax&&(t=this.nzMax),t)}toNumber(e){if(this.isNotCompleteNumber(e))return e;let t=String(e);if(t.indexOf(".")>=0&&Oe(this.nzPrecision)){if(typeof this.nzPrecisionMode=="function")return this.nzPrecisionMode(e,this.nzPrecision);if(this.nzPrecisionMode==="cut"){let n=t.split(".");return n[1]=n[1].slice(0,this.nzPrecision),Number(n.join("."))}return Number(Number(e).toFixed(this.nzPrecision))}return Number(e)}getRatio(e){let t=1;return e.metaKey||e.ctrlKey?t=.1:e.shiftKey&&(t=10),t}down(e,t){this.isFocused||this.focus(),this.step("down",e,t)}up(e,t){this.isFocused||this.focus(),this.step("up",e,t)}getPrecision(e){let t=e.toString();if(t.indexOf("e-")>=0)return parseInt(t.slice(t.indexOf("e-")+2),10);let n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n}getMaxPrecision(e,t){if(Oe(this.nzPrecision))return this.nzPrecision;let n=this.getPrecision(t),o=this.getPrecision(this.nzStep),a=this.getPrecision(e);return e?Math.max(a,n+o):n+o}getPrecisionFactor(e,t){let n=this.getMaxPrecision(e,t);return Math.pow(10,n)}upStep(e,t){let n=this.getPrecisionFactor(e,t),o=Math.abs(this.getMaxPrecision(e,t)),a;return typeof e=="number"?a=((n*e+n*this.nzStep*t)/n).toFixed(o):a=this.nzMin===-1/0?this.nzStep:this.nzMin,this.toNumber(a)}downStep(e,t){let n=this.getPrecisionFactor(e,t),o=Math.abs(this.getMaxPrecision(e,t)),a;return typeof e=="number"?a=((n*e-n*this.nzStep*t)/n).toFixed(o):a=this.nzMin===-1/0?-this.nzStep:this.nzMin,this.toNumber(a)}step(e,t,n=1){if(this.stop(),t.preventDefault(),this.nzDisabled)return;let o=this.getCurrentValidValue(this.parsedValue)||0,a=0;e==="up"?a=this.upStep(o,n):e==="down"&&(a=this.downStep(o,n));let l=a>this.nzMax||a<this.nzMin;a>this.nzMax?a=this.nzMax:a<this.nzMin&&(a=this.nzMin),this.setValue(a),this.updateDisplayValue(a),this.isFocused=!0,!l&&(this.autoStepTimer=setTimeout(()=>{this[e](t,n)},300))}stop(){this.autoStepTimer&&clearTimeout(this.autoStepTimer)}setValue(e){if(`${this.value}`!=`${e}`&&this.onChange(e),this.value=e,this.parsedValue=e,this.disabledUp=this.disabledDown=!1,e||e===0){let t=Number(e);t>=this.nzMax&&(this.disabledUp=!0),t<=this.nzMin&&(this.disabledDown=!0)}}updateDisplayValue(e){let t=Oe(this.nzFormatter(e))?this.nzFormatter(e):"";this.displayValue=t,this.inputElement.nativeElement.value=`${t}`}writeValue(e){this.value=e,this.setValue(e),this.updateDisplayValue(e),this.cdr.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||e,this.isNzDisableFirstChange=!1,this.disabled$.next(this.nzDisabled),this.cdr.markForCheck()}focus(){this.focusMonitor.focusVia(this.inputElement,"keyboard")}blur(){this.inputElement.nativeElement.blur()}constructor(e,t,n,o,a,l,h,D,A){this.ngZone=e,this.elementRef=t,this.cdr=n,this.focusMonitor=o,this.renderer=a,this.directionality=l,this.destroy$=h,this.nzFormStatusService=D,this.nzFormNoStatusService=A,this.isNzDisableFirstChange=!0,this.isFocused=!1,this.disabled$=new N,this.disabledUp=!1,this.disabledDown=!1,this.dir="ltr",this.prefixCls="ant-input-number",this.status="",this.statusCls={},this.hasFeedback=!1,this.onChange=()=>{},this.onTouched=()=>{},this.nzBlur=new v,this.nzFocus=new v,this.nzSize="default",this.nzMin=-1/0,this.nzMax=1/0,this.nzParser=y=>y.trim().replace(/。/g,".").replace(/[^\w\.-]+/g,""),this.nzPrecisionMode="toFixed",this.nzPlaceHolder="",this.nzStatus="",this.nzStep=1,this.nzInputMode="decimal",this.nzId=null,this.nzDisabled=!1,this.nzReadOnly=!1,this.nzAutoFocus=!1,this.nzBorderless=!1,this.nzFormatter=y=>y}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(K((e,t)=>e.status===t.status&&e.hasFeedback===t.hasFeedback),m(this.destroy$)).subscribe(({status:e,hasFeedback:t})=>{this.setStatusStyles(e,t)}),this.focusMonitor.monitor(this.elementRef,!0).pipe(m(this.destroy$)).subscribe(e=>{e?(this.isFocused=!0,this.nzFocus.emit()):(this.isFocused=!1,this.updateDisplayValue(this.value),this.nzBlur.emit(),Promise.resolve().then(()=>this.onTouched()))}),this.dir=this.directionality.value,this.directionality.change.pipe(m(this.destroy$)).subscribe(e=>{this.dir=e}),this.setupHandlersListeners(),this.ngZone.runOutsideAngular(()=>{ie(this.inputElement.nativeElement,"keyup").pipe(m(this.destroy$)).subscribe(()=>this.stop()),ie(this.inputElement.nativeElement,"keydown").pipe(m(this.destroy$)).subscribe(e=>{let{keyCode:t}=e;t!==38&&t!==40&&t!==13||this.ngZone.run(()=>{if(t===38){let n=this.getRatio(e);this.up(e,n),this.stop()}else if(t===40){let n=this.getRatio(e);this.down(e,n),this.stop()}else this.updateDisplayValue(this.value);this.cdr.markForCheck()})})})}ngOnChanges(e){let{nzStatus:t,nzDisabled:n}=e;if(e.nzFormatter&&!e.nzFormatter.isFirstChange()){let o=this.getCurrentValidValue(this.parsedValue);this.setValue(o),this.updateDisplayValue(o)}n&&this.disabled$.next(this.nzDisabled),t&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}ngAfterViewInit(){this.nzAutoFocus&&this.focus()}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.elementRef)}setupHandlersListeners(){this.ngZone.runOutsideAngular(()=>{ze(ie(this.upHandler.nativeElement,"mouseup"),ie(this.upHandler.nativeElement,"mouseleave"),ie(this.downHandler.nativeElement,"mouseup"),ie(this.downHandler.nativeElement,"mouseleave")).pipe(m(this.destroy$)).subscribe(()=>this.stop())})}setStatusStyles(e,t){this.status=e,this.hasFeedback=t,this.cdr.markForCheck(),this.statusCls=L(this.prefixCls,e,t),Object.keys(this.statusCls).forEach(n=>{this.statusCls[n]?this.renderer.addClass(this.elementRef.nativeElement,n):this.renderer.removeClass(this.elementRef.nativeElement,n)})}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[{token:be},{token:C},{token:k},{token:Q},{token:P},{token:B,optional:!0},{token:ke},{token:G,optional:!0},{token:F,optional:!0}],target:p.Component})}static{this.\u0275cmp=z({minVersion:"17.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"nz-input-number",inputs:{nzSize:"nzSize",nzMin:"nzMin",nzMax:"nzMax",nzParser:"nzParser",nzPrecision:"nzPrecision",nzPrecisionMode:"nzPrecisionMode",nzPlaceHolder:"nzPlaceHolder",nzStatus:"nzStatus",nzStep:"nzStep",nzInputMode:"nzInputMode",nzId:"nzId",nzDisabled:"nzDisabled",nzReadOnly:"nzReadOnly",nzAutoFocus:"nzAutoFocus",nzBorderless:"nzBorderless",nzFormatter:"nzFormatter"},outputs:{nzBlur:"nzBlur",nzFocus:"nzFocus"},host:{properties:{"class.ant-input-number-in-form-item":"!!nzFormStatusService","class.ant-input-number-focused":"isFocused","class.ant-input-number-lg":"nzSize === 'large'","class.ant-input-number-sm":"nzSize === 'small'","class.ant-input-number-disabled":"nzDisabled","class.ant-input-number-readonly":"nzReadOnly","class.ant-input-number-rtl":"dir === 'rtl'","class.ant-input-number-borderless":"nzBorderless"},classAttribute:"ant-input-number"},providers:[{provide:Se,useExisting:ye(()=>i),multi:!0},ke],viewQueries:[{propertyName:"upHandler",first:!0,predicate:["upHandler"],descendants:!0,static:!0},{propertyName:"downHandler",first:!0,predicate:["downHandler"],descendants:!0,static:!0},{propertyName:"inputElement",first:!0,predicate:["inputElement"],descendants:!0,static:!0}],exportAs:["nzInputNumber"],usesOnChanges:!0,ngImport:r,template:`
    <div class="ant-input-number-handler-wrap">
      <span
        #upHandler
        unselectable="unselectable"
        class="ant-input-number-handler ant-input-number-handler-up"
        (mousedown)="up($event)"
        [class.ant-input-number-handler-up-disabled]="disabledUp"
      >
        <span nz-icon nzType="up" class="ant-input-number-handler-up-inner"></span>
      </span>
      <span
        #downHandler
        unselectable="unselectable"
        class="ant-input-number-handler ant-input-number-handler-down"
        (mousedown)="down($event)"
        [class.ant-input-number-handler-down-disabled]="disabledDown"
      >
        <span nz-icon nzType="down" class="ant-input-number-handler-down-inner"></span>
      </span>
    </div>
    <div class="ant-input-number-input-wrap">
      <input
        #inputElement
        autocomplete="off"
        class="ant-input-number-input"
        [attr.id]="nzId"
        [attr.autofocus]="nzAutoFocus ? 'autofocus' : null"
        [disabled]="nzDisabled"
        [attr.min]="nzMin"
        [attr.max]="nzMax"
        [placeholder]="nzPlaceHolder"
        [attr.step]="nzStep"
        [readOnly]="nzReadOnly"
        [attr.inputmode]="nzInputMode"
        [ngModel]="displayValue"
        (ngModelChange)="onModelChange($event)"
      />
    </div>
    @if (hasFeedback && !!status && !nzFormNoStatusService) {
      <nz-form-item-feedback-icon class="ant-input-number-suffix" [status]="status" />
    }
  `,isInline:!0,dependencies:[{kind:"ngmodule",type:J},{kind:"directive",type:Ve,selector:"[nz-icon]",inputs:["nzSpin","nzRotate","nzType","nzTheme","nzTwotoneColor","nzIconfont"],exportAs:["nzIcon"]},{kind:"ngmodule",type:_e},{kind:"directive",type:Le,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:Ge,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:gt,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"ngmodule",type:_},{kind:"component",type:ae,selector:"nz-form-item-feedback-icon",inputs:["status"],exportAs:["nzFormFeedbackIcon"]}],changeDetection:f.OnPush,encapsulation:V.None})}};b([x()],O.prototype,"nzDisabled",void 0);b([x()],O.prototype,"nzReadOnly",void 0);b([x()],O.prototype,"nzAutoFocus",void 0);b([x()],O.prototype,"nzBorderless",void 0);c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:O,decorators:[{type:g,args:[{selector:"nz-input-number",exportAs:"nzInputNumber",template:`
    <div class="ant-input-number-handler-wrap">
      <span
        #upHandler
        unselectable="unselectable"
        class="ant-input-number-handler ant-input-number-handler-up"
        (mousedown)="up($event)"
        [class.ant-input-number-handler-up-disabled]="disabledUp"
      >
        <span nz-icon nzType="up" class="ant-input-number-handler-up-inner"></span>
      </span>
      <span
        #downHandler
        unselectable="unselectable"
        class="ant-input-number-handler ant-input-number-handler-down"
        (mousedown)="down($event)"
        [class.ant-input-number-handler-down-disabled]="disabledDown"
      >
        <span nz-icon nzType="down" class="ant-input-number-handler-down-inner"></span>
      </span>
    </div>
    <div class="ant-input-number-input-wrap">
      <input
        #inputElement
        autocomplete="off"
        class="ant-input-number-input"
        [attr.id]="nzId"
        [attr.autofocus]="nzAutoFocus ? 'autofocus' : null"
        [disabled]="nzDisabled"
        [attr.min]="nzMin"
        [attr.max]="nzMax"
        [placeholder]="nzPlaceHolder"
        [attr.step]="nzStep"
        [readOnly]="nzReadOnly"
        [attr.inputmode]="nzInputMode"
        [ngModel]="displayValue"
        (ngModelChange)="onModelChange($event)"
      />
    </div>
    @if (hasFeedback && !!status && !nzFormNoStatusService) {
      <nz-form-item-feedback-icon class="ant-input-number-suffix" [status]="status" />
    }
  `,providers:[{provide:Se,useExisting:ye(()=>O),multi:!0},ke],changeDetection:f.OnPush,encapsulation:V.None,host:{class:"ant-input-number","[class.ant-input-number-in-form-item]":"!!nzFormStatusService","[class.ant-input-number-focused]":"isFocused","[class.ant-input-number-lg]":"nzSize === 'large'","[class.ant-input-number-sm]":"nzSize === 'small'","[class.ant-input-number-disabled]":"nzDisabled","[class.ant-input-number-readonly]":"nzReadOnly","[class.ant-input-number-rtl]":"dir === 'rtl'","[class.ant-input-number-borderless]":"nzBorderless"},imports:[J,_e,_],standalone:!0}]}],ctorParameters:()=>[{type:be},{type:C},{type:k},{type:Q},{type:P},{type:B,decorators:[{type:w}]},{type:ke},{type:G,decorators:[{type:w}]},{type:F,decorators:[{type:w}]}],propDecorators:{nzBlur:[{type:S}],nzFocus:[{type:S}],upHandler:[{type:j,args:["upHandler",{static:!0}]}],downHandler:[{type:j,args:["downHandler",{static:!0}]}],inputElement:[{type:j,args:["inputElement",{static:!0}]}],nzSize:[{type:s}],nzMin:[{type:s}],nzMax:[{type:s}],nzParser:[{type:s}],nzPrecision:[{type:s}],nzPrecisionMode:[{type:s}],nzPlaceHolder:[{type:s}],nzStatus:[{type:s}],nzStep:[{type:s}],nzInputMode:[{type:s}],nzId:[{type:s}],nzDisabled:[{type:s}],nzReadOnly:[{type:s}],nzAutoFocus:[{type:s}],nzBorderless:[{type:s}],nzFormatter:[{type:s}]}});var te=class i{constructor(){this.icon=null,this.type=null,this.template=null}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[],target:p.Component})}static{this.\u0275cmp=z({minVersion:"17.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"[nz-input-number-group-slot]",inputs:{icon:"icon",type:"type",template:"template"},host:{properties:{"class.ant-input-number-group-addon":"type === 'addon'","class.ant-input-number-prefix":"type === 'prefix'","class.ant-input-number-suffix":"type === 'suffix'"}},ngImport:r,template:`
    @if (icon) {
      <span nz-icon [nzType]="icon"></span>
    }
    <ng-container *nzStringTemplateOutlet="template">{{ template }}</ng-container>
    <ng-content></ng-content>
  `,isInline:!0,dependencies:[{kind:"ngmodule",type:J},{kind:"directive",type:Ve,selector:"[nz-icon]",inputs:["nzSpin","nzRotate","nzType","nzTheme","nzTwotoneColor","nzIconfont"],exportAs:["nzIcon"]},{kind:"ngmodule",type:xe},{kind:"directive",type:Ue,selector:"[nzStringTemplateOutlet]",inputs:["nzStringTemplateOutletContext","nzStringTemplateOutlet"],exportAs:["nzStringTemplateOutlet"]}],changeDetection:f.OnPush,encapsulation:V.None})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:te,decorators:[{type:g,args:[{selector:"[nz-input-number-group-slot]",preserveWhitespaces:!1,encapsulation:V.None,changeDetection:f.OnPush,template:`
    @if (icon) {
      <span nz-icon [nzType]="icon"></span>
    }
    <ng-container *nzStringTemplateOutlet="template">{{ template }}</ng-container>
    <ng-content></ng-content>
  `,host:{"[class.ant-input-number-group-addon]":"type === 'addon'","[class.ant-input-number-prefix]":"type === 'prefix'","[class.ant-input-number-suffix]":"type === 'suffix'"},imports:[J,xe],standalone:!0}]}],propDecorators:{icon:[{type:s}],type:[{type:s}],template:[{type:s}]}});var ue=class i{constructor(e){this.elementRef=e}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[{token:C}],target:p.Directive})}static{this.\u0275dir=ve({minVersion:"14.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"nz-input-number-group[nzSuffix], nz-input-number-group[nzPrefix]",ngImport:r})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:ue,decorators:[{type:Ce,args:[{selector:"nz-input-number-group[nzSuffix], nz-input-number-group[nzPrefix]",standalone:!0}]}],ctorParameters:()=>[{type:C}]});var Y=class i{constructor(e,t,n,o,a,l,h){this.focusMonitor=e,this.elementRef=t,this.renderer=n,this.cdr=o,this.directionality=a,this.nzFormStatusService=l,this.nzFormNoStatusService=h,this.nzAddOnBeforeIcon=null,this.nzAddOnAfterIcon=null,this.nzPrefixIcon=null,this.nzSuffixIcon=null,this.nzStatus="",this.nzSize="default",this.nzCompact=!1,this.isLarge=!1,this.isSmall=!1,this.isAffix=!1,this.isAddOn=!1,this.isFeedback=!1,this.focused=!1,this.disabled=!1,this.dir="ltr",this.prefixCls="ant-input-number",this.affixStatusCls={},this.groupStatusCls={},this.affixInGroupStatusCls={},this.status="",this.hasFeedback=!1,this.destroy$=new N}updateChildrenInputSize(){this.listOfNzInputNumberComponent&&this.listOfNzInputNumberComponent.forEach(e=>e.nzSize=this.nzSize)}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(K((e,t)=>e.status===t.status&&e.hasFeedback===t.hasFeedback),m(this.destroy$)).subscribe(({status:e,hasFeedback:t})=>{this.setStatusStyles(e,t)}),this.focusMonitor.monitor(this.elementRef,!0).pipe(m(this.destroy$)).subscribe(e=>{this.focused=!!e,this.cdr.markForCheck()}),this.dir=this.directionality.value,this.directionality.change?.pipe(m(this.destroy$)).subscribe(e=>{this.dir=e})}ngAfterContentInit(){this.updateChildrenInputSize();let e=this.listOfNzInputNumberComponent.changes.pipe(De(this.listOfNzInputNumberComponent));e.pipe(Ee(t=>ze(e,...t.map(n=>n.disabled$))),$e(()=>e),Ie(t=>t.some(n=>n.nzDisabled)),m(this.destroy$)).subscribe(t=>{this.disabled=t,this.cdr.markForCheck()})}ngOnChanges(e){let{nzSize:t,nzSuffix:n,nzPrefix:o,nzPrefixIcon:a,nzSuffixIcon:l,nzAddOnAfter:h,nzAddOnBefore:D,nzAddOnAfterIcon:A,nzAddOnBeforeIcon:y,nzStatus:R}=e;t&&(this.updateChildrenInputSize(),this.isLarge=this.nzSize==="large",this.isSmall=this.nzSize==="small"),(n||o||a||l)&&(this.isAffix=!!(this.nzSuffix||this.nzPrefix||this.nzPrefixIcon||this.nzSuffixIcon)),(h||D||A||y)&&(this.isAddOn=!!(this.nzAddOnAfter||this.nzAddOnBefore||this.nzAddOnAfterIcon||this.nzAddOnBeforeIcon),this.nzFormNoStatusService?.noFormStatus?.next(this.isAddOn)),R&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.elementRef),this.destroy$.next(),this.destroy$.complete()}setStatusStyles(e,t){this.status=e,this.hasFeedback=t,this.isFeedback=!!e&&t;let n=!!(this.nzSuffix||this.nzPrefix||this.nzPrefixIcon||this.nzSuffixIcon);this.isAffix=n||!this.isAddOn&&t,this.affixInGroupStatusCls=this.isAffix||this.isFeedback?this.affixStatusCls=L(`${this.prefixCls}-affix-wrapper`,e,t):{},this.cdr.markForCheck(),this.affixStatusCls=L(`${this.prefixCls}-affix-wrapper`,this.isAddOn?"":e,this.isAddOn?!1:t),this.groupStatusCls=L(`${this.prefixCls}-group-wrapper`,this.isAddOn?e:"",this.isAddOn?t:!1);let o=$($({},this.affixStatusCls),this.groupStatusCls);Object.keys(o).forEach(a=>{o[a]?this.renderer.addClass(this.elementRef.nativeElement,a):this.renderer.removeClass(this.elementRef.nativeElement,a)})}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[{token:Q},{token:C},{token:P},{token:k},{token:B,optional:!0},{token:G,optional:!0},{token:F,optional:!0}],target:p.Component})}static{this.\u0275cmp=z({minVersion:"17.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"nz-input-number-group",inputs:{nzAddOnBeforeIcon:"nzAddOnBeforeIcon",nzAddOnAfterIcon:"nzAddOnAfterIcon",nzPrefixIcon:"nzPrefixIcon",nzSuffixIcon:"nzSuffixIcon",nzAddOnBefore:"nzAddOnBefore",nzAddOnAfter:"nzAddOnAfter",nzPrefix:"nzPrefix",nzStatus:"nzStatus",nzSuffix:"nzSuffix",nzSize:"nzSize",nzCompact:"nzCompact"},host:{properties:{"class.ant-input-number-group":"nzCompact","class.ant-input-number-group-compact":"nzCompact","class.ant-input-number-group-wrapper":"isAddOn","class.ant-input-number-group-wrapper-rtl":"isAddOn && dir === 'rtl'","class.ant-input-number-group-wrapper-lg":"isAddOn && isLarge","class.ant-input-number-group-wrapper-sm":"isAddOn && isSmall","class.ant-input-number-affix-wrapper":"!isAddOn && isAffix","class.ant-input-number-affix-wrapper-rtl":"!isAddOn && dir === 'rtl'","class.ant-input-number-affix-wrapper-focused":"!isAddOn && isAffix && focused","class.ant-input-number-affix-wrapper-disabled":"!isAddOn && isAffix && disabled","class.ant-input-number-affix-wrapper-lg":"!isAddOn && isAffix && isLarge","class.ant-input-number-affix-wrapper-sm":"!isAddOn && isAffix && isSmall"}},providers:[F],queries:[{propertyName:"listOfNzInputNumberComponent",predicate:O,descendants:!0}],exportAs:["nzInputNumberGroup"],usesOnChanges:!0,ngImport:r,template:`
    @if (isAddOn) {
      <span class="ant-input-number-wrapper ant-input-number-group">
        @if (nzAddOnBefore || nzAddOnBeforeIcon) {
          <div nz-input-number-group-slot type="addon" [icon]="nzAddOnBeforeIcon" [template]="nzAddOnBefore"></div>
        }

        @if (isAffix || hasFeedback) {
          <div
            class="ant-input-number-affix-wrapper"
            [class.ant-input-number-affix-wrapper-disabled]="disabled"
            [class.ant-input-number-affix-wrapper-sm]="isSmall"
            [class.ant-input-number-affix-wrapper-lg]="isLarge"
            [class.ant-input-number-affix-wrapper-focused]="focused"
            [ngClass]="affixInGroupStatusCls"
          >
            <ng-template [ngTemplateOutlet]="affixTemplate"></ng-template>
          </div>
        } @else {
          <ng-template [ngTemplateOutlet]="contentTemplate" />
        }

        @if (nzAddOnAfter || nzAddOnAfterIcon) {
          <span nz-input-number-group-slot type="addon" [icon]="nzAddOnAfterIcon" [template]="nzAddOnAfter"></span>
        }
      </span>
    } @else {
      @if (isAffix) {
        <ng-template [ngTemplateOutlet]="affixTemplate" />
      } @else {
        <ng-template [ngTemplateOutlet]="contentTemplate" />
      }
    }

    <!-- Affix Template -->
    <ng-template #affixTemplate>
      @if (nzPrefix || nzPrefixIcon) {
        <span nz-input-number-group-slot type="prefix" [icon]="nzPrefixIcon" [template]="nzPrefix"></span>
      }
      <ng-template [ngTemplateOutlet]="contentTemplate" />
      @if (nzSuffix || nzSuffixIcon || isFeedback) {
        <span nz-input-number-group-slot type="suffix" [icon]="nzSuffixIcon" [template]="nzSuffix">
          @if (isFeedback) {
            <nz-form-item-feedback-icon [status]="status" />
          }
        </span>
      }
    </ng-template>

    <!-- Content Template -->
    <ng-template #contentTemplate>
      <ng-content />
      @if (!isAddOn && !isAffix && isFeedback) {
        <span nz-input-number-group-slot type="suffix">
          @if (isFeedback) {
            <nz-form-item-feedback-icon [status]="status" />
          }
        </span>
      }
    </ng-template>
  `,isInline:!0,dependencies:[{kind:"component",type:te,selector:"[nz-input-number-group-slot]",inputs:["icon","type","template"]},{kind:"directive",type:X,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:H,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]},{kind:"ngmodule",type:_},{kind:"component",type:ae,selector:"nz-form-item-feedback-icon",inputs:["status"],exportAs:["nzFormFeedbackIcon"]}],changeDetection:f.OnPush,encapsulation:V.None})}};b([x()],Y.prototype,"nzCompact",void 0);c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:Y,decorators:[{type:g,args:[{selector:"nz-input-number-group",exportAs:"nzInputNumberGroup",preserveWhitespaces:!1,encapsulation:V.None,changeDetection:f.OnPush,providers:[F],template:`
    @if (isAddOn) {
      <span class="ant-input-number-wrapper ant-input-number-group">
        @if (nzAddOnBefore || nzAddOnBeforeIcon) {
          <div nz-input-number-group-slot type="addon" [icon]="nzAddOnBeforeIcon" [template]="nzAddOnBefore"></div>
        }

        @if (isAffix || hasFeedback) {
          <div
            class="ant-input-number-affix-wrapper"
            [class.ant-input-number-affix-wrapper-disabled]="disabled"
            [class.ant-input-number-affix-wrapper-sm]="isSmall"
            [class.ant-input-number-affix-wrapper-lg]="isLarge"
            [class.ant-input-number-affix-wrapper-focused]="focused"
            [ngClass]="affixInGroupStatusCls"
          >
            <ng-template [ngTemplateOutlet]="affixTemplate"></ng-template>
          </div>
        } @else {
          <ng-template [ngTemplateOutlet]="contentTemplate" />
        }

        @if (nzAddOnAfter || nzAddOnAfterIcon) {
          <span nz-input-number-group-slot type="addon" [icon]="nzAddOnAfterIcon" [template]="nzAddOnAfter"></span>
        }
      </span>
    } @else {
      @if (isAffix) {
        <ng-template [ngTemplateOutlet]="affixTemplate" />
      } @else {
        <ng-template [ngTemplateOutlet]="contentTemplate" />
      }
    }

    <!-- Affix Template -->
    <ng-template #affixTemplate>
      @if (nzPrefix || nzPrefixIcon) {
        <span nz-input-number-group-slot type="prefix" [icon]="nzPrefixIcon" [template]="nzPrefix"></span>
      }
      <ng-template [ngTemplateOutlet]="contentTemplate" />
      @if (nzSuffix || nzSuffixIcon || isFeedback) {
        <span nz-input-number-group-slot type="suffix" [icon]="nzSuffixIcon" [template]="nzSuffix">
          @if (isFeedback) {
            <nz-form-item-feedback-icon [status]="status" />
          }
        </span>
      }
    </ng-template>

    <!-- Content Template -->
    <ng-template #contentTemplate>
      <ng-content />
      @if (!isAddOn && !isAffix && isFeedback) {
        <span nz-input-number-group-slot type="suffix">
          @if (isFeedback) {
            <nz-form-item-feedback-icon [status]="status" />
          }
        </span>
      }
    </ng-template>
  `,host:{"[class.ant-input-number-group]":"nzCompact","[class.ant-input-number-group-compact]":"nzCompact","[class.ant-input-number-group-wrapper]":"isAddOn","[class.ant-input-number-group-wrapper-rtl]":"isAddOn && dir === 'rtl'","[class.ant-input-number-group-wrapper-lg]":"isAddOn && isLarge","[class.ant-input-number-group-wrapper-sm]":"isAddOn && isSmall","[class.ant-input-number-affix-wrapper]":"!isAddOn && isAffix","[class.ant-input-number-affix-wrapper-rtl]":"!isAddOn && dir === 'rtl'","[class.ant-input-number-affix-wrapper-focused]":"!isAddOn && isAffix && focused","[class.ant-input-number-affix-wrapper-disabled]":"!isAddOn && isAffix && disabled","[class.ant-input-number-affix-wrapper-lg]":"!isAddOn && isAffix && isLarge","[class.ant-input-number-affix-wrapper-sm]":"!isAddOn && isAffix && isSmall"},imports:[te,X,H,_],standalone:!0}]}],ctorParameters:()=>[{type:Q},{type:C},{type:P},{type:k},{type:B,decorators:[{type:w}]},{type:G,decorators:[{type:w}]},{type:F,decorators:[{type:w}]}],propDecorators:{listOfNzInputNumberComponent:[{type:Be,args:[O,{descendants:!0}]}],nzAddOnBeforeIcon:[{type:s}],nzAddOnAfterIcon:[{type:s}],nzPrefixIcon:[{type:s}],nzSuffixIcon:[{type:s}],nzAddOnBefore:[{type:s}],nzAddOnAfter:[{type:s}],nzPrefix:[{type:s}],nzStatus:[{type:s}],nzSuffix:[{type:s}],nzSize:[{type:s}],nzCompact:[{type:s}]}});var at=class i{static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[],target:p.NgModule})}static{this.\u0275mod=oe({minVersion:"14.0.0",version:"17.3.8",ngImport:r,type:i,imports:[O,Y,ue,te],exports:[O,Y,ue]})}static{this.\u0275inj=re({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,imports:[O,Y,te]})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:at,decorators:[{type:se,args:[{imports:[O,Y,ue,te],exports:[O,Y,ue]}]}]});var lt=i=>Math.round(Number(i||0)),Vt=i=>{if(i&&typeof i=="object"&&"h"in i&&"b"in i){let e=i,{b:t}=e,n=We(e,["b"]);return Fe($({},n),{v:t})}return typeof i=="string"&&/hsb/.test(i)?i.replace(/hsb/,"hsv"):i},je=class extends bt{constructor(e){super(Vt(e))}toHsbString(){let e=this.toHsb(),t=lt(e.s*100),n=lt(e.b*100),o=lt(e.h),a=e.a,l=`hsb(${o}, ${t}%, ${n}%)`,h=`hsba(${o}, ${t}%, ${n}%, ${a.toFixed(a===0?0:2)})`;return a===1?l:h}toHsb(){let e=this.toHsv();typeof this.originalInput=="object"&&this.originalInput&&"h"in this.originalInput&&(e=this.originalInput);let o=e,{v:t}=o,n=We(o,["v"]);return Fe($({},n),{b:e.v})}},d=i=>i instanceof je?i:new je(i),Me=d("#1677ff");function xt(i,e,t,n,o){let{width:a,height:l}=e.getBoundingClientRect(),{width:h,height:D}=t.getBoundingClientRect(),A=h/2,y=D/2,R=(i.x+A)/a,E=1-(i.y+y)/l,q=n?.toHsb()||{a:0,h:0,s:0,b:0},fe=R,ge=(i.x+A)/a*360;if(o)switch(o){case"hue":return d(Fe($({},q),{h:ge<=0?0:ge}));case"alpha":return d(Fe($({},q),{a:fe<=0?0:fe}))}return d({h:q.h,s:R<=0?0:R,b:E>=1?1:E,a:q.a})}var Xe=(i,e,t,n)=>{let{width:o,height:a}=i.getBoundingClientRect(),{width:l,height:h}=e.getBoundingClientRect(),D=l/2,A=h/2,y=t?.toHsb()||{a:0,h:0,s:0,b:0};if(l===0&&h===0||l!==h)return null;if(n)switch(n){case"hue":return{x:y.h/360*o-D,y:-A/3};case"alpha":return{x:y.a*o-D,y:-A/3}}return{x:y.s*o-D,y:(1-y.b)*a-A}},U=class i{constructor(){this.color=Me.toHsbString(),this.nzOnClick=new v}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[],target:p.Component})}static{this.\u0275cmp=z({minVersion:"14.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"ng-antd-color-block",inputs:{color:"color"},outputs:{nzOnClick:"nzOnClick"},ngImport:r,template:`
    <div class="ant-color-picker-color-block" (click)="nzOnClick.emit(true)">
      <div class="ant-color-picker-color-block-inner" [style.background-color]="color"></div>
    </div>
  `,isInline:!0})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:U,decorators:[{type:g,args:[{selector:"ng-antd-color-block",standalone:!0,template:`
    <div class="ant-color-picker-color-block" (click)="nzOnClick.emit(true)">
      <div class="ant-color-picker-color-block-inner" [style.background-color]="color"></div>
    </div>
  `}]}],propDecorators:{color:[{type:s}],nzOnClick:[{type:S}]}});var de=class i{constructor(){this.color=null,this.size="default"}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[],target:p.Component})}static{this.\u0275cmp=z({minVersion:"14.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"color-handler",inputs:{color:"color",size:"size"},ngImport:r,template:`
    <div
      class="ant-color-picker-handler"
      [style.background-color]="color"
      [class.ant-color-picker-handler-sm]="size === 'small'"
    ></div>
  `,isInline:!0})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:de,decorators:[{type:g,args:[{selector:"color-handler",standalone:!0,template:`
    <div
      class="ant-color-picker-handler"
      [style.background-color]="color"
      [class.ant-color-picker-handler-sm]="size === 'small'"
    ></div>
  `}]}],propDecorators:{color:[{type:s}],size:[{type:s}]}});var he=class i{static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[],target:p.Component})}static{this.\u0275cmp=z({minVersion:"14.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"color-palette",ngImport:r,template:`
    <div class="ant-color-picker-palette" style="position: relative">
      <ng-content></ng-content>
    </div>
  `,isInline:!0})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:he,decorators:[{type:g,args:[{selector:"color-palette",standalone:!0,template:`
    <div class="ant-color-picker-palette" style="position: relative">
      <ng-content></ng-content>
    </div>
  `}]}]});function Mt(i){let e="touches"in i?i.touches[0]:i,t=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,n=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return{pageX:e.pageX-t,pageY:e.pageY-n}}var Ne=class i{toRgbString(){return this.color?.toRgbString()}toHsb(){return`hsl(${this.color?.toHsb().h},100%, 50%)`}constructor(e,t){this.cdr=e,this.document=t,this.color=null,this.nzOnChange=new v,this.nzOnChangeComplete=new v,this.disabled=!1,this.offsetValue={x:0,y:0},this.dragRef=!1,this.mouseMoveRef=()=>null,this.mouseUpRef=()=>null,this.updateOffset=(n,o="y")=>{let{pageX:a,pageY:l}=Mt(n),{x:h,y:D,width:A,height:y}=this.containerRef?.nativeElement?.getBoundingClientRect()||{x:0,y:0,width:0,height:0},{width:R,height:E}=this.transformRef?.nativeElement?.getBoundingClientRect()||{width:0,height:0},q=R/2,fe=E/2,ge=Math.max(0,Math.min(a-h,A))-q,Ye=Math.max(0,Math.min(l-D,y))-fe,Ae={x:ge,y:o==="x"?this.offsetValue.y:Ye};R===0&&E===0||R!==E||(this.offsetValue=Ae,this.nzOnChange.emit(xt(Ae,this.containerRef.nativeElement,this.transformRef.nativeElement,this.color)),this.cdr.detectChanges())},this.onDragMove=n=>{n.preventDefault(),this.updateOffset(n)},this.onDragStop=n=>{n.preventDefault(),this.dragRef=!1,this.document.removeEventListener("mousemove",this.onDragMove),this.document.removeEventListener("mouseup",this.mouseUpRef),this.document.removeEventListener("touchmove",this.mouseMoveRef),this.document.removeEventListener("touchend",this.mouseUpRef),this.mouseMoveRef=()=>null,this.mouseUpRef=()=>null,this.nzOnChangeComplete?.emit()},this.onDragStart=n=>{this.disabled||(this.updateOffset(n),this.dragRef=!0,this.document.addEventListener("mousemove",this.onDragMove),this.document.addEventListener("mouseup",this.onDragStop),this.document.addEventListener("touchmove",this.onDragMove),this.document.addEventListener("touchend",this.onDragStop),this.mouseMoveRef=this.onDragMove,this.mouseUpRef=this.onDragStop,this.cdr.markForCheck())}}ngOnInit(){this.document.removeEventListener("mousemove",this.mouseMoveRef),this.document.removeEventListener("mouseup",this.mouseUpRef),this.document.removeEventListener("touchmove",this.mouseMoveRef),this.document.removeEventListener("touchend",this.mouseUpRef),this.mouseMoveRef=()=>null,this.mouseUpRef=()=>null}ngOnChanges(e){let{color:t}=e;if(t&&!this.dragRef&&this.containerRef&&this.transformRef){let n=Xe(this.containerRef.nativeElement,this.transformRef.nativeElement,this.color);n&&(this.offsetValue=n,this.cdr.detectChanges())}}ngAfterViewInit(){if(!this.dragRef&&this.containerRef&&this.transformRef){let e=Xe(this.containerRef.nativeElement,this.transformRef.nativeElement,this.color);e&&(this.offsetValue=e,this.cdr.detectChanges())}}dragStartHandle(e){this.onDragStart(e)}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[{token:k},{token:Re}],target:p.Component})}static{this.\u0275cmp=z({minVersion:"14.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"color-picker",inputs:{color:"color",disabled:"disabled"},outputs:{nzOnChange:"nzOnChange",nzOnChangeComplete:"nzOnChangeComplete"},viewQueries:[{propertyName:"containerRef",first:!0,predicate:["slider"],descendants:!0},{propertyName:"transformRef",first:!0,predicate:["transform"],descendants:!0}],usesOnChanges:!0,ngImport:r,template:`
    <div
      #slider
      class="ant-color-picker-select"
      (mousedown)="dragStartHandle($event)"
      (touchstart)="dragStartHandle($event)"
    >
      <color-palette>
        <div
          #transform
          style="position: absolute; z-index: 1;"
          [style.left]="offsetValue.x + 'px'"
          [style.top]="offsetValue.y + 'px'"
        >
          <color-handler [color]="toRgbString()" />
        </div>
        <div
          class="ant-color-picker-saturation"
          style="
        background-image: linear-gradient(0deg, #000, transparent),
          linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0));
      "
          [style.background-color]="toHsb()"
        ></div>
      </color-palette>
    </div>
  `,isInline:!0,dependencies:[{kind:"component",type:de,selector:"color-handler",inputs:["color","size"]},{kind:"component",type:he,selector:"color-palette"}]})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:Ne,decorators:[{type:g,args:[{selector:"color-picker",standalone:!0,imports:[de,he],template:`
    <div
      #slider
      class="ant-color-picker-select"
      (mousedown)="dragStartHandle($event)"
      (touchstart)="dragStartHandle($event)"
    >
      <color-palette>
        <div
          #transform
          style="position: absolute; z-index: 1;"
          [style.left]="offsetValue.x + 'px'"
          [style.top]="offsetValue.y + 'px'"
        >
          <color-handler [color]="toRgbString()" />
        </div>
        <div
          class="ant-color-picker-saturation"
          style="
        background-image: linear-gradient(0deg, #000, transparent),
          linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0));
      "
          [style.background-color]="toHsb()"
        ></div>
      </color-palette>
    </div>
  `}]}],ctorParameters:()=>[{type:k},{type:Document,decorators:[{type:Ze,args:[Re]}]}],propDecorators:{containerRef:[{type:j,args:["slider",{static:!1}]}],transformRef:[{type:j,args:["transform",{static:!1}]}],color:[{type:s}],nzOnChange:[{type:S}],nzOnChangeComplete:[{type:S}],disabled:[{type:s}]}});var Te=class i{constructor(){this.colors=[],this.direction="to right",this.type="hue",this.gradientColors=""}ngOnInit(){this.useMemo()}ngOnChanges(e){let{colors:t,type:n}=e;(t||n)&&this.useMemo()}useMemo(){this.gradientColors=this.colors.map((e,t)=>{let n=d(e);return this.type==="alpha"&&t===this.colors.length-1&&n.setAlpha(1),n.toRgbString()}).join(",")}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[],target:p.Component})}static{this.\u0275cmp=z({minVersion:"14.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"color-gradient",inputs:{colors:"colors",direction:"direction",type:"type"},usesOnChanges:!0,ngImport:r,template:`
    <div
      class="ant-color-picker-gradient"
      style="position: absolute; inset: 0"
      [style.background]="'linear-gradient(' + direction + ', ' + gradientColors + ')'"
    >
      <ng-content></ng-content>
    </div>
  `,isInline:!0})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:Te,decorators:[{type:g,args:[{selector:"color-gradient",standalone:!0,template:`
    <div
      class="ant-color-picker-gradient"
      style="position: absolute; inset: 0"
      [style.background]="'linear-gradient(' + direction + ', ' + gradientColors + ')'"
    >
      <ng-content></ng-content>
    </div>
  `}]}],ctorParameters:()=>[],propDecorators:{colors:[{type:s}],direction:[{type:s}],type:[{type:s}]}});function Nt(i){let e="touches"in i?i.touches[0]:i,t=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,n=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return{pageX:e.pageX-t,pageY:e.pageY-n}}var Pe=class i{constructor(e,t){this.cdr=e,this.document=t,this.gradientColors=[],this.direction="to right",this.type="hue",this.color=null,this.value=null,this.disabled=!1,this.nzOnChange=new v,this.nzOnChangeComplete=new v,this.offsetValue={x:0,y:0},this.dragRef=!1,this.mouseMoveRef=()=>null,this.mouseUpRef=()=>null,this.updateOffset=(n,o="x")=>{let{pageX:a,pageY:l}=Nt(n),{x:h,y:D,width:A,height:y}=this.containerRef?.nativeElement?.getBoundingClientRect()||{x:0,y:0,width:0,height:0},{width:R,height:E}=this.transformRef?.nativeElement?.getBoundingClientRect()||{width:0,height:0},q=R/2,fe=E/2,ge=Math.max(0,Math.min(a-h,A))-q,Ye=Math.max(0,Math.min(l-D,y))-fe,Ae={x:ge,y:o==="x"?this.offsetValue.y:Ye};R===0&&E===0||R!==E||(this.offsetValue=Ae,this.nzOnChange.emit(xt(Ae,this.containerRef.nativeElement,this.transformRef.nativeElement,this.color,this.type)),this.cdr.detectChanges())},this.onDragMove=n=>{n.preventDefault(),this.updateOffset(n)},this.onDragStop=n=>{n.preventDefault(),this.dragRef=!1,this.document.removeEventListener("mousemove",this.onDragMove),this.document.removeEventListener("mouseup",this.mouseUpRef),this.document.removeEventListener("touchmove",this.mouseMoveRef),this.document.removeEventListener("touchend",this.mouseUpRef),this.mouseMoveRef=()=>null,this.mouseUpRef=()=>null,this.nzOnChangeComplete?.emit(this.type)},this.onDragStart=n=>{this.disabled||(this.updateOffset(n),this.dragRef=!0,this.document.addEventListener("mousemove",this.onDragMove),this.document.addEventListener("mouseup",this.onDragStop),this.document.addEventListener("touchmove",this.onDragMove),this.document.addEventListener("touchend",this.onDragStop),this.mouseMoveRef=this.onDragMove,this.mouseUpRef=this.onDragStop,this.cdr.markForCheck())}}ngOnInit(){this.document.removeEventListener("mousemove",this.mouseMoveRef),this.document.removeEventListener("mouseup",this.mouseUpRef),this.document.removeEventListener("touchmove",this.mouseMoveRef),this.document.removeEventListener("touchend",this.mouseUpRef),this.mouseMoveRef=()=>null,this.mouseUpRef=()=>null}ngOnChanges(e){let{color:t}=e;if(t&&!this.dragRef&&this.containerRef&&this.transformRef){let n=Xe(this.containerRef.nativeElement,this.transformRef.nativeElement,this.color,this.type);n&&(this.offsetValue=n,this.cdr.detectChanges())}}ngAfterViewInit(){if(!this.dragRef&&this.containerRef&&this.transformRef){let e=Xe(this.containerRef.nativeElement,this.transformRef.nativeElement,this.color,this.type);e&&(this.offsetValue=e,this.cdr.detectChanges())}}dragStartHandle(e){this.onDragStart(e)}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[{token:k},{token:Re}],target:p.Component})}static{this.\u0275cmp=z({minVersion:"14.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"color-slider",inputs:{gradientColors:"gradientColors",direction:"direction",type:"type",color:"color",value:"value",disabled:"disabled"},outputs:{nzOnChange:"nzOnChange",nzOnChangeComplete:"nzOnChangeComplete"},viewQueries:[{propertyName:"containerRef",first:!0,predicate:["slider"],descendants:!0},{propertyName:"transformRef",first:!0,predicate:["transform"],descendants:!0}],usesOnChanges:!0,ngImport:r,template:`
    <div
      #slider
      (mousedown)="dragStartHandle($event)"
      (touchstart)="dragStartHandle($event)"
      class="ant-color-picker-slider"
      [ngClass]="'ant-color-picker-slider-' + type"
    >
      <color-palette>
        <div
          #transform
          style="position: absolute; z-index: 1;"
          [style.left]="offsetValue.x + 'px'"
          [style.top]="offsetValue.y + 'px'"
        >
          <color-handler size="small" [color]="value"></color-handler>
        </div>
        <color-gradient [colors]="gradientColors" [direction]="direction" [type]="type"></color-gradient>
      </color-palette>
    </div>
  `,isInline:!0,styles:[`:host{display:block;width:100%}
`],dependencies:[{kind:"component",type:he,selector:"color-palette"},{kind:"component",type:Te,selector:"color-gradient",inputs:["colors","direction","type"]},{kind:"component",type:de,selector:"color-handler",inputs:["color","size"]},{kind:"directive",type:X,selector:"[ngClass]",inputs:["class","ngClass"]}]})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:Pe,decorators:[{type:g,args:[{selector:"color-slider",standalone:!0,imports:[he,Te,de,X],template:`
    <div
      #slider
      (mousedown)="dragStartHandle($event)"
      (touchstart)="dragStartHandle($event)"
      class="ant-color-picker-slider"
      [ngClass]="'ant-color-picker-slider-' + type"
    >
      <color-palette>
        <div
          #transform
          style="position: absolute; z-index: 1;"
          [style.left]="offsetValue.x + 'px'"
          [style.top]="offsetValue.y + 'px'"
        >
          <color-handler size="small" [color]="value"></color-handler>
        </div>
        <color-gradient [colors]="gradientColors" [direction]="direction" [type]="type"></color-gradient>
      </color-palette>
    </div>
  `,styles:[`:host{display:block;width:100%}
`]}]}],ctorParameters:()=>[{type:k},{type:Document,decorators:[{type:Ze,args:[Re]}]}],propDecorators:{containerRef:[{type:j,args:["slider",{static:!1}]}],transformRef:[{type:j,args:["transform",{static:!1}]}],gradientColors:[{type:s}],direction:[{type:s}],type:[{type:s}],color:[{type:s}],value:[{type:s}],disabled:[{type:s}],nzOnChange:[{type:S}],nzOnChangeComplete:[{type:S}]}});var ne=class i{constructor(e){this.cdr=e,this.nzOnChange=new v,this.nzOnChangeComplete=new v,this.panelRenderHeader=null,this.panelRenderFooter=null,this.disabledAlpha=!1,this.disabled=!1,this.colorValue=null,this.alphaColor="",this.hueColor=["rgb(255, 0, 0) 0%","rgb(255, 255, 0) 17%","rgb(0, 255, 0) 33%","rgb(0, 255, 255) 50%","rgb(0, 0, 255) 67%","rgb(255, 0, 255) 83%","rgb(255, 0, 0) 100%"],this.gradientColors=["rgba(255, 0, 4, 0) 0%",this.alphaColor],this.toRgbString=this.colorValue?.toRgbString()||""}ngOnInit(){this.setColorValue(this.value)}ngOnChanges(e){let{value:t,defaultValue:n}=e;(t||n)&&this.setColorValue(this.value)}hasValue(e){return!!e}setColorValue(e){let t;this.hasValue(e)?t=e:this.hasValue(this.defaultValue)?t=this.defaultValue:t=Me,this.colorValue=d(t),this.setAlphaColor(this.colorValue),this.toRgbString=this.colorValue?.toRgbString()||"",this.cdr.detectChanges()}setAlphaColor(e){let t=d(e.toRgbString());this.alphaColor=t.toRgbString(),this.gradientColors=["rgba(255, 0, 4, 0) 0%",this.alphaColor],this.cdr.markForCheck()}handleChange(e,t){this.setColorValue(e),this.nzOnChange.emit({color:e,type:t})}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[{token:k}],target:p.Component})}static{this.\u0275cmp=z({minVersion:"14.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"ng-antd-color-picker",inputs:{value:"value",defaultValue:"defaultValue",panelRenderHeader:"panelRenderHeader",panelRenderFooter:"panelRenderFooter",disabledAlpha:"disabledAlpha",disabled:"disabled"},outputs:{nzOnChange:"nzOnChange",nzOnChangeComplete:"nzOnChangeComplete"},usesOnChanges:!0,ngImport:r,template:`
    <div class="ant-color-picker-panel" [class.ant-color-picker-panel-disabled]="disabled">
      <ng-container *ngIf="panelRenderHeader">
        <ng-template [ngTemplateOutlet]="panelRenderHeader"></ng-template>
      </ng-container>
      <color-picker
        [color]="colorValue"
        (nzOnChange)="handleChange($event)"
        [disabled]="disabled"
        (nzOnChangeComplete)="nzOnChangeComplete.emit($event)"
      ></color-picker>
      <div class="ant-color-picker-slider-container">
        <div class="ant-color-picker-slider-group" [class.ant-color-picker-slider-group-disabled-alpha]="disabledAlpha">
          <color-slider
            [color]="colorValue"
            [value]="'hsl(' + colorValue?.toHsb()?.h + ',100%, 50%)'"
            [gradientColors]="hueColor"
            (nzOnChange)="handleChange($event, 'hue')"
            [disabled]="disabled"
            (nzOnChangeComplete)="nzOnChangeComplete.emit($event)"
          ></color-slider>
          <ng-container *ngIf="!disabledAlpha">
            <color-slider
              type="alpha"
              [color]="colorValue"
              [value]="toRgbString"
              [gradientColors]="gradientColors"
              (nzOnChange)="handleChange($event, 'alpha')"
              [disabled]="disabled"
              (nzOnChangeComplete)="nzOnChangeComplete.emit($event)"
            ></color-slider>
          </ng-container>
        </div>
        <ng-antd-color-block [color]="toRgbString"></ng-antd-color-block>
      </div>
      <ng-container *ngIf="panelRenderFooter">
        <ng-template [ngTemplateOutlet]="panelRenderFooter"></ng-template>
      </ng-container>
    </div>
  `,isInline:!0,dependencies:[{kind:"directive",type:Ke,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"component",type:Ne,selector:"color-picker",inputs:["color","disabled"],outputs:["nzOnChange","nzOnChangeComplete"]},{kind:"component",type:Pe,selector:"color-slider",inputs:["gradientColors","direction","type","color","value","disabled"],outputs:["nzOnChange","nzOnChangeComplete"]},{kind:"component",type:U,selector:"ng-antd-color-block",inputs:["color"],outputs:["nzOnClick"]},{kind:"directive",type:H,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}]})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:ne,decorators:[{type:g,args:[{selector:"ng-antd-color-picker",standalone:!0,imports:[Ke,Ne,Pe,U,H],template:`
    <div class="ant-color-picker-panel" [class.ant-color-picker-panel-disabled]="disabled">
      <ng-container *ngIf="panelRenderHeader">
        <ng-template [ngTemplateOutlet]="panelRenderHeader"></ng-template>
      </ng-container>
      <color-picker
        [color]="colorValue"
        (nzOnChange)="handleChange($event)"
        [disabled]="disabled"
        (nzOnChangeComplete)="nzOnChangeComplete.emit($event)"
      ></color-picker>
      <div class="ant-color-picker-slider-container">
        <div class="ant-color-picker-slider-group" [class.ant-color-picker-slider-group-disabled-alpha]="disabledAlpha">
          <color-slider
            [color]="colorValue"
            [value]="'hsl(' + colorValue?.toHsb()?.h + ',100%, 50%)'"
            [gradientColors]="hueColor"
            (nzOnChange)="handleChange($event, 'hue')"
            [disabled]="disabled"
            (nzOnChangeComplete)="nzOnChangeComplete.emit($event)"
          ></color-slider>
          <ng-container *ngIf="!disabledAlpha">
            <color-slider
              type="alpha"
              [color]="colorValue"
              [value]="toRgbString"
              [gradientColors]="gradientColors"
              (nzOnChange)="handleChange($event, 'alpha')"
              [disabled]="disabled"
              (nzOnChangeComplete)="nzOnChangeComplete.emit($event)"
            ></color-slider>
          </ng-container>
        </div>
        <ng-antd-color-block [color]="toRgbString"></ng-antd-color-block>
      </div>
      <ng-container *ngIf="panelRenderFooter">
        <ng-template [ngTemplateOutlet]="panelRenderFooter"></ng-template>
      </ng-container>
    </div>
  `}]}],ctorParameters:()=>[{type:k}],propDecorators:{value:[{type:s}],defaultValue:[{type:s}],nzOnChange:[{type:S}],nzOnChangeComplete:[{type:S}],panelRenderHeader:[{type:s}],panelRenderFooter:[{type:s}],disabledAlpha:[{type:s}],disabled:[{type:s}]}});var me=class i{static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[],target:p.NgModule})}static{this.\u0275mod=oe({minVersion:"14.0.0",version:"17.3.8",ngImport:r,type:i,imports:[ne,U],exports:[ne,U]})}static{this.\u0275inj=re({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:me,decorators:[{type:se,args:[{imports:[ne,U],exports:[ne,U]}]}]});var W=class i{constructor(){this.nzColor=Me.toHexString(),this.nzSize="default",this.nzOnClick=new v}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[],target:p.Component})}static{this.\u0275cmp=z({minVersion:"14.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"nz-color-block",inputs:{nzColor:"nzColor",nzSize:"nzSize"},outputs:{nzOnClick:"nzOnClick"},host:{properties:{"class.ant-color-picker-inline-sm":"nzSize === 'small'","class.ant-color-picker-inline-lg":"nzSize === 'large'"},classAttribute:"ant-color-picker-inline"},exportAs:["NzColorBlock"],ngImport:r,template:' <ng-antd-color-block [color]="nzColor" (nzOnClick)="nzOnClick.emit($event)"></ng-antd-color-block> ',isInline:!0,dependencies:[{kind:"ngmodule",type:me},{kind:"component",type:U,selector:"ng-antd-color-block",inputs:["color"],outputs:["nzOnClick"]}],changeDetection:f.OnPush})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:W,decorators:[{type:g,args:[{selector:"nz-color-block",exportAs:"NzColorBlock",changeDetection:f.OnPush,standalone:!0,imports:[me],template:' <ng-antd-color-block [color]="nzColor" (nzOnClick)="nzOnClick.emit($event)"></ng-antd-color-block> ',host:{class:"ant-color-picker-inline","[class.ant-color-picker-inline-sm]":"nzSize === 'small'","[class.ant-color-picker-inline-lg]":"nzSize === 'large'"}}]}],ctorParameters:()=>[],propDecorators:{nzColor:[{type:s}],nzSize:[{type:s}],nzOnClick:[{type:S}]}});var Z=class i{validatorFn(){return e=>{let t=/^[0-9a-fA-F]{6}$/;if(e.value){if(!t.test(e.value))return{error:!0}}else return{error:!0};return null}}constructor(e){this.formBuilder=e,this.format=null,this.colorValue="",this.clearColor=!1,this.nzDisabledAlpha=!1,this.formatChange=new v,this.nzOnFormatChange=new v,this.destroy$=new N,this.formatterPercent=t=>`${t} %`,this.parserPercent=t=>t.replace(" %",""),this.validateForm=this.formBuilder.nonNullable.group({isFormat:this.formBuilder.control("hex"),hex:this.formBuilder.control("1677FF",this.validatorFn()),hsbH:215,hsbS:91,hsbB:100,rgbR:22,rgbG:119,rgbB:255,roundA:100})}ngOnInit(){this.validateForm.valueChanges.pipe(He(()=>this.validateForm.valid),ut(200),K((e,t)=>Object.keys(e).every(n=>e[n]===t[n])),m(this.destroy$)).subscribe(e=>{let t="";switch(e.isFormat){case"hsb":t=d({h:Number(e.hsbH),s:Number(e.hsbS)/100,b:Number(e.hsbB)/100,a:Number(e.roundA)/100}).toHsbString();break;case"rgb":t=d({r:Number(e.rgbR),g:Number(e.rgbG),b:Number(e.rgbB),a:Number(e.roundA)/100}).toRgbString();break;default:let n=d(e.hex),o=d({r:n.r,g:n.g,b:n.b,a:Number(e.roundA)/100});t=o.getAlpha()<1?o.toHex8String():o.toHexString();break}this.formatChange.emit({color:t,format:e.isFormat||this.format||"hex"})}),this.validateForm.get("isFormat")?.valueChanges.pipe(m(this.destroy$)).subscribe(e=>{this.nzOnFormatChange.emit(e)})}ngOnChanges(e){let{colorValue:t,format:n,clearColor:o}=e;if(t){let a={hex:d(this.colorValue).toHex(),hsbH:Math.round(d(this.colorValue).toHsb().h),hsbS:Math.round(d(this.colorValue).toHsb().s*100),hsbB:Math.round(d(this.colorValue).toHsb().b*100),rgbR:Math.round(d(this.colorValue).r),rgbG:Math.round(d(this.colorValue).g),rgbB:Math.round(d(this.colorValue).b),roundA:Math.round(d(this.colorValue).roundA*100)};this.validateForm.patchValue(a)}n&&this.format&&this.validateForm.get("isFormat")?.patchValue(this.format),o&&this.clearColor&&this.validateForm.get("roundA")?.patchValue(0)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[{token:we}],target:p.Component})}static{this.\u0275cmp=z({minVersion:"17.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"nz-color-format",inputs:{format:"format",colorValue:"colorValue",clearColor:"clearColor",nzDisabledAlpha:"nzDisabledAlpha"},outputs:{formatChange:"formatChange",nzOnFormatChange:"nzOnFormatChange"},exportAs:["NzColorFormat"],usesOnChanges:!0,ngImport:r,template:`
    <div [formGroup]="validateForm" class="ant-color-picker-input-container">
      <div class="ant-color-picker-format-select">
        <nz-select formControlName="isFormat" nzBorderless nzSize="small">
          <nz-option nzValue="hex" nzLabel="HEX" />
          <nz-option nzValue="hsb" nzLabel="HSB" />
          <nz-option nzValue="rgb" nzLabel="RGB" />
        </nz-select>
      </div>

      <div class="ant-color-picker-input">
        @switch (validateForm.controls.isFormat.value) {
          @case ('hex') {
            <div class="ant-color-picker-hex-input">
              <nz-input-group nzPrefix="#" nzSize="small">
                <input nz-input nzSize="small" formControlName="hex" />
              </nz-input-group>
            </div>
          }
          @case ('hsb') {
            <div class="ant-color-picker-hsb-input">
              <div class="ant-color-picker-steppers ant-color-picker-hsb-input">
                <nz-input-number
                  formControlName="hsbH"
                  [nzMin]="0"
                  [nzMax]="360"
                  [nzStep]="1"
                  [nzPrecision]="0"
                  nzSize="small"
                />
              </div>
              <div class="ant-color-picker-steppers ant-color-picker-hsb-input">
                <nz-input-number
                  formControlName="hsbS"
                  [nzMin]="0"
                  [nzMax]="100"
                  [nzStep]="1"
                  [nzFormatter]="formatterPercent"
                  [nzParser]="parserPercent"
                  nzSize="small"
                />
              </div>
              <div class="ant-color-picker-steppers ant-color-picker-hsb-input">
                <nz-input-number
                  formControlName="hsbB"
                  [nzMin]="0"
                  [nzMax]="100"
                  [nzStep]="1"
                  [nzFormatter]="formatterPercent"
                  [nzParser]="parserPercent"
                  nzSize="small"
                />
              </div>
            </div>
          }
          @default {
            <div class="ant-color-picker-rgb-input">
              <div class="ant-color-picker-steppers ant-color-picker-rgb-input">
                <nz-input-number formControlName="rgbR" [nzMin]="0" [nzMax]="255" [nzStep]="1" nzSize="small" />
              </div>
              <div class="ant-color-picker-steppers ant-color-picker-rgb-input">
                <nz-input-number formControlName="rgbG" [nzMin]="0" [nzMax]="255" [nzStep]="1" nzSize="small" />
              </div>
              <div class="ant-color-picker-steppers ant-color-picker-rgb-input">
                <nz-input-number formControlName="rgbB" [nzMin]="0" [nzMax]="255" [nzStep]="1" nzSize="small" />
              </div>
            </div>
          }
        }
      </div>

      @if (!nzDisabledAlpha) {
        <div class="ant-color-picker-steppers ant-color-picker-alpha-input">
          <nz-input-number
            formControlName="roundA"
            [nzMin]="0"
            [nzMax]="100"
            [nzStep]="1"
            [nzFormatter]="formatterPercent"
            [nzParser]="parserPercent"
            nzSize="small"
          />
        </div>
      }
    </div>
  `,isInline:!0,dependencies:[{kind:"ngmodule",type:et},{kind:"directive",type:Le,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:Ge,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:ft,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:zt,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:yt,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"ngmodule",type:st},{kind:"component",type:Ct,selector:"nz-option",inputs:["nzTitle","nzLabel","nzValue","nzKey","nzDisabled","nzHide","nzCustomContent"],exportAs:["nzOption"]},{kind:"component",type:vt,selector:"nz-select",inputs:["nzId","nzSize","nzStatus","nzOptionHeightPx","nzOptionOverflowSize","nzDropdownClassName","nzDropdownMatchSelectWidth","nzDropdownStyle","nzNotFoundContent","nzPlaceHolder","nzPlacement","nzMaxTagCount","nzDropdownRender","nzCustomTemplate","nzSuffixIcon","nzClearIcon","nzRemoveIcon","nzMenuItemSelectedIcon","nzTokenSeparators","nzMaxTagPlaceholder","nzMaxMultipleCount","nzMode","nzFilterOption","compareWith","nzAllowClear","nzBorderless","nzShowSearch","nzLoading","nzAutoFocus","nzAutoClearSearchValue","nzServerSearch","nzDisabled","nzOpen","nzSelectOnTab","nzBackdrop","nzOptions","nzShowArrow"],outputs:["nzOnSearch","nzScrollToBottom","nzOpenChange","nzBlur","nzFocus"],exportAs:["nzSelect"]},{kind:"directive",type:I,selector:"input[nz-input],textarea[nz-input]",inputs:["nzBorderless","nzSize","nzStepperless","nzStatus","disabled"],exportAs:["nzInput"]},{kind:"component",type:T,selector:"nz-input-group",inputs:["nzAddOnBeforeIcon","nzAddOnAfterIcon","nzPrefixIcon","nzSuffixIcon","nzAddOnBefore","nzAddOnAfter","nzPrefix","nzStatus","nzSuffix","nzSize","nzSearch","nzCompact"],exportAs:["nzInputGroup"]},{kind:"component",type:O,selector:"nz-input-number",inputs:["nzSize","nzMin","nzMax","nzParser","nzPrecision","nzPrecisionMode","nzPlaceHolder","nzStatus","nzStep","nzInputMode","nzId","nzDisabled","nzReadOnly","nzAutoFocus","nzBorderless","nzFormatter"],outputs:["nzBlur","nzFocus"],exportAs:["nzInputNumber"]}],changeDetection:f.OnPush})}};b([x()],Z.prototype,"nzDisabledAlpha",void 0);c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:Z,decorators:[{type:g,args:[{selector:"nz-color-format",exportAs:"NzColorFormat",changeDetection:f.OnPush,standalone:!0,imports:[et,st,I,T,O],template:`
    <div [formGroup]="validateForm" class="ant-color-picker-input-container">
      <div class="ant-color-picker-format-select">
        <nz-select formControlName="isFormat" nzBorderless nzSize="small">
          <nz-option nzValue="hex" nzLabel="HEX" />
          <nz-option nzValue="hsb" nzLabel="HSB" />
          <nz-option nzValue="rgb" nzLabel="RGB" />
        </nz-select>
      </div>

      <div class="ant-color-picker-input">
        @switch (validateForm.controls.isFormat.value) {
          @case ('hex') {
            <div class="ant-color-picker-hex-input">
              <nz-input-group nzPrefix="#" nzSize="small">
                <input nz-input nzSize="small" formControlName="hex" />
              </nz-input-group>
            </div>
          }
          @case ('hsb') {
            <div class="ant-color-picker-hsb-input">
              <div class="ant-color-picker-steppers ant-color-picker-hsb-input">
                <nz-input-number
                  formControlName="hsbH"
                  [nzMin]="0"
                  [nzMax]="360"
                  [nzStep]="1"
                  [nzPrecision]="0"
                  nzSize="small"
                />
              </div>
              <div class="ant-color-picker-steppers ant-color-picker-hsb-input">
                <nz-input-number
                  formControlName="hsbS"
                  [nzMin]="0"
                  [nzMax]="100"
                  [nzStep]="1"
                  [nzFormatter]="formatterPercent"
                  [nzParser]="parserPercent"
                  nzSize="small"
                />
              </div>
              <div class="ant-color-picker-steppers ant-color-picker-hsb-input">
                <nz-input-number
                  formControlName="hsbB"
                  [nzMin]="0"
                  [nzMax]="100"
                  [nzStep]="1"
                  [nzFormatter]="formatterPercent"
                  [nzParser]="parserPercent"
                  nzSize="small"
                />
              </div>
            </div>
          }
          @default {
            <div class="ant-color-picker-rgb-input">
              <div class="ant-color-picker-steppers ant-color-picker-rgb-input">
                <nz-input-number formControlName="rgbR" [nzMin]="0" [nzMax]="255" [nzStep]="1" nzSize="small" />
              </div>
              <div class="ant-color-picker-steppers ant-color-picker-rgb-input">
                <nz-input-number formControlName="rgbG" [nzMin]="0" [nzMax]="255" [nzStep]="1" nzSize="small" />
              </div>
              <div class="ant-color-picker-steppers ant-color-picker-rgb-input">
                <nz-input-number formControlName="rgbB" [nzMin]="0" [nzMax]="255" [nzStep]="1" nzSize="small" />
              </div>
            </div>
          }
        }
      </div>

      @if (!nzDisabledAlpha) {
        <div class="ant-color-picker-steppers ant-color-picker-alpha-input">
          <nz-input-number
            formControlName="roundA"
            [nzMin]="0"
            [nzMax]="100"
            [nzStep]="1"
            [nzFormatter]="formatterPercent"
            [nzParser]="parserPercent"
            nzSize="small"
          />
        </div>
      }
    </div>
  `}]}],ctorParameters:()=>[{type:we}],propDecorators:{format:[{type:s}],colorValue:[{type:s}],clearColor:[{type:s}],nzDisabledAlpha:[{type:s}],formatChange:[{type:S}],nzOnFormatChange:[{type:S}]}});var M=class i{constructor(e,t){this.formBuilder=e,this.cdr=t,this.nzFormat=null,this.nzValue="",this.nzSize="default",this.nzDefaultValue="",this.nzTrigger="click",this.nzTitle="",this.nzFlipFlop=null,this.nzShowText=!1,this.nzOpen=!1,this.nzAllowClear=!1,this.nzDisabled=!1,this.nzDisabledAlpha=!1,this.nzOnChange=new v,this.nzOnFormatChange=new v,this.nzOnClear=new v,this.nzOnOpenChange=new v,this.isTemplateRef=nt,this.isNonEmptyString=tt,this.destroy$=new N,this.isNzDisableFirstChange=!0,this.blockColor="",this.clearColor=!1,this.showText=Me.toHexString(),this.formControl=this.formBuilder.control(""),this.onChange=()=>{}}writeValue(e){this.nzValue=e,this.getBlockColor(),this.formControl.patchValue(e)}registerOnChange(e){this.onChange=e}registerOnTouched(){}setDisabledState(e){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||e,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}ngOnInit(){this.getBlockColor(),this.formControl.valueChanges.pipe(m(this.destroy$)).subscribe(e=>{if(e){let t=e;this.nzFormat==="hex"?t=d(e).getAlpha()<1?d(e).toHex8String():d(e).toHexString():this.nzFormat==="hsb"?t=d(e).toHsbString():this.nzFormat==="rgb"&&(t=d(e).toRgbString()),this.showText=t,this.onChange(t),this.cdr.markForCheck()}})}ngOnChanges(e){let{nzValue:t,nzDefaultValue:n}=e;(t||n)&&this.getBlockColor()}clearColorHandle(){this.clearColor=!0,this.nzOnClear.emit(!0),this.cdr.markForCheck()}getBlockColor(){this.nzValue?this.blockColor=d(this.nzValue).toRgbString():this.nzDefaultValue?this.blockColor=d(this.nzDefaultValue).toRgbString():this.blockColor=Me.toHexString()}colorChange(e){this.blockColor=e.color.getAlpha()<1?e.color.toHex8String():e.color.toHexString(),this.clearColor=!1,this.cdr.markForCheck()}formatChange(e){this.nzValue=e.color,this.clearColor=!1,this.getBlockColor(),this.nzOnChange.emit({color:d(e.color),format:e.format}),this.formControl.patchValue(e.color),this.cdr.markForCheck()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}get isNzTitleNonEmptyString(){return tt(this.nzTitle)}get isNzTitleTemplateRef(){return nt(this.nzTitle)}static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[{token:we},{token:k}],target:p.Component})}static{this.\u0275cmp=z({minVersion:"17.0.0",version:"17.3.8",type:i,isStandalone:!0,selector:"nz-color-picker",inputs:{nzFormat:"nzFormat",nzValue:"nzValue",nzSize:"nzSize",nzDefaultValue:"nzDefaultValue",nzTrigger:"nzTrigger",nzTitle:"nzTitle",nzFlipFlop:"nzFlipFlop",nzShowText:"nzShowText",nzOpen:"nzOpen",nzAllowClear:"nzAllowClear",nzDisabled:"nzDisabled",nzDisabledAlpha:"nzDisabledAlpha"},outputs:{nzOnChange:"nzOnChange",nzOnFormatChange:"nzOnFormatChange",nzOnClear:"nzOnClear",nzOnOpenChange:"nzOnOpenChange"},host:{properties:{"class.ant-color-picker-disabled":"nzDisabled"},classAttribute:"ant-color-picker-inline"},providers:[{provide:Se,useExisting:ye(()=>i),multi:!0}],exportAs:["NzColorPicker"],usesOnChanges:!0,ngImport:r,template:`
    <div
      [class.ant-color-picker-trigger]="!nzFlipFlop"
      [class.ant-color-picker-sm]="nzSize === 'small'"
      [class.ant-color-picker-lg]="nzSize === 'large'"
      nz-popover
      [nzPopoverContent]="colorPicker"
      [nzPopoverTrigger]="!nzDisabled ? nzTrigger : null"
      [nzPopoverVisible]="nzOpen"
      (nzPopoverVisibleChange)="nzOnOpenChange.emit($event)"
    >
      @if (!nzFlipFlop) {
        <nz-color-block [nzColor]="blockColor" [nzSize]="nzSize" />
      } @else {
        <ng-template [ngTemplateOutlet]="nzFlipFlop" />
      }
      @if (nzShowText && !!showText && !nzFlipFlop) {
        <div class="ant-color-picker-trigger-text">
          {{ showText }}
        </div>
      }
    </div>
    <ng-template #colorPicker>
      <ng-antd-color-picker
        [value]="nzValue"
        [defaultValue]="nzDefaultValue"
        [disabled]="nzDisabled"
        [panelRenderHeader]="nzPanelRenderHeader"
        [panelRenderFooter]="nzPanelRenderFooter"
        [disabledAlpha]="nzDisabledAlpha"
        (nzOnChange)="colorChange($event)"
      />
    </ng-template>
    <ng-template #nzPanelRenderHeader>
      @if (nzTitle || nzAllowClear) {
        <div class="ant-color-picker-title">
          <div class="ant-color-picker-title-content">
            @if (isNzTitleTemplateRef) {
              <ng-container *ngTemplateOutlet="$any(nzTitle)" />
            }
            @if (isNzTitleNonEmptyString) {
              <span [innerHTML]="nzTitle"></span>
            }
          </div>
          @if (nzAllowClear) {
            <div class="ant-color-picker-clear" (click)="clearColorHandle()"></div>
          }
        </div>
      }
    </ng-template>
    <ng-template #nzPanelRenderFooter>
      <nz-color-format
        [colorValue]="blockColor"
        [clearColor]="clearColor"
        [format]="nzFormat"
        [nzDisabledAlpha]="nzDisabledAlpha"
        (formatChange)="formatChange($event)"
        (nzOnFormatChange)="nzOnFormatChange.emit($event)"
      />
    </ng-template>
  `,isInline:!0,dependencies:[{kind:"ngmodule",type:me},{kind:"component",type:ne,selector:"ng-antd-color-picker",inputs:["value","defaultValue","panelRenderHeader","panelRenderFooter","disabledAlpha","disabled"],outputs:["nzOnChange","nzOnChangeComplete"]},{kind:"directive",type:rt,selector:"[nz-popover]",inputs:["nzPopoverArrowPointAtCenter","nzPopoverTitle","nzPopoverContent","nz-popover","nzPopoverTrigger","nzPopoverPlacement","nzPopoverOrigin","nzPopoverVisible","nzPopoverMouseEnterDelay","nzPopoverMouseLeaveDelay","nzPopoverOverlayClassName","nzPopoverOverlayStyle","nzPopoverBackdrop"],outputs:["nzPopoverVisibleChange"],exportAs:["nzPopover"]},{kind:"component",type:W,selector:"nz-color-block",inputs:["nzColor","nzSize"],outputs:["nzOnClick"],exportAs:["NzColorBlock"]},{kind:"component",type:Z,selector:"nz-color-format",inputs:["format","colorValue","clearColor","nzDisabledAlpha"],outputs:["formatChange","nzOnFormatChange"],exportAs:["NzColorFormat"]},{kind:"directive",type:H,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector"]}],changeDetection:f.OnPush})}};b([x()],M.prototype,"nzShowText",void 0);b([x()],M.prototype,"nzOpen",void 0);b([x()],M.prototype,"nzAllowClear",void 0);b([x()],M.prototype,"nzDisabled",void 0);b([x()],M.prototype,"nzDisabledAlpha",void 0);c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:M,decorators:[{type:g,args:[{selector:"nz-color-picker",exportAs:"NzColorPicker",changeDetection:f.OnPush,standalone:!0,imports:[me,rt,W,Z,H],template:`
    <div
      [class.ant-color-picker-trigger]="!nzFlipFlop"
      [class.ant-color-picker-sm]="nzSize === 'small'"
      [class.ant-color-picker-lg]="nzSize === 'large'"
      nz-popover
      [nzPopoverContent]="colorPicker"
      [nzPopoverTrigger]="!nzDisabled ? nzTrigger : null"
      [nzPopoverVisible]="nzOpen"
      (nzPopoverVisibleChange)="nzOnOpenChange.emit($event)"
    >
      @if (!nzFlipFlop) {
        <nz-color-block [nzColor]="blockColor" [nzSize]="nzSize" />
      } @else {
        <ng-template [ngTemplateOutlet]="nzFlipFlop" />
      }
      @if (nzShowText && !!showText && !nzFlipFlop) {
        <div class="ant-color-picker-trigger-text">
          {{ showText }}
        </div>
      }
    </div>
    <ng-template #colorPicker>
      <ng-antd-color-picker
        [value]="nzValue"
        [defaultValue]="nzDefaultValue"
        [disabled]="nzDisabled"
        [panelRenderHeader]="nzPanelRenderHeader"
        [panelRenderFooter]="nzPanelRenderFooter"
        [disabledAlpha]="nzDisabledAlpha"
        (nzOnChange)="colorChange($event)"
      />
    </ng-template>
    <ng-template #nzPanelRenderHeader>
      @if (nzTitle || nzAllowClear) {
        <div class="ant-color-picker-title">
          <div class="ant-color-picker-title-content">
            @if (isNzTitleTemplateRef) {
              <ng-container *ngTemplateOutlet="$any(nzTitle)" />
            }
            @if (isNzTitleNonEmptyString) {
              <span [innerHTML]="nzTitle"></span>
            }
          </div>
          @if (nzAllowClear) {
            <div class="ant-color-picker-clear" (click)="clearColorHandle()"></div>
          }
        </div>
      }
    </ng-template>
    <ng-template #nzPanelRenderFooter>
      <nz-color-format
        [colorValue]="blockColor"
        [clearColor]="clearColor"
        [format]="nzFormat"
        [nzDisabledAlpha]="nzDisabledAlpha"
        (formatChange)="formatChange($event)"
        (nzOnFormatChange)="nzOnFormatChange.emit($event)"
      />
    </ng-template>
  `,host:{class:"ant-color-picker-inline","[class.ant-color-picker-disabled]":"nzDisabled"},providers:[{provide:Se,useExisting:ye(()=>M),multi:!0}]}]}],ctorParameters:()=>[{type:we},{type:k}],propDecorators:{nzFormat:[{type:s}],nzValue:[{type:s}],nzSize:[{type:s}],nzDefaultValue:[{type:s}],nzTrigger:[{type:s}],nzTitle:[{type:s}],nzFlipFlop:[{type:s}],nzShowText:[{type:s}],nzOpen:[{type:s}],nzAllowClear:[{type:s}],nzDisabled:[{type:s}],nzDisabledAlpha:[{type:s}],nzOnChange:[{type:S}],nzOnFormatChange:[{type:S}],nzOnClear:[{type:S}],nzOnOpenChange:[{type:S}]}});var pt=class i{static{this.\u0275fac=u({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,deps:[],target:p.NgModule})}static{this.\u0275mod=oe({minVersion:"14.0.0",version:"17.3.8",ngImport:r,type:i,imports:[M,W,Z],exports:[M,W]})}static{this.\u0275inj=re({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:i,imports:[M,Z]})}};c({minVersion:"12.0.0",version:"17.3.8",ngImport:r,type:pt,decorators:[{type:se,args:[{imports:[M,W,Z],exports:[M,W]}]}]});export{pt as a};
