1"use strict";(self.webpackChunkCustomerPanel=self.webpackChunkCustomerPanel||[]).push([[317],{317:(H,M,g)=>{g.d(M,{y:()=>ae});var t=g(4438),i=g(9417),V=g(1413),v=g(6977),y=g(177),E=g(5875),R=g(5779),I=g(1141),O=g(2242),k=g(1305),T=g(1802),D=g(8833),G=g(6296),S=g(9851),x=g(5430),L=g(9266),w=g(8542);const C=()=>({width:"100%"}),B=(s,m)=>[s,m],A=()=>({standalone:!0});function $(s,m){if(1&s){const e=t.RV6();t.j41(0,"h5"),t.EFF(1),t.k0s(),t.j41(2,"button",4),t.bIt("click",function(){t.eBV(e);const l=t.XpG();return t.Njj(l.close())}),t.k0s()}if(2&s){const e=t.XpG();t.R7$(),t.JRh(e.getTitle()),t.R7$(),t.BMQ("aria-label","Fechar filtros")}}function j(s,m){if(1&s){const e=t.RV6();t.j41(0,"button",13),t.bIt("click",function(){const l=t.eBV(e).$implicit,d=t.XpG(3);return t.Njj(d.onRemoveAppliedFilter(l))}),t.EFF(1),t.nrm(2,"i",14),t.k0s()}if(2&s){const e=m.$implicit,n=t.XpG(3);t.Y8G("disabled",n.loading||e.disabled),t.BMQ("aria-label","Remover filtro "+e.value),t.R7$(),t.SpI(" ",e.value," ")}}function P(s,m){if(1&s&&(t.j41(0,"div",9)(1,"span",10),t.EFF(2,"Filtros Aplicados:"),t.k0s(),t.j41(3,"div",11),t.DNE(4,j,3,3,"button",12),t.k0s()()),2&s){const e=t.XpG(2);t.R7$(4),t.Y8G("ngForOf",e.appliedFilters)}}function F(s,m){1&s&&(t.j41(0,"span",33),t.EFF(1,"*"),t.k0s())}function N(s,m){if(1&s&&(t.j41(0,"span",34),t.nrm(1,"i",35),t.j41(2,"span"),t.EFF(3),t.k0s()()),2&s){const e=t.XpG(3).$implicit;t.R7$(3),t.JRh(e.helperText)}}function h(s,m){if(1&s&&(t.j41(0,"label",30)(1,"span"),t.EFF(2),t.k0s(),t.DNE(3,F,2,0,"span",31)(4,N,4,1,"span",32),t.k0s()),2&s){const e=t.XpG(2).$implicit,n=t.XpG(2);t.BMQ("for",n.getFieldId(e)),t.R7$(2),t.JRh(e.label),t.R7$(),t.Y8G("ngIf",n.isFieldRequired(e)),t.R7$(),t.Y8G("ngIf",e.helperText&&e.helperInline)}}function _(s,m){if(1&s&&t.nrm(0,"input",36),2&s){const e=t.XpG(2).$implicit,n=t.XpG(2);t.Y8G("id",n.getFieldId(e))("type",e.inputType||"text")("formControlName",e.key)("placeholder",e.placeholder||""),t.BMQ("aria-label",n.getAriaLabel(e))}}function a(s,m){if(1&s&&t.nrm(0,"textarea",37),2&s){const e=t.XpG(2).$implicit,n=t.XpG(2);t.Y8G("id",n.getFieldId(e))("formControlName",e.key)("placeholder",e.placeholder||""),t.BMQ("aria-label",n.getAriaLabel(e))}}function o(s,m){if(1&s&&t.nrm(0,"p-inputNumber",38),2&s){const e=t.XpG(2).$implicit,n=t.XpG(2);t.Y8G("inputId",n.getFieldId(e))("formControlName",e.key)("placeholder",e.placeholder||"")("inputStyle",t.lJ4(5,C))("ariaLabel",n.getAriaLabel(e))}}function r(s,m){if(1&s&&t.nrm(0,"p-dropdown",39),2&s){const e=t.XpG(2).$implicit,n=t.XpG(2);t.Y8G("inputId",n.getFieldId(e))("formControlName",e.key)("options",n.getOptions(e))("appendTo",!1===e.appendToBody?null:"body")("overlayOptions",n.filterOverlayOptions)("placeholder",e.placeholder||"Selecione"),t.BMQ("aria-label",n.getAriaLabel(e))}}function u(s,m){if(1&s&&t.nrm(0,"p-multiSelect",40),2&s){let e;const n=t.XpG(2).$implicit,l=t.XpG(2);t.Y8G("inputId",l.getFieldId(n))("formControlName",n.key)("options",l.getOptions(n))("appendTo",!1===n.appendToBody?null:"body")("overlayOptions",l.filterOverlayOptions)("placeholder",n.placeholder||"Selecione")("showClear",!0)("showToggleAll",(null!==(e=null==n.options?null:n.options.length)&&void 0!==e?e:0)>1),t.BMQ("aria-label",l.getAriaLabel(n))}}function f(s,m){if(1&s&&t.nrm(0,"p-calendar",41),2&s){const e=t.XpG(2).$implicit,n=t.XpG(2);t.Y8G("inputId",n.getFieldId(e))("formControlName",e.key)("appendTo",!1===e.appendToBody?null:"body")("dateFormat",e.dateFormat||"dd/mm/yy")("placeholder",e.placeholder||""),t.BMQ("aria-label",n.getAriaLabel(e))}}function X(s,m){if(1&s&&(t.j41(0,"div",42),t.nrm(1,"p-calendar",43)(2,"p-calendar",44),t.k0s()),2&s){const e=t.XpG(2).$implicit,n=t.XpG(2);t.Y8G("formGroupName",e.key),t.R7$(),t.Y8G("inputId",n.getRangeStartId(e))("appendTo",!1===e.appendToBody?null:"body")("dateFormat",e.dateFormat||"dd/mm/yy")("placeholder",e.startPlaceholder||"de"),t.BMQ("aria-label",n.getAriaLabel(e)+" in\xedcio"),t.R7$(),t.Y8G("inputId",n.getRangeEndId(e))("appendTo",!1===e.appendToBody?null:"body")("dateFormat",e.dateFormat||"dd/mm/yy")("placeholder",e.endPlaceholder||"at\xe9"),t.BMQ("aria-label",n.getAriaLabel(e)+" fim")}}function U(s,m){if(1&s&&(t.j41(0,"div",42),t.nrm(1,"p-inputNumber",45)(2,"p-inputNumber",46),t.k0s()),2&s){const e=t.XpG(2).$implicit,n=t.XpG(2);t.Y8G("formGroupName",e.key),t.R7$(),t.Y8G("inputId",n.getRangeStartId(e))("placeholder",e.startPlaceholder||"de")("inputStyle",t.lJ4(9,C))("ariaLabel",n.getAriaLabel(e)+" in\xedcio"),t.R7$(),t.Y8G("inputId",n.getRangeEndId(e))("placeholder",e.endPlaceholder||"at\xe9")("inputStyle",t.lJ4(10,C))("ariaLabel",n.getAriaLabel(e)+" fim")}}function K(s,m){if(1&s&&(t.j41(0,"small",56),t.EFF(1),t.k0s()),2&s){const e=t.XpG(3).$implicit,n=t.XpG(2);t.R7$(),t.SpI(" ",n.getRangeErrorMessage(e)," ")}}function W(s,m){if(1&s){const e=t.RV6();t.j41(0,"div",47)(1,"div",48),t.nrm(2,"p-inputNumber",49)(3,"p-inputNumber",50),t.k0s(),t.DNE(4,K,2,1,"small",28),t.j41(5,"div",51)(6,"div",52)(7,"div",53),t.EFF(8),t.k0s(),t.j41(9,"div",53),t.EFF(10),t.k0s()(),t.j41(11,"div",54)(12,"p-slider",55),t.bIt("ngModelChange",function(l){t.eBV(e);const d=t.XpG(2).$implicit,p=t.XpG(2);return t.Njj(p.onSliderRangeChange(d,l))}),t.k0s()()()()}if(2&s){let e,n,l,d,p;const c=t.XpG(2).$implicit,b=t.XpG(2);t.Y8G("formGroupName",c.key),t.R7$(2),t.Y8G("inputId",b.getRangeStartId(c))("placeholder",c.startPlaceholder||"de")("inputStyle",t.lJ4(23,C))("min",c.min)("max",c.max)("locale",c.locale||"pt-BR")("ariaLabel",b.getAr
1iaLabel(c)+" in\xedcio"),t.R7$(),t.Y8G("inputId",b.getRangeEndId(c))("placeholder",c.endPlaceholder||"at\xe9")("inputStyle",t.lJ4(24,C))("min",c.min)("max",c.max)("locale",c.locale||"pt-BR")("ariaLabel",b.getAriaLabel(c)+" fim"),t.R7$(),t.Y8G("ngIf",b.hasRangeError(c)),t.R7$(4),t.SpI(" ",(null!==(e=c.min)&&void 0!==e?e:0).toLocaleString("pt-BR")," "),t.R7$(2),t.SpI(" ",(null!==(n=c.max)&&void 0!==n?n:0).toLocaleString("pt-BR")," "),t.R7$(2),t.Y8G("range",!0)("min",null!==(l=c.min)&&void 0!==l?l:0)("max",null!==(d=c.max)&&void 0!==d?d:0)("ngModel",null!==(p=b.sliderRangeModel[c.key])&&void 0!==p?p:t.l_i(25,B,null!==(p=c.min)&&void 0!==p?p:0,null!==(p=c.max)&&void 0!==p?p:0))("ngModelOptions",t.lJ4(28,A))}}function z(s,m){1&s&&(t.j41(0,"span",33),t.EFF(1,"*"),t.k0s())}function q(s,m){if(1&s&&(t.j41(0,"div",57),t.nrm(1,"p-checkbox",58),t.j41(2,"label",30),t.EFF(3),t.DNE(4,z,2,0,"span",31),t.k0s()()),2&s){const e=t.XpG(2).$implicit,n=t.XpG(2);t.R7$(),t.Y8G("inputId",n.getFieldId(e))("formControlName",e.key)("binary",!0)("ariaLabel",n.getAriaLabel(e)),t.R7$(),t.BMQ("for",n.getFieldId(e)),t.R7$(),t.SpI(" ",e.label," "),t.R7$(),t.Y8G("ngIf",n.isFieldRequired(e))}}function Q(s,m){if(1&s&&(t.j41(0,"small",56),t.EFF(1),t.k0s()),2&s){const e=t.XpG(2).$implicit,n=t.XpG(2);t.R7$(),t.SpI(" ",n.getFieldErrorMessage(e)," ")}}function J(s,m){if(1&s&&(t.j41(0,"small",56),t.EFF(1),t.k0s()),2&s){const e=t.XpG(2).$implicit,n=t.XpG(2);t.R7$(),t.SpI(" ",n.getRangeErrorMessage(e)," ")}}function Z(s,m){if(1&s&&(t.j41(0,"small",59),t.EFF(1),t.k0s()),2&s){const e=t.XpG(2).$implicit;t.R7$(),t.SpI(" ",e.helperText," ")}}function ee(s,m){if(1&s&&(t.j41(0,"div",16),t.DNE(1,h,5,4,"label",17),t.qex(2,18),t.DNE(3,_,1,5,"input",19)(4,a,1,4,"textarea",20)(5,o,1,6,"p-inputNumber",21)(6,r,1,7,"p-dropdown",22)(7,u,1,9,"p-multiSelect",23)(8,f,1,6,"p-calendar",24)(9,X,3,11,"div",25)(10,U,3,11,"div",25)(11,W,13,29,"div",26)(12,q,5,7,"div",27),t.bVm(),t.DNE(13,Q,2,1,"small",28)(14,J,2,1,"small",28)(15,Z,2,1,"small",29),t.k0s()),2&s){const e=t.XpG().$implicit,n=t.XpG(2);t.Y8G("ngClass",n.getFieldClass(e))("pTooltip",n.getTooltip(e)),t.R7$(),t.Y8G("ngIf","checkbox"!==e.controlType),t.R7$(),t.Y8G("ngSwitch",e.controlType),t.R7$(),t.Y8G("ngSwitchCase","text"),t.R7$(),t.Y8G("ngSwitchCase","textarea"),t.R7$(),t.Y8G("ngSwitchCase","number"),t.R7$(),t.Y8G("ngSwitchCase","select"),t.R7$(),t.Y8G("ngSwitchCase","multiSelect"),t.R7$(),t.Y8G("ngSwitchCase","date"),t.R7$(),t.Y8G("ngSwitchCase","dateRange"),t.R7$(),t.Y8G("ngSwitchCase","numberRange"),t.R7$(),t.Y8G("ngSwitchCase","numberRangeSlider"),t.R7$(),t.Y8G("ngSwitchCase","checkbox"),t.R7$(),t.Y8G("ngIf",n.isFieldInvalid(e)),t.R7$(),t.Y8G("ngIf",n.hasRangeError(e)&&!n.isSliderRangeControl(e)),t.R7$(),t.Y8G("ngIf",e.helperText&&!e.helperInline)}}function te(s,m){if(1&s&&(t.qex(0),t.DNE(1,ee,16,17,"div",15),t.bVm()),2&s){const e=m.$implicit,n=t.XpG(2);t.R7$(),t.Y8G("ngIf",!n.isFieldHidden(e))}}function ne(s,m){if(1&s){const e=t.RV6();t.DNE(0,P,5,1,"div",5),t.j41(1,"form",6),t.bIt("ngSubmit",function(){t.eBV(e);const l=t.XpG();return t.Njj(l.onApplyClick())}),t.j41(2,"div",7),t.DNE(3,te,2,1,"ng-container",8),t.k0s()()}if(2&s){const e=t.XpG();t.Y8G("ngIf",e.appliedFilters.length>0),t.R7$(),t.Y8G("id",e.getFormId())("formGroup",e.form),t.R7$(2),t.Y8G("ngForOf",e.resolvedFields)("ngForTrackBy",e.trackByFieldKey)}}function ie(s,m){if(1&s){const e=t.RV6();t.j41(0,"div",60)(1,"div",61)(2,"button",62),t.bIt("click",function(){t.eBV(e);const l=t.XpG();return t.Njj(l.onClearClick())}),t.EFF(3," Limpar "),t.k0s()(),t.j41(4,"div",61)(5,"button",63),t.EFF(6," Aplicar "),t.k0s()()()}if(2&s){const e=t.XpG();t.R7$(2),t.Y8G("disabled",e.loading),t.R7$(3),t.Y8G("disabled",e.loading),t.BMQ("form",e.getFormId())}}let ae=(()=>{class s{fb;sidebarBaseZIndex=1200;filterOverlayOptions={autoZIndex:!0,baseZIndex:1300};config={fields:[]};initialValue=null;loading=!1;visible=!1;appliedFilters=[];visibleChange=new t.bkB;apply=new t.bkB;clear=new t.bkB;change=new t.bkB;removeAppliedFilter=new t.bkB;invalidSubmit=new t.bkB;form=new i.gE({});resolvedFields=[];sliderRangeModel={};rangeControlTypes=new Set(["dateRange","numberRange","numberRangeSlider"]);destroy$=new V.B;formValueChangesSubscription;normalizedOptionsByFieldKey={};optionsSourceByFieldKey={};constructor(e){this.fb=e}ngOnInit(){this.buildForm()}ngOnChanges(e){e.config&&!e.config.firstChange&&this.buildForm(),e.initialValue&&!e.initialValue.firstChange&&(this.patchInitialValues(),this.applyFieldDependencies()),e.loading&&(this.toggleFormState(),this.applyFieldDependencies())}ngOnDestroy(){this.formValueChangesSubscription?.unsubscribe(),this.destroy$.next(),this.destroy$.complete()}
1onApplyClick(){if(!this.loading){if(this.form.invalid)return this.form.markAllAsTouched(),void this.invalidSubmit.emit(this.form.errors);this.apply.emit(this.getFormValue())}}clearAndInvalidateField(e){if(!this.form)return;const n=this.form.get(e);if(!n)return;const l=this.resolvedFields.find(d=>d.key===e);l&&this.isRangeControl(l)?n.patchValue({start:null,end:null}):n.patchValue(null),this.form.markAllAsTouched()}getRequireAtLeastOneMessage(){return this.form?this.resolveRequireAtLeastOneMessage(this.form):""}onClearClick(){this.loading||(this.resetToDefaultValues(),this.clear.emit(),this.change.emit(this.getFormValue()))}close(){this.visible=!1,this.visibleChange.emit(this.visible)}onRemoveAppliedFilter(e){this.loading||e.disabled||this.removeAppliedFilter.emit(e)}trackByFieldKey(e,n){return n.key}getDrawerClass(){return this.config.drawerStyleClass??"p-sidebar-width-large"}getFormId(){return this.config.formId??"filter-shell-form"}getTitle(){return this.config.title??"Filtros"}getFieldClass(e){return`col-${e.colSpan??12}${e.className?` ${e.className}`:""}`}getFieldId(e){return`filter-${e.key}`}getRangeStartId(e){return`${this.getFieldId(e)}-start`}getRangeEndId(e){return`${this.getFieldId(e)}-end`}getAriaLabel(e){return e.ariaLabel??e.label}getTooltip(e){return e.tooltip??""}getOptions(e){const n=e.options??[];return this.optionsSourceByFieldKey[e.key]!==e.options&&(this.optionsSourceByFieldKey[e.key]=e.options,this.normalizedOptionsByFieldKey[e.key]=n.map(d=>this.normalizeOption(d))),this.normalizedOptionsByFieldKey[e.key]??[]}isFieldRequired(e){return(e.validators??[]).some(n=>"required"===n.type)}isFieldHidden(e){if(!e.hiddenWhen||!this.form)return!1;const n=this.form.get(e.hiddenWhen.field);return!!n&&e.hiddenWhen.predicate(n.value)}isFieldInvalid(e){if(!this.form||this.isRangeControl(e))return!1;const n=this.form.get(e.key);return!(!n||n.disabled||!n.dirty&&!n.touched)&&(n.invalid||this.isRequireAtLeastOneUnmet(e.key))}getFieldErrorMessage(e){if(!this.form)return"";const n=this.form.get(e.key);return n&&n.errors&&!n.errors.requireAtLeastOne?this.resolveCustomErrorMessage(n.errors,e.validators)||(n.errors.required?"Campo obrigat\xf3rio":n.errors.email?"Formato de e-mail inv\xe1lido":n.errors.minlength?`M\xednimo de ${n.errors.minlength.requiredLength} caracteres`:n.errors.maxlength?`M\xe1ximo de ${n.errors.maxlength.requiredLength} caracteres`:n.errors.min?`Valor m\xednimo ${n.errors.min.min}`:n.errors.max?`Valor m\xe1ximo ${n.errors.max.max}`:n.errors.pattern?"Formato inv\xe1lido":"Campo inv\xe1lido"):""}
1hasRangeError(e){if(!this.form||!this.isRangeControl(e))return!1;const n=this.form.get(e.key);return!(!n||n.disabled||!n.touched&&!n.dirty)&&(n.invalid||this.isRequireAtLeastOneUnmet(e.key))}getRangeErrorMessage(e){if(!this.form)return"";const n=this.form.get(e.key);if(!n)return"";if("string"==typeof n.errors?.rangeOrder)return n.errors.rangeOrder;if("string"==typeof n.errors?.rangeMaxSpan)return n.errors.rangeMaxSpan;if(n.errors?.requireAtLeastOne)return"";const l=n.get("start"),d=n.get("end"),p=this.getControlErrorMessage(l,e.startValidators??e.validators);return p||(this.getControlErrorMessage(d,e.endValidators??e.validators)||"")}isSliderRangeControl(e){return"numberRangeSlider"===e.controlType}onSliderRangeChange(e,n){if(!this.form||!Array.isArray(n)||2!==n.length)return;const l=this.form.get(e.key);if(!l)return;const d=Number(l.get("start")?.value),p=Number(l.get("end")?.value);d===n[0]&&p===n[1]||(this.sliderRangeModel[e.key]=[n[0],n[1]],l.patchValue({start:n[0],end:n[1]},{emitEvent:!0}))}buildForm(){const e=this.filterValidFields(this.config.fields??[]);this.resolvedFields=e,this.resetOptionsCache(e);const n={};e.forEach(d=>{n[d.key]=this.buildControl(d,this.initialValue?.[d.key])});const l={validators:this.buildRequireAtLeastOneValidator()};this.form=this.fb.group(n,l),this.patchInitialValues(),this.toggleFormState(),this.applyFieldDependencies(),this.syncSliderRangeModel(),this.setupFormValueChangesListener()}resetOptionsCache(e){const n={},l={};e.forEach(d=>{l[d.key]=d.options,n[d.key]=(d.options??[]).map(p=>this.normalizeOption(p))}),this.optionsSourceByFieldKey=l,this.normalizedOptionsByFieldKey=n}setupFormValueChangesListener(){this.formValueChangesSubscription?.unsubscribe(),this.formValueChangesSubscription=this.form.valueChanges.pipe((0,v.Q)(this.destroy$)).subscribe(()=>{this.syncSliderRangeModel(),this.applyFieldDependencies(),this.revalidateRequireAtLeastOneFields(),this.change.emit(this.getFormValue())})}applyFieldDependencies(){this.loading||this.resolvedFields.forEach(e=>{const n=e.disabledWhen;if(!n)return;const l=this.form.get(e.key),d=this.form.get(n.field);if(!l||!d)return;const p=n.predicate(d.value);if(p&&l.enabled){const c=this.isRangeControl(e)?{start:null,end:null}:null;l.reset(c,{emitEvent:!1}),l.disable({emitEvent:!1})}else!p&&l.disabled&&l.enable({emitEvent:!1})})}revalidateRequireAtLeastOneFields(){const e=this.config.requireAtLeastOne;e&&e.fields.forEach(n=>{const l=this.form.get(n);if(!l)return;const d=this.resolvedFields.find(p=>p.key===n);if(d&&this.isRangeControl(d)){const p=l;return p.get("start")?.updateValueAndValidity({emitEvent:!1}),void p.get("end")?.updateValueAndValidity({emitEvent:!1})}l.updateValueAndValidity({emitEvent:!1})})}buildControl(e,n){const l=this.mapValidators(e.validators),d=this.buildFieldRequireAtLeastOneValidator(e.key);switch(e.controlType){case"dateRange":case"numberRange":case"numberRangeSlider":{const p=this.resolveRangeValue(e.key,n),c=this.mapValidators(e.startValidators??e.validators),b=this.mapValidators(e.endValidators??e.validators);d&&(c.push(d),b.push(d));const Y=[this.buildRangeGroupValidator(e.rangeValidators),d].filter(re=>null!==re),le={validators:Y.length>0?Y:null};return this.fb.group({start:new i.MJ(p.start,c),end:new i.MJ(p.end,b)},le)}case"checkbox":return new i.MJ(!!n,l);case"multiSelect":return new i.MJ(Array.isArray(n)?n:[],l);default:{const p=d?[...l,d]:l;return new i.MJ(n??null,p)}}}patchInitialValues(){this.initialValue&&0!==this.resolvedFields.length?(this.resolvedFields.forEach(e=>{const n=this.form.get(e.key);if(!n)return;const l=this.initialValue?.[e.key];if(this.isRangeControl(e)){const d=n,p=this.resolveRangeValue(e.key,l);d.patchValue({start:p.start,end:p.end},{emitEvent:!1})}else n.patchValue(l,{emitEvent:!1})}),this.syncSliderRangeModel()):this.syncSliderRangeModel()}resetToDefaultValues(){const e={};this.resolvedFields.forEach(n=>{switch(n.controlType){case"multiSelect":e[n.key]=[];break;case"checkbox":e[n.key]=!1;break;case"dateRange":case"numberRange":case"numberRangeSlider":e[n.key]={start:null,end:null};break;default:e[n.key]=null}}),this.form.reset(e,{emitEvent:!1}),this.syncSliderRangeModel()}syncSliderRangeModel(){const e={};this.resolvedFields.forEach(n=>{if("numberRangeSlider"!==n.controlType)return;const l=n.min??0,d=n.max??0,p=this.form.get(n.key);if(!p)return void(e[n.key]=[l,d]);const c=Number(p.get("start")?.value??l),b=Number(p.get("end")?.value??d);
1e[n.key]=[c,b]}),this.sliderRangeModel=e}toggleFormState(){if(this.form){if(this.loading)return void this.form.disable({emitEvent:!1});this.form.enable({emitEvent:!1}),this.resolvedFields.forEach(e=>{e.disabled&&this.form.get(e.key)?.disable({emitEvent:!1})})}}filterValidFields(e){const n=new Set;return e.filter(l=>l.key&&/^[a-zA-Z][a-zA-Z0-9_]*$/.test(l.key)?n.has(l.key)?(console.error(`FilterShell: chave duplicada detectada: ${l.key}`),!1):(n.add(l.key),!0):(console.error(`FilterShell: chave de campo inv\xe1lida: ${l.key}`),!1))}getFormValue(){const e={};return this.resolvedFields.forEach(n=>{const l=this.form.get(n.key);if(l){if(this.isRangeControl(n)){const d=l.value;return void(e[n.key]={start:d?.start??null,end:d?.end??null})}e[n.key]=l.value}}),e}resolveRangeValue(e,n){if(n&&"object"==typeof n&&Object.prototype.hasOwnProperty.call(n,"start"))return{start:n.start??null,end:n.end??null};const l=this.initialValue??{};return{start:l[`${e}Start`]??l[`${e}Min`]??null,end:l[`${e}End`]??l[`${e}Max`]??null}}buildRequireAtLeastOneValidator(){const e=this.config.requireAtLeastOne;return e&&0!==e.fields.length?n=>e.fields.some(d=>this.hasFieldValue(n,d))?null:{requireAtLeastOne:this.resolveRequireAtLeastOneMessage(n)}:null}buildFieldRequireAtLeastOneValidator(e){const n=this.config.requireAtLeastOne;return n&&n.fields.includes(e)?l=>{const d=l.root;return n.fields.some(c=>this.hasFieldValue(d,c))?null:{requireAtLeastOne:this.resolveRequireAtLeastOneMessage(d)}}:null}resolveRequireAtLeastOneMessage(e){const n=this.config.requireAtLeastOne;if(!n)return"";if("string"==typeof n.message)return n.message;const l=n.fields.filter(d=>{const p=e.get(d);return!!p&&!p.disabled});return n.message(l)}hasFieldValue(e,n){const l=e.get(n);if(!l||l.disabled)return!1;const d=this.resolvedFields.find(c=>c.key===n);if(d&&this.isRangeControl(d)){const c=l.value;return null!=c?.start||null!=c?.end}const p=l.value;return null!=p&&""!==p}isRequireAtLeastOneUnmet(e){const n=this.config.requireAtLeastOne;return!(!n||!n.fields.includes(e)||!this.form.errors?.requireAtLeastOne)}buildRangeGroupValidator(e){return e&&0!==e.length?n=>this.evaluateRangeValidators(n,e):null}evaluateRangeValidators(e,n){const l=e.get("start")?.value,d=e.get("end")?.value;if(null==l||null==d)return null;for(const p of n){const c=this.evaluateRangeValidator(p,l,d);if(c)return c}return null}evaluateRangeValidator(e,n,l){return"order"===e.type?this.evaluateRangeOrder(e,n,l):"maxSpanDays"===e.type?this.evaluateRangeMaxSpan(e,n,l):null}evaluateRangeOrder(e,n,l){return n>l?{rangeOrder:e.message}:null}evaluateRangeMaxSpan(e,n,l){return null==e.value?null:Math.ceil(Math.abs(new Date(l).getTime()-new Date(n).getTime())/864e5)>e.value?{rangeMaxSpan:e.message}:null}mapValidators(e){return e&&0!==e.length?e.map(n=>{switch(n.type){case"required":return i.k0.required;case"email":return i.k0.email;case"min":return i.k0.min(Number(n.value));case"max":return i.k0.max(Number(n.value));case"minLength":return i.k0.minLength(Number(n.value));case"maxLength":return i.k0.maxLength(Number(n.value));case"pattern":return i.k0.pattern(n.value);default:return null}}).filter(n=>null!==n):[]}normalizeOption(e){return{label:e.label??e.text??String(e.id??e.value??""),value:e.value??e.id??e.text??null,disabled:e.disabled}}resolveCustomErrorMessage(e,n){if(!n||0===n.length)return"";const l=Object.keys(e);return n.find(p=>{switch(p.type){case"minLength":return l.includes("minlength");case"maxLength":return l.includes("maxlength");default:return l.includes(p.type)}})?.message??""}getControlErrorMessage(e,n){return e&&e.errors&&(e.touched||e.dirty)?this.resolveCustomErrorMessage(e.errors,n)||(e.errors.required?"Campo obrigat\xf3rio":e.errors.minlength?`M\xednimo de ${e.errors.minlength.requiredLength} caracteres`:e.errors.maxlength?`M\xe1ximo de ${e.errors.maxlength.requiredLength} caracteres`:e.errors.min?`Valor m\xednimo ${e.errors.min.min}`:e.errors.max?`Valor m\xe1ximo ${e.errors.max.max}`:e.errors.email?"Formato de e-mail inv\xe1lido":e.errors.pattern?"Formato inv\xe1lido":""):""}isRangeControl(e){return this.isRangeControlType(e.controlType)}isRangeControlType(e){return this.rangeControlTypes.has(e)}static \u0275fac=function(n){return new(n||s)(t.rXU(i.ok))};static \u0275cmp=t.VBU({type:s,selectors:[["cpn-filter-shell"]],inputs:{config:"config",initialValue:"initialValue",loading:"loading",visible:"visible",appliedFilters:"appliedFilters"},outputs:{visibleChange:"visibleChange",apply:"apply",clear:"clear",change:"change",removeAppliedFilter:"removeAppliedFilter",invalidSubmit:"invalidSubmit"},features:[t.OA$],decls:4,vars:4,consts:[["position","right",3,"visibleChange","visible","styleClass","showCloseIcon","baseZIndex"],["pTemplate","header"],["pTemplate","content"],["pTemplate","footer"],["pButton","","pRipple","","type","button","icon","pi pi-times",1,"p-ripple","p-element","p-sidebar-close","p-sidebar-icon","p-link","filter-shell-close-btn",3,"click"],["class","filter-shell-applied-filters",4,"ngIf"],["autocomplete","off",1,"filter-shell-form",3,"ngSubmit","id","formGroup"],[1,"formgrid","grid","inputs-outlined-rect"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"filter-shell-applied-filters"],[1,"filter-shell-applied-title"],[1,"filter-shell-applied-list"],["type","button","class","filter-shell-applied-chip",3,"disabled","click",4,"ngFor","ngForOf"],["type","button",1,"filter-shell-applied-chip",3,"click","disabled"],["aria-hidden","true",1,"pi","pi-times"],["class","field",3,"ngClass","pTooltip",4,"ngIf"],[1,"field",3,"ngClass","pTooltip"],["class","form-group-title",4,"ngIf"],[3,"ngSwitch"],["pInputText","",3,"id","type","formControlName","placeholder",4,"ngSwitchCase"],["pInputTextarea","","rows","3",3,"id","formControlName","placeholder",4,"ngSwitchCase"],[3,"inputId","formControlName","placeholder","inputStyle","ariaLabel",4,"ngSwitchCase"],["optionLabel","label","optionValue","value",3,"inputId","formControlName","options","appendTo","overlayOptions","placeholder",4,"ngSwitchCase"],["optionLabel","label","optionValue","value","emptyFilterMessage","Nenhum resultado encontrado","emptyMessage","Nenhum resultado encontrado","selectedItemsLabel","{0} itens selecionados",3,"inputId","formControlName","options","appendTo","overlayOptions","placeholder","showClear","showToggleAll",4,"ngSwitchCase"],[3,"inputId","formControlName","appendTo","dateFormat","placeholder",4,"ngSwitchCase"],["class","range-inputs",3,"formGroupName",4,"ngSwitchCase"],[3,"formGroupName",4,"ngSwitchCase"],["class","filter-shell-checkbox-row",4,"ngSwitchCase"],["class","filter-shell-error",4,"ngIf"],["class","filter-shell-helper",4,"ngIf"],[1,"form-group-title"],["aria-hidden","true",4,"ngIf"],["class","filter-shell-label-helper",4,"ngIf"],["aria-hidden","true"],[1,"filter-shell-label-helper"],["aria-hidden","true",1,"pi","pi-info-circle"],["pInputText","",3,"id","type","formControlName","placeholder"],["pInputTextarea","","rows","3",3,"id","formControlName","placeholder"],[3,"inputId","formControlName","placeholder","inputStyle","ariaLabel"],["o
1ptionLabel","label","optionValue","value",3,"inputId","formControlName","options","appendTo","overlayOptions","placeholder"],["optionLabel","label","optionValue","value","emptyFilterMessage","Nenhum resultado encontrado","emptyMessage","Nenhum resultado encontrado","selectedItemsLabel","{0} itens selecionados",3,"inputId","formControlName","options","appendTo","overlayOptions","placeholder","showClear","showToggleAll"],[3,"inputId","formControlName","appendTo","dateFormat","placeholder"],[1,"range-inputs",3,"formGroupName"],["formControlName","start",3,"inputId","appendTo","dateFormat","placeholder"],["formControlName","end",3,"inputId","appendTo","dateFormat","placeholder"],["formControlName","start",3,"inputId","placeholder","inputStyle","ariaLabel"],["formControlName","end",3,"inputId","placeholder","inputStyle","ariaLabel"],[3,"formGroupName"],[1,"range-inputs"],["formControlName","start",3,"inputId","placeholder","inputStyle","min","max","locale","ariaLabel"],["formControlName","end",3,"inputId","placeholder","inputStyle","min","max","locale","ariaLabel"],[1,"slider-range-section"],[1,"flex","justify-content-between","flex-wrap"],[1,"flex","align-items-center","justify-content-center","text-sm"],[1,"mt-2","mx-2"],[3,"ngModelChange","range","min","max","ngModel","ngModelOptions"],[1,"filter-shell-error"],[1,"filter-shell-checkbox-row"],[3,"inputId","formControlName","binary","ariaLabel"],[1,"filter-shell-helper"],[1,"grid"],[1,"col-6"],["pButton","","type","button","title","Remover Filtro(s)",1,"btn-sotreq-secondary","filterButton",3,"click","disabled"],["pButton","","type","submit","title","Aplicar Filtro(s)",1,"btn-sotreq-primary","filterButton",3,"disabled"]],template:function(n,l){1&n&&(t.j41(0,"p-sidebar",0),t.mxI("visibleChange",function(p){return t.DH7(l.visible,p)||(l.visible=p),p}),t.bIt("visibleChange",function(p){return l.visibleChange.emit(p)}),t.DNE(1,$,3,2,"ng-template",1)(2,ne,4,5,"ng-template",2)(3,ie,7,3,"ng-template",3),t.k0s()),2&n&&(t.R50("visible",l.visible),t.Y8G("styleClass",l.getDrawerClass())("showCloseIcon",!1)("baseZIndex",l.sidebarBaseZIndex))},dependencies:[y.YU,y.Sq,y.bT,y.ux,y.e1,i.qT,i.me,i.BC,i.cb,i.vS,i.j4,i.JD,i.$R,E.B,R.Ei,I._f,O.S,k.Z,T.YI,D.ms,G.KF,S.Vv,x.Sc,L.Ap,w.m],styles:["[_nghost-%COMP%]{display:block}.filterButton[_ngcontent-%COMP%]{width:90%;justify-content:center}.filter-shell-form[_ngcontent-%COMP%]{min-height:100%}.filter-shell-applied-filters[_ngcontent-%COMP%]{margin-bottom:1rem;padding-top:.2rem;padding-bottom:.65rem;border-bottom:1px solid #6e7881}.filter-shell-applied-title[_ngcontent-%COMP%]{display:inline-block;margin-bottom:.45rem;color:#5c6970}.filter-shell-applied-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem}.filter-shell-applied-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem;border:1px solid #6e7881;border-radius:5px;background:#fff;color:#5c6970;padding:.2rem .35rem;font-size:12px;line-height:1.1;cursor:pointer}.filter-shell-applied-chip[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:10px;color:#5c6970}.filter-shell-applied-chip[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.6}.range-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}.slider-range-section[_ngcontent-%COMP%]{margin-top:.65rem}.filter-shell-error[_ngcontent-%COMP%]{display:block;margin-top:.35rem;font-size:.75rem;color:#b3261e}.filter-shell-helper[_ngcontent-%COMP%]{display:block;margin-top:.35rem;font-size:.6rem;color:#000}.filter-shell-label-helper[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.35rem;margin-left:.65rem;font-size:.7rem;font-weight:400;color:#5c6970}.filter-shell-label-helper[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.72rem}.filter-shell-checkbox-row[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem}.filter-shell-checkbox-row[_ngcontent-%COMP%] .form-group-title[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%] p-sidebar .p-sidebar-width-large{max-width:600px!important;width:100%;padding:.5rem}[_nghost-%COMP%] p-sidebar .p-sidebar-content{overflow:hidden}[_nghost-%COMP%] p-sidebar .p-sidebar .p-sidebar-header{justify-content:space-between}[_nghost-%COMP%] p-sidebar .p-sidebar .p-sidebar-header .filter-shell-close-btn{margin-left:auto;width:2rem;height:2rem;min-width:2rem;border-radius:999px;display:inline-flex;align-items:center;justify-content:center}[_nghost-%COMP%] p-sidebar .p-sidebar .p-sidebar-header .filter-shell-close-btn .pi{font-size:.95rem;line-height:1}[_nghost-%COMP%] .inputs-outlined-rect .p-inputtext, [_nghost-%COMP%] .inputs-outlined-rect .p-dropdown, [_nghost-%COMP%] .inputs-outlined-rect .p-multiselect, [_nghost-%COMP%] .inputs-outlined-rect .p-inputnumber, [_nghost-%COMP%] .inputs-outlined-rect .p-calendar{width:100%}[_nghost-%COMP%] .inputs-outlined-rect .field>input.p-inputtext{padding-left:.5rem}[_nghost-%COMP%] .inputs-outlined-rect .p-dropdown .p-dropdown-label{background-color:transparent!important;color:#404040!important;border:none!important;box-shadow:none!important}[_nghost-%COMP%] .p-dropdown-panel .p-dropdown-items .p-dropdown-item{color:gray;padding:.5rem}[_nghost-%COMP%] .inputs-outlined-rect .p-multiselect .p-multiselect-label{padding-left:.5rem!important}[_nghost-%COMP%] .inputs-outlined-rect .p-multiselect .p-multiselect-clear-icon{top:50%!important;transform:translateY(-50%)}[_nghost-%COMP%] .inputs-outlined-rect .p-inputnumber .p-inputnumber-input{padding-left:.5rem}[_nghost-%COMP%] .inputs-outlined-rect .range-inputs .p-calendar .p-inputtext{padding-left:.5rem}[_nghost-%COMP%] .inputs-outlined-rect .parts-budget-multiple-input .p-inputtextarea{min-height:6.2rem} .p-multiselect-panel .p-multiselect-header .p-inputtext.p-component.p-multiselect-filter{padding-left:.75rem!important}[_nghost-%COMP%] .p-inputtext:disabled{opacity:.5;cursor:not-allowed;border-color:#bfbfbf!important}"]})}return s})()},9266:(H,M,g)=>{g.d(M,{Ap:()=>F,SW:()=>N});var t=g(177),i=g(4438),V=g(9417),v=g(1455),y=g(1880);const E=["sliderHandle"],R=["sliderHandleStart"],I=["sliderHandleEnd"],O=(h,_,a,o)=>
1({"p-slider p-component":!0,"p-disabled":h,"p-slider-horizontal":_,"p-slider-vertical":a,"p-slider-animate":o}),k=(h,_)=>({left:h,width:_}),T=(h,_)=>({bottom:h,height:_}),D=h=>({height:h}),G=h=>({width:h}),S=(h,_)=>({left:h,bottom:_}),x=h=>({"p-slider-handle-active":h});function L(h,_){if(1&h&&i.nrm(0,"span",8),2&h){const a=i.XpG();i.Y8G("ngStyle",i.l_i(2,k,null!=a.offset?a.offset+"%":a.handleValues[0]+"%",a.diff?a.diff+"%":a.handleValues[1]-a.handleValues[0]+"%")),i.BMQ("data-pc-section","range")}}function w(h,_){if(1&h&&i.nrm(0,"span",8),2&h){const a=i.XpG();i.Y8G("ngStyle",i.l_i(2,T,null!=a.offset?a.offset+"%":a.handleValues[0]+"%",a.diff?a.diff+"%":a.handleValues[1]-a.handleValues[0]+"%")),i.BMQ("data-pc-section","range")}}function C(h,_){if(1&h&&i.nrm(0,"span",8),2&h){const a=i.XpG();i.Y8G("ngStyle",i.eq3(2,D,a.handleValue+"%")),i.BMQ("data-pc-section","range")}}function B(h,_){if(1&h&&i.nrm(0,"span",8),2&h){const a=i.XpG();i.Y8G("ngStyle",i.eq3(2,G,a.handleValue+"%")),i.BMQ("data-pc-section","range")}}function A(h,_){if(1&h){const a=i.RV6();i.j41(0,"span",9,0),i.bIt("touchstart",function(r){i.eBV(a);const u=i.XpG();return i.Njj(u.onDragStart(r))})("touchmove",function(r){i.eBV(a);const u=i.XpG();return i.Njj(u.onDrag(r))})("touchend",function(r){i.eBV(a);const u=i.XpG();return i.Njj(u.onDragEnd(r))})("mousedown",function(r){i.eBV(a);const u=i.XpG();return i.Njj(u.onMouseDown(r))})("keydown",function(r){i.eBV(a);const u=i.XpG();return i.Njj(u.onKeyDown(r))}),i.k0s()}if(2&h){const a=i.XpG();i.xc7("transition",a.dragging?"none":null),i.Y8G("ngStyle",i.l_i(12,S,"horizontal"==a.orientation?a.handleValue+"%":null,"vertical"==a.orientation?a.handleValue+"%":null))("autofocus",a.autofocus),i.BMQ("tabindex",a.disabled?null:a.tabindex)("aria-valuemin",a.min)("aria-valuenow",a.value)("aria-valuemax",a.max)("aria-labelledby",a.ariaLabelledBy)("aria-label",a.ariaLabel)("aria-orientation",a.orientation)("data-pc-section","handle")}}function $(h,_){if(1&h){const a=i.RV6();i.j41(0,"span",10,1),i.bIt("keydown",function(r){i.eBV(a);const u=i.XpG();return i.Njj(u.onKeyDown(r,0))})("mousedown",function(r){i.eBV(a);const u=i.XpG();return i.Njj(u.onMouseDown(r,0))})("touchstart",function(r){i.eBV(a);const u=i.XpG();return i.Njj(u.onDragStart(r,0))})("touchmove",function(r){i.eBV(a);const u=i.XpG();return i.Njj(u.onDrag(r,0))})("touchend",function(r){i.eBV(a);const u=i.XpG();return i.Njj(u.onDragEnd(r))}),i.k0s()}if(2&h){const a=i.XpG();i.xc7("transition",a.dragging?"none":null),i.Y8G("ngStyle",i.l_i(13,S,a.rangeStartLeft,a.rangeStartBottom))("ngClass",i.eq3(16,x,0==a.handleIndex))("autofocus",a.autofocus),i.BMQ("tabindex",a.disabled?null:a.tabindex)("aria-valuemin",a.min)("aria-valuenow",a.value?a.value[0]:null)("aria-valuemax",a.max)("aria-labelledby",a.ariaLabelledBy)("aria-label",a.ariaLabel)("aria-orientation",a.orientation)("data-pc-section","startHandler")}}function j(h,_){if(1&h){const a=i.RV6();i.j41(0,"span",11,2),i.bIt("keydown",function(r){i.eBV(a);const u=i.XpG();return i.Njj(u.onKeyDown(r,1))})("mousedown",function(r){i.eBV(a);const u=i.XpG();return i.Njj(u.onMouseDown(r,1))})("touchstart",function(r){i.eBV(a);const u=i.XpG();return i.Njj(u.onDragStart(r,1))})("touchmove",function(r){i.eBV(a);const u=i.XpG();return i.Njj(u.onDrag(r,1))})("touchend",function(r){i.eBV(a);const u=i.XpG();return i.Njj(u.onDragEnd(r))}),i.k0s()}if(2&h){const a=i.XpG();i.xc7("transition",a.dragging?"none":null),i.Y8G("ngStyle",i.l_i(12,S,a.rangeEndLeft,a.rangeEndBottom))("ngClass",i.eq3(15,x,1==a.handleIndex)),i.BMQ("tabindex",a.disabled?null:a.tabindex)("aria-valuemin",a.min)("aria-valuenow",a.value?a.value[1]:null)("aria-valuemax",a.max)("aria-labelledby",a.ariaLabelledBy)("aria-label",a.ariaLabel)("aria-orientation",a.orientation)("data-pc-section","endHandler")}}const P={provide:V.kq,useExisting:(0,i.Rfq)(()=>F),multi:!0};let F=(()=>{class h{document;platformId;el;renderer;ngZone;cd;animate;disabled;min=0;max=100;orientation="horizontal";step;range;style;styleClass;ariaLabel;ariaLabelledBy;tabindex=0;autofocus;onChange=new i.bkB;onSlideEnd=new i.bkB;sliderHandle;sliderHandleStart;sliderHandleEnd;value;values;handleValue;handleValues=[];diff;offset;bottom;onModelChange=()=>{};onModelTouched=()=>{};dragging;dragListener;mouseupListener;initX;initY;barWidth;barHeight;sliderHandleClick;handleIndex=0;startHandleValue;startx;starty;constructor(a,o,r,u,f,X){this.document=a,this.platformId=o,this.el=r,this.renderer=u,this.ngZone=f,this.cd=X}onMouseDown(a,o){this.disabled||(this.dragging=!0,this.updateDomData(),this.sliderHandleClick=!0,this.handleIndex=this.range&&this.handleValues&&this.handleValues[0]===this.max?0:o,this.bindDragListeners(),a.target.focu
1s(),a.preventDefault(),this.animate&&v.D.removeClass(this.el.nativeElement.children[0],"p-slider-animate"))}onDragStart(a,o){if(!this.disabled){var r=a.changedTouches[0];this.startHandleValue=this.range?this.handleValues[o]:this.handleValue,this.dragging=!0,this.handleIndex=this.range&&this.handleValues&&this.handleValues[0]===this.max?0:o,"horizontal"===this.orientation?(this.startx=parseInt(r.clientX,10),this.barWidth=this.el.nativeElement.children[0].offsetWidth):(this.starty=parseInt(r.clientY,10),this.barHeight=this.el.nativeElement.children[0].offsetHeight),this.animate&&v.D.removeClass(this.el.nativeElement.children[0],"p-slider-animate"),a.preventDefault()}}onDrag(a){if(!this.disabled){var r,o=a.changedTouches[0];r="horizontal"===this.orientation?Math.floor(100*(parseInt(o.clientX,10)-this.startx)/this.barWidth)+this.startHandleValue:Math.floor(100*(this.starty-parseInt(o.clientY,10))/this.barHeight)+this.startHandleValue,this.setValueFromHandle(a,r),a.preventDefault()}}onDragEnd(a){this.disabled||(this.dragging=!1,this.onSlideEnd.emit(this.range?{originalEvent:a,values:this.values}:{originalEvent:a,value:this.value}),this.animate&&v.D.addClass(this.el.nativeElement.children[0],"p-slider-animate"))}onBarClick(a){this.disabled||(this.sliderHandleClick||(this.updateDomData(),this.handleChange(a),this.onSlideEnd.emit(this.range?{originalEvent:a,values:this.values}:{originalEvent:a,value:this.value})),this.sliderHandleClick=!1)}onKeyDown(a,o){switch(this.handleIndex=o,a.code){case"ArrowDown":case"ArrowLeft":this.decrementValue(a,o),a.preventDefault();break;case"ArrowUp":case"ArrowRight":this.incrementValue(a,o),a.preventDefault();break;case"PageDown":this.decrementValue(a,o,!0),a.preventDefault();break;case"PageUp":this.incrementValue(a,o,!0),a.preventDefault();break;case"Home":this.updateValue(this.min,a),a.preventDefault();break;case"End":this.updateValue(this.max,a),a.preventDefault();break;case"Tab":this.onDragEnd(a)}}decrementValue(a,o,r=!1){let u;u=this.range?this.step?this.values[o]-this.step:this.values[o]-1:this.step?this.value-this.step:!this.step&&r?this.value-10:this.value-1,this.updateValue(u,a),a.preventDefault()}incrementValue(a,o,r=!1){let u;u=this.range?this.step?this.values[o]+this.step:this.values[o]+1:this.step?this.value+this.step:!this.step&&r?this.value+10:this.value+1,this.updateValue(u,a),a.preventDefault()}handleChange(a){let o=this.calculateHandleValue(a);this.setValueFromHandle(a,o)}bindDragListeners(){(0,t.UE)(this.platformId)&&this.ngZone.runOutsideAngular(()=>{const a=this.el?this.el.nativeElement.ownerDocument:this.document;this.dragListener||(this.dragListener=this.renderer.listen(a,"mousemove",o=>{this.dragging&&this.ngZone.run(()=>{this.handleChange(o)})})),this.mouseupListener||(this.mouseupListener=this.renderer.listen(a,"mouseup",o=>{this.dragging&&(this.dragging=!1,this.ngZone.run(()=>{this.onSlideEnd.emit(this.range?{originalEvent:o,values:this.values}:{originalEvent:o,value:this.value}),this.animate&&v.D.addClass(this.el.nativeElement.children[0],"p-slider-animate")}))}))})}unbindDragListeners(){this.dragListener&&(this.dragListener(),this.dragListener=null),this.mouseupListener&&(this.mouseupListener(),this.mouseupListener=null)}setValueFromHandle(a,o){let r=this.getValueFromHandle(o);
1this.range?this.step?this.handleStepChange(r,this.values[this.handleIndex]):(this.handleValues[this.handleIndex]=o,this.updateValue(r,a)):this.step?this.handleStepChange(r,this.value):(this.handleValue=o,this.updateValue(r,a)),this.cd.markForCheck()}handleStepChange(a,o){let r=a-o,u=o,f=this.step;r<0?u=o+Math.ceil(a/f-o/f)*f:r>0&&(u=o+Math.floor(a/f-o/f)*f),this.updateValue(u),this.updateHandleValue()}writeValue(a){this.range?this.values=a||[0,0]:this.value=a||0,this.updateHandleValue(),this.updateDiffAndOffset(),this.cd.markForCheck()}registerOnChange(a){this.onModelChange=a}registerOnTouched(a){this.onModelTouched=a}setDisabledState(a){this.disabled=a,this.cd.markForCheck()}get rangeStartLeft(){return this.isVertical()?null:this.handleValues[0]>100?"100%":this.handleValues[0]+"%"}get rangeStartBottom(){return this.isVertical()?this.handleValues[0]+"%":"auto"}get rangeEndLeft(){return this.isVertical()?null:this.handleValues[1]+"%"}get rangeEndBottom(){return this.isVertical()?this.handleValues[1]+"%":"auto"}isVertical(){return"vertical"===this.orientation}updateDomData(){let a=this.el.nativeElement.children[0].getBoundingClientRect();this.initX=a.left+v.D.getWindowScrollLeft(),this.initY=a.top+v.D.getWindowScrollTop(),this.barWidth=this.el.nativeElement.children[0].offsetWidth,this.barHeight=this.el.nativeElement.children[0].offsetHeight}calculateHandleValue(a){return"horizontal"===this.orientation?100*(a.pageX-this.initX)/this.barWidth:100*(this.initY+this.barHeight-a.pageY)/this.barHeight}updateHandleValue(){this.range?(this.handleValues[0]=100*(this.values[0]<this.min?0:this.values[0]-this.min)/(this.max-this.min),this.handleValues[1]=100*(this.values[1]>this.max?100:this.values[1]-this.min)/(this.max-this.min)):this.handleValue=this.value<this.min?0:this.value>this.max?100:100*(this.value-this.min)/(this.max-this.min),this.step&&this.updateDiffAndOffset()}updateDiffAndOffset(){this.diff=this.getDiff(),this.offset=this.getOffset()}getDiff(){return Math.abs(this.handleValues[0]-this.handleValues[1])}getOffset(){return Math.min(this.handleValues[0],this.handleValues[1])}updateValue(a,o){if(this.range){let r=a;0==this.handleIndex?(r<this.min?(r=this.min,this.handleValues[0]=0):r>this.values[1]&&r>this.max&&(r=this.max,this.handleValues[0]=100),this.sliderHandleStart?.nativeElement.focus()):(r>this.max?(r=this.max,this.handleValues[1]=100,this.offset=this.handleValues[1]):r<this.min?(r=this.min,this.handleValues[1]=0):r<this.values[0]&&(this.offset=this.handleValues[1]),this.sliderHandleEnd?.nativeElement.focus()),this.step?this.updateHandleValue():this.updateDiffAndOffset(),this.values[this.handleIndex]=this.getNormalizedValue(r),this.onModelChange([this.minVal,this.maxVal]),this.onChange.emit({event:o,values:this.values})}else a<this.min?(a=this.min,this.handleValue=0):a>this.max&&(a=this.max,this.handleValue=100),this.value=this.getNormalizedValue(a),this.onModelChange(this.value),this.onChange.emit({event:o,value:this.value}),this.sliderHandle?.nativeElement.focus();this.updateHandleValue()}getValueFromHandle(a){return a/100*(this.max-this.min)+this.min}getDecimalsCount(a){return a&&Math.floor(a)!==a&&a.toString().split(".")[1].length||0}getNormalizedValue(a){let o=this.getDecimalsCount(this.step);return o>0?+parseFloat(a.toString()).toFixed(o):Math.floor(a)}ngOnDestroy(){this.unbindDragListeners()}get minVal(){return Math.min(this.values[1],this.values[0])}get maxVal(){return Math.max(this.values[1],this.values[0])}static \u0275fac=function(o){return new(o||h)(i.rXU(t.qQ),i.rXU(i.Agw),i.rXU(i.aKT),i.rXU(i.sFG),i.rXU(i.SKi),i.rXU(i.gRc))};static \u0275cmp=i.VBU({type:h,selectors:[["p-slider"]],viewQuery:function(o,r){if(1&o&&(i.GBs(E,5),i.GBs(R,5),i.GBs(I,5)),2&o){let u;i.mGM(u=i.lsd())&&(r.sliderHandle=u.first),i.mGM(u=i.lsd())&&(r.sliderHandleStart=u.first),i.mGM(u=i.lsd())&&(r.sliderHandleEnd=u.first)}},hostAttrs:[1,"p-element"],inputs:{animate:[i.Mj6.HasDecoratorInputTransform,"animate","animate",i.L39],disabled:[i.Mj6.HasDecoratorInputTransform,"disabled","disabled",i.L39],min:[i.Mj6.HasDecoratorInputTransform,"min","min",i.Udg],max:[i.Mj6.HasDecoratorInputTransform,"max","max",i.Udg],orientation:"orientation",step:[i.Mj6.HasDecoratorInputTransform,"step","step",i.Udg],range:[i.Mj6.HasDecoratorInputTransform,"range","range",i.L39],style:"style",styleClass:"styleClass",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",tabindex:[i.Mj6.HasDecoratorInputTransform,"tabindex","tabindex",i.Udg],autofocus:[i.Mj6.HasDecoratorInputTransform,"autofocus","autofocus",i.L39]},outputs:{onChange:"onChange",onSlideEnd:"onSlideEnd"},features:[i.Jv_([P]),i.GFd],decls:8,vars:18,consts:[["sliderHandle",""],["sliderHandleStart",""],["sliderHandleEnd",""],[3,"click","ngStyle","ngClass"],["class","p-slider-range",3,"ngStyle",4,"ngIf"],["class","p-slider-handle","role","slider","pAutoFocus","",3,"transition","ngStyle","autofocus","touchstart","touchmove","touchend","mousedown","keydown",4,"ngIf"],["class","p-slider-handle","role","slider","pAutoFocus","",3,"transition","ngStyle","ngClass","autofocus","keydown","mousedown","touchstart","touchmove","touchend",4,"ngIf"],["class","p-slider-handle","role","slider",3,"transition","ngStyle","ngClass","keydown","mousedown","touchstart","touchmove","touchend",4,"ngIf"],[1,"p-slider-range",3,"ngStyle"],["role","slider","pAutoFocus","",1,"p-slider-handle",3,"touchstart","touchmove","touchend","mousedown","keydown","ngStyle","autofocus"],["role","slider","pAutoFocus","",1,"p-slider-handle",3,"keydown","mousedown","touchstart","touchmove","touchend","ngStyle","ngClass","autofocus"],["role","slider",1,"p-slider-handle",3,"keydown","mousedown","touchstart","touchmove","touchend","ngStyle","ngClass"]],template:function(o,r){1&o&&(i.j41(0,"div",3),i.bIt("click",function(f){return r.onBarClick(f)}),i.DNE(1,L,1,5,"span",4)(2,w,1,5,"span",4)(3,C,1,4,"span",4)(4,B,1,4,"span",4)(5,A,2,15,"span",5)(6,$,2,18,"span",6)(7,j,2,17,"span",7),i.k0s()),2&o&&(i.HbH(r.styleClass),i.Y8G("ngStyle",r.style)("ngClass",i.ziG(13,O,r.disabled,"horizontal"==r.orientation,"vertical"==r.orientation,r.animate)),i.BMQ("data-pc-name","slider")("data-pc-section","root"),i.R7$(),i.Y8G("ngIf",r.range&&"horizontal"==r.orientation),i.R7$(),i.Y8G("ngIf",r.range&&"vertical"==r.orientation),i.R7$(),i.Y8G("ngIf",!r.range&&"vertical"==r.orientation),i.R7$(),i.Y8G("ngIf",!r.range&&"horizontal"==r.orientation),i.R7$(),i.Y8G("ngIf",!r.range),i.R7$(),i.Y8G("ngIf",r.range),i.R7$(),i.Y8G("ngIf",r.range))},dependencies:[t.YU,t.bT,t.B3,y.q],styles:["@layer primeng{.p-slider{position:relative}.p-slider .p-slider-handle{position:absolute;cursor:grab;touch-action:none;display:block}.p-slider-range{position:absolute;display:block}.p-slider-horizontal .p-slider-range{top:0;left:0;height:100%}.p-slider-horizontal .p-slider-handle{top:50%}.p-slider-vertical{height:100px}.p-slider-vertical .p-slider-handle{left:50%}.p-slider-vertical .p-slider-range{bottom:0;left:0;width:100%}}\n"],encapsulation:2,changeDetection:0})}return h})(),N=(()=>{class h{static \u0275fac=function(o){return new(o||h)};static \u0275mod=i.$C({type:h});static \u0275inj=i.G2t({imports:[t.MD,y.u]})}return h})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.