@remoteoss/remote-flows 1.15.0 → 1.17.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 (479) hide show
  1. package/dist/ButtonDefault-6LBHWUQH.js +2 -0
  2. package/dist/CheckboxFieldDefault-X4DYVQCE.js +2 -0
  3. package/dist/CountryFieldDefault-JZDE75HS.js +2 -0
  4. package/dist/DatePickerFieldDefault-LJV4QSEP.js +2 -0
  5. package/dist/DrawerDefault-FLNSDSMB.js +2 -0
  6. package/dist/EmailFieldDefault-T6HHE5RL.js +2 -0
  7. package/dist/FieldsetToggleButtonDefault-MXBQJ55Q.js +2 -0
  8. package/dist/FileUploadFieldDefault-5NW3ZFXD.js +2 -0
  9. package/dist/MultiSelectFieldDefault-OQ6SNNBI.js +2 -0
  10. package/dist/NumberFieldDefault-IVUTWJS5.js +2 -0
  11. package/dist/PDFPreviewDefault-HSSMYKV5.js +2 -0
  12. package/dist/RadioGroupFieldDefault-CXY33ONT.js +2 -0
  13. package/dist/SelectFieldDefault-66GGFDX3.js +2 -0
  14. package/dist/StatementDefault-DORMITL7.js +2 -0
  15. package/dist/TableFieldDefault-URJVK7YR.js +2 -0
  16. package/dist/TextAreaFieldDefault-5H34RRBA.js +2 -0
  17. package/dist/TextFieldDefault-VHIF2KLF.js +2 -0
  18. package/dist/WorkScheduleFieldDefault-T7IP52VU.js +2 -0
  19. package/dist/ZendeskDrawerDefault-YSBMA2ZH.js +2 -0
  20. package/dist/chunk-246D2A55.js +2 -0
  21. package/dist/{chunk-47YUPC2L.js.map → chunk-246D2A55.js.map} +1 -1
  22. package/dist/chunk-3474OEAS.js +2 -0
  23. package/dist/chunk-3474OEAS.js.map +1 -0
  24. package/dist/{chunk-D6KO5LX6.js → chunk-37RMY44V.js} +2 -2
  25. package/dist/{chunk-D5YMIXK5.js → chunk-3B6XXK5H.js} +2 -2
  26. package/dist/{chunk-AFJIZDZG.js → chunk-3BBQDNZD.js} +2 -2
  27. package/dist/{chunk-CD6F3H7B.js → chunk-3DMWQJ5W.js} +2 -2
  28. package/dist/chunk-3NB2BN46.js +2 -0
  29. package/dist/chunk-3NB2BN46.js.map +1 -0
  30. package/dist/{chunk-UXHMIIOB.js → chunk-44RIEWXA.js} +2 -2
  31. package/dist/{chunk-AB3RAEMM.js → chunk-4EMAROPQ.js} +2 -2
  32. package/dist/{chunk-Z4STVEJE.js → chunk-4HPV2VMI.js} +2 -2
  33. package/dist/{chunk-3ACL4IFO.js → chunk-4N4MQECC.js} +2 -2
  34. package/dist/{chunk-2ZS5F6C7.js → chunk-4UO7KLRK.js} +2 -2
  35. package/dist/chunk-5FTC6HMG.js +2 -0
  36. package/dist/chunk-5FTC6HMG.js.map +1 -0
  37. package/dist/{chunk-BIDZO7XH.js → chunk-62O3CKKH.js} +2 -2
  38. package/dist/{chunk-ZIXR3VSB.js → chunk-6AAV34CT.js} +2 -2
  39. package/dist/{chunk-PQP3KZ7P.js → chunk-6MAQMAY5.js} +2 -2
  40. package/dist/{chunk-H463PCBN.js → chunk-6SSDV2GX.js} +2 -2
  41. package/dist/chunk-7ENB7H4E.js +6 -0
  42. package/dist/{chunk-KJQN6GHW.js.map → chunk-7ENB7H4E.js.map} +1 -1
  43. package/dist/{chunk-ZPDZ6V5R.js → chunk-7G5JSUZU.js} +2 -2
  44. package/dist/{chunk-T7CGGZOK.js → chunk-7RP5F62S.js} +2 -2
  45. package/dist/chunk-7WGZGAQY.js +2 -0
  46. package/dist/chunk-7WGZGAQY.js.map +1 -0
  47. package/dist/{chunk-XO5VURZY.js → chunk-A232PIG7.js} +2 -2
  48. package/dist/{chunk-FI2MVRZR.js → chunk-AJCKNHZB.js} +2 -2
  49. package/dist/{chunk-VOUP5SMR.js → chunk-AJIDQALB.js} +2 -2
  50. package/dist/{chunk-UXP2IITO.js → chunk-ALVZNFB7.js} +2 -2
  51. package/dist/{chunk-SZVBNL6O.js → chunk-B2CNIT3P.js} +2 -2
  52. package/dist/{chunk-OCTMRR2C.js → chunk-B66V5QEC.js} +2 -2
  53. package/dist/{chunk-DI2QNZ2O.js → chunk-B7EJ2OAA.js} +2 -2
  54. package/dist/{chunk-HLAKUOQB.js → chunk-BG66XH5L.js} +2 -2
  55. package/dist/{chunk-NOY2YNXO.js → chunk-BGRX3DBF.js} +2 -2
  56. package/dist/{chunk-I7JUAYNN.js → chunk-BVFQ6LFD.js} +2 -2
  57. package/dist/{chunk-RM7W6QA7.js → chunk-C6KWUSCU.js} +2 -2
  58. package/dist/{chunk-MTOXXQYK.js → chunk-CARPUKT7.js} +2 -2
  59. package/dist/{chunk-7TOCURKO.js → chunk-DFAY4TWC.js} +2 -2
  60. package/dist/{chunk-O5ENJKI6.js → chunk-DNDYXEZ6.js} +2 -2
  61. package/dist/{chunk-46QJ44CZ.js → chunk-DXIJUMLU.js} +2 -2
  62. package/dist/{chunk-RFMIAO6J.js → chunk-EDLQ3JNY.js} +2 -2
  63. package/dist/{chunk-TZCNONDA.js → chunk-EHD2YB5F.js} +2 -2
  64. package/dist/{chunk-GLKITZNI.js → chunk-ERSP6CZ3.js} +2 -2
  65. package/dist/{chunk-RKS3FX3C.js → chunk-FERWQW33.js} +2 -2
  66. package/dist/{chunk-5R66NDTQ.js → chunk-FUGPVPYX.js} +2 -2
  67. package/dist/{chunk-JXXZH6KH.js → chunk-G6QGYKPO.js} +2 -2
  68. package/dist/{chunk-ZSJ6YADQ.js → chunk-H2JFQGQJ.js} +2 -2
  69. package/dist/{chunk-C36VO7DO.js → chunk-HFI3LXZ2.js} +2 -2
  70. package/dist/{chunk-MCGUHRQL.js → chunk-HKNK5Z6N.js} +2 -2
  71. package/dist/{chunk-5F7FMTGE.js → chunk-HOR3KPOZ.js} +2 -2
  72. package/dist/{chunk-WLMHGJWB.js → chunk-HUZBKPGP.js} +2 -2
  73. package/dist/chunk-HYYILYKU.js +2 -0
  74. package/dist/chunk-HYYILYKU.js.map +1 -0
  75. package/dist/{chunk-7SVSJ7NG.js → chunk-I3TP6JKM.js} +2 -2
  76. package/dist/{chunk-D67Z4NEP.js → chunk-IGLKMXWJ.js} +2 -2
  77. package/dist/chunk-IHGCXP2X.js +2 -0
  78. package/dist/chunk-IHGCXP2X.js.map +1 -0
  79. package/dist/{chunk-IHVEK72X.js → chunk-IMVVZZFZ.js} +2 -2
  80. package/dist/chunk-IZGJP7OI.js +2 -0
  81. package/dist/chunk-IZGJP7OI.js.map +1 -0
  82. package/dist/{chunk-ZKS7DJDT.js → chunk-J2BTEUAM.js} +2 -2
  83. package/dist/{chunk-KUTIJABX.js → chunk-JI4CYPLW.js} +2 -2
  84. package/dist/{chunk-OV7TLEE6.js → chunk-KQKH3H6S.js} +2 -2
  85. package/dist/{chunk-6VQEAU6A.js → chunk-KRSUSMJK.js} +2 -2
  86. package/dist/{chunk-FBE7F5HU.js → chunk-L3LOATSG.js} +2 -2
  87. package/dist/{chunk-3PVZEAGI.js → chunk-L5DII4MV.js} +2 -2
  88. package/dist/{chunk-A37NW25N.js → chunk-LJIJ6UKB.js} +2 -2
  89. package/dist/{chunk-D36BZQTP.js → chunk-LVXV3GHT.js} +2 -2
  90. package/dist/{chunk-6DRAZSGG.js → chunk-MHAY555P.js} +2 -2
  91. package/dist/{chunk-37RBGAMM.js → chunk-MLVB5MYU.js} +2 -2
  92. package/dist/{chunk-CU3WQ2KN.js → chunk-MSBCYMSH.js} +2 -2
  93. package/dist/chunk-MTYN4AM3.js +2 -0
  94. package/dist/{chunk-NZ64KNDV.js → chunk-NAH5PAUK.js} +2 -2
  95. package/dist/{chunk-IF42CZJH.js → chunk-NEKE5PRJ.js} +2 -2
  96. package/dist/{chunk-2DCJODMR.js → chunk-NEWXVHFX.js} +2 -2
  97. package/dist/{chunk-MUJT3F2Q.js → chunk-NMLBGBK2.js} +2 -2
  98. package/dist/{chunk-DCB2H2SG.js → chunk-O6IBNOQU.js} +2 -2
  99. package/dist/{chunk-HU453KWI.js → chunk-OB2J5WSO.js} +2 -2
  100. package/dist/{chunk-XLTZ7SN3.js → chunk-OENTT2KT.js} +2 -2
  101. package/dist/{chunk-FKYEST54.js → chunk-PHPCCABU.js} +2 -2
  102. package/dist/{chunk-AS4ND5IO.js → chunk-PKK2EEXH.js} +2 -2
  103. package/dist/{chunk-HMMFY4PV.js → chunk-Q73675NI.js} +2 -2
  104. package/dist/{chunk-M4BR3FKN.js → chunk-R7BHA5RA.js} +2 -2
  105. package/dist/{chunk-IUCFOQAD.js → chunk-RAH453TV.js} +2 -2
  106. package/dist/{chunk-4YPJKEHT.js → chunk-RJY6AEJB.js} +2 -2
  107. package/dist/{chunk-CQ2EF32E.js → chunk-RYQQDPI7.js} +2 -2
  108. package/dist/chunk-SLD227LM.js +2 -0
  109. package/dist/chunk-SLD227LM.js.map +1 -0
  110. package/dist/{chunk-VSYION5R.js → chunk-SLLDKJ7K.js} +2 -2
  111. package/dist/{chunk-JEULZR34.js → chunk-SNBAM7SA.js} +2 -2
  112. package/dist/{chunk-ZPG6GRAX.js → chunk-SNECOPBD.js} +2 -2
  113. package/dist/{chunk-BDMCADQ6.js → chunk-SS2FAFUZ.js} +2 -2
  114. package/dist/{chunk-TGLB5MA2.js → chunk-TAHMDXUS.js} +2 -2
  115. package/dist/{chunk-JJEFWMLY.js → chunk-TFSRZOMP.js} +2 -2
  116. package/dist/{chunk-W5EXVAEO.js → chunk-TNN3W5TU.js} +2 -2
  117. package/dist/{chunk-D5NBOIPS.js → chunk-TOQPDTGG.js} +2 -2
  118. package/dist/chunk-TPGM3OIU.js +2 -0
  119. package/dist/chunk-TPGM3OIU.js.map +1 -0
  120. package/dist/{chunk-HN7ZP5AX.js → chunk-TPGN6QTL.js} +2 -2
  121. package/dist/{chunk-OJ3HJ7QL.js → chunk-TQXCLXWH.js} +2 -2
  122. package/dist/{chunk-RQRODRCR.js → chunk-TRBEYNRN.js} +2 -2
  123. package/dist/{chunk-OK3CYSHV.js → chunk-TXQWBDNF.js} +2 -2
  124. package/dist/chunk-UB6PYKNX.js +2 -0
  125. package/dist/chunk-UB6PYKNX.js.map +1 -0
  126. package/dist/{chunk-4ZQ7NOAL.js → chunk-ULP5B6DG.js} +2 -2
  127. package/dist/{chunk-OPWMRKZP.js → chunk-UMVA4SIV.js} +2 -2
  128. package/dist/{chunk-RNXUKKPF.js → chunk-UMVMNUPH.js} +2 -2
  129. package/dist/{chunk-5TBUDUEB.js → chunk-VBQVXR4U.js} +2 -2
  130. package/dist/{chunk-3PIJOIYR.js → chunk-VIGKOVHP.js} +2 -2
  131. package/dist/{chunk-3PIJOIYR.js.map → chunk-VIGKOVHP.js.map} +1 -1
  132. package/dist/{chunk-W2PJUNWX.js → chunk-VLSOHNT2.js} +2 -2
  133. package/dist/{chunk-PS5T7URZ.js → chunk-W4ECFBIA.js} +2 -2
  134. package/dist/{chunk-LWGNRGU3.js → chunk-WD2JGIDK.js} +2 -2
  135. package/dist/{chunk-BC4UT7KC.js → chunk-WEAO46EO.js} +2 -2
  136. package/dist/{chunk-2J4XRENJ.js → chunk-XHAJ544L.js} +2 -2
  137. package/dist/{chunk-KCTY6YAP.js → chunk-XU3B7N3C.js} +2 -2
  138. package/dist/{chunk-S63QGDMR.js → chunk-YOIXPHGR.js} +2 -2
  139. package/dist/chunk-YOIXPHGR.js.map +1 -0
  140. package/dist/{chunk-LDWPRPN4.js → chunk-YPUP5LNV.js} +2 -2
  141. package/dist/{chunk-I2ED6EUG.js → chunk-YWZHBXEI.js} +2 -2
  142. package/dist/{chunk-5GAFQRDA.js → chunk-ZAFGVOU5.js} +2 -2
  143. package/dist/{chunk-EPLPD54O.js → chunk-ZWIH53GL.js} +2 -2
  144. package/dist/default-components.d.ts +2 -2
  145. package/dist/default-components.js +1 -1
  146. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  147. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
  148. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  149. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  150. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  151. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  152. package/dist/flows/ContractAmendment/context.d.ts +3 -3
  153. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  154. package/dist/flows/ContractAmendment/hooks.js +1 -1
  155. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  156. package/dist/flows/ContractAmendment/index.js +1 -1
  157. package/dist/flows/ContractAmendment/types.d.ts +2 -2
  158. package/dist/flows/ContractAmendment/utils.d.ts +2 -2
  159. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -6
  160. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  161. package/dist/flows/ContractorOnboarding/api.d.ts +14 -20
  162. package/dist/flows/ContractorOnboarding/api.js +1 -1
  163. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
  164. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  165. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -6
  166. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  167. package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
  168. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
  169. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.js +1 -1
  170. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -6
  171. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  172. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -6
  173. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  174. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +5 -6
  175. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
  176. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  177. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  178. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -6
  179. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  180. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
  181. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  182. package/dist/flows/ContractorOnboarding/components/StatementOfWorkDisclaimer.js +1 -1
  183. package/dist/flows/ContractorOnboarding/context.d.ts +5 -11
  184. package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -6
  185. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  186. package/dist/flows/ContractorOnboarding/index.d.ts +5 -6
  187. package/dist/flows/ContractorOnboarding/index.js +1 -1
  188. package/dist/flows/ContractorOnboarding/jsfModify.d.ts +5 -6
  189. package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
  190. package/dist/flows/ContractorOnboarding/types.d.ts +8 -9
  191. package/dist/flows/ContractorOnboarding/utils.d.ts +6 -5
  192. package/dist/flows/ContractorOnboarding/utils.js +1 -1
  193. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  194. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  195. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  196. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  197. package/dist/flows/CostCalculator/CostCalculatorResetButton.js +1 -1
  198. package/dist/flows/CostCalculator/CostCalculatorSubmitButton.js +1 -1
  199. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -2
  200. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  201. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
  202. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.js +1 -1
  203. package/dist/flows/CostCalculator/api.d.ts +2 -2
  204. package/dist/flows/CostCalculator/api.js +1 -1
  205. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  206. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  207. package/dist/flows/CostCalculator/context.d.ts +3 -3
  208. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  209. package/dist/flows/CostCalculator/hooks.js +1 -1
  210. package/dist/flows/CostCalculator/index.d.ts +3 -3
  211. package/dist/flows/CostCalculator/index.js +1 -1
  212. package/dist/flows/CostCalculator/types.d.ts +2 -2
  213. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  214. package/dist/flows/CostCalculator/utils.js +1 -1
  215. package/dist/flows/CreateCompany/CreateCompany.d.ts +4 -4
  216. package/dist/flows/CreateCompany/CreateCompany.js +1 -1
  217. package/dist/flows/CreateCompany/api.d.ts +2 -2
  218. package/dist/flows/CreateCompany/api.js +1 -1
  219. package/dist/flows/CreateCompany/components/AddressDetailsStep.d.ts +4 -4
  220. package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
  221. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.d.ts +4 -4
  222. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
  223. package/dist/flows/CreateCompany/components/CreateCompanyForm.d.ts +2 -2
  224. package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
  225. package/dist/flows/CreateCompany/context.d.ts +4 -4
  226. package/dist/flows/CreateCompany/hooks.d.ts +4 -4
  227. package/dist/flows/CreateCompany/hooks.js +1 -1
  228. package/dist/flows/CreateCompany/index.d.ts +4 -4
  229. package/dist/flows/CreateCompany/index.js +1 -1
  230. package/dist/flows/CreateCompany/types.d.ts +4 -4
  231. package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
  232. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  233. package/dist/flows/Onboarding/api.d.ts +4 -4
  234. package/dist/flows/Onboarding/api.js +1 -1
  235. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  236. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  237. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
  238. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  239. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
  240. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  241. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
  242. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  243. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
  244. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  245. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  246. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  247. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
  248. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  249. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
  250. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  251. package/dist/flows/Onboarding/context.d.ts +4 -4
  252. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  253. package/dist/flows/Onboarding/hooks.js +1 -1
  254. package/dist/flows/Onboarding/index.d.ts +4 -4
  255. package/dist/flows/Onboarding/index.js +1 -1
  256. package/dist/flows/Onboarding/types.d.ts +4 -4
  257. package/dist/flows/Onboarding/utils.d.ts +4 -4
  258. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
  259. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  260. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
  261. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  262. package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
  263. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  264. package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
  265. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  266. package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
  267. package/dist/flows/Termination/TerminationFlow.js +1 -1
  268. package/dist/flows/Termination/TerminationForm.d.ts +4 -4
  269. package/dist/flows/Termination/TerminationForm.js +1 -1
  270. package/dist/flows/Termination/api.d.ts +5 -5
  271. package/dist/flows/Termination/api.js +1 -1
  272. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation.js +1 -1
  273. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  274. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
  275. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.js +1 -1
  276. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
  277. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
  278. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
  279. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  280. package/dist/flows/Termination/components/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js +1 -1
  281. package/dist/flows/Termination/context.d.ts +4 -4
  282. package/dist/flows/Termination/hooks.d.ts +4 -4
  283. package/dist/flows/Termination/hooks.js +1 -1
  284. package/dist/flows/Termination/index.d.ts +6 -6
  285. package/dist/flows/Termination/index.js +1 -1
  286. package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
  287. package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
  288. package/dist/flows/Termination/json-schemas/schema.js +1 -1
  289. package/dist/flows/Termination/types.d.ts +4 -4
  290. package/dist/flows/Termination/utils.d.ts +4 -4
  291. package/dist/flows/Termination/utils.js +1 -1
  292. package/dist/flows/types.d.ts +2 -2
  293. package/dist/index.css +1 -1
  294. package/dist/index.css.map +1 -1
  295. package/dist/index.d.ts +11 -12
  296. package/dist/index.js +2 -2
  297. package/dist/index.js.map +1 -1
  298. package/dist/internals.d.ts +3 -3
  299. package/dist/internals.js +1 -1
  300. package/dist/{mutations-B8OzuyhA.d.ts → mutations-Cqu0sBct.d.ts} +1 -1
  301. package/dist/{remoteFlows-Bphgh2nl.d.ts → remoteFlows-Dq_HhlrK.d.ts} +1 -1
  302. package/dist/styles.css +1 -1
  303. package/dist/styles.css.map +1 -1
  304. package/dist/{types-Ck-iVGL_.d.ts → types-6I1B0MOG.d.ts} +2 -2
  305. package/dist/{types-Dcg5CIEH.d.ts → types-BxDv4R-M.d.ts} +3 -3
  306. package/dist/{types-Dr-apmY1.d.ts → types-C4ZurZsm.d.ts} +11 -15
  307. package/dist/{types-Bs66Ma28.d.ts → types-CpquG01D.d.ts} +3 -3
  308. package/dist/{types-Jy-_3Y7m.d.ts → types-Cspu8sBY.d.ts} +1 -1
  309. package/dist/{types.gen-Yvu8ksE5.d.ts → types.gen-DOfO2pGp.d.ts} +1 -1
  310. package/dist/{utils-C8T9BiQ3.d.ts → utils-DOln70Os.d.ts} +1 -1
  311. package/package.json +1 -3
  312. package/dist/ButtonDefault-C5BX67YU.js +0 -2
  313. package/dist/CheckboxFieldDefault-HEIDOSI7.js +0 -2
  314. package/dist/CountryFieldDefault-DJ7VD267.js +0 -2
  315. package/dist/DatePickerFieldDefault-ZWLN5P55.js +0 -2
  316. package/dist/DrawerDefault-I7PMYMPK.js +0 -2
  317. package/dist/EmailFieldDefault-T7YHR6EN.js +0 -2
  318. package/dist/FieldsetToggleButtonDefault-4JT4HGZ5.js +0 -2
  319. package/dist/FileUploadFieldDefault-66JYQDRY.js +0 -2
  320. package/dist/MultiSelectFieldDefault-ZECWDTTO.js +0 -2
  321. package/dist/NumberFieldDefault-IOL6KD5M.js +0 -2
  322. package/dist/PDFPreviewDefault-LVWCRQ6A.js +0 -2
  323. package/dist/RadioGroupFieldDefault-7SVQ7ZQQ.js +0 -2
  324. package/dist/SelectFieldDefault-HYT2DRK4.js +0 -2
  325. package/dist/StatementDefault-HUOZEIEC.js +0 -2
  326. package/dist/TableFieldDefault-OACG7RGJ.js +0 -2
  327. package/dist/TextAreaFieldDefault-KCPQWVZX.js +0 -2
  328. package/dist/TextFieldDefault-MUGUO7GT.js +0 -2
  329. package/dist/WorkScheduleFieldDefault-CHW2ODQK.js +0 -2
  330. package/dist/ZendeskDrawerDefault-NYESVAZM.js +0 -2
  331. package/dist/chunk-3FCX7SWN.js +0 -2
  332. package/dist/chunk-3FCX7SWN.js.map +0 -1
  333. package/dist/chunk-3XG2MGD3.js +0 -2
  334. package/dist/chunk-3XG2MGD3.js.map +0 -1
  335. package/dist/chunk-42R2H2DW.js +0 -2
  336. package/dist/chunk-47YUPC2L.js +0 -2
  337. package/dist/chunk-4SGUDT5K.js +0 -2
  338. package/dist/chunk-4SGUDT5K.js.map +0 -1
  339. package/dist/chunk-AJ7L3ZO3.js +0 -2
  340. package/dist/chunk-AJ7L3ZO3.js.map +0 -1
  341. package/dist/chunk-DI3XZUMY.js +0 -2
  342. package/dist/chunk-DI3XZUMY.js.map +0 -1
  343. package/dist/chunk-E6256SK7.js +0 -2
  344. package/dist/chunk-E6256SK7.js.map +0 -1
  345. package/dist/chunk-JITSAYF7.js +0 -2
  346. package/dist/chunk-JITSAYF7.js.map +0 -1
  347. package/dist/chunk-KJQN6GHW.js +0 -6
  348. package/dist/chunk-QORZCJSR.js +0 -2
  349. package/dist/chunk-QORZCJSR.js.map +0 -1
  350. package/dist/chunk-S63QGDMR.js.map +0 -1
  351. package/dist/chunk-STEDOWHX.js +0 -2
  352. package/dist/chunk-STEDOWHX.js.map +0 -1
  353. package/dist/chunk-VGIG5OUD.js +0 -2
  354. package/dist/chunk-VGIG5OUD.js.map +0 -1
  355. package/dist/chunk-VLKG3SNS.js +0 -2
  356. package/dist/chunk-VLKG3SNS.js.map +0 -1
  357. package/dist/chunk-YA2G4A3K.js +0 -2
  358. package/dist/chunk-YA2G4A3K.js.map +0 -1
  359. package/dist/flows/ContractorOnboarding/components/ChooseAlternativePlanStep.d.ts +0 -29
  360. package/dist/flows/ContractorOnboarding/components/ChooseAlternativePlanStep.js +0 -2
  361. package/dist/flows/ContractorOnboarding/components/ChooseAlternativePlanStep.js.map +0 -1
  362. package/dist/flows/ContractorOnboarding/json-schemas/chooseAlternativePlanStep.d.ts +0 -23
  363. package/dist/flows/ContractorOnboarding/json-schemas/chooseAlternativePlanStep.js +0 -2
  364. package/dist/flows/ContractorOnboarding/json-schemas/chooseAlternativePlanStep.js.map +0 -1
  365. /package/dist/{ButtonDefault-C5BX67YU.js.map → ButtonDefault-6LBHWUQH.js.map} +0 -0
  366. /package/dist/{CheckboxFieldDefault-HEIDOSI7.js.map → CheckboxFieldDefault-X4DYVQCE.js.map} +0 -0
  367. /package/dist/{CountryFieldDefault-DJ7VD267.js.map → CountryFieldDefault-JZDE75HS.js.map} +0 -0
  368. /package/dist/{DatePickerFieldDefault-ZWLN5P55.js.map → DatePickerFieldDefault-LJV4QSEP.js.map} +0 -0
  369. /package/dist/{DrawerDefault-I7PMYMPK.js.map → DrawerDefault-FLNSDSMB.js.map} +0 -0
  370. /package/dist/{EmailFieldDefault-T7YHR6EN.js.map → EmailFieldDefault-T6HHE5RL.js.map} +0 -0
  371. /package/dist/{FieldsetToggleButtonDefault-4JT4HGZ5.js.map → FieldsetToggleButtonDefault-MXBQJ55Q.js.map} +0 -0
  372. /package/dist/{FileUploadFieldDefault-66JYQDRY.js.map → FileUploadFieldDefault-5NW3ZFXD.js.map} +0 -0
  373. /package/dist/{MultiSelectFieldDefault-ZECWDTTO.js.map → MultiSelectFieldDefault-OQ6SNNBI.js.map} +0 -0
  374. /package/dist/{NumberFieldDefault-IOL6KD5M.js.map → NumberFieldDefault-IVUTWJS5.js.map} +0 -0
  375. /package/dist/{PDFPreviewDefault-LVWCRQ6A.js.map → PDFPreviewDefault-HSSMYKV5.js.map} +0 -0
  376. /package/dist/{RadioGroupFieldDefault-7SVQ7ZQQ.js.map → RadioGroupFieldDefault-CXY33ONT.js.map} +0 -0
  377. /package/dist/{SelectFieldDefault-HYT2DRK4.js.map → SelectFieldDefault-66GGFDX3.js.map} +0 -0
  378. /package/dist/{StatementDefault-HUOZEIEC.js.map → StatementDefault-DORMITL7.js.map} +0 -0
  379. /package/dist/{TableFieldDefault-OACG7RGJ.js.map → TableFieldDefault-URJVK7YR.js.map} +0 -0
  380. /package/dist/{TextAreaFieldDefault-KCPQWVZX.js.map → TextAreaFieldDefault-5H34RRBA.js.map} +0 -0
  381. /package/dist/{TextFieldDefault-MUGUO7GT.js.map → TextFieldDefault-VHIF2KLF.js.map} +0 -0
  382. /package/dist/{WorkScheduleFieldDefault-CHW2ODQK.js.map → WorkScheduleFieldDefault-T7IP52VU.js.map} +0 -0
  383. /package/dist/{ZendeskDrawerDefault-NYESVAZM.js.map → ZendeskDrawerDefault-YSBMA2ZH.js.map} +0 -0
  384. /package/dist/{chunk-D6KO5LX6.js.map → chunk-37RMY44V.js.map} +0 -0
  385. /package/dist/{chunk-D5YMIXK5.js.map → chunk-3B6XXK5H.js.map} +0 -0
  386. /package/dist/{chunk-AFJIZDZG.js.map → chunk-3BBQDNZD.js.map} +0 -0
  387. /package/dist/{chunk-CD6F3H7B.js.map → chunk-3DMWQJ5W.js.map} +0 -0
  388. /package/dist/{chunk-UXHMIIOB.js.map → chunk-44RIEWXA.js.map} +0 -0
  389. /package/dist/{chunk-AB3RAEMM.js.map → chunk-4EMAROPQ.js.map} +0 -0
  390. /package/dist/{chunk-Z4STVEJE.js.map → chunk-4HPV2VMI.js.map} +0 -0
  391. /package/dist/{chunk-3ACL4IFO.js.map → chunk-4N4MQECC.js.map} +0 -0
  392. /package/dist/{chunk-2ZS5F6C7.js.map → chunk-4UO7KLRK.js.map} +0 -0
  393. /package/dist/{chunk-BIDZO7XH.js.map → chunk-62O3CKKH.js.map} +0 -0
  394. /package/dist/{chunk-ZIXR3VSB.js.map → chunk-6AAV34CT.js.map} +0 -0
  395. /package/dist/{chunk-PQP3KZ7P.js.map → chunk-6MAQMAY5.js.map} +0 -0
  396. /package/dist/{chunk-H463PCBN.js.map → chunk-6SSDV2GX.js.map} +0 -0
  397. /package/dist/{chunk-ZPDZ6V5R.js.map → chunk-7G5JSUZU.js.map} +0 -0
  398. /package/dist/{chunk-T7CGGZOK.js.map → chunk-7RP5F62S.js.map} +0 -0
  399. /package/dist/{chunk-XO5VURZY.js.map → chunk-A232PIG7.js.map} +0 -0
  400. /package/dist/{chunk-FI2MVRZR.js.map → chunk-AJCKNHZB.js.map} +0 -0
  401. /package/dist/{chunk-VOUP5SMR.js.map → chunk-AJIDQALB.js.map} +0 -0
  402. /package/dist/{chunk-UXP2IITO.js.map → chunk-ALVZNFB7.js.map} +0 -0
  403. /package/dist/{chunk-SZVBNL6O.js.map → chunk-B2CNIT3P.js.map} +0 -0
  404. /package/dist/{chunk-OCTMRR2C.js.map → chunk-B66V5QEC.js.map} +0 -0
  405. /package/dist/{chunk-DI2QNZ2O.js.map → chunk-B7EJ2OAA.js.map} +0 -0
  406. /package/dist/{chunk-HLAKUOQB.js.map → chunk-BG66XH5L.js.map} +0 -0
  407. /package/dist/{chunk-NOY2YNXO.js.map → chunk-BGRX3DBF.js.map} +0 -0
  408. /package/dist/{chunk-I7JUAYNN.js.map → chunk-BVFQ6LFD.js.map} +0 -0
  409. /package/dist/{chunk-RM7W6QA7.js.map → chunk-C6KWUSCU.js.map} +0 -0
  410. /package/dist/{chunk-MTOXXQYK.js.map → chunk-CARPUKT7.js.map} +0 -0
  411. /package/dist/{chunk-7TOCURKO.js.map → chunk-DFAY4TWC.js.map} +0 -0
  412. /package/dist/{chunk-O5ENJKI6.js.map → chunk-DNDYXEZ6.js.map} +0 -0
  413. /package/dist/{chunk-46QJ44CZ.js.map → chunk-DXIJUMLU.js.map} +0 -0
  414. /package/dist/{chunk-RFMIAO6J.js.map → chunk-EDLQ3JNY.js.map} +0 -0
  415. /package/dist/{chunk-TZCNONDA.js.map → chunk-EHD2YB5F.js.map} +0 -0
  416. /package/dist/{chunk-GLKITZNI.js.map → chunk-ERSP6CZ3.js.map} +0 -0
  417. /package/dist/{chunk-RKS3FX3C.js.map → chunk-FERWQW33.js.map} +0 -0
  418. /package/dist/{chunk-5R66NDTQ.js.map → chunk-FUGPVPYX.js.map} +0 -0
  419. /package/dist/{chunk-JXXZH6KH.js.map → chunk-G6QGYKPO.js.map} +0 -0
  420. /package/dist/{chunk-ZSJ6YADQ.js.map → chunk-H2JFQGQJ.js.map} +0 -0
  421. /package/dist/{chunk-C36VO7DO.js.map → chunk-HFI3LXZ2.js.map} +0 -0
  422. /package/dist/{chunk-MCGUHRQL.js.map → chunk-HKNK5Z6N.js.map} +0 -0
  423. /package/dist/{chunk-5F7FMTGE.js.map → chunk-HOR3KPOZ.js.map} +0 -0
  424. /package/dist/{chunk-WLMHGJWB.js.map → chunk-HUZBKPGP.js.map} +0 -0
  425. /package/dist/{chunk-7SVSJ7NG.js.map → chunk-I3TP6JKM.js.map} +0 -0
  426. /package/dist/{chunk-D67Z4NEP.js.map → chunk-IGLKMXWJ.js.map} +0 -0
  427. /package/dist/{chunk-IHVEK72X.js.map → chunk-IMVVZZFZ.js.map} +0 -0
  428. /package/dist/{chunk-ZKS7DJDT.js.map → chunk-J2BTEUAM.js.map} +0 -0
  429. /package/dist/{chunk-KUTIJABX.js.map → chunk-JI4CYPLW.js.map} +0 -0
  430. /package/dist/{chunk-OV7TLEE6.js.map → chunk-KQKH3H6S.js.map} +0 -0
  431. /package/dist/{chunk-6VQEAU6A.js.map → chunk-KRSUSMJK.js.map} +0 -0
  432. /package/dist/{chunk-FBE7F5HU.js.map → chunk-L3LOATSG.js.map} +0 -0
  433. /package/dist/{chunk-3PVZEAGI.js.map → chunk-L5DII4MV.js.map} +0 -0
  434. /package/dist/{chunk-A37NW25N.js.map → chunk-LJIJ6UKB.js.map} +0 -0
  435. /package/dist/{chunk-D36BZQTP.js.map → chunk-LVXV3GHT.js.map} +0 -0
  436. /package/dist/{chunk-6DRAZSGG.js.map → chunk-MHAY555P.js.map} +0 -0
  437. /package/dist/{chunk-37RBGAMM.js.map → chunk-MLVB5MYU.js.map} +0 -0
  438. /package/dist/{chunk-CU3WQ2KN.js.map → chunk-MSBCYMSH.js.map} +0 -0
  439. /package/dist/{chunk-42R2H2DW.js.map → chunk-MTYN4AM3.js.map} +0 -0
  440. /package/dist/{chunk-NZ64KNDV.js.map → chunk-NAH5PAUK.js.map} +0 -0
  441. /package/dist/{chunk-IF42CZJH.js.map → chunk-NEKE5PRJ.js.map} +0 -0
  442. /package/dist/{chunk-2DCJODMR.js.map → chunk-NEWXVHFX.js.map} +0 -0
  443. /package/dist/{chunk-MUJT3F2Q.js.map → chunk-NMLBGBK2.js.map} +0 -0
  444. /package/dist/{chunk-DCB2H2SG.js.map → chunk-O6IBNOQU.js.map} +0 -0
  445. /package/dist/{chunk-HU453KWI.js.map → chunk-OB2J5WSO.js.map} +0 -0
  446. /package/dist/{chunk-XLTZ7SN3.js.map → chunk-OENTT2KT.js.map} +0 -0
  447. /package/dist/{chunk-FKYEST54.js.map → chunk-PHPCCABU.js.map} +0 -0
  448. /package/dist/{chunk-AS4ND5IO.js.map → chunk-PKK2EEXH.js.map} +0 -0
  449. /package/dist/{chunk-HMMFY4PV.js.map → chunk-Q73675NI.js.map} +0 -0
  450. /package/dist/{chunk-M4BR3FKN.js.map → chunk-R7BHA5RA.js.map} +0 -0
  451. /package/dist/{chunk-IUCFOQAD.js.map → chunk-RAH453TV.js.map} +0 -0
  452. /package/dist/{chunk-4YPJKEHT.js.map → chunk-RJY6AEJB.js.map} +0 -0
  453. /package/dist/{chunk-CQ2EF32E.js.map → chunk-RYQQDPI7.js.map} +0 -0
  454. /package/dist/{chunk-VSYION5R.js.map → chunk-SLLDKJ7K.js.map} +0 -0
  455. /package/dist/{chunk-JEULZR34.js.map → chunk-SNBAM7SA.js.map} +0 -0
  456. /package/dist/{chunk-ZPG6GRAX.js.map → chunk-SNECOPBD.js.map} +0 -0
  457. /package/dist/{chunk-BDMCADQ6.js.map → chunk-SS2FAFUZ.js.map} +0 -0
  458. /package/dist/{chunk-TGLB5MA2.js.map → chunk-TAHMDXUS.js.map} +0 -0
  459. /package/dist/{chunk-JJEFWMLY.js.map → chunk-TFSRZOMP.js.map} +0 -0
  460. /package/dist/{chunk-W5EXVAEO.js.map → chunk-TNN3W5TU.js.map} +0 -0
  461. /package/dist/{chunk-D5NBOIPS.js.map → chunk-TOQPDTGG.js.map} +0 -0
  462. /package/dist/{chunk-HN7ZP5AX.js.map → chunk-TPGN6QTL.js.map} +0 -0
  463. /package/dist/{chunk-OJ3HJ7QL.js.map → chunk-TQXCLXWH.js.map} +0 -0
  464. /package/dist/{chunk-RQRODRCR.js.map → chunk-TRBEYNRN.js.map} +0 -0
  465. /package/dist/{chunk-OK3CYSHV.js.map → chunk-TXQWBDNF.js.map} +0 -0
  466. /package/dist/{chunk-4ZQ7NOAL.js.map → chunk-ULP5B6DG.js.map} +0 -0
  467. /package/dist/{chunk-OPWMRKZP.js.map → chunk-UMVA4SIV.js.map} +0 -0
  468. /package/dist/{chunk-RNXUKKPF.js.map → chunk-UMVMNUPH.js.map} +0 -0
  469. /package/dist/{chunk-5TBUDUEB.js.map → chunk-VBQVXR4U.js.map} +0 -0
  470. /package/dist/{chunk-W2PJUNWX.js.map → chunk-VLSOHNT2.js.map} +0 -0
  471. /package/dist/{chunk-PS5T7URZ.js.map → chunk-W4ECFBIA.js.map} +0 -0
  472. /package/dist/{chunk-LWGNRGU3.js.map → chunk-WD2JGIDK.js.map} +0 -0
  473. /package/dist/{chunk-BC4UT7KC.js.map → chunk-WEAO46EO.js.map} +0 -0
  474. /package/dist/{chunk-2J4XRENJ.js.map → chunk-XHAJ544L.js.map} +0 -0
  475. /package/dist/{chunk-KCTY6YAP.js.map → chunk-XU3B7N3C.js.map} +0 -0
  476. /package/dist/{chunk-LDWPRPN4.js.map → chunk-YPUP5LNV.js.map} +0 -0
  477. /package/dist/{chunk-I2ED6EUG.js.map → chunk-YWZHBXEI.js.map} +0 -0
  478. /package/dist/{chunk-5GAFQRDA.js.map → chunk-ZAFGVOU5.js.map} +0 -0
  479. /package/dist/{chunk-EPLPD54O.js.map → chunk-ZWIH53GL.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractorOnboarding/api.ts","../src/common/api/files.ts","../src/common/api/companies.ts","../src/common/api/identity.ts"],"sourcesContent":["import { FormResult } from '@remoteoss/remote-json-schema-form-kit';\nimport { useMemo } from 'react';\nimport {\n CreateContractDocument,\n getShowContractDocument,\n getShowContractorContractDetailsCountry,\n getIndexSubscription,\n ManageContractorPlusSubscriptionOperationsParams,\n postCreateContractDocument,\n postManageContractorPlusSubscriptionSubscription,\n postSignContractDocument,\n SignContractDocument,\n getIndexEmploymentContractDocument,\n EligibilityQuestionnaireJsonSchemaResponse,\n getShowEligibilityQuestionnaire,\n SubmitEligibilityQuestionnaireRequest,\n postCreateEligibilityQuestionnaire,\n postManageContractorCorSubscriptionSubscription,\n deleteDeleteContractorCorSubscriptionSubscription,\n getIndexContractorCurrency,\n Country,\n} from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { signatureSchema } from '@/src/flows/ContractorOnboarding/json-schemas/signature';\nimport { selectContractorSubscriptionStepSchema } from '@/src/flows/ContractorOnboarding/json-schemas/selectContractorSubscriptionStep';\nimport {\n JSONSchemaFormResultWithFieldsets,\n FlowOptions,\n JSFModify,\n} from '@/src/flows/types';\nimport { clearBase64Data } from '@/src/lib/utils';\nimport { Client } from '@/src/client/client';\nimport { createHeadlessForm } from '@/src/common/createHeadlessForm';\nimport { useMutation, useQuery, UseQueryResult } from '@tanstack/react-query';\nimport { FieldValues } from 'react-hook-form';\nimport {\n contractorPlusProductIdentifier,\n contractorStandardProductIdentifier,\n corProductIdentifier,\n eorProductIdentifier,\n IR35_FILE_SUBTYPE,\n ProductType,\n} from '@/src/flows/ContractorOnboarding/constants';\nimport { $TSFixMe, JSFField } from '@/src/types/remoteFlows';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport {\n useDownloadFile,\n useEmploymentFiles,\n useUploadFile,\n} from '@/src/common/api/files';\nimport { convertFromCents } from '@/src/components/form/utils';\nimport { countriesOptions } from '@/src/common/api/countries';\nimport { selectCountryStepSchema } from '@/src/flows/Onboarding/json-schemas/selectCountryStep';\nimport { shouldIncludeProduct } from '@/src/flows/ContractorOnboarding/utils';\nimport { useCompanyPricingPlans } from '@/src/common/api/companies';\n\nconst useContractorCurrencies = ({\n employmentId,\n options,\n}: {\n employmentId: string;\n options?: { queryOptions?: { enabled?: boolean } };\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['contractor-currencies', employmentId],\n queryFn: async () => {\n return getIndexContractorCurrency({\n client: client as Client,\n path: { employment_id: employmentId },\n query: {\n restrict_to_guaranteed_pay_out_currencies: false,\n },\n });\n },\n enabled: options?.queryOptions?.enabled,\n select: ({ data }) => {\n return data?.data;\n },\n });\n};\n\n/**\n * Get the contract document signature schema\n * @param fieldValues - The field values\n * @param options - The options\n * @returns The contract document signature schema\n */\nexport const useGetContractDocumentSignatureSchema = ({\n fieldValues,\n options,\n}: {\n fieldValues: FieldValues;\n options?: { queryOptions?: { enabled?: boolean }; jsfModify?: JSFModify };\n}) => {\n return useQuery({\n queryKey: [\n 'contract-document-signature',\n fieldValues.review_completed,\n options?.jsfModify,\n ],\n queryFn: async () => {\n return createHeadlessForm(signatureSchema, fieldValues, {\n jsfModify: options?.jsfModify,\n });\n },\n enabled: options?.queryOptions?.enabled,\n });\n};\n\n/**\n * Signs the contract document\n * @param employmentId - The employment ID\n * @param contractDocumentId - The contract document ID\n * @param payload - The payload\n * @returns The signed contract document\n */\nexport const useSignContractDocument = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n contractDocumentId,\n payload,\n }: {\n employmentId: string;\n contractDocumentId: string;\n payload: SignContractDocument;\n }) => {\n return postSignContractDocument({\n client: client as Client,\n body: payload,\n path: {\n employment_id: employmentId,\n contract_document_id: contractDocumentId,\n },\n });\n },\n });\n};\n\n/**\n * Get the contract document for a given employment and contract document ID\n * @param employmentId - The employment ID\n * @param contractDocumentId - The contract document ID\n * @returns The contract document\n */\nexport const useGetShowContractDocument = ({\n employmentId,\n contractDocumentId,\n options,\n}: {\n employmentId: string;\n contractDocumentId: string;\n options?: { queryOptions?: { enabled?: boolean }; jsfModify?: JSFModify };\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['contract-document', employmentId, contractDocumentId],\n queryFn: async () => {\n return getShowContractDocument({\n client: client as Client,\n path: { employment_id: employmentId, id: contractDocumentId },\n });\n },\n enabled: options?.queryOptions?.enabled,\n select: ({ data }) => {\n return {\n ...data?.data,\n contract_document: {\n ...data?.data?.contract_document,\n content: clearBase64Data(\n data?.data?.contract_document?.content as $TSFixMe,\n ),\n },\n };\n },\n });\n};\n\n/**\n * Get the contractor subscriptions for the given employment id\n * @param employmentId - The employment ID\n * @returns The contractor subscriptions available\n */\nexport const useGetContractorSubscriptions = ({\n employmentId,\n options,\n}: {\n employmentId: string;\n options?: { queryOptions?: { enabled?: boolean } };\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['contractor-subscriptions', employmentId],\n queryFn: async () => {\n return getIndexSubscription({\n client: client as Client,\n path: { employment_id: employmentId },\n });\n },\n enabled: options?.queryOptions?.enabled,\n select: ({ data }) => {\n return data?.data;\n },\n });\n};\n\n/**\n * Upgrade or downgrade contractor subscription\n */\nexport const usePostManageContractorSubscriptions = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n payload,\n }: {\n employmentId: string;\n payload: ManageContractorPlusSubscriptionOperationsParams;\n }) => {\n return postManageContractorPlusSubscriptionSubscription({\n client: client as Client,\n body: payload,\n path: {\n employment_id: employmentId,\n },\n });\n },\n });\n};\n\n/**\n * Saves the contractor details data\n * @param employmentId - The employment ID\n * @param payload - The payload\n * @returns The contractor contract document\n */\nexport const useCreateContractorContractDocument = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n payload,\n }: {\n employmentId: string;\n payload: CreateContractDocument;\n }) => {\n return postCreateContractDocument({\n client: client as Client,\n body: payload,\n path: {\n employment_id: employmentId,\n },\n });\n },\n });\n};\n\n/**\n * Get the contractor onboarding details schema for a given country\n * @param countryCode - The country code\n * @param fieldValues - The field values\n * @param options - The options\n * @returns The contractor onboarding details schema\n */\nconst useContractorOnboardingDetailsSchema = ({\n countryCode,\n employmentId,\n fieldValues,\n options,\n}: {\n countryCode: string;\n fieldValues: FieldValues;\n employmentId: string;\n options?: FlowOptions & { queryOptions?: { enabled?: boolean } };\n query?: Record<string, unknown>;\n}): UseQueryResult<JSONSchemaFormResultWithFieldsets> => {\n const { client } = useClient();\n return useQuery({\n queryKey: [\n 'contractor-onboarding-details-schema',\n countryCode,\n employmentId,\n ],\n retry: false,\n queryFn: async () => {\n return getShowContractorContractDetailsCountry({\n client: client as Client,\n path: { country_code: countryCode },\n query: {\n json_schema_version: 1,\n employment_id: employmentId,\n },\n });\n },\n enabled: options?.queryOptions?.enabled,\n select: ({ data }) => {\n const jsfSchema = data?.data?.schema || {};\n return createHeadlessForm(jsfSchema, fieldValues, options);\n },\n });\n};\n\nexport const CONTRACT_PRODUCT_TITLES = {\n [contractorStandardProductIdentifier]: 'Contractor Management',\n [contractorPlusProductIdentifier]: 'Contractor Management Plus',\n [corProductIdentifier]: 'Contractor of Record',\n};\n\nconst useEorSubscription = (options?: { enabled?: boolean }) => {\n const { data: pricingPlans, isLoading: isLoadingPricingPlans } =\n useCompanyPricingPlans({\n enabled: options?.enabled,\n });\n\n const eorPricingPlan = pricingPlans?.find(\n (plan) => plan.product.name === 'EOR Monthly',\n );\n\n const eorSubscription = {\n product: {\n identifier: eorProductIdentifier,\n short_name: 'EOR',\n },\n currency: eorPricingPlan?.price.currency,\n price: {\n amount: convertFromCents(eorPricingPlan?.price.amount ?? 0),\n },\n features: [\n 'Contract between Remote and employee',\n 'Remote manages onboarding, payroll, and compliance',\n 'Manages taxes, benefits, and time-off tracking',\n 'Handles contracts, transfers, and terminations',\n ],\n description: 'Enables hiring in countries without a local entity',\n label: 'Employer of Record',\n value: eorProductIdentifier,\n };\n\n return { eorSubscription, isLoading: isLoadingPricingPlans };\n};\n\ntype SelectedCountry =\n | (Pick<Country, 'eor_onboarding' | 'contractor_products_available'> & {\n label: string;\n })\n | undefined;\n\nconst addEorToFieldOptions = (\n fieldOptions: $TSFixMe[],\n eorSubscription: ReturnType<typeof useEorSubscription>['eorSubscription'],\n excludeProducts?: ProductType[],\n) => {\n if (shouldIncludeProduct(eorProductIdentifier, excludeProducts)) {\n fieldOptions.push({\n label: eorSubscription.label,\n value: eorSubscription.value,\n description: eorSubscription.description,\n meta: {\n features: eorSubscription.features,\n price: {\n amount: eorSubscription.price.amount,\n currencyCode: eorSubscription.currency?.code ?? '',\n },\n },\n disabled: false,\n });\n }\n return fieldOptions;\n};\n\nexport const useContractorSubscriptionSchemaField = (\n employmentId: string,\n selectedCountry: SelectedCountry,\n options?: FlowOptions & {\n queryOptions?: { enabled?: boolean };\n excludeProducts?: ProductType[];\n },\n) => {\n const {\n data: contractorSubscriptions,\n isLoading: isLoading,\n refetch,\n } = useGetContractorSubscriptions({\n employmentId: employmentId,\n options: {\n queryOptions: options?.queryOptions,\n },\n });\n\n const isEmptyContractorSubscriptions = contractorSubscriptions?.length === 0;\n\n const isSingleSubscription = contractorSubscriptions?.length === 1;\n\n const corSubscription = contractorSubscriptions?.find(\n (subscription) => subscription.product.short_name === 'COR',\n );\n\n const isEligibilityQuestionnaireBlocked =\n corSubscription?.eligibility_questionnaire?.is_blocking;\n\n const showEorSubscription =\n (isSingleSubscription ||\n isEligibilityQuestionnaireBlocked === true ||\n isEmptyContractorSubscriptions) &&\n selectedCountry?.eor_onboarding;\n\n const { eorSubscription, isLoading: isLoadingEorSubscription } =\n useEorSubscription({\n enabled: showEorSubscription,\n });\n\n const form = createHeadlessForm(\n selectContractorSubscriptionStepSchema.data.schema,\n {},\n options,\n );\n\n if (contractorSubscriptions) {\n const field: JSFField | undefined = form.fields.find(\n (field) => field.name === 'subscription',\n ) as JSFField | undefined;\n\n if (field) {\n // Start with contractor management options\n const contractorOptions = contractorSubscriptions\n .filter((opts) =>\n shouldIncludeProduct(\n opts.product.identifier ?? '',\n options?.excludeProducts,\n ),\n )\n .map((opts) => {\n const product = opts.product;\n const price = opts.price.amount;\n const currencyCode = opts.currency.code;\n const title =\n CONTRACT_PRODUCT_TITLES[\n product.identifier as keyof typeof CONTRACT_PRODUCT_TITLES\n ] ?? '';\n const label = title;\n const value = product.identifier ?? '';\n const description = product.description ?? '';\n const features = product.features ?? [];\n const meta = {\n features,\n price: {\n amount: convertFromCents(price),\n currencyCode: currencyCode,\n },\n };\n return {\n label,\n value,\n description,\n meta,\n disabled:\n isEligibilityQuestionnaireBlocked &&\n product.identifier !== contractorStandardProductIdentifier,\n };\n });\n\n // Sort contractor options\n contractorOptions.sort((a, b) => a.label.localeCompare(b.label));\n\n // Build otherSubscriptions (EOR) with separator metadata\n const otherOptions: $TSFixMe[] = [];\n if (showEorSubscription) {\n addEorToFieldOptions(\n otherOptions as unknown as $TSFixMe[],\n eorSubscription,\n options?.excludeProducts,\n );\n\n // Add separator metadata to first \"other\" option\n // only the first option to avoid problems when iterating over the options\n if (otherOptions.length > 0) {\n otherOptions[0].meta = {\n ...otherOptions[0].meta,\n groupSeparator: {\n show: true,\n },\n };\n }\n }\n\n // Combine all options into the single field\n field.options = [...contractorOptions, ...otherOptions];\n }\n }\n\n return {\n isLoading: isLoading || isLoadingEorSubscription,\n form,\n contractorSubscriptions,\n refetch,\n isEligibilityQuestionnaireBlocked,\n };\n};\n\nexport const useUpdateUKandSaudiFields = (\n createContractorContractDocumentMutation: ReturnType<\n typeof useCreateContractorContractDocument\n >,\n uploadFileMutation: ReturnType<typeof useUploadFile>,\n parsedValues: FieldValues,\n) => {\n const { mutateAsyncOrThrow: uploadFileMutationAsync } =\n mutationToPromise(uploadFileMutation);\n const { mutateAsyncOrThrow: createContractorContractDocumentMutationAsync } =\n mutationToPromise(createContractorContractDocumentMutation);\n\n return {\n mutateAsync: async ({ employmentId }: { employmentId: string }) => {\n const {\n nationality_status: nationalityStatus,\n ir35: ir35Status,\n ir35_sds_file: ir35SdsFile,\n } = parsedValues;\n const ir35ContractDetailsPayload = {\n contract_document: {\n ir_35: ir35Status,\n },\n };\n const nationalityContractDetailsPayload = {\n contract_document: {\n nationality: nationalityStatus,\n },\n };\n if (ir35Status) {\n await createContractorContractDocumentMutationAsync({\n employmentId: employmentId,\n payload: ir35ContractDetailsPayload,\n });\n\n if (ir35SdsFile) {\n return uploadFileMutationAsync({\n employment_id: employmentId,\n file: ir35SdsFile,\n sub_type: IR35_FILE_SUBTYPE,\n });\n }\n return Promise.resolve();\n }\n // nationality status is sent for the countries SAU, KWT, OMN, QAT, BHR\n if (nationalityStatus) {\n return createContractorContractDocumentMutationAsync({\n employmentId: employmentId,\n payload: nationalityContractDetailsPayload,\n });\n }\n\n return Promise.resolve();\n },\n };\n};\n\nexport const useGetIR35File = (\n employmentId: string,\n options?: { enabled?: boolean },\n) => {\n const { data: ir35Files, isLoading: isLoadingFiles } = useEmploymentFiles(\n employmentId,\n {\n sub_type: IR35_FILE_SUBTYPE,\n },\n {\n ...options,\n select: ({ data }) =>\n data?.files?.filter((file) => file.sub_type === IR35_FILE_SUBTYPE),\n },\n );\n const id = ir35Files?.[0]?.id;\n\n const downloadQuery = useDownloadFile(id as string);\n\n return {\n ...downloadQuery,\n isLoading: isLoadingFiles || downloadQuery.isLoading,\n };\n};\n\n/**\n * Get the contract documents for a given employment\n * @param employmentId - The employment ID\n * @param options - The options\n * @returns The contract documents\n */\nexport const useGetContractDocuments = (\n employmentId: string,\n options?: { enabled?: boolean },\n) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['contract-documents', employmentId],\n queryFn: async () => {\n return getIndexEmploymentContractDocument({\n client: client as Client,\n path: { employment_id: employmentId },\n });\n },\n enabled: options?.enabled,\n select: ({ data }) => {\n return data?.data?.contract_documents;\n },\n });\n};\n\nexport const useGetEligibilityQuestionnaire = ({\n options,\n fieldValues,\n}: {\n options?: FlowOptions & { queryOptions?: { enabled?: boolean } };\n fieldValues: FieldValues;\n}) => {\n const { client } = useClient();\n return useQuery<\n EligibilityQuestionnaireJsonSchemaResponse['data'],\n Error,\n FormResult\n >({\n queryKey: ['eligibility-questionnaire'],\n queryFn: async (): Promise<\n EligibilityQuestionnaireJsonSchemaResponse['data']\n > => {\n const response = await getShowEligibilityQuestionnaire({\n client: client as Client,\n query: {\n type: 'contractor_of_record',\n json_schema_version: 1,\n },\n });\n\n // Extract the data from the response wrapper\n if (response.error) {\n throw new Error('Failed to fetch eligibility questionnaire');\n }\n\n return response.data\n .data as EligibilityQuestionnaireJsonSchemaResponse['data'];\n },\n select: (data: EligibilityQuestionnaireJsonSchemaResponse['data']) => {\n const schema = data?.schema || {};\n return createHeadlessForm(schema, fieldValues, {\n jsfModify: options?.jsfModify,\n });\n },\n enabled: options?.queryOptions?.enabled,\n });\n};\n\nexport const usePostCreateEligibilityQuestionnaire = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n payload,\n }: {\n employmentId: string;\n payload: SubmitEligibilityQuestionnaireRequest['responses'];\n }) => {\n return postCreateEligibilityQuestionnaire({\n client: client as Client,\n body: {\n employment_slug: employmentId,\n responses: payload,\n type: 'contractor_of_record',\n },\n query: {\n json_schema_version: 1, // TODO: json_schema_version should be dynamic but fixed for now\n },\n });\n },\n });\n};\n\nexport const usePostManageContractorCorSubscription = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({ employmentId }: { employmentId: string }) => {\n return postManageContractorCorSubscriptionSubscription({\n client: client as Client,\n path: {\n employment_id: employmentId,\n },\n });\n },\n });\n};\n\nexport const useDeleteContractorCorSubscription = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({ employmentId }: { employmentId: string }) => {\n return deleteDeleteContractorCorSubscriptionSubscription({\n client: client as Client,\n path: { employment_id: employmentId },\n });\n },\n });\n};\n\nexport const useCountriesSchemaField = (\n options?: Omit<FlowOptions, 'jsonSchemaVersion'> & {\n queryOptions?: { enabled?: boolean };\n },\n) => {\n const { client } = useClient();\n const { data: countries, isLoading } = useQuery({\n ...countriesOptions(client as Client, 'contractor-onboarding-countries'),\n select: (response) => {\n return (\n response.data?.data?.map((country) => {\n return {\n label: country.name,\n value: country.code,\n eor_onboarding: country.eor_onboarding,\n contractor_products_available:\n country.contractor_products_available,\n };\n }) || []\n );\n },\n enabled: options?.queryOptions?.enabled,\n });\n\n const selectCountryForm = createHeadlessForm(\n selectCountryStepSchema.data.schema,\n {},\n options,\n );\n\n if (countries) {\n const countryField = selectCountryForm.fields.find(\n (field) => field.name === 'country',\n );\n if (countryField) {\n countryField.options = countries;\n }\n }\n\n return {\n isLoading,\n selectCountryForm,\n countries,\n };\n};\n\n/**\n * Get contractor onboarding details schema with currency options overridden\n * from the getIndexContractorCurrency endpoint\n */\nexport const useContractorOnboardingDetailsSchemaWithCurrencies = ({\n countryCode,\n employmentId,\n fieldValues,\n options,\n}: {\n countryCode: string;\n fieldValues: FieldValues;\n employmentId: string;\n options?: FlowOptions & { queryOptions?: { enabled?: boolean } };\n}) => {\n const schemaQuery = useContractorOnboardingDetailsSchema({\n countryCode,\n employmentId,\n fieldValues,\n options,\n });\n\n const { data: currencies, isLoading: isLoadingCurrencies } =\n useContractorCurrencies({\n employmentId,\n options: {\n queryOptions: { enabled: options?.queryOptions?.enabled },\n },\n });\n\n const dataWithCurrencies = useMemo(() => {\n if (!schemaQuery.data || !currencies) {\n return schemaQuery.data;\n }\n\n const form = {\n ...schemaQuery.data,\n fields: schemaQuery.data.fields.map((field) => {\n if (field.name !== 'payment_terms') {\n return field;\n }\n\n return {\n ...field,\n fields: (field.fields as $TSFixMe[])?.map((nestedField: $TSFixMe) => {\n if (nestedField.name !== 'compensation_currency_code') {\n return nestedField;\n }\n\n // Return a new object with overridden options\n return {\n ...nestedField,\n options: currencies.map((currency) => ({\n label: currency.code,\n value: currency.code,\n meta: { source: currency.source },\n })),\n };\n }),\n };\n }),\n };\n\n return form;\n }, [schemaQuery.data, currencies]);\n\n return {\n ...schemaQuery,\n data: dataWithCurrencies as $TSFixMe,\n isLoading: schemaQuery.isLoading || isLoadingCurrencies,\n };\n};\n","import { useMutation, useQuery, UseQueryOptions } from '@tanstack/react-query';\nimport { Client } from '@/src/client/client';\nimport {\n getIndexEmploymentFile,\n getShowFile,\n postUploadEmployeeFileFile,\n} from '@/src/client/sdk.gen';\nimport {\n GetIndexEmploymentFileData,\n GetIndexEmploymentFileErrors,\n File as ApiFile,\n ListFilesResponse,\n PostUploadEmployeeFileFileData,\n} from '@/src/client/types.gen';\nimport { useClient } from '@/src/context';\n\n/**\n * Hook to upload a file associated with a specified employment.\n * @returns A mutation result for uploading employee files.\n */\nexport const useUploadFile = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: (params: PostUploadEmployeeFileFileData['body']) => {\n return postUploadEmployeeFileFile({\n client: client as Client,\n body: params,\n headers: {\n Authorization: ``,\n },\n });\n },\n });\n};\n\n/**\n * Hook to download a file by its ID.\n * @param id - The ID of the file to download.\n * @returns A query result containing the file data.\n */\nexport const useDownloadFile = (id: string) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['download-file', id],\n queryFn: async () => {\n const result = await getShowFile({\n client: client as Client,\n path: { id: id },\n });\n\n if (result.error) {\n throw result.error;\n }\n\n return result.data;\n },\n select: ({ data }) => data?.file,\n enabled: !!id,\n });\n};\n\n/**\n * Hook to retrieve files associated with a specific employment.\n * @param employmentId - The ID of the employment to retrieve files for.\n * @param queryParams - The query parameters to filter the files.\n * @param queryOptions - Optional TanStack Query options to customize the query behavior.\n * @returns A query result containing the employment files.\n */\nexport const useEmploymentFiles = (\n employmentId: string,\n queryParams: GetIndexEmploymentFileData['query'],\n queryOptions?: Omit<\n UseQueryOptions<\n ListFilesResponse,\n GetIndexEmploymentFileErrors,\n ApiFile[] | undefined,\n unknown[]\n >,\n 'queryKey' | 'queryFn'\n >,\n) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['employment-files', employmentId],\n queryFn: async () => {\n const result = await getIndexEmploymentFile({\n client: client as Client,\n path: { employment_id: employmentId },\n query: queryParams,\n });\n\n if (result.error) {\n throw result.error;\n }\n\n return result.data;\n },\n ...queryOptions,\n });\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useClient } from '@/src/context';\nimport {\n getIndexCompanyPricingPlan,\n IdentityCurrentResponse,\n} from '@/src/client';\nimport { Client } from '@/src/client/client';\nimport { useIdentity } from '@/src/common/api/identity';\n\nexport function hasCompany(\n identity: IdentityCurrentResponse['data'] | undefined,\n): identity is Extract<\n IdentityCurrentResponse['data'],\n { company: { id: string } }\n> {\n return identity != null && 'company' in identity;\n}\n\nexport const useCompanyPricingPlans = (\n queryOptions: { enabled?: boolean } = { enabled: true },\n) => {\n const { data: identity } = useIdentity();\n const companyId = hasCompany(identity) ? (identity?.company?.id ?? '') : '';\n const { client } = useClient();\n return useQuery({\n queryKey: ['pricing-plans', companyId],\n queryFn: () =>\n getIndexCompanyPricingPlan({\n client: client as Client,\n path: { company_id: companyId },\n }),\n select: (data) => data.data?.data?.pricing_plans,\n enabled: Boolean(queryOptions?.enabled) && !!companyId,\n });\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { getCurrentIdentity } from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { Client } from '@/src/client/client';\n\nexport const useIdentity = () => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['identity'],\n queryFn: () =>\n getCurrentIdentity({\n client: client as Client,\n headers: { Authorization: `` },\n }),\n select: (data) => data.data?.data,\n });\n};\n"],"mappings":"+oBACA,OAAS,WAAAA,OAAe,QAgCxB,OAAS,eAAAC,EAAa,YAAAC,MAAgC,wBCjCtD,OAAS,eAAAC,GAAa,YAAAC,MAAiC,wBAoBhD,IAAMC,GAAgBC,EAAA,IAAM,CACjC,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,GAA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A,EAAY,KAAK,OAAO,IAAKtD,GAC/BA,EAAM,OAAS,gBACVA,EAGF,CACL,GAAGA,EACH,OAASA,EAAM,QAAuB,IAAK2D,GACrCA,EAAY,OAAS,6BAChBA,EAIF,CACL,GAAGA,EACH,QAASJ,EAAW,IAAKK,IAAc,CACrC,MAAOA,EAAS,KAChB,MAAOA,EAAS,KAChB,KAAM,CAAE,OAAQA,EAAS,MAAO,CAClC,EAAE,CACJ,CACD,CACH,CACD,CACH,EAGC,CAACN,EAAY,KAAMC,CAAU,CAAC,EAEjC,MAAO,CACL,GAAGD,EACH,KAAMG,EACN,UAAWH,EAAY,WAAaE,CACtC,CACF,EAnEkE","names":["useMemo","useMutation","useQuery","useMutation","useQuery","useUploadFile","__name","client","useClient","useMutation","params","postUploadEmployeeFileFile","useDownloadFile","id","useQuery","result","getShowFile","data","useEmploymentFiles","employmentId","queryParams","queryOptions","getIndexEmploymentFile","useQuery","useQuery","useIdentity","__name","client","useClient","useQuery","getCurrentIdentity","data","hasCompany","identity","__name","useCompanyPricingPlans","queryOptions","useIdentity","companyId","client","useClient","useQuery","getIndexCompanyPricingPlan","data","useContractorCurrencies","__name","employmentId","options","client","useClient","useQuery","getIndexContractorCurrency","data","useGetContractDocumentSignatureSchema","fieldValues","createHeadlessForm","signatureSchema","useSignContractDocument","useMutation","contractDocumentId","payload","postSignContractDocument","useGetShowContractDocument","getShowContractDocument","clearBase64Data","useGetContractorSubscriptions","getIndexSubscription","usePostManageContractorSubscriptions","postManageContractorPlusSubscriptionSubscription","useCreateContractorContractDocument","postCreateContractDocument","useContractorOnboardingDetailsSchema","countryCode","getShowContractorContractDetailsCountry","jsfSchema","CONTRACT_PRODUCT_TITLES","contractorStandardProductIdentifier","contractorPlusProductIdentifier","corProductIdentifier","useEorSubscription","pricingPlans","isLoadingPricingPlans","useCompanyPricingPlans","eorPricingPlan","plan","eorProductIdentifier","convertFromCents","addEorToFieldOptions","fieldOptions","eorSubscription","excludeProducts","shouldIncludeProduct","useContractorSubscriptionSchemaField","selectedCountry","contractorSubscriptions","isLoading","refetch","isEmptyContractorSubscriptions","isSingleSubscription","isEligibilityQuestionnaireBlocked","subscription","showEorSubscription","isLoadingEorSubscription","form","selectContractorSubscriptionStepSchema","field","contractorOptions","opts","product","price","currencyCode","label","value","description","meta","a","b","otherOptions","useUpdateUKandSaudiFields","createContractorContractDocumentMutation","uploadFileMutation","parsedValues","uploadFileMutationAsync","mutationToPromise","createContractorContractDocumentMutationAsync","nationalityStatus","ir35Status","ir35SdsFile","ir35ContractDetailsPayload","nationalityContractDetailsPayload","IR35_FILE_SUBTYPE","useGetIR35File","ir35Files","isLoadingFiles","useEmploymentFiles","file","id","downloadQuery","useDownloadFile","useGetContractDocuments","getIndexEmploymentContractDocument","useGetEligibilityQuestionnaire","response","getShowEligibilityQuestionnaire","schema","usePostCreateEligibilityQuestionnaire","postCreateEligibilityQuestionnaire","usePostManageContractorCorSubscription","postManageContractorCorSubscriptionSubscription","useDeleteContractorCorSubscription","deleteDeleteContractorCorSubscriptionSubscription","useCountriesSchemaField","countries","countriesOptions","country","selectCountryForm","selectCountryStepSchema","countryField","useContractorOnboardingDetailsSchemaWithCurrencies","schemaQuery","currencies","isLoadingCurrencies","dataWithCurrencies","useMemo","nestedField","currency"]}
@@ -1,2 +1,2 @@
1
- import{i as d,j as _,k as x,l as u,m as f}from"./chunk-ZSJ6YADQ.js";import{a as t}from"./chunk-3PIJOIYR.js";import{a as p}from"./chunk-P37U34EQ.js";import*as b from"react";import{jsx as T}from"react/jsx-runtime";var n=b.forwardRef(({className:e,...r},a)=>T("textarea",{className:t("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...r}));n.displayName="Textarea";import{jsx as o,jsxs as l}from"react/jsx-runtime";function C({field:e,fieldState:r,fieldData:a}){let{name:i,label:c,description:s,maxLength:m}=a,g=e.value?.length??0;return l(d,{"data-field":i,className:`RemoteFlows__TextArea__Item__${i}`,children:[o(_,{className:"RemoteFlows__TextArea__Label",children:c}),o(x,{children:o(n,{...e,value:e.value??"",onChange:F=>{e.onChange(F)},className:t(r.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:c})}),(s||m)&&l("div",{className:"flex items-center justify-between",children:[s&&o(u,{className:"RemoteFlows__TextArea__Description",children:s}),m&&l("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[g,"/",m]})]}),r.error&&o(f,{className:"RemoteFlows__TextArea__Error"})]})}p(C,"TextAreaFieldDefault");export{C as a};
2
- //# sourceMappingURL=chunk-UXHMIIOB.js.map
1
+ import{i as d,j as _,k as x,l as u,m as f}from"./chunk-H2JFQGQJ.js";import{a as t}from"./chunk-VIGKOVHP.js";import{a as p}from"./chunk-P37U34EQ.js";import*as b from"react";import{jsx as T}from"react/jsx-runtime";var n=b.forwardRef(({className:e,...r},a)=>T("textarea",{className:t("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...r}));n.displayName="Textarea";import{jsx as o,jsxs as l}from"react/jsx-runtime";function C({field:e,fieldState:r,fieldData:a}){let{name:i,label:c,description:s,maxLength:m}=a,g=e.value?.length??0;return l(d,{"data-field":i,className:`RemoteFlows__TextArea__Item__${i}`,children:[o(_,{className:"RemoteFlows__TextArea__Label",children:c}),o(x,{children:o(n,{...e,value:e.value??"",onChange:F=>{e.onChange(F)},className:t(r.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:c})}),(s||m)&&l("div",{className:"flex items-center justify-between",children:[s&&o(u,{className:"RemoteFlows__TextArea__Description",children:s}),m&&l("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[g,"/",m]})]}),r.error&&o(f,{className:"RemoteFlows__TextArea__Error"})]})}p(C,"TextAreaFieldDefault");export{C as a};
2
+ //# sourceMappingURL=chunk-44RIEWXA.js.map
@@ -1,2 +1,2 @@
1
- import{b as p}from"./chunk-KSHK3ZPX.js";import{a as F}from"./chunk-VSYION5R.js";import{g as C}from"./chunk-ZSJ6YADQ.js";import{h as E}from"./chunk-3PIJOIYR.js";import{b as f}from"./chunk-X6ZAR7ZL.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}=p(),{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=f(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-AB3RAEMM.js.map
1
+ import{b as p}from"./chunk-KSHK3ZPX.js";import{a as F}from"./chunk-SLLDKJ7K.js";import{g as C}from"./chunk-H2JFQGQJ.js";import{h as E}from"./chunk-VIGKOVHP.js";import{b as f}from"./chunk-X6ZAR7ZL.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}=p(),{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=f(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-4EMAROPQ.js.map
@@ -1,2 +1,2 @@
1
- import{a as k}from"./chunk-XFD3ULUF.js";import{a as S}from"./chunk-42R2H2DW.js";import{a as m,b as d,c as h,d as _}from"./chunk-DFJNVGK4.js";import{a as y}from"./chunk-TXSUZLOI.js";import{a as g}from"./chunk-EUSCQL4H.js";import{B as T,W as b,c as D}from"./chunk-KJQN6GHW.js";import{d as i}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";import{useQuery as v}from"@tanstack/react-query";var c=n(({employmentId:e,status:t,timeoffType:a,options:o})=>{let{client:r}=i();return v({queryKey:["timeoff",e,t],retry:!1,queryFn:n(()=>b({client:r,headers:{Authorization:""},query:{employment_id:e,status:t,timeoff_type:a}}),"queryFn"),select:n(({data:s})=>o?.select?.(s)??s,"select"),enabled:o?.enabled})},"useTimeOffQuery"),R=n((e,t)=>{let a=y(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),o=y(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});return`${a} \u2192 ${o}`},"formatDateRange"),N=n(({employmentId:e,options:t})=>c({employmentId:e,timeoffType:"paid_time_off",options:{enabled:t?.enabled,select:n(a=>({bookedDays:a?.data?.timeoffs?.reduce((o,r)=>o+(r?.timeoff_days?.filter(s=>s.hours!=null&&s.hours>0).length||0),0)||0,timeoffs:a?.data?.timeoffs?.map(o=>{let r=o?.timeoff_days?.filter(s=>s.hours>0).length||0;return{status:o?.status,duration:r,startDate:o?.start_date,endDate:o?.end_date,formattedDate:R(o?.start_date,o?.end_date)}})||[]}),"select")}}),"usePaidTimeoffBreakdownQuery"),A=n(({employmentId:e})=>{let{client:t}=i();return v({queryKey:["timeoff-balance",e],retry:!1,queryFn:n(()=>T({client:t,headers:{Authorization:""},path:{employment_id:e}}),"queryFn"),select:n(({data:a})=>a,"select")})},"useTimeOffLeavePoliciesSummaryQuery");import{useMutation as E,useQuery as Q}from"@tanstack/react-query";function F(e){return Object.entries(e).reduce((t,[a,o])=>({...t,[a]:h(o)}),{})}n(F,"formatTimeoffValues");function q(e){let t=e?.contract_details?.available_pto,a=e?.contract_details?.available_pto_type;return e?.country?.code==="USA"&&a==="unlimited"?{value:t===0?20:t}:a==="unlimited"&&t>0?{value:t}:{value:t}}n(q,"getMinimumStatutoryDays");function U(e,t){let a=0,o=0;return e.forEach(r=>{r.timeoff_days?.forEach(s=>{new Date(s.day)<=t?a+=s.hours||0:o+=s.hours||0})}),{before:a,after:o}}n(U,"getAllTimeoffHoursBeforeDate");var V=n(({employmentId:e,date:t,options:a})=>c({employmentId:e,timeoffType:"paid_time_off",status:"approved",options:{enabled:a?.enabled,select:n(o=>{let{before:r,after:s}=U(o?.data?.timeoffs||[],new Date(t));return{bookedDaysBeforeTermination:d(r),bookedDaysAfterTermination:d(s)}},"select")}}),"useBookedTimeoffBeforeAndAfterTerminationQuery"),me=n(({employmentId:e,proposedTerminationDate:t,employment:a})=>{let{value:o=0}=q(a),r=A({employmentId:e}),s=V({employmentId:e,date:t}),p=r.data?.data?.[0].annual_entitlement.type==="limited"?{days:r.data?.data?.[0].annual_entitlement.days,hours:r.data?.data?.[0].annual_entitlement.hours}:{days:o,hours:0},u={days:r.data?.data?.[0].booked.days||0,hours:r.data?.data?.[0].booked.hours||0},f=r.data?.data?.[0].current_entitlement.type==="limited"?{days:r.data?.data?.[0].current_entitlement.days||0,hours:r.data?.data?.[0].current_entitlement.hours||0}:{days:o,hours:0},l={days:r.data?.data?.[0].used.days||0,hours:r.data?.data?.[0].used.hours||0},B=s.data?.bookedDaysBeforeTermination||{days:0,hours:0},C=s.data?.bookedDaysAfterTermination||{days:0,hours:0},x=m(f.days,f.hours),H=m(l.days,l.hours),P=m(u.days,u.hours),L=x-H-P,O=_(d(L));return{data:{...F({entitledDays:p,bookedDays:u,usedDays:l,approvedDaysBeforeTermination:B,approvedDaysAfterTermination:C,remainingDays:O,currentEntitlementDays:f}),isUnlimitedPto:a?.contract_details?.available_pto_type==="unlimited"},isLoading:r.isLoading||s.isLoading,isError:r.isError||s.isError,error:r.error||s.error}},"useSummaryTimeOffDataQuery"),de=n(()=>{let{client:e}=i();return E({mutationFn:n(t=>D({client:e,body:t}),"mutationFn")})},"useCreateTermination"),ue=n(({formValues:e,jsfModify:t,step:a})=>Q({queryKey:["rmt-flows-termination-schema",a],queryFn:n(()=>S[a]??k,"queryFn"),select:n(({data:o})=>{let r=o?.schema||{};return g(r,e||{},{jsfModify:t})},"select")}),"useTerminationSchema");export{c as a,N as b,A as c,V as d,me as e,de as f,ue as g};
2
- //# sourceMappingURL=chunk-Z4STVEJE.js.map
1
+ import{a as k}from"./chunk-XFD3ULUF.js";import{a as S}from"./chunk-MTYN4AM3.js";import{a as m,b as d,c as h,d as _}from"./chunk-DFJNVGK4.js";import{a as y}from"./chunk-TXSUZLOI.js";import{a as g}from"./chunk-EUSCQL4H.js";import{C as T,X as b,c as D}from"./chunk-7ENB7H4E.js";import{d as i}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";import{useQuery as v}from"@tanstack/react-query";var c=n(({employmentId:e,status:t,timeoffType:a,options:o})=>{let{client:r}=i();return v({queryKey:["timeoff",e,t],retry:!1,queryFn:n(()=>b({client:r,headers:{Authorization:""},query:{employment_id:e,status:t,timeoff_type:a}}),"queryFn"),select:n(({data:s})=>o?.select?.(s)??s,"select"),enabled:o?.enabled})},"useTimeOffQuery"),R=n((e,t)=>{let a=y(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),o=y(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});return`${a} \u2192 ${o}`},"formatDateRange"),N=n(({employmentId:e,options:t})=>c({employmentId:e,timeoffType:"paid_time_off",options:{enabled:t?.enabled,select:n(a=>({bookedDays:a?.data?.timeoffs?.reduce((o,r)=>o+(r?.timeoff_days?.filter(s=>s.hours!=null&&s.hours>0).length||0),0)||0,timeoffs:a?.data?.timeoffs?.map(o=>{let r=o?.timeoff_days?.filter(s=>s.hours>0).length||0;return{status:o?.status,duration:r,startDate:o?.start_date,endDate:o?.end_date,formattedDate:R(o?.start_date,o?.end_date)}})||[]}),"select")}}),"usePaidTimeoffBreakdownQuery"),A=n(({employmentId:e})=>{let{client:t}=i();return v({queryKey:["timeoff-balance",e],retry:!1,queryFn:n(()=>T({client:t,headers:{Authorization:""},path:{employment_id:e}}),"queryFn"),select:n(({data:a})=>a,"select")})},"useTimeOffLeavePoliciesSummaryQuery");import{useMutation as E,useQuery as Q}from"@tanstack/react-query";function F(e){return Object.entries(e).reduce((t,[a,o])=>({...t,[a]:h(o)}),{})}n(F,"formatTimeoffValues");function q(e){let t=e?.contract_details?.available_pto,a=e?.contract_details?.available_pto_type;return e?.country?.code==="USA"&&a==="unlimited"?{value:t===0?20:t}:a==="unlimited"&&t>0?{value:t}:{value:t}}n(q,"getMinimumStatutoryDays");function U(e,t){let a=0,o=0;return e.forEach(r=>{r.timeoff_days?.forEach(s=>{new Date(s.day)<=t?a+=s.hours||0:o+=s.hours||0})}),{before:a,after:o}}n(U,"getAllTimeoffHoursBeforeDate");var V=n(({employmentId:e,date:t,options:a})=>c({employmentId:e,timeoffType:"paid_time_off",status:"approved",options:{enabled:a?.enabled,select:n(o=>{let{before:r,after:s}=U(o?.data?.timeoffs||[],new Date(t));return{bookedDaysBeforeTermination:d(r),bookedDaysAfterTermination:d(s)}},"select")}}),"useBookedTimeoffBeforeAndAfterTerminationQuery"),me=n(({employmentId:e,proposedTerminationDate:t,employment:a})=>{let{value:o=0}=q(a),r=A({employmentId:e}),s=V({employmentId:e,date:t}),p=r.data?.data?.[0].annual_entitlement.type==="limited"?{days:r.data?.data?.[0].annual_entitlement.days,hours:r.data?.data?.[0].annual_entitlement.hours}:{days:o,hours:0},u={days:r.data?.data?.[0].booked.days||0,hours:r.data?.data?.[0].booked.hours||0},f=r.data?.data?.[0].current_entitlement.type==="limited"?{days:r.data?.data?.[0].current_entitlement.days||0,hours:r.data?.data?.[0].current_entitlement.hours||0}:{days:o,hours:0},l={days:r.data?.data?.[0].used.days||0,hours:r.data?.data?.[0].used.hours||0},B=s.data?.bookedDaysBeforeTermination||{days:0,hours:0},C=s.data?.bookedDaysAfterTermination||{days:0,hours:0},x=m(f.days,f.hours),H=m(l.days,l.hours),P=m(u.days,u.hours),L=x-H-P,O=_(d(L));return{data:{...F({entitledDays:p,bookedDays:u,usedDays:l,approvedDaysBeforeTermination:B,approvedDaysAfterTermination:C,remainingDays:O,currentEntitlementDays:f}),isUnlimitedPto:a?.contract_details?.available_pto_type==="unlimited"},isLoading:r.isLoading||s.isLoading,isError:r.isError||s.isError,error:r.error||s.error}},"useSummaryTimeOffDataQuery"),de=n(()=>{let{client:e}=i();return E({mutationFn:n(t=>D({client:e,body:t}),"mutationFn")})},"useCreateTermination"),ue=n(({formValues:e,jsfModify:t,step:a})=>Q({queryKey:["rmt-flows-termination-schema",a],queryFn:n(()=>S[a]??k,"queryFn"),select:n(({data:o})=>{let r=o?.schema||{};return g(r,e||{},{jsfModify:t})},"select")}),"useTerminationSchema");export{c as a,N as b,A as c,V as d,me as e,de as f,ue as g};
2
+ //# sourceMappingURL=chunk-4HPV2VMI.js.map
@@ -1,2 +1,2 @@
1
- import{a as Z}from"./chunk-2J4XRENJ.js";import{a as I}from"./chunk-VFRHMNLJ.js";import{a as Q,b as W,c as X,f as Y}from"./chunk-47YUPC2L.js";import{a as C}from"./chunk-HN5HLFTB.js";import{a as G}from"./chunk-LNV36S6D.js";import{b as ee}from"./chunk-5F7FMTGE.js";import{a as z}from"./chunk-EUSCQL4H.js";import{e as M}from"./chunk-T7O3YYOG.js";import{a as K}from"./chunk-X6ZAR7ZL.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=>z(I.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}=Q({includePremiumBenefits:s.includePremiumBenefits}),{data:d,isLoading:ce}=W(),me=k||w?.value,{data:P,isLoading:de}=Y(me,{includePremiumBenefits:s.includePremiumBenefits,options:n}),U=X(),{mutateAsync:fe}=K(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(Z,{...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(ee,{...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=G(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-3ACL4IFO.js.map
1
+ import{a as Z}from"./chunk-XHAJ544L.js";import{a as I}from"./chunk-VFRHMNLJ.js";import{a as Q,b as W,c as X,f as Y}from"./chunk-246D2A55.js";import{a as C}from"./chunk-HN5HLFTB.js";import{a as G}from"./chunk-LNV36S6D.js";import{b as ee}from"./chunk-HOR3KPOZ.js";import{a as z}from"./chunk-EUSCQL4H.js";import{e as M}from"./chunk-T7O3YYOG.js";import{a as K}from"./chunk-X6ZAR7ZL.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=>z(I.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}=Q({includePremiumBenefits:s.includePremiumBenefits}),{data:d,isLoading:ce}=W(),me=k||w?.value,{data:P,isLoading:de}=Y(me,{includePremiumBenefits:s.includePremiumBenefits,options:n}),U=X(),{mutateAsync:fe}=K(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(Z,{...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(ee,{...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=G(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-4N4MQECC.js.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-I7JUAYNN.js";import{b as e}from"./chunk-MRYRNB7Y.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function F({onSubmit:t,onSuccess:s,onError:m}){let{terminationBag:o}=e(),d=r(async a=>{let l=await o?.parseFormValues(a,!0);await t?.(l);let i=await o?.onSubmit(a);i?.error?m?.(i.rawError):i?.data&&await s?.(i.data)},"handleSubmit");return u(n,{defaultValues:o.fieldValues,fields:o?.fields,onSubmit:d})}r(F,"AdditionalDetailsForm");export{F as a};
2
- //# sourceMappingURL=chunk-2ZS5F6C7.js.map
1
+ import{a as n}from"./chunk-BVFQ6LFD.js";import{b as e}from"./chunk-MRYRNB7Y.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function F({onSubmit:t,onSuccess:s,onError:m}){let{terminationBag:o}=e(),d=r(async a=>{let l=await o?.parseFormValues(a,!0);await t?.(l);let i=await o?.onSubmit(a);i?.error?m?.(i.rawError):i?.data&&await s?.(i.data)},"handleSubmit");return u(n,{defaultValues:o.fieldValues,fields:o?.fields,onSubmit:d})}r(F,"AdditionalDetailsForm");export{F as a};
2
+ //# sourceMappingURL=chunk-4UO7KLRK.js.map
@@ -0,0 +1,2 @@
1
+ import{a as De}from"./chunk-MHAY555P.js";import{a as Be}from"./chunk-VAIBLWOY.js";import{b as Ve,c as Pe,f as xe,g as Oe,h as Me,i as we,j as Te,k as Re,m as Le}from"./chunk-SLD227LM.js";import{a as ge,b as Ee,c as Ce,d as Fe,f as he}from"./chunk-STF3NTPS.js";import{a as ve}from"./chunk-JI4CYPLW.js";import{e as C,f as L,h as $}from"./chunk-T7O3YYOG.js";import{h as M}from"./chunk-VIGKOVHP.js";import{a as R}from"./chunk-X6ZAR7ZL.js";import{a as ke}from"./chunk-TSPDJUGG.js";import{a as o}from"./chunk-P37U34EQ.js";import{useCallback as gt,useEffect as Et,useMemo as p,useRef as Ct,useState as Ae}from"react";import Ft from"lodash.mergewith";import{createContext as mt,useContext as ft,useMemo as pt,useCallback as yt,useRef as _t}from"react";import{jsx as St}from"react/jsx-runtime";var qe=mt(void 0);function wt({children:r}){let u=_t({}),c=yt(i=>{u.current={...u.current,...i}},[]),F=pt(()=>({errorContextRef:u,updateContext:c}),[c]);return St(qe.Provider,{value:F,children:r})}o(wt,"ErrorContextProvider");var Je=o(()=>{let r=ft(qe);if(!r)throw new Error("useErrorContext must be used within ErrorContextProvider");return r},"useErrorContext");import{useEffect as je,useMemo as bt}from"react";function Ne(r){let{updateContext:u,errorContextRef:c}=Je();return je(()=>{r&&(c.current=r)},[]),je(()=>()=>{c.current={}},[c]),{...bt(()=>({updateErrorContext:o(i=>{u(i)},"updateErrorContext"),clearErrorContext:o(()=>{c.current={}},"clearErrorContext")}),[]),errorContext:c}}o(Ne,"useErrorReporting");import{jsx as Ie}from"react/jsx-runtime";var ht={employment_basic_information:"basic_information",contract_details:"contract_details"},Vt={select_country:null,basic_information:"employment_basic_information",contract_details:"contract_details",benefits:null,review:null},Pt=o(({isLoadingBasicInformationForm:r,isLoadingContractDetailsForm:u,isLoadingEmployment:c,isLoadingBenefitsOffersSchema:F,isLoadingBenefitOffers:i,isLoadingCompany:N,isLoadingCountries:w,employmentStatus:s,employmentId:v,currentStepName:A,basicInformationFields:I,contractDetailsFields:y})=>{let t=r||u||c||F||i||N||w,k=s&&Ce.includes(s),U=s&&!Fe.includes(s),D=!!(v&&k&&A!=="review"),T=t||D,B=!!(D&&!t&&I.length>0&&y.length>0);return{isLoading:T,isNavigatingToReview:B,isEmploymentReadOnly:k,canInvite:U}},"getLoadingStates"),Qt=o(({employmentId:r,companyId:u,countryCode:c,type:F,options:i,skipSteps:N,externalId:w,initialValues:s})=>{let{updateErrorContext:v}=Ne({flow:"onboarding",metadata:{employmentId:r,companyId:u,isUpdating:!!r}}),A=N?.includes("select_country")?Ee:ge,I=gt(e=>{v({step:e.name})},[v]),{fieldValues:y,stepState:t,setFieldValues:k,previousStep:U,nextStep:D,goToStep:T,setStepValues:B}=ke(A,I),q=Ct({select_country:{},basic_information:{},contract_details:{},benefits:{}}),[d,Ue]=Ae(r),[l,z]=Ae(c||null),{data:m,isLoading:K,refetch:He}=ve({employmentId:d,queryParams:{exclude_files:!0}});r&&m?.country?.code&&!l&&z(m.country.code);let{data:Q,isLoading:Y}=Pe(d),{data:J,isLoading:X,refetch:We}=Ve(u),{selectCountryForm:j,isLoading:Z}=Re({jsfModify:i?.jsfModify?.select_country,queryOptions:{enabled:t.currentStep.name==="select_country"}}),ee=Me(),te=we(l,i),ne=Te(i),oe=Le(),{mutateAsync:Ge}=R(ee),{mutateAsync:re}=R(te),{mutateAsync:$e}=R(ne),{mutateAsync:ze}=R(oe),Ke=Vt[t.currentStep.name]||"employment_basic_information",Qe=ht[Ke],Ye=m?.[Qe]||{},ie=o(({form:e,options:a={},query:f={},jsonSchemaVersion:O})=>{let W=Object.keys(y).length>0?{...s,...t.values?.[t.currentStep.name],...y}:{...s,...Ye};return xe({countryCode:l,form:e,fieldValues:W,query:f,options:{...a,queryOptions:{enabled:a.queryOptions?.enabled??!0}},jsonSchemaVersion:O})},"useJSONSchema"),Xe=!!(l&&(t.currentStep.name==="basic_information"||r)),Ze=!!(l&&(t.currentStep.name==="contract_details"||r)),{data:_,isLoading:ae}=ie({form:"employment_basic_information",options:{jsfModify:i?.jsfModify?.basic_information,queryOptions:{enabled:Xe}},jsonSchemaVersion:1}),h=i?.jsfModify?.contract_details?.fields?.annual_gross_salary,H=h&&typeof h=="object"&&"presentation"in h?h.presentation:void 0,se=i?.jsfModify?.contract_details?.fields?.equity_compensation,et=p(()=>({fields:{annual_gross_salary:{...h,presentation:{annual_gross_salary_conversion_properties:{label:H?.annual_gross_salary_conversion_properties?.label,description:H?.annual_gross_salary_conversion_properties?.description},desiredCurrency:J?.desired_currency,Component:o(e=>Ie(De,{desiredCurrency:J?.desired_currency||"",...e}),"Component")}},equity_compensation:{...se,presentation:{calculateDynamicProperties:o((e,a)=>{let f=e.equity_compensation?.offer_equity_compensation,O=a?.meta?.cost;return{extra:Ie(Be,{offerEquity:f,equityCost:O})}},"calculateDynamicProperties")}}}}),[h,H,J?.desired_currency,se]),tt=he(i,l),{data:S,isLoading:ce}=ie({form:"contract_details",query:{employment_id:d},options:{jsfModify:{...i?.jsfModify?.contract_details,fields:{...i?.jsfModify?.contract_details?.fields,...et.fields}},queryOptions:{enabled:Ze}},jsonSchemaVersion:tt}),{data:g,isLoading:le}=Oe(d,y,i),de=p(()=>{if(t.currentStep.name==="benefits"){let e={...t.values?.[t.currentStep.name],...y};return Ft({},Q,e)}return{}},[t.currentStep.name,Q,t.values,y]),n=p(()=>({select_country:j?.fields||[],basic_information:_?.fields||[],contract_details:S?.fields||[],benefits:g?.fields||[],review:[]}),[j?.fields,_?.fields,S?.fields,g?.fields]),nt={select_country:null,basic_information:_?.meta["x-jsf-fieldsets"],contract_details:S?.meta["x-jsf-fieldsets"],benefits:null,review:null},{country:ot,basic_information:ue={},contract_details:me={},status:fe}=m||{},pe=ot?.code,ye=t.currentStep.name,V=p(()=>L(n.select_country,{country:l||pe||""}),[n.select_country,l,pe]),P=p(()=>{let e={...s,...ue};return L(n.basic_information,e)},[n.basic_information,ue,s]),E=p(()=>{let e={...s,...me};return L(n.contract_details,e)},[n.contract_details,me,s]),x=p(()=>{let e={...s,...de};return L(n.benefits,e)},[n.benefits,de,s]),rt=p(()=>m?{select_country:V,basic_information:$(n.basic_information,P),contract_details:m?.contract_details!==null?$(n.contract_details,E):E,benefits:x}:{select_country:V,basic_information:P,contract_details:E,benefits:x},[V,P,E,x,m,n]),{isLoading:it,isNavigatingToReview:_e,isEmploymentReadOnly:at,canInvite:st}=p(()=>Pt({isLoadingBasicInformationForm:ae,isLoadingContractDetailsForm:ce,isLoadingEmployment:K,isLoadingBenefitsOffersSchema:le,isLoadingBenefitOffers:Y,isLoadingCompany:X,isLoadingCountries:Z,employmentId:r,employmentStatus:fe,basicInformationFields:n.basic_information,contractDetailsFields:n.contract_details,currentStepName:ye}),[ae,ce,K,le,Y,X,Z,r,fe,n.basic_information,n.contract_details,ye]);Et(()=>{_e&&(q.current={select_country:M(V,n.select_country),basic_information:M(P,n.basic_information),contract_details:M(E,n.contract_details),benefits:M(x,n.benefits)},B({select_country:V,basic_information:P,contract_details:E,benefits:x,review:{}}),T("review"))},[P,x,E,T,_e,V,B,n.basic_information,n.benefits,n.contract_details,n.select_country]);let Se=o(async e=>j&&t.currentStep.name==="select_country"?e:_&&t.currentStep.name==="basic_information"?await C(e,_?.fields,{isPartialValidation:!1}):S&&t.currentStep.name==="contract_details"?await C(e,S?.fields,{isPartialValidation:!1}):g&&t.currentStep.name==="benefits"?await C(e,g?.fields,{isPartialValidation:!1}):{},"parseFormValues");async function ct(e){let a=t.currentStep.name;a in q.current&&(q.current[a]=M(e,n[a]));let f=await Se(e);switch(We(),t.currentStep.name){case"select_country":return z(f.country),Promise.resolve({data:{countryCode:f.country}});case"basic_information":{let O=!d&&l,be=d&&l&&m?.country&&m?.country.code!==l;if(O||be){let W={basic_information:f,type:F,country_code:l,external_id:w};try{let b=await Ge(W);if(b.error)return b;if(b.data){let G=b.data?.data?.employment?.id;return G&&(Ue(G),await ze({employmentId:G,eligible_to_work_in_residing_country:"citizen",employer_or_work_restrictions:!1})),b}}catch(b){throw console.error("Error creating onboarding:",b),b}}else if(d)return re({employmentId:d,basic_information:f,pricing_plan_details:{frequency:"monthly"},external_id:w});return}case"contract_details":return re({employmentId:d,external_id:w,...{contract_details:f,pricing_plan_details:{frequency:"monthly"}}});case"benefits":return $e({employmentId:d,...f})}}o(ct,"onSubmit");function lt(){U()}o(lt,"back");function dt(){D()}o(dt,"next");function ut(e){T(e)}return o(ut,"goTo"),{employmentId:d,creditRiskStatus:J?.default_legal_entity_credit_risk_status,fieldValues:y,stepState:t,fields:n[t.currentStep.name],isLoading:it,isSubmitting:ee.isPending||te.isPending||ne.isPending||oe.isPending,initialValues:rt,handleValidation:o(async e=>{if(t.currentStep.name==="select_country")return j.handleValidation(e);if(t.currentStep.name==="benefits"&&g){let a=await C(e,g?.fields,{isPartialValidation:!1});return g?.handleValidation(a)}if(_&&t.currentStep.name==="basic_information"){let a=await C(e,_?.fields,{isPartialValidation:!1});return _?.handleValidation(a)}if(S&&t.currentStep.name==="contract_details"){let a=await C(e,S?.fields,{isPartialValidation:!1});return S?.handleValidation(a)}return null},"handleValidation"),checkFieldUpdates:k,parseFormValues:Se,onSubmit:ct,back:lt,next:dt,goTo:ut,meta:{fields:q.current,fieldsets:nt[t.currentStep.name]},refetchEmployment:He,employment:m,isEmploymentReadOnly:at,canInvite:st}},"useOnboarding");export{qe as a,wt as b,Qt as c};
2
+ //# sourceMappingURL=chunk-5FTC6HMG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Onboarding/hooks.tsx","../src/components/error-handling/ErrorContext.tsx","../src/components/error-handling/useErrorReporting.ts"],"sourcesContent":["import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';\nimport {\n Employment,\n EmploymentCreateParams,\n EmploymentFullParams,\n} from '@/src/client';\nimport { JSFFields } from '@/src/types/remoteFlows';\nimport { useStepState, Step } from '@/src/flows/useStepState';\nimport {\n disabledInviteButtonEmploymentStatus,\n getContractDetailsSchemaVersion,\n reviewStepAllowedEmploymentStatus,\n STEPS,\n STEPS_WITHOUT_SELECT_COUNTRY,\n} from '@/src/flows/Onboarding/utils';\nimport { prettifyFormValues } from '@/src/lib/utils';\nimport {\n getInitialValues,\n enableAckFields,\n parseJSFToValidate,\n} from '@/src/components/form/utils';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { FieldValues } from 'react-hook-form';\nimport { OnboardingFlowProps } from '@/src/flows/Onboarding/types';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport mergeWith from 'lodash.mergewith';\nimport {\n useBenefitOffers,\n useBenefitOffersSchema,\n useCompany,\n useCountriesSchemaField,\n useCreateEmployment,\n useJSONSchemaForm,\n useUpdateBenefitsOffers,\n useUpdateEmployment,\n useUpsertContractEligibility,\n} from '@/src/flows/Onboarding/api';\nimport { JSFModify, JSONSchemaFormType } from '@/src/flows/types';\nimport { AnnualGrossSalary } from '@/src/flows/Onboarding/components/AnnualGrossSalary';\nimport { $TSFixMe, JSFField, JSFFieldset, Meta } from '@/src/types/remoteFlows';\nimport { EquityPriceDetails } from '@/src/flows/Onboarding/components/EquityPriceDetails';\nimport { useErrorReporting } from '@/src/components/error-handling/useErrorReporting';\nimport { useEmploymentQuery } from '@/src/common/api/employment';\n\ntype OnboardingHookProps = Omit<OnboardingFlowProps, 'render'>;\n\nconst jsonSchemaToEmployment: Partial<\n Record<JSONSchemaFormType, keyof Employment>\n> = {\n employment_basic_information: 'basic_information',\n contract_details: 'contract_details',\n};\n\nconst stepToFormSchemaMap: Record<\n keyof typeof STEPS,\n JSONSchemaFormType | null\n> = {\n select_country: null,\n basic_information: 'employment_basic_information',\n contract_details: 'contract_details',\n benefits: null,\n review: null,\n};\n\nconst getLoadingStates = ({\n isLoadingBasicInformationForm,\n isLoadingContractDetailsForm,\n isLoadingEmployment,\n isLoadingBenefitsOffersSchema,\n isLoadingBenefitOffers,\n isLoadingCompany,\n isLoadingCountries,\n employmentStatus,\n employmentId,\n currentStepName,\n basicInformationFields,\n contractDetailsFields,\n}: {\n isLoadingBasicInformationForm: boolean;\n isLoadingContractDetailsForm: boolean;\n isLoadingEmployment: boolean;\n isLoadingBenefitsOffersSchema: boolean;\n isLoadingBenefitOffers: boolean;\n isLoadingCompany: boolean;\n isLoadingCountries: boolean;\n employmentStatus?: Employment['status'];\n employmentId?: string;\n currentStepName: string;\n basicInformationFields: JSFFields;\n contractDetailsFields: JSFFields;\n}) => {\n const initialLoading =\n isLoadingBasicInformationForm ||\n isLoadingContractDetailsForm ||\n isLoadingEmployment ||\n isLoadingBenefitsOffersSchema ||\n isLoadingBenefitOffers ||\n isLoadingCompany ||\n isLoadingCountries;\n\n const isEmploymentReadOnly =\n employmentStatus &&\n reviewStepAllowedEmploymentStatus.includes(employmentStatus);\n\n const canInvite =\n employmentStatus &&\n !disabledInviteButtonEmploymentStatus.includes(employmentStatus);\n\n const shouldHandleReadOnlyEmployment = Boolean(\n employmentId && isEmploymentReadOnly && currentStepName !== 'review',\n );\n\n const isLoading = initialLoading || shouldHandleReadOnlyEmployment;\n\n const isNavigatingToReview = Boolean(\n shouldHandleReadOnlyEmployment &&\n !initialLoading &&\n basicInformationFields.length > 0 &&\n contractDetailsFields.length > 0,\n );\n\n return {\n isLoading,\n isNavigatingToReview,\n isEmploymentReadOnly,\n canInvite,\n };\n};\n\nexport const useOnboarding = ({\n employmentId,\n companyId,\n countryCode,\n type,\n options,\n skipSteps,\n externalId,\n initialValues: onboardingInitialValues,\n}: OnboardingHookProps) => {\n const { updateErrorContext } = useErrorReporting({\n flow: 'onboarding',\n metadata: {\n employmentId,\n companyId,\n isUpdating: Boolean(employmentId),\n },\n });\n const stepsToUse = skipSteps?.includes('select_country')\n ? STEPS_WITHOUT_SELECT_COUNTRY\n : STEPS;\n\n const onStepChange = useCallback(\n (step: Step<keyof typeof STEPS>) => {\n updateErrorContext({\n step: step.name,\n });\n },\n [updateErrorContext],\n );\n\n const {\n fieldValues,\n stepState,\n setFieldValues,\n previousStep,\n nextStep,\n goToStep,\n setStepValues,\n } = useStepState(\n stepsToUse as Record<keyof typeof STEPS, Step<keyof typeof STEPS>>,\n onStepChange,\n );\n\n const fieldsMetaRef = useRef<{\n select_country: Meta;\n basic_information: Meta;\n contract_details: Meta;\n benefits: Meta;\n }>({\n select_country: {},\n basic_information: {},\n contract_details: {},\n benefits: {},\n });\n const [internalEmploymentId, setInternalEmploymentId] = useState<\n string | undefined\n >(employmentId);\n const [internalCountryCode, setInternalCountryCode] = useState<string | null>(\n countryCode || null,\n );\n const {\n data: employment,\n isLoading: isLoadingEmployment,\n refetch: refetchEmployment,\n } = useEmploymentQuery({\n employmentId: internalEmploymentId as string,\n queryParams: { exclude_files: true },\n });\n\n // if the employment is loaded, country code has not been set yet\n // we set the internal country code with the employment country code\n if (employmentId && employment?.country?.code && !internalCountryCode) {\n setInternalCountryCode(employment.country.code);\n }\n\n const { data: benefitOffers, isLoading: isLoadingBenefitOffers } =\n useBenefitOffers(internalEmploymentId);\n\n const {\n data: company,\n isLoading: isLoadingCompany,\n refetch: refetchCompany,\n } = useCompany(companyId);\n\n const { selectCountryForm, isLoading: isLoadingCountries } =\n useCountriesSchemaField({\n jsfModify: options?.jsfModify?.select_country,\n queryOptions: {\n enabled: stepState.currentStep.name === 'select_country',\n },\n });\n\n const createEmploymentMutation = useCreateEmployment();\n const updateEmploymentMutation = useUpdateEmployment(\n internalCountryCode as string,\n options,\n );\n const updateBenefitsOffersMutation = useUpdateBenefitsOffers(options);\n const updateContractEligibilityMutation = useUpsertContractEligibility();\n const { mutateAsync: createEmploymentMutationAsync } = mutationToPromise(\n createEmploymentMutation,\n );\n const { mutateAsync: updateEmploymentMutationAsync } = mutationToPromise(\n updateEmploymentMutation,\n );\n const { mutateAsync: updateBenefitsOffersMutationAsync } = mutationToPromise(\n updateBenefitsOffersMutation,\n );\n const { mutateAsync: updateContractEligibilityMutationAsync } =\n mutationToPromise(updateContractEligibilityMutation);\n\n const formType =\n stepToFormSchemaMap[stepState.currentStep.name] ||\n 'employment_basic_information';\n const employmentKey = jsonSchemaToEmployment[formType] as keyof Employment;\n const serverEmploymentData = (employment?.[employmentKey] || {}) as Record<\n string,\n unknown\n >;\n\n const useJSONSchema = ({\n form,\n options: jsonSchemaOptions = {},\n query = {},\n jsonSchemaVersion,\n }: {\n form: JSONSchemaFormType;\n options?: {\n jsfModify?: JSFModify;\n queryOptions?: { enabled?: boolean };\n };\n query?: Record<string, string>;\n jsonSchemaVersion?: number | 'latest';\n }) => {\n const hasUserEnteredAnyValues = Object.keys(fieldValues).length > 0;\n // when you write on the fields, the values are stored in the fieldValues state\n // when values are stored in the stepState is when the user has navigated to the step\n // and then we have the values from the server and the onboardingInitialValues that the user can inject,\n const mergedFormValues = hasUserEnteredAnyValues\n ? {\n ...onboardingInitialValues,\n ...stepState.values?.[stepState.currentStep.name], // Restore values for the current step\n ...fieldValues,\n }\n : {\n ...onboardingInitialValues,\n ...serverEmploymentData,\n };\n\n return useJSONSchemaForm({\n countryCode: internalCountryCode as string,\n form: form,\n fieldValues: mergedFormValues,\n query,\n options: {\n ...jsonSchemaOptions,\n queryOptions: {\n enabled: jsonSchemaOptions.queryOptions?.enabled ?? true,\n },\n },\n jsonSchemaVersion,\n });\n };\n\n const isBasicInformationDetailsEnabled = Boolean(\n internalCountryCode &&\n (stepState.currentStep.name === 'basic_information' ||\n Boolean(employmentId)),\n );\n\n const isContractDetailsEnabled = Boolean(\n internalCountryCode &&\n (stepState.currentStep.name === 'contract_details' ||\n Boolean(employmentId)),\n );\n\n const {\n data: basicInformationForm,\n isLoading: isLoadingBasicInformationForm,\n } = useJSONSchema({\n form: 'employment_basic_information',\n options: {\n jsfModify: options?.jsfModify?.basic_information,\n queryOptions: {\n enabled: isBasicInformationDetailsEnabled,\n },\n },\n jsonSchemaVersion: 1,\n });\n\n const annualGrossSalaryField =\n options?.jsfModify?.contract_details?.fields?.annual_gross_salary;\n const annualSalaryFieldPresentation =\n annualGrossSalaryField &&\n typeof annualGrossSalaryField === 'object' &&\n 'presentation' in annualGrossSalaryField\n ? (\n annualGrossSalaryField as {\n presentation?: {\n annual_gross_salary_conversion_properties?: {\n label?: string;\n description?: string;\n };\n };\n }\n ).presentation\n : undefined;\n\n const equityCompensationField =\n options?.jsfModify?.contract_details?.fields?.equity_compensation;\n\n const contractDetailsCustomFields = useMemo(\n () => ({\n fields: {\n annual_gross_salary: {\n ...annualGrossSalaryField,\n presentation: {\n annual_gross_salary_conversion_properties: {\n label:\n annualSalaryFieldPresentation\n ?.annual_gross_salary_conversion_properties?.label,\n description:\n annualSalaryFieldPresentation\n ?.annual_gross_salary_conversion_properties?.description,\n },\n desiredCurrency: company?.desired_currency,\n Component: (props: JSFField & { currency: string }) => {\n return (\n <AnnualGrossSalary\n desiredCurrency={company?.desired_currency || ''}\n {...props}\n />\n );\n },\n },\n },\n equity_compensation: {\n ...equityCompensationField,\n presentation: {\n calculateDynamicProperties: (\n values: FieldValues,\n field: JSFField,\n ) => {\n const offerEquity =\n values.equity_compensation?.offer_equity_compensation;\n const equityCost = field?.meta?.cost;\n\n return {\n extra: (\n <EquityPriceDetails\n offerEquity={offerEquity}\n equityCost={equityCost as $TSFixMe}\n />\n ),\n };\n },\n },\n },\n },\n }),\n [\n annualGrossSalaryField,\n annualSalaryFieldPresentation,\n company?.desired_currency,\n equityCompensationField,\n ],\n );\n\n const effectiveContractDetailsJsonSchemaVersion =\n getContractDetailsSchemaVersion(options, internalCountryCode);\n\n const { data: contractDetailsForm, isLoading: isLoadingContractDetailsForm } =\n useJSONSchema({\n form: 'contract_details',\n query: {\n employment_id: internalEmploymentId as string,\n },\n options: {\n jsfModify: {\n ...options?.jsfModify?.contract_details,\n fields: {\n ...options?.jsfModify?.contract_details?.fields,\n ...contractDetailsCustomFields.fields,\n },\n },\n queryOptions: {\n enabled: isContractDetailsEnabled,\n },\n },\n jsonSchemaVersion: effectiveContractDetailsJsonSchemaVersion,\n });\n\n const {\n data: benefitOffersSchema,\n isLoading: isLoadingBenefitsOffersSchema,\n } = useBenefitOffersSchema(\n internalEmploymentId as string,\n fieldValues,\n options,\n );\n\n const initialValuesBenefitOffers = useMemo(() => {\n if (stepState.currentStep.name === 'benefits') {\n const benefitsFormValues = {\n ...stepState.values?.[stepState.currentStep.name as keyof typeof STEPS], // Restore values for the current step\n ...fieldValues,\n };\n return mergeWith({}, benefitOffers, benefitsFormValues);\n }\n return {};\n }, [\n stepState.currentStep.name,\n benefitOffers,\n stepState.values,\n fieldValues,\n ]);\n\n const stepFields: Record<keyof typeof STEPS, JSFFields> = useMemo(\n () => ({\n select_country: selectCountryForm?.fields || [],\n basic_information: basicInformationForm?.fields || [],\n contract_details: contractDetailsForm?.fields || [],\n benefits: benefitOffersSchema?.fields || [],\n review: [],\n }),\n [\n selectCountryForm?.fields,\n basicInformationForm?.fields,\n contractDetailsForm?.fields,\n benefitOffersSchema?.fields,\n ],\n );\n\n const stepFieldsWithFlatFieldsets: Record<\n keyof typeof STEPS,\n JSFFieldset | null | undefined\n > = {\n select_country: null,\n basic_information: basicInformationForm?.meta['x-jsf-fieldsets'],\n contract_details: contractDetailsForm?.meta['x-jsf-fieldsets'],\n benefits: null,\n review: null,\n };\n\n const {\n country,\n basic_information: employmentBasicInformation = {},\n contract_details: employmentContractDetails = {},\n status: employmentStatus,\n } = employment || {};\n\n const employmentCountryCode = country?.code;\n const currentStepName = stepState.currentStep.name;\n\n const selectCountryInitialValues = useMemo(\n () =>\n getInitialValues(stepFields.select_country, {\n country: internalCountryCode || employmentCountryCode || '',\n }),\n [stepFields.select_country, internalCountryCode, employmentCountryCode],\n );\n\n const basicInformationInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...employmentBasicInformation,\n };\n\n return getInitialValues(stepFields.basic_information, initialValues);\n }, [\n stepFields.basic_information,\n employmentBasicInformation,\n onboardingInitialValues,\n ]);\n\n const contractDetailsInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...employmentContractDetails,\n };\n\n return getInitialValues(stepFields.contract_details, initialValues);\n }, [\n stepFields.contract_details,\n employmentContractDetails,\n onboardingInitialValues,\n ]);\n\n const benefitsInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...initialValuesBenefitOffers,\n };\n\n return getInitialValues(stepFields.benefits, initialValues);\n }, [\n stepFields.benefits,\n initialValuesBenefitOffers,\n onboardingInitialValues,\n ]);\n\n const initialValues = useMemo(() => {\n if (employment) {\n return {\n select_country: selectCountryInitialValues,\n // We don't store ack fields in the db, eg \"ack_start_date_ammendment\" for Argentina, and therefore is not returned in the employment response\n // So when an employmentId exists, it means that the user has already started the onboarding process, and we need to enable the ack fields\n basic_information: enableAckFields(\n stepFields['basic_information'],\n basicInformationInitialValues,\n ),\n contract_details:\n // if contract details is null, it means it has not been filled yet, so we can't enable the ack fields\n employment?.contract_details !== null\n ? enableAckFields(\n stepFields['contract_details'],\n contractDetailsInitialValues,\n )\n : contractDetailsInitialValues,\n benefits: benefitsInitialValues,\n };\n }\n return {\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_details: contractDetailsInitialValues,\n benefits: benefitsInitialValues,\n };\n }, [\n selectCountryInitialValues,\n basicInformationInitialValues,\n contractDetailsInitialValues,\n benefitsInitialValues,\n employment,\n stepFields,\n ]);\n\n const { isLoading, isNavigatingToReview, isEmploymentReadOnly, canInvite } =\n useMemo(\n () =>\n getLoadingStates({\n isLoadingBasicInformationForm,\n isLoadingContractDetailsForm,\n isLoadingEmployment,\n isLoadingBenefitsOffersSchema,\n isLoadingBenefitOffers,\n isLoadingCompany,\n isLoadingCountries,\n employmentId,\n employmentStatus: employmentStatus,\n basicInformationFields: stepFields.basic_information,\n contractDetailsFields: stepFields.contract_details,\n currentStepName: currentStepName,\n }),\n [\n isLoadingBasicInformationForm,\n isLoadingContractDetailsForm,\n isLoadingEmployment,\n isLoadingBenefitsOffersSchema,\n isLoadingBenefitOffers,\n isLoadingCompany,\n isLoadingCountries,\n employmentId,\n employmentStatus,\n stepFields.basic_information,\n stepFields.contract_details,\n currentStepName,\n ],\n );\n\n useEffect(() => {\n if (isNavigatingToReview) {\n fieldsMetaRef.current = {\n select_country: prettifyFormValues(\n selectCountryInitialValues,\n stepFields.select_country,\n ),\n basic_information: prettifyFormValues(\n basicInformationInitialValues,\n stepFields.basic_information,\n ),\n contract_details: prettifyFormValues(\n contractDetailsInitialValues,\n stepFields.contract_details,\n ),\n benefits: prettifyFormValues(\n benefitsInitialValues,\n stepFields.benefits,\n ),\n };\n\n setStepValues({\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_details: contractDetailsInitialValues,\n benefits: benefitsInitialValues,\n review: {},\n });\n\n goToStep('review');\n }\n }, [\n basicInformationInitialValues,\n benefitsInitialValues,\n contractDetailsInitialValues,\n goToStep,\n isNavigatingToReview,\n selectCountryInitialValues,\n setStepValues,\n stepFields.basic_information,\n stepFields.benefits,\n stepFields.contract_details,\n stepFields.select_country,\n ]);\n\n const parseFormValues = async (values: FieldValues) => {\n if (selectCountryForm && stepState.currentStep.name === 'select_country') {\n return values;\n }\n if (\n basicInformationForm &&\n stepState.currentStep.name === 'basic_information'\n ) {\n return await parseJSFToValidate(values, basicInformationForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n if (\n contractDetailsForm &&\n stepState.currentStep.name === 'contract_details'\n ) {\n return await parseJSFToValidate(values, contractDetailsForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n if (benefitOffersSchema && stepState.currentStep.name === 'benefits') {\n return await parseJSFToValidate(values, benefitOffersSchema?.fields, {\n isPartialValidation: false,\n });\n }\n\n return {};\n };\n\n async function onSubmit(values: FieldValues) {\n // Prettify values for the current step\n const currentStepName = stepState.currentStep.name;\n if (currentStepName in fieldsMetaRef.current) {\n fieldsMetaRef.current[\n currentStepName as keyof typeof fieldsMetaRef.current\n ] = prettifyFormValues(values, stepFields[currentStepName]);\n }\n\n const parsedValues = await parseFormValues(values);\n refetchCompany();\n switch (stepState.currentStep.name) {\n case 'select_country': {\n setInternalCountryCode(parsedValues.country);\n return Promise.resolve({ data: { countryCode: parsedValues.country } });\n }\n case 'basic_information': {\n const isEmploymentNotLoaded =\n !internalEmploymentId && internalCountryCode;\n const hasChangedCountry =\n internalEmploymentId &&\n internalCountryCode &&\n employment?.country &&\n employment?.country.code !== internalCountryCode;\n if (isEmploymentNotLoaded || hasChangedCountry) {\n const payload: EmploymentCreateParams = {\n basic_information: parsedValues,\n type: type,\n country_code: internalCountryCode,\n external_id: externalId,\n };\n try {\n const response = await createEmploymentMutationAsync(payload);\n\n if (response.error) {\n return response;\n }\n\n if (response.data) {\n // @ts-expect-error the types from the response are not matching\n const employmentId = response.data?.data?.employment?.id;\n if (employmentId) {\n setInternalEmploymentId(employmentId);\n await updateContractEligibilityMutationAsync({\n employmentId: employmentId,\n eligible_to_work_in_residing_country: 'citizen',\n employer_or_work_restrictions: false,\n });\n }\n\n return response;\n }\n } catch (error) {\n console.error('Error creating onboarding:', error);\n throw error;\n }\n } else if (internalEmploymentId) {\n return updateEmploymentMutationAsync({\n employmentId: internalEmploymentId,\n basic_information: parsedValues,\n pricing_plan_details: {\n frequency: 'monthly',\n },\n external_id: externalId,\n });\n }\n\n return;\n }\n case 'contract_details': {\n const payload: EmploymentFullParams = {\n contract_details: parsedValues,\n pricing_plan_details: {\n frequency: 'monthly',\n },\n };\n return updateEmploymentMutationAsync({\n employmentId: internalEmploymentId as string,\n external_id: externalId,\n ...payload,\n });\n }\n\n case 'benefits': {\n return updateBenefitsOffersMutationAsync({\n employmentId: internalEmploymentId as string,\n ...parsedValues,\n });\n }\n }\n return;\n }\n\n function back() {\n previousStep();\n }\n\n function next() {\n nextStep();\n }\n\n function goTo(step: keyof typeof STEPS) {\n goToStep(step);\n }\n\n return {\n /**\n * Employment id passed useful to be used between components\n */\n employmentId: internalEmploymentId,\n\n /**\n * Credit risk status of the company, useful to know what to to show in the review step\n * The possible values are:\n * - not_started\n * - ready\n * - in_progress\n * - referred\n * - fail\n * - deposit_required\n * - no_deposit_required\n */\n\n creditRiskStatus: company?.default_legal_entity_credit_risk_status,\n /**\n * Current state of the form fields for the current step.\n */\n fieldValues,\n /**\n * Current step state containing the current step and total number of steps\n */\n stepState,\n /**\n * Array of form fields from the onboarding schema\n */\n fields: stepFields[stepState.currentStep.name],\n /**\n * Loading state indicating if the onboarding schema is being fetched\n */\n isLoading: isLoading,\n /**\n * Loading state indicating if the onboarding mutation is in progress\n */\n isSubmitting:\n createEmploymentMutation.isPending ||\n updateEmploymentMutation.isPending ||\n updateBenefitsOffersMutation.isPending ||\n updateContractEligibilityMutation.isPending,\n /**\n * Initial form values\n */\n initialValues,\n /**\n * Function to validate form values against the onboarding schema\n * @param values - Form values to validate\n * @returns Validation result or null if no schema is available\n */\n handleValidation: async (\n values: FieldValues,\n ): Promise<ValidationResult | null> => {\n if (stepState.currentStep.name === 'select_country') {\n return selectCountryForm.handleValidation(values);\n }\n if (stepState.currentStep.name === 'benefits' && benefitOffersSchema) {\n const parsedValues = await parseJSFToValidate(\n values,\n benefitOffersSchema?.fields,\n { isPartialValidation: false },\n );\n\n return benefitOffersSchema?.handleValidation(parsedValues);\n }\n if (\n basicInformationForm &&\n stepState.currentStep.name === 'basic_information'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n basicInformationForm?.fields,\n { isPartialValidation: false },\n );\n return basicInformationForm?.handleValidation(parsedValues);\n }\n\n if (\n contractDetailsForm &&\n stepState.currentStep.name === 'contract_details'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n contractDetailsForm?.fields,\n { isPartialValidation: false },\n );\n return contractDetailsForm?.handleValidation(parsedValues);\n }\n\n return null;\n },\n /**\n * Function to update the current form field values\n * @param values - New form values to set\n */\n checkFieldUpdates: setFieldValues,\n\n /**\n * Function to parse form values before submission\n * @param values - Form values to parse\n * @returns Parsed form values\n */\n parseFormValues,\n\n /**\n * Function to handle form submission\n * @param values - Form values to submit\n * @returns Promise resolving to the mutation result\n */\n onSubmit,\n\n /**\n * Function to handle going back to the previous step\n * @returns {void}\n */\n back,\n\n /**\n * Function to handle going to the next step\n * @returns {void}\n */\n next,\n\n /**\n * Function to handle going to a specific step\n * @param step The step to go to.\n * @returns {void}\n */\n goTo,\n\n /**\n * Fields metadata for each step\n */\n meta: {\n fields: fieldsMetaRef.current,\n fieldsets: stepFieldsWithFlatFieldsets[stepState.currentStep.name],\n },\n\n /**\n * Function to refetch the employment data\n * @returns {void}\n */\n refetchEmployment,\n /**\n * Employment data\n */\n employment,\n\n /**\n * let's the user know that the employment cannot be edited, happens when employment.status is invited, created_awaiting_reserve or created_reserve_paid\n * @returns {boolean}\n */\n isEmploymentReadOnly,\n\n /**\n * let's the user know if the company can invite employees\n * @returns {boolean}\n */\n canInvite,\n };\n};\n","import {\n createContext,\n useContext,\n ReactNode,\n useMemo,\n useCallback,\n useRef,\n RefObject,\n} from 'react';\nimport type { ErrorContextData } from './types';\n\nexport type ErrorContextValue = {\n errorContextRef: RefObject<ErrorContextData>;\n updateContext: (updates: Partial<ErrorContextData>) => void;\n};\n\nexport const ErrorContext = createContext<ErrorContextValue | undefined>(\n undefined,\n);\n\nexport function ErrorContextProvider({ children }: { children: ReactNode }) {\n const errorContextRef = useRef<ErrorContextData>({});\n\n const updateContext = useCallback((updates: Partial<ErrorContextData>) => {\n errorContextRef.current = { ...errorContextRef.current, ...updates };\n }, []);\n\n // Memoize the value object to prevent unnecessary re-renders\n // Note: setContext is stable from useState and doesn't need to be in deps\n const value = useMemo(\n () => ({\n errorContextRef,\n updateContext,\n }),\n [updateContext],\n );\n\n return (\n <ErrorContext.Provider value={value}>{children}</ErrorContext.Provider>\n );\n}\n\nexport const useErrorContext = () => {\n const ctx = useContext(ErrorContext);\n if (!ctx) {\n throw new Error('useErrorContext must be used within ErrorContextProvider');\n }\n return ctx;\n};\n","import { useErrorContext } from '@/src/components/error-handling/ErrorContext';\nimport { ErrorContextData } from '@/src/components/error-handling/types';\nimport { useEffect, useMemo } from 'react';\n\nexport function useErrorReporting(initialContext: ErrorContextData) {\n const { updateContext, errorContextRef } = useErrorContext();\n\n // Set initial context on mount\n useEffect(() => {\n if (initialContext) {\n errorContextRef.current = initialContext;\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // Clear context on unmount\n useEffect(() => {\n return () => {\n errorContextRef.current = {};\n };\n }, [errorContextRef]);\n\n // Note: setContext and updateContext are stable, don't need to be in deps\n const handlers = useMemo(\n () => ({\n updateErrorContext: (updates: Partial<ErrorContextData>) => {\n updateContext(updates);\n },\n\n clearErrorContext: () => {\n errorContextRef.current = {};\n },\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n\n return {\n ...handlers,\n /**\n * @internal For unit testing only - we access the errorContext in the error boundary directly\n * Use updateErrorContext() and clearErrorContext() handlers instead.\n */\n errorContext: errorContextRef,\n };\n}\n"],"mappings":"ogBAwBA,OAAS,eAAAA,GAAa,aAAAC,GAAW,WAAAC,EAAS,UAAAC,GAAQ,YAAAC,OAAgB,QAClE,OAAOC,OAAe,mBCzBtB,OACE,iBAAAC,GACA,cAAAC,GAEA,WAAAC,GACA,eAAAC,GACA,UAAAC,OAEK,QA8BH,cAAAC,OAAA,oBAtBG,IAAMC,GAAeC,GAC1B,MACF,EAEO,SAASC,GAAqB,CAAE,SAAAC,CAAS,EAA4B,CAC1E,IAAMC,EAAkBC,GAAyB,CAAC,CAAC,EAE7CC,EAAgBC,GAAaC,GAAuC,CACxEJ,EAAgB,QAAU,CAAE,GAAGA,EAAgB,QAAS,GAAGI,CAAQ,CACrE,EAAG,CAAC,CAAC,EAICC,EAAQC,GACZ,KAAO,CACL,gBAAAN,EACA,cA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AAWtE,EAAU,YAAY,IAAI,EAI7C,UAAWnB,GAIX,aACE2C,GAAyB,WACzBE,GAAyB,WACzBE,GAA6B,WAC7BE,GAAkC,UAIpC,cAAAiD,GAMA,iBAAkBrH,EAAA,MAChB+F,GACqC,CACrC,GAAIzD,EAAU,YAAY,OAAS,iBACjC,OAAOsB,EAAkB,iBAAiBmC,CAAM,EAElD,GAAIzD,EAAU,YAAY,OAAS,YAAciE,EAAqB,CACpE,IAAMuB,EAAe,MAAMF,EACzB7B,EACAQ,GAAqB,OACrB,CAAE,oBAAqB,EAAM,CAC/B,EAEA,OAAOA,GAAqB,iBAAiBuB,CAAY,CAC3D,CACA,GACEvC,GACAjD,EAAU,YAAY,OAAS,oBAC/B,CACA,IAAMwF,EAAe,MAAMF,EACzB7B,EACAR,GAAsB,OACtB,CAAE,oBAAqB,EAAM,CAC/B,EACA,OAAOA,GAAsB,iBAAiBuC,CAAY,CAC5D,CAEA,GACExB,GACAhE,EAAU,YAAY,OAAS,mBAC/B,CACA,IAAMwF,EAAe,MAAMF,EACzB7B,EACAO,GAAqB,OACrB,CAAE,oBAAqB,EAAM,CAC/B,EACA,OAAOA,GAAqB,iBAAiBwB,CAAY,CAC3D,CAEA,OAAO,IACT,EAxCkB,oBA6ClB,kBAAmBvF,EAOnB,gBAAAoF,GAOA,SAAAE,GAMA,KAAAO,GAMA,KAAAC,GAOA,KAAAC,GAKA,KAAM,CACJ,OAAQzF,EAAc,QACtB,UAAWgE,GAA4BvE,EAAU,YAAY,IAAI,CACnE,EAMA,kBAAAe,GAIA,WAAAD,EAMA,qBAAAtC,GAMA,UAAAE,EACF,CACF,EA9yB6B","names":["useCallback","useEffect","useMemo","useRef","useState","mergeWith","createContext","useContext","useMemo","useCallback","useRef","jsx","ErrorContext","createContext","ErrorContextProvider","children","errorContextRef","useRef","updateContext","useCallback","updates","value","useMemo","__name","useErrorContext","ctx","useContext","useEffect","useMemo","useErrorReporting","initialContext","updateContext","errorContextRef","useErrorContext","useEffect","useMemo","__name","updates","jsx","jsonSchemaToEmployment","stepToFormSchemaMap","getLoadingStates","__name","isLoadingBasicInformationForm","isLoadingContractDetailsForm","isLoadingEmployment","isLoadingBenefitsOffersSchema","isLoadingBenefitOffers","isLoadingCompany","isLoadingCountries","employmentStatus","employmentId","currentStepName","basicInformationFields","contractDetailsFields","initialLoading","isEmploymentReadOnly","reviewStepAllowedEmploymentStatus","canInvite","disabledInviteButtonEmploymentStatus","shouldHandleReadOnlyEmployment","isLoading","isNavigatingToReview","useOnboarding","companyId","countryCode","type","options","skipSteps","externalId","onboardingInitialValues","updateErrorContext","useErrorReporting","stepsToUse","STEPS_WITHOUT_SELECT_COUNTRY","STEPS","onStepChange","useCallback","step","fieldValues","stepState","setFieldValues","previousStep","nextStep","goToStep","setStepValues","useStepState","fieldsMetaRef","useRef","internalEmploymentId","setInternalEmploymentId","useState","internalCountryCode","setInternalCountryCode","employment","refetchEmployment","useEmploymentQuery","benefitOffers","useBenefitOffers","company","refetchCompany","useCompany","selectCountryForm","useCountriesSchemaField","createEmploymentMutation","useCreateEmployment","updateEmploymentMutation","useUpdateEmployment","updateBenefitsOffersMutation","useUpdateBenefitsOffers","updateContractEligibilityMutation","useUpsertContractEligibility","createEmploymentMutationAsync","mutationToPromise","updateEmploymentMutationAsync","updateBenefitsOffersMutationAsync","updateContractEligibilityMutationAsync","formType","employmentKey","serverEmploymentData","useJSONSchema","form","jsonSchemaOptions","query","jsonSchemaVersion","mergedFormValues","useJSONSchemaForm","isBasicInformationDetailsEnabled","isContractDetailsEnabled","basicInformationForm","annualGrossSalaryField","annualSalaryFieldPresentation","equityCompensationField","contractDetailsCustomFields","useMemo","props","AnnualGrossSalary","values","field","offerEquity","equityCost","EquityPriceDetails","effectiveContractDetailsJsonSchemaVersion","getContractDetailsSchemaVersion","contractDetailsForm","benefitOffersSchema","useBenefitOffersSchema","initialValuesBenefitOffers","benefitsFormValues","mergeWith","stepFields","stepFieldsWithFlatFieldsets","country","employmentBasicInformation","employmentContractDetails","employmentCountryCode","selectCountryInitialValues","getInitialValues","basicInformationInitialValues","initialValues","contractDetailsInitialValues","benefitsInitialValues","enableAckFields","useEffect","prettifyFormValues","parseFormValues","parseJSFToValidate","onSubmit","parsedValues","isEmploymentNotLoaded","hasChangedCountry","payload","response","error","back","next","goTo"]}
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-FKYEST54.js";import{b as m}from"./chunk-76ZDXC2T.js";import{j as i}from"./chunk-3PIJOIYR.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function l({onSubmit:c,onSuccess:p,onError:t}){let{createCompanyBag:o}=m(),u=a(async r=>{try{await c?.({countryCode:r.country_code,companyOwnerEmail:r.company_owner_email,companyOwnerName:r.company_owner_name,desiredCurrency:r.desired_currency,name:r.name,phoneNumber:r.phone_number,taxNumber:r.tax_number});let n=await o.onSubmit(r);if(n?.data){await p?.(n?.data),o?.next();return}if(n?.error){let e=i(n,o.meta?.fields?.company_basic_information);t?.(e)}}catch(n){let e=i(n,o.meta?.fields?.company_basic_information);t?.(e)}},"handleSubmit"),f=o.stepState.values?.company_basic_information||o.initialValues.company_basic_information;return d(s,{defaultValues:f,onSubmit:u})}a(l,"CompanyBasicInformationStep");export{l as a};
2
- //# sourceMappingURL=chunk-BIDZO7XH.js.map
1
+ import{a as s}from"./chunk-PHPCCABU.js";import{b as m}from"./chunk-76ZDXC2T.js";import{k as i}from"./chunk-VIGKOVHP.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function l({onSubmit:c,onSuccess:p,onError:t}){let{createCompanyBag:o}=m(),u=a(async r=>{try{await c?.({countryCode:r.country_code,companyOwnerEmail:r.company_owner_email,companyOwnerName:r.company_owner_name,desiredCurrency:r.desired_currency,name:r.name,phoneNumber:r.phone_number,taxNumber:r.tax_number});let n=await o.onSubmit(r);if(n?.data){await p?.(n?.data),o?.next();return}if(n?.error){let e=i(n,o.meta?.fields?.company_basic_information);t?.(e)}}catch(n){let e=i(n,o.meta?.fields?.company_basic_information);t?.(e)}},"handleSubmit"),f=o.stepState.values?.company_basic_information||o.initialValues.company_basic_information;return d(s,{defaultValues:f,onSubmit:u})}a(l,"CompanyBasicInformationStep");export{l as a};
2
+ //# sourceMappingURL=chunk-62O3CKKH.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-3PIJOIYR.js";import{a}from"./chunk-P37U34EQ.js";import*as l from"@radix-ui/react-collapsible";var d=l.Root,g=l.CollapsibleTrigger,v=l.CollapsibleContent;import*as i from"@radix-ui/react-tabs";import{jsx as n}from"react/jsx-runtime";function u({className:o,...e}){return n(i.Root,{"data-slot":"tabs",className:t("flex flex-col gap-2",o),...e})}a(u,"Tabs");function C({className:o,...e}){return n(i.List,{"data-slot":"tabs-list",className:t("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1",o),...e})}a(C,"TabsList");function x({className:o,...e}){return n(i.Trigger,{"data-slot":"tabs-trigger",className:t("data-[state=active]:bg-background data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),...e})}a(x,"TabsTrigger");function T({className:o,...e}){return n(i.Content,{"data-slot":"tabs-content",className:t("flex-1 outline-none",o),...e})}a(T,"TabsContent");import*as p from"react";import*as r from"@radix-ui/react-scroll-area";import{jsx as s,jsxs as P}from"react/jsx-runtime";var f=p.forwardRef(({className:o,children:e,...c},m)=>P(r.Root,{ref:m,className:t("relative overflow-hidden",o),...c,children:[s(r.Viewport,{className:"h-full w-full rounded-[inherit]",children:e}),s(b,{}),s(r.Corner,{})]}));f.displayName=r.Root.displayName;var b=p.forwardRef(({className:o,orientation:e="vertical",...c},m)=>s(r.ScrollAreaScrollbar,{ref:m,orientation:e,className:t("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",o),...c,children:s(r.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));b.displayName=r.ScrollAreaScrollbar.displayName;export{d as a,g as b,v as c,u as d,C as e,x as f,T as g,f as h};
2
- //# sourceMappingURL=chunk-ZIXR3VSB.js.map
1
+ import{a as t}from"./chunk-VIGKOVHP.js";import{a}from"./chunk-P37U34EQ.js";import*as l from"@radix-ui/react-collapsible";var d=l.Root,g=l.CollapsibleTrigger,v=l.CollapsibleContent;import*as i from"@radix-ui/react-tabs";import{jsx as n}from"react/jsx-runtime";function u({className:o,...e}){return n(i.Root,{"data-slot":"tabs",className:t("flex flex-col gap-2",o),...e})}a(u,"Tabs");function C({className:o,...e}){return n(i.List,{"data-slot":"tabs-list",className:t("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1",o),...e})}a(C,"TabsList");function x({className:o,...e}){return n(i.Trigger,{"data-slot":"tabs-trigger",className:t("data-[state=active]:bg-background data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),...e})}a(x,"TabsTrigger");function T({className:o,...e}){return n(i.Content,{"data-slot":"tabs-content",className:t("flex-1 outline-none",o),...e})}a(T,"TabsContent");import*as p from"react";import*as r from"@radix-ui/react-scroll-area";import{jsx as s,jsxs as P}from"react/jsx-runtime";var f=p.forwardRef(({className:o,children:e,...c},m)=>P(r.Root,{ref:m,className:t("relative overflow-hidden",o),...c,children:[s(r.Viewport,{className:"h-full w-full rounded-[inherit]",children:e}),s(b,{}),s(r.Corner,{})]}));f.displayName=r.Root.displayName;var b=p.forwardRef(({className:o,orientation:e="vertical",...c},m)=>s(r.ScrollAreaScrollbar,{ref:m,orientation:e,className:t("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",o),...c,children:s(r.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));b.displayName=r.ScrollAreaScrollbar.displayName;export{d as a,g as b,v as c,u as d,C as e,x as f,T as g,f as h};
2
+ //# sourceMappingURL=chunk-6AAV34CT.js.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-KRJETP7I.js";import{a}from"./chunk-XLTZ7SN3.js";import{a as i}from"./chunk-W7YC2IO2.js";import{a as c}from"./chunk-Z7WBY27D.js";import{a as S}from"./chunk-YIMWF5GR.js";import{a as f}from"./chunk-RFMIAO6J.js";import{a as n}from"./chunk-I2ED6EUG.js";import{a as p}from"./chunk-D36BZQTP.js";import{a as s}from"./chunk-HN7ZP5AX.js";import{c as e}from"./chunk-AJ7L3ZO3.js";import{a as r}from"./chunk-PGWKJ6FK.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-PQP3KZ7P.js.map
1
+ import{a}from"./chunk-OENTT2KT.js";import{a as i}from"./chunk-W7YC2IO2.js";import{a as c}from"./chunk-Z7WBY27D.js";import{a as S}from"./chunk-YIMWF5GR.js";import{a as f}from"./chunk-EDLQ3JNY.js";import{a as n}from"./chunk-YWZHBXEI.js";import{a as p}from"./chunk-LVXV3GHT.js";import{a as s}from"./chunk-TPGN6QTL.js";import{a as m}from"./chunk-KRJETP7I.js";import{c as e}from"./chunk-5FTC6HMG.js";import{a as r}from"./chunk-PGWKJ6FK.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-6MAQMAY5.js.map
@@ -1,2 +1,2 @@
1
- import{b as i,c as m,d as s,e as f}from"./chunk-Z4STVEJE.js";import{a as n}from"./chunk-TXSUZLOI.js";import{a}from"./chunk-P37U34EQ.js";import{useState as O}from"react";var B=a(({proposedTerminationDate:e,employeeName:y,employmentId:o,employment:r,render:d})=>{let[t,u]=O(!1),l=m({employmentId:o}),p=n(e).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),c=i({employmentId:o,options:{enabled:t}}),D=s({employmentId:o,date:e}),P=f({employmentId:o,proposedTerminationDate:e,employment:r});return d({leavePoliciesSummaryQuery:l,timeoffQuery:c||{data:{bookedDays:0,timeoffs:[]}},bookedTimeBeforeAndAfterTerminationQuery:D,formattedProposedTerminationDate:p,employeeName:y,proposedTerminationDate:e,summaryData:P??{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:t,onOpenChange:a(()=>{u(T=>!T)},"onOpenChange")})},"PaidTimeOffContainer");export{B as a};
2
- //# sourceMappingURL=chunk-H463PCBN.js.map
1
+ import{b as i,c as m,d as s,e as f}from"./chunk-4HPV2VMI.js";import{a as n}from"./chunk-TXSUZLOI.js";import{a}from"./chunk-P37U34EQ.js";import{useState as O}from"react";var B=a(({proposedTerminationDate:e,employeeName:y,employmentId:o,employment:r,render:d})=>{let[t,u]=O(!1),l=m({employmentId:o}),p=n(e).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),c=i({employmentId:o,options:{enabled:t}}),D=s({employmentId:o,date:e}),P=f({employmentId:o,proposedTerminationDate:e,employment:r});return d({leavePoliciesSummaryQuery:l,timeoffQuery:c||{data:{bookedDays:0,timeoffs:[]}},bookedTimeBeforeAndAfterTerminationQuery:D,formattedProposedTerminationDate:p,employeeName:y,proposedTerminationDate:e,summaryData:P??{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:t,onOpenChange:a(()=>{u(T=>!T)},"onOpenChange")})},"PaidTimeOffContainer");export{B as a};
2
+ //# sourceMappingURL=chunk-6SSDV2GX.js.map
@@ -0,0 +1,6 @@
1
+ import{a as t}from"./chunk-P37U34EQ.js";var N=t((e,r,o)=>{typeof o=="string"||o instanceof Blob?e.append(r,o):o instanceof Date?e.append(r,o.toISOString()):e.append(r,JSON.stringify(o))},"serializeFormDataPair");var B={bodySerializer:t(e=>{let r=new FormData;return Object.entries(e).forEach(([o,a])=>{a!=null&&(Array.isArray(a)?a.forEach(i=>N(r,o,i)):N(r,o,a))}),r},"bodySerializer")},j={bodySerializer:t(e=>JSON.stringify(e,(r,o)=>typeof o=="bigint"?o.toString():o),"bodySerializer")};var Q=t(({onRequest:e,onSseError:r,onSseEvent:o,responseTransformer:a,responseValidator:i,sseDefaultRetryDelay:h,sseMaxRetryAttempts:c,sseMaxRetryDelay:p,sseSleepFn:l,url:d,...s})=>{let E,g=l??(m=>new Promise(C=>setTimeout(C,m)));return{stream:t(async function*(){let m=h??3e3,C=0,T=s.signal??new AbortController().signal;for(;!T.aborted;){C++;let D=s.headers instanceof Headers?s.headers:new Headers(s.headers);E!==void 0&&D.set("Last-Event-ID",E);try{let x={redirect:"follow",...s,body:s.serializedBody,headers:D,signal:T},O=new Request(d,x);e&&(O=await e(d,x));let u=await(s.fetch??globalThis.fetch)(O);if(!u.ok)throw new Error(`SSE failed: ${u.status} ${u.statusText}`);if(!u.body)throw new Error("No body in SSE response");let w=u.body.pipeThrough(new TextDecoderStream).getReader(),A="",W=t(()=>{try{w.cancel()}catch{}},"abortHandler");T.addEventListener("abort",W);try{for(;;){let{done:te,value:re}=await w.read();if(te)break;A+=re;let F=A.split(`
2
+
3
+ `);A=F.pop()??"";for(let oe of F){let ne=oe.split(`
4
+ `),v=[],V;for(let b of ne)if(b.startsWith("data:"))v.push(b.replace(/^data:\s*/,""));else if(b.startsWith("event:"))V=b.replace(/^event:\s*/,"");else if(b.startsWith("id:"))E=b.replace(/^id:\s*/,"");else if(b.startsWith("retry:")){let H=Number.parseInt(b.replace(/^retry:\s*/,""),10);Number.isNaN(H)||(m=H)}let P,M=!1;if(v.length){let b=v.join(`
5
+ `);try{P=JSON.parse(b),M=!0}catch{P=b}}M&&(i&&await i(P),a&&(P=await a(P))),o?.({data:P,event:V,id:E,retry:m}),v.length&&(yield P)}}}finally{T.removeEventListener("abort",W),w.releaseLock()}break}catch(x){if(r?.(x),c!==void 0&&C>=c)break;let O=Math.min(m*2**(C-1),p??3e4);await g(O)}}},"createStream")()}},"createSseClient");var se=t(e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},"separatorArrayExplode"),ae=t(e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},"separatorArrayNoExplode"),ie=t(e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},"separatorObjectExplode"),k=t(({allowReserved:e,explode:r,name:o,style:a,value:i})=>{if(!r){let p=(e?i:i.map(l=>encodeURIComponent(l))).join(ae(a));switch(a){case"label":return`.${p}`;case"matrix":return`;${o}=${p}`;case"simple":return p;default:return`${o}=${p}`}}let h=se(a),c=i.map(p=>a==="label"||a==="simple"?e?p:encodeURIComponent(p):R({allowReserved:e,name:o,value:p})).join(h);return a==="label"||a==="matrix"?h+c:c},"serializeArrayParam"),R=t(({allowReserved:e,name:r,value:o})=>{if(o==null)return"";if(typeof o=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?o:encodeURIComponent(o)}`},"serializePrimitiveParam"),U=t(({allowReserved:e,explode:r,name:o,style:a,value:i,valueOnly:h})=>{if(i instanceof Date)return h?i.toISOString():`${o}=${i.toISOString()}`;if(a!=="deepObject"&&!r){let l=[];Object.entries(i).forEach(([s,E])=>{l=[...l,s,e?E:encodeURIComponent(E)]});let d=l.join(",");switch(a){case"form":return`${o}=${d}`;case"label":return`.${d}`;case"matrix":return`;${o}=${d}`;default:return d}}let c=ie(a),p=Object.entries(i).map(([l,d])=>R({allowReserved:e,name:a==="deepObject"?`${o}[${l}]`:l,value:d})).join(c);return a==="label"||a==="matrix"?c+p:p},"serializeObjectParam");var pe=/\{[^{}]+\}/g,ce=t(({path:e,url:r})=>{let o=r,a=r.match(pe);if(a)for(let i of a){let h=!1,c=i.substring(1,i.length-1),p="simple";c.endsWith("*")&&(h=!0,c=c.substring(0,c.length-1)),c.startsWith(".")?(c=c.substring(1),p="label"):c.startsWith(";")&&(c=c.substring(1),p="matrix");let l=e[c];if(l==null)continue;if(Array.isArray(l)){o=o.replace(i,k({explode:h,name:c,style:p,value:l}));continue}if(typeof l=="object"){o=o.replace(i,U({explode:h,name:c,style:p,value:l,valueOnly:!0}));continue}if(p==="matrix"){o=o.replace(i,`;${R({name:c,value:l})}`);continue}let d=encodeURIComponent(p==="label"?`.${l}`:l);o=o.replace(i,d)}return o},"defaultPathSerializer"),$=t(({baseUrl:e,path:r,query:o,querySerializer:a,url:i})=>{let h=i.startsWith("/")?i:`/${i}`,c=(e??"")+h;r&&(c=ce({path:r,url:c}));let p=o?a(o):"";return p.startsWith("?")&&(p=p.substring(1)),p&&(c+=`?${p}`),c},"getUrl");function J(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}t(J,"getValidRequestBody");var K=t(async(e,r)=>{let o=typeof r=="function"?await r(e):r;if(o)return e.scheme==="bearer"?`Bearer ${o}`:e.scheme==="basic"?`Basic ${btoa(o)}`:o},"getAuthToken");var X=t(({parameters:e={},...r}={})=>t(a=>{let i=[];if(a&&typeof a=="object")for(let h in a){let c=a[h];if(c==null)continue;let p=e[h]||r;if(Array.isArray(c)){let l=k({allowReserved:p.allowReserved,explode:!0,name:h,style:"form",value:c,...p.array});l&&i.push(l)}else if(typeof c=="object"){let l=U({allowReserved:p.allowReserved,explode:!0,name:h,style:"deepObject",value:c,...p.object});l&&i.push(l)}else{let l=R({allowReserved:p.allowReserved,name:h,value:c});l&&i.push(l)}}return i.join("&")},"querySerializer"),"createQuerySerializer"),Y=t(e=>{if(!e)return"stream";let r=e.split(";")[0]?.trim();if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(o=>r.startsWith(o)))return"blob";if(r.startsWith("text/"))return"text"}},"getParseAs"),le=t((e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1,"checkForExistence"),Z=t(async({security:e,...r})=>{for(let o of e){if(le(r,o.name))continue;let a=await K(o,r.auth);if(!a)continue;let i=o.name??"Authorization";switch(o.in){case"query":r.query||(r.query={}),r.query[i]=a;break;case"cookie":r.headers.append("Cookie",`${i}=${a}`);break;case"header":default:r.headers.set(i,a);break}}},"setAuthParams"),z=t(e=>$({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),"buildUrl"),_=t((e,r)=>{let o={...e,...r};return o.baseUrl?.endsWith("/")&&(o.baseUrl=o.baseUrl.substring(0,o.baseUrl.length-1)),o.headers=q(e.headers,r.headers),o},"mergeConfigs"),he=t(e=>{let r=[];return e.forEach((o,a)=>{r.push([a,o])}),r},"headersEntries"),q=t((...e)=>{let r=new Headers;for(let o of e){if(!o)continue;let a=o instanceof Headers?he(o):Object.entries(o);for(let[i,h]of a)if(h===null)r.delete(i);else if(Array.isArray(h))for(let c of h)r.append(i,c);else h!==void 0&&r.set(i,typeof h=="object"?JSON.stringify(h):h)}return r},"mergeHeaders"),G=class{static{t(this,"Interceptors")}fns=[];clear(){this.fns=[]}eject(r){let o=this.getInterceptorIndex(r);this.fns[o]&&(this.fns[o]=null)}exists(r){let o=this.getInterceptorIndex(r);return!!this.fns[o]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,o){let a=this.getInterceptorIndex(r);return this.fns[a]?(this.fns[a]=o,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=t(()=>({error:new G,request:new G,response:new G}),"createInterceptors"),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),de={"Content-Type":"application/json"},S=t((e={})=>({...j,headers:de,parseAs:"auto",querySerializer:me,...e}),"createConfig");var L=t((e={})=>{let r=_(S(),e),o=t(()=>({...r}),"getConfig"),a=t(d=>(r=_(r,d),o()),"setConfig"),i=ee(),h=t(async d=>{let s={...r,...d,fetch:d.fetch??r.fetch??globalThis.fetch,headers:q(r.headers,d.headers),serializedBody:void 0};s.security&&await Z({...s,security:s.security}),s.requestValidator&&await s.requestValidator(s),s.body!==void 0&&s.bodySerializer&&(s.serializedBody=s.bodySerializer(s.body)),(s.body===void 0||s.serializedBody==="")&&s.headers.delete("Content-Type");let E=z(s);return{opts:s,url:E}},"beforeRequest"),c=t(async d=>{let{opts:s,url:E}=await h(d),g={redirect:"follow",...s,body:J(s)},f=new Request(E,g);for(let y of i.request.fns)y&&(f=await y(f,s));let I=s.fetch,m;try{m=await I(f)}catch(y){let u=y;for(let w of i.error.fns)w&&(u=await w(y,void 0,f,s));if(u=u||{},s.throwOnError)throw u;return s.responseStyle==="data"?void 0:{error:u,request:f,response:void 0}}for(let y of i.response.fns)y&&(m=await y(m,f,s));let C={request:f,response:m};if(m.ok){let y=(s.parseAs==="auto"?Y(m.headers.get("Content-Type")):s.parseAs)??"json";if(m.status===204||m.headers.get("Content-Length")==="0"){let w;switch(y){case"arrayBuffer":case"blob":case"text":w=await m[y]();break;case"formData":w=new FormData;break;case"stream":w=m.body;break;case"json":default:w={};break}return s.responseStyle==="data"?w:{data:w,...C}}let u;switch(y){case"arrayBuffer":case"blob":case"formData":case"json":case"text":u=await m[y]();break;case"stream":return s.responseStyle==="data"?m.body:{data:m.body,...C}}return y==="json"&&(s.responseValidator&&await s.responseValidator(u),s.responseTransformer&&(u=await s.responseTransformer(u))),s.responseStyle==="data"?u:{data:u,...C}}let T=await m.text(),D;try{D=JSON.parse(T)}catch{}let x=D??T,O=x;for(let y of i.error.fns)y&&(O=await y(x,m,f,s));if(O=O||{},s.throwOnError)throw O;return s.responseStyle==="data"?void 0:{error:O,...C}},"request"),p=t(d=>s=>c({...s,method:d}),"makeMethodFn"),l=t(d=>async s=>{let{opts:E,url:g}=await h(s);return Q({...E,body:E.body,headers:E.headers,method:d,onRequest:t(async(f,I)=>{let m=new Request(f,I);for(let C of i.request.fns)C&&(m=await C(m,E));return m},"onRequest"),url:g})},"makeSseFn");return{buildUrl:z,connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),getConfig:o,head:p("HEAD"),interceptors:i,options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),request:c,setConfig:a,sse:{connect:l("CONNECT"),delete:l("DELETE"),get:l("GET"),head:l("HEAD"),options:l("OPTIONS"),patch:l("PATCH"),post:l("POST"),put:l("PUT"),trace:l("TRACE")},trace:p("TRACE")}},"createClient");var n=L(S({baseUrl:"https://gateway.remote.com/"}));var He=t(e=>(e?.client??n).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/offboardings",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateOffboarding");var Ne=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cancel-onboarding/{employment_id}",...e}),"postUpdateCancelOnboarding"),Qe=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments/schema",...e}),"getShowContractAmendmentSchema");var $e=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/companies/{company_id}/pricing-plans",...e}),"getIndexCompanyPricingPlan");var Je=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/currency-converter/raw",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postConvertRawCurrencyConverter"),Ke=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/countries/{country_code}/contractor-contract-details",...e}),"getShowContractorContractDetailsCountry");var Xe=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateEmployment2"),Ye=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/help-center-articles/{id}",...e}),"getShowHelpCenterArticle");var Ze=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/sdk/telemetry-errors",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postReportErrorsTelemetry");var et=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/estimation",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateEstimation");var tt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers",...e}),"getIndexBenefitOffer"),rt=t(e=>(e.client??n).put({security:[{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers",...e,headers:{"Content-Type":"application/json",...e.headers}}),"putUpdateBenefitOffer");var ot=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contractor-subscriptions",...e}),"getIndexSubscription");var nt=t(e=>(e?.client??n).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/payroll-calendars",...e}),"getIndexEorPayrollCalendar");var st=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contract-documents/{id}",...e}),"getShowContractDocument"),at=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/contract-documents",...e}),"getIndexEmploymentContractDocument");var it=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contractor-currencies",...e}),"getIndexContractorCurrency");var pt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/magic-link",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postGenerateMagicLink");var ct=t(e=>(e?.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/estimation-pdf",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateEstimationPdf");var lt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/risk-reserve",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateRiskReserve");var ht=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/companies/{company_id}",...e}),"getShowCompany"),mt=t(e=>(e.client??n).patch({security:[{scheme:"bearer",type:"http"}],url:"/v1/companies/{company_id}",...e,headers:{"Content-Type":"application/json",...e.headers}}),"patchUpdateCompany2");var dt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateContractAmendment");var yt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/countries/{country_code}/{form}",...e}),"getShowFormCountry"),ut=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/files/{id}",...e}),"getShowFile");var Et=t(e=>(e?.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/countries",...e}),"getIndexCountry");var Ct=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/leave-policies/summary/{employment_id}",...e}),"getIndexLeavePoliciesSummary");var wt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers/schema",...e}),"getShowSchema"),ft=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/eligibility-questionnaire",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateEligibilityQuestionnaire");var bt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}",...e}),"getShowEmployment"),Ot=t(e=>(e.client??n).patch({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}",...e,headers:{"Content-Type":"application/json",...e.headers}}),"patchUpdateEmployment2");var Tt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/regions/{slug}/fields",...e}),"getShowRegionField");var xt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/contract-eligibility",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateContractEligibility"),Pt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/countries",...e}),"getSupportedCountry");var Rt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/companies/{company_id}/legal-entities",...e}),"getIndexCompanyLegalEntities");var gt=t(e=>(e?.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/estimation-csv",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateEstimationCsv"),Dt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contract-documents",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateContractDocument");var Gt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/currency-converter/effective",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postConvertWithSpreadCurrencyConverter");var St=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments/automatable",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postAutomatableContractAmendment");var It=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/files",...e}),"getIndexEmploymentFile");var vt=t(e=>(e?.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/company-currencies",...e}),"getIndexCompanyCurrency");var kt=t(e=>(e.client??n).post({...B,security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/documents",...e,headers:{"Content-Type":null,...e.headers}}),"postUploadEmployeeFileFile"),Ut=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/invite",...e}),"postInviteEmploymentInvitation");var qt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postSignContractDocument"),At=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/identity/current",...e}),"getCurrentIdentity");var Bt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/schemas/eligibility-questionnaire",...e}),"getShowEligibilityQuestionnaire");var jt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contractor-plus-subscription",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postManageContractorPlusSubscriptionSubscription"),zt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/timeoff",...e}),"getIndexTimeoff");var _t=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/companies",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateCompany");var Lt=t(e=>(e.client??n).delete({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contractor-cor-subscription",...e}),"deleteDeleteContractorCorSubscriptionSubscription"),Wt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contractor-cor-subscription",...e}),"postManageContractorCorSubscriptionSubscription");export{L as a,n as b,He as c,Ne as d,Qe as e,$e as f,Je as g,Ke as h,Xe as i,Ye as j,Ze as k,et as l,tt as m,rt as n,ot as o,nt as p,st as q,at as r,it as s,pt as t,ct as u,lt as v,ht as w,mt as x,dt as y,yt as z,ut as A,Et as B,Ct as C,wt as D,ft as E,bt as F,Ot as G,Tt as H,xt as I,Pt as J,Rt as K,gt as L,Dt as M,Gt as N,St as O,It as P,vt as Q,kt as R,Ut as S,qt as T,At as U,Bt as V,jt as W,zt as X,_t as Y,Lt as Z,Wt as _};
6
+ //# sourceMappingURL=chunk-7ENB7H4E.js.map