@remoteoss/remote-flows 1.3.1 → 1.4.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.
Files changed (228) hide show
  1. package/README.md +1 -0
  2. package/dist/{chunk-Q2JVGEYM.js → chunk-2FDEMDWJ.js} +2 -2
  3. package/dist/{chunk-AL2HSQPC.js → chunk-3CRC4NDD.js} +2 -2
  4. package/dist/{chunk-BB2GHYJY.js → chunk-4FW2VTO4.js} +2 -2
  5. package/dist/chunk-5BRMLRS7.js +2 -0
  6. package/dist/chunk-5BRMLRS7.js.map +1 -0
  7. package/dist/{chunk-LFQDVSKU.js → chunk-6AQLDTMK.js} +2 -2
  8. package/dist/{chunk-CWAUKF77.js → chunk-7FMFSOJ3.js} +2 -2
  9. package/dist/{chunk-3NMCXHSQ.js → chunk-7JDWTTYE.js} +2 -2
  10. package/dist/{chunk-LSNMODBH.js → chunk-7XKEJ5Y6.js} +2 -2
  11. package/dist/{chunk-B2OOX56F.js → chunk-A5NDO6CQ.js} +2 -2
  12. package/dist/{chunk-XCA33UL6.js → chunk-AJ5SXKFO.js} +2 -2
  13. package/dist/{chunk-HIQNB5UN.js → chunk-ARQ2PTEA.js} +2 -2
  14. package/dist/{chunk-3BOFG6MK.js → chunk-BNBEIHLD.js} +2 -2
  15. package/dist/{chunk-P5PRB2JC.js → chunk-CTAWDJ2D.js} +2 -2
  16. package/dist/{chunk-AF3YOXUE.js → chunk-D6Y7GLBT.js} +2 -2
  17. package/dist/{chunk-NY7LII5R.js → chunk-EGSUF7OD.js} +2 -2
  18. package/dist/{chunk-ZZPYYZNT.js → chunk-FEIYAZ7Q.js} +2 -2
  19. package/dist/{chunk-CX735AP4.js → chunk-G2X5F5YR.js} +2 -2
  20. package/dist/{chunk-AFGXZINW.js → chunk-HLR4BEDV.js} +2 -2
  21. package/dist/{chunk-XXXQA4SY.js → chunk-HUJ3AUIS.js} +2 -2
  22. package/dist/{chunk-GAF5TFZJ.js → chunk-K62H3A5T.js} +2 -2
  23. package/dist/{chunk-SQVJRTTA.js → chunk-KRDAGWDH.js} +2 -2
  24. package/dist/{chunk-26Y25KF6.js → chunk-LGUGZN57.js} +2 -2
  25. package/dist/{chunk-PS6EXVKH.js → chunk-LJ6FHPXW.js} +2 -2
  26. package/dist/{chunk-CATDB2YM.js → chunk-MD2QFLXC.js} +2 -2
  27. package/dist/chunk-N3X274GT.js +2 -0
  28. package/dist/{chunk-W4KHMUDZ.js.map → chunk-N3X274GT.js.map} +1 -1
  29. package/dist/{chunk-CM2YPABC.js → chunk-NHREKNSV.js} +2 -2
  30. package/dist/{chunk-SRR73QPD.js → chunk-NPKIEWF4.js} +2 -2
  31. package/dist/chunk-OFWEEY3Y.js +2 -0
  32. package/dist/chunk-OFWEEY3Y.js.map +1 -0
  33. package/dist/{chunk-AD53V4MM.js → chunk-OXOK5PM3.js} +2 -2
  34. package/dist/{chunk-NP3HE6QX.js → chunk-PSHPB65F.js} +2 -2
  35. package/dist/{chunk-5S54GMUJ.js → chunk-PU3WPIEK.js} +2 -2
  36. package/dist/{chunk-FQQKCROC.js → chunk-QDSRG735.js} +2 -2
  37. package/dist/{chunk-PNRHCOPF.js → chunk-QKKAJK3A.js} +2 -2
  38. package/dist/{chunk-GFVGV76O.js → chunk-RTQ4GKPG.js} +2 -2
  39. package/dist/{chunk-ER7DFMME.js → chunk-SKQWZNKT.js} +2 -2
  40. package/dist/{chunk-Z3AKMQ4S.js → chunk-T5OFLN36.js} +2 -2
  41. package/dist/{chunk-W3YE53JN.js → chunk-T6Q7IALZ.js} +2 -2
  42. package/dist/chunk-T6Q7IALZ.js.map +1 -0
  43. package/dist/{chunk-ZUNMNGRC.js → chunk-TMBD35L4.js} +2 -2
  44. package/dist/{chunk-4GXONSSK.js → chunk-UD4GEI4B.js} +2 -2
  45. package/dist/{chunk-KDI2AVBF.js → chunk-V334GIML.js} +2 -2
  46. package/dist/{chunk-T6KVMOX7.js → chunk-VCEQ5E2O.js} +2 -2
  47. package/dist/{chunk-JS3H25UQ.js → chunk-VYHITQHG.js} +2 -2
  48. package/dist/{chunk-4G2UMXRE.js → chunk-W3OQNZW6.js} +2 -2
  49. package/dist/{chunk-6E467YF3.js → chunk-WLN6G3TE.js} +2 -2
  50. package/dist/{chunk-447M3MFN.js → chunk-WO33FKK4.js} +2 -2
  51. package/dist/{chunk-ADOJOLLL.js → chunk-X6325UGJ.js} +2 -2
  52. package/dist/{chunk-2MX3WPCK.js → chunk-YXVNCPUI.js} +2 -2
  53. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  54. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  55. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  56. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  57. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  58. package/dist/flows/ContractAmendment/context.d.ts +3 -3
  59. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  60. package/dist/flows/ContractAmendment/hooks.js +1 -1
  61. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  62. package/dist/flows/ContractAmendment/index.js +1 -1
  63. package/dist/flows/ContractAmendment/types.d.ts +2 -2
  64. package/dist/flows/ContractAmendment/utils.d.ts +2 -2
  65. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
  66. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  67. package/dist/flows/ContractorOnboarding/api.d.ts +2 -2
  68. package/dist/flows/ContractorOnboarding/api.js +1 -1
  69. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
  70. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  71. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -5
  72. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  73. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -5
  74. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  75. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -5
  76. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  77. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  78. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  79. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -5
  80. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  81. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
  82. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  83. package/dist/flows/ContractorOnboarding/context.d.ts +5 -5
  84. package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -5
  85. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  86. package/dist/flows/ContractorOnboarding/index.d.ts +5 -5
  87. package/dist/flows/ContractorOnboarding/index.js +1 -1
  88. package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
  89. package/dist/flows/ContractorOnboarding/utils.d.ts +2 -2
  90. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  91. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  92. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  93. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  94. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -2
  95. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  96. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
  97. package/dist/flows/CostCalculator/api.d.ts +2 -2
  98. package/dist/flows/CostCalculator/api.js +1 -1
  99. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  100. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  101. package/dist/flows/CostCalculator/context.d.ts +3 -3
  102. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  103. package/dist/flows/CostCalculator/hooks.js +1 -1
  104. package/dist/flows/CostCalculator/index.d.ts +3 -3
  105. package/dist/flows/CostCalculator/index.js +1 -1
  106. package/dist/flows/CostCalculator/types.d.ts +2 -2
  107. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  108. package/dist/flows/CostCalculator/utils.js +1 -1
  109. package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
  110. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  111. package/dist/flows/Onboarding/api.d.ts +4 -4
  112. package/dist/flows/Onboarding/api.js +1 -1
  113. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  114. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  115. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
  116. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  117. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
  118. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  119. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
  120. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  121. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
  122. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  123. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  124. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  125. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
  126. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  127. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
  128. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  129. package/dist/flows/Onboarding/context.d.ts +6 -6
  130. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  131. package/dist/flows/Onboarding/hooks.js +1 -1
  132. package/dist/flows/Onboarding/index.d.ts +4 -4
  133. package/dist/flows/Onboarding/index.js +1 -1
  134. package/dist/flows/Onboarding/types.d.ts +4 -4
  135. package/dist/flows/Onboarding/utils.d.ts +4 -4
  136. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
  137. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  138. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
  139. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  140. package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
  141. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  142. package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
  143. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  144. package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
  145. package/dist/flows/Termination/TerminationFlow.js +1 -1
  146. package/dist/flows/Termination/TerminationForm.d.ts +4 -4
  147. package/dist/flows/Termination/TerminationForm.js +1 -1
  148. package/dist/flows/Termination/api.d.ts +5 -5
  149. package/dist/flows/Termination/api.js +1 -1
  150. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  151. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
  152. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
  153. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
  154. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
  155. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  156. package/dist/flows/Termination/context.d.ts +4 -4
  157. package/dist/flows/Termination/hooks.d.ts +4 -4
  158. package/dist/flows/Termination/hooks.js +1 -1
  159. package/dist/flows/Termination/index.d.ts +6 -6
  160. package/dist/flows/Termination/index.js +1 -1
  161. package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
  162. package/dist/flows/Termination/types.d.ts +4 -4
  163. package/dist/flows/Termination/utils.d.ts +4 -4
  164. package/dist/flows/types.d.ts +2 -2
  165. package/dist/flows/useStepState.d.ts +1 -1
  166. package/dist/flows/useStepState.js +1 -1
  167. package/dist/index.d.ts +10 -10
  168. package/dist/index.js +3 -1
  169. package/dist/index.js.map +1 -1
  170. package/dist/internals.d.ts +4 -4
  171. package/dist/{mutations-Dhsqyt9R.d.ts → mutations-DodnkAWj.d.ts} +1 -1
  172. package/dist/{remoteFlows-8lgzhRZb.d.ts → remoteFlows-xvD84Bor.d.ts} +8 -8
  173. package/dist/{types-CR6ZHxiM.d.ts → types-B5wlUr-S.d.ts} +4 -4
  174. package/dist/{types-CgFQV0b1.d.ts → types-BukQasy8.d.ts} +4 -4
  175. package/dist/{types-BH1usu8z.d.ts → types-Ckh2r3F3.d.ts} +1 -1
  176. package/dist/{types-7X9Do4Qx.d.ts → types-Ct_LPoSR.d.ts} +3 -3
  177. package/dist/{types.gen-q3-YX6jr.d.ts → types.gen-D2nbxMA0.d.ts} +1 -1
  178. package/dist/{utils-CGX-jPIw.d.ts → utils-arqMz3zD.d.ts} +1 -1
  179. package/package.json +3 -3
  180. package/dist/chunk-FOPSJRQG.js +0 -2
  181. package/dist/chunk-FOPSJRQG.js.map +0 -1
  182. package/dist/chunk-PJBAQZ6G.js +0 -2
  183. package/dist/chunk-PJBAQZ6G.js.map +0 -1
  184. package/dist/chunk-W3YE53JN.js.map +0 -1
  185. package/dist/chunk-W4KHMUDZ.js +0 -2
  186. /package/dist/{chunk-Q2JVGEYM.js.map → chunk-2FDEMDWJ.js.map} +0 -0
  187. /package/dist/{chunk-AL2HSQPC.js.map → chunk-3CRC4NDD.js.map} +0 -0
  188. /package/dist/{chunk-BB2GHYJY.js.map → chunk-4FW2VTO4.js.map} +0 -0
  189. /package/dist/{chunk-LFQDVSKU.js.map → chunk-6AQLDTMK.js.map} +0 -0
  190. /package/dist/{chunk-CWAUKF77.js.map → chunk-7FMFSOJ3.js.map} +0 -0
  191. /package/dist/{chunk-3NMCXHSQ.js.map → chunk-7JDWTTYE.js.map} +0 -0
  192. /package/dist/{chunk-LSNMODBH.js.map → chunk-7XKEJ5Y6.js.map} +0 -0
  193. /package/dist/{chunk-B2OOX56F.js.map → chunk-A5NDO6CQ.js.map} +0 -0
  194. /package/dist/{chunk-XCA33UL6.js.map → chunk-AJ5SXKFO.js.map} +0 -0
  195. /package/dist/{chunk-HIQNB5UN.js.map → chunk-ARQ2PTEA.js.map} +0 -0
  196. /package/dist/{chunk-3BOFG6MK.js.map → chunk-BNBEIHLD.js.map} +0 -0
  197. /package/dist/{chunk-P5PRB2JC.js.map → chunk-CTAWDJ2D.js.map} +0 -0
  198. /package/dist/{chunk-AF3YOXUE.js.map → chunk-D6Y7GLBT.js.map} +0 -0
  199. /package/dist/{chunk-NY7LII5R.js.map → chunk-EGSUF7OD.js.map} +0 -0
  200. /package/dist/{chunk-ZZPYYZNT.js.map → chunk-FEIYAZ7Q.js.map} +0 -0
  201. /package/dist/{chunk-CX735AP4.js.map → chunk-G2X5F5YR.js.map} +0 -0
  202. /package/dist/{chunk-AFGXZINW.js.map → chunk-HLR4BEDV.js.map} +0 -0
  203. /package/dist/{chunk-XXXQA4SY.js.map → chunk-HUJ3AUIS.js.map} +0 -0
  204. /package/dist/{chunk-GAF5TFZJ.js.map → chunk-K62H3A5T.js.map} +0 -0
  205. /package/dist/{chunk-SQVJRTTA.js.map → chunk-KRDAGWDH.js.map} +0 -0
  206. /package/dist/{chunk-26Y25KF6.js.map → chunk-LGUGZN57.js.map} +0 -0
  207. /package/dist/{chunk-PS6EXVKH.js.map → chunk-LJ6FHPXW.js.map} +0 -0
  208. /package/dist/{chunk-CATDB2YM.js.map → chunk-MD2QFLXC.js.map} +0 -0
  209. /package/dist/{chunk-CM2YPABC.js.map → chunk-NHREKNSV.js.map} +0 -0
  210. /package/dist/{chunk-SRR73QPD.js.map → chunk-NPKIEWF4.js.map} +0 -0
  211. /package/dist/{chunk-AD53V4MM.js.map → chunk-OXOK5PM3.js.map} +0 -0
  212. /package/dist/{chunk-NP3HE6QX.js.map → chunk-PSHPB65F.js.map} +0 -0
  213. /package/dist/{chunk-5S54GMUJ.js.map → chunk-PU3WPIEK.js.map} +0 -0
  214. /package/dist/{chunk-FQQKCROC.js.map → chunk-QDSRG735.js.map} +0 -0
  215. /package/dist/{chunk-PNRHCOPF.js.map → chunk-QKKAJK3A.js.map} +0 -0
  216. /package/dist/{chunk-GFVGV76O.js.map → chunk-RTQ4GKPG.js.map} +0 -0
  217. /package/dist/{chunk-ER7DFMME.js.map → chunk-SKQWZNKT.js.map} +0 -0
  218. /package/dist/{chunk-Z3AKMQ4S.js.map → chunk-T5OFLN36.js.map} +0 -0
  219. /package/dist/{chunk-ZUNMNGRC.js.map → chunk-TMBD35L4.js.map} +0 -0
  220. /package/dist/{chunk-4GXONSSK.js.map → chunk-UD4GEI4B.js.map} +0 -0
  221. /package/dist/{chunk-KDI2AVBF.js.map → chunk-V334GIML.js.map} +0 -0
  222. /package/dist/{chunk-T6KVMOX7.js.map → chunk-VCEQ5E2O.js.map} +0 -0
  223. /package/dist/{chunk-JS3H25UQ.js.map → chunk-VYHITQHG.js.map} +0 -0
  224. /package/dist/{chunk-4G2UMXRE.js.map → chunk-W3OQNZW6.js.map} +0 -0
  225. /package/dist/{chunk-6E467YF3.js.map → chunk-WLN6G3TE.js.map} +0 -0
  226. /package/dist/{chunk-447M3MFN.js.map → chunk-WO33FKK4.js.map} +0 -0
  227. /package/dist/{chunk-ADOJOLLL.js.map → chunk-X6325UGJ.js.map} +0 -0
  228. /package/dist/{chunk-2MX3WPCK.js.map → chunk-YXVNCPUI.js.map} +0 -0
package/README.md CHANGED
@@ -64,6 +64,7 @@ The `RemoteFlows` component serves as a provider for authentication and theming.
64
64
  | `components` | `Components` | No | - | Custom field components for form rendering |
65
65
  | `proxy` | `{ url: string, headers?: Record<string, string> }` | No | - | Configuration for API request proxy with optional headers |
66
66
  | `errorBoundary` | `{ useParentErrorBoundary?: boolean, fallback?: ReactNode \| ((error: Error) => ReactNode) }` | No |  - | Error boundary configuration to prevent crashes and show custom fallback UI |
67
+ | `debug` | boolean | No | - | useful to see telemetry debugging in console |
67
68
 
68
69
  #### Error Boundary
