@remoteoss/remote-flows 0.18.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-ANXYPRBG.js → chunk-2I5DIIJP.js} +2 -2
- package/dist/{chunk-7VUILYZ3.js → chunk-2QGDCMCE.js} +2 -2
- package/dist/chunk-32GSS4UM.js +2 -0
- package/dist/{chunk-NBCZF2FO.js.map → chunk-32GSS4UM.js.map} +1 -1
- package/dist/{chunk-E5YN6OT3.js → chunk-3PCSFTM3.js} +2 -2
- package/dist/{chunk-JB55FFG6.js → chunk-4C6O4QTI.js} +2 -2
- package/dist/{chunk-A522V6XF.js → chunk-4KA5AP7X.js} +2 -2
- package/dist/chunk-54KJP7WD.js +2 -0
- package/dist/chunk-54KJP7WD.js.map +1 -0
- package/dist/{chunk-63HVO7J5.js → chunk-5CGII7CZ.js} +2 -2
- package/dist/{chunk-H4KE45NG.js → chunk-5T25IMZ3.js} +2 -2
- package/dist/{chunk-U4NWXPI5.js → chunk-5TUFZVWO.js} +2 -2
- package/dist/{chunk-U4NWXPI5.js.map → chunk-5TUFZVWO.js.map} +1 -1
- package/dist/chunk-663AKXTN.js +2 -0
- package/dist/chunk-663AKXTN.js.map +1 -0
- package/dist/{chunk-QQ7KPOLK.js → chunk-6O6CNAMF.js} +2 -2
- package/dist/chunk-6TSSHWBM.js +2 -0
- package/dist/chunk-6TSSHWBM.js.map +1 -0
- package/dist/{chunk-4R3ITKOA.js → chunk-756MHC7A.js} +2 -2
- package/dist/{chunk-RZTT3MEP.js → chunk-76VMCRDE.js} +2 -2
- package/dist/{chunk-TXSJL3HC.js → chunk-7IHBNPZK.js} +2 -2
- package/dist/{chunk-QW4JPW6J.js → chunk-7XRPOR7L.js} +1 -1
- package/dist/chunk-7XRPOR7L.js.map +1 -0
- package/dist/{chunk-6NKUEDYP.js → chunk-A42AGGNH.js} +2 -2
- package/dist/{chunk-N5I33LIN.js → chunk-A76UTPRW.js} +2 -2
- package/dist/{chunk-DCRLPAJL.js → chunk-A7ZEA2WU.js} +2 -2
- package/dist/{chunk-UHS3QRA3.js → chunk-ASKKS4Z3.js} +2 -2
- package/dist/{chunk-TLC5WQY2.js → chunk-ATC4YO7K.js} +2 -2
- package/dist/chunk-AVSWJUYN.js +2 -0
- package/dist/chunk-AVSWJUYN.js.map +1 -0
- package/dist/{chunk-DBDVBJDV.js → chunk-B3WXLC2R.js} +2 -2
- package/dist/chunk-BITHG5X4.js +2 -0
- package/dist/chunk-BITHG5X4.js.map +1 -0
- package/dist/{chunk-2RZABLV2.js → chunk-BP2JYRI7.js} +2 -2
- package/dist/chunk-CKVQ4PIK.js +2 -0
- package/dist/chunk-CKVQ4PIK.js.map +1 -0
- package/dist/{chunk-A6EYY3FO.js → chunk-CVDZ35YA.js} +2 -2
- package/dist/{chunk-4RULC3AZ.js → chunk-CWEPL5J3.js} +2 -2
- package/dist/chunk-E5PSJ75C.js +2 -0
- package/dist/chunk-E5PSJ75C.js.map +1 -0
- package/dist/{chunk-CEUBVUKV.js → chunk-EGVWFZBR.js} +2 -2
- package/dist/chunk-FB2QGVI2.js +2 -0
- package/dist/chunk-FB2QGVI2.js.map +1 -0
- package/dist/{chunk-MLB2I27G.js → chunk-FCRW2EG3.js} +2 -2
- package/dist/chunk-FHHAGWU5.js +2 -0
- package/dist/chunk-FHHAGWU5.js.map +1 -0
- package/dist/chunk-FZ7FWFJX.js +1 -0
- package/dist/chunk-GC23RRCI.js +2 -0
- package/dist/chunk-GC23RRCI.js.map +1 -0
- package/dist/{chunk-ZSDJZMQW.js → chunk-GGXKORRZ.js} +2 -2
- package/dist/{chunk-ZSDJZMQW.js.map → chunk-GGXKORRZ.js.map} +1 -1
- package/dist/{chunk-HQI6W7PR.js → chunk-GNZJOPIS.js} +2 -2
- package/dist/{chunk-CYKK3LPJ.js → chunk-GS5NA664.js} +2 -2
- package/dist/{chunk-LBUNJ5J3.js → chunk-HRA6BY3O.js} +2 -2
- package/dist/chunk-JB6XA3P6.js +2 -0
- package/dist/chunk-JB6XA3P6.js.map +1 -0
- package/dist/chunk-JBUNDNKJ.js +2 -0
- package/dist/chunk-JBUNDNKJ.js.map +1 -0
- package/dist/{chunk-ITSQE6EW.js → chunk-JWZIWG4T.js} +2 -2
- package/dist/{chunk-7C2Z2EE5.js → chunk-K4VWUMNO.js} +2 -2
- package/dist/chunk-KN4F5TMS.js +2 -0
- package/dist/chunk-KN4F5TMS.js.map +1 -0
- package/dist/{chunk-73H6SO2E.js → chunk-LCIBPBLY.js} +2 -2
- package/dist/{chunk-CRXPRR3R.js → chunk-M4EVWRWB.js} +2 -2
- package/dist/{chunk-7JQPHRUK.js → chunk-MCAK5KPI.js} +2 -2
- package/dist/chunk-MDQ6YJMV.js +2 -0
- package/dist/chunk-MDQ6YJMV.js.map +1 -0
- package/dist/{chunk-QXPWESEW.js → chunk-MGOT272R.js} +2 -2
- package/dist/{chunk-NVMZDPMF.js → chunk-MORMQBAF.js} +2 -2
- package/dist/chunk-N6G4VZXF.js +2 -0
- package/dist/chunk-N6G4VZXF.js.map +1 -0
- package/dist/chunk-NO2TRS5O.js +2 -0
- package/dist/chunk-NO2TRS5O.js.map +1 -0
- package/dist/chunk-OIBVTGB4.js +2 -0
- package/dist/chunk-OIBVTGB4.js.map +1 -0
- package/dist/{chunk-OZ63OC3N.js → chunk-OJNWWRD5.js} +2 -2
- package/dist/chunk-OZCQ6AOF.js +2 -0
- package/dist/chunk-OZCQ6AOF.js.map +1 -0
- package/dist/{chunk-I2A4EFDY.js → chunk-PLWXRCGQ.js} +2 -2
- package/dist/{chunk-XJVYASHX.js → chunk-QFZ3XVDT.js} +2 -2
- package/dist/{chunk-BFOGH4SF.js → chunk-QGGKDM3N.js} +2 -2
- package/dist/{chunk-MRMVBBVZ.js → chunk-QIN5BLVI.js} +2 -2
- package/dist/{chunk-GP237GUO.js → chunk-R2VVXLL7.js} +2 -2
- package/dist/{chunk-PHN4XMPV.js → chunk-R4LFNFC2.js} +2 -2
- package/dist/{chunk-ALYKEN3E.js → chunk-RJZ426NO.js} +2 -2
- package/dist/{chunk-4B36XRKA.js → chunk-RNNZ5ZKE.js} +2 -2
- package/dist/{chunk-BF2D5O5H.js → chunk-RUMP764Z.js} +2 -2
- package/dist/{chunk-XGEKV3FC.js → chunk-SERAGBDA.js} +2 -2
- package/dist/{chunk-3BREUYLG.js → chunk-U23SN7CM.js} +2 -2
- package/dist/{chunk-53NFLDRX.js → chunk-UBLE2J7V.js} +2 -2
- package/dist/chunk-UH3E6HSQ.js +2 -0
- package/dist/{chunk-7P5B6XHM.js → chunk-UQYM3PBZ.js} +2 -2
- package/dist/{chunk-56DXHJNR.js → chunk-V2PBVCRH.js} +2 -2
- package/dist/{chunk-A4KEKMEQ.js → chunk-X4GAGLFN.js} +2 -2
- package/dist/{chunk-2VS6B3PC.js → chunk-XGMQPLVG.js} +2 -2
- package/dist/{chunk-BI6U55BD.js → chunk-XVW2URFK.js} +2 -2
- package/dist/{chunk-NCA3UCCX.js → chunk-Y7QVIBFX.js} +2 -2
- package/dist/{chunk-ZTDKPUB5.js → chunk-ZJ3JHILJ.js} +2 -2
- package/dist/{chunk-GGBEM452.js → chunk-ZTVYWMBY.js} +2 -2
- package/dist/chunk-ZX5OIIJX.js +1 -0
- package/dist/chunk-ZX5OIIJX.js.map +1 -0
- package/dist/flows/ContractAmendment/ContractAmendmentBack.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +5 -2
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentSubmit.js +1 -1
- package/dist/flows/ContractAmendment/context.d.ts +5 -5
- package/dist/flows/ContractAmendment/hooks.d.ts +7 -4
- package/dist/flows/ContractAmendment/hooks.js +1 -1
- package/dist/flows/ContractAmendment/index.d.ts +5 -2
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractAmendment/utils.d.ts +1 -1
- package/dist/flows/CostCalculator/CostCalculatorDisclaimer.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +25 -3
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +17 -2
- package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorResetButton.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorSubmitButton.js +1 -1
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +1 -1
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorExtraStatutoryPaymentsBreakdown.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorGrossSalary.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorIndirectTax.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResultsChart.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorTotalCost.js +1 -1
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +1 -1
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.js +1 -1
- package/dist/flows/CostCalculator/api.d.ts +17 -2
- package/dist/flows/CostCalculator/api.js +1 -1
- package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
- package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
- package/dist/flows/CostCalculator/context.d.ts +20 -7
- package/dist/flows/CostCalculator/hooks.d.ts +24 -4
- package/dist/flows/CostCalculator/hooks.js +1 -1
- package/dist/flows/CostCalculator/index.d.ts +7 -6
- package/dist/flows/CostCalculator/index.js +1 -1
- package/dist/flows/CostCalculator/types.d.ts +1 -1
- package/dist/flows/CostCalculator/utils.d.ts +4 -3
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.d.ts +6 -6
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/api.d.ts +2 -2
- package/dist/flows/Onboarding/api.js +1 -1
- package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
- package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
- package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +7 -2
- package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/Onboarding/components/BenefitsStep.d.ts +3 -3
- package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
- package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +7 -2
- package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingBack.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingForm.d.ts +2 -2
- package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +6 -2
- package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingSubmit.js +1 -1
- package/dist/flows/Onboarding/components/ReviewStep.d.ts +1 -1
- package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +6 -1
- package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +7 -2
- package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/Onboarding/context.d.ts +4 -4
- package/dist/flows/Onboarding/hooks.d.ts +4 -4
- package/dist/flows/Onboarding/hooks.js +1 -1
- package/dist/flows/Onboarding/index.d.ts +7 -7
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Onboarding/types.d.ts +2 -9
- package/dist/flows/Onboarding/utils.d.ts +3 -10
- package/dist/flows/Onboarding/utils.js +1 -1
- package/dist/flows/Termination/AdditionalDetailsForm.d.ts +1 -1
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.d.ts +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.d.ts +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationBack.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.d.ts +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationDialogInfoContent/TerminationDialogInfoContent.d.ts +5 -0
- package/dist/flows/Termination/TerminationDialogInfoContent/TerminationDialogInfoContent.js +2 -0
- package/dist/flows/Termination/TerminationDialogInfoContent/TerminationDialogInfoContent.js.map +1 -0
- package/dist/flows/Termination/TerminationFlow.d.ts +7 -4
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.d.ts +1 -1
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/TerminationReasonsDetailContent/TerminationReasonsDetailContent.d.ts +5 -0
- package/dist/flows/Termination/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js +2 -0
- package/dist/flows/Termination/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js.map +1 -0
- package/dist/flows/Termination/TerminationSubmit.js +1 -1
- package/dist/flows/Termination/TimeOff.d.ts +1 -1
- package/dist/flows/Termination/TimeOff.js +1 -1
- package/dist/flows/Termination/context.d.ts +3 -3
- package/dist/flows/Termination/hooks.d.ts +9 -5
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.d.ts +8 -3
- package/dist/flows/Termination/index.js +1 -1
- package/dist/flows/Termination/json-schemas/employeeComunication.d.ts +1 -0
- package/dist/flows/Termination/json-schemas/employeeComunication.js +1 -1
- package/dist/flows/Termination/json-schemas/jsonSchema.d.ts +17 -1
- package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
- package/dist/flows/Termination/json-schemas/schema.js +1 -1
- package/dist/flows/Termination/json-schemas/terminationDetails.d.ts +16 -0
- package/dist/flows/Termination/json-schemas/terminationDetails.js +1 -1
- package/dist/flows/Termination/types.d.ts +1 -1
- package/dist/flows/api.d.ts +23 -0
- package/dist/flows/api.js +2 -0
- package/dist/flows/api.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +14 -10
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internals.js +1 -1
- package/dist/internals.js.map +1 -1
- package/dist/{mutations-B6HWH-rZ.d.ts → mutations-BHTJydCx.d.ts} +2 -0
- package/dist/{remoteFlows-BdsVZGGF.d.ts → remoteFlows-bfHFRZSe.d.ts} +9 -2
- package/dist/{types.gen-nWJIP4db.d.ts → types.gen-BWjuA7VH.d.ts} +43 -5
- package/package.json +2 -2
- package/dist/chunk-3LOVCTCN.js +0 -2
- package/dist/chunk-3LOVCTCN.js.map +0 -1
- package/dist/chunk-3O2RD3RK.js +0 -2
- package/dist/chunk-3O2RD3RK.js.map +0 -1
- package/dist/chunk-6GMGXSKN.js +0 -2
- package/dist/chunk-6ZPISRAG.js +0 -2
- package/dist/chunk-6ZPISRAG.js.map +0 -1
- package/dist/chunk-EGQJ7UBR.js +0 -2
- package/dist/chunk-EGQJ7UBR.js.map +0 -1
- package/dist/chunk-F66G33YT.js +0 -2
- package/dist/chunk-F66G33YT.js.map +0 -1
- package/dist/chunk-FTW6Z4IF.js +0 -2
- package/dist/chunk-FTW6Z4IF.js.map +0 -1
- package/dist/chunk-JODJFARP.js +0 -2
- package/dist/chunk-JODJFARP.js.map +0 -1
- package/dist/chunk-JUJZENG7.js +0 -2
- package/dist/chunk-JUJZENG7.js.map +0 -1
- package/dist/chunk-M22FKNEY.js +0 -1
- package/dist/chunk-NBCZF2FO.js +0 -2
- package/dist/chunk-QW4JPW6J.js.map +0 -1
- package/dist/chunk-R2UI3WAJ.js +0 -2
- package/dist/chunk-R2UI3WAJ.js.map +0 -1
- package/dist/chunk-UWIFE5LJ.js +0 -2
- package/dist/chunk-UWIFE5LJ.js.map +0 -1
- package/dist/chunk-V2YORDAL.js +0 -2
- package/dist/chunk-V2YORDAL.js.map +0 -1
- package/dist/chunk-VX2UC3HG.js +0 -2
- package/dist/chunk-VX2UC3HG.js.map +0 -1
- package/dist/chunk-WWANHPT7.js +0 -2
- package/dist/chunk-WWANHPT7.js.map +0 -1
- package/dist/chunk-ZOKSYPOP.js +0 -2
- package/dist/chunk-ZOKSYPOP.js.map +0 -1
- /package/dist/{chunk-ANXYPRBG.js.map → chunk-2I5DIIJP.js.map} +0 -0
- /package/dist/{chunk-7VUILYZ3.js.map → chunk-2QGDCMCE.js.map} +0 -0
- /package/dist/{chunk-E5YN6OT3.js.map → chunk-3PCSFTM3.js.map} +0 -0
- /package/dist/{chunk-JB55FFG6.js.map → chunk-4C6O4QTI.js.map} +0 -0
- /package/dist/{chunk-A522V6XF.js.map → chunk-4KA5AP7X.js.map} +0 -0
- /package/dist/{chunk-63HVO7J5.js.map → chunk-5CGII7CZ.js.map} +0 -0
- /package/dist/{chunk-H4KE45NG.js.map → chunk-5T25IMZ3.js.map} +0 -0
- /package/dist/{chunk-QQ7KPOLK.js.map → chunk-6O6CNAMF.js.map} +0 -0
- /package/dist/{chunk-4R3ITKOA.js.map → chunk-756MHC7A.js.map} +0 -0
- /package/dist/{chunk-RZTT3MEP.js.map → chunk-76VMCRDE.js.map} +0 -0
- /package/dist/{chunk-TXSJL3HC.js.map → chunk-7IHBNPZK.js.map} +0 -0
- /package/dist/{chunk-6NKUEDYP.js.map → chunk-A42AGGNH.js.map} +0 -0
- /package/dist/{chunk-N5I33LIN.js.map → chunk-A76UTPRW.js.map} +0 -0
- /package/dist/{chunk-DCRLPAJL.js.map → chunk-A7ZEA2WU.js.map} +0 -0
- /package/dist/{chunk-UHS3QRA3.js.map → chunk-ASKKS4Z3.js.map} +0 -0
- /package/dist/{chunk-TLC5WQY2.js.map → chunk-ATC4YO7K.js.map} +0 -0
- /package/dist/{chunk-DBDVBJDV.js.map → chunk-B3WXLC2R.js.map} +0 -0
- /package/dist/{chunk-2RZABLV2.js.map → chunk-BP2JYRI7.js.map} +0 -0
- /package/dist/{chunk-A6EYY3FO.js.map → chunk-CVDZ35YA.js.map} +0 -0
- /package/dist/{chunk-4RULC3AZ.js.map → chunk-CWEPL5J3.js.map} +0 -0
- /package/dist/{chunk-CEUBVUKV.js.map → chunk-EGVWFZBR.js.map} +0 -0
- /package/dist/{chunk-MLB2I27G.js.map → chunk-FCRW2EG3.js.map} +0 -0
- /package/dist/{chunk-M22FKNEY.js.map → chunk-FZ7FWFJX.js.map} +0 -0
- /package/dist/{chunk-HQI6W7PR.js.map → chunk-GNZJOPIS.js.map} +0 -0
- /package/dist/{chunk-CYKK3LPJ.js.map → chunk-GS5NA664.js.map} +0 -0
- /package/dist/{chunk-LBUNJ5J3.js.map → chunk-HRA6BY3O.js.map} +0 -0
- /package/dist/{chunk-ITSQE6EW.js.map → chunk-JWZIWG4T.js.map} +0 -0
- /package/dist/{chunk-7C2Z2EE5.js.map → chunk-K4VWUMNO.js.map} +0 -0
- /package/dist/{chunk-73H6SO2E.js.map → chunk-LCIBPBLY.js.map} +0 -0
- /package/dist/{chunk-CRXPRR3R.js.map → chunk-M4EVWRWB.js.map} +0 -0
- /package/dist/{chunk-7JQPHRUK.js.map → chunk-MCAK5KPI.js.map} +0 -0
- /package/dist/{chunk-QXPWESEW.js.map → chunk-MGOT272R.js.map} +0 -0
- /package/dist/{chunk-NVMZDPMF.js.map → chunk-MORMQBAF.js.map} +0 -0
- /package/dist/{chunk-OZ63OC3N.js.map → chunk-OJNWWRD5.js.map} +0 -0
- /package/dist/{chunk-I2A4EFDY.js.map → chunk-PLWXRCGQ.js.map} +0 -0
- /package/dist/{chunk-XJVYASHX.js.map → chunk-QFZ3XVDT.js.map} +0 -0
- /package/dist/{chunk-BFOGH4SF.js.map → chunk-QGGKDM3N.js.map} +0 -0
- /package/dist/{chunk-MRMVBBVZ.js.map → chunk-QIN5BLVI.js.map} +0 -0
- /package/dist/{chunk-GP237GUO.js.map → chunk-R2VVXLL7.js.map} +0 -0
- /package/dist/{chunk-PHN4XMPV.js.map → chunk-R4LFNFC2.js.map} +0 -0
- /package/dist/{chunk-ALYKEN3E.js.map → chunk-RJZ426NO.js.map} +0 -0
- /package/dist/{chunk-4B36XRKA.js.map → chunk-RNNZ5ZKE.js.map} +0 -0
- /package/dist/{chunk-BF2D5O5H.js.map → chunk-RUMP764Z.js.map} +0 -0
- /package/dist/{chunk-XGEKV3FC.js.map → chunk-SERAGBDA.js.map} +0 -0
- /package/dist/{chunk-3BREUYLG.js.map → chunk-U23SN7CM.js.map} +0 -0
- /package/dist/{chunk-53NFLDRX.js.map → chunk-UBLE2J7V.js.map} +0 -0
- /package/dist/{chunk-6GMGXSKN.js.map → chunk-UH3E6HSQ.js.map} +0 -0
- /package/dist/{chunk-7P5B6XHM.js.map → chunk-UQYM3PBZ.js.map} +0 -0
- /package/dist/{chunk-56DXHJNR.js.map → chunk-V2PBVCRH.js.map} +0 -0
- /package/dist/{chunk-A4KEKMEQ.js.map → chunk-X4GAGLFN.js.map} +0 -0
- /package/dist/{chunk-2VS6B3PC.js.map → chunk-XGMQPLVG.js.map} +0 -0
- /package/dist/{chunk-BI6U55BD.js.map → chunk-XVW2URFK.js.map} +0 -0
- /package/dist/{chunk-NCA3UCCX.js.map → chunk-Y7QVIBFX.js.map} +0 -0
- /package/dist/{chunk-ZTDKPUB5.js.map → chunk-ZJ3JHILJ.js.map} +0 -0
- /package/dist/{chunk-GGBEM452.js.map → chunk-ZTVYWMBY.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as S}from"./chunk-E5PSJ75C.js";import{a as F}from"./chunk-S4XU4SE7.js";import{a as _}from"./chunk-32GSS4UM.js";import{a as y}from"./chunk-7XRPOR7L.js";import{a as u}from"./chunk-A76UTPRW.js";import{a as g,b as V}from"./chunk-MDQ6YJMV.js";import{a as T}from"./chunk-PJBAQZ6G.js";import{a as c}from"./chunk-Z5WMKCRJ.js";import{c as m}from"./chunk-PAQW5BFW.js";import{a as r}from"./chunk-54KJP7WD.js";import{a as e}from"./chunk-P37U34EQ.js";import{createHeadlessForm as B}from"@remoteoss/json-schema-form";import H from"lodash.omitby";import L from"lodash.isnull";import A from"lodash.omit";import{useMemo as O}from"react";import{jsx as h,jsxs as z}from"react/jsx-runtime";function f(n,o,d){return{presentation:{inputType:"hidden",Component:e(()=>z("div",{className:r("RemoteFlows__InformationStatement",d?.className),children:[h("h3",{className:r("RemoteFlows__InformationStatement__Title"),children:n}),h("p",{className:r("RemoteFlows__InformationStatement__Description"),children:o})]}),"Component")}}}e(f,"createInformationField");import{Fragment as Z,jsx as K,jsxs as U}from"react/jsx-runtime";function q(n){return{confidential:"",customer_informed_employee:"",customer_informed_employee_date:"",customer_informed_employee_description:"",personal_email:"",termination_reason:void 0,reason_description:"",termination_reason_files:[],will_challenge_termination:"",will_challenge_termination_description:null,agrees_to_pto_amount:"",agrees_to_pto_amount_notes:null,acknowledge_termination_procedure:!1,additional_comments:"",proposed_termination_date:"",risk_assessment_reasons:[],timesheet_file:void 0,...n}}e(q,"buildInitialValues");var Te=e(({employmentId:n,options:o})=>{let{fieldValues:d,setFieldValues:P,stepState:i,previousStep:k,nextStep:w}=T(F),M={...i.values?.[i.currentStep.name],...d},N=O(()=>({fields:{risk_assesment_info:f("Offboarding risk assessment","Employees may be protected from termination if they fall into certain categories. To help avoid claims from employees, let us know if the employee is part of one or more of these categories. Select all that apply.",{className:o?.jsfModify?.fields?.risk_assesment_info?.["x-jsf-presentation"]?.className}),proposed_termination_date_info:f("Proposed termination date",U(Z,{children:["In most cases, we must provide notice to the employee before termination. The required notice period depends on local labor laws, the employment agreement, and other factors. We'll use those factors to determine the required notice period.",K(u,{zendeskId:_.terminationNoticePeriods,className:r("text-sm",o?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.zendeskTriggerButtonClassName),children:"Learn about notice periods"})]}),{className:o?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.className})}}),[o?.jsfModify]),{data:s,isLoading:x}=V({formValues:M,jsfModify:{...o?.jsfModify,fields:{...o?.jsfModify?.fields,...N?.fields}},step:i.currentStep.name}),l=B(S.data.schema),p=g(),{mutateAsync:b}=y(p);async function j(a){if(!n)throw new Error("Employment id is missing");if(s){let t=m(a,l.fields,{isPartialValidation:!0}),{customer_informed_employee:I}=t,E=I==="yes"?{employee_awareness:{date:t.customer_informed_employee_date,note:t.customer_informed_employee_description}}:void 0,J=c(t,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),$=A(J,"customer_informed_employee_date","customer_informed_employee_description"),D=H({...$,...E},L);return b({employment_id:n,termination_details:D,type:"termination"})}}e(j,"onSubmit");function C(){k()}e(C,"back");function v(){w()}e(v,"next");let R=q({...i.values?.employee_communication,...i.values?.termination_details,...i.values?.paid_time_off,...i.values?.additional_information});return{employmentId:n,stepState:i,fields:s?.fields||[],isLoading:x,isSubmitting:p.isPending,initialValues:R,handleValidation:e(a=>{if(s){let t=m(a,s?.fields);return s?.handleValidation(t)}return null},"handleValidation"),checkFieldUpdates:e(a=>{if(l){let t=m(a,l?.fields,{isPartialValidation:!0});P(t)}},"checkFieldUpdates"),parseFormValues:e(a=>m(a,l.fields,{isPartialValidation:!0}),"parseFormValues"),onSubmit:j,back:C,next:v}},"useTermination");export{Te as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OZCQ6AOF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/Termination/hooks.tsx","../src/components/form/jsf-utils/createFields.tsx"],"sourcesContent":["import {\n CreateOffboardingParams,\n TerminationDetailsParams,\n} from '@/src/client';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { $TSFixMe, createHeadlessForm } from '@remoteoss/json-schema-form';\nimport omitBy from 'lodash.omitby';\nimport isNull from 'lodash.isnull';\nimport { parseJSFToValidate } from '@/src/components/form/utils';\nimport { TerminationFormValues } from '@/src/flows/Termination/types';\nimport omit from 'lodash.omit';\nimport { parseFormRadioValues } from '@/src/flows/utils';\nimport { useStepState } from '@/src/flows/useStepState';\nimport { STEPS } from '@/src/flows/Termination/utils';\nimport { jsonSchema } from '@/src/flows/Termination/json-schemas/jsonSchema';\nimport { JSFModify } from '@/src/flows/types';\nimport { useCreateTermination, useTerminationSchema } from '@/src/flows/api';\nimport { useMemo } from 'react';\nimport { createInformationField } from '@/src/components/form/jsf-utils/createFields';\nimport { cn, ZendeskTriggerButton } from '@/src/internals';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\n\nfunction buildInitialValues(\n stepsInitialValues: Partial<TerminationFormValues>,\n): TerminationFormValues {\n const initialValues: TerminationFormValues = {\n confidential: '',\n customer_informed_employee: '',\n customer_informed_employee_date: '',\n customer_informed_employee_description: '',\n personal_email: '',\n termination_reason: undefined,\n reason_description: '',\n termination_reason_files: [],\n will_challenge_termination: '',\n will_challenge_termination_description: null,\n agrees_to_pto_amount: '',\n agrees_to_pto_amount_notes: null,\n acknowledge_termination_procedure: false,\n additional_comments: '',\n proposed_termination_date: '',\n risk_assessment_reasons: [],\n timesheet_file: undefined,\n ...stepsInitialValues,\n };\n\n return initialValues;\n}\n\ntype TerminationHookProps = {\n employmentId: string;\n options?: {\n jsfModify?: JSFModify;\n };\n};\n\nexport const useTermination = ({\n employmentId,\n options,\n}: TerminationHookProps) => {\n const { fieldValues, setFieldValues, stepState, previousStep, nextStep } =\n useStepState<keyof typeof STEPS, TerminationFormValues>(STEPS);\n\n const formValues = {\n ...stepState.values?.[stepState.currentStep.name as keyof typeof STEPS], // Restore values for the current step\n ...fieldValues,\n };\n\n const customFields = useMemo(() => {\n return {\n fields: {\n risk_assesment_info: createInformationField(\n 'Offboarding risk assessment',\n 'Employees may be protected from termination if they fall into certain categories. To help avoid claims from employees, let us know if the employee is part of one or more of these categories. Select all that apply.',\n {\n className: (\n options?.jsfModify?.fields?.risk_assesment_info as $TSFixMe\n )?.['x-jsf-presentation']?.className,\n },\n ),\n proposed_termination_date_info: createInformationField(\n 'Proposed termination date',\n <>\n In most cases, we must provide notice to the employee before\n termination. The required notice period depends on local labor laws,\n the employment agreement, and other factors. We'll use those factors\n to determine the required notice period.\n <ZendeskTriggerButton\n zendeskId={zendeskArticles.terminationNoticePeriods}\n className={cn(\n 'text-sm',\n (\n options?.jsfModify?.fields\n ?.proposed_termination_date_info as $TSFixMe\n )?.['x-jsf-presentation']?.zendeskTriggerButtonClassName,\n )}\n >\n Learn about notice periods\n </ZendeskTriggerButton>\n </>,\n {\n className: (\n options?.jsfModify?.fields\n ?.proposed_termination_date_info as $TSFixMe\n )?.['x-jsf-presentation']?.className,\n },\n ),\n },\n };\n }, [options?.jsfModify]);\n\n const { data: terminationHeadlessForm, isLoading: isLoadingTermination } =\n useTerminationSchema({\n formValues: formValues,\n jsfModify: {\n ...options?.jsfModify,\n fields: {\n ...options?.jsfModify?.fields,\n ...customFields?.fields,\n },\n },\n step: stepState.currentStep.name,\n });\n\n const entireTerminationSchema = createHeadlessForm(jsonSchema.data.schema);\n\n const createTermination = useCreateTermination();\n const { mutateAsync } = mutationToPromise(createTermination);\n\n async function onSubmit(values: TerminationFormValues) {\n if (!employmentId) {\n throw new Error('Employment id is missing');\n }\n\n if (terminationHeadlessForm) {\n // this is a hack because I need to validate all form values with the entire schema\n const parsedValues = parseJSFToValidate(\n values,\n entireTerminationSchema.fields,\n { isPartialValidation: true },\n );\n\n const { customer_informed_employee: customerInformedEmployee } =\n parsedValues;\n\n const employeeAwareness =\n customerInformedEmployee === 'yes'\n ? {\n employee_awareness: {\n date: parsedValues.customer_informed_employee_date,\n note: parsedValues.customer_informed_employee_description,\n },\n }\n : undefined;\n\n const radioFieldKeys = [\n 'agrees_to_pto_amount',\n 'confidential',\n 'customer_informed_employee',\n 'will_challenge_termination',\n ];\n\n const parsedRadioValues = parseFormRadioValues(\n parsedValues,\n radioFieldKeys,\n );\n\n const normalizedValues = omit(\n parsedRadioValues,\n 'customer_informed_employee_date',\n 'customer_informed_employee_description',\n );\n\n const terminationDetails: TerminationDetailsParams = omitBy(\n {\n ...normalizedValues,\n ...employeeAwareness,\n },\n isNull,\n ) as unknown as TerminationDetailsParams;\n\n const terminationPayload: CreateOffboardingParams = {\n employment_id: employmentId,\n termination_details: terminationDetails,\n type: 'termination',\n };\n\n return mutateAsync(terminationPayload);\n }\n\n return;\n }\n\n function back() {\n previousStep();\n }\n\n function next() {\n nextStep();\n }\n\n const initialValues = buildInitialValues({\n ...stepState.values?.employee_communication,\n ...stepState.values?.termination_details,\n ...stepState.values?.paid_time_off,\n ...stepState.values?.additional_information,\n });\n\n return {\n /**\n * Employment id passed useful to be used between components\n */\n employmentId,\n /**\n * Current step state containing the current step and total number of steps\n */\n stepState,\n /**\n * Array of form fields from the contract amendment schema\n */\n fields: terminationHeadlessForm?.fields || [],\n /**\n * Loading state indicating if the termination schema is being fetched\n */\n isLoading: isLoadingTermination,\n /**\n * Loading state indicating if a contract amendment mutation is in progress\n */\n isSubmitting: createTermination.isPending,\n /**\n * Initial form values\n */\n initialValues: initialValues,\n /**\n * Function to validate form values against the contract amendment schema\n * @param values - Form values to validate\n * @returns Validation result or null if no schema is available\n */\n handleValidation: (values: TerminationFormValues) => {\n if (terminationHeadlessForm) {\n const parsedValues = parseJSFToValidate(\n values,\n terminationHeadlessForm?.fields,\n );\n return terminationHeadlessForm?.handleValidation(parsedValues);\n }\n return null;\n },\n /**\n * Function to update the current form field values\n * @param values - New form values to set\n */\n checkFieldUpdates: (values: Partial<TerminationFormValues>) => {\n if (entireTerminationSchema) {\n const parsedValues = parseJSFToValidate(\n values,\n entireTerminationSchema?.fields,\n { isPartialValidation: true },\n );\n setFieldValues(parsedValues as TerminationFormValues);\n }\n },\n /**\n * Function to parse form values before submission\n * @param values - Form values to parse\n * @returns Parsed form values\n */\n parseFormValues: (values: TerminationFormValues) => {\n return parseJSFToValidate(values, entireTerminationSchema.fields, {\n isPartialValidation: true,\n });\n },\n /**\n * Function to handle form submission\n * @param values - Form values to submit\n * @returns Promise resolving to the mutation result\n */\n onSubmit,\n\n /**\n * Function to handle going back to the previous step\n * @returns {void}\n */\n back,\n\n /**\n * Function to handle going to the next step\n * @returns {void}\n */\n next,\n };\n};\n","import { cn } from '@/src/lib/utils';\nimport { $TSFixMe } from '@/src/types/remoteFlows';\n\ntype JSFPresentationConfig = {\n inputType?: string;\n Component?: React.ComponentType<$TSFixMe>;\n hidden?: boolean;\n [key: string]: unknown;\n};\n\ntype JSFFieldConfig = {\n 'x-jsf-presentation'?: JSFPresentationConfig;\n [key: string]: unknown;\n};\n\n/**\n * Creates an information field with standard styling\n */\nexport function createInformationField(\n title: React.ReactNode,\n description: React.ReactNode,\n options?: {\n className?: string;\n },\n): JSFFieldConfig {\n return {\n presentation: {\n inputType: 'hidden',\n Component: () => (\n <div\n className={cn(\n 'RemoteFlows__InformationStatement',\n options?.className,\n )}\n >\n <h3 className={cn('RemoteFlows__InformationStatement__Title')}>\n {title}\n </h3>\n <p className={cn('RemoteFlows__InformationStatement__Description')}>\n {description}\n </p>\n </div>\n ),\n },\n };\n}\n"],"mappings":"+bAKA,OAAmB,sBAAAA,MAA0B,8BAC7C,OAAOC,MAAY,gBACnB,OAAOC,MAAY,gBAGnB,OAAOC,MAAU,cAOjB,OAAS,WAAAC,MAAe,QCYhB,OAME,OAAAC,EANF,QAAAC,MAAA,oBAXD,SAASC,EACdC,EACAC,EACAC,EAGgB,CAChB,MAAO,CACL,aAAc,CACZ,UAAW,SACX,UAAWC,EAAA,IACTL,EAAC,OACC,UAAWM,EACT,oCACAF,GAAS,SACX,EAEA,UAAAL,EAAC,MAAG,UAAWO,EAAG,0CAA0C,EACzD,SAAAJ,EACH,EACAH,EAAC,KAAE,UAAWO,EAAG,gDAAgD,EAC9D,SAAAH,EACH,GACF,EAbS,YAeb,CACF,CACF,CA3BgBE,EAAAJ,EAAA,0BDgEN,mBAAAM,EAKE,OAAAC,EALF,QAAAC,MAAA,oBA5DV,SAASC,EACPC,EACuB,CAsBvB,MArB6C,CAC3C,aAAc,GACd,2BAA4B,GAC5B,gCAAiC,GACjC,uCAAwC,GACxC,eAAgB,GAChB,mBAAoB,OACpB,mBAAoB,GACpB,yBAA0B,CAAC,EAC3B,2BAA4B,GAC5B,uCAAwC,KACxC,qBAAsB,GACtB,2BAA4B,KAC5B,kCAAmC,GACnC,oBAAqB,GACrB,0BAA2B,GAC3B,wBAAyB,CAAC,EAC1B,eAAgB,OAChB,GAAGA,CACL,CAGF,CAzBSC,EAAAF,EAAA,sBAkCF,IAAMG,GAAiBD,EAAA,CAAC,CAC7B,aAAAE,EACA,QAAAC,CACF,IAA4B,CAC1B,GAAM,CAAE,YAAAC,EAAa,eAAAC,EAAgB,UAAAC,EAAW,aAAAC,EAAc,SAAAC,CAAS,EACrEC,EAAwDC,CAAK,EAEzDC,EAAa,CACjB,GAAGL,EAAU,SAASA,EAAU,YAAY,IAA0B,EACtE,GAAGF,CACL,EAEMQ,EAAeC,EAAQ,KACpB,CACL,OAAQ,CACN,oBAAqBC,EACnB,8BACA,wNACA,CACE,UACEX,GAAS,WAAW,QAAQ,sBAC1B,oBAAoB,GAAG,SAC7B,CACF,EACA,+BAAgCW,EAC9B,4BACAjB,EAAAF,EAAA,CAAE,4PAKAC,EAACmB,EAAA,CACC,UAAWC,EAAgB,yBAC3B,UAAWC,EACT,UAEEd,GAAS,WAAW,QAChB,iCACF,oBAAoB,GAAG,6BAC7B,EACD,sCAED,GACF,EACA,CACE,UACEA,GAAS,WAAW,QAChB,iCACF,oBAAoB,GAAG,SAC7B,CACF,CACF,CACF,GACC,CAACA,GAAS,SAAS,CAAC,EAEjB,CAAE,KAAMe,EAAyB,UAAWC,CAAqB,EACrEC,EAAqB,CACnB,WAAYT,EACZ,UAAW,CACT,GAAGR,GAAS,UACZ,OAAQ,CACN,GAAGA,GAAS,WAAW,OACvB,GAAGS,GAAc,MACnB,CACF,EACA,KAAMN,EAAU,YAAY,IAC9B,CAAC,EAEGe,EAA0BC,EAAmBC,EAAW,KAAK,MAAM,EAEnEC,EAAoBC,EAAqB,EACzC,CAAE,YAAAC,CAAY,EAAIC,EAAkBH,CAAiB,EAE3D,eAAeI,EAASC,EAA+B,CACrD,GAAI,CAAC3B,EACH,MAAM,IAAI,MAAM,0BAA0B,EAG5C,GAAIgB,EAAyB,CAE3B,IAAMY,EAAeC,EACnBF,EACAR,EAAwB,OACxB,CAAE,oBAAqB,EAAK,CAC9B,EAEM,CAAE,2BAA4BW,CAAyB,EAC3DF,EAEIG,EACJD,IAA6B,MACzB,CACE,mBAAoB,CAClB,KAAMF,EAAa,gCACnB,KAAMA,EAAa,sCACrB,CACF,EACA,OASAI,EAAoBC,EACxBL,EARqB,CACrB,uBACA,eACA,6BACA,4BACF,CAKA,EAEMM,EAAmBC,EACvBH,EACA,kCACA,wCACF,EAEMI,EAA+CC,EACnD,CACE,GAAGH,EACH,GAAGH,CACL,EACAO,CACF,EAQA,OAAOd,EAN6C,CAClD,cAAexB,EACf,oBAAqBoC,EACrB,KAAM,aACR,CAEqC,CACvC,CAGF,CA9DetC,EAAA4B,EAAA,YAgEf,SAASa,GAAO,CACdlC,EAAa,CACf,CAFSP,EAAAyC,EAAA,QAIT,SAASC,GAAO,CACdlC,EAAS,CACX,CAFSR,EAAA0C,EAAA,QAIT,IAAMC,EAAgB7C,EAAmB,CACvC,GAAGQ,EAAU,QAAQ,uBACrB,GAAGA,EAAU,QAAQ,oBACrB,GAAGA,EAAU,QAAQ,cACrB,GAAGA,EAAU,QAAQ,sBACvB,CAAC,EAED,MAAO,CAIL,aAAAJ,EAIA,UAAAI,EAIA,OAAQY,GAAyB,QAAU,CAAC,EAI5C,UAAWC,EAIX,aAAcK,EAAkB,UAIhC,cAAemB,EAMf,iBAAkB3C,EAAC6B,GAAkC,CACnD,GAAIX,EAAyB,CAC3B,IAAMY,EAAeC,EACnBF,EACAX,GAAyB,MAC3B,EACA,OAAOA,GAAyB,iBAAiBY,CAAY,CAC/D,CACA,OAAO,IACT,EATkB,oBAclB,kBAAmB9B,EAAC6B,GAA2C,CAC7D,GAAIR,EAAyB,CAC3B,IAAMS,EAAeC,EACnBF,EACAR,GAAyB,OACzB,CAAE,oBAAqB,EAAK,CAC9B,EACAhB,EAAeyB,CAAqC,CACtD,CACF,EATmB,qBAenB,gBAAiB9B,EAAC6B,GACTE,EAAmBF,EAAQR,EAAwB,OAAQ,CAChE,oBAAqB,EACvB,CAAC,EAHc,mBAUjB,SAAAO,EAMA,KAAAa,EAMA,KAAAC,CACF,CACF,EA3O8B","names":["createHeadlessForm","omitBy","isNull","omit","useMemo","jsx","jsxs","createInformationField","title","description","options","__name","cn","Fragment","jsx","jsxs","buildInitialValues","stepsInitialValues","__name","useTermination","employmentId","options","fieldValues","setFieldValues","stepState","previousStep","nextStep","useStepState","STEPS","formValues","customFields","useMemo","createInformationField","ZendeskTriggerButton","zendeskArticles","cn","terminationHeadlessForm","isLoadingTermination","useTerminationSchema","entireTerminationSchema","createHeadlessForm","jsonSchema","createTermination","useCreateTermination","mutateAsync","mutationToPromise","onSubmit","values","parsedValues","parseJSFToValidate","customerInformedEmployee","employeeAwareness","parsedRadioValues","parseFormRadioValues","normalizedValues","omit","terminationDetails","omitBy","isNull","back","next","initialValues"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-QFZ3XVDT.js";import{a as m}from"./chunk-ZE3YT3Q6.js";import{a as o}from"./chunk-A76UTPRW.js";import{b as i}from"./chunk-2QGDCMCE.js";import{b as r}from"./chunk-54KJP7WD.js";import{a as n}from"./chunk-P37U34EQ.js";import{Info as p}from"lucide-react";import{Fragment as f,jsx as t,jsxs as e}from"react/jsx-runtime";function B({extraStatutoryPaymentsTotal:d,extraStatutoryPaymentsBreakdown:u,currency:s}){return e("div",{children:[e("div",{className:"flex justify-between items-center mb-2",children:[t("h3",{className:"font-medium text-primary-foreground-800",children:"Extra Statutory Payments"}),t("span",{className:"font-semibold text-lg",children:r(d,s)})]}),t(l,{className:"mb-3"}),t("div",{className:"space-y-3 pl-2",children:u.map((a,c)=>e("div",{className:"flex justify-between items-start text-sm",children:[e("div",{className:"flex items-start gap-2",children:[t("span",{children:a.name}),a.description&&t(m,{content:e(f,{children:[t("span",{children:a.description})," ",a.zendesk_article_url&&t(o,{zendeskId:Number(a.zendesk_article_id),children:"Learn more"})]}),children:e(i,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0",children:[t(p,{className:"h-3 w-3 text-gray-400"}),t("span",{className:"sr-only",children:"Info"})]})})]}),t("span",{children:r(a.amount,s)})]},c))})]})}n(B,"CostCalculatorExtraStatutoryPaymentsBreakdown");export{B as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PLWXRCGQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-54KJP7WD.js";import{a as o}from"./chunk-P37U34EQ.js";import*as r from"@radix-ui/react-separator";import{jsx as p}from"react/jsx-runtime";function m({className:a,orientation:i="horizontal",decorative:e=!0,...n}){return p(r.Root,{"data-slot":"separator-root",decorative:e,orientation:i,className:t("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",a),...n})}o(m,"Separator");export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-QFZ3XVDT.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as R}from"./chunk-WVJDCDGZ.js";import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as R}from"./chunk-WVJDCDGZ.js";import{A as k,d as F,e as C,h as g,i as S,j,l as w,m as v,o as E,q as O,r as q,s as P,u as x,v as V,x as M}from"./chunk-FHHAGWU5.js";import{b as U}from"./chunk-Z5WMKCRJ.js";import{d as a}from"./chunk-3ZWDIEEM.js";import{a as b}from"./chunk-PAQW5BFW.js";import{a as n}from"./chunk-P37U34EQ.js";import{createHeadlessForm as p,modify as d}from"@remoteoss/json-schema-form";import{useMutation as m,useQuery as f}from"@tanstack/react-query";var $=n(t=>{let{client:r}=a();return f({queryKey:["employment",t],retry:!1,enabled:!!t,select:n(({data:e})=>e?.data.employment,"select"),queryFn:n(async()=>{let e=await q({client:r,headers:{Authorization:""},path:{employment_id:t}});if(e.error||!e.data)throw new Error("Failed to fetch employment data");return e},"queryFn")})},"useEmployment"),ee=n(t=>{let{client:r}=a();return f({queryKey:["company",t],retry:!1,enabled:!!t,queryFn:n(async()=>{let e=await v({client:r,headers:{Authorization:""},path:{company_id:t}});if(e.error||!e.data)throw new Error("Failed to fetch employment data");return e},"queryFn"),select:n(({data:e})=>e.data.company,"select")})},"useCompany"),te=n(t=>{let{client:r}=a();return f({queryKey:["benefit-offers",t],retry:!1,enabled:!!t,queryFn:n(async()=>g({client:r,path:{employment_id:t}}).then(e=>{if(e.error||!e.data)throw new Error("Failed to fetch benefit offers data");return e}),"queryFn"),select:n(({data:e})=>e?.data?.reduce((o,s)=>({...o,[s.benefit_group.slug]:{value:s.benefit_tier?.slug??"no",...s.benefit_group?.filter?.slug?{filter:s.benefit_group?.filter?.slug}:{}}}),{}),"select")})},"useBenefitOffers"),ne=n(()=>{let{client:t}=a();return m({mutationFn:n(r=>k({client:t,headers:{Authorization:""},path:r}),"mutationFn")})},"useEmploymentInvite"),re=n(()=>{let{client:t}=a();return m({mutationFn:n(r=>w({client:t,body:r}),"mutationFn")})},"useCreateReserveInvoice"),oe=n(({countryCode:t,form:r,fieldValues:e,options:o,query:s={}})=>{let{client:i}=a(),c=o?.jsonSchemaVersion?.form_schema?.[r]?{json_schema_version:o.jsonSchemaVersion.form_schema[r]}:{};return f({queryKey:["onboarding-json-schema-form",t,r],retry:!1,queryFn:n(async()=>{let l=await E({client:i,headers:{Authorization:""},path:{country_code:t,form:r},query:{skip_benefits:!0,...s,...c}});if(l.error||!l.data)throw new Error("Failed to fetch onboarding schema");return l},"queryFn"),enabled:o?.queryOptions?.enabled,select:n(({data:l})=>{let u=l?.data||{};if(o&&o.jsfModify){let{schema:y}=d(u,o.jsfModify);u=y}let z=U(u.properties||{},"money").reduce((y,_)=>(y[_]=b(e[_]),y),{}),A={...e,...z};return{meta:{"x-jsf-fieldsets":u["x-jsf-fieldsets"]},...p(u,{initialValues:A})}},"select")})},"useJSONSchemaForm"),se=n((t,r,e)=>{let o=e?.jsonSchemaVersion?.benefit_offers_form_schema?{json_schema_version:e.jsonSchemaVersion.benefit_offers_form_schema}:{},{client:s}=a();return f({queryKey:["benefit-offers-schema",t],retry:!1,enabled:!!t,queryFn:n(async()=>{let i=await O({client:s,path:{employment_id:t},query:o});if(i.error||!i.data)throw new Error("Failed to fetch benefit offers schema");return i},"queryFn"),select:n(({data:i})=>{let c=i?.data?.schema||{};if(e&&e.jsfModify?.benefits){let{schema:h}=d(c,e.jsfModify.benefits);c=h}let l=Object.keys(r).length>0;return p(c,{initialValues:l?{...r}:{}})},"select")})},"useBenefitOffersSchema"),ae=n(t=>{let{client:r}=a(),e=t?.jsonSchemaVersion?.form_schema?.employment_basic_information?{json_schema_version:t.jsonSchemaVersion.form_schema.employment_basic_information}:{};return m({mutationFn:n(o=>C({client:r,headers:{Authorization:""},body:o,query:{...e}}),"mutationFn")})},"useCreateEmployment"),ie=n(t=>{let{client:r}=a(),e={employment_basic_information_json_schema_version:t?.jsonSchemaVersion?.form_schema?.employment_basic_information,employment_contract_details_json_schema_version:t?.jsonSchemaVersion?.form_schema?.contract_details},o=Object.fromEntries(Object.entries(e).filter(([,s])=>s!==void 0));return m({mutationFn:n(({employmentId:s,...i})=>P({client:r,headers:{Authorization:""},body:i,path:{employment_id:s},query:{skip_benefits:!0,...o}}),"mutationFn")})},"useUpdateEmployment"),me=n(t=>{let{client:r}=a();return m({mutationFn:n(({employmentId:e,...o})=>{let s=t?.jsonSchemaVersion?.benefit_offers_form_schema?{json_schema_version:t.jsonSchemaVersion.benefit_offers_form_schema}:{};return S({client:r,body:o,path:{employment_id:e},query:{...s}})},"mutationFn")})},"useUpdateBenefitsOffers"),ce=n(()=>{let{client:t}=a();return m({mutationFn:n(r=>j({client:t,headers:{Authorization:""},body:r}),"mutationFn")})},"useMagicLink"),B=n(t=>{let{client:r}=a();return f({...t,queryKey:["countries"],retry:!1,queryFn:n(async()=>{let e=await V({client:r,headers:{Authorization:""}});if(e.error||!e.data)throw new Error("Failed to fetch supported countries");return e},"queryFn"),select:n(({data:e})=>e?.data?.filter(o=>o.eor_onboarding).map(o=>({label:o.name,value:o.code}))||[],"select")})},"useCountries"),le=n(t=>{let{data:r,isLoading:e}=B(t?.queryOptions),{schema:o}=d(R.data.schema,t?.jsfModify||{}),s=p(o);if(r){let i=s.fields.find(c=>c.name==="country");i&&(i.options=r)}return{isLoading:e,selectCountryForm:s}},"useCountriesSchemaField"),ue=n(({type:t="spread"})=>{let{client:r}=a();return m({mutationFn:n(e=>(t==="no_spread"?F:M)({client:r,body:e}),"mutationFn")})},"useConvertCurrency"),fe=n(()=>{let{client:t}=a();return m({mutationFn:n(({employmentId:r,...e})=>x({client:t,path:{employment_id:r},body:e}),"mutationFn")})},"useUpsertContractEligibility");export{$ as a,ee as b,te as c,ne as d,re as e,oe as f,se as g,ae as h,ie as i,me as j,ce as k,le as l,ue as m,fe as n};
|
|
2
|
+
//# sourceMappingURL=chunk-QGGKDM3N.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as d}from"./chunk-MRYRNB7Y.js";import{b as a}from"./chunk-CFIJKJXD.js";import{a as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as d}from"./chunk-MRYRNB7Y.js";import{b as a}from"./chunk-CFIJKJXD.js";import{a as f}from"./chunk-XGMQPLVG.js";import{f as s,g as l}from"./chunk-U23SN7CM.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as T}from"react";import{jsx as e}from"react/jsx-runtime";function A({fields:m,onSubmit:F}){let{formId:u,terminationBag:o}=d(),c=a(o.handleValidation),i=s({resolver:c,defaultValues:o?.initialValues,shouldUnregister:!1,mode:"onBlur"});T(()=>{let y=i?.watch(r=>{Object.keys(r).some(t=>r[t]!==o?.initialValues?.[t])&&o?.checkFieldUpdates(r)});return()=>y?.unsubscribe()},[]);let p=m||(o?.fields??[]);return e(l,{...i,children:e("form",{id:u,onSubmit:i.handleSubmit(F),className:"space-y-4 RemoteFlows__TerminationForm",children:e(f,{fields:p})})})}n(A,"TerminationForm");export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-QIN5BLVI.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-54KJP7WD.js";import{a as e}from"./chunk-P37U34EQ.js";import{Slot as i}from"@radix-ui/react-slot";import{cva as d}from"class-variance-authority";import{jsx as u}from"react/jsx-runtime";var s=d("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-badge text-badge-foreground rounded-full [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground rounded-full [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white rounded-full [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",outline:"text-foreground rounded-full [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function g({className:t,variant:a,asChild:o=!1,...n}){return u(o?i:"span",{"data-slot":"badge",className:r(s({variant:a}),t),...n})}e(g,"Badge");export{s as a,g as b};
|
|
2
|
+
//# sourceMappingURL=chunk-R2VVXLL7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{m as K}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{m as K}from"./chunk-QGGKDM3N.js";import{a as w}from"./chunk-ZJ3JHILJ.js";import{b as J}from"./chunk-3ZWDIEEM.js";import{c as G}from"./chunk-U23SN7CM.js";import{a as t,b as d,c as Me}from"./chunk-P37U34EQ.js";var L=d((Et,U)=>{"use strict";function Pe(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}t(Pe,"isObject");U.exports=Pe});var X=d(($t,V)=>{"use strict";var _e=typeof global=="object"&&global&&global.Object===Object&&global;V.exports=_e});var F=d((qt,z)=>{"use strict";var ke=X(),we=typeof self=="object"&&self&&self.Object===Object&&self,Le=ke||we||Function("return this")();z.exports=Le});var Y=d((It,Q)=>{"use strict";var Fe=F(),Ae=t(function(){return Fe.Date.now()},"now");Q.exports=Ae});var ee=d((Pt,Z)=>{"use strict";var We=/\s/;function De(e){for(var n=e.length;n--&&We.test(e.charAt(n)););return n}t(De,"trimmedEndIndex");Z.exports=De});var ne=d((kt,te)=>{"use strict";var Be=ee(),Ne=/^\s+/;function He(e){return e&&e.slice(0,Be(e)+1).replace(Ne,"")}t(He,"baseTrim");te.exports=He});var A=d((Lt,re)=>{"use strict";var Ge=F(),Je=Ge.Symbol;re.exports=Je});var ae=d((Ft,se)=>{"use strict";var oe=A(),ie=Object.prototype,Ke=ie.hasOwnProperty,Ue=ie.toString,O=oe?oe.toStringTag:void 0;function Ve(e){var n=Ke.call(e,O),r=e[O];try{e[O]=void 0;var o=!0}catch{}var s=Ue.call(e);return o&&(n?e[O]=r:delete e[O]),s}t(Ve,"getRawTag");se.exports=Ve});var ue=d((Wt,ce)=>{"use strict";var Xe=Object.prototype,ze=Xe.toString;function Qe(e){return ze.call(e)}t(Qe,"objectToString");ce.exports=Qe});var me=d((Bt,le)=>{"use strict";var fe=A(),Ye=ae(),Ze=ue(),et="[object Null]",tt="[object Undefined]",de=fe?fe.toStringTag:void 0;function nt(e){return e==null?e===void 0?tt:et:de&&de in Object(e)?Ye(e):Ze(e)}t(nt,"baseGetTag");le.exports=nt});var pe=d((Ht,ge)=>{"use strict";function rt(e){return e!=null&&typeof e=="object"}t(rt,"isObjectLike");ge.exports=rt});var ve=d((Jt,be)=>{"use strict";var ot=me(),it=pe(),st="[object Symbol]";function at(e){return typeof e=="symbol"||it(e)&&ot(e)==st}t(at,"isSymbol");be.exports=at});var Te=d((Ut,xe)=>{"use strict";var ct=ne(),ye=L(),ut=ve(),he=NaN,ft=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,lt=/^0o[0-7]+$/i,mt=parseInt;function gt(e){if(typeof e=="number")return e;if(ut(e))return he;if(ye(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=ye(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=ct(e);var r=dt.test(e);return r||lt.test(e)?mt(e.slice(2),r?2:8):ft.test(e)?he:+e}t(gt,"toNumber");xe.exports=gt});var je=d((Xt,Se)=>{"use strict";var pt=L(),W=Y(),Ce=Te(),bt="Expected a function",vt=Math.max,yt=Math.min;function ht(e,n,r){var o,s,p,l,a,c,m=0,E=!1,u=!1,h=!0;if(typeof e!="function")throw new TypeError(bt);n=Ce(n)||0,pt(r)&&(E=!!r.leading,u="maxWait"in r,p=u?vt(Ce(r.maxWait)||0,n):p,h="trailing"in r?!!r.trailing:h);function x(i){var g=o,y=s;return o=s=void 0,m=i,l=e.apply(y,g),l}t(x,"invokeFunc");function R(i){return m=i,a=setTimeout(v,n),E?x(i):l}t(R,"leadingEdge");function C(i){var g=i-c,y=i-m,M=n-g;return u?yt(M,p-y):M}t(C,"remainingWait");function $(i){var g=i-c,y=i-m;return c===void 0||g>=n||g<0||u&&y>=p}t($,"shouldInvoke");function v(){var i=W();if($(i))return b(i);a=setTimeout(v,C(i))}t(v,"timerExpired");function b(i){return a=void 0,h&&o?x(i):(o=s=void 0,l)}t(b,"trailingEdge");function q(){a!==void 0&&clearTimeout(a),m=0,o=c=s=a=void 0}t(q,"cancel");function I(){return a===void 0?l:b(W())}t(I,"flush");function S(){var i=W(),g=$(i);if(o=arguments,s=this,c=i,g){if(a===void 0)return R(c);if(u)return clearTimeout(a),a=setTimeout(v,n),x(c)}return a===void 0&&(a=setTimeout(v,n)),l}return t(S,"debounced"),S.cancel=q,S.flush=I,S}t(ht,"debounce");Se.exports=ht});import{useState as Ct,useCallback as St,useEffect as Re,useRef as $e}from"react";var Ee=Me(je(),1);import{useCallback as xt,useEffect as Tt,useRef as Oe}from"react";function D(e,n){let r=Oe(e);Tt(()=>{r.current=e},[e]);let o=Oe((0,Ee.default)(s=>{r.current(s)},n)).current;return xt(s=>{o(s)},[o])}t(D,"useDebounce");import{Fragment as Ot,jsx as T,jsxs as qe}from"react/jsx-runtime";var jt=t(({description:e,showConversion:n,targetCurrency:r,className:o,onClick:s})=>{let{components:p}=J(),l=n?`Hide ${r} conversion`:`Show ${r} conversion`,a=p?.button;return qe("span",{className:o,children:[e," ",a?T(a,{className:`${o.replace("-description","-button")}`,"data-type":"inline",onClick:s,children:l}):T("button",{className:`${o.replace("-description","-button")}`,onClick:s,children:l})]})},"DescriptionWithConversion"),cn=t(({sourceCurrency:e,targetCurrency:n,mainFieldName:r,conversionFieldName:o,conversionProperties:s,classNamePrefix:p,description:l,conversionType:a="spread",...c})=>{let[m,E]=Ct(!1),{setValue:u,watch:h}=G(),x=h(r||c.name),R=$e(!0),C=$e(new Map),$=e&&n&&e!==n,{mutateAsync:v}=K({type:a}),b=`${c.name}_converted`;Re(()=>{u(b,r||c.name)},[u,r,c.name,b]),Re(()=>{if(R.current){R.current=!1;return}u(o,"")},[e,o,u]);let q=St(async(f,j,k,B)=>{if(!f)return;let N=`${j}_${k}_${f}`,H=C.current.get(N);if(H){u(B,H.targetAmount);return}try{let P=await v({source_currency:j,target_currency:k,amount:Number(f)});if(P.data?.data?.conversion_data?.target_amount){let _=P.data.data.conversion_data.target_amount;if(_){u(B,_?.toString()),C.current.set(N,{targetAmount:_.toString()});let Ie=`${k}_${j}_${_}`;C.current.set(Ie,{targetAmount:f.toString()})}}}catch(P){console.error("Error converting currency:",P)}},[v,u]),I=D(f=>q(f,e,n,o),500),S=D(f=>q(f,n,e,r||c.name),500),i=t(f=>{u(b,r||c.name),m&&I(f.target.value)},"handleMainFieldChange"),g=t(f=>{u(b,o),S(f.target.value)},"handleConversionFieldChange"),y=t(f=>{f.preventDefault(),E(j=>!j),!m&&x&&I(x)},"toggleConversion"),M=$?T(jt,{targetCurrency:n,description:l,showConversion:m,className:`${p}-description`,onClick:y}):l;return qe(Ot,{children:[T(w,{...c,name:r||c.name,additionalProps:{currency:e},description:M,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:i}),m&&T(w,{additionalProps:{currency:n},name:o,label:s?.label||"Conversion",description:s?.description,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:g}),T("input",{type:"hidden",name:b,value:h(b)||r||c.name})]})},"CurrencyConversionField");export{cn as a};
|
|
2
|
+
//# sourceMappingURL=chunk-R4LFNFC2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-32GSS4UM.js";import{a}from"./chunk-R4LFNFC2.js";import{a as c}from"./chunk-A76UTPRW.js";import{c as t}from"./chunk-U23SN7CM.js";import{a as i}from"./chunk-P37U34EQ.js";import{useEffect as u}from"react";import{Fragment as _,jsx as m,jsxs as N}from"react/jsx-runtime";var k=i(({currencies:{from:d,to:y},shouldSwapOrder:e,salary_conversion_properties:s,conversionType:F="no_spread",defaultValue:r,...o})=>{let{setValue:n,getValues:p}=t(),v={label:s?.label||"Salary conversion",description:s?.description||N(_,{children:["The conversion is based on the Remote FX rate."," ",m(c,{className:"text-sm",zendeskId:l.remoteFxRate,children:"Learn more \u2197"})]})},g=e?"salary_conversion":o.name,f=e?o.name:"salary_conversion";return u(()=>{e&&r&&(n("salary_conversion",r),n("salary_converted","salary_conversion"))},[e,r,n,p]),m(a,{...o,sourceCurrency:d,targetCurrency:y,mainFieldName:g,conversionFieldName:f,conversionProperties:v,classNamePrefix:"RemoteFlows-Salary",conversionType:F})},"SalaryField");export{k as a};
|
|
2
|
+
//# sourceMappingURL=chunk-RJZ426NO.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-V2PBVCRH.js";import{b as i}from"./chunk-PGWKJ6FK.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function y({onSubmit:s,onSuccess:c,onError:t}){let{onboardingBag:o}=i(),u=e(async n=>{try{await s?.({countryCode:n.country});let r=await o.onSubmit(n);if(r?.data){await c?.(r?.data),o?.next();return}r?.error&&t?.({error:r.error,rawError:r.rawError,fieldErrors:[]})}catch(r){t?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),l=o.stepState.values?.select_country||o.initialValues.select_country;return d(a,{defaultValues:l,onSubmit:u})}e(y,"SelectCountryStep");export{y as a};
|
|
2
|
+
//# sourceMappingURL=chunk-RNNZ5ZKE.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-V2PBVCRH.js";import{b as n}from"./chunk-PGWKJ6FK.js";import{b as i}from"./chunk-7XRPOR7L.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as p}from"react/jsx-runtime";function F({onSubmit:l,onError:t,onSuccess:d}){let{onboardingBag:o}=n(),m=e(async a=>{try{await l?.(o.parseFormValues(a));let r=await o.onSubmit(a);if(r?.data){await d?.(r.data),o?.next();return}if(r?.error){let c=i(r?.fieldErrors||[],o.meta?.fields?.contract_details);t?.({error:r.error,rawError:r.rawError,fieldErrors:c})}}catch(r){t?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit");return p(s,{defaultValues:o.stepState.values?.contract_details||o.initialValues.contract_details,onSubmit:m})}e(F,"ContractDetailsStep");export{F as a};
|
|
2
|
+
//# sourceMappingURL=chunk-RUMP764Z.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as c}from"./chunk-MRYRNB7Y.js";import{b as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as c}from"./chunk-MRYRNB7Y.js";import{b as m}from"./chunk-2QGDCMCE.js";import{b as e}from"./chunk-3ZWDIEEM.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function f({children:n,...t}){let{terminationBag:{back:i}}=c(),{components:B}=e(),r=B?.button;return r?s(r,{...t,onClick:o=>{i(),t.onClick?.(o)},children:n}):s(m,{...t,onClick:o=>{i(),t.onClick?.(o)},children:n})}u(f,"TerminationBack");export{f as a};
|
|
2
|
+
//# sourceMappingURL=chunk-SERAGBDA.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as dt}from"./chunk-BI6U55BD.js";import{a as fe,e as ct}from"./chunk-3LOVCTCN.js";import{a}from"./chunk-P37U34EQ.js";import v from"react";var pe=a(e=>e.type==="checkbox","isCheckBoxInput"),de=a(e=>e instanceof Date,"isDateObject"),z=a(e=>e==null,"isNullOrUndefined"),vt=a(e=>typeof e=="object","isObjectType"),P=a(e=>!z(e)&&!Array.isArray(e)&&vt(e)&&!de(e),"isObject"),bt=a(e=>P(e)&&e.target?pe(e.target)?e.target.checked:e.target.value:e,"getEventValue"),Kt=a(e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,"getNodeParentName"),Vt=a((e,r)=>e.has(Kt(r)),"isNameInFieldArray"),zt=a(e=>{let r=e.constructor&&e.constructor.prototype;return P(r)&&r.hasOwnProperty("isPrototypeOf")},"isPlainObject"),Ge=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function N(e){let r,t=Array.isArray(e),s=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)r=new Date(e);else if(e instanceof Set)r=new Set(e);else if(!(Ge&&(e instanceof Blob||s))&&(t||P(e)))if(r=t?[]:{},!t&&!zt(e))r=e;else for(let o in e)e.hasOwnProperty(o)&&(r[o]=N(e[o]));else return e;return r}a(N,"cloneObject");var xe=a(e=>Array.isArray(e)?e.filter(Boolean):[],"compact"),R=a(e=>e===void 0,"isUndefined"),d=a((e,r,t)=>{if(!r||!P(e))return t;let s=xe(r.split(/[,[\].]+?/)).reduce((o,u)=>z(o)?o:o[u],e);return R(s)||s===e?R(e[r])?t:e[r]:s},"get"),Q=a(e=>typeof e=="boolean","isBoolean"),Qe=a(e=>/^\w*$/.test(e),"isKey"),pt=a(e=>xe(e.replace(/["|']|\]/g,"").split(/\.|\[/)),"stringToPath"),E=a((e,r,t)=>{let s=-1,o=Qe(r)?[r]:pt(r),u=o.length,y=u-1;for(;++s<u;){let g=o[s],V=t;if(s!==y){let S=e[g];V=P(S)||Array.isArray(S)?S:isNaN(+o[s+1])?{}:[]}if(g==="__proto__"||g==="constructor"||g==="prototype")return;e[g]=V,e=e[g]}return e},"set"),Se={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Y={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ae={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},xt=v.createContext(null),ge=a(()=>v.useContext(xt),"useFormContext"),At=a(e=>{let{children:r,...t}=e;return v.createElement(xt.Provider,{value:t},r)},"FormProvider"),St=a((e,r,t,s=!0)=>{let o={defaultValues:r._defaultValues};for(let u in e)Object.defineProperty(o,u,{get:a(()=>{let y=u;return r._proxyFormState[y]!==Y.all&&(r._proxyFormState[y]=!s||Y.all),t&&(t[y]=!0),e[y]},"get")});return o},"getProxyFormState"),K=a(e=>P(e)&&!Object.keys(e).length,"isEmptyObject"),wt=a((e,r,t,s)=>{t(e);let{name:o,...u}=e;return K(u)||Object.keys(u).length>=Object.keys(r).length||Object.keys(u).find(y=>r[y]===(!s||Y.all))},"shouldRenderFormState"),J=a(e=>Array.isArray(e)?e:[e],"convertToArrayPayload"),Ct=a((e,r,t)=>!e||!r||e===r||J(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),"shouldSubscribeByName");function Ee(e){let r=v.useRef(e);r.current=e,v.useEffect(()=>{let t=!e.disabled&&r.current.subject&&r.current.subject.subscribe({next:r.current.next});return()=>{t&&t.unsubscribe()}},[e.disabled])}a(Ee,"useSubscribe");function Ye(e){let r=ge(),{control:t=r.control,disabled:s,name:o,exact:u}=e||{},[y,g]=v.useState(t._formState),V=v.useRef(!0),S=v.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),w=v.useRef(o);return w.current=o,Ee({disabled:s,next:a(b=>V.current&&Ct(w.current,b.name,u)&&wt(b,S.current,t._updateFormState)&&g({...t._formState,...b}),"next"),subject:t._subjects.state}),v.useEffect(()=>(V.current=!0,S.current.isValid&&t._updateValid(!0),()=>{V.current=!1}),[t]),v.useMemo(()=>St(y,t,S.current,!1),[y,t])}a(Ye,"useFormState");var se=a(e=>typeof e=="string","isString"),Dt=a((e,r,t,s,o)=>se(e)?(s&&r.watch.add(e),d(t,e,o)):Array.isArray(e)?e.map(u=>(s&&r.watch.add(u),d(t,u))):(s&&(r.watchAll=!0),t),"generateWatchOutput");function Jt(e){let r=ge(),{control:t=r.control,name:s,defaultValue:o,disabled:u,exact:y}=e||{},g=v.useRef(s);g.current=s,Ee({disabled:u,subject:t._subjects.values,next:a(w=>{Ct(g.current,w.name,y)&&S(N(Dt(g.current,t._names,w.values||t._formValues,!1,o)))},"next")});let[V,S]=v.useState(t._getWatch(s,o));return v.useEffect(()=>t._removeUnmounted()),V}a(Jt,"useWatch");function Gt(e){let r=ge(),{name:t,disabled:s,control:o=r.control,shouldUnregister:u}=e,y=Vt(o._names.array,t),g=Jt({control:o,name:t,defaultValue:d(o._formValues,t,d(o._defaultValues,t,e.defaultValue)),exact:!0}),V=Ye({control:o,name:t,exact:!0}),S=v.useRef(o.register(t,{...e.rules,value:g,...Q(e.disabled)?{disabled:e.disabled}:{}})),w=v.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:a(()=>!!d(V.errors,t),"get")},isDirty:{enumerable:!0,get:a(()=>!!d(V.dirtyFields,t),"get")},isTouched:{enumerable:!0,get:a(()=>!!d(V.touchedFields,t),"get")},isValidating:{enumerable:!0,get:a(()=>!!d(V.validatingFields,t),"get")},error:{enumerable:!0,get:a(()=>d(V.errors,t),"get")}}),[V,t]),b=v.useMemo(()=>({name:t,value:g,...Q(s)||V.disabled?{disabled:V.disabled||s}:{},onChange:a(O=>S.current.onChange({target:{value:bt(O),name:t},type:Se.CHANGE}),"onChange"),onBlur:a(()=>S.current.onBlur({target:{value:d(o._formValues,t),name:t},type:Se.BLUR}),"onBlur"),ref:a(O=>{let k=d(o._fields,t);k&&O&&(k._f.ref={focus:a(()=>O.focus(),"focus"),select:a(()=>O.select(),"select"),setCustomValidity:a(U=>O.setCustomValidity(U),"setCustomValidity"),reportValidity:a(()=>O.reportValidity(),"reportValidity")})},"ref")}),[t,o._formValues,s,V.disabled,g,o._fields]);return v.useEffect(()=>{let O=o._options.shouldUnregister||u,k=a((U,W)=>{let H=d(o._fields,U);H&&H._f&&(H._f.mount=W)},"updateMounted");if(k(t,!0),O){let U=N(d(o._options.defaultValues,t));E(o._defaultValues,t,U),R(d(o._formValues,t))&&E(o._formValues,t,U)}return!y&&o.register(t),()=>{(y?O&&!o._state.action:O)?o.unregister(t):k(t,!1)}},[t,o,y,u]),v.useEffect(()=>{o._updateDisabledField({disabled:s,fields:o._fields,name:t})},[s,t,o]),v.useMemo(()=>({field:b,formState:V,fieldState:w}),[b,V,w])}a(Gt,"useController");var Et=a(e=>e.render(Gt(e)),"Controller");var Qt=a((e,r,t,s,o)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:o||!0}}:{},"appendErrors"),le=a(()=>{let e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{let t=(Math.random()*16+e)%16|0;return(r=="x"?t:t&3|8).toString(16)})},"generateId"),Oe=a((e,r,t={})=>t.shouldFocus||R(t.shouldFocus)?t.focusName||`${e}.${R(t.focusIndex)?r:t.focusIndex}.`:"","getFocusFieldName"),Ve=a(e=>({isOnSubmit:!e||e===Y.onSubmit,isOnBlur:e===Y.onBlur,isOnChange:e===Y.onChange,isOnAll:e===Y.all,isOnTouch:e===Y.onTouched}),"getValidationModes"),Ke=a((e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length)))),"isWatched"),me=a((e,r,t,s)=>{for(let o of t||Object.keys(e)){let u=d(e,o);if(u){let{_f:y,...g}=u;if(y){if(y.refs&&y.refs[0]&&r(y.refs[0],o)&&!s)return!0;if(y.ref&&r(y.ref,y.name)&&!s)return!0;if(me(g,r))break}else if(P(g)&&me(g,r))break}}},"iterateFieldsByAction"),kt=a((e,r,t)=>{let s=J(d(e,t));return E(s,"root",r[t]),E(e,t,s),e},"updateFieldArrayRootError"),Xe=a(e=>e.type==="file","isFileInput"),re=a(e=>typeof e=="function","isFunction"),we=a(e=>{if(!Ge)return!1;let r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},"isHTMLElement"),Ae=a(e=>se(e),"isMessage"),Ze=a(e=>e.type==="radio","isRadioInput"),Ce=a(e=>e instanceof RegExp,"isRegex"),ft={value:!1,isValid:!1},yt={value:!0,isValid:!0},Rt=a(e=>{if(Array.isArray(e)){if(e.length>1){let r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!R(e[0].attributes.value)?R(e[0].value)||e[0].value===""?yt:{value:e[0].value,isValid:!0}:yt:ft}return ft},"getCheckboxValue"),mt={isValid:!1,value:null},Tt=a(e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,mt):mt,"getRadioValue");function gt(e,r,t="validate"){if(Ae(e)||Array.isArray(e)&&e.every(Ae)||Q(e)&&!e)return{type:t,message:Ae(e)?e:"",ref:r}}a(gt,"getValidateError");var ye=a(e=>P(e)&&!Ce(e)?e:{value:e,message:""},"getValueAndMessage"),ze=a(async(e,r,t,s,o,u)=>{let{ref:y,refs:g,required:V,maxLength:S,minLength:w,min:b,max:O,pattern:k,validate:U,name:W,valueAsNumber:H,mount:te}=e._f,C=d(t,W);if(!te||r.has(W))return{};let X=g?g[0]:y,Z=a(A=>{o&&X.reportValidity&&(X.setCustomValidity(Q(A)?"":A||""),X.reportValidity())},"setCustomValidity"),I={},h=Ze(y),F=pe(y),p=h||F,T=(H||Xe(y))&&R(y.value)&&R(C)||we(y)&&y.value===""||C===""||Array.isArray(C)&&!C.length,B=Qt.bind(null,W,s,I),ce=a((A,D,M,q=ae.maxLength,ee=ae.minLength)=>{let G=A?D:M;I[W]={type:A?q:ee,message:G,ref:y,...B(A?q:ee,G)}},"getMinMaxMessage");if(u?!Array.isArray(C)||!C.length:V&&(!p&&(T||z(C))||Q(C)&&!C||F&&!Rt(g).isValid||h&&!Tt(g).isValid)){let{value:A,message:D}=Ae(V)?{value:!!V,message:V}:ye(V);if(A&&(I[W]={type:ae.required,message:D,ref:X,...B(ae.required,D)},!s))return Z(D),I}if(!T&&(!z(b)||!z(O))){let A,D,M=ye(O),q=ye(b);if(!z(C)&&!isNaN(C)){let ee=y.valueAsNumber||C&&+C;z(M.value)||(A=ee>M.value),z(q.value)||(D=ee<q.value)}else{let ee=y.valueAsDate||new Date(C),G=a(Fe=>new Date(new Date().toDateString()+" "+Fe),"convertTimeToDate"),_e=y.type=="time",he=y.type=="week";se(M.value)&&C&&(A=_e?G(C)>G(M.value):he?C>M.value:ee>new Date(M.value)),se(q.value)&&C&&(D=_e?G(C)<G(q.value):he?C<q.value:ee<new Date(q.value))}if((A||D)&&(ce(!!A,M.message,q.message,ae.max,ae.min),!s))return Z(I[W].message),I}if((S||w)&&!T&&(se(C)||u&&Array.isArray(C))){let A=ye(S),D=ye(w),M=!z(A.value)&&C.length>+A.value,q=!z(D.value)&&C.length<+D.value;if((M||q)&&(ce(M,A.message,D.message),!s))return Z(I[W].message),I}if(k&&!T&&se(C)){let{value:A,message:D}=ye(k);if(Ce(A)&&!C.match(A)&&(I[W]={type:ae.pattern,message:D,ref:y,...B(ae.pattern,D)},!s))return Z(D),I}if(U){if(re(U)){let A=await U(C,t),D=gt(A,X);if(D&&(I[W]={...D,...B(ae.validate,D.message)},!s))return Z(D.message),I}else if(P(U)){let A={};for(let D in U){if(!K(A)&&!s)break;let M=gt(await U[D](C,t),X,D);M&&(A={...M,...B(D,M.message)},Z(M.message),s&&(I[W]=A))}if(!K(A)&&(I[W]={ref:X,...A},!s))return I}}return Z(!0),I},"validateField"),Le=a((e,r)=>[...e,...J(r)],"appendAt"),Me=a(e=>Array.isArray(e)?e.map(()=>{}):void 0,"fillEmptyArray");function Ne(e,r,t){return[...e.slice(0,r),...J(t),...e.slice(r)]}a(Ne,"insert");var Ue=a((e,r,t)=>Array.isArray(e)?(R(e[t])&&(e[t]=void 0),e.splice(t,0,e.splice(r,1)[0]),e):[],"moveArrayAt"),Be=a((e,r)=>[...J(r),...J(e)],"prependAt");function Yt(e,r){let t=0,s=[...e];for(let o of r)s.splice(o-t,1),t++;return xe(s).length?s:[]}a(Yt,"removeAtIndexes");var $e=a((e,r)=>R(r)?[]:Yt(e,J(r).sort((t,s)=>t-s)),"removeArrayAt"),je=a((e,r,t)=>{[e[r],e[t]]=[e[t],e[r]]},"swapArrayAt");function Xt(e,r){let t=r.slice(0,-1).length,s=0;for(;s<t;)e=R(e)?s++:e[r[s++]];return e}a(Xt,"baseGet");function Zt(e){for(let r in e)if(e.hasOwnProperty(r)&&!R(e[r]))return!1;return!0}a(Zt,"isEmptyArray");function L(e,r){let t=Array.isArray(r)?r:Qe(r)?[r]:pt(r),s=t.length===1?e:Xt(e,t),o=t.length-1,u=t[o];return s&&delete s[u],o!==0&&(P(s)&&K(s)||Array.isArray(s)&&Zt(s))&&L(e,t.slice(0,-1)),e}a(L,"unset");var _t=a((e,r,t)=>(e[r]=t,e),"updateAt");function mr(e){let r=ge(),{control:t=r.control,name:s,keyName:o="id",shouldUnregister:u,rules:y}=e,[g,V]=v.useState(t._getFieldArray(s)),S=v.useRef(t._getFieldArray(s).map(le)),w=v.useRef(g),b=v.useRef(s),O=v.useRef(!1);b.current=s,w.current=g,t._names.array.add(s),y&&t.register(s,y),Ee({next:a(({values:h,name:F})=>{if(F===b.current||!F){let p=d(h,b.current);Array.isArray(p)&&(V(p),S.current=p.map(le))}},"next"),subject:t._subjects.array});let k=v.useCallback(h=>{O.current=!0,t._updateFieldArray(s,h)},[t,s]),U=a((h,F)=>{let p=J(N(h)),T=Le(t._getFieldArray(s),p);t._names.focus=Oe(s,T.length-1,F),S.current=Le(S.current,p.map(le)),k(T),V(T),t._updateFieldArray(s,T,Le,{argA:Me(h)})},"append"),W=a((h,F)=>{let p=J(N(h)),T=Be(t._getFieldArray(s),p);t._names.focus=Oe(s,0,F),S.current=Be(S.current,p.map(le)),k(T),V(T),t._updateFieldArray(s,T,Be,{argA:Me(h)})},"prepend"),H=a(h=>{let F=$e(t._getFieldArray(s),h);S.current=$e(S.current,h),k(F),V(F),!Array.isArray(d(t._fields,s))&&E(t._fields,s,void 0),t._updateFieldArray(s,F,$e,{argA:h})},"remove"),te=a((h,F,p)=>{let T=J(N(F)),B=Ne(t._getFieldArray(s),h,T);t._names.focus=Oe(s,h,p),S.current=Ne(S.current,h,T.map(le)),k(B),V(B),t._updateFieldArray(s,B,Ne,{argA:h,argB:Me(F)})},"insert$1"),C=a((h,F)=>{let p=t._getFieldArray(s);je(p,h,F),je(S.current,h,F),k(p),V(p),t._updateFieldArray(s,p,je,{argA:h,argB:F},!1)},"swap"),X=a((h,F)=>{let p=t._getFieldArray(s);Ue(p,h,F),Ue(S.current,h,F),k(p),V(p),t._updateFieldArray(s,p,Ue,{argA:h,argB:F},!1)},"move"),Z=a((h,F)=>{let p=N(F),T=_t(t._getFieldArray(s),h,p);S.current=[...T].map((B,ce)=>!B||ce===h?le():S.current[ce]),k(T),V([...T]),t._updateFieldArray(s,T,_t,{argA:h,argB:p},!0,!1)},"update"),I=a(h=>{let F=J(N(h));S.current=F.map(le),k([...F]),V([...F]),t._updateFieldArray(s,[...F],p=>p,{},!0,!1)},"replace");return v.useEffect(()=>{if(t._state.action=!1,Ke(s,t._names)&&t._subjects.state.next({...t._formState}),O.current&&(!Ve(t._options.mode).isOnSubmit||t._formState.isSubmitted))if(t._options.resolver)t._executeSchema([s]).then(h=>{let F=d(h.errors,s),p=d(t._formState.errors,s);(p?!F&&p.type||F&&(p.type!==F.type||p.message!==F.message):F&&F.type)&&(F?E(t._formState.errors,s,F):L(t._formState.errors,s),t._subjects.state.next({errors:t._formState.errors}))});else{let h=d(t._fields,s);h&&h._f&&!(Ve(t._options.reValidateMode).isOnSubmit&&Ve(t._options.mode).isOnSubmit)&&ze(h,t._names.disabled,t._formValues,t._options.criteriaMode===Y.all,t._options.shouldUseNativeValidation,!0).then(F=>!K(F)&&t._subjects.state.next({errors:kt(t._formState.errors,F,s)}))}t._subjects.values.next({name:s,values:{...t._formValues}}),t._names.focus&&me(t._fields,(h,F)=>{if(t._names.focus&&F.startsWith(t._names.focus)&&h.focus)return h.focus(),1}),t._names.focus="",t._updateValid(),O.current=!1},[g,s,t]),v.useEffect(()=>(!d(t._formValues,s)&&t._updateFieldArray(s),()=>{(t._options.shouldUnregister||u)&&t.unregister(s)}),[s,t,o,u]),{swap:v.useCallback(C,[k,s,t]),move:v.useCallback(X,[k,s,t]),prepend:v.useCallback(W,[k,s,t]),append:v.useCallback(U,[k,s,t]),remove:v.useCallback(H,[k,s,t]),insert:v.useCallback(te,[k,s,t]),update:v.useCallback(Z,[k,s,t]),replace:v.useCallback(I,[k,s,t]),fields:v.useMemo(()=>g.map((h,F)=>({...h,[o]:S.current[F]||le()})),[g,o])}}a(mr,"useFieldArray");var We=a(()=>{let e=[];return{get observers(){return e},next:a(o=>{for(let u of e)u.next&&u.next(o)},"next"),subscribe:a(o=>(e.push(o),{unsubscribe:a(()=>{e=e.filter(u=>u!==o)},"unsubscribe")}),"subscribe"),unsubscribe:a(()=>{e=[]},"unsubscribe")}},"createSubject"),Je=a(e=>z(e)||!vt(e),"isPrimitive");function ue(e,r){if(Je(e)||Je(r))return e===r;if(de(e)&&de(r))return e.getTime()===r.getTime();let t=Object.keys(e),s=Object.keys(r);if(t.length!==s.length)return!1;for(let o of t){let u=e[o];if(!s.includes(o))return!1;if(o!=="ref"){let y=r[o];if(de(u)&&de(y)||P(u)&&P(y)||Array.isArray(u)&&Array.isArray(y)?!ue(u,y):u!==y)return!1}}return!0}a(ue,"deepEqual");var It=a(e=>e.type==="select-multiple","isMultipleSelect"),er=a(e=>Ze(e)||pe(e),"isRadioOrCheckbox"),qe=a(e=>we(e)&&e.isConnected,"live"),Pt=a(e=>{for(let r in e)if(re(e[r]))return!0;return!1},"objectHasFunction");function De(e,r={}){let t=Array.isArray(e);if(P(e)||t)for(let s in e)Array.isArray(e[s])||P(e[s])&&!Pt(e[s])?(r[s]=Array.isArray(e[s])?[]:{},De(e[s],r[s])):z(e[s])||(r[s]=!0);return r}a(De,"markFieldsDirty");function Ot(e,r,t){let s=Array.isArray(e);if(P(e)||s)for(let o in e)Array.isArray(e[o])||P(e[o])&&!Pt(e[o])?R(r)||Je(t[o])?t[o]=Array.isArray(e[o])?De(e[o],[]):{...De(e[o])}:Ot(e[o],z(r)?{}:r[o],t[o]):t[o]=!ue(e[o],r[o]);return t}a(Ot,"getDirtyFieldsFromDefaultValues");var ve=a((e,r)=>Ot(e,r,De(r)),"getDirtyFields"),Lt=a((e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>R(e)?e:r?e===""?NaN:e&&+e:t&&se(e)?new Date(e):s?s(e):e,"getFieldValueAs");function He(e){let r=e.ref;return Xe(r)?r.files:Ze(r)?Tt(e.refs).value:It(r)?[...r.selectedOptions].map(({value:t})=>t):pe(r)?Rt(e.refs).value:Lt(R(r.value)?e.ref.value:r.value,e)}a(He,"getFieldValue");var tr=a((e,r,t,s)=>{let o={};for(let u of e){let y=d(r,u);y&&E(o,u,y._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:s}},"getResolverOptions"),be=a(e=>R(e)?e:Ce(e)?e.source:P(e)?Ce(e.value)?e.value.source:e.value:e,"getRuleValue"),ht="AsyncFunction",rr=a(e=>!!e&&!!e.validate&&!!(re(e.validate)&&e.validate.constructor.name===ht||P(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===ht)),"hasPromiseValidation"),sr=a(e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),"hasValidation");function Ft(e,r,t){let s=d(e,t);if(s||Qe(t))return{error:s,name:t};let o=t.split(".");for(;o.length;){let u=o.join("."),y=d(r,u),g=d(e,u);if(y&&!Array.isArray(y)&&t!==u)return{name:t};if(g&&g.type)return{name:u,error:g};o.pop()}return{name:t}}a(Ft,"schemaErrorLookup");var ir=a((e,r,t,s,o)=>o.isOnAll?!1:!t&&o.isOnTouch?!(r||e):(t?s.isOnBlur:o.isOnBlur)?!e:(t?s.isOnChange:o.isOnChange)?e:!0,"skipValidation"),ar=a((e,r)=>!xe(d(e,r)).length&&L(e,r),"unsetEmptyArray"),nr={mode:Y.onSubmit,reValidateMode:Y.onChange,shouldFocusError:!0};function or(e={}){let r={...nr,...e},t={submitCount:0,isDirty:!1,isLoading:re(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},o=P(r.defaultValues)||P(r.values)?N(r.defaultValues||r.values)||{}:{},u=r.shouldUnregister?{}:N(o),y={action:!1,mount:!1,watch:!1},g={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},V,S=0,w={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},b={values:We(),array:We(),state:We()},O=Ve(r.mode),k=Ve(r.reValidateMode),U=r.criteriaMode===Y.all,W=a(i=>n=>{clearTimeout(S),S=setTimeout(i,n)},"debounce"),H=a(async i=>{if(!r.disabled&&(w.isValid||i)){let n=r.resolver?K((await p()).errors):await B(s,!0);n!==t.isValid&&b.state.next({isValid:n})}},"_updateValid"),te=a((i,n)=>{!r.disabled&&(w.isValidating||w.validatingFields)&&((i||Array.from(g.mount)).forEach(l=>{l&&(n?E(t.validatingFields,l,n):L(t.validatingFields,l))}),b.state.next({validatingFields:t.validatingFields,isValidating:!K(t.validatingFields)}))},"_updateIsValidating"),C=a((i,n=[],l,m,f=!0,c=!0)=>{if(m&&l&&!r.disabled){if(y.action=!0,c&&Array.isArray(d(s,i))){let _=l(d(s,i),m.argA,m.argB);f&&E(s,i,_)}if(c&&Array.isArray(d(t.errors,i))){let _=l(d(t.errors,i),m.argA,m.argB);f&&E(t.errors,i,_),ar(t.errors,i)}if(w.touchedFields&&c&&Array.isArray(d(t.touchedFields,i))){let _=l(d(t.touchedFields,i),m.argA,m.argB);f&&E(t.touchedFields,i,_)}w.dirtyFields&&(t.dirtyFields=ve(o,u)),b.state.next({name:i,isDirty:A(i,n),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else E(u,i,n)},"_updateFieldArray"),X=a((i,n)=>{E(t.errors,i,n),b.state.next({errors:t.errors})},"updateErrors"),Z=a(i=>{t.errors=i,b.state.next({errors:t.errors,isValid:!1})},"_setErrors"),I=a((i,n,l,m)=>{let f=d(s,i);if(f){let c=d(u,i,R(l)?d(o,i):l);R(c)||m&&m.defaultChecked||n?E(u,i,n?c:He(f._f)):q(i,c),y.mount&&H()}},"updateValidAndValue"),h=a((i,n,l,m,f)=>{let c=!1,_=!1,x={name:i};if(!r.disabled){let $=!!(d(s,i)&&d(s,i)._f&&d(s,i)._f.disabled);if(!l||m){w.isDirty&&(_=t.isDirty,t.isDirty=x.isDirty=A(),c=_!==x.isDirty);let j=$||ue(d(o,i),n);_=!!(!$&&d(t.dirtyFields,i)),j||$?L(t.dirtyFields,i):E(t.dirtyFields,i,!0),x.dirtyFields=t.dirtyFields,c=c||w.dirtyFields&&_!==!j}if(l){let j=d(t.touchedFields,i);j||(E(t.touchedFields,i,l),x.touchedFields=t.touchedFields,c=c||w.touchedFields&&j!==l)}c&&f&&b.state.next(x)}return c?x:{}},"updateTouchAndDirty"),F=a((i,n,l,m)=>{let f=d(t.errors,i),c=w.isValid&&Q(n)&&t.isValid!==n;if(r.delayError&&l?(V=W(()=>X(i,l)),V(r.delayError)):(clearTimeout(S),V=null,l?E(t.errors,i,l):L(t.errors,i)),(l?!ue(f,l):f)||!K(m)||c){let _={...m,...c&&Q(n)?{isValid:n}:{},errors:t.errors,name:i};t={...t,..._},b.state.next(_)}},"shouldRenderByError"),p=a(async i=>{te(i,!0);let n=await r.resolver(u,r.context,tr(i||g.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return te(i),n},"_executeSchema"),T=a(async i=>{let{errors:n}=await p(i);if(i)for(let l of i){let m=d(n,l);m?E(t.errors,l,m):L(t.errors,l)}else t.errors=n;return n},"executeSchemaAndUpdateState"),B=a(async(i,n,l={valid:!0})=>{for(let m in i){let f=i[m];if(f){let{_f:c,..._}=f;if(c){let x=g.array.has(c.name),$=f._f&&rr(f._f);$&&w.validatingFields&&te([m],!0);let j=await ze(f,g.disabled,u,U,r.shouldUseNativeValidation&&!n,x);if($&&w.validatingFields&&te([m]),j[c.name]&&(l.valid=!1,n))break;!n&&(d(j,c.name)?x?kt(t.errors,j,c.name):E(t.errors,c.name,j[c.name]):L(t.errors,c.name))}!K(_)&&await B(_,n,l)}}return l.valid},"executeBuiltInValidation"),ce=a(()=>{for(let i of g.unMount){let n=d(s,i);n&&(n._f.refs?n._f.refs.every(l=>!qe(l)):!qe(n._f.ref))&&Re(i)}g.unMount=new Set},"_removeUnmounted"),A=a((i,n)=>!r.disabled&&(i&&n&&E(u,i,n),!ue(et(),o)),"_getDirty"),D=a((i,n,l)=>Dt(i,g,{...y.mount?u:R(n)?o:se(i)?{[i]:n}:n},l,n),"_getWatch"),M=a(i=>xe(d(y.mount?u:o,i,r.shouldUnregister?d(o,i,[]):[])),"_getFieldArray"),q=a((i,n,l={})=>{let m=d(s,i),f=n;if(m){let c=m._f;c&&(!c.disabled&&E(u,i,Lt(n,c)),f=we(c.ref)&&z(n)?"":n,It(c.ref)?[...c.ref.options].forEach(_=>_.selected=f.includes(_.value)):c.refs?pe(c.ref)?c.refs.length>1?c.refs.forEach(_=>(!_.defaultChecked||!_.disabled)&&(_.checked=Array.isArray(f)?!!f.find(x=>x===_.value):f===_.value)):c.refs[0]&&(c.refs[0].checked=!!f):c.refs.forEach(_=>_.checked=_.value===f):Xe(c.ref)?c.ref.value="":(c.ref.value=f,c.ref.type||b.values.next({name:i,values:{...u}})))}(l.shouldDirty||l.shouldTouch)&&h(i,f,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&Fe(i)},"setFieldValue"),ee=a((i,n,l)=>{for(let m in n){let f=n[m],c=`${i}.${m}`,_=d(s,c);(g.array.has(i)||P(f)||_&&!_._f)&&!de(f)?ee(c,f,l):q(c,f,l)}},"setValues"),G=a((i,n,l={})=>{let m=d(s,i),f=g.array.has(i),c=N(n);E(u,i,c),f?(b.array.next({name:i,values:{...u}}),(w.isDirty||w.dirtyFields)&&l.shouldDirty&&b.state.next({name:i,dirtyFields:ve(o,u),isDirty:A(i,c)})):m&&!m._f&&!z(c)?ee(i,c,l):q(i,c,l),Ke(i,g)&&b.state.next({...t}),b.values.next({name:y.mount?i:void 0,values:{...u}})},"setValue"),_e=a(async i=>{y.mount=!0;let n=i.target,l=n.name,m=!0,f=d(s,l),c=a(()=>n.type?He(f._f):bt(i),"getCurrentFieldValue"),_=a(x=>{m=Number.isNaN(x)||de(x)&&isNaN(x.getTime())||ue(x,d(u,l,x))},"_updateIsFieldValueUpdated");if(f){let x,$,j=c(),oe=i.type===Se.BLUR||i.type===Se.FOCUS_OUT,Wt=!sr(f._f)&&!r.resolver&&!d(t.errors,l)&&!f._f.deps||ir(oe,d(t.touchedFields,l),t.isSubmitted,k,O),Ie=Ke(l,g,oe);E(u,l,j),oe?(f._f.onBlur&&f._f.onBlur(i),V&&V(0)):f._f.onChange&&f._f.onChange(i);let Pe=h(l,j,oe,!1),qt=!K(Pe)||Ie;if(!oe&&b.values.next({name:l,type:i.type,values:{...u}}),Wt)return w.isValid&&(r.mode==="onBlur"&&oe?H():oe||H()),qt&&b.state.next({name:l,...Ie?{}:Pe});if(!oe&&Ie&&b.state.next({...t}),r.resolver){let{errors:lt}=await p([l]);if(_(j),m){let Ht=Ft(t.errors,s,l),ut=Ft(lt,s,Ht.name||l);x=ut.error,l=ut.name,$=K(lt)}}else te([l],!0),x=(await ze(f,g.disabled,u,U,r.shouldUseNativeValidation))[l],te([l]),_(j),m&&(x?$=!1:w.isValid&&($=await B(s,!0)));m&&(f._f.deps&&Fe(f._f.deps),F(l,$,x,Pe))}},"onChange"),he=a((i,n)=>{if(d(t.errors,n)&&i.focus)return i.focus(),1},"_focusInput"),Fe=a(async(i,n={})=>{let l,m,f=J(i);if(r.resolver){let c=await T(R(i)?i:f);l=K(c),m=i?!f.some(_=>d(c,_)):l}else i?(m=(await Promise.all(f.map(async c=>{let _=d(s,c);return await B(_&&_._f?{[c]:_}:_)}))).every(Boolean),!(!m&&!t.isValid)&&H()):m=l=await B(s);return b.state.next({...!se(i)||w.isValid&&l!==t.isValid?{}:{name:i},...r.resolver||!i?{isValid:l}:{},errors:t.errors}),n.shouldFocus&&!m&&me(s,he,i?f:g.mount),m},"trigger"),et=a(i=>{let n={...y.mount?u:o};return R(i)?n:se(i)?d(n,i):i.map(l=>d(n,l))},"getValues"),tt=a((i,n)=>({invalid:!!d((n||t).errors,i),isDirty:!!d((n||t).dirtyFields,i),error:d((n||t).errors,i),isValidating:!!d(t.validatingFields,i),isTouched:!!d((n||t).touchedFields,i)}),"getFieldState"),Ut=a(i=>{i&&J(i).forEach(n=>L(t.errors,n)),b.state.next({errors:i?t.errors:{}})},"clearErrors"),rt=a((i,n,l)=>{let m=(d(s,i,{_f:{}})._f||{}).ref,f=d(t.errors,i)||{},{ref:c,message:_,type:x,...$}=f;E(t.errors,i,{...$,...n,ref:m}),b.state.next({name:i,errors:t.errors,isValid:!1}),l&&l.shouldFocus&&m&&m.focus&&m.focus()},"setError"),Bt=a((i,n)=>re(i)?b.values.subscribe({next:a(l=>i(D(void 0,n),l),"next")}):D(i,n,!0),"watch"),Re=a((i,n={})=>{for(let l of i?J(i):g.mount)g.mount.delete(l),g.array.delete(l),n.keepValue||(L(s,l),L(u,l)),!n.keepError&&L(t.errors,l),!n.keepDirty&&L(t.dirtyFields,l),!n.keepTouched&&L(t.touchedFields,l),!n.keepIsValidating&&L(t.validatingFields,l),!r.shouldUnregister&&!n.keepDefaultValue&&L(o,l);b.values.next({values:{...u}}),b.state.next({...t,...n.keepDirty?{isDirty:A()}:{}}),!n.keepIsValid&&H()},"unregister"),st=a(({disabled:i,name:n,field:l,fields:m})=>{(Q(i)&&y.mount||i||g.disabled.has(n))&&(i?g.disabled.add(n):g.disabled.delete(n),h(n,He(l?l._f:d(m,n)._f),!1,!1,!0))},"_updateDisabledField"),Te=a((i,n={})=>{let l=d(s,i),m=Q(n.disabled)||Q(r.disabled);return E(s,i,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:i}},name:i,mount:!0,...n}}),g.mount.add(i),l?st({field:l,disabled:Q(n.disabled)?n.disabled:r.disabled,name:i}):I(i,!0,n.value),{...m?{disabled:n.disabled||r.disabled}:{},...r.progressive?{required:!!n.required,min:be(n.min),max:be(n.max),minLength:be(n.minLength),maxLength:be(n.maxLength),pattern:be(n.pattern)}:{},name:i,onChange:_e,onBlur:_e,ref:a(f=>{if(f){Te(i,n),l=d(s,i);let c=R(f.value)&&f.querySelectorAll&&f.querySelectorAll("input,select,textarea")[0]||f,_=er(c),x=l._f.refs||[];if(_?x.find($=>$===c):c===l._f.ref)return;E(s,i,{_f:{...l._f,..._?{refs:[...x.filter(qe),c,...Array.isArray(d(o,i))?[{}]:[]],ref:{type:c.type,name:i}}:{ref:c}}}),I(i,!1,void 0,c)}else l=d(s,i,{}),l._f&&(l._f.mount=!1),(r.shouldUnregister||n.shouldUnregister)&&!(Vt(g.array,i)&&y.action)&&g.unMount.add(i)},"ref")}},"register"),it=a(()=>r.shouldFocusError&&me(s,he,g.mount),"_focusError"),$t=a(i=>{Q(i)&&(b.state.next({disabled:i}),me(s,(n,l)=>{let m=d(s,l);m&&(n.disabled=m._f.disabled||i,Array.isArray(m._f.refs)&&m._f.refs.forEach(f=>{f.disabled=m._f.disabled||i}))},0,!1))},"_disableForm"),at=a((i,n)=>async l=>{let m;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let f=N(u);if(g.disabled.size)for(let c of g.disabled)E(f,c,void 0);if(b.state.next({isSubmitting:!0}),r.resolver){let{errors:c,values:_}=await p();t.errors=c,f=_}else await B(s);if(L(t.errors,"root"),K(t.errors)){b.state.next({errors:{}});try{await i(f,l)}catch(c){m=c}}else n&&await n({...t.errors},l),it(),setTimeout(it);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:K(t.errors)&&!m,submitCount:t.submitCount+1,errors:t.errors}),m)throw m},"handleSubmit"),jt=a((i,n={})=>{d(s,i)&&(R(n.defaultValue)?G(i,N(d(o,i))):(G(i,n.defaultValue),E(o,i,N(n.defaultValue))),n.keepTouched||L(t.touchedFields,i),n.keepDirty||(L(t.dirtyFields,i),t.isDirty=n.defaultValue?A(i,N(d(o,i))):A()),n.keepError||(L(t.errors,i),w.isValid&&H()),b.state.next({...t}))},"resetField"),nt=a((i,n={})=>{let l=i?N(i):o,m=N(l),f=K(i),c=f?o:m;if(n.keepDefaultValues||(o=l),!n.keepValues){if(n.keepDirtyValues){let _=new Set([...g.mount,...Object.keys(ve(o,u))]);for(let x of Array.from(_))d(t.dirtyFields,x)?E(c,x,d(u,x)):G(x,d(c,x))}else{if(Ge&&R(i))for(let _ of g.mount){let x=d(s,_);if(x&&x._f){let $=Array.isArray(x._f.refs)?x._f.refs[0]:x._f.ref;if(we($)){let j=$.closest("form");if(j){j.reset();break}}}}s={}}u=r.shouldUnregister?n.keepDefaultValues?N(o):{}:N(c),b.array.next({values:{...c}}),b.values.next({values:{...c}})}g={mount:n.keepDirtyValues?g.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},y.mount=!w.isValid||!!n.keepIsValid||!!n.keepDirtyValues,y.watch=!!r.shouldUnregister,b.state.next({submitCount:n.keepSubmitCount?t.submitCount:0,isDirty:f?!1:n.keepDirty?t.isDirty:!!(n.keepDefaultValues&&!ue(i,o)),isSubmitted:n.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:f?{}:n.keepDirtyValues?n.keepDefaultValues&&u?ve(o,u):t.dirtyFields:n.keepDefaultValues&&i?ve(o,i):n.keepDirty?t.dirtyFields:{},touchedFields:n.keepTouched?t.touchedFields:{},errors:n.keepErrors?t.errors:{},isSubmitSuccessful:n.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},"_reset"),ot=a((i,n)=>nt(re(i)?i(u):i,n),"reset");return{control:{register:Te,unregister:Re,getFieldState:tt,handleSubmit:at,setError:rt,_executeSchema:p,_getWatch:D,_getDirty:A,_updateValid:H,_removeUnmounted:ce,_updateFieldArray:C,_updateDisabledField:st,_getFieldArray:M,_reset:nt,_resetDefaultValues:a(()=>re(r.defaultValues)&&r.defaultValues().then(i=>{ot(i,r.resetOptions),b.state.next({isLoading:!1})}),"_resetDefaultValues"),_updateFormState:a(i=>{t={...t,...i}},"_updateFormState"),_disableForm:$t,_subjects:b,_proxyFormState:w,_setErrors:Z,get _fields(){return s},get _formValues(){return u},get _state(){return y},set _state(i){y=i},get _defaultValues(){return o},get _names(){return g},set _names(i){g=i},get _formState(){return t},set _formState(i){t=i},get _options(){return r},set _options(i){r={...r,...i}}},trigger:Fe,register:Te,handleSubmit:at,watch:Bt,setValue:G,getValues:et,reset:ot,resetField:jt,clearErrors:Ut,unregister:Re,setError:rt,setFocus:a((i,n={})=>{let l=d(s,i),m=l&&l._f;if(m){let f=m.refs?m.refs[0]:m.ref;f.focus&&(f.focus(),n.shouldSelect&&re(f.select)&&f.select())}},"setFocus"),getFieldState:tt}}a(or,"createFormControl");function gr(e={}){let r=v.useRef(void 0),t=v.useRef(void 0),[s,o]=v.useState({isDirty:!1,isValidating:!1,isLoading:re(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:re(e.defaultValues)?void 0:e.defaultValues});r.current||(r.current={...or(e),formState:s});let u=r.current.control;return u._options=e,Ee({subject:u._subjects.state,next:a(y=>{wt(y,u._proxyFormState,u._updateFormState,!0)&&o({...u._formState})},"next")}),v.useEffect(()=>u._disableForm(e.disabled),[u,e.disabled]),v.useEffect(()=>{if(u._proxyFormState.isDirty){let y=u._getDirty();y!==s.isDirty&&u._subjects.state.next({isDirty:y})}},[u,s.isDirty]),v.useEffect(()=>{e.values&&!ue(e.values,t.current)?(u._reset(e.values,u._options.resetOptions),t.current=e.values,o(y=>({...y}))):u._resetDefaultValues()},[e.values,u]),v.useEffect(()=>{e.errors&&u._setErrors(e.errors)},[e.errors,u]),v.useEffect(()=>{u._state.mount||(u._updateValid(),u._state.mount=!0),u._state.watch&&(u._state.watch=!1,u._subjects.state.next({...u._formState})),u._removeUnmounted()}),v.useEffect(()=>{e.shouldUnregister&&u._subjects.values.next({values:u._getWatch()})},[e.shouldUnregister,u]),r.current.formState=St(s,u),r.current}a(gr,"useForm");import{Slot as lr}from"@radix-ui/react-slot";import*as ie from"react";import{jsx as ne}from"react/jsx-runtime";var Sr=At,Mt=ie.createContext({}),wr=a(({...e})=>ne(Mt.Provider,{value:{name:e.name},children:ne(Et,{...e})}),"FormField"),ke=a(()=>{let e=ie.useContext(Mt),r=ie.useContext(Nt),{getFieldState:t}=ge(),s=Ye({name:e.name}),o=t(e.name,s);if(!e)throw new Error("useFormField should be used within <FormField>");let{id:u}=r;return{id:u,name:e.name,formItemId:`${u}-form-item`,formDescriptionId:`${u}-form-item-description`,formMessageId:`${u}-form-item-message`,...o}},"useFormField"),Nt=ie.createContext({});function Cr({className:e,...r}){let t=ie.useId();return ne(Nt.Provider,{value:{id:t},children:ne("div",{"data-slot":"form-item",...r,className:fe("grid gap-2",e)})})}a(Cr,"FormItem");function Dr({className:e,...r}){let{error:t,formItemId:s}=ke();return ne(dt,{"data-slot":"form-label","data-error":!!t,className:fe("text-base-color mb-1 data-[error=true]:text-destructive",e),htmlFor:s,...r})}a(Dr,"FormLabel");var ur=ie.forwardRef(({...e},r)=>{let{error:t,formItemId:s,formDescriptionId:o,formMessageId:u}=ke();return ne(lr,{"data-slot":"form-control",ref:r,id:s,"aria-describedby":t?`${o} ${u}`:`${o}`,"aria-invalid":!!t,...e})});ur.displayName="FormControl";function Er({className:e,children:r,...t}){let{formDescriptionId:s}=ke();return typeof r=="string"?ne("p",{"data-slot":"form-description",id:s,className:fe("text-base-color text-xs",e),dangerouslySetInnerHTML:{__html:ct(r)},...t}):ne("p",{"data-slot":"form-description",id:s,className:fe("text-base-color text-xs",e),...t,children:typeof r=="function"?r():r})}a(Er,"FormDescription");function kr({className:e,...r}){let{error:t,formMessageId:s}=ke(),o=t?String(t?.message??""):r.children;return o?ne("p",{"data-slot":"form-message",id:s,className:fe("text-destructive text-sm",e),...r,children:o}):null}a(kr,"FormMessage");export{d as a,E as b,ge as c,Qt as d,mr as e,gr as f,Sr as g,wr as h,Cr as i,Dr as j,ur as k,Er as l,kr as m};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as dt}from"./chunk-XVW2URFK.js";import{a as fe,e as ct}from"./chunk-54KJP7WD.js";import{a}from"./chunk-P37U34EQ.js";import v from"react";var pe=a(e=>e.type==="checkbox","isCheckBoxInput"),de=a(e=>e instanceof Date,"isDateObject"),z=a(e=>e==null,"isNullOrUndefined"),vt=a(e=>typeof e=="object","isObjectType"),P=a(e=>!z(e)&&!Array.isArray(e)&&vt(e)&&!de(e),"isObject"),bt=a(e=>P(e)&&e.target?pe(e.target)?e.target.checked:e.target.value:e,"getEventValue"),Kt=a(e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,"getNodeParentName"),Vt=a((e,r)=>e.has(Kt(r)),"isNameInFieldArray"),zt=a(e=>{let r=e.constructor&&e.constructor.prototype;return P(r)&&r.hasOwnProperty("isPrototypeOf")},"isPlainObject"),Ge=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function N(e){let r,t=Array.isArray(e),s=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)r=new Date(e);else if(e instanceof Set)r=new Set(e);else if(!(Ge&&(e instanceof Blob||s))&&(t||P(e)))if(r=t?[]:{},!t&&!zt(e))r=e;else for(let o in e)e.hasOwnProperty(o)&&(r[o]=N(e[o]));else return e;return r}a(N,"cloneObject");var xe=a(e=>Array.isArray(e)?e.filter(Boolean):[],"compact"),R=a(e=>e===void 0,"isUndefined"),d=a((e,r,t)=>{if(!r||!P(e))return t;let s=xe(r.split(/[,[\].]+?/)).reduce((o,u)=>z(o)?o:o[u],e);return R(s)||s===e?R(e[r])?t:e[r]:s},"get"),Q=a(e=>typeof e=="boolean","isBoolean"),Qe=a(e=>/^\w*$/.test(e),"isKey"),pt=a(e=>xe(e.replace(/["|']|\]/g,"").split(/\.|\[/)),"stringToPath"),E=a((e,r,t)=>{let s=-1,o=Qe(r)?[r]:pt(r),u=o.length,y=u-1;for(;++s<u;){let g=o[s],V=t;if(s!==y){let S=e[g];V=P(S)||Array.isArray(S)?S:isNaN(+o[s+1])?{}:[]}if(g==="__proto__"||g==="constructor"||g==="prototype")return;e[g]=V,e=e[g]}return e},"set"),Se={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Y={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ae={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},xt=v.createContext(null),ge=a(()=>v.useContext(xt),"useFormContext"),At=a(e=>{let{children:r,...t}=e;return v.createElement(xt.Provider,{value:t},r)},"FormProvider"),St=a((e,r,t,s=!0)=>{let o={defaultValues:r._defaultValues};for(let u in e)Object.defineProperty(o,u,{get:a(()=>{let y=u;return r._proxyFormState[y]!==Y.all&&(r._proxyFormState[y]=!s||Y.all),t&&(t[y]=!0),e[y]},"get")});return o},"getProxyFormState"),K=a(e=>P(e)&&!Object.keys(e).length,"isEmptyObject"),wt=a((e,r,t,s)=>{t(e);let{name:o,...u}=e;return K(u)||Object.keys(u).length>=Object.keys(r).length||Object.keys(u).find(y=>r[y]===(!s||Y.all))},"shouldRenderFormState"),J=a(e=>Array.isArray(e)?e:[e],"convertToArrayPayload"),Ct=a((e,r,t)=>!e||!r||e===r||J(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),"shouldSubscribeByName");function Ee(e){let r=v.useRef(e);r.current=e,v.useEffect(()=>{let t=!e.disabled&&r.current.subject&&r.current.subject.subscribe({next:r.current.next});return()=>{t&&t.unsubscribe()}},[e.disabled])}a(Ee,"useSubscribe");function Ye(e){let r=ge(),{control:t=r.control,disabled:s,name:o,exact:u}=e||{},[y,g]=v.useState(t._formState),V=v.useRef(!0),S=v.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),w=v.useRef(o);return w.current=o,Ee({disabled:s,next:a(b=>V.current&&Ct(w.current,b.name,u)&&wt(b,S.current,t._updateFormState)&&g({...t._formState,...b}),"next"),subject:t._subjects.state}),v.useEffect(()=>(V.current=!0,S.current.isValid&&t._updateValid(!0),()=>{V.current=!1}),[t]),v.useMemo(()=>St(y,t,S.current,!1),[y,t])}a(Ye,"useFormState");var se=a(e=>typeof e=="string","isString"),Dt=a((e,r,t,s,o)=>se(e)?(s&&r.watch.add(e),d(t,e,o)):Array.isArray(e)?e.map(u=>(s&&r.watch.add(u),d(t,u))):(s&&(r.watchAll=!0),t),"generateWatchOutput");function Jt(e){let r=ge(),{control:t=r.control,name:s,defaultValue:o,disabled:u,exact:y}=e||{},g=v.useRef(s);g.current=s,Ee({disabled:u,subject:t._subjects.values,next:a(w=>{Ct(g.current,w.name,y)&&S(N(Dt(g.current,t._names,w.values||t._formValues,!1,o)))},"next")});let[V,S]=v.useState(t._getWatch(s,o));return v.useEffect(()=>t._removeUnmounted()),V}a(Jt,"useWatch");function Gt(e){let r=ge(),{name:t,disabled:s,control:o=r.control,shouldUnregister:u}=e,y=Vt(o._names.array,t),g=Jt({control:o,name:t,defaultValue:d(o._formValues,t,d(o._defaultValues,t,e.defaultValue)),exact:!0}),V=Ye({control:o,name:t,exact:!0}),S=v.useRef(o.register(t,{...e.rules,value:g,...Q(e.disabled)?{disabled:e.disabled}:{}})),w=v.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:a(()=>!!d(V.errors,t),"get")},isDirty:{enumerable:!0,get:a(()=>!!d(V.dirtyFields,t),"get")},isTouched:{enumerable:!0,get:a(()=>!!d(V.touchedFields,t),"get")},isValidating:{enumerable:!0,get:a(()=>!!d(V.validatingFields,t),"get")},error:{enumerable:!0,get:a(()=>d(V.errors,t),"get")}}),[V,t]),b=v.useMemo(()=>({name:t,value:g,...Q(s)||V.disabled?{disabled:V.disabled||s}:{},onChange:a(O=>S.current.onChange({target:{value:bt(O),name:t},type:Se.CHANGE}),"onChange"),onBlur:a(()=>S.current.onBlur({target:{value:d(o._formValues,t),name:t},type:Se.BLUR}),"onBlur"),ref:a(O=>{let k=d(o._fields,t);k&&O&&(k._f.ref={focus:a(()=>O.focus(),"focus"),select:a(()=>O.select(),"select"),setCustomValidity:a(U=>O.setCustomValidity(U),"setCustomValidity"),reportValidity:a(()=>O.reportValidity(),"reportValidity")})},"ref")}),[t,o._formValues,s,V.disabled,g,o._fields]);return v.useEffect(()=>{let O=o._options.shouldUnregister||u,k=a((U,W)=>{let H=d(o._fields,U);H&&H._f&&(H._f.mount=W)},"updateMounted");if(k(t,!0),O){let U=N(d(o._options.defaultValues,t));E(o._defaultValues,t,U),R(d(o._formValues,t))&&E(o._formValues,t,U)}return!y&&o.register(t),()=>{(y?O&&!o._state.action:O)?o.unregister(t):k(t,!1)}},[t,o,y,u]),v.useEffect(()=>{o._updateDisabledField({disabled:s,fields:o._fields,name:t})},[s,t,o]),v.useMemo(()=>({field:b,formState:V,fieldState:w}),[b,V,w])}a(Gt,"useController");var Et=a(e=>e.render(Gt(e)),"Controller");var Qt=a((e,r,t,s,o)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:o||!0}}:{},"appendErrors"),le=a(()=>{let e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{let t=(Math.random()*16+e)%16|0;return(r=="x"?t:t&3|8).toString(16)})},"generateId"),Oe=a((e,r,t={})=>t.shouldFocus||R(t.shouldFocus)?t.focusName||`${e}.${R(t.focusIndex)?r:t.focusIndex}.`:"","getFocusFieldName"),Ve=a(e=>({isOnSubmit:!e||e===Y.onSubmit,isOnBlur:e===Y.onBlur,isOnChange:e===Y.onChange,isOnAll:e===Y.all,isOnTouch:e===Y.onTouched}),"getValidationModes"),Ke=a((e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length)))),"isWatched"),me=a((e,r,t,s)=>{for(let o of t||Object.keys(e)){let u=d(e,o);if(u){let{_f:y,...g}=u;if(y){if(y.refs&&y.refs[0]&&r(y.refs[0],o)&&!s)return!0;if(y.ref&&r(y.ref,y.name)&&!s)return!0;if(me(g,r))break}else if(P(g)&&me(g,r))break}}},"iterateFieldsByAction"),kt=a((e,r,t)=>{let s=J(d(e,t));return E(s,"root",r[t]),E(e,t,s),e},"updateFieldArrayRootError"),Xe=a(e=>e.type==="file","isFileInput"),re=a(e=>typeof e=="function","isFunction"),we=a(e=>{if(!Ge)return!1;let r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},"isHTMLElement"),Ae=a(e=>se(e),"isMessage"),Ze=a(e=>e.type==="radio","isRadioInput"),Ce=a(e=>e instanceof RegExp,"isRegex"),ft={value:!1,isValid:!1},yt={value:!0,isValid:!0},Rt=a(e=>{if(Array.isArray(e)){if(e.length>1){let r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!R(e[0].attributes.value)?R(e[0].value)||e[0].value===""?yt:{value:e[0].value,isValid:!0}:yt:ft}return ft},"getCheckboxValue"),mt={isValid:!1,value:null},Tt=a(e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,mt):mt,"getRadioValue");function gt(e,r,t="validate"){if(Ae(e)||Array.isArray(e)&&e.every(Ae)||Q(e)&&!e)return{type:t,message:Ae(e)?e:"",ref:r}}a(gt,"getValidateError");var ye=a(e=>P(e)&&!Ce(e)?e:{value:e,message:""},"getValueAndMessage"),ze=a(async(e,r,t,s,o,u)=>{let{ref:y,refs:g,required:V,maxLength:S,minLength:w,min:b,max:O,pattern:k,validate:U,name:W,valueAsNumber:H,mount:te}=e._f,C=d(t,W);if(!te||r.has(W))return{};let X=g?g[0]:y,Z=a(A=>{o&&X.reportValidity&&(X.setCustomValidity(Q(A)?"":A||""),X.reportValidity())},"setCustomValidity"),I={},h=Ze(y),F=pe(y),p=h||F,T=(H||Xe(y))&&R(y.value)&&R(C)||we(y)&&y.value===""||C===""||Array.isArray(C)&&!C.length,B=Qt.bind(null,W,s,I),ce=a((A,D,M,q=ae.maxLength,ee=ae.minLength)=>{let G=A?D:M;I[W]={type:A?q:ee,message:G,ref:y,...B(A?q:ee,G)}},"getMinMaxMessage");if(u?!Array.isArray(C)||!C.length:V&&(!p&&(T||z(C))||Q(C)&&!C||F&&!Rt(g).isValid||h&&!Tt(g).isValid)){let{value:A,message:D}=Ae(V)?{value:!!V,message:V}:ye(V);if(A&&(I[W]={type:ae.required,message:D,ref:X,...B(ae.required,D)},!s))return Z(D),I}if(!T&&(!z(b)||!z(O))){let A,D,M=ye(O),q=ye(b);if(!z(C)&&!isNaN(C)){let ee=y.valueAsNumber||C&&+C;z(M.value)||(A=ee>M.value),z(q.value)||(D=ee<q.value)}else{let ee=y.valueAsDate||new Date(C),G=a(Fe=>new Date(new Date().toDateString()+" "+Fe),"convertTimeToDate"),_e=y.type=="time",he=y.type=="week";se(M.value)&&C&&(A=_e?G(C)>G(M.value):he?C>M.value:ee>new Date(M.value)),se(q.value)&&C&&(D=_e?G(C)<G(q.value):he?C<q.value:ee<new Date(q.value))}if((A||D)&&(ce(!!A,M.message,q.message,ae.max,ae.min),!s))return Z(I[W].message),I}if((S||w)&&!T&&(se(C)||u&&Array.isArray(C))){let A=ye(S),D=ye(w),M=!z(A.value)&&C.length>+A.value,q=!z(D.value)&&C.length<+D.value;if((M||q)&&(ce(M,A.message,D.message),!s))return Z(I[W].message),I}if(k&&!T&&se(C)){let{value:A,message:D}=ye(k);if(Ce(A)&&!C.match(A)&&(I[W]={type:ae.pattern,message:D,ref:y,...B(ae.pattern,D)},!s))return Z(D),I}if(U){if(re(U)){let A=await U(C,t),D=gt(A,X);if(D&&(I[W]={...D,...B(ae.validate,D.message)},!s))return Z(D.message),I}else if(P(U)){let A={};for(let D in U){if(!K(A)&&!s)break;let M=gt(await U[D](C,t),X,D);M&&(A={...M,...B(D,M.message)},Z(M.message),s&&(I[W]=A))}if(!K(A)&&(I[W]={ref:X,...A},!s))return I}}return Z(!0),I},"validateField"),Le=a((e,r)=>[...e,...J(r)],"appendAt"),Me=a(e=>Array.isArray(e)?e.map(()=>{}):void 0,"fillEmptyArray");function Ne(e,r,t){return[...e.slice(0,r),...J(t),...e.slice(r)]}a(Ne,"insert");var Ue=a((e,r,t)=>Array.isArray(e)?(R(e[t])&&(e[t]=void 0),e.splice(t,0,e.splice(r,1)[0]),e):[],"moveArrayAt"),Be=a((e,r)=>[...J(r),...J(e)],"prependAt");function Yt(e,r){let t=0,s=[...e];for(let o of r)s.splice(o-t,1),t++;return xe(s).length?s:[]}a(Yt,"removeAtIndexes");var $e=a((e,r)=>R(r)?[]:Yt(e,J(r).sort((t,s)=>t-s)),"removeArrayAt"),je=a((e,r,t)=>{[e[r],e[t]]=[e[t],e[r]]},"swapArrayAt");function Xt(e,r){let t=r.slice(0,-1).length,s=0;for(;s<t;)e=R(e)?s++:e[r[s++]];return e}a(Xt,"baseGet");function Zt(e){for(let r in e)if(e.hasOwnProperty(r)&&!R(e[r]))return!1;return!0}a(Zt,"isEmptyArray");function L(e,r){let t=Array.isArray(r)?r:Qe(r)?[r]:pt(r),s=t.length===1?e:Xt(e,t),o=t.length-1,u=t[o];return s&&delete s[u],o!==0&&(P(s)&&K(s)||Array.isArray(s)&&Zt(s))&&L(e,t.slice(0,-1)),e}a(L,"unset");var _t=a((e,r,t)=>(e[r]=t,e),"updateAt");function mr(e){let r=ge(),{control:t=r.control,name:s,keyName:o="id",shouldUnregister:u,rules:y}=e,[g,V]=v.useState(t._getFieldArray(s)),S=v.useRef(t._getFieldArray(s).map(le)),w=v.useRef(g),b=v.useRef(s),O=v.useRef(!1);b.current=s,w.current=g,t._names.array.add(s),y&&t.register(s,y),Ee({next:a(({values:h,name:F})=>{if(F===b.current||!F){let p=d(h,b.current);Array.isArray(p)&&(V(p),S.current=p.map(le))}},"next"),subject:t._subjects.array});let k=v.useCallback(h=>{O.current=!0,t._updateFieldArray(s,h)},[t,s]),U=a((h,F)=>{let p=J(N(h)),T=Le(t._getFieldArray(s),p);t._names.focus=Oe(s,T.length-1,F),S.current=Le(S.current,p.map(le)),k(T),V(T),t._updateFieldArray(s,T,Le,{argA:Me(h)})},"append"),W=a((h,F)=>{let p=J(N(h)),T=Be(t._getFieldArray(s),p);t._names.focus=Oe(s,0,F),S.current=Be(S.current,p.map(le)),k(T),V(T),t._updateFieldArray(s,T,Be,{argA:Me(h)})},"prepend"),H=a(h=>{let F=$e(t._getFieldArray(s),h);S.current=$e(S.current,h),k(F),V(F),!Array.isArray(d(t._fields,s))&&E(t._fields,s,void 0),t._updateFieldArray(s,F,$e,{argA:h})},"remove"),te=a((h,F,p)=>{let T=J(N(F)),B=Ne(t._getFieldArray(s),h,T);t._names.focus=Oe(s,h,p),S.current=Ne(S.current,h,T.map(le)),k(B),V(B),t._updateFieldArray(s,B,Ne,{argA:h,argB:Me(F)})},"insert$1"),C=a((h,F)=>{let p=t._getFieldArray(s);je(p,h,F),je(S.current,h,F),k(p),V(p),t._updateFieldArray(s,p,je,{argA:h,argB:F},!1)},"swap"),X=a((h,F)=>{let p=t._getFieldArray(s);Ue(p,h,F),Ue(S.current,h,F),k(p),V(p),t._updateFieldArray(s,p,Ue,{argA:h,argB:F},!1)},"move"),Z=a((h,F)=>{let p=N(F),T=_t(t._getFieldArray(s),h,p);S.current=[...T].map((B,ce)=>!B||ce===h?le():S.current[ce]),k(T),V([...T]),t._updateFieldArray(s,T,_t,{argA:h,argB:p},!0,!1)},"update"),I=a(h=>{let F=J(N(h));S.current=F.map(le),k([...F]),V([...F]),t._updateFieldArray(s,[...F],p=>p,{},!0,!1)},"replace");return v.useEffect(()=>{if(t._state.action=!1,Ke(s,t._names)&&t._subjects.state.next({...t._formState}),O.current&&(!Ve(t._options.mode).isOnSubmit||t._formState.isSubmitted))if(t._options.resolver)t._executeSchema([s]).then(h=>{let F=d(h.errors,s),p=d(t._formState.errors,s);(p?!F&&p.type||F&&(p.type!==F.type||p.message!==F.message):F&&F.type)&&(F?E(t._formState.errors,s,F):L(t._formState.errors,s),t._subjects.state.next({errors:t._formState.errors}))});else{let h=d(t._fields,s);h&&h._f&&!(Ve(t._options.reValidateMode).isOnSubmit&&Ve(t._options.mode).isOnSubmit)&&ze(h,t._names.disabled,t._formValues,t._options.criteriaMode===Y.all,t._options.shouldUseNativeValidation,!0).then(F=>!K(F)&&t._subjects.state.next({errors:kt(t._formState.errors,F,s)}))}t._subjects.values.next({name:s,values:{...t._formValues}}),t._names.focus&&me(t._fields,(h,F)=>{if(t._names.focus&&F.startsWith(t._names.focus)&&h.focus)return h.focus(),1}),t._names.focus="",t._updateValid(),O.current=!1},[g,s,t]),v.useEffect(()=>(!d(t._formValues,s)&&t._updateFieldArray(s),()=>{(t._options.shouldUnregister||u)&&t.unregister(s)}),[s,t,o,u]),{swap:v.useCallback(C,[k,s,t]),move:v.useCallback(X,[k,s,t]),prepend:v.useCallback(W,[k,s,t]),append:v.useCallback(U,[k,s,t]),remove:v.useCallback(H,[k,s,t]),insert:v.useCallback(te,[k,s,t]),update:v.useCallback(Z,[k,s,t]),replace:v.useCallback(I,[k,s,t]),fields:v.useMemo(()=>g.map((h,F)=>({...h,[o]:S.current[F]||le()})),[g,o])}}a(mr,"useFieldArray");var We=a(()=>{let e=[];return{get observers(){return e},next:a(o=>{for(let u of e)u.next&&u.next(o)},"next"),subscribe:a(o=>(e.push(o),{unsubscribe:a(()=>{e=e.filter(u=>u!==o)},"unsubscribe")}),"subscribe"),unsubscribe:a(()=>{e=[]},"unsubscribe")}},"createSubject"),Je=a(e=>z(e)||!vt(e),"isPrimitive");function ue(e,r){if(Je(e)||Je(r))return e===r;if(de(e)&&de(r))return e.getTime()===r.getTime();let t=Object.keys(e),s=Object.keys(r);if(t.length!==s.length)return!1;for(let o of t){let u=e[o];if(!s.includes(o))return!1;if(o!=="ref"){let y=r[o];if(de(u)&&de(y)||P(u)&&P(y)||Array.isArray(u)&&Array.isArray(y)?!ue(u,y):u!==y)return!1}}return!0}a(ue,"deepEqual");var It=a(e=>e.type==="select-multiple","isMultipleSelect"),er=a(e=>Ze(e)||pe(e),"isRadioOrCheckbox"),qe=a(e=>we(e)&&e.isConnected,"live"),Pt=a(e=>{for(let r in e)if(re(e[r]))return!0;return!1},"objectHasFunction");function De(e,r={}){let t=Array.isArray(e);if(P(e)||t)for(let s in e)Array.isArray(e[s])||P(e[s])&&!Pt(e[s])?(r[s]=Array.isArray(e[s])?[]:{},De(e[s],r[s])):z(e[s])||(r[s]=!0);return r}a(De,"markFieldsDirty");function Ot(e,r,t){let s=Array.isArray(e);if(P(e)||s)for(let o in e)Array.isArray(e[o])||P(e[o])&&!Pt(e[o])?R(r)||Je(t[o])?t[o]=Array.isArray(e[o])?De(e[o],[]):{...De(e[o])}:Ot(e[o],z(r)?{}:r[o],t[o]):t[o]=!ue(e[o],r[o]);return t}a(Ot,"getDirtyFieldsFromDefaultValues");var ve=a((e,r)=>Ot(e,r,De(r)),"getDirtyFields"),Lt=a((e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>R(e)?e:r?e===""?NaN:e&&+e:t&&se(e)?new Date(e):s?s(e):e,"getFieldValueAs");function He(e){let r=e.ref;return Xe(r)?r.files:Ze(r)?Tt(e.refs).value:It(r)?[...r.selectedOptions].map(({value:t})=>t):pe(r)?Rt(e.refs).value:Lt(R(r.value)?e.ref.value:r.value,e)}a(He,"getFieldValue");var tr=a((e,r,t,s)=>{let o={};for(let u of e){let y=d(r,u);y&&E(o,u,y._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:s}},"getResolverOptions"),be=a(e=>R(e)?e:Ce(e)?e.source:P(e)?Ce(e.value)?e.value.source:e.value:e,"getRuleValue"),ht="AsyncFunction",rr=a(e=>!!e&&!!e.validate&&!!(re(e.validate)&&e.validate.constructor.name===ht||P(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===ht)),"hasPromiseValidation"),sr=a(e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),"hasValidation");function Ft(e,r,t){let s=d(e,t);if(s||Qe(t))return{error:s,name:t};let o=t.split(".");for(;o.length;){let u=o.join("."),y=d(r,u),g=d(e,u);if(y&&!Array.isArray(y)&&t!==u)return{name:t};if(g&&g.type)return{name:u,error:g};o.pop()}return{name:t}}a(Ft,"schemaErrorLookup");var ir=a((e,r,t,s,o)=>o.isOnAll?!1:!t&&o.isOnTouch?!(r||e):(t?s.isOnBlur:o.isOnBlur)?!e:(t?s.isOnChange:o.isOnChange)?e:!0,"skipValidation"),ar=a((e,r)=>!xe(d(e,r)).length&&L(e,r),"unsetEmptyArray"),nr={mode:Y.onSubmit,reValidateMode:Y.onChange,shouldFocusError:!0};function or(e={}){let r={...nr,...e},t={submitCount:0,isDirty:!1,isLoading:re(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},o=P(r.defaultValues)||P(r.values)?N(r.defaultValues||r.values)||{}:{},u=r.shouldUnregister?{}:N(o),y={action:!1,mount:!1,watch:!1},g={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},V,S=0,w={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},b={values:We(),array:We(),state:We()},O=Ve(r.mode),k=Ve(r.reValidateMode),U=r.criteriaMode===Y.all,W=a(i=>n=>{clearTimeout(S),S=setTimeout(i,n)},"debounce"),H=a(async i=>{if(!r.disabled&&(w.isValid||i)){let n=r.resolver?K((await p()).errors):await B(s,!0);n!==t.isValid&&b.state.next({isValid:n})}},"_updateValid"),te=a((i,n)=>{!r.disabled&&(w.isValidating||w.validatingFields)&&((i||Array.from(g.mount)).forEach(l=>{l&&(n?E(t.validatingFields,l,n):L(t.validatingFields,l))}),b.state.next({validatingFields:t.validatingFields,isValidating:!K(t.validatingFields)}))},"_updateIsValidating"),C=a((i,n=[],l,m,f=!0,c=!0)=>{if(m&&l&&!r.disabled){if(y.action=!0,c&&Array.isArray(d(s,i))){let _=l(d(s,i),m.argA,m.argB);f&&E(s,i,_)}if(c&&Array.isArray(d(t.errors,i))){let _=l(d(t.errors,i),m.argA,m.argB);f&&E(t.errors,i,_),ar(t.errors,i)}if(w.touchedFields&&c&&Array.isArray(d(t.touchedFields,i))){let _=l(d(t.touchedFields,i),m.argA,m.argB);f&&E(t.touchedFields,i,_)}w.dirtyFields&&(t.dirtyFields=ve(o,u)),b.state.next({name:i,isDirty:A(i,n),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else E(u,i,n)},"_updateFieldArray"),X=a((i,n)=>{E(t.errors,i,n),b.state.next({errors:t.errors})},"updateErrors"),Z=a(i=>{t.errors=i,b.state.next({errors:t.errors,isValid:!1})},"_setErrors"),I=a((i,n,l,m)=>{let f=d(s,i);if(f){let c=d(u,i,R(l)?d(o,i):l);R(c)||m&&m.defaultChecked||n?E(u,i,n?c:He(f._f)):q(i,c),y.mount&&H()}},"updateValidAndValue"),h=a((i,n,l,m,f)=>{let c=!1,_=!1,x={name:i};if(!r.disabled){let $=!!(d(s,i)&&d(s,i)._f&&d(s,i)._f.disabled);if(!l||m){w.isDirty&&(_=t.isDirty,t.isDirty=x.isDirty=A(),c=_!==x.isDirty);let j=$||ue(d(o,i),n);_=!!(!$&&d(t.dirtyFields,i)),j||$?L(t.dirtyFields,i):E(t.dirtyFields,i,!0),x.dirtyFields=t.dirtyFields,c=c||w.dirtyFields&&_!==!j}if(l){let j=d(t.touchedFields,i);j||(E(t.touchedFields,i,l),x.touchedFields=t.touchedFields,c=c||w.touchedFields&&j!==l)}c&&f&&b.state.next(x)}return c?x:{}},"updateTouchAndDirty"),F=a((i,n,l,m)=>{let f=d(t.errors,i),c=w.isValid&&Q(n)&&t.isValid!==n;if(r.delayError&&l?(V=W(()=>X(i,l)),V(r.delayError)):(clearTimeout(S),V=null,l?E(t.errors,i,l):L(t.errors,i)),(l?!ue(f,l):f)||!K(m)||c){let _={...m,...c&&Q(n)?{isValid:n}:{},errors:t.errors,name:i};t={...t,..._},b.state.next(_)}},"shouldRenderByError"),p=a(async i=>{te(i,!0);let n=await r.resolver(u,r.context,tr(i||g.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return te(i),n},"_executeSchema"),T=a(async i=>{let{errors:n}=await p(i);if(i)for(let l of i){let m=d(n,l);m?E(t.errors,l,m):L(t.errors,l)}else t.errors=n;return n},"executeSchemaAndUpdateState"),B=a(async(i,n,l={valid:!0})=>{for(let m in i){let f=i[m];if(f){let{_f:c,..._}=f;if(c){let x=g.array.has(c.name),$=f._f&&rr(f._f);$&&w.validatingFields&&te([m],!0);let j=await ze(f,g.disabled,u,U,r.shouldUseNativeValidation&&!n,x);if($&&w.validatingFields&&te([m]),j[c.name]&&(l.valid=!1,n))break;!n&&(d(j,c.name)?x?kt(t.errors,j,c.name):E(t.errors,c.name,j[c.name]):L(t.errors,c.name))}!K(_)&&await B(_,n,l)}}return l.valid},"executeBuiltInValidation"),ce=a(()=>{for(let i of g.unMount){let n=d(s,i);n&&(n._f.refs?n._f.refs.every(l=>!qe(l)):!qe(n._f.ref))&&Re(i)}g.unMount=new Set},"_removeUnmounted"),A=a((i,n)=>!r.disabled&&(i&&n&&E(u,i,n),!ue(et(),o)),"_getDirty"),D=a((i,n,l)=>Dt(i,g,{...y.mount?u:R(n)?o:se(i)?{[i]:n}:n},l,n),"_getWatch"),M=a(i=>xe(d(y.mount?u:o,i,r.shouldUnregister?d(o,i,[]):[])),"_getFieldArray"),q=a((i,n,l={})=>{let m=d(s,i),f=n;if(m){let c=m._f;c&&(!c.disabled&&E(u,i,Lt(n,c)),f=we(c.ref)&&z(n)?"":n,It(c.ref)?[...c.ref.options].forEach(_=>_.selected=f.includes(_.value)):c.refs?pe(c.ref)?c.refs.length>1?c.refs.forEach(_=>(!_.defaultChecked||!_.disabled)&&(_.checked=Array.isArray(f)?!!f.find(x=>x===_.value):f===_.value)):c.refs[0]&&(c.refs[0].checked=!!f):c.refs.forEach(_=>_.checked=_.value===f):Xe(c.ref)?c.ref.value="":(c.ref.value=f,c.ref.type||b.values.next({name:i,values:{...u}})))}(l.shouldDirty||l.shouldTouch)&&h(i,f,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&Fe(i)},"setFieldValue"),ee=a((i,n,l)=>{for(let m in n){let f=n[m],c=`${i}.${m}`,_=d(s,c);(g.array.has(i)||P(f)||_&&!_._f)&&!de(f)?ee(c,f,l):q(c,f,l)}},"setValues"),G=a((i,n,l={})=>{let m=d(s,i),f=g.array.has(i),c=N(n);E(u,i,c),f?(b.array.next({name:i,values:{...u}}),(w.isDirty||w.dirtyFields)&&l.shouldDirty&&b.state.next({name:i,dirtyFields:ve(o,u),isDirty:A(i,c)})):m&&!m._f&&!z(c)?ee(i,c,l):q(i,c,l),Ke(i,g)&&b.state.next({...t}),b.values.next({name:y.mount?i:void 0,values:{...u}})},"setValue"),_e=a(async i=>{y.mount=!0;let n=i.target,l=n.name,m=!0,f=d(s,l),c=a(()=>n.type?He(f._f):bt(i),"getCurrentFieldValue"),_=a(x=>{m=Number.isNaN(x)||de(x)&&isNaN(x.getTime())||ue(x,d(u,l,x))},"_updateIsFieldValueUpdated");if(f){let x,$,j=c(),oe=i.type===Se.BLUR||i.type===Se.FOCUS_OUT,Wt=!sr(f._f)&&!r.resolver&&!d(t.errors,l)&&!f._f.deps||ir(oe,d(t.touchedFields,l),t.isSubmitted,k,O),Ie=Ke(l,g,oe);E(u,l,j),oe?(f._f.onBlur&&f._f.onBlur(i),V&&V(0)):f._f.onChange&&f._f.onChange(i);let Pe=h(l,j,oe,!1),qt=!K(Pe)||Ie;if(!oe&&b.values.next({name:l,type:i.type,values:{...u}}),Wt)return w.isValid&&(r.mode==="onBlur"&&oe?H():oe||H()),qt&&b.state.next({name:l,...Ie?{}:Pe});if(!oe&&Ie&&b.state.next({...t}),r.resolver){let{errors:lt}=await p([l]);if(_(j),m){let Ht=Ft(t.errors,s,l),ut=Ft(lt,s,Ht.name||l);x=ut.error,l=ut.name,$=K(lt)}}else te([l],!0),x=(await ze(f,g.disabled,u,U,r.shouldUseNativeValidation))[l],te([l]),_(j),m&&(x?$=!1:w.isValid&&($=await B(s,!0)));m&&(f._f.deps&&Fe(f._f.deps),F(l,$,x,Pe))}},"onChange"),he=a((i,n)=>{if(d(t.errors,n)&&i.focus)return i.focus(),1},"_focusInput"),Fe=a(async(i,n={})=>{let l,m,f=J(i);if(r.resolver){let c=await T(R(i)?i:f);l=K(c),m=i?!f.some(_=>d(c,_)):l}else i?(m=(await Promise.all(f.map(async c=>{let _=d(s,c);return await B(_&&_._f?{[c]:_}:_)}))).every(Boolean),!(!m&&!t.isValid)&&H()):m=l=await B(s);return b.state.next({...!se(i)||w.isValid&&l!==t.isValid?{}:{name:i},...r.resolver||!i?{isValid:l}:{},errors:t.errors}),n.shouldFocus&&!m&&me(s,he,i?f:g.mount),m},"trigger"),et=a(i=>{let n={...y.mount?u:o};return R(i)?n:se(i)?d(n,i):i.map(l=>d(n,l))},"getValues"),tt=a((i,n)=>({invalid:!!d((n||t).errors,i),isDirty:!!d((n||t).dirtyFields,i),error:d((n||t).errors,i),isValidating:!!d(t.validatingFields,i),isTouched:!!d((n||t).touchedFields,i)}),"getFieldState"),Ut=a(i=>{i&&J(i).forEach(n=>L(t.errors,n)),b.state.next({errors:i?t.errors:{}})},"clearErrors"),rt=a((i,n,l)=>{let m=(d(s,i,{_f:{}})._f||{}).ref,f=d(t.errors,i)||{},{ref:c,message:_,type:x,...$}=f;E(t.errors,i,{...$,...n,ref:m}),b.state.next({name:i,errors:t.errors,isValid:!1}),l&&l.shouldFocus&&m&&m.focus&&m.focus()},"setError"),Bt=a((i,n)=>re(i)?b.values.subscribe({next:a(l=>i(D(void 0,n),l),"next")}):D(i,n,!0),"watch"),Re=a((i,n={})=>{for(let l of i?J(i):g.mount)g.mount.delete(l),g.array.delete(l),n.keepValue||(L(s,l),L(u,l)),!n.keepError&&L(t.errors,l),!n.keepDirty&&L(t.dirtyFields,l),!n.keepTouched&&L(t.touchedFields,l),!n.keepIsValidating&&L(t.validatingFields,l),!r.shouldUnregister&&!n.keepDefaultValue&&L(o,l);b.values.next({values:{...u}}),b.state.next({...t,...n.keepDirty?{isDirty:A()}:{}}),!n.keepIsValid&&H()},"unregister"),st=a(({disabled:i,name:n,field:l,fields:m})=>{(Q(i)&&y.mount||i||g.disabled.has(n))&&(i?g.disabled.add(n):g.disabled.delete(n),h(n,He(l?l._f:d(m,n)._f),!1,!1,!0))},"_updateDisabledField"),Te=a((i,n={})=>{let l=d(s,i),m=Q(n.disabled)||Q(r.disabled);return E(s,i,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:i}},name:i,mount:!0,...n}}),g.mount.add(i),l?st({field:l,disabled:Q(n.disabled)?n.disabled:r.disabled,name:i}):I(i,!0,n.value),{...m?{disabled:n.disabled||r.disabled}:{},...r.progressive?{required:!!n.required,min:be(n.min),max:be(n.max),minLength:be(n.minLength),maxLength:be(n.maxLength),pattern:be(n.pattern)}:{},name:i,onChange:_e,onBlur:_e,ref:a(f=>{if(f){Te(i,n),l=d(s,i);let c=R(f.value)&&f.querySelectorAll&&f.querySelectorAll("input,select,textarea")[0]||f,_=er(c),x=l._f.refs||[];if(_?x.find($=>$===c):c===l._f.ref)return;E(s,i,{_f:{...l._f,..._?{refs:[...x.filter(qe),c,...Array.isArray(d(o,i))?[{}]:[]],ref:{type:c.type,name:i}}:{ref:c}}}),I(i,!1,void 0,c)}else l=d(s,i,{}),l._f&&(l._f.mount=!1),(r.shouldUnregister||n.shouldUnregister)&&!(Vt(g.array,i)&&y.action)&&g.unMount.add(i)},"ref")}},"register"),it=a(()=>r.shouldFocusError&&me(s,he,g.mount),"_focusError"),$t=a(i=>{Q(i)&&(b.state.next({disabled:i}),me(s,(n,l)=>{let m=d(s,l);m&&(n.disabled=m._f.disabled||i,Array.isArray(m._f.refs)&&m._f.refs.forEach(f=>{f.disabled=m._f.disabled||i}))},0,!1))},"_disableForm"),at=a((i,n)=>async l=>{let m;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let f=N(u);if(g.disabled.size)for(let c of g.disabled)E(f,c,void 0);if(b.state.next({isSubmitting:!0}),r.resolver){let{errors:c,values:_}=await p();t.errors=c,f=_}else await B(s);if(L(t.errors,"root"),K(t.errors)){b.state.next({errors:{}});try{await i(f,l)}catch(c){m=c}}else n&&await n({...t.errors},l),it(),setTimeout(it);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:K(t.errors)&&!m,submitCount:t.submitCount+1,errors:t.errors}),m)throw m},"handleSubmit"),jt=a((i,n={})=>{d(s,i)&&(R(n.defaultValue)?G(i,N(d(o,i))):(G(i,n.defaultValue),E(o,i,N(n.defaultValue))),n.keepTouched||L(t.touchedFields,i),n.keepDirty||(L(t.dirtyFields,i),t.isDirty=n.defaultValue?A(i,N(d(o,i))):A()),n.keepError||(L(t.errors,i),w.isValid&&H()),b.state.next({...t}))},"resetField"),nt=a((i,n={})=>{let l=i?N(i):o,m=N(l),f=K(i),c=f?o:m;if(n.keepDefaultValues||(o=l),!n.keepValues){if(n.keepDirtyValues){let _=new Set([...g.mount,...Object.keys(ve(o,u))]);for(let x of Array.from(_))d(t.dirtyFields,x)?E(c,x,d(u,x)):G(x,d(c,x))}else{if(Ge&&R(i))for(let _ of g.mount){let x=d(s,_);if(x&&x._f){let $=Array.isArray(x._f.refs)?x._f.refs[0]:x._f.ref;if(we($)){let j=$.closest("form");if(j){j.reset();break}}}}s={}}u=r.shouldUnregister?n.keepDefaultValues?N(o):{}:N(c),b.array.next({values:{...c}}),b.values.next({values:{...c}})}g={mount:n.keepDirtyValues?g.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},y.mount=!w.isValid||!!n.keepIsValid||!!n.keepDirtyValues,y.watch=!!r.shouldUnregister,b.state.next({submitCount:n.keepSubmitCount?t.submitCount:0,isDirty:f?!1:n.keepDirty?t.isDirty:!!(n.keepDefaultValues&&!ue(i,o)),isSubmitted:n.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:f?{}:n.keepDirtyValues?n.keepDefaultValues&&u?ve(o,u):t.dirtyFields:n.keepDefaultValues&&i?ve(o,i):n.keepDirty?t.dirtyFields:{},touchedFields:n.keepTouched?t.touchedFields:{},errors:n.keepErrors?t.errors:{},isSubmitSuccessful:n.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},"_reset"),ot=a((i,n)=>nt(re(i)?i(u):i,n),"reset");return{control:{register:Te,unregister:Re,getFieldState:tt,handleSubmit:at,setError:rt,_executeSchema:p,_getWatch:D,_getDirty:A,_updateValid:H,_removeUnmounted:ce,_updateFieldArray:C,_updateDisabledField:st,_getFieldArray:M,_reset:nt,_resetDefaultValues:a(()=>re(r.defaultValues)&&r.defaultValues().then(i=>{ot(i,r.resetOptions),b.state.next({isLoading:!1})}),"_resetDefaultValues"),_updateFormState:a(i=>{t={...t,...i}},"_updateFormState"),_disableForm:$t,_subjects:b,_proxyFormState:w,_setErrors:Z,get _fields(){return s},get _formValues(){return u},get _state(){return y},set _state(i){y=i},get _defaultValues(){return o},get _names(){return g},set _names(i){g=i},get _formState(){return t},set _formState(i){t=i},get _options(){return r},set _options(i){r={...r,...i}}},trigger:Fe,register:Te,handleSubmit:at,watch:Bt,setValue:G,getValues:et,reset:ot,resetField:jt,clearErrors:Ut,unregister:Re,setError:rt,setFocus:a((i,n={})=>{let l=d(s,i),m=l&&l._f;if(m){let f=m.refs?m.refs[0]:m.ref;f.focus&&(f.focus(),n.shouldSelect&&re(f.select)&&f.select())}},"setFocus"),getFieldState:tt}}a(or,"createFormControl");function gr(e={}){let r=v.useRef(void 0),t=v.useRef(void 0),[s,o]=v.useState({isDirty:!1,isValidating:!1,isLoading:re(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:re(e.defaultValues)?void 0:e.defaultValues});r.current||(r.current={...or(e),formState:s});let u=r.current.control;return u._options=e,Ee({subject:u._subjects.state,next:a(y=>{wt(y,u._proxyFormState,u._updateFormState,!0)&&o({...u._formState})},"next")}),v.useEffect(()=>u._disableForm(e.disabled),[u,e.disabled]),v.useEffect(()=>{if(u._proxyFormState.isDirty){let y=u._getDirty();y!==s.isDirty&&u._subjects.state.next({isDirty:y})}},[u,s.isDirty]),v.useEffect(()=>{e.values&&!ue(e.values,t.current)?(u._reset(e.values,u._options.resetOptions),t.current=e.values,o(y=>({...y}))):u._resetDefaultValues()},[e.values,u]),v.useEffect(()=>{e.errors&&u._setErrors(e.errors)},[e.errors,u]),v.useEffect(()=>{u._state.mount||(u._updateValid(),u._state.mount=!0),u._state.watch&&(u._state.watch=!1,u._subjects.state.next({...u._formState})),u._removeUnmounted()}),v.useEffect(()=>{e.shouldUnregister&&u._subjects.values.next({values:u._getWatch()})},[e.shouldUnregister,u]),r.current.formState=St(s,u),r.current}a(gr,"useForm");import{Slot as lr}from"@radix-ui/react-slot";import*as ie from"react";import{jsx as ne}from"react/jsx-runtime";var Sr=At,Mt=ie.createContext({}),wr=a(({...e})=>ne(Mt.Provider,{value:{name:e.name},children:ne(Et,{...e})}),"FormField"),ke=a(()=>{let e=ie.useContext(Mt),r=ie.useContext(Nt),{getFieldState:t}=ge(),s=Ye({name:e.name}),o=t(e.name,s);if(!e)throw new Error("useFormField should be used within <FormField>");let{id:u}=r;return{id:u,name:e.name,formItemId:`${u}-form-item`,formDescriptionId:`${u}-form-item-description`,formMessageId:`${u}-form-item-message`,...o}},"useFormField"),Nt=ie.createContext({});function Cr({className:e,...r}){let t=ie.useId();return ne(Nt.Provider,{value:{id:t},children:ne("div",{"data-slot":"form-item",...r,className:fe("grid gap-2",e)})})}a(Cr,"FormItem");function Dr({className:e,...r}){let{error:t,formItemId:s}=ke();return ne(dt,{"data-slot":"form-label","data-error":!!t,className:fe("text-base-color mb-1 data-[error=true]:text-destructive",e),htmlFor:s,...r})}a(Dr,"FormLabel");var ur=ie.forwardRef(({...e},r)=>{let{error:t,formItemId:s,formDescriptionId:o,formMessageId:u}=ke();return ne(lr,{"data-slot":"form-control",ref:r,id:s,"aria-describedby":t?`${o} ${u}`:`${o}`,"aria-invalid":!!t,...e})});ur.displayName="FormControl";function Er({className:e,children:r,...t}){let{formDescriptionId:s}=ke();return typeof r=="string"?ne("p",{"data-slot":"form-description",id:s,className:fe("text-base-color text-xs",e),dangerouslySetInnerHTML:{__html:ct(r)},...t}):ne("p",{"data-slot":"form-description",id:s,className:fe("text-base-color text-xs",e),...t,children:typeof r=="function"?r():r})}a(Er,"FormDescription");function kr({className:e,...r}){let{error:t,formMessageId:s}=ke(),o=t?String(t?.message??""):r.children;return o?ne("p",{"data-slot":"form-message",id:s,className:fe("text-destructive text-sm",e),...r,children:o}):null}a(kr,"FormMessage");export{d as a,E as b,ge as c,Qt as d,mr as e,gr as f,Sr as g,wr as h,Cr as i,Dr as j,ur as k,Er as l,kr as m};
|
|
2
|
+
//# sourceMappingURL=chunk-U23SN7CM.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-QIN5BLVI.js";import{b as n}from"./chunk-MRYRNB7Y.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";function u({onSubmit:m}){let{terminationBag:i}=n();return a(r,{onSubmit:o(async t=>{await m?.(i?.parseFormValues(t)),i?.next()},"handleSubmit")})}o(u,"TerminationDetailsForm");export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UBLE2J7V.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as m}from"./chunk-W5DG5WWJ.js";import{a as e}from"./chunk-GC23RRCI.js";import{a as i}from"./chunk-XSHHMBMT.js";import{a as o}from"./chunk-N6G4VZXF.js";var p={employee_communication:o,termination_details:e,paid_time_off:m,additional_information:i};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UH3E6HSQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as i}from"./chunk-2QGDCMCE.js";import{b as u}from"./chunk-3ZWDIEEM.js";import{b as c}from"./chunk-TVZAFTPT.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as C}from"react/jsx-runtime";function d({children:o,...t}){let{contractAmendment:{back:r}}=c(),{components:s}=u(),e=s?.button;return e?C(e,{...t,onClick:n=>{r(),t.onClick?.(n)},children:o}):C(i,{...t,onClick:n=>{r(),t.onClick?.(n)},children:o})}m(d,"ContractAmendmentBack");export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UQYM3PBZ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as y}from"./chunk-PGWKJ6FK.js";import{b as c}from"./chunk-CFIJKJXD.js";import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as y}from"./chunk-PGWKJ6FK.js";import{b as c}from"./chunk-CFIJKJXD.js";import{a as F}from"./chunk-XGMQPLVG.js";import{b as u}from"./chunk-7XRPOR7L.js";import{f,g as p}from"./chunk-U23SN7CM.js";import{a as m}from"./chunk-P37U34EQ.js";import{useEffect as S}from"react";import{jsx as b}from"react/jsx-runtime";import{createElement as V}from"react";function U({defaultValues:d,onSubmit:g,components:E}){let{formId:k,onboardingBag:o}=y(),w=c(o.handleValidation),r=f({resolver:w,defaultValues:d,shouldUnregister:!1,mode:"onBlur"});S(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),S(()=>{let t=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==d[i])&&o?.checkFieldUpdates(e)});return()=>t?.unsubscribe()},[]);let h=m(async(t,e)=>{let s=e?.nativeEvent;if(s?.isDraftSubmission){let{onSuccess:i,onError:l}=s.draftCallbacks;try{if(!await r.trigger())return;let n=await o.onSubmit(t);if(n?.data)i?.();else if(n?.error){let B=o.stepState.currentStep.name,P=o.meta?.fields?.[B],O=u(n?.fieldErrors||[],P);l?.({error:n.error,rawError:n.rawError,fieldErrors:O})}}catch(a){l?.({error:a,rawError:a,fieldErrors:[]})}}else g(t)},"handleSubmit");return V(p,{...r,key:`form-${o.stepState.currentStep.name}`},b("form",{id:k,onSubmit:r.handleSubmit(h),className:"space-y-4 RemoteFlows__OnboardingForm",children:b(F,{components:E,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}m(U,"OnboardingForm");export{U as a};
|
|
2
|
+
//# sourceMappingURL=chunk-V2PBVCRH.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as m}from"./chunk-KSHK3ZPX.js";import{b as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as m}from"./chunk-KSHK3ZPX.js";import{b as i}from"./chunk-2QGDCMCE.js";import{b as s}from"./chunk-3ZWDIEEM.js";import{a as e}from"./chunk-54KJP7WD.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as l}from"react/jsx-runtime";function b({children:o,...t}){let{formId:n}=m(),{components:C}=s(),r=C?.button;return r?l(r,{...t,form:n,children:o}):l(i,{...t,type:"submit",className:e("RemoteFlows__CostCalculatorForm__SubmitButton",t.className),form:n,children:o})}u(b,"CostCalculatorSubmitButton");export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-X4GAGLFN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d,b as _,c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d,b as _,c}from"./chunk-5TUFZVWO.js";import{c as F}from"./chunk-U23SN7CM.js";import{e as y}from"./chunk-PAQW5BFW.js";import{e as m}from"./chunk-54KJP7WD.js";import{a as p}from"./chunk-P37U34EQ.js";import{Fragment as V}from"react";var u={...d,fieldset:c,"fieldset-flat":c};import{useEffect as h}from"react";import{Fragment as x,jsx as i,jsxs as C}from"react/jsx-runtime";function g({name:t,value:a,description:s,statement:r,label:l}){let{setValue:e}=F();return h(()=>{e(t,a)},[]),i("div",{children:r?C(x,{children:[i("p",{className:`text-sm RemoteFlows__ForcedValue__Title__${t}`,dangerouslySetInnerHTML:{__html:m(r?.title||l)}}),i("p",{className:`text-xs RemoteFlows__ForcedValue__Description__${t}`,dangerouslySetInnerHTML:{__html:m(r?.description||s)}})]}):i("p",{className:`text-xs RemoteFlows__ForcedValue__Description__${t}`,dangerouslySetInnerHTML:{__html:m(s)}})})}p(g,"ForcedValueField");import{Fragment as P,jsx as o,jsxs as S}from"react/jsx-runtime";function k(t){return t.const!==void 0&&t.const===t.default&&t.inputType!=="checkbox"&&t.inputType!=="hidden"}p(k,"checkFieldHasForcedValue");var q=p(({fields:t,fieldsets:a,fieldValues:s,components:r})=>{if(!t||t.length===0)return null;let l=a&&s?y({fields:t,fieldsets:a,values:s}):t;return o(P,{children:l.map(e=>{if(e.calculateDynamicProperties&&(e={...e,...e.calculateDynamicProperties(s,e)||{}}),e.isVisible===!1||e.deprecated||e.hidden)return null;if(k(e))return o(g,{name:e.name,description:e.description,value:e.const,statement:e.statement,label:e.label},e.name);if(e.Component){let{Component:T}=e;return o(T,{...e},e.name)}let n=u[e.type];return e.type==="select"&&e.multiple&&(n=u["multi-select"]),e.type==="fieldset"?o(n,{...e,components:r},e.name):e.type==="fieldset-flat"?o(n,{...e,components:r,isFlatFieldset:!0},e.name):n?S(V,{children:[o(n,{...e,component:r&&r[e.type]}),e.statement?o(_,{...e.statement}):null,e.extra?e.extra:null]},e.name):S("p",{className:"error",children:["Field type ",e.type," not supported"]})})})},"JSONSchemaFormFields");export{q as a};
|
|
2
|
+
//# sourceMappingURL=chunk-XGMQPLVG.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-54KJP7WD.js";import{a as e}from"./chunk-P37U34EQ.js";import*as o from"@radix-ui/react-label";import{jsx as r}from"react/jsx-runtime";function l({className:a,...i}){return r(o.Root,{"data-slot":"label",className:t("flex items-center gap-2 text-sm leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",a),...i})}e(l,"Label");export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-XVW2URFK.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-5KHLOGTR.js";import{a as m}from"./chunk-RNNZ5ZKE.js";import{a as f}from"./chunk-EGVWFZBR.js";import{a as s}from"./chunk-RUMP764Z.js";import{a}from"./chunk-5CGII7CZ.js";import{a as p}from"./chunk-LCIBPBLY.js";import{a as i}from"./chunk-MCAK5KPI.js";import{a as S}from"./chunk-Z7WBY27D.js";import{a as r}from"./chunk-ATC4YO7K.js";import{a as n}from"./chunk-PGWKJ6FK.js";import{a as e}from"./chunk-663AKXTN.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as R,useState as D}from"react";import{jsx as P}from"react/jsx-runtime";var K=t(({employmentId:d,companyId:b,countryCode:u,type:g="employee",externalId:B,skipSteps:l,initialValues:v,render:O,options:y})=>{let I=R(),o=e({companyId:b,countryCode:u,employmentId:d,type:g,options:y,skipSteps:l,externalId:B,initialValues:v}),[w,C]=D({showReserveInvoice:!1,showInviteSuccessful:!1});return P(n.Provider,{value:{formId:I,onboardingBag:o,creditScore:w,setCreditScore:C},children:O({onboardingBag:o,components:{BasicInformationStep:r,ContractDetailsStep:s,BenefitsStep:f,SubmitButton:i,SaveDraftButton:c,BackButton:a,OnboardingInvite:p,SelectCountryStep:m,ReviewStep:S}})})},"OnboardingFlow");export{K as a};
|
|
2
|
+
//# sourceMappingURL=chunk-Y7QVIBFX.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-7IHBNPZK.js";import{b as c}from"./chunk-3ZWDIEEM.js";import{c as _,h as d,i as u,j as x,k as C,l as T,m as R}from"./chunk-U23SN7CM.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as o,jsxs as E}from"react/jsx-runtime";function J({name:t,description:m,label:r,type:f,onChange:s,component:w,includeErrorMessage:I=!0,additionalProps:P={},maxLength:l,...h}){let{components:N}=c(),{control:D}=_();return o(d,{control:D,name:t,render:({field:e,fieldState:F})=>{let i=w||N?.text;if(i){let n={name:t,description:m,label:r,type:f,onChange:s,metadata:P,maxLength:l,...h};return o(i,{field:{...e,onChange:a(p=>{e.onChange(p),s?.(p)},"onChange")},fieldState:F,fieldData:n})}return E(u,{"data-field":t,className:`RemoteFlows__TextField__Item__${t}`,children:[r&&o(x,{className:"RemoteFlows__TextField__Label",children:r}),o(C,{children:o(g,{...e,value:e.value??"",onChange:n=>{e.onChange(n),s?.(n)},className:"RemoteFlows__TextField__Input",placeholder:r,maxLength:l})}),m&&o(T,{className:"RemoteFlows__TextField__Description",children:m}),I&&F.error&&o(R,{className:"RemoteFlows__TextField__Error"})]})}})}a(J,"TextField");export{J as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ZJ3JHILJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{B as i,r as o}from"./chunk-FHHAGWU5.js";import{d as n}from"./chunk-3ZWDIEEM.js";import{a as e}from"./chunk-P37U34EQ.js";import{useQuery as s}from"@tanstack/react-query";var p=e(({employmentId:t})=>{let{client:r}=n();return s({queryKey:["employment",t],retry:!1,queryFn:e(()=>o({client:r,headers:{Authorization:""},path:{employment_id:t}}),"queryFn"),select:e(({data:m})=>m,"select")})},"useEmploymentQuery"),c=e(({employmentId:t,status:r})=>{let{client:m}=n();return s({queryKey:["timeoff",t,r],retry:!1,queryFn:e(()=>i({client:m,headers:{Authorization:""},query:{employment_id:t,status:r}}),"queryFn"),select:e(({data:u})=>u,"select")})},"useTimeOffQuery");export{p as a,c as b};
|
|
2
|
+
//# sourceMappingURL=chunk-ZTVYWMBY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-ZX5OIIJX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-UQYM3PBZ.js";import"../../chunk-2QGDCMCE.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-54KJP7WD.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentBack};
|
|
2
2
|
//# sourceMappingURL=ContractAmendmentBack.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { d as PostCreateContractAmendmentError, c as ContractAmendmentResponse } from '../../types.gen-BWjuA7VH.js';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
|
|
5
5
|
type ContractAmendmentConfirmationFormProps = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-B3WXLC2R.js";import"../../chunk-U23SN7CM.js";import"../../chunk-PAQW5BFW.js";import"../../chunk-XVW2URFK.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-54KJP7WD.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentConfirmationForm};
|
|
2
2
|
//# sourceMappingURL=ContractAmendmentConfirmationForm.js.map
|
|
@@ -5,10 +5,13 @@ import { ContractAmendmentForm } from './ContractAmendmentForm.js';
|
|
|
5
5
|
import { ContractAmendmentSubmit } from './ContractAmendmentSubmit.js';
|
|
6
6
|
import { useContractAmendment } from './hooks.js';
|
|
7
7
|
import { ContractAmendmentParams } from './types.js';
|
|
8
|
-
import '../../types.gen-
|
|
8
|
+
import '../../types.gen-BWjuA7VH.js';
|
|
9
9
|
import 'react-hook-form';
|
|
10
10
|
import 'react';
|
|
11
|
-
import '../../mutations-
|
|
11
|
+
import '../../mutations-BHTJydCx.js';
|
|
12
|
+
import '../../remoteFlows-bfHFRZSe.js';
|
|
13
|
+
import 'yup';
|
|
14
|
+
import '../../types-Zg1n_9wh.js';
|
|
12
15
|
import '@remoteoss/json-schema-form';
|
|
13
16
|
import '../useStepState.js';
|
|
14
17
|
import '../types.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-4C6O4QTI.js";import"../../chunk-4KA5AP7X.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-XGMQPLVG.js";import"../../chunk-5TUFZVWO.js";import"../../chunk-ZJ3JHILJ.js";import"../../chunk-JWZIWG4T.js";import"../../chunk-MGOT272R.js";import"../../chunk-ZTVYWMBY.js";import"../../chunk-7XRPOR7L.js";import"../../chunk-3AEKPMIN.js";import"../../chunk-GGXKORRZ.js";import"../../chunk-R2VVXLL7.js";import"../../chunk-7IHBNPZK.js";import"../../chunk-ZX5OIIJX.js";import"../../chunk-FHHAGWU5.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-UQYM3PBZ.js";import"../../chunk-2QGDCMCE.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-B3WXLC2R.js";import"../../chunk-U23SN7CM.js";import"../../chunk-PAQW5BFW.js";import"../../chunk-XVW2URFK.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-54KJP7WD.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentFlow};
|
|
2
2
|
//# sourceMappingURL=ContractAmendmentFlow.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { b as PostAutomatableContractAmendmentError, a as ContractAmendmentAutomatableResponse } from '../../types.gen-BWjuA7VH.js';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
|
|
5
5
|
type ContractAmendmentFormProps = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-4KA5AP7X.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-XGMQPLVG.js";import"../../chunk-5TUFZVWO.js";import"../../chunk-ZJ3JHILJ.js";import"../../chunk-GGXKORRZ.js";import"../../chunk-R2VVXLL7.js";import"../../chunk-7IHBNPZK.js";import"../../chunk-2QGDCMCE.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-U23SN7CM.js";import"../../chunk-PAQW5BFW.js";import"../../chunk-XVW2URFK.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-54KJP7WD.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentForm};
|
|
2
2
|
//# sourceMappingURL=ContractAmendmentForm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-JWZIWG4T.js";import"../../chunk-2QGDCMCE.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-54KJP7WD.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentSubmit};
|
|
2
2
|
//# sourceMappingURL=ContractAmendmentSubmit.js.map
|