@remoteoss/remote-flows 1.45.0 → 1.47.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 (469) hide show
  1. package/dist/CheckboxFieldDefault-YKFNIKBQ.js +2 -0
  2. package/dist/CountryFieldDefault-JNRZX632.js +2 -0
  3. package/dist/DatePickerFieldDefault-XSTNHJYN.js +2 -0
  4. package/dist/{EmailFieldDefault-S3DO2YLL.js → EmailFieldDefault-7USH7I6B.js} +2 -2
  5. package/dist/FileUploadFieldDefault-IFQK52QA.js +2 -0
  6. package/dist/MultiSelectFieldDefault-HP5FIBJY.js +2 -0
  7. package/dist/{NumberFieldDefault-AA5UGCSR.js → NumberFieldDefault-P7TLA6SH.js} +2 -2
  8. package/dist/RadioGroupFieldDefault-AUAF4USM.js +2 -0
  9. package/dist/SelectFieldDefault-3AHIKGCW.js +2 -0
  10. package/dist/TelFieldDefault-Q7HOBD4G.js +2 -0
  11. package/dist/TextAreaFieldDefault-JICC77TL.js +2 -0
  12. package/dist/TextFieldDefault-WIVGKVPT.js +2 -0
  13. package/dist/TimeFieldDefault-7GXGSJYO.js +2 -0
  14. package/dist/WorkScheduleFieldDefault-JAU2YFQF.js +2 -0
  15. package/dist/{chunk-KF54ACZP.js → chunk-2BYDZSR5.js} +2 -2
  16. package/dist/{chunk-IMCNVNKF.js → chunk-2DRF5M3J.js} +2 -2
  17. package/dist/{chunk-726N45PF.js → chunk-2EKQ35Z2.js} +2 -2
  18. package/dist/{chunk-SY7QZIKZ.js → chunk-2EM7DTD6.js} +2 -2
  19. package/dist/{chunk-VYLSS2C7.js → chunk-2OCNNZ5U.js} +2 -2
  20. package/dist/{chunk-UHFNNG5S.js → chunk-3CSN7WUM.js} +2 -2
  21. package/dist/{chunk-PQGDGJLG.js → chunk-3HA6BIFT.js} +2 -2
  22. package/dist/{chunk-ZZWI5S72.js → chunk-3HGUMECW.js} +2 -2
  23. package/dist/{chunk-A3EQ7FNB.js → chunk-57NWP6J7.js} +2 -2
  24. package/dist/{chunk-H7PNNMW5.js → chunk-5QNR3U6E.js} +2 -2
  25. package/dist/{chunk-NPXIFNK2.js → chunk-62XCZZJ3.js} +2 -2
  26. package/dist/{chunk-4FV6Z3HE.js → chunk-6GSJHAPZ.js} +2 -2
  27. package/dist/{chunk-FMRWWDZE.js → chunk-6XT3ARIZ.js} +2 -2
  28. package/dist/{chunk-52GHCI6X.js → chunk-A5RTFMYQ.js} +2 -2
  29. package/dist/chunk-A5VJNO74.js +2 -0
  30. package/dist/chunk-A5VJNO74.js.map +1 -0
  31. package/dist/{chunk-JPVSXGCC.js → chunk-AAOU5HS2.js} +2 -2
  32. package/dist/{chunk-2EGFPBT7.js → chunk-ATRYDXM2.js} +2 -2
  33. package/dist/{chunk-T3IHAH3B.js → chunk-B2EUK7V5.js} +2 -2
  34. package/dist/{chunk-WMUF335R.js → chunk-B7UUTLAM.js} +2 -2
  35. package/dist/{chunk-LGSOTN4M.js → chunk-BGEDMAHU.js} +2 -2
  36. package/dist/chunk-BODQC6OK.js +2 -0
  37. package/dist/chunk-BODQC6OK.js.map +1 -0
  38. package/dist/{chunk-4IEAIF46.js → chunk-BXWYSFLP.js} +2 -2
  39. package/dist/{chunk-PMIGYQEX.js → chunk-CD2QYFEH.js} +2 -2
  40. package/dist/{chunk-BIE73HZH.js → chunk-CFI75D3K.js} +2 -2
  41. package/dist/{chunk-QDTMDSL5.js → chunk-D2SVE4KC.js} +2 -2
  42. package/dist/{chunk-TC6KCSDD.js → chunk-D3EISEXY.js} +2 -2
  43. package/dist/{chunk-JXH42V2F.js → chunk-DGHXBSBS.js} +2 -2
  44. package/dist/{chunk-RFVATVNN.js → chunk-DVPC5UZZ.js} +2 -2
  45. package/dist/{chunk-XDRJTAFV.js → chunk-EGIXB43W.js} +2 -2
  46. package/dist/{chunk-RN3WPVBZ.js → chunk-EHAAVSJM.js} +2 -2
  47. package/dist/chunk-EPO6DXOK.js +2 -0
  48. package/dist/chunk-EPO6DXOK.js.map +1 -0
  49. package/dist/{chunk-6JTUAJBZ.js → chunk-EQK2O2PJ.js} +2 -2
  50. package/dist/{chunk-V2XF4QEW.js → chunk-EX4DXUEC.js} +2 -2
  51. package/dist/{chunk-GYYQWPA6.js → chunk-GCONDFJ7.js} +2 -2
  52. package/dist/{chunk-3NKRZURO.js → chunk-GE7DVVKQ.js} +2 -2
  53. package/dist/{chunk-GJ2AOENT.js → chunk-H3JAWJOE.js} +2 -2
  54. package/dist/chunk-HDOEUCXY.js +2 -0
  55. package/dist/chunk-HDOEUCXY.js.map +1 -0
  56. package/dist/{chunk-XQ65RVB7.js → chunk-HFRQIPC5.js} +2 -2
  57. package/dist/{chunk-BZ4VPC4U.js → chunk-HLLM7OZN.js} +2 -2
  58. package/dist/{chunk-XVZQBTB3.js → chunk-HOEP5XXW.js} +2 -2
  59. package/dist/chunk-HOJKP4DH.js +2 -0
  60. package/dist/chunk-HOJKP4DH.js.map +1 -0
  61. package/dist/{chunk-HU7FSSPH.js → chunk-I2CN6IKR.js} +2 -2
  62. package/dist/{chunk-BVKOMSHU.js → chunk-IN6QZASY.js} +2 -2
  63. package/dist/{chunk-7EFZVAWU.js → chunk-IUJRGT3T.js} +2 -2
  64. package/dist/{chunk-IVISBFAT.js → chunk-J2R3LJ7K.js} +2 -2
  65. package/dist/{chunk-QMJH5JND.js → chunk-J4TX4IZL.js} +2 -2
  66. package/dist/chunk-JNXNTCPZ.js +2 -0
  67. package/dist/chunk-JNXNTCPZ.js.map +1 -0
  68. package/dist/{chunk-ZCTEA2O6.js → chunk-JOININRY.js} +2 -2
  69. package/dist/{chunk-FOYZWDU5.js → chunk-JSZYIFHD.js} +2 -2
  70. package/dist/{chunk-U4PFZ54M.js → chunk-K4BWJE5D.js} +2 -2
  71. package/dist/{chunk-2RVICCFD.js → chunk-KBDRU6SO.js} +2 -2
  72. package/dist/{chunk-FXVHH75C.js → chunk-KR7PDSUA.js} +2 -2
  73. package/dist/{chunk-WL7WQBSR.js → chunk-KSZ3D3P3.js} +2 -2
  74. package/dist/{chunk-GWQJKZ3M.js → chunk-LZM3BNK3.js} +2 -2
  75. package/dist/{chunk-3O7L6JUX.js → chunk-MREG2JYT.js} +2 -2
  76. package/dist/{chunk-STFU4KD6.js → chunk-MTGLBR6N.js} +2 -2
  77. package/dist/{chunk-WJAGRH76.js → chunk-NNU32TXH.js} +2 -2
  78. package/dist/{chunk-SK7MIRZS.js → chunk-NOE5LQOQ.js} +2 -2
  79. package/dist/{chunk-O2M7ZWVK.js → chunk-NQWB6O7Z.js} +2 -2
  80. package/dist/{chunk-43XVHRYM.js → chunk-NVIBQAC6.js} +2 -2
  81. package/dist/{chunk-R6QQPJ3F.js → chunk-OGGW2JBW.js} +2 -2
  82. package/dist/{chunk-FFFB5CG2.js → chunk-OHNH7V7X.js} +2 -2
  83. package/dist/{chunk-6LQ2EP7Y.js → chunk-OK4L3KCU.js} +2 -2
  84. package/dist/{chunk-AW436CZP.js → chunk-OPVIHDW2.js} +2 -2
  85. package/dist/{chunk-R7AWHFPG.js → chunk-Q3JA2NA7.js} +2 -2
  86. package/dist/chunk-QC67U4XA.js +2 -0
  87. package/dist/chunk-QC67U4XA.js.map +1 -0
  88. package/dist/{chunk-2TBTNTJ2.js → chunk-QDRQ64QV.js} +2 -2
  89. package/dist/{chunk-J7I4WJ4G.js → chunk-QXXVWOOB.js} +2 -2
  90. package/dist/{chunk-65G3JQ7T.js → chunk-QZZJE6P7.js} +2 -2
  91. package/dist/{chunk-TAYJ2AK4.js → chunk-R4JUCNE4.js} +2 -2
  92. package/dist/{chunk-MZN6VY5F.js → chunk-RKXF7Q7V.js} +2 -2
  93. package/dist/{chunk-2FIBHHT7.js → chunk-RT7MYFKW.js} +2 -2
  94. package/dist/{chunk-BKSWQYXH.js → chunk-SFJBEQ2V.js} +2 -2
  95. package/dist/{chunk-46RBPCK6.js → chunk-SQBJ4CLO.js} +2 -2
  96. package/dist/{chunk-2JK3XRHE.js → chunk-TRMEUC36.js} +2 -2
  97. package/dist/{chunk-6BOIGCHK.js → chunk-TWJPM5ED.js} +2 -2
  98. package/dist/{chunk-D2PYVF6J.js → chunk-TYVAIHMS.js} +2 -2
  99. package/dist/chunk-U4EJUZPI.js +2 -0
  100. package/dist/chunk-U4EJUZPI.js.map +1 -0
  101. package/dist/{chunk-WTJJEIF2.js → chunk-U5AS2HUX.js} +2 -2
  102. package/dist/{chunk-UETHEV7Q.js → chunk-UBRHAMPE.js} +2 -2
  103. package/dist/{chunk-6SNWSCXH.js → chunk-ULCAT6MG.js} +2 -2
  104. package/dist/{chunk-MS2MOZGL.js → chunk-UWJ3TB2O.js} +2 -2
  105. package/dist/chunk-UWSG45OM.js +2 -0
  106. package/dist/chunk-UWSG45OM.js.map +1 -0
  107. package/dist/{chunk-KV4SSPEB.js → chunk-V24SYZ5Y.js} +2 -2
  108. package/dist/{chunk-VHKLNEC2.js → chunk-V4DAA7QL.js} +2 -2
  109. package/dist/{chunk-YZKQB7WG.js → chunk-V5TMPQVK.js} +2 -2
  110. package/dist/{chunk-YZKQB7WG.js.map → chunk-V5TMPQVK.js.map} +1 -1
  111. package/dist/{chunk-MQK33NLF.js → chunk-V65WVOGC.js} +2 -2
  112. package/dist/{chunk-FII45OPC.js → chunk-VUKFUYLG.js} +2 -2
  113. package/dist/{chunk-ZWA5FYVS.js → chunk-W4JTBWHM.js} +2 -2
  114. package/dist/{chunk-INUCPQVI.js → chunk-WDO7XH6B.js} +2 -2
  115. package/dist/{chunk-TVTJS3PE.js → chunk-WE2AFK6Y.js} +2 -2
  116. package/dist/{chunk-LD633A5N.js → chunk-WI4YITIC.js} +2 -2
  117. package/dist/{chunk-P5NAMZNA.js → chunk-WNI5NWFU.js} +2 -2
  118. package/dist/{chunk-H6XSWBE5.js → chunk-XG3CGRPZ.js} +2 -2
  119. package/dist/{chunk-XPITUVQE.js → chunk-XI55YG73.js} +2 -2
  120. package/dist/{chunk-XPITUVQE.js.map → chunk-XI55YG73.js.map} +1 -1
  121. package/dist/{chunk-NGCNYQSC.js → chunk-Y7PBPPUC.js} +2 -2
  122. package/dist/{chunk-DL6MFAFK.js → chunk-YWLILBPW.js} +2 -2
  123. package/dist/chunk-ZHELRFOX.js +2 -0
  124. package/dist/chunk-ZHELRFOX.js.map +1 -0
  125. package/dist/default-components.d.ts +1 -1
  126. package/dist/default-components.js +1 -1
  127. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +2 -2
  128. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  129. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  130. package/dist/flows/ContractAmendment/context.d.ts +2 -2
  131. package/dist/flows/ContractAmendment/hooks.d.ts +2 -2
  132. package/dist/flows/ContractAmendment/hooks.js +1 -1
  133. package/dist/flows/ContractAmendment/index.d.ts +2 -2
  134. package/dist/flows/ContractAmendment/index.js +1 -1
  135. package/dist/flows/ContractAmendment/types.d.ts +2 -2
  136. package/dist/flows/ContractAmendment/utils.d.ts +1 -1
  137. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +4 -4
  138. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  139. package/dist/flows/ContractorOnboarding/api.d.ts +2 -2
  140. package/dist/flows/ContractorOnboarding/api.js +1 -1
  141. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +3 -3
  142. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  143. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +4 -4
  144. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  145. package/dist/flows/ContractorOnboarding/components/ContractOriginStep.d.ts +2 -2
  146. package/dist/flows/ContractorOnboarding/components/ContractOriginStep.js +1 -1
  147. package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +1 -1
  148. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +1 -1
  149. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +4 -4
  150. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  151. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +4 -4
  152. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  153. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +4 -4
  154. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
  155. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +2 -2
  156. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  157. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +4 -4
  158. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  159. package/dist/flows/ContractorOnboarding/components/SaveDraftButton.d.ts +2 -2
  160. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +3 -3
  161. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  162. package/dist/flows/ContractorOnboarding/context.d.ts +4 -4
  163. package/dist/flows/ContractorOnboarding/hooks.d.ts +4 -4
  164. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  165. package/dist/flows/ContractorOnboarding/index.d.ts +4 -4
  166. package/dist/flows/ContractorOnboarding/index.js +1 -1
  167. package/dist/flows/ContractorOnboarding/jsfModify.d.ts +4 -4
  168. package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
  169. package/dist/flows/ContractorOnboarding/types.d.ts +4 -4
  170. package/dist/flows/ContractorOnboarding/utils.d.ts +3 -3
  171. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +2 -2
  172. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  173. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +2 -2
  174. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  175. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -2
  176. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  177. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
  178. package/dist/flows/CostCalculator/api.d.ts +2 -2
  179. package/dist/flows/CostCalculator/api.js +1 -1
  180. package/dist/flows/CostCalculator/components/SalaryField.d.ts +3 -2
  181. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  182. package/dist/flows/CostCalculator/context.d.ts +2 -2
  183. package/dist/flows/CostCalculator/hooks.d.ts +2 -2
  184. package/dist/flows/CostCalculator/hooks.js +1 -1
  185. package/dist/flows/CostCalculator/index.d.ts +2 -2
  186. package/dist/flows/CostCalculator/index.js +1 -1
  187. package/dist/flows/CostCalculator/types.d.ts +12 -3
  188. package/dist/flows/CostCalculator/utils.d.ts +2 -2
  189. package/dist/flows/CostCalculator/utils.js +1 -1
  190. package/dist/flows/CreateCompany/CreateCompany.d.ts +3 -3
  191. package/dist/flows/CreateCompany/CreateCompany.js +1 -1
  192. package/dist/flows/CreateCompany/api.d.ts +2 -2
  193. package/dist/flows/CreateCompany/api.js +1 -1
  194. package/dist/flows/CreateCompany/components/AddressDetailsStep.d.ts +3 -3
  195. package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
  196. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.d.ts +3 -3
  197. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
  198. package/dist/flows/CreateCompany/components/CreateCompanyForm.d.ts +1 -1
  199. package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
  200. package/dist/flows/CreateCompany/context.d.ts +3 -3
  201. package/dist/flows/CreateCompany/hooks.d.ts +3 -3
  202. package/dist/flows/CreateCompany/hooks.js +1 -1
  203. package/dist/flows/CreateCompany/index.d.ts +3 -3
  204. package/dist/flows/CreateCompany/index.js +1 -1
  205. package/dist/flows/CreateCompany/types.d.ts +3 -3
  206. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundFlow.d.ts +2 -2
  207. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundFlow.js +1 -1
  208. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundForm.d.ts +1 -1
  209. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundForm.js +1 -1
  210. package/dist/flows/JsonSchemaPlayground/context.d.ts +2 -2
  211. package/dist/flows/JsonSchemaPlayground/hooks.d.ts +2 -2
  212. package/dist/flows/JsonSchemaPlayground/index.d.ts +2 -2
  213. package/dist/flows/JsonSchemaPlayground/index.js +1 -1
  214. package/dist/flows/JsonSchemaPlayground/types.d.ts +2 -2
  215. package/dist/flows/Onboarding/OnboardingFlow.d.ts +3 -3
  216. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  217. package/dist/flows/Onboarding/api.d.ts +3 -3
  218. package/dist/flows/Onboarding/api.js +1 -1
  219. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +3 -2
  220. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  221. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +3 -3
  222. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  223. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +3 -3
  224. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  225. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +3 -3
  226. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  227. package/dist/flows/Onboarding/components/EmploymentAgreementInfoContent.js +1 -1
  228. package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.d.ts +3 -3
  229. package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.js +1 -1
  230. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +3 -3
  231. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  232. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +2 -2
  233. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  234. package/dist/flows/Onboarding/components/PreOnboardingRequirements.d.ts +3 -3
  235. package/dist/flows/Onboarding/components/PreOnboardingRequirements.js +1 -1
  236. package/dist/flows/Onboarding/components/PreviewEmploymentAgreementStep.js +1 -1
  237. package/dist/flows/Onboarding/components/ReviewStep.d.ts +3 -3
  238. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +2 -2
  239. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +3 -3
  240. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  241. package/dist/flows/Onboarding/context.d.ts +5 -5
  242. package/dist/flows/Onboarding/hooks.d.ts +3 -3
  243. package/dist/flows/Onboarding/hooks.js +1 -1
  244. package/dist/flows/Onboarding/index.d.ts +3 -3
  245. package/dist/flows/Onboarding/index.js +1 -1
  246. package/dist/flows/Onboarding/types.d.ts +3 -3
  247. package/dist/flows/Onboarding/utils.d.ts +3 -3
  248. package/dist/flows/Onboarding/utils.js +1 -1
  249. package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.d.ts +3 -3
  250. package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.js +1 -1
  251. package/dist/flows/PayrollAdminOnboarding/api.d.ts +1 -1
  252. package/dist/flows/PayrollAdminOnboarding/api.js +1 -1
  253. package/dist/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.d.ts +2 -2
  254. package/dist/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.js +1 -1
  255. package/dist/flows/PayrollAdminOnboarding/components/ContractDetailsStep.d.ts +2 -2
  256. package/dist/flows/PayrollAdminOnboarding/components/ContractDetailsStep.js +1 -1
  257. package/dist/flows/PayrollAdminOnboarding/components/InvitationStep.d.ts +2 -2
  258. package/dist/flows/PayrollAdminOnboarding/components/InvitationStep.js +1 -1
  259. package/dist/flows/PayrollAdminOnboarding/components/PayrollAdminForm.d.ts +1 -1
  260. package/dist/flows/PayrollAdminOnboarding/components/PayrollAdminForm.js +1 -1
  261. package/dist/flows/PayrollAdminOnboarding/components/SelectCountryStep.d.ts +2 -2
  262. package/dist/flows/PayrollAdminOnboarding/components/SelectCountryStep.js +1 -1
  263. package/dist/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.d.ts +2 -2
  264. package/dist/flows/PayrollAdminOnboarding/context.d.ts +3 -3
  265. package/dist/flows/PayrollAdminOnboarding/hooks.d.ts +3 -3
  266. package/dist/flows/PayrollAdminOnboarding/hooks.js +1 -1
  267. package/dist/flows/PayrollAdminOnboarding/index.d.ts +3 -3
  268. package/dist/flows/PayrollAdminOnboarding/index.js +1 -1
  269. package/dist/flows/PayrollAdminOnboarding/types.d.ts +3 -3
  270. package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.d.ts +3 -3
  271. package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.js +1 -1
  272. package/dist/flows/PayrollEmployeeOnboarding/api.d.ts +2 -2
  273. package/dist/flows/PayrollEmployeeOnboarding/api.js +1 -1
  274. package/dist/flows/PayrollEmployeeOnboarding/components/BankAccountStep.d.ts +2 -2
  275. package/dist/flows/PayrollEmployeeOnboarding/components/BankAccountStep.js +1 -1
  276. package/dist/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep.d.ts +2 -2
  277. package/dist/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep.js +1 -1
  278. package/dist/flows/PayrollEmployeeOnboarding/components/HomeAddressStep.d.ts +2 -2
  279. package/dist/flows/PayrollEmployeeOnboarding/components/HomeAddressStep.js +1 -1
  280. package/dist/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm.d.ts +1 -1
  281. package/dist/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm.js +1 -1
  282. package/dist/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep.d.ts +2 -2
  283. package/dist/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep.js +1 -1
  284. package/dist/flows/PayrollEmployeeOnboarding/components/StateTaxesStep.d.ts +2 -2
  285. package/dist/flows/PayrollEmployeeOnboarding/components/StateTaxesStep.js +1 -1
  286. package/dist/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler.d.ts +2 -2
  287. package/dist/flows/PayrollEmployeeOnboarding/context.d.ts +3 -3
  288. package/dist/flows/PayrollEmployeeOnboarding/hooks.d.ts +3 -3
  289. package/dist/flows/PayrollEmployeeOnboarding/hooks.js +1 -1
  290. package/dist/flows/PayrollEmployeeOnboarding/index.d.ts +3 -3
  291. package/dist/flows/PayrollEmployeeOnboarding/index.js +1 -1
  292. package/dist/flows/PayrollEmployeeOnboarding/types.d.ts +3 -3
  293. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +3 -3
  294. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  295. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +3 -3
  296. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  297. package/dist/flows/Termination/PaidTimeOffForm.d.ts +3 -3
  298. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  299. package/dist/flows/Termination/TerminationDetailsForm.d.ts +3 -3
  300. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  301. package/dist/flows/Termination/TerminationFlow.d.ts +3 -3
  302. package/dist/flows/Termination/TerminationFlow.js +1 -1
  303. package/dist/flows/Termination/TerminationForm.d.ts +3 -3
  304. package/dist/flows/Termination/TerminationForm.js +1 -1
  305. package/dist/flows/Termination/api.d.ts +4 -4
  306. package/dist/flows/Termination/api.js +1 -1
  307. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  308. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +4 -4
  309. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +4 -4
  310. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
  311. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +4 -4
  312. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  313. package/dist/flows/Termination/context.d.ts +3 -3
  314. package/dist/flows/Termination/hooks.d.ts +3 -3
  315. package/dist/flows/Termination/hooks.js +1 -1
  316. package/dist/flows/Termination/index.d.ts +4 -4
  317. package/dist/flows/Termination/index.js +1 -1
  318. package/dist/flows/Termination/json-schemas/schema.d.ts +3 -3
  319. package/dist/flows/Termination/types.d.ts +3 -3
  320. package/dist/flows/Termination/utils.d.ts +3 -3
  321. package/dist/flows/types.d.ts +2 -2
  322. package/dist/flows/utils.d.ts +1 -1
  323. package/dist/index.d.ts +11 -11
  324. package/dist/index.js +2 -2
  325. package/dist/internals.d.ts +3 -3
  326. package/dist/internals.js +1 -1
  327. package/dist/{mutations-CajBazWr.d.ts → mutations-DCAaAw5a.d.ts} +1 -1
  328. package/dist/{remoteFlows-DHOW-e53.d.ts → remoteFlows-dULw8FdP.d.ts} +7 -0
  329. package/dist/{types-BolF-TDg.d.ts → types-B4GARfFq.d.ts} +1 -1
  330. package/dist/{types-EcgTFN8S.d.ts → types-BUvpsq6j.d.ts} +1 -1
  331. package/dist/{types-CVrHYMLy.d.ts → types-C_UFZOHt.d.ts} +29 -6
  332. package/dist/{types-B-hNdynz.d.ts → types-Crw4jMds.d.ts} +1 -1
  333. package/dist/{types-CRAMV8FR.d.ts → types-Cwf67dnV.d.ts} +1 -1
  334. package/dist/{types-8GvnGYSN.d.ts → types-D-1MCxhm.d.ts} +2 -2
  335. package/dist/{types-C3SXCvNl.d.ts → types-DwSMO5s-.d.ts} +3 -3
  336. package/dist/{utils-D6wAHCpX.d.ts → utils-BVwm5Jyt.d.ts} +1 -1
  337. package/package.json +6 -6
  338. package/dist/CheckboxFieldDefault-62URAHJV.js +0 -2
  339. package/dist/CountryFieldDefault-24NNZN2C.js +0 -2
  340. package/dist/DatePickerFieldDefault-NMUCZ4U2.js +0 -2
  341. package/dist/FileUploadFieldDefault-4NW5VLF6.js +0 -2
  342. package/dist/MultiSelectFieldDefault-S45Z53ZY.js +0 -2
  343. package/dist/RadioGroupFieldDefault-X44FYUA3.js +0 -2
  344. package/dist/SelectFieldDefault-PLDXHTQY.js +0 -2
  345. package/dist/TelFieldDefault-IYGEEV5V.js +0 -2
  346. package/dist/TextAreaFieldDefault-C6M3PIV2.js +0 -2
  347. package/dist/TextFieldDefault-OC2TMXVF.js +0 -2
  348. package/dist/TimeFieldDefault-J6PKL5T4.js +0 -2
  349. package/dist/WorkScheduleFieldDefault-MDDNWRCO.js +0 -2
  350. package/dist/chunk-4GIQCWII.js +0 -2
  351. package/dist/chunk-4GIQCWII.js.map +0 -1
  352. package/dist/chunk-B6F2M3ZM.js +0 -2
  353. package/dist/chunk-B6F2M3ZM.js.map +0 -1
  354. package/dist/chunk-CH75YRKR.js +0 -2
  355. package/dist/chunk-CH75YRKR.js.map +0 -1
  356. package/dist/chunk-L4IKDVFW.js +0 -2
  357. package/dist/chunk-L4IKDVFW.js.map +0 -1
  358. package/dist/chunk-PG7R37J5.js +0 -2
  359. package/dist/chunk-PG7R37J5.js.map +0 -1
  360. package/dist/chunk-RG67OYQN.js +0 -2
  361. package/dist/chunk-RG67OYQN.js.map +0 -1
  362. package/dist/chunk-SLTF3CJ6.js +0 -2
  363. package/dist/chunk-SLTF3CJ6.js.map +0 -1
  364. package/dist/chunk-UYYITOOO.js +0 -2
  365. package/dist/chunk-UYYITOOO.js.map +0 -1
  366. package/dist/chunk-WS5BL2WM.js +0 -2
  367. package/dist/chunk-WS5BL2WM.js.map +0 -1
  368. package/dist/chunk-X3FRANQS.js +0 -2
  369. package/dist/chunk-X3FRANQS.js.map +0 -1
  370. /package/dist/{CheckboxFieldDefault-62URAHJV.js.map → CheckboxFieldDefault-YKFNIKBQ.js.map} +0 -0
  371. /package/dist/{CountryFieldDefault-24NNZN2C.js.map → CountryFieldDefault-JNRZX632.js.map} +0 -0
  372. /package/dist/{DatePickerFieldDefault-NMUCZ4U2.js.map → DatePickerFieldDefault-XSTNHJYN.js.map} +0 -0
  373. /package/dist/{EmailFieldDefault-S3DO2YLL.js.map → EmailFieldDefault-7USH7I6B.js.map} +0 -0
  374. /package/dist/{FileUploadFieldDefault-4NW5VLF6.js.map → FileUploadFieldDefault-IFQK52QA.js.map} +0 -0
  375. /package/dist/{MultiSelectFieldDefault-S45Z53ZY.js.map → MultiSelectFieldDefault-HP5FIBJY.js.map} +0 -0
  376. /package/dist/{NumberFieldDefault-AA5UGCSR.js.map → NumberFieldDefault-P7TLA6SH.js.map} +0 -0
  377. /package/dist/{RadioGroupFieldDefault-X44FYUA3.js.map → RadioGroupFieldDefault-AUAF4USM.js.map} +0 -0
  378. /package/dist/{SelectFieldDefault-PLDXHTQY.js.map → SelectFieldDefault-3AHIKGCW.js.map} +0 -0
  379. /package/dist/{TelFieldDefault-IYGEEV5V.js.map → TelFieldDefault-Q7HOBD4G.js.map} +0 -0
  380. /package/dist/{TextAreaFieldDefault-C6M3PIV2.js.map → TextAreaFieldDefault-JICC77TL.js.map} +0 -0
  381. /package/dist/{TextFieldDefault-OC2TMXVF.js.map → TextFieldDefault-WIVGKVPT.js.map} +0 -0
  382. /package/dist/{TimeFieldDefault-J6PKL5T4.js.map → TimeFieldDefault-7GXGSJYO.js.map} +0 -0
  383. /package/dist/{WorkScheduleFieldDefault-MDDNWRCO.js.map → WorkScheduleFieldDefault-JAU2YFQF.js.map} +0 -0
  384. /package/dist/{chunk-KF54ACZP.js.map → chunk-2BYDZSR5.js.map} +0 -0
  385. /package/dist/{chunk-IMCNVNKF.js.map → chunk-2DRF5M3J.js.map} +0 -0
  386. /package/dist/{chunk-726N45PF.js.map → chunk-2EKQ35Z2.js.map} +0 -0
  387. /package/dist/{chunk-SY7QZIKZ.js.map → chunk-2EM7DTD6.js.map} +0 -0
  388. /package/dist/{chunk-VYLSS2C7.js.map → chunk-2OCNNZ5U.js.map} +0 -0
  389. /package/dist/{chunk-UHFNNG5S.js.map → chunk-3CSN7WUM.js.map} +0 -0
  390. /package/dist/{chunk-PQGDGJLG.js.map → chunk-3HA6BIFT.js.map} +0 -0
  391. /package/dist/{chunk-ZZWI5S72.js.map → chunk-3HGUMECW.js.map} +0 -0
  392. /package/dist/{chunk-A3EQ7FNB.js.map → chunk-57NWP6J7.js.map} +0 -0
  393. /package/dist/{chunk-H7PNNMW5.js.map → chunk-5QNR3U6E.js.map} +0 -0
  394. /package/dist/{chunk-NPXIFNK2.js.map → chunk-62XCZZJ3.js.map} +0 -0
  395. /package/dist/{chunk-4FV6Z3HE.js.map → chunk-6GSJHAPZ.js.map} +0 -0
  396. /package/dist/{chunk-FMRWWDZE.js.map → chunk-6XT3ARIZ.js.map} +0 -0
  397. /package/dist/{chunk-52GHCI6X.js.map → chunk-A5RTFMYQ.js.map} +0 -0
  398. /package/dist/{chunk-JPVSXGCC.js.map → chunk-AAOU5HS2.js.map} +0 -0
  399. /package/dist/{chunk-2EGFPBT7.js.map → chunk-ATRYDXM2.js.map} +0 -0
  400. /package/dist/{chunk-T3IHAH3B.js.map → chunk-B2EUK7V5.js.map} +0 -0
  401. /package/dist/{chunk-WMUF335R.js.map → chunk-B7UUTLAM.js.map} +0 -0
  402. /package/dist/{chunk-LGSOTN4M.js.map → chunk-BGEDMAHU.js.map} +0 -0
  403. /package/dist/{chunk-4IEAIF46.js.map → chunk-BXWYSFLP.js.map} +0 -0
  404. /package/dist/{chunk-PMIGYQEX.js.map → chunk-CD2QYFEH.js.map} +0 -0
  405. /package/dist/{chunk-BIE73HZH.js.map → chunk-CFI75D3K.js.map} +0 -0
  406. /package/dist/{chunk-QDTMDSL5.js.map → chunk-D2SVE4KC.js.map} +0 -0
  407. /package/dist/{chunk-TC6KCSDD.js.map → chunk-D3EISEXY.js.map} +0 -0
  408. /package/dist/{chunk-JXH42V2F.js.map → chunk-DGHXBSBS.js.map} +0 -0
  409. /package/dist/{chunk-RFVATVNN.js.map → chunk-DVPC5UZZ.js.map} +0 -0
  410. /package/dist/{chunk-XDRJTAFV.js.map → chunk-EGIXB43W.js.map} +0 -0
  411. /package/dist/{chunk-RN3WPVBZ.js.map → chunk-EHAAVSJM.js.map} +0 -0
  412. /package/dist/{chunk-6JTUAJBZ.js.map → chunk-EQK2O2PJ.js.map} +0 -0
  413. /package/dist/{chunk-V2XF4QEW.js.map → chunk-EX4DXUEC.js.map} +0 -0
  414. /package/dist/{chunk-GYYQWPA6.js.map → chunk-GCONDFJ7.js.map} +0 -0
  415. /package/dist/{chunk-3NKRZURO.js.map → chunk-GE7DVVKQ.js.map} +0 -0
  416. /package/dist/{chunk-GJ2AOENT.js.map → chunk-H3JAWJOE.js.map} +0 -0
  417. /package/dist/{chunk-XQ65RVB7.js.map → chunk-HFRQIPC5.js.map} +0 -0
  418. /package/dist/{chunk-BZ4VPC4U.js.map → chunk-HLLM7OZN.js.map} +0 -0
  419. /package/dist/{chunk-XVZQBTB3.js.map → chunk-HOEP5XXW.js.map} +0 -0
  420. /package/dist/{chunk-HU7FSSPH.js.map → chunk-I2CN6IKR.js.map} +0 -0
  421. /package/dist/{chunk-BVKOMSHU.js.map → chunk-IN6QZASY.js.map} +0 -0
  422. /package/dist/{chunk-7EFZVAWU.js.map → chunk-IUJRGT3T.js.map} +0 -0
  423. /package/dist/{chunk-IVISBFAT.js.map → chunk-J2R3LJ7K.js.map} +0 -0
  424. /package/dist/{chunk-QMJH5JND.js.map → chunk-J4TX4IZL.js.map} +0 -0
  425. /package/dist/{chunk-ZCTEA2O6.js.map → chunk-JOININRY.js.map} +0 -0
  426. /package/dist/{chunk-FOYZWDU5.js.map → chunk-JSZYIFHD.js.map} +0 -0
  427. /package/dist/{chunk-U4PFZ54M.js.map → chunk-K4BWJE5D.js.map} +0 -0
  428. /package/dist/{chunk-2RVICCFD.js.map → chunk-KBDRU6SO.js.map} +0 -0
  429. /package/dist/{chunk-FXVHH75C.js.map → chunk-KR7PDSUA.js.map} +0 -0
  430. /package/dist/{chunk-WL7WQBSR.js.map → chunk-KSZ3D3P3.js.map} +0 -0
  431. /package/dist/{chunk-GWQJKZ3M.js.map → chunk-LZM3BNK3.js.map} +0 -0
  432. /package/dist/{chunk-3O7L6JUX.js.map → chunk-MREG2JYT.js.map} +0 -0
  433. /package/dist/{chunk-STFU4KD6.js.map → chunk-MTGLBR6N.js.map} +0 -0
  434. /package/dist/{chunk-WJAGRH76.js.map → chunk-NNU32TXH.js.map} +0 -0
  435. /package/dist/{chunk-SK7MIRZS.js.map → chunk-NOE5LQOQ.js.map} +0 -0
  436. /package/dist/{chunk-O2M7ZWVK.js.map → chunk-NQWB6O7Z.js.map} +0 -0
  437. /package/dist/{chunk-43XVHRYM.js.map → chunk-NVIBQAC6.js.map} +0 -0
  438. /package/dist/{chunk-R6QQPJ3F.js.map → chunk-OGGW2JBW.js.map} +0 -0
  439. /package/dist/{chunk-FFFB5CG2.js.map → chunk-OHNH7V7X.js.map} +0 -0
  440. /package/dist/{chunk-6LQ2EP7Y.js.map → chunk-OK4L3KCU.js.map} +0 -0
  441. /package/dist/{chunk-AW436CZP.js.map → chunk-OPVIHDW2.js.map} +0 -0
  442. /package/dist/{chunk-R7AWHFPG.js.map → chunk-Q3JA2NA7.js.map} +0 -0
  443. /package/dist/{chunk-2TBTNTJ2.js.map → chunk-QDRQ64QV.js.map} +0 -0
  444. /package/dist/{chunk-J7I4WJ4G.js.map → chunk-QXXVWOOB.js.map} +0 -0
  445. /package/dist/{chunk-65G3JQ7T.js.map → chunk-QZZJE6P7.js.map} +0 -0
  446. /package/dist/{chunk-TAYJ2AK4.js.map → chunk-R4JUCNE4.js.map} +0 -0
  447. /package/dist/{chunk-MZN6VY5F.js.map → chunk-RKXF7Q7V.js.map} +0 -0
  448. /package/dist/{chunk-2FIBHHT7.js.map → chunk-RT7MYFKW.js.map} +0 -0
  449. /package/dist/{chunk-BKSWQYXH.js.map → chunk-SFJBEQ2V.js.map} +0 -0
  450. /package/dist/{chunk-46RBPCK6.js.map → chunk-SQBJ4CLO.js.map} +0 -0
  451. /package/dist/{chunk-2JK3XRHE.js.map → chunk-TRMEUC36.js.map} +0 -0
  452. /package/dist/{chunk-6BOIGCHK.js.map → chunk-TWJPM5ED.js.map} +0 -0
  453. /package/dist/{chunk-D2PYVF6J.js.map → chunk-TYVAIHMS.js.map} +0 -0
  454. /package/dist/{chunk-WTJJEIF2.js.map → chunk-U5AS2HUX.js.map} +0 -0
  455. /package/dist/{chunk-UETHEV7Q.js.map → chunk-UBRHAMPE.js.map} +0 -0
  456. /package/dist/{chunk-6SNWSCXH.js.map → chunk-ULCAT6MG.js.map} +0 -0
  457. /package/dist/{chunk-MS2MOZGL.js.map → chunk-UWJ3TB2O.js.map} +0 -0
  458. /package/dist/{chunk-KV4SSPEB.js.map → chunk-V24SYZ5Y.js.map} +0 -0
  459. /package/dist/{chunk-VHKLNEC2.js.map → chunk-V4DAA7QL.js.map} +0 -0
  460. /package/dist/{chunk-MQK33NLF.js.map → chunk-V65WVOGC.js.map} +0 -0
  461. /package/dist/{chunk-FII45OPC.js.map → chunk-VUKFUYLG.js.map} +0 -0
  462. /package/dist/{chunk-ZWA5FYVS.js.map → chunk-W4JTBWHM.js.map} +0 -0
  463. /package/dist/{chunk-INUCPQVI.js.map → chunk-WDO7XH6B.js.map} +0 -0
  464. /package/dist/{chunk-TVTJS3PE.js.map → chunk-WE2AFK6Y.js.map} +0 -0
  465. /package/dist/{chunk-LD633A5N.js.map → chunk-WI4YITIC.js.map} +0 -0
  466. /package/dist/{chunk-P5NAMZNA.js.map → chunk-WNI5NWFU.js.map} +0 -0
  467. /package/dist/{chunk-H6XSWBE5.js.map → chunk-XG3CGRPZ.js.map} +0 -0
  468. /package/dist/{chunk-NGCNYQSC.js.map → chunk-Y7PBPPUC.js.map} +0 -0
  469. /package/dist/{chunk-DL6MFAFK.js.map → chunk-YWLILBPW.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as F}from"./chunk-NDWVOVDM.js";import{a as u}from"./chunk-MZN6VY5F.js";import{j as p,k as l,l as i,n as a,o as c}from"./chunk-4FGKIGKF.js";import{a as m}from"./chunk-P37U34EQ.js";import{useEffect as $,useState as v}from"react";import{jsx as n,jsxs as C}from"react/jsx-runtime";function L({field:t,fieldState:b,fieldData:o}){let[g,s]=v([]),_=m(e=>{let r=e.map(({value:S})=>S);t.onChange(r),s(e)},"handleChange");$(()=>{t.value&&o.options&&s(t.value.map(e=>o?.options?.find(r=>r.value===e)))},[t.value,o.options]);let y=[...Object.entries(o.$meta?.regions||{}).map(([e,r])=>({value:r,label:e,category:"Regions"})),...Object.entries(o.$meta?.subregions||{}).map(([e,r])=>({value:r,label:e,category:"Subregions"})),...o.options?.map(e=>({...e,value:e.value,label:e.label,category:"Countries"}))||[]];return C(p,{"data-field":t.name,className:`RemoteFlows__CountryField__Item__${t.name}`,children:[n(l,{className:"RemoteFlows__CountryField__Label",children:o.label}),n(i,{children:n(F,{options:y,selected:g,onChange:_})}),o.description&&C(a,{children:[o.description," ",n(u,{helpCenter:o.meta?.helpCenter})]}),b.error&&n(c,{})]})}m(L,"CountryFieldDefault");export{L as a};
