@remoteoss/remote-flows 1.9.0 → 1.11.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 (442) hide show
  1. package/dist/ButtonDefault-W7RPNNTH.js +2 -0
  2. package/dist/CheckboxFieldDefault-JXZ6UY5T.js +2 -0
  3. package/dist/CountryFieldDefault-V7LUYGQV.js +2 -0
  4. package/dist/DatePickerFieldDefault-OMSU42DG.js +2 -0
  5. package/dist/DrawerDefault-V3GEL6Z5.js +2 -0
  6. package/dist/EmailFieldDefault-A3D5VQPS.js +2 -0
  7. package/dist/FieldsetToggleButtonDefault-BKIDTISL.js +2 -0
  8. package/dist/FileUploadFieldDefault-OQ4FGPDM.js +2 -0
  9. package/dist/MultiSelectFieldDefault-EZA25KXD.js +2 -0
  10. package/dist/NumberFieldDefault-BDSRZWXH.js +2 -0
  11. package/dist/PDFPreviewDefault-TV775MOQ.js +2 -0
  12. package/dist/RadioGroupFieldDefault-4IA7HESJ.js +2 -0
  13. package/dist/SelectFieldDefault-3XQ5FPO2.js +2 -0
  14. package/dist/StatementDefault-CCLTSJLJ.js +2 -0
  15. package/dist/TableFieldDefault-ADKV3M23.js +2 -0
  16. package/dist/TextAreaFieldDefault-LVZXGUKB.js +2 -0
  17. package/dist/TextFieldDefault-YQMWGOV2.js +2 -0
  18. package/dist/WorkScheduleFieldDefault-IW4VDBCH.js +2 -0
  19. package/dist/ZendeskDrawerDefault-DKSZSN6N.js +2 -0
  20. package/dist/{chunk-VC6X3C2I.js → chunk-2O6Z2KGG.js} +2 -2
  21. package/dist/{chunk-JKEUTGPQ.js → chunk-2Q57B73D.js} +2 -2
  22. package/dist/{chunk-6ZEZZZFB.js → chunk-2RBFD5MM.js} +2 -2
  23. package/dist/{chunk-ML56EPFW.js → chunk-2YNDS45E.js} +2 -2
  24. package/dist/{chunk-VKYP2MQQ.js → chunk-3JQROVRG.js} +2 -2
  25. package/dist/chunk-3KD533T6.js +2 -0
  26. package/dist/chunk-3KD533T6.js.map +1 -0
  27. package/dist/{chunk-HBPFTEHZ.js → chunk-3LZR4D3V.js} +2 -2
  28. package/dist/{chunk-EW36MHXP.js → chunk-43RCLG2R.js} +2 -2
  29. package/dist/{chunk-SBQYUJFI.js → chunk-4APMRCE7.js} +2 -2
  30. package/dist/{chunk-FJZPATKO.js → chunk-4ECYU3L5.js} +2 -2
  31. package/dist/chunk-4ECYU3L5.js.map +1 -0
  32. package/dist/{chunk-3UJC7KHD.js → chunk-4JIHEEKX.js} +2 -2
  33. package/dist/{chunk-7SYE5KEV.js → chunk-4V6AV3DC.js} +2 -2
  34. package/dist/{chunk-VIQQ3IHI.js → chunk-4XJEVGPI.js} +2 -2
  35. package/dist/{chunk-D4FBB5XW.js → chunk-4XV4INW5.js} +2 -2
  36. package/dist/{chunk-IEXTH6YO.js → chunk-4YAFRXR5.js} +2 -2
  37. package/dist/{chunk-I6Y6AWYE.js → chunk-55QKFWY5.js} +2 -2
  38. package/dist/{chunk-BJJTAQPT.js → chunk-5FUJICAO.js} +2 -2
  39. package/dist/{chunk-SVYPDGZN.js → chunk-5PVNZ6VO.js} +2 -2
  40. package/dist/{chunk-3UAJX23Y.js → chunk-64D4GLTO.js} +2 -2
  41. package/dist/chunk-6AXMBMQI.js +2 -0
  42. package/dist/chunk-6AXMBMQI.js.map +1 -0
  43. package/dist/{chunk-FJPY27YJ.js → chunk-6MJ5MIUI.js} +2 -2
  44. package/dist/{chunk-7QP5TRMH.js → chunk-6SVKW2DC.js} +2 -2
  45. package/dist/{chunk-XIEA775Q.js → chunk-7EMWT6EU.js} +2 -2
  46. package/dist/{chunk-CEHS4AFO.js → chunk-7G4JI6ZU.js} +2 -2
  47. package/dist/{chunk-WHROCBHG.js → chunk-7V3YVPIK.js} +2 -2
  48. package/dist/{chunk-C4NXXY3X.js → chunk-A3TXUJUO.js} +2 -2
  49. package/dist/{chunk-PGRQG254.js → chunk-AU376LE2.js} +2 -2
  50. package/dist/chunk-BDJLITVT.js +2 -0
  51. package/dist/chunk-BDJLITVT.js.map +1 -0
  52. package/dist/chunk-BHXCYFC4.js +2 -0
  53. package/dist/chunk-BHXCYFC4.js.map +1 -0
  54. package/dist/{chunk-NCELDZXG.js → chunk-C36DEJTU.js} +2 -2
  55. package/dist/{chunk-7QRAEME3.js → chunk-CCE3EAVC.js} +2 -2
  56. package/dist/{chunk-F2VYTYIQ.js → chunk-CMFZEZEK.js} +2 -2
  57. package/dist/{chunk-ZOPKBLGA.js → chunk-DAE2FMZ5.js} +2 -2
  58. package/dist/{chunk-CWQQA3P4.js → chunk-E7JOGKEV.js} +2 -2
  59. package/dist/{chunk-JQ2ESL5O.js → chunk-EGDWVDXM.js} +2 -2
  60. package/dist/{chunk-AN5U7FWW.js → chunk-ERPXDFKC.js} +2 -2
  61. package/dist/{chunk-UMOL4GLZ.js → chunk-FC2V3NUT.js} +2 -2
  62. package/dist/{chunk-5G5UBS6W.js → chunk-FUPQCC4B.js} +2 -2
  63. package/dist/{chunk-GLNDB4KG.js → chunk-G6BR4JI6.js} +2 -2
  64. package/dist/{chunk-CNCOVTDL.js → chunk-GINFFWVY.js} +2 -2
  65. package/dist/{chunk-DG34PSAO.js → chunk-GK3QRXNY.js} +2 -2
  66. package/dist/{chunk-XSG4QXPY.js → chunk-GOEEA34E.js} +2 -2
  67. package/dist/{chunk-WT6E5LO4.js → chunk-GRWTCP42.js} +2 -2
  68. package/dist/{chunk-KXF27FC4.js → chunk-GTJMTF2R.js} +2 -2
  69. package/dist/{chunk-MZNUCWQU.js → chunk-GWR2JBG2.js} +2 -2
  70. package/dist/chunk-GZ2JKPBY.js +2 -0
  71. package/dist/chunk-GZ2JKPBY.js.map +1 -0
  72. package/dist/chunk-H5CNWMEM.js +2 -0
  73. package/dist/{chunk-3QNS3IZB.js.map → chunk-H5CNWMEM.js.map} +1 -1
  74. package/dist/{chunk-ZNV46UUP.js → chunk-H5LGAIMM.js} +2 -2
  75. package/dist/{chunk-ZTBFYRNL.js → chunk-HYVK643F.js} +2 -2
  76. package/dist/{chunk-OZWDFGLQ.js → chunk-I3KFOOF6.js} +2 -2
  77. package/dist/{chunk-YMLXE6OO.js → chunk-IVUCPXEC.js} +2 -2
  78. package/dist/chunk-J63QA2JC.js +2 -0
  79. package/dist/chunk-J63QA2JC.js.map +1 -0
  80. package/dist/{chunk-THPH57GK.js → chunk-JAHRIQVL.js} +2 -2
  81. package/dist/{chunk-HLSVMRWX.js → chunk-JZWOMKR3.js} +2 -2
  82. package/dist/{chunk-YHD2RXJC.js → chunk-KESYJ5QG.js} +2 -2
  83. package/dist/{chunk-S6OVT37M.js → chunk-KFWZDRDD.js} +2 -2
  84. package/dist/chunk-KXOVDXNX.js +2 -0
  85. package/dist/chunk-KXOVDXNX.js.map +1 -0
  86. package/dist/{chunk-CKA37AR5.js → chunk-L53XOWY6.js} +2 -2
  87. package/dist/{chunk-UXUZA7XH.js → chunk-LGIHVJA5.js} +2 -2
  88. package/dist/{chunk-JTSHX4RB.js → chunk-MIK6GCO2.js} +2 -2
  89. package/dist/{chunk-4JOZ4VIJ.js → chunk-N6XY7NC3.js} +2 -2
  90. package/dist/{chunk-MM5K3XXY.js → chunk-NB3TN7O3.js} +2 -2
  91. package/dist/{chunk-ILX4QHHH.js → chunk-NIQXQZ6X.js} +2 -2
  92. package/dist/{chunk-COAGOVMZ.js → chunk-NVX4O45S.js} +2 -2
  93. package/dist/chunk-O3G6HQ3B.js +2 -0
  94. package/dist/chunk-O3G6HQ3B.js.map +1 -0
  95. package/dist/{chunk-5XHL6B25.js → chunk-PJ6ZEFWD.js} +5 -5
  96. package/dist/chunk-PJ6ZEFWD.js.map +1 -0
  97. package/dist/{chunk-VLP6L77E.js → chunk-PKXMKBP4.js} +2 -2
  98. package/dist/{chunk-A54D24NT.js → chunk-PV7FROZ7.js} +2 -2
  99. package/dist/chunk-Q445EJX6.js +2 -0
  100. package/dist/chunk-Q445EJX6.js.map +1 -0
  101. package/dist/{chunk-TZPHBNNS.js → chunk-QE76JNNE.js} +2 -2
  102. package/dist/{chunk-GBETAH3G.js → chunk-QLB4FSLX.js} +2 -2
  103. package/dist/{chunk-YUQ3GDQI.js → chunk-QPJFFMXN.js} +2 -2
  104. package/dist/{chunk-IG5LQPUN.js → chunk-QSOCKFUS.js} +2 -2
  105. package/dist/{chunk-YHIADGM3.js → chunk-RBJ5MFDE.js} +2 -2
  106. package/dist/{chunk-FJLSVTBJ.js → chunk-SBUJLXJH.js} +2 -2
  107. package/dist/{chunk-P45OX5YT.js → chunk-SIP2BFZJ.js} +2 -2
  108. package/dist/chunk-STF3NTPS.js +2 -0
  109. package/dist/chunk-STF3NTPS.js.map +1 -0
  110. package/dist/{chunk-IPITD7UK.js → chunk-SUWJZ3QR.js} +2 -2
  111. package/dist/chunk-TCLY24DF.js +2 -0
  112. package/dist/chunk-TCLY24DF.js.map +1 -0
  113. package/dist/{chunk-XQUHG7HJ.js → chunk-THBDZR3D.js} +2 -2
  114. package/dist/{chunk-3JJEKIQ2.js → chunk-TXVEFBFM.js} +2 -2
  115. package/dist/{chunk-G5DVMK4E.js → chunk-U7MQPLGK.js} +2 -2
  116. package/dist/{chunk-2SN7VPBR.js → chunk-U7PGN7TL.js} +2 -2
  117. package/dist/{chunk-EYHFPHIA.js → chunk-UAACHXXX.js} +2 -2
  118. package/dist/{chunk-WTQ6PTMB.js → chunk-UFTA5ATE.js} +2 -2
  119. package/dist/{chunk-FLW5LACO.js → chunk-UNBAXL4W.js} +2 -2
  120. package/dist/chunk-UYUPSPOE.js +1 -0
  121. package/dist/chunk-VH4D3E42.js +2 -0
  122. package/dist/chunk-VH4D3E42.js.map +1 -0
  123. package/dist/{chunk-DWTKSHQJ.js → chunk-VNN6IP6P.js} +2 -2
  124. package/dist/chunk-WOW74M7R.js +2 -0
  125. package/dist/chunk-WOW74M7R.js.map +1 -0
  126. package/dist/{chunk-OVTH3ZHO.js → chunk-WQSCAHR6.js} +2 -2
  127. package/dist/{chunk-JIZKHO7L.js → chunk-XDILBY5Y.js} +2 -2
  128. package/dist/{chunk-H5VA2OWQ.js → chunk-XJDX3ZH6.js} +2 -2
  129. package/dist/{chunk-LDJW2CBF.js → chunk-XJILW6K3.js} +2 -2
  130. package/dist/{chunk-XDZFLJ5F.js → chunk-XNRPT3WP.js} +2 -2
  131. package/dist/{chunk-IEX4KZUY.js → chunk-XSNWW3V4.js} +2 -2
  132. package/dist/{chunk-CKTFJUGZ.js → chunk-XSUQM562.js} +2 -2
  133. package/dist/{chunk-NXDG32BY.js → chunk-XYO67D3V.js} +2 -2
  134. package/dist/{chunk-5IHRUTHD.js → chunk-XZLVP6EN.js} +2 -2
  135. package/dist/{chunk-H2OBH7SK.js → chunk-YUYHK6WD.js} +2 -2
  136. package/dist/{chunk-C2NROAMW.js → chunk-Z4JMMKSU.js} +2 -2
  137. package/dist/{chunk-BMVPIRKX.js → chunk-ZL6FKICW.js} +2 -2
  138. package/dist/{chunk-UHO6CCVA.js → chunk-ZWO4HX27.js} +2 -2
  139. package/dist/default-components.d.ts +2 -2
  140. package/dist/default-components.js +1 -1
  141. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  142. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
  143. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  144. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  145. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  146. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  147. package/dist/flows/ContractAmendment/context.d.ts +4 -4
  148. package/dist/flows/ContractAmendment/hooks.d.ts +4 -4
  149. package/dist/flows/ContractAmendment/hooks.js +1 -1
  150. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  151. package/dist/flows/ContractAmendment/index.js +1 -1
  152. package/dist/flows/ContractAmendment/types.d.ts +2 -2
  153. package/dist/flows/ContractAmendment/utils.d.ts +2 -2
  154. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
  155. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  156. package/dist/flows/ContractorOnboarding/api.d.ts +2 -2
  157. package/dist/flows/ContractorOnboarding/api.js +1 -1
  158. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
  159. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  160. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -5
  161. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  162. package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
  163. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
  164. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.js +1 -1
  165. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -5
  166. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  167. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -5
  168. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  169. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  170. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  171. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -5
  172. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  173. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
  174. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  175. package/dist/flows/ContractorOnboarding/components/StatementOfWorkDisclaimer.js +1 -1
  176. package/dist/flows/ContractorOnboarding/constants.d.ts +38 -1
  177. package/dist/flows/ContractorOnboarding/constants.js +1 -1
  178. package/dist/flows/ContractorOnboarding/context.d.ts +7 -6
  179. package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -5
  180. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  181. package/dist/flows/ContractorOnboarding/index.d.ts +6 -5
  182. package/dist/flows/ContractorOnboarding/index.js +1 -1
  183. package/dist/flows/ContractorOnboarding/jsfModify.d.ts +5 -5
  184. package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
  185. package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
  186. package/dist/flows/ContractorOnboarding/utils.js +1 -1
  187. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  188. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  189. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  190. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  191. package/dist/flows/CostCalculator/CostCalculatorResetButton.js +1 -1
  192. package/dist/flows/CostCalculator/CostCalculatorSubmitButton.js +1 -1
  193. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -2
  194. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  195. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
  196. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.js +1 -1
  197. package/dist/flows/CostCalculator/api.d.ts +2 -2
  198. package/dist/flows/CostCalculator/api.js +1 -1
  199. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  200. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  201. package/dist/flows/CostCalculator/context.d.ts +3 -3
  202. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  203. package/dist/flows/CostCalculator/hooks.js +1 -1
  204. package/dist/flows/CostCalculator/index.d.ts +3 -3
  205. package/dist/flows/CostCalculator/index.js +1 -1
  206. package/dist/flows/CostCalculator/types.d.ts +2 -2
  207. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  208. package/dist/flows/CostCalculator/utils.js +1 -1
  209. package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
  210. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  211. package/dist/flows/Onboarding/api.d.ts +5 -5
  212. package/dist/flows/Onboarding/api.js +1 -1
  213. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  214. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  215. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
  216. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  217. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
  218. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  219. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
  220. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  221. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
  222. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  223. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  224. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  225. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
  226. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  227. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
  228. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  229. package/dist/flows/Onboarding/context.d.ts +5 -5
  230. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  231. package/dist/flows/Onboarding/hooks.js +1 -1
  232. package/dist/flows/Onboarding/index.d.ts +4 -4
  233. package/dist/flows/Onboarding/index.js +1 -1
  234. package/dist/flows/Onboarding/types.d.ts +4 -4
  235. package/dist/flows/Onboarding/utils.d.ts +4 -4
  236. package/dist/flows/Onboarding/utils.js +1 -1
  237. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
  238. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  239. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
  240. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  241. package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
  242. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  243. package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
  244. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  245. package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
  246. package/dist/flows/Termination/TerminationFlow.js +1 -1
  247. package/dist/flows/Termination/TerminationForm.d.ts +4 -4
  248. package/dist/flows/Termination/TerminationForm.js +1 -1
  249. package/dist/flows/Termination/api.d.ts +5 -5
  250. package/dist/flows/Termination/api.js +1 -1
  251. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation.js +1 -1
  252. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  253. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
  254. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.js +1 -1
  255. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
  256. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
  257. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
  258. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  259. package/dist/flows/Termination/components/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js +1 -1
  260. package/dist/flows/Termination/context.d.ts +4 -4
  261. package/dist/flows/Termination/hooks.d.ts +4 -4
  262. package/dist/flows/Termination/hooks.js +1 -1
  263. package/dist/flows/Termination/index.d.ts +6 -6
  264. package/dist/flows/Termination/index.js +1 -1
  265. package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
  266. package/dist/flows/Termination/types.d.ts +4 -4
  267. package/dist/flows/Termination/utils.d.ts +4 -4
  268. package/dist/flows/Termination/utils.js +1 -1
  269. package/dist/flows/types.d.ts +2 -2
  270. package/dist/index.css +1 -1
  271. package/dist/index.css.map +1 -1
  272. package/dist/index.d.ts +38 -23
  273. package/dist/index.js +2 -2
  274. package/dist/index.js.map +1 -1
  275. package/dist/internals.d.ts +3 -3
  276. package/dist/internals.js +1 -1
  277. package/dist/{mutations-D1eQrIJS.d.ts → mutations-CSKL2ADz.d.ts} +1 -1
  278. package/dist/{remoteFlows-DtWy_kl6.d.ts → remoteFlows-8JqicJKg.d.ts} +23 -2
  279. package/dist/styles.css +1 -1
  280. package/dist/styles.css.map +1 -1
  281. package/dist/{types-uiKCaHsn.d.ts → types-BL_cUn9Q.d.ts} +11 -6
  282. package/dist/{types-CoznD6fc.d.ts → types-Ch9BHKQe.d.ts} +1 -1
  283. package/dist/{types-C73xHbIf.d.ts → types-P-Kidj6s.d.ts} +7 -8
  284. package/dist/{types-CYEQpq5z.d.ts → types-ixtOeG_U.d.ts} +2 -2
  285. package/dist/{types.gen-Dg6qF5i1.d.ts → types.gen-BBKMFRSu.d.ts} +42 -1
  286. package/dist/{utils-DNGgpT60.d.ts → utils-Cfo-6z-L.d.ts} +1 -1
  287. package/package.json +1 -1
  288. package/dist/ButtonDefault-NLDQHAWN.js +0 -2
  289. package/dist/CheckboxFieldDefault-QXABRJXG.js +0 -2
  290. package/dist/CountryFieldDefault-VJM3C6WE.js +0 -2
  291. package/dist/DatePickerFieldDefault-3MBSCS3W.js +0 -2
  292. package/dist/DrawerDefault-5EYKRPS7.js +0 -2
  293. package/dist/EmailFieldDefault-3ES7SMDC.js +0 -2
  294. package/dist/FieldsetToggleButtonDefault-TPLNRX3E.js +0 -2
  295. package/dist/FileUploadFieldDefault-PNM6H64X.js +0 -2
  296. package/dist/MultiSelectFieldDefault-THD7TDWF.js +0 -2
  297. package/dist/NumberFieldDefault-PCH6RRDK.js +0 -2
  298. package/dist/PDFPreviewDefault-474JH3KB.js +0 -2
  299. package/dist/RadioGroupFieldDefault-CM33F3EP.js +0 -2
  300. package/dist/SelectFieldDefault-NHDJRM5H.js +0 -2
  301. package/dist/StatementDefault-CSHXL3G2.js +0 -2
  302. package/dist/TableFieldDefault-N7MO2QJI.js +0 -2
  303. package/dist/TextAreaFieldDefault-OG4UM4DG.js +0 -2
  304. package/dist/TextFieldDefault-FECR4GRK.js +0 -2
  305. package/dist/WorkScheduleFieldDefault-G2MR2DBY.js +0 -2
  306. package/dist/ZendeskDrawerDefault-W3RCTVCH.js +0 -2
  307. package/dist/chunk-3QNS3IZB.js +0 -2
  308. package/dist/chunk-5XHL6B25.js.map +0 -1
  309. package/dist/chunk-634DTN72.js +0 -2
  310. package/dist/chunk-634DTN72.js.map +0 -1
  311. package/dist/chunk-CEM3JUSV.js +0 -2
  312. package/dist/chunk-CEM3JUSV.js.map +0 -1
  313. package/dist/chunk-D3XDJFE3.js +0 -2
  314. package/dist/chunk-D3XDJFE3.js.map +0 -1
  315. package/dist/chunk-DKFUZO5P.js +0 -1
  316. package/dist/chunk-EFLWMMG5.js +0 -2
  317. package/dist/chunk-EFLWMMG5.js.map +0 -1
  318. package/dist/chunk-EIFXWGXM.js +0 -2
  319. package/dist/chunk-EIFXWGXM.js.map +0 -1
  320. package/dist/chunk-FJZPATKO.js.map +0 -1
  321. package/dist/chunk-GCWEOZBS.js +0 -2
  322. package/dist/chunk-GCWEOZBS.js.map +0 -1
  323. package/dist/chunk-H6YNMT4M.js +0 -2
  324. package/dist/chunk-H6YNMT4M.js.map +0 -1
  325. package/dist/chunk-LNWBGEKE.js +0 -2
  326. package/dist/chunk-LNWBGEKE.js.map +0 -1
  327. package/dist/chunk-N4W7JU2D.js +0 -2
  328. package/dist/chunk-N4W7JU2D.js.map +0 -1
  329. package/dist/chunk-PO57BOOY.js +0 -2
  330. package/dist/chunk-PO57BOOY.js.map +0 -1
  331. package/dist/chunk-RLRSNB77.js +0 -2
  332. package/dist/chunk-RLRSNB77.js.map +0 -1
  333. package/dist/chunk-RQUNEKD2.js +0 -2
  334. package/dist/chunk-RQUNEKD2.js.map +0 -1
  335. package/dist/chunk-UBRRCAAI.js +0 -2
  336. package/dist/chunk-UBRRCAAI.js.map +0 -1
  337. /package/dist/{ButtonDefault-NLDQHAWN.js.map → ButtonDefault-W7RPNNTH.js.map} +0 -0
  338. /package/dist/{CheckboxFieldDefault-QXABRJXG.js.map → CheckboxFieldDefault-JXZ6UY5T.js.map} +0 -0
  339. /package/dist/{CountryFieldDefault-VJM3C6WE.js.map → CountryFieldDefault-V7LUYGQV.js.map} +0 -0
  340. /package/dist/{DatePickerFieldDefault-3MBSCS3W.js.map → DatePickerFieldDefault-OMSU42DG.js.map} +0 -0
  341. /package/dist/{DrawerDefault-5EYKRPS7.js.map → DrawerDefault-V3GEL6Z5.js.map} +0 -0
  342. /package/dist/{EmailFieldDefault-3ES7SMDC.js.map → EmailFieldDefault-A3D5VQPS.js.map} +0 -0
  343. /package/dist/{FieldsetToggleButtonDefault-TPLNRX3E.js.map → FieldsetToggleButtonDefault-BKIDTISL.js.map} +0 -0
  344. /package/dist/{FileUploadFieldDefault-PNM6H64X.js.map → FileUploadFieldDefault-OQ4FGPDM.js.map} +0 -0
  345. /package/dist/{MultiSelectFieldDefault-THD7TDWF.js.map → MultiSelectFieldDefault-EZA25KXD.js.map} +0 -0
  346. /package/dist/{NumberFieldDefault-PCH6RRDK.js.map → NumberFieldDefault-BDSRZWXH.js.map} +0 -0
  347. /package/dist/{PDFPreviewDefault-474JH3KB.js.map → PDFPreviewDefault-TV775MOQ.js.map} +0 -0
  348. /package/dist/{RadioGroupFieldDefault-CM33F3EP.js.map → RadioGroupFieldDefault-4IA7HESJ.js.map} +0 -0
  349. /package/dist/{SelectFieldDefault-NHDJRM5H.js.map → SelectFieldDefault-3XQ5FPO2.js.map} +0 -0
  350. /package/dist/{StatementDefault-CSHXL3G2.js.map → StatementDefault-CCLTSJLJ.js.map} +0 -0
  351. /package/dist/{TableFieldDefault-N7MO2QJI.js.map → TableFieldDefault-ADKV3M23.js.map} +0 -0
  352. /package/dist/{TextAreaFieldDefault-OG4UM4DG.js.map → TextAreaFieldDefault-LVZXGUKB.js.map} +0 -0
  353. /package/dist/{TextFieldDefault-FECR4GRK.js.map → TextFieldDefault-YQMWGOV2.js.map} +0 -0
  354. /package/dist/{WorkScheduleFieldDefault-G2MR2DBY.js.map → WorkScheduleFieldDefault-IW4VDBCH.js.map} +0 -0
  355. /package/dist/{ZendeskDrawerDefault-W3RCTVCH.js.map → ZendeskDrawerDefault-DKSZSN6N.js.map} +0 -0
  356. /package/dist/{chunk-VC6X3C2I.js.map → chunk-2O6Z2KGG.js.map} +0 -0
  357. /package/dist/{chunk-JKEUTGPQ.js.map → chunk-2Q57B73D.js.map} +0 -0
  358. /package/dist/{chunk-6ZEZZZFB.js.map → chunk-2RBFD5MM.js.map} +0 -0
  359. /package/dist/{chunk-ML56EPFW.js.map → chunk-2YNDS45E.js.map} +0 -0
  360. /package/dist/{chunk-VKYP2MQQ.js.map → chunk-3JQROVRG.js.map} +0 -0
  361. /package/dist/{chunk-HBPFTEHZ.js.map → chunk-3LZR4D3V.js.map} +0 -0
  362. /package/dist/{chunk-EW36MHXP.js.map → chunk-43RCLG2R.js.map} +0 -0
  363. /package/dist/{chunk-SBQYUJFI.js.map → chunk-4APMRCE7.js.map} +0 -0
  364. /package/dist/{chunk-3UJC7KHD.js.map → chunk-4JIHEEKX.js.map} +0 -0
  365. /package/dist/{chunk-7SYE5KEV.js.map → chunk-4V6AV3DC.js.map} +0 -0
  366. /package/dist/{chunk-VIQQ3IHI.js.map → chunk-4XJEVGPI.js.map} +0 -0
  367. /package/dist/{chunk-D4FBB5XW.js.map → chunk-4XV4INW5.js.map} +0 -0
  368. /package/dist/{chunk-IEXTH6YO.js.map → chunk-4YAFRXR5.js.map} +0 -0
  369. /package/dist/{chunk-I6Y6AWYE.js.map → chunk-55QKFWY5.js.map} +0 -0
  370. /package/dist/{chunk-BJJTAQPT.js.map → chunk-5FUJICAO.js.map} +0 -0
  371. /package/dist/{chunk-SVYPDGZN.js.map → chunk-5PVNZ6VO.js.map} +0 -0
  372. /package/dist/{chunk-3UAJX23Y.js.map → chunk-64D4GLTO.js.map} +0 -0
  373. /package/dist/{chunk-FJPY27YJ.js.map → chunk-6MJ5MIUI.js.map} +0 -0
  374. /package/dist/{chunk-7QP5TRMH.js.map → chunk-6SVKW2DC.js.map} +0 -0
  375. /package/dist/{chunk-XIEA775Q.js.map → chunk-7EMWT6EU.js.map} +0 -0
  376. /package/dist/{chunk-CEHS4AFO.js.map → chunk-7G4JI6ZU.js.map} +0 -0
  377. /package/dist/{chunk-WHROCBHG.js.map → chunk-7V3YVPIK.js.map} +0 -0
  378. /package/dist/{chunk-C4NXXY3X.js.map → chunk-A3TXUJUO.js.map} +0 -0
  379. /package/dist/{chunk-PGRQG254.js.map → chunk-AU376LE2.js.map} +0 -0
  380. /package/dist/{chunk-NCELDZXG.js.map → chunk-C36DEJTU.js.map} +0 -0
  381. /package/dist/{chunk-7QRAEME3.js.map → chunk-CCE3EAVC.js.map} +0 -0
  382. /package/dist/{chunk-F2VYTYIQ.js.map → chunk-CMFZEZEK.js.map} +0 -0
  383. /package/dist/{chunk-ZOPKBLGA.js.map → chunk-DAE2FMZ5.js.map} +0 -0
  384. /package/dist/{chunk-CWQQA3P4.js.map → chunk-E7JOGKEV.js.map} +0 -0
  385. /package/dist/{chunk-JQ2ESL5O.js.map → chunk-EGDWVDXM.js.map} +0 -0
  386. /package/dist/{chunk-AN5U7FWW.js.map → chunk-ERPXDFKC.js.map} +0 -0
  387. /package/dist/{chunk-UMOL4GLZ.js.map → chunk-FC2V3NUT.js.map} +0 -0
  388. /package/dist/{chunk-5G5UBS6W.js.map → chunk-FUPQCC4B.js.map} +0 -0
  389. /package/dist/{chunk-GLNDB4KG.js.map → chunk-G6BR4JI6.js.map} +0 -0
  390. /package/dist/{chunk-CNCOVTDL.js.map → chunk-GINFFWVY.js.map} +0 -0
  391. /package/dist/{chunk-DG34PSAO.js.map → chunk-GK3QRXNY.js.map} +0 -0
  392. /package/dist/{chunk-XSG4QXPY.js.map → chunk-GOEEA34E.js.map} +0 -0
  393. /package/dist/{chunk-WT6E5LO4.js.map → chunk-GRWTCP42.js.map} +0 -0
  394. /package/dist/{chunk-KXF27FC4.js.map → chunk-GTJMTF2R.js.map} +0 -0
  395. /package/dist/{chunk-MZNUCWQU.js.map → chunk-GWR2JBG2.js.map} +0 -0
  396. /package/dist/{chunk-ZNV46UUP.js.map → chunk-H5LGAIMM.js.map} +0 -0
  397. /package/dist/{chunk-ZTBFYRNL.js.map → chunk-HYVK643F.js.map} +0 -0
  398. /package/dist/{chunk-OZWDFGLQ.js.map → chunk-I3KFOOF6.js.map} +0 -0
  399. /package/dist/{chunk-YMLXE6OO.js.map → chunk-IVUCPXEC.js.map} +0 -0
  400. /package/dist/{chunk-THPH57GK.js.map → chunk-JAHRIQVL.js.map} +0 -0
  401. /package/dist/{chunk-HLSVMRWX.js.map → chunk-JZWOMKR3.js.map} +0 -0
  402. /package/dist/{chunk-YHD2RXJC.js.map → chunk-KESYJ5QG.js.map} +0 -0
  403. /package/dist/{chunk-S6OVT37M.js.map → chunk-KFWZDRDD.js.map} +0 -0
  404. /package/dist/{chunk-CKA37AR5.js.map → chunk-L53XOWY6.js.map} +0 -0
  405. /package/dist/{chunk-UXUZA7XH.js.map → chunk-LGIHVJA5.js.map} +0 -0
  406. /package/dist/{chunk-JTSHX4RB.js.map → chunk-MIK6GCO2.js.map} +0 -0
  407. /package/dist/{chunk-4JOZ4VIJ.js.map → chunk-N6XY7NC3.js.map} +0 -0
  408. /package/dist/{chunk-MM5K3XXY.js.map → chunk-NB3TN7O3.js.map} +0 -0
  409. /package/dist/{chunk-ILX4QHHH.js.map → chunk-NIQXQZ6X.js.map} +0 -0
  410. /package/dist/{chunk-COAGOVMZ.js.map → chunk-NVX4O45S.js.map} +0 -0
  411. /package/dist/{chunk-VLP6L77E.js.map → chunk-PKXMKBP4.js.map} +0 -0
  412. /package/dist/{chunk-A54D24NT.js.map → chunk-PV7FROZ7.js.map} +0 -0
  413. /package/dist/{chunk-TZPHBNNS.js.map → chunk-QE76JNNE.js.map} +0 -0
  414. /package/dist/{chunk-GBETAH3G.js.map → chunk-QLB4FSLX.js.map} +0 -0
  415. /package/dist/{chunk-YUQ3GDQI.js.map → chunk-QPJFFMXN.js.map} +0 -0
  416. /package/dist/{chunk-IG5LQPUN.js.map → chunk-QSOCKFUS.js.map} +0 -0
  417. /package/dist/{chunk-YHIADGM3.js.map → chunk-RBJ5MFDE.js.map} +0 -0
  418. /package/dist/{chunk-FJLSVTBJ.js.map → chunk-SBUJLXJH.js.map} +0 -0
  419. /package/dist/{chunk-P45OX5YT.js.map → chunk-SIP2BFZJ.js.map} +0 -0
  420. /package/dist/{chunk-IPITD7UK.js.map → chunk-SUWJZ3QR.js.map} +0 -0
  421. /package/dist/{chunk-XQUHG7HJ.js.map → chunk-THBDZR3D.js.map} +0 -0
  422. /package/dist/{chunk-3JJEKIQ2.js.map → chunk-TXVEFBFM.js.map} +0 -0
  423. /package/dist/{chunk-G5DVMK4E.js.map → chunk-U7MQPLGK.js.map} +0 -0
  424. /package/dist/{chunk-2SN7VPBR.js.map → chunk-U7PGN7TL.js.map} +0 -0
  425. /package/dist/{chunk-EYHFPHIA.js.map → chunk-UAACHXXX.js.map} +0 -0
  426. /package/dist/{chunk-WTQ6PTMB.js.map → chunk-UFTA5ATE.js.map} +0 -0
  427. /package/dist/{chunk-FLW5LACO.js.map → chunk-UNBAXL4W.js.map} +0 -0
  428. /package/dist/{chunk-DKFUZO5P.js.map → chunk-UYUPSPOE.js.map} +0 -0
  429. /package/dist/{chunk-DWTKSHQJ.js.map → chunk-VNN6IP6P.js.map} +0 -0
  430. /package/dist/{chunk-OVTH3ZHO.js.map → chunk-WQSCAHR6.js.map} +0 -0
  431. /package/dist/{chunk-JIZKHO7L.js.map → chunk-XDILBY5Y.js.map} +0 -0
  432. /package/dist/{chunk-H5VA2OWQ.js.map → chunk-XJDX3ZH6.js.map} +0 -0
  433. /package/dist/{chunk-LDJW2CBF.js.map → chunk-XJILW6K3.js.map} +0 -0
  434. /package/dist/{chunk-XDZFLJ5F.js.map → chunk-XNRPT3WP.js.map} +0 -0
  435. /package/dist/{chunk-IEX4KZUY.js.map → chunk-XSNWW3V4.js.map} +0 -0
  436. /package/dist/{chunk-CKTFJUGZ.js.map → chunk-XSUQM562.js.map} +0 -0
  437. /package/dist/{chunk-NXDG32BY.js.map → chunk-XYO67D3V.js.map} +0 -0
  438. /package/dist/{chunk-5IHRUTHD.js.map → chunk-XZLVP6EN.js.map} +0 -0
  439. /package/dist/{chunk-H2OBH7SK.js.map → chunk-YUYHK6WD.js.map} +0 -0
  440. /package/dist/{chunk-C2NROAMW.js.map → chunk-Z4JMMKSU.js.map} +0 -0
  441. /package/dist/{chunk-BMVPIRKX.js.map → chunk-ZL6FKICW.js.map} +0 -0
  442. /package/dist/{chunk-UHO6CCVA.js.map → chunk-ZWO4HX27.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as p}from"./chunk-EUSCQL4H.js";import{C as m,F as C,K as d,j as l,r as u,x as c}from"./chunk-5XHL6B25.js";import{d as o}from"./chunk-KQPDXXG3.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as a,useQuery as r}from"@tanstack/react-query";var h=t(({includePremiumBenefits:e})=>{let{client:i}=o();return r({queryKey:["cost-calculator-countries",e],queryFn:t(()=>c({client:i,query:{include_premium_benefits:e}}),"queryFn"),select:t(s=>s.data?.data.filter(n=>n.availability==="active").map(n=>({value:n.region_slug,label:n.name,childRegions:n.child_regions,hasAdditionalFields:n.has_additional_fields,regionSlug:n.region_slug,currency:n.currency.code})),"select")})},"useCostCalculatorCountries"),q=t(()=>{let{client:e}=o();return r({queryKey:["company-currencies"],queryFn:t(()=>d({client:e}),"queryFn"),select:t(i=>i.data?.data?.company_currencies.map(s=>({value:s.slug,label:s.code})),"select")})},"useCompanyCurrencies"),x=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>l({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimation"),P=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>u({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimationPdf"),v=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>C({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimationCsv"),S=t((e,{includePremiumBenefits:i,options:s})=>{let{client:n}=o();return r({queryKey:["cost-calculator-region-fields",e,i],queryFn:t(()=>m({client:n,path:{slug:e},query:{include_premium_benefits:i}}),"queryFn"),enabled:!!e,select:t(({data:f})=>{let y=f?.data?.schema||{};return p(y,void 0,s)},"select")})},"useRegionFields");export{h as a,q as b,x as c,P as d,v as e,S as f};
2
- //# sourceMappingURL=chunk-ZNV46UUP.js.map
1
+ import{a as p}from"./chunk-EUSCQL4H.js";import{C as m,G as C,L as d,j as l,r as u,x as c}from"./chunk-PJ6ZEFWD.js";import{d as o}from"./chunk-KQPDXXG3.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as a,useQuery as r}from"@tanstack/react-query";var h=t(({includePremiumBenefits:e})=>{let{client:i}=o();return r({queryKey:["cost-calculator-countries",e],queryFn:t(()=>c({client:i,query:{include_premium_benefits:e}}),"queryFn"),select:t(s=>s.data?.data.filter(n=>n.availability==="active").map(n=>({value:n.region_slug,label:n.name,childRegions:n.child_regions,hasAdditionalFields:n.has_additional_fields,regionSlug:n.region_slug,currency:n.currency.code})),"select")})},"useCostCalculatorCountries"),q=t(()=>{let{client:e}=o();return r({queryKey:["company-currencies"],queryFn:t(()=>d({client:e}),"queryFn"),select:t(i=>i.data?.data?.company_currencies.map(s=>({value:s.slug,label:s.code})),"select")})},"useCompanyCurrencies"),x=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>l({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimation"),P=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>u({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimationPdf"),v=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>C({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimationCsv"),S=t((e,{includePremiumBenefits:i,options:s})=>{let{client:n}=o();return r({queryKey:["cost-calculator-region-fields",e,i],queryFn:t(()=>m({client:n,path:{slug:e},query:{include_premium_benefits:i}}),"queryFn"),enabled:!!e,select:t(({data:f})=>{let y=f?.data?.schema||{};return p(y,void 0,s)},"select")})},"useRegionFields");export{h as a,q as b,x as c,P as d,v as e,S as f};
2
+ //# sourceMappingURL=chunk-H5LGAIMM.js.map
@@ -1,2 +1,2 @@
1
- import{c as x,h as _}from"./chunk-3QNS3IZB.js";import{b as C}from"./chunk-KQPDXXG3.js";import{a}from"./chunk-P37U34EQ.js";import D from"lodash.groupby";import $ from"lodash.capitalize";var S=60,F=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function M(e){if(e<60)return`${e}m`;let s=Math.floor(e/S),n=e%S;return n>0?`${s}h${n}m`:`${s}h`}a(M,"convertBreakDurationToHours");function O(e){let s=e.reduce((n,u)=>u.hours+n,0);return Number(s.toFixed(2))}a(O,"calculateTotalWorkHours");function H(e,s){let n=s.map(({day:c})=>c.toLowerCase()),u=n.indexOf(e),i=null;for(;u<n.length&&!i;){let c=n[u],k=n[u+1],r=F.indexOf(c)+1;F[r]===k||(i=c),u+=1}return i}a(H,"findLastConsecutiveDay");function N(e){return e.start_time&&e.end_time&&(typeof e.hours=="number"?e.hours:Number.parseInt(e.hours))>0}a(N,"shouldSummarizeSchedule");function T(e){return Number.parseInt(e.break_duration_minutes)>0}a(T,"shouldSummarizeBreaks");function I(e){let s=e.filter(N),n=D(s,r=>`${r.start_time}|${r.end_time}`),u=e.filter(T),i=D(u,"break_duration_minutes"),c=Object.keys(n).map(r=>{let o=n[r],y=o[0].day,[p,h]=r.split("|"),t=`from <span>${p.replace(":","h")}</span> to <span>${h.replace(":","h")}</span>`,d=H(y,o),m=(d?o.findIndex(f=>f.day===d):-1)===o.length-1;return o.length===1?`${$(y)}, ${t}`:!m||!d?o.reduce((f,b,v)=>{let g=$(b.day);return v===o.length-1?`${f}and ${g}, ${t}`:`${f}<span>${g}</span>, `},""):`<span>${$(y)}</span> to <span>${$(d)}</span>, ${t}`}),k=Object.keys(i).reverse().map((r,o)=>{let y=o===0,p=i[r],h=M(parseInt(r,10));if(Object.keys(i).length===1)return`With ${h} daily breaks`;if(p.length===1){let t=`${h} break on ${$(p[0].day)}.`;return y?`With ${t}`:t}return p.reduce((t,d,l)=>{let m=$(d.day);return l===0?`${t} ${m}`:l===p.length-1?`${t}, and ${m}.`:`${t}, ${m}`},y?`With ${h} break on`:`${h} break on`)});return{workHoursSummary:c,breakSummary:k}}a(I,"buildWorkScheduleSummary");function P(e){let{checked:s,start_time:n,end_time:u,break_duration_minutes:i}=e;if(!s)return 0;let[c,k]=n.split(":").map(Number),[r,o]=u.split(":").map(Number),y=c*60+k,t=(r*60+o-y-Number.parseInt(i||"0"))/60;return t===Math.floor(t)?t:Number(t.toFixed(2))}a(P,"calculateHours");var w={monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"};function R(e){return w[e]}a(R,"getShortWeekday");import{jsx as W}from"react/jsx-runtime";function U({name:e,defaultValue:s,description:n,label:u,onChange:i,multiple:c,options:k,component:r,...o}){let{components:y}=C(),{control:p}=x(),h=a((t,d,l)=>{if(c&&l){let m=t.value?[...t.value]:[];d?m.includes(l)||t.onChange([...m,l]):t.onChange(m.filter(f=>f!==l))}else t.onChange(d)},"handleCheckboxChange");return W(_,{control:p,name:e,defaultValue:s,render:({field:t,fieldState:d})=>{let l=r||y?.checkbox;if(!l)throw new Error(`Checkbox component not found for field ${e}`);let m={name:e,description:n,label:u,defaultValue:s,multiple:c,options:k,...o};return W(l,{field:{...t,onChange:a((f,b)=>{h(t,f,b),i?.(f,b)},"onChange")},fieldState:d,fieldData:m})}})}a(U,"CheckBoxField");export{F as a,O as b,I as c,P as d,R as e,U as f};
2
- //# sourceMappingURL=chunk-ZTBFYRNL.js.map
1
+ import{c as x,h as _}from"./chunk-H5CNWMEM.js";import{b as C}from"./chunk-KQPDXXG3.js";import{a}from"./chunk-P37U34EQ.js";import D from"lodash.groupby";import $ from"lodash.capitalize";var S=60,F=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function M(e){if(e<60)return`${e}m`;let s=Math.floor(e/S),n=e%S;return n>0?`${s}h${n}m`:`${s}h`}a(M,"convertBreakDurationToHours");function O(e){let s=e.reduce((n,u)=>u.hours+n,0);return Number(s.toFixed(2))}a(O,"calculateTotalWorkHours");function H(e,s){let n=s.map(({day:c})=>c.toLowerCase()),u=n.indexOf(e),i=null;for(;u<n.length&&!i;){let c=n[u],k=n[u+1],r=F.indexOf(c)+1;F[r]===k||(i=c),u+=1}return i}a(H,"findLastConsecutiveDay");function N(e){return e.start_time&&e.end_time&&(typeof e.hours=="number"?e.hours:Number.parseInt(e.hours))>0}a(N,"shouldSummarizeSchedule");function T(e){return Number.parseInt(e.break_duration_minutes)>0}a(T,"shouldSummarizeBreaks");function I(e){let s=e.filter(N),n=D(s,r=>`${r.start_time}|${r.end_time}`),u=e.filter(T),i=D(u,"break_duration_minutes"),c=Object.keys(n).map(r=>{let o=n[r],y=o[0].day,[p,h]=r.split("|"),t=`from <span>${p.replace(":","h")}</span> to <span>${h.replace(":","h")}</span>`,d=H(y,o),m=(d?o.findIndex(f=>f.day===d):-1)===o.length-1;return o.length===1?`${$(y)}, ${t}`:!m||!d?o.reduce((f,b,v)=>{let g=$(b.day);return v===o.length-1?`${f}and ${g}, ${t}`:`${f}<span>${g}</span>, `},""):`<span>${$(y)}</span> to <span>${$(d)}</span>, ${t}`}),k=Object.keys(i).reverse().map((r,o)=>{let y=o===0,p=i[r],h=M(parseInt(r,10));if(Object.keys(i).length===1)return`With ${h} daily breaks`;if(p.length===1){let t=`${h} break on ${$(p[0].day)}.`;return y?`With ${t}`:t}return p.reduce((t,d,l)=>{let m=$(d.day);return l===0?`${t} ${m}`:l===p.length-1?`${t}, and ${m}.`:`${t}, ${m}`},y?`With ${h} break on`:`${h} break on`)});return{workHoursSummary:c,breakSummary:k}}a(I,"buildWorkScheduleSummary");function P(e){let{checked:s,start_time:n,end_time:u,break_duration_minutes:i}=e;if(!s)return 0;let[c,k]=n.split(":").map(Number),[r,o]=u.split(":").map(Number),y=c*60+k,t=(r*60+o-y-Number.parseInt(i||"0"))/60;return t===Math.floor(t)?t:Number(t.toFixed(2))}a(P,"calculateHours");var w={monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"};function R(e){return w[e]}a(R,"getShortWeekday");import{jsx as W}from"react/jsx-runtime";function U({name:e,defaultValue:s,description:n,label:u,onChange:i,multiple:c,options:k,component:r,...o}){let{components:y}=C(),{control:p}=x(),h=a((t,d,l)=>{if(c&&l){let m=t.value?[...t.value]:[];d?m.includes(l)||t.onChange([...m,l]):t.onChange(m.filter(f=>f!==l))}else t.onChange(d)},"handleCheckboxChange");return W(_,{control:p,name:e,defaultValue:s,render:({field:t,fieldState:d})=>{let l=r||y?.checkbox;if(!l)throw new Error(`Checkbox component not found for field ${e}`);let m={name:e,description:n,label:u,defaultValue:s,multiple:c,options:k,...o};return W(l,{field:{...t,onChange:a((f,b)=>{h(t,f,b),i?.(f,b)},"onChange")},fieldState:d,fieldData:m})}})}a(U,"CheckBoxField");export{F as a,O as b,I as c,P as d,R as e,U as f};
2
+ //# sourceMappingURL=chunk-HYVK643F.js.map
@@ -1,2 +1,2 @@
1
- import{a as o,b as r}from"./chunk-N4W7JU2D.js";import{a as t}from"./chunk-EYHFPHIA.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";var n={[o]:" Remote provides its Contractor Services Agreement (CSA) \u201Cas is\u201D; it does not constitute legal advice or create an attorney-client relationship with Remote. Remote is not liable for the content You enter herein and You are encouraged to seek independent legal advice tailored to the specific relationship between You and Your Contractor. By use of the CSA, You release Remote from liability for any claim for damages or losses which may arise related to Your use thereof.",[r]:"Remote provides its Contractor Services Agreement (CSA) \u201Cas is\u201D; it does not constitute legal advice or create an attorney-client relationship with Remote. Remote is not liable for the content You enter herein and You are encouraged to seek independent legal advice tailored to the specific relationship between You and Your Contractor."},d=e(({subscription:i})=>a(t,{title:"Contractor Services Agreement",description:n[i],severity:"info"}),"StatementOfWorkDisclaimer");export{d as a};
2
- //# sourceMappingURL=chunk-OZWDFGLQ.js.map
1
+ import{a as o,b as r}from"./chunk-O3G6HQ3B.js";import{a as t}from"./chunk-UAACHXXX.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";var n={[o]:" Remote provides its Contractor Services Agreement (CSA) \u201Cas is\u201D; it does not constitute legal advice or create an attorney-client relationship with Remote. Remote is not liable for the content You enter herein and You are encouraged to seek independent legal advice tailored to the specific relationship between You and Your Contractor. By use of the CSA, You release Remote from liability for any claim for damages or losses which may arise related to Your use thereof.",[r]:"Remote provides its Contractor Services Agreement (CSA) \u201Cas is\u201D; it does not constitute legal advice or create an attorney-client relationship with Remote. Remote is not liable for the content You enter herein and You are encouraged to seek independent legal advice tailored to the specific relationship between You and Your Contractor."},d=e(({subscription:i})=>a(t,{title:"Contractor Services Agreement",description:n[i],severity:"info"}),"StatementOfWorkDisclaimer");export{d as a};
2
+ //# sourceMappingURL=chunk-I3KFOOF6.js.map
@@ -1,2 +1,2 @@
1
- import{c as d,d as S}from"./chunk-VLP6L77E.js";import{a as f}from"./chunk-KSHK3ZPX.js";import{a as u}from"./chunk-HN5HLFTB.js";import{b as C}from"./chunk-LNV36S6D.js";import{f as y}from"./chunk-3QNS3IZB.js";import{a as o}from"./chunk-P37U34EQ.js";import{useEffect as T,useId as U,useState as I}from"react";import{jsx as k}from"react/jsx-runtime";var l=o((n,e,r)=>r&&r[e]?r[e]:n[e]?n[e]/100:0,"getDefaultManagementFee"),A=o((n,e,r,g)=>!e&&!r?.management_fee&&n?l(u,n,g):e&&!r?.management_fee?"":r?.management_fee,"getManagementFee"),W=o(({estimationOptions:n=d,defaultValues:e={countryRegionSlug:"",regionSlug:"",currencySlug:"",salary:"",benefits:{},management:{management_fee:""}},options:r,render:g,version:_="standard"})=>{let p=U(),[R,m]=I("USD"),F=o(s=>{m(s);let a=l(u,s,n.managementFees);a&&c.setValue("management.management_fee",a.toString())},"onCurrencyChange"),t=S({defaultRegion:e.countryRegionSlug,defaultCurrency:e.currencySlug,defaultSalary:e.salary,estimationOptions:n,version:_,options:{...r,onCurrencyChange:F}}),K=C(t.handleValidation),b=A(R,e.currencySlug,e.management,n.managementFees),{countryRegionSlug:v,currencySlug:h,salary:D,benefits:P,hiringBudget:B,age:E,contractDurationType:M,regionSlug:w,...x}=e,c=y({resolver:K,defaultValues:{country:v,currency:h,region:w,salary:D,salary_conversion:"",salary_converted:void 0,hiring_budget:B||"employee_annual_salary",age:E,contract_duration_type:M,management:{management_fee:b?.toString()||""},benefits:P,estimation_title:n.title,...x},shouldUnregister:!1,mode:"onBlur"});return T(()=>{if(e.currencySlug&&t.currencies&&n.includeManagementFee&&!e.management?.management_fee){let a=t.currencies.find(i=>i.value===e.currencySlug)?.label;if(a){m(a);let i=l(u,a,n.managementFees);c.setValue("management.management_fee",i?.toString()||"")}}},[e.currencySlug,t.currencies,n.includeManagementFee,n.managementFees,e.management?.management_fee,c]),k(f.Provider,{value:{form:c,formId:p,costCalculatorBag:t},children:g(t)})},"CostCalculatorFlow");export{W as a};
2
- //# sourceMappingURL=chunk-YMLXE6OO.js.map
1
+ import{c as d,d as S}from"./chunk-PKXMKBP4.js";import{a as u}from"./chunk-HN5HLFTB.js";import{a as f}from"./chunk-KSHK3ZPX.js";import{b as C}from"./chunk-LNV36S6D.js";import{f as y}from"./chunk-H5CNWMEM.js";import{a as o}from"./chunk-P37U34EQ.js";import{useEffect as T,useId as U,useState as I}from"react";import{jsx as k}from"react/jsx-runtime";var l=o((n,e,r)=>r&&r[e]?r[e]:n[e]?n[e]/100:0,"getDefaultManagementFee"),A=o((n,e,r,g)=>!e&&!r?.management_fee&&n?l(u,n,g):e&&!r?.management_fee?"":r?.management_fee,"getManagementFee"),W=o(({estimationOptions:n=d,defaultValues:e={countryRegionSlug:"",regionSlug:"",currencySlug:"",salary:"",benefits:{},management:{management_fee:""}},options:r,render:g,version:_="standard"})=>{let p=U(),[R,m]=I("USD"),F=o(s=>{m(s);let a=l(u,s,n.managementFees);a&&c.setValue("management.management_fee",a.toString())},"onCurrencyChange"),t=S({defaultRegion:e.countryRegionSlug,defaultCurrency:e.currencySlug,defaultSalary:e.salary,estimationOptions:n,version:_,options:{...r,onCurrencyChange:F}}),K=C(t.handleValidation),b=A(R,e.currencySlug,e.management,n.managementFees),{countryRegionSlug:v,currencySlug:h,salary:D,benefits:P,hiringBudget:B,age:E,contractDurationType:M,regionSlug:w,...x}=e,c=y({resolver:K,defaultValues:{country:v,currency:h,region:w,salary:D,salary_conversion:"",salary_converted:void 0,hiring_budget:B||"employee_annual_salary",age:E,contract_duration_type:M,management:{management_fee:b?.toString()||""},benefits:P,estimation_title:n.title,...x},shouldUnregister:!1,mode:"onBlur"});return T(()=>{if(e.currencySlug&&t.currencies&&n.includeManagementFee&&!e.management?.management_fee){let a=t.currencies.find(i=>i.value===e.currencySlug)?.label;if(a){m(a);let i=l(u,a,n.managementFees);c.setValue("management.management_fee",i?.toString()||"")}}},[e.currencySlug,t.currencies,n.includeManagementFee,n.managementFees,e.management?.management_fee,c]),k(f.Provider,{value:{form:c,formId:p,costCalculatorBag:t},children:g(t)})},"CostCalculatorFlow");export{W as a};
2
+ //# sourceMappingURL=chunk-IVUCPXEC.js.map
@@ -0,0 +1,2 @@
1
+ import{b as u}from"./chunk-3X36ZFNP.js";import{a as o}from"./chunk-P37U34EQ.js";import{clsx as p}from"clsx";import{twMerge as c}from"tailwind-merge";import s from"dompurify";function h(...r){return c(p(r))}o(h,"cn");function V(r,n="EUR"){if(r==null)return"-";let e=r/100;return new Intl.NumberFormat("en",{style:"currency",currency:n,currencyDisplay:"symbol"}).format(e)}o(V,"formatCurrency");var d=o(r=>{let n={};return r.inner.forEach(e=>{e.path!==void 0&&(n[e.path]={type:e.type,errors:e.errors,inner:e.inner.map(i=>d(i))})}),n},"transformYupErrorsIntoObject");function x(r){window.RemoteFlowsSDK={version:r}}o(x,"debug");var f=o(r=>{let n=new Set(r?r.toLowerCase().split(" "):[]);return n.add("noopener"),n.add("noreferrer"),Array.from(n).join(" ")},"appendSecureRelValue");s.isSupported&&s.addHook("afterSanitizeAttributes",r=>{let n=r.getAttribute("target");if(r.tagName==="A"&&(!n||n!=="_self")){let e=r.getAttribute("href");if(e&&!e.startsWith("#")&&/^https?:\/\//i.test(e)){r.setAttribute("target","_blank");let i=r.getAttribute("rel");r.setAttribute("rel",f(i))}}});var S=o(r=>s.sanitize(r,{ADD_ATTR:["target"]}),"sanitizeHtml"),R=o(r=>{let e=new DOMParser().parseFromString(r,"text/html");e.querySelectorAll("img").forEach(a=>{a.setAttribute("onerror","this.style.display='none'")});let t=e.body.innerHTML;return s.sanitize(t,{ADD_ATTR:["target","onerror"]})},"sanitizeHtmlWithImageErrorHandling"),T=o(r=>{if(!r)return"";let n=r.trim();return n.startsWith("data:application/pdf;base64,")||n.startsWith("data:")?n:`data:application/pdf;base64,${n}`},"clearBase64Data");function m(r,n){return n?Object.fromEntries(Object.entries(r).map(([e,i])=>{if(i===void 0)return[e,void 0];let t=n.find(a=>a.name===e);if(t?.isVisible===!1||t?.deprecated)return[e,void 0];if(t?.type==="radio"||t?.type==="select"){let a=t.options.find(l=>l.value===i);return a?[e,{prettyValue:a?.label,label:t?.label,inputType:t?.type}]:void 0}if(t?.type==="checkbox"&&t?.const)return[e,{prettyValue:!0,label:t.label,inputType:t?.type}];if(t?.type==="countries"&&Array.isArray(i))return[e,{prettyValue:i.join(),label:t.label,inputType:t?.type}];if(t?.type==="fieldset"){let a=m(i,t.fields);if(!a.label&&a.value){let l={...a.value,label:t.label,inputType:t?.type};return[e,l]}return[e,a]}if(t?.type==="money")return[e,{prettyValue:i,label:t.label,inputType:t?.type,currency:t?.currency}];if(t)return[e,{prettyValue:i,label:t.label,inputType:t?.type}]}).filter(Boolean)):{}}o(m,"prettifyFormValues");function y(r){return{error:new Error(r),rawError:{message:r},fieldErrors:[]}}o(y,"createStructuredError");function E(r){return typeof r=="object"&&r!==null&&"error"in r&&"rawError"in r&&"fieldErrors"in r}o(E,"isStructuredError");function z(r,n){if(E(r)){let i=u(r.fieldErrors||[],n);return{error:r.error,rawError:r.rawError,fieldErrors:i}}return{...y(r instanceof Error?r.message:"An unexpected error occurred"),fieldErrors:[]}}o(z,"handleStepError");export{h as a,V as b,d as c,x as d,S as e,R as f,T as g,m as h,y as i,z as j};
2
+ //# sourceMappingURL=chunk-J63QA2JC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\nimport { ValidationError } from 'yup';\nimport DOMPurify from 'dompurify';\nimport { JSFFields, Meta } from '@/src/types/remoteFlows';\nimport {\n NormalizedFieldError,\n normalizeFieldErrors,\n} from '@/src/lib/mutations';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport function formatCurrency(\n amount: number | undefined | null,\n currencyCode = 'EUR',\n): string {\n if (amount == null) {\n return '-';\n }\n\n const value = amount / 100;\n\n return new Intl.NumberFormat('en', {\n style: 'currency',\n currency: currencyCode,\n currencyDisplay: 'symbol',\n }).format(value);\n}\n\ntype YupError = Pick<ValidationError, 'type' | 'errors'> & {\n inner: Record<string, YupError>[];\n};\n\n/**\n * Transforms a Yup ValidationError object into a more readable object. The format is as follows:\n * {\n * [fieldName]: {\n * type: string,\n * errors: string[],\n * inner: YupError[],\n * },\n * }\n * @param errors\n * @returns\n */\nexport const transformYupErrorsIntoObject = (errors: ValidationError) => {\n const validationErrors: Record<string, YupError> = {};\n\n errors.inner.forEach((error: ValidationError) => {\n if (error.path !== undefined) {\n validationErrors[error.path] = {\n type: error.type,\n errors: error.errors,\n inner: error.inner.map((innerError) =>\n transformYupErrorsIntoObject(innerError),\n ),\n };\n }\n });\n\n return validationErrors;\n};\n\n/**\n * Debug utility to add version to window object\n * @param version - The version of the SDK\n */\nexport function debug(version: string) {\n window.RemoteFlowsSDK = {\n version,\n };\n}\n\n// Deduplicates rel values if necessary and appends noopener and noreferrer\nconst appendSecureRelValue = (rel: string | null) => {\n const attributes = new Set(rel ? rel.toLowerCase().split(' ') : []);\n\n attributes.add('noopener');\n attributes.add('noreferrer');\n\n return Array.from(attributes).join(' ');\n};\n\nif (DOMPurify.isSupported) {\n DOMPurify.addHook('afterSanitizeAttributes', (node) => {\n const target = node.getAttribute('target');\n\n if (node.tagName === 'A' && (!target || target !== '_self')) {\n const href = node.getAttribute('href');\n\n // Skip internal anchors (#section), relative URLs, and non-http protocols\n if (href && !href.startsWith('#') && /^https?:\\/\\//i.test(href)) {\n node.setAttribute('target', '_blank');\n const rel = node.getAttribute('rel');\n node.setAttribute('rel', appendSecureRelValue(rel));\n }\n }\n });\n}\n\nexport const sanitizeHtml = (html: string) => {\n return DOMPurify.sanitize(html, { ADD_ATTR: ['target'] });\n};\n\nexport const sanitizeHtmlWithImageErrorHandling = (html: string) => {\n const parser = new DOMParser();\n const doc = parser.parseFromString(html, 'text/html');\n\n // Add onerror handler to all img tags to hide them if they fail to load\n const images = doc.querySelectorAll('img');\n images.forEach((img) => {\n img.setAttribute('onerror', \"this.style.display='none'\");\n });\n\n const modifiedHtml = doc.body.innerHTML;\n\n // Sanitize with DOMPurify, allowing onerror attribute\n // Note: The global afterSanitizeAttributes hook (defined above) will still apply\n // to add target=\"_blank\" and rel=\"noopener noreferrer\" to external links\n return DOMPurify.sanitize(modifiedHtml, {\n ADD_ATTR: ['target', 'onerror'],\n });\n};\n\n/**\n * Ensures base64 data has the correct data URI prefix for PDF content\n * @param base64Data - The base64 data string\n * @returns The base64 data with proper data URI prefix\n */\nexport const clearBase64Data = (base64Data: string) => {\n if (!base64Data) return '';\n\n const cleanedData = base64Data.trim();\n\n if (cleanedData.startsWith('data:application/pdf;base64,')) {\n return cleanedData;\n }\n\n if (cleanedData.startsWith('data:')) {\n return cleanedData;\n }\n\n return `data:application/pdf;base64,${cleanedData}`;\n};\n\n/**\n * Function to prettify form values. Returns a pretty value and label for each field.\n * @param values - Form values to prettify\n * @param fields - Form fields\n * @returns Prettified form values\n */\n// @ts-expect-error need to check function return type\nexport function prettifyFormValues(\n values: Record<string, unknown>,\n fields: JSFFields | undefined,\n) {\n if (!fields) {\n return {};\n }\n return Object.fromEntries(\n Object.entries(values)\n // @ts-expect-error need to check function return type\n .map(([key, value]) => {\n if (value === undefined) {\n return [key, undefined];\n }\n\n const field = fields.find((field) => field.name === key);\n\n if (field?.isVisible === false || field?.deprecated) {\n return [key, undefined];\n }\n\n if (field?.type === 'radio' || field?.type === 'select') {\n const option = (\n field.options as Array<{ value: string; label: string }>\n ).find((option) => option.value === value);\n\n if (option) {\n return [\n key,\n {\n prettyValue: option?.label,\n label: field?.label,\n inputType: field?.type,\n },\n ];\n }\n return;\n }\n\n if (field?.type === 'checkbox' && field?.const) {\n return [\n key,\n { prettyValue: true, label: field.label, inputType: field?.type },\n ];\n }\n\n if (field?.type === 'countries' && Array.isArray(value)) {\n return [\n key,\n {\n prettyValue: value.join(),\n label: field.label,\n inputType: field?.type,\n },\n ];\n }\n\n if (field?.type === 'fieldset') {\n // @ts-expect-error need to check function return type\n const prettiedFieldset = prettifyFormValues(\n value as Record<string, unknown>,\n field.fields as JSFFields,\n );\n\n // Handles benefits fieldset in specific\n if (!prettiedFieldset.label && prettiedFieldset.value) {\n const prettyValue: Record<string, unknown> = {\n ...prettiedFieldset.value,\n label: field.label,\n inputType: field?.type,\n };\n return [key, prettyValue];\n }\n\n return [key, prettiedFieldset];\n }\n\n if (field?.type === 'money') {\n return [\n key,\n {\n prettyValue: value,\n label: field.label,\n inputType: field?.type,\n currency: field?.currency,\n },\n ];\n }\n\n if (field) {\n return [\n key,\n { prettyValue: value, label: field.label, inputType: field?.type },\n ];\n }\n })\n .filter(Boolean),\n );\n}\n\n/**\n * Creates a structured error object with the error message and raw error object\n * @param message - The error message\n * @returns\n */\nexport function createStructuredError(message: string) {\n return {\n error: new Error(message),\n rawError: { message },\n fieldErrors: [],\n };\n}\n\n/**\n * Checks if the error is a structured error\n * @param err - The error\n * @returns True if the error is a structured error\n */\nfunction isStructuredError(err: unknown): err is {\n error: Error;\n rawError: Record<string, unknown>;\n fieldErrors: NormalizedFieldError[];\n} {\n return (\n typeof err === 'object' &&\n err !== null &&\n 'error' in err &&\n 'rawError' in err &&\n 'fieldErrors' in err\n );\n}\n\n/**\n * Handles the error for a step\n * @param err - The error\n * @param fieldsMeta - The fields metadata\n * @returns The structured error\n */\nexport function handleStepError(\n err: unknown,\n fieldsMeta?: Meta,\n): {\n error: Error;\n rawError: Record<string, unknown>;\n fieldErrors: NormalizedFieldError[];\n} {\n // If it's already a structured error from mutateAsyncOrThrow\n if (isStructuredError(err)) {\n const normalizedFieldErrors = normalizeFieldErrors(\n err.fieldErrors || [],\n fieldsMeta,\n );\n return {\n error: err.error,\n rawError: err.rawError,\n fieldErrors: normalizedFieldErrors,\n };\n }\n\n // For unexpected errors, create a structured error\n const fallbackError = createStructuredError(\n err instanceof Error ? err.message : 'An unexpected error occurred',\n );\n\n return {\n ...fallbackError,\n fieldErrors: [], // No field errors for unexpected errors\n };\n}\n"],"mappings":"gFAAA,OAAS,QAAAA,MAA6B,OACtC,OAAS,WAAAC,MAAe,iBAExB,OAAOC,MAAe,YAOf,SAASC,KAAMC,EAAsB,CAC1C,OAAOC,EAAQC,EAAKF,CAAM,CAAC,CAC7B,CAFgBG,EAAAJ,EAAA,MAIT,SAASK,EACdC,EACAC,EAAe,MACP,CACR,GAAID,GAAU,KACZ,MAAO,IAGT,IAAME,EAAQF,EAAS,IAEvB,OAAO,IAAI,KAAK,aAAa,KAAM,CACjC,MAAO,WACP,SAAUC,EACV,gBAAiB,QACnB,CAAC,EAAE,OAAOC,CAAK,CACjB,CAfgBJ,EAA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clsx","__name","formatCurrency","amount","currencyCode","value","transformYupErrorsIntoObject","errors","validationErrors","error","innerError","debug","version","appendSecureRelValue","rel","attributes","DOMPurify","node","target","href","sanitizeHtml","html","sanitizeHtmlWithImageErrorHandling","doc","img","modifiedHtml","clearBase64Data","base64Data","cleanedData","prettifyFormValues","values","fields","key","field","option","prettiedFieldset","prettyValue","createStructuredError","message","isStructuredError","err","handleStepError","fieldsMeta","normalizedFieldErrors","normalizeFieldErrors"]}
@@ -1,2 +1,2 @@
1
- import{i as a,j as n,k as s,l as F,m as _}from"./chunk-3QNS3IZB.js";import{a as i}from"./chunk-JTSHX4RB.js";import{a as l}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as u}from"react/jsx-runtime";function I({field:o,fieldState:p,fieldData:c}){let{name:r,label:t,description:m,maxLength:d,includeErrorMessage:x}=c;return u(a,{"data-field":r,className:`RemoteFlows__TextField__Item__${r}`,children:[t&&e(n,{className:"RemoteFlows__TextField__Label",children:t}),e(s,{children:e(i,{...o,value:o.value??"",onChange:T=>{o.onChange(T)},className:"RemoteFlows__TextField__Input",placeholder:t,maxLength:d})}),m&&e(F,{className:"RemoteFlows__TextField__Description",children:m}),x&&p.error&&e(_,{className:"RemoteFlows__TextField__Error"})]})}l(I,"TextFieldDefault");export{I as a};
2
- //# sourceMappingURL=chunk-THPH57GK.js.map
1
+ import{i as a,j as n,k as s,l as F,m as _}from"./chunk-H5CNWMEM.js";import{a as i}from"./chunk-MIK6GCO2.js";import{a as l}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as u}from"react/jsx-runtime";function I({field:o,fieldState:p,fieldData:c}){let{name:r,label:t,description:m,maxLength:d,includeErrorMessage:x}=c;return u(a,{"data-field":r,className:`RemoteFlows__TextField__Item__${r}`,children:[t&&e(n,{className:"RemoteFlows__TextField__Label",children:t}),e(s,{children:e(i,{...o,value:o.value??"",onChange:T=>{o.onChange(T)},className:"RemoteFlows__TextField__Input",placeholder:t,maxLength:d})}),m&&e(F,{className:"RemoteFlows__TextField__Description",children:m}),x&&p.error&&e(_,{className:"RemoteFlows__TextField__Error"})]})}l(I,"TextFieldDefault");export{I as a};
2
+ //# sourceMappingURL=chunk-JAHRIQVL.js.map
@@ -1,2 +1,2 @@
1
- import{b as u}from"./chunk-Q3ALCPJN.js";import{d}from"./chunk-FJZPATKO.js";import{a as m}from"./chunk-3X36ZFNP.js";import{b as a}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as v}from"react/jsx-runtime";function R({onSubmit:c,onSuccess:p,onError:e,render:l,...o}){let{components:E}=a(),{contractorOnboardingBag:t}=u(),i=d(),{mutateAsync:f}=m(i),y=n(async()=>{try{if(await c?.(),t.employmentId){let r=await f({employment_id:t.employmentId});if(r.data){await p?.({data:r.data,employmentStatus:"invited"}),t.refetchEmployment();return}r.error&&e?.({error:r.error,rawError:r.rawError,fieldErrors:[]})}}catch(r){e?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),s=E?.button;if(!s)throw new Error("Button component not found");return v(s,{...o,disabled:i.isPending||o.disabled,onClick:r=>{y(),o.onClick?.(r)},children:l({employmentStatus:"invited"})})}n(R,"OnboardingInvite");export{R as a};
2
- //# sourceMappingURL=chunk-HLSVMRWX.js.map
1
+ import{b as u}from"./chunk-Q3ALCPJN.js";import{d}from"./chunk-4ECYU3L5.js";import{a as m}from"./chunk-3X36ZFNP.js";import{b as a}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as v}from"react/jsx-runtime";function R({onSubmit:c,onSuccess:p,onError:e,render:l,...o}){let{components:E}=a(),{contractorOnboardingBag:t}=u(),i=d(),{mutateAsync:f}=m(i),y=n(async()=>{try{if(await c?.(),t.employmentId){let r=await f({employment_id:t.employmentId});if(r.data){await p?.({data:r.data,employmentStatus:"invited"}),t.refetchEmployment();return}r.error&&e?.({error:r.error,rawError:r.rawError,fieldErrors:[]})}}catch(r){e?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),s=E?.button;if(!s)throw new Error("Button component not found");return v(s,{...o,disabled:i.isPending||o.disabled,onClick:r=>{y(),o.onClick?.(r)},children:l({employmentStatus:"invited"})})}n(R,"OnboardingInvite");export{R as a};
2
+ //# sourceMappingURL=chunk-JZWOMKR3.js.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-GCWEOZBS.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";function s({className:e,direction:o="col",...n}){return a("div",{"data-slot":"card",className:r("RemoteFlows__Card bg-white text-card-foreground rounded-[10px] gap-4 border border-gray-200 px-10 py-14",o==="row"?"flex flex-row":"flex flex-col",e),...n})}t(s,"Card");function p({className:e,...o}){return a("header",{"data-slot":"card-header",className:r("flex flex-col gap-1.5 px-6",e),...o})}t(p,"CardHeader");function l({className:e,as:o,...n}){return a(o||"h2",{"data-slot":"card-title",className:r("leading-none font-semibold",e),...n})}t(l,"CardTitle");function i({className:e,...o}){return a("p",{"data-slot":"card-description",className:r("text-sm",e),...o})}t(i,"CardDescription");function m({className:e,...o}){return a("div",{"data-slot":"card-content",className:r("px-6",e),...o})}t(m,"CardContent");function f({className:e,...o}){return a("footer",{"data-slot":"card-footer",className:r("flex items-center px-6",e),...o})}t(f,"CardFooter");export{s as a,p as b,l as c,i as d,m as e,f};
2
- //# sourceMappingURL=chunk-YHD2RXJC.js.map
1
+ import{a as r}from"./chunk-J63QA2JC.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";function s({className:e,direction:o="col",...n}){return a("div",{"data-slot":"card",className:r("RemoteFlows__Card bg-white text-card-foreground rounded-[10px] gap-4 border border-gray-200 px-10 py-14",o==="row"?"flex flex-row":"flex flex-col",e),...n})}t(s,"Card");function p({className:e,...o}){return a("header",{"data-slot":"card-header",className:r("flex flex-col gap-1.5 px-6",e),...o})}t(p,"CardHeader");function l({className:e,as:o,...n}){return a(o||"h2",{"data-slot":"card-title",className:r("leading-none font-semibold",e),...n})}t(l,"CardTitle");function i({className:e,...o}){return a("p",{"data-slot":"card-description",className:r("text-sm",e),...o})}t(i,"CardDescription");function m({className:e,...o}){return a("div",{"data-slot":"card-content",className:r("px-6",e),...o})}t(m,"CardContent");function f({className:e,...o}){return a("footer",{"data-slot":"card-footer",className:r("flex items-center px-6",e),...o})}t(f,"CardFooter");export{s as a,p as b,l as c,i as d,m as e,f};
2
+ //# sourceMappingURL=chunk-KESYJ5QG.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-YHD2RXJC.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as o,jsxs as n}from"react/jsx-runtime";var i=m(({cards:e})=>n("div",{className:"RemoteFlows__AcknowledgeInformation",children:[n(t,{className:"mb-6",children:[o("h2",{className:"RemoteFlows__AcknowledgeInformation__Title color-[#000] font-medium",children:e.remoteDoesNext.title}),o("p",{className:"RemoteFlows__AcknowledgeInformation__Description color-[#71717A] text-xs",children:e.remoteDoesNext.description})]}),n(t,{className:"mb-6",children:[o("h2",{className:"RemoteFlows__AcknowledgeInformation__Title color-[#000] font-medium",children:e.whatYouNeedToDo.title}),o("ul",{className:"RemoteFlows__AcknowledgeInformation__List list-disc pl-5 text-xs text-[#71717A]",children:e.whatYouNeedToDo.list.map(l=>o("li",{className:"RemoteFlows__AcknowledgeInformation__ListItem mb-2",children:l},l))})]})]}),"AcknowledgeInformation");export{i as a};
2
- //# sourceMappingURL=chunk-S6OVT37M.js.map
1
+ import{a as t}from"./chunk-KESYJ5QG.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as o,jsxs as n}from"react/jsx-runtime";var i=m(({cards:e})=>n("div",{className:"RemoteFlows__AcknowledgeInformation",children:[n(t,{className:"mb-6",children:[o("h2",{className:"RemoteFlows__AcknowledgeInformation__Title color-[#000] font-medium",children:e.remoteDoesNext.title}),o("p",{className:"RemoteFlows__AcknowledgeInformation__Description color-[#71717A] text-xs",children:e.remoteDoesNext.description})]}),n(t,{className:"mb-6",children:[o("h2",{className:"RemoteFlows__AcknowledgeInformation__Title color-[#000] font-medium",children:e.whatYouNeedToDo.title}),o("ul",{className:"RemoteFlows__AcknowledgeInformation__List list-disc pl-5 text-xs text-[#71717A]",children:e.whatYouNeedToDo.list.map(l=>o("li",{className:"RemoteFlows__AcknowledgeInformation__ListItem mb-2",children:l},l))})]})]}),"AcknowledgeInformation");export{i as a};
2
+ //# sourceMappingURL=chunk-KFWZDRDD.js.map
@@ -0,0 +1,2 @@
1
+ import{a as xt,b as Ut,c as Nt}from"./chunk-4APMRCE7.js";import{a as qt,b as At,c as jt}from"./chunk-FC2V3NUT.js";import{a as Vt,b as It,c as Dt,d as Ot,f as Mt,g as Tt,h as Lt,i as Rt,j as Bt,k as Jt,l as kt}from"./chunk-TCLY24DF.js";import{a as x,b as Z,c as vt}from"./chunk-O3G6HQ3B.js";import{f as Ct,h as wt,i as ht,k as Ft}from"./chunk-4ECYU3L5.js";import{c as St,d as bt}from"./chunk-STF3NTPS.js";import{a as Pt}from"./chunk-Q445EJX6.js";import{a as gt,e as f,f as v}from"./chunk-T7O3YYOG.js";import{F as yt,P as _t}from"./chunk-PJ6ZEFWD.js";import{h as w,i as R}from"./chunk-J63QA2JC.js";import{a as E}from"./chunk-3X36ZFNP.js";import{a as Et}from"./chunk-5BRMLRS7.js";import{d as j}from"./chunk-KQPDXXG3.js";import{a}from"./chunk-P37U34EQ.js";import{useEffect as Qt,useMemo as l,useRef as Re,useState as $}from"react";import Ht from"lodash.omit";import{useQuery as Me}from"@tanstack/react-query";import{useQuery as Oe}from"@tanstack/react-query";var Gt=a(()=>{let{client:d}=j();return Oe({queryKey:["identity"],queryFn:a(()=>_t({client:d,headers:{Authorization:""}}),"queryFn"),select:a(y=>y.data?.data,"select")})},"useIdentity");function Te(d){return d!=null&&"company"in d}a(Te,"hasCompany");var Le=a(()=>{let{client:d}=j(),{data:y}=Gt(),r=Te(y)?y?.company?.id??"":"";return Me({queryKey:["legal-entities",r],queryFn:a(()=>yt({client:d,path:{company_id:r}}),"queryFn"),select:a(U=>U.data?.data?.legal_entities,"select"),enabled:!!r})},"useLegalEntities"),Kt=a(()=>{let{data:d}=Le();return d?.find(y=>y.is_default)},"useDefaultLegalEntity");var Be={select_country:null,basic_information:"employment_basic_information",contract_details:null,pricing_plan:null,contract_preview:null,review:null},Je={employment_basic_information:"basic_information"},ke=new Date().toISOString().split("T")[0],yn=a(({countryCode:d,externalId:y,employmentId:r,skipSteps:U,options:h,initialValues:u})=>{let[s,tt]=$(d||null),[c,Wt]=$(r),[S,et]=$(void 0),B=Re({select_country:{},basic_information:{},contract_details:{},contract_preview:{},pricing_plan:{}}),zt=U?.includes("select_country")?At:qt,{fieldValues:m,stepState:n,setFieldValues:Yt,previousStep:Xt,nextStep:Zt,goToStep:N,setStepValues:nt}=Et(zt),{data:i,isLoading:$t,refetch:te}=Pt({employmentId:c,queryParams:{exclude_files:!0}}),ee=Kt(),{status:F}=i||{},V=F&&St.includes(F),ne=F&&!bt.includes(F),oe=l(()=>F==="invited"?"invited":"not_invited",[F]),ot=wt(),it=ht(s,h),G=Tt(),at=Vt(),{mutateAsync:rt}=Bt(G,at,m),{mutateAsyncOrThrow:ie}=E(it),st=Dt(),ct=Mt(),{mutateAsyncOrThrow:ae}=E(ot),{mutateAsyncOrThrow:re}=E(G),{mutateAsyncOrThrow:se}=E(st),{mutateAsyncOrThrow:lt}=E(ct);r&&i?.country?.code&&!s&&tt(i.country.code);let{selectCountryForm:J,isLoading:ce}=Ft({jsfModify:h?.jsfModify?.select_country,queryOptions:{enabled:n.currentStep.name==="select_country"}}),{form:b,isLoading:le}=Rt(c,{jsonSchemaVersion:h?.jsonSchemaVersion,queryOptions:{enabled:n.currentStep.name==="pricing_plan"||!!r&&V}}),de=Be[n.currentStep.name]||"contractor_basic_information",ue=Je[de],me=i?.[ue]||{},pe=a(({form:t,options:o={},query:p={}})=>{let P=Object.keys(m).length>0?{...u,...n.values?.[n.currentStep.name],...m}:{...u,...me};return Ct({countryCode:s,form:t,fieldValues:P,query:p,options:{...o,queryOptions:{enabled:o.queryOptions?.enabled??!0}}})},"useJSONSchema"),fe=!!(s&&(n.currentStep.name==="basic_information"||r)),ye=!!(s&&(n.currentStep.name==="contract_details"||r)),_e=!!(s==="GBR"&&r&&n.currentStep.name==="basic_information"),{data:I,isLoading:ge}=Jt(r,{enabled:_e}),{data:k,isLoading:Se}=kt(r,{enabled:!!r});Qt(()=>{k&&k.length>0&&!S&&et(k[0].id)},[k,S]);let{data:_,isLoading:be}=pe({form:"contractor_basic_information",options:{jsfModify:Ut(s,h),queryOptions:{enabled:fe}}}),Ce=l(()=>jt(i?.basic_information?.provisional_start_date,m?.service_duration?.provisional_start_date),[i?.basic_information?.provisional_start_date,m?.service_duration?.provisional_start_date]),K=l(()=>i?.contractor_type?{standard:x,plus:Z,cor:vt}[i?.contractor_type]||x:void 0,[i]),{data:g,isLoading:we}=Lt({countryCode:s,fieldValues:m,options:{queryOptions:{enabled:ye},jsfModify:xt(h?.jsfModify?.contract_details,Ce,K,m)}}),he=l(()=>n.currentStep.name==="contract_preview"||!!r&&V,[n.currentStep.name,r,V]),{data:C}=It({fieldValues:m,options:{queryOptions:{enabled:he},jsfModify:Nt(h,m)}}),{data:Q,isLoading:Fe}=Ot({employmentId:c,contractDocumentId:S,options:{queryOptions:{enabled:!!S}}}),e=l(()=>({select_country:J?.fields||[],basic_information:_?.fields||[],pricing_plan:b?.fields||[],contract_details:g?.fields||[],contract_preview:C?.fields||[],review:[]}),[J?.fields,_?.fields,b?.fields,g?.fields,C?.fields]),Pe={select_country:null,basic_information:_?.meta["x-jsf-fieldsets"],pricing_plan:null,contract_details:g?.meta["x-jsf-fieldsets"],contract_preview:null,review:null},{country:Ee,basic_information:q={},contract_details:dt={}}=i||{},ut=Ee?.code,D=l(()=>v(e.select_country,{country:s||ut||""}),[e.select_country,s,ut]),H=l(()=>I?.content?gt(I.content,I.name):null,[I?.content,I?.name]),O=l(()=>{let t={provisional_start_date:ke,...u,...q,ir35:i?.contract_details?.ir_35,saudi_nationality_status:i?.contract_details?.nationality,...H&&{ir35_sds_file:[H]}};return v(e.basic_information,t)},[u,q,i?.contract_details?.ir_35,i?.contract_details?.nationality,H,e.basic_information]),M=l(()=>{let o={...{service_duration:{provisional_start_date:q.provisional_start_date}},...u,...dt};return v(e.contract_details,o)},[e.contract_details,dt,u,q]),A=l(()=>{let t=Q?.contract_document?.signatories?.find(p=>p.type==="company"),o={...u,signature:t?.signature};return v(e.contract_preview,o)},[e.contract_preview,u,Q]),T=l(()=>{let o={...{subscription:K},...u};return v(e.pricing_plan,o)},[e.pricing_plan,u,K]),ve=l(()=>({select_country:D,basic_information:O,contract_details:M,contract_preview:A,pricing_plan:T}),[D,O,M,A,T]),W=!!(r&&V&&n.currentStep.name!=="review"),z=ce||be||$t||we||le||Fe||ge||Se,mt=l(()=>!!(W&&!z&&S&&e.basic_information.length>0&&e.contract_details.length>0&&e.contract_preview.length>0),[W,z,S,e.basic_information.length,e.contract_details.length,e.contract_preview.length]);Qt(()=>{mt&&(B.current={select_country:w(D,e.select_country),basic_information:w(O,e.basic_information),contract_details:w(M,e.contract_details),contract_preview:w(A,e.contract_preview),pricing_plan:w(T,e.pricing_plan)},nt({select_country:D,basic_information:O,contract_details:M,contract_preview:{},pricing_plan:T,review:{}}),N("review"))},[mt,N,D,O,M,nt,e.select_country,e.basic_information,e.contract_details,e.pricing_plan,T,e.contract_preview,A]);let Ve=a(t=>{N(t)},"goTo"),pt=a(async t=>J&&n.currentStep.name==="select_country"?t:_&&n.currentStep.name==="basic_information"?await f(t,_?.fields,{isPartialValidation:!1}):g&&n.currentStep.name==="contract_details"?await f(t,g?.fields,{isPartialValidation:!1}):C&&n.currentStep.name==="contract_preview"?await f(t,C?.fields,{isPartialValidation:!1}):b&&n.currentStep.name==="pricing_plan"?await f(t,b?.fields,{isPartialValidation:!1}):{},"parseFormValues");async function Ie(t){let o=n.currentStep.name;o in B.current&&(B.current[o]=w(t,e[o]));let p=await pt(t);switch(n.currentStep.name){case"select_country":return tt(p.country),Promise.resolve({data:{countryCode:p.country}});case"basic_information":{let Y=!c&&s,P=c&&s&&i?.country&&i?.country.code!==s;if(Y||P){let De={basic_information:Ht(p,"saudi_nationality_status","ir35","ir35_sds_file"),type:"contractor",country_code:s,external_id:y},ft=await ae(De),X=ft?.data?.employment?.id;if(!X)throw R("Employment ID not found");return Wt(X),await rt({employmentId:X}),ft}else if(c){let L=Ht(p,"saudi_nationality_status","ir35","ir35_sds_file");return await rt({employmentId:c}),ie({employmentId:c,basic_information:L})}return}case"contract_details":{let P=await re({employmentId:c,payload:{contract_document:p}}),L=P?.data?.contract_document?.id;if(!L)throw R("Contract document ID not found");return et(L),P}case"contract_preview":return se({employmentId:c,contractDocumentId:S,payload:{signature:t.signature}});case"pricing_plan":{if(t.subscription==x)return lt({employmentId:c,payload:{operation:"downgrade"}});if(t.subscription==Z)return lt({employmentId:c,payload:{operation:"upgrade"}});throw R("invalid selection")}default:throw R("Invalid step state")}}return a(Ie,"onSubmit"),{isLoading:z||W,fieldValues:m,stepState:n,checkFieldUpdates:Yt,back:Xt,next:Zt,goTo:Ve,onSubmit:Ie,fields:e[n.currentStep.name],meta:{fields:B.current,fieldsets:Pe[n.currentStep.name]},parseFormValues:pt,handleValidation:a(async t=>{if(n.currentStep.name==="select_country")return J.handleValidation(t);if(_&&n.currentStep.name==="basic_information"){let o=await f(t,_?.fields,{isPartialValidation:!1});return _?.handleValidation(o)}if(g&&n.currentStep.name==="contract_details"){let o=await f(t,g?.fields,{isPartialValidation:!1});return g?.handleValidation(o)}if(C&&n.currentStep.name==="contract_preview"){let o=await f(t,C?.fields,{isPartialValidation:!0});return C?.handleValidation(o)}if(b&&n.currentStep.name==="pricing_plan"){let o=await f(t,b?.fields,{isPartialValidation:!1});return b?.handleValidation(o)}return null},"handleValidation"),initialValues:ve,employmentId:c,refetchEmployment:te,isSubmitting:ot.isPending||it.isPending||G.isPending||st.isPending||ct.isPending||at.isPending,documentPreviewPdf:Q,canInvite:ne,isEmploymentReadOnly:V,invitedStatus:oe,employment:i,defaultLegalEntity:ee}},"useContractorOnboarding");export{yn as a};
2
+ //# sourceMappingURL=chunk-KXOVDXNX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractorOnboarding/hooks.tsx","../src/common/api/legal-entities.ts","../src/common/api/identity.ts"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from 'react';\nimport { FieldValues } from 'react-hook-form';\nimport omit from 'lodash.omit';\nimport { JSFFields } from '@/src/types/remoteFlows';\nimport {\n CreateContractDocument,\n Employment,\n EmploymentCreateParams,\n} from '@/src/client/types.gen';\nimport {\n getInitialValues,\n parseJSFToValidate,\n} from '@/src/components/form/utils';\nimport { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';\nimport {\n useContractorOnboardingDetailsSchema,\n useCreateContractorContractDocument,\n useGetContractDocumentSignatureSchema,\n usePostManageContractorSubscriptions,\n useContractorSubscriptionSchemaField,\n useGetShowContractDocument,\n useSignContractDocument,\n useUpdateUKandSaudiFields,\n useGetIR35File,\n useGetContractDocuments,\n} from '@/src/flows/ContractorOnboarding/api';\nimport { ContractorOnboardingFlowProps } from '@/src/flows/ContractorOnboarding/types';\nimport {\n STEPS,\n STEPS_WITHOUT_SELECT_COUNTRY,\n calculateProvisionalStartDateDescription,\n} from '@/src/flows/ContractorOnboarding/utils';\nimport {\n useCountriesSchemaField,\n useCreateEmployment,\n useJSONSchemaForm,\n useUpdateEmployment,\n} from '@/src/flows/Onboarding/api';\nimport {\n disabledInviteButtonEmploymentStatus,\n reviewStepAllowedEmploymentStatus,\n} from '@/src/flows/Onboarding/utils';\nimport { FlowOptions, JSFModify, JSONSchemaFormType } from '@/src/flows/types';\nimport { Step, useStepState } from '@/src/flows/useStepState';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { createStructuredError, prettifyFormValues } from '@/src/lib/utils';\nimport { JSFFieldset, Meta } from '@/src/types/remoteFlows';\nimport {\n contractorStandardProductIdentifier,\n contractorPlusProductIdentifier,\n corProductIdentifier,\n} from '@/src/flows/ContractorOnboarding/constants';\nimport {\n buildBasicInformationJsfModify,\n buildContractDetailsJsfModify,\n buildContractPreviewJsfModify,\n} from '@/src/flows/ContractorOnboarding/jsfModify';\nimport { useUploadFile } from '@/src/common/api/files';\nimport { dataURLtoFile } from '@/src/lib/files';\nimport { useEmploymentQuery } from '@/src/common/api/employment';\nimport { useDefaultLegalEntity } from '@/src/common/api/legal-entities';\n\ntype useContractorOnboardingProps = Omit<\n ContractorOnboardingFlowProps,\n 'render'\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: null,\n pricing_plan: null,\n contract_preview: null,\n review: null,\n};\n\nconst jsonSchemaToEmployment: Partial<\n Record<JSONSchemaFormType, keyof Employment>\n> = {\n employment_basic_information: 'basic_information',\n};\n\nconst provisionalStartDate = new Date().toISOString().split('T')[0];\n\nexport const useContractorOnboarding = ({\n countryCode,\n externalId,\n employmentId,\n skipSteps,\n options,\n initialValues: onboardingInitialValues,\n}: useContractorOnboardingProps) => {\n const [internalCountryCode, setInternalCountryCode] = useState<string | null>(\n countryCode || null,\n );\n const [internalEmploymentId, setInternalEmploymentId] = useState<\n string | undefined\n >(employmentId);\n const [internalContractDocumentId, setInternalContractDocumentId] = useState<\n string | undefined\n >(undefined);\n const fieldsMetaRef = useRef<{\n select_country: Meta;\n basic_information: Meta;\n contract_details: Meta;\n contract_preview: Meta;\n pricing_plan: Meta;\n }>({\n select_country: {},\n basic_information: {},\n contract_details: {},\n contract_preview: {},\n pricing_plan: {},\n });\n\n const stepsToUse = skipSteps?.includes('select_country')\n ? STEPS_WITHOUT_SELECT_COUNTRY\n : STEPS;\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 );\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 const defaultLegalEntity = useDefaultLegalEntity();\n\n const { status: employmentStatus } = employment || {};\n\n const isEmploymentReadOnly =\n employmentStatus &&\n reviewStepAllowedEmploymentStatus.includes(employmentStatus);\n\n const canInvite =\n employmentStatus &&\n !disabledInviteButtonEmploymentStatus.includes(employmentStatus);\n\n const invitedStatus: 'invited' | 'not_invited' = useMemo(() => {\n const isInvited = employmentStatus === 'invited';\n\n return isInvited ? 'invited' : 'not_invited';\n }, [employmentStatus]);\n\n const createEmploymentMutation = useCreateEmployment();\n const updateEmploymentMutation = useUpdateEmployment(\n internalCountryCode as string,\n options,\n );\n const createContractorContractDocumentMutation =\n useCreateContractorContractDocument();\n const uploadFileMutation = useUploadFile();\n const { mutateAsync: updateUKandSaudiFieldsMutation } =\n useUpdateUKandSaudiFields(\n createContractorContractDocumentMutation,\n uploadFileMutation,\n fieldValues,\n );\n\n const { mutateAsyncOrThrow: updateEmploymentMutationAsync } =\n mutationToPromise(updateEmploymentMutation);\n const signContractDocumentMutation = useSignContractDocument();\n const manageContractorSubscriptionMutation =\n usePostManageContractorSubscriptions();\n\n const { mutateAsyncOrThrow: createEmploymentMutationAsync } =\n mutationToPromise(createEmploymentMutation);\n\n const { mutateAsyncOrThrow: createContractorContractDocumentMutationAsync } =\n mutationToPromise(createContractorContractDocumentMutation);\n\n const { mutateAsyncOrThrow: signContractDocumentMutationAsync } =\n mutationToPromise(signContractDocumentMutation);\n\n const { mutateAsyncOrThrow: manageContractorSubscriptionMutationAsync } =\n mutationToPromise(manageContractorSubscriptionMutation);\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 { 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 {\n form: selectContractorSubscriptionForm,\n isLoading: isLoadingContractorSubscriptions,\n } = useContractorSubscriptionSchemaField(internalEmploymentId as string, {\n jsonSchemaVersion: options?.jsonSchemaVersion,\n queryOptions: {\n enabled:\n stepState.currentStep.name === 'pricing_plan' ||\n (Boolean(employmentId) && isEmploymentReadOnly),\n },\n });\n\n const formType =\n stepToFormSchemaMap[stepState.currentStep.name] ||\n 'contractor_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 }: {\n form: JSONSchemaFormType;\n options?: {\n jsfModify?: JSFModify;\n queryOptions?: { enabled?: boolean };\n jsonSchemaVersion?: FlowOptions['jsonSchemaVersion'];\n };\n query?: Record<string, string>;\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 });\n };\n\n const isBasicInformationDetailsEnabled = Boolean(\n internalCountryCode &&\n (stepState.currentStep.name === 'basic_information' ||\n Boolean(employmentId)),\n );\n\n const isContractorOnboardingDetailsEnabled = Boolean(\n internalCountryCode &&\n (stepState.currentStep.name === 'contract_details' ||\n Boolean(employmentId)),\n );\n\n const isIR35FileEnabled = Boolean(\n internalCountryCode === 'GBR' &&\n employmentId &&\n stepState.currentStep.name === 'basic_information',\n );\n\n const { data: ir35File, isLoading: isLoadingIR35File } = useGetIR35File(\n employmentId as string,\n {\n enabled: isIR35FileEnabled,\n },\n );\n\n const { data: contractDocuments, isLoading: isLoadingContractDocuments } =\n useGetContractDocuments(employmentId as string, {\n enabled: Boolean(employmentId),\n });\n\n useEffect(() => {\n if (\n contractDocuments &&\n contractDocuments.length > 0 &&\n !internalContractDocumentId\n ) {\n setInternalContractDocumentId(contractDocuments[0].id);\n }\n }, [contractDocuments, internalContractDocumentId]);\n\n const {\n data: basicInformationForm,\n isLoading: isLoadingBasicInformationForm,\n } = useJSONSchema({\n form: 'contractor_basic_information',\n options: {\n jsfModify: buildBasicInformationJsfModify(\n internalCountryCode as string,\n options,\n ),\n queryOptions: {\n enabled: isBasicInformationDetailsEnabled,\n },\n },\n });\n\n const descriptionProvisionalStartDate = useMemo(() => {\n return calculateProvisionalStartDateDescription(\n employment?.basic_information?.provisional_start_date as string,\n fieldValues?.service_duration?.provisional_start_date as string,\n );\n }, [\n employment?.basic_information?.provisional_start_date,\n fieldValues?.service_duration?.provisional_start_date,\n ]);\n\n const selectedPricingPlan = useMemo(() => {\n if (!employment?.contractor_type) {\n return undefined;\n }\n const subscriptions = {\n standard: contractorStandardProductIdentifier,\n plus: contractorPlusProductIdentifier,\n cor: corProductIdentifier,\n };\n return (\n subscriptions[\n employment?.contractor_type as keyof typeof subscriptions\n ] || contractorStandardProductIdentifier\n );\n }, [employment]);\n\n const {\n data: contractorOnboardingDetailsForm,\n isLoading: isLoadingContractorOnboardingDetailsForm,\n } = useContractorOnboardingDetailsSchema({\n countryCode: internalCountryCode as string,\n fieldValues: fieldValues,\n options: {\n queryOptions: {\n enabled: isContractorOnboardingDetailsEnabled,\n },\n jsfModify: buildContractDetailsJsfModify(\n options?.jsfModify?.contract_details,\n descriptionProvisionalStartDate,\n selectedPricingPlan,\n fieldValues,\n ),\n },\n });\n\n const isSignatureSchemaEnabled = useMemo(() => {\n return (\n stepState.currentStep.name === 'contract_preview' ||\n (Boolean(employmentId) && isEmploymentReadOnly)\n );\n }, [stepState.currentStep.name, employmentId, isEmploymentReadOnly]);\n\n const { data: signatureSchemaForm } = useGetContractDocumentSignatureSchema({\n fieldValues: fieldValues,\n options: {\n queryOptions: {\n enabled: isSignatureSchemaEnabled,\n },\n jsfModify: buildContractPreviewJsfModify(options, fieldValues),\n },\n });\n\n const { data: documentPreviewPdf, isLoading: isLoadingDocumentPreviewForm } =\n useGetShowContractDocument({\n employmentId: internalEmploymentId as string,\n contractDocumentId: internalContractDocumentId as string,\n options: {\n queryOptions: {\n enabled: Boolean(internalContractDocumentId),\n },\n },\n });\n\n const stepFields: Record<keyof typeof STEPS, JSFFields> = useMemo(\n () => ({\n select_country: selectCountryForm?.fields || [],\n basic_information: basicInformationForm?.fields || [],\n pricing_plan: selectContractorSubscriptionForm?.fields || [],\n contract_details: contractorOnboardingDetailsForm?.fields || [],\n contract_preview: signatureSchemaForm?.fields || [],\n review: [],\n }),\n [\n selectCountryForm?.fields,\n basicInformationForm?.fields,\n selectContractorSubscriptionForm?.fields,\n contractorOnboardingDetailsForm?.fields,\n signatureSchemaForm?.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 pricing_plan: null,\n contract_details: contractorOnboardingDetailsForm?.meta['x-jsf-fieldsets'],\n contract_preview: null,\n review: null,\n };\n\n const {\n country,\n basic_information: employmentBasicInformation = {},\n contract_details: employmentContractDetails = {},\n } = employment || {};\n\n const employmentCountryCode = country?.code;\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 // memoize file conversion to avoid re-converting the file on every render\n // noticed performance issues when not doing memoizing individually\n const convertedIr35File = useMemo(() => {\n if (!ir35File?.content) return null;\n return dataURLtoFile(ir35File.content as unknown as string, ir35File.name);\n }, [ir35File?.content, ir35File?.name]);\n\n const basicInformationInitialValues = useMemo(() => {\n const initialValues = {\n provisional_start_date: provisionalStartDate,\n ...onboardingInitialValues,\n ...employmentBasicInformation,\n ir35: employment?.contract_details?.ir_35,\n saudi_nationality_status: employment?.contract_details?.nationality,\n ...(convertedIr35File && {\n ir35_sds_file: [convertedIr35File],\n }),\n };\n\n return getInitialValues(stepFields.basic_information, initialValues);\n }, [\n onboardingInitialValues,\n employmentBasicInformation,\n employment?.contract_details?.ir_35,\n employment?.contract_details?.nationality,\n convertedIr35File,\n stepFields.basic_information,\n ]);\n\n const contractDetailsInitialValues = useMemo(() => {\n const hardcodedValues = {\n service_duration: {\n provisional_start_date:\n employmentBasicInformation.provisional_start_date,\n },\n };\n const initialValues = {\n ...hardcodedValues,\n ...onboardingInitialValues,\n ...employmentContractDetails,\n };\n\n return getInitialValues(stepFields.contract_details, initialValues);\n }, [\n stepFields.contract_details,\n employmentContractDetails,\n onboardingInitialValues,\n employmentBasicInformation,\n ]);\n\n const contractPreviewInitialValues = useMemo(() => {\n const signature = documentPreviewPdf?.contract_document?.signatories?.find(\n (signatory) => signatory.type === 'company',\n );\n const initialValues = {\n ...onboardingInitialValues,\n signature: signature?.signature,\n };\n\n return getInitialValues(stepFields.contract_preview, initialValues);\n }, [\n stepFields.contract_preview,\n onboardingInitialValues,\n documentPreviewPdf,\n ]);\n\n const pricingPlanInitialValues = useMemo(() => {\n const preselectedPricingPlan = {\n subscription: selectedPricingPlan,\n };\n const initialValues = {\n ...preselectedPricingPlan,\n ...onboardingInitialValues,\n };\n\n return getInitialValues(stepFields.pricing_plan, initialValues);\n }, [stepFields.pricing_plan, onboardingInitialValues, selectedPricingPlan]);\n\n const initialValues = useMemo(() => {\n return {\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_details: contractDetailsInitialValues,\n contract_preview: contractPreviewInitialValues,\n pricing_plan: pricingPlanInitialValues,\n };\n }, [\n selectCountryInitialValues,\n basicInformationInitialValues,\n contractDetailsInitialValues,\n contractPreviewInitialValues,\n pricingPlanInitialValues,\n ]);\n\n const shouldHandleReadOnlyEmployment = Boolean(\n employmentId &&\n isEmploymentReadOnly &&\n stepState.currentStep.name !== 'review',\n );\n\n const initialLoading =\n isLoadingCountries ||\n isLoadingBasicInformationForm ||\n isLoadingEmployment ||\n isLoadingContractorOnboardingDetailsForm ||\n isLoadingContractorSubscriptions ||\n isLoadingDocumentPreviewForm ||\n isLoadingIR35File ||\n isLoadingContractDocuments;\n\n const isNavigatingToReview = useMemo(() => {\n return Boolean(\n shouldHandleReadOnlyEmployment &&\n !initialLoading &&\n Boolean(internalContractDocumentId) &&\n stepFields.basic_information.length > 0 &&\n stepFields.contract_details.length > 0 &&\n stepFields.contract_preview.length > 0,\n );\n }, [\n shouldHandleReadOnlyEmployment,\n initialLoading,\n internalContractDocumentId,\n stepFields.basic_information.length,\n stepFields.contract_details.length,\n stepFields.contract_preview.length,\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 contract_preview: prettifyFormValues(\n contractPreviewInitialValues,\n stepFields.contract_preview,\n ),\n pricing_plan: prettifyFormValues(\n pricingPlanInitialValues,\n stepFields.pricing_plan,\n ),\n };\n\n setStepValues({\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_details: contractDetailsInitialValues,\n contract_preview: {},\n pricing_plan: pricingPlanInitialValues,\n review: {},\n });\n goToStep('review');\n }\n }, [\n isNavigatingToReview,\n goToStep,\n selectCountryInitialValues,\n basicInformationInitialValues,\n contractDetailsInitialValues,\n setStepValues,\n stepFields.select_country,\n stepFields.basic_information,\n stepFields.contract_details,\n stepFields.pricing_plan,\n pricingPlanInitialValues,\n stepFields.contract_preview,\n contractPreviewInitialValues,\n ]);\n\n const goTo = (step: keyof typeof STEPS) => {\n goToStep(step);\n };\n\n const parseFormValues = async (values: FieldValues) => {\n if (selectCountryForm && stepState.currentStep.name === 'select_country') {\n return values;\n }\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 contractorOnboardingDetailsForm &&\n stepState.currentStep.name === 'contract_details'\n ) {\n return await parseJSFToValidate(\n values,\n contractorOnboardingDetailsForm?.fields,\n {\n isPartialValidation: false,\n },\n );\n }\n\n if (\n signatureSchemaForm &&\n stepState.currentStep.name === 'contract_preview'\n ) {\n return await parseJSFToValidate(values, signatureSchemaForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n if (\n selectContractorSubscriptionForm &&\n stepState.currentStep.name === 'pricing_plan'\n ) {\n return await parseJSFToValidate(\n values,\n selectContractorSubscriptionForm?.fields,\n {\n isPartialValidation: false,\n },\n );\n }\n\n return {};\n };\n\n async function onSubmit(values: FieldValues) {\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 const parsedValues = await parseFormValues(values);\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\n if (isEmploymentNotLoaded || hasChangedCountry) {\n const basicInformationParsedValues = omit(\n parsedValues,\n 'saudi_nationality_status',\n 'ir35',\n 'ir35_sds_file',\n );\n const basicInformationPayload: EmploymentCreateParams = {\n basic_information: basicInformationParsedValues,\n type: 'contractor',\n country_code: internalCountryCode,\n external_id: externalId,\n };\n const response = await createEmploymentMutationAsync(\n basicInformationPayload,\n );\n const employmentId = response?.data?.employment?.id;\n if (!employmentId) {\n throw createStructuredError('Employment ID not found');\n }\n\n setInternalEmploymentId(employmentId);\n await updateUKandSaudiFieldsMutation({\n employmentId: employmentId as string,\n });\n\n return response;\n } else if (internalEmploymentId) {\n const basicInformationParsedValues = omit(\n parsedValues,\n 'saudi_nationality_status',\n 'ir35',\n 'ir35_sds_file',\n );\n\n await updateUKandSaudiFieldsMutation({\n employmentId: internalEmploymentId,\n });\n return updateEmploymentMutationAsync({\n employmentId: internalEmploymentId,\n basic_information: basicInformationParsedValues,\n });\n }\n\n return;\n }\n case 'contract_details': {\n const payload: CreateContractDocument = {\n contract_document: parsedValues,\n };\n const response = await createContractorContractDocumentMutationAsync({\n employmentId: internalEmploymentId as string,\n payload,\n });\n const contractDocumentId = response?.data?.contract_document?.id;\n if (!contractDocumentId) {\n throw createStructuredError('Contract document ID not found');\n }\n setInternalContractDocumentId(contractDocumentId);\n return response;\n }\n\n case 'contract_preview': {\n return signContractDocumentMutationAsync({\n employmentId: internalEmploymentId as string,\n contractDocumentId: internalContractDocumentId as string,\n payload: {\n signature: values.signature,\n },\n });\n }\n case 'pricing_plan': {\n if (values.subscription == contractorStandardProductIdentifier) {\n return manageContractorSubscriptionMutationAsync({\n employmentId: internalEmploymentId as string,\n payload: {\n operation: 'downgrade',\n },\n });\n } else if (values.subscription == contractorPlusProductIdentifier) {\n return manageContractorSubscriptionMutationAsync({\n employmentId: internalEmploymentId as string,\n payload: {\n operation: 'upgrade',\n },\n });\n }\n\n throw createStructuredError('invalid selection');\n }\n\n default: {\n throw createStructuredError('Invalid step state');\n }\n }\n }\n\n const isLoading = initialLoading || shouldHandleReadOnlyEmployment;\n\n return {\n /**\n * Loading state indicating if the flow is loading data\n */\n isLoading,\n\n /**\n * Current state of the form fields for the current step.\n */\n fieldValues,\n\n /**\n * Current step state containing the current step and total number of steps\n */\n stepState,\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 handle going back to the previous step\n * @returns {void}\n */\n back: previousStep,\n\n /**\n * Function to handle going to the next step\n * @returns {void}\n */\n next: nextStep,\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: goTo,\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 * Array of form fields from the onboarding schema\n */\n fields: stepFields[stepState.currentStep.name],\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 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 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\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 contractorOnboardingDetailsForm &&\n stepState.currentStep.name === 'contract_details'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n contractorOnboardingDetailsForm?.fields,\n { isPartialValidation: false },\n );\n return contractorOnboardingDetailsForm?.handleValidation(parsedValues);\n }\n\n if (\n signatureSchemaForm &&\n stepState.currentStep.name === 'contract_preview'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n signatureSchemaForm?.fields,\n { isPartialValidation: true },\n );\n return signatureSchemaForm?.handleValidation(parsedValues);\n }\n\n if (\n selectContractorSubscriptionForm &&\n stepState.currentStep.name === 'pricing_plan'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n selectContractorSubscriptionForm?.fields,\n { isPartialValidation: false },\n );\n return selectContractorSubscriptionForm?.handleValidation(parsedValues);\n }\n\n return null;\n },\n\n /**\n * Initial form values\n */\n initialValues,\n\n /**\n * Employment id\n */\n employmentId: internalEmploymentId,\n\n /**\n * Function to refetch the employment data\n * @returns {void}\n */\n refetchEmployment: refetchEmployment,\n\n /**\n * Loading state indicating if the onboarding mutation is in progress\n */\n isSubmitting:\n createEmploymentMutation.isPending ||\n updateEmploymentMutation.isPending ||\n createContractorContractDocumentMutation.isPending ||\n signContractDocumentMutation.isPending ||\n manageContractorSubscriptionMutation.isPending ||\n uploadFileMutation.isPending,\n\n /**\n * Document preview PDF data\n */\n documentPreviewPdf,\n\n /**\n * let's the user know if the company can invite employees\n * @returns {boolean}\n */\n canInvite,\n\n /**\n * let's the user know that the employment cannot be edited, happens when employment.status is invited\n * @returns {boolean}\n */\n isEmploymentReadOnly,\n /**\n * let's the user know if the employment is invited or not\n * @returns {'invited' | 'not_invited'}\n */\n invitedStatus,\n\n /**\n * Employment data\n * @returns {Employment}\n */\n employment,\n\n /**\n * Default legal entity\n * @returns {CompanyLegalEntity}\n */\n defaultLegalEntity,\n };\n};\n","import { useQuery } from '@tanstack/react-query';\nimport {\n getIndexCompanyLegalEntities,\n IdentityCurrentResponse,\n} from '@/src/client';\nimport { Client } from '@/src/client/client';\nimport { useClient } from '@/src/context';\nimport { useIdentity } from '@/src/common/api/identity';\n\nfunction 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\n/**\n * Hook to get the legal entities for a company\n * @param companyId - The company ID\n * @returns The legal entities\n */\nexport const useLegalEntities = () => {\n const { client } = useClient();\n const { data: identity } = useIdentity();\n const companyId = hasCompany(identity) ? (identity?.company?.id ?? '') : '';\n\n return useQuery({\n queryKey: ['legal-entities', companyId],\n queryFn: () =>\n getIndexCompanyLegalEntities({\n client: client as Client,\n path: {\n company_id: companyId,\n },\n }),\n select: (data) => data.data?.data?.legal_entities,\n enabled: !!companyId,\n });\n};\n\nexport const useDefaultLegalEntity = () => {\n const { data: legalEntities } = useLegalEntities();\n return legalEntities?.find((legalEntity) => legalEntity.is_default);\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":"gvBAAA,OAAS,aAAAA,GAAW,WAAAC,EAAS,UAAAC,GAAQ,YAAAC,MAAgB,QAErD,OAAOC,OAAU,cCFjB,OAAS,YAAAC,OAAgB,wBCAzB,OAAS,YAAAC,OAAgB,wBAKlB,IAAMC,GAAcC,EAAA,IAAM,CAC/B,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,GAAS,CACd,SAAU,CAAC,UAAU,EACrB,QAASH,EAAA,IACPI,GAAmB,CACjB,OAAQH,EACR,QAAS,CAAE,cAAe,EAAG,CAC/B,CAAC,EAJM,WAKT,OAAQD,EAACK,GAASA,EAAK,MAAM,KAArB,SACV,CAAC,CACH,EAX2B,eDI3B,SAASC,GACPC,EAIA,CACA,OAAOA,GAAY,MAAQ,YAAaA,CAC1C,CAPSC,EAAAF,GAAA,cAcF,IAAMG,GAAmBD,EAAA,IAAM,CACpC,GAAM,CAAE,OAAAE,CAAO,EAAIC,EAAU,EACvB,CAAE,KAAMJ,CAAS,EAAIK,GAA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ACzCQ,GAA6B,WAC7BE,GAAqC,WACrCR,GAAmB,UAKrB,mBAAAwD,EAMA,UAAAlE,GAMA,qBAAAF,EAKA,cAAAI,GAMA,WAAAX,EAMA,mBAAAI,EACF,CACF,EA34BuC","names":["useEffect","useMemo","useRef","useState","omit","useQuery","useQuery","useIdentity","__name","client","useClient","useQuery","getCurrentIdentity","data","hasCompany","identity","__name","useLegalEntities","client","useClient","useIdentity","companyId","useQuery","getIndexCompanyLegalEntities","data","useDefaultLegalEntity","legalEntities","legalEntity","stepToFormSchemaMap","jsonSchemaToEmployment","provisionalStartDate","useContractorOnboarding","__name","countryCode","externalId","employmentId","skipSteps","options","onboardingInitialValues","internalCountryCode","setInternalCountryCode","useState","internalEmploymentId","setInternalEmploymentId","internalContractDocumentId","setInternalContractDocumentId","fieldsMetaRef","useRef","stepsToUse","STEPS_WITHOUT_SELECT_COUNTRY","STEPS","fieldValues","stepState","setFieldValues","previousStep","nextStep","goToStep","setStepValues","useStepState","employment","isLoadingEmployment","refetchEmployment","useEmploymentQuery","defaultLegalEntity","useDefaultLegalEntity","employmentStatus","isEmploymentReadOnly","reviewStepAllowedEmploymentStatus","canInvite","disabledInviteButtonEmploymentStatus","invitedStatus","useMemo","createEmploymentMutation","useCreateEmployment","updateEmploymentMutation","useUpdateEmployment","createContractorContractDocumentMutation","useCreateContractorContractDocument","uploadFileMutation","useUploadFile","updateUKandSaudiFieldsMutation","useUpdateUKandSaudiFields","updateEmploymentMutationAsync","mutationToPromise","signContractDocumentMutation","useSignContractDocument","manageContractorSubscriptionMutation","usePostManageContractorSubscriptions","createEmploymentMutationAsync","createContractorContractDocumentMutationAsync","signContractDocumentMutationAsync","manageContractorSubscriptionMutationAsync","selectCountryForm","isLoadingCountries","useCountriesSchemaField","selectContractorSubscriptionForm","isLoadingContractorSubscriptions","useContractorSubscriptionSchemaField","formType","employmentKey","serverEmploymentData","useJSONSchema","form","jsonSchemaOptions","query","mergedFormValues","useJSONSchemaForm","isBasicInformationDetailsEnabled","isContractorOnboardingDetailsEnabled","isIR35FileEnabled","ir35File","isLoadingIR35File","useGetIR35File","contractDocuments","isLoadingContractDocuments","useGetContractDocuments","useEffect","basicInformationForm","isLoadingBasicInformationForm","buildBasicInformationJsfModify","descriptionProvisionalStartDate","calculateProvisionalStartDateDescription","selectedPricingPlan","contractorStandardProductIdentifier","contractorPlusProductIdentifier","corProductIdentifier","contractorOnboardingDetailsForm","isLoadingContractorOnboardingDetailsForm","useContractorOnboardingDetailsSchema","buildContractDetailsJsfModify","isSignatureSchemaEnabled","signatureSchemaForm","useGetContractDocumentSignatureSchema","buildContractPreviewJsfModify","documentPreviewPdf","isLoadingDocumentPreviewForm","useGetShowContractDocument","stepFields","stepFieldsWithFlatFieldsets","country","employmentBasicInformation","employmentContractDetails","employmentCountryCode","selectCountryInitialValues","getInitialValues","convertedIr35File","dataURLtoFile","basicInformationInitialValues","initialValues","contractDetailsInitialValues","contractPreviewInitialValues","signature","signatory","pricingPlanInitialValues","shouldHandleReadOnlyEmployment","initialLoading","isNavigatingToReview","prettifyFormValues","goTo","step","parseFormValues","values","parseJSFToValidate","onSubmit","currentStepName","parsedValues","isEmploymentNotLoaded","hasChangedCountry","basicInformationPayload","omit","response","createStructuredError","basicInformationParsedValues","contractDocumentId"]}
@@ -1,2 +1,2 @@
1
- import{a as o,b as a,c as i}from"./chunk-FJPY27YJ.js";import{a as n}from"./chunk-P37U34EQ.js";import{AlertCircle as p}from"lucide-react";import{jsx as t,jsxs as c}from"react/jsx-runtime";function g({data:s}){let{title:e,description:r,severity:l}=s,m={warning:"warning",error:"destructive",info:"default",success:"warning"}[l]??"warning";return c(o,{variant:m,children:[t(p,{className:"h-4 w-4"}),e&&t(a,{dangerouslySetInnerHTML:{__html:e}}),r&&t(i,{dangerouslySetInnerHTML:{__html:r}})]})}n(g,"StatementDefault");export{g as a};
2
- //# sourceMappingURL=chunk-CKA37AR5.js.map
1
+ import{a as o,b as a,c as i}from"./chunk-6MJ5MIUI.js";import{a as n}from"./chunk-P37U34EQ.js";import{AlertCircle as p}from"lucide-react";import{jsx as t,jsxs as c}from"react/jsx-runtime";function g({data:s}){let{title:e,description:r,severity:l}=s,m={warning:"warning",error:"destructive",info:"default",success:"warning"}[l]??"warning";return c(o,{variant:m,children:[t(p,{className:"h-4 w-4"}),e&&t(a,{dangerouslySetInnerHTML:{__html:e}}),r&&t(i,{dangerouslySetInnerHTML:{__html:r}})]})}n(g,"StatementDefault");export{g as a};
2
+ //# sourceMappingURL=chunk-L53XOWY6.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-XQUHG7HJ.js";import{b as i}from"./chunk-PGWKJ6FK.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function y({onSubmit:s,onSuccess:c,onError:t}){let{onboardingBag:o}=i(),u=e(async n=>{try{await s?.({countryCode:n.country});let r=await o.onSubmit(n);if(r?.data){await c?.(r?.data),o?.next();return}r?.error&&t?.({error:r.error,rawError:r.rawError,fieldErrors:[]})}catch(r){t?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),l=o.stepState.values?.select_country||o.initialValues.select_country;return d(a,{defaultValues:l,onSubmit:u})}e(y,"SelectCountryStep");export{y as a};
2
- //# sourceMappingURL=chunk-UXUZA7XH.js.map
1
+ import{a}from"./chunk-THBDZR3D.js";import{b as i}from"./chunk-PGWKJ6FK.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function y({onSubmit:s,onSuccess:c,onError:t}){let{onboardingBag:o}=i(),u=e(async n=>{try{await s?.({countryCode:n.country});let r=await o.onSubmit(n);if(r?.data){await c?.(r?.data),o?.next();return}r?.error&&t?.({error:r.error,rawError:r.rawError,fieldErrors:[]})}catch(r){t?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),l=o.stepState.values?.select_country||o.initialValues.select_country;return d(a,{defaultValues:l,onSubmit:u})}e(y,"SelectCountryStep");export{y as a};
2
+ //# sourceMappingURL=chunk-LGIHVJA5.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-GCWEOZBS.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as o}from"react/jsx-runtime";function a({className:i,type:r,...n}){return o("input",{type:r,"data-slot":"input",className:t("shadow-xs border-input file:text-foreground placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-xl border bg-transparent px-4 py-7 text-sm transition-[color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-focused","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),...n})}e(a,"Input");export{a};
2
- //# sourceMappingURL=chunk-JTSHX4RB.js.map
1
+ import{a as t}from"./chunk-J63QA2JC.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as o}from"react/jsx-runtime";function a({className:i,type:r,...n}){return o("input",{type:r,"data-slot":"input",className:t("shadow-xs border-input file:text-foreground placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-xl border bg-transparent px-4 py-7 text-sm transition-[color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-focused","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),...n})}e(a,"Input");export{a};
2
+ //# sourceMappingURL=chunk-MIK6GCO2.js.map
@@ -1,2 +1,2 @@
1
- import{a as n,b as i}from"./chunk-CEM3JUSV.js";import{a as e}from"./chunk-GCWEOZBS.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as t,jsxs as r}from"react/jsx-runtime";var l=["You submit your termination request.","Remote reviews your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.","A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.","Depending on the country-specific laws and the terms of the employment agreement, Remote may need to seek additional legal advice. We\u2019ll let you know if there are additional charges before proceeding.","Terms and conditions for the termination are finalized.","You verbally communicate the termination to the employee.","Remote shares termination documents with the employee.","The employee signs the termination documents if required.","Remote processes the final salary and offboards the employee."],f=o(()=>r(s,{children:[t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__Title"),children:"Please read carefully before you continue"}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description"),children:"Please do not inform the employee of the termination. Remote will lead communication with them after you submit this form and they finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. Remote will ask for the details regarding that communication and they'll take it from there."}),t(i,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:n.terminationEmployeeCommunication,children:"Learn more about employee communication"}),t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessTitle"),children:"The termination process"}),t("ul",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside"),children:l.map((a,m)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},m))})]}),"TerminationDialogInfoContent");export{f as a};
2
- //# sourceMappingURL=chunk-4JOZ4VIJ.js.map
1
+ import{a as n,b as i}from"./chunk-BDJLITVT.js";import{a as e}from"./chunk-J63QA2JC.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as t,jsxs as r}from"react/jsx-runtime";var l=["You submit your termination request.","Remote reviews your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.","A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.","Depending on the country-specific laws and the terms of the employment agreement, Remote may need to seek additional legal advice. We\u2019ll let you know if there are additional charges before proceeding.","Terms and conditions for the termination are finalized.","You verbally communicate the termination to the employee.","Remote shares termination documents with the employee.","The employee signs the termination documents if required.","Remote processes the final salary and offboards the employee."],f=o(()=>r(s,{children:[t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__Title"),children:"Please read carefully before you continue"}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description"),children:"Please do not inform the employee of the termination. Remote will lead communication with them after you submit this form and they finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. Remote will ask for the details regarding that communication and they'll take it from there."}),t(i,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:n.terminationEmployeeCommunication,children:"Learn more about employee communication"}),t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessTitle"),children:"The termination process"}),t("ul",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside"),children:l.map((a,m)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},m))})]}),"TerminationDialogInfoContent");export{f as a};
2
+ //# sourceMappingURL=chunk-N6XY7NC3.js.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-FJLSVTBJ.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-MM5K3XXY.js.map
1
+ import{a as n}from"./chunk-SBUJLXJH.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-NB3TN7O3.js.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-GCWEOZBS.js";import{a as s}from"./chunk-P37U34EQ.js";import*as n from"react";import{Drawer as r}from"vaul";import{jsx as a,jsxs as l}from"react/jsx-runtime";var d=s(({shouldScaleBackground:e=!0,...t})=>a(r.Root,{shouldScaleBackground:e,...t}),"Drawer");d.displayName="Drawer";var N=r.Trigger,f=r.Portal,P=r.Close,m=n.forwardRef(({className:e,...t},o)=>a(r.Overlay,{ref:o,className:i("fixed inset-0 z-50 bg-black/80",e),...t}));m.displayName=r.Overlay.displayName;var D=n.forwardRef(({className:e,children:t,showHandle:o=!0,...c},p)=>l(f,{children:[a(m,{}),l(r.Content,{ref:p,className:i("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...c,children:[o&&a("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));D.displayName="DrawerContent";var w=s(({className:e,...t})=>a("div",{className:i("grid gap-1.5 p-4 text-center sm:text-left",e),...t}),"DrawerHeader");w.displayName="DrawerHeader";var R=s(({className:e,...t})=>a("div",{className:i("mt-auto flex flex-col gap-2 p-4",e),...t}),"DrawerFooter");R.displayName="DrawerFooter";var u=n.forwardRef(({className:e,...t},o)=>a(r.Title,{ref:o,className:i("text-lg font-semibold leading-none tracking-tight",e),...t}));u.displayName=r.Title.displayName;var g=n.forwardRef(({className:e,...t},o)=>a(r.Description,{ref:o,className:i("text-sm text-muted-foreground",e),...t}));g.displayName=r.Description.displayName;export{d as a,N as b,D as c,w as d,u as e,g as f};
2
- //# sourceMappingURL=chunk-ILX4QHHH.js.map
1
+ import{a as i}from"./chunk-J63QA2JC.js";import{a as s}from"./chunk-P37U34EQ.js";import*as n from"react";import{Drawer as r}from"vaul";import{jsx as a,jsxs as l}from"react/jsx-runtime";var d=s(({shouldScaleBackground:e=!0,...t})=>a(r.Root,{shouldScaleBackground:e,...t}),"Drawer");d.displayName="Drawer";var N=r.Trigger,f=r.Portal,P=r.Close,m=n.forwardRef(({className:e,...t},o)=>a(r.Overlay,{ref:o,className:i("fixed inset-0 z-50 bg-black/80",e),...t}));m.displayName=r.Overlay.displayName;var D=n.forwardRef(({className:e,children:t,showHandle:o=!0,...c},p)=>l(f,{children:[a(m,{}),l(r.Content,{ref:p,className:i("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...c,children:[o&&a("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));D.displayName="DrawerContent";var w=s(({className:e,...t})=>a("div",{className:i("grid gap-1.5 p-4 text-center sm:text-left",e),...t}),"DrawerHeader");w.displayName="DrawerHeader";var R=s(({className:e,...t})=>a("div",{className:i("mt-auto flex flex-col gap-2 p-4",e),...t}),"DrawerFooter");R.displayName="DrawerFooter";var u=n.forwardRef(({className:e,...t},o)=>a(r.Title,{ref:o,className:i("text-lg font-semibold leading-none tracking-tight",e),...t}));u.displayName=r.Title.displayName;var g=n.forwardRef(({className:e,...t},o)=>a(r.Description,{ref:o,className:i("text-sm text-muted-foreground",e),...t}));g.displayName=r.Description.displayName;export{d as a,N as b,D as c,w as d,u as e,g as f};
2
+ //# sourceMappingURL=chunk-NIQXQZ6X.js.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-FJLSVTBJ.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function d({onSubmit:m}){let{terminationBag:o}=a(),r=i(async t=>{let n=await o?.parseFormValues(t);await m?.(n),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:r})}i(d,"PaidTimeOffForm");export{d as a};
2
- //# sourceMappingURL=chunk-COAGOVMZ.js.map
1
+ import{a as e}from"./chunk-SBUJLXJH.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function d({onSubmit:m}){let{terminationBag:o}=a(),r=i(async t=>{let n=await o?.parseFormValues(t);await m?.(n),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:r})}i(d,"PaidTimeOffForm");export{d as a};
2
+ //# sourceMappingURL=chunk-NVX4O45S.js.map
@@ -0,0 +1,2 @@
1
+ var e="urn:remotecom:resource:product:contractor:standard:monthly",o="urn:remotecom:resource:product:contractor:plus:monthly",r="urn:remotecom:resource:product:contractor:aor:monthly",i="ir_35",t=[{title:"You add a new contractor and their details in Remote.",id:"add-contractor-details"},{title:"Contractor accepts invite to join Remote.",id:"contractor-accepts-invite"},{title:"Ask your contractor to sign their agreement with your company.",id:"ask-contractor-to-sign-agreement"},{title:"Once the agreement is signed, the contractor can begin work.",id:"agreement-signed-begin-work"},{title:"The contractor will submit invoices on a date specified by you.",id:"contractor-submits-invoices"},{title:"You will pay the contractor according to the agreed-upon terms.",id:"pay-contractor"}],n=[{title:"You add a new contractor and their details in Remote, and reconfirm our Terms of Service.",description:"Review all details carefully, as we'll use this information to draft the contract.",id:"add-contractor-details-and-reconfirm-terms"},{title:"You pay the reserve amount required to add the contractor.",id:"pay-reserve-amount"},{title:"The contractor is invited to the platform.",id:"contractor-invited-to-platform"},{title:"The contractor completes onboarding on Remote.",id:"contractor-completes-onboarding"},{title:"The contractor signs the services agreement with Remote.",id:"contractor-signs-services-agreement"},{title:"Contractor begins working.",id:"contractor-begins-working"},{title:"Contractor submits an invoice to Remote.",id:"contractor-submits-invoice"},{title:"You review and approve the invoice.",id:"review-and-approve-invoice"},{title:"A COR contractor payment invoice is generated, which you pay.",id:"cor-contractor-payment-invoice-generated"},{title:"Remote receives payment and pays contractor.",id:"remote-receives-payment-and-pays-contractor"},{title:"Contractor receives payment.",id:"contractor-receives-payment"}],a={[e]:t,[o]:t,[r]:n},c={[e]:{title:"Contractor Management",subtitle:"Engage and pay contractors compliantly",listItems:["Ideal for businesses wanting a straightforward solution to manage and pay contractors directly.","Helps with everything from contractor onboarding, invoicing, payments, and compliance.","Full control remains with you."],contractPillText:"Contract between you and contractor"},[o]:{title:"Contractor Management Plus",subtitle:"Engage and pay contractors with indemnity coverage",listItems:["Great for businesses concerned about contractor classification risks.","Helps with everything from contractor onboarding, invoicing, payments, and compliance.","Offers a warranty on Remote's localized, compliant contracts.","Control remains with you"],contractPillText:"Contract between you and contractor"},[r]:{title:"Contractor of Record",subtitle:"Remote reduces liability by directly engaging the contractor",listItems:["Ideal for businesses who want admin relief and have low risk tolerance.","No need to be experts in local labor laws; Remote manages its compliance with contractors.","Indemnity protection, Remote backs its compliance in administering and paying contractors"],contractPillText:"Contract between Remote and contractor"}};export{e as a,o as b,r as c,i as d,n as e,a as f,c as g};
2
+ //# sourceMappingURL=chunk-O3G6HQ3B.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractorOnboarding/constants.ts"],"sourcesContent":["export const contractorStandardProductIdentifier =\n 'urn:remotecom:resource:product:contractor:standard:monthly';\nexport const contractorPlusProductIdentifier =\n 'urn:remotecom:resource:product:contractor:plus:monthly';\nexport const corProductIdentifier =\n 'urn:remotecom:resource:product:contractor:aor:monthly';\n\nexport const IR35_FILE_SUBTYPE = 'ir_35';\n\nconst standardOnboardingWorkflow = [\n {\n title: 'You add a new contractor and their details in Remote.',\n id: 'add-contractor-details',\n },\n {\n title: 'Contractor accepts invite to join Remote.',\n id: 'contractor-accepts-invite',\n },\n {\n title: 'Ask your contractor to sign their agreement with your company.',\n id: 'ask-contractor-to-sign-agreement',\n },\n {\n title: 'Once the agreement is signed, the contractor can begin work.',\n id: 'agreement-signed-begin-work',\n },\n {\n title: 'The contractor will submit invoices on a date specified by you.',\n id: 'contractor-submits-invoices',\n },\n {\n title: 'You will pay the contractor according to the agreed-upon terms.',\n id: 'pay-contractor',\n },\n];\n\nexport const corOnboardingWorkflow = [\n {\n title:\n 'You add a new contractor and their details in Remote, and reconfirm our Terms of Service.',\n description:\n \"Review all details carefully, as we'll use this information to draft the contract.\",\n id: 'add-contractor-details-and-reconfirm-terms',\n },\n {\n title: 'You pay the reserve amount required to add the contractor.',\n id: 'pay-reserve-amount',\n },\n {\n title: 'The contractor is invited to the platform.',\n id: 'contractor-invited-to-platform',\n },\n {\n title: 'The contractor completes onboarding on Remote.',\n id: 'contractor-completes-onboarding',\n },\n {\n title: 'The contractor signs the services agreement with Remote.',\n id: 'contractor-signs-services-agreement',\n },\n {\n title: 'Contractor begins working.',\n id: 'contractor-begins-working',\n },\n {\n title: 'Contractor submits an invoice to Remote.',\n id: 'contractor-submits-invoice',\n },\n {\n title: 'You review and approve the invoice.',\n id: 'review-and-approve-invoice',\n },\n {\n title: 'A COR contractor payment invoice is generated, which you pay.',\n id: 'cor-contractor-payment-invoice-generated',\n },\n {\n title: 'Remote receives payment and pays contractor.',\n id: 'remote-receives-payment-and-pays-contractor',\n },\n {\n title: 'Contractor receives payment.',\n id: 'contractor-receives-payment',\n },\n];\n\n/**\n * Onboarding workflows for each pricing plan\n */\nexport const onboardingWorkflows: Record<\n string,\n { title: string; id: string; description?: string }[]\n> = {\n [contractorStandardProductIdentifier]: standardOnboardingWorkflow,\n // we assign the same workflow as its the same for standard and plus\n [contractorPlusProductIdentifier]: standardOnboardingWorkflow,\n [corProductIdentifier]: corOnboardingWorkflow,\n};\n\nexport const pricingPlanDetails = {\n [contractorStandardProductIdentifier]: {\n title: 'Contractor Management',\n subtitle: 'Engage and pay contractors compliantly',\n listItems: [\n 'Ideal for businesses wanting a straightforward solution to manage and pay contractors directly.',\n 'Helps with everything from contractor onboarding, invoicing, payments, and compliance.',\n 'Full control remains with you.',\n ],\n contractPillText: 'Contract between you and contractor',\n },\n [contractorPlusProductIdentifier]: {\n title: 'Contractor Management Plus',\n subtitle: 'Engage and pay contractors with indemnity coverage',\n listItems: [\n 'Great for businesses concerned about contractor classification risks.',\n 'Helps with everything from contractor onboarding, invoicing, payments, and compliance.',\n \"Offers a warranty on Remote's localized, compliant contracts.\",\n 'Control remains with you',\n ],\n contractPillText: 'Contract between you and contractor',\n },\n [corProductIdentifier]: {\n title: 'Contractor of Record',\n subtitle: 'Remote reduces liability by directly engaging the contractor',\n listItems: [\n 'Ideal for businesses who want admin relief and have low risk tolerance.',\n 'No need to be experts in local labor laws; Remote manages its compliance with contractors.',\n 'Indemnity protection, Remote backs its compliance in administering and paying contractors',\n ],\n contractPillText: 'Contract between Remote and contractor',\n },\n};\n"],"mappings":"AAAO,IAAMA,EACX,6DACWC,EACX,yDACWC,EACX,wDAEWC,EAAoB,QAE3BC,EAA6B,CACjC,CACE,MAAO,wDACP,GAAI,wBACN,EACA,CACE,MAAO,4CACP,GAAI,2BACN,EACA,CACE,MAAO,iEACP,GAAI,kCACN,EACA,CACE,MAAO,+DACP,GAAI,6BACN,EACA,CACE,MAAO,kEACP,GAAI,6BACN,EACA,CACE,MAAO,kEACP,GAAI,gBACN,CACF,EAEaC,EAAwB,CACnC,CACE,MACE,4FACF,YACE,qFACF,GAAI,4CACN,EACA,CACE,MAAO,6DACP,GAAI,oBACN,EACA,CACE,MAAO,6CACP,GAAI,gCACN,EACA,CACE,MAAO,iDACP,GAAI,iCACN,EACA,CACE,MAAO,2DACP,GAAI,qCACN,EACA,CACE,MAAO,6BACP,GAAI,2BACN,EACA,CACE,MAAO,2CACP,GAAI,4BACN,EACA,CACE,MAAO,sCACP,GAAI,4BACN,EACA,CACE,MAAO,gEACP,GAAI,0CACN,EACA,CACE,MAAO,+CACP,GAAI,6CACN,EACA,CACE,MAAO,+BACP,GAAI,6BACN,CACF,EAKaC,EAGT,CACF,CAACN,CAAmC,EAAGI,EAEvC,CAACH,CAA+B,EAAGG,EACnC,CAACF,CAAoB,EAAGG,CAC1B,EAEaE,EAAqB,CAChC,CAACP,CAAmC,EAAG,CACrC,MAAO,wBACP,SAAU,yCACV,UAAW,CACT,kGACA,yFACA,gCACF,EACA,iBAAkB,qCACpB,EACA,CAACC,CAA+B,EAAG,CACjC,MAAO,6BACP,SAAU,qDACV,UAAW,CACT,wEACA,yFACA,gEACA,0BACF,EACA,iBAAkB,qCACpB,EACA,CAACC,CAAoB,EAAG,CACtB,MAAO,uBACP,SAAU,+DACV,UAAW,CACT,0EACA,6FACA,2FACF,EACA,iBAAkB,wCACpB,CACF","names":["contractorStandardProductIdentifier","contractorPlusProductIdentifier","corProductIdentifier","IR35_FILE_SUBTYPE","standardOnboardingWorkflow","corOnboardingWorkflow","onboardingWorkflows","pricingPlanDetails"]}
@@ -1,6 +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,s])=>{s!=null&&(Array.isArray(s)?s.forEach(a=>N(r,o,a)):N(r,o,s))}),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:s,responseValidator:a,sseDefaultRetryDelay:h,sseMaxRetryAttempts:p,sseMaxRetryDelay:i,sseSleepFn:l,url:d,...n})=>{let E,g=l??(m=>new Promise(C=>setTimeout(C,m)));return{stream:t(async function*(){let m=h??3e3,C=0,T=n.signal??new AbortController().signal;for(;!T.aborted;){C++;let D=n.headers instanceof Headers?n.headers:new Headers(n.headers);E!==void 0&&D.set("Last-Event-ID",E);try{let x={redirect:"follow",...n,body:n.serializedBody,headers:D,signal:T},O=new Request(d,x);e&&(O=await e(d,x));let u=await(n.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="",F=t(()=>{try{w.cancel()}catch{}},"abortHandler");T.addEventListener("abort",F);try{for(;;){let{done:te,value:re}=await w.read();if(te)break;A+=re;let L=A.split(`
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,s])=>{s!=null&&(Array.isArray(s)?s.forEach(a=>N(r,o,a)):N(r,o,s))}),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:s,responseValidator:a,sseDefaultRetryDelay:h,sseMaxRetryAttempts:c,sseMaxRetryDelay:p,sseSleepFn:l,url:d,...n})=>{let E,g=l??(m=>new Promise(C=>setTimeout(C,m)));return{stream:t(async function*(){let m=h??3e3,C=0,T=n.signal??new AbortController().signal;for(;!T.aborted;){C++;let D=n.headers instanceof Headers?n.headers:new Headers(n.headers);E!==void 0&&D.set("Last-Event-ID",E);try{let x={redirect:"follow",...n,body:n.serializedBody,headers:D,signal:T},O=new Request(d,x);e&&(O=await e(d,x));let u=await(n.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="",L=t(()=>{try{w.cancel()}catch{}},"abortHandler");T.addEventListener("abort",L);try{for(;;){let{done:te,value:re}=await w.read();if(te)break;A+=re;let F=A.split(`
2
2
 
3
- `);A=L.pop()??"";for(let oe of L){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&&(a&&await a(P),s&&(P=await s(P))),o?.({data:P,event:V,id:E,retry:m}),v.length&&(yield P)}}}finally{T.removeEventListener("abort",F),w.releaseLock()}break}catch(x){if(r?.(x),p!==void 0&&C>=p)break;let O=Math.min(m*2**(C-1),i??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:s,value:a})=>{if(!r){let i=(e?a:a.map(l=>encodeURIComponent(l))).join(ae(s));switch(s){case"label":return`.${i}`;case"matrix":return`;${o}=${i}`;case"simple":return i;default:return`${o}=${i}`}}let h=se(s),p=a.map(i=>s==="label"||s==="simple"?e?i:encodeURIComponent(i):R({allowReserved:e,name:o,value:i})).join(h);return s==="label"||s==="matrix"?h+p:p},"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"),q=t(({allowReserved:e,explode:r,name:o,style:s,value:a,valueOnly:h})=>{if(a instanceof Date)return h?a.toISOString():`${o}=${a.toISOString()}`;if(s!=="deepObject"&&!r){let l=[];Object.entries(a).forEach(([n,E])=>{l=[...l,n,e?E:encodeURIComponent(E)]});let d=l.join(",");switch(s){case"form":return`${o}=${d}`;case"label":return`.${d}`;case"matrix":return`;${o}=${d}`;default:return d}}let p=ie(s),i=Object.entries(a).map(([l,d])=>R({allowReserved:e,name:s==="deepObject"?`${o}[${l}]`:l,value:d})).join(p);return s==="label"||s==="matrix"?p+i:i},"serializeObjectParam");var pe=/\{[^{}]+\}/g,ce=t(({path:e,url:r})=>{let o=r,s=r.match(pe);if(s)for(let a of s){let h=!1,p=a.substring(1,a.length-1),i="simple";p.endsWith("*")&&(h=!0,p=p.substring(0,p.length-1)),p.startsWith(".")?(p=p.substring(1),i="label"):p.startsWith(";")&&(p=p.substring(1),i="matrix");let l=e[p];if(l==null)continue;if(Array.isArray(l)){o=o.replace(a,k({explode:h,name:p,style:i,value:l}));continue}if(typeof l=="object"){o=o.replace(a,q({explode:h,name:p,style:i,value:l,valueOnly:!0}));continue}if(i==="matrix"){o=o.replace(a,`;${R({name:p,value:l})}`);continue}let d=encodeURIComponent(i==="label"?`.${l}`:l);o=o.replace(a,d)}return o},"defaultPathSerializer"),$=t(({baseUrl:e,path:r,query:o,querySerializer:s,url:a})=>{let h=a.startsWith("/")?a:`/${a}`,p=(e??"")+h;r&&(p=ce({path:r,url:p}));let i=o?s(o):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(p+=`?${i}`),p},"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(s=>{let a=[];if(s&&typeof s=="object")for(let h in s){let p=s[h];if(p==null)continue;let i=e[h]||r;if(Array.isArray(p)){let l=k({allowReserved:i.allowReserved,explode:!0,name:h,style:"form",value:p,...i.array});l&&a.push(l)}else if(typeof p=="object"){let l=q({allowReserved:i.allowReserved,explode:!0,name:h,style:"deepObject",value:p,...i.object});l&&a.push(l)}else{let l=R({allowReserved:i.allowReserved,name:h,value:p});l&&a.push(l)}}return a.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 s=await K(o,r.auth);if(!s)continue;let a=o.name??"Authorization";switch(o.in){case"query":r.query||(r.query={}),r.query[a]=s;break;case"cookie":r.headers.append("Cookie",`${a}=${s}`);break;case"header":default:r.headers.set(a,s);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"),W=t((e,r)=>{let o={...e,...r};return o.baseUrl?.endsWith("/")&&(o.baseUrl=o.baseUrl.substring(0,o.baseUrl.length-1)),o.headers=U(e.headers,r.headers),o},"mergeConfigs"),he=t(e=>{let r=[];return e.forEach((o,s)=>{r.push([s,o])}),r},"headersEntries"),U=t((...e)=>{let r=new Headers;for(let o of e){if(!o)continue;let s=o instanceof Headers?he(o):Object.entries(o);for(let[a,h]of s)if(h===null)r.delete(a);else if(Array.isArray(h))for(let p of h)r.append(a,p);else h!==void 0&&r.set(a,typeof h=="object"?JSON.stringify(h):h)}return r},"mergeHeaders"),S=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 s=this.getInterceptorIndex(r);return this.fns[s]?(this.fns[s]=o,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=t(()=>({error:new S,request:new S,response:new S}),"createInterceptors"),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),de={"Content-Type":"application/json"},G=t((e={})=>({...j,headers:de,parseAs:"auto",querySerializer:me,...e}),"createConfig");var _=t((e={})=>{let r=W(G(),e),o=t(()=>({...r}),"getConfig"),s=t(d=>(r=W(r,d),o()),"setConfig"),a=ee(),h=t(async d=>{let n={...r,...d,fetch:d.fetch??r.fetch??globalThis.fetch,headers:U(r.headers,d.headers),serializedBody:void 0};n.security&&await Z({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let E=z(n);return{opts:n,url:E}},"beforeRequest"),p=t(async d=>{let{opts:n,url:E}=await h(d),g={redirect:"follow",...n,body:J(n)},f=new Request(E,g);for(let y of a.request.fns)y&&(f=await y(f,n));let I=n.fetch,m;try{m=await I(f)}catch(y){let u=y;for(let w of a.error.fns)w&&(u=await w(y,void 0,f,n));if(u=u||{},n.throwOnError)throw u;return n.responseStyle==="data"?void 0:{error:u,request:f,response:void 0}}for(let y of a.response.fns)y&&(m=await y(m,f,n));let C={request:f,response:m};if(m.ok){let y=(n.parseAs==="auto"?Y(m.headers.get("Content-Type")):n.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 n.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 n.responseStyle==="data"?m.body:{data:m.body,...C}}return y==="json"&&(n.responseValidator&&await n.responseValidator(u),n.responseTransformer&&(u=await n.responseTransformer(u))),n.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 a.error.fns)y&&(O=await y(x,m,f,n));if(O=O||{},n.throwOnError)throw O;return n.responseStyle==="data"?void 0:{error:O,...C}},"request"),i=t(d=>n=>p({...n,method:d}),"makeMethodFn"),l=t(d=>async n=>{let{opts:E,url:g}=await h(n);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 a.request.fns)C&&(m=await C(m,E));return m},"onRequest"),url:g})},"makeSseFn");return{buildUrl:z,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:o,head:i("HEAD"),interceptors:a,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:p,setConfig:s,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:i("TRACE")}},"createClient");var c=_(G({baseUrl:"https://gateway.remote.com/"}));var He=t(e=>(e?.client??c).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/offboardings",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateOffboarding");var Ne=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments/schema",...e}),"getShowContractAmendmentSchema");var Qe=t(e=>(e.client??c).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"),$e=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/countries/{country_code}/contractor-contract-details",...e}),"getShowContractorContractDetailsCountry");var Je=t(e=>(e.client??c).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateEmployment2"),Ke=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/help-center-articles/{id}",...e}),"getShowHelpCenterArticle");var Xe=t(e=>(e.client??c).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 Ye=t(e=>(e.client??c).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 Ze=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers",...e}),"getIndexBenefitOffer"),et=t(e=>(e.client??c).put({security:[{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers",...e,headers:{"Content-Type":"application/json",...e.headers}}),"putUpdateBenefitOffer");var tt=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contractor-subscriptions",...e}),"getIndexSubscription");var rt=t(e=>(e?.client??c).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/payroll-calendars",...e}),"getIndexEorPayrollCalendar");var ot=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contract-documents/{id}",...e}),"getShowContractDocument"),nt=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/contract-documents",...e}),"getIndexEmploymentContractDocument");var st=t(e=>(e.client??c).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/magic-link",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postGenerateMagicLink");var at=t(e=>(e?.client??c).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 it=t(e=>(e.client??c).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/risk-reserve",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateRiskReserve");var pt=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/companies/{company_id}",...e}),"getShowCompany");var ct=t(e=>(e.client??c).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateContractAmendment");var lt=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/countries/{country_code}/{form}",...e}),"getShowFormCountry"),ht=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/files/{id}",...e}),"getShowFile");var mt=t(e=>(e?.client??c).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 dt=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/leave-policies/summary/{employment_id}",...e}),"getIndexLeavePoliciesSummary");var yt=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers/schema",...e}),"getShowSchema");var ut=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}",...e}),"getShowEmployment"),Et=t(e=>(e.client??c).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 Ct=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/regions/{slug}/fields",...e}),"getShowRegionField");var wt=t(e=>(e.client??c).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"),ft=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/countries",...e}),"getSupportedCountry");var bt=t(e=>(e?.client??c).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"),Ot=t(e=>(e.client??c).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 Tt=t(e=>(e.client??c).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 xt=t(e=>(e.client??c).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 Pt=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/files",...e}),"getIndexEmploymentFile");var Rt=t(e=>(e?.client??c).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/company-currencies",...e}),"getIndexCompanyCurrency");var gt=t(e=>(e.client??c).post({...B,security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/documents",...e,headers:{"Content-Type":null,...e.headers}}),"postUploadEmployeeFileFile"),Dt=t(e=>(e.client??c).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/invite",...e}),"postInviteEmploymentInvitation");var St=t(e=>(e.client??c).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");var Gt=t(e=>(e.client??c).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"),It=t(e=>(e.client??c).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/timeoff",...e}),"getIndexTimeoff");export{_ as a,c 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,St as N,Gt as O,It as P};
6
- //# sourceMappingURL=chunk-5XHL6B25.js.map
3
+ `);A=F.pop()??"";for(let oe of F){let ne=oe.split(`
4
+ `),I=[],V;for(let b of ne)if(b.startsWith("data:"))I.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(I.length){let b=I.join(`
5
+ `);try{P=JSON.parse(b),M=!0}catch{P=b}}M&&(a&&await a(P),s&&(P=await s(P))),o?.({data:P,event:V,id:E,retry:m}),I.length&&(yield P)}}}finally{T.removeEventListener("abort",L),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:s,value:a})=>{if(!r){let p=(e?a:a.map(l=>encodeURIComponent(l))).join(ae(s));switch(s){case"label":return`.${p}`;case"matrix":return`;${o}=${p}`;case"simple":return p;default:return`${o}=${p}`}}let h=se(s),c=a.map(p=>s==="label"||s==="simple"?e?p:encodeURIComponent(p):R({allowReserved:e,name:o,value:p})).join(h);return s==="label"||s==="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:s,value:a,valueOnly:h})=>{if(a instanceof Date)return h?a.toISOString():`${o}=${a.toISOString()}`;if(s!=="deepObject"&&!r){let l=[];Object.entries(a).forEach(([n,E])=>{l=[...l,n,e?E:encodeURIComponent(E)]});let d=l.join(",");switch(s){case"form":return`${o}=${d}`;case"label":return`.${d}`;case"matrix":return`;${o}=${d}`;default:return d}}let c=ie(s),p=Object.entries(a).map(([l,d])=>R({allowReserved:e,name:s==="deepObject"?`${o}[${l}]`:l,value:d})).join(c);return s==="label"||s==="matrix"?c+p:p},"serializeObjectParam");var pe=/\{[^{}]+\}/g,ce=t(({path:e,url:r})=>{let o=r,s=r.match(pe);if(s)for(let a of s){let h=!1,c=a.substring(1,a.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(a,k({explode:h,name:c,style:p,value:l}));continue}if(typeof l=="object"){o=o.replace(a,U({explode:h,name:c,style:p,value:l,valueOnly:!0}));continue}if(p==="matrix"){o=o.replace(a,`;${R({name:c,value:l})}`);continue}let d=encodeURIComponent(p==="label"?`.${l}`:l);o=o.replace(a,d)}return o},"defaultPathSerializer"),$=t(({baseUrl:e,path:r,query:o,querySerializer:s,url:a})=>{let h=a.startsWith("/")?a:`/${a}`,c=(e??"")+h;r&&(c=ce({path:r,url:c}));let p=o?s(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(s=>{let a=[];if(s&&typeof s=="object")for(let h in s){let c=s[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&&a.push(l)}else if(typeof c=="object"){let l=U({allowReserved:p.allowReserved,explode:!0,name:h,style:"deepObject",value:c,...p.object});l&&a.push(l)}else{let l=R({allowReserved:p.allowReserved,name:h,value:c});l&&a.push(l)}}return a.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 s=await K(o,r.auth);if(!s)continue;let a=o.name??"Authorization";switch(o.in){case"query":r.query||(r.query={}),r.query[a]=s;break;case"cookie":r.headers.append("Cookie",`${a}=${s}`);break;case"header":default:r.headers.set(a,s);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"),W=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,s)=>{r.push([s,o])}),r},"headersEntries"),q=t((...e)=>{let r=new Headers;for(let o of e){if(!o)continue;let s=o instanceof Headers?he(o):Object.entries(o);for(let[a,h]of s)if(h===null)r.delete(a);else if(Array.isArray(h))for(let c of h)r.append(a,c);else h!==void 0&&r.set(a,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 s=this.getInterceptorIndex(r);return this.fns[s]?(this.fns[s]=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 _=t((e={})=>{let r=W(S(),e),o=t(()=>({...r}),"getConfig"),s=t(d=>(r=W(r,d),o()),"setConfig"),a=ee(),h=t(async d=>{let n={...r,...d,fetch:d.fetch??r.fetch??globalThis.fetch,headers:q(r.headers,d.headers),serializedBody:void 0};n.security&&await Z({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let E=z(n);return{opts:n,url:E}},"beforeRequest"),c=t(async d=>{let{opts:n,url:E}=await h(d),g={redirect:"follow",...n,body:J(n)},f=new Request(E,g);for(let y of a.request.fns)y&&(f=await y(f,n));let v=n.fetch,m;try{m=await v(f)}catch(y){let u=y;for(let w of a.error.fns)w&&(u=await w(y,void 0,f,n));if(u=u||{},n.throwOnError)throw u;return n.responseStyle==="data"?void 0:{error:u,request:f,response:void 0}}for(let y of a.response.fns)y&&(m=await y(m,f,n));let C={request:f,response:m};if(m.ok){let y=(n.parseAs==="auto"?Y(m.headers.get("Content-Type")):n.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 n.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 n.responseStyle==="data"?m.body:{data:m.body,...C}}return y==="json"&&(n.responseValidator&&await n.responseValidator(u),n.responseTransformer&&(u=await n.responseTransformer(u))),n.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 a.error.fns)y&&(O=await y(x,m,f,n));if(O=O||{},n.throwOnError)throw O;return n.responseStyle==="data"?void 0:{error:O,...C}},"request"),p=t(d=>n=>c({...n,method:d}),"makeMethodFn"),l=t(d=>async n=>{let{opts:E,url:g}=await h(n);return Q({...E,body:E.body,headers:E.headers,method:d,onRequest:t(async(f,v)=>{let m=new Request(f,v);for(let C of a.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:a,options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),request:c,setConfig:s,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 i=_(S({baseUrl:"https://gateway.remote.com/"}));var He=t(e=>(e?.client??i).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/offboardings",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateOffboarding");var Ne=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments/schema",...e}),"getShowContractAmendmentSchema");var Qe=t(e=>(e.client??i).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"),$e=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/countries/{country_code}/contractor-contract-details",...e}),"getShowContractorContractDetailsCountry");var Je=t(e=>(e.client??i).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateEmployment2"),Ke=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/help-center-articles/{id}",...e}),"getShowHelpCenterArticle");var Xe=t(e=>(e.client??i).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 Ye=t(e=>(e.client??i).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 Ze=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers",...e}),"getIndexBenefitOffer"),et=t(e=>(e.client??i).put({security:[{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers",...e,headers:{"Content-Type":"application/json",...e.headers}}),"putUpdateBenefitOffer");var tt=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contractor-subscriptions",...e}),"getIndexSubscription");var rt=t(e=>(e?.client??i).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/payroll-calendars",...e}),"getIndexEorPayrollCalendar");var ot=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contract-documents/{id}",...e}),"getShowContractDocument"),nt=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/contract-documents",...e}),"getIndexEmploymentContractDocument");var st=t(e=>(e.client??i).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/magic-link",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postGenerateMagicLink");var at=t(e=>(e?.client??i).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 it=t(e=>(e.client??i).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/risk-reserve",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateRiskReserve");var pt=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/companies/{company_id}",...e}),"getShowCompany");var ct=t(e=>(e.client??i).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateContractAmendment");var lt=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/countries/{country_code}/{form}",...e}),"getShowFormCountry"),ht=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/files/{id}",...e}),"getShowFile");var mt=t(e=>(e?.client??i).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 dt=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/leave-policies/summary/{employment_id}",...e}),"getIndexLeavePoliciesSummary");var yt=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers/schema",...e}),"getShowSchema");var ut=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}",...e}),"getShowEmployment"),Et=t(e=>(e.client??i).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 Ct=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/regions/{slug}/fields",...e}),"getShowRegionField");var wt=t(e=>(e.client??i).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"),ft=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/countries",...e}),"getSupportedCountry");var bt=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/companies/{company_id}/legal-entities",...e}),"getIndexCompanyLegalEntities");var Ot=t(e=>(e?.client??i).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"),Tt=t(e=>(e.client??i).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 xt=t(e=>(e.client??i).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 Pt=t(e=>(e.client??i).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 Rt=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/files",...e}),"getIndexEmploymentFile");var gt=t(e=>(e?.client??i).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/company-currencies",...e}),"getIndexCompanyCurrency");var Dt=t(e=>(e.client??i).post({...B,security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/documents",...e,headers:{"Content-Type":null,...e.headers}}),"postUploadEmployeeFileFile"),Gt=t(e=>(e.client??i).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/invite",...e}),"postInviteEmploymentInvitation");var St=t(e=>(e.client??i).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"),vt=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/identity/current",...e}),"getCurrentIdentity");var It=t(e=>(e.client??i).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"),kt=t(e=>(e.client??i).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/timeoff",...e}),"getIndexTimeoff");export{_ as a,i 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,vt as P,It as Q,kt as R};
6
+ //# sourceMappingURL=chunk-PJ6ZEFWD.js.map