@feathery/react 2.42.0 → 2.44.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 (250) hide show
  1. package/cjs/Form/grid/Element/index.d.ts.map +1 -1
  2. package/cjs/Form/index.d.ts.map +1 -1
  3. package/cjs/assistant/AssistantChat.d.ts.map +1 -1
  4. package/cjs/assistant/AssistantClient.d.ts +30 -6
  5. package/cjs/assistant/AssistantClient.d.ts.map +1 -1
  6. package/cjs/assistant/ToolStatus.d.ts.map +1 -1
  7. package/cjs/assistant/tools/clickElement.d.ts +4 -3
  8. package/cjs/assistant/tools/clickElement.d.ts.map +1 -1
  9. package/cjs/assistant/tools/panelRuntime.d.ts +18 -1
  10. package/cjs/assistant/tools/panelRuntime.d.ts.map +1 -1
  11. package/cjs/assistant/tools/setFieldValue.d.ts +15 -23
  12. package/cjs/assistant/tools/setFieldValue.d.ts.map +1 -1
  13. package/cjs/assistant/tools/tableMutations.d.ts +36 -0
  14. package/cjs/assistant/tools/tableMutations.d.ts.map +1 -0
  15. package/cjs/assistant/tools/triggerTableAction.d.ts +17 -0
  16. package/cjs/assistant/tools/triggerTableAction.d.ts.map +1 -0
  17. package/cjs/assistant/tools/utils.d.ts +33 -0
  18. package/cjs/assistant/tools/utils.d.ts.map +1 -0
  19. package/cjs/assistant/utils.d.ts +0 -1
  20. package/cjs/assistant/utils.d.ts.map +1 -1
  21. package/cjs/elements/basic/TableElement/index.d.ts +1 -1
  22. package/cjs/elements/basic/TableElement/index.d.ts.map +1 -1
  23. package/cjs/{fthry_AssistantChat.BOyDRP1t.js → fthry_AssistantChat.CTrXRHYC.js} +951 -327
  24. package/cjs/{fthry_FormControl.ChDphBiw.js → fthry_FormControl.BoilLJu3.js} +1 -1
  25. package/cjs/{fthry_InlineTooltip.Ddh8_6aY.js → fthry_InlineTooltip.C3LL7yhx.js} +2 -2
  26. package/cjs/{fthry_Overlay.Bd1qiy6-.js → fthry_Overlay.C_kMTQo_.js} +1 -1
  27. package/cjs/{fthry_PaymentMethodField.DmbR79FW.js → fthry_PaymentMethodField.B7Y0YcQQ.js} +4 -4
  28. package/cjs/{fthry_Placeholder.BZUp2I1J.js → fthry_Placeholder.Ckf5rx3l.js} +1 -1
  29. package/cjs/{fthry_ShowEyeIcon.D9DLoHqI.js → fthry_ShowEyeIcon.Dw983jmd.js} +1 -1
  30. package/cjs/fthry_auto-track.DdU0wd90.js +114 -0
  31. package/cjs/{fthry_highlighted-body-TPN3WLV5.W8KTEXCF.js → fthry_highlighted-body-TPN3WLV5.Dgq3ZfLo.js} +3 -3
  32. package/cjs/fthry_index.29ly7g2Z.js +73 -0
  33. package/cjs/{fthry_index.DjWcky2z.js → fthry_index.37lEi-Hp.js} +1 -1
  34. package/cjs/{fthry_index.Cts348D4.js → fthry_index.3RtrK8MX.js} +283 -240
  35. package/cjs/{fthry_index.B8IGhOnl.js → fthry_index.5r0bFZtm.js} +8 -8
  36. package/cjs/{fthry_index.BcSPIfHw.js → fthry_index.B4peckbq.js} +1 -1
  37. package/cjs/{fthry_index.LPXprTDf.js → fthry_index.BGz622Tq.js} +4 -4
  38. package/cjs/{fthry_index.CW5rWtuZ.js → fthry_index.BHqkdfIz.js} +5 -5
  39. package/cjs/fthry_index.BI8F8bA_.js +477 -0
  40. package/cjs/{fthry_index.DMa8KL_d.js → fthry_index.BfbtecrW.js} +1 -1
  41. package/cjs/{fthry_index.JJYyApby.js → fthry_index.Buv2Sg-R.js} +5 -5
  42. package/cjs/fthry_index.Bv2eS3Vo.js +34 -0
  43. package/cjs/{fthry_index.VXMfU8Ig.js → fthry_index.BvbHMtIp.js} +5 -5
  44. package/cjs/fthry_index.C3PGeG-p.js +6893 -0
  45. package/cjs/{fthry_index.BEwwo45U.js → fthry_index.C8F7fXYY.js} +3 -3
  46. package/cjs/{fthry_index.B4iCcGUt.js → fthry_index.CKVVzHIN.js} +6 -6
  47. package/cjs/{fthry_index.aU4Q-Vhi.js → fthry_index.CVnv_Jad.js} +1 -1
  48. package/cjs/fthry_index.CZEWDsUp.js +68 -0
  49. package/cjs/{fthry_index.BJAzpvPO.js → fthry_index.CelZlNgP.js} +4 -4
  50. package/cjs/{fthry_index.DQ3tM-b4.js → fthry_index.D3dqn02k.js} +1 -1
  51. package/cjs/{fthry_index.DJzIqovs.js → fthry_index.D8Red3Ny.js} +37 -20
  52. package/cjs/fthry_index.DDPSNVyH.js +72 -0
  53. package/cjs/{fthry_index.pqZR4gSb.js → fthry_index.DicGhamJ.js} +1 -1
  54. package/cjs/{fthry_index.Wf6EoIZb.js → fthry_index.Dod7JSDp.js} +1 -1
  55. package/cjs/{fthry_index.DNNK_WNB.js → fthry_index.Dom24Lwj.js} +1 -1
  56. package/cjs/{fthry_index.C_KCwy5K.js → fthry_index.DzFvroe5.js} +6 -6
  57. package/cjs/{fthry_index.DcZhokGw.js → fthry_index.GMymJjG7.js} +2 -2
  58. package/cjs/fthry_index.KDrRVPx5.js +575 -0
  59. package/cjs/{fthry_index.pmG3XerW.js → fthry_index.LV1j0g0M.js} +6 -6
  60. package/cjs/{fthry_index.Bcl3u2bt.js → fthry_index.LvXa1Omo.js} +6 -6
  61. package/cjs/{fthry_index.C3bArUa4.js → fthry_index.hlvuql4I.js} +5 -5
  62. package/cjs/{fthry_index.l6iPtqf7.js → fthry_index.jKKDa77s.js} +2 -2
  63. package/cjs/{fthry_index.DzpicfAn.js → fthry_index.kb1SveDj.js} +3 -3
  64. package/cjs/fthry_index.umd.IVs8gbvz.js +41 -0
  65. package/cjs/{fthry_input.C3lHXfth.js → fthry_input.CtQ9PDhT.js} +1 -1
  66. package/cjs/fthry_is-plan-event-enabled.nMt_kVye.js +19 -0
  67. package/cjs/{fthry_mermaid-O7DHMXV3.BODsiYW_.js → fthry_mermaid-O7DHMXV3.OED8wUgR.js} +3 -3
  68. package/cjs/{fthry_script.C70Bm3qk.js → fthry_script.BVZmLSex.js} +1 -1
  69. package/cjs/{fthry_styles.BLUeHaH3.js → fthry_styles.D-_UUb_M.js} +1 -1
  70. package/cjs/{fthry_useElementSize.B4RuT8C5.js → fthry_useElementSize.CDRo_Jkc.js} +1 -1
  71. package/cjs/{fthry_useSalesforceSync.CNNAgWe2.js → fthry_useSalesforceSync.Bx08h06s.js} +1 -1
  72. package/cjs/{fthry_webfontloader.CJNW-DFS.js → fthry_webfontloader.BH2uCTmw.js} +1 -1
  73. package/cjs/index.js +1 -1
  74. package/cjs/integrations/segment.d.ts +1 -1
  75. package/cjs/integrations/segment.d.ts.map +1 -1
  76. package/cjs/utils/button.d.ts +2 -0
  77. package/cjs/utils/button.d.ts.map +1 -0
  78. package/cjs/utils/hideAndRepeats.d.ts.map +1 -1
  79. package/cjs/utils/repeat.d.ts +5 -0
  80. package/cjs/utils/repeat.d.ts.map +1 -1
  81. package/dist/Form/grid/Element/index.d.ts.map +1 -1
  82. package/dist/Form/index.d.ts.map +1 -1
  83. package/dist/assistant/AssistantChat.d.ts.map +1 -1
  84. package/dist/assistant/AssistantClient.d.ts +30 -6
  85. package/dist/assistant/AssistantClient.d.ts.map +1 -1
  86. package/dist/assistant/ToolStatus.d.ts.map +1 -1
  87. package/dist/assistant/tools/clickElement.d.ts +4 -3
  88. package/dist/assistant/tools/clickElement.d.ts.map +1 -1
  89. package/dist/assistant/tools/panelRuntime.d.ts +18 -1
  90. package/dist/assistant/tools/panelRuntime.d.ts.map +1 -1
  91. package/dist/assistant/tools/setFieldValue.d.ts +15 -23
  92. package/dist/assistant/tools/setFieldValue.d.ts.map +1 -1
  93. package/dist/assistant/tools/tableMutations.d.ts +36 -0
  94. package/dist/assistant/tools/tableMutations.d.ts.map +1 -0
  95. package/dist/assistant/tools/triggerTableAction.d.ts +17 -0
  96. package/dist/assistant/tools/triggerTableAction.d.ts.map +1 -0
  97. package/dist/assistant/tools/utils.d.ts +33 -0
  98. package/dist/assistant/tools/utils.d.ts.map +1 -0
  99. package/dist/assistant/utils.d.ts +0 -1
  100. package/dist/assistant/utils.d.ts.map +1 -1
  101. package/dist/elements/basic/TableElement/index.d.ts +1 -1
  102. package/dist/elements/basic/TableElement/index.d.ts.map +1 -1
  103. package/dist/{fthry_AssistantChat.HxV8LV1W.js → fthry_AssistantChat.D97z2Fjs.js} +951 -327
  104. package/dist/{fthry_FormControl.CnYezAfl.js → fthry_FormControl.DJieQaw-.js} +1 -1
  105. package/dist/{fthry_InlineTooltip.bROBNZ_Z.js → fthry_InlineTooltip.Chat1FIN.js} +2 -2
  106. package/dist/{fthry_Overlay.c1qlB9ct.js → fthry_Overlay.pCv-XBOA.js} +1 -1
  107. package/dist/{fthry_PaymentMethodField.t7Dvi81Y.js → fthry_PaymentMethodField._G2uJ6Ks.js} +4 -4
  108. package/dist/{fthry_Placeholder.BH2h6ybj.js → fthry_Placeholder.C7B4adz4.js} +1 -1
  109. package/dist/{fthry_ShowEyeIcon.BRmzNxYQ.js → fthry_ShowEyeIcon.DrP5GypN.js} +1 -1
  110. package/dist/fthry_auto-track.Bb7a2GMR.js +111 -0
  111. package/dist/{fthry_highlighted-body-TPN3WLV5.VbtSFmzn.js → fthry_highlighted-body-TPN3WLV5.QeEpdZbH.js} +3 -3
  112. package/dist/{fthry_index.vtPqJ0XE.js → fthry_index.0o3T2ouc.js} +1 -1
  113. package/dist/fthry_index.1SZZv9d2.js +6871 -0
  114. package/dist/{fthry_index.BabA9Mw-.js → fthry_index.B6pEx1zI.js} +5 -5
  115. package/dist/{fthry_index.Cni5qhKo.js → fthry_index.BJKDlrlW.js} +4 -4
  116. package/dist/{fthry_index.CNnWO_IQ.js → fthry_index.BMzPHmtX.js} +2 -2
  117. package/dist/{fthry_index.DXdUdmGQ.js → fthry_index.BWH9S7pc.js} +37 -20
  118. package/dist/fthry_index.BZvFWQLR.js +71 -0
  119. package/dist/{fthry_index.DDOGQlw5.js → fthry_index.BpKf-eNy.js} +1 -1
  120. package/dist/{fthry_index.IiZ-zUFp.js → fthry_index.C5BLw18G.js} +6 -6
  121. package/dist/{fthry_index.BU1tBfl4.js → fthry_index.C8LO6uJL.js} +6 -6
  122. package/dist/{fthry_index._5bwnWsa.js → fthry_index.CDuqBBJn.js} +278 -241
  123. package/dist/{fthry_index.BwtbJAEO.js → fthry_index.CIlxRQ4S.js} +5 -5
  124. package/dist/{fthry_index.CTKKbjOj.js → fthry_index.CUY_p8do.js} +5 -5
  125. package/dist/{fthry_index.D703JOs7.js → fthry_index.CXn-UnK8.js} +3 -3
  126. package/dist/{fthry_index.D9AlZz3i.js → fthry_index.ChUSP_4k.js} +6 -6
  127. package/dist/{fthry_index.fobb7KRG.js → fthry_index.ClZUnlbG.js} +1 -1
  128. package/dist/{fthry_index.DObbQIll.js → fthry_index.Cqhg3Wmg.js} +1 -1
  129. package/dist/{fthry_index.C3UMQKv8.js → fthry_index.Csz_U1Oc.js} +5 -5
  130. package/dist/{fthry_index.C3ADr7W7.js → fthry_index.CubzFuFl.js} +3 -3
  131. package/dist/{fthry_index.BCEtAYB2.js → fthry_index.D1iW0N2t.js} +1 -1
  132. package/dist/{fthry_index.D3YVIQwB.js → fthry_index.D4pTk5dr.js} +8 -8
  133. package/dist/{fthry_index.CrDUdmXr.js → fthry_index.DA_5F_7_.js} +1 -1
  134. package/dist/fthry_index.DG6NlwpO.js +66 -0
  135. package/dist/fthry_index.DJ7vQ3zt.js +70 -0
  136. package/dist/{fthry_index.CI2e6tdr.js → fthry_index.DJRjeQWm.js} +5 -5
  137. package/dist/{fthry_index.DjOqKkBq.js → fthry_index.DdgFKsos.js} +1 -1
  138. package/dist/{fthry_index.DO15Hx14.js → fthry_index.DuRVVFRL.js} +2 -2
  139. package/dist/fthry_index.JD44HVFL.js +573 -0
  140. package/dist/{fthry_index.DkcH8BMq.js → fthry_index.QPKqFn46.js} +1 -1
  141. package/dist/fthry_index.UTYK1bhI.js +474 -0
  142. package/dist/{fthry_index.BXQYUbtj.js → fthry_index.XG1xyplD.js} +4 -4
  143. package/dist/fthry_index.umd.DLnl0brp.js +39 -0
  144. package/dist/fthry_index.x66JmbiK.js +32 -0
  145. package/dist/{fthry_input.DNaXMuMS.js → fthry_input.BgzKGmQG.js} +1 -1
  146. package/dist/fthry_is-plan-event-enabled.mXX0dwl-.js +17 -0
  147. package/dist/{fthry_mermaid-O7DHMXV3.WhXC51ol.js → fthry_mermaid-O7DHMXV3.DehdVKQ3.js} +3 -3
  148. package/dist/{fthry_script.Bqz_se84.js → fthry_script.BcdCwqG3.js} +1 -1
  149. package/dist/{fthry_styles.DMI6ijBl.js → fthry_styles.DNxDElEh.js} +1 -1
  150. package/dist/{fthry_useElementSize.BcPjULOb.js → fthry_useElementSize.DvHJBcIE.js} +1 -1
  151. package/dist/{fthry_useSalesforceSync.lJhIijY2.js → fthry_useSalesforceSync.DHWXQkeF.js} +1 -1
  152. package/dist/{fthry_webfontloader.B0wgjWSB.js → fthry_webfontloader.C-DWZTL7.js} +1 -1
  153. package/dist/index.js +1 -1
  154. package/dist/integrations/segment.d.ts +1 -1
  155. package/dist/integrations/segment.d.ts.map +1 -1
  156. package/dist/utils/button.d.ts +2 -0
  157. package/dist/utils/button.d.ts.map +1 -0
  158. package/dist/utils/hideAndRepeats.d.ts.map +1 -1
  159. package/dist/utils/repeat.d.ts +5 -0
  160. package/dist/utils/repeat.d.ts.map +1 -1
  161. package/package.json +2 -1
  162. package/umd/277.1a33ea06f86326613fcb.js +1 -0
  163. package/umd/301.b40f38397dcde848ba46.js +1 -0
  164. package/umd/435.a94343a900f83a1ba8eb.js +1 -0
  165. package/umd/466.c82e14e5b06ae17649ff.js +1 -0
  166. package/umd/509.d49410af0cc948b08d73.js +2 -0
  167. package/umd/529.e7a0a831bf80398fda0f.js +1 -0
  168. package/umd/542.5168cf86fc7255c8b7fd.js +1 -0
  169. package/umd/598.9bc05f78267c055211d9.js +2 -0
  170. package/umd/602.ddda17ac6b2cabb3d639.js +1 -0
  171. package/umd/664.4a3ec465094a3d59c184.js +1 -0
  172. package/umd/834.b4ef33227c4c872368d6.js +1 -0
  173. package/umd/94.391827577c1c62f73f29.js +2 -0
  174. package/umd/AddressField.648b3da916171008dc9f.js +1 -0
  175. package/umd/AssistantChat.685c311fcfd51a09112e.js +1 -0
  176. package/umd/ButtonGroupField.d39ac976a6dee9ef593a.js +1 -0
  177. package/umd/CheckboxField.3323fdfd4a7377580d46.js +1 -0
  178. package/umd/CheckboxGroupField.e495eb152c4faa000d4b.js +1 -0
  179. package/umd/ColorPickerField.7e0f3c3a7dc1bcaf5e30.js +1 -0
  180. package/umd/CustomField.895d9a1d34e8e7b8b8d0.js +1 -0
  181. package/umd/DateSelectorField.e702b3e6b0a5b498c824.js +1 -0
  182. package/umd/DropdownField.d1a234d236d9989bbf20.js +1 -0
  183. package/umd/DropdownMultiField.5b4e24025035f1678c83.js +1 -0
  184. package/umd/FileUploadField.f0d66cf87244c0e565a1.js +1 -0
  185. package/umd/MatrixField.bcd6f58ea1896f386988.js +1 -0
  186. package/umd/PasswordField.593d7b7d3d954634fa30.js +1 -0
  187. package/umd/PaymentMethodField.8e4fd6353793eaaa2b5b.js +1 -0
  188. package/umd/PhoneField.861b99c7e81b4b9c8648.js +1 -0
  189. package/umd/PinInputField.ddc30797191dfbed7fe3.js +1 -0
  190. package/umd/QRScanner.94381603047f5db6b5c0.js +1 -0
  191. package/umd/RadioButtonGroupField.7a333a6f7e578a181a98.js +1 -0
  192. package/umd/RatingField.204cb92c30aeb4b8952a.js +1 -0
  193. package/umd/SignatureField.9cc9b3783cf8149ba767.js +1 -0
  194. package/umd/SliderField.d746a57527031d551f58.js +1 -0
  195. package/umd/TableElement.e3da137819e9b84b3b82.js +1 -0
  196. package/umd/TextArea.04335be4f0f0d6c0cc1a.js +1 -0
  197. package/umd/TextField.749931ebb258bf38e007.js +1 -0
  198. package/umd/ajs-destination.19322d501875cd260554.js +1 -0
  199. package/umd/auto-track.e6503d851d1d8c634ff0.js +1 -0
  200. package/umd/index.js +1 -1
  201. package/umd/legacyVideos.5ab9e462d737eca6f817.js +1 -0
  202. package/umd/libphonenumber.721378defae8d84deae2.js +1 -0
  203. package/umd/queryString.74978b49d70f9556e22a.js +1 -0
  204. package/umd/remoteMiddleware.fb68e7490b3379937c68.js +1 -0
  205. package/umd/schemaFilter.45d31876c08e74664f1d.js +1 -0
  206. package/umd/segment.76c3946188b5c80e77d6.js +2 -0
  207. package/umd/segment.76c3946188b5c80e77d6.js.LICENSE.txt +1 -0
  208. package/umd/tsub-middleware.4d4d00320fa7aa6a97cc.js +2 -0
  209. package/umd/tsub-middleware.4d4d00320fa7aa6a97cc.js.LICENSE.txt +1 -0
  210. package/umd/webfontloader.419636e0eb0cfb39b078.js +1 -0
  211. package/umd/277.87e6ca5c1cf2a7477992.js +0 -1
  212. package/umd/301.a96bba9d529bf7fd379e.js +0 -1
  213. package/umd/435.faa037e36038c2c766da.js +0 -1
  214. package/umd/466.e3456c8b3407ad04ba56.js +0 -1
  215. package/umd/509.bca2ff43c66b1dba064f.js +0 -2
  216. package/umd/529.63afee65c745ca950f81.js +0 -1
  217. package/umd/542.f1dbbbb062e82a2995e9.js +0 -1
  218. package/umd/598.ca92da6595afad37b511.js +0 -2
  219. package/umd/602.1fde434923c6596acd40.js +0 -1
  220. package/umd/664.42541009d1fcb121cc49.js +0 -1
  221. package/umd/94.e8ad20ab98c664d13197.js +0 -2
  222. package/umd/AddressField.c4188872f2a931394aa1.js +0 -1
  223. package/umd/AssistantChat.7af8f8f25348f5379aeb.js +0 -1
  224. package/umd/ButtonGroupField.33cf9c939c8e82cc6c83.js +0 -1
  225. package/umd/CheckboxField.782999cad642da04434d.js +0 -1
  226. package/umd/CheckboxGroupField.18ab392a2890a239fd0b.js +0 -1
  227. package/umd/ColorPickerField.f6740bb7c4c20a520db5.js +0 -1
  228. package/umd/CustomField.a5b2965922f2d170b9b5.js +0 -1
  229. package/umd/DateSelectorField.568bb30a220837a36660.js +0 -1
  230. package/umd/DropdownField.9f0f8a425ddf09771ad8.js +0 -1
  231. package/umd/DropdownMultiField.72a44c0280217eeb5652.js +0 -1
  232. package/umd/FileUploadField.7a5028fb6035d09b3e81.js +0 -1
  233. package/umd/MatrixField.2b65107453ddf2322137.js +0 -1
  234. package/umd/PasswordField.7585ef588333cb4181f7.js +0 -1
  235. package/umd/PaymentMethodField.d08bcfa1efb56084572d.js +0 -1
  236. package/umd/PhoneField.b9293ead8e5a2a3b7c37.js +0 -1
  237. package/umd/PinInputField.b1aee0ef9d3c9f9a1933.js +0 -1
  238. package/umd/QRScanner.3c22391de30dba001f13.js +0 -1
  239. package/umd/RadioButtonGroupField.20268d1b4649053bf1db.js +0 -1
  240. package/umd/RatingField.eeeb0ac499c308c120ba.js +0 -1
  241. package/umd/SignatureField.0e7d60fa2fafcb6be554.js +0 -1
  242. package/umd/SliderField.a5ab58e4b89fa67d6ac6.js +0 -1
  243. package/umd/TableElement.1076e69a66923cfe6434.js +0 -1
  244. package/umd/TextArea.7cca0d69e618846660c5.js +0 -1
  245. package/umd/TextField.28c59425e129e78a4551.js +0 -1
  246. package/umd/libphonenumber.4ab4d30edb4e455b2fc4.js +0 -1
  247. package/umd/webfontloader.b44bdf00049b175713ae.js +0 -1
  248. /package/umd/{509.bca2ff43c66b1dba064f.js.LICENSE.txt → 509.d49410af0cc948b08d73.js.LICENSE.txt} +0 -0
  249. /package/umd/{598.ca92da6595afad37b511.js.LICENSE.txt → 598.9bc05f78267c055211d9.js.LICENSE.txt} +0 -0
  250. /package/umd/{94.e8ad20ab98c664d13197.js.LICENSE.txt → 94.391827577c1c62f73f29.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ /*! For license information please see segment.76c3946188b5c80e77d6.js.LICENSE.txt */
2
+ (this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[204],{4591:(t,e,n)=>{"use strict";function r(t,e){return new Promise((function(n,r){var i=setTimeout((function(){r(Error("Promise timed out"))}),e);t.then((function(t){return clearTimeout(i),n(t)})).catch(r)}))}function i(t,e,n){var i;return(i=n,new Promise((function(t){return setTimeout(t,i)}))).then((function(){return r(function(){try{return Promise.resolve(e(t))}catch(t){return Promise.reject(t)}}(),1e3)})).catch((function(e){null==t||t.log("warn","Callback Error",{error:e}),null==t||t.stats.increment("callback_error")})).then((function(){return t}))}n.d(e,{FJ:()=>r,UI:()=>i})},30466:(t,e,n)=>{"use strict";n.d(e,{Y:()=>u,_:()=>c});var r=n(59108),i=n(96475),o=n(97582),a=function(){function t(){this._logs=[]}return t.prototype.log=function(t,e,n){var r=new Date;this._logs.push({level:t,message:e,time:r,extras:n})},Object.defineProperty(t.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),t.prototype.flush=function(){if(this.logs.length>1){var t=this._logs.reduce((function(t,e){var n,r,i,a=(0,o.pi)((0,o.pi)({},e),{json:JSON.stringify(e.extras,null," "),extras:e.extras});delete a.time;var s=null!==(i=null===(r=e.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return t[s]&&(s="".concat(s,"-").concat(Math.random())),(0,o.pi)((0,o.pi)({},t),((n={})[s]=a,n))}),{});console.table?console.table(t):console.log(t)}else this.logs.forEach((function(t){var e=t.level,n=t.message,r=t.extras;"info"===e||"debug"===e?console.log(n,null!=r?r:""):console[e](n,null!=r?r:"")}));this._logs=[]},t}(),s=n(50732),u=function(t){var e,n,r;this.retry=null===(e=t.retry)||void 0===e||e,this.type=null!==(n=t.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=t.reason)&&void 0!==r?r:""},c=function(){function t(t,e,n,i){void 0===e&&(e=(0,r.v4)()),void 0===n&&(n=new s.i),void 0===i&&(i=new a),this.attempts=0,this.event=t,this._id=e,this.logger=i,this.stats=n}return t.system=function(){},t.prototype.isSame=function(t){return t.id===this.id},t.prototype.cancel=function(t){if(t)throw t;throw new u({reason:"Context Cancel"})},t.prototype.log=function(t,e,n){this.logger.log(t,e,n)},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),t.prototype.updateEvent=function(t,e){var n;if("integrations"===t.split(".")[0]){var r=t.split(".")[1];if(!1===(null===(n=this.event.integrations)||void 0===n?void 0:n[r]))return this.event}return(0,i.N)(this.event,t,e),this.event},t.prototype.failedDelivery=function(){return this._failedDelivery},t.prototype.setFailedDelivery=function(t){this._failedDelivery=t},t.prototype.logs=function(){return this.logger.logs},t.prototype.flush=function(){this.logger.flush(),this.stats.flush()},t.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},t}()},10360:(t,e,n)=>{"use strict";n.d(e,{M:()=>o,Z:()=>a});var r=n(97582),i=n(38714),o="onRemoveFromFuture",a=function(t){function e(e,n,r){var i=t.call(this)||this;return i.future=[],i.maxAttempts=e,i.queue=n,i.seen=null!=r?r:{},i}return(0,r.ZT)(e,t),e.prototype.push=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.map((function(e){return!(t.updateAttempts(e)>t.maxAttempts||t.includes(e)||(t.queue.push(e),0))}));return this.queue=this.queue.sort((function(e,n){return t.getAttempts(e)-t.getAttempts(n)})),r},e.prototype.pushWithBackoff=function(t,e){if(void 0===e&&(e=0),0==e&&0===this.getAttempts(t))return this.push(t)[0];var n=function(t){var e=Math.random()+1,n=t.minTimeout,r=void 0===n?500:n,i=t.factor,o=void 0===i?2:i,a=t.attempt,s=t.maxTimeout,u=void 0===s?1/0:s;return Math.min(e*r*Math.pow(o,a),u)}({attempt:this.getAttempts(t)});return e>0&&n<e&&(n=e),this.scheduleItem(t,n)},e.prototype.pushWithDelay=function(t,e){return this.scheduleItem(t,e)},e.prototype.scheduleItem=function(t,e){var n=this;return!(this.updateAttempts(t)>this.maxAttempts||this.includes(t)||(setTimeout((function(){n.queue.push(t),n.future=n.future.filter((function(e){return e.id!==t.id})),n.emit(o)}),e),this.future.push(t),0))},e.prototype.getAttempts=function(t){var e;return null!==(e=this.seen[t.id])&&void 0!==e?e:0},e.prototype.updateAttempts=function(t){return this.seen[t.id]=this.getAttempts(t)+1,this.getAttempts(t)},e.prototype.includes=function(t){return this.queue.includes(t)||this.future.includes(t)||Boolean(this.queue.find((function(e){return e.id===t.id})))||Boolean(this.future.find((function(e){return e.id===t.id})))},e.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(e.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),e}(i.Q)},69147:(t,e,n)=>{"use strict";n.d(e,{a:()=>o,z:()=>a});var r=n(97582),i=n(30466);function o(t,e){t.log("debug","plugin",{plugin:e.name});var n=(new Date).getTime(),o=e[t.event.type];return void 0===o?Promise.resolve(t):function(n){return(0,r.mG)(this,void 0,void 0,(function(){var n;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,o.apply(e,[t])];case 1:return[2,r.sent()];case 2:return n=r.sent(),[2,Promise.reject(n)];case 3:return[2]}}))}))}().then((function(t){var r=(new Date).getTime()-n;return t.stats.gauge("plugin_time",r,["plugin:".concat(e.name)]),t})).catch((function(n){if(n instanceof i.Y&&"middleware_cancellation"===n.type)throw n;return n instanceof i.Y?(t.log("warn",n.type,{plugin:e.name,error:n}),n):(t.log("error","plugin Error",{plugin:e.name,error:n}),t.stats.increment("plugin_error",1,["plugin:".concat(e.name)]),n)}))}function a(t,e){return o(t,e).then((function(e){if(e instanceof i._)return e;t.log("debug","Context canceled"),t.stats.increment("context_canceled"),t.cancel(e)}))}},50732:(t,e,n)=>{"use strict";n.d(e,{i:()=>o,s:()=>i});var r=n(97582),i=function(){function t(){this.metrics=[]}return t.prototype.increment=function(t,e,n){void 0===e&&(e=1),this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"counter",timestamp:Date.now()})},t.prototype.gauge=function(t,e,n){this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},t.prototype.flush=function(){var t=this.metrics.map((function(t){return(0,r.pi)((0,r.pi)({},t),{tags:t.tags.join(",")})}));console.table?console.table(t):console.log(t),this.metrics=[]},t.prototype.serialize=function(){return this.metrics.map((function(t){return{m:t.metric,v:t.value,t:t.tags,k:(e=t.type,{gauge:"g",counter:"c"}[e]),e:t.timestamp};var e}))},t}(),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.gauge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.increment=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.flush=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.serialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return[]},e}(i)},55469:(t,e,n)=>{"use strict";function r(t){return"string"==typeof t}function i(t){return"number"==typeof t}function o(t){return"function"==typeof t}function a(t){return null!=t}function s(t){return"object"===Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}n.d(e,{Gg:()=>a,HD:()=>r,PO:()=>s,hj:()=>i,mf:()=>o})},15987:(t,e,n)=>{"use strict";n.d(e,{d:()=>r});var r=function(){var t,e,n=!1,r=new Promise((function(r,i){t=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n=!0,r.apply(void 0,t)},e=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n=!0,i.apply(void 0,t)}}));return{resolve:t,reject:e,promise:r,isSettled:function(){return n}}}},38714:(t,e,n)=>{"use strict";n.d(e,{Q:()=>r});var r=function(){function t(t){var e;this.callbacks={},this.warned=!1,this.maxListeners=null!==(e=null==t?void 0:t.maxListeners)&&void 0!==e?e:10}return t.prototype.warnIfPossibleMemoryLeak=function(t){this.warned||this.maxListeners&&this.callbacks[t].length>this.maxListeners&&(console.warn("Event Emitter: Possible memory leak detected; ".concat(String(t)," has exceeded ").concat(this.maxListeners," listeners.")),this.warned=!0)},t.prototype.on=function(t,e){return this.callbacks[t]?(this.callbacks[t].push(e),this.warnIfPossibleMemoryLeak(t)):this.callbacks[t]=[e],this},t.prototype.once=function(t,e){var n=this,r=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n.off(t,r),e.apply(n,i)};return this.on(t,r),this},t.prototype.off=function(t,e){var n,r=(null!==(n=this.callbacks[t])&&void 0!==n?n:[]).filter((function(t){return t!==e}));return this.callbacks[t]=r,this},t.prototype.emit=function(t){for(var e,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var o=null!==(e=this.callbacks[t])&&void 0!==e?e:[];return o.forEach((function(t){t.apply(n,r)})),this},t}()},65904:(t,e,n)=>{"use strict";n.d(e,{G:()=>i,s:()=>o});var r=n(69699);function i(){return!(0,r.j)()||window.navigator.onLine}function o(){return!i()}},36514:(t,e,n)=>{"use strict";n.d(e,{U:()=>r});var r="api.segment.io/v1"},29784:(t,e,n)=>{"use strict";n.d(e,{Y:()=>i.Y,_:()=>a});var r=n(97582),i=n(30466),o=n(23910),a=function(t){function e(e,n){return t.call(this,e,n,new o.j)||this}return(0,r.ZT)(e,t),e.system=function(){return new this({type:"track",event:"system"})},e}(i._)},69699:(t,e,n)=>{"use strict";function r(){return"undefined"!=typeof window}function i(){return!r()}n.d(e,{j:()=>r,s:()=>i})},67475:(t,e,n)=>{"use strict";function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t}}n.d(e,{a:()=>r})},23910:(t,e,n)=>{"use strict";n.d(e,{j:()=>d});var r=n(97582),i=n(50732),o=n(52819),a=n(39821),s=n(7227),u=n(36514);function c(t){console.error("Error sending segment performance metrics",t)}var l,p=function(){function t(t){var e,n,r,i,o,a=this;if(this.host=null!==(e=null==t?void 0:t.host)&&void 0!==e?e:u.U,this.sampleRate=null!==(n=null==t?void 0:t.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==t?void 0:t.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==t?void 0:t.maxQueueSize)&&void 0!==i?i:20,this.protocol=null!==(o=null==t?void 0:t.protocol)&&void 0!==o?o:"https",this.queue=[],this.sampleRate>0){var s=!1,l=function(){s||(s=!0,a.flush().catch(c),s=!1,setTimeout(l,a.flushTimer))};l()}}return t.prototype.increment=function(t,e){if(t.includes("analytics_js.")&&0!==e.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(t,e,n){var i=e.reduce((function(t,e){var n=e.split(":"),r=n[0],i=n[1];return t[r]=i,t}),{});return{type:"Counter",metric:t,value:1,tags:(0,r.pi)((0,r.pi)({},i),{library:"analytics.js",library_version:"web"===n?"next-".concat(a.i):"npm:next-".concat(a.i)})}}(t,e,(0,s.B)());this.queue.push(n),t.includes("error")&&this.flush().catch(c)}},t.prototype.flush=function(){return(0,r.mG)(this,void 0,void 0,(function(){var t=this;return(0,r.Jh)(this,(function(e){switch(e.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(e){c(e),t.sampleRate=0}))];case 1:return e.sent(),[2]}}))}))},t.prototype.send=function(){return(0,r.mG)(this,void 0,void 0,(function(){var t,e,n;return(0,r.Jh)(this,(function(r){return t={series:this.queue},this.queue=[],e={"Content-Type":"text/plain"},n="".concat(this.protocol,"://").concat(this.host,"/m"),[2,(0,o.h)(n,{headers:e,body:JSON.stringify(t),method:"POST"})]}))}))},t}(),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.initRemoteMetrics=function(t){l=new p(t)},e.prototype.increment=function(e,n,r){t.prototype.increment.call(this,e,n,r),null==l||l.increment(e,null!=r?r:[])},e}(i.s)},92311:(t,e,n)=>{"use strict";function r(t,e){var n=e.methodName,r=e.integrationName,i=e.type,o=e.didError,a=void 0!==o&&o;t.stats.increment("analytics_js.integration.invoke".concat(a?".error":""),1,["method:".concat(n),"integration_name:".concat(r),"type:".concat(i)])}n.d(e,{z:()=>r})},39821:(t,e,n)=>{"use strict";n.d(e,{i:()=>r});var r="1.84.0"},32066:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Analytics:()=>Tt,AnalyticsBrowser:()=>oe,AnalyticsNode:()=>ae,Context:()=>l._,ContextCancelation:()=>l.Y,EventFactory:()=>j,Group:()=>Q,NullAnalytics:()=>Jt,UniversalStorage:()=>H,User:()=>W,getGlobalAnalytics:()=>X.wI,isDestinationPluginWithAddMiddleware:()=>O,resolveAliasArguments:()=>u,resolveArguments:()=>o,resolvePageArguments:()=>a,resolveUserArguments:()=>s,segmentio:()=>Mt});var r=n(97582),i=n(55469);function o(t,e,n,r){var o,a=[t,e,n,r],s=(0,i.PO)(t)?t.event:t;if(!s||!(0,i.HD)(s))throw new Error("Event missing");var u=(0,i.PO)(t)?null!==(o=t.properties)&&void 0!==o?o:{}:(0,i.PO)(e)?e:{},c={};return(0,i.mf)(n)||(c=null!=n?n:{}),(0,i.PO)(t)&&!(0,i.mf)(e)&&(c=null!=e?e:{}),[s,u,c,a.find(i.mf)]}function a(t,e,n,r,o){var a,s,u=null,c=null,l=[t,e,n,r,o],p=l.filter(i.HD);1===p.length?(0,i.HD)(l[1])?(c=l[1],u=null):(c=p[0],u=null):2===p.length&&("string"==typeof l[0]&&(u=l[0]),"string"==typeof l[1]&&(c=l[1]));var d=l.find(i.mf),f=l.filter(i.PO);return 1===f.length?(0,i.PO)(l[2])?(s={},a=l[2]):(0,i.PO)(l[3])?(a={},s=l[3]):(a=f[0],s={}):2===f.length&&(a=f[0],s=f[1]),[u,c,null!=a?a:a={},null!=s?s:s={},d]}var s=function(t){return function(){for(var e,n,r,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];for(var s={},u=["callback","options","traits","id"],c=0,l=o;c<l.length;c++){var p=l[c],d=u.pop();if("id"===d){if((0,i.HD)(p)||(0,i.hj)(p)){s.id=p.toString();continue}if(null==p)continue;d=u.pop()}if("traits"!==d&&"options"!==d||null!=p&&!(0,i.PO)(p)||(s[d]=p),(0,i.mf)(p)){s.callback=p;break}}return[null!==(e=s.id)&&void 0!==e?e:t.id(),null!==(n=s.traits)&&void 0!==n?n:{},null!==(r=s.options)&&void 0!==r?r:{},s.callback]}};function u(t,e,n,r){(0,i.hj)(t)&&(t=t.toString()),(0,i.hj)(e)&&(e=e.toString());var o=[t,e,n,r],a=o.filter(i.HD),s=a[0],u=void 0===s?t:s,c=a[1],l=void 0===c?null:c,p=o.filter(i.PO)[0];return[u,l,void 0===p?{}:p,o.find(i.mf)]}var c=n(65904),l=n(29784),p=n(4591);function d(t,e,n,i){return(0,r.mG)(this,void 0,void 0,(function(){var o,a;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return n.emit("dispatch_start",t),o=Date.now(),e.isEmpty()?[4,e.dispatchSingle(t)]:[3,2];case 1:return a=r.sent(),[3,4];case 2:return[4,e.dispatch(t)];case 3:a=r.sent(),r.label=4;case 4:return(null==i?void 0:i.callback)?[4,(0,p.UI)(a,i.callback,(s=o,u=i.timeout,c=Date.now()-s,Math.max((null!=u?u:300)-c,0)))]:[3,6];case 5:a=r.sent(),r.label=6;case 6:return(null==i?void 0:i.debug)&&a.flush(),[2,a]}var s,u,c}))}))}var f=n(38714),h=n(59108),v=function(t,e,n,r,i,o){return{__t:"bpc",c:e,p:r,u:t,s:n,t:i,r:o}},y=Object.keys(v("","","","","",""));var m=function(t){var e,n,r=t.c,i=t.p,o=t.s,a=t.u,s=t.r,u=t.t,c=r?function(t){try{return new URL(t).pathname}catch(e){return"/"===t[0]?t:"/"+t}}(r):i,l=r?function(t,e){return t.indexOf("?")>-1?t:t+e}(r,o):-1===(n=(e=a).indexOf("#"))?e:e.slice(0,n);return{path:c,referrer:s,search:o,title:u,url:l}},g=function(){var t=document.querySelector("link[rel='canonical']");return v(location.href,t&&t.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)},b=function(t,e){void 0===e&&(e=m(g()));var n,i,o,a=t.context;"page"===t.type&&(n=t.properties&&(i=t.properties,o=Object.keys(e),Object.assign.apply(Object,(0,r.ev)([{}],o.map((function(t){var e;if(i&&Object.prototype.hasOwnProperty.call(i,t))return(e={})[t]=i[t],e})),!1))),t.properties=(0,r.pi)((0,r.pi)((0,r.pi)({},e),t.properties),t.name?{name:t.name}:{})),a.page=(0,r.pi)((0,r.pi)((0,r.pi)({},e),n),a.page)},w=n(96475),_=function(t){function e(e,n){var r=t.call(this,"".concat(e," ").concat(n))||this;return r.field=e,r}return(0,r.ZT)(e,t),e}(Error),x="is not a string",S="is not an object";var I=function(t){var e,n;this.settings=t,this.createMessageId=t.createMessageId,this.onEventMethodCall=null!==(e=t.onEventMethodCall)&&void 0!==e?e:function(){},this.onFinishedEvent=null!==(n=t.onFinishedEvent)&&void 0!==n?n:function(){}},k=function(){function t(t){this.settings=new I(t)}return t.prototype.track=function(t,e,n,i){return this.settings.onEventMethodCall({type:"track",options:n}),this.normalize((0,r.pi)((0,r.pi)({},this.baseEvent()),{event:t,type:"track",properties:null!=e?e:{},options:(0,r.pi)({},n),integrations:(0,r.pi)({},i)}))},t.prototype.page=function(t,e,n,i,o){var a;this.settings.onEventMethodCall({type:"page",options:i});var s={type:"page",properties:(0,r.pi)({},n),options:(0,r.pi)({},i),integrations:(0,r.pi)({},o)};return null!==t&&(s.category=t,s.properties=null!==(a=s.properties)&&void 0!==a?a:{},s.properties.category=t),null!==e&&(s.name=e),this.normalize((0,r.pi)((0,r.pi)({},this.baseEvent()),s))},t.prototype.screen=function(t,e,n,i,o){this.settings.onEventMethodCall({type:"screen",options:i});var a={type:"screen",properties:(0,r.pi)({},n),options:(0,r.pi)({},i),integrations:(0,r.pi)({},o)};return null!==t&&(a.category=t),null!==e&&(a.name=e),this.normalize((0,r.pi)((0,r.pi)({},this.baseEvent()),a))},t.prototype.identify=function(t,e,n,i){return this.settings.onEventMethodCall({type:"identify",options:n}),this.normalize((0,r.pi)((0,r.pi)({},this.baseEvent()),{type:"identify",userId:t,traits:null!=e?e:{},options:(0,r.pi)({},n),integrations:i}))},t.prototype.group=function(t,e,n,i){return this.settings.onEventMethodCall({type:"group",options:n}),this.normalize((0,r.pi)((0,r.pi)({},this.baseEvent()),{type:"group",traits:null!=e?e:{},options:(0,r.pi)({},n),integrations:(0,r.pi)({},i),groupId:t}))},t.prototype.alias=function(t,e,n,i){this.settings.onEventMethodCall({type:"alias",options:n});var o={userId:t,type:"alias",options:(0,r.pi)({},n),integrations:(0,r.pi)({},i)};return null!==e&&(o.previousId=e),void 0===t?this.normalize((0,r.pi)((0,r.pi)({},o),this.baseEvent())):this.normalize((0,r.pi)((0,r.pi)({},this.baseEvent()),o))},t.prototype.baseEvent=function(){return{integrations:{},options:{}}},t.prototype.context=function(t){var e,n=["userId","anonymousId","timestamp","messageId"];delete t.integrations;var r=Object.keys(t),i=null!==(e=t.context)&&void 0!==e?e:{},o={};return r.forEach((function(e){"context"!==e&&(n.includes(e)?(0,w.N)(o,e,t[e]):(0,w.N)(i,e,t[e]))})),[i,o]},t.prototype.normalize=function(t){var e,n,o,a,s=Object.keys(null!==(e=t.integrations)&&void 0!==e?e:{}).reduce((function(e,n){var i,o;return(0,r.pi)((0,r.pi)({},e),((i={})[n]=Boolean(null===(o=t.integrations)||void 0===o?void 0:o[n]),i))}),{});t.options=(o=t.options||{},a=function(t,e){return void 0!==e},Object.keys(o).filter((function(t){return a(0,o[t])})).reduce((function(t,e){return t[e]=o[e],t}),{}));var u=(0,r.pi)((0,r.pi)({},s),null===(n=t.options)||void 0===n?void 0:n.integrations),c=t.options?this.context(t.options):[],l=c[0],p=c[1],d=t.options,f=(0,r._T)(t,["options"]),h=(0,r.pi)((0,r.pi)((0,r.pi)((0,r.pi)({timestamp:new Date},f),{context:l,integrations:u}),p),{messageId:d.messageId||this.settings.createMessageId()});return this.settings.onFinishedEvent(h),function(t){!function(t){if(!(0,i.Gg)(t))throw new _("Event","is nil");if("object"!=typeof t)throw new _("Event",S)}(t),function(t){if(!(0,i.HD)(t.type))throw new _(".type",x)}(t),function(t){if(!(0,i.HD)(t.messageId))throw new _(".messageId",x)}(t),"track"===t.type&&(function(t){if(!(0,i.HD)(t.event))throw new _(".event",x)}(t),function(t){if(!(0,i.PO)(t.properties))throw new _(".properties",S)}(t)),["group","identify"].includes(t.type)&&function(t){if(!(0,i.PO)(t.traits))throw new _(".traits",S)}(t)}(h),h},t}(),j=function(t){function e(e){var n=t.call(this,{createMessageId:function(){return"ajs-next-".concat(Date.now(),"-").concat((0,h.v4)())},onEventMethodCall:function(t){var e=t.options;n.maybeUpdateAnonId(e)},onFinishedEvent:function(t){return n.addIdentity(t),t}})||this;return n.user=e,n}return(0,r.ZT)(e,t),e.prototype.maybeUpdateAnonId=function(t){(null==t?void 0:t.anonymousId)&&this.user.anonymousId(t.anonymousId)},e.prototype.addIdentity=function(t){this.user.id()&&(t.userId=this.user.id()),this.user.anonymousId()&&(t.anonymousId=this.user.anonymousId())},e.prototype.track=function(e,n,r,i,o){var a=t.prototype.track.call(this,e,n,r,i);return b(a,o),a},e.prototype.page=function(e,n,r,i,o,a){var s=t.prototype.page.call(this,e,n,r,i,o);return b(s,a),s},e.prototype.screen=function(e,n,r,i,o,a){var s=t.prototype.screen.call(this,e,n,r,i,o);return b(s,a),s},e.prototype.identify=function(e,n,r,i,o){var a=t.prototype.identify.call(this,e,n,r,i);return b(a,o),a},e.prototype.group=function(e,n,r,i,o){var a=t.prototype.group.call(this,e,n,r,i);return b(a,o),a},e.prototype.alias=function(e,n,r,i,o){var a=t.prototype.alias.call(this,e,n,r,i);return b(a,o),a},e}(k),O=function(t){return"addMiddleware"in t&&"destination"===t.type},P=n(65976),M=n(10360),A=n(30466),E=n(69147),C=function(t){function e(e){var n,r,i,o=t.call(this)||this;return o.criticalTasks=(i=0,{done:function(){return n},run:function(t){var e,o=t();return"object"==typeof(e=o)&&null!==e&&"then"in e&&"function"==typeof e.then&&(1==++i&&(n=new Promise((function(t){return r=t}))),o.finally((function(){return 0==--i&&r()}))),o}}),o.plugins=[],o.failedInitializations=[],o.flushing=!1,o.queue=e,o.queue.on(M.M,(function(){o.scheduleFlush(0)})),o}return(0,r.ZT)(e,t),e.prototype.register=function(t,e,n){return(0,r.mG)(this,void 0,void 0,(function(){var i,o,a=this;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return this.plugins.push(e),i=function(n){a.failedInitializations.push(e.name),a.emit("initialization_failure",e),console.warn(e.name,n),t.log("warn","Failed to load destination",{plugin:e.name,error:n}),a.plugins=a.plugins.filter((function(t){return t!==e}))},"destination"!==e.type||"Segment.io"===e.name?[3,1]:(e.load(t,n).catch(i),[3,4]);case 1:return r.trys.push([1,3,,4]),[4,e.load(t,n)];case 2:return r.sent(),[3,4];case 3:return o=r.sent(),i(o),[3,4];case 4:return[2]}}))}))},e.prototype.deregister=function(t,e,n){return(0,r.mG)(this,void 0,void 0,(function(){var i;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),e.unload?[4,Promise.resolve(e.unload(t,n))]:[3,2];case 1:r.sent(),r.label=2;case 2:return this.plugins=this.plugins.filter((function(t){return t.name!==e.name})),[3,4];case 3:return i=r.sent(),t.log("warn","Failed to unload destination",{plugin:e.name,error:i}),[3,4];case 4:return[2]}}))}))},e.prototype.dispatch=function(t){return(0,r.mG)(this,void 0,void 0,(function(){var e;return(0,r.Jh)(this,(function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.push(t),e=this.subscribeToDelivery(t),this.scheduleFlush(0),[2,e]}))}))},e.prototype.subscribeToDelivery=function(t){return(0,r.mG)(this,void 0,void 0,(function(){var e=this;return(0,r.Jh)(this,(function(n){return[2,new Promise((function(n){var r=function(i,o){i.isSame(t)&&(e.off("flush",r),n(i))};e.on("flush",r)}))]}))}))},e.prototype.dispatchSingle=function(t){return(0,r.mG)(this,void 0,void 0,(function(){var e=this;return(0,r.Jh)(this,(function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.updateAttempts(t),t.attempts=1,[2,this.deliver(t).catch((function(n){return e.enqueuRetry(n,t)?e.subscribeToDelivery(t):(t.setFailedDelivery({reason:n}),t)}))]}))}))},e.prototype.isEmpty=function(){return 0===this.queue.length},e.prototype.scheduleFlush=function(t){var e=this;void 0===t&&(t=500),this.flushing||(this.flushing=!0,setTimeout((function(){e.flush().then((function(){setTimeout((function(){e.flushing=!1,e.queue.length&&e.scheduleFlush(0)}),0)}))}),t))},e.prototype.deliver=function(t){var e;return(0,r.mG)(this,void 0,void 0,(function(){var n,i,o,a,s;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return[4,this.criticalTasks.done()];case 1:r.sent(),n=Date.now(),r.label=2;case 2:return r.trys.push([2,4,,5]),[4,this.flushOne(t)];case 3:return t=r.sent(),i=Date.now()-n,(o=t.failedDelivery())?(s=o.reason instanceof Error?o.reason:new Error(String(null!==(e=o.reason)&&void 0!==e?e:"Unknown delivery failure")),t.log("error","Failed to deliver",s),this.emit("delivery_failure",t,s),t.stats.increment("delivery_failed"),[2,t]):(this.emit("delivery_success",t),t.stats.gauge("delivered",i),t.log("debug","Delivered",t.event),[2,t]);case 4:throw a=r.sent(),s=a,t.log("error","Failed to deliver",s),this.emit("delivery_failure",t,s),t.stats.increment("delivery_failed"),a;case 5:return[2]}}))}))},e.prototype.enqueuRetry=function(t,e){return!(t instanceof A.Y&&!t.retry)&&this.queue.pushWithBackoff(e)},e.prototype.flush=function(){return(0,r.mG)(this,void 0,void 0,(function(){var t,e,n;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:if(0===this.queue.length)return[2,[]];if(!(t=this.queue.pop()))return[2,[]];t.attempts=this.queue.getAttempts(t),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.deliver(t)];case 2:return t=r.sent(),e=!t.failedDelivery(),this.emit("flush",t,e),[3,4];case 3:return n=r.sent(),this.enqueuRetry(n,t)||(t.setFailedDelivery({reason:n}),this.emit("flush",t,!1)),[2,[]];case 4:return[2,[t]]}}))}))},e.prototype.isReady=function(){return!0},e.prototype.availableExtensions=function(t){var e,n=this.plugins.filter((function(e){var n,r,i;if("destination"!==e.type&&"Segment.io"!==e.name)return!0;var o=void 0;return null===(n=e.alternativeNames)||void 0===n||n.forEach((function(e){void 0!==t[e]&&(o=t[e])})),null!==(i=null!==(r=t[e.name])&&void 0!==r?r:o)&&void 0!==i?i:!1!==("Segment.io"===e.name||t.All)})),i=("type",e={},n.forEach((function(t){var n,i=void 0,o=t.type;void 0!==(i="string"!=typeof o?JSON.stringify(o):o)&&(e[i]=(0,r.ev)((0,r.ev)([],null!==(n=e[i])&&void 0!==n?n:[],!0),[t],!1))})),e),o=i.before,a=void 0===o?[]:o,s=i.enrichment,u=void 0===s?[]:s,c=i.destination,l=void 0===c?[]:c,p=i.after;return{before:a,enrichment:u,destinations:l,after:void 0===p?[]:p}},e.prototype.flushOne=function(t){var e,n;return(0,r.mG)(this,void 0,void 0,(function(){var i,o,a,s,u,c,l,p,d,f,h,v,y,m;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:if(!this.isReady())throw new Error("Not ready");t.attempts>1&&this.emit("delivery_retry",t),i=this.availableExtensions(null!==(e=t.event.integrations)&&void 0!==e?e:{}),o=i.before,a=i.enrichment,s=0,u=o,r.label=1;case 1:return s<u.length?(c=u[s],[4,(0,E.z)(t,c)]):[3,4];case 2:(f=r.sent())instanceof A._&&(t=f),this.emit("message_enriched",t,c),r.label=3;case 3:return s++,[3,1];case 4:l=0,p=a,r.label=5;case 5:return l<p.length?(d=p[l],[4,(0,E.a)(t,d)]):[3,8];case 6:(f=r.sent())instanceof A._&&(t=f),this.emit("message_enriched",t,d),r.label=7;case 7:return l++,[3,5];case 8:return h=this.availableExtensions(null!==(n=t.event.integrations)&&void 0!==n?n:{}),v=h.destinations,y=h.after,[4,new Promise((function(e,n){setTimeout((function(){var r=v.map((function(e){return(0,E.a)(t,e)}));Promise.all(r).then(e).catch(n)}),0)}))];case 9:return r.sent(),t.stats.increment("message_delivered"),this.emit("message_delivered",t),m=y.map((function(e){return(0,E.a)(t,e)})),[4,Promise.all(m)];case 10:return r.sent(),[2,t]}}))}))},e}(f.Q),D=function(t){function e(e){return t.call(this,"string"==typeof e?new P.$(4,e):e)||this}return(0,r.ZT)(e,t),e.prototype.flush=function(){return(0,r.mG)(this,void 0,void 0,(function(){return(0,r.Jh)(this,(function(e){return(0,c.s)()?[2,[]]:[2,t.prototype.flush.call(this)]}))}))},e}(C);function F(t){for(var e=t.constructor.prototype,n=0,r=Object.getOwnPropertyNames(e);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);o&&"function"==typeof o.value&&(t[i]=t[i].bind(t))}}return t}function T(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}const J=function t(e,n){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=T({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in i)i[a]&&(o+="; "+a,!0!==i[a]&&(o+="="+i[a].split(";")[0]));return document.cookie=t+"="+e.write(r,t)+o}}return Object.create({set:r,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=e.read(a,s),t===s)break}catch(t){}}return t?r[t]:r}},remove:function(t,e){r(t,"",T({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,T({},this.attributes,e))},withConverter:function(e){return t(T({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function N(t){var e=function(t){try{return new URL(t)}catch(t){return}}(t);if(e)for(var n=function(t){var e=t.hostname.split("."),n=e[e.length-1],r=[];if(4===e.length&&parseInt(n,10)>0)return r;if(e.length<=1)return r;for(var i=e.length-2;i>=0;--i)r.push(e.slice(i).join("."));return r}(e),r=0;r<n.length;++r){var i="__tld__",o=n[r],a={domain:"."+o};try{if(J.set(i,"1",a),J.get(i))return J.remove(i,a),o}catch(t){return}}}var R=function(){function t(e){void 0===e&&(e=t.defaults),this.options=(0,r.pi)((0,r.pi)({},t.defaults),e)}return Object.defineProperty(t,"defaults",{get:function(){return{maxage:365,domain:N(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),t.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},t.prototype.get=function(t){var e;try{var n=J.get(t);if(null==n)return null;try{return null!==(e=JSON.parse(n))&&void 0!==e?e:null}catch(t){return null!=n?n:null}}catch(t){return null}},t.prototype.set=function(t,e){"string"==typeof e?J.set(t,e,this.opts()):null===e?J.remove(t,this.opts()):J.set(t,JSON.stringify(e),this.opts())},t.prototype.remove=function(t){return J.remove(t,this.opts())},t}(),G=function(){function t(){}return t.prototype.localStorageWarning=function(t,e){console.warn("Unable to access ".concat(t,", localStorage may be ").concat(e))},t.prototype.get=function(t){var e;try{var n=localStorage.getItem(t);if(null===n)return null;try{return null!==(e=JSON.parse(n))&&void 0!==e?e:null}catch(t){return null!=n?n:null}}catch(e){return this.localStorageWarning(t,"unavailable"),null}},t.prototype.set=function(t,e){try{localStorage.setItem(t,JSON.stringify(e))}catch(e){this.localStorageWarning(t,"full")}},t.prototype.remove=function(t){try{return localStorage.removeItem(t)}catch(e){this.localStorageWarning(t,"unavailable")}},t}(),L=function(){function t(){this.cache={}}return t.prototype.get=function(t){var e;return null!==(e=this.cache[t])&&void 0!==e?e:null},t.prototype.set=function(t,e){this.cache[t]=e},t.prototype.remove=function(t){delete this.cache[t]},t}(),q={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"};function z(t){return t&&t.stores&&Array.isArray(t.stores)&&t.stores.every((function(t){return Object.values(q).includes(t)}))}function B(t){return t.map((function(t){var e,n;switch(function(t){return"object"==typeof t&&void 0!==t.name}(t)?(e=t.name,n=t.settings):e=t,e){case q.Cookie:return new R(n);case q.LocalStorage:return new G;case q.Memory:return new L;default:throw new Error("Unknown Store Type: ".concat(t))}}))}function U(t,e){return t.map((function(t){return e&&t===q.Cookie?{name:t,settings:e}:t}))}var K=function(t,e,n,r){console.warn("".concat(t.constructor.name,": Can't ").concat(e,' key "').concat(n,'" | Err: ').concat(r))},H=function(){function t(t){this.stores=t}return t.prototype.get=function(t){for(var e=null,n=0,r=this.stores;n<r.length;n++){var i=r[n];try{if(null!=(e=i.get(t)))return e}catch(e){K(i,"get",t,e)}}return null},t.prototype.set=function(t,e){this.stores.forEach((function(n){try{n.set(t,e)}catch(e){K(n,"set",t,e)}}))},t.prototype.clear=function(t){this.stores.forEach((function(e){try{e.remove(t)}catch(n){K(e,"remove",t,n)}}))},t.prototype.getAndSync=function(t){var e=this.get(t),n="number"==typeof e?e.toString():e;return this.set(t,n),n},t}(),Z={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},W=function(){function t(t,e){void 0===t&&(t=Z);var n,i,o,a,s=this;this.options={},this.id=function(t){if(s.options.disable)return null;var e=s.identityStore.getAndSync(s.idKey);void 0!==t&&(s.identityStore.set(s.idKey,t),t!==e&&null!==e&&null!==t&&s.anonymousId(null));var n=s.identityStore.getAndSync(s.idKey);if(n)return n;var r=s.legacyUserStore.get(Z.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(t){var e,n;if(s.options.disable)return null;if(void 0===t){var r=null!==(e=s.identityStore.getAndSync(s.anonKey))&&void 0!==e?e:null===(n=s.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===t?(s.identityStore.set(s.anonKey,null),s.identityStore.getAndSync(s.anonKey)):(s.identityStore.set(s.anonKey,null!=t?t:(0,h.v4)()),s.identityStore.getAndSync(s.anonKey))},this.traits=function(t){var e;if(!s.options.disable)return null===t&&(t={}),t&&s.traitsStore.set(s.traitsKey,null!=t?t:{}),null!==(e=s.traitsStore.get(s.traitsKey))&&void 0!==e?e:{}},this.options=(0,r.pi)((0,r.pi)({},Z),t),this.cookieOptions=e,this.idKey=null!==(i=null===(n=t.cookie)||void 0===n?void 0:n.key)&&void 0!==i?i:Z.cookie.key,this.traitsKey=null!==(a=null===(o=t.localStorage)||void 0===o?void 0:o.key)&&void 0!==a?a:Z.localStorage.key,this.anonKey="ajs_anonymous_id",this.identityStore=this.createStorage(this.options,e),this.legacyUserStore=this.createStorage(this.options,e,(function(t){return t===q.Cookie})),this.traitsStore=this.createStorage(this.options,e,(function(t){return t!==q.Cookie}));var u=this.legacyUserStore.get(Z.cookie.oldKey);u&&"object"==typeof u&&(u.id&&this.id(u.id),u.traits&&this.traits(u.traits)),F(this)}return t.prototype.legacySIO=function(){var t=this.legacyUserStore.get("_sio");if(!t)return null;var e=t.split("----");return[e[0],e[1]]},t.prototype.identify=function(t,e){if(!this.options.disable){e=null!=e?e:{};var n=this.id();null!==n&&n!==t||(e=(0,r.pi)((0,r.pi)({},this.traits()),e)),t&&this.id(t),this.traits(e)}},t.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},t.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},t.prototype.load=function(){return new t(this.options,this.cookieOptions)},t.prototype.save=function(){return!0},t.prototype.createStorage=function(t,e,n){var r=[q.LocalStorage,q.Cookie,q.Memory];return t.disable?new H([]):t.persist?(void 0!==t.storage&&null!==t.storage&&z(t.storage)&&(r=t.storage.stores),t.localStorageFallbackDisabled&&(r=r.filter((function(t){return t!==q.LocalStorage}))),n&&(r=r.filter(n)),new H(B(U(r,e)))):new H([new L])},t.defaults=Z,t}(),V={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},Q=function(t){function e(e,n){void 0===e&&(e=V);var i=t.call(this,(0,r.pi)((0,r.pi)({},V),e),n)||this;return i.anonymousId=function(t){},F(i),i}return(0,r.ZT)(e,t),e}(W),Y=n(39821),$=n(44083),X=n(74939),tt=n(7227),et=function(t,e,n){n.getAndRemove(t).forEach((function(t){lt(e,t).catch(console.error)}))},nt=function(t,e){return(0,r.mG)(void 0,void 0,void 0,(function(){var n,i,o;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:n=0,i=e.getAndRemove("addSourceMiddleware"),r.label=1;case 1:return n<i.length?(o=i[n],[4,lt(t,o).catch(console.error)]):[3,4];case 2:r.sent(),r.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},rt=function(t,e){return(0,r.mG)(void 0,void 0,void 0,(function(){var n,i,o;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:n=0,i=e.getAndRemove("register"),r.label=1;case 1:return n<i.length?(o=i[n],[4,lt(t,o).catch(console.error)]):[3,4];case 2:r.sent(),r.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},it=et.bind(void 0,"on"),ot=et.bind(void 0,"setAnonymousId"),at=function(t){if(st(t)){var e=t.pop();return m(e)}},st=function(t){return function(t){if(e=t,"object"!==Object.prototype.toString.call(e).slice(8,-1).toLowerCase())return!1;var e;if("bpc"!==t.__t)return!1;for(var n in t)if(!y.includes(n))return!1;return!0}(t[t.length-1])},ut=function(t,e,n,r){void 0===n&&(n=function(){}),void 0===r&&(r=console.error),this.method=t,this.resolve=n,this.reject=r,this.called=!1,this.args=e},ct=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._callMap={},this.add.apply(this,t)}return Object.defineProperty(t.prototype,"calls",{get:function(){return this._pushSnippetWindowBuffer(),this._callMap},set:function(t){this._callMap=t},enumerable:!1,configurable:!0}),t.prototype.get=function(t){var e;return null!==(e=this.calls[t])&&void 0!==e?e:[]},t.prototype.getAndRemove=function(t){var e=this.get(t);return this.calls[t]=[],e},t.prototype.add=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach((function(e){["track","screen","alias","group","page","identify"].includes(e.method)&&!st(e.args)&&(e.args=(0,r.ev)((0,r.ev)([],e.args,!0),[g()],!1)),t.calls[e.method]?t.calls[e.method].push(e):t.calls[e.method]=[e]}))},t.prototype.clear=function(){this._pushSnippetWindowBuffer(),this.calls={}},t.prototype.toArray=function(){var t;return(t=[]).concat.apply(t,Object.values(this.calls))},t.prototype._pushSnippetWindowBuffer=function(){if("npm"!==(0,tt.B)()){var t=(0,X.wI)();if(Array.isArray(t)){var e=t.splice(0,t.length).map((function(t){var e=t[0],n=t.slice(1);return new ut(e,n)}));this.add.apply(this,e)}}},t}();function lt(t,e){return(0,r.mG)(this,void 0,void 0,(function(){var n,i;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),e.called?[2,void 0]:(e.called=!0,"object"==typeof(o=n=t[e.method].apply(t,e.args))&&null!==o&&"then"in o&&"function"==typeof o.then?[4,n]:[3,2]);case 1:r.sent(),r.label=2;case 2:return e.resolve(n),[3,4];case 3:return i=r.sent(),e.reject(i),[3,4];case 4:return[2]}var o}))}))}var pt=function(){function t(t){var e=this;this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=Y.i,this._preInitBuffer=new ct,this._promise=t(this._preInitBuffer),this._promise.then((function(t){var n=t[0],r=t[1];e.instance=n,e.ctx=r})).catch((function(){}))}return t.prototype.then=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).then.apply(t,e)},t.prototype.catch=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).catch.apply(t,e)},t.prototype.finally=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).finally.apply(t,e)},t.prototype._createMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(e.instance){var o=(n=e.instance)[t].apply(n,r);return Promise.resolve(o)}return new Promise((function(n,i){e._preInitBuffer.add(new ut(t,r,n,i))}))}},t.prototype._createChainableMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.instance?((n=e.instance)[t].apply(n,r),e):(e._preInitBuffer.add(new ut(t,r)),e)}},t}(),dt=n(23888),ft=n(52819),ht=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e)||this;return i.retryTimeout=n,i.isRetryableWithoutCount=r,i.name="RateLimitError",i}return(0,r.ZT)(e,t),e}(Error),vt=function(t){return(0,r.pi)({"Content-Type":"text/plain"},"function"==typeof t?t():t)},yt={408:"retry",410:"retry",429:"retry",460:"retry",501:"drop",505:"drop",511:"drop"};function mt(t,e,n,r){var i=null!=t?t:e;return Math.min(Math.max(i,n),r)}function gt(t,e){var n;if(429!==t.status)return null;var r=null===(n=t.headers)||void 0===n?void 0:n.get("Retry-After");if(!r)return null;var i=parseInt(r,10);return Number.isNaN(i)?null:{retryAfterMs:1e3*Math.max(0,Math.min(i,e.maxRetryInterval)),fromHeader:!0}}function bt(t,e){return e.statusCodeOverrides[String(t)]||(t>=500?e.default5xxBehavior:t>=400?e.default4xxBehavior:"drop")}function wt(t,e){var n,i,o,a,s=t||e?{rateLimitConfig:(0,r.pi)((0,r.pi)({},null==t?void 0:t.rateLimitConfig),null==e?void 0:e.rateLimitConfig),backoffConfig:(0,r.pi)((0,r.pi)((0,r.pi)({},null==t?void 0:t.backoffConfig),null==e?void 0:e.backoffConfig),{statusCodeOverrides:(0,r.pi)((0,r.pi)({},null===(n=null==t?void 0:t.backoffConfig)||void 0===n?void 0:n.statusCodeOverrides),null===(i=null==e?void 0:e.backoffConfig)||void 0===i?void 0:i.statusCodeOverrides)})}:void 0,u=null==s?void 0:s.rateLimitConfig,c=null==s?void 0:s.backoffConfig;return{rateLimitConfig:{maxRetryCount:mt(null==u?void 0:u.maxRetryCount,10,0,100),maxRetryInterval:mt(null==u?void 0:u.maxRetryInterval,300,.1,86400),maxRateLimitDuration:mt(null==u?void 0:u.maxRateLimitDuration,43200,10,86400)},backoffConfig:{maxRetryCount:mt(null==c?void 0:c.maxRetryCount,10,0,100),baseBackoffInterval:mt(null==c?void 0:c.baseBackoffInterval,.5,.1,300),maxBackoffInterval:mt(null==c?void 0:c.maxBackoffInterval,60,.1,86400),maxTotalBackoffDuration:mt(null==c?void 0:c.maxTotalBackoffDuration,43200,60,604800),jitterPercent:mt(null==c?void 0:c.jitterPercent,10,0,100),default4xxBehavior:null!==(o=null==c?void 0:c.default4xxBehavior)&&void 0!==o?o:"drop",default5xxBehavior:null!==(a=null==c?void 0:c.default5xxBehavior)&&void 0!==a?a:"retry",statusCodeOverrides:(0,r.pi)((0,r.pi)({},yt),null==c?void 0:c.statusCodeOverrides)}}}function _t(t){return(encodeURI(JSON.stringify(t)).split(/%..|./).length-1)/1024}function xt(t){return _t(t)>=450}function St(t,e,n,i,o){var a,s=t.user();delete e.options,e.writeKey=null==n?void 0:n.apiKey,e.userId=e.userId||s.id(),e.anonymousId=e.anonymousId||s.anonymousId(),e.sentAt=new Date;var u=t.queue.failedInitializations||[];u.length>0&&(e._metadata={failedInitializations:u}),null!=o&&(o.attempts>1&&(e._metadata=(0,r.pi)((0,r.pi)({},e._metadata),{retryCount:o.attempts})),o.attempts++);var c=[],l=[];for(var p in i){var d=i[p];"Segment.io"===p&&c.push(p),"bundled"===d.bundlingStatus&&c.push(p),"unbundled"===d.bundlingStatus&&l.push(p)}for(var f=0,h=(null==n?void 0:n.unbundledIntegrations)||[];f<h.length;f++){var v=h[f];l.includes(v)||l.push(v)}var y=null!==(a=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==a?a:{},m=[];return c.sort().forEach((function(t){var e;(null!==(e=y[t])&&void 0!==e?e:[]).forEach((function(t){m.push(t)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(e._metadata=(0,r.pi)((0,r.pi)({},e._metadata),{bundled:c.sort(),unbundled:l.sort(),bundledIds:m})),e}var It=n(56749);function kt(t,e){return(0,r.mG)(this,void 0,void 0,(function(){var n,i=this;return(0,r.Jh)(this,(function(o){switch(o.label){case 0:return n=[],(0,c.s)()?[2,e]:[4,(0,It.x)((function(){return e.length>0&&!(0,c.s)()}),(function(){return(0,r.mG)(i,void 0,void 0,(function(){var i;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return(i=e.pop())?[4,(0,E.a)(i,t)]:[2];case 1:return r.sent()instanceof l._||n.push(i),[2]}}))}))}))];case 1:return o.sent(),n.map((function(t){return e.pushWithBackoff(t)})),[2,e]}}))}))}function jt(t,e,n,i){var o=this;t||setTimeout((function(){return(0,r.mG)(o,void 0,void 0,(function(){var t,o;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return t=!0,[4,kt(n,e)];case 1:return o=r.sent(),t=!1,e.todo>0&&i(t,o,n,i),[2]}}))}))}),500*Math.random()+100)}var Ot=n(36514),Pt=function(t){return"Segment.io"===t.name};function Mt(t,e,n){var i,o,a,s;window.addEventListener("pagehide",(function(){p.push.apply(p,Array.from(d)),d.clear()}));var u=null!==(i=null==e?void 0:e.apiKey)&&void 0!==i?i:"",p=t.options.disableClientPersistence?new M.Z(t.queue.queue.maxAttempts,[]):new P.$(t.queue.queue.maxAttempts,"".concat(u,":dest-Segment.io")),d=new Set,f=new WeakMap,h=!1,v=null!==(o=null==e?void 0:e.apiHost)&&void 0!==o?o:Ot.U,y=null!==(a=null==e?void 0:e.protocol)&&void 0!==a?a:"https",m="".concat(y,"://").concat(v),g=null===(s=null==n?void 0:n["Segment.io"])||void 0===s?void 0:s.httpConfig,b=wt(null==e?void 0:e.httpConfig,g);!1!==t.options.retryQueue&&(p.maxAttempts=b.backoffConfig.maxRetryCount);var w,_,x=null==e?void 0:e.deliveryStrategy,S=x&&"strategy"in x&&"batching"===x.strategy?function(t,e,n,i){var o,a;void 0===i&&(i="https");var s,u,c,p=[],d=!1,f=null!==(o=null==e?void 0:e.size)&&void 0!==o?o:10,h=null!==(a=null==e?void 0:e.timeout)&&void 0!==a?a:5e3,v=null!=n?n:wt(),y=0,m=0,g=!1,b=!1,w=0,_=0,x=0;function S(n,o){var a;if(0!==n.length){var s=null===(a=n[0])||void 0===a?void 0:a.writeKey,u=n.map((function(t){var e=t;return e.sentAt,(0,r._T)(e,["sentAt"])})),c=vt(null==e?void 0:e.headers);if(o>0&&(c["X-Retry-Count"]=String(o)),s){var l=btoa(s+":");c.Authorization="Basic ".concat(l)}var p=t.startsWith("http://")||t.startsWith("https://")?"":"".concat(i,"://");return(0,ft.h)("".concat(p).concat(t,"/b"),{credentials:null==e?void 0:e.credentials,keepalive:(null==e?void 0:e.keepalive)||d,headers:c,method:"post",body:JSON.stringify({writeKey:s,batch:u,sentAt:(new Date).toISOString()}),priority:null==e?void 0:e.priority}).then((function(t){var e=t.status;if(!(e<400)){var n=bt(e,v.backoffConfig);if("drop"!==n){var r=gt(t,v.rateLimitConfig);if(r)throw new ht("Rate limit exceeded: ".concat(e),r.retryAfterMs,r.fromHeader)}if("retry"===n)throw new Error("Retryable error: ".concat(e))}}))}}function I(){p.length>0&&j(1)}function k(t){var n;return void 0===t&&(t=1),(0,r.mG)(this,void 0,void 0,(function(){var i,o,a,s;return(0,r.Jh)(this,(function(u){return g||(m=0,w=0,_=0,x=0),g=!1,b=!0,p.length?(i=function(t){for(var e=[],n=0;n<t.length;n++){var i=t[n],o=(0,r.ev)((0,r.ev)([],e,!0),[i],!1);if(e.length>0&&xt(o))return{batch:e,remaining:t.slice(n)};e.push(i)}return{batch:e,remaining:[]}}(p),o=i.batch,a=i.remaining,0===o.length?(b=!1,[2]):(p=a,s=m,m+=1,[2,null===(n=S(o,s))||void 0===n?void 0:n.then((function(t){return p.length>0&&j(1),t})).catch((function(n){var i;l._.system().log("error","Error sending batch",n);var a,s=null!==(i=null==e?void 0:e.maxRetries)&&void 0!==i?i:v.backoffConfig.maxRetryCount,u="RateLimitError"===n.name,c=u&&n.isRetryableWithoutCount;if(!(c||t<=s))return I();if(c){if(++w>v.rateLimitConfig.maxRetryCount)return I();var d=n.retryTimeout;x+=d;var f=1e3*v.rateLimitConfig.maxRateLimitDuration;if(x>f)return I();y=d}if(!u){a=function(t,e){var n=1e3*e.baseBackoffInterval,r=1e3*e.maxBackoffInterval,i=n*Math.pow(2,t-1),o=Math.min(i,r),a=1+2*(Math.random()-.5)*(e.jitterPercent/100);return Math.max(0,o*a)}(t,v.backoffConfig),_+=a;var h=1e3*v.backoffConfig.maxTotalBackoffDuration;if(_>h)return I()}p=(0,r.ev)((0,r.ev)([],o,!0),p,!0),o.forEach((function(e){if("_metadata"in e){var n=e;n._metadata=(0,r.pi)((0,r.pi)({},n._metadata),{retryCount:t})}})),g=!0,j(c?t:t+1,a)})).finally((function(){b=!1}))])):(b=!1,[2])}))}))}function j(t,e){void 0===t&&(t=1),s||(s=setTimeout((function(){s=void 0,k(t).catch(console.error)}),y||e||h),y=0)}return u=function(t){if((d=t)&&p.length){var e=function(t){var e=[],n=0;return t.forEach((function(t){_t(e[n])>=64&&n++,e[n]?e[n].push(t):e[n]=[t]})),e}(p).map((function(t){return S(t,0)}));Promise.all(e).catch(console.error)}},c=!1,window.addEventListener("pagehide",(function(){c||u(c=!0)})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(c)return;c=!0}else c=!1;u(c)})),{dispatch:function(t,n,i){return(0,r.mG)(this,void 0,void 0,(function(){var t;return(0,r.Jh)(this,(function(r){return p.push(n),g?[2]:(t=p.length>=f||xt(p)||(null==e?void 0:e.keepalive)&&function(t){return _t(t)>=54}(p),t||d?[2,b?j():k()]:[2,j()])}))}))}}}(v,x.config,b,y):(w=null==x?void 0:x.config,_=b,{dispatch:function(t,e,n){var r=vt(null==w?void 0:w.headers),i=null==e?void 0:e.writeKey;if(i){var o=btoa(i+":");r.Authorization="Basic ".concat(o)}return n&&(r["X-Retry-Count"]=String(n)),(0,ft.h)(t,{credentials:null==w?void 0:w.credentials,keepalive:null==w?void 0:w.keepalive,headers:r,method:"post",body:JSON.stringify(e),priority:null==w?void 0:w.priority}).then((function(t){var e=t.status;if(!(e<400)){var n=null!=_?_:wt(),r=bt(e,n.backoffConfig);if("drop"!==r){var i=gt(t,n.rateLimitConfig);if(i)throw new ht("Rate limit exceeded: ".concat(e),i.retryAfterMs,i.fromHeader)}if("retry"===r)throw new Error("Retryable error: ".concat(e));var o=new Error("Non-retryable error: ".concat(e));throw o.name="NonRetryableError",o}}))}});function I(i){return(0,r.mG)(this,void 0,void 0,(function(){var o,a,s,u;return(0,r.Jh)(this,(function(r){return(0,c.s)()?(p.push(i),jt(h,p,k,jt),[2,i]):(d.add(i),o=i.event.type.charAt(0),a=(0,dt.D)(i.event).json(),"track"===i.event.type&&delete a.traits,"alias"===i.event.type&&(a=function(t,e){var n,r,i,o,a=t.user();return e.previousId=null!==(i=null!==(r=null!==(n=e.previousId)&&void 0!==n?n:e.from)&&void 0!==r?r:a.id())&&void 0!==i?i:a.anonymousId(),e.userId=null!==(o=e.userId)&&void 0!==o?o:e.to,delete e.from,delete e.to,e}(t,a)),(s=p.getAttempts(i))>=p.maxAttempts?(d.delete(i),u=new Error("Retry attempts exhausted (".concat(s,"/").concat(p.maxAttempts,")")),i.setFailedDelivery({reason:u}),t.emit("error",{code:"delivery_failure",reason:u,ctx:i}),[2,i]):[2,S.dispatch("".concat(m,"/").concat(o),St(t,a,e,n,i),s).then((function(){return i})).catch((function(e){var n;if(i.log("error","Error sending event",e),"RateLimitError"===e.name){var r=(null!==(n=f.get(i))&&void 0!==n?n:0)+1;if(f.set(i,r),r>b.rateLimitConfig.maxRetryCount)i.setFailedDelivery({reason:e}),t.emit("error",{code:"delivery_failure",reason:e,ctx:i});else{var o=e.retryTimeout;p.pushWithDelay(i,o)}}else"NonRetryableError"===e.name?(i.setFailedDelivery({reason:e}),t.emit("error",{code:"delivery_failure",reason:e,ctx:i})):p.pushWithBackoff(i);return jt(h,p,k,jt),i})).finally((function(){d.delete(i)}))])}))}))}var k={metadata:{writeKey:u,apiHost:v,protocol:y},name:"Segment.io",type:"destination",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:I,identify:I,page:I,alias:I,group:I,screen:I};return p.todo&&jt(h,p,k,jt),k}var At="This is being deprecated and will be not be available in future releases of Analytics JS",Et=(0,$.R)(),Ct=null==Et?void 0:Et.analytics,Dt=function(){function t(t,e){var n;this.timeout=300,this._getSegmentPluginMetadata=function(){var t;return null===(t=e.plugins.find(Pt))||void 0===t?void 0:t.metadata},this.writeKey=t.writeKey,this.cdnSettings=null!==(n=t.cdnSettings)&&void 0!==n?n:{integrations:{"Segment.io":{apiKey:""}}},this.cdnURL=t.cdnURL}return Object.defineProperty(t.prototype,"apiHost",{get:function(){var t,e;return null===(e=null===(t=this._getSegmentPluginMetadata)||void 0===t?void 0:t.call(this))||void 0===e?void 0:e.apiHost},enumerable:!1,configurable:!0}),t}();function Ft(){console.warn(At)}var Tt=function(t){function e(e,n,i,o,a){var s,u,c=this;(c=t.call(this)||this)._debug=!1,c.initialized=!1,c.user=function(){return c._user},c.init=c.initialize.bind(c),c.log=Ft,c.addIntegrationMiddleware=Ft,c.listeners=Ft,c.addEventListener=Ft,c.removeAllListeners=Ft,c.removeListener=Ft,c.removeEventListener=Ft,c.hasListeners=Ft,c.add=Ft,c.addIntegration=Ft;var l=null==n?void 0:n.cookie,p=null!==(s=null==n?void 0:n.disableClientPersistence)&&void 0!==s&&s;c.queue=null!=i?i:function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var r=e?10:1,i=n?new M.Z(r,[]):new P.$(r,t);return new D(i)}("".concat(e.writeKey,":event-queue"),null==n?void 0:n.retryQueue,p),c.settings=new Dt(e,c.queue);var d=null==n?void 0:n.storage;return c._universalStorage=c.createStore(p,d,l),c._user=null!=o?o:new W((0,r.pi)({persist:!p,storage:null==n?void 0:n.storage},null==n?void 0:n.user),l).load(),c._group=null!=a?a:new Q((0,r.pi)({persist:!p,storage:null==n?void 0:n.storage},null==n?void 0:n.group),l).load(),c.eventFactory=new j(c._user),c.integrations=null!==(u=null==n?void 0:n.integrations)&&void 0!==u?u:{},c.options=null!=n?n:{},F(c),c}return(0,r.ZT)(e,t),e.prototype.createStore=function(t,e,n){return t?new H([new L]):e&&z(e)?new H(B(U(e.stores,n))):new H(B([q.LocalStorage,{name:q.Cookie,settings:n},q.Memory]))},Object.defineProperty(e.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),e.prototype.track=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.mG)(this,void 0,void 0,(function(){var e,n,i,a,s,u,c,l=this;return(0,r.Jh)(this,(function(r){return e=at(t),n=o.apply(void 0,t),i=n[0],a=n[1],s=n[2],u=n[3],c=this.eventFactory.track(i,a,s,this.integrations,e),[2,this._dispatch(c,u).then((function(t){return l.emit("track",i,t.event.properties,t.event.options),t}))]}))}))},e.prototype.page=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.mG)(this,void 0,void 0,(function(){var e,n,i,o,s,u,c,l,p=this;return(0,r.Jh)(this,(function(r){return e=at(t),n=a.apply(void 0,t),i=n[0],o=n[1],s=n[2],u=n[3],c=n[4],l=this.eventFactory.page(i,o,s,u,this.integrations,e),[2,this._dispatch(l,c).then((function(t){return p.emit("page",i,o,t.event.properties,t.event.options),t}))]}))}))},e.prototype.identify=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.mG)(this,void 0,void 0,(function(){var e,n,i,o,a,u,c,l=this;return(0,r.Jh)(this,(function(r){return e=at(t),n=s(this._user).apply(void 0,t),i=n[0],o=n[1],a=n[2],u=n[3],this._user.identify(i,o),c=this.eventFactory.identify(this._user.id(),this._user.traits(),a,this.integrations,e),[2,this._dispatch(c,u).then((function(t){return l.emit("identify",t.event.userId,t.event.traits,t.event.options),t}))]}))}))},e.prototype.group=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=at(e);if(0===e.length)return this._group;var i=s(this._group).apply(void 0,e),o=i[0],a=i[1],u=i[2],c=i[3];this._group.identify(o,a);var l=this._group.id(),p=this._group.traits(),d=this.eventFactory.group(l,p,u,this.integrations,r);return this._dispatch(d,c).then((function(e){return t.emit("group",e.event.groupId,e.event.traits,e.event.options),e}))},e.prototype.alias=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.mG)(this,void 0,void 0,(function(){var e,n,i,o,a,s,c,l=this;return(0,r.Jh)(this,(function(r){return e=at(t),n=u.apply(void 0,t),i=n[0],o=n[1],a=n[2],s=n[3],c=this.eventFactory.alias(i,o,a,this.integrations,e),[2,this._dispatch(c,s).then((function(t){return l.emit("alias",i,o,t.event.options),t}))]}))}))},e.prototype.screen=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.mG)(this,void 0,void 0,(function(){var e,n,i,o,s,u,c,l,p=this;return(0,r.Jh)(this,(function(r){return e=at(t),n=a.apply(void 0,t),i=n[0],o=n[1],s=n[2],u=n[3],c=n[4],l=this.eventFactory.screen(i,o,s,u,this.integrations,e),[2,this._dispatch(l,c).then((function(t){return p.emit("screen",i,o,t.event.properties,t.event.options),t}))]}))}))},e.prototype.trackClick=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.mG)(this,void 0,void 0,(function(){var e,i;return(0,r.Jh)(this,(function(o){switch(o.label){case 0:return[4,n.e(119).then(n.bind(n,4802))];case 1:return e=o.sent(),[2,(i=e.link).call.apply(i,(0,r.ev)([this],t,!1))]}}))}))},e.prototype.trackLink=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.mG)(this,void 0,void 0,(function(){var e,i;return(0,r.Jh)(this,(function(o){switch(o.label){case 0:return[4,n.e(119).then(n.bind(n,4802))];case 1:return e=o.sent(),[2,(i=e.link).call.apply(i,(0,r.ev)([this],t,!1))]}}))}))},e.prototype.trackSubmit=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.mG)(this,void 0,void 0,(function(){var e,i;return(0,r.Jh)(this,(function(o){switch(o.label){case 0:return[4,n.e(119).then(n.bind(n,4802))];case 1:return e=o.sent(),[2,(i=e.form).call.apply(i,(0,r.ev)([this],t,!1))]}}))}))},e.prototype.trackForm=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.mG)(this,void 0,void 0,(function(){var e,i;return(0,r.Jh)(this,(function(o){switch(o.label){case 0:return[4,n.e(119).then(n.bind(n,4802))];case 1:return e=o.sent(),[2,(i=e.form).call.apply(i,(0,r.ev)([this],t,!1))]}}))}))},e.prototype.register=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.mG)(this,void 0,void 0,(function(){var e,n,i=this;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return e=l._.system(),n=t.map((function(t){return i.queue.register(e,t,i)})),[4,Promise.all(n)];case 1:return r.sent(),[2,e]}}))}))},e.prototype.deregister=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.mG)(this,void 0,void 0,(function(){var e,n,i=this;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return e=l._.system(),n=t.map((function(t){var n=i.queue.plugins.find((function(e){return e.name===t}));if(n)return i.queue.deregister(e,n,i);e.log("warn","plugin ".concat(t," not found"))})),[4,Promise.all(n)];case 1:return r.sent(),[2,e]}}))}))},e.prototype.debug=function(t){return!1===t&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=t,this},e.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},e.prototype.timeout=function(t){this.settings.timeout=t},e.prototype._dispatch=function(t,e){return(0,r.mG)(this,void 0,void 0,(function(){var n;return(0,r.Jh)(this,(function(r){return(n=new l._(t)).stats.increment("analytics_js.invoke",1,[t.type]),(0,c.s)()&&!this.options.retryQueue?[2,n]:[2,d(n,this.queue,this,{callback:e,debug:this._debug,timeout:this.settings.timeout})]}))}))},e.prototype.addSourceMiddleware=function(t){return(0,r.mG)(this,void 0,void 0,(function(){var e=this;return(0,r.Jh)(this,(function(i){switch(i.label){case 0:return[4,this.queue.criticalTasks.run((function(){return(0,r.mG)(e,void 0,void 0,(function(){var e,i,o;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then(n.bind(n,66170))];case 1:return e=r.sent().sourceMiddlewarePlugin,i={},this.queue.plugins.forEach((function(t){if("destination"===t.type)return i[t.name]=!0})),o=e(t,i),[4,this.register(o)];case 2:return r.sent(),[2]}}))}))}))];case 1:return i.sent(),[2,this]}}))}))},e.prototype.addDestinationMiddleware=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this.queue.plugins.filter(O).forEach((function(n){"*"!==t&&n.name.toLowerCase()!==t.toLowerCase()||n.addMiddleware.apply(n,e)})),Promise.resolve(this)},e.prototype.setAnonymousId=function(t){return this._user.anonymousId(t)},e.prototype.queryString=function(t){return(0,r.mG)(this,void 0,void 0,(function(){return(0,r.Jh)(this,(function(e){switch(e.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,n.e(96).then(n.bind(n,53694))];case 1:return[2,(0,e.sent().queryString)(this,t)]}}))}))},e.prototype.use=function(t){return t(this),this},e.prototype.ready=function(t){return void 0===t&&(t=function(t){return t}),(0,r.mG)(this,void 0,void 0,(function(){return(0,r.Jh)(this,(function(e){return[2,Promise.all(this.queue.plugins.map((function(t){return t.ready?t.ready():Promise.resolve()}))).then((function(e){return t(e),e}))]}))}))},e.prototype.noConflict=function(){return console.warn(At),(0,X.ql)(null!=Ct?Ct:this),this},e.prototype.normalize=function(t){return console.warn(At),this.eventFactory.normalize(t)},Object.defineProperty(e.prototype,"failedInitializations",{get:function(){return console.warn(At),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"VERSION",{get:function(){return Y.i},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t,e){return(0,r.mG)(this,void 0,void 0,(function(){return(0,r.Jh)(this,(function(t){return console.warn(At),[2,Promise.resolve(this)]}))}))},e.prototype.pageview=function(t){return(0,r.mG)(this,void 0,void 0,(function(){return(0,r.Jh)(this,(function(e){switch(e.label){case 0:return console.warn(At),[4,this.page({path:t})];case 1:return e.sent(),[2,this]}}))}))},Object.defineProperty(e.prototype,"plugins",{get:function(){var t;return console.warn(At),null!==(t=this._plugins)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Integrations",{get:function(){return console.warn(At),this.queue.plugins.filter((function(t){return"destination"===t.type})).reduce((function(t,e){var n="".concat(e.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return t;var i=r.Integration;return i?(t[e.name]=i,t):(t[e.name]=r,t)}),{})},enumerable:!1,configurable:!0}),e.prototype.push=function(t){var e=t.shift();e&&!this[e]||this[e].apply(this,t)},e}(f.Q),Jt=function(t){function e(){var e=t.call(this,{writeKey:""},{disableClientPersistence:!0})||this;return e.initialized=!0,e}return(0,r.ZT)(e,t),e}(Tt);function Nt(){return"undefined"!=typeof process&&process.env?process.env:{}}var Rt,Gt=n(99382),Lt=n(913),qt=n(15987),zt=n(67475);function Bt(t){return(0,r.mG)(this,void 0,void 0,(function(){var e;return(0,r.Jh)(this,(function(n){return(e=navigator.userAgentData)?t?[2,e.getHighEntropyValues(t).catch((function(){return e.toJSON()}))]:[2,e.toJSON()]:[2,void 0]}))}))}function Ut(){if(Rt)return Rt;var t=N(window.location.href);return Rt={expires:31536e6,secure:!1,path:"/"},t&&(Rt.domain=t),Rt}var Kt,Ht,Zt=new function(){var t=this;this.name="Page Enrichment",this.type="before",this.version="0.1.0",this.isLoaded=function(){return!0},this.load=function(e,n){return(0,r.mG)(t,void 0,void 0,(function(){var t;return(0,r.Jh)(this,(function(e){switch(e.label){case 0:this.instance=n,e.label=1;case 1:return e.trys.push([1,3,,4]),t=this,[4,Bt(this.instance.options.highEntropyValuesClientHints)];case 2:return t.userAgentData=e.sent(),[3,4];case 3:return e.sent(),[3,4];case 4:return[2,Promise.resolve()]}}))}))},this.enrich=function(e){var n,i,o=e.event.context,a=o.page.search||"",s="object"==typeof a?function(t){try{var e=new URLSearchParams;return Object.entries(t).forEach((function(t){var n=t[0],r=t[1];Array.isArray(r)?r.forEach((function(t){return e.append(n,t)})):e.append(n,r)})),e.toString()}catch(t){return""}}(a):a;o.userAgent=navigator.userAgent,o.userAgentData=t.userAgentData;var u=navigator.userLanguage||navigator.language;void 0===o.locale&&void 0!==u&&(o.locale=u),null!==(n=o.library)&&void 0!==n||(o.library={name:"analytics.js",version:"".concat("web"===(0,tt.B)()?"next":"npm:next","-").concat(Y.i)}),s&&!o.campaign&&(o.campaign=function(t){return t.startsWith("?")&&(t=t.substring(1)),(t=t.replace(/\?/g,"&")).split("&").reduce((function(t,e){var n=e.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var a=r.slice(4);"campaign"===a&&(a="name"),t[a]=(0,zt.a)(o)}return t}),{})}(s));var c=function(){var t=J.get("_ga");if(t&&t.startsWith("amp"))return t}();c&&(o.amp={id:c}),function(t,e,n){var i,o=new H(n?[]:[new R(Ut())]),a=o.get("s:context.referrer"),s=null!==(i=function(t){var e={btid:"dataxu",urid:"millennial-media"};t.startsWith("?")&&(t=t.substring(1));for(var n=0,r=(t=t.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),o=i[0],a=i[1];if(e[o])return{id:a,type:e[o]}}}(t))&&void 0!==i?i:a;s&&(e&&(e.referrer=(0,r.pi)((0,r.pi)({},e.referrer),s)),o.set("s:context.referrer",s))}(s,o,null!==(i=t.instance.options.disableClientPersistence)&&void 0!==i&&i);try{o.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){}return e},this.track=this.enrich,this.identify=this.enrich,this.page=this.enrich,this.group=this.enrich,this.alias=this.enrich,this.screen=this.enrich},Wt=n(66548),Vt=n(66170),Qt=n(92311),Yt=function(){function t(t,e){this.version="1.0.0",this.alternativeNames=[],this.loadPromise=(0,qt.d)(),this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=e,this.name=t,this.type=e.type,this.alternativeNames.push(e.name)}return t.prototype.addMiddleware=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];"destination"===this.type&&(t=this.middleware).push.apply(t,e)},t.prototype.transform=function(t){return(0,r.mG)(this,void 0,void 0,(function(){var e;return(0,r.Jh)(this,(function(n){switch(n.label){case 0:return[4,(0,Vt.applyDestinationMiddleware)(this.name,t.event,this.middleware)];case 1:return null===(e=n.sent())&&t.cancel(new A.Y({retry:!1,reason:"dropped by destination middleware"})),[2,new l._(e)]}}))}))},t.prototype._createMethod=function(t){var e=this;return function(n){return(0,r.mG)(e,void 0,void 0,(function(){var e,i;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return this.action[t]?(e=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:e=r.sent(),r.label=2;case 2:return r.trys.push([2,5,,6]),[4,this.ready()];case 3:if(!r.sent())throw new Error("Something prevented the destination from getting ready");return(0,Qt.z)(n,{integrationName:this.action.name,methodName:t,type:"action"}),[4,this.action[t](e)];case 4:return r.sent(),[3,6];case 5:throw i=r.sent(),(0,Qt.z)(n,{integrationName:this.action.name,methodName:t,type:"action",didError:!0}),i;case 6:return[2,n]}}))}))}},t.prototype.isLoaded=function(){return this.action.isLoaded()},t.prototype.ready=function(){return(0,r.mG)(this,void 0,void 0,(function(){return(0,r.Jh)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.loadPromise.promise];case 1:return t.sent(),[2,!0];case 2:return t.sent(),[2,!1];case 3:return[2]}}))}))},t.prototype.load=function(t,e){return(0,r.mG)(this,void 0,void 0,(function(){var n,i,o,a;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:if(this.loadPromise.isSettled())return[2,this.loadPromise.promise];r.label=1;case 1:return r.trys.push([1,3,,4]),(0,Qt.z)(t,{integrationName:this.action.name,methodName:"load",type:"action"}),n=this.action.load(t,e),o=(i=this.loadPromise).resolve,[4,n];case 2:return o.apply(i,[r.sent()]),[2,n];case 3:throw a=r.sent(),(0,Qt.z)(t,{integrationName:this.action.name,methodName:"load",type:"action",didError:!0}),this.loadPromise.reject(a),a;case 4:return[2]}}))}))},t.prototype.unload=function(t,e){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,t,e)},t}();function $t(t,e){return(0,r.mG)(this,void 0,void 0,(function(){var n,i,o,a,s,u;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:if(r.trys.push([0,9,,10]),n=new RegExp("https://cdn.segment.(com|build)"),i=(0,Gt.Vl)(),!e)return[3,6];o=t.url.split("/"),a=o[o.length-2],s=t.url.replace(a,btoa(a).replace(/=/g,"")),r.label=1;case 1:return r.trys.push([1,3,,5]),[4,(0,Wt.v)(s.replace(n,i))];case 2:return r.sent(),[3,5];case 3:return r.sent(),[4,(0,Wt.v)(t.url.replace(n,i))];case 4:return r.sent(),[3,5];case 5:return[3,8];case 6:return[4,(0,Wt.v)(t.url.replace(n,i))];case 7:r.sent(),r.label=8;case 8:return"function"==typeof window[t.libraryName]?[2,window[t.libraryName]]:[3,10];case 9:throw u=r.sent(),console.error("Failed to create PluginFactory",t),u;case 10:return[2]}}))}))}function Xt(t,e,n,i,o,a){var s,u,c;return(0,r.mG)(this,void 0,void 0,(function(){var p,d,f,h=this;return(0,r.Jh)(this,(function(v){switch(v.label){case 0:return p=[],d=null!==(u=null===(s=t.middlewareSettings)||void 0===s?void 0:s.routingRules)&&void 0!==u?u:[],f=(null!==(c=t.remotePlugins)&&void 0!==c?c:[]).map((function(t){return(0,r.mG)(h,void 0,void 0,(function(){var s,u,c,f,h,v,y;return(0,r.Jh)(this,(function(m){switch(m.label){case 0:if(function(t,e){var n=t[e.creationName],r=t[e.name];return!1===t.All&&!n&&!r||!1===n||!1===r}(e,t))return[2];m.label=1;case 1:return m.trys.push([1,6,,7]),(u=null==a?void 0:a.find((function(e){return e.pluginName===t.name})))?[3,3]:[4,$t(t,null==i?void 0:i.obfuscate)];case 2:u=m.sent(),m.label=3;case 3:return(s=u)?(c=n[t.name],[4,s((0,r.pi)((0,r.pi)({},t.settings),c))]):[3,5];case 4:f=m.sent(),function(t){if(!Array.isArray(t))throw new Error("Not a valid list of plugins");var e=["load","isLoaded","name","version","type"];t.forEach((function(t){e.forEach((function(e){var n;if(void 0===t[e])throw new Error("Plugin: ".concat(null!==(n=t.name)&&void 0!==n?n:"unknown"," missing required function ").concat(e))}))}))}(h=Array.isArray(f)?f:[f]),v=d.filter((function(e){return e.destinationName===t.creationName})),h.forEach((function(e){var n=new Yt(t.creationName,e);v.length&&o&&n.addMiddleware(o),p.push(n)})),m.label=5;case 5:return[3,7];case 6:return y=m.sent(),console.warn("Failed to load Remote Plugin",y),(0,Qt.z)(l._.system(),{integrationName:t.name,methodName:"load",type:"action",didError:!0}),[3,7];case 7:return[2]}}))}))})),[4,Promise.all(f)];case 1:return v.sent(),[2,p.filter(Boolean)]}}))}))}var te=null!==(Kt=(Ht=(0,$.R)()).__SEGMENT_INSPECTOR__)&&void 0!==Kt?Kt:Ht.__SEGMENT_INSPECTOR__={},ee=n(23910);function ne(t,e,n){return(0,r.mG)(this,void 0,void 0,(function(){return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return[4,re(t,e)];case 1:return r.sent(),function(t,e){Object.keys(e.calls).forEach((function(n){e.getAndRemove(n).forEach((function(e){setTimeout((function(){lt(t,e).catch(console.error)}),0)}))}))}(t,n),[2]}}))}))}var re=function(t,e){return(0,r.mG)(void 0,void 0,void 0,(function(){return(0,r.Jh)(this,(function(n){switch(n.label){case 0:return e.includes("ajs_")?[4,t.queryString(e).catch(console.error)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))};function ie(t,e,i,o,a,s,u){var c,l,p;return void 0===a&&(a=[]),(0,r.mG)(this,void 0,void 0,(function(){var d,f,h,v,y,m,g,b,w,_,x,S,I,k,j=this;return(0,r.Jh)(this,(function(O){switch(O.label){case 0:return function(t,e){ot(t,e),it(t,e)}(i,u),d=null==a?void 0:a.filter((function(t){return"object"==typeof t})),f=null==a?void 0:a.filter((function(t){return"function"==typeof t&&"string"==typeof t.pluginName})),function(t){var e,n,r;return"test"!==Nt().NODE_ENV&&(null!==(r=null===(n=null===(e=t.middlewareSettings)||void 0===e?void 0:e.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(e)?[4,n.e(604).then(n.bind(n,37122)).then((function(t){return t.tsubMiddleware(e.middlewareSettings.routingRules)}))]:[3,2];case 1:return v=O.sent(),[3,3];case 2:v=void 0,O.label=3;case 3:return h=v,P=e,"test"!==Nt().NODE_ENV&&Object.keys(P.integrations).length>1||s.length>0?[4,n.e(464).then(n.bind(n,88009)).then((function(n){return n.ajsDestinations(t,e,i.integrations,o,h,s)}))]:[3,5];case 4:return m=O.sent(),[3,6];case 5:m=[],O.label=6;case 6:return y=m,e.legacyVideoPluginsEnabled?[4,n.e(150).then(n.bind(n,66352)).then((function(t){return t.loadLegacyVideoPlugins(i)}))]:[3,8];case 7:O.sent(),O.label=8;case 8:return(null===(c=o.plan)||void 0===c?void 0:c.track)?[4,n.e(493).then(n.bind(n,70527)).then((function(t){var n;return t.schemaFilter(null===(n=o.plan)||void 0===n?void 0:n.track,e)}))]:[3,10];case 9:return b=O.sent(),[3,11];case 10:b=void 0,O.label=11;case 11:return g=b,w=(0,Lt.o)(e,o),[4,Xt(e,i.integrations,w,o,h,f).catch((function(t){return console.error("Failed to load remote plugins",t),[]}))];case 12:return _=O.sent(),x=(0,r.ev)((0,r.ev)([Zt],y,!0),_,!0),g&&x.push(g),!1===(null===(l=o.integrations)||void 0===l?void 0:l.All)&&!o.integrations["Segment.io"]||o.integrations&&!1===o.integrations["Segment.io"]?[3,14]:(I=(S=x).push,[4,Mt(i,w["Segment.io"],e.integrations)]);case 13:I.apply(S,[O.sent()]),O.label=14;case 14:return[4,i.register.apply(i,(0,r.ev)((0,r.ev)([],x,!1),d,!1))];case 15:return k=O.sent(),[4,rt(i,u)];case 16:return O.sent(),Object.entries(null!==(p=e.enabledMiddleware)&&void 0!==p?p:{}).some((function(t){return t[1]}))?[4,n.e(214).then(n.bind(n,14783)).then((function(t){var n=t.remoteMiddlewares;return(0,r.mG)(j,void 0,void 0,(function(){var t,a;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return[4,n(k,e,o.obfuscate)];case 1:return t=r.sent(),a=t.map((function(t){return i.addSourceMiddleware(t)})),[2,Promise.all(a)]}}))}))}))]:[3,18];case 17:O.sent(),O.label=18;case 18:return[4,nt(i,u)];case 19:return O.sent(),[2,k]}var P}))}))}var oe=function(t){function e(){var e=this,n=(0,qt.d)(),i=n.promise,o=n.resolve;return e=t.call(this,(function(t){return i.then((function(e){return function(t,e,n){var i,o,a,s,u,c,p,d,f;return void 0===e&&(e={}),(0,r.mG)(this,void 0,void 0,(function(){var h,v,y,m,g,b,w,_,x,S;return(0,r.Jh)(this,(function(I){switch(I.label){case 0:return!0===e.disable?[2,[new Jt,l._.system()]]:(e.globalAnalyticsKey&&(0,X.jV)(e.globalAnalyticsKey),t.cdnURL&&(0,Gt.UH)(t.cdnURL),e.initialPageview&&n.add(new ut("page",[])),h=function(){var t,e,n=null!==(t=window.location.hash)&&void 0!==t?t:"",r=null!==(e=window.location.search)&&void 0!==e?e:"";return r.length?r:n.replace(/(?=#).*(?=\?)/,"")}(),v=null!==(i=t.cdnURL)&&void 0!==i?i:(0,Gt.Vl)(),null===(o=t.cdnSettings)||void 0===o?[3,1]:(m=o,[3,3]));case 1:return[4,(k=t.writeKey,j=v,(0,ft.h)("".concat(j,"/v1/projects/").concat(k,"/settings")).then((function(t){return t.ok?t.json():t.text().then((function(t){throw new Error(t)}))})).catch((function(t){throw console.error(t.message),t})))];case 2:m=I.sent(),I.label=3;case 3:return y=m,e.updateCDNSettings&&(y=e.updateCDNSettings(y)),"function"!=typeof e.disable?[3,5]:[4,e.disable(y)];case 4:if(I.sent())return[2,[new Jt,l._.system()]];I.label=5;case 5:return g=null===(s=null===(a=y.integrations["Segment.io"])||void 0===a?void 0:a.retryQueue)||void 0===s||s,e=(0,r.pi)({retryQueue:g},e),function(t){var e;null===(e=te.attach)||void 0===e||e.call(te,t)}(b=new Tt((0,r.pi)((0,r.pi)({},t),{cdnSettings:y,cdnURL:v}),e)),w=null!==(u=t.plugins)&&void 0!==u?u:[],_=null!==(c=t.classicIntegrations)&&void 0!==c?c:[],x=null===(p=e.integrations)||void 0===p?void 0:p["Segment.io"],ee.j.initRemoteMetrics((0,r.pi)((0,r.pi)({},y.metrics),{host:null!==(d=null==x?void 0:x.apiHost)&&void 0!==d?d:null===(f=y.metrics)||void 0===f?void 0:f.host,protocol:null==x?void 0:x.protocol})),[4,ie(t.writeKey,y,b,e,w,_,n)];case 6:return S=I.sent(),b.initialized=!0,b.emit("initialize",t,e),[4,ne(b,h,n)];case 7:return I.sent(),[2,[b,S]]}var k,j}))}))}(e[0],e[1],t)}))}))||this,e._resolveLoadStart=function(t,e){return o([t,e])},e}return(0,r.ZT)(e,t),e.prototype.load=function(t,e){return void 0===e&&(e={}),this._resolveLoadStart(t,e),this},e.load=function(t,n){return void 0===n&&(n={}),(new e).load(t,n)},e.standalone=function(t,n){return e.load({writeKey:t},n).then((function(t){return t[0]}))},e}(pt),ae=function(){function t(){}return t.load=function(){return Promise.reject(new Error("AnalyticsNode is not available in browsers."))},t}()},52819:(t,e,n)=>{"use strict";function r(t,e){return e=e||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],a=[],s={},u=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return a},get:function(t){return s[t.toLowerCase()]},has:function(t){return t.toLowerCase()in s}}}};for(var c in i.open(e.method||"get",t,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(t,e,n){o.push(e=e.toLowerCase()),a.push([e,n]),s[e]=s[e]?s[e]+","+n:n})),n(u())},i.onerror=r,i.withCredentials="include"==e.credentials,e.headers)i.setRequestHeader(c,e.headers[c]);i.send(e.body||null)}))}n.d(e,{h:()=>o});var i=n(44083),o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=(0,i.R)();return(n&&n.fetch||r).apply(void 0,t)}},44083:(t,e,n)=>{"use strict";n.d(e,{R:()=>r});var r=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:null}},74939:(t,e,n)=>{"use strict";n.d(e,{jV:()=>o,ql:()=>a,wI:()=>i});var r="analytics";function i(){return window[r]}function o(t){r=t}function a(t){window[r]=t}},66548:(t,e,n)=>{"use strict";function r(t){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(e){return e.src===t}))}function i(t,e){var n=r(t);if(void 0!==n){var i=null==n?void 0:n.getAttribute("status");if("loaded"===i)return Promise.resolve(n);if("loading"===i)return new Promise((function(t,e){n.addEventListener("load",(function(){return t(n)})),n.addEventListener("error",(function(t){return e(t)}))}))}return new Promise((function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=t,o.async=!0,o.setAttribute("status","loading");for(var a=0,s=Object.entries(null!=e?e:{});a<s.length;a++){var u=s[a],c=u[0],l=u[1];o.setAttribute(c,l)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.setAttribute("status","error"),r(new Error("Failed to load ".concat(t)))};var p=window.document.querySelector("script");p?null===(i=p.parentElement)||void 0===i||i.insertBefore(o,p):window.document.head.appendChild(o)}))}function o(t){var e=r(t);return void 0!==e&&e.remove(),Promise.resolve()}n.d(e,{t:()=>o,v:()=>i})},913:(t,e,n)=>{"use strict";n.d(e,{o:()=>i});var r=n(97582);function i(t,e){var n,i=Object.entries(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,e){var n,i,o=e[0],a=e[1];return"object"==typeof a?(0,r.pi)((0,r.pi)({},t),((n={})[o]=a,n)):(0,r.pi)((0,r.pi)({},t),((i={})[o]={},i))}),{});return Object.entries(t.integrations).reduce((function(t,e){var n,o=e[0],a=e[1];return(0,r.pi)((0,r.pi)({},t),((n={})[o]=(0,r.pi)((0,r.pi)({},a),i[o]),n))}),{})}},56749:(t,e,n)=>{"use strict";n.d(e,{x:()=>i});var r=n(97582),i=function(t,e){return(0,r.mG)(void 0,void 0,void 0,(function(){var n;return(0,r.Jh)(this,(function(i){return n=function(i){return(0,r.mG)(void 0,void 0,void 0,(function(){var o;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return t(i)?(o=n,[4,e()]):[3,2];case 1:return[2,o.apply(void 0,[r.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))}},99382:(t,e,n)=>{"use strict";n.d(e,{Kg:()=>u,UH:()=>a,Vl:()=>s});var r,i=n(74939),o=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,a=function(t){var e=(0,i.wI)();e&&(e._cdn=t),r=t},s=function(){var t,e=null!=r?r:null===(t=(0,i.wI)())||void 0===t?void 0:t._cdn;if(e)return e;var n,a=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(t){var e,r=null!==(e=t.getAttribute("src"))&&void 0!==e?e:"",i=o.exec(r);i&&i[1]&&(n=i[1])})),n);return a||"https://cdn.segment.com"},u=function(){var t=s();return"".concat(t,"/next-integrations")}},65976:(t,e,n)=>{"use strict";n.d(e,{$:()=>d});var r=n(97582),i=n(10360),o=n(29784),a=n(69699),s={getItem:function(){},setItem:function(){},removeItem:function(){}};try{s=(0,a.j)()&&window.localStorage?window.localStorage:s}catch(t){console.warn("Unable to access localStorage",t)}function u(t){var e=s.getItem(t);return(e?JSON.parse(e):[]).map((function(t){return new o._(t.event,t.id)}))}function c(t){var e=s.getItem(t);return e?JSON.parse(e):{}}function l(t){s.removeItem(t)}function p(t,e,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(t,":lock"),i=s.getItem(r),o=i?JSON.parse(i):null,a=null===o||function(t){return(new Date).getTime()>t}(o);if(a)return s.setItem(r,JSON.stringify((new Date).getTime()+50)),e(),void s.removeItem(r);!a&&n<3?setTimeout((function(){p(t,e,n+1)}),50):console.error("Unable to retrieve lock")}var d=function(t){function e(e,n){var i=t.call(this,e,[])||this,o="persisted-queue:v1:".concat(n,":items"),a="persisted-queue:v1:".concat(n,":seen"),d=[],f={};return p(n,(function(){try{d=u(o),f=c(a),l(o),l(a),i.queue=(0,r.ev)((0,r.ev)([],d,!0),i.queue,!0),i.seen=(0,r.pi)((0,r.pi)({},f),i.seen)}catch(t){console.error(t)}})),window.addEventListener("pagehide",(function(){if(i.todo>0){var t=(0,r.ev)((0,r.ev)([],i.queue,!0),i.future,!0);try{p(n,(function(){!function(t,e){var n=u(t),i=(0,r.ev)((0,r.ev)([],e,!0),n,!0).reduce((function(t,e){var n;return(0,r.pi)((0,r.pi)({},t),((n={})[e.id]=e,n))}),{});s.setItem(t,JSON.stringify(Object.values(i)))}(o,t),function(t,e){var n=c(t);s.setItem(t,JSON.stringify((0,r.pi)((0,r.pi)({},n),e)))}(a,i.seen)}))}catch(t){console.error(t)}}})),i}return(0,r.ZT)(e,t),e}(i.Z)},23888:(t,e,n)=>{"use strict";n.d(e,{D:()=>i});var r=n(49969);function i(t,e){var n=new r.Facade(t,e);return"track"===t.type&&(n=new r.Track(t,e)),"identify"===t.type&&(n=new r.Identify(t,e)),"page"===t.type&&(n=new r.Page(t,e)),"alias"===t.type&&(n=new r.Alias(t,e)),"group"===t.type&&(n=new r.Group(t,e)),"screen"===t.type&&(n=new r.Screen(t,e)),Object.defineProperty(n,"obj",{value:t,writable:!0}),n}},7227:(t,e,n)=>{"use strict";n.d(e,{B:()=>r});function r(){return"npm"}},66170:(t,e,n)=>{"use strict";n.r(e),n.d(e,{applyDestinationMiddleware:()=>a,sourceMiddlewarePlugin:()=>s});var r=n(97582),i=n(30466),o=n(23888);function a(t,e,n){return(0,r.mG)(this,void 0,void 0,(function(){function i(e,n){return(0,r.mG)(this,void 0,void 0,(function(){var i,a,s;return(0,r.Jh)(this,(function(u){switch(u.label){case 0:return i=!1,a=null,[4,n({payload:(0,o.D)(e,{clone:!0,traverse:!1}),integration:t,next:function(t){i=!0,null===t&&(a=null),t&&(a=t.obj)}})];case 1:return u.sent(),i||null===a||(a.integrations=(0,r.pi)((0,r.pi)({},e.integrations),((s={})[t]=!1,s))),[2,a]}}))}))}var a,s,u,c,l;return(0,r.Jh)(this,(function(t){switch(t.label){case 0:a=(0,o.D)(e,{clone:!0,traverse:!1}).rawEvent(),s=0,u=n,t.label=1;case 1:return s<u.length?(c=u[s],[4,i(a,c)]):[3,4];case 2:if(null===(l=t.sent()))return[2,null];a=l,t.label=3;case 3:return s++,[3,1];case 4:return[2,a]}}))}))}function s(t,e){function n(n){return(0,r.mG)(this,void 0,void 0,(function(){var a;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return a=!1,[4,t({payload:(0,o.D)(n.event,{clone:!0,traverse:!1}),integrations:null!=e?e:{},next:function(t){a=!0,t&&(n.event=t.obj)}})];case 1:if(r.sent(),!a)throw new i.Y({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(t.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(t){return Promise.resolve(t)},track:n,page:n,screen:n,identify:n,alias:n,group:n}}},16025:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(53410));function o(t,e){return function(){var n=this.traits(),r=this.properties?this.properties():{};return i.default(n,"address."+t)||i.default(n,t)||(e?i.default(n,"address."+e):null)||(e?i.default(n,e):null)||i.default(r,"address."+t)||i.default(r,t)||(e?i.default(r,"address."+e):null)||(e?i.default(r,e):null)}}e.default=function(t){t.zip=o("postalCode","zip"),t.country=o("country"),t.street=o("street"),t.state=o("state"),t.city=o("city"),t.region=o("region")}},36576:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Alias=void 0;var i=r(n(35717)),o=n(40747);function a(t,e){o.Facade.call(this,t,e)}e.Alias=a,i.default(a,o.Facade),a.prototype.action=function(){return"alias"},a.prototype.type=a.prototype.action,a.prototype.previousId=function(){return this.field("previousId")||this.field("from")},a.prototype.from=a.prototype.previousId,a.prototype.userId=function(){return this.field("userId")||this.field("to")},a.prototype.to=a.prototype.userId},83948:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.clone=void 0,e.clone=function t(e){if("object"!=typeof e)return e;if("[object Object]"===Object.prototype.toString.call(e)){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=t(e[r]));return n}return Array.isArray(e)?e.map(t):e}},85655:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=void 0;var i=r(n(35717)),o=n(40747);function a(t,e){o.Facade.call(this,t,e)}e.Delete=a,i.default(a,o.Facade),a.prototype.type=function(){return"delete"}},40747:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Facade=void 0;var i=r(n(16025)),o=n(83948),a=r(n(2530)),s=r(n(18013)),u=r(n(53410)),c=r(n(28595));function l(t,e){e=e||{},this.raw=o.clone(t),"clone"in e||(e.clone=!0),e.clone&&(t=o.clone(t)),"traverse"in e||(e.traverse=!0),t.timestamp="timestamp"in t?s.default(t.timestamp):new Date,e.traverse&&c.default(t),this.opts=e,this.obj=t}e.Facade=l;var p=l.prototype;function d(t){return o.clone(t)}p.proxy=function(t){var e=t.split("."),n=this[t=e.shift()]||this.obj[t];return n?("function"==typeof n&&(n=n.call(this)||{}),0===e.length||(n=u.default(n,e.join("."))),this.opts.clone?d(n):n):n},p.field=function(t){var e=this.obj[t];return this.opts.clone?d(e):e},l.proxy=function(t){return function(){return this.proxy(t)}},l.field=function(t){return function(){return this.field(t)}},l.multi=function(t){return function(){var e=this.proxy(t+"s");if(Array.isArray(e))return e;var n=this.proxy(t);return n&&(n=[this.opts.clone?o.clone(n):n]),n||[]}},l.one=function(t){return function(){var e=this.proxy(t);if(e)return e;var n=this.proxy(t+"s");return Array.isArray(n)?n[0]:void 0}},p.json=function(){var t=this.opts.clone?o.clone(this.obj):this.obj;return this.type&&(t.type=this.type()),t},p.rawEvent=function(){return this.raw},p.options=function(t){var e=this.obj.options||this.obj.context||{},n=this.opts.clone?o.clone(e):e;if(!t)return n;if(this.enabled(t)){var r=this.integrations(),i=r[t]||u.default(r,t);return"object"!=typeof i&&(i=u.default(this.options(),t)),"object"==typeof i?i:{}}},p.context=p.options,p.enabled=function(t){var e=this.proxy("options.providers.all");"boolean"!=typeof e&&(e=this.proxy("options.all")),"boolean"!=typeof e&&(e=this.proxy("integrations.all")),"boolean"!=typeof e&&(e=!0);var n=e&&a.default(t),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(t)&&(n=r.providers[t]),r.hasOwnProperty(t)){var i=r[t];n="boolean"!=typeof i||i}return!!n},p.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},p.active=function(){var t=this.proxy("options.active");return null==t&&(t=!0),t},p.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},p.sessionId=p.anonymousId,p.groupId=l.proxy("options.groupId"),p.traits=function(t){var e=this.proxy("options.traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==i)continue;e[t[r]]=i,delete e[r]}return e},p.library=function(){var t=this.proxy("options.library");return t?"string"==typeof t?{name:t,version:null}:t:{name:"unknown",version:null}},p.device=function(){var t=this.proxy("context.device");"object"==typeof t&&null!==t||(t={});var e=this.library().name;return t.type||(e.indexOf("ios")>-1&&(t.type="ios"),e.indexOf("android")>-1&&(t.type="android")),t},p.userAgent=l.proxy("context.userAgent"),p.timezone=l.proxy("context.timezone"),p.timestamp=l.field("timestamp"),p.channel=l.field("channel"),p.ip=l.proxy("context.ip"),p.userId=l.field("userId"),i.default(p)},63789:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Group=void 0;var i=r(n(35717)),o=r(n(66243)),a=r(n(18013)),s=n(40747);function u(t,e){s.Facade.call(this,t,e)}e.Group=u,i.default(u,s.Facade);var c=u.prototype;c.action=function(){return"group"},c.type=c.action,c.groupId=s.Facade.field("groupId"),c.created=function(){var t=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(t)return a.default(t)},c.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.groupId();return o.default(e)?e:void 0},c.traits=function(t){var e=this.properties(),n=this.groupId();for(var r in t=t||{},n&&(e.id=n),t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=null==this[r]?this.proxy("traits."+r):this[r]();if(null==i)continue;e[t[r]]=i,delete e[r]}return e},c.name=s.Facade.proxy("traits.name"),c.industry=s.Facade.proxy("traits.industry"),c.employees=s.Facade.proxy("traits.employees"),c.properties=function(){return this.field("traits")||this.field("properties")||{}}},98649:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Identify=void 0;var i=n(40747),o=r(n(53410)),a=r(n(35717)),s=r(n(66243)),u=r(n(18013)),c=function(t){return t.trim()};function l(t,e){i.Facade.call(this,t,e)}e.Identify=l,a.default(l,i.Facade);var p=l.prototype;p.action=function(){return"identify"},p.type=p.action,p.traits=function(t){var e=this.field("traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,r!==t[r]&&delete e[r])}return e},p.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.userId();return s.default(e)?e:void 0},p.created=function(){var t=this.proxy("traits.created")||this.proxy("traits.createdAt");if(t)return u.default(t)},p.companyCreated=function(){var t=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(t)return u.default(t)},p.companyName=function(){return this.proxy("traits.company.name")},p.name=function(){var t=this.proxy("traits.name");if("string"==typeof t)return c(t);var e=this.firstName(),n=this.lastName();return e&&n?c(e+" "+n):void 0},p.firstName=function(){var t=this.proxy("traits.firstName");if("string"==typeof t)return c(t);var e=this.proxy("traits.name");return"string"==typeof e?c(e).split(" ")[0]:void 0},p.lastName=function(){var t=this.proxy("traits.lastName");if("string"==typeof t)return c(t);var e=this.proxy("traits.name");if("string"==typeof e){var n=c(e).indexOf(" ");if(-1!==n)return c(e.substr(n+1))}},p.uid=function(){return this.userId()||this.username()||this.email()},p.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},p.age=function(){var t=this.birthday(),e=o.default(this.traits(),"age");return null!=e?e:t instanceof Date?(new Date).getFullYear()-t.getFullYear():void 0},p.avatar=function(){var t=this.traits();return o.default(t,"avatar")||o.default(t,"photoUrl")||o.default(t,"avatarUrl")},p.position=function(){var t=this.traits();return o.default(t,"position")||o.default(t,"jobTitle")},p.username=i.Facade.proxy("traits.username"),p.website=i.Facade.one("traits.website"),p.websites=i.Facade.multi("traits.website"),p.phone=i.Facade.one("traits.phone"),p.phones=i.Facade.multi("traits.phone"),p.address=i.Facade.proxy("traits.address"),p.gender=i.Facade.proxy("traits.gender"),p.birthday=i.Facade.proxy("traits.birthday")},49969:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var i=n(40747);Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return i.Facade}});var o=n(36576);Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return o.Alias}});var a=n(63789);Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return a.Group}});var s=n(98649);Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return s.Identify}});var u=n(27286);Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return u.Track}});var c=n(83070);Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return c.Page}});var l=n(69860);Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return l.Screen}});var p=n(85655);Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return p.Delete}}),e.default=r(r({},i.Facade),{Alias:o.Alias,Group:a.Group,Identify:s.Identify,Track:u.Track,Page:c.Page,Screen:l.Screen,Delete:p.Delete})},66243:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=/.+\@.+\..+/;e.default=function(t){return n.test(t)}},2530:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={Salesforce:!0};e.default=function(t){return!n[t]}},83070:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Page=void 0;var i=r(n(35717)),o=n(40747),a=n(27286),s=r(n(66243));function u(t,e){o.Facade.call(this,t,e)}e.Page=u,i.default(u,o.Facade);var c=u.prototype;c.action=function(){return"page"},c.type=c.action,c.category=o.Facade.field("category"),c.name=o.Facade.field("name"),c.title=o.Facade.proxy("properties.title"),c.path=o.Facade.proxy("properties.path"),c.url=o.Facade.proxy("properties.url"),c.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},c.properties=function(t){var e=this.field("properties")||{},n=this.category(),r=this.name();for(var i in t=t||{},n&&(e.category=n),r&&(e.name=r),t)if(Object.prototype.hasOwnProperty.call(t,i)){var o=null==this[i]?this.proxy("properties."+i):this[i]();if(null==o)continue;e[t[i]]=o,i!==t[i]&&delete e[i]}return e},c.email=function(){var t=this.proxy("context.traits.email")||this.proxy("properties.email");if(t)return t;var e=this.userId();return s.default(e)?e:void 0},c.fullName=function(){var t=this.category(),e=this.name();return e&&t?t+" "+e:e},c.event=function(t){return t?"Viewed "+t+" Page":"Loaded a Page"},c.track=function(t){var e=this.json();return e.event=this.event(t),e.timestamp=this.timestamp(),e.properties=this.properties(),new a.Track(e,this.opts)}},69860:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Screen=void 0;var i=r(n(35717)),o=n(83070),a=n(27286);function s(t,e){o.Page.call(this,t,e)}e.Screen=s,i.default(s,o.Page),s.prototype.action=function(){return"screen"},s.prototype.type=s.prototype.action,s.prototype.event=function(t){return t?"Viewed "+t+" Screen":"Loaded a Screen"},s.prototype.track=function(t){var e=this.json();return e.event=this.event(t),e.timestamp=this.timestamp(),e.properties=this.properties(),new a.Track(e,this.opts)}},27286:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Track=void 0;var i=r(n(35717)),o=n(40747),a=n(98649),s=r(n(66243)),u=r(n(53410));function c(t,e){o.Facade.call(this,t,e)}e.Track=c,i.default(c,o.Facade);var l=c.prototype;l.action=function(){return"track"},l.type=l.action,l.event=o.Facade.field("event"),l.value=o.Facade.proxy("properties.value"),l.category=o.Facade.proxy("properties.category"),l.id=o.Facade.proxy("properties.id"),l.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},l.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},l.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},l.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},l.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},l.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},l.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},l.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},l.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},l.sku=o.Facade.proxy("properties.sku"),l.tax=o.Facade.proxy("properties.tax"),l.name=o.Facade.proxy("properties.name"),l.price=o.Facade.proxy("properties.price"),l.total=o.Facade.proxy("properties.total"),l.repeat=o.Facade.proxy("properties.repeat"),l.coupon=o.Facade.proxy("properties.coupon"),l.shipping=o.Facade.proxy("properties.shipping"),l.discount=o.Facade.proxy("properties.discount"),l.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},l.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},l.description=o.Facade.proxy("properties.description"),l.plan=o.Facade.proxy("properties.plan"),l.subtotal=function(){var t=u.default(this.properties(),"subtotal"),e=this.total()||this.revenue();if(t)return t;if(!e)return 0;if(this.total()){var n=this.tax();n&&(e-=n),(n=this.shipping())&&(e-=n),(n=this.discount())&&(e+=n)}return e},l.products=function(){var t=this.properties(),e=u.default(t,"products");return Array.isArray(e)?e.filter((function(t){return null!==t})):[]},l.quantity=function(){return(this.obj.properties||{}).quantity||1},l.currency=function(){return(this.obj.properties||{}).currency||"USD"},l.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},l.query=o.Facade.proxy("options.query"),l.properties=function(t){var e=this.field("properties")||{};for(var n in t=t||{})if(Object.prototype.hasOwnProperty.call(t,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;e[t[n]]=r,delete e[n]}return e},l.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},l.email=function(){var t=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(t)return t;var e=this.userId();return s.default(e)?e:void 0},l.revenue=function(){var t=this.proxy("properties.revenue"),e=this.event();return!t&&e&&e.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(t=this.proxy("properties.total")),function(t){if(t){if("number"==typeof t)return t;if("string"==typeof t)return t=t.replace(/\$/g,""),t=parseFloat(t),isNaN(t)?void 0:t}}(t)},l.cents=function(){var t=this.revenue();return"number"!=typeof t?this.value()||0:100*t},l.identify=function(){var t=this.json();return t.traits=this.traits(),new a.Identify(t,this.opts)}},28595:(t,e,n)=>{"use strict";var r=n(28336);t.exports=function t(e,n){return void 0===n&&(n=!0),e&&"object"==typeof e?function(e,n){return Object.keys(e).forEach((function(r){e[r]=t(e[r],n)})),e}(e,n):Array.isArray(e)?function(e,n){return e.forEach((function(r,i){e[i]=t(r,n)})),e}(e,n):r.is(e,n)?r.parse(e):e}},28336:(t,e)=>{"use strict";var n=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;e.parse=function(t){var e=[1,5,6,7,11,12],r=n.exec(t),i=0;if(!r)return new Date(t);for(var o,a=0;o=e[a];a++)r[o]=parseInt(r[o],10)||0;r[2]=parseInt(r[2],10)||1,r[3]=parseInt(r[3],10)||1,r[2]--,r[8]=r[8]?(r[8]+"00").substring(0,3):0," "===r[4]?i=(new Date).getTimezoneOffset():"Z"!==r[9]&&r[10]&&(i=60*r[11]+r[12],"+"===r[10]&&(i=0-i));var s=Date.UTC(r[1],r[2],r[3],r[5],r[6]+i,r[7],r[8]);return new Date(s)},e.is=function(t,e){return"string"==typeof t&&(!e||!1!==/^\d{4}-\d{2}-\d{2}/.test(t))&&n.test(t)}},35717:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},18013:(t,e,n)=>{"use strict";var r=n(28336),i=n(18040),o=n(24085),a=Object.prototype.toString;t.exports=function(t){return e=t,"[object Date]"===a.call(e)?t:function(t){return"[object Number]"===a.call(t)}(t)?new Date((n=t)<315576e5?1e3*n:n):r.is(t)?r.parse(t):i.is(t)?i.parse(t):o.is(t)?o.parse(t):new Date(t);var e,n}},18040:(t,e)=>{"use strict";var n=/\d{13}/;e.is=function(t){return n.test(t)},e.parse=function(t){return t=parseInt(t,10),new Date(t)}},24085:(t,e)=>{"use strict";var n=/\d{10}/;e.is=function(t){return n.test(t)},e.parse=function(t){var e=1e3*parseInt(t,10);return new Date(e)}},53410:t=>{function e(t){return function(e,n,r,o){var a,s=o&&function(t){return"function"==typeof t}(o.normalizer)?o.normalizer:i;n=s(n);for(var u=!1;!u;)c();function c(){for(a in e){var t=s(a);if(0===n.indexOf(t)){var r=n.substr(t.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=e[a];return null==i?void(u=!0):n.length?void(e=i):void(u=!0)}}}a=void 0,u=!0}if(a)return null==e?e:t(e,a,r)}}function n(t,e){return t.hasOwnProperty(e)&&delete t[e],t}function r(t,e,n){return t.hasOwnProperty(e)&&(t[e]=n),t}function i(t){return t.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}t.exports=e((function(t,e){if(t.hasOwnProperty(e))return t[e]})),t.exports.find=t.exports,t.exports.replace=function(t,n,i,o){return e(r).call(this,t,n,i,o),t},t.exports.del=function(t,r,i){return e(n).call(this,t,r,null,i),t}},59108:(t,e,n)=>{"use strict";n.d(e,{v4:()=>a});for(var r,i=256,o=[];i--;)o[i]=(i+256).toString(16).substring(1);function a(){var t,e=0,n="";if(!r||i+16>256){for(r=Array(e=256);e--;)r[e]=256*Math.random()|0;e=i=0}for(;e<16;e++)t=r[i+e],n+=6==e?o[15&t|64]:8==e?o[63&t|128]:o[t],1&e&&e>1&&e<11&&(n+="-");return i++,n}},96475:(t,e,n)=>{"use strict";function r(t,e,n){e.split&&(e=e.split("."));for(var r,i,o=0,a=e.length,s=t;o<a&&"__proto__"!=(i=""+e[o++])&&"constructor"!==i&&"prototype"!==i;)s=s[i]=o===a?n:typeof(r=s[i])==typeof e?r:0*e[o]!=0||~(""+e[o]).indexOf(".")?{}:[]}n.d(e,{N:()=>r})},97582:(t,e,n)=>{"use strict";n.d(e,{Jh:()=>u,ZT:()=>i,_T:()=>a,ev:()=>c,mG:()=>s,pi:()=>o});var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function u(t,e){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function c(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError}}]);
@@ -0,0 +1 @@
1
+ /*! js-cookie v3.0.1 | MIT */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see tsub-middleware.4d4d00320fa7aa6a97cc.js.LICENSE.txt */
2
+ "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[604],{37122:(t,r,n)=>{n.r(r),n.d(r,{tsubMiddleware:()=>o});var e=n(44922),o=function(t){return function(r){var n=r.payload,o=r.integration,i=r.next;new e.Store(t).getRulesByDestinationName(o).forEach((function(t){for(var r=t.matchers,o=t.transformers,u=0;u<r.length;u++)if(e.matches(n.obj,r[u])&&(n.obj=e.transform(n.obj,o[u]),null===n.obj))return i(null)})),i(n)}}},44922:t=>{self,t.exports=function(){var t={2870:function(t,r,n){var e=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.Store=r.matches=r.transform=void 0;var o=n(4303);Object.defineProperty(r,"transform",{enumerable:!0,get:function(){return e(o).default}});var i=n(2370);Object.defineProperty(r,"matches",{enumerable:!0,get:function(){return e(i).default}});var u=n(1444);Object.defineProperty(r,"Store",{enumerable:!0,get:function(){return e(u).default}})},2370:function(t,r,n){var e=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=e(n(7843));function i(t,r){if(!Array.isArray(t))return!0===u(t,r);var n,e,o,s,p=t[0];switch(p){case"!":return!i(t[1],r);case"or":for(var l=1;l<t.length;l++)if(i(t[l],r))return!0;return!1;case"and":for(l=1;l<t.length;l++)if(!i(t[l],r))return!1;return!0;case"=":case"!=":return function(t,r,n,e){switch(a(t)&&(t=i(t,e)),a(r)&&(r=i(r,e)),"object"==typeof t&&"object"==typeof r&&(t=JSON.stringify(t),r=JSON.stringify(r)),n){case"=":return t===r;case"!=":return t!==r;default:throw new Error("Invalid operator in compareItems: ".concat(n))}}(u(t[1],r),u(t[2],r),p,r);case"<=":case"<":case">":case">=":return function(t,r,n,e){if(a(t)&&(t=i(t,e)),a(r)&&(r=i(r,e)),"number"!=typeof t||"number"!=typeof r)return!1;switch(n){case"<=":return t<=r;case">=":return t>=r;case"<":return t<r;case">":return t>r;default:throw new Error("Invalid operator in compareNumbers: ".concat(n))}}(u(t[1],r),u(t[2],r),p,r);case"in":return function(t,r,n){return void 0!==r.find((function(r){return u(r,n)===t}))}(u(t[1],r),u(t[2],r),r);case"contains":return o=u(t[1],r),s=u(t[2],r),"string"==typeof o&&"string"==typeof s&&-1!==o.indexOf(s);case"match":return n=u(t[1],r),e=u(t[2],r),"string"==typeof n&&"string"==typeof e&&function(t,r){var n,e;t:for(;t.length>0;){var o,i;if(o=(n=c(t)).star,i=n.chunk,t=n.pattern,o&&""===i)return!0;var u=f(i,r),a=u.t,s=u.ok,p=u.err;if(p)return!1;if(!s||!(0===a.length||t.length>0)){if(o)for(var l=0;l<r.length;l++){if(a=(e=f(i,r.slice(l+1))).t,s=e.ok,p=e.err,s){if(0===t.length&&a.length>0)continue;r=a;continue t}if(p)return!1}return!1}r=a}return 0===r.length}(e,n);case"lowercase":var v=u(t[1],r);return"string"!=typeof v?null:v.toLowerCase();case"typeof":return typeof u(t[1],r);case"length":return function(t){return null===t?0:Array.isArray(t)||"string"==typeof t?t.length:NaN}(u(t[1],r));default:throw new Error("FQL IR could not evaluate for token: ".concat(p))}}function u(t,r){return Array.isArray(t)?t:"object"==typeof t?t.value:(0,o.default)(r,t)}function a(t){return!!Array.isArray(t)&&(("lowercase"===t[0]||"length"===t[0]||"typeof"===t[0])&&2===t.length||("contains"===t[0]||"match"===t[0])&&3===t.length)}function c(t){for(var r={star:!1,chunk:"",pattern:""};t.length>0&&"*"===t[0];)t=t.slice(1),r.star=!0;var n,e=!1;t:for(n=0;n<t.length;n++)switch(t[n]){case"\\":n+1<t.length&&n++;break;case"[":e=!0;break;case"]":e=!1;break;case"*":if(!e)break t}return r.chunk=t.slice(0,n),r.pattern=t.slice(n),r}function f(t,r){for(var n,e,o={t:"",ok:!1,err:!1};t.length>0;){if(0===r.length)return o;switch(t[0]){case"[":var i=r[0];r=r.slice(1);var u=!0;(t=t.slice(1)).length>0&&"^"===t[0]&&(u=!1,t=t.slice(1));for(var a=!1,c=0;;){if(t.length>0&&"]"===t[0]&&c>0){t=t.slice(1);break}var f,p="";if(f=(n=s(t)).char,t=n.newChunk,n.err)return o;if(p=f,"-"===t[0]&&(p=(e=s(t.slice(1))).char,t=e.newChunk,e.err))return o;f<=i&&i<=p&&(a=!0),c++}if(a!==u)return o;break;case"?":r=r.slice(1),t=t.slice(1);break;case"\\":if(0===(t=t.slice(1)).length)return o.err=!0,o;default:if(t[0]!==r[0])return o;r=r.slice(1),t=t.slice(1)}}return o.t=r,o.ok=!0,o.err=!1,o}function s(t){var r={char:"",newChunk:"",err:!1};return 0===t.length||"-"===t[0]||"]"===t[0]||"\\"===t[0]&&0===(t=t.slice(1)).length?(r.err=!0,r):(r.char=t[0],r.newChunk=t.slice(1),0===r.newChunk.length&&(r.err=!0),r)}r.default=function(t,r){if(!r)throw new Error("No matcher supplied!");switch(r.type){case"all":return!0;case"fql":return function(t,r){if(!t)return!1;try{t=JSON.parse(t)}catch(r){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(t,'": ').concat(r))}var n=i(t,r);return"boolean"==typeof n&&n}(r.ir,t);default:throw new Error("Matcher of type ".concat(r.type," unsupported."))}}},1444:function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function t(t){this.rules=[],this.rules=t||[]}return t.prototype.getRulesByDestinationName=function(t){for(var r=[],n=0,e=this.rules;n<e.length;n++){var o=e[n];o.destinationName!==t&&void 0!==o.destinationName||r.push(o)}return r},t}();r.default=n},4303:function(t,r,n){var e=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=e(n(374)),i=e(n(7843)),u=e(n(5500)),a=n(9014),c=n(4966);function f(t,r){p(t,r.drop,(function(t,r){r.forEach((function(r){return delete t[r]}))}))}function s(t,r){p(t,r.allow,(function(t,r){Object.keys(t).forEach((function(n){r.includes(n)||delete t[n]}))}))}function p(t,r,n){Object.entries(r).forEach((function(r){var e=r[0],o=r[1],u=function(t){"object"==typeof t&&null!==t&&n(t,o)},a=""===e?t:(0,i.default)(t,e);Array.isArray(a)?a.forEach(u):u(a)}))}function l(t,r){var n=JSON.parse(JSON.stringify(t));for(var e in r.map)if(r.map.hasOwnProperty(e)){var o=r.map[e],u=e.split("."),f=void 0;if(u.length>1?(u.pop(),f=(0,i.default)(n,u.join("."))):f=t,"object"==typeof f){if(o.copy){var s=(0,i.default)(n,o.copy);void 0!==s&&(0,a.dset)(t,e,s)}else if(o.move){var p=(0,i.default)(n,o.move);void 0!==p&&(0,a.dset)(t,e,p),(0,c.unset)(t,o.move)}else o.hasOwnProperty("set")&&(0,a.dset)(t,e,o.set);if(o.to_string){var l=(0,i.default)(t,e);if("string"==typeof l||"object"==typeof l&&null!==l)continue;void 0!==l?(0,a.dset)(t,e,JSON.stringify(l)):(0,a.dset)(t,e,"undefined")}}}}function v(t,r){return!(r.sample.percent<=0)&&(r.sample.percent>=1||(r.sample.path?function(t,r){var n=(0,i.default)(t,r.sample.path),e=(0,o.default)(JSON.stringify(n)),a=-64,c=[];y(e.slice(0,8),c);for(var f=0,s=0;s<64&&1!==c[s];s++)f++;if(0!==f){var p=[];y(e.slice(9,16),p),a-=f,c.splice(0,f),p.splice(64-f),c=c.concat(p)}return c[63]=0===c[63]?1:0,(0,u.default)(parseInt(c.join(""),2),a)<r.sample.percent}(t,r):(n=r.sample.percent,Math.random()<=n)));var n}function y(t,r){for(var n=0;n<8;n++)for(var e=t[n],o=128;o>=1;o/=2)e-o>=0?(e-=o,r.push(1)):r.push(0)}r.default=function(t,r){for(var n=t,e=0,o=r;e<o.length;e++){var i=o[e];switch(i.type){case"drop":return null;case"drop_properties":f(n,i.config);break;case"allow_properties":s(n,i.config);break;case"sample_event":if(v(n,i.config))break;return null;case"map_properties":l(n,i.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(i.type,'" is unsupported.'))}}return n}},4966:function(t,r,n){var e=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.unset=void 0;var o=e(n(7843));r.unset=function(t,r){if((0,o.default)(t,r)){for(var n=r.split("."),e=n.pop();n.length&&"\\"===n[n.length-1].slice(-1);)e=n.pop().slice(0,-1)+"."+e;for(;n.length;)t=t[r=n.shift()];return delete t[e]}return!0}},9014:function(t,r){r.dset=function(t,r,n){r.split&&(r=r.split("."));for(var e,o,i=0,u=r.length,a=t;i<u&&"__proto__"!==(o=r[i++])&&"constructor"!==o&&"prototype"!==o;)a=a[o]=i===u?n:typeof(e=a[o])==typeof r?e:0*r[i]!=0||~(""+r[i]).indexOf(".")?{}:[]}},3304:function(t){var r="function"==typeof Float64Array?Float64Array:void 0;t.exports=r},7382:function(t,r,n){var e,o=n(5569),i=n(3304),u=n(8482);e=o()?i:u,t.exports=e},8482:function(t){t.exports=function(){throw new Error("not implemented")}},6322:function(t,r,n){var e,o=n(2508),i=n(5679),u=n(882);e=o()?i:u,t.exports=e},882:function(t){t.exports=function(){throw new Error("not implemented")}},5679:function(t){var r="function"==typeof Uint16Array?Uint16Array:void 0;t.exports=r},4773:function(t,r,n){var e,o=n(9773),i=n(3004),u=n(3078);e=o()?i:u,t.exports=e},3078:function(t){t.exports=function(){throw new Error("not implemented")}},3004:function(t){var r="function"==typeof Uint32Array?Uint32Array:void 0;t.exports=r},7980:function(t,r,n){var e,o=n(8114),i=n(6737),u=n(3357);e=o()?i:u,t.exports=e},3357:function(t){t.exports=function(){throw new Error("not implemented")}},6737:function(t){var r="function"==typeof Uint8Array?Uint8Array:void 0;t.exports=r},2684:function(t){var r="function"==typeof Float64Array?Float64Array:null;t.exports=r},5569:function(t,r,n){var e=n(3876);t.exports=e},3876:function(t,r,n){var e=n(1448),o=n(2684);t.exports=function(){var t,r;if("function"!=typeof o)return!1;try{r=new o([1,3.14,-3.14,NaN]),t=e(r)&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){t=!1}return t}},9048:function(t,r,n){var e=n(3763);t.exports=e},3763:function(t){var r=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&r.call(t,n)}},7009:function(t,r,n){var e=n(6784);t.exports=e},6784:function(t){t.exports=function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}},3123:function(t,r,n){var e=n(8481);t.exports=e},8481:function(t,r,n){var e=n(7009)();t.exports=function(){return e&&"symbol"==typeof Symbol.toStringTag}},2508:function(t,r,n){var e=n(3403);t.exports=e},3403:function(t,r,n){var e=n(768),o=n(9668),i=n(187);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=e(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},187:function(t){var r="function"==typeof Uint16Array?Uint16Array:null;t.exports=r},9773:function(t,r,n){var e=n(2822);t.exports=e},2822:function(t,r,n){var e=n(2744),o=n(3899),i=n(746);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=e(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},746:function(t){var r="function"==typeof Uint32Array?Uint32Array:null;t.exports=r},8114:function(t,r,n){var e=n(8066);t.exports=e},8066:function(t,r,n){var e=n(8279),o=n(3443),i=n(2731);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=e(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},2731:function(t){var r="function"==typeof Uint8Array?Uint8Array:null;t.exports=r},1448:function(t,r,n){var e=n(1453);t.exports=e},1453:function(t,r,n){var e=n(6208),o="function"==typeof Float64Array;t.exports=function(t){return o&&t instanceof Float64Array||"[object Float64Array]"===e(t)}},9331:function(t,r,n){var e=n(7980),o={uint16:n(6322),uint8:e};t.exports=o},5902:function(t,r,n){var e=n(4106);t.exports=e},4106:function(t,r,n){var e,o,i=n(9331);(o=new i.uint16(1))[0]=4660,e=52===new i.uint8(o.buffer)[0],t.exports=e},768:function(t,r,n){var e=n(3823);t.exports=e},3823:function(t,r,n){var e=n(6208),o="function"==typeof Uint16Array;t.exports=function(t){return o&&t instanceof Uint16Array||"[object Uint16Array]"===e(t)}},2744:function(t,r,n){var e=n(2326);t.exports=e},2326:function(t,r,n){var e=n(6208),o="function"==typeof Uint32Array;t.exports=function(t){return o&&t instanceof Uint32Array||"[object Uint32Array]"===e(t)}},8279:function(t,r,n){var e=n(208);t.exports=e},208:function(t,r,n){var e=n(6208),o="function"==typeof Uint8Array;t.exports=function(t){return o&&t instanceof Uint8Array||"[object Uint8Array]"===e(t)}},6315:function(t){t.exports=1023},1686:function(t){t.exports=2147483647},3105:function(t){t.exports=2146435072},3449:function(t){t.exports=2147483648},6988:function(t){t.exports=-1023},9777:function(t){t.exports=1023},3690:function(t){t.exports=-1074},2918:function(t,r,n){var e=n(4772).NEGATIVE_INFINITY;t.exports=e},4165:function(t){var r=Number.POSITIVE_INFINITY;t.exports=r},6488:function(t){t.exports=22250738585072014e-324},9668:function(t){t.exports=65535},3899:function(t){t.exports=4294967295},3443:function(t){t.exports=255},7011:function(t,r,n){var e=n(812);t.exports=e},812:function(t,r,n){var e=n(4165),o=n(2918);t.exports=function(t){return t===e||t===o}},1883:function(t,r,n){var e=n(1797);t.exports=e},1797:function(t){t.exports=function(t){return t!=t}},513:function(t,r,n){var e=n(5760);t.exports=e},5760:function(t){t.exports=function(t){return Math.abs(t)}},5848:function(t,r,n){var e=n(677);t.exports=e},677:function(t,r,n){var e=n(3449),o=n(1686),i=n(7838),u=n(1921),a=n(2490),c=[0,0];t.exports=function(t,r){var n,f;return i.assign(t,c,1,0),n=c[0],n&=o,f=u(r),a(n|=f&=e,c[1])}},5500:function(t,r,n){var e=n(8397);t.exports=e},8397:function(t,r,n){var e=n(4165),o=n(2918),i=n(6315),u=n(9777),a=n(6988),c=n(3690),f=n(1883),s=n(7011),p=n(5848),l=n(4948),v=n(8478),y=n(7838),h=n(2490),d=[0,0],x=[0,0];t.exports=function(t,r){var n,b;return 0===t||f(t)||s(t)?t:(l(d,t),r+=d[1],(r+=v(t=d[0]))<c?p(0,t):r>u?t<0?o:e:(r<=a?(r+=52,b=2220446049250313e-31):b=1,y(x,t),n=x[0],n&=2148532223,b*h(n|=r+i<<20,x[1])))}},4772:function(t,r,n){var e=n(7548);t.exports=e},7548:function(t){t.exports=Number},8478:function(t,r,n){var e=n(4500);t.exports=e},4500:function(t,r,n){var e=n(1921),o=n(3105),i=n(6315);t.exports=function(t){var r=e(t);return(r=(r&o)>>>20)-i|0}},2490:function(t,r,n){var e=n(9639);t.exports=e},4445:function(t,r,n){var e,o,i;!0===n(5902)?(o=1,i=0):(o=0,i=1),e={HIGH:o,LOW:i},t.exports=e},9639:function(t,r,n){var e=n(4773),o=n(7382),i=n(4445),u=new o(1),a=new e(u.buffer),c=i.HIGH,f=i.LOW;t.exports=function(t,r){return a[c]=t,a[f]=r,u[0]}},5646:function(t,r,n){var e;e=!0===n(5902)?1:0,t.exports=e},1921:function(t,r,n){var e=n(6285);t.exports=e},6285:function(t,r,n){var e=n(4773),o=n(7382),i=n(5646),u=new o(1),a=new e(u.buffer);t.exports=function(t){return u[0]=t,a[i]}},9024:function(t,r,n){var e=n(6488),o=n(7011),i=n(1883),u=n(513);t.exports=function(t,r,n,a){return i(t)||o(t)?(r[a]=t,r[a+n]=0,r):0!==t&&u(t)<e?(r[a]=4503599627370496*t,r[a+n]=-52,r):(r[a]=t,r[a+n]=0,r)}},4948:function(t,r,n){var e=n(7576),o=n(9422);e(o,"assign",n(9024)),t.exports=o},9422:function(t,r,n){var e=n(9024);t.exports=function(t){return e(t,[0,0],1,0)}},5239:function(t,r,n){var e=n(4773),o=n(7382),i=n(5782),u=new o(1),a=new e(u.buffer),c=i.HIGH,f=i.LOW;t.exports=function(t,r,n,e){return u[0]=t,r[e]=a[c],r[e+n]=a[f],r}},7838:function(t,r,n){var e=n(7576),o=n(4010);e(o,"assign",n(5239)),t.exports=o},5782:function(t,r,n){var e,o,i;!0===n(5902)?(o=1,i=0):(o=0,i=1),e={HIGH:o,LOW:i},t.exports=e},4010:function(t,r,n){var e=n(5239);t.exports=function(t){return e(t,[0,0],1,0)}},7576:function(t,r,n){var e=n(7063);t.exports=e},7063:function(t,r,n){var e=n(6691);t.exports=function(t,r,n){e(t,r,{configurable:!1,enumerable:!1,writable:!1,value:n})}},2073:function(t){var r=Object.defineProperty;t.exports=r},1680:function(t){var r="function"==typeof Object.defineProperty?Object.defineProperty:null;t.exports=r},1471:function(t,r,n){var e=n(1680);t.exports=function(){try{return e({},"x",{}),!0}catch(t){return!1}}},6691:function(t,r,n){var e,o=n(1471),i=n(2073),u=n(1309);e=o()?i:u,t.exports=e},1309:function(t){var r=Object.prototype,n=r.toString,e=r.__defineGetter__,o=r.__defineSetter__,i=r.__lookupGetter__,u=r.__lookupSetter__;t.exports=function(t,a,c){var f,s,p,l;if("object"!=typeof t||null===t||"[object Array]"===n.call(t))throw new TypeError("invalid argument. First argument must be an object. Value: `"+t+"`.");if("object"!=typeof c||null===c||"[object Array]"===n.call(c))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+c+"`.");if((s="value"in c)&&(i.call(t,a)||u.call(t,a)?(f=t.__proto__,t.__proto__=r,delete t[a],t[a]=c.value,t.__proto__=f):t[a]=c.value),p="get"in c,l="set"in c,s&&(p||l))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return p&&e&&e.call(t,a,c.get),l&&o&&o.call(t,a,c.set),t}},6208:function(t,r,n){var e,o=n(3123),i=n(7407),u=n(4210);e=o()?u:i,t.exports=e},7407:function(t,r,n){var e=n(173);t.exports=function(t){return e.call(t)}},4210:function(t,r,n){var e=n(9048),o=n(1403),i=n(173);t.exports=function(t){var r,n,u;if(null==t)return i.call(t);n=t[o],r=e(t,o);try{t[o]=void 0}catch(r){return i.call(t)}return u=i.call(t),r?t[o]=n:delete t[o],u}},173:function(t){var r=Object.prototype.toString;t.exports=r},1403:function(t){var r="function"==typeof Symbol?Symbol.toStringTag:"";t.exports=r},7843:function(t){t.exports=function(t,r,n,e,o){for(r=r.split?r.split("."):r,e=0;e<r.length;e++)t=t?t[r[e]]:o;return t===o?n:t}},374:function(t,r,n){n.r(r),n.d(r,{default:function(){return i}});for(var e=[],o=0;o<64;)e[o]=0|4294967296*Math.sin(++o%Math.PI);function i(t){var r,n,i,u=[r=1732584193,n=4023233417,~r,~n],a=[],c=unescape(encodeURI(t))+"€",f=c.length;for(t=--f/4+2|15,a[--t]=8*f;~f;)a[f>>2]|=c.charCodeAt(f)<<8*f--;for(o=c=0;o<t;o+=16){for(f=u;c<64;f=[i=f[3],r+((i=f[0]+[r&n|~r&i,i&r|~i&n,r^n^i,n^(r|~i)][f=c>>4]+e[c]+~~a[o|15&[c,5*c+1,3*c+5,7*c][f]])<<(f=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*f+c++%4])|i>>>-f),r,n])r=0|f[1],n=f[2];for(c=4;c;)u[--c]+=f[c]}for(t="";c<32;)t+=(u[c>>3]>>4*(1^c++)&15).toString(16);return t}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e].call(i.exports,i,i.exports,n),i.exports}return n.d=function(t,r){for(var e in r)n.o(r,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},n.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(2870)}()}}]);
@@ -0,0 +1 @@
1
+ /*! For license information please see tsub.js.LICENSE.txt */
@@ -0,0 +1 @@
1
+ (this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[461],{75933:(t,n,i)=>{var e;!function(){function o(t,n,i){return t.call.apply(t.bind,arguments)}function a(t,n,i){if(!t)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var i=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(i,e),t.apply(n,i)}}return function(){return t.apply(n,arguments)}}function s(t,n,i){return(s=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?o:a).apply(null,arguments)}var r=Date.now||function(){return+new Date};function c(t,n){this.a=t,this.o=n||t,this.c=this.o.document}var h=!!window.FontFace;function f(t,n,i,e){if(n=t.c.createElement(n),i)for(var o in i)i.hasOwnProperty(o)&&("style"==o?n.style.cssText=i[o]:n.setAttribute(o,i[o]));return e&&n.appendChild(t.c.createTextNode(e)),n}function l(t,n,i){(t=t.c.getElementsByTagName(n)[0])||(t=document.documentElement),t.insertBefore(i,t.lastChild)}function u(t){t.parentNode&&t.parentNode.removeChild(t)}function p(t,n,i){n=n||[],i=i||[];for(var e=t.className.split(/\s+/),o=0;o<n.length;o+=1){for(var a=!1,s=0;s<e.length;s+=1)if(n[o]===e[s]){a=!0;break}a||e.push(n[o])}for(n=[],o=0;o<e.length;o+=1){for(a=!1,s=0;s<i.length;s+=1)if(e[o]===i[s]){a=!0;break}a||n.push(e[o])}t.className=n.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function g(t,n){for(var i=t.className.split(/\s+/),e=0,o=i.length;e<o;e++)if(i[e]==n)return!0;return!1}function d(t,n,i){function e(){r&&o&&a&&(r(s),r=null)}n=f(t,"link",{rel:"stylesheet",href:n,media:"all"});var o=!1,a=!0,s=null,r=i||null;h?(n.onload=function(){o=!0,e()},n.onerror=function(){o=!0,s=Error("Stylesheet failed to load"),e()}):setTimeout((function(){o=!0,e()}),0),l(t,"head",n)}function v(t,n,i,e){var o=t.c.getElementsByTagName("head")[0];if(o){var a=f(t,"script",{src:n}),s=!1;return a.onload=a.onreadystatechange=function(){s||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(s=!0,i&&i(null),a.onload=a.onreadystatechange=null,"HEAD"==a.parentNode.tagName&&o.removeChild(a))},o.appendChild(a),setTimeout((function(){s||(s=!0,i&&i(Error("Script load timeout")))}),e||5e3),a}return null}function w(){this.a=0,this.c=null}function m(t){return t.a++,function(){t.a--,b(t)}}function y(t,n){t.c=n,b(t)}function b(t){0==t.a&&t.c&&(t.c(),t.c=null)}function x(t){this.a=t||"-"}function j(t,n){this.c=t,this.f=4,this.a="n";var i=(n||"n4").match(/^([nio])([1-9])$/i);i&&(this.a=i[1],this.f=parseInt(i[2],10))}function k(t){var n=[];t=t.split(/,\s*/);for(var i=0;i<t.length;i++){var e=t[i].replace(/['"]/g,"");-1!=e.indexOf(" ")||/^\d/.test(e)?n.push("'"+e+"'"):n.push(e)}return n.join(",")}function _(t){return t.a+t.f}function T(t){var n="normal";return"o"===t.a?n="oblique":"i"===t.a&&(n="italic"),n}function S(t){var n=4,i="n",e=null;return t&&((e=t.match(/(normal|oblique|italic)/i))&&e[1]&&(i=e[1].substr(0,1).toLowerCase()),(e=t.match(/([1-9]00|normal|bold)/i))&&e[1]&&(/bold/i.test(e[1])?n=7:/[1-9]00/.test(e[1])&&(n=parseInt(e[1].substr(0,1),10)))),i+n}function C(t,n){this.c=t,this.f=t.o.document.documentElement,this.h=n,this.a=new x("-"),this.j=!1!==n.events,this.g=!1!==n.classes}function A(t){if(t.g){var n=g(t.f,t.a.c("wf","active")),i=[],e=[t.a.c("wf","loading")];n||i.push(t.a.c("wf","inactive")),p(t.f,i,e)}N(t,"inactive")}function N(t,n,i){t.j&&t.h[n]&&(i?t.h[n](i.c,_(i)):t.h[n]())}function E(){this.c={}}function F(t,n){this.c=t,this.f=n,this.a=f(this.c,"span",{"aria-hidden":"true"},this.f)}function I(t){l(t.c,"body",t.a)}function O(t){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+k(t.c)+";font-style:"+T(t)+";font-weight:"+t.f+"00;"}function P(t,n,i,e,o,a){this.g=t,this.j=n,this.a=e,this.c=i,this.f=o||3e3,this.h=a||void 0}function W(t,n,i,e,o,a,s){this.v=t,this.B=n,this.c=i,this.a=e,this.s=s||"BESbswy",this.f={},this.w=o||3e3,this.u=a||null,this.m=this.j=this.h=this.g=null,this.g=new F(this.c,this.s),this.h=new F(this.c,this.s),this.j=new F(this.c,this.s),this.m=new F(this.c,this.s),t=O(t=new j(this.a.c+",serif",_(this.a))),this.g.a.style.cssText=t,t=O(t=new j(this.a.c+",sans-serif",_(this.a))),this.h.a.style.cssText=t,t=O(t=new j("serif",_(this.a))),this.j.a.style.cssText=t,t=O(t=new j("sans-serif",_(this.a))),this.m.a.style.cssText=t,I(this.g),I(this.h),I(this.j),I(this.m)}x.prototype.c=function(t){for(var n=[],i=0;i<arguments.length;i++)n.push(arguments[i].replace(/[\W_]+/g,"").toLowerCase());return n.join(this.a)},P.prototype.start=function(){var t=this.c.o.document,n=this,i=r(),e=new Promise((function(e,o){!function a(){r()-i>=n.f?o():t.fonts.load(function(t){return T(t)+" "+t.f+"00 300px "+k(t.c)}(n.a),n.h).then((function(t){1<=t.length?e():setTimeout(a,25)}),(function(){o()}))}()})),o=null,a=new Promise((function(t,i){o=setTimeout(i,n.f)}));Promise.race([a,e]).then((function(){o&&(clearTimeout(o),o=null),n.g(n.a)}),(function(){n.j(n.a)}))};var B={D:"serif",C:"sans-serif"},L=null;function D(){if(null===L){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);L=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return L}function $(t,n,i){for(var e in B)if(B.hasOwnProperty(e)&&n===t.f[B[e]]&&i===t.f[B[e]])return!0;return!1}function q(t){var n,i=t.g.a.offsetWidth,e=t.h.a.offsetWidth;(n=i===t.f.serif&&e===t.f["sans-serif"])||(n=D()&&$(t,i,e)),n?r()-t.A>=t.w?D()&&$(t,i,e)&&(null===t.u||t.u.hasOwnProperty(t.a.c))?H(t,t.v):H(t,t.B):function(t){setTimeout(s((function(){q(this)}),t),50)}(t):H(t,t.v)}function H(t,n){setTimeout(s((function(){u(this.g.a),u(this.h.a),u(this.j.a),u(this.m.a),n(this.a)}),t),0)}function M(t,n,i){this.c=t,this.a=n,this.f=0,this.m=this.j=!1,this.s=i}W.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=r(),q(this)};var z=null;function G(t){0==--t.f&&t.j&&(t.m?((t=t.a).g&&p(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),N(t,"active")):A(t.a))}function K(t){this.j=t,this.a=new E,this.h=0,this.f=this.g=!0}function R(t,n,i,e,o){var a=0==--t.h;(t.f||t.g)&&setTimeout((function(){var t=o||null,r=e||{};if(0===i.length&&a)A(n.a);else{n.f+=i.length,a&&(n.j=a);var c,h=[];for(c=0;c<i.length;c++){var f=i[c],l=r[f.c],u=n.a,g=f;if(u.g&&p(u.f,[u.a.c("wf",g.c,_(g).toString(),"loading")]),N(u,"fontloading",g),u=null,null===z)if(window.FontFace){g=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var d=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);z=g?42<parseInt(g[1],10):!d}else z=!1;u=z?new P(s(n.g,n),s(n.h,n),n.c,f,n.s,l):new W(s(n.g,n),s(n.h,n),n.c,f,n.s,t,l),h.push(u)}for(c=0;c<h.length;c++)h[c].start()}}),0)}function U(t,n){this.c=t,this.a=n}function V(t,n){this.c=t,this.a=n}function X(t,n){this.c=t||J,this.a=[],this.f=[],this.g=n||""}M.prototype.g=function(t){var n=this.a;n.g&&p(n.f,[n.a.c("wf",t.c,_(t).toString(),"active")],[n.a.c("wf",t.c,_(t).toString(),"loading"),n.a.c("wf",t.c,_(t).toString(),"inactive")]),N(n,"fontactive",t),this.m=!0,G(this)},M.prototype.h=function(t){var n=this.a;if(n.g){var i=g(n.f,n.a.c("wf",t.c,_(t).toString(),"active")),e=[],o=[n.a.c("wf",t.c,_(t).toString(),"loading")];i||e.push(n.a.c("wf",t.c,_(t).toString(),"inactive")),p(n.f,e,o)}N(n,"fontinactive",t),G(this)},K.prototype.load=function(t){this.c=new c(this.j,t.context||this.j),this.g=!1!==t.events,this.f=!1!==t.classes,function(t,n,i){var e=[],o=i.timeout;!function(t){t.g&&p(t.f,[t.a.c("wf","loading")]),N(t,"loading")}(n),e=function(t,n,i){var e,o=[];for(e in n)if(n.hasOwnProperty(e)){var a=t.c[e];a&&o.push(a(n[e],i))}return o}(t.a,i,t.c);var a=new M(t.c,n,o);for(t.h=e.length,n=0,i=e.length;n<i;n++)e[n].load((function(n,i,e){R(t,a,n,i,e)}))}(this,new C(this.c,t),t)},U.prototype.load=function(t){function n(){if(a["__mti_fntLst"+e]){var i,o=a["__mti_fntLst"+e](),s=[];if(o)for(var r=0;r<o.length;r++){var c=o[r].fontfamily;null!=o[r].fontStyle&&null!=o[r].fontWeight?(i=o[r].fontStyle+o[r].fontWeight,s.push(new j(c,i))):s.push(new j(c))}t(s)}else setTimeout((function(){n()}),50)}var i=this,e=i.a.projectId,o=i.a.version;if(e){var a=i.c.o;v(this.c,(i.a.api||"https://fast.fonts.net/jsapi")+"/"+e+".js"+(o?"?v="+o:""),(function(o){o?t([]):(a["__MonotypeConfiguration__"+e]=function(){return i.a},n())})).id="__MonotypeAPIScript__"+e}else t([])},V.prototype.load=function(t){var n,i,e=this.a.urls||[],o=this.a.families||[],a=this.a.testStrings||{},s=new w;for(n=0,i=e.length;n<i;n++)d(this.c,e[n],m(s));var r=[];for(n=0,i=o.length;n<i;n++)if((e=o[n].split(":"))[1])for(var c=e[1].split(","),h=0;h<c.length;h+=1)r.push(new j(e[0],c[h]));else r.push(new j(e[0]));y(s,(function(){t(r,a)}))};var J="https://fonts.googleapis.com/css";function Q(t){this.f=t,this.a=[],this.c={}}var Y={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},Z={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},tt={i:"i",italic:"i",n:"n",normal:"n"},nt=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function it(t,n){this.c=t,this.a=n}var et={Arimo:!0,Cousine:!0,Tinos:!0};function ot(t,n){this.c=t,this.a=n}function at(t,n){this.c=t,this.f=n,this.a=[]}it.prototype.load=function(t){var n=new w,i=this.c,e=new X(this.a.api,this.a.text),o=this.a.families;!function(t,n){for(var i=n.length,e=0;e<i;e++){var o=n[e].split(":");3==o.length&&t.f.push(o.pop());var a="";2==o.length&&""!=o[1]&&(a=":"),t.a.push(o.join(a))}}(e,o);var a=new Q(o);!function(t){for(var n=t.f.length,i=0;i<n;i++){var e=t.f[i].split(":"),o=e[0].replace(/\+/g," "),a=["n4"];if(2<=e.length){var s;if(s=[],r=e[1])for(var r,c=(r=r.split(",")).length,h=0;h<c;h++){var f;if((f=r[h]).match(/^[\w-]+$/))if(null==(l=nt.exec(f.toLowerCase())))f="";else{if(f=null==(f=l[2])||""==f?"n":tt[f],null==(l=l[1])||""==l)l="4";else var l=Z[l]||(isNaN(l)?"4":l.substr(0,1));f=[f,l].join("")}else f="";f&&s.push(f)}0<s.length&&(a=s),3==e.length&&(s=[],0<(e=(e=e[2])?e.split(","):s).length&&(e=Y[e[0]])&&(t.c[o]=e))}for(t.c[o]||(e=Y[o])&&(t.c[o]=e),e=0;e<a.length;e+=1)t.a.push(new j(o,a[e]))}}(a),d(i,function(t){if(0==t.a.length)throw Error("No fonts to load!");if(-1!=t.c.indexOf("kit="))return t.c;for(var n=t.a.length,i=[],e=0;e<n;e++)i.push(t.a[e].replace(/ /g,"+"));return n=t.c+"?family="+i.join("%7C"),0<t.f.length&&(n+="&subset="+t.f.join(",")),0<t.g.length&&(n+="&text="+encodeURIComponent(t.g)),n}(e),m(n)),y(n,(function(){t(a.a,a.c,et)}))},ot.prototype.load=function(t){var n=this.a.id,i=this.c.o;n?v(this.c,(this.a.api||"https://use.typekit.net")+"/"+n+".js",(function(n){if(n)t([]);else if(i.Typekit&&i.Typekit.config&&i.Typekit.config.fn){n=i.Typekit.config.fn;for(var e=[],o=0;o<n.length;o+=2)for(var a=n[o],s=n[o+1],r=0;r<s.length;r++)e.push(new j(a,s[r]));try{i.Typekit.load({events:!1,classes:!1,async:!0})}catch(t){}t(e)}}),2e3):t([])},at.prototype.load=function(t){var n=this.f.id,i=this.c.o,e=this;n?(i.__webfontfontdeckmodule__||(i.__webfontfontdeckmodule__={}),i.__webfontfontdeckmodule__[n]=function(n,i){for(var o=0,a=i.fonts.length;o<a;++o){var s=i.fonts[o];e.a.push(new j(s.name,S("font-weight:"+s.weight+";font-style:"+s.style)))}t(e.a)},v(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(t){return t.o.location.hostname||t.a.location.hostname}(this.c)+"/"+n+".js",(function(n){n&&t([])}))):t([])};var st=new K(window);st.a.c.custom=function(t,n){return new V(n,t)},st.a.c.fontdeck=function(t,n){return new at(n,t)},st.a.c.monotype=function(t,n){return new U(n,t)},st.a.c.typekit=function(t,n){return new ot(n,t)},st.a.c.google=function(t,n){return new it(n,t)};var rt={load:s(st.load,st)};void 0===(e=function(){return rt}.call(n,i,n,t))||(t.exports=e)}()}}]);
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[277],{1587:(t,e,r)=>{r.d(e,{Z:()=>d});var n=r(5944),o=r(7294),i=r(8776),l=r(5096),a=r(2988),c=r(4665),u=r(7449),f=r(9479),s=function(){return s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},s.apply(this,arguments)};function d(t){var e=t.id,r=t.text,d=t.responsiveStyles,p=t.absolute,h=void 0===p||p,v=t.containerRef,y=t.repeat,b=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),l=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)l.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return l}((0,o.useState)(!1),2),m=b[0],g=b[1],w=(0,o.useRef)(null);if(!(r=(0,c.xf)(r,y)))return null;var x=(0,f.tq)();return(0,n.BX)(n.HY,{children:[(0,n.tZ)("div",s({ref:w,onMouseEnter:x?void 0:function(){return g(!0)},onMouseLeave:x?void 0:function(){return g(!1)},onFocus:function(){return g(!0)},onBlur:function(){return g(!1)},onClick:function(){return g((function(t){return!t}))},css:h?{position:"absolute",insetInlineEnd:"10px",top:0,bottom:0,zIndex:a.rM,margin:"auto",cursor:"pointer",height:"100%",display:"flex"}:{position:"relative",marginInlineStart:"8px",display:"flex",alignItems:"center"}},{children:(0,n.tZ)(l.by,{cssStyles:d.getTarget("tooltipIcon")})})),(0,n.tZ)(u.Z,s({show:m,targetRef:w,containerRef:v,placement:"left",onHide:function(){return g(!1)},offset:8},{children:(0,n.tZ)(i.u,s({id:"tooltip-".concat(e),css:{zIndex:a.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}}},{children:r}))}))]})}},7449:(t,e,r)=>{r.d(e,{Z:()=>c});var n=r(5944),o=r(7294),i=r(3935),l=r(9479),a=function(){return a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},a.apply(this,arguments)};const c=function(t){var e=t.show,r=t.targetRef,c=t.children,s=t.onHide,d=t.placement,p=void 0===d?"bottom-start":d,h=t.offset,v=void 0===h?0:h,y=t.zIndex,b=void 0===y?1e3:y,m=t.containerRef,g=(0,o.useRef)(null),w=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),l=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)l.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return l}((0,o.useState)(null),2),x=w[0],S=w[1],O=(0,o.useCallback)((function(){return(null==m?void 0:m.current)||(0,l.me)().body}),[m]),k=(0,o.useCallback)((function(){var t;if(e&&r.current&&g.current){var n=(0,l.Kv)(),o=O();if(o){var i=r.current.getBoundingClientRect(),a=g.current.getBoundingClientRect(),c=o.getBoundingClientRect(),s=f(p,i,a,v),d=s.top,h=s.left,y=d+a.height,b=h+a.width,m=d>=0&&y<=n.innerHeight,w=h>=0&&b<=n.innerWidth;if(!m||!w){var x=u(p,!m,!w);x!==p&&(d=(t=f(x,i,a,v)).top,h=t.left)}var k=o===(0,l.me)().body,E=k?d+n.scrollY:d-c.top,R=k?h+n.scrollX:h-c.left;S((function(t){return t&&t.top===E&&t.left===R?t:{top:E,left:R}}))}}}),[e,p,v,O,r]),E=(0,o.useCallback)((function(){var t=!1;return function(){t||(t=!0,requestAnimationFrame((function(){k(),t=!1})))}}),[k])();if((0,o.useLayoutEffect)((function(){e&&k()}),[e,k]),(0,o.useEffect)((function(){if(e){var t=(0,l.Kv)(),n=O();if(n){t.addEventListener("resize",E),t.addEventListener("scroll",E,!0),n!==(0,l.me)().body&&n.addEventListener("scroll",E);var o=new ResizeObserver((function(){return E()}));return r.current&&o.observe(r.current),n!==(0,l.me)().body&&o.observe(n),function(){t.removeEventListener("resize",E),t.removeEventListener("scroll",E,!0),n!==(0,l.me)().body&&n.removeEventListener("scroll",E),o.disconnect()}}}}),[e,E,O,r]),(0,o.useEffect)((function(){if(e){var t=function(t){"Escape"===t.key&&(S(null),null==s||s())},n=function(t){var e=t.target;g.current&&!g.current.contains(e)&&r.current&&!r.current.contains(e)&&(S(null),null==s||s())},o=(0,l.me)();return o.addEventListener("mousedown",n),o.addEventListener("keydown",t),function(){o.removeEventListener("mousedown",n),o.removeEventListener("keydown",t)}}}),[e,s,r]),!e)return null;var R=O();return R?(0,i.createPortal)((0,n.tZ)("div",a({ref:g,style:a(a({position:"absolute"},x||{top:-9999,left:-9999}),{zIndex:b})},{children:c})),R):(0,n.tZ)(n.HY,{children:c})};var u=function(t,e,r){if(e){if(t.includes("top"))return t.replace("top","bottom");if(t.includes("bottom"))return t.replace("bottom","top")}if(r){if(t.includes("left"))return t.replace("left","right");if(t.includes("right"))return t.replace("right","left")}return t},f=function(t,e,r,n){switch(void 0===n&&(n=0),t){case"top":return{top:e.top-r.height-n,left:e.left+(e.width-r.width)/2};case"top-start":return{top:e.top-r.height-n,left:e.left};case"top-end":return{top:e.top-r.height-n,left:e.right-r.width};case"left":return{top:e.top+(e.height-r.height)/2,left:e.left-r.width-n};case"left-start":return{top:e.top,left:e.left-r.width-n};case"left-end":return{top:e.bottom-r.height,left:e.left-r.width-n};case"bottom":default:return{top:e.bottom+n,left:e.left+(e.width-r.width)/2};case"bottom-start":return{top:e.bottom+n,left:e.left};case"bottom-end":return{top:e.bottom+n,left:e.right-r.width};case"right":return{top:e.top+(e.height-r.height)/2,left:e.right+n};case"right-start":return{top:e.top,left:e.right+n};case"right-end":return{top:e.bottom-r.height,left:e.right+n}}}},8776:(t,e,r)=>{r.d(e,{u:()=>l});var n=r(5944),o=r(2988),i=function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},l=function(t){var e=t.children,r=t.css,l=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(t,["children","css"]);return(0,n.tZ)("div",i({css:i({zIndex:o.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}},r)},l,{children:(0,n.tZ)("div",i({className:"tooltip-inner"},{children:e}))}))}},5406:(t,e,r)=>{r.d(e,{Z:()=>l});var n=r(7294),o=r(9292),i=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),l=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)l.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return l};function l(t,e){var r=this,l=i((0,n.useState)([]),2),a=l[0],c=l[1],u=i((0,n.useState)(!1),2),f=u[0],s=u[1],d=!e&&t;return(0,n.useEffect)((function(){var n,i,l,a;t&&!e&&(n=r,i=void 0,a=function(){var e,r;return function(t,e){var r,n,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;l;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,n=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(!((o=(o=l.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){l=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){l.label=i[1];break}if(6===i[0]&&l.label<o[1]){l.label=o[1],o=i;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(i);break}o[2]&&l.ops.pop(),l.trys.pop();continue}i=e.call(t,l)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(n){switch(n.label){case 0:s(!0),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,(new o.ZP).fetchSalesforcePicklistOptions(t.object_name,t.field_name,t.credential_key)];case 2:return e=n.sent(),c(e.options||[]),[3,5];case 3:return r=n.sent(),console.error("Failed to fetch Salesforce options:",r),c([]),[3,5];case 4:return s(!1),[7];case 5:return[2]}}))},new((l=void 0)||(l=Promise))((function(t,e){function r(t){try{c(a.next(t))}catch(t){e(t)}}function o(t){try{c(a.throw(t))}catch(t){e(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof l?n:new l((function(t){t(n)}))).then(r,o)}c((a=a.apply(n,i||[])).next())})))}),[t]),{dynamicOptions:a,loadingDynamicOptions:f,shouldSalesforceSync:d}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[301],{5301:(e,h,a)=>{a.r(h),a.d(h,{Mermaid:()=>r.l});var r=a(7989)}}]);
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[435],{6435:(e,t,a)=>{a.r(t),a.d(t,{HighlightedCodeBlockBody:()=>r});var s=a(7989),h=a(7294),i=a(5893),r=({code:e,language:t,raw:a,className:r,startLine:u,...l})=>{let{shikiTheme:c}=(0,h.useContext)(s.A),g=(0,s.f)(),[n,d]=(0,h.useState)(a);return(0,h.useEffect)((()=>{if(!g)return void d(a);let s=g.highlight({code:e,language:t,themes:c},(e=>{d(e)}));s&&d(s)}),[e,t,c,g,a]),(0,i.jsx)(s.c,{className:r,language:t,result:n,startLine:u,...l})}}}]);
@@ -1 +0,0 @@
1
- (this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[466],{2703:(t,e,s)=>{"use strict";var i=s(414);function a(){}function n(){}n.resetWarningCache=a,t.exports=function(){function t(t,e,s,a,n,r){if(r!==i){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function e(){return t}t.isRequired=t;var s={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:n,resetWarningCache:a};return s.PropTypes=s,s}},5697:(t,e,s)=>{t.exports=s(2703)()},414:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3466:(t,e,s)=>{"use strict";function i(t){return"string"==typeof t||t instanceof String}function a(t){var e;return"object"==typeof t&&null!=t&&"Object"===(null==t||null==(e=t.constructor)?void 0:e.name)}function n(t,e){return Array.isArray(e)?n(t,((t,s)=>e.includes(s))):Object.entries(t).reduce(((t,s)=>{let[i,a]=s;return e(a,i)&&(t[i]=a),t}),{})}s.d(e,{LV:()=>k,oc:()=>H});const r="NONE",u="LEFT",o="FORCE_LEFT",h="RIGHT",l="FORCE_RIGHT";function p(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function d(t,e){if(e===t)return!0;const s=Array.isArray(e),i=Array.isArray(t);let a;if(s&&i){if(e.length!=t.length)return!1;for(a=0;a<e.length;a++)if(!d(e[a],t[a]))return!1;return!0}if(s!=i)return!1;if(e&&t&&"object"==typeof e&&"object"==typeof t){const s=e instanceof Date,i=t instanceof Date;if(s&&i)return e.getTime()==t.getTime();if(s!=i)return!1;const n=e instanceof RegExp,r=t instanceof RegExp;if(n&&r)return e.toString()==t.toString();if(n!=r)return!1;const u=Object.keys(e);for(a=0;a<u.length;a++)if(!Object.prototype.hasOwnProperty.call(t,u[a]))return!1;for(a=0;a<u.length;a++)if(!d(t[u[a]],e[u[a]]))return!1;return!0}return!(!e||!t||"function"!=typeof e||"function"!=typeof t)&&e.toString()===t.toString()}class c{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?r:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?u:h}}function k(t,e){return new k.InputMask(t,e)}function m(t){if(null==t)throw new Error("mask property should be defined");return t instanceof RegExp?k.MaskedRegExp:i(t)?k.MaskedPattern:t===Date?k.MaskedDate:t===Number?k.MaskedNumber:Array.isArray(t)||t===Array?k.MaskedDynamic:k.Masked&&t.prototype instanceof k.Masked?t:k.Masked&&t instanceof k.Masked?t.constructor:t instanceof Function?k.MaskedFunction:(console.warn("Mask not found for mask",t),k.Masked)}function g(t){if(!t)throw new Error("Options in not defined");if(k.Masked){if(t.prototype instanceof k.Masked)return{mask:t};const{mask:e,...s}=t instanceof k.Masked?{mask:t}:a(t)&&t.mask instanceof k.Masked?t:{};if(e){const t=e.mask;return{...n(e,((t,e)=>!e.startsWith("_"))),mask:e.constructor,_mask:t,...s}}}return a(t)?{...t}:{mask:t}}function f(t){if(k.Masked&&t instanceof k.Masked)return t;const e=g(t),s=m(e.mask);if(!s)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===s&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new s(e)}k.createMask=f;class _{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return null!=t?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return null!=t?t:this.value.length}select(t,e){if(null!=t&&null!=e&&(t!==this.selectionStart||e!==this.selectionEnd))try{this._unsafeSelect(t,e)}catch{}}get isActive(){return!1}}k.MaskElement=_;class v extends _{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,e,s;return null!=(t=null==(e=(s=this.input).getRootNode)?void 0:e.call(s))?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){return this._handlers.redo&&(90===t.keyCode&&t.shiftKey&&(t.metaKey||t.ctrlKey)||89===t.keyCode&&t.ctrlKey)?(t.preventDefault(),this._handlers.redo(t)):this._handlers.undo&&90===t.keyCode&&(t.metaKey||t.ctrlKey)?(t.preventDefault(),this._handlers.undo(t)):void(t.isComposing||this._handlers.selectionChange(t))}_onBeforeinput(t){return"historyUndo"===t.inputType&&this._handlers.undo?(t.preventDefault(),this._handlers.undo(t)):"historyRedo"===t.inputType&&this._handlers.redo?(t.preventDefault(),this._handlers.redo(t)):void 0}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}k.HTMLMaskElement=v;class C extends v{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,e){this.input.setSelectionRange(t,e)}get value(){return this.input.value}set value(t){this.input.value=t}}k.HTMLMaskElement=v;class A extends v{get _unsafeSelectionStart(){const t=this.rootElement,e=t.getSelection&&t.getSelection(),s=e&&e.anchorOffset,i=e&&e.focusOffset;return null==i||null==s||s<i?s:i}get _unsafeSelectionEnd(){const t=this.rootElement,e=t.getSelection&&t.getSelection(),s=e&&e.anchorOffset,i=e&&e.focusOffset;return null==i||null==s||s>i?s:i}_unsafeSelect(t,e){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,t),s.setEnd(this.input.lastChild||this.input,e);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}k.HTMLContenteditableMaskElement=A;class E{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>E.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}E.MAX_LENGTH=100,k.InputMask=class{constructor(t,e){this.el=t instanceof _?t:t.isContentEditable&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName?new A(t):new C(t),this.masked=f(e),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new E,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var e;return null==t||(null==(e=this.masked)?void 0:e.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof k.Masked)&&this.masked.constructor===m(t))return void this.masked.updateOptions({mask:t});const e=t instanceof k.Masked?t:f({mask:t});e.unmaskedValue=this.masked.unmaskedValue,this.masked=e}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,e){const s=this._listeners[t];s&&s.forEach((t=>t(e)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){this.el&&this.el.isActive&&(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(t){const e=this.masked.unmaskedValue,s=this.masked.value,i=this.masked.rawInputValue,a=this.displayValue,n=this.unmaskedValue!==e||this.value!==s||this._rawInputValue!==i;this._unmaskedValue=e,this._value=s,this._rawInputValue=i,this.el.value!==a&&(this.el.value=a),"auto"===t?this.alignCursor():null!=t&&(this.cursorPos=t),n&&this._fireChangeEvents(),this._historyChanging||!n&&!this.history.isEmpty||this.history.push({unmaskedValue:e,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:e,...s}=t,i=!this.maskEquals(e),a=this.masked.optionsIsChanged(s);i&&(this.mask=e),a&&this.masked.updateOptions(s),(i||a)&&this.updateControl()}updateCursor(t){null!=t&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout((()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,u))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}off(t,e){if(!this._listeners[t])return this;if(!e)return delete this._listeners[t],this;const s=this._listeners[t].indexOf(e);return s>=0&&this._listeners[t].splice(s,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();const e=new c({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,i=this.masked.splice(e.startChangePos,e.removed.length,e.inserted,e.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?e.removeDirection:r;let n=this.masked.nearestInputPos(e.startChangePos+i,a);a!==r&&(n=this.masked.nearestInputPos(n,r)),this.updateControl(n),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};class F{static normalize(t){return Array.isArray(t)?t:[t,new F]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}k.ChangeDetails=F;class x{constructor(t,e,s){void 0===t&&(t=""),void 0===e&&(e=0),this.value=t,this.from=e,this.stop=s}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||null!=t&&this.from>=t)return"";const e=this.value[0];return this.value=this.value.slice(1),e}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class y{constructor(t){this._value="",this._update({...y.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,e){void 0===e&&(e={input:!0}),this.reset(),this.append(t,e,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,e){return t}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),Math.min(this.displayValue.length,e-t)}extractInput(t,e,s){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),this.displayValue.slice(t,e)}extractTail(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),new x(this.extractInput(t,e),t)}appendTail(t){return i(t)&&(t=new x(String(t))),t.appendTo(this)}_appendCharRaw(t,e){return t?(this._value+=t,new F({inserted:t,rawInserted:t})):new F}_appendChar(t,e,s){void 0===e&&(e={});const i=this.state;let a;if([t,a]=this.doPrepareChar(t,e),t&&(a=a.aggregate(this._appendCharRaw(t,e)),!a.rawInserted&&"pad"===this.autofix)){const s=this.state;this.state=i;let n=this.pad(e);const r=this._appendCharRaw(t,e);n=n.aggregate(r),r.rawInserted||n.equals(a)?a=n:this.state=s}if(a.inserted){let t,n=!1!==this.doValidate(e);if(n&&null!=s){const e=this.state;if(!0===this.overwrite){t=s.state;for(let t=0;t<a.rawInserted.length;++t)s.unshift(this.displayValue.length-a.tailShift)}let i=this.appendTail(s);if(n=i.rawInserted.length===s.toString().length,!(n&&i.inserted||"shift"!==this.overwrite)){this.state=e,t=s.state;for(let t=0;t<a.rawInserted.length;++t)s.shift();i=this.appendTail(s),n=i.rawInserted.length===s.toString().length}n&&i.inserted&&(this.state=e)}n||(a=new F,this.state=i,s&&t&&(s.state=t))}return a}_appendPlaceholder(){return new F}_appendEager(){return new F}append(t,e,s){if(!i(t))throw new Error("value should be string");const a=i(s)?new x(String(s)):s;let n;null!=e&&e.tail&&(e._beforeTailState=this.state),[t,n]=this.doPrepare(t,e);for(let s=0;s<t.length;++s){const i=this._appendChar(t[s],e,a);if(!i.rawInserted&&!this.doSkipInvalid(t[s],e,a))break;n.aggregate(i)}return(!0===this.eager||"append"===this.eager)&&null!=e&&e.input&&t&&n.aggregate(this._appendEager()),null!=a&&(n.tailShift+=this.appendTail(a).tailShift),n}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(e),new F}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const e=this.rawInputValue,s=this.value,i=t();return this.rawInputValue=e,this.value&&this.value!==s&&0===s.indexOf(this.value)&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const e=this.state,s=t(this);return this.state=e,delete this._isolated,s}doSkipInvalid(t,e,s){return Boolean(this.skipInvalid)}doPrepare(t,e){return void 0===e&&(e={}),F.normalize(this.prepare?this.prepare(t,this,e):t)}doPrepareChar(t,e){return void 0===e&&(e={}),F.normalize(this.prepareChar?this.prepareChar(t,this,e):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,e,s,i,a){void 0===s&&(s=""),void 0===i&&(i=r),void 0===a&&(a={input:!0});const n=t+e,p=this.extractTail(n),d=!0===this.eager||"remove"===this.eager;let c;d&&(i=function(t){switch(t){case u:return o;case h:return l;default:return t}}(i),c=this.extractInput(0,n,{raw:!0}));let k=t;const m=new F;if(i!==r&&(k=this.nearestInputPos(t,e>1&&0!==t&&!d?r:i),m.tailShift=k-t),m.aggregate(this.remove(k)),d&&i!==r&&c===this.rawInputValue)if(i===o){let t;for(;c===this.rawInputValue&&(t=this.displayValue.length);)m.aggregate(new F({tailShift:-1})).aggregate(this.remove(t-1))}else i===l&&p.unshift();return m.aggregate(this.append(s,a,p))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!d(this,t)}typedValueEquals(t){const e=this.typedValue;return t===e||y.EMPTY_VALUES.includes(t)&&y.EMPTY_VALUES.includes(e)||!!this.format&&this.format(t,this)===this.format(this.typedValue,this)}pad(t){return new F}}y.DEFAULTS={skipInvalid:!0},y.EMPTY_VALUES=[void 0,null,""],k.Masked=y;class b{constructor(t,e){void 0===t&&(t=[]),void 0===e&&(e=0),this.chunks=t,this.from=e}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=i(t)?new x(String(t)):t;const e=this.chunks[this.chunks.length-1],s=e&&(e.stop===t.stop||null==t.stop)&&t.from===e.from+e.toString().length;if(t instanceof x)s?e.extend(t.toString()):this.chunks.push(t);else if(t instanceof b){if(null==t.stop){let e;for(;t.chunks.length&&null==t.chunks[0].stop;)e=t.chunks.shift(),e.from+=t.from,this.extend(e)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof k.MaskedPattern))return new x(this.toString()).appendTo(t);const e=new F;for(let s=0;s<this.chunks.length;++s){const i=this.chunks[s],a=t._mapPosToBlock(t.displayValue.length),n=i.stop;let r;if(null!=n&&(!a||a.index<=n)&&((i instanceof b||t._stops.indexOf(n)>=0)&&e.aggregate(t._appendPlaceholder(n)),r=i instanceof b&&t._blocks[n]),r){const s=r.appendTail(i);e.aggregate(s);const a=i.toString().slice(s.rawInserted.length);a&&e.aggregate(t.append(a,{tail:!0}))}else e.aggregate(t.append(i.toString(),{tail:!0}))}return e}get state(){return{chunks:this.chunks.map((t=>t.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:e,...s}=t;Object.assign(this,s),this.chunks=e.map((t=>{const e="chunks"in t?new b:new x;return e.state=t,e}))}unshift(t){if(!this.chunks.length||null!=t&&this.from>=t)return"";const e=null!=t?t-this.from:t;let s=0;for(;s<this.chunks.length;){const t=this.chunks[s],i=t.unshift(e);if(t.toString()){if(!i)break;++s}else this.chunks.splice(s,1);if(i)return i}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const e=this.chunks[t],s=e.shift();if(e.toString()){if(!s)break;--t}else this.chunks.splice(t,1);if(s)return s}return""}}class S{constructor(t,e){this.masked=t,this._log=[];const{offset:s,index:i}=t._mapPosToBlock(e)||(e<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(e=this.block)?void 0:e.displayValue.length)||0){var e;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,o),0!==this.offset||void 0}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,u),!0}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,u),!0}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,l),this.offset!==this.block.value.length||void 0}))}pushRightBeforeInput(){return this._pushRight((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,r),!0}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,r),!0}))}}class B{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(e),this._value||(this._isRawInput=!1),new F}nearestInputPos(t,e){void 0===e&&(e=r);const s=this._value.length;switch(e){case u:case o:return 0;default:return s}}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),this._isRawInput?e-t:0}extractInput(t,e,s){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),void 0===s&&(s={}),s.raw&&this._isRawInput&&this._value.slice(t,e)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(t,e){if(void 0===e&&(e={}),this.isFilled)return new F;const s=!0===this.eager||"append"===this.eager,i=this.char===t&&(this.isUnmasking||e.input||e.raw)&&(!e.raw||!s)&&!e.tail,a=new F({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(e.raw||e.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new F;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new x("")}appendTail(t){return i(t)&&(t=new x(String(t))),t.appendTo(this)}append(t,e,s){const i=this._appendChar(t[0],e);return null!=s&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=Boolean(t._rawInputValue)}pad(t){return this._appendPlaceholder()}}class D{constructor(t){const{parent:e,isOptional:s,placeholderChar:i,displayChar:a,lazy:n,eager:r,...u}=t;this.masked=f(u),Object.assign(this,{parent:e,isOptional:s,placeholderChar:i,displayChar:a,lazy:n,eager:r})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),0===t&&e>=1?(this.isFilled=!1,this.masked.remove(t,e)):new F}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(t,e){if(void 0===e&&(e={}),this.isFilled)return new F;const s=this.masked.state;let i=this.masked._appendChar(t,this.currentMaskFlags(e));return i.inserted&&!1===this.doValidate(e)&&(i=new F,this.masked.state=s),i.inserted||this.isOptional||this.lazy||e.input||(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=Boolean(i.inserted),i}append(t,e,s){return this.masked.append(t,this.currentMaskFlags(e),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new F:(this.isFilled=!0,new F({inserted:this.placeholderChar}))}_appendEager(){return new F}extractTail(t,e){return this.masked.extractTail(t,e)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,e,s){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),this.masked.extractInput(t,e,s)}nearestInputPos(t,e){void 0===e&&(e=r);const s=this.value.length,i=Math.min(Math.max(t,0),s);switch(e){case u:case o:return this.isComplete?i:0;case h:case l:return this.isComplete?i:s;default:return i}}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),this.value.slice(t,e).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var e;return{...t,_beforeTailState:(null==t||null==(e=t._beforeTailState)?void 0:e.masked)||(null==t?void 0:t._beforeTailState)}}pad(t){return new F}}D.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./},k.MaskedRegExp=class extends y{updateOptions(t){super.updateOptions(t)}_update(t){const e=t.mask;e&&(t.validate=t=>t.search(e)>=0),super._update(t)}};class V extends y{constructor(t){super({...V.DEFAULTS,...t,definitions:Object.assign({},D.DEFAULT_DEFINITIONS,null==t?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const e=this.mask;if(!e||!t)return;let s=!1,i=!1;for(let a=0;a<e.length;++a){if(this.blocks){const t=e.slice(a),s=Object.keys(this.blocks).filter((e=>0===t.indexOf(e)));s.sort(((t,e)=>e.length-t.length));const i=s[0];if(i){const{expose:t,repeat:e,...s}=g(this.blocks[i]),n={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...s,repeat:e,parent:this},r=null!=e?new k.RepeatBlock(n):f(n);r&&(this._blocks.push(r),t&&(this.exposeBlock=r),this._maskedBlocks[i]||(this._maskedBlocks[i]=[]),this._maskedBlocks[i].push(this._blocks.length-1)),a+=i.length-1;continue}}let n=e[a],r=n in t;if(n===V.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===n||"}"===n){s=!s;continue}if("["===n||"]"===n){i=!i;continue}if(n===V.ESCAPE_CHAR){if(++a,n=e[a],!n)break;r=!1}const u=r?new D({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...g(t[n]),parent:this}):new B({char:n,eager:this.eager,isUnmasking:s});this._blocks.push(u)}}get state(){return{...super.state,_blocks:this._blocks.map((t=>t.state))}}set state(t){if(!t)return void this.reset();const{_blocks:e,...s}=t;this._blocks.forEach(((t,s)=>t.state=e[s])),super.state=s}reset(){super.reset(),this._blocks.forEach((t=>t.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((t=>t.isComplete))}get isFilled(){return this._blocks.every((t=>t.isFilled))}get isFixed(){return this._blocks.every((t=>t.isFixed))}get isOptional(){return this._blocks.every((t=>t.isOptional))}doCommit(){this._blocks.forEach((t=>t.doCommit())),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((t,e)=>t+e.unmaskedValue),"")}set unmaskedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(e),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((t,e)=>t+e.value),"")}set value(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(e),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(e),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce(((t,e)=>t+e.displayValue),"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const e=new F;let s=null==(t=this._mapPosToBlock(this.displayValue.length))?void 0:t.index;if(null==s)return e;this._blocks[s].isFilled&&++s;for(let t=s;t<this._blocks.length;++t){const s=this._blocks[t]._appendEager();if(!s.inserted)break;e.aggregate(s)}return e}_appendCharRaw(t,e){void 0===e&&(e={});const s=this._mapPosToBlock(this.displayValue.length),i=new F;if(!s)return i;for(let n,r=s.index;n=this._blocks[r];++r){var a;const s=n._appendChar(t,{...e,_beforeTailState:null==(a=e._beforeTailState)||null==(a=a._blocks)?void 0:a[r]});if(i.aggregate(s),s.consumed)break}return i}extractTail(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const s=new b;return t===e||this._forEachBlocksInRange(t,e,((t,e,i,a)=>{const n=t.extractTail(i,a);n.stop=this._findStopBefore(e),n.from=this._blockStartPos(e),n instanceof b&&(n.blockIndex=e),s.extend(n)})),s}extractInput(t,e,s){if(void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),void 0===s&&(s={}),t===e)return"";let i="";return this._forEachBlocksInRange(t,e,((t,e,a,n)=>{i+=t.extractInput(a,n,s)})),i}_findStopBefore(t){let e;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(!(i<=t))break;e=i}return e}_appendPlaceholder(t){const e=new F;if(this.lazy&&null==t)return e;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return e;const i=s.index,a=null!=t?t:this._blocks.length;return this._blocks.slice(i,a).forEach((s=>{var i;s.lazy&&null==t||e.aggregate(s._appendPlaceholder(null==(i=s._blocks)?void 0:i.length))})),e}_mapPosToBlock(t){let e="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],a=e.length;if(e+=i.displayValue,t<=e.length)return{index:s,offset:t-a}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce(((t,e)=>t+e.displayValue.length),0)}_forEachBlocksInRange(t,e,s){void 0===e&&(e=this.displayValue.length);const i=this._mapPosToBlock(t);if(i){const t=this._mapPosToBlock(e),a=t&&i.index===t.index,n=i.offset,r=t&&a?t.offset:this._blocks[i.index].displayValue.length;if(s(this._blocks[i.index],i.index,n,r),t&&!a){for(let e=i.index+1;e<t.index;++e)s(this._blocks[e],e,0,this._blocks[e].displayValue.length);s(this._blocks[t.index],t.index,0,t.offset)}}}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const s=super.remove(t,e);return this._forEachBlocksInRange(t,e,((t,e,i,a)=>{s.aggregate(t.remove(i,a))})),s}nearestInputPos(t,e){if(void 0===e&&(e=r),!this._blocks.length)return 0;const s=new S(this,t);if(e===r)return s.pushRightBeforeInput()?s.pos:(s.popState(),s.pushLeftBeforeInput()?s.pos:this.displayValue.length);if(e===u||e===o){if(e===u){if(s.pushRightBeforeFilled(),s.ok&&s.pos===t)return t;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),e===u){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=t)return s.pos;if(s.popState(),s.ok&&s.pos<=t)return s.pos;s.popState()}return s.ok?s.pos:e===o?0:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:0))}return e===h||e===l?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:e===l?this.displayValue.length:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:this.nearestInputPos(t,u)))):t}totalInputPositions(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);let s=0;return this._forEachBlocksInRange(t,e,((t,e,i,a)=>{s+=t.totalInputPositions(i,a)})),s}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const e=this._maskedBlocks[t];return e?e.map((t=>this._blocks[t])):[]}pad(t){const e=new F;return this._forEachBlocksInRange(0,this.displayValue.length,(s=>e.aggregate(s.pad(t)))),e}}V.DEFAULTS={...y.DEFAULTS,lazy:!0,placeholderChar:"_"},V.STOP_CHAR="`",V.ESCAPE_CHAR="\\",V.InputDefinition=D,V.FixedDefinition=B,k.MaskedPattern=V;class M extends V{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:e=this.to||0,from:s=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...n}=t;this.to=e,this.from=s,this.maxLength=Math.max(String(e).length,i),this.autofix=a;const r=String(this.from).padStart(this.maxLength,"0"),u=String(this.to).padStart(this.maxLength,"0");let o=0;for(;o<u.length&&u[o]===r[o];)++o;n.mask=u.slice(0,o).replace(/0/g,"\\0")+"0".repeat(this.maxLength-o),super._update(n)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(t){let e="",s="";const[,i,a]=t.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(e="0".repeat(i.length)+a,s="9".repeat(i.length)+a),e=e.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[e,s]}doPrepareChar(t,e){let s;return void 0===e&&(e={}),[t,s]=super.doPrepareChar(t.replace(/\D/g,""),e),t||(s.skip=!this.isComplete),[t,s]}_appendCharRaw(t,e){if(void 0===e&&(e={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,e);const s=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[a,n]=this.boundaries(this.value+t);return Number(n)<this.from?super._appendCharRaw(s[this.value.length],e):Number(a)>this.to?!e.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],e).aggregate(this._appendCharRaw(t,e)):super._appendCharRaw(i[this.value.length],e):super._appendCharRaw(t,e)}doValidate(t){const e=this.value;if(-1===e.search(/[^0]/)&&e.length<=this._matchFrom)return!0;const[s,i]=this.boundaries(e);return this.from<=Number(i)&&Number(s)<=this.to&&super.doValidate(t)}pad(t){const e=new F;if(this.value.length===this.maxLength)return e;const s=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let s=0;s<i;++s)e.aggregate(super._appendCharRaw("0",t));s.split("").forEach((t=>this._appendCharRaw(t)))}return e}}k.MaskedRange=M;class w extends V{static extractPatternOptions(t){const{mask:e,pattern:s,...a}=t;return{...a,mask:i(e)?e:s}}constructor(t){super(w.extractPatternOptions({...w.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:e,pattern:s,blocks:a,...n}={...w.DEFAULTS,...t},r=Object.assign({},w.GET_DEFAULT_BLOCKS());t.min&&(r.Y.from=t.min.getFullYear()),t.max&&(r.Y.to=t.max.getFullYear()),t.min&&t.max&&r.Y.from===r.Y.to&&(r.m.from=t.min.getMonth()+1,r.m.to=t.max.getMonth()+1,r.m.from===r.m.to&&(r.d.from=t.min.getDate(),r.d.to=t.max.getDate())),Object.assign(r,this.blocks,a),super._update({...n,mask:i(e)?e:s,blocks:r})}doValidate(t){const e=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&null!=e&&(null==this.min||this.min<=e)&&(null==this.max||e<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(w.extractPatternOptions(t))}}w.GET_DEFAULT_BLOCKS=()=>({d:{mask:M,from:1,to:31,maxLength:2},m:{mask:M,from:1,to:12,maxLength:2},Y:{mask:M,from:1900,to:9999}}),w.DEFAULTS={...V.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>t?[String(t.getDate()).padStart(2,"0"),String(t.getMonth()+1).padStart(2,"0"),t.getFullYear()].join("."):"",parse:(t,e)=>{const[s,i,a]=t.split(".").map(Number);return new Date(a,i-1,s)}},k.MaskedDate=w;class I extends y{constructor(t){super({...I.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map((t=>{const{expose:e,...s}=g(t),i=f({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...s});return e&&(this.exposeMask=i),i})):[])}_appendCharRaw(t,e){void 0===e&&(e={});const s=this._applyDispatch(t,e);return this.currentMask&&s.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(e))),s}_applyDispatch(t,e,s){void 0===t&&(t=""),void 0===e&&(e={}),void 0===s&&(s="");const i=e.tail&&null!=e._beforeTailState?e._beforeTailState._value:this.value,a=this.rawInputValue,n=e.tail&&null!=e._beforeTailState?e._beforeTailState._rawInputValue:a,r=a.slice(n.length),u=this.currentMask,o=new F,h=null==u?void 0:u.state;return this.currentMask=this.doDispatch(t,{...e},s),this.currentMask&&(this.currentMask!==u?(this.currentMask.reset(),n&&(this.currentMask.append(n,{raw:!0}),o.tailShift=this.currentMask.value.length-i.length),r&&(o.tailShift+=this.currentMask.append(r,{raw:!0,tail:!0}).tailShift)):h&&(this.currentMask.state=h)),o}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const e=new F;return t&&e.aggregate(this._applyDispatch("",{},t)),e.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var e,s;return{...t,_beforeTailState:(null==(e=t._beforeTailState)?void 0:e.currentMaskRef)===this.currentMask&&(null==(s=t._beforeTailState)?void 0:s.currentMask)||t._beforeTailState}}doDispatch(t,e,s){return void 0===e&&(e={}),void 0===s&&(s=""),this.dispatch(t,this,e,s)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,e){void 0===e&&(e={});let[s,i]=super.doPrepare(t,e);if(this.currentMask){let t;[s,t]=super.doPrepare(s,this.currentMaskFlags(e)),i=i.aggregate(t)}return[s,i]}doPrepareChar(t,e){void 0===e&&(e={});let[s,i]=super.doPrepareChar(t,e);if(this.currentMask){let t;[s,t]=super.doPrepareChar(s,this.currentMaskFlags(e)),i=i.aggregate(t)}return[s,i]}reset(){var t;null==(t=this.currentMask)||t.reset(),this.compiledMasks.forEach((t=>t.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask)return this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,void this._applyDispatch();let e=String(t);this.currentMask&&(this.currentMask.typedValue=t,e=this.currentMask.unmaskedValue),this.unmaskedValue=e}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return Boolean(null==(t=this.currentMask)?void 0:t.isComplete)}get isFilled(){var t;return Boolean(null==(t=this.currentMask)?void 0:t.isFilled)}remove(t,e){const s=new F;return this.currentMask&&s.aggregate(this.currentMask.remove(t,e)).aggregate(this._applyDispatch()),s}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((t=>t.state)),currentMaskRef:this.currentMask,currentMask:null==(t=this.currentMask)?void 0:t.state}}set state(t){const{compiledMasks:e,currentMaskRef:s,currentMask:i,...a}=t;e&&this.compiledMasks.forEach(((t,s)=>t.state=e[s])),null!=s&&(this.currentMask=s,this.currentMask.state=i),super.state=a}extractInput(t,e,s){return this.currentMask?this.currentMask.extractInput(t,e,s):""}extractTail(t,e){return this.currentMask?this.currentMask.extractTail(t,e):super.extractTail(t,e)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,e){return this.currentMask?this.currentMask.nearestInputPos(t,e):super.nearestInputPos(t,e)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every(((e,s)=>{if(!t[s])return;const{mask:i,...a}=t[s];return d(e,a)&&e.maskEquals(i)})):super.maskEquals(t)}typedValueEquals(t){var e;return Boolean(null==(e=this.currentMask)?void 0:e.typedValueEquals(t))}}I.DEFAULTS={...y.DEFAULTS,dispatch:(t,e,s,i)=>{if(!e.compiledMasks.length)return;const a=e.rawInputValue,n=e.compiledMasks.map(((n,r)=>{const u=e.currentMask===n,h=u?n.displayValue.length:n.nearestInputPos(n.displayValue.length,o);return n.rawInputValue!==a?(n.reset(),n.append(a,{raw:!0})):u||n.remove(h),n.append(t,e.currentMaskFlags(s)),n.appendTail(i),{index:r,weight:n.rawInputValue.length,totalInputPositions:n.totalInputPositions(0,Math.max(h,n.nearestInputPos(n.displayValue.length,o)))}}));return n.sort(((t,e)=>e.weight-t.weight||e.totalInputPositions-t.totalInputPositions)),e.compiledMasks[n[0].index]}},k.MaskedDynamic=I;class T extends V{constructor(t){super({...T.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:e,...s}=t;if(e){const t=e.map((t=>t.length)),i=Math.min(...t),a=Math.max(...t)-i;s.mask="*".repeat(i),a&&(s.mask+="["+"*".repeat(a)+"]"),this.enum=e}super._update(s)}_appendCharRaw(t,e){void 0===e&&(e={});const s=Math.min(this.nearestInputPos(0,l),this.value.length),i=this.enum.filter((e=>this.matchValue(e,this.unmaskedValue+t,s)));if(i.length){1===i.length&&this._forEachBlocksInRange(0,this.value.length,((t,s)=>{const a=i[0][s];s>=this.value.length||a===t.value||(t.reset(),t._appendChar(a,e))}));const t=super._appendCharRaw(i[0][this.value.length],e);return 1===i.length&&i[0].slice(this.unmaskedValue.length).split("").forEach((e=>t.aggregate(super._appendCharRaw(e)))),t}return new F({skip:!this.isComplete})}extractTail(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),new x("",t)}remove(t,e){if(void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),t===e)return new F;const s=Math.min(super.nearestInputPos(0,l),this.value.length);let i;for(i=t;i>=0&&!(this.enum.filter((t=>this.matchValue(t,this.value.slice(s,i),s))).length>1);--i);const a=super.remove(i,e);return a.tailShift+=i-t,a}get isComplete(){return this.enum.indexOf(this.value)>=0}}var R;T.DEFAULTS={...V.DEFAULTS,matchValue:(t,e,s)=>t.indexOf(e,s)===s},k.MaskedEnum=T,k.MaskedFunction=class extends y{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}};class P extends y{constructor(t){super({...P.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),e=(this.scale?"("+p(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+"\\d*"+e),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(p).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(p(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const e=t.split(this.radix);return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),e.join(this.radix)}doPrepareChar(t,e){void 0===e&&(e={});const[s,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(e.input&&e.raw||!e.input&&!e.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),e);return t&&!s&&(i.skip=!0),!s||this.allowPositive||this.value||"-"===s||i.aggregate(this._appendChar("-")),[s,i]}_separatorsCount(t,e){void 0===e&&(e=!1);let s=0;for(let i=0;i<t;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++s,e&&(t+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(t){return void 0===t&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,e,s){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),[t,e]=this._adjustRangeWithSeparators(t,e),this._removeThousandsSeparators(super.extractInput(t,e,s))}_appendCharRaw(t,e){void 0===e&&(e={});const s=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=t;const n=this.number;let r,u=!isNaN(n),o=!1;if(u){let t;null!=this.min&&this.min<0&&this.number<this.min&&(t=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(t=this.max),null!=t&&(this.autofix?(this._value=this.format(t,this).replace(P.UNMASKED_RADIX,this.radix),o||(o=a===this._value&&!e.tail)):u=!1),u&&(u=Boolean(this._value.match(this._numberRegExp)))}u?r=new F({inserted:this._value.slice(a.length),rawInserted:o?"":t,skip:o}):(this._value=a,r=new F),this._value=this._insertThousandsSeparators(this._value);const h=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,l=this._separatorsCountFromSlice(h);return r.tailShift+=(l-i)*this.thousandsSeparator.length,r}_findSeparatorAround(t){if(this.thousandsSeparator){const e=t-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,e);if(s<=t)return s}return-1}_adjustRangeWithSeparators(t,e){const s=this._findSeparatorAround(t);s>=0&&(t=s);const i=this._findSeparatorAround(e);return i>=0&&(e=i+this.thousandsSeparator.length),[t,e]}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),[t,e]=this._adjustRangeWithSeparators(t,e);const s=this.value.slice(0,t),i=this.value.slice(e),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const n=this._separatorsCountFromSlice(s);return new F({tailShift:(n-a)*this.thousandsSeparator.length})}nearestInputPos(t,e){if(!this.thousandsSeparator)return t;switch(e){case r:case u:case o:{const s=this._findSeparatorAround(t-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(t<i||this.value.length<=i||e===o)return s}break}case h:case l:{const e=this._findSeparatorAround(t);if(e>=0)return e+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){const t=this.number;let e=t;null!=this.min&&(e=Math.max(e,this.min)),null!=this.max&&(e=Math.min(e,this.max)),e!==t&&(this.unmaskedValue=this.format(e,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(t){const e=this._removeThousandsSeparators(t).split(this.radix);return e[0]=e[0].replace(/^(\D*)(0*)(\d*)/,((t,e,s,i)=>e+i)),t.length&&!/\d$/.test(e[0])&&(e[0]=e[0]+"0"),e.length>1&&(e[1]=e[1].replace(/0*$/,""),e[1].length||(e.length=1)),this._insertThousandsSeparators(e.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const e=t.split(this.radix);return e.length<2&&e.push(""),e[1]=e[1].padEnd(this.scale,"0"),e.join(this.radix)}doSkipInvalid(t,e,s){void 0===e&&(e={});const i=0===this.scale&&t!==this.thousandsSeparator&&(t===this.radix||t===P.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,e,s)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,P.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(P.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||P.EMPTY_VALUES.includes(t)&&P.EMPTY_VALUES.includes(this.typedValue))&&!(0===t&&""===this.value)}}R=P,P.UNMASKED_RADIX=".",P.EMPTY_VALUES=[...y.EMPTY_VALUES,0],P.DEFAULTS={...y.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[R.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},k.MaskedNumber=P;const O={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function L(t,e,s){void 0===e&&(e=O.MASKED),void 0===s&&(s=O.MASKED);const i=f(t);return t=>i.runIsolated((i=>(i[e]=t,i[s])))}k.PIPE_TYPE=O,k.createPipe=L,k.pipe=function(t,e,s,i){return L(e,s,i)(t)},k.RepeatBlock=class extends V{get repeatFrom(){var t;return null!=(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?t:0}get repeatTo(){var t;return null!=(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var e,s,i;const{repeat:a,...n}=g(t);this._blockOpts=Object.assign({},this._blockOpts,n);const r=f(this._blockOpts);this.repeat=null!=(e=null!=(s=null!=a?a:r.repeat)?s:this.repeat)?e:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(i=this._blocks)?void 0:i.length)||0,this.repeatFrom)),blocks:{m:r},eager:r.eager,overwrite:r.overwrite,skipInvalid:r.skipInvalid,lazy:r.lazy,placeholderChar:r.placeholderChar,displayChar:r.displayChar})}_allocateBlock(t){return t<this._blocks.length?this._blocks[t]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(f(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(t,e){void 0===e&&(e={});const s=new F;for(let u,o,h=null!=(i=null==(a=this._mapPosToBlock(this.displayValue.length))?void 0:a.index)?i:Math.max(this._blocks.length-1,0);u=null!=(n=this._blocks[h])?n:o=!o&&this._allocateBlock(h);++h){var i,a,n,r;const l=u._appendChar(t,{...e,_beforeTailState:null==(r=e._beforeTailState)||null==(r=r._blocks)?void 0:r[h]});if(l.skip&&o){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(l),l.consumed)break}return s}_trimEmptyTail(t,e){var s,i;void 0===t&&(t=0);const a=Math.max((null==(s=this._mapPosToBlock(t))?void 0:s.index)||0,this.repeatFrom,0);let n;null!=e&&(n=null==(i=this._mapPosToBlock(e))?void 0:i.index),null==n&&(n=this._blocks.length-1);let r=0;for(let t=n;a<=t&&!this._blocks[t].unmaskedValue;--t,++r);r&&(this._blocks.splice(n-r+1,r),this.mask=this.mask.slice(r))}reset(){super.reset(),this._trimEmptyTail()}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const s=super.remove(t,e);return this._trimEmptyTail(t,e),s}totalInputPositions(t,e){return void 0===t&&(t=0),null==e&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,e)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}};try{globalThis.IMask=k}catch{}var U=s(7294),N=s(5697);const j={mask:N.oneOfType([N.array,N.func,N.string,N.instanceOf(RegExp),N.oneOf([Date,Number,k.Masked]),N.instanceOf(k.Masked)]),value:N.any,unmask:N.oneOfType([N.bool,N.oneOf(["typed"])]),prepare:N.func,prepareChar:N.func,validate:N.func,commit:N.func,overwrite:N.oneOfType([N.bool,N.oneOf(["shift"])]),eager:N.oneOfType([N.bool,N.oneOf(["append","remove"])]),skipInvalid:N.bool,onAccept:N.func,onComplete:N.func,placeholderChar:N.string,displayChar:N.string,lazy:N.bool,definitions:N.object,blocks:N.object,enum:N.arrayOf(N.string),maxLength:N.number,from:N.number,to:N.number,pattern:N.string,format:N.func,parse:N.func,autofix:N.oneOfType([N.bool,N.oneOf(["pad"])]),radix:N.string,thousandsSeparator:N.string,mapToRadix:N.arrayOf(N.string),scale:N.number,normalizeZeros:N.bool,padFractionalZeros:N.bool,min:N.oneOfType([N.number,N.instanceOf(Date)]),max:N.oneOfType([N.number,N.instanceOf(Date)]),dispatch:N.func,inputRef:N.oneOfType([N.func,N.shape({current:N.object})])},z=Object.keys(j).filter((t=>"value"!==t)),q=["value","unmask","onAccept","onComplete","inputRef"],K=z.filter((t=>q.indexOf(t)<0)),Y=function(t){var e;const s=((e=class extends U.Component{constructor(t){super(t),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const t=this.props,e=this._extractMaskOptionsFromProps(t);var s;e.mask?this.maskRef?(this.maskRef.updateOptions(e),"value"in t&&void 0!==t.value&&(this.maskValue=t.value)):this.initMask(e):(this.destroyMask(),"value"in t&&void 0!==t.value&&(null!=(s=this.element)&&s.isContentEditable&&"INPUT"!==this.element.tagName&&"TEXTAREA"!==this.element.tagName?this.element.textContent=t.value:this.element.value=t.value))}componentWillUnmount(){this.destroyMask()}_inputRef(t){this.element=t,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=t:this.props.inputRef(t))}initMask(t){void 0===t&&(t=this._extractMaskOptionsFromProps(this.props)),this.maskRef=k(this.element,t).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&void 0!==this.props.value&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(t){const{...e}=t;return Object.keys(e).filter((t=>K.indexOf(t)<0)).forEach((t=>{delete e[t]})),e}_extractNonMaskProps(t){const{...e}=t;return z.forEach((t=>{"maxLength"!==t&&delete e[t]})),"defaultValue"in e||(e.defaultValue=t.mask?"":e.value),delete e.value,e}get maskValue(){return this.maskRef?"typed"===this.props.unmask?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(t){this.maskRef&&(t=null==t&&"typed"!==this.props.unmask?"":t,"typed"===this.props.unmask?this.maskRef.typedValue=t:this.props.unmask?this.maskRef.unmaskedValue=t:this.maskRef.value=t)}_onAccept(t){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,t)}_onComplete(t){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,t)}render(){return U.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}}).displayName=void 0,e.propTypes=void 0,e),i=t.displayName||t.name||"Component";return s.displayName="IMask("+i+")",s.propTypes=j,U.forwardRef(((t,e)=>U.createElement(s,{...t,ref:e})))}((t=>{let{inputRef:e,...s}=t;return U.createElement("input",{...s,ref:e})})),H=U.forwardRef(((t,e)=>U.createElement(Y,{...t,ref:e})))}}]);