2
- //# sourceMappingURL=chunk-2EGFPBT7.js.map
1
+ import{a as F}from"./chunk-NDWVOVDM.js";import{a as u}from"./chunk-RKXF7Q7V.js";import{j as p,k as l,l as i,n as a,o as c}from"./chunk-4FGKIGKF.js";import{a as m}from"./chunk-P37U34EQ.js";import{useEffect as $,useState as v}from"react";import{jsx as n,jsxs as C}from"react/jsx-runtime";function L({field:t,fieldState:b,fieldData:o}){let[g,s]=v([]),_=m(e=>{let r=e.map(({value:S})=>S);t.onChange(r),s(e)},"handleChange");$(()=>{t.value&&o.options&&s(t.value.map(e=>o?.options?.find(r=>r.value===e)))},[t.value,o.options]);let y=[...Object.entries(o.$meta?.regions||{}).map(([e,r])=>({value:r,label:e,category:"Regions"})),...Object.entries(o.$meta?.subregions||{}).map(([e,r])=>({value:r,label:e,category:"Subregions"})),...o.options?.map(e=>({...e,value:e.value,label:e.label,category:"Countries"}))||[]];return C(p,{"data-field":t.name,className:`RemoteFlows__CountryField__Item__${t.name}`,children:[n(l,{className:"RemoteFlows__CountryField__Label",children:o.label}),n(i,{children:n(F,{options:y,selected:g,onChange:_})}),o.description&&C(a,{children:[o.description," ",n(u,{helpCenter:o.meta?.helpCenter})]}),b.error&&n(c,{})]})}m(L,"CountryFieldDefault");export{L as a};
2
+ //# sourceMappingURL=chunk-ATRYDXM2.js.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-LQFLXXBR.js";import{a as _}from"./chunk-MZN6VY5F.js";import{j as i,k as p,l as a,n as s,o as F}from"./chunk-4FGKIGKF.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as d}from"react/jsx-runtime";function w({field:o,fieldState:C,fieldData:m}){let{name:t,label:r,description:l}=m;return d(i,{"data-field":t,className:`RemoteFlows__TimeField__Item__${t}`,children:[r&&e(p,{className:"RemoteFlows__TimeField__Label",children:r}),e(a,{children:e(c,{...o,type:"time",value:o.value??"",onChange:T=>{o.onChange(T)},className:"RemoteFlows__TimeField__Input",placeholder:r})}),(l||m.meta?.helpCenter)&&e(s,{className:"RemoteFlows__TimeField__Description",helpCenter:e(_,{helpCenter:m.meta?.helpCenter}),children:l}),C.error&&e(F,{className:"RemoteFlows__TimeField__Error"})]})}n(w,"TimeFieldDefault");export{w as a};
2
- //# sourceMappingURL=chunk-T3IHAH3B.js.map
1
+ import{a as c}from"./chunk-LQFLXXBR.js";import{a as _}from"./chunk-RKXF7Q7V.js";import{j as i,k as p,l as a,n as s,o as F}from"./chunk-4FGKIGKF.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as d}from"react/jsx-runtime";function w({field:o,fieldState:C,fieldData:m}){let{name:t,label:r,description:l}=m;return d(i,{"data-field":t,className:`RemoteFlows__TimeField__Item__${t}`,children:[r&&e(p,{className:"RemoteFlows__TimeField__Label",children:r}),e(a,{children:e(c,{...o,type:"time",value:o.value??"",onChange:T=>{o.onChange(T)},className:"RemoteFlows__TimeField__Input",placeholder:r})}),(l||m.meta?.helpCenter)&&e(s,{className:"RemoteFlows__TimeField__Description",helpCenter:e(_,{helpCenter:m.meta?.helpCenter}),children:l}),C.error&&e(F,{className:"RemoteFlows__TimeField__Error"})]})}n(w,"TimeFieldDefault");export{w as a};
2
+ //# sourceMappingURL=chunk-B2EUK7V5.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-R7AWHFPG.js";import{b as o}from"./chunk-PGWKJ6FK.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as r}from"react/jsx-runtime";function u(){let{onboardingBag:e}=o();return r(t,{defaultValues:{},onSubmit:n(async()=>{e?.next()},"handleSubmit")})}n(u,"PreviewEmploymentAgreementStep");export{u as a};
2
- //# sourceMappingURL=chunk-WMUF335R.js.map
1
+ import{a as t}from"./chunk-Q3JA2NA7.js";import{b as o}from"./chunk-PGWKJ6FK.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as r}from"react/jsx-runtime";function u(){let{onboardingBag:e}=o();return r(t,{defaultValues:{},onSubmit:n(async()=>{e?.next()},"handleSubmit")})}n(u,"PreviewEmploymentAgreementStep");export{u as a};
2
+ //# sourceMappingURL=chunk-B7UUTLAM.js.map
@@ -1,2 +1,2 @@
1
- import{b as a}from"./chunk-WCJZAOZR.js";import{g as p}from"./chunk-NGCNYQSC.js";import{b as r,x as s}from"./chunk-NXRWBI36.js";import{b as m}from"./chunk-H2O4CVKF.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as h}from"react/jsx-runtime";function C({onSuccess:c,onError:l,children:d}){let{adminBag:t}=a(),{components:u}=m(),e=p(),{mutateAsyncOrThrow:f}=r(e),i=u?.button;if(!i)throw new Error("Button component not found");return h(i,{onClick:n(async()=>{try{if(!t.employmentId)throw new Error("Employment ID is missing. Complete the previous steps first.");let o=await f({employmentId:t.employmentId});await t.refetchSteps(),await c?.(o),t.next()}catch(o){l?.(s(o))}},"handleInvite"),disabled:e.isPending||t.isSubmitting,children:d??"Send invitation"})}n(C,"InvitationStep");export{C as a};
2
- //# sourceMappingURL=chunk-LGSOTN4M.js.map
1
+ import{b as a}from"./chunk-WCJZAOZR.js";import{g as p}from"./chunk-Y7PBPPUC.js";import{b as r,x as s}from"./chunk-NXRWBI36.js";import{b as m}from"./chunk-H2O4CVKF.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as h}from"react/jsx-runtime";function C({onSuccess:c,onError:l,children:d}){let{adminBag:t}=a(),{components:u}=m(),e=p(),{mutateAsyncOrThrow:f}=r(e),i=u?.button;if(!i)throw new Error("Button component not found");return h(i,{onClick:n(async()=>{try{if(!t.employmentId)throw new Error("Employment ID is missing. Complete the previous steps first.");let o=await f({employmentId:t.employmentId});await t.refetchSteps(),await c?.(o),t.next()}catch(o){l?.(s(o))}},"handleInvite"),disabled:e.isPending||t.isSubmitting,children:d??"Send invitation"})}n(C,"InvitationStep");export{C as a};
2
+ //# sourceMappingURL=chunk-BGEDMAHU.js.map
@@ -0,0 +1,2 @@
1
+ import{c as s,i as a}from"./chunk-4FGKIGKF.js";import{b as m,c as p}from"./chunk-H2O4CVKF.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function D({name:o,description:l,descriptionSuffix:F,label:c,type:x,onChange:t,component:f,includeErrorMessage:u=!0,additionalProps:T={},maxLength:C,...P}){let{components:S}=m(),{control:g}=s(),M=p();return d(a,{control:g,name:o,render:({field:r,fieldState:R})=>{let n=f||S?.text;if(!n)throw new Error(`Text component not found for field ${o}`);let $={name:o,description:l,descriptionSuffix:F,label:c,type:x,onChange:t,metadata:T,maxLength:C,includeErrorMessage:u,transformHtml:M,...P};return d(n,{field:{...r,onChange:e(i=>{r.onChange(i),t?.(i)},"onChange")},fieldState:R,fieldData:$})}})}e(D,"TextField");export{D as a};
2
+ //# sourceMappingURL=chunk-BODQC6OK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/form/fields/TextField.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { useFormFields, useTransformer } from '@/src/context';\nimport { Components, JSFField, $TSFixMe } from '@/src/types/remoteFlows';\nimport { useFormContext } from 'react-hook-form';\nimport { FormField } from '../../ui/form';\nimport { TextFieldDataProps } from '@/src/types/fields';\n\nexport type TextFieldProps = React.ComponentProps<'input'> & {\n name: string;\n} & Partial<\n JSFField & {\n onChange?: (value: $TSFixMe) => void;\n component?: Components['text'];\n includeErrorMessage?: boolean;\n additionalProps?: Record<string, unknown>;\n descriptionSuffix?: React.ReactNode;\n }\n >;\n\ntype CustomTextFieldProps = TextFieldDataProps & {\n /**\n * @deprecated avoid using this prop in custom components\n */\n onChange?: (value: $TSFixMe) => void;\n};\n\nexport function TextField({\n name,\n description,\n descriptionSuffix,\n label,\n type,\n onChange,\n component,\n includeErrorMessage = true,\n additionalProps = {},\n maxLength,\n ...rest\n}: TextFieldProps) {\n const { components } = useFormFields();\n const { control } = useFormContext();\n const transformHtml = useTransformer();\n\n return (\n <FormField\n control={control}\n name={name}\n render={({ field, fieldState }) => {\n const Component = component || components?.text;\n\n if (!Component) {\n throw new Error(`Text component not found for field ${name}`);\n }\n\n const customTextFieldProps: CustomTextFieldProps = {\n name,\n description,\n descriptionSuffix,\n label,\n type,\n onChange,\n metadata: additionalProps,\n maxLength,\n includeErrorMessage,\n transformHtml,\n ...rest,\n };\n return (\n <Component\n field={{\n ...field,\n onChange: (value: $TSFixMe) => {\n field.onChange(value);\n onChange?.(value);\n },\n }}\n fieldState={fieldState}\n fieldData={customTextFieldProps}\n />\n );\n }}\n />\n );\n}\n"],"mappings":"sIAqEU,cAAAA,MAAA,oBA1CH,SAASC,EAAU,CACxB,KAAAC,EACA,YAAAC,EACA,kBAAAC,EACA,MAAAC,EACA,KAAAC,EACA,SAAAC,EACA,UAAAC,EACA,oBAAAC,EAAsB,GACtB,gBAAAC,EAAkB,CAAC,EACnB,UAAAC,EACA,GAAGC,CACL,EAAmB,CACjB,GAAM,CAAE,WAAAC,CAAW,EAAIC,EAAc,EAC/B,CAAE,QAAAC,CAAQ,EAAIC,EAAe,EAC7BC,EAAgBC,EAAe,EAErC,OACElB,EAACmB,EAAA,CACC,QAASJ,EACT,KAAMb,EACN,OAAQ,CAAC,CAAE,MAAAkB,EAAO,WAAAC,CAAW,IAAM,CACjC,IAAMC,EAAYd,GAAaK,GAAY,KAE3C,GAAI,CAACS,EACH,MAAM,IAAI,MAAM,sCAAsCpB,CAAI,EAAE,EAG9D,IAAMqB,EAA6C,CACjD,KAAArB,EACA,YAAAC,EACA,kBAAAC,EACA,MAAAC,EACA,KAAAC,EACA,SAAAC,EACA,SAAUG,EACV,UAAAC,EACA,oBAAAF,EACA,cAAAQ,EACA,GAAGL,CACL,EACA,OACEZ,EAACsB,EAAA,CACC,MAAO,CACL,GAAGF,EACH,SAAUI,EAACC,GAAoB,CAC7BL,EAAM,SAASK,CAAK,EACpBlB,IAAWkB,CAAK,CAClB,EAHU,WAIZ,EACA,WAAYJ,EACZ,UAAWE,EACb,CAEJ,EACF,CAEJ,CAzDgBC,EAAAvB,EAAA","names":["jsx","TextField","name","description","descriptionSuffix","label","type","onChange","component","includeErrorMessage","additionalProps","maxLength","rest","components","useFormFields","control","useFormContext","transformHtml","useTransformer","FormField","field","fieldState","Component","customTextFieldProps","__name","value"]}
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-PQGDGJLG.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-4IEAIF46.js.map
1
+ import{a as e}from"./chunk-3HA6BIFT.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-BXWYSFLP.js.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-5MPW7QWT.js";import{a as k}from"./chunk-XFD3ULUF.js";import{a as m,b as u,c as h,d as _}from"./chunk-DFJNVGK4.js";import{a as y}from"./chunk-NW3D7CPK.js";import{a as g}from"./chunk-S5BNS2JE.js";import{P as T,c as D,la as b}from"./chunk-XPITUVQE.js";import{e as i}from"./chunk-H2O4CVKF.js";import{a as n}from"./chunk-P37U34EQ.js";import{useQuery as v}from"@tanstack/react-query";var c=n(({employmentId:e,status:t,timeoffType:a,options:o})=>{let{client:r}=i();return v({queryKey:["timeoff",e,t],retry:!1,queryFn:n(()=>b({client:r,headers:{Authorization:""},query:{employment_id:e,status:t,timeoff_type:a}}),"queryFn"),select:n(({data:s})=>o?.select?.(s)??s,"select"),enabled:o?.enabled})},"useTimeOffQuery"),R=n((e,t)=>{let a=y(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),o=y(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});return`${a} \u2192 ${o}`},"formatDateRange"),N=n(({employmentId:e,options:t})=>c({employmentId:e,timeoffType:"paid_time_off",options:{enabled:t?.enabled,select:n(a=>({bookedDays:a?.data?.timeoffs?.reduce((o,r)=>o+(r?.timeoff_days?.filter(s=>s.hours!=null&&s.hours>0).length||0),0)||0,timeoffs:a?.data?.timeoffs?.map(o=>{let r=o?.timeoff_days?.filter(s=>s.hours>0).length||0;return{status:o?.status,duration:r,startDate:o?.start_date,endDate:o?.end_date,formattedDate:R(o?.start_date,o?.end_date)}})||[]}),"select")}}),"usePaidTimeoffBreakdownQuery"),A=n(({employmentId:e})=>{let{client:t}=i();return v({queryKey:["timeoff-balance",e],retry:!1,queryFn:n(()=>T({client:t,headers:{Authorization:""},path:{employment_id:e}}),"queryFn"),select:n(({data:a})=>a,"select")})},"useTimeOffLeavePoliciesSummaryQuery");import{useMutation as x,useQuery as Q}from"@tanstack/react-query";function V(e){return Object.entries(e).reduce((t,[a,o])=>({...t,[a]:h(o)}),{})}n(V,"formatTimeoffValues");function F(e){let t=e?.contract_details?.available_pto,a=e?.contract_details?.available_pto_type;return e?.country?.code==="USA"&&a==="unlimited"?{value:t===0?20:t}:a==="unlimited"&&t>0?{value:t}:{value:t}}n(F,"getMinimumStatutoryDays");function q(e,t){let a=0,o=0;return e.forEach(r=>{r.timeoff_days?.forEach(s=>{new Date(s.day)<=t?a+=s.hours||0:o+=s.hours||0})}),{before:a,after:o}}n(q,"getAllTimeoffHoursBeforeDate");var U=n(({employmentId:e,date:t,options:a})=>c({employmentId:e,timeoffType:"paid_time_off",status:"approved",options:{enabled:a?.enabled,select:n(o=>{let{before:r,after:s}=q(o?.data?.timeoffs||[],new Date(t));return{bookedDaysBeforeTermination:u(r),bookedDaysAfterTermination:u(s)}},"select")}}),"useBookedTimeoffBeforeAndAfterTerminationQuery"),me=n(({employmentId:e,proposedTerminationDate:t,employment:a})=>{let{value:o=0}=F(a),r=A({employmentId:e}),s=U({employmentId:e,date:t}),p=r.data?.data?.[0].annual_entitlement.type==="limited"?{days:r.data?.data?.[0].annual_entitlement.days,hours:r.data?.data?.[0].annual_entitlement.hours}:{days:o,hours:0},d={days:r.data?.data?.[0].booked.days||0,hours:r.data?.data?.[0].booked.hours||0},f=r.data?.data?.[0].current_entitlement.type==="limited"?{days:r.data?.data?.[0].current_entitlement.days||0,hours:r.data?.data?.[0].current_entitlement.hours||0}:{days:o,hours:0},l={days:r.data?.data?.[0].used.days||0,hours:r.data?.data?.[0].used.hours||0},B=s.data?.bookedDaysBeforeTermination||{days:0,hours:0},C=s.data?.bookedDaysAfterTermination||{days:0,hours:0},H=m(f.days,f.hours),P=m(l.days,l.hours),E=m(d.days,d.hours),L=H-P-E,O=_(u(L));return{data:{...V({entitledDays:p,bookedDays:d,usedDays:l,approvedDaysBeforeTermination:B,approvedDaysAfterTermination:C,remainingDays:O,currentEntitlementDays:f}),isUnlimitedPto:a?.contract_details?.available_pto_type==="unlimited"},isLoading:r.isLoading||s.isLoading,isError:r.isError||s.isError,error:r.error||s.error}},"useSummaryTimeOffDataQuery"),ue=n(()=>{let{client:e}=i();return x({mutationFn:n(t=>D({client:e,body:t}),"mutationFn")})},"useCreateTermination"),de=n(({formValues:e,jsfModify:t,step:a})=>Q({queryKey:["rmt-flows-termination-schema",a],queryFn:n(()=>S[a]??k,"queryFn"),select:n(({data:o})=>{let r=o?.schema||{};return g(r,e||{},{jsfModify:t})},"select")}),"useTerminationSchema");export{c as a,N as b,A as c,U as d,me as e,ue as f,de as g};
2
- //# sourceMappingURL=chunk-PMIGYQEX.js.map
1
+ import{a as S}from"./chunk-5MPW7QWT.js";import{a as k}from"./chunk-XFD3ULUF.js";import{a as m,b as u,c as h,d as _}from"./chunk-DFJNVGK4.js";import{a as y}from"./chunk-NW3D7CPK.js";import{a as g}from"./chunk-S5BNS2JE.js";import{O as T,c as D,ka as b}from"./chunk-XI55YG73.js";import{e as i}from"./chunk-H2O4CVKF.js";import{a as n}from"./chunk-P37U34EQ.js";import{useQuery as v}from"@tanstack/react-query";var c=n(({employmentId:e,status:t,timeoffType:a,options:o})=>{let{client:r}=i();return v({queryKey:["timeoff",e,t],retry:!1,queryFn:n(()=>b({client:r,headers:{Authorization:""},query:{employment_id:e,status:t,timeoff_type:a}}),"queryFn"),select:n(({data:s})=>o?.select?.(s)??s,"select"),enabled:o?.enabled})},"useTimeOffQuery"),R=n((e,t)=>{let a=y(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),o=y(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});return`${a} \u2192 ${o}`},"formatDateRange"),N=n(({employmentId:e,options:t})=>c({employmentId:e,timeoffType:"paid_time_off",options:{enabled:t?.enabled,select:n(a=>({bookedDays:a?.data?.timeoffs?.reduce((o,r)=>o+(r?.timeoff_days?.filter(s=>s.hours!=null&&s.hours>0).length||0),0)||0,timeoffs:a?.data?.timeoffs?.map(o=>{let r=o?.timeoff_days?.filter(s=>s.hours>0).length||0;return{status:o?.status,duration:r,startDate:o?.start_date,endDate:o?.end_date,formattedDate:R(o?.start_date,o?.end_date)}})||[]}),"select")}}),"usePaidTimeoffBreakdownQuery"),A=n(({employmentId:e})=>{let{client:t}=i();return v({queryKey:["timeoff-balance",e],retry:!1,queryFn:n(()=>T({client:t,headers:{Authorization:""},path:{employment_id:e}}),"queryFn"),select:n(({data:a})=>a,"select")})},"useTimeOffLeavePoliciesSummaryQuery");import{useMutation as x,useQuery as Q}from"@tanstack/react-query";function V(e){return Object.entries(e).reduce((t,[a,o])=>({...t,[a]:h(o)}),{})}n(V,"formatTimeoffValues");function F(e){let t=e?.contract_details?.available_pto,a=e?.contract_details?.available_pto_type;return e?.country?.code==="USA"&&a==="unlimited"?{value:t===0?20:t}:a==="unlimited"&&t>0?{value:t}:{value:t}}n(F,"getMinimumStatutoryDays");function q(e,t){let a=0,o=0;return e.forEach(r=>{r.timeoff_days?.forEach(s=>{new Date(s.day)<=t?a+=s.hours||0:o+=s.hours||0})}),{before:a,after:o}}n(q,"getAllTimeoffHoursBeforeDate");var U=n(({employmentId:e,date:t,options:a})=>c({employmentId:e,timeoffType:"paid_time_off",status:"approved",options:{enabled:a?.enabled,select:n(o=>{let{before:r,after:s}=q(o?.data?.timeoffs||[],new Date(t));return{bookedDaysBeforeTermination:u(r),bookedDaysAfterTermination:u(s)}},"select")}}),"useBookedTimeoffBeforeAndAfterTerminationQuery"),me=n(({employmentId:e,proposedTerminationDate:t,employment:a})=>{let{value:o=0}=F(a),r=A({employmentId:e}),s=U({employmentId:e,date:t}),p=r.data?.data?.[0].annual_entitlement.type==="limited"?{days:r.data?.data?.[0].annual_entitlement.days,hours:r.data?.data?.[0].annual_entitlement.hours}:{days:o,hours:0},d={days:r.data?.data?.[0].booked.days||0,hours:r.data?.data?.[0].booked.hours||0},f=r.data?.data?.[0].current_entitlement.type==="limited"?{days:r.data?.data?.[0].current_entitlement.days||0,hours:r.data?.data?.[0].current_entitlement.hours||0}:{days:o,hours:0},l={days:r.data?.data?.[0].used.days||0,hours:r.data?.data?.[0].used.hours||0},B=s.data?.bookedDaysBeforeTermination||{days:0,hours:0},C=s.data?.bookedDaysAfterTermination||{days:0,hours:0},H=m(f.days,f.hours),P=m(l.days,l.hours),E=m(d.days,d.hours),L=H-P-E,O=_(u(L));return{data:{...V({entitledDays:p,bookedDays:d,usedDays:l,approvedDaysBeforeTermination:B,approvedDaysAfterTermination:C,remainingDays:O,currentEntitlementDays:f}),isUnlimitedPto:a?.contract_details?.available_pto_type==="unlimited"},isLoading:r.isLoading||s.isLoading,isError:r.isError||s.isError,error:r.error||s.error}},"useSummaryTimeOffDataQuery"),ue=n(()=>{let{client:e}=i();return x({mutationFn:n(t=>D({client:e,body:t}),"mutationFn")})},"useCreateTermination"),de=n(({formValues:e,jsfModify:t,step:a})=>Q({queryKey:["rmt-flows-termination-schema",a],queryFn:n(()=>S[a]??k,"queryFn"),select:n(({data:o})=>{let r=o?.schema||{};return g(r,e||{},{jsfModify:t})},"select")}),"useTerminationSchema");export{c as a,N as b,A as c,U as d,me as e,ue as f,de as g};
2
+ //# sourceMappingURL=chunk-CD2QYFEH.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-52GHCI6X.js";import{b as e}from"./chunk-Q3ALCPJN.js";import{x as a}from"./chunk-NXRWBI36.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as g}from"react/jsx-runtime";function E({components:m,onSubmit:p,onSuccess:l,onError:c}){let{contractorOnboardingBag:r}=e(),d=i(async(t,P)=>{try{let n=await r.parseFormValues(t);await p?.(n);let o=await r.onSubmit(t);if(o?.data){await l?.(o?.data),r?.next();return}}catch(n){let o=a(n,r.meta?.fields?.pricing_plan,P);c?.(o)}},"handleSubmit"),u=r.stepState.values?.pricing_plan||r.initialValues.pricing_plan;return g(s,{components:m,defaultValues:u,onSubmit:d})}i(E,"PricingPlanStep");export{E as a};
2
- //# sourceMappingURL=chunk-BIE73HZH.js.map
1
+ import{a as s}from"./chunk-A5RTFMYQ.js";import{b as e}from"./chunk-Q3ALCPJN.js";import{x as a}from"./chunk-NXRWBI36.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as g}from"react/jsx-runtime";function E({components:m,onSubmit:p,onSuccess:l,onError:c}){let{contractorOnboardingBag:r}=e(),d=i(async(t,P)=>{try{let n=await r.parseFormValues(t);await p?.(n);let o=await r.onSubmit(t);if(o?.data){await l?.(o?.data),r?.next();return}}catch(n){let o=a(n,r.meta?.fields?.pricing_plan,P);c?.(o)}},"handleSubmit"),u=r.stepState.values?.pricing_plan||r.initialValues.pricing_plan;return g(s,{components:m,defaultValues:u,onSubmit:d})}i(E,"PricingPlanStep");export{E as a};
2
+ //# sourceMappingURL=chunk-CFI75D3K.js.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-PMCCHSXD.js";import{a as e}from"./chunk-DL6MFAFK.js";import{b as i}from"./chunk-WCJZAOZR.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as l}from"react/jsx-runtime";function p(o){let{adminBag:t}=i(),s=n(o),r={...t.initialValues?.administrative_details,...t.stepState.values?.administrative_details};return l(e,{onSubmit:s,defaultValues:r})}a(p,"AdministrativeDetailsStep");export{p as a};
2
- //# sourceMappingURL=chunk-QDTMDSL5.js.map
1
+ import{a as n}from"./chunk-PMCCHSXD.js";import{a as e}from"./chunk-YWLILBPW.js";import{b as i}from"./chunk-WCJZAOZR.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as l}from"react/jsx-runtime";function p(o){let{adminBag:t}=i(),s=n(o),r={...t.initialValues?.administrative_details,...t.stepState.values?.administrative_details};return l(e,{onSubmit:s,defaultValues:r})}a(p,"AdministrativeDetailsStep");export{p as a};
2
+ //# sourceMappingURL=chunk-D2SVE4KC.js.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-NPXIFNK2.js";import{a as o}from"./chunk-X7KIEFEN.js";import{b as a}from"./chunk-SS2SYDCB.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as n}from"react/jsx-runtime";function u(r){let{employeeBag:e}=a(),s=o(r);return e.taxStepsAvailability.federal_taxes.isAvailable?n(l,{onSubmit:s,defaultValues:{...e.initialValues?.federal_taxes,...e.stepState.values?.federal_taxes}}):null}t(u,"FederalTaxesStep");export{u as a};
2
- //# sourceMappingURL=chunk-TC6KCSDD.js.map
1
+ import{a as l}from"./chunk-62XCZZJ3.js";import{a as o}from"./chunk-X7KIEFEN.js";import{b as a}from"./chunk-SS2SYDCB.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as n}from"react/jsx-runtime";function u(r){let{employeeBag:e}=a(),s=o(r);return e.taxStepsAvailability.federal_taxes.isAvailable?n(l,{onSubmit:s,defaultValues:{...e.initialValues?.federal_taxes,...e.stepState.values?.federal_taxes}}):null}t(u,"FederalTaxesStep");export{u as a};
2
+ //# sourceMappingURL=chunk-D3EISEXY.js.map
@@ -1,2 +1,2 @@
1
- import{a as _}from"./chunk-NDWVOVDM.js";import{a as C}from"./chunk-MZN6VY5F.js";import{j as i,k as c,l as a,n as F,o as u}from"./chunk-4FGKIGKF.js";import{a as p}from"./chunk-P37U34EQ.js";import{useEffect as O,useState as g}from"react";import{jsx as o,jsxs as I}from"react/jsx-runtime";var w=p(({field:t,fieldState:d,fieldData:r})=>{let[f,n]=g([]),{name:m,label:h,description:s,options:l}=r,v=f||l?.filter(e=>t.value?.includes(e.value));return O(()=>{n(l?.filter(e=>t.value?.includes(e.value))||[])},[t.value,l]),I(i,{"data-field":m,className:`RemoteFlows__SelectField__Item__${m}`,children:[o(c,{className:"RemoteFlows__SelectField__Label",children:h}),o(a,{children:o(_,{options:l||[],selected:v,onChange:e=>{let S=e.map(({value:b})=>b);t.onChange(S),n(e)}})}),(s||r.meta?.helpCenter)&&o(F,{helpCenter:o(C,{helpCenter:r.meta?.helpCenter}),children:s}),d.error&&o(u,{})]})},"MultiSelectFieldDefault");export{w as a};
2
- //# sourceMappingURL=chunk-JXH42V2F.js.map
1
+ import{a as _}from"./chunk-NDWVOVDM.js";import{a as C}from"./chunk-RKXF7Q7V.js";import{j as i,k as c,l as a,n as F,o as u}from"./chunk-4FGKIGKF.js";import{a as p}from"./chunk-P37U34EQ.js";import{useEffect as O,useState as g}from"react";import{jsx as o,jsxs as I}from"react/jsx-runtime";var w=p(({field:t,fieldState:d,fieldData:r})=>{let[f,n]=g([]),{name:m,label:h,description:s,options:l}=r,v=f||l?.filter(e=>t.value?.includes(e.value));return O(()=>{n(l?.filter(e=>t.value?.includes(e.value))||[])},[t.value,l]),I(i,{"data-field":m,className:`RemoteFlows__SelectField__Item__${m}`,children:[o(c,{className:"RemoteFlows__SelectField__Label",children:h}),o(a,{children:o(_,{options:l||[],selected:v,onChange:e=>{let S=e.map(({value:b})=>b);t.onChange(S),n(e)}})}),(s||r.meta?.helpCenter)&&o(F,{helpCenter:o(C,{helpCenter:r.meta?.helpCenter}),children:s}),d.error&&o(u,{})]})},"MultiSelectFieldDefault");export{w as a};
2
+ //# sourceMappingURL=chunk-DGHXBSBS.js.map
@@ -1,2 +1,2 @@
1
- import{b as f}from"./chunk-76ZDXC2T.js";import{b as p}from"./chunk-KFYWUBRS.js";import{a as c}from"./chunk-WL7WQBSR.js";import{f as a,h as d}from"./chunk-4FGKIGKF.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as y,useRef as b}from"react";import{jsx as l}from"react/jsx-runtime";import{createElement as g}from"react";function B({defaultValues:s,onSubmit:u,components:F}){let{formId:C,createCompanyBag:o}=f(),m=b(s),h=p(o.handleValidation),r=a({resolver:h,defaultValues:s,shouldUnregister:!1,mode:"onBlur"});y(()=>{let n=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==m.current[i])&&(o?.checkFieldUpdates(e),m.current={...e})});return()=>n?.unsubscribe()},[]);let S=t(async n=>{await u(n)},"handleSubmit");return g(d,{...r,key:`form-${o.stepState.currentStep.name}`},l("form",{id:C,onSubmit:r.handleSubmit(S),className:"space-y-4 RemoteFlows__OnboardingForm",children:l(c,{components:F,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}t(B,"CreateCompanyForm");export{B as a};
2
- //# sourceMappingURL=chunk-RFVATVNN.js.map
1
+ import{b as f}from"./chunk-76ZDXC2T.js";import{b as p}from"./chunk-KFYWUBRS.js";import{a as c}from"./chunk-KSZ3D3P3.js";import{f as a,h as d}from"./chunk-4FGKIGKF.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as y,useRef as b}from"react";import{jsx as l}from"react/jsx-runtime";import{createElement as g}from"react";function B({defaultValues:s,onSubmit:u,components:F}){let{formId:C,createCompanyBag:o}=f(),m=b(s),h=p(o.handleValidation),r=a({resolver:h,defaultValues:s,shouldUnregister:!1,mode:"onBlur"});y(()=>{let n=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==m.current[i])&&(o?.checkFieldUpdates(e),m.current={...e})});return()=>n?.unsubscribe()},[]);let S=t(async n=>{await u(n)},"handleSubmit");return g(d,{...r,key:`form-${o.stepState.currentStep.name}`},l("form",{id:C,onSubmit:r.handleSubmit(S),className:"space-y-4 RemoteFlows__OnboardingForm",children:l(c,{components:F,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}t(B,"CreateCompanyForm");export{B as a};
2
+ //# sourceMappingURL=chunk-DVPC5UZZ.js.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-3UDRMQNE.js";import{a as E}from"./chunk-YDL42SVF.js";import{a as g}from"./chunk-VDRNNOVA.js";import{b as p}from"./chunk-TZIDQ5O3.js";import{a as y}from"./chunk-NW3D7CPK.js";import{d as w}from"./chunk-XZMPAJRL.js";import{a as b,h as S,i as C}from"./chunk-PB6UQ4A4.js";import{a as f,c as v}from"./chunk-INUCPQVI.js";import{a as t}from"./chunk-P37U34EQ.js";import{addYears as I,format as u}from"date-fns";import{Fragment as D,jsx as _,jsxs as F}from"react/jsx-runtime";var x=t(n=>n===b,"isStandardPricingPlan"),M=t((n,i)=>{let e=i&&i<u(new Date,"yyyy-MM-dd");if(!n&&e)return p({severity:"warning",description:"Backdating the service start date is not supported in the selected Contractor Management plan."})},"showBackDateWarning");function R(n,i,e){e({...i,services_and_deliverables_ai_warning:"",services_and_deliverables_error_skippable:!1})}t(R,"onServicesAndDeliverablesChange");var $=t((n,i,e,r,a)=>{let d=x(e),c=r?.service_duration?.provisional_start_date,l=M(d,c),o=p({severity:"warning",title:"Possible misclassification risk",description:a?C:S});return{...n,create:{...n?.create,services_and_deliverables_ai_warning:{type:"string","x-jsf-presentation":{inputType:"hidden"}},services_and_deliverables_error_skippable:{type:"boolean","x-jsf-presentation":{inputType:"hidden"}}},fields:{...n?.fields,"service_duration.provisional_start_date":{description:i,"x-jsf-presentation":{minDate:d?void 0:u(new Date,"yyyy-MM-dd"),...l}},"service_duration.expiration_date":{"x-jsf-presentation":{calculateDynamicProperties:t(s=>{let m=a&&s.service_duration?.provisional_start_date?I(y(s.service_duration.provisional_start_date),1):void 0;return{maxDate:m?u(m,"yyyy-MM-dd"):void 0}},"calculateDynamicProperties")}},services_and_deliverables:{onChange:R,"x-jsf-presentation":{calculateDynamicProperties:t(s=>({statement:s.services_and_deliverables_ai_warning?o.statement:void 0}),"calculateDynamicProperties")}}}}},"buildContractDetailsJsfModify"),z=t((n,i,e)=>{let r=n==="SAU",a=n==="GBR",d=w(n);if(!r&&!a&&!d)return e?.jsfModify?.basic_information;if(a)return{...e?.jsfModify?.basic_information,create:{...e?.jsfModify?.basic_information?.create,ir35:{title:"IR35 Status",description:t(()=>F(D,{children:["What's your contractor's employment status?"," ",_(v,{zendeskId:f.ir35Status,children:"Learn more about IR35"})]}),"description"),oneOf:[{const:"inside",title:"Inside IR35 (deemed employee)"},{const:"outside",title:"Outside IR35"},{const:"exempt",title:"Exempt from IR35"}],"x-jsf-presentation":{inputType:"select"}},ir35_sds_file:{title:"Upload SDS",description:"Status determination statement",type:"string","x-jsf-presentation":{inputType:"file",accept:g.document,multiple:!1,maxSize:20971520,calculateDynamicProperties:t(o=>{let s=o.ir35;return{isVisible:s==="inside"||s==="outside"}},"calculateDynamicProperties")}}},allOf:[{if:{properties:{ir35:{enum:["inside","outside"]}}},then:{required:["ir35_sds_file"]},else:{properties:{ir35_sds_file:!1}}}],required:["ir35"],orderRoot:t(o=>[...o,"ir35","ir35_sds_file"],"orderRoot")};let c=r?"Is your contractor a Saudi Arabia national, or a non-Saudi national contracting via a local business entity or under a Special Privilege Iqama visa?":`Is the contractor a ${i??"selected country"} national, or a non-${i??"selected country"} national contracting through their local business entity?`,l=r?"Please be aware that contracting with non-Saudi Arabia nationals that are not operating as a company or under a Special Privilege Iqama visa can lead to fines for operating without proper work authorization. If you are concerned, please speak with the Contractor and/or local Saudi Arabia counsel to ensure compliance.":`Be aware that the Contractor must be a ${i??"selected country"} national, or a non-${i??"selected country"} national operating through their company to comply with the legal requirements for performing services and deliverables as a contractor in ${i??"selected country"}. If you are concerned, speak with the Contractor and/or local counsel to ensure compliance.`;return{...e?.jsfModify?.basic_information,create:{...e?.jsfModify?.basic_information?.create,nationality_status:{title:c,description:"",type:"string",oneOf:[{const:"national",description:"",title:"Yes"},{const:"non_national",description:l,title:"No"}],"x-jsf-presentation":{inputType:"radio"}}},required:["nationality_status"],orderRoot:t(o=>[...o,"nationality_status"],"orderRoot")}},"buildBasicInformationJsfModify"),G=t((n,i)=>{let e=n?.jsfModify?.contract_preview?.fields;return{fields:{contract_preview_header:{...e?.contract_preview_header,"x-jsf-presentation":{Component:t(r=>{let a=e?.contract_preview_header?.["x-jsf-presentation"]?.Component||h;return _(a,{...r})},"Component")}},contract_preview_statement:{...e?.contract_preview_statement,"x-jsf-presentation":{Component:t(r=>{let a=e?.contract_preview_statement?.["x-jsf-presentation"]?.Component||E;return _(a,{reviewCompleted:!!i?.review_completed,...r})},"Component")}},signature:{...e?.signature,"x-jsf-presentation":{calculateDynamicProperties:t(r=>({isVisible:!!r.review_completed}),"calculateDynamicProperties"),...e?.signature?.["x-jsf-presentation"]}}}}},"buildContractPreviewJsfModify");export{$ as a,z as b,G as c};
2
- //# sourceMappingURL=chunk-XDRJTAFV.js.map
1
+ import{a as h}from"./chunk-3UDRMQNE.js";import{a as E}from"./chunk-YDL42SVF.js";import{a as g}from"./chunk-VDRNNOVA.js";import{b as p}from"./chunk-TZIDQ5O3.js";import{a as y}from"./chunk-NW3D7CPK.js";import{d as w}from"./chunk-XZMPAJRL.js";import{a as b,h as S,i as C}from"./chunk-PB6UQ4A4.js";import{a as f,c as v}from"./chunk-WDO7XH6B.js";import{a as t}from"./chunk-P37U34EQ.js";import{addYears as I,format as u}from"date-fns";import{Fragment as D,jsx as _,jsxs as F}from"react/jsx-runtime";var x=t(n=>n===b,"isStandardPricingPlan"),M=t((n,i)=>{let e=i&&i<u(new Date,"yyyy-MM-dd");if(!n&&e)return p({severity:"warning",description:"Backdating the service start date is not supported in the selected Contractor Management plan."})},"showBackDateWarning");function R(n,i,e){e({...i,services_and_deliverables_ai_warning:"",services_and_deliverables_error_skippable:!1})}t(R,"onServicesAndDeliverablesChange");var $=t((n,i,e,r,a)=>{let d=x(e),c=r?.service_duration?.provisional_start_date,l=M(d,c),o=p({severity:"warning",title:"Possible misclassification risk",description:a?C:S});return{...n,create:{...n?.create,services_and_deliverables_ai_warning:{type:"string","x-jsf-presentation":{inputType:"hidden"}},services_and_deliverables_error_skippable:{type:"boolean","x-jsf-presentation":{inputType:"hidden"}}},fields:{...n?.fields,"service_duration.provisional_start_date":{description:i,"x-jsf-presentation":{minDate:d?void 0:u(new Date,"yyyy-MM-dd"),...l}},"service_duration.expiration_date":{"x-jsf-presentation":{calculateDynamicProperties:t(s=>{let m=a&&s.service_duration?.provisional_start_date?I(y(s.service_duration.provisional_start_date),1):void 0;return{maxDate:m?u(m,"yyyy-MM-dd"):void 0}},"calculateDynamicProperties")}},services_and_deliverables:{onChange:R,"x-jsf-presentation":{calculateDynamicProperties:t(s=>({statement:s.services_and_deliverables_ai_warning?o.statement:void 0}),"calculateDynamicProperties")}}}}},"buildContractDetailsJsfModify"),z=t((n,i,e)=>{let r=n==="SAU",a=n==="GBR",d=w(n);if(!r&&!a&&!d)return e?.jsfModify?.basic_information;if(a)return{...e?.jsfModify?.basic_information,create:{...e?.jsfModify?.basic_information?.create,ir35:{title:"IR35 Status",description:t(()=>F(D,{children:["What's your contractor's employment status?"," ",_(v,{zendeskId:f.ir35Status,children:"Learn more about IR35"})]}),"description"),oneOf:[{const:"inside",title:"Inside IR35 (deemed employee)"},{const:"outside",title:"Outside IR35"},{const:"exempt",title:"Exempt from IR35"}],"x-jsf-presentation":{inputType:"select"}},ir35_sds_file:{title:"Upload SDS",description:"Status determination statement",type:"string","x-jsf-presentation":{inputType:"file",accept:g.document,multiple:!1,maxSize:20971520,calculateDynamicProperties:t(o=>{let s=o.ir35;return{isVisible:s==="inside"||s==="outside"}},"calculateDynamicProperties")}}},allOf:[{if:{properties:{ir35:{enum:["inside","outside"]}}},then:{required:["ir35_sds_file"]},else:{properties:{ir35_sds_file:!1}}}],required:["ir35"],orderRoot:t(o=>[...o,"ir35","ir35_sds_file"],"orderRoot")};let c=r?"Is your contractor a Saudi Arabia national, or a non-Saudi national contracting via a local business entity or under a Special Privilege Iqama visa?":`Is the contractor a ${i??"selected country"} national, or a non-${i??"selected country"} national contracting through their local business entity?`,l=r?"Please be aware that contracting with non-Saudi Arabia nationals that are not operating as a company or under a Special Privilege Iqama visa can lead to fines for operating without proper work authorization. If you are concerned, please speak with the Contractor and/or local Saudi Arabia counsel to ensure compliance.":`Be aware that the Contractor must be a ${i??"selected country"} national, or a non-${i??"selected country"} national operating through their company to comply with the legal requirements for performing services and deliverables as a contractor in ${i??"selected country"}. If you are concerned, speak with the Contractor and/or local counsel to ensure compliance.`;return{...e?.jsfModify?.basic_information,create:{...e?.jsfModify?.basic_information?.create,nationality_status:{title:c,description:"",type:"string",oneOf:[{const:"national",description:"",title:"Yes"},{const:"non_national",description:l,title:"No"}],"x-jsf-presentation":{inputType:"radio"}}},required:["nationality_status"],orderRoot:t(o=>[...o,"nationality_status"],"orderRoot")}},"buildBasicInformationJsfModify"),G=t((n,i)=>{let e=n?.jsfModify?.contract_preview?.fields;return{fields:{contract_preview_header:{...e?.contract_preview_header,"x-jsf-presentation":{Component:t(r=>{let a=e?.contract_preview_header?.["x-jsf-presentation"]?.Component||h;return _(a,{...r})},"Component")}},contract_preview_statement:{...e?.contract_preview_statement,"x-jsf-presentation":{Component:t(r=>{let a=e?.contract_preview_statement?.["x-jsf-presentation"]?.Component||E;return _(a,{reviewCompleted:!!i?.review_completed,...r})},"Component")}},signature:{...e?.signature,"x-jsf-presentation":{calculateDynamicProperties:t(r=>({isVisible:!!r.review_completed}),"calculateDynamicProperties"),...e?.signature?.["x-jsf-presentation"]}}}}},"buildContractPreviewJsfModify");export{$ as a,z as b,G as c};
2
+ //# sourceMappingURL=chunk-EGIXB43W.js.map
@@ -1,2 +1,2 @@
1
- import{a as m,b as s}from"./chunk-INUCPQVI.js";import{n as e}from"./chunk-NXRWBI36.js";import{a as t}from"./chunk-P37U34EQ.js";import{Fragment as a,jsx as n,jsxs as o}from"react/jsx-runtime";var l=t(()=>o(a,{children:[n("div",{className:e("RemoteFlows__EmploymentAgreementInfoContent__InfoBox"),children:n("p",{className:e("RemoteFlows__EmploymentAgreementInfoContent__InfoBoxText"),children:"You are previewing a draft version of our employment agreement template for this specific hire in this specific country, based on the selections you made on the previous screens."})}),n("p",{className:e("RemoteFlows__EmploymentAgreementInfoContent__Description"),children:"Remote's agreements are drafted by local employment and labor law experts to ensure compliance, balance, and efficiency."}),o("div",{children:[n("p",{className:e("RemoteFlows__EmploymentAgreementInfoContent__WarningTitle"),children:"We strongly discourage customizations or redlining."}),n("p",{className:e("RemoteFlows__EmploymentAgreementInfoContent__Description"),children:"Modifying agreements can:"}),o("ul",{className:e("RemoteFlows__EmploymentAgreementInfoContent__List list-disc list-inside"),children:[n("li",{className:e("RemoteFlows__EmploymentAgreementInfoContent__ListItem"),children:"Create compliance risks"}),n("li",{className:e("RemoteFlows__EmploymentAgreementInfoContent__ListItem"),children:"Jeopardize enforceability"}),n("li",{className:e("RemoteFlows__EmploymentAgreementInfoContent__ListItem"),children:"Increase the risk of misemployment"})]})]}),n("p",{className:e("RemoteFlows__EmploymentAgreementInfoContent__Description"),children:"If you have questions or believe a change is necessary, please do not invite the employee. Instead, save this invitation as a draft and contact your Account Executive or Customer Success Manager at Remote."}),o("p",{className:e("RemoteFlows__EmploymentAgreementInfoContent__Description"),children:["If neither is available, please reach out to"," ",n("a",{href:"mailto:help@remote.com",className:e("RemoteFlows__EmploymentAgreementInfoContent__Link"),target:"_blank",rel:"noopener noreferrer",children:"help@remote.com \u2197"}),". Our Legal team will review and, where possible, align your needs with local compliance requirements, before inviting the employee, ensuring a smooth onboarding process."]}),o("p",{className:e("RemoteFlows__EmploymentAgreementInfoContent__Description"),children:["For guidance, see our"," ",n("a",{className:e("RemoteFlows__EmploymentAgreementInfoContent__Link"),href:s(m.employmentAgreements),target:"_blank",rel:"noopener noreferrer",children:"Agreement Engagement Guide \u2197"})," ","to understand what can (and can't) be modified."]})]}),"EmploymentAgreementInfoContent");export{l as a};
2
- //# sourceMappingURL=chunk-RN3WPVBZ.js.map
1
+ import{a as m,b as s}from"./chunk-WDO7XH6B.js";import{n as e}from"./chunk-NXRWBI36.js";import{a as t}from"./chunk-P37U34EQ.js";import{Fragment as a,jsx as n,jsxs as o}from"react/jsx-runtime";var l=t(()=>o(a,{children:[n("div",{className:e("RemoteFlows__EmploymentAgreementInfoContent__InfoBox"),children:n("p",{className:e("RemoteFlows__EmploymentAgreementInfoContent__InfoBoxText"),children:"You are previewing a draft version of our employment agreement template for this specific hire in this specific country, based on the selections you made on the previous screens."})}),n("p",{className:e("RemoteFlows__EmploymentAgreementInfoContent__Description"),children:"Remote's agreements are drafted by local employment and labor law experts to ensure compliance, balance, and efficiency."}),o("div",{children:[n("p",{className:e("RemoteFlows__EmploymentAgreementInfoContent__WarningTitle"),children:"We strongly discourage customizations or redlining."}),n("p",{className:e("RemoteFlows__EmploymentAgreementInfoContent__Description"),children:"Modifying agreements can:"}),o("ul",{className:e("RemoteFlows__EmploymentAgreementInfoContent__List list-disc list-inside"),children:[n("li",{className:e("RemoteFlows__EmploymentAgreementInfoContent__ListItem"),children:"Create compliance risks"}),n("li",{className:e("RemoteFlows__EmploymentAgreementInfoContent__ListItem"),children:"Jeopardize enforceability"}),n("li",{className:e("RemoteFlows__EmploymentAgreementInfoContent__ListItem"),children:"Increase the risk of misemployment"})]})]}),n("p",{className:e("RemoteFlows__EmploymentAgreementInfoContent__Description"),children:"If you have questions or believe a change is necessary, please do not invite the employee. Instead, save this invitation as a draft and contact your Account Executive or Customer Success Manager at Remote."}),o("p",{className:e("RemoteFlows__EmploymentAgreementInfoContent__Description"),children:["If neither is available, please reach out to"," ",n("a",{href:"mailto:help@remote.com",className:e("RemoteFlows__EmploymentAgreementInfoContent__Link"),target:"_blank",rel:"noopener noreferrer",children:"help@remote.com \u2197"}),". Our Legal team will review and, where possible, align your needs with local compliance requirements, before inviting the employee, ensuring a smooth onboarding process."]}),o("p",{className:e("RemoteFlows__EmploymentAgreementInfoContent__Description"),children:["For guidance, see our"," ",n("a",{className:e("RemoteFlows__EmploymentAgreementInfoContent__Link"),href:s(m.employmentAgreements),target:"_blank",rel:"noopener noreferrer",children:"Agreement Engagement Guide \u2197"})," ","to understand what can (and can't) be modified."]})]}),"EmploymentAgreementInfoContent");export{l as a};
2
+ //# sourceMappingURL=chunk-EHAAVSJM.js.map
@@ -0,0 +1,2 @@
1
+ import{n as X}from"./chunk-UWSG45OM.js";import{a as L}from"./chunk-BODQC6OK.js";import{a as V}from"./chunk-RKXF7Q7V.js";import{c as A,n as U}from"./chunk-4FGKIGKF.js";import{e as G,f as N,g as D}from"./chunk-NXRWBI36.js";import{b as J}from"./chunk-H2O4CVKF.js";import{a as n,b as u,c as ke}from"./chunk-P37U34EQ.js";var _=u((Fn,z)=>{"use strict";function Me(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}n(Me,"isObject");z.exports=Me});var Q=u((Mn,K)=>{"use strict";var Ne=typeof global=="object"&&global&&global.Object===Object&&global;K.exports=Ne});var $=u((Nn,Y)=>{"use strict";var De=Q(),Le=typeof self=="object"&&self&&self.Object===Object&&self,_e=De||Le||Function("return this")();Y.exports=_e});var ee=u((Dn,Z)=>{"use strict";var $e=$(),He=n(function(){return $e.Date.now()},"now");Z.exports=He});var te=u((_n,ne)=>{"use strict";var We=/\s/;function Be(e){for(var t=e.length;t--&&We.test(e.charAt(t)););return t}n(Be,"trimmedEndIndex");ne.exports=Be});var oe=u((Hn,re)=>{"use strict";var Ae=te(),Ge=/^\s+/;function Je(e){return e&&e.slice(0,Ae(e)+1).replace(Ge,"")}n(Je,"baseTrim");re.exports=Je});var H=u((Bn,ie)=>{"use strict";var Ue=$(),Ve=Ue.Symbol;ie.exports=Ve});var ue=u((An,ce)=>{"use strict";var se=H(),ae=Object.prototype,Xe=ae.hasOwnProperty,ze=ae.toString,R=se?se.toStringTag:void 0;function Ke(e){var t=Xe.call(e,R),r=e[R];try{e[R]=void 0;var o=!0}catch{}var s=ze.call(e);return o&&(t?e[R]=r:delete e[R]),s}n(Ke,"getRawTag");ce.exports=Ke});var fe=u((Jn,le)=>{"use strict";var Qe=Object.prototype,Ye=Qe.toString;function Ze(e){return Ye.call(e)}n(Ze,"objectToString");le.exports=Ze});var ge=u((Vn,pe)=>{"use strict";var de=H(),en=ue(),nn=fe(),tn="[object Null]",rn="[object Undefined]",me=de?de.toStringTag:void 0;function on(e){return e==null?e===void 0?rn:tn:me&&me in Object(e)?en(e):nn(e)}n(on,"baseGetTag");pe.exports=on});var be=u((zn,ve)=>{"use strict";function sn(e){return e!=null&&typeof e=="object"}n(sn,"isObjectLike");ve.exports=sn});var ye=u((Qn,Ce)=>{"use strict";var an=ge(),cn=be(),un="[object Symbol]";function ln(e){return typeof e=="symbol"||cn(e)&&an(e)==un}n(ln,"isSymbol");Ce.exports=ln});var Se=u((Zn,xe)=>{"use strict";var fn=oe(),he=_(),dn=ye(),Te=NaN,mn=/^[-+]0x[0-9a-f]+$/i,pn=/^0b[01]+$/i,gn=/^0o[0-7]+$/i,vn=parseInt;function bn(e){if(typeof e=="number")return e;if(dn(e))return Te;if(he(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=he(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=fn(e);var r=pn.test(e);return r||gn.test(e)?vn(e.slice(2),r?2:8):mn.test(e)?Te:+e}n(bn,"toNumber");xe.exports=bn});var Ee=u((nt,Oe)=>{"use strict";var Cn=_(),W=ee(),je=Se(),yn="Expected a function",hn=Math.max,Tn=Math.min;function xn(e,t,r){var o,s,p,l,a,f,h=0,d=!1,g=!1,j=!0;if(typeof e!="function")throw new TypeError(yn);t=je(t)||0,Cn(r)&&(d=!!r.leading,g="maxWait"in r,p=g?hn(je(r.maxWait)||0,t):p,j="trailing"in r?!!r.trailing:j);function m(i){var v=o,T=s;return o=s=void 0,h=i,l=e.apply(T,v),l}n(m,"invokeFunc");function P(i){return h=i,a=setTimeout(x,t),d?m(i):l}n(P,"leadingEdge");function I(i){var v=i-f,T=i-h,w=t-v;return g?Tn(w,p-T):w}n(I,"remainingWait");function O(i){var v=i-f,T=i-h;return f===void 0||v>=t||v<0||g&&T>=p}n(O,"shouldInvoke");function x(){var i=W();if(O(i))return E(i);a=setTimeout(x,I(i))}n(x,"timerExpired");function E(i){return a=void 0,j&&o?m(i):(o=s=void 0,l)}n(E,"trailingEdge");function b(){a!==void 0&&clearTimeout(a),h=0,o=f=s=a=void 0}n(b,"cancel");function q(){return a===void 0?l:E(W())}n(q,"flush");function S(){var i=W(),v=O(i);if(o=arguments,s=this,f=i,v){if(a===void 0)return P(f);if(g)return clearTimeout(a),a=setTimeout(x,t),m(f)}return a===void 0&&(a=setTimeout(x,t)),l}return n(S,"debounced"),S.cancel=b,S.flush=q,S}n(xn,"debounce");Oe.exports=xn});import{useState as On,useCallback as En,useEffect as Ie,useRef as Rn}from"react";import Pn from"lodash.omit";var Pe=ke(Ee(),1);import{useCallback as Sn,useEffect as jn,useRef as Re}from"react";function B(e,t){let r=Re(e);jn(()=>{r.current=e},[e]);let o=Re((0,Pe.default)(s=>{r.current(s)},t)).current;return Sn(s=>{o(s)},[o])}n(B,"useDebounce");import{Fragment as wn,jsx as y,jsxs as qe}from"react/jsx-runtime";var In=n(({description:e,helpCenter:t,toggle:r,className:o})=>qe("span",{className:o,children:[y(U,{as:"span",helpCenter:t,children:e})," ",r]}),"DescriptionWithConversion"),qn=n(({showConversion:e,targetCurrency:t,className:r,onClick:o})=>{let{components:s}=J(),p=e?`Hide ${t} conversion`:`Show ${t} conversion`,l=s?.button;if(!l)throw new Error("Button component not found");return y(l,{className:r,"data-type":"inline",onClick:o,children:p})},"ConversionToggle"),bt=n(({sourceCurrency:e,targetCurrency:t,mainFieldName:r,conversionFieldName:o,conversionProperties:s,classNamePrefix:p,description:l,conversionType:a="spread",meta:f,splitDescription:h=!1,...d})=>{let[g,j]=On(!1),{setValue:m,watch:P}=A(),I=P(r||d.name),O=Rn(!0),x=e&&t&&e!==t,{mutateAsync:E}=X({type:a}),b=`${d.name}_converted`;Ie(()=>{m(b,r||d.name)},[m,r,d.name,b]),Ie(()=>{if(O.current){O.current=!1;return}m(o,"")},[e,o,m]);let q=En(async(c,C,k)=>{if(!(!c||isNaN(c)||c<=0))return E({source_currency:C,target_currency:k,amount:c})},[E]),S=B(async c=>{let C=N(c),M=1/((await q(C,t,e))?.data?.data.conversion_data?.exchange_rate??1),Fe=G(Number(C)*M);m(o,D(Fe))},500),i=B(async c=>{let C=N(c),M=(await q(C,t,e))?.data?.data.conversion_data.target_amount;m(r||d.name,D(M))},500),v=n(c=>{m(b,r||d.name),g&&S(c.target.value)},"handleMainFieldChange"),T=n(c=>{m(b,o),i(c.target.value)},"handleConversionFieldChange"),w=n(c=>{c.preventDefault(),j(C=>!C),!g&&I&&S(I)},"toggleConversion"),F=x?y(qn,{targetCurrency:t,showConversion:g,className:`${p}-button`,onClick:w}):null,we=h?{meta:f,description:l,descriptionSuffix:F}:{meta:F?Pn(f,"helpCenter"):f,description:F?y(In,{description:l,helpCenter:y(V,{helpCenter:f?.helpCenter}),toggle:F,className:`${p}-description`}):l};return qe(wn,{children:[y(L,{...d,...we,name:r||d.name,additionalProps:{currency:e},type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:v}),g&&y(L,{additionalProps:{currency:t},name:o,label:s?.label||"Conversion",description:s?.description,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:T}),y("input",{type:"hidden",name:b,value:P(b)||r||d.name})]})},"CurrencyConversionField");export{bt as a};
2
+ //# sourceMappingURL=chunk-EPO6DXOK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../node_modules/lodash/isObject.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_root.js","../node_modules/lodash/now.js","../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/toNumber.js","../node_modules/lodash/debounce.js","../src/components/form/fields/CurrencyConversionField.tsx","../src/common/hooks.ts"],"sourcesContent":["/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","import { ReactNode, useState, useCallback, useEffect, useRef } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport omit from 'lodash.omit';\nimport { TextField } from '@/src/components/form/fields/TextField';\nimport { useConvertCurrency } from '@/src/flows/Onboarding/api';\nimport { JSFField } from '@/src/types/remoteFlows';\nimport { HelpCenterDataProps } from '@/src/types/fields';\nimport { useFormFields } from '@/src/context';\nimport { useDebounce } from '@/src/common/hooks';\nimport { FormDescription } from '@/src/components/ui/form';\nimport { HelpCenter } from '@/src/components/shared/zendesk-drawer/HelpCenter';\nimport {\n convertFromCents,\n convertToCents,\n round,\n} from '@/src/components/form/utils';\n\ntype DescriptionWithConversionProps = {\n description: ReactNode;\n helpCenter: ReactNode;\n toggle: ReactNode;\n className: string;\n};\n\nconst DescriptionWithConversion = ({\n description,\n helpCenter,\n toggle,\n className,\n}: DescriptionWithConversionProps) => (\n <span className={className}>\n <FormDescription as='span' helpCenter={helpCenter}>\n {description}\n </FormDescription>{' '}\n {toggle}\n </span>\n);\n\ntype ConversionToggleProps = {\n showConversion: boolean;\n targetCurrency: string;\n className: string;\n onClick: (evt: React.MouseEvent<HTMLButtonElement>) => void;\n};\n\nconst ConversionToggle = ({\n showConversion,\n targetCurrency,\n className,\n onClick,\n}: ConversionToggleProps) => {\n const { components } = useFormFields();\n const label = showConversion\n ? `Hide ${targetCurrency} conversion`\n : `Show ${targetCurrency} conversion`;\n\n const CustomButton = components?.button;\n if (!CustomButton) {\n throw new Error(`Button component not found`);\n }\n\n return (\n <CustomButton className={className} data-type='inline' onClick={onClick}>\n {label}\n </CustomButton>\n );\n};\n\nexport type CurrencyConversionFieldProps = JSFField & {\n sourceCurrency: string;\n targetCurrency: string;\n mainFieldName?: string;\n conversionFieldName: string;\n conversionProperties?: {\n label?: string;\n description?: ReactNode;\n };\n useProxy?: boolean;\n classNamePrefix: string;\n conversionType?: 'spread' | 'no_spread';\n meta?: {\n helpCenter?: HelpCenterDataProps;\n };\n /**\n * Enabled by the 'split_salary_description' feature flag. When on, the description, the help\n * center link and the conversion toggle are handed to the text component as three separate\n * slots instead of being packed into the description node.\n */\n splitDescription?: boolean;\n};\n\nexport const CurrencyConversionField = ({\n sourceCurrency,\n targetCurrency,\n mainFieldName,\n conversionFieldName,\n conversionProperties,\n classNamePrefix,\n description,\n conversionType = 'spread',\n meta,\n splitDescription = false,\n ...props\n}: CurrencyConversionFieldProps) => {\n const [showConversion, setShowConversion] = useState(false);\n const { setValue, watch } = useFormContext();\n const fieldValue = watch(mainFieldName || props.name);\n const isFirstRender = useRef(true);\n\n const canShowConversion =\n sourceCurrency && targetCurrency && sourceCurrency !== targetCurrency;\n\n const { mutateAsync: convertCurrency } = useConvertCurrency({\n type: conversionType,\n });\n\n // we keep track of the last input the user used, so we can make sure\n // we keep consistent currency rates\n const lastInputFieldName = `${props.name}_converted`;\n useEffect(() => {\n setValue(lastInputFieldName, mainFieldName || props.name);\n }, [setValue, mainFieldName, props.name, lastInputFieldName]);\n\n useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n\n // when source currency changes, reset the conversion field\n setValue(conversionFieldName, '');\n }, [sourceCurrency, conversionFieldName, setValue]);\n\n const convertCurrencyCallback = useCallback(\n async (amount: number | null, fromCurrency: string, toCurrency: string) => {\n if (!amount || isNaN(amount) || amount <= 0) return;\n\n return convertCurrency({\n source_currency: fromCurrency,\n target_currency: toCurrency,\n amount,\n });\n },\n [convertCurrency],\n );\n\n const debouncedConvertCurrency = useDebounce(async (value: string) => {\n // The SDK sets the employer billing currency in the salary field, but internally we don't do it like this, is set based on the employee billing currency\n // That's why we need to do 1 / exchange rate to get the correct amount, if currencies were different, it would be done in the debouncedConvertCurrencyReverse\n // THE BE always transforms from the target currency to the source currency\n const amountInCents = convertToCents(value);\n const conversion = await convertCurrencyCallback(\n amountInCents,\n targetCurrency,\n sourceCurrency,\n );\n\n const exchangeRate =\n 1 / (conversion?.data?.data.conversion_data?.exchange_rate ?? 1);\n\n const amount = round(Number(amountInCents) * exchangeRate);\n\n setValue(conversionFieldName, convertFromCents(amount));\n }, 500);\n\n const debouncedConvertCurrencyReverse = useDebounce(async (value: string) => {\n const amount = convertToCents(value);\n const conversion = await convertCurrencyCallback(\n amount,\n targetCurrency,\n sourceCurrency,\n );\n\n const conversionAmount =\n conversion?.data?.data.conversion_data.target_amount;\n\n setValue(mainFieldName || props.name, convertFromCents(conversionAmount));\n }, 500);\n\n const handleMainFieldChange = (evt: React.ChangeEvent<HTMLInputElement>) => {\n setValue(lastInputFieldName, mainFieldName || props.name);\n if (showConversion) {\n debouncedConvertCurrency(evt.target.value);\n }\n };\n\n const handleConversionFieldChange = (\n evt: React.ChangeEvent<HTMLInputElement>,\n ) => {\n setValue(lastInputFieldName, conversionFieldName);\n debouncedConvertCurrencyReverse(evt.target.value);\n };\n\n const toggleConversion = (evt: React.MouseEvent<HTMLButtonElement>) => {\n evt.preventDefault();\n setShowConversion((prev) => !prev);\n\n if (!showConversion && fieldValue) {\n debouncedConvertCurrency(fieldValue);\n }\n };\n\n const conversionToggle = canShowConversion ? (\n <ConversionToggle\n targetCurrency={targetCurrency}\n showConversion={showConversion}\n className={`${classNamePrefix}-button`}\n onClick={toggleConversion}\n />\n ) : null;\n\n // With the split_salary_description feature, the toggle is handed over as a separate slot so the\n // text component stays free to render the description, the help center link and the toggle\n // however it wants. Without it, we keep packing them into the description node: it's the only\n // slot every text component is known to render, so the toggle can't get lost. The help center\n // link is then rendered by us and stripped from the meta we forward, to avoid rendering it twice\n // (FormDescription appends it after its children, which would put it after the toggle).\n const descriptionProps = splitDescription\n ? { meta, description, descriptionSuffix: conversionToggle }\n : {\n meta: conversionToggle ? omit(meta, 'helpCenter') : meta,\n description: conversionToggle ? (\n <DescriptionWithConversion\n description={description}\n helpCenter={<HelpCenter helpCenter={meta?.helpCenter} />}\n toggle={conversionToggle}\n className={`${classNamePrefix}-description`}\n />\n ) : (\n description\n ),\n };\n\n return (\n <>\n <TextField\n {...props}\n {...descriptionProps}\n name={mainFieldName || props.name}\n additionalProps={{ currency: sourceCurrency }}\n type='text'\n inputMode='decimal'\n pattern='^[0-9.]*$'\n maxLength={15}\n onChange={handleMainFieldChange}\n />\n {showConversion && (\n <TextField\n additionalProps={{ currency: targetCurrency }}\n name={conversionFieldName}\n label={conversionProperties?.label || 'Conversion'}\n description={conversionProperties?.description}\n type='text'\n inputMode='decimal'\n pattern='^[0-9.]*$'\n maxLength={15}\n onChange={handleConversionFieldChange}\n />\n )}\n <input\n type='hidden'\n name={lastInputFieldName}\n value={watch(lastInputFieldName) || mainFieldName || props.name}\n />\n </>\n );\n};\n","import { useCallback, useEffect, useRef } from 'react';\nimport debounce from 'lodash/debounce';\n\nexport function useDebounce(\n callback: (value: string) => Promise<void>,\n delay: number,\n) {\n const callbackRef = useRef(callback);\n\n useEffect(() => {\n callbackRef.current = callback;\n }, [callback]);\n\n const debouncedFn = useRef(\n // WE NEED TO FIX: react-hooks/refs - Passing a ref to a function may read its value during render\n // oxlint-disable-next-line react-hooks/refs\n debounce((value: string) => {\n callbackRef.current(value);\n }, delay),\n ).current;\n\n return useCallback(\n (value: string) => {\n debouncedFn(value);\n },\n [debouncedFn],\n );\n}\n"],"mappings":"4TAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cAyBA,SAASC,GAASC,EAAO,CACvB,IAAIC,EAAO,OAAOD,EAClB,OAAOA,GAAS,OAASC,GAAQ,UAAYA,GAAQ,WACvD,CAHSC,EAAAH,GAAA,YAKTD,EAAO,QAAUC,KC9BjB,IAAAI,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cACA,IAAIC,GAAa,OAAO,QAAU,UAAY,QAAU,OAAO,SAAW,QAAU,OAEpFD,EAAO,QAAUC,KCHjB,IAAAC,EAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,GAAa,IAGbC,GAAW,OAAO,MAAQ,UAAY,MAAQ,KAAK,SAAW,QAAU,KAGxEC,GAAOF,IAAcC,IAAY,SAAS,aAAa,EAAE,EAE7DF,EAAO,QAAUG,KCRjB,IAAAC,GAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,GAAO,IAkBPC,GAAMC,EAAA,UAAW,CACnB,OAAOF,GAAK,KAAK,IAAI,CACvB,EAFU,OAIVD,EAAO,QAAUE,KCtBjB,IAAAE,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cACA,IAAIC,GAAe,KAUnB,SAASC,GAAgBC,EAAQ,CAG/B,QAFIC,EAAQD,EAAO,OAEZC,KAAWH,GAAa,KAAKE,EAAO,OAAOC,CAAK,CAAC,GAAG,CAC3D,OAAOA,CACT,CALSC,EAAAH,GAAA,mBAOTF,GAAO,QAAUE,KClBjB,IAAAI,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAkB,KAGlBC,GAAc,OASlB,SAASC,GAASC,EAAQ,CACxB,OAAOA,GACHA,EAAO,MAAM,EAAGH,GAAgBG,CAAM,EAAI,CAAC,EAAE,QAAQF,GAAa,EAAE,CAE1E,CAJSG,EAAAF,GAAA,YAMTH,GAAO,QAAUG,KClBjB,IAAAG,EAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAO,IAGPC,GAASD,GAAK,OAElBD,GAAO,QAAUE,KCLjB,IAAAC,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAS,IAGTC,GAAc,OAAO,UAGrBC,GAAiBD,GAAY,eAO7BE,GAAuBF,GAAY,SAGnCG,EAAiBJ,GAASA,GAAO,YAAc,OASnD,SAASK,GAAUC,EAAO,CACxB,IAAIC,EAAQL,GAAe,KAAKI,EAAOF,CAAc,EACjDI,EAAMF,EAAMF,CAAc,EAE9B,GAAI,CACFE,EAAMF,CAAc,EAAI,OACxB,IAAIK,EAAW,EACjB,MAAY,CAAC,CAEb,IAAIC,EAASP,GAAqB,KAAKG,CAAK,EAC5C,OAAIG,IACEF,EACFD,EAAMF,CAAc,EAAII,EAExB,OAAOF,EAAMF,CAAc,GAGxBM,CACT,CAlBSC,EAAAN,GAAA,aAoBTN,GAAO,QAAUM,KC7CjB,IAAAO,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cACA,IAAIC,GAAc,OAAO,UAOrBC,GAAuBD,GAAY,SASvC,SAASE,GAAeC,EAAO,CAC7B,OAAOF,GAAqB,KAAKE,CAAK,CACxC,CAFSC,EAAAF,GAAA,kBAITH,GAAO,QAAUG,KCrBjB,IAAAG,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAS,IACTC,GAAY,KACZC,GAAiB,KAGjBC,GAAU,gBACVC,GAAe,qBAGfC,GAAiBL,GAASA,GAAO,YAAc,OASnD,SAASM,GAAWC,EAAO,CACzB,OAAIA,GAAS,KACJA,IAAU,OAAYH,GAAeD,GAEtCE,IAAkBA,MAAkB,OAAOE,CAAK,EACpDN,GAAUM,CAAK,EACfL,GAAeK,CAAK,CAC1B,CAPSC,EAAAF,GAAA,cASTP,GAAO,QAAUO,KC3BjB,IAAAG,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cAwBA,SAASC,GAAaC,EAAO,CAC3B,OAAOA,GAAS,MAAQ,OAAOA,GAAS,QAC1C,CAFSC,EAAAF,GAAA,gBAITD,GAAO,QAAUC,KC5BjB,IAAAG,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAa,KACbC,GAAe,KAGfC,GAAY,kBAmBhB,SAASC,GAASC,EAAO,CACvB,OAAO,OAAOA,GAAS,UACpBH,GAAaG,CAAK,GAAKJ,GAAWI,CAAK,GAAKF,EACjD,CAHSG,EAAAF,GAAA,YAKTJ,GAAO,QAAUI,KC5BjB,IAAAG,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAW,KACXC,GAAW,IACXC,GAAW,KAGXC,GAAM,IAGNC,GAAa,qBAGbC,GAAa,aAGbC,GAAY,cAGZC,GAAe,SAyBnB,SAASC,GAASC,EAAO,CACvB,GAAI,OAAOA,GAAS,SAClB,OAAOA,EAET,GAAIP,GAASO,CAAK,EAChB,OAAON,GAET,GAAIF,GAASQ,CAAK,EAAG,CACnB,IAAIC,EAAQ,OAAOD,EAAM,SAAW,WAAaA,EAAM,QAAQ,EAAIA,EACnEA,EAAQR,GAASS,CAAK,EAAKA,EAAQ,GAAMA,CAC3C,CACA,GAAI,OAAOD,GAAS,SAClB,OAAOA,IAAU,EAAIA,EAAQ,CAACA,EAEhCA,EAAQT,GAASS,CAAK,EACtB,IAAIE,EAAWN,GAAW,KAAKI,CAAK,EACpC,OAAQE,GAAYL,GAAU,KAAKG,CAAK,EACpCF,GAAaE,EAAM,MAAM,CAAC,EAAGE,EAAW,EAAI,CAAC,EAC5CP,GAAW,KAAKK,CAAK,EAAIN,GAAM,CAACM,CACvC,CAnBSG,EAAAJ,GAAA,YAqBTT,GAAO,QAAUS,KC/DjB,IAAAK,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAW,IACXC,EAAM,KACNC,GAAW,KAGXC,GAAkB,sBAGlBC,GAAY,KAAK,IACjBC,GAAY,KAAK,IAwDrB,SAASC,GAASC,EAAMC,EAAMC,EAAS,CACrC,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAAiB,EACjBC,EAAU,GACVC,EAAS,GACTC,EAAW,GAEf,GAAI,OAAOZ,GAAQ,WACjB,MAAM,IAAI,UAAUJ,EAAe,EAErCK,EAAON,GAASM,CAAI,GAAK,EACrBR,GAASS,CAAO,IAClBQ,EAAU,CAAC,CAACR,EAAQ,QACpBS,EAAS,YAAaT,EACtBG,EAAUM,EAASd,GAAUF,GAASO,EAAQ,OAAO,GAAK,EAAGD,CAAI,EAAII,EACrEO,EAAW,aAAcV,EAAU,CAAC,CAACA,EAAQ,SAAWU,GAG1D,SAASC,EAAWC,EAAM,CACxB,IAAIC,EAAOZ,EACPa,EAAUZ,EAEd,OAAAD,EAAWC,EAAW,OACtBK,EAAiBK,EACjBR,EAASN,EAAK,MAAMgB,EAASD,CAAI,EAC1BT,CACT,CARSW,EAAAJ,EAAA,cAUT,SAASK,EAAYJ,EAAM,CAEzB,OAAAL,EAAiBK,EAEjBP,EAAU,WAAWY,EAAclB,CAAI,EAEhCS,EAAUG,EAAWC,CAAI,EAAIR,CACtC,CAPSW,EAAAC,EAAA,eAST,SAASE,EAAcN,EAAM,CAC3B,IAAIO,EAAoBP,EAAON,EAC3Bc,EAAsBR,EAAOL,EAC7Bc,EAActB,EAAOoB,EAEzB,OAAOV,EACHb,GAAUyB,EAAalB,EAAUiB,CAAmB,EACpDC,CACN,CARSN,EAAAG,EAAA,iBAUT,SAASI,EAAaV,EAAM,CAC1B,IAAIO,EAAoBP,EAAON,EAC3Bc,EAAsBR,EAAOL,EAKjC,OAAQD,IAAiB,QAAca,GAAqBpB,GACzDoB,EAAoB,GAAOV,GAAUW,GAAuBjB,CACjE,CATSY,EAAAO,EAAA,gBAWT,SAASL,GAAe,CACtB,IAAIL,EAAOpB,EAAI,EACf,GAAI8B,EAAaV,CAAI,EACnB,OAAOW,EAAaX,CAAI,EAG1BP,EAAU,WAAWY,EAAcC,EAAcN,CAAI,CAAC,CACxD,CAPSG,EAAAE,EAAA,gBAST,SAASM,EAAaX,EAAM,CAK1B,OAJAP,EAAU,OAINK,GAAYT,EACPU,EAAWC,CAAI,GAExBX,EAAWC,EAAW,OACfE,EACT,CAVSW,EAAAQ,EAAA,gBAYT,SAASC,GAAS,CACZnB,IAAY,QACd,aAAaA,CAAO,EAEtBE,EAAiB,EACjBN,EAAWK,EAAeJ,EAAWG,EAAU,MACjD,CANSU,EAAAS,EAAA,UAQT,SAASC,GAAQ,CACf,OAAOpB,IAAY,OAAYD,EAASmB,EAAa/B,EAAI,CAAC,CAC5D,CAFSuB,EAAAU,EAAA,SAIT,SAASC,GAAY,CACnB,IAAId,EAAOpB,EAAI,EACXmC,EAAaL,EAAaV,CAAI,EAMlC,GAJAX,EAAW,UACXC,EAAW,KACXI,EAAeM,EAEXe,EAAY,CACd,GAAItB,IAAY,OACd,OAAOW,EAAYV,CAAY,EAEjC,GAAIG,EAEF,oBAAaJ,CAAO,EACpBA,EAAU,WAAWY,EAAclB,CAAI,EAChCY,EAAWL,CAAY,CAElC,CACA,OAAID,IAAY,SACdA,EAAU,WAAWY,EAAclB,CAAI,GAElCK,CACT,CAvBS,OAAAW,EAAAW,EAAA,aAwBTA,EAAU,OAASF,EACnBE,EAAU,MAAQD,EACXC,CACT,CA3HSX,EAAAlB,GAAA,YA6HTP,GAAO,QAAUO,KC9LjB,OAAoB,YAAA+B,GAAU,eAAAC,GAAa,aAAAC,GAAW,UAAAC,OAAc,QAEpE,OAAOC,OAAU,cCDjB,IAAAC,GAAqB,WADrB,OAAS,eAAAC,GAAa,aAAAC,GAAW,UAAAC,OAAc,QAGxC,SAASC,EACdC,EACAC,EACA,CACA,IAAMC,EAAcC,GAAOH,CAAQ,EAEnCI,GAAU,IAAM,CACdF,EAAY,QAAUF,CACxB,EAAG,CAACA,CAAQ,CAAC,EAEb,IAAMK,EAAcF,MAGlB,GAAAG,SAAUC,GAAkB,CAC1BL,EAAY,QAAQK,CAAK,CAC3B,EAAGN,CAAK,CACV,EAAE,QAEF,OAAOO,GACJD,GAAkB,CACjBF,EAAYE,CAAK,CACnB,EACA,CAACF,CAAW,CACd,CACF,CAxBgBI,EAAAV,EAAA,eD2Bd,OA4ME,YAAAW,GA3MA,OAAAC,EADF,QAAAC,OAAA,oBANF,IAAMC,GAA4BC,EAAA,CAAC,CACjC,YAAAC,EACA,WAAAC,EACA,OAAAC,EACA,UAAAC,CACF,IACEN,GAAC,QAAK,UAAWM,EACf,UAAAP,EAACQ,EAAA,CAAgB,GAAG,OAAO,WAAYH,EACpC,SAAAD,EACH,EAAmB,IAClBE,GACH,EAXgC,6BAqB5BG,GAAmBN,EAAA,CAAC,CACxB,eAAAO,EACA,eAAAC,EACA,UAAAJ,EACA,QAAAK,CACF,IAA6B,CAC3B,GAAM,CAAE,WAAAC,CAAW,EAAIC,EAAc,EAC/BC,EAAQL,EACV,QAAQC,CAAc,cACtB,QAAQA,CAAc,cAEpBK,EAAeH,GAAY,OACjC,GAAI,CAACG,EACH,MAAM,IAAI,MAAM,4BAA4B,EAG9C,OACEhB,EAACgB,EAAA,CAAa,UAAWT,EAAW,YAAU,SAAS,QAASK,EAC7D,SAAAG,EACH,CAEJ,EArByB,oBA8CZE,GAA0Bd,EAAA,CAAC,CACtC,eAAAe,EACA,eAAAP,EACA,cAAAQ,EACA,oBAAAC,EACA,qBAAAC,EACA,gBAAAC,EACA,YAAAlB,EACA,eAAAmB,EAAiB,SACjB,KAAAC,EACA,iBAAAC,EAAmB,GACnB,GAAGC,CACL,IAAoC,CAClC,GAAM,CAAChB,EAAgBiB,CAAiB,EAAIC,GAAS,EAAK,EACpD,CAAE,SAAAC,EAAU,MAAAC,CAAM,EAAIC,EAAe,EACrCC,EAAaF,EAAMX,GAAiBO,EAAM,IAAI,EAC9CO,EAAgBC,GAAO,EAAI,EAE3BC,EACJjB,GAAkBP,GAAkBO,IAAmBP,EAEnD,CAAE,YAAayB,CAAgB,EAAIC,EAAmB,CAC1D,KAAMd,CACR,CAAC,EAIKe,EAAqB,GAAGZ,EAAM,IAAI,aACxCa,GAAU,IAAM,CACdV,EAASS,EAAoBnB,GAAiBO,EAAM,IAAI,CAC1D,EAAG,CAACG,EAAUV,EAAeO,EAAM,KAAMY,CAAkB,CAAC,EAE5DC,GAAU,IAAM,CACd,GAAIN,EAAc,QAAS,CACzBA,EAAc,QAAU,GACxB,MACF,CAGAJ,EAAST,EAAqB,EAAE,CAClC,EAAG,CAACF,EAAgBE,EAAqBS,CAAQ,CAAC,EAElD,IAAMW,EAA0BC,GAC9B,MAAOC,EAAuBC,EAAsBC,IAAuB,CACzE,GAAI,GAACF,GAAU,MAAMA,CAAM,GAAKA,GAAU,GAE1C,OAAON,EAAgB,CACrB,gBAAiBO,EACjB,gBAAiBC,EACjB,OAAAF,CACF,CAAC,CACH,EACA,CAACN,CAAe,CAClB,EAEMS,EAA2BC,EAAY,MAAOC,GAAkB,CAIpE,IAAMC,EAAgBC,EAAeF,CAAK,EAOpCG,EACJ,IAPiB,MAAMV,EACvBQ,EACArC,EACAO,CACF,IAGmB,MAAM,KAAK,iBAAiB,eAAiB,GAE1DwB,GAASS,EAAM,OAAOH,CAAa,EAAIE,CAAY,EAEzDrB,EAAST,EAAqBgC,EAAiBV,EAAM,CAAC,CACxD,EAAG,GAAG,EAEAW,EAAkCP,EAAY,MAAOC,GAAkB,CAC3E,IAAML,EAASO,EAAeF,CAAK,EAO7BO,GANa,MAAMd,EACvBE,EACA/B,EACAO,CACF,IAGc,MAAM,KAAK,gBAAgB,cAEzCW,EAASV,GAAiBO,EAAM,KAAM0B,EAAiBE,CAAgB,CAAC,CAC1E,EAAG,GAAG,EAEAC,EAAwBpD,EAACqD,GAA6C,CAC1E3B,EAASS,EAAoBnB,GAAiBO,EAAM,IAAI,EACpDhB,GACFmC,EAAyBW,EAAI,OAAO,KAAK,CAE7C,EAL8B,yBAOxBC,EAA8BtD,EAClCqD,GACG,CACH3B,EAASS,EAAoBlB,CAAmB,EAChDiC,EAAgCG,EAAI,OAAO,KAAK,CAClD,EALoC,+BAO9BE,EAAmBvD,EAACqD,GAA6C,CACrEA,EAAI,eAAe,EACnB7B,EAAmBgC,GAAS,CAACA,CAAI,EAE7B,CAACjD,GAAkBsB,GACrBa,EAAyBb,CAAU,CAEvC,EAPyB,oBASnB4B,EAAmBzB,EACvBnC,EAACS,GAAA,CACC,eAAgBE,EAChB,eAAgBD,EAChB,UAAW,GAAGY,CAAe,UAC7B,QAASoC,EACX,EACE,KAQEG,GAAmBpC,EACrB,CAAE,KAAAD,EAAM,YAAApB,EAAa,kBAAmBwD,CAAiB,EACzD,CACE,KAAMA,EAAmBE,GAAKtC,EAAM,YAAY,EAAIA,EACpD,YAAaoC,EACX5D,EAACE,GAAA,CACC,YAAaE,EACb,WAAYJ,EAAC+D,EAAA,CAAW,WAAYvC,GAAM,WAAY,EACtD,OAAQoC,EACR,UAAW,GAAGtC,CAAe,eAC/B,EAEAlB,CAEJ,EAEJ,OACEH,GAAAF,GAAA,CACE,UAAAC,EAACgE,EAAA,CACE,GAAGtC,EACH,GAAGmC,GACJ,KAAM1C,GAAiBO,EAAM,KAC7B,gBAAiB,CAAE,SAAUR,CAAe,EAC5C,KAAK,OACL,UAAU,UACV,QAAQ,YACR,UAAW,GACX,SAAUqC,EACZ,EACC7C,GACCV,EAACgE,EAAA,CACC,gBAAiB,CAAE,SAAUrD,CAAe,EAC5C,KAAMS,EACN,MAAOC,GAAsB,OAAS,aACtC,YAAaA,GAAsB,YACnC,KAAK,OACL,UAAU,UACV,QAAQ,YACR,UAAW,GACX,SAAUoC,EACZ,EAEFzD,EAAC,SACC,KAAK,SACL,KAAMsC,EACN,MAAOR,EAAMQ,CAAkB,GAAKnB,GAAiBO,EAAM,KAC7D,GACF,CAEJ,EA/KuC","names":["require_isObject","__commonJSMin","exports","module","isObject","value","type","__name","require_freeGlobal","__commonJSMin","exports","module","freeGlobal","require_root","__commonJSMin","exports","module","freeGlobal","freeSelf","root","require_now","__commonJSMin","exports","module","root","now","__name","require_trimmedEndIndex","__commonJSMin","exports","module","reWhitespace","trimmedEndIndex","string","index","__name","require_baseTrim","__commonJSMin","exports","module","trimmedEndIndex","reTrimStart","baseTrim","string","__name","require_Symbol","__commonJSMin","exports","module","root","Symbol","require_getRawTag","__commonJSMin","exports","module","Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","getRawTag","value","isOwn","tag","unmasked","result","__name","require_objectToString","__commonJSMin","exports","module","objectProto","nativeObjectToString","objectToString","value","__name","require_baseGetTag","__commonJSMin","exports","module","Symbol","getRawTag","objectToString","nullTag","undefinedTag","symToStringTag","baseGetTag","value","__name","require_isObjectLike","__commonJSMin","exports","module","isObjectLike","value","__name","require_isSymbol","__commonJSMin","exports","module","baseGetTag","isObjectLike","symbolTag","isSymbol","value","__name","require_toNumber","__commonJSMin","exports","module","baseTrim","isObject","isSymbol","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","value","other","isBinary","__name","require_debounce","__commonJSMin","exports","module","isObject","now","toNumber","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","__name","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","useState","useCallback","useEffect","useRef","omit","import_debounce","useCallback","useEffect","useRef","useDebounce","callback","delay","callbackRef","useRef","useEffect","debouncedFn","debounce","value","useCallback","__name","Fragment","jsx","jsxs","DescriptionWithConversion","__name","description","helpCenter","toggle","className","FormDescription","ConversionToggle","showConversion","targetCurrency","onClick","components","useFormFields","label","CustomButton","CurrencyConversionField","sourceCurrency","mainFieldName","conversionFieldName","conversionProperties","classNamePrefix","conversionType","meta","splitDescription","props","setShowConversion","useState","setValue","watch","useFormContext","fieldValue","isFirstRender","useRef","canShowConversion","convertCurrency","useConvertCurrency","lastInputFieldName","useEffect","convertCurrencyCallback","useCallback","amount","fromCurrency","toCurrency","debouncedConvertCurrency","useDebounce","value","amountInCents","convertToCents","exchangeRate","round","convertFromCents","debouncedConvertCurrencyReverse","conversionAmount","handleMainFieldChange","evt","handleConversionFieldChange","toggleConversion","prev","conversionToggle","descriptionProps","omit","HelpCenter","TextField"]}
@@ -1,2 +1,2 @@
1
- import{a as f,b as g}from"./chunk-GPY3JZJJ.js";import{b as R}from"./chunk-QO7HHRNA.js";import{a as u}from"./chunk-MZN6VY5F.js";import{j as t,k as F,l as s,n as d,o as _}from"./chunk-4FGKIGKF.js";import{n as l}from"./chunk-NXRWBI36.js";import{a as c}from"./chunk-P37U34EQ.js";import{Fragment as h}from"react";import{jsx as e,jsxs as m}from"react/jsx-runtime";var w=c(({field:n,fieldData:a,fieldState:C})=>{let{name:r,label:i,description:p,options:b}=a;return e("fieldset",{className:l("space-y-3",`RemoteFlows__RadioGroupField__Item__${r}`),"data-field":r,children:m(t,{children:[e("legend",{children:i}),(p||a.meta?.helpCenter)&&e(d,{helpCenter:e(u,{helpCenter:a.meta?.helpCenter}),children:p}),e(s,{children:e(f,{"aria-label":i||r,onValueChange:o=>{n.onChange(o)},value:n.value,className:"flex flex-col",children:b?.map(o=>e(h,{children:m(t,{"data-field":r,className:"flex items-start space-x-3 space-y-0 gap-0 min-h-[24px] RemoteFlows__RadioField__Item",children:[e(s,{children:e(g,{value:o.value,className:l("RemoteFlows__RadioField__Input",o.recommended&&"mt-1"),disabled:o.disabled})}),m("div",{children:[m(F,{className:"font-normal mb-0 RemoteFlows__RadioField__Label",children:[e("span",{dangerouslySetInnerHTML:{__html:o.label}})," ",o.recommended&&e(R,{variant:"secondary",className:"ml-2",children:"Recommended"})]}),o.description&&e(d,{className:"mt-2",children:o.description})]})]})},o.value))})}),C.error&&e(_,{})]})})},"RadioGroupFieldDefault");export{w as a};
2
- //# sourceMappingURL=chunk-6JTUAJBZ.js.map
1
+ import{a as f,b as g}from"./chunk-GPY3JZJJ.js";import{b as R}from"./chunk-QO7HHRNA.js";import{a as u}from"./chunk-RKXF7Q7V.js";import{j as t,k as F,l as s,n as d,o as _}from"./chunk-4FGKIGKF.js";import{n as l}from"./chunk-NXRWBI36.js";import{a as c}from"./chunk-P37U34EQ.js";import{Fragment as h}from"react";import{jsx as e,jsxs as m}from"react/jsx-runtime";var w=c(({field:n,fieldData:a,fieldState:C})=>{let{name:r,label:i,description:p,options:b}=a;return e("fieldset",{className:l("space-y-3",`RemoteFlows__RadioGroupField__Item__${r}`),"data-field":r,children:m(t,{children:[e("legend",{children:i}),(p||a.meta?.helpCenter)&&e(d,{helpCenter:e(u,{helpCenter:a.meta?.helpCenter}),children:p}),e(s,{children:e(f,{"aria-label":i||r,onValueChange:o=>{n.onChange(o)},value:n.value,className:"flex flex-col",children:b?.map(o=>e(h,{children:m(t,{"data-field":r,className:"flex items-start space-x-3 space-y-0 gap-0 min-h-[24px] RemoteFlows__RadioField__Item",children:[e(s,{children:e(g,{value:o.value,className:l("RemoteFlows__RadioField__Input",o.recommended&&"mt-1"),disabled:o.disabled})}),m("div",{children:[m(F,{className:"font-normal mb-0 RemoteFlows__RadioField__Label",children:[e("span",{dangerouslySetInnerHTML:{__html:o.label}})," ",o.recommended&&e(R,{variant:"secondary",className:"ml-2",children:"Recommended"})]}),o.description&&e(d,{className:"mt-2",children:o.description})]})]})},o.value))})}),C.error&&e(_,{})]})})},"RadioGroupFieldDefault");export{w as a};
2
+ //# sourceMappingURL=chunk-EQK2O2PJ.js.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-PQGDGJLG.js";import{b as e}from"./chunk-MRYRNB7Y.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function p({onSubmit:n}){let{terminationBag:o}=e(),a=m(async t=>{let r=await o?.parseFormValues(t);await n?.(r),o?.next()},"handleSubmit");return u(i,{defaultValues:o.fieldValues,onSubmit:a})}m(p,"EmployeeCommunicationForm");export{p as a};
2
- //# sourceMappingURL=chunk-V2XF4QEW.js.map
1
+ import{a as i}from"./chunk-3HA6BIFT.js";import{b as e}from"./chunk-MRYRNB7Y.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function p({onSubmit:n}){let{terminationBag:o}=e(),a=m(async t=>{let r=await o?.parseFormValues(t);await n?.(r),o?.next()},"handleSubmit");return u(i,{defaultValues:o.fieldValues,onSubmit:a})}m(p,"EmployeeCommunicationForm");export{p as a};
2
+ //# sourceMappingURL=chunk-EX4DXUEC.js.map
@@ -1,2 +1,2 @@
1
- import{a as Q}from"./chunk-JH3WUGO5.js";import{a as J}from"./chunk-GWQJKZ3M.js";import{a as H}from"./chunk-XGECMN4V.js";import{a as U}from"./chunk-6DHV4GT6.js";import{a as W}from"./chunk-BGSB3XPW.js";import{a as Y}from"./chunk-SY7QZIKZ.js";import{f as Z,g as K}from"./chunk-PMIGYQEX.js";import{a as R}from"./chunk-ZXGAFQXW.js";import{a as q,b as B,c as L,d as z}from"./chunk-LKTCYO6Y.js";import{a as S}from"./chunk-TZIDQ5O3.js";import{a as N}from"./chunk-3O7L6JUX.js";import{a as E}from"./chunk-S5BNS2JE.js";import{a as _,c as v}from"./chunk-INUCPQVI.js";import{u as O}from"./chunk-XPITUVQE.js";import{b as w,h as u,n as D}from"./chunk-NXRWBI36.js";import{a as A}from"./chunk-XPVYX7LE.js";import{a as I}from"./chunk-FSGFBJJF.js";import{e as $}from"./chunk-H2O4CVKF.js";import{a as o}from"./chunk-P37U34EQ.js";import xe from"lodash.omitby";import je from"lodash.isnull";import{format as x,isFuture as Ve,parseISO as j,subDays as Pe}from"date-fns";import{useMemo as V}from"react";import be from"lodash.omit";import{useQuery as Fe}from"@tanstack/react-query";var G=o(({query:t,options:e})=>{let{client:y}=$();return Fe({queryKey:["payroll-calendars"],queryFn:o(()=>O({client:y,query:{year:t?.year,country_code:t?.countryCode}}),"queryFn"),enabled:e?.enabled,select:o(c=>c.data?.data?.payroll_calendars?.[0],"select")})},"usePayrollCalendars");import{isFuture as Me,isToday as ge,parseISO as Se}from"date-fns";var X=o(t=>{if(!t)return!1;let e=Se(t);return Me(e)||ge(e)},"isInProbationPeriod");import{Fragment as ke,jsx as m,jsxs as Ce}from"react/jsx-runtime";var lo=o(({employmentId:t,options:e,initialValues:y})=>{let{fieldValues:c,setFieldValues:ee,stepState:l,previousStep:oe,nextStep:ie}=A(q),{data:n,isLoading:te}=N({employmentId:t,queryParams:{exclude_files:!0}}),{data:ne}=G({query:{year:new Date().getFullYear().toString(),countryCode:n?.country?.code},options:{enabled:!!n?.country?.code}}),T=X(n?.probation_period_end_date),F=B(ne),P=V(()=>T?x(new Date,"yyyy-MM-dd"):x(F,"yyyy-MM-dd"),[T,F]),M=!!(n?.provisional_start_date&&Ve(j(n.provisional_start_date))),ae={personal_email:n?.basic_information?.email},g=z({...ae,...y,...l.values?.employee_communication,...l.values?.termination_details,...l.values?.paid_time_off,...l.values?.additional_information},M),d=V(()=>({...g,...c}),[c,g]),b=L({minTerminationDate:F,isEmployeeInProbationPeriod:T,selectedDate:j(d.proposed_termination_date)}),re=V(()=>{let s=R.data.schema.properties.termination_reason.oneOf,a=M?s.filter(i=>i.const==="cancellation_before_start_date"):s.filter(i=>i.const!=="cancellation_before_start_date");return{fields:{risk_assesment_info:S("Offboarding risk assessment","Employees may be protected from termination if they fall into certain categories. To help avoid claims from employees, let us know if the employee is part of one or more of these categories. Select all that apply.",{className:e?.jsfModify?.fields?.risk_assesment_info?.["x-jsf-presentation"]?.className}),termination_reason:{...e?.jsfModify?.fields?.termination_reason,oneOf:a},proposed_termination_date_info:S("Proposed termination date",Ce(ke,{children:["In most cases, Remote must provide notice to the employee before termination. The required notice period depends on local labor laws, the employment agreement, and other factors. We'll use those factors to determine the required notice period.",m(v,{external:!0,zendeskId:_.terminationNoticePeriods,className:D("text-sm",e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.zendeskTriggerButtonClassName),children:"Learn about notice periods"})]}),{className:e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.className}),proposed_termination_date:{...e?.jsfModify?.fields?.proposed_termination_date,"x-jsf-presentation":{...e?.jsfModify?.fields?.proposed_termination_date?.["x-jsf-presentation"],minDate:P,...d.termination_reason==="cancellation_before_start_date"&&n?.provisional_start_date?{maxDate:x(Pe(j(n.provisional_start_date),1),"yyyy-MM-dd")}:{},...b},...d.termination_reason==="cancellation_before_start_date"?{"x-jsf-errorMessage":{maximum:"The proposed termination date must be before the employee's start date."}}:{}},paid_time_off_info:{...e?.jsfModify?.fields?.paid_time_off_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"],Component:o(()=>{let i=e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"]?.Component;return m(J,{employeeName:n?.basic_information?.name,proposedTerminationDate:d.proposed_termination_date,employmentId:t,employment:n,render:r=>i?m(i,{...r}):m(Q,{...r})})},"Component")}},acknowledge_termination_procedure_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"],Component:o(()=>{let i=e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"]?.Component;return m(U,{render:r=>i?m(i,{...r}):m(W,{...r})})},"Component")}},acknowledge_termination_procedure_fees_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"],Component:o(()=>{let i={involuntaryOffboardingServiceChargeZendeskId:_.involuntaryOffboardingServiceCharge,reconciliationInvoiceZendeskId:_.reconciliationInvoice},r=e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"]?.Component;return r?m(r,{...i}):m(Y,{...i})},"Component")}}}}},[n,t,d.proposed_termination_date,d.termination_reason,M,P,e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,e?.jsfModify?.fields?.acknowledge_termination_procedure_info,e?.jsfModify?.fields?.paid_time_off_info,e?.jsfModify?.fields?.proposed_termination_date,e?.jsfModify?.fields?.proposed_termination_date_info,e?.jsfModify?.fields?.risk_assesment_info,e?.jsfModify?.fields?.termination_reason,b]),{data:f,isLoading:se}=K({formValues:d,jsfModify:{...e?.jsfModify,fields:{...e?.jsfModify?.fields,...re?.fields}},step:l.currentStep.name}),me=E(H.data.schema),k=Z(),{mutateAsync:de}=w(k);async function fe(s){if(!t)throw new Error("Employment id is missing");if(f){let a=await C(s,!0),{customer_informed_employee:i}=a,r=i==="yes"?{employee_awareness:{date:a.customer_informed_employee_date,note:a.customer_informed_employee_description}}:void 0,ue=await I(a,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),_e=be(ue,"customer_informed_employee_date","customer_informed_employee_description"),ye=xe({..._e,...r},je),p=a.timesheet_file??[],h=Array.isArray(p)&&p.length>0?{content:p[0].content,name:p[0].name}:void 0,Te={employment_id:t,termination_details:{...ye,timesheet_file:h||void 0},type:"termination"};return de(Te)}}o(fe,"onSubmit");function le(){oe()}o(le,"back");function ce(){ie()}o(ce,"next");let pe=Object.keys(c).length>0,C=o(async(s,a=!1)=>a?await u(s,me.fields,{isPartialValidation:!0}):f?await u(s,f?.fields,{isPartialValidation:!0}):{},"parseFormValues");return{employmentId:t,employment:n,fieldValues:d,isDirty:pe,stepState:l,fields:f?.fields||[],isLoading:se||te,isSubmitting:k.isPending,initialValues:g,handleValidation:o(async s=>{if(f){let a=await u(s,f?.fields);return f?.handleValidation(a)}return null},"handleValidation"),checkFieldUpdates:ee,parseFormValues:C,onSubmit:fe,back:le,next:ce}},"useTermination");export{lo as a};
2
- //# sourceMappingURL=chunk-GYYQWPA6.js.map
1
+ import{a as Q}from"./chunk-JH3WUGO5.js";import{a as J}from"./chunk-LZM3BNK3.js";import{a as H}from"./chunk-XGECMN4V.js";import{a as U}from"./chunk-6DHV4GT6.js";import{a as W}from"./chunk-BGSB3XPW.js";import{a as Y}from"./chunk-2EM7DTD6.js";import{f as Z,g as K}from"./chunk-CD2QYFEH.js";import{a as R}from"./chunk-ZXGAFQXW.js";import{a as q,b as B,c as L,d as z}from"./chunk-LKTCYO6Y.js";import{a as S}from"./chunk-TZIDQ5O3.js";import{a as N}from"./chunk-MREG2JYT.js";import{a as E}from"./chunk-S5BNS2JE.js";import{a as _,c as v}from"./chunk-WDO7XH6B.js";import{u as O}from"./chunk-XI55YG73.js";import{b as w,h as u,n as D}from"./chunk-NXRWBI36.js";import{a as A}from"./chunk-XPVYX7LE.js";import{a as I}from"./chunk-FSGFBJJF.js";import{e as $}from"./chunk-H2O4CVKF.js";import{a as o}from"./chunk-P37U34EQ.js";import xe from"lodash.omitby";import je from"lodash.isnull";import{format as x,isFuture as Ve,parseISO as j,subDays as Pe}from"date-fns";import{useMemo as V}from"react";import be from"lodash.omit";import{useQuery as Fe}from"@tanstack/react-query";var G=o(({query:t,options:e})=>{let{client:y}=$();return Fe({queryKey:["payroll-calendars"],queryFn:o(()=>O({client:y,query:{year:t?.year,country_code:t?.countryCode}}),"queryFn"),enabled:e?.enabled,select:o(c=>c.data?.data?.payroll_calendars?.[0],"select")})},"usePayrollCalendars");import{isFuture as Me,isToday as ge,parseISO as Se}from"date-fns";var X=o(t=>{if(!t)return!1;let e=Se(t);return Me(e)||ge(e)},"isInProbationPeriod");import{Fragment as ke,jsx as m,jsxs as Ce}from"react/jsx-runtime";var lo=o(({employmentId:t,options:e,initialValues:y})=>{let{fieldValues:c,setFieldValues:ee,stepState:l,previousStep:oe,nextStep:ie}=A(q),{data:n,isLoading:te}=N({employmentId:t,queryParams:{exclude_files:!0}}),{data:ne}=G({query:{year:new Date().getFullYear().toString(),countryCode:n?.country?.code},options:{enabled:!!n?.country?.code}}),T=X(n?.probation_period_end_date),F=B(ne),P=V(()=>T?x(new Date,"yyyy-MM-dd"):x(F,"yyyy-MM-dd"),[T,F]),M=!!(n?.provisional_start_date&&Ve(j(n.provisional_start_date))),ae={personal_email:n?.basic_information?.email},g=z({...ae,...y,...l.values?.employee_communication,...l.values?.termination_details,...l.values?.paid_time_off,...l.values?.additional_information},M),d=V(()=>({...g,...c}),[c,g]),b=L({minTerminationDate:F,isEmployeeInProbationPeriod:T,selectedDate:j(d.proposed_termination_date)}),re=V(()=>{let s=R.data.schema.properties.termination_reason.oneOf,a=M?s.filter(i=>i.const==="cancellation_before_start_date"):s.filter(i=>i.const!=="cancellation_before_start_date");return{fields:{risk_assesment_info:S("Offboarding risk assessment","Employees may be protected from termination if they fall into certain categories. To help avoid claims from employees, let us know if the employee is part of one or more of these categories. Select all that apply.",{className:e?.jsfModify?.fields?.risk_assesment_info?.["x-jsf-presentation"]?.className}),termination_reason:{...e?.jsfModify?.fields?.termination_reason,oneOf:a},proposed_termination_date_info:S("Proposed termination date",Ce(ke,{children:["In most cases, Remote must provide notice to the employee before termination. The required notice period depends on local labor laws, the employment agreement, and other factors. We'll use those factors to determine the required notice period.",m(v,{external:!0,zendeskId:_.terminationNoticePeriods,className:D("text-sm",e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.zendeskTriggerButtonClassName),children:"Learn about notice periods"})]}),{className:e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.className}),proposed_termination_date:{...e?.jsfModify?.fields?.proposed_termination_date,"x-jsf-presentation":{...e?.jsfModify?.fields?.proposed_termination_date?.["x-jsf-presentation"],minDate:P,...d.termination_reason==="cancellation_before_start_date"&&n?.provisional_start_date?{maxDate:x(Pe(j(n.provisional_start_date),1),"yyyy-MM-dd")}:{},...b},...d.termination_reason==="cancellation_before_start_date"?{"x-jsf-errorMessage":{maximum:"The proposed termination date must be before the employee's start date."}}:{}},paid_time_off_info:{...e?.jsfModify?.fields?.paid_time_off_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"],Component:o(()=>{let i=e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"]?.Component;return m(J,{employeeName:n?.basic_information?.name,proposedTerminationDate:d.proposed_termination_date,employmentId:t,employment:n,render:r=>i?m(i,{...r}):m(Q,{...r})})},"Component")}},acknowledge_termination_procedure_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"],Component:o(()=>{let i=e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"]?.Component;return m(U,{render:r=>i?m(i,{...r}):m(W,{...r})})},"Component")}},acknowledge_termination_procedure_fees_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"],Component:o(()=>{let i={involuntaryOffboardingServiceChargeZendeskId:_.involuntaryOffboardingServiceCharge,reconciliationInvoiceZendeskId:_.reconciliationInvoice},r=e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"]?.Component;return r?m(r,{...i}):m(Y,{...i})},"Component")}}}}},[n,t,d.proposed_termination_date,d.termination_reason,M,P,e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,e?.jsfModify?.fields?.acknowledge_termination_procedure_info,e?.jsfModify?.fields?.paid_time_off_info,e?.jsfModify?.fields?.proposed_termination_date,e?.jsfModify?.fields?.proposed_termination_date_info,e?.jsfModify?.fields?.risk_assesment_info,e?.jsfModify?.fields?.termination_reason,b]),{data:f,isLoading:se}=K({formValues:d,jsfModify:{...e?.jsfModify,fields:{...e?.jsfModify?.fields,...re?.fields}},step:l.currentStep.name}),me=E(H.data.schema),k=Z(),{mutateAsync:de}=w(k);async function fe(s){if(!t)throw new Error("Employment id is missing");if(f){let a=await C(s,!0),{customer_informed_employee:i}=a,r=i==="yes"?{employee_awareness:{date:a.customer_informed_employee_date,note:a.customer_informed_employee_description}}:void 0,ue=await I(a,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),_e=be(ue,"customer_informed_employee_date","customer_informed_employee_description"),ye=xe({..._e,...r},je),p=a.timesheet_file??[],h=Array.isArray(p)&&p.length>0?{content:p[0].content,name:p[0].name}:void 0,Te={employment_id:t,termination_details:{...ye,timesheet_file:h||void 0},type:"termination"};return de(Te)}}o(fe,"onSubmit");function le(){oe()}o(le,"back");function ce(){ie()}o(ce,"next");let pe=Object.keys(c).length>0,C=o(async(s,a=!1)=>a?await u(s,me.fields,{isPartialValidation:!0}):f?await u(s,f?.fields,{isPartialValidation:!0}):{},"parseFormValues");return{employmentId:t,employment:n,fieldValues:d,isDirty:pe,stepState:l,fields:f?.fields||[],isLoading:se||te,isSubmitting:k.isPending,initialValues:g,handleValidation:o(async s=>{if(f){let a=await u(s,f?.fields);return f?.handleValidation(a)}return null},"handleValidation"),checkFieldUpdates:ee,parseFormValues:C,onSubmit:fe,back:le,next:ce}},"useTermination");export{lo as a};
2
+ //# sourceMappingURL=chunk-GCONDFJ7.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-R7AWHFPG.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-3NKRZURO.js.map
1
+ import{a}from"./chunk-Q3JA2NA7.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-GE7DVVKQ.js.map
@@ -1,2 +1,2 @@
1
- import{a as _}from"./chunk-S5BNS2JE.js";import{F as p,J as y,O as f,_ as h,k as c,ra as g}from"./chunk-XPITUVQE.js";import{e as r}from"./chunk-H2O4CVKF.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as a,useQuery as F}from"@tanstack/react-query";var A=t((e,n,o,s,i)=>{let{client:x}=r(),d=s?.employmentId,u=s?.jurisdiction;return F({queryKey:["gp-employee-form-schema",e,n,d,u],enabled:!!e&&(s?.enabled??!0),retry:!1,queryFn:t(async()=>{let l={...d?{employment_id:d}:{},...u?{jurisdiction:u}:{}},m=await y({client:x,headers:{Authorization:""},path:{country_code:e,form:n},...Object.keys(l).length>0?{query:l}:{}});if(m.error||!m.data)throw new Error(`Failed to fetch ${n} schema`);return m},"queryFn"),select:t(({data:l})=>_(l?.data||{},o,i?{jsfModify:i}:void 0),"select")})},"useGPEmployeeFormSchema"),E=t(e=>{let{client:n}=r();return a({mutationFn:t(o=>{let{name:s,...i}=o;return h({client:n,headers:{Authorization:"","x-rf-employment-id":e},body:{personal_details:i}})},"mutationFn")})},"useGPUpdatePersonalDetails"),P=t(e=>{let{client:n}=r();return a({mutationFn:t(o=>p({client:n,headers:{Authorization:"","x-rf-employment-id":e},body:{address_details:o}}),"mutationFn")})},"useGPUpdateHomeAddress"),C=t(e=>{let{client:n}=r();return a({mutationFn:t(o=>c({client:n,headers:{Authorization:"","x-rf-employment-id":e},body:{bank_account_details:o}}),"mutationFn")})},"useGPUpdateBankAccount"),R=t(e=>{let{client:n}=r();return a({mutationFn:t(o=>f({client:n,headers:{Authorization:"","x-rf-employment-id":e},body:{federal_taxes:o}}),"mutationFn")})},"useGPUpdateFederalTaxes"),G=t((e,n)=>{let{client:o}=r();return a({mutationFn:t(s=>{if(!e)throw new Error("A `jurisdiction` (US state code) is required to submit state taxes.");return g({client:o,headers:{Authorization:"","x-rf-employment-id":n},path:{jurisdiction:e},body:{state_taxes:s}})},"mutationFn")})},"useGPUpdateStateTaxes");export{A as a,E as b,P as c,C as d,R as e,G as f};
2
- //# sourceMappingURL=chunk-GJ2AOENT.js.map
1
+ import{a as _}from"./chunk-S5BNS2JE.js";import{F as p,J as y,N as f,Z as h,k as c,qa as g}from"./chunk-XI55YG73.js";import{e as r}from"./chunk-H2O4CVKF.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as a,useQuery as F}from"@tanstack/react-query";var A=t((e,n,o,s,i)=>{let{client:x}=r(),d=s?.employmentId,u=s?.jurisdiction;return F({queryKey:["gp-employee-form-schema",e,n,d,u],enabled:!!e&&(s?.enabled??!0),retry:!1,queryFn:t(async()=>{let l={...d?{employment_id:d}:{},...u?{jurisdiction:u}:{}},m=await y({client:x,headers:{Authorization:""},path:{country_code:e,form:n},...Object.keys(l).length>0?{query:l}:{}});if(m.error||!m.data)throw new Error(`Failed to fetch ${n} schema`);return m},"queryFn"),select:t(({data:l})=>_(l?.data||{},o,i?{jsfModify:i}:void 0),"select")})},"useGPEmployeeFormSchema"),E=t(e=>{let{client:n}=r();return a({mutationFn:t(o=>{let{name:s,...i}=o;return h({client:n,headers:{Authorization:"","x-rf-employment-id":e},body:{personal_details:i}})},"mutationFn")})},"useGPUpdatePersonalDetails"),P=t(e=>{let{client:n}=r();return a({mutationFn:t(o=>p({client:n,headers:{Authorization:"","x-rf-employment-id":e},body:{address_details:o}}),"mutationFn")})},"useGPUpdateHomeAddress"),C=t(e=>{let{client:n}=r();return a({mutationFn:t(o=>c({client:n,headers:{Authorization:"","x-rf-employment-id":e},body:{bank_account_details:o}}),"mutationFn")})},"useGPUpdateBankAccount"),R=t(e=>{let{client:n}=r();return a({mutationFn:t(o=>f({client:n,headers:{Authorization:"","x-rf-employment-id":e},body:{federal_taxes:o}}),"mutationFn")})},"useGPUpdateFederalTaxes"),G=t((e,n)=>{let{client:o}=r();return a({mutationFn:t(s=>{if(!e)throw new Error("A `jurisdiction` (US state code) is required to submit state taxes.");return g({client:o,headers:{Authorization:"","x-rf-employment-id":n},path:{jurisdiction:e},body:{state_taxes:s}})},"mutationFn")})},"useGPUpdateStateTaxes");export{A as a,E as b,P as c,C as d,R as e,G as f};
2
+ //# sourceMappingURL=chunk-H3JAWJOE.js.map
@@ -0,0 +1,2 @@
1
+ import{a as i}from"./chunk-P37U34EQ.js";function c(e={}){let a=[{name:"select_country",label:"Select Country",visible:!!e?.includeSelectCountry},{name:"basic_information",label:"Basic Information",visible:!0},{name:"engagement_agreement_details",label:"Engagement Agreement Details",visible:!!e?.includeEngagementAgreementDetails},{name:"contract_details",label:"Contract Details",visible:!0},{name:"benefits",label:"Benefits",visible:!0},{name:"employment_agreement_preview",label:"Preview Employment Agreement",visible:!!e?.useEAPreview},{name:"review",label:"Review",visible:!0}],r=e.useDynamicSteps?a.map((t,n)=>({name:t.name,index:n,label:t.label,visible:t.visible})):a.filter(t=>t.visible).map((t,n)=>({name:t.name,index:n,label:t.label,visible:t.visible}));return{steps:r.reduce((t,n)=>(t[n.name]={index:n.index,name:n.name,visible:n.visible},t),{}),stepsArray:r}}i(c,"buildSteps");var b=["initiated","invited","created_awaiting_reserve","created_reserve_paid","active"],p=["initiated","created_awaiting_reserve","invited","active"],u=["created_awaiting_reserve","created_reserve_paid","invited","active"],s=1,l=["FRA","ITA"],d=i(e=>!!(e&&l.includes(e)),"usesJsfV1ContractDetails"),m=i(()=>s,"getDefaultContractDetailsSchemaVersion"),g=i((e,a)=>{let r=e?.jsonSchemaVersionByCountry,o=a?r?.[a]?.contract_details:void 0;return o||m()},"getContractDetailsSchemaVersion"),v=i(e=>e?.jsonSchemaVersion?.employment_basic_information||s,"getBasicInformationSchemaVersion"),_=i(e=>e?.jsonSchemaVersion?.benefit_offers_form_schema||s,"getBenefitOffersSchemaVersion"),S=i(e=>e?.jsonSchemaVersion?.engagement_agreement_details||s,"getEngagementAgreementDetailsSchemaVersion");export{c as a,b,p as c,u as d,s as e,d as f,g,v as h,_ as i,S as j};
2
+ //# sourceMappingURL=chunk-HDOEUCXY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Onboarding/utils.ts"],"sourcesContent":["import { Employment, OnboardingFlowProps } from '@/src/flows/Onboarding/types';\nimport { Step } from '@/src/flows/useStepState';\n\nexport type StepKeys =\n | 'select_country'\n | 'basic_information'\n | 'engagement_agreement_details'\n | 'contract_details'\n | 'benefits'\n | 'employment_agreement_preview'\n | 'review';\n\ntype StepConfig = {\n includeSelectCountry?: boolean;\n includeEngagementAgreementDetails?: boolean;\n useDynamicSteps?: boolean;\n useEAPreview?: boolean;\n};\n\nexport function buildSteps(config: StepConfig = {}) {\n const stepDefinitions: Array<{\n name: StepKeys;\n label: string;\n visible: boolean;\n }> = [\n {\n name: 'select_country',\n label: 'Select Country',\n visible: Boolean(config?.includeSelectCountry),\n },\n {\n name: 'basic_information',\n label: 'Basic Information',\n visible: true,\n },\n {\n name: 'engagement_agreement_details',\n label: 'Engagement Agreement Details',\n visible: Boolean(config?.includeEngagementAgreementDetails),\n },\n {\n name: 'contract_details',\n label: 'Contract Details',\n visible: true,\n },\n {\n name: 'benefits',\n label: 'Benefits',\n visible: true,\n },\n {\n name: 'employment_agreement_preview',\n label: 'Preview Employment Agreement',\n visible: Boolean(config?.useEAPreview),\n },\n {\n name: 'review',\n label: 'Review',\n visible: true,\n },\n ];\n\n // When useDynamicSteps is false (default/legacy behavior):\n // - Filter out hidden steps first\n // - Assign sequential indices (0, 1, 2, 3...)\n // - This maintains backwards compatibility with existing implementations\n //\n // When useDynamicSteps is true (new behavior):\n // - Keep all steps including hidden ones\n // - Preserve original indices even for hidden steps\n // - Consumers must filter by `visible` property\n const stepsArray = config.useDynamicSteps\n ? stepDefinitions.map((step, index) => ({\n name: step.name,\n index,\n label: step.label,\n visible: step.visible,\n }))\n : stepDefinitions\n .filter((step) => step.visible)\n .map((step, index) => ({\n name: step.name,\n index,\n label: step.label,\n visible: step.visible,\n }));\n\n const steps = stepsArray.reduce(\n (acc, step) => {\n acc[step.name] = {\n index: step.index,\n name: step.name,\n visible: step.visible,\n };\n return acc;\n },\n {} as Record<string, Step<StepKeys>>,\n );\n\n return { steps, stepsArray };\n}\n\n/**\n * Array of employment statuses that are allowed to proceed to the review step.\n * These statuses indicate that the employment is in a final state and the employment cannot be modified further.\n * @type {Employment['status'][]}\n * @constant\n */\nexport const reviewStepAllowedEmploymentStatus: Employment['status'][] = [\n 'initiated',\n 'invited',\n 'created_awaiting_reserve',\n 'created_reserve_paid',\n 'active',\n];\n\nexport const disabledInviteButtonEmploymentStatus: Employment['status'][] = [\n 'initiated',\n 'created_awaiting_reserve',\n 'invited',\n 'active',\n];\n\n/**\n * Array of employment statuses that have already handled the reserve flow.\n * @type {Employment['status'][]}\n * @constant\n */\nexport const statusesWithReserveAlreadyHandled: Employment['status'][] = [\n 'created_awaiting_reserve',\n 'created_reserve_paid',\n 'invited',\n 'active',\n];\n\nexport const DEFAULT_VERSION = 1;\n\n/**\n * Countries whose contract details schema is served as jsfVersion 1.\n * Those forms keep their own field state, so they go through\n * useContractDetailsSchema instead of useJSONSchemaForm.\n * FRA = wage portage, ITA = APL.\n */\nconst JSF_V1_CONTRACT_DETAILS_COUNTRIES = ['FRA', 'ITA'];\n\n/**\n * Checks if a country's contract details schema is served as jsfVersion 1\n *\n * @param countryCode - The country code to check\n */\nexport const usesJsfV1ContractDetails = (countryCode: string | null) =>\n Boolean(\n countryCode && JSF_V1_CONTRACT_DETAILS_COUNTRIES.includes(countryCode),\n );\n\n/**\n * Gets the default (recommended) contract details schema version for a country\n */\nconst getDefaultContractDetailsSchemaVersion = (): number => {\n return DEFAULT_VERSION;\n};\n\n/**\n * Resolves the effective contract details schema version for a country\n *\n * @param options - The flow options containing version configurations\n * @param countryCode - The country code to resolve version for\n * @returns The effective jsonSchemaVersion configuration\n */\nexport const getContractDetailsSchemaVersion = (\n options: OnboardingFlowProps['options'],\n countryCode: string | null,\n) => {\n const jsonSchemaVersionByCountry = options?.jsonSchemaVersionByCountry;\n const countrySpecificVersion = countryCode\n ? jsonSchemaVersionByCountry?.[countryCode]?.contract_details\n : undefined;\n\n const requestedVersion = countrySpecificVersion\n ? countrySpecificVersion\n : getDefaultContractDetailsSchemaVersion();\n\n return requestedVersion;\n};\n\n/**\n * Gets the basic information schema version from options\n * @param options - The flow options containing version configurations\n * @returns The jsonSchemaVersion for basic information or default\n */\nexport const getBasicInformationSchemaVersion = (\n options: OnboardingFlowProps['options'],\n): number | 'latest' => {\n return (\n options?.jsonSchemaVersion?.employment_basic_information || DEFAULT_VERSION\n );\n};\n\n/**\n * Gets the benefit offers schema version from options\n * @param options - The flow options containing version configurations\n * @returns The jsonSchemaVersion for benefit offers or undefined if not set\n */\nexport const getBenefitOffersSchemaVersion = (\n options: OnboardingFlowProps['options'],\n): number | 'latest' => {\n return (\n options?.jsonSchemaVersion?.benefit_offers_form_schema || DEFAULT_VERSION\n );\n};\n\n/**\n * Gets the engagement agreement details schema version from options\n * @param options - The flow options containing version configurations\n * @returns The jsonSchemaVersion for engagement agreement details or default\n */\nexport const getEngagementAgreementDetailsSchemaVersion = (\n options: OnboardingFlowProps['options'],\n): number | 'latest' => {\n return (\n options?.jsonSchemaVersion?.engagement_agreement_details || DEFAULT_VERSION\n );\n};\n"],"mappings":"wCAmBO,SAASA,EAAWC,EAAqB,CAAC,EAAG,CAClD,IAAMC,EAID,CACH,CACE,KAAM,iBACN,MAAO,iBACP,QAAS,EAAQD,GAAQ,oBAC3B,EACA,CACE,KAAM,oBACN,MAAO,oBACP,QAAS,EACX,EACA,CACE,KAAM,+BACN,MAAO,+BACP,QAAS,EAAQA,GAAQ,iCAC3B,EACA,CACE,KAAM,mBACN,MAAO,mBACP,QAAS,EACX,EACA,CACE,KAAM,WACN,MAAO,WACP,QAAS,EACX,EACA,CACE,KAAM,+BACN,MAAO,+BACP,QAAS,EAAQA,GAAQ,YAC3B,EACA,CACE,KAAM,SACN,MAAO,SACP,QAAS,EACX,CACF,EAWME,EAAaF,EAAO,gBACtBC,EAAgB,IAAI,CAACE,EAAMC,KAAW,CACpC,KAAMD,EAAK,KACX,MAAAC,EACA,MAAOD,EAAK,MACZ,QAASA,EAAK,OAChB,EAAE,EACFF,EACG,OAAQE,GAASA,EAAK,OAAO,EAC7B,IAAI,CAACA,EAAMC,KAAW,CACrB,KAAMD,EAAK,KACX,MAAAC,EACA,MAAOD,EAAK,MACZ,QAASA,EAAK,OAChB,EAAE,EAcR,MAAO,CAAE,MAZKD,EAAW,OACvB,CAACG,EAAKF,KACJE,EAAIF,EAAK,IAAI,EAAI,CACf,MAAOA,EAAK,MACZ,KAAMA,EAAK,KACX,QAASA,EAAK,OAChB,EACOE,GAET,CAAC,CACH,EAEgB,WAAAH,CAAW,CAC7B,CAjFgBI,EAAAP,EAAA,cAyFT,IAAMQ,EAA4D,CACvE,YACA,UACA,2BACA,uBACA,QACF,EAEaC,EAA+D,CAC1E,YACA,2BACA,UACA,QACF,EAOaC,EAA4D,CACvE,2BACA,uBACA,UACA,QACF,EAEaC,EAAkB,EAQzBC,EAAoC,CAAC,MAAO,KAAK,EAO1CC,EAA2BN,EAACO,GACvC,GACEA,GAAeF,EAAkC,SAASE,CAAW,GAFjC,4BAQlCC,EAAyCR,EAAA,IACtCI,EADsC,0CAWlCK,EAAkCT,EAAA,CAC7CU,EACAH,IACG,CACH,IAAMI,EAA6BD,GAAS,2BACtCE,EAAyBL,EAC3BI,IAA6BJ,CAAW,GAAG,iBAC3C,OAMJ,OAJyBK,GAErBJ,EAAuC,CAG7C,EAd+C,mCAqBlCK,EAAmCb,EAC9CU,GAGEA,GAAS,mBAAmB,8BAAgCN,EAJhB,oCAanCU,EAAgCd,EAC3CU,GAGEA,GAAS,mBAAmB,4BAA8BN,EAJjB,iCAahCW,EAA6Cf,EACxDU,GAGEA,GAAS,mBAAmB,8BAAgCN,EAJN","names":["buildSteps","config","stepDefinitions","stepsArray","step","index","acc","__name","reviewStepAllowedEmploymentStatus","disabledInviteButtonEmploymentStatus","statusesWithReserveAlreadyHandled","DEFAULT_VERSION","JSF_V1_CONTRACT_DETAILS_COUNTRIES","usesJsfV1ContractDetails","countryCode","getDefaultContractDetailsSchemaVersion","getContractDetailsSchemaVersion","options","jsonSchemaVersionByCountry","countrySpecificVersion","getBasicInformationSchemaVersion","getBenefitOffersSchemaVersion","getEngagementAgreementDetailsSchemaVersion"]}
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-RFVATVNN.js";import{b as m}from"./chunk-76ZDXC2T.js";import{x as i}from"./chunk-NXRWBI36.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function l({onSubmit:c,onSuccess:p,onError:t}){let{createCompanyBag:o}=m(),u=a(async r=>{try{await c?.({countryCode:r.country_code,companyOwnerEmail:r.company_owner_email,companyOwnerName:r.company_owner_name,desiredCurrency:r.desired_currency,name:r.name,phoneNumber:r.phone_number,taxNumber:r.tax_number});let n=await o.onSubmit(r);if(n?.data){await p?.(n?.data),o?.next();return}if(n?.error){let e=i(n,o.meta?.fields?.company_basic_information);t?.(e)}}catch(n){let e=i(n,o.meta?.fields?.company_basic_information);t?.(e)}},"handleSubmit"),f=o.stepState.values?.company_basic_information||o.initialValues.company_basic_information;return d(s,{defaultValues:f,onSubmit:u})}a(l,"CompanyBasicInformationStep");export{l as a};
2
- //# sourceMappingURL=chunk-XQ65RVB7.js.map
1
+ import{a as s}from"./chunk-DVPC5UZZ.js";import{b as m}from"./chunk-76ZDXC2T.js";import{x as i}from"./chunk-NXRWBI36.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function l({onSubmit:c,onSuccess:p,onError:t}){let{createCompanyBag:o}=m(),u=a(async r=>{try{await c?.({countryCode:r.country_code,companyOwnerEmail:r.company_owner_email,companyOwnerName:r.company_owner_name,desiredCurrency:r.desired_currency,name:r.name,phoneNumber:r.phone_number,taxNumber:r.tax_number});let n=await o.onSubmit(r);if(n?.data){await p?.(n?.data),o?.next();return}if(n?.error){let e=i(n,o.meta?.fields?.company_basic_information);t?.(e)}}catch(n){let e=i(n,o.meta?.fields?.company_basic_information);t?.(e)}},"handleSubmit"),f=o.stepState.values?.company_basic_information||o.initialValues.company_basic_information;return d(s,{defaultValues:f,onSubmit:u})}a(l,"CompanyBasicInformationStep");export{l as a};
2
+ //# sourceMappingURL=chunk-HFRQIPC5.js.map
@@ -1,2 +1,2 @@
1
- import{a as n,c as i}from"./chunk-INUCPQVI.js";import{n as e}from"./chunk-NXRWBI36.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-BZ4VPC4U.js.map
1
+ import{a as n,c as i}from"./chunk-WDO7XH6B.js";import{n as e}from"./chunk-NXRWBI36.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-HLLM7OZN.js.map
@@ -1,2 +1,2 @@
1
- import{a as p}from"./chunk-S5BNS2JE.js";import{B as u,L as c,U as m,Z as C,da as d,p as l}from"./chunk-XPITUVQE.js";import{e as i}from"./chunk-H2O4CVKF.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as n,useQuery as r}from"@tanstack/react-query";var q=t(({includePremiumBenefits:e})=>{let{client:o}=i();return r({queryKey:["cost-calculator-countries",e],queryFn:t(()=>c({client:o,query:{include_premium_benefits:e}}),"queryFn"),select:t(a=>a.data?.data.filter(s=>s.availability==="active").map(s=>({value:s.region_slug,label:s.name,childRegions:s.child_regions,hasAdditionalFields:s.has_additional_fields,regionSlug:s.region_slug,currency:s.currency.code})),"select")})},"useCostCalculatorCountries"),P=t(()=>{let{client:e}=i();return r({queryKey:["company-currencies"],queryFn:t(()=>d({client:e}),"queryFn"),select:t(o=>o.data?.data?.company_currencies.map(a=>({value:a.slug,label:a.code})),"select")})},"useCompanyCurrencies"),h=t(()=>{let{client:e}=i();return n({mutationFn:t(o=>l({client:e,body:o}),"mutationFn")})},"useCostCalculatorEstimation"),v=t(()=>{let{client:e}=i();return n({mutationFn:t(o=>u({client:e,body:o}),"mutationFn")})},"useCostCalculatorEstimationPdf"),x=t(()=>{let{client:e}=i();return n({mutationFn:t(o=>C({client:e,body:o}),"mutationFn")})},"useCostCalculatorEstimationCsv"),V=t((e,{includePremiumBenefits:o,options:a})=>{let{client:s}=i();return r({queryKey:["cost-calculator-region-fields",e,o],queryFn:t(()=>m({client:s,path:{slug:e},query:{include_premium_benefits:o}}),"queryFn"),enabled:!!e,select:t(({data:f})=>{let y=f?.data?.schema||{};return p(y,void 0,a)},"select")})},"useRegionFields");export{q as a,P as b,h as c,v as d,x as e,V as f};
2
- //# sourceMappingURL=chunk-XVZQBTB3.js.map
1
+ import{a as p}from"./chunk-S5BNS2JE.js";import{B as u,L as c,T as m,Y as C,ca as d,p as l}from"./chunk-XI55YG73.js";import{e as i}from"./chunk-H2O4CVKF.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as n,useQuery as r}from"@tanstack/react-query";var q=t(({includePremiumBenefits:e})=>{let{client:o}=i();return r({queryKey:["cost-calculator-countries",e],queryFn:t(()=>c({client:o,query:{include_premium_benefits:e}}),"queryFn"),select:t(a=>a.data?.data.filter(s=>s.availability==="active").map(s=>({value:s.region_slug,label:s.name,childRegions:s.child_regions,hasAdditionalFields:s.has_additional_fields,regionSlug:s.region_slug,currency:s.currency.code})),"select")})},"useCostCalculatorCountries"),P=t(()=>{let{client:e}=i();return r({queryKey:["company-currencies"],queryFn:t(()=>d({client:e}),"queryFn"),select:t(o=>o.data?.data?.company_currencies.map(a=>({value:a.slug,label:a.code})),"select")})},"useCompanyCurrencies"),h=t(()=>{let{client:e}=i();return n({mutationFn:t(o=>l({client:e,body:o}),"mutationFn")})},"useCostCalculatorEstimation"),v=t(()=>{let{client:e}=i();return n({mutationFn:t(o=>u({client:e,body:o}),"mutationFn")})},"useCostCalculatorEstimationPdf"),x=t(()=>{let{client:e}=i();return n({mutationFn:t(o=>C({client:e,body:o}),"mutationFn")})},"useCostCalculatorEstimationCsv"),V=t((e,{includePremiumBenefits:o,options:a})=>{let{client:s}=i();return r({queryKey:["cost-calculator-region-fields",e,o],queryFn:t(()=>m({client:s,path:{slug:e},query:{include_premium_benefits:o}}),"queryFn"),enabled:!!e,select:t(({data:f})=>{let y=f?.data?.schema||{};return p(y,void 0,a)},"select")})},"useRegionFields");export{q as a,P as b,h as c,v as d,x as e,V as f};
2
+ //# sourceMappingURL=chunk-HOEP5XXW.js.map
@@ -0,0 +1,2 @@
1
+ import{a as ee}from"./chunk-U4EJUZPI.js";import{a as z}from"./chunk-VFRHMNLJ.js";import{a as W,b as X,c as Y,f as Z}from"./chunk-HOEP5XXW.js";import{a as C}from"./chunk-HN5HLFTB.js";import{a as I}from"./chunk-KFYWUBRS.js";import{c as te}from"./chunk-KBDRU6SO.js";import{a as Q}from"./chunk-S5BNS2JE.js";import{b as G,h as M}from"./chunk-NXRWBI36.js";import{a as o}from"./chunk-P37U34EQ.js";import{number as Te,object as le}from"yup";import{useCallback as we,useEffect as ne,useMemo as Re,useRef as Pe,useState as j}from"react";import{string as re,ValidationError as ie}from"yup";import{jsx as ae}from"react/jsx-runtime";var O={title:"Estimation",includeBenefits:!1,includeCostBreakdowns:!1,includePremiumBenefits:!1,enableCurrencyConversion:!1,includeEstimationTitle:!1,includeManagementFee:!1},xe=o(t=>Q(z.data.schema,void 0,t),"useStaticSchema");function Be(t,i){if(typeof t=="object"&&t!==null&&"title"in t){let l=t.title;if(l)return l}return i==="my_hiring_budget"?"Hiring budget":"Employee's annual salary"}o(Be,"getSalaryTitle");var Qe=o(({defaultRegion:t,defaultCurrency:i,defaultSalary:l,estimationOptions:s,options:n,version:a}={estimationOptions:O})=>{let c=Pe({fields:{}}),[k,h]=j(t),[w,R]=j(),[m,q]=j(),[H,ce]=j(),{data:_,isLoading:ue}=W({includePremiumBenefits:s.includePremiumBenefits}),{data:d,isLoading:me}=X(),de=k||w?.value,{data:P,isLoading:fe}=Z(de,{includePremiumBenefits:s.includePremiumBenefits,options:n}),U=Y(),{mutateAsync:ge}=G(U),b=w?.currency,p=n?.jsfModify?.fields?.salary,F=p&&typeof p=="object"&&"presentation"in p?p.presentation:void 0,L=we(()=>{let e=b&&m?b!==m:!1;return b!==m?{from:m,to:b,shouldSwapOrder:e}:{from:b,to:m,shouldSwapOrder:e}},[b,m]),D=s.showManagementFee,J=s.includeEstimationTitle,$=n?.features?.includes("split_salary_description")??!1,ye=Re(()=>{let{from:e,to:r,shouldSwapOrder:u}=L(),g=Be(p,H);return{fields:{salary:{...p,title:g,presentation:{salary_conversion_properties:{label:F?.salary_conversion_properties?.label,description:F?.salary_conversion_properties?.description},currencies:{from:e,to:r},Component:o(y=>ae(ee,{...y,shouldSwapOrder:u,conversionType:a==="marketing"?"no_spread":"spread",defaultValue:l,splitDescription:$}),"Component")}},hiring_budget:{...n?.jsfModify?.fields?.hiring_budget,presentation:{hidden:a=="marketing"}},management:{...n?.jsfModify?.fields?.management,properties:{...n?.jsfModify?.fields?.management?.properties,management_fee:{...n?.jsfModify?.fields?.management?.properties?.management_fee,"x-jsf-presentation":{inputType:"money",additionalProps:{currency:m||"USD"}}}},presentation:{...typeof n?.jsfModify?.fields?.management=="object"?(n?.jsfModify?.fields?.management)["x-jsf-presentation"]:{},hidden:!D,Component:o(y=>ae(te,{...y,variant:"inset",features:{toggle:{enabled:!0,stateField:"management._expanded",labels:{expand:"Define",collapse:"Remove"}}}}),"Component")}},estimation_title:{...n?.jsfModify?.fields?.estimation_title,"x-jsf-presentation":{hidden:!J}}}}},[L,p,H,F?.salary_conversion_properties?.label,F?.salary_conversion_properties?.description,n?.jsfModify?.fields?.hiring_budget,n?.jsfModify?.fields?.management,n?.jsfModify?.fields?.estimation_title,a,m,D,J,l,$]),f=xe({jsfModify:{fields:{...n?.jsfModify?.fields,...ye?.fields}}});ne(()=>{if(t&&_){let e=_.find(({value:r})=>r===t);e&&R(e)}},[t,_]),ne(()=>{if(i&&d){let e=d.find(({value:r})=>r===i);e&&q(e.label)}},[i,d]);async function pe(e){return ge(se(e,s,a))}o(pe,"onSubmit");function Ce(e){let r=_?.find(({value:u})=>u===e);r&&r.childRegions.length===0&&r.hasAdditionalFields?h(r.regionSlug):h(void 0),R(r)}o(Ce,"onCountryChange");function _e(e){h(e)}o(_e,"onRegionChange");function be(e){ce(e.target.value)}o(be,"onHiringBudgetChange");function Se(e){let r=d?.find(u=>u.value===e)?.label;q(r),n?.onCurrencyChange?.(r||"")}o(Se,"onChangeCurrency");let S=f.fields.find(e=>e.name==="region");if(S){let e=w?.childRegions.map(r=>({value:r.slug,label:r.name}))??[];S.options=e,S.isVisible=e.length>0,S.required=e.length>0,S.onChange=_e,S.schema=e.length>0?re().transform(r=>typeof r=="string"?r:"").required("Region is required"):re()}if(d){let e=f.fields.find(r=>r.name==="currency");e&&(e.options=d,e.onChange=Se)}let v=f.fields.find(e=>e.name==="hiring_budget");if(v&&(v.onChange=be),_){let e=f.fields.find(r=>r.name==="country");e&&(e.options=_,e.onChange=Ce)}let Ee=o(()=>{R(void 0),h(t)},"resetForm"),N=[...f.fields.filter(e=>e.name!=="management"),...P?.fields||[],...f.fields.filter(e=>e.name==="management")],K=oe(f.fields,m||"USD",s.includeEstimationTitle);async function he(e){let r=null;n?.onValidation?.(e);let u=await M(e,N);try{await K.validate(u,{abortEarly:!1}),r={formErrors:{},yupError:new ie([],e)}}catch(E){let B=I(E);r={formErrors:Object.entries(B).reduce((T,[A,V])=>({...T,[A]:V.message}),{}),yupError:E}}let g=P?.handleValidation(u),y=[...r?.yupError.inner||[],...g?.yupError?.inner||[]],x={...r?.yupError?.value||{},...g?.yupError?.value||{}};return{formErrors:{...r?.formErrors||{},...g?.formErrors||{}},yupError:new ie(y,x)}}return o(he,"handleValidation"),{stepState:{current:0,total:1,isLastStep:!0},fields:N,validationSchema:K,parseFormValues:o(async e=>{let{country:r,region:u,currency:g,salary_converted:y,hiring_budget:x,salary_conversion:E,management:B,estimation_title:T,...A}=e,V=e.salary;y==="salary_conversion"&&(V=E);let Fe=await M({country:r,region:u,salary:V,salary_converted:y,salary_conversion:E,hiring_budget:x,currency:g,management:B,estimation_title:T},f.fields),Ve=await M(A,P?.fields||[]),Me={currency_code:d?.find(je=>je.value===g)?.label};return{...Fe,...Ve,...Me}},"parseFormValues"),handleValidation:he,isSubmitting:U.isPending,isLoading:ue&&me&&fe,onSubmit:pe,resetForm:Ee,currencies:d,meta:{fields:c.current?.fields}}},"useCostCalculator");function oe(t,i,l){let s=t.reduce((n,a)=>(a.name==="salary"||a.name==="salary_conversion"?n[a.name]=a.schema.when("salary_converted",{is:o(c=>c===a.name,"is"),then:o(c=>c.required("Required field"),"then"),otherwise:o(c=>c.optional(),"otherwise")}):a.name==="management"?n[a.name]=le({management_fee:Te().transform(c=>isNaN(c)?void 0:c).min(0,"Management fee must be greater than or equal to 0").max(i?C[i]:C.USD,()=>`Management fee cannot exceed ${(i?C[i]:C.USD)/100} ${i}`)}):a.name==="estimation_title"&&l?n[a.name]=a.schema.required("Required field"):n[a.name]=a.schema,n),{});return le(s)}o(oe,"buildValidationSchema");function Ae(t){let i="benefit-";return Object.keys(t).reduce((l,s)=>{let n=t[s];if(n==="none")return l;let c={benefit_group_slug:s.replace(i,""),benefit_tier_slug:n};return[...l,c]},[])}o(Ae,"formatBenefits");function Oe(t,i,l){let s=Number(t.management?.management_fee),n=t.currency_code;return{...{region_slug:t.region||t.country,employment_term:t.contract_duration_type??"fixed",title:t.estimation_title||i.title,age:t.age??void 0,...t.benefits&&{benefits:Ae(t.benefits)},...i.includeManagementFee&&s&&{discount:{quoted_amount:i.showManagementFee?s:C[n]||C.USD,text:""}}},...ke(t,l)}}o(Oe,"mapValueToEmployment");function ke(t,i){let l=i==="marketing"||t.salary_converted==="salary_conversion",s=i==="standard"&&t.salary_converted==="salary",n=t.hiring_budget==="my_hiring_budget";if(l){let a=t.salary_converted==="salary_conversion";return n?{annual_total_cost_in_employer_currency:t.salary}:{[a?"annual_gross_salary_in_employer_currency":"annual_gross_salary"]:t.salary}}return s?n?{annual_total_cost:t.salary}:{annual_gross_salary:t.salary}:{}}o(ke,"getSalaryFields");function se(t,i=O,l="standard"){let s=Array.isArray(t)?t:[t];if(s.length===0)throw new Error("At least one employment value is required");return s.length>1&&new Set(s.map(a=>a.currency)).size>1&&console.warn("Multiple currencies detected in array. Using currency from first employment."),{employer_currency_slug:s[0].currency,include_benefits:i.includeBenefits,include_cost_breakdowns:i.includeCostBreakdowns,include_premium_benefits:i.includePremiumBenefits,include_management_fee:i.includeManagementFee,employments:s.map(n=>Oe(n,i,l))}}o(se,"buildPayload");export{oe as a,se as b,O as c,Qe as d};
2
+ //# sourceMappingURL=chunk-HOJKP4DH.js.map