69
70
 
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-AD53V4MM.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function d({onSubmit:m}){let{terminationBag:o}=a(),r=i(async t=>{let n=await o?.parseFormValues(t);await m?.(n),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:r})}i(d,"PaidTimeOffForm");export{d as a};
2
- //# sourceMappingURL=chunk-Q2JVGEYM.js.map
1
+ import{a as e}from"./chunk-OXOK5PM3.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function d({onSubmit:m}){let{terminationBag:o}=a(),r=i(async t=>{let n=await o?.parseFormValues(t);await m?.(n),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:r})}i(d,"PaidTimeOffForm");export{d as a};
2
+ //# sourceMappingURL=chunk-2FDEMDWJ.js.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-AD53V4MM.js";import{b as e}from"./chunk-MRYRNB7Y.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function p({onSubmit:n}){let{terminationBag:o}=e(),a=m(async t=>{let r=await o?.parseFormValues(t);await n?.(r),o?.next()},"handleSubmit");return u(i,{defaultValues:o.fieldValues,onSubmit:a})}m(p,"EmployeeCommunicationForm");export{p as a};
2
- //# sourceMappingURL=chunk-AL2HSQPC.js.map
1
+ import{a as i}from"./chunk-OXOK5PM3.js";import{b as e}from"./chunk-MRYRNB7Y.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function p({onSubmit:n}){let{terminationBag:o}=e(),a=m(async t=>{let r=await o?.parseFormValues(t);await n?.(r),o?.next()},"handleSubmit");return u(i,{defaultValues:o.fieldValues,onSubmit:a})}m(p,"EmployeeCommunicationForm");export{p as a};
2
+ //# sourceMappingURL=chunk-3CRC4NDD.js.map
@@ -1,2 +1,2 @@
1
- import{a as T,b as S,c as F}from"./chunk-CM2YPABC.js";import{b as y}from"./chunk-NY7LII5R.js";import{c}from"./chunk-CR7AIZKA.js";import{f as g}from"./chunk-HRG5MSVG.js";import{e as m}from"./chunk-UQCSN47K.js";import{a}from"./chunk-P37U34EQ.js";import{Fragment as R}from"react";var d={...T,fieldset:F,"fieldset-flat":F};import{useEffect as V}from"react";import{Fragment as P,jsx as p,jsxs as k}from"react/jsx-runtime";var _=a(({name:t,description:i,helpCenter:n})=>k("span",{children:[p("span",{className:`text-xs RemoteFlows__ForcedValue__Description__${t}`,dangerouslySetInnerHTML:{__html:m(i)}}),n?.callToAction&&n?.id&&p(y,{className:"RemoteFlows__ForcedValue__HelpCenterLink",zendeskId:n.id,children:n.callToAction})]}),"Description");function C({name:t,value:i,description:n,statement:r,label:u,helpCenter:l}){let{setValue:e}=c(),o=m(r?.description||n);return V(()=>{e(t,i)},[]),p("div",{children:r?k(P,{children:[p("p",{className:`text-sm RemoteFlows__ForcedValue__Title__${t}`,dangerouslySetInnerHTML:{__html:m(r?.title||u)}}),p(_,{name:t,description:m(r?.description||n),helpCenter:l})]}):p(_,{name:t,description:o,helpCenter:l})})}a(C,"ForcedValueField");import{Fragment as M,jsx as s,jsxs as h}from"react/jsx-runtime";function J(t){return t.const!==void 0&&t.const===t.default&&t.inputType!=="checkbox"&&t.inputType!=="hidden"}a(J,"checkFieldHasForcedValue");var G=a(({fields:t,fieldsets:i,fieldValues:n,components:r})=>{let{setValue:u}=c();if(!t||t.length===0)return null;let l=i&&n?g({fields:t,fieldsets:i,values:n}):t;return s(M,{children:l.map(e=>{if(e.calculateDynamicProperties&&(e={...e,...e.calculateDynamicProperties(n,e)||{}}),e.isVisible===!1||e.deprecated||e.hidden)return null;if(J(e))return s(C,{name:e.name,description:e.description,value:e.const,statement:e.statement,label:e.label,helpCenter:e.meta?.helpCenter},e.name);if(e.Component){let{Component:x}=e;return s(x,{setValue:b=>u(e.name,b),...e},e.name)}let o=d[e.inputType];return o?e.inputType==="fieldset"?s(o,{...e,components:r},e.name):e.inputType==="fieldset-flat"?s(o,{...e,components:r,isFlatFieldset:!0},e.name):(e.inputType==="select"&&e.multiple&&(o=d["multi-select"]),h(R,{children:[s(o,{...e,component:r&&r[e.inputType]}),e.statement?s(S,{...e.statement}):null,e.extra?e.extra:null]},e.name)):h("p",{className:"error",children:["Field type ",e.inputType," not supported"]})})})},"JSONSchemaFormFields");export{G as a};
2
- //# sourceMappingURL=chunk-BB2GHYJY.js.map
1
+ import{a as T,b as S,c as F}from"./chunk-NHREKNSV.js";import{b as y}from"./chunk-EGSUF7OD.js";import{c}from"./chunk-CR7AIZKA.js";import{f as g}from"./chunk-HRG5MSVG.js";import{e as m}from"./chunk-UQCSN47K.js";import{a}from"./chunk-P37U34EQ.js";import{Fragment as R}from"react";var d={...T,fieldset:F,"fieldset-flat":F};import{useEffect as V}from"react";import{Fragment as P,jsx as p,jsxs as k}from"react/jsx-runtime";var _=a(({name:t,description:i,helpCenter:n})=>k("span",{children:[p("span",{className:`text-xs RemoteFlows__ForcedValue__Description__${t}`,dangerouslySetInnerHTML:{__html:m(i)}}),n?.callToAction&&n?.id&&p(y,{className:"RemoteFlows__ForcedValue__HelpCenterLink",zendeskId:n.id,children:n.callToAction})]}),"Description");function C({name:t,value:i,description:n,statement:r,label:u,helpCenter:l}){let{setValue:e}=c(),o=m(r?.description||n);return V(()=>{e(t,i)},[]),p("div",{children:r?k(P,{children:[p("p",{className:`text-sm RemoteFlows__ForcedValue__Title__${t}`,dangerouslySetInnerHTML:{__html:m(r?.title||u)}}),p(_,{name:t,description:m(r?.description||n),helpCenter:l})]}):p(_,{name:t,description:o,helpCenter:l})})}a(C,"ForcedValueField");import{Fragment as M,jsx as s,jsxs as h}from"react/jsx-runtime";function J(t){return t.const!==void 0&&t.const===t.default&&t.inputType!=="checkbox"&&t.inputType!=="hidden"}a(J,"checkFieldHasForcedValue");var G=a(({fields:t,fieldsets:i,fieldValues:n,components:r})=>{let{setValue:u}=c();if(!t||t.length===0)return null;let l=i&&n?g({fields:t,fieldsets:i,values:n}):t;return s(M,{children:l.map(e=>{if(e.calculateDynamicProperties&&(e={...e,...e.calculateDynamicProperties(n,e)||{}}),e.isVisible===!1||e.deprecated||e.hidden)return null;if(J(e))return s(C,{name:e.name,description:e.description,value:e.const,statement:e.statement,label:e.label,helpCenter:e.meta?.helpCenter},e.name);if(e.Component){let{Component:x}=e;return s(x,{setValue:b=>u(e.name,b),...e},e.name)}let o=d[e.inputType];return o?e.inputType==="fieldset"?s(o,{...e,components:r},e.name):e.inputType==="fieldset-flat"?s(o,{...e,components:r,isFlatFieldset:!0},e.name):(e.inputType==="select"&&e.multiple&&(o=d["multi-select"]),h(R,{children:[s(o,{...e,component:r&&r[e.inputType]}),e.statement?s(S,{...e.statement}):null,e.extra?e.extra:null]},e.name)):h("p",{className:"error",children:["Field type ",e.inputType," not supported"]})})})},"JSONSchemaFormFields");export{G as a};
2
+ //# sourceMappingURL=chunk-4FW2VTO4.js.map
@@ -0,0 +1,2 @@
1
+ import{a as l}from"./chunk-P37U34EQ.js";import{useState as S,useEffect as x}from"react";var y=l((s,r)=>{let i=Object.keys(s);if(i.length===0)throw new Error("No steps provided to useStepState");let[d,p]=S({}),[a,c]=S({currentStep:s[i[0]],totalSteps:i.length,values:null});x(()=>{r?.(s[i[0]])},[]);function o(){let{index:t}=a.currentStep,n=Object.values(s).find(e=>e.index===t+1);n&&(c(e=>({...e,currentStep:n,values:{...e.values,[e.currentStep.name]:{...e.values?.[e.currentStep.name],...d}}})),r?.(n),p({}))}l(o,"nextStep");function T(){let{index:t}=a.currentStep,n=Object.values(s).find(e=>e.index===t-1);n&&(c(e=>({...e,currentStep:n,values:{...e.values,[e.currentStep.name]:{...e.values?.[e.currentStep.name],...d}}})),r?.(n),p({}))}l(T,"previousStep");function f(t){a.values?.[t]&&(c(u=>({...u,currentStep:s[t]})),r?.(s[t]))}l(f,"goToStep");function F(t){c(u=>({...u,values:t}))}return l(F,"setStepValues"),{nextStep:o,previousStep:T,stepState:a,goToStep:f,fieldValues:d,setFieldValues:p,setStepValues:F}},"useStepState");export{y as a};
2
+ //# sourceMappingURL=chunk-5BRMLRS7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/useStepState.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\nimport { FieldValues } from 'react-hook-form';\n\nexport type Step<T extends string> = {\n index: number;\n name: T;\n};\n\ntype StepState<T extends string, Fields = FieldValues> = {\n currentStep: Step<T>;\n totalSteps: number;\n values:\n | {\n [key in T]: Fields;\n }\n | null;\n};\n\nexport const useStepState = <T extends string, Fields = FieldValues>(\n steps: Record<T, Step<T>>,\n onStepChange?: (step: Step<T>) => void,\n) => {\n const stepKeys = Object.keys(steps) as Array<keyof typeof steps>;\n\n if (stepKeys.length === 0) {\n throw new Error('No steps provided to useStepState');\n }\n\n const [fieldValues, setFieldValues] = useState<Fields>({} as Fields);\n const [stepState, setStepState] = useState<StepState<T, Fields>>({\n currentStep: steps[stepKeys[0]],\n totalSteps: stepKeys.length,\n values: null,\n });\n\n // Call onStepChange once when the hook initializes\n // Note: intentionally no deps to only run on mount and avoid re-renders\n // when onStepChange/steps references change\n useEffect(() => {\n onStepChange?.(steps[stepKeys[0]]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n function nextStep() {\n const { index } = stepState.currentStep;\n const stepValues = Object.values<Step<T>>(steps);\n const nextStep = stepValues.find((step) => step.index === index + 1);\n\n if (nextStep) {\n setStepState((previousState) => ({\n ...previousState,\n currentStep: nextStep,\n values: {\n ...previousState.values,\n [previousState.currentStep.name]: {\n ...previousState.values?.[previousState.currentStep.name as T],\n ...fieldValues,\n },\n } as { [key in T]: Fields },\n }));\n onStepChange?.(nextStep);\n setFieldValues({} as Fields);\n }\n }\n\n function previousStep() {\n const { index } = stepState.currentStep;\n const stepValues = Object.values<Step<T>>(steps);\n const previousStep = stepValues.find((step) => step.index === index - 1);\n\n if (previousStep) {\n setStepState((previousState) => ({\n ...previousState,\n currentStep: previousStep,\n values: {\n ...previousState.values,\n [previousState.currentStep.name]: {\n ...previousState.values?.[previousState.currentStep.name as T],\n ...fieldValues,\n },\n } as { [key in T]: Fields },\n }));\n onStepChange?.(previousStep);\n setFieldValues({} as Fields);\n }\n }\n\n function goToStep(step: T) {\n if (stepState.values?.[step]) {\n setStepState((previousState) => ({\n ...previousState,\n currentStep: steps[step],\n }));\n onStepChange?.(steps[step]);\n }\n }\n\n function setStepValues(values: Record<T, Fields>) {\n setStepState((previousState) => ({\n ...previousState,\n values: values,\n }));\n }\n\n return {\n /**\n * Moves to the next step in the step state.\n * It updates the current step and resets the field values for the next step.\n * The field values for the current step are stored in the step state.\n * @returns {void}\n */\n nextStep,\n /**\n * Moves to the previous step in the step state.\n * It updates the current step and resets the field values for the previous step.\n * The field values for the current step are stored in the step state.\n * @returns {void}\n */\n previousStep,\n /**\n * The current step state containing the current step, total number of steps and\n * the form values for each step.\n * @returns {StepState<T>} The current step state.\n */\n stepState,\n /**\n * Goes to a specific step in the step state.\n * @param step The step to go to.\n * @returns {void}\n */\n goToStep,\n /**\n * The field values for the current step.\n * @returns {FieldValues} The field values for the current step.\n */\n fieldValues,\n /**\n * Sets the field values for the current step.\n * @param values The field values to set.\n * @returns {void}\n */\n setFieldValues,\n /**\n * Sets the step values for the step state.\n * This is used to update all values in the step state.\n * @param values The values to set for the all steps.\n * @returns {void}\n */\n setStepValues,\n };\n};\n"],"mappings":"wCAAA,OAAS,YAAAA,EAAU,aAAAC,MAAiB,QAkB7B,IAAMC,EAAeC,EAAA,CAC1BC,EACAC,IACG,CACH,IAAMC,EAAW,OAAO,KAAKF,CAAK,EAElC,GAAIE,EAAS,SAAW,EACtB,MAAM,IAAI,MAAM,mCAAmC,EAGrD,GAAM,CAACC,EAAaC,CAAc,EAAIC,EAAiB,CAAC,CAAW,EAC7D,CAACC,EAAWC,CAAY,EAAIF,EAA+B,CAC/D,YAAaL,EAAME,EAAS,CAAC,CAAC,EAC9B,WAAYA,EAAS,OACrB,OAAQ,IACV,CAAC,EAKDM,EAAU,IAAM,CACdP,IAAeD,EAAME,EAAS,CAAC,CAAC,CAAC,CAEnC,EAAG,CAAC,CAAC,EAEL,SAASO,GAAW,CAClB,GAAM,CAAE,MAAAC,CAAM,EAAIJ,EAAU,YAEtBG,EADa,OAAO,OAAgBT,CAAK,EACnB,KAAMW,GAASA,EAAK,QAAUD,EAAQ,CAAC,EAE/DD,IACFF,EAAcK,IAAmB,CAC/B,GAAGA,EACH,YAAaH,EACb,OAAQ,CACN,GAAGG,EAAc,OACjB,CAACA,EAAc,YAAY,IAAI,EAAG,CAChC,GAAGA,EAAc,SAASA,EAAc,YAAY,IAAS,EAC7D,GAAGT,CACL,CACF,CACF,EAAE,EACFF,IAAeQ,CAAQ,EACvBL,EAAe,CAAC,CAAW,EAE/B,CApBSL,EAAAU,EAAA,YAsBT,SAASI,GAAe,CACtB,GAAM,CAAE,MAAAH,CAAM,EAAIJ,EAAU,YAEtBO,EADa,OAAO,OAAgBb,CAAK,EACf,KAAMW,GAASA,EAAK,QAAUD,EAAQ,CAAC,EAEnEG,IACFN,EAAcK,IAAmB,CAC/B,GAAGA,EACH,YAAaC,EACb,OAAQ,CACN,GAAGD,EAAc,OACjB,CAACA,EAAc,YAAY,IAAI,EAAG,CAChC,GAAGA,EAAc,SAASA,EAAc,YAAY,IAAS,EAC7D,GAAGT,CACL,CACF,CACF,EAAE,EACFF,IAAeY,CAAY,EAC3BT,EAAe,CAAC,CAAW,EAE/B,CApBSL,EAAAc,EAAA,gBAsBT,SAASC,EAASH,EAAS,CACrBL,EAAU,SAASK,CAAI,IACzBJ,EAAcK,IAAmB,CAC/B,GAAGA,EACH,YAAaZ,EAAMW,CAAI,CACzB,EAAE,EACFV,IAAeD,EAAMW,CAAI,CAAC,EAE9B,CARSZ,EAAAe,EAAA,YAUT,SAASC,EAAcC,EAA2B,CAChDT,EAAcK,IAAmB,CAC/B,GAAGA,EACH,OAAQI,CACV,EAAE,CACJ,CALS,OAAAjB,EAAAgB,EAAA,iBAOF,CAOL,SAAAN,EAOA,aAAAI,EAMA,UAAAP,EAMA,SAAAQ,EAKA,YAAAX,EAMA,eAAAC,EAOA,cAAAW,CACF,CACF,EApI4B","names":["useState","useEffect","useStepState","__name","steps","onStepChange","stepKeys","fieldValues","setFieldValues","useState","stepState","setStepState","useEffect","nextStep","index","step","previousState","previousStep","goToStep","setStepValues","values"]}
@@ -1,2 +1,2 @@
1
- import{b as f}from"./chunk-KSHK3ZPX.js";import{a as F}from"./chunk-BB2GHYJY.js";import{b as p}from"./chunk-2YTBWEC7.js";import{g as C}from"./chunk-CR7AIZKA.js";import{g as E}from"./chunk-UQCSN47K.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as R}from"react";import{jsx as u}from"react/jsx-runtime";function T({onSubmit:S,onError:w,onSuccess:y,onErrorWithFields:c,shouldResetForm:d,resetFields:a}){let{form:e,formId:V,costCalculatorBag:o}=f(),{formState:{isSubmitSuccessful:s}}=e;R(()=>{if(s&&d){o?.resetForm(),e.reset();return}if(s&&a){let t={...e.getValues()};a.forEach(r=>{t[r]=""}),o?.resetForm(),e.reset(t)}},[s,e,d,o,a]);let b=n(async i=>{try{let t=await o?.parseFormValues(i);o?.meta?.fields&&(o.meta.fields=E(i,o.fields),o.meta.fields.employer_currency_slug=o.meta.fields.currency);let r=await o?.onSubmit(t);if(await S?.(t),r?.data&&!r.error){let l={data:{...r.data.data,employments:r.data.data.employments?.map(m=>({...m,title:t.estimation_title}))}};await y?.(l)}else throw{data:null,error:r?.error,fieldErrors:r?.fieldErrors,rawError:r?.rawError}}catch(t){let r=t,l=r.fieldErrors;if(c){let m=o?.meta?.fields,h=p(l,m);c({error:r.error,rawError:r.rawError,fieldErrors:h})}else w?.(r.error)}},"handleSubmit");return u(C,{...e,children:u("form",{id:V,onSubmit:e.handleSubmit(b),className:"space-y-4 RemoteFlows__CostCalculatorForm",children:u(F,{fields:o?.fields??[]})})})}n(T,"CostCalculatorForm");export{T as a};
2
- //# sourceMappingURL=chunk-LFQDVSKU.js.map
1
+ import{b as f}from"./chunk-KSHK3ZPX.js";import{a as F}from"./chunk-4FW2VTO4.js";import{b as p}from"./chunk-2YTBWEC7.js";import{g as C}from"./chunk-CR7AIZKA.js";import{g as E}from"./chunk-UQCSN47K.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as R}from"react";import{jsx as u}from"react/jsx-runtime";function T({onSubmit:S,onError:w,onSuccess:y,onErrorWithFields:c,shouldResetForm:d,resetFields:a}){let{form:e,formId:V,costCalculatorBag:o}=f(),{formState:{isSubmitSuccessful:s}}=e;R(()=>{if(s&&d){o?.resetForm(),e.reset();return}if(s&&a){let t={...e.getValues()};a.forEach(r=>{t[r]=""}),o?.resetForm(),e.reset(t)}},[s,e,d,o,a]);let b=n(async i=>{try{let t=await o?.parseFormValues(i);o?.meta?.fields&&(o.meta.fields=E(i,o.fields),o.meta.fields.employer_currency_slug=o.meta.fields.currency);let r=await o?.onSubmit(t);if(await S?.(t),r?.data&&!r.error){let l={data:{...r.data.data,employments:r.data.data.employments?.map(m=>({...m,title:t.estimation_title}))}};await y?.(l)}else throw{data:null,error:r?.error,fieldErrors:r?.fieldErrors,rawError:r?.rawError}}catch(t){let r=t,l=r.fieldErrors;if(c){let m=o?.meta?.fields,h=p(l,m);c({error:r.error,rawError:r.rawError,fieldErrors:h})}else w?.(r.error)}},"handleSubmit");return u(C,{...e,children:u("form",{id:V,onSubmit:e.handleSubmit(b),className:"space-y-4 RemoteFlows__CostCalculatorForm",children:u(F,{fields:o?.fields??[]})})})}n(T,"CostCalculatorForm");export{T as a};
2
+ //# sourceMappingURL=chunk-6AQLDTMK.js.map
@@ -1,2 +1,2 @@
1
- import{l as J}from"./chunk-W4KHMUDZ.js";import{a as L}from"./chunk-ZFKHCC4Z.js";import{a as U}from"./chunk-NFWNYW2E.js";import{b as H}from"./chunk-KQPDXXG3.js";import{c as B,l as G}from"./chunk-CR7AIZKA.js";import{a as A,b as w,c as M}from"./chunk-HRG5MSVG.js";import{a as n,b as l,c as Fe}from"./chunk-P37U34EQ.js";var D=l((Rn,V)=>{"use strict";function Pe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}n(Pe,"isObject");V.exports=Pe});var z=l((qn,X)=>{"use strict";var ke=typeof global=="object"&&global&&global.Object===Object&&global;X.exports=ke});var _=l((Fn,K)=>{"use strict";var we=z(),Me=typeof self=="object"&&self&&self.Object===Object&&self,Le=we||Me||Function("return this")();K.exports=Le});var Y=l((Pn,Q)=>{"use strict";var De=_(),_e=n(function(){return De.Date.now()},"now");Q.exports=_e});var ee=l((wn,Z)=>{"use strict";var $e=/\s/;function Ne(e){for(var t=e.length;t--&&$e.test(e.charAt(t)););return t}n(Ne,"trimmedEndIndex");Z.exports=Ne});var te=l((Ln,ne)=>{"use strict";var We=ee(),Be=/^\s+/;function Ae(e){return e&&e.slice(0,We(e)+1).replace(Be,"")}n(Ae,"baseTrim");ne.exports=Ae});var $=l((_n,re)=>{"use strict";var He=_(),Ge=He.Symbol;re.exports=Ge});var ae=l(($n,se)=>{"use strict";var oe=$(),ie=Object.prototype,Je=ie.hasOwnProperty,Ue=ie.toString,O=oe?oe.toStringTag:void 0;function Ve(e){var t=Je.call(e,O),r=e[O];try{e[O]=void 0;var i=!0}catch{}var c=Ue.call(e);return i&&(t?e[O]=r:delete e[O]),c}n(Ve,"getRawTag");se.exports=Ve});var ue=l((Wn,ce)=>{"use strict";var Xe=Object.prototype,ze=Xe.toString;function Ke(e){return ze.call(e)}n(Ke,"objectToString");ce.exports=Ke});var me=l((An,de)=>{"use strict";var fe=$(),Qe=ae(),Ye=ue(),Ze="[object Null]",en="[object Undefined]",le=fe?fe.toStringTag:void 0;function nn(e){return e==null?e===void 0?en:Ze:le&&le in Object(e)?Qe(e):Ye(e)}n(nn,"baseGetTag");de.exports=nn});var ge=l((Gn,pe)=>{"use strict";function tn(e){return e!=null&&typeof e=="object"}n(tn,"isObjectLike");pe.exports=tn});var ve=l((Un,be)=>{"use strict";var rn=me(),on=ge(),sn="[object Symbol]";function an(e){return typeof e=="symbol"||on(e)&&rn(e)==sn}n(an,"isSymbol");be.exports=an});var Te=l((Xn,Ce)=>{"use strict";var cn=te(),ye=D(),un=ve(),xe=NaN,fn=/^[-+]0x[0-9a-f]+$/i,ln=/^0b[01]+$/i,dn=/^0o[0-7]+$/i,mn=parseInt;function pn(e){if(typeof e=="number")return e;if(un(e))return xe;if(ye(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ye(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=cn(e);var r=ln.test(e);return r||dn.test(e)?mn(e.slice(2),r?2:8):fn.test(e)?xe:+e}n(pn,"toNumber");Ce.exports=pn});var je=l((Kn,Se)=>{"use strict";var gn=D(),N=Y(),he=Te(),bn="Expected a function",vn=Math.max,yn=Math.min;function xn(e,t,r){var i,c,b,d,u,s,p=0,E=!1,f=!1,x=!0;if(typeof e!="function")throw new TypeError(bn);t=he(t)||0,gn(r)&&(E=!!r.leading,f="maxWait"in r,b=f?vn(he(r.maxWait)||0,t):b,x="trailing"in r?!!r.trailing:x);function C(o){var g=i,y=c;return i=c=void 0,p=o,d=e.apply(y,g),d}n(C,"invokeFunc");function R(o){return p=o,u=setTimeout(m,t),E?C(o):d}n(R,"leadingEdge");function q(o){var g=o-s,y=o-p,a=t-g;return f?yn(a,b-y):a}n(q,"remainingWait");function h(o){var g=o-s,y=o-p;return s===void 0||g>=t||g<0||f&&y>=b}n(h,"shouldInvoke");function m(){var o=N();if(h(o))return S(o);u=setTimeout(m,q(o))}n(m,"timerExpired");function S(o){return u=void 0,x&&i?C(o):(i=c=void 0,d)}n(S,"trailingEdge");function I(){u!==void 0&&clearTimeout(u),p=0,i=s=c=u=void 0}n(I,"cancel");function F(){return u===void 0?d:S(N())}n(F,"flush");function j(){var o=N(),g=h(o);if(i=arguments,c=this,s=o,g){if(u===void 0)return R(s);if(f)return clearTimeout(u),u=setTimeout(m,t),C(s)}return u===void 0&&(u=setTimeout(m,t)),d}return n(j,"debounced"),j.cancel=I,j.flush=F,j}n(xn,"debounce");Se.exports=xn});import{useState as hn,useCallback as Sn,useEffect as Re,useRef as jn}from"react";var Ee=Fe(je(),1);import{useCallback as Cn,useEffect as Tn,useRef as Oe}from"react";function W(e,t){let r=Oe(e);Tn(()=>{r.current=e},[e]);let i=Oe((0,Ee.default)(c=>{r.current(c)},t)).current;return Cn(c=>{i(c)},[i])}n(W,"useDebounce");import{Fragment as En,jsx as T,jsxs as Ie}from"react/jsx-runtime";var On=n(({description:e,showConversion:t,targetCurrency:r,className:i,onClick:c})=>{let{components:b}=H(),d=t?`Hide ${r} conversion`:`Show ${r} conversion`,u=b?.button||U;return Ie("span",{className:i,children:[T(G,{as:"span",children:e})," ",T(u,{className:`${i.replace("-description","-button")}`,"data-type":"inline",onClick:c,children:d})]})},"DescriptionWithConversion"),lt=n(({sourceCurrency:e,targetCurrency:t,mainFieldName:r,conversionFieldName:i,conversionProperties:c,classNamePrefix:b,description:d,conversionType:u="spread",...s})=>{let[p,E]=hn(!1),{setValue:f,watch:x}=B(),C=x(r||s.name),R=jn(!0),q=e&&t&&e!==t,{mutateAsync:h}=J({type:u}),m=`${s.name}_converted`;Re(()=>{f(m,r||s.name)},[f,r,s.name,m]),Re(()=>{if(R.current){R.current=!1;return}f(i,"")},[e,i,f]);let S=Sn(async(a,v,P)=>{if(!(!a||isNaN(a)||a<=0))return h({source_currency:v,target_currency:P,amount:a})},[h]),I=W(async a=>{let v=w(a),k=1/((await S(v,t,e))?.data?.data.conversion_data?.exchange_rate??1),qe=A(Number(v)*k);f(i,M(qe))},500),F=W(async a=>{let v=w(a),k=(await S(v,t,e))?.data?.data.conversion_data.target_amount;f(r||s.name,M(k))},500),j=n(a=>{f(m,r||s.name),p&&I(a.target.value)},"handleMainFieldChange"),o=n(a=>{f(m,i),F(a.target.value)},"handleConversionFieldChange"),g=n(a=>{a.preventDefault(),E(v=>!v),!p&&C&&I(C)},"toggleConversion"),y=q?T(On,{targetCurrency:t,description:d,showConversion:p,className:`${b}-description`,onClick:g}):d;return Ie(En,{children:[T(L,{...s,name:r||s.name,additionalProps:{currency:e},description:y,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:j}),p&&T(L,{additionalProps:{currency:t},name:i,label:c?.label||"Conversion",description:c?.description,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:o}),T("input",{type:"hidden",name:m,value:x(m)||r||s.name})]})},"CurrencyConversionField");export{lt as a};
2
- //# sourceMappingURL=chunk-CWAUKF77.js.map
1
+ import{l as J}from"./chunk-N3X274GT.js";import{a as L}from"./chunk-ZFKHCC4Z.js";import{a as U}from"./chunk-NFWNYW2E.js";import{b as H}from"./chunk-KQPDXXG3.js";import{c as B,l as G}from"./chunk-CR7AIZKA.js";import{a as A,b as w,c as M}from"./chunk-HRG5MSVG.js";import{a as n,b as l,c as Fe}from"./chunk-P37U34EQ.js";var D=l((Rn,V)=>{"use strict";function Pe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}n(Pe,"isObject");V.exports=Pe});var z=l((qn,X)=>{"use strict";var ke=typeof global=="object"&&global&&global.Object===Object&&global;X.exports=ke});var _=l((Fn,K)=>{"use strict";var we=z(),Me=typeof self=="object"&&self&&self.Object===Object&&self,Le=we||Me||Function("return this")();K.exports=Le});var Y=l((Pn,Q)=>{"use strict";var De=_(),_e=n(function(){return De.Date.now()},"now");Q.exports=_e});var ee=l((wn,Z)=>{"use strict";var $e=/\s/;function Ne(e){for(var t=e.length;t--&&$e.test(e.charAt(t)););return t}n(Ne,"trimmedEndIndex");Z.exports=Ne});var te=l((Ln,ne)=>{"use strict";var We=ee(),Be=/^\s+/;function Ae(e){return e&&e.slice(0,We(e)+1).replace(Be,"")}n(Ae,"baseTrim");ne.exports=Ae});var $=l((_n,re)=>{"use strict";var He=_(),Ge=He.Symbol;re.exports=Ge});var ae=l(($n,se)=>{"use strict";var oe=$(),ie=Object.prototype,Je=ie.hasOwnProperty,Ue=ie.toString,O=oe?oe.toStringTag:void 0;function Ve(e){var t=Je.call(e,O),r=e[O];try{e[O]=void 0;var i=!0}catch{}var c=Ue.call(e);return i&&(t?e[O]=r:delete e[O]),c}n(Ve,"getRawTag");se.exports=Ve});var ue=l((Wn,ce)=>{"use strict";var Xe=Object.prototype,ze=Xe.toString;function Ke(e){return ze.call(e)}n(Ke,"objectToString");ce.exports=Ke});var me=l((An,de)=>{"use strict";var fe=$(),Qe=ae(),Ye=ue(),Ze="[object Null]",en="[object Undefined]",le=fe?fe.toStringTag:void 0;function nn(e){return e==null?e===void 0?en:Ze:le&&le in Object(e)?Qe(e):Ye(e)}n(nn,"baseGetTag");de.exports=nn});var ge=l((Gn,pe)=>{"use strict";function tn(e){return e!=null&&typeof e=="object"}n(tn,"isObjectLike");pe.exports=tn});var ve=l((Un,be)=>{"use strict";var rn=me(),on=ge(),sn="[object Symbol]";function an(e){return typeof e=="symbol"||on(e)&&rn(e)==sn}n(an,"isSymbol");be.exports=an});var Te=l((Xn,Ce)=>{"use strict";var cn=te(),ye=D(),un=ve(),xe=NaN,fn=/^[-+]0x[0-9a-f]+$/i,ln=/^0b[01]+$/i,dn=/^0o[0-7]+$/i,mn=parseInt;function pn(e){if(typeof e=="number")return e;if(un(e))return xe;if(ye(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ye(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=cn(e);var r=ln.test(e);return r||dn.test(e)?mn(e.slice(2),r?2:8):fn.test(e)?xe:+e}n(pn,"toNumber");Ce.exports=pn});var je=l((Kn,Se)=>{"use strict";var gn=D(),N=Y(),he=Te(),bn="Expected a function",vn=Math.max,yn=Math.min;function xn(e,t,r){var i,c,b,d,u,s,p=0,E=!1,f=!1,x=!0;if(typeof e!="function")throw new TypeError(bn);t=he(t)||0,gn(r)&&(E=!!r.leading,f="maxWait"in r,b=f?vn(he(r.maxWait)||0,t):b,x="trailing"in r?!!r.trailing:x);function C(o){var g=i,y=c;return i=c=void 0,p=o,d=e.apply(y,g),d}n(C,"invokeFunc");function R(o){return p=o,u=setTimeout(m,t),E?C(o):d}n(R,"leadingEdge");function q(o){var g=o-s,y=o-p,a=t-g;return f?yn(a,b-y):a}n(q,"remainingWait");function h(o){var g=o-s,y=o-p;return s===void 0||g>=t||g<0||f&&y>=b}n(h,"shouldInvoke");function m(){var o=N();if(h(o))return S(o);u=setTimeout(m,q(o))}n(m,"timerExpired");function S(o){return u=void 0,x&&i?C(o):(i=c=void 0,d)}n(S,"trailingEdge");function I(){u!==void 0&&clearTimeout(u),p=0,i=s=c=u=void 0}n(I,"cancel");function F(){return u===void 0?d:S(N())}n(F,"flush");function j(){var o=N(),g=h(o);if(i=arguments,c=this,s=o,g){if(u===void 0)return R(s);if(f)return clearTimeout(u),u=setTimeout(m,t),C(s)}return u===void 0&&(u=setTimeout(m,t)),d}return n(j,"debounced"),j.cancel=I,j.flush=F,j}n(xn,"debounce");Se.exports=xn});import{useState as hn,useCallback as Sn,useEffect as Re,useRef as jn}from"react";var Ee=Fe(je(),1);import{useCallback as Cn,useEffect as Tn,useRef as Oe}from"react";function W(e,t){let r=Oe(e);Tn(()=>{r.current=e},[e]);let i=Oe((0,Ee.default)(c=>{r.current(c)},t)).current;return Cn(c=>{i(c)},[i])}n(W,"useDebounce");import{Fragment as En,jsx as T,jsxs as Ie}from"react/jsx-runtime";var On=n(({description:e,showConversion:t,targetCurrency:r,className:i,onClick:c})=>{let{components:b}=H(),d=t?`Hide ${r} conversion`:`Show ${r} conversion`,u=b?.button||U;return Ie("span",{className:i,children:[T(G,{as:"span",children:e})," ",T(u,{className:`${i.replace("-description","-button")}`,"data-type":"inline",onClick:c,children:d})]})},"DescriptionWithConversion"),lt=n(({sourceCurrency:e,targetCurrency:t,mainFieldName:r,conversionFieldName:i,conversionProperties:c,classNamePrefix:b,description:d,conversionType:u="spread",...s})=>{let[p,E]=hn(!1),{setValue:f,watch:x}=B(),C=x(r||s.name),R=jn(!0),q=e&&t&&e!==t,{mutateAsync:h}=J({type:u}),m=`${s.name}_converted`;Re(()=>{f(m,r||s.name)},[f,r,s.name,m]),Re(()=>{if(R.current){R.current=!1;return}f(i,"")},[e,i,f]);let S=Sn(async(a,v,P)=>{if(!(!a||isNaN(a)||a<=0))return h({source_currency:v,target_currency:P,amount:a})},[h]),I=W(async a=>{let v=w(a),k=1/((await S(v,t,e))?.data?.data.conversion_data?.exchange_rate??1),qe=A(Number(v)*k);f(i,M(qe))},500),F=W(async a=>{let v=w(a),k=(await S(v,t,e))?.data?.data.conversion_data.target_amount;f(r||s.name,M(k))},500),j=n(a=>{f(m,r||s.name),p&&I(a.target.value)},"handleMainFieldChange"),o=n(a=>{f(m,i),F(a.target.value)},"handleConversionFieldChange"),g=n(a=>{a.preventDefault(),E(v=>!v),!p&&C&&I(C)},"toggleConversion"),y=q?T(On,{targetCurrency:t,description:d,showConversion:p,className:`${b}-description`,onClick:g}):d;return Ie(En,{children:[T(L,{...s,name:r||s.name,additionalProps:{currency:e},description:y,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:j}),p&&T(L,{additionalProps:{currency:t},name:i,label:c?.label||"Conversion",description:c?.description,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:o}),T("input",{type:"hidden",name:m,value:x(m)||r||s.name})]})},"CurrencyConversionField");export{lt as a};
2
+ //# sourceMappingURL=chunk-7FMFSOJ3.js.map
@@ -1,2 +1,2 @@
1
- import{b as v}from"./chunk-PGWKJ6FK.js";import{d as l,e as p}from"./chunk-W4KHMUDZ.js";import{a as s}from"./chunk-2YTBWEC7.js";import{a as y}from"./chunk-NFWNYW2E.js";import{b as c}from"./chunk-KQPDXXG3.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as _}from"react/jsx-runtime";function A({onSubmit:f,onSuccess:a,onError:t,render:w,...o}){let{components:E}=c(),{onboardingBag:r,setCreditScore:m}=v(),d=l(),u=p(),{mutateAsync:R}=s(d),{mutateAsync:g}=s(u),S=i(async()=>{try{if(await f?.(),r.creditRiskStatus==="deposit_required"&&r.employmentId&&r.employment?.status&&!r.isEmploymentReadOnly){let e=await g({employment_slug:r.employmentId});if(e.data){await a?.({data:e.data,employmentStatus:"created_awaiting_reserve"}),m?.(n=>({...n,showReserveInvoice:!0})),r.refetchEmployment();return}e.error&&t?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}else if(r.employmentId){let e=await R({employment_id:r.employmentId});if(e.data){await a?.({data:e.data,employmentStatus:"invited"}),m?.(n=>({...n,showInviteSuccessful:!0})),r.refetchEmployment();return}e.error&&t?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}}catch(e){t?.({error:e,rawError:e,fieldErrors:[]})}},"handleSubmit"),I=r.creditRiskStatus==="deposit_required"&&r.employment?.status&&!r.isEmploymentReadOnly,b=E?.button||y;return _(b,{...o,disabled:d.isPending||u.isPending||o.disabled,onClick:e=>{S(),o.onClick?.(e)},children:w({employmentStatus:I?"created_awaiting_reserve":"invited"})})}i(A,"OnboardingInvite");export{A as a};
2
- //# sourceMappingURL=chunk-3NMCXHSQ.js.map
1
+ import{b as v}from"./chunk-PGWKJ6FK.js";import{d as l,e as p}from"./chunk-N3X274GT.js";import{a as s}from"./chunk-2YTBWEC7.js";import{a as y}from"./chunk-NFWNYW2E.js";import{b as c}from"./chunk-KQPDXXG3.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as _}from"react/jsx-runtime";function A({onSubmit:f,onSuccess:a,onError:t,render:w,...o}){let{components:E}=c(),{onboardingBag:r,setCreditScore:m}=v(),d=l(),u=p(),{mutateAsync:R}=s(d),{mutateAsync:g}=s(u),S=i(async()=>{try{if(await f?.(),r.creditRiskStatus==="deposit_required"&&r.employmentId&&r.employment?.status&&!r.isEmploymentReadOnly){let e=await g({employment_slug:r.employmentId});if(e.data){await a?.({data:e.data,employmentStatus:"created_awaiting_reserve"}),m?.(n=>({...n,showReserveInvoice:!0})),r.refetchEmployment();return}e.error&&t?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}else if(r.employmentId){let e=await R({employment_id:r.employmentId});if(e.data){await a?.({data:e.data,employmentStatus:"invited"}),m?.(n=>({...n,showInviteSuccessful:!0})),r.refetchEmployment();return}e.error&&t?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}}catch(e){t?.({error:e,rawError:e,fieldErrors:[]})}},"handleSubmit"),I=r.creditRiskStatus==="deposit_required"&&r.employment?.status&&!r.isEmploymentReadOnly,b=E?.button||y;return _(b,{...o,disabled:d.isPending||u.isPending||o.disabled,onClick:e=>{S(),o.onClick?.(e)},children:w({employmentStatus:I?"created_awaiting_reserve":"invited"})})}i(A,"OnboardingInvite");export{A as a};
2
+ //# sourceMappingURL=chunk-7JDWTTYE.js.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-6E467YF3.js";import{a}from"./chunk-OKMERBJL.js";import{a as c}from"./chunk-PNRHCOPF.js";import{a as e}from"./chunk-PC5JG4TT.js";import{a as m}from"./chunk-K3XVYHGV.js";import{a as o}from"./chunk-TVZAFTPT.js";import{a as n}from"./chunk-P37U34EQ.js";import{useId as f}from"react";import{jsx as s}from"react/jsx-runtime";function k({employmentId:d,countryCode:C,options:p,render:A}){let t=c({employmentId:d,countryCode:C,options:p}),i=f();return s(o.Provider,{value:{formId:i,contractAmendmentBag:t},children:A({contractAmendmentBag:t,components:{Form:r,SubmitButton:a,ConfirmationForm:m,BackButton:e}})})}n(k,"ContractAmendmentFlow");export{k as a};
2
- //# sourceMappingURL=chunk-LSNMODBH.js.map
1
+ import{a as r}from"./chunk-WLN6G3TE.js";import{a}from"./chunk-OKMERBJL.js";import{a as c}from"./chunk-QKKAJK3A.js";import{a as e}from"./chunk-PC5JG4TT.js";import{a as m}from"./chunk-K3XVYHGV.js";import{a as o}from"./chunk-TVZAFTPT.js";import{a as n}from"./chunk-P37U34EQ.js";import{useId as f}from"react";import{jsx as s}from"react/jsx-runtime";function k({employmentId:d,countryCode:C,options:p,render:A}){let t=c({employmentId:d,countryCode:C,options:p}),i=f();return s(o.Provider,{value:{formId:i,contractAmendmentBag:t},children:A({contractAmendmentBag:t,components:{Form:r,SubmitButton:a,ConfirmationForm:m,BackButton:e}})})}n(k,"ContractAmendmentFlow");export{k as a};
2
+ //# sourceMappingURL=chunk-7XKEJ5Y6.js.map
@@ -1,2 +1,2 @@
1
- import{b as e}from"./chunk-NY7LII5R.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as o,jsxs as t}from"react/jsx-runtime";var a=n(({involuntaryOffboardingServiceChargeZendeskId:r,reconciliationInvoiceZendeskId:i})=>t("p",{className:"RemoteFlows__AcknowledgeInformationFees text-xs text-[#71717A]",children:["You'll receive an"," ",o(e,{zendeskId:r,className:"align-baseline",children:"involuntary offboarding service charge \u2197"})," ","on your"," ",o(e,{zendeskId:i,children:"reconciliation invoice \u2197"})]}),"AcknowledgeInformationFees");export{a};
2
- //# sourceMappingURL=chunk-B2OOX56F.js.map
1
+ import{b as e}from"./chunk-EGSUF7OD.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as o,jsxs as t}from"react/jsx-runtime";var a=n(({involuntaryOffboardingServiceChargeZendeskId:r,reconciliationInvoiceZendeskId:i})=>t("p",{className:"RemoteFlows__AcknowledgeInformationFees text-xs text-[#71717A]",children:["You'll receive an"," ",o(e,{zendeskId:r,className:"align-baseline",children:"involuntary offboarding service charge \u2197"})," ","on your"," ",o(e,{zendeskId:i,children:"reconciliation invoice \u2197"})]}),"AcknowledgeInformationFees");export{a};
2
+ //# sourceMappingURL=chunk-A5NDO6CQ.js.map
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-TOA3JILU.js";import{a as l}from"./chunk-BB2GHYJY.js";import{b as s}from"./chunk-LNV36S6D.js";import{f as m,g as d}from"./chunk-CR7AIZKA.js";import{a as e}from"./chunk-P37U34EQ.js";import{useEffect as f}from"react";import{jsx as p}from"react/jsx-runtime";import{createElement as P}from"react";function B({defaultValues:i,onSubmit:F,components:u}){let{formId:y,contractorOnboardingBag:o}=c(),b=s(o.handleValidation),r=m({resolver:b,defaultValues:i,shouldUnregister:!1,mode:"onBlur"});f(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),f(()=>{let n=r?.watch(t=>{Object.keys(t).some(a=>t[a]!==i[a])&&o?.checkFieldUpdates(t)});return()=>n?.unsubscribe()},[]);let g=e(async n=>{await F(n)},"handleSubmit");return P(d,{...r,key:`form-${o.stepState.currentStep.name}`},p("form",{id:y,onSubmit:r.handleSubmit(g),className:"space-y-4 RemoteFlows__OnboardingForm",children:p(l,{components:u,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}e(B,"ContractorOnboardingForm");export{B as a};
2
- //# sourceMappingURL=chunk-XCA33UL6.js.map
1
+ import{b as c}from"./chunk-TOA3JILU.js";import{a as l}from"./chunk-4FW2VTO4.js";import{b as s}from"./chunk-LNV36S6D.js";import{f as m,g as d}from"./chunk-CR7AIZKA.js";import{a as e}from"./chunk-P37U34EQ.js";import{useEffect as f}from"react";import{jsx as p}from"react/jsx-runtime";import{createElement as P}from"react";function B({defaultValues:i,onSubmit:F,components:u}){let{formId:y,contractorOnboardingBag:o}=c(),b=s(o.handleValidation),r=m({resolver:b,defaultValues:i,shouldUnregister:!1,mode:"onBlur"});f(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),f(()=>{let n=r?.watch(t=>{Object.keys(t).some(a=>t[a]!==i[a])&&o?.checkFieldUpdates(t)});return()=>n?.unsubscribe()},[]);let g=e(async n=>{await F(n)},"handleSubmit");return P(d,{...r,key:`form-${o.stepState.currentStep.name}`},p("form",{id:y,onSubmit:r.handleSubmit(g),className:"space-y-4 RemoteFlows__OnboardingForm",children:p(l,{components:u,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}e(B,"ContractorOnboardingForm");export{B as a};
2
+ //# sourceMappingURL=chunk-AJ5SXKFO.js.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-P5QKSFOE.js";import{C as d,G as p,i as u,p as c,u as m,z as C}from"./chunk-W3YE53JN.js";import{d as o}from"./chunk-KQPDXXG3.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as a,useQuery as r}from"@tanstack/react-query";var h=t(({includePremiumBenefits:e})=>{let{client:i}=o();return r({queryKey:["cost-calculator-countries",e],queryFn:t(()=>m({client:i,query:{include_premium_benefits:e}}),"queryFn"),select:t(s=>s.data?.data.filter(n=>n.availability==="active").map(n=>({value:n.region_slug,label:n.name,childRegions:n.child_regions,hasAdditionalFields:n.has_additional_fields,regionSlug:n.region_slug,currency:n.currency.code})),"select")})},"useCostCalculatorCountries"),q=t(()=>{let{client:e}=o();return r({queryKey:["company-currencies"],queryFn:t(()=>p({client:e}),"queryFn"),select:t(i=>i.data?.data?.company_currencies.map(s=>({value:s.slug,label:s.code})),"select")})},"useCompanyCurrencies"),x=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>u({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimation"),P=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>c({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimationPdf"),v=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>d({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimationCsv"),S=t((e,{includePremiumBenefits:i,options:s})=>{let{client:n}=o();return r({queryKey:["cost-calculator-region-fields",e,i],queryFn:t(()=>C({client:n,path:{slug:e},query:{include_premium_benefits:i}}),"queryFn"),enabled:!!e,select:t(({data:f})=>{let y=f?.data?.schema||{};return l(y,void 0,s)},"select")})},"useRegionFields");export{h as a,q as b,x as c,P as d,v as e,S as f};
2
- //# sourceMappingURL=chunk-HIQNB5UN.js.map
1
+ import{a as l}from"./chunk-P5QKSFOE.js";import{A as C,D as d,H as p,j as u,q as c,v as m}from"./chunk-T6Q7IALZ.js";import{d as o}from"./chunk-KQPDXXG3.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as a,useQuery as r}from"@tanstack/react-query";var h=t(({includePremiumBenefits:e})=>{let{client:i}=o();return r({queryKey:["cost-calculator-countries",e],queryFn:t(()=>m({client:i,query:{include_premium_benefits:e}}),"queryFn"),select:t(s=>s.data?.data.filter(n=>n.availability==="active").map(n=>({value:n.region_slug,label:n.name,childRegions:n.child_regions,hasAdditionalFields:n.has_additional_fields,regionSlug:n.region_slug,currency:n.currency.code})),"select")})},"useCostCalculatorCountries"),q=t(()=>{let{client:e}=o();return r({queryKey:["company-currencies"],queryFn:t(()=>p({client:e}),"queryFn"),select:t(i=>i.data?.data?.company_currencies.map(s=>({value:s.slug,label:s.code})),"select")})},"useCompanyCurrencies"),x=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>u({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimation"),P=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>c({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimationPdf"),v=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>d({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimationCsv"),S=t((e,{includePremiumBenefits:i,options:s})=>{let{client:n}=o();return r({queryKey:["cost-calculator-region-fields",e,i],queryFn:t(()=>C({client:n,path:{slug:e},query:{include_premium_benefits:i}}),"queryFn"),enabled:!!e,select:t(({data:f})=>{let y=f?.data?.schema||{};return l(y,void 0,s)},"select")})},"useRegionFields");export{h as a,q as b,x as c,P as d,v as e,S as f};
2
+ //# sourceMappingURL=chunk-ARQ2PTEA.js.map
@@ -1,2 +1,2 @@
1
- import{a as n,b as i}from"./chunk-NY7LII5R.js";import{a as e}from"./chunk-UQCSN47K.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as m,jsx as t,jsxs as s}from"react/jsx-runtime";var r=["You submit your termination request.","We review your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.","A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.","Depending on the country-specific laws and the terms of the employment agreement, we may need to seek additional legal advice. We\u2019ll let you know if there are additional charges before proceeding.","Terms and conditions for the termination are finalized.","You verbally communicate the termination to the employee.","We share termination documents with the employee.","The employee signs the termination documents if required.","We process the final salary and offboard the employee."],h=o(()=>s(m,{children:[t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__Title"),children:"Please read carefully before you continue"}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description"),children:"Please do not inform the employee of the termination. We'll lead communication with them after you submit this form and we finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. We'll ask for the details regarding that communication and take it from there."}),t(i,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:n.terminationEmployeeCommunication,children:"Learn more about employee communication"}),t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessTitle"),children:"The termination process"}),t("ul",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside"),children:r.map((a,l)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},l))})]}),"TerminationDialogInfoContent");export{h as a};
2
- //# sourceMappingURL=chunk-3BOFG6MK.js.map
1
+ import{a as n,b as i}from"./chunk-EGSUF7OD.js";import{a as e}from"./chunk-UQCSN47K.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as m,jsx as t,jsxs as s}from"react/jsx-runtime";var r=["You submit your termination request.","We review your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.","A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.","Depending on the country-specific laws and the terms of the employment agreement, we may need to seek additional legal advice. We\u2019ll let you know if there are additional charges before proceeding.","Terms and conditions for the termination are finalized.","You verbally communicate the termination to the employee.","We share termination documents with the employee.","The employee signs the termination documents if required.","We process the final salary and offboard the employee."],h=o(()=>s(m,{children:[t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__Title"),children:"Please read carefully before you continue"}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description"),children:"Please do not inform the employee of the termination. We'll lead communication with them after you submit this form and we finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. We'll ask for the details regarding that communication and take it from there."}),t(i,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:n.terminationEmployeeCommunication,children:"Learn more about employee communication"}),t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessTitle"),children:"The termination process"}),t("ul",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside"),children:r.map((a,l)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},l))})]}),"TerminationDialogInfoContent");export{h as a};
2
+ //# sourceMappingURL=chunk-BNBEIHLD.js.map
@@ -1,2 +1,2 @@
1
- import{a as Y}from"./chunk-2MX3WPCK.js";import{a as G}from"./chunk-VFRHMNLJ.js";import{a as z,b as Q,c as W,f as X}from"./chunk-HIQNB5UN.js";import{a as C}from"./chunk-HN5HLFTB.js";import{a as K}from"./chunk-LNV36S6D.js";import{c as Z}from"./chunk-CM2YPABC.js";import{a as ee}from"./chunk-2YTBWEC7.js";import{a as I}from"./chunk-P5QKSFOE.js";import{d as M}from"./chunk-HRG5MSVG.js";import{a as o}from"./chunk-P37U34EQ.js";import{number as Be,object as se}from"yup";import{useCallback as je,useEffect as te,useMemo as we,useRef as Re,useState as j}from"react";import{string as ne,ValidationError as re}from"yup";import{jsx as ie}from"react/jsx-runtime";var O={title:"Estimation",includeBenefits:!1,includeCostBreakdowns:!1,includePremiumBenefits:!1,enableCurrencyConversion:!1,includeEstimationTitle:!1,includeManagementFee:!1},Pe=o(t=>I(G.data.schema,void 0,t),"useStaticSchema");function xe(t,i){if(typeof t=="object"&&t!==null&&"title"in t){let l=t.title;if(l)return l}return i==="my_hiring_budget"?"Hiring budget":"Employee's annual salary"}o(xe,"getSalaryTitle");var ze=o(({defaultRegion:t,defaultCurrency:i,defaultSalary:l,estimationOptions:s,options:n,version:a}={estimationOptions:O})=>{let u=Re({fields:{}}),[k,h]=j(t),[w,R]=j(),[m,q]=j(),[H,le]=j(),{data:_,isLoading:ue}=z({includePremiumBenefits:s.includePremiumBenefits}),{data:d,isLoading:ce}=Q(),me=k||w?.value,{data:P,isLoading:de}=X(me,{includePremiumBenefits:s.includePremiumBenefits,options:n}),U=W(),{mutateAsync:fe}=ee(U),b=w?.currency,p=n?.jsfModify?.fields?.salary,F=p&&typeof p=="object"&&"presentation"in p?p.presentation:void 0,L=je(()=>{let e=b&&m?b!==m:!1;return b!==m?{from:m,to:b,shouldSwapOrder:e}:{from:b,to:m,shouldSwapOrder:e}},[b,m]),J=s.showManagementFee,$=s.includeEstimationTitle,ge=we(()=>{let{from:e,to:r,shouldSwapOrder:c}=L(),g=xe(p,H);return{fields:{salary:{...p,title:g,presentation:{salary_conversion_properties:{label:F?.salary_conversion_properties?.label,description:F?.salary_conversion_properties?.description},currencies:{from:e,to:r},Component:o(y=>ie(Y,{...y,shouldSwapOrder:c,conversionType:a==="marketing"?"no_spread":"spread",defaultValue:l}),"Component")}},hiring_budget:{...n?.jsfModify?.fields?.hiring_budget,presentation:{hidden:a=="marketing"}},management:{...n?.jsfModify?.fields?.management,properties:{...n?.jsfModify?.fields?.management?.properties,management_fee:{...n?.jsfModify?.fields?.management?.properties?.management_fee,"x-jsf-presentation":{inputType:"money",additionalProps:{currency:m||"USD"}}}},presentation:{...typeof n?.jsfModify?.fields?.management=="object"?(n?.jsfModify?.fields?.management)["x-jsf-presentation"]:{},hidden:!J,Component:o(y=>ie(Z,{...y,variant:"inset",features:{toggle:{enabled:!0,stateField:"management._expanded",labels:{expand:"Define",collapse:"Remove"}}}}),"Component")}},estimation_title:{...n?.jsfModify?.fields?.estimation_title,"x-jsf-presentation":{hidden:!$}}}}},[L,p,H,F?.salary_conversion_properties?.label,F?.salary_conversion_properties?.description,n?.jsfModify?.fields?.hiring_budget,n?.jsfModify?.fields?.management,n?.jsfModify?.fields?.estimation_title,a,m,J,$,l]),f=Pe({jsfModify:{fields:{...n?.jsfModify?.fields,...ge?.fields}}});te(()=>{if(t&&_){let e=_.find(({value:r})=>r===t);e&&R(e)}},[t,_]),te(()=>{if(i&&d){let e=d.find(({value:r})=>r===i);e&&q(e.label)}},[i,d]);async function ye(e){return fe(oe(e,s,a))}o(ye,"onSubmit");function pe(e){let r=_?.find(({value:c})=>c===e);r&&r.childRegions.length===0&&r.hasAdditionalFields?h(r.regionSlug):h(void 0),R(r)}o(pe,"onCountryChange");function Ce(e){h(e)}o(Ce,"onRegionChange");function _e(e){le(e.target.value)}o(_e,"onHiringBudgetChange");function be(e){let r=d?.find(c=>c.value===e)?.label;q(r),n?.onCurrencyChange?.(r||"")}o(be,"onChangeCurrency");let E=f.fields.find(e=>e.name==="region");if(E){let e=w?.childRegions.map(r=>({value:r.slug,label:r.name}))??[];E.options=e,E.isVisible=e.length>0,E.required=e.length>0,E.onChange=Ce,E.schema=e.length>0?ne().transform(r=>typeof r=="string"?r:"").required("Region is required"):ne()}if(d){let e=f.fields.find(r=>r.name==="currency");e&&(e.options=d,e.onChange=be)}let v=f.fields.find(e=>e.name==="hiring_budget");if(v&&(v.onChange=_e),_){let e=f.fields.find(r=>r.name==="country");e&&(e.options=_,e.onChange=pe)}let Ee=o(()=>{R(void 0),h(t)},"resetForm"),D=[...f.fields.filter(e=>e.name!=="management"),...P?.fields||[],...f.fields.filter(e=>e.name==="management")],N=ae(f.fields,m||"USD",s.includeEstimationTitle);async function Se(e){let r=null;n?.onValidation?.(e);let c=await M(e,D);try{await N.validate(c,{abortEarly:!1}),r={formErrors:{},yupError:new re([],e)}}catch(S){let B=K(S);r={formErrors:Object.entries(B).reduce((T,[A,V])=>({...T,[A]:V.message}),{}),yupError:S}}let g=P?.handleValidation(c),y=[...r?.yupError.inner||[],...g?.yupError?.inner||[]],x={...r?.yupError?.value||{},...g?.yupError?.value||{}};return{formErrors:{...r?.formErrors||{},...g?.formErrors||{}},yupError:new re(y,x)}}return o(Se,"handleValidation"),{stepState:{current:0,total:1,isLastStep:!0},fields:D,validationSchema:N,parseFormValues:o(async e=>{let{country:r,region:c,currency:g,salary_converted:y,hiring_budget:x,salary_conversion:S,management:B,estimation_title:T,...A}=e,V=e.salary;y==="salary_conversion"&&(V=S);let he=await M({country:r,region:c,salary:V,salary_converted:y,salary_conversion:S,hiring_budget:x,currency:g,management:B,estimation_title:T},f.fields),Fe=await M(A,P?.fields||[]),Ve={currency_code:d?.find(Me=>Me.value===g)?.label};return{...he,...Fe,...Ve}},"parseFormValues"),handleValidation:Se,isSubmitting:U.isPending,isLoading:ue&&ce&&de,onSubmit:ye,resetForm:Ee,currencies:d,meta:{fields:u.current?.fields}}},"useCostCalculator");function ae(t,i,l){let s=t.reduce((n,a)=>(a.name==="salary"||a.name==="salary_conversion"?n[a.name]=a.schema.when("salary_converted",{is:o(u=>u===a.name,"is"),then:o(u=>u.required("Required field"),"then"),otherwise:o(u=>u.optional(),"otherwise")}):a.name==="management"?n[a.name]=se({management_fee:Be().transform(u=>isNaN(u)?void 0:u).min(0,"Management fee must be greater than or equal to 0").max(i?C[i]:C.USD,()=>`Management fee cannot exceed ${(i?C[i]:C.USD)/100} ${i}`)}):a.name==="estimation_title"&&l?n[a.name]=a.schema.required("Required field"):n[a.name]=a.schema,n),{});return se(s)}o(ae,"buildValidationSchema");function Te(t){let i="benefit-";return Object.keys(t).reduce((l,s)=>{let n=t[s];if(n==="none")return l;let u={benefit_group_slug:s.replace(i,""),benefit_tier_slug:n};return[...l,u]},[])}o(Te,"formatBenefits");function Ae(t,i,l){let s=Number(t.management?.management_fee),n=t.currency_code;return{...{region_slug:t.region||t.country,employment_term:t.contract_duration_type??"fixed",title:t.estimation_title||i.title,age:t.age??void 0,...t.benefits&&{benefits:Te(t.benefits)},...i.includeManagementFee&&s&&{discount:{quoted_amount:i.showManagementFee?s:C[n]||C.USD,text:""}}},...Oe(t,l)}}o(Ae,"mapValueToEmployment");function Oe(t,i){let l=i==="marketing"||t.salary_converted==="salary_conversion",s=i==="standard"&&t.salary_converted==="salary",n=t.hiring_budget==="my_hiring_budget";if(l){let a=t.salary_converted==="salary_conversion";return n?{annual_total_cost_in_employer_currency:t.salary}:{[a?"annual_gross_salary_in_employer_currency":"annual_gross_salary"]:t.salary}}return s?n?{annual_total_cost:t.salary}:{annual_gross_salary:t.salary}:{}}o(Oe,"getSalaryFields");function oe(t,i=O,l="standard"){let s=Array.isArray(t)?t:[t];if(s.length===0)throw new Error("At least one employment value is required");return s.length>1&&new Set(s.map(a=>a.currency)).size>1&&console.warn("Multiple currencies detected in array. Using currency from first employment."),{employer_currency_slug:s[0].currency,include_benefits:i.includeBenefits,include_cost_breakdowns:i.includeCostBreakdowns,include_premium_benefits:i.includePremiumBenefits,include_management_fee:i.includeManagementFee,employments:s.map(n=>Ae(n,i,l))}}o(oe,"buildPayload");export{ae as a,oe as b,O as c,ze as d};
2
- //# sourceMappingURL=chunk-P5PRB2JC.js.map
1
+ import{a as Y}from"./chunk-YXVNCPUI.js";import{a as G}from"./chunk-VFRHMNLJ.js";import{a as z,b as Q,c as W,f as X}from"./chunk-ARQ2PTEA.js";import{a as C}from"./chunk-HN5HLFTB.js";import{a as K}from"./chunk-LNV36S6D.js";import{c as Z}from"./chunk-NHREKNSV.js";import{a as ee}from"./chunk-2YTBWEC7.js";import{a as I}from"./chunk-P5QKSFOE.js";import{d as M}from"./chunk-HRG5MSVG.js";import{a as o}from"./chunk-P37U34EQ.js";import{number as Be,object as se}from"yup";import{useCallback as je,useEffect as te,useMemo as we,useRef as Re,useState as j}from"react";import{string as ne,ValidationError as re}from"yup";import{jsx as ie}from"react/jsx-runtime";var O={title:"Estimation",includeBenefits:!1,includeCostBreakdowns:!1,includePremiumBenefits:!1,enableCurrencyConversion:!1,includeEstimationTitle:!1,includeManagementFee:!1},Pe=o(t=>I(G.data.schema,void 0,t),"useStaticSchema");function xe(t,i){if(typeof t=="object"&&t!==null&&"title"in t){let l=t.title;if(l)return l}return i==="my_hiring_budget"?"Hiring budget":"Employee's annual salary"}o(xe,"getSalaryTitle");var ze=o(({defaultRegion:t,defaultCurrency:i,defaultSalary:l,estimationOptions:s,options:n,version:a}={estimationOptions:O})=>{let u=Re({fields:{}}),[k,h]=j(t),[w,R]=j(),[m,q]=j(),[H,le]=j(),{data:_,isLoading:ue}=z({includePremiumBenefits:s.includePremiumBenefits}),{data:d,isLoading:ce}=Q(),me=k||w?.value,{data:P,isLoading:de}=X(me,{includePremiumBenefits:s.includePremiumBenefits,options:n}),U=W(),{mutateAsync:fe}=ee(U),b=w?.currency,p=n?.jsfModify?.fields?.salary,F=p&&typeof p=="object"&&"presentation"in p?p.presentation:void 0,L=je(()=>{let e=b&&m?b!==m:!1;return b!==m?{from:m,to:b,shouldSwapOrder:e}:{from:b,to:m,shouldSwapOrder:e}},[b,m]),J=s.showManagementFee,$=s.includeEstimationTitle,ge=we(()=>{let{from:e,to:r,shouldSwapOrder:c}=L(),g=xe(p,H);return{fields:{salary:{...p,title:g,presentation:{salary_conversion_properties:{label:F?.salary_conversion_properties?.label,description:F?.salary_conversion_properties?.description},currencies:{from:e,to:r},Component:o(y=>ie(Y,{...y,shouldSwapOrder:c,conversionType:a==="marketing"?"no_spread":"spread",defaultValue:l}),"Component")}},hiring_budget:{...n?.jsfModify?.fields?.hiring_budget,presentation:{hidden:a=="marketing"}},management:{...n?.jsfModify?.fields?.management,properties:{...n?.jsfModify?.fields?.management?.properties,management_fee:{...n?.jsfModify?.fields?.management?.properties?.management_fee,"x-jsf-presentation":{inputType:"money",additionalProps:{currency:m||"USD"}}}},presentation:{...typeof n?.jsfModify?.fields?.management=="object"?(n?.jsfModify?.fields?.management)["x-jsf-presentation"]:{},hidden:!J,Component:o(y=>ie(Z,{...y,variant:"inset",features:{toggle:{enabled:!0,stateField:"management._expanded",labels:{expand:"Define",collapse:"Remove"}}}}),"Component")}},estimation_title:{...n?.jsfModify?.fields?.estimation_title,"x-jsf-presentation":{hidden:!$}}}}},[L,p,H,F?.salary_conversion_properties?.label,F?.salary_conversion_properties?.description,n?.jsfModify?.fields?.hiring_budget,n?.jsfModify?.fields?.management,n?.jsfModify?.fields?.estimation_title,a,m,J,$,l]),f=Pe({jsfModify:{fields:{...n?.jsfModify?.fields,...ge?.fields}}});te(()=>{if(t&&_){let e=_.find(({value:r})=>r===t);e&&R(e)}},[t,_]),te(()=>{if(i&&d){let e=d.find(({value:r})=>r===i);e&&q(e.label)}},[i,d]);async function ye(e){return fe(oe(e,s,a))}o(ye,"onSubmit");function pe(e){let r=_?.find(({value:c})=>c===e);r&&r.childRegions.length===0&&r.hasAdditionalFields?h(r.regionSlug):h(void 0),R(r)}o(pe,"onCountryChange");function Ce(e){h(e)}o(Ce,"onRegionChange");function _e(e){le(e.target.value)}o(_e,"onHiringBudgetChange");function be(e){let r=d?.find(c=>c.value===e)?.label;q(r),n?.onCurrencyChange?.(r||"")}o(be,"onChangeCurrency");let E=f.fields.find(e=>e.name==="region");if(E){let e=w?.childRegions.map(r=>({value:r.slug,label:r.name}))??[];E.options=e,E.isVisible=e.length>0,E.required=e.length>0,E.onChange=Ce,E.schema=e.length>0?ne().transform(r=>typeof r=="string"?r:"").required("Region is required"):ne()}if(d){let e=f.fields.find(r=>r.name==="currency");e&&(e.options=d,e.onChange=be)}let v=f.fields.find(e=>e.name==="hiring_budget");if(v&&(v.onChange=_e),_){let e=f.fields.find(r=>r.name==="country");e&&(e.options=_,e.onChange=pe)}let Ee=o(()=>{R(void 0),h(t)},"resetForm"),D=[...f.fields.filter(e=>e.name!=="management"),...P?.fields||[],...f.fields.filter(e=>e.name==="management")],N=ae(f.fields,m||"USD",s.includeEstimationTitle);async function Se(e){let r=null;n?.onValidation?.(e);let c=await M(e,D);try{await N.validate(c,{abortEarly:!1}),r={formErrors:{},yupError:new re([],e)}}catch(S){let B=K(S);r={formErrors:Object.entries(B).reduce((T,[A,V])=>({...T,[A]:V.message}),{}),yupError:S}}let g=P?.handleValidation(c),y=[...r?.yupError.inner||[],...g?.yupError?.inner||[]],x={...r?.yupError?.value||{},...g?.yupError?.value||{}};return{formErrors:{...r?.formErrors||{},...g?.formErrors||{}},yupError:new re(y,x)}}return o(Se,"handleValidation"),{stepState:{current:0,total:1,isLastStep:!0},fields:D,validationSchema:N,parseFormValues:o(async e=>{let{country:r,region:c,currency:g,salary_converted:y,hiring_budget:x,salary_conversion:S,management:B,estimation_title:T,...A}=e,V=e.salary;y==="salary_conversion"&&(V=S);let he=await M({country:r,region:c,salary:V,salary_converted:y,salary_conversion:S,hiring_budget:x,currency:g,management:B,estimation_title:T},f.fields),Fe=await M(A,P?.fields||[]),Ve={currency_code:d?.find(Me=>Me.value===g)?.label};return{...he,...Fe,...Ve}},"parseFormValues"),handleValidation:Se,isSubmitting:U.isPending,isLoading:ue&&ce&&de,onSubmit:ye,resetForm:Ee,currencies:d,meta:{fields:u.current?.fields}}},"useCostCalculator");function ae(t,i,l){let s=t.reduce((n,a)=>(a.name==="salary"||a.name==="salary_conversion"?n[a.name]=a.schema.when("salary_converted",{is:o(u=>u===a.name,"is"),then:o(u=>u.required("Required field"),"then"),otherwise:o(u=>u.optional(),"otherwise")}):a.name==="management"?n[a.name]=se({management_fee:Be().transform(u=>isNaN(u)?void 0:u).min(0,"Management fee must be greater than or equal to 0").max(i?C[i]:C.USD,()=>`Management fee cannot exceed ${(i?C[i]:C.USD)/100} ${i}`)}):a.name==="estimation_title"&&l?n[a.name]=a.schema.required("Required field"):n[a.name]=a.schema,n),{});return se(s)}o(ae,"buildValidationSchema");function Te(t){let i="benefit-";return Object.keys(t).reduce((l,s)=>{let n=t[s];if(n==="none")return l;let u={benefit_group_slug:s.replace(i,""),benefit_tier_slug:n};return[...l,u]},[])}o(Te,"formatBenefits");function Ae(t,i,l){let s=Number(t.management?.management_fee),n=t.currency_code;return{...{region_slug:t.region||t.country,employment_term:t.contract_duration_type??"fixed",title:t.estimation_title||i.title,age:t.age??void 0,...t.benefits&&{benefits:Te(t.benefits)},...i.includeManagementFee&&s&&{discount:{quoted_amount:i.showManagementFee?s:C[n]||C.USD,text:""}}},...Oe(t,l)}}o(Ae,"mapValueToEmployment");function Oe(t,i){let l=i==="marketing"||t.salary_converted==="salary_conversion",s=i==="standard"&&t.salary_converted==="salary",n=t.hiring_budget==="my_hiring_budget";if(l){let a=t.salary_converted==="salary_conversion";return n?{annual_total_cost_in_employer_currency:t.salary}:{[a?"annual_gross_salary_in_employer_currency":"annual_gross_salary"]:t.salary}}return s?n?{annual_total_cost:t.salary}:{annual_gross_salary:t.salary}:{}}o(Oe,"getSalaryFields");function oe(t,i=O,l="standard"){let s=Array.isArray(t)?t:[t];if(s.length===0)throw new Error("At least one employment value is required");return s.length>1&&new Set(s.map(a=>a.currency)).size>1&&console.warn("Multiple currencies detected in array. Using currency from first employment."),{employer_currency_slug:s[0].currency,include_benefits:i.includeBenefits,include_cost_breakdowns:i.includeCostBreakdowns,include_premium_benefits:i.includePremiumBenefits,include_management_fee:i.includeManagementFee,employments:s.map(n=>Ae(n,i,l))}}o(oe,"buildPayload");export{ae as a,oe as b,O as c,ze as d};
2
+ //# sourceMappingURL=chunk-CTAWDJ2D.js.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-SRR73QPD.js";import{b as s}from"./chunk-PGWKJ6FK.js";import{b as t}from"./chunk-2YTBWEC7.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function b({onSubmit:d,onSuccess:l,onError:n}){let{onboardingBag:r}=s(),f=a(async e=>{try{let i=await r.parseFormValues(e);await d?.(i);let o=await r.onSubmit(e);if(o?.data){await l?.(o?.data),r?.next();return}if(o?.error){let c=t(o?.fieldErrors||[],r.meta?.fields?.basic_information);n?.({error:o?.error,rawError:o?.rawError,fieldErrors:c})}}catch(i){n?.({error:i,rawError:i,fieldErrors:[]})}},"handleSubmit"),p=r.stepState.values?.basic_information||r.initialValues.basic_information;return E(m,{defaultValues:p,onSubmit:f})}a(b,"BasicInformationStep");export{b as a};
2
- //# sourceMappingURL=chunk-AF3YOXUE.js.map
1
+ import{a as m}from"./chunk-NPKIEWF4.js";import{b as s}from"./chunk-PGWKJ6FK.js";import{b as t}from"./chunk-2YTBWEC7.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function b({onSubmit:d,onSuccess:l,onError:n}){let{onboardingBag:r}=s(),f=a(async e=>{try{let i=await r.parseFormValues(e);await d?.(i);let o=await r.onSubmit(e);if(o?.data){await l?.(o?.data),r?.next();return}if(o?.error){let c=t(o?.fieldErrors||[],r.meta?.fields?.basic_information);n?.({error:o?.error,rawError:o?.rawError,fieldErrors:c})}}catch(i){n?.({error:i,rawError:i,fieldErrors:[]})}},"handleSubmit"),p=r.stepState.values?.basic_information||r.initialValues.basic_information;return E(m,{defaultValues:p,onSubmit:f})}a(b,"BasicInformationStep");export{b as a};
2
+ //# sourceMappingURL=chunk-D6Y7GLBT.js.map
@@ -1,2 +1,2 @@
1
- import{h as f}from"./chunk-W3YE53JN.js";import{a as b,b as D,c as C,d as h,e as Z,f as y}from"./chunk-GGPEKIIH.js";import{b as g,d as w}from"./chunk-KQPDXXG3.js";import{a as p,f as k}from"./chunk-UQCSN47K.js";import{a as e}from"./chunk-P37U34EQ.js";var H={disclaimerCostCalculator:4668194326797,employeeOnboardingTimeline:4411262104589,extraPayments:4466822781709,internationalPricing:4410698586893,remoteFxRate:33271144977421,terminationEmployeeCommunication:4411585179661,terminationNoticePeriods:5831900985613,involuntaryOffboardingServiceCharge:4406932229133,reconciliationInvoice:17604014808589},m=e(r=>`https://support.remote.com/hc/en-us/articles/${r}`,"buildZendeskURL");import{useQuery as L}from"@tanstack/react-query";var v=e((r,n)=>{let{client:i}=w();return L({queryKey:["zendesk-article",r],queryFn:e(async()=>{let o=await f({client:i,path:{id:Number(r)}});if(o.error)throw new Error(o.error.message||"Failed to fetch article");return o},"queryFn"),select:e(o=>{let t=o.data?.data.help_center_article;return t&&{...t,body:k(t.body||"")}},"select"),retry:!1,...n})},"useZendeskArticle");import{jsx as a,jsxs as c}from"react/jsx-runtime";function x({open:r,onClose:n,data:i,isLoading:o,error:t,zendeskURL:d,Trigger:s}){return c(b,{open:r,onOpenChange:l=>!l&&n(),direction:"right",children:[a(D,{asChild:!0,children:s}),a(C,{className:"h-full w-[540px] mt-0 ml-auto RemoteFlows_ZendeskDrawer",children:c("div",{className:"h-full flex flex-col",children:[c(h,{children:[a(Z,{children:i?.title}),c(y,{children:["For more details see our"," ",a("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:"help article"})," "]})]}),o&&a("div",{children:"Loading..."}),t&&a("div",{className:"text-sm p-4 text-red-500",children:"Error loading article"}),a("div",{className:"flex-1 overflow-y-auto p-4 RemoteFlows_ZendeskDrawer__Content",dangerouslySetInnerHTML:{__html:i?.body||""}})]})})]})}e(x,"ZendeskDrawerDefault");import{jsx as P}from"react/jsx-runtime";var R=e(({Trigger:r,zendeskId:n,open:i,onClose:o})=>{let{components:t}=g(),d=m(n),s=e(()=>{o?.()},"handleClose"),{data:l,isLoading:_,error:N}=v(n,{enabled:i}),F=t?.zendeskDrawer||x;return P(F,{open:i,onClose:s,data:l,isLoading:_,error:N,zendeskURL:d,Trigger:r})},"ZendeskDrawer");import{useState as z}from"react";import{jsx as u}from"react/jsx-runtime";var T="RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block text-xs bg-transparent border-none cursor-pointer p-0";function ne({zendeskId:r,className:n,onClick:i,children:o,external:t=!1}){let[d,s]=z(!1),l=e(()=>{t||s(!0),i?.(r)},"handleClick");return t?u("a",{href:m(r),target:"_blank",rel:"noopener noreferrer",onClick:l,className:p(T,n),children:o}):u(R,{zendeskId:r,open:d,onClose:()=>s(!1),Trigger:u("button",{onClick:l,className:p(T,n),children:o})})}e(ne,"ZendeskTriggerButton");export{H as a,ne as b};
2
- //# sourceMappingURL=chunk-NY7LII5R.js.map
1
+ import{h as f}from"./chunk-T6Q7IALZ.js";import{a as b,b as D,c as C,d as h,e as Z,f as y}from"./chunk-GGPEKIIH.js";import{b as g,d as w}from"./chunk-KQPDXXG3.js";import{a as p,f as k}from"./chunk-UQCSN47K.js";import{a as e}from"./chunk-P37U34EQ.js";var H={disclaimerCostCalculator:4668194326797,employeeOnboardingTimeline:4411262104589,extraPayments:4466822781709,internationalPricing:4410698586893,remoteFxRate:33271144977421,terminationEmployeeCommunication:4411585179661,terminationNoticePeriods:5831900985613,involuntaryOffboardingServiceCharge:4406932229133,reconciliationInvoice:17604014808589},m=e(r=>`https://support.remote.com/hc/en-us/articles/${r}`,"buildZendeskURL");import{useQuery as L}from"@tanstack/react-query";var v=e((r,n)=>{let{client:i}=w();return L({queryKey:["zendesk-article",r],queryFn:e(async()=>{let o=await f({client:i,path:{id:Number(r)}});if(o.error)throw new Error(o.error.message||"Failed to fetch article");return o},"queryFn"),select:e(o=>{let t=o.data?.data.help_center_article;return t&&{...t,body:k(t.body||"")}},"select"),retry:!1,...n})},"useZendeskArticle");import{jsx as a,jsxs as c}from"react/jsx-runtime";function x({open:r,onClose:n,data:i,isLoading:o,error:t,zendeskURL:d,Trigger:s}){return c(b,{open:r,onOpenChange:l=>!l&&n(),direction:"right",children:[a(D,{asChild:!0,children:s}),a(C,{className:"h-full w-[540px] mt-0 ml-auto RemoteFlows_ZendeskDrawer",children:c("div",{className:"h-full flex flex-col",children:[c(h,{children:[a(Z,{children:i?.title}),c(y,{children:["For more details see our"," ",a("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:"help article"})," "]})]}),o&&a("div",{children:"Loading..."}),t&&a("div",{className:"text-sm p-4 text-red-500",children:"Error loading article"}),a("div",{className:"flex-1 overflow-y-auto p-4 RemoteFlows_ZendeskDrawer__Content",dangerouslySetInnerHTML:{__html:i?.body||""}})]})})]})}e(x,"ZendeskDrawerDefault");import{jsx as P}from"react/jsx-runtime";var R=e(({Trigger:r,zendeskId:n,open:i,onClose:o})=>{let{components:t}=g(),d=m(n),s=e(()=>{o?.()},"handleClose"),{data:l,isLoading:_,error:N}=v(n,{enabled:i}),F=t?.zendeskDrawer||x;return P(F,{open:i,onClose:s,data:l,isLoading:_,error:N,zendeskURL:d,Trigger:r})},"ZendeskDrawer");import{useState as z}from"react";import{jsx as u}from"react/jsx-runtime";var T="RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block text-xs bg-transparent border-none cursor-pointer p-0";function ne({zendeskId:r,className:n,onClick:i,children:o,external:t=!1}){let[d,s]=z(!1),l=e(()=>{t||s(!0),i?.(r)},"handleClick");return t?u("a",{href:m(r),target:"_blank",rel:"noopener noreferrer",onClick:l,className:p(T,n),children:o}):u(R,{zendeskId:r,open:d,onClose:()=>s(!1),Trigger:u("button",{onClick:l,className:p(T,n),children:o})})}e(ne,"ZendeskTriggerButton");export{H as a,ne as b};
2
+ //# sourceMappingURL=chunk-EGSUF7OD.js.map
@@ -1,2 +1,2 @@
1
- import{a as ut,b as pt,c as ft,d as yt}from"./chunk-LOHRUY4J.js";import{a as at,b as it,c as st,e as ct,f as lt,g as dt,h as mt}from"./chunk-CATDB2YM.js";import{a as ot,b as rt}from"./chunk-3UDG4IJO.js";import{a as X,f as Z,h as tt,k as et}from"./chunk-W4KHMUDZ.js";import{c as z,d as Q}from"./chunk-H6YNMT4M.js";import{a as E}from"./chunk-2YTBWEC7.js";import{a as nt}from"./chunk-PJBAQZ6G.js";import{d as f,e as C}from"./chunk-HRG5MSVG.js";import{g as V}from"./chunk-UQCSN47K.js";import{a as p}from"./chunk-P37U34EQ.js";import{useEffect as Qt,useMemo as c,useRef as Xt,useState as J}from"react";var Zt={select_country:null,basic_information:"employment_basic_information",contract_details:null,pricing_plan:null,contract_preview:null,review:null},te={employment_basic_information:"basic_information"},ee=new Date().toISOString().split("T")[0],fe=p(({countryCode:_t,externalId:St,employmentId:y,skipSteps:gt,options:P,initialValues:i})=>{let[a,A]=J(_t||null),[r,bt]=J(y),[T,Ct]=J(void 0),O=Xt({select_country:{},basic_information:{},contract_details:{},contract_preview:{},pricing_plan:{}}),wt=gt?.includes("select_country")?pt:ut,{fieldValues:m,stepState:e,setFieldValues:Ft,previousStep:vt,nextStep:ht,goToStep:I,setStepValues:B}=nt(wt),{data:s,isLoading:R,refetch:Vt}=X(r),{status:_}=s||{},L=_&&z.includes(_),Et=_&&!Q.includes(_),Pt=c(()=>_==="invited"?"invited":"not_invited",[_]),q=tt(),N=lt(),x=it(),Ot=ct(),{mutateAsync:Mt}=E(q),{mutateAsync:Dt}=E(N),{mutateAsync:Tt}=E(x),{mutateAsync:U}=E(Ot);y&&s?.country?.code&&!a&&A(s.country.code);let{selectCountryForm:M,isLoading:It}=et({jsfModify:P?.jsfModify?.select_country,queryOptions:{enabled:e.currentStep.name==="select_country"}}),{form:H,isLoading:Rt}=mt(r,{jsonSchemaVersion:P?.jsonSchemaVersion,queryOptions:{enabled:e.currentStep.name==="pricing_plan"}}),Lt=Zt[e.currentStep.name]||"contractor_basic_information",jt=te[Lt],kt=s?.[jt]||{},Jt=p(({form:t,options:o={},query:g={}})=>{let b=Object.keys(m).length>0?{...i,...e.values?.[e.currentStep.name],...m}:{...i,...kt};return Z({countryCode:a,form:t,fieldValues:b,query:g,options:{...o,queryOptions:{enabled:o.queryOptions?.enabled??!0}}})},"useJSONSchema"),At=!!(a&&(e.currentStep.name==="basic_information"||y)),Bt=!!(a&&(e.currentStep.name==="contract_details"||y)),{data:l,isLoading:qt}=Jt({form:"contractor_basic_information",options:{jsfModify:P?.jsfModify?.basic_information,queryOptions:{enabled:At}}}),Nt=c(()=>ft(s?.basic_information?.provisional_start_date,m?.service_duration?.provisional_start_date),[s?.basic_information?.provisional_start_date,m?.service_duration?.provisional_start_date]),{data:d,isLoading:xt}=dt({countryCode:a,fieldValues:m,options:{queryOptions:{enabled:Bt},jsfModify:yt(P?.jsfModify?.contract_details,Nt)}}),{data:u}=at({fieldValues:m,options:{queryOptions:{enabled:e.currentStep.name==="contract_preview"}}}),{data:Ut,isLoading:Ht}=st({employmentId:r,contractDocumentId:T,options:{queryOptions:{enabled:!!T}}}),n=c(()=>({select_country:M?.fields||[],basic_information:l?.fields||[],pricing_plan:H?.fields||[],contract_details:d?.fields||[],contract_preview:u?.fields||[],review:[]}),[M?.fields,l?.fields,H?.fields,d?.fields,u?.fields]),Gt={select_country:null,basic_information:l?.meta["x-jsf-fieldsets"],pricing_plan:null,contract_details:d?.meta["x-jsf-fieldsets"],contract_preview:null,review:null},{country:Wt,basic_information:D={},contract_details:S={}}=s||{},G=Wt?.code,w=c(()=>C(n.select_country,{country:a||G||""}),[n.select_country,a,G]),F=c(()=>{let t={provisional_start_date:ee,...i,...D};return C(n.basic_information,t)},[n.basic_information,D,i]),v=c(()=>{let o={...{service_duration:{provisional_start_date:D.provisional_start_date}},...i,...S};return C(n.contract_details,o)},[n.contract_details,S,i,D]),W=c(()=>{let t={...i,...S};return C(n.contract_preview,t)},[n.contract_preview,S,i]),$=c(()=>{let t={...i,...S};return C(n.pricing_plan,t?.pricing_plan??{})},[n.pricing_plan,S,i]),$t=c(()=>({select_country:w,basic_information:F,contract_details:v,contract_preview:W,pricing_plan:$}),[w,F,v,W,$]),K=c(()=>!!(!!(y&&L&&e.currentStep.name!=="review")&&!R&&n.basic_information.length>0&&n.contract_details.length>0),[y,L,R,n.basic_information.length,n.contract_details.length,e.currentStep.name]);Qt(()=>{K&&(O.current={select_country:V(w,n.select_country),basic_information:V(F,n.basic_information),contract_details:V(v,n.contract_details),contract_preview:{},pricing_plan:{}},B({select_country:w,basic_information:F,contract_details:v,contract_preview:{},pricing_plan:{},review:{}}),I("review"))},[K,I,w,F,v,B,n.select_country,n.basic_information,n.contract_details]);let Kt=p(t=>{I(t)},"goTo"),Y=p(async t=>M&&e.currentStep.name==="select_country"?t:l&&e.currentStep.name==="basic_information"?await f(t,l?.fields,{isPartialValidation:!1}):d&&e.currentStep.name==="contract_details"?await f(t,d?.fields,{isPartialValidation:!1}):u&&e.currentStep.name==="contract_preview"?await f(t,u?.fields,{isPartialValidation:!1}):e.currentStep.name==="pricing_plan"?t:{},"parseFormValues");async function Yt(t){let o=e.currentStep.name;o in O.current&&(O.current[o]=V(t,n[o]));let g=await Y(t);switch(e.currentStep.name){case"select_country":return A(g.country),Promise.resolve({data:{countryCode:g.country}});case"basic_information":{let j=!r&&a,b=r&&a&&s?.country&&s?.country.code!==a;if(j||b){let k={basic_information:g,type:"contractor",country_code:a,external_id:St};try{let h=await Mt(k),zt=h.data?.data?.employment?.id;return bt(zt),h}catch(h){throw console.error("Error creating onboarding:",h),h}}else if(r)return Promise.resolve({data:{employmentId:r}});return}case"contract_details":{let b=await Dt({employmentId:r,payload:{contract_document:g}}),k=b.data?.data?.contract_document?.id;return Ct(k),b}case"contract_preview":return Tt({employmentId:r,contractDocumentId:T,payload:{signature:t.signature}});case"pricing_plan":return t.subscription==ot?U({employmentId:r,payload:{operation:"downgrade"}}):t.subscription==rt?U({employmentId:r,payload:{operation:"upgrade"}}):Promise.reject({error:"invalid selection"});default:throw new Error("Invalid step state")}}return p(Yt,"onSubmit"),{isLoading:It||qt||R||xt||Rt||Ht,fieldValues:m,stepState:e,checkFieldUpdates:Ft,back:vt,next:ht,goTo:Kt,onSubmit:Yt,fields:n[e.currentStep.name],meta:{fields:O.current,fieldsets:Gt[e.currentStep.name]},parseFormValues:Y,handleValidation:p(async t=>{if(e.currentStep.name==="select_country")return M.handleValidation(t);if(l&&e.currentStep.name==="basic_information"){let o=await f(t,l?.fields,{isPartialValidation:!1});return l?.handleValidation(o)}if(d&&e.currentStep.name==="contract_details"){let o=await f(t,d?.fields,{isPartialValidation:!1});return d?.handleValidation(o)}if(u&&e.currentStep.name==="contract_preview"){let o=await f(t,u?.fields,{isPartialValidation:!1});return u?.handleValidation(o)}return e.currentStep.name==="pricing_plan"?{formErrors:{}}:null},"handleValidation"),initialValues:$t,employmentId:r,refetchEmployment:Vt,isSubmitting:q.isPending||N.isPending||x.isPending,documentPreviewPdf:Ut,canInvite:Et,isEmploymentReadOnly:L,invitedStatus:Pt,employment:s}},"useContractorOnboarding");export{fe as a};
2
- //# sourceMappingURL=chunk-ZZPYYZNT.js.map
1
+ import{a as ut,b as pt,c as ft,d as yt}from"./chunk-LOHRUY4J.js";import{a as at,b as it,c as st,e as ct,f as lt,g as dt,h as mt}from"./chunk-MD2QFLXC.js";import{a as ot,b as rt}from"./chunk-3UDG4IJO.js";import{a as X,f as Z,h as tt,k as et}from"./chunk-N3X274GT.js";import{c as z,d as Q}from"./chunk-H6YNMT4M.js";import{a as E}from"./chunk-2YTBWEC7.js";import{a as nt}from"./chunk-5BRMLRS7.js";import{d as f,e as C}from"./chunk-HRG5MSVG.js";import{g as V}from"./chunk-UQCSN47K.js";import{a as p}from"./chunk-P37U34EQ.js";import{useEffect as Qt,useMemo as c,useRef as Xt,useState as J}from"react";var Zt={select_country:null,basic_information:"employment_basic_information",contract_details:null,pricing_plan:null,contract_preview:null,review:null},te={employment_basic_information:"basic_information"},ee=new Date().toISOString().split("T")[0],fe=p(({countryCode:_t,externalId:St,employmentId:y,skipSteps:gt,options:P,initialValues:i})=>{let[a,A]=J(_t||null),[r,bt]=J(y),[T,Ct]=J(void 0),O=Xt({select_country:{},basic_information:{},contract_details:{},contract_preview:{},pricing_plan:{}}),wt=gt?.includes("select_country")?pt:ut,{fieldValues:m,stepState:e,setFieldValues:Ft,previousStep:vt,nextStep:ht,goToStep:I,setStepValues:B}=nt(wt),{data:s,isLoading:R,refetch:Vt}=X(r),{status:_}=s||{},L=_&&z.includes(_),Et=_&&!Q.includes(_),Pt=c(()=>_==="invited"?"invited":"not_invited",[_]),q=tt(),N=lt(),x=it(),Ot=ct(),{mutateAsync:Mt}=E(q),{mutateAsync:Dt}=E(N),{mutateAsync:Tt}=E(x),{mutateAsync:U}=E(Ot);y&&s?.country?.code&&!a&&A(s.country.code);let{selectCountryForm:M,isLoading:It}=et({jsfModify:P?.jsfModify?.select_country,queryOptions:{enabled:e.currentStep.name==="select_country"}}),{form:H,isLoading:Rt}=mt(r,{jsonSchemaVersion:P?.jsonSchemaVersion,queryOptions:{enabled:e.currentStep.name==="pricing_plan"}}),Lt=Zt[e.currentStep.name]||"contractor_basic_information",jt=te[Lt],kt=s?.[jt]||{},Jt=p(({form:t,options:o={},query:g={}})=>{let b=Object.keys(m).length>0?{...i,...e.values?.[e.currentStep.name],...m}:{...i,...kt};return Z({countryCode:a,form:t,fieldValues:b,query:g,options:{...o,queryOptions:{enabled:o.queryOptions?.enabled??!0}}})},"useJSONSchema"),At=!!(a&&(e.currentStep.name==="basic_information"||y)),Bt=!!(a&&(e.currentStep.name==="contract_details"||y)),{data:l,isLoading:qt}=Jt({form:"contractor_basic_information",options:{jsfModify:P?.jsfModify?.basic_information,queryOptions:{enabled:At}}}),Nt=c(()=>ft(s?.basic_information?.provisional_start_date,m?.service_duration?.provisional_start_date),[s?.basic_information?.provisional_start_date,m?.service_duration?.provisional_start_date]),{data:d,isLoading:xt}=dt({countryCode:a,fieldValues:m,options:{queryOptions:{enabled:Bt},jsfModify:yt(P?.jsfModify?.contract_details,Nt)}}),{data:u}=at({fieldValues:m,options:{queryOptions:{enabled:e.currentStep.name==="contract_preview"}}}),{data:Ut,isLoading:Ht}=st({employmentId:r,contractDocumentId:T,options:{queryOptions:{enabled:!!T}}}),n=c(()=>({select_country:M?.fields||[],basic_information:l?.fields||[],pricing_plan:H?.fields||[],contract_details:d?.fields||[],contract_preview:u?.fields||[],review:[]}),[M?.fields,l?.fields,H?.fields,d?.fields,u?.fields]),Gt={select_country:null,basic_information:l?.meta["x-jsf-fieldsets"],pricing_plan:null,contract_details:d?.meta["x-jsf-fieldsets"],contract_preview:null,review:null},{country:Wt,basic_information:D={},contract_details:S={}}=s||{},G=Wt?.code,w=c(()=>C(n.select_country,{country:a||G||""}),[n.select_country,a,G]),F=c(()=>{let t={provisional_start_date:ee,...i,...D};return C(n.basic_information,t)},[n.basic_information,D,i]),v=c(()=>{let o={...{service_duration:{provisional_start_date:D.provisional_start_date}},...i,...S};return C(n.contract_details,o)},[n.contract_details,S,i,D]),W=c(()=>{let t={...i,...S};return C(n.contract_preview,t)},[n.contract_preview,S,i]),$=c(()=>{let t={...i,...S};return C(n.pricing_plan,t?.pricing_plan??{})},[n.pricing_plan,S,i]),$t=c(()=>({select_country:w,basic_information:F,contract_details:v,contract_preview:W,pricing_plan:$}),[w,F,v,W,$]),K=c(()=>!!(!!(y&&L&&e.currentStep.name!=="review")&&!R&&n.basic_information.length>0&&n.contract_details.length>0),[y,L,R,n.basic_information.length,n.contract_details.length,e.currentStep.name]);Qt(()=>{K&&(O.current={select_country:V(w,n.select_country),basic_information:V(F,n.basic_information),contract_details:V(v,n.contract_details),contract_preview:{},pricing_plan:{}},B({select_country:w,basic_information:F,contract_details:v,contract_preview:{},pricing_plan:{},review:{}}),I("review"))},[K,I,w,F,v,B,n.select_country,n.basic_information,n.contract_details]);let Kt=p(t=>{I(t)},"goTo"),Y=p(async t=>M&&e.currentStep.name==="select_country"?t:l&&e.currentStep.name==="basic_information"?await f(t,l?.fields,{isPartialValidation:!1}):d&&e.currentStep.name==="contract_details"?await f(t,d?.fields,{isPartialValidation:!1}):u&&e.currentStep.name==="contract_preview"?await f(t,u?.fields,{isPartialValidation:!1}):e.currentStep.name==="pricing_plan"?t:{},"parseFormValues");async function Yt(t){let o=e.currentStep.name;o in O.current&&(O.current[o]=V(t,n[o]));let g=await Y(t);switch(e.currentStep.name){case"select_country":return A(g.country),Promise.resolve({data:{countryCode:g.country}});case"basic_information":{let j=!r&&a,b=r&&a&&s?.country&&s?.country.code!==a;if(j||b){let k={basic_information:g,type:"contractor",country_code:a,external_id:St};try{let h=await Mt(k),zt=h.data?.data?.employment?.id;return bt(zt),h}catch(h){throw console.error("Error creating onboarding:",h),h}}else if(r)return Promise.resolve({data:{employmentId:r}});return}case"contract_details":{let b=await Dt({employmentId:r,payload:{contract_document:g}}),k=b.data?.data?.contract_document?.id;return Ct(k),b}case"contract_preview":return Tt({employmentId:r,contractDocumentId:T,payload:{signature:t.signature}});case"pricing_plan":return t.subscription==ot?U({employmentId:r,payload:{operation:"downgrade"}}):t.subscription==rt?U({employmentId:r,payload:{operation:"upgrade"}}):Promise.reject({error:"invalid selection"});default:throw new Error("Invalid step state")}}return p(Yt,"onSubmit"),{isLoading:It||qt||R||xt||Rt||Ht,fieldValues:m,stepState:e,checkFieldUpdates:Ft,back:vt,next:ht,goTo:Kt,onSubmit:Yt,fields:n[e.currentStep.name],meta:{fields:O.current,fieldsets:Gt[e.currentStep.name]},parseFormValues:Y,handleValidation:p(async t=>{if(e.currentStep.name==="select_country")return M.handleValidation(t);if(l&&e.currentStep.name==="basic_information"){let o=await f(t,l?.fields,{isPartialValidation:!1});return l?.handleValidation(o)}if(d&&e.currentStep.name==="contract_details"){let o=await f(t,d?.fields,{isPartialValidation:!1});return d?.handleValidation(o)}if(u&&e.currentStep.name==="contract_preview"){let o=await f(t,u?.fields,{isPartialValidation:!1});return u?.handleValidation(o)}return e.currentStep.name==="pricing_plan"?{formErrors:{}}:null},"handleValidation"),initialValues:$t,employmentId:r,refetchEmployment:Vt,isSubmitting:q.isPending||N.isPending||x.isPending,documentPreviewPdf:Ut,canInvite:Et,isEmploymentReadOnly:L,invitedStatus:Pt,employment:s}},"useContractorOnboarding");export{fe as a};
2
+ //# sourceMappingURL=chunk-FEIYAZ7Q.js.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-SRR73QPD.js";import{b as a}from"./chunk-PGWKJ6FK.js";import{b as t}from"./chunk-2YTBWEC7.js";import{e as s}from"./chunk-HRG5MSVG.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function P({components:d,onSubmit:l,onError:i,onSuccess:f}){let{onboardingBag:o}=a(),p=o.fields??[],c=s(p,o.initialValues.benefits);return E(m,{defaultValues:c,components:d,onSubmit:e(async n=>{try{await l?.(n);let r=await o.onSubmit(n);if(r?.data){await f?.(r.data),o?.next();return}if(r?.error){let u=t(r?.fieldErrors||[],o.meta?.fields?.benefits);i?.({error:r.error,rawError:r.rawError,fieldErrors:u})}}catch(r){i?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit")})}e(P,"BenefitsStep");export{P as a};
2
- //# sourceMappingURL=chunk-CX735AP4.js.map
1
+ import{a as m}from"./chunk-NPKIEWF4.js";import{b as a}from"./chunk-PGWKJ6FK.js";import{b as t}from"./chunk-2YTBWEC7.js";import{e as s}from"./chunk-HRG5MSVG.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function P({components:d,onSubmit:l,onError:i,onSuccess:f}){let{onboardingBag:o}=a(),p=o.fields??[],c=s(p,o.initialValues.benefits);return E(m,{defaultValues:c,components:d,onSubmit:e(async n=>{try{await l?.(n);let r=await o.onSubmit(n);if(r?.data){await f?.(r.data),o?.next();return}if(r?.error){let u=t(r?.fieldErrors||[],o.meta?.fields?.benefits);i?.({error:r.error,rawError:r.rawError,fieldErrors:u})}}catch(r){i?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit")})}e(P,"BenefitsStep");export{P as a};
2
+ //# sourceMappingURL=chunk-G2X5F5YR.js.map
@@ -1,2 +1,2 @@
1
- import{a as R,b as x,c as N,d as A}from"./chunk-4UAHJOHZ.js";import{a as w,b as f}from"./chunk-NY7LII5R.js";import{a as C}from"./chunk-LHNX27TY.js";import{b as B}from"./chunk-PJN2YJO4.js";import{a as i,b as t,e as F}from"./chunk-UQCSN47K.js";import{a as d}from"./chunk-P37U34EQ.js";import{MoreHorizontal as P}from"lucide-react";import{useState as U}from"react";import{Fragment as $,jsx as g,jsxs as T}from"react/jsx-runtime";function E({actions:e=[],className:n,label:l,"data-testid":a}){let[m,_]=U(!1);return T("div",{className:i("relative",n),children:[g(B,{"data-testid":a,variant:"ghost","aria-label":l,className:"h-8 w-8 p-0",onClick:()=>_(!m),children:g(P,{className:"h-4 w-4"})}),m&&T($,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>_(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${a}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),_(!1)},disabled:c.disabled,children:c.label},u))})]})]})}d(E,"ActionsDropdown");import{ChevronDown as O,Info as Z}from"lucide-react";import K from"react-flagpack";import{useState as z}from"react";import{jsx as j,jsxs as L}from"react/jsx-runtime";var I=d(({children:e,content:n})=>L("div",{className:"relative inline-block group",children:[e,L("div",{className:"absolute bottom-full right-0 mb-2 px-3 py-2 bg-gray-900 text-white text-xs rounded-md opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50 w-64 whitespace-normal break-words",children:[n,j("div",{className:"absolute top-full right-3 border-4 border-transparent border-t-gray-900"})]})]}),"BasicTooltip");import{Fragment as b,jsx as o,jsxs as r}from"react/jsx-runtime";var V={GB:"GB-UKM"},Y=d(({title:e,country:n,region:l,annualGrossSalary:a,onDelete:m,onExportPdf:_,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:_},{label:"Delete",onClick:m}];return r("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[r("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(K,{code:V[n.alpha_2_code]||n.alpha_2_code})}),r("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),r("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[n.name," ",l?` (${l.name})`:""]}),r("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",a]})]})]}),o(E,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),q=d(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function J({minimumOnboardingDays:e,data:n,className:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",l),children:r(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:r("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&r("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),r(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:n.steps.map(a=>r("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:a.title})," ","- ",a.description]},a.id))}),r("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[n.helpText,n.zendeskArticleId&&o(f,{zendeskId:n.zendeskArticleId,children:"Learn more"})]})]})]})})}d(J,"OnboardingTimeline");function Q({className:e,countryBenefitsUrl:n,countryGuideUrl:l,country:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:r(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:r("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",a.name]})})}),o(A,{children:r("div",{className:"flex flex-col gap-1",children:[l&&o("a",{href:l,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),n&&o("a",{href:n,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}d(Q,"HiringSection");function W({isMultipleCurrency:e,className:n}){return r("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",n),children:[o("span",{"aria-hidden":!0}),e?r(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):r(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}d(W,"EstimationHeaders");function S({label:e,amounts:n,className:l,children:a}){let[m,_]=z(!0);return r("div",{className:i("RemoteFlows__EstimationResults__Row",l),children:[r("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[r("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>_(!m),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(O,{className:`h-4 w-4 text-muted-foreground transition-transform ${m?"rotate-180":""}`})})]}),Array.isArray(n)?n.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):r(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:n})]})]}),m&&a&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:a})]})}d(S,"EstimationRow");function X({item:e,isMultipleCurrency:n,level:l=0}){let[a,m]=z(!1),_=e.children&&e.children.length>0,c=l>0,u=e.isCollapsible||_;return r("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[r("div",{className:i(n?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[r("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?r("button",{onClick:()=>m(!a),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(O,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${a?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(I,{content:r(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(f,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o(Z,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),n?r(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),_&&a&&o("div",{className:"mt-1",children:o(h,{items:e.children,isMultipleCurrency:n,level:l+1})})]})}d(X,"BreakdownListItem");function h({items:e,isMultipleCurrency:n,className:l,level:a}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",l),children:e.map((m,_)=>o(X,{item:m,isMultipleCurrency:n,level:a},_))})}d(h,"BreakdownList");var Re=d(({estimation:e,title:n,components:l,onDelete:a,onExportPdf:m,onEdit:_})=>{let c=l?.HiringSection||Q,u=l?.OnboardingTimeline||J,H=l?.Header||Y,v=l?.Footer,D=q(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,k=e.employer_currency_costs.monthly_management_fee,M=e.region.code!==e.country.code,G=t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol);return r(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(H,{title:n,annualGrossSalary:G,region:M?e.region:void 0,country:e.country,onDelete:a,onExportPdf:m,onEdit:_})}),r("div",{className:"RemoteFlows__Separator",children:[o(W,{isMultipleCurrency:p,className:"mb-3"}),o(S,{label:"Monthly total cost",amounts:p?[t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),t(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.symbol)]:t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),children:o(h,{items:[{label:"Gross monthly salary",regionalAmount:t(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.symbol),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:t(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:t(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:t(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Monthly fee",regionalAmount:t(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(S,{label:"Annual total cost",amounts:p?[t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),t(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.symbol)]:t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),children:o(h,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.symbol)},{label:"Mandatory employer costs",regionalAmount:t(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:t(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:t(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:t(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:t(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Annual fee",regionalAmount:t(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:D})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),v&&o(v,{})]})},"EstimationResults");export{Re as a};
2
- //# sourceMappingURL=chunk-AFGXZINW.js.map
1
+ import{a as R,b as x,c as N,d as A}from"./chunk-4UAHJOHZ.js";import{a as w,b as f}from"./chunk-EGSUF7OD.js";import{a as C}from"./chunk-LHNX27TY.js";import{b as B}from"./chunk-PJN2YJO4.js";import{a as i,b as t,e as F}from"./chunk-UQCSN47K.js";import{a as d}from"./chunk-P37U34EQ.js";import{MoreHorizontal as P}from"lucide-react";import{useState as U}from"react";import{Fragment as $,jsx as g,jsxs as T}from"react/jsx-runtime";function E({actions:e=[],className:n,label:l,"data-testid":a}){let[m,_]=U(!1);return T("div",{className:i("relative",n),children:[g(B,{"data-testid":a,variant:"ghost","aria-label":l,className:"h-8 w-8 p-0",onClick:()=>_(!m),children:g(P,{className:"h-4 w-4"})}),m&&T($,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>_(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${a}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),_(!1)},disabled:c.disabled,children:c.label},u))})]})]})}d(E,"ActionsDropdown");import{ChevronDown as O,Info as Z}from"lucide-react";import K from"react-flagpack";import{useState as z}from"react";import{jsx as j,jsxs as L}from"react/jsx-runtime";var I=d(({children:e,content:n})=>L("div",{className:"relative inline-block group",children:[e,L("div",{className:"absolute bottom-full right-0 mb-2 px-3 py-2 bg-gray-900 text-white text-xs rounded-md opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50 w-64 whitespace-normal break-words",children:[n,j("div",{className:"absolute top-full right-3 border-4 border-transparent border-t-gray-900"})]})]}),"BasicTooltip");import{Fragment as b,jsx as o,jsxs as r}from"react/jsx-runtime";var V={GB:"GB-UKM"},Y=d(({title:e,country:n,region:l,annualGrossSalary:a,onDelete:m,onExportPdf:_,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:_},{label:"Delete",onClick:m}];return r("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[r("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(K,{code:V[n.alpha_2_code]||n.alpha_2_code})}),r("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),r("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[n.name," ",l?` (${l.name})`:""]}),r("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",a]})]})]}),o(E,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),q=d(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function J({minimumOnboardingDays:e,data:n,className:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",l),children:r(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:r("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&r("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),r(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:n.steps.map(a=>r("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:a.title})," ","- ",a.description]},a.id))}),r("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[n.helpText,n.zendeskArticleId&&o(f,{zendeskId:n.zendeskArticleId,children:"Learn more"})]})]})]})})}d(J,"OnboardingTimeline");function Q({className:e,countryBenefitsUrl:n,countryGuideUrl:l,country:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:r(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:r("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",a.name]})})}),o(A,{children:r("div",{className:"flex flex-col gap-1",children:[l&&o("a",{href:l,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),n&&o("a",{href:n,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}d(Q,"HiringSection");function W({isMultipleCurrency:e,className:n}){return r("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",n),children:[o("span",{"aria-hidden":!0}),e?r(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):r(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}d(W,"EstimationHeaders");function S({label:e,amounts:n,className:l,children:a}){let[m,_]=z(!0);return r("div",{className:i("RemoteFlows__EstimationResults__Row",l),children:[r("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[r("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>_(!m),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(O,{className:`h-4 w-4 text-muted-foreground transition-transform ${m?"rotate-180":""}`})})]}),Array.isArray(n)?n.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):r(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:n})]})]}),m&&a&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:a})]})}d(S,"EstimationRow");function X({item:e,isMultipleCurrency:n,level:l=0}){let[a,m]=z(!1),_=e.children&&e.children.length>0,c=l>0,u=e.isCollapsible||_;return r("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[r("div",{className:i(n?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[r("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?r("button",{onClick:()=>m(!a),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(O,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${a?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(I,{content:r(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(f,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o(Z,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),n?r(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),_&&a&&o("div",{className:"mt-1",children:o(h,{items:e.children,isMultipleCurrency:n,level:l+1})})]})}d(X,"BreakdownListItem");function h({items:e,isMultipleCurrency:n,className:l,level:a}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",l),children:e.map((m,_)=>o(X,{item:m,isMultipleCurrency:n,level:a},_))})}d(h,"BreakdownList");var Re=d(({estimation:e,title:n,components:l,onDelete:a,onExportPdf:m,onEdit:_})=>{let c=l?.HiringSection||Q,u=l?.OnboardingTimeline||J,H=l?.Header||Y,v=l?.Footer,D=q(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,k=e.employer_currency_costs.monthly_management_fee,M=e.region.code!==e.country.code,G=t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol);return r(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(H,{title:n,annualGrossSalary:G,region:M?e.region:void 0,country:e.country,onDelete:a,onExportPdf:m,onEdit:_})}),r("div",{className:"RemoteFlows__Separator",children:[o(W,{isMultipleCurrency:p,className:"mb-3"}),o(S,{label:"Monthly total cost",amounts:p?[t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),t(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.symbol)]:t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),children:o(h,{items:[{label:"Gross monthly salary",regionalAmount:t(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.symbol),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:t(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:t(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:t(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Monthly fee",regionalAmount:t(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(S,{label:"Annual total cost",amounts:p?[t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),t(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.symbol)]:t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),children:o(h,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.symbol)},{label:"Mandatory employer costs",regionalAmount:t(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:t(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:t(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:t(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:t(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Annual fee",regionalAmount:t(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:t(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:D})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),v&&o(v,{})]})},"EstimationResults");export{Re as a};
2
+ //# sourceMappingURL=chunk-HLR4BEDV.js.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-XCA33UL6.js";import{b as a}from"./chunk-TOA3JILU.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function y({onSubmit:c,onSuccess:s,onError:e}){let{contractorOnboardingBag:o}=a(),u=t(async n=>{try{await c?.({countryCode:n.country});let r=await o.onSubmit(n);if(r?.data){await s?.(r?.data),o?.next();return}r?.error&&e?.({error:r.error,rawError:r.rawError,fieldErrors:[]})}catch(r){e?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),l=o.stepState.values?.select_country||o.initialValues.select_country;return d(i,{defaultValues:l,onSubmit:u})}t(y,"SelectCountryStep");export{y as a};
2
- //# sourceMappingURL=chunk-XXXQA4SY.js.map
1
+ import{a as i}from"./chunk-AJ5SXKFO.js";import{b as a}from"./chunk-TOA3JILU.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function y({onSubmit:c,onSuccess:s,onError:e}){let{contractorOnboardingBag:o}=a(),u=t(async n=>{try{await c?.({countryCode:n.country});let r=await o.onSubmit(n);if(r?.data){await s?.(r?.data),o?.next();return}r?.error&&e?.({error:r.error,rawError:r.rawError,fieldErrors:[]})}catch(r){e?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),l=o.stepState.values?.select_country||o.initialValues.select_country;return d(i,{defaultValues:l,onSubmit:u})}t(y,"SelectCountryStep");export{y as a};
2
+ //# sourceMappingURL=chunk-HUJ3AUIS.js.map
@@ -1,2 +1,2 @@
1
- import{a as p}from"./chunk-4G2UMXRE.js";import{a as i}from"./chunk-XXXQA4SY.js";import{a as e}from"./chunk-FQQKCROC.js";import{a as c}from"./chunk-Z3AKMQ4S.js";import{a as d}from"./chunk-JS3H25UQ.js";import{a as n}from"./chunk-U2HWB5HI.js";import{a as f}from"./chunk-ADOJOLLL.js";import{a as m}from"./chunk-IJ6325YO.js";import{a as t}from"./chunk-TOA3JILU.js";import{a}from"./chunk-ZZPYYZNT.js";import{a as r}from"./chunk-P37U34EQ.js";import{useId as u}from"react";import{jsx as v}from"react/jsx-runtime";var A=r(({render:g,employmentId:C,externalId:S,countryCode:b,skipSteps:s,initialValues:O,options:l})=>{let o=a({options:l,employmentId:C,externalId:S,countryCode:b,skipSteps:s,initialValues:O}),P=u();return v(t.Provider,{value:{contractorOnboardingBag:o,formId:P},children:g({contractorOnboardingBag:o,components:{BasicInformationStep:e,SelectCountryStep:i,BackButton:n,SubmitButton:m,PricingPlanStep:p,ContractDetailsStep:c,ContractPreviewStep:d,OnboardingInvite:f}})})},"ContractorOnboardingFlow");export{A as a};
2
- //# sourceMappingURL=chunk-GAF5TFZJ.js.map
1
+ import{a as n}from"./chunk-U2HWB5HI.js";import{a as f}from"./chunk-X6325UGJ.js";import{a as m}from"./chunk-IJ6325YO.js";import{a as p}from"./chunk-W3OQNZW6.js";import{a as i}from"./chunk-HUJ3AUIS.js";import{a as e}from"./chunk-QDSRG735.js";import{a as c}from"./chunk-T5OFLN36.js";import{a as d}from"./chunk-VYHITQHG.js";import{a}from"./chunk-FEIYAZ7Q.js";import{a as t}from"./chunk-TOA3JILU.js";import{a as r}from"./chunk-P37U34EQ.js";import{useId as u}from"react";import{jsx as v}from"react/jsx-runtime";var A=r(({render:g,employmentId:C,externalId:S,countryCode:b,skipSteps:s,initialValues:O,options:l})=>{let o=a({options:l,employmentId:C,externalId:S,countryCode:b,skipSteps:s,initialValues:O}),P=u();return v(t.Provider,{value:{contractorOnboardingBag:o,formId:P},children:g({contractorOnboardingBag:o,components:{BasicInformationStep:e,SelectCountryStep:i,BackButton:n,SubmitButton:m,PricingPlanStep:p,ContractDetailsStep:c,ContractPreviewStep:d,OnboardingInvite:f}})})},"ContractorOnboardingFlow");export{A as a};
2
+ //# sourceMappingURL=chunk-K62H3A5T.js.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-BPIGB72P.js";import{a}from"./chunk-3NMCXHSQ.js";import{a as i}from"./chunk-FUBLGAPH.js";import{a as c}from"./chunk-Z7WBY27D.js";import{a as S}from"./chunk-765OB2K5.js";import{a as f}from"./chunk-NP3HE6QX.js";import{a as n}from"./chunk-AF3YOXUE.js";import{a as p}from"./chunk-CX735AP4.js";import{a as s}from"./chunk-4GXONSSK.js";import{a as r}from"./chunk-PGWKJ6FK.js";import{a as e}from"./chunk-FOPSJRQG.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as D,useState as P}from"react";import{jsx as R}from"react/jsx-runtime";var L=t(({employmentId:d,companyId:u,countryCode:b,type:l="employee",externalId:v,skipSteps:g,initialValues:B,render:I,options:O})=>{let w=D(),o=e({companyId:u,countryCode:b,employmentId:d,type:l,options:O,skipSteps:g,externalId:v,initialValues:B}),[C,h]=P({showReserveInvoice:!1,showInviteSuccessful:!1});return R(r.Provider,{value:{formId:w,onboardingBag:o,creditScore:C,setCreditScore:h},children:I({onboardingBag:o,components:{BasicInformationStep:n,ContractDetailsStep:s,BenefitsStep:p,SubmitButton:i,SaveDraftButton:S,BackButton:m,OnboardingInvite:a,SelectCountryStep:f,ReviewStep:c}})})},"OnboardingFlow");export{L as a};
2
- //# sourceMappingURL=chunk-SQVJRTTA.js.map
1
+ import{a as c}from"./chunk-Z7WBY27D.js";import{a as S}from"./chunk-765OB2K5.js";import{a as f}from"./chunk-PSHPB65F.js";import{a as n}from"./chunk-D6Y7GLBT.js";import{a as p}from"./chunk-G2X5F5YR.js";import{a as s}from"./chunk-UD4GEI4B.js";import{a as m}from"./chunk-BPIGB72P.js";import{a}from"./chunk-7JDWTTYE.js";import{a as i}from"./chunk-FUBLGAPH.js";import{a as r}from"./chunk-PGWKJ6FK.js";import{c as e}from"./chunk-OFWEEY3Y.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as D,useState as P}from"react";import{jsx as R}from"react/jsx-runtime";var L=t(({employmentId:d,companyId:u,countryCode:b,type:l="employee",externalId:v,skipSteps:g,initialValues:B,render:I,options:O})=>{let w=D(),o=e({companyId:u,countryCode:b,employmentId:d,type:l,options:O,skipSteps:g,externalId:v,initialValues:B}),[C,h]=P({showReserveInvoice:!1,showInviteSuccessful:!1});return R(r.Provider,{value:{formId:w,onboardingBag:o,creditScore:C,setCreditScore:h},children:I({onboardingBag:o,components:{BasicInformationStep:n,ContractDetailsStep:s,BenefitsStep:p,SubmitButton:i,SaveDraftButton:S,BackButton:m,OnboardingInvite:a,SelectCountryStep:f,ReviewStep:c}})})},"OnboardingFlow");export{L as a};
2
+ //# sourceMappingURL=chunk-KRDAGWDH.js.map
@@ -1,2 +1,2 @@
1
- import{a as m,b as s}from"./chunk-GFVGV76O.js";import{c as t,d as i}from"./chunk-KDI2AVBF.js";import{a as o}from"./chunk-P37U34EQ.js";import{useState as T}from"react";var k=o(({proposedTerminationDate:e,employeeName:f,employmentId:a,employment:r,render:y})=>{let[n,d]=T(!1),u=i({employmentId:a}),l=new Date(e).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),c=t({employmentId:a,options:{enabled:n}}),p=m({employmentId:a,date:e}),D=s({employmentId:a,proposedTerminationDate:e,employment:r});return y({leavePoliciesSummaryQuery:u,timeoffQuery:c||{data:{bookedDays:0,timeoffs:[]}},bookedTimeBeforeAndAfterTerminationQuery:p,formattedProposedTerminationDate:l,employeeName:f,proposedTerminationDate:e,summaryData:D??{data:{entitledDays:"0 days",bookedDays:"0 days",usedDays:"0 days",approvedDaysBeforeTermination:"0 days",approvedDaysAfterTermination:"0 days",remainingDays:"0 days",isUnlimitedPto:!1},isLoading:!1,isError:!1,error:null},employment:r,open:n,onOpenChange:o(()=>{d(P=>!P)},"onOpenChange")})},"PaidTimeOffContainer");export{k as a};
2
- //# sourceMappingURL=chunk-26Y25KF6.js.map
1
+ import{a as m,b as s}from"./chunk-RTQ4GKPG.js";import{c as t,d as i}from"./chunk-V334GIML.js";import{a as o}from"./chunk-P37U34EQ.js";import{useState as T}from"react";var k=o(({proposedTerminationDate:e,employeeName:f,employmentId:a,employment:r,render:y})=>{let[n,d]=T(!1),u=i({employmentId:a}),l=new Date(e).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),c=t({employmentId:a,options:{enabled:n}}),p=m({employmentId:a,date:e}),D=s({employmentId:a,proposedTerminationDate:e,employment:r});return y({leavePoliciesSummaryQuery:u,timeoffQuery:c||{data:{bookedDays:0,timeoffs:[]}},bookedTimeBeforeAndAfterTerminationQuery:p,formattedProposedTerminationDate:l,employeeName:f,proposedTerminationDate:e,summaryData:D??{data:{entitledDays:"0 days",bookedDays:"0 days",usedDays:"0 days",approvedDaysBeforeTermination:"0 days",approvedDaysAfterTermination:"0 days",remainingDays:"0 days",isUnlimitedPto:!1},isLoading:!1,isError:!1,error:null},employment:r,open:n,onOpenChange:o(()=>{d(P=>!P)},"onOpenChange")})},"PaidTimeOffContainer");export{k as a};
2
+ //# sourceMappingURL=chunk-LGUGZN57.js.map
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk-KSHK3ZPX.js";import{c as d,d as S}from"./chunk-P5PRB2JC.js";import{a as u}from"./chunk-HN5HLFTB.js";import{b as C}from"./chunk-LNV36S6D.js";import{f as y}from"./chunk-CR7AIZKA.js";import{a as o}from"./chunk-P37U34EQ.js";import{useEffect as T,useId as U,useState as I}from"react";import{jsx as k}from"react/jsx-runtime";var l=o((n,e,r)=>r&&r[e]?r[e]:n[e]?n[e]/100:0,"getDefaultManagementFee"),A=o((n,e,r,g)=>!e&&!r?.management_fee&&n?l(u,n,g):e&&!r?.management_fee?"":r?.management_fee,"getManagementFee"),W=o(({estimationOptions:n=d,defaultValues:e={countryRegionSlug:"",regionSlug:"",currencySlug:"",salary:"",benefits:{},management:{management_fee:""}},options:r,render:g,version:_="standard"})=>{let p=U(),[R,m]=I("USD"),F=o(s=>{m(s);let a=l(u,s,n.managementFees);a&&c.setValue("management.management_fee",a.toString())},"onCurrencyChange"),t=S({defaultRegion:e.countryRegionSlug,defaultCurrency:e.currencySlug,defaultSalary:e.salary,estimationOptions:n,version:_,options:{...r,onCurrencyChange:F}}),K=C(t.handleValidation),b=A(R,e.currencySlug,e.management,n.managementFees),{countryRegionSlug:v,currencySlug:h,salary:D,benefits:P,hiringBudget:B,age:E,contractDurationType:M,regionSlug:w,...x}=e,c=y({resolver:K,defaultValues:{country:v,currency:h,region:w,salary:D,salary_conversion:"",salary_converted:void 0,hiring_budget:B||"employee_annual_salary",age:E,contract_duration_type:M,management:{management_fee:b?.toString()||""},benefits:P,estimation_title:n.title,...x},shouldUnregister:!1,mode:"onBlur"});return T(()=>{if(e.currencySlug&&t.currencies&&n.includeManagementFee&&!e.management?.management_fee){let a=t.currencies.find(i=>i.value===e.currencySlug)?.label;if(a){m(a);let i=l(u,a,n.managementFees);c.setValue("management.management_fee",i?.toString()||"")}}},[e.currencySlug,t.currencies,n.includeManagementFee,n.managementFees,e.management?.management_fee,c]),k(f.Provider,{value:{form:c,formId:p,costCalculatorBag:t},children:g(t)})},"CostCalculatorFlow");export{W as a};
2
- //# sourceMappingURL=chunk-PS6EXVKH.js.map
1
+ import{a as f}from"./chunk-KSHK3ZPX.js";import{c as d,d as S}from"./chunk-CTAWDJ2D.js";import{a as u}from"./chunk-HN5HLFTB.js";import{b as C}from"./chunk-LNV36S6D.js";import{f as y}from"./chunk-CR7AIZKA.js";import{a as o}from"./chunk-P37U34EQ.js";import{useEffect as T,useId as U,useState as I}from"react";import{jsx as k}from"react/jsx-runtime";var l=o((n,e,r)=>r&&r[e]?r[e]:n[e]?n[e]/100:0,"getDefaultManagementFee"),A=o((n,e,r,g)=>!e&&!r?.management_fee&&n?l(u,n,g):e&&!r?.management_fee?"":r?.management_fee,"getManagementFee"),W=o(({estimationOptions:n=d,defaultValues:e={countryRegionSlug:"",regionSlug:"",currencySlug:"",salary:"",benefits:{},management:{management_fee:""}},options:r,render:g,version:_="standard"})=>{let p=U(),[R,m]=I("USD"),F=o(s=>{m(s);let a=l(u,s,n.managementFees);a&&c.setValue("management.management_fee",a.toString())},"onCurrencyChange"),t=S({defaultRegion:e.countryRegionSlug,defaultCurrency:e.currencySlug,defaultSalary:e.salary,estimationOptions:n,version:_,options:{...r,onCurrencyChange:F}}),K=C(t.handleValidation),b=A(R,e.currencySlug,e.management,n.managementFees),{countryRegionSlug:v,currencySlug:h,salary:D,benefits:P,hiringBudget:B,age:E,contractDurationType:M,regionSlug:w,...x}=e,c=y({resolver:K,defaultValues:{country:v,currency:h,region:w,salary:D,salary_conversion:"",salary_converted:void 0,hiring_budget:B||"employee_annual_salary",age:E,contract_duration_type:M,management:{management_fee:b?.toString()||""},benefits:P,estimation_title:n.title,...x},shouldUnregister:!1,mode:"onBlur"});return T(()=>{if(e.currencySlug&&t.currencies&&n.includeManagementFee&&!e.management?.management_fee){let a=t.currencies.find(i=>i.value===e.currencySlug)?.label;if(a){m(a);let i=l(u,a,n.managementFees);c.setValue("management.management_fee",i?.toString()||"")}}},[e.currencySlug,t.currencies,n.includeManagementFee,n.managementFees,e.management?.management_fee,c]),k(f.Provider,{value:{form:c,formId:p,costCalculatorBag:t},children:g(t)})},"CostCalculatorFlow");export{W as a};
2
+ //# sourceMappingURL=chunk-LJ6FHPXW.js.map
@@ -1,2 +1,2 @@
1
- import{a as F}from"./chunk-AP56UUME.js";import{a as q}from"./chunk-R2MHAPWD.js";import{c as O}from"./chunk-3UDG4IJO.js";import{a as u}from"./chunk-P5QKSFOE.js";import{D as S,I as f,J as g,f as y,l as b,n as C}from"./chunk-W3YE53JN.js";import{d as i}from"./chunk-KQPDXXG3.js";import{b as h}from"./chunk-UQCSN47K.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as p,useQuery as l}from"@tanstack/react-query";var L=t(({fieldValues:e,options:n})=>l({queryKey:["contract-document-signature"],queryFn:t(async()=>u(q,e),"queryFn"),enabled:n?.queryOptions?.enabled}),"useGetContractDocumentSignatureSchema"),N=t(()=>{let{client:e}=i();return p({mutationFn:t(async({employmentId:n,contractDocumentId:o,payload:r})=>f({client:e,body:r,path:{employment_id:n,contract_document_id:o}}),"mutationFn")})},"useSignContractDocument"),U=t(({employmentId:e,contractDocumentId:n,options:o})=>{let{client:r}=i();return l({queryKey:["contract-document",e,n],queryFn:t(async()=>C({client:r,path:{employment_id:e,id:n}}),"queryFn"),enabled:o?.queryOptions?.enabled,select:t(({data:s})=>s?.data,"select")})},"useGetShowContractDocument"),x=t(({employmentId:e,options:n})=>{let{client:o}=i();return l({queryKey:["contractor-subscriptions",e],queryFn:t(async()=>b({client:o,path:{employment_id:e}}),"queryFn"),enabled:n?.queryOptions?.enabled,select:t(({data:r})=>r?.data,"select")})},"useGetContractorSubscriptions"),W=t(()=>{let{client:e}=i();return p({mutationFn:t(async({employmentId:n,payload:o})=>g({client:e,body:o,path:{employment_id:n}}),"mutationFn")})},"usePostManageContractorSubscriptions"),$=t(()=>{let{client:e}=i();return p({mutationFn:t(async({employmentId:n,payload:o})=>S({client:e,body:o,path:{employment_id:n}}),"mutationFn")})},"useCreateContractorContractDocument"),k=t(({countryCode:e,fieldValues:n,options:o})=>{let{client:r}=i();return l({queryKey:["contractor-onboarding-details-schema",e],retry:!1,queryFn:t(async()=>y({client:r,path:{country_code:e},query:{json_schema_version:1}}),"queryFn"),enabled:o?.queryOptions?.enabled,select:t(({data:s})=>{let c=s?.data?.schema||{};return u(c,n,o)},"select")})},"useContractorOnboardingDetailsSchema"),H=t((e,n)=>{let{data:o,isLoading:r}=x({employmentId:e,options:{queryOptions:n?.queryOptions}}),s=u(F.data.schema,{},n);if(o){let c=s.fields.find(m=>m.name==="subscription");if(c){let m=o.filter(a=>a.product.identifier!==O).map(a=>{let d="";a.price.amount&&(d=h(a.price.amount,a.currency.symbol));let D=`${a.product.name} - ${d}`,_=a.product.identifier;return{label:D,value:_}});c.options=m}}return{isLoading:r,form:s}},"useContractorSubscriptionSchemaField");export{L as a,N as b,U as c,x as d,W as e,$ as f,k as g,H as h};
2
- //# sourceMappingURL=chunk-CATDB2YM.js.map
1
+ import{a as F}from"./chunk-AP56UUME.js";import{a as q}from"./chunk-R2MHAPWD.js";import{c as O}from"./chunk-3UDG4IJO.js";import{a as u}from"./chunk-P5QKSFOE.js";import{E as S,J as f,K as g,f as y,m as b,o as C}from"./chunk-T6Q7IALZ.js";import{d as i}from"./chunk-KQPDXXG3.js";import{b as h}from"./chunk-UQCSN47K.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as p,useQuery as l}from"@tanstack/react-query";var L=t(({fieldValues:e,options:n})=>l({queryKey:["contract-document-signature"],queryFn:t(async()=>u(q,e),"queryFn"),enabled:n?.queryOptions?.enabled}),"useGetContractDocumentSignatureSchema"),N=t(()=>{let{client:e}=i();return p({mutationFn:t(async({employmentId:n,contractDocumentId:o,payload:r})=>f({client:e,body:r,path:{employment_id:n,contract_document_id:o}}),"mutationFn")})},"useSignContractDocument"),U=t(({employmentId:e,contractDocumentId:n,options:o})=>{let{client:r}=i();return l({queryKey:["contract-document",e,n],queryFn:t(async()=>C({client:r,path:{employment_id:e,id:n}}),"queryFn"),enabled:o?.queryOptions?.enabled,select:t(({data:s})=>s?.data,"select")})},"useGetShowContractDocument"),x=t(({employmentId:e,options:n})=>{let{client:o}=i();return l({queryKey:["contractor-subscriptions",e],queryFn:t(async()=>b({client:o,path:{employment_id:e}}),"queryFn"),enabled:n?.queryOptions?.enabled,select:t(({data:r})=>r?.data,"select")})},"useGetContractorSubscriptions"),W=t(()=>{let{client:e}=i();return p({mutationFn:t(async({employmentId:n,payload:o})=>g({client:e,body:o,path:{employment_id:n}}),"mutationFn")})},"usePostManageContractorSubscriptions"),$=t(()=>{let{client:e}=i();return p({mutationFn:t(async({employmentId:n,payload:o})=>S({client:e,body:o,path:{employment_id:n}}),"mutationFn")})},"useCreateContractorContractDocument"),k=t(({countryCode:e,fieldValues:n,options:o})=>{let{client:r}=i();return l({queryKey:["contractor-onboarding-details-schema",e],retry:!1,queryFn:t(async()=>y({client:r,path:{country_code:e},query:{json_schema_version:1}}),"queryFn"),enabled:o?.queryOptions?.enabled,select:t(({data:s})=>{let c=s?.data?.schema||{};return u(c,n,o)},"select")})},"useContractorOnboardingDetailsSchema"),H=t((e,n)=>{let{data:o,isLoading:r}=x({employmentId:e,options:{queryOptions:n?.queryOptions}}),s=u(F.data.schema,{},n);if(o){let c=s.fields.find(m=>m.name==="subscription");if(c){let m=o.filter(a=>a.product.identifier!==O).map(a=>{let d="";a.price.amount&&(d=h(a.price.amount,a.currency.symbol));let D=`${a.product.name} - ${d}`,_=a.product.identifier;return{label:D,value:_}});c.options=m}}return{isLoading:r,form:s}},"useContractorSubscriptionSchemaField");export{L as a,N as b,U as c,x as d,W as e,$ as f,k as g,H as h};
2
+ //# sourceMappingURL=chunk-MD2QFLXC.js.map
@@ -0,0 +1,2 @@
1
+ import{a as O}from"./chunk-WVJDCDGZ.js";import{f as j}from"./chunk-H6YNMT4M.js";import{a as u}from"./chunk-P5QKSFOE.js";import{B as w,C as v,F as E,I as q,e as f,g as y,k as d,l as h,r as C,s as b,u as _,x as F,y as g,z as S}from"./chunk-T6Q7IALZ.js";import{d as a}from"./chunk-KQPDXXG3.js";import{a as r}from"./chunk-P37U34EQ.js";import{useMutation as c,useQuery as l}from"@tanstack/react-query";var W=r(t=>{let{client:n}=a();return l({queryKey:["employment",t],retry:!1,enabled:!!t,select:r(({data:e})=>e?.data.employment,"select"),queryFn:r(async()=>{let e=await g({client:n,headers:{Authorization:""},path:{employment_id:t}});if(e.error||!e.data)throw new Error("Failed to fetch employment data");return e},"queryFn")})},"useEmployment"),T=r(t=>{let{client:n}=a();return l({queryKey:["company",t],retry:!1,enabled:!!t,queryFn:r(async()=>{let e=await b({client:n,headers:{Authorization:""},path:{company_id:t}});if(e.error||!e.data)throw new Error("Failed to fetch employment data");return e},"queryFn"),select:r(({data:e})=>e.data.company,"select")})},"useCompany"),H=r(t=>{let{client:n}=a();return l({queryKey:["benefit-offers",t],retry:!1,enabled:!!t,queryFn:r(async()=>d({client:n,path:{employment_id:t}}).then(e=>{if(e.error||!e.data)throw new Error("Failed to fetch benefit offers data");return e}),"queryFn"),select:r(({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"),L=r(()=>{let{client:t}=a();return c({mutationFn:r(n=>q({client:t,headers:{Authorization:""},path:n}),"mutationFn")})},"useEmploymentInvite"),G=r(()=>{let{client:t}=a();return c({mutationFn:r(n=>C({client:t,body:n}),"mutationFn")})},"useCreateReserveInvoice"),X=r(({countryCode:t,form:n,fieldValues:e,options:o,query:s={},jsonSchemaVersion:i})=>{let{client:p}=a(),P=i?{json_schema_version:i}:{};return l({queryKey:["onboarding-json-schema-form",t,n],retry:!1,queryFn:r(async()=>{let m=await _({client:p,headers:{Authorization:""},path:{country_code:t,form:n},query:{skip_benefits:!0,...s,...P}});if(m.error||!m.data)throw new Error("Failed to fetch onboarding schema");return m},"queryFn"),enabled:o?.queryOptions?.enabled,select:r(({data:m})=>{let x=m?.data||{};return u(x,e,o)},"select")})},"useJSONSchemaForm"),Y=r((t,n,e)=>{let o=e?.jsonSchemaVersion?.benefit_offers_form_schema?{json_schema_version:e.jsonSchemaVersion.benefit_offers_form_schema}:{},{client:s}=a();return l({queryKey:["benefit-offers-schema",t],retry:!1,enabled:!!t,queryFn:r(async()=>{let i=await F({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:r(({data:i})=>{let p=i?.data?.schema||{};return u(p,n,{jsfModify:e?.jsfModify?.benefits})},"select")})},"useBenefitOffersSchema"),Z=r(()=>{let{client:t}=a(),n={json_schema_version:1};return c({mutationFn:r(e=>y({client:t,headers:{Authorization:""},body:e,query:{...n}}),"mutationFn")})},"useCreateEmployment"),$=r((t,n)=>{let{client:e}=a(),o={employment_basic_information_json_schema_version:1,contract_details_json_schema_version:j(n,t)||1};return c({mutationFn:r(({employmentId:s,...i})=>S({client:e,headers:{Authorization:""},body:i,path:{employment_id:s},query:{skip_benefits:!0,...o}}),"mutationFn")})},"useUpdateEmployment"),ee=r(t=>{let{client:n}=a();return c({mutationFn:r(({employmentId:e,...o})=>{let s=t?.jsonSchemaVersion?.benefit_offers_form_schema?{json_schema_version:t.jsonSchemaVersion.benefit_offers_form_schema}:{};return h({client:n,body:o,path:{employment_id:e},query:{...s}})},"mutationFn")})},"useUpdateBenefitsOffers"),R=r(t=>{let{client:n}=a();return l({...t,queryKey:["countries"],retry:!1,queryFn:r(async()=>{let e=await v({client:n,headers:{Authorization:""}});if(e.error||!e.data)throw new Error("Failed to fetch supported countries");return e},"queryFn"),select:r(({data:e})=>e?.data?.filter(o=>o.eor_onboarding).map(o=>({label:o.name,value:o.code}))||[],"select")})},"useCountries"),te=r(t=>{let{data:n,isLoading:e}=R(t?.queryOptions),o=u(O.data.schema,{},t);if(n){let s=o.fields.find(i=>i.name==="country");s&&(s.options=n)}return{isLoading:e,selectCountryForm:o}},"useCountriesSchemaField"),re=r(({type:t="spread"})=>{let{client:n}=a();return c({mutationFn:r(e=>(t==="no_spread"?f:E)({client:n,body:e}),"mutationFn")})},"useConvertCurrency"),ne=r(()=>{let{client:t}=a();return c({mutationFn:r(({employmentId:n,...e})=>w({client:t,path:{employment_id:n},body:e}),"mutationFn")})},"useUpsertContractEligibility");export{W as a,T as b,H as c,L as d,G as e,X as f,Y as g,Z as h,$ as i,ee as j,te as k,re as l,ne as m};
2
+ //# sourceMappingURL=chunk-N3X274GT.js.map