1import{a as ee,b as de}from"./chunk-B6AITZQJ.js";import{a as ie,b as me}from"./chunk-KUNHRLC4.js";import"./chunk-KWEBECPL.js";import{a as Q,b as fe}from"./chunk-JDKT6JTM.js";import{a as K,b as ce}from"./chunk-OLJSXGS4.js";import"./chunk-LGT5LD5V.js";import"./chunk-RMKGVQWA.js";import"./chunk-SUCGRBRC.js";import"./chunk-ZO4IH2QB.js";import"./chunk-FPWW7MI4.js";import"./chunk-L2MCTHKM.js";import"./chunk-IPVKXYCL.js";import"./chunk-5HR5JVTM.js";import"./chunk-QMSTDAIN.js";import"./chunk-DBTMM27E.js";import"./chunk-DJFZVWOY.js";import"./chunk-DEBWDWXL.js";import"./chunk-HDQH4JQZ.js";import"./chunk-D6R35AUP.js";import"./chunk-QCHMIJOK.js";import"./chunk-ZEQQPOPI.js";import"./chunk-HYCYFZRA.js";import"./chunk-S6FNSG2B.js";import"./chunk-LO5G4E2N.js";import"./chunk-EL2KCZF4.js";import"./chunk-PAYXMP4F.js";import"./chunk-NHEKNCRD.js";import"./chunk-6UCCLOH7.js";import"./chunk-GQIUTPRT.js";import"./chunk-WP7EDVBL.js";import"./chunk-SHKQJMA3.js";import"./chunk-GXYI3HTT.js";import"./chunk-A7AOT6O2.js";import"./chunk-6JGV6J2Q.js";import"./chunk-VL2YACEO.js";import"./chunk-SLC3EWKD.js";import"./chunk-23RLZPU5.js";import"./chunk-XS4PDHDH.js";import"./chunk-TO2BHCJB.js";import"./chunk-HX4UHESS.js";import"./chunk-EZ2LFIIP.js";import"./chunk-6TKUOPIF.js";import"./chunk-3FT4RHQ4.js";import"./chunk-KUL4NNUN.js";import"./chunk-J7JIBOVZ.js";import"./chunk-XSLC6WFY.js";import"./chunk-SEZCQ2P7.js";import"./chunk-LP75U3KI.js";import{c as Y,d as J,e as pe}from"./chunk-VAFKFYPX.js";import"./chunk-BSG3FEKY.js";import"./chunk-2NOTWZJJ.js";import"./chunk-JJGG5MCZ.js";import{i as j,j as ae}from"./chunk-W7XCRJO5.js";import"./chunk-BGLKCJ2U.js";import"./chunk-HNO4PSXC.js";import{C as X,D as W,e as p,f as R,g as k,h as z,i as r,k as Z,o as M,s as $}from"./chunk-LEU4X4J6.js";import"./chunk-WWF6WCLV.js";import"./chunk-LR4C2AR5.js";import"./chunk-VJUVTJOX.js";import"./chunk-I2HE5ZRP.js";import"./chunk-LKVBLA3Z.js";import{a as D,b as le,c as g,d as re}from"./chunk-6HRHW75L.js";import"./chunk-XICV2U4I.js";import{D as B,m as q,w as H}from"./chunk-4ATU7KJI.js";import{C as A,Ca as ne,Lb as u,Nb as I,Nc as U,P as y,S as _,Sb as s,Sc as F,Tb as d,Tc as b,Ub as c,Vb as f,W as oe,ac as V,db as n,ec as L,gc as m,k as C,ka as v,la as O,pb as N,q as w,qd as se,r as T,ub as E,vc as P,yb as G}from"./chunk-3C63H7YH.js";import{f as x}from"./chunk-26GNMCNR.js";var S,ue,ve,te=x(()=>{S=(function(i){return i[i.Up=1]="Up",i[i.Down=2]="Down",i[i.Level=3]="Level",i[i.X=4]="X",i[i.Z=5]="Z",i})(S||{}),ue=[{Name:"Up",DisplayName:"Up",Value:1,SortOrder:10},{Name:"Down",DisplayName:"Down",Value:2,SortOrder:20},{Name:"Level",DisplayName:"Level",Value:3,SortOrder:30},{Name:"X",DisplayName:"X",Value:4,SortOrder:40},{Name:"Z",DisplayName:"Z",Value:5,SortOrder:50}],ve=ue.map(i=>({Value:i.Value,Label:i.DisplayName,SortOrder:i.SortOrder}))});function he(i,h){if(i&1&&(d(0,"div",10),f(1,"form-field",12)(2,"form-field",13)(3,"form-field",14)(4,"form-field",15),c()),i&2){let e=m(3);n(),s("formControl",e.form.controls.ExistingAccessTypeID)("type",e.FormFieldType.Select)("formInputOptions",e.accessTypeOptions),n(),s("formControl",e.form.controls.IpesExtentOfGradingRequiredID)("type",e.FormFieldType.Select)("formInputOptions",e.extentOfGradingOptions),n(),s("formControl",e.form.controls.IpesExcavationForParkingID)("type",e.FormFieldType.Select)("formInputOptions",e.excavationForParkingOptions),n(),s("formControl",e.form.controls.FeetOfExcavactionGreaterThanThreeFeet)("type",e.FormFieldType.Number)}}function ye(i,h){if(i&1&&(d(0,"div",10),f(1,"form-field",16)(2,"form-field",17)(3,"form-field",18),c()),i&2){let e=m(3);n(),s("formControl",e.form.controls.IpesDegreeOfExcavationDifficultyID)("type",e.FormFieldType.Select)("formInputOptions",e.degreeOfExcavationOptions),n(),s("formControl",e.form.controls.IpesHeightOfCutSlopeID)("type",e.FormFieldType.Select)("formInputOptions",e.heightOfCutSlopeOptions),n(),s("formControl",e.form.controls.IpesGradientAboveCutSlopeFactorID)("type",e.FormFieldType.Select)("formInputOptions",e.gradientAboveCutSlopeOptions)}}function De(i,h){if(i&1&&(d(0,"div",10),f(1,"form-field",19)(2,"form-field",20)(3,"form-field",21),c()),i&2){let e=m(3);n(),s("formControl",e.form.controls.InStreamzone)("type",e.FormFieldType.Radio)("formInputOptions",e.yesNoOptions),n(),s("formControl",e.form.controls.IpesHeightOfFillSlopeID)("type",e.FormFieldType.Select)("formInputOptions",e.heightOfFillSlopeOptions),n(),s("formControl",e.form.controls.IpesGradientBelowFillSlopeFactorID)("type",e.FormFieldType.Select)("formInputOptions",e.gradientBelowFillSlopeOptions)}}function ge(i,h){if(i&1){let e=V();f(0,"page-header",0),d(1,"form",1)(2,"div",2)(3,"div",3),f(4,"form-field",4),c(),d(5,"div",3),f(6,"form-field",5),c()(),f(7,"hr"),d(8,"h5",6),f(9,"field-definition",7),c(),d(10,"p",8)(11,"em"),P(12,"Choose the option that best explains the Parcel access and answer the associated questions."),c()(),f(13,"form-field",9),u(14,he,5,11,"div",10),u(15,ye,4,9,"div",10),u(16,De,4,9,"div",10),c(),d(17,"ipes-score-workflow-footer",11),L("save",function(){v(e);let o=m(2);return O(o.onSave(!1))})("saveAndContinue",function(){v(e);let o=m(2);return O(o.onSave(!0))}),c()}if(i&2){let e=m(2);n(),s("formGroup",e.form),n(3),s("formControl",e.form.controls.IpesUtilityDisturbanceInSEZPointID)("type",e.FormFieldType.Select)("formInputOptions",e.utilityDisturbanceOptions),n(2),s("formControl",e.form.controls.IpesAccessDisturbanceInSEZPointID)("type",e.FormFieldType.Select)("formInputOptions",e.accessDisturbanceOptions),n(3),s("useBodyContainer",!0),n(4),s("formControl",e.accessTypeControl)("type",e.FormFieldType.Radio)("formInputOptions",e.accessTypeRadioOptions),n(),I(e.accessType==="existing"?14:-1),n(),I(e.accessType==="upsloping"?15:-1),n(),I(e.accessType==="downsloping"?16:-1),n(),s("parcelNumber",e.parcelNumber)("isSaving",h.saving??!1)}}function Se(i,h){if(i&1&&(u(0,ge,18,16),F(1,"async")),i&2){let e,l=m();I((e=U(3,Ie,b(1,1,l.isSaving$)))?0:-1,e)}}var Ie,Re,Ce=x(()=>{B();W();oe();ne();de();me();ce();pe();ae();te();re();le();se();fe();W();B();Ie=i=>({saving:i});Re=(()=>{class i extends ee{constructor(e){super(),this.ipesScoreService=e,this.nextStep="score-summary",this.FormFieldType=J,this.utilityDisturbanceOptions=[],this.accessDisturbanceOptions=[],this.accessTypeOptions=[],this.extentOfGradingOptions=[],this.excavationForParkingOptions=[],this.heightOfCutSlopeOptions=[],this.degreeOfExcavationOptions=[],this.gradientAboveCutSlopeOptions=[],this.heightOfFillSlopeOptions=[],this.gradientBelowFillSlopeOptions=[],this.yesNoOptions=[{Value:!0,Label:"Yes",disabled:!1},{Value:!1,Label:"No",disabled:!1}],this.AccessTypeUp=S.Up,this.AccessTypeDown=S.Down,this.accessType=null,this.accessTypeControl=new r(null),this.accessTypeRadioOptions=[{Value:"existing",Label:"Parcel has Existing Access",disabled:!1},{Value:"upsloping",Label:"Parcel is Upsloping without Existing Access",disabled:!1},{Value:"downsloping",Label:"Parcel is Downsloping without Existing Access",disabled:!1}],this.existingControls=["ExistingAccessTypeID","IpesExtentOfGradingRequiredID","IpesExcavationForParkingID","FeetOfExcavactionGreaterThanThreeFeet"],this.upslopingControls=["IpesHeightOfCutSlopeID","IpesDegreeOfExcavationDifficultyID","IpesGradientAboveCutSlopeFactorID"],this.downslopingControls=["InStreamzone","IpesHeightOfFillSlopeID","IpesGradientBelowFillSlopeFactorID"],this.form=new z({IpesUtilityDisturbanceInSEZPointID:new r(null,[p.required]),IpesAccessDisturbanceInSEZPointID:new r(null,[p.required]),IsNewAccess:new r(!1),NewAccessTypeID:new r(null),ExistingAccessTypeID:new r({value:null,disabled:!0},[p.required]),IpesExtentOfGradingRequiredID:new r({value:null,disabled:!0},[p.required]),IpesExcavationForParkingID:new r({value:null,disabled:!0},[p.required]),FeetOfExcavactionGreaterThanThreeFeet:new r({value:null,disabled:!0},[p.min(0)]),IpesHeightOfCutSlopeID:new r({value:null,disabled:!0},[p.required]),IpesDegreeOfExcavationDifficultyID:new r({value:null,disabled:!0},[p.required]),IpesGradientAboveCutSlopeFactorID:new r({value:null,disabled:!0},[p.required]),InStreamzone:new r({value:null,disabled:!0},[p.required]),IpesHeightOfFillSlopeID:new r({value:null,disabled:!0},[p.required]),IpesGradientBelowFillSlopeFactorID:new r({value:null,disabled:!0},[p.required])})}ngOnInit(){this.trackFormDirty(this.form),this.accessTypeControl.valueChanges.subscribe(o=>{o&&this.selectAccessType(o)});let e=this.ipesScoreService.getWorkflowLookupsIpesScore().pipe(y({bufferSize:1,refCount:!0})),l=this._ipesScoreID$.pipe(_(o=>o==null||Number.isNaN(o)?C(null):this.ipesScoreService.getAccessUtilitiesStepIpesScore(o).pipe(A(()=>(this.alertService.pushAlert(new g("Failed to load access & utilities data.",D.Danger,!0)),C(null))))),y({bufferSize:1,refCount:!0}));this.vm$=T([e,l]).pipe(w(([o,a])=>(this.utilityDisturbanceOptions=o.IpesUtilityDisturbanceInSEZPoints?.map(t=>({Value:t.ID,Label:t.DisplayName,disabled:!1}))??[],this.accessDisturbanceOptions=o.IpesAccessDisturbanceInSEZPoints?.map(t=>({Value:t.ID,Label:t.DisplayName,disabled:!1}))??[],this.accessTypeOptions=o.IpesAccessTypes?.map(t=>({Value:t.ID,Label:t.DisplayName,disabled:!1}))??[],this.extentOfGradingOptions=o.IpesExtentOfGradingRequireds?.map(t=>({Value:t.ID,Label:t.DisplayName,disabled:!1}))??[],this.excavationForParkingOptions=o.IpesExcavationForParkings?.map(t=>({Value:t.ID,Label:t.DisplayName,disabled:!1}))??[],this.heightOfCutSlopeOptions=o.IpesHeightOfCutSlopes?.map(t=>({Value:t.ID,Label:t.DisplayName,disabled:!1}))??[],this.degreeOfExcavationOptions=o.IpesDegreeOfExcavationDifficulties?.map(t=>({Value:t.ID,Label:t.DisplayName,disabled:!1}))??[],this.gradientAboveCutSlopeOptions=o.IpesGradientAboveCutSlopeFactors?.map(t=>({Value:t.ID,Label:t.DisplayName,disabled:!1}))??[],this.heightOfFillSlopeOptions=o.IpesHeightOfFillSlopes?.map(t=>({Value:t.ID,Label:t.DisplayName,disabled:!1}))??[],this.gradientBelowFillSlopeOptions=o.IpesGradientBelowFillSlopeFactors?.map(t=>({Value:t.ID,Label:t.DisplayName,disabled:!1}))??[],a&&(this.form.patchValue(a),!a.IsNewAccess&&a.ExistingAccessTypeID?this.accessType="existing":a.IsNewAccess&&a.NewAccessTypeID===this.AccessTypeUp?this.accessType="upsloping":a.IsNewAccess&&a.NewAccessTypeID===this.AccessTypeDown&&(this.accessType="downsloping"),this.accessTypeControl.setValue(this.accessType,{emitEvent:!1}),this.updateControlStates()),this.form.markAsPristine(),{loaded:!0})),y({bufferSize:1,refCount:!0}))}selectAccessType(e){this.accessType=e,e==="existing"?this.form.patchValue({IsNewAccess:!1,NewAccessTypeID:null,IpesHeightOfCutSlopeID:null,IpesDegreeOfExcavationDifficultyID:null,IpesGradientAboveCutSlopeFactorID:null,InStreamzone:null,IpesHeightOfFillSlopeID:null,IpesGradientBelowFillSlopeFactorID:null}):e==="upsloping"?this.form.patchValue({IsNewAccess:!0,NewAccessTypeID:this.AccessTypeUp,ExistingAccessTypeID:null,IpesExtentOfGradingRequiredID:null,IpesExcavationForParkingID:null,FeetOfExcavactionGreaterThanThreeFeet:null,InStreamzone:null,IpesHeightOfFillSlopeID:null,IpesGradientBelowFillSlopeFactorID:null}):this.form.patchValue({IsNewAccess:!0,NewAccessTypeID:this.AccessTypeDown,ExistingAccessTypeID:null,IpesExtentOfGradingRequiredID:null,IpesExcavationForParkingID:null,FeetOfExcavactionGreaterThanThreeFeet:null,IpesHeightOfCutSlopeID:null,IpesDegreeOfExcavationDifficultyID:null,IpesGradientAboveCutSlopeFactorID:null}),this.updateControlStates()}updateControlStates(){let e=o=>
1o.forEach(a=>this.form.get(a)?.enable()),l=o=>o.forEach(a=>this.form.get(a)?.disable());l(this.existingControls),l(this.upslopingControls),l(this.downslopingControls),this.accessType==="existing"&&e(this.existingControls),this.accessType==="upsloping"&&e(this.upslopingControls),this.accessType==="downsloping"&&e(this.downslopingControls)}onSave(e){if(!this.accessType){this.alertService.pushAlert(new g("Select the Parcel Access type (Existing, Upsloping, or Downsloping).",D.Danger,!0));return}if(this.form.markAllAsTouched(),this.form.invalid){this.alertService.pushAlert(new g("Please fill in all required fields.",D.Danger,!0));return}this.saveStep(l=>this.ipesScoreService.saveAccessUtilitiesStepIpesScore(l,this.form.getRawValue()),"Access & utilities saved successfully.","Failed to save access & utilities.",e)}static{this.\u0275fac=function(l){return new(l||i)(N(Q))}}static{this.\u0275cmp=E({type:i,selectors:[["ipes-access-utilities-step"]],features:[G],decls:2,vars:3,consts:[["pageTitle","Access & Utilities"],[3,"formGroup"],[1,"grid-12"],[1,"g-col-6"],["fieldLabel","Utility Disturbance","fieldDefinitionName","UtilityDisturbance",3,"formControl","type","formInputOptions"],["fieldLabel","Access Disturbance","fieldDefinitionName","AccessDisturbance",3,"formControl","type","formInputOptions"],[1,"mt-3","required","access-type-heading"],["fieldDefinition","ParcelAccessType","labelOverride","Parcel Access Type",3,"useBodyContainer"],[1,"text-muted"],[3,"formControl","type","formInputOptions"],[1,"access-type-fields"],[3,"save","saveAndContinue","parcelNumber","isSaving"],["fieldLabel","Existing Access Type","fieldDefinitionName","ParcelAccessType",3,"formControl","type","formInputOptions"],["fieldLabel","Extent of Grading Required","fieldDefinitionName","ExtentOfGradingRequired",3,"formControl","type","formInputOptions"],["fieldLabel","Excavation for Parking","fieldDefinitionName","ExcavationForParking",3,"formControl","type","formInputOptions"],["fieldLabel","Feet of Excavation > 3 ft","fieldDefinitionName","FeetOfExcavationGreaterThanThreeFeet",3,"formControl","type"],["fieldLabel","Degree of Difficulty for Excavation","fieldDefinitionName","DegreeOfDifficultyForExcavation",3,"formControl","type","formInputOptions"],["fieldLabel","Height of Cut Slope","fieldDefinitionName","HeightOfCutSlope",3,"formControl","type","formInputOptions"],["fieldLabel","Gradient Above Cut Slope","fieldDefinitionName","GradientAboveCutSlope",3,"formControl","type","formInputOptions"],["fieldLabel","New Access in Streamzone","fieldDefinitionName","NewAccessInStreamzone",3,"formControl","type","formInputOptions"],["fieldLabel","Height of Fill Slope","fieldDefinitionName","HeightOfFillSlope",3,"formControl","type","formInputOptions"],["fieldLabel","Gradient Below Fill Slope","fieldDefinitionName","GradientBelowFillSlope",3,"formControl","type","formInputOptions"]],template:function(l,o){if(l&1&&(u(0,Se,2,5),F(1,"async")),l&2){let a;I((a=b(1,1,o.vm$))?0:-1,a)}},dependencies:[H,X,Z,R,k,M,$,K,ie,Y,j,q],styles:[".access-type-heading[_ngcontent-%COMP%]{display:flex;align-items:center}.access-type-fields[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--spacing-200, .5rem)}"]})}}return i})()});Ce();export{Re as IpesAccessUtilitiesStepComponent};
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.