@saasquatch/mint-components 1.15.0-40 → 1.15.0-41

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 (238) hide show
  1. package/dist/cjs/IndirectTaxDetailsView-d0290a12.js +646 -0
  2. package/dist/cjs/{ShadowViewAddon-fcd0c52f.js → ShadowViewAddon-9cb7a310.js} +1010 -1062
  3. package/dist/cjs/data-6d96b89c.js +137 -0
  4. package/dist/cjs/{email-registration-view-37b44222.js → email-registration-view-dca94dc9.js} +1 -1
  5. package/dist/cjs/{global-a38a094f.js → global-d62c5561.js} +13 -12
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/mint-components.cjs.js +2 -2
  8. package/dist/cjs/parseStates-d1effc19.js +16 -0
  9. package/dist/cjs/{sqm-banking-info-form_17.cjs.entry.js → sqm-banking-info-form_10.cjs.entry.js} +211 -1888
  10. package/dist/cjs/{sqm-big-stat_41.cjs.entry.js → sqm-big-stat_42.cjs.entry.js} +290 -10
  11. package/dist/cjs/sqm-code-verification.cjs.entry.js +348 -0
  12. package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
  13. package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
  14. package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +2 -2
  15. package/dist/cjs/sqm-invoice-table-data-cell_5.cjs.entry.js +84 -0
  16. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
  17. package/dist/cjs/sqm-pagination_3.cjs.entry.js +1 -1
  18. package/dist/cjs/{sqm-portal-email-verification-view-26c893d3.js → sqm-portal-email-verification-view-156accab.js} +1 -1
  19. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
  20. package/dist/cjs/{sqm-portal-profile-view-674a7543.js → sqm-portal-profile-view-f226725e.js} +1 -1
  21. package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
  22. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
  23. package/dist/cjs/sqm-referred-registration.cjs.entry.js +1 -1
  24. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
  25. package/dist/cjs/sqm-stencilbook.cjs.entry.js +11185 -9987
  26. package/dist/cjs/sqm-tax-and-cash.cjs.entry.js +1221 -0
  27. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +11 -3
  28. package/dist/cjs/sqm-widget-verification.cjs.entry.js +17 -6
  29. package/dist/cjs/{usePayoutStatus-4b5894ef.js → usePayoutStatus-feeac99b.js} +8 -5
  30. package/dist/cjs/utils-ce18d1bc.js +105 -0
  31. package/dist/collection/collection-manifest.json +1 -0
  32. package/dist/collection/components/sqm-instant-access-registration/sqm-instant-access-registration.js +2 -2
  33. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +3 -3
  34. package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +3 -3
  35. package/dist/collection/components/sqm-stencilbook/BrandSelector.js +179 -0
  36. package/dist/collection/components/sqm-stencilbook/Themes.js +21 -17
  37. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +82 -98
  38. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +33 -3
  39. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +39 -5
  40. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +41 -6
  41. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +12 -8
  42. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +1 -1
  43. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +2 -2
  44. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -1
  45. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +1 -1
  46. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +1 -1
  47. package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +2 -2
  48. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +2 -2
  49. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +1 -1
  50. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +2 -2
  51. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +26 -1
  52. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.js +2 -2
  53. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +8 -5
  54. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +77 -28
  55. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +1 -1
  56. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +62 -3
  57. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +3 -3
  58. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +5 -4
  59. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +49 -11
  60. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +3 -3
  61. package/dist/collection/components/views/email-registration-view.js +1 -1
  62. package/dist/collection/global/styles.js +13 -12
  63. package/dist/collection/global/styles.ts +26 -12
  64. package/dist/collection/utils/parseStates.js +12 -0
  65. package/dist/esm/IndirectTaxDetailsView-3be86bcf.js +639 -0
  66. package/dist/esm/{ShadowViewAddon-5f9b6d07.js → ShadowViewAddon-d8cfd6c7.js} +1013 -1064
  67. package/dist/esm/data-a05c78ae.js +121 -0
  68. package/dist/esm/{email-registration-view-b1c858ee.js → email-registration-view-8782c01b.js} +1 -1
  69. package/dist/esm/{global-66746c30.js → global-632fb2fa.js} +13 -12
  70. package/dist/esm/loader.js +2 -2
  71. package/dist/esm/mint-components.js +2 -2
  72. package/dist/esm/parseStates-ed75e224.js +14 -0
  73. package/dist/esm/{sqm-banking-info-form_17.entry.js → sqm-banking-info-form_10.entry.js} +135 -1805
  74. package/dist/esm/{sqm-big-stat_41.entry.js → sqm-big-stat_42.entry.js} +294 -15
  75. package/dist/esm/sqm-code-verification.entry.js +344 -0
  76. package/dist/esm/sqm-email-verification.entry.js +1 -1
  77. package/dist/esm/sqm-empty_4.entry.js +1 -1
  78. package/dist/esm/sqm-instant-access-registration.entry.js +2 -2
  79. package/dist/esm/sqm-invoice-table-data-cell_5.entry.js +76 -0
  80. package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
  81. package/dist/esm/sqm-pagination_3.entry.js +1 -1
  82. package/dist/esm/{sqm-portal-email-verification-view-00f03873.js → sqm-portal-email-verification-view-24ea7b3c.js} +1 -1
  83. package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
  84. package/dist/esm/{sqm-portal-profile-view-0d45de87.js → sqm-portal-profile-view-9b4d7ec1.js} +1 -1
  85. package/dist/esm/sqm-portal-profile.entry.js +2 -2
  86. package/dist/esm/sqm-referral-table_11.entry.js +1 -1
  87. package/dist/esm/sqm-referred-registration.entry.js +1 -1
  88. package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
  89. package/dist/esm/sqm-stencilbook.entry.js +12093 -10895
  90. package/dist/esm/sqm-tax-and-cash.entry.js +1217 -0
  91. package/dist/esm/sqm-widget-verification-controller.entry.js +12 -4
  92. package/dist/esm/sqm-widget-verification.entry.js +17 -6
  93. package/dist/esm/{usePayoutStatus-58aa56b4.js → usePayoutStatus-fed17fc9.js} +8 -5
  94. package/dist/esm/utils-1654e233.js +97 -0
  95. package/dist/esm-es5/IndirectTaxDetailsView-3be86bcf.js +1 -0
  96. package/dist/esm-es5/ShadowViewAddon-d8cfd6c7.js +1 -0
  97. package/dist/esm-es5/data-a05c78ae.js +1 -0
  98. package/dist/esm-es5/email-registration-view-8782c01b.js +1 -0
  99. package/dist/esm-es5/{global-66746c30.js → global-632fb2fa.js} +5 -5
  100. package/dist/esm-es5/loader.js +1 -1
  101. package/dist/esm-es5/mint-components.js +1 -1
  102. package/dist/esm-es5/parseStates-ed75e224.js +1 -0
  103. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -0
  104. package/dist/esm-es5/sqm-big-stat_42.entry.js +1 -0
  105. package/dist/esm-es5/sqm-code-verification.entry.js +1 -0
  106. package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
  107. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  108. package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
  109. package/dist/esm-es5/sqm-invoice-table-data-cell_5.entry.js +1 -0
  110. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  111. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  112. package/dist/esm-es5/{sqm-portal-email-verification-view-00f03873.js → sqm-portal-email-verification-view-24ea7b3c.js} +1 -1
  113. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  114. package/dist/esm-es5/{sqm-portal-profile-view-0d45de87.js → sqm-portal-profile-view-9b4d7ec1.js} +1 -1
  115. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  116. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  117. package/dist/esm-es5/sqm-referred-registration.entry.js +1 -1
  118. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  119. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  120. package/dist/esm-es5/sqm-tax-and-cash.entry.js +1 -0
  121. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  122. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  123. package/dist/esm-es5/{usePayoutStatus-58aa56b4.js → usePayoutStatus-fed17fc9.js} +2 -2
  124. package/dist/esm-es5/utils-1654e233.js +1 -0
  125. package/dist/mint-components/global/styles.ts +26 -12
  126. package/dist/mint-components/mint-components.esm.js +1 -1
  127. package/dist/mint-components/mint-components.js +1 -1
  128. package/dist/mint-components/p-06ce54e2.entry.js +258 -0
  129. package/dist/mint-components/p-0984523b.js +1 -0
  130. package/dist/mint-components/p-0a37a288.system.entry.js +1 -0
  131. package/dist/mint-components/{p-77b8a529.system.entry.js → p-0a8a6d45.system.entry.js} +1 -1
  132. package/dist/mint-components/p-115dfc03.system.js +1 -0
  133. package/dist/mint-components/{p-480e08e9.js → p-11dff275.js} +2 -2
  134. package/dist/mint-components/{p-770bba1b.system.entry.js → p-12e61414.system.entry.js} +1 -1
  135. package/dist/mint-components/p-13f3a647.js +1 -0
  136. package/dist/mint-components/p-155cf177.system.js +1 -0
  137. package/dist/mint-components/{p-dded7d43.entry.js → p-1878da9b.entry.js} +2 -2
  138. package/dist/mint-components/p-2cfe9826.system.entry.js +1 -0
  139. package/dist/mint-components/{p-210e8f49.entry.js → p-2df6ce8f.entry.js} +1 -1
  140. package/dist/mint-components/{p-cfa34cf2.system.js → p-33f640f6.system.js} +1 -1
  141. package/dist/mint-components/{p-241d68d4.system.entry.js → p-450a7705.system.entry.js} +1 -1
  142. package/dist/mint-components/p-4841c5e9.system.entry.js +1 -0
  143. package/dist/mint-components/p-4bb1c4b2.system.js +1 -0
  144. package/dist/mint-components/p-4cbd7eec.js +394 -0
  145. package/dist/mint-components/{p-9fe574ca.system.entry.js → p-51aa8c38.system.entry.js} +1 -1
  146. package/dist/mint-components/p-52d15f87.system.js +1 -0
  147. package/dist/mint-components/p-5510be1e.system.entry.js +1 -0
  148. package/dist/mint-components/{p-71f23364.entry.js → p-66d22d46.entry.js} +1 -1
  149. package/dist/mint-components/p-674b82ac.js +1 -0
  150. package/dist/mint-components/p-6ef506ba.entry.js +16 -0
  151. package/dist/mint-components/{p-c024fc32.system.entry.js → p-6fa624ff.system.entry.js} +1 -1
  152. package/dist/mint-components/{p-d932f43d.entry.js → p-704f162e.entry.js} +1 -1
  153. package/dist/mint-components/p-70fddbdd.entry.js +11 -0
  154. package/dist/mint-components/p-780b981b.entry.js +1 -0
  155. package/dist/mint-components/{p-4caaf25a.js → p-7adb141e.js} +1 -1
  156. package/dist/mint-components/p-7b731acd.entry.js +93 -0
  157. package/dist/mint-components/{p-884ac29e.system.entry.js → p-846aff6a.system.entry.js} +1 -1
  158. package/dist/mint-components/p-84a78d09.entry.js +1 -0
  159. package/dist/mint-components/{p-3f290d24.system.js → p-96e339f6.system.js} +11 -11
  160. package/dist/mint-components/p-9711efb7.entry.js +1 -0
  161. package/dist/mint-components/{p-cc7af682.system.js → p-9721a29a.system.js} +2 -2
  162. package/dist/mint-components/{p-b0d4938a.system.entry.js → p-9d41d676.system.entry.js} +1 -1
  163. package/dist/mint-components/{p-d9335f16.js → p-a1e17fd2.js} +1 -1
  164. package/dist/mint-components/p-a27a15c5.system.entry.js +1 -0
  165. package/dist/mint-components/{p-0bdeab70.system.js → p-a3383f54.system.js} +1 -1
  166. package/dist/mint-components/{p-0eb3d919.system.entry.js → p-a91e7c05.system.entry.js} +1 -1
  167. package/dist/mint-components/p-b73a4df4.entry.js +33 -0
  168. package/dist/mint-components/p-be89074c.entry.js +1 -0
  169. package/dist/mint-components/p-c0b07067.system.js +1 -0
  170. package/dist/mint-components/p-c1b1f8ae.system.entry.js +1 -0
  171. package/dist/mint-components/p-c75a3b4a.js +103 -0
  172. package/dist/mint-components/p-c9745c8f.system.js +1 -0
  173. package/dist/mint-components/{p-1abe7884.system.entry.js → p-cf157c6e.system.entry.js} +1 -1
  174. package/dist/mint-components/{p-5366850e.entry.js → p-da71337b.entry.js} +1 -1
  175. package/dist/mint-components/{p-015da96d.entry.js → p-dbb83730.entry.js} +1 -1
  176. package/dist/mint-components/{p-4f22fda2.js → p-dc293b10.js} +1 -1
  177. package/dist/mint-components/{p-8e93e590.entry.js → p-df223bff.entry.js} +1 -1
  178. package/dist/mint-components/{p-e80f9e26.system.entry.js → p-e217afd9.system.entry.js} +1 -1
  179. package/dist/mint-components/{p-fe6fe9cf.entry.js → p-e5d9e709.entry.js} +2 -2
  180. package/dist/mint-components/p-eb998f7b.entry.js +9 -0
  181. package/dist/mint-components/p-f53f5304.system.entry.js +1 -0
  182. package/dist/mint-components/p-f8175201.system.js +1 -0
  183. package/dist/mint-components/p-fb13065a.js +1 -0
  184. package/dist/mint-components/p-fda43e22.system.entry.js +1 -0
  185. package/dist/types/components/sqm-stencilbook/BrandSelector.d.ts +6 -0
  186. package/dist/types/components/sqm-stencilbook/Themes.d.ts +4 -5
  187. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +5 -0
  188. package/dist/types/components/sqm-widget-verification/sqm-widget-verification-controller.d.ts +5 -0
  189. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +5 -0
  190. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +0 -1
  191. package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.d.ts +1 -1
  192. package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +2 -2
  193. package/dist/types/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.d.ts +4 -0
  194. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +1 -1
  195. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +10 -4
  196. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.d.ts +1 -1
  197. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +1 -1
  198. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +10 -0
  199. package/dist/types/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.d.ts +1 -1
  200. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +7 -0
  201. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -1
  202. package/dist/types/components/tax-and-cash/utils.d.ts +1 -1
  203. package/dist/types/components.d.ts +107 -7
  204. package/dist/types/global/styles.d.ts +6 -1
  205. package/dist/types/saasquatch.d.ts +61 -0
  206. package/dist/types/utils/parseStates.d.ts +1 -0
  207. package/docs/docs.docx +0 -0
  208. package/docs/raisins.json +1 -1
  209. package/grapesjs/grapesjs.js +1 -1
  210. package/package.json +2 -1
  211. package/dist/cjs/sqm-invoice-table-view-19ca10fa.js +0 -2038
  212. package/dist/esm/sqm-invoice-table-view-b7e91eef.js +0 -2022
  213. package/dist/esm-es5/ShadowViewAddon-5f9b6d07.js +0 -1
  214. package/dist/esm-es5/email-registration-view-b1c858ee.js +0 -1
  215. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +0 -1
  216. package/dist/esm-es5/sqm-big-stat_41.entry.js +0 -1
  217. package/dist/esm-es5/sqm-invoice-table-view-b7e91eef.js +0 -1
  218. package/dist/mint-components/p-0480b155.system.entry.js +0 -1
  219. package/dist/mint-components/p-33c96e14.entry.js +0 -16
  220. package/dist/mint-components/p-3e604cad.js +0 -1
  221. package/dist/mint-components/p-5cd684b2.entry.js +0 -9
  222. package/dist/mint-components/p-6427e963.entry.js +0 -1
  223. package/dist/mint-components/p-6798d563.system.js +0 -1
  224. package/dist/mint-components/p-693fc880.system.js +0 -1
  225. package/dist/mint-components/p-6c1d0367.entry.js +0 -33
  226. package/dist/mint-components/p-72ff8268.js +0 -1
  227. package/dist/mint-components/p-8530290b.entry.js +0 -258
  228. package/dist/mint-components/p-9cf80e85.system.entry.js +0 -1
  229. package/dist/mint-components/p-a1091368.system.js +0 -1
  230. package/dist/mint-components/p-a68932b0.system.entry.js +0 -1
  231. package/dist/mint-components/p-af96b482.entry.js +0 -205
  232. package/dist/mint-components/p-bf25f63a.js +0 -394
  233. package/dist/mint-components/p-c36506f6.system.entry.js +0 -1
  234. package/dist/mint-components/p-d0064d54.system.entry.js +0 -1
  235. package/dist/mint-components/p-d5e9906e.system.js +0 -1
  236. package/dist/mint-components/p-f0fdbd82.entry.js +0 -1
  237. /package/dist/collection/components/tax-and-cash/{sqm-tax-and-cash/data.js → data.js} +0 -0
  238. /package/dist/types/components/tax-and-cash/{sqm-tax-and-cash/data.d.ts → data.d.ts} +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  const index = require('./index-a29c60ef.js');
4
4
  const stencilHooks_module = require('./stencil-hooks.module-3a336b0f.js');
5
- const global = require('./global-a38a094f.js');
5
+ const global = require('./global-d62c5561.js');
6
6
  const index_module = require('./index.module-ee84433d.js');
7
7
  const cjs = require('./cjs-1066ec21.js');
8
8
  const utils = require('./utils-6847bc06.js');
@@ -17,6 +17,48 @@ const index$1 = require('./index-8c6255f5.js');
17
17
  const utilities = require('./utilities-78f5e169.js');
18
18
  const sqmPortalContainerView = require('./sqm-portal-container-view-4f15143a.js');
19
19
 
20
+ function BigStatView(props) {
21
+ const { statvalue, flexReverse, alignment, statTextColor, statFontSize, descriptionTextColor, descriptionFontSize, statFontWeight, } = props;
22
+ // Dependent on props, not feasible to move out
23
+ const style = {
24
+ Container: {
25
+ display: "flex",
26
+ // height: "inherit",
27
+ // "justify-content": "space-between",
28
+ "flex-direction": `${flexReverse ? "column-reverse" : "column"}`,
29
+ "align-items": `${alignment === "left"
30
+ ? "flex-start"
31
+ : alignment === "right"
32
+ ? "flex-end"
33
+ : "center"}`,
34
+ },
35
+ Stat: {
36
+ "font-size": statFontSize
37
+ ? `${statFontSize}px`
38
+ : "var(--sl-font-size-xx-large)",
39
+ "text-align": alignment,
40
+ color: statTextColor || "var(--sqm-text)",
41
+ lineHeight: "35px",
42
+ fontWeight: statFontWeight || "var(--sl-font-weight-normal)",
43
+ },
44
+ Description: {
45
+ "font-size": descriptionFontSize
46
+ ? `${descriptionFontSize}px`
47
+ : "var(--sl-font-size-small)",
48
+ "font-weight": "var(--sl-font-weight-normal)",
49
+ color: descriptionTextColor || "var(--sqm-text)",
50
+ "text-align": alignment,
51
+ lineHeight: "20px",
52
+ },
53
+ };
54
+ const sheet = JSS.createStyleSheet(style);
55
+ const styleString = sheet.toString();
56
+ return (index.h("div", { part: "stat-wrapper", class: sheet.classes.Container },
57
+ index.h("style", { type: "text/css" }, styleString),
58
+ index.h("div", { part: "stat-value", class: sheet.classes.Stat }, statvalue),
59
+ index.h("div", { part: "stat-description", class: sheet.classes.Description }, props.labelSlot)));
60
+ }
61
+
20
62
  const medium = {
21
63
  facebook: { color: "#1877f2", text: "#fff", icon: "facebook" },
22
64
  twitter: { color: "#000000", text: "#fff", icon: "twitter-x" },
@@ -93,479 +135,208 @@ function ShareButtonView(props, children) {
93
135
  !props.hidetext && children)));
94
136
  }
95
137
 
96
- function LeaderboardView(props) {
97
- var _a, _b, _c;
98
- const { states, data, elements } = props;
99
- const { styles } = states;
138
+ function StatContainerView(props, children) {
139
+ const divideSpace = () => {
140
+ const spaceValue = getComputedStyle(document.documentElement).getPropertyValue(`--sl-spacing-${props.space}`);
141
+ return `${Math.floor(parseInt(spaceValue) / 2)}rem`;
142
+ };
143
+ // take alignment variable and convert it to CSS flexbox alignment
144
+ const alignment = props.alignment === "center"
145
+ ? "center"
146
+ : props.alignment === "right"
147
+ ? "flex-end"
148
+ : "flex-start";
149
+ // Dependent on props, not feasible to move out
100
150
  const style = {
101
- Leaderboard: {
102
- "& table": {
103
- width: "100%",
104
- borderCollapse: "collapse",
105
- background: styles.background || "transparent",
106
- borderRadius: styles.borderRadius ? `${styles.borderRadius}px` : "0",
107
- },
108
- "& th": {
109
- textAlign: "left",
110
- padding: "var(--sl-spacing-medium)",
111
- paddingTop: "0",
112
- fontSize: "var(--sl-font-size-medium)",
113
- fontWeight: "var(--sl-font-weight-semibold)",
151
+ StatContainer: {
152
+ width: "100%",
153
+ display: "flex",
154
+ flexWrap: "wrap",
155
+ alignItems: "center",
156
+ justifyContent: alignment,
157
+ flexDirection: "row",
158
+ gap: `var(--sl-spacing-${props.gap})`,
159
+ // Apply border styles conditionally based on the hideBorder prop
160
+ "& > *": {
161
+ "border-right": props.hideBorder
162
+ ? "none"
163
+ : "1px solid var(--sqm-text-subdued)",
164
+ "padding-right": divideSpace(),
114
165
  },
115
- "& tr:not(:first-child)": {
116
- borderTop: `1px solid ${styles.borderColor || "var(--sl-color-neutral-200)"}`,
166
+ "& > :last-child": {
167
+ "border-right": "none",
117
168
  },
118
- "& td": {
119
- fontSize: "var(--sl-font-size-medium)",
120
- fontWeight: "var(--sl-font-weight-normal)",
169
+ "& > ::slotted(*)": {
170
+ "border-right": props.hideBorder
171
+ ? "none"
172
+ : "1px solid var(--sqm-text-subdued)",
173
+ "padding-right": divideSpace(),
121
174
  },
122
- "& .ellipses": {
123
- textAlign: "left",
124
- padding: "0",
125
- color: styles.textColor || "var(--sqm-text)",
126
- paddingLeft: "25%",
175
+ "& > ::slotted(*:last-child)": {
176
+ "border-right": "none",
127
177
  },
128
- "& .highlight": {
129
- background: styles.viewingUserHighlightColor ||
130
- "var(--sqm-accent-color-background)",
131
- "& td, th": {
132
- color: styles.viewingUserHighlightTextColor || "var(--sqm-text)",
178
+ "@media screen and (max-width: 430px)": {
179
+ "& > ::slotted(*)": {
180
+ borderRight: "none",
133
181
  },
134
182
  },
135
- "& td, th": {
136
- color: styles.textColor || "var(--sqm-text)",
137
- padding: "var(--sl-spacing-medium)",
138
- },
139
- "& .User": {
140
- width: "100%",
141
- },
142
- "& .Score": {
143
- width: "auto",
144
- whiteSpace: "nowrap",
145
- },
146
- "& .Rank": {
147
- whiteSpace: "nowrap",
148
- },
149
- "& .fullWidth": {
150
- width: "100%",
151
- },
152
183
  },
153
- };
154
- const sheet = JSS.createStyleSheet(style);
155
- const styleString = sheet.toString();
156
- const vanillaStyle = `
157
- :host{
158
- display: block;
159
- }
160
- `;
161
- if (states.isEssentials) {
162
- return (index.h("sqm-empty", { "empty-state-image": "https://res.cloudinary.com/saasquatch/image/upload/v1715360191/squatch-assets/Leaderboard_Not_Available.svg", "empty-state-header": "Leaderboards aren\u2019t available on your plan", "empty-state-text": "Contact {supportText} to upgrade your plan and start leveraging gamification in your program.", "support-text": "Support" }));
163
- }
164
- if (states.loading) {
165
- return (index.h("div", { class: sheet.classes.Leaderboard, style: { width: styles.width || "100%" } },
166
- index.h("style", { type: "text/css" },
167
- styleString,
168
- vanillaStyle),
169
- index.h("table", null, [...Array(10)].map(() => {
170
- return (index.h("tr", null,
171
- index.h("td", null,
172
- index.h("sl-skeleton", null))));
173
- }))));
174
- }
175
- if (!states.hasLeaders)
176
- return elements.empty;
177
- let userSeenFlag = false;
178
- const getUsersName = (user) => {
179
- if (!user.firstName && !user.lastInitial)
180
- return styles.anonymousUser;
181
- const { firstName, lastInitial } = user;
182
- if (firstName && lastInitial)
183
- return `${firstName} ${lastInitial}`;
184
- if (firstName || lastInitial)
185
- return firstName || lastInitial;
186
- return styles.anonymousUser;
187
- };
188
- const getRankCellText = (userRank, isViewingUsersRow) => {
189
- if (!userRank) {
190
- return styles.hideNames ? `${styles.viewingUserText}` : "-";
191
- }
192
- const viewingUserText = ` - ${styles.viewingUserText}`;
193
- return styles.rankSuffix
194
- ? global.intl.formatMessage({
195
- id: "rank",
196
- defaultMessage: styles.rankSuffix,
197
- }, {
198
- rank: userRank,
199
- }) + `${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`
200
- : `${userRank} ${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`;
201
- };
202
- return (index.h("div", { class: sheet.classes.Leaderboard, part: "sqm-base", style: { width: styles.width || "100%" } },
203
- index.h("style", { type: "text/css" },
204
- styleString,
205
- vanillaStyle),
206
- index.h("table", { part: "sqm-table" },
207
- index.h("tr", null,
208
- styles.showRank && (index.h("th", { class: `Rank ${styles.hideNames ? "fullWidth" : ""}` }, styles.rankheading)),
209
- !styles.hideNames && index.h("th", { class: "User" }, styles.usersheading),
210
- index.h("th", { class: "Score" }, styles.statsheading)), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
211
- _a.map((user) => {
212
- var _a, _b;
213
- if (user.rowNumber === ((_a = data.viewerRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
214
- userSeenFlag = true;
215
- const isViewingUsersRow = !styles.hideViewer && user.rowNumber === ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rowNumber);
216
- return (index.h("tr", { class: isViewingUsersRow ? "highlight" : "" },
217
- styles.showRank && (index.h("td", { class: "Rank" }, getRankCellText(user.rank, isViewingUsersRow))),
218
- !styles.hideNames && index.h("td", { class: "User" }, getUsersName(user)),
219
- index.h("td", { class: "Score" }, user.textValue)));
220
- }),
221
- !userSeenFlag && !styles.hideViewer && (index.h("tr", null,
222
- index.h("td", { colSpan: 100, class: "ellipses" },
223
- index.h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
224
- !userSeenFlag && !styles.hideViewer && (index.h("tr", { class: "highlight" },
225
- styles.showRank && (index.h("td", { class: "Rank" }, getRankCellText((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rank, true))),
226
- !styles.hideNames && (index.h("td", { class: "User" }, getUsersName(data.viewerRank || {}))),
227
- index.h("td", { class: "Score" }, ((_c = data.viewerRank) === null || _c === void 0 ? void 0 : _c.textValue) || "0"))))));
228
- }
229
-
230
- function BigStatView(props) {
231
- const { statvalue, flexReverse, alignment, statTextColor, statFontSize, descriptionTextColor, descriptionFontSize, statFontWeight, } = props;
232
- // Dependent on props, not feasible to move out
233
- const style = {
234
- Container: {
184
+ StatFrame: {
235
185
  display: "flex",
236
- // height: "inherit",
237
- // "justify-content": "space-between",
238
- "flex-direction": `${flexReverse ? "column-reverse" : "column"}`,
239
- "align-items": `${alignment === "left"
240
- ? "flex-start"
241
- : alignment === "right"
242
- ? "flex-end"
243
- : "center"}`,
244
- },
245
- Stat: {
246
- "font-size": statFontSize
247
- ? `${statFontSize}px`
248
- : "var(--sl-font-size-xx-large)",
249
- "text-align": alignment,
250
- color: statTextColor || "var(--sqm-text)",
251
- lineHeight: "35px",
252
- fontWeight: statFontWeight || "var(--sl-font-weight-normal)",
253
186
  },
254
- Description: {
255
- "font-size": descriptionFontSize
256
- ? `${descriptionFontSize}px`
257
- : "var(--sl-font-size-small)",
258
- "font-weight": "var(--sl-font-weight-normal)",
259
- color: descriptionTextColor || "var(--sqm-text)",
260
- "text-align": alignment,
261
- lineHeight: "20px",
187
+ BorderFix: {
188
+ "border-right": "1px solid transparent",
189
+ width: "0px",
190
+ "margin-left": "-1px",
262
191
  },
263
192
  };
264
193
  const sheet = JSS.createStyleSheet(style);
265
194
  const styleString = sheet.toString();
266
- return (index.h("div", { part: "stat-wrapper", class: sheet.classes.Container },
267
- index.h("style", { type: "text/css" }, styleString),
268
- index.h("div", { part: "stat-value", class: sheet.classes.Stat }, statvalue),
269
- index.h("div", { part: "stat-description", class: sheet.classes.Description }, props.labelSlot)));
195
+ return (index.h("div", { class: sheet.classes.StatFrame, part: "sqm-base" },
196
+ index.h("div", { class: sheet.classes.StatContainer, part: "sqm-inner-container" },
197
+ index.h("style", { type: "text/css" }, styleString),
198
+ children),
199
+ index.h("div", { class: sheet.classes.BorderFix, part: "sqm-border" })));
270
200
  }
271
201
 
272
- function PortalFrameView(props, children) {
273
- const { data, notFullScreen, border } = props;
202
+ function PortalChangePasswordView(props) {
203
+ const { states, callbacks } = props;
274
204
  const style = {
275
- HostBlock: mixins.HostBlock,
276
- Frame: {
277
- display: "flex",
278
- "flex-direction": "column",
279
- "box-sizing": "border-box",
280
- "&:nth-child(2)": {
281
- background: props.backgroundColor,
205
+ Dialog: {
206
+ padding: "0",
207
+ "&::part(panel)": {
208
+ background: "var(--sqm-portal-background)",
209
+ borderRadius: "var(--sqm-border-radius-normal, var(--sl-border-radius-medium))",
210
+ },
211
+ "&::part(close-button)": {
212
+ "margin-top": "var(--sl-spacing-medium)",
213
+ },
214
+ "&::part(body)": {
215
+ padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
282
216
  },
283
217
  },
284
- FooterWrapper: {
285
- width: "100%",
286
- "max-width": "100%",
287
- padding: "var(--sl-spacing-medium) var(--sl-spacing-x-large)",
288
- background: props.headerAndFooterBackgroundColor,
289
- display: "flex",
290
- "justify-content": "flex-end",
291
- "align-items": "center",
292
- "box-sizing": "border-box",
293
- borderTop: border,
294
- "margin-top": "auto",
218
+ Error: {
219
+ "&::part(erroralert-base)": {
220
+ "margin-bottom": "15px",
221
+ },
295
222
  },
296
- HeaderWrapper: {
297
- width: "100%",
298
- "max-width": "100%",
299
- "box-sizing": "border-box",
300
- display: "flex",
301
- "justify-content": "space-between",
302
- padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
303
- "align-items": "center",
304
- borderBottom: border,
305
- background: props.headerAndFooterBackgroundColor,
306
- "@media screen and (max-width: 499px)": {
307
- "flex-direction": "row-reverse",
308
- "justify-content": "flex-end",
309
- padding: "0",
223
+ Success: {
224
+ "&::part(successalert-base)": {
225
+ "margin-bottom": "15px",
310
226
  },
311
227
  },
228
+ InputContainer: {
229
+ "& > :not(:last-child)": {
230
+ "margin-bottom": "var(--sl-spacing-x-large)",
231
+ },
232
+ },
233
+ CancelButton: {
234
+ margin: "var(--sl-spacing-large) auto",
235
+ width: "100%",
236
+ },
237
+ PasswordField: {
238
+ marginBottom: "var(--sl-spacing-large) !important",
239
+ display: "block",
240
+ },
241
+ ChangePasswordButton: {
242
+ paddingTop: "var(--sl-spacing-x-large)",
243
+ },
312
244
  };
313
245
  const sheet = JSS.createStyleSheet(style);
314
246
  const styleString = sheet.toString();
315
- return (index.h("div", { style: { minHeight: notFullScreen ? "100%" : "100vh" }, class: sheet.classes.Frame, part: "sqm-base" },
247
+ return (index.h("div", null,
316
248
  index.h("style", { type: "text/css" }, styleString),
317
- index.h("div", { class: sheet.classes.HeaderWrapper, part: "sqm-header" },
318
- data.header,
319
- index.h("slot", { name: "sqm-navigation-menu" })),
320
- children,
321
- index.h("div", { class: sheet.classes.FooterWrapper, part: "sqm-footer" }, data.footer)));
249
+ index.h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, "onSl-hide": () => callbacks.setOpen(false) },
250
+ index.h(sqmPortalContainerView.PortalSectionView, Object.assign({}, {
251
+ labelMargin: "x-large",
252
+ padding: "none",
253
+ label: (index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
254
+ content: (index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
255
+ states.error && (index.h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
256
+ index.h("div", { part: "erroralert-text" }, states.error))),
257
+ states.success && (index.h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
258
+ index.h("div", { part: "successalert-text" }, states.content.successMessage))),
259
+ index.h("sl-form", { "onSl-submit": callbacks.submit },
260
+ index.h("div", { class: sheet.classes.InputContainer },
261
+ index.h("sqm-password-field", { exportparts: "input-label: input-label", class: sheet.classes.PasswordField, fieldLabel: states.content.passwordFieldLabel, meetsRequirementsText: states.content.meetsRequirementsText, doesNotMeetRequirementsText: states.content.doesNotMeetRequirementsText, minErrorText: states.content.minErrorText, uppercaseErrorText: states.content.uppercaseErrorText, lowercaseErrorText: states.content.lowercaseErrorText, hasErrorText: states.content.hasErrorText }),
262
+ index.h("sl-input", { exportparts: "label: input-label, base: input-base", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, required: true, togglePassword: true, disabled: states.loading, type: "password" })),
263
+ index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
264
+ index.h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", exportparts: "base: primarybutton-base", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
265
+ index.h("sl-button", { class: sheet.classes.CancelButton, type: "text", exportparts: "base: secondarybutton-base", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
266
+ }))),
267
+ index.h(sqmPortalContainerView.PortalSectionView, Object.assign({}, {
268
+ labelMargin: "x-large",
269
+ padding: "xxx-large",
270
+ label: (index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
271
+ content: (index.h("sl-button", { exportparts: "base: primarybutton-base", onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
272
+ }),
273
+ index.h("style", { type: "text/css" }, styleString))));
322
274
  }
323
275
 
324
- const EditProfileView = (props) => {
325
- var _a, _b, _c, _d;
326
- const { states, callbacks } = props;
327
- const { text } = states;
328
- const { errors } = states.formState;
329
- if (states.showEdit) {
330
- return (index.h("div", { class: `CardWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
331
- index.h("h2", { part: "sqm-header", style: {
332
- fontSize: "var(--sl-font-size-x-large)",
333
- margin: "0px",
334
- textAlign: "center",
335
- } }, text.editprofileheader),
336
- index.h("form", { class: "FormWrapper", onSubmit: callbacks.onSubmit },
337
- index.h("div", { class: "FormSection" },
338
- states.formState.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
339
- index.h("div", { part: "erroralert-text" }, states.formState.error))),
340
- index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: states.formState.firstName, onInput: callbacks.onChange, label: text.firstnametext, disabled: states.loading }, (errors.firstName && errors.firstName.status !== "valid"
341
- ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
342
- : []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
343
- ? errors.firstName.message
344
- : undefined })),
345
- index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: states.formState.lastName, onInput: callbacks.onChange, label: text.lastnametext, disabled: states.loading, id: "lastName", name: "lastName" }, (errors.lastName && errors.lastName.status !== "valid"
346
- ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
347
- : []), { error: errors.lastName && errors.lastName.status !== "valid"
348
- ? errors.lastName.message
349
- : undefined }))),
350
- text.showregion && states.formState.currentRegion && (index.h("sl-input", { exportparts: "label: input-label, base: input-base", disabled: true, value: states.formState.currentRegion, label: text.currentregiontext, id: "currentRegion", name: "currentRegion" })),
351
- index.h("div", { class: "ButtonWrapper" },
352
- index.h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
353
- callbacks.onSubmit(e);
354
- }, submit: true, exportparts: "base: primarybutton-base" }, text.updatetext),
355
- index.h("sl-button", { onClick: () => {
356
- callbacks.setShowEdit(false);
357
- }, exportparts: "base: secondarybutton-base" }, text.canceltext)))));
276
+ function PoweredByImg({ color = "#A6A6A6", width = 120, height = 16, }) {
277
+ return (index.h("svg", { width: width, height: height, viewBox: "0 0 1662 254", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
278
+ index.h("path", { d: "M801.082 253.58L869.382 1.67969", stroke: color, "stroke-width": "3" }),
279
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M125.682 42.48C123.882 42.48 121.982 42.78 120.382 43.48C118.682 44.18 117.182 45.18 115.882 46.48C114.582 47.68 113.582 49.28 112.882 50.98C112.182 52.68 111.882 54.48 111.982 56.28C112.282 59.68 113.882 63.08 116.382 65.38C118.982 67.78 122.382 68.98 125.782 68.98C129.282 68.98 132.682 67.58 135.182 65.38C137.782 62.98 139.382 59.78 139.582 56.28C139.582 54.38 139.282 52.68 138.682 50.98C137.982 49.28 136.982 47.78 135.682 46.48C134.382 45.18 132.882 44.18 131.182 43.48C129.282 42.78 127.582 42.48 125.682 42.48Z", fill: color }),
280
+ index.h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
281
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M231.481 104.18C238.781 93.4799 251.181 87.3799 266.281 87.3799C290.981 87.3799 307.581 103.28 307.381 127.08V187.48H286.781V132.38C286.781 116.38 278.281 107.18 263.381 107.18C248.481 107.18 237.981 117.68 237.981 132.68V187.48H217.281V132.38C217.281 116.38 208.781 107.18 193.881 107.18C178.981 107.18 168.481 117.68 168.481 132.68V187.48H147.981V89.3799H168.681V97.8799C178.081 88.8799 190.181 87.4799 197.081 87.4799C211.881 87.4799 224.381 93.5799 231.481 104.18Z", fill: color }),
282
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M370.781 87.48C358.581 87.48 347.981 91.38 339.981 98.38V89.28H319.481V226.08H339.981V177.78C347.881 185.08 358.581 188.78 370.781 188.78C398.781 188.78 419.881 166.88 419.881 138.08C419.981 109.28 398.781 87.48 370.781 87.48ZM368.881 169.58C351.481 169.58 338.881 156.38 338.881 138.28C338.881 120.38 351.381 106.98 368.881 106.98C386.281 106.98 398.881 120.08 398.881 138.28C398.881 156.48 386.381 169.58 368.881 169.58Z", fill: color }),
283
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M701.782 169.88C707.682 169.88 714.082 167.58 719.582 163.98L721.482 162.88L731.482 178.68L729.782 179.88C721.282 186.28 710.982 189.58 700.382 189.58C678.082 189.58 665.782 176.38 665.782 152.28V108.68H645.682V89.3799H665.782V59.8799H686.482V89.2798H725.682V108.48H686.482V151.88C686.482 163.38 691.982 169.88 701.782 169.88Z", fill: color }),
284
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M551.282 239.88C549.982 239.88 548.782 240.28 547.682 240.88C546.682 241.58 545.782 242.58 545.382 243.68C544.882 244.78 544.782 246.08 545.082 247.28C545.282 248.58 545.882 249.68 546.882 250.48C547.782 251.38 548.882 251.98 550.082 252.28C551.382 252.48 552.582 252.38 553.782 251.98C554.882 251.48 555.982 250.78 556.582 249.68C557.282 248.68 557.582 247.38 557.582 246.18C557.582 244.48 556.982 242.88 555.682 241.68C554.482 240.48 552.882 239.88 551.282 239.88Z", fill: color }),
285
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M586.182 210.78C592.282 210.78 597.582 213.08 601.082 217.18L601.482 217.68L596.282 223.08L595.782 222.58C594.482 221.18 593.082 220.18 591.382 219.48C589.682 218.78 587.882 218.38 586.082 218.48C578.882 218.48 573.682 224.08 573.682 231.58C573.682 239.18 578.882 244.78 586.082 244.78C589.782 244.68 593.282 243.18 595.882 240.58L596.382 240.08L601.382 245.68L600.982 246.08C597.182 250.18 591.982 252.18 586.082 252.18C574.082 252.18 565.382 243.58 565.382 231.58C565.582 219.48 574.182 210.78 586.182 210.78Z", fill: color }),
286
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M633.782 210.78C621.682 210.78 612.582 219.68 612.582 231.38C612.582 243.08 621.682 251.98 633.782 251.98C645.882 251.98 654.882 243.08 654.882 231.38C655.082 219.78 645.982 210.78 633.782 210.78ZM633.782 244.78C626.382 244.78 620.782 239.28 620.782 231.58C620.782 223.88 626.182 218.48 633.782 218.48C641.182 218.48 646.782 224.08 646.782 231.58C646.782 238.98 641.382 244.78 633.782 244.78Z", fill: color }),
287
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M723.982 228.78C723.982 222.18 720.382 218.28 714.082 218.28C707.682 218.28 703.382 222.78 702.982 228.98V252.18H695.082V228.68C695.082 222.08 691.482 218.18 685.182 218.18C680.082 218.18 674.482 221.48 674.482 228.88V252.08H666.582V211.38H674.482V214.78L676.682 213.28C679.582 211.38 683.082 210.48 686.582 210.48C692.082 210.48 696.782 212.48 699.882 216.08L700.882 217.28L701.882 216.08C704.782 212.48 709.582 210.48 715.182 210.48C725.082 210.48 731.982 217.08 731.982 226.38V251.88H724.082V228.68H723.982V228.78Z", fill: color }),
288
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M511.681 89.4797V98.7797C503.681 91.4797 493.181 87.6797 480.981 87.6797C452.981 87.6797 431.981 109.68 431.981 138.68C431.981 167.78 453.081 189.68 480.981 189.68C493.181 189.68 503.681 185.78 511.681 178.38V187.68H532.381V89.4797H511.681ZM482.881 169.88C465.481 169.88 452.781 156.58 452.781 138.48C452.781 120.48 465.281 106.98 482.881 106.98C500.481 106.98 512.781 120.08 512.781 138.48C512.781 156.68 500.181 169.88 482.881 169.88Z", fill: color }),
289
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M595.281 107.08C604.181 107.08 611.781 110.38 618.781 116.98L620.481 118.68L633.981 104.58L632.581 102.98C623.781 92.98 610.781 87.48 595.781 87.48C565.981 87.48 544.481 109.08 544.481 138.48C544.481 167.98 565.981 189.48 595.781 189.48C610.481 189.48 623.681 183.98 632.581 174.08L633.981 172.58L620.981 158.18L619.281 159.88C612.481 166.48 603.981 169.98 595.481 169.98C578.381 169.98 565.681 156.68 565.681 138.58C565.581 120.58 577.881 107.08 595.281 107.08Z", fill: color }),
290
+ index.h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
291
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M231.481 104.18C238.781 93.4799 251.181 87.3799 266.281 87.3799C290.981 87.3799 307.581 103.28 307.381 127.08V187.48H286.781V132.38C286.781 116.38 278.281 107.18 263.381 107.18C248.481 107.18 237.981 117.68 237.981 132.68V187.48H217.281V132.38C217.281 116.38 208.781 107.18 193.881 107.18C178.981 107.18 168.481 117.68 168.481 132.68V187.48H147.981V89.3799H168.681V97.8799C178.081 88.8799 190.181 87.4799 197.081 87.4799C211.881 87.4799 224.381 93.5799 231.481 104.18Z", fill: color }),
292
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M370.781 87.48C358.581 87.48 347.981 91.38 339.981 98.38V89.28H319.481V226.08H339.981V177.78C347.881 185.08 358.581 188.78 370.781 188.78C398.781 188.78 419.881 166.88 419.881 138.08C419.981 109.28 398.781 87.48 370.781 87.48ZM368.881 169.58C351.481 169.58 338.881 156.38 338.881 138.28C338.881 120.38 351.381 106.98 368.881 106.98C386.281 106.98 398.881 120.08 398.881 138.28C398.881 156.48 386.381 169.58 368.881 169.58Z", fill: color }),
293
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M701.782 169.88C707.682 169.88 714.082 167.58 719.582 163.98L721.482 162.88L731.482 178.68L729.782 179.88C721.282 186.28 710.982 189.58 700.382 189.58C678.082 189.58 665.782 176.38 665.782 152.28V108.68H645.682V89.3799H665.782V59.8799H686.482V89.2798H725.682V108.48H686.482V151.88C686.482 163.38 691.982 169.88 701.782 169.88Z", fill: color }),
294
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M511.681 89.4797V98.7797C503.681 91.4797 493.181 87.6797 480.981 87.6797C452.981 87.6797 431.981 109.68 431.981 138.68C431.981 167.78 453.081 189.68 480.981 189.68C493.181 189.68 503.681 185.78 511.681 178.38V187.68H532.381V89.4797H511.681ZM482.881 169.88C465.481 169.88 452.781 156.58 452.781 138.48C452.781 120.48 465.281 106.98 482.881 106.98C500.481 106.98 512.781 120.08 512.781 138.48C512.781 156.68 500.181 169.88 482.881 169.88Z", fill: color }),
295
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M595.281 107.08C604.181 107.08 611.781 110.38 618.781 116.98L620.481 118.68L633.981 104.58L632.581 102.98C623.781 92.98 610.781 87.48 595.781 87.48C565.981 87.48 544.481 109.08 544.481 138.48C544.481 167.98 565.981 189.48 595.781 189.48C610.481 189.48 623.681 183.98 632.581 174.08L633.981 172.58L620.981 158.18L619.281 159.88C612.481 166.48 603.981 169.98 595.481 169.98C578.381 169.98 565.681 156.68 565.681 138.58C565.581 120.58 577.881 107.08 595.281 107.08Z", fill: color }),
296
+ index.h("path", { d: "M34.6815 112.78C40.6815 112.78 46.5815 114.18 51.8815 116.68C57.2815 119.18 62.0815 122.78 65.9815 127.28C67.9815 122.68 69.0815 117.78 69.0815 112.88C69.0815 108.38 68.1815 103.88 66.4815 99.8799C64.6815 95.6799 62.1815 91.9799 58.9815 88.8799C55.7815 85.7799 51.9815 83.2799 47.7815 81.4799C43.5815 79.7799 39.0815 78.8799 34.5815 78.8799C30.0815 78.8799 25.5815 79.6799 21.3815 81.4799C17.1815 83.1799 13.3815 85.7799 10.1815 88.8799C6.98154 91.9799 4.48154 95.7799 2.68154 99.8799C0.881541 104.08 0.081543 108.38 0.081543 112.88C0.181543 117.88 1.18154 122.78 3.18154 127.28C7.08154 122.68 11.8815 119.18 17.1815 116.68C22.7815 113.98 28.7815 112.68 34.6815 112.78Z", fill: color }),
297
+ index.h("path", { d: "M69.1817 153.48C69.1817 146.68 67.1817 140.18 63.2817 134.48C59.4817 128.88 54.0817 124.48 47.7817 121.88C41.4817 119.28 34.4817 118.68 27.7817 119.88C21.0817 121.28 14.8817 124.48 10.0817 129.28C5.28166 134.08 1.88166 140.08 0.681661 146.78C-0.718339 153.48 0.0816607 160.18 2.68166 166.48C5.28166 172.78 9.68166 178.08 15.4817 181.78C21.0817 185.58 27.7817 187.48 34.6817 187.48C43.7817 187.38 52.5817 183.88 59.0817 177.38C65.6817 170.98 69.1817 162.58 69.1817 153.48Z", fill: color }),
298
+ index.h("path", { d: "M69.1817 34.9799C69.1817 28.1799 67.1817 21.6799 63.2817 15.9799C59.4817 10.3799 54.1817 5.9799 47.7817 3.3799C41.4817 0.779901 34.4817 0.1799 27.7817 1.3799C21.0817 2.7799 14.8817 5.97986 10.0817 10.7799C5.28166 15.5799 1.88166 21.5799 0.681661 28.2799C-0.718339 34.9799 0.0816607 41.6799 2.68166 47.9799C5.28166 54.2799 9.68166 59.5799 15.4817 63.2799C21.0817 67.0799 27.7817 68.9799 34.6817 68.9799C43.8817 68.9799 52.6817 65.3799 59.1817 58.9799C65.5817 52.6799 69.1817 43.8799 69.1817 34.9799Z", fill: color }),
299
+ index.h("path", { d: "M962.664 203.95C953.044 203.95 945.244 201.285 939.264 195.955C933.284 190.495 930.294 183.41 930.294 174.7C930.294 165.08 933.739 157.605 940.629 152.275C947.649 146.945 957.464 144.28 970.074 144.28H993.864V138.43C993.864 129.72 991.589 123.09 987.039 118.54C982.619 113.86 976.184 111.52 967.734 111.52C962.014 111.52 956.749 112.885 951.939 115.615C947.129 118.345 943.229 122.18 940.239 127.12L933.999 120.295C937.639 114.575 942.384 110.22 948.234 107.23C954.214 104.11 960.974 102.55 968.514 102.55C979.694 102.55 988.404 105.605 994.644 111.715C1001.01 117.695 1004.2 126.015 1004.2 136.675V184.255C1004.2 188.805 1004.98 194.72 1006.54 202H997.569C996.399 199.14 995.554 194.07 995.034 186.79H994.644C990.874 192.25 986.259 196.475 980.799 199.465C975.339 202.455 969.294 203.95 962.664 203.95ZM962.664 195.175C968.124 195.175 973.259 194.07 978.069 191.86C982.879 189.52 986.714 186.465 989.574 182.695C992.434 178.795 993.864 174.7 993.864 170.41V152.665H969.489C960.389 152.665 953.239 154.615 948.039 158.515C942.969 162.415 940.434 167.81 940.434 174.7C940.434 180.68 942.514 185.62 946.674 189.52C950.834 193.29 956.164 195.175 962.664 195.175Z", fill: color }),
300
+ index.h("path", { d: "M1067.55 203.95C1055.07 203.95 1045.25 199.27 1038.1 189.91C1030.95 180.55 1027.38 167.745 1027.38 151.495C1027.38 136.415 1031.02 124.52 1038.3 115.81C1045.71 106.97 1055.72 102.55 1068.33 102.55C1074.7 102.55 1080.55 104.045 1085.88 107.035C1091.21 110.025 1095.5 114.25 1098.75 119.71H1099.14V57.3101H1109.67V178.21C1109.67 189.13 1109.86 197.06 1110.25 202H1100.89C1100.63 197.84 1100.5 192.12 1100.5 184.84H1100.11C1097.12 190.69 1092.7 195.37 1086.85 198.88C1081 202.26 1074.57 203.95 1067.55 203.95ZM1068.13 195.175C1077.23 195.175 1084.64 192.185 1090.36 186.205C1096.21 180.225 1099.14 172.49 1099.14 163V146.815C1099.14 135.895 1096.41 127.25 1090.95 120.88C1085.49 114.38 1078.08 111.13 1068.72 111.13C1059.1 111.13 1051.49 114.77 1045.9 122.05C1040.44 129.2 1037.71 139.145 1037.71 151.885C1037.71 165.275 1040.44 175.87 1045.9 183.67C1051.36 191.34 1058.77 195.175 1068.13 195.175Z", fill: color }),
301
+ index.h("path", { d: "M1208.57 104.5L1172.3 202H1161.96L1125.5 104.5H1136.61L1167.03 189.715L1197.45 104.5H1208.57Z", fill: color }),
302
+ index.h("path", { d: "M1261.51 203.95C1252.54 203.95 1244.61 201.87 1237.72 197.71C1230.96 193.55 1225.7 187.635 1221.93 179.965C1218.29 172.295 1216.47 163.39 1216.47 153.25C1216.47 143.11 1218.29 134.205 1221.93 126.535C1225.7 118.865 1230.96 112.95 1237.72 108.79C1244.61 104.63 1252.54 102.55 1261.51 102.55C1270.48 102.55 1278.35 104.63 1285.11 108.79C1292 112.95 1297.33 118.865 1301.1 126.535C1304.87 134.205 1306.75 143.11 1306.75 153.25C1306.75 163.39 1304.87 172.295 1301.1 179.965C1297.33 187.635 1292 193.55 1285.11 197.71C1278.35 201.87 1270.48 203.95 1261.51 203.95ZM1261.51 195.37C1268.4 195.37 1274.45 193.615 1279.65 190.105C1284.98 186.595 1289.07 181.655 1291.93 175.285C1294.79 168.915 1296.22 161.57 1296.22 153.25C1296.22 144.93 1294.79 137.585 1291.93 131.215C1289.07 124.845 1284.98 119.905 1279.65 116.395C1274.45 112.885 1268.4 111.13 1261.51 111.13C1254.75 111.13 1248.71 112.885 1243.38 116.395C1238.18 119.905 1234.15 124.845 1231.29 131.215C1228.43 137.585 1227 144.93 1227 153.25C1227 161.57 1228.43 168.915 1231.29 175.285C1234.15 181.655 1238.18 186.595 1243.38 190.105C1248.71 193.615 1254.75 195.37 1261.51 195.37Z", fill: color }),
303
+ index.h("path", { d: "M1366.03 203.95C1352.25 203.95 1341.52 199.53 1333.85 190.69C1326.31 181.72 1322.54 169.24 1322.54 153.25C1322.54 137.39 1326.38 124.975 1334.05 116.005C1341.72 107.035 1352.38 102.55 1366.03 102.55C1373.57 102.55 1380.26 104.11 1386.11 107.23C1391.96 110.22 1396.77 114.575 1400.54 120.295L1394.3 126.34C1391.31 121.66 1387.28 118.02 1382.21 115.42C1377.27 112.69 1371.88 111.325 1366.03 111.325C1355.76 111.325 1347.63 115.03 1341.65 122.44C1335.8 129.85 1332.88 140.12 1332.88 153.25C1332.88 166.38 1335.8 176.65 1341.65 184.06C1347.63 191.47 1355.76 195.175 1366.03 195.175C1371.88 195.175 1377.27 193.875 1382.21 191.275C1387.28 188.545 1391.31 184.84 1394.3 180.16L1400.54 186.205C1396.77 191.925 1391.96 196.345 1386.11 199.465C1380.26 202.455 1373.57 203.95 1366.03 203.95Z", fill: color }),
304
+ index.h("path", { d: "M1446.55 203.95C1436.93 203.95 1429.13 201.285 1423.15 195.955C1417.17 190.495 1414.18 183.41 1414.18 174.7C1414.18 165.08 1417.62 157.605 1424.51 152.275C1431.53 146.945 1441.35 144.28 1453.96 144.28H1477.75V138.43C1477.75 129.72 1475.47 123.09 1470.92 118.54C1466.5 113.86 1460.07 111.52 1451.62 111.52C1445.9 111.52 1440.63 112.885 1435.82 115.615C1431.01 118.345 1427.11 122.18 1424.12 127.12L1417.88 120.295C1421.52 114.575 1426.27 110.22 1432.12 107.23C1438.1 104.11 1444.86 102.55 1452.4 102.55C1463.58 102.55 1472.29 105.605 1478.53 111.715C1484.9 117.695 1488.08 126.015 1488.08 136.675V184.255C1488.08 188.805 1488.86 194.72 1490.42 202H1481.45C1480.28 199.14 1479.44 194.07 1478.92 186.79H1478.53C1474.76 192.25 1470.14 196.475 1464.68 199.465C1459.22 202.455 1453.18 203.95 1446.55 203.95ZM1446.55 195.175C1452.01 195.175 1457.14 194.07 1461.95 191.86C1466.76 189.52 1470.6 186.465 1473.46 182.695C1476.32 178.795 1477.75 174.7 1477.75 170.41V152.665H1453.37C1444.27 152.665 1437.12 154.615 1431.92 158.515C1426.85 162.415 1424.32 167.81 1424.32 174.7C1424.32 180.68 1426.4 185.62 1430.56 189.52C1434.72 193.29 1440.05 195.175 1446.55 195.175Z", fill: color }),
305
+ index.h("path", { d: "M1547.14 203.95C1539.08 203.95 1532.97 201.48 1528.81 196.54C1524.65 191.47 1522.57 184.19 1522.57 174.7V113.275H1505.02V104.5H1522.57V77.9801L1532.32 74.6651H1533.1V104.5H1560.59V113.275H1533.1V172.555C1533.1 180.355 1534.33 186.01 1536.8 189.52C1539.27 193.03 1543.17 194.785 1548.5 194.785C1553.83 194.785 1558.06 194.005 1561.18 192.445L1562.35 200.83C1558.19 202.91 1553.12 203.95 1547.14 203.95Z", fill: color }),
306
+ index.h("path", { d: "M1661.53 157.54H1589.77C1590.42 169.37 1593.54 178.535 1599.13 185.035C1604.85 191.535 1612.65 194.785 1622.53 194.785C1628.51 194.785 1633.97 193.485 1638.91 190.885C1643.98 188.285 1647.95 184.645 1650.81 179.965L1657.24 186.4C1653.34 192.12 1648.4 196.475 1642.42 199.465C1636.57 202.455 1629.94 203.95 1622.53 203.95C1609.01 203.95 1598.35 199.465 1590.55 190.495C1582.88 181.525 1579.05 169.175 1579.05 153.445C1579.05 137.585 1582.82 125.17 1590.36 116.2C1597.9 107.1 1608.23 102.55 1621.36 102.55C1633.84 102.55 1643.66 106.84 1650.81 115.42C1657.96 124 1661.53 135.895 1661.53 151.105V157.54ZM1651.39 147.4C1651.39 136.48 1648.66 127.77 1643.2 121.27C1637.74 114.77 1630.46 111.52 1621.36 111.52C1611.74 111.52 1604.2 114.77 1598.74 121.27C1593.28 127.77 1590.29 137.065 1589.77 149.155H1651.39V147.4Z", fill: color })));
307
+ }
308
+
309
+ const debug = stencilHooks_module.browser("sq:useBigStat");
310
+ const LOADING = "...";
311
+ const debugQuery = (query, variables, getStat) => {
312
+ const res = index_module.wn(query, variables);
313
+ if (!(res === null || res === void 0 ? void 0 : res.data) && !res.loading) {
314
+ console.error("issue getting stat:", res);
358
315
  }
359
- return (index.h("div", { class: `CardWrapper FormWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
360
- index.h("div", { class: "FormSection" },
361
- index.h("h2", { part: "sqm-header", style: {
362
- fontSize: "var(--sl-font-size-x-large)",
363
- marginBottom: "0px",
364
- textAlign: "center",
365
- } }, text.editprofileheader),
366
- index.h("div", null,
367
- index.h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
368
- _a.firstName,
369
- " ", (_b = states.user) === null || _b === void 0 ? void 0 :
370
- _b.lastName),
371
- index.h("p", { style: { fontSize: "var(--sl-font-size-medium)" }, title: (_c = states.user) === null || _c === void 0 ? void 0 : _c.email }, (_d = states.user) === null || _d === void 0 ? void 0 : _d.email))),
372
- index.h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
373
- callbacks.resetForm();
374
- callbacks.setShowEdit(true);
375
- }, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
316
+ const stat = getStat(res);
317
+ return { ...stat, loading: res.loading };
376
318
  };
377
-
378
- const MessageLinkQuery = index_module.dist.gql `
379
- query ($programId: ID, $engagementMedium: UserEngagementMedium!) {
380
- user: viewer {
381
- ... on User {
382
- shareLink(
383
- programId: $programId
384
- engagementMedium: $engagementMedium
385
- shareMedium: DIRECT
386
- )
387
- }
388
- }
389
- }
390
- `;
391
- const WIDGET_ENGAGEMENT_EVENT = index_module.dist.gql `
392
- mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
393
- createUserAnalyticsEvent(eventMeta: $eventMeta)
394
- }
395
- `;
396
- function useShareLink(props) {
397
- var _a, _b;
398
- const { programId = index_module.H() } = props;
399
- const user = index_module.J();
400
- const engagementMedium = index_module.B();
401
- const contextData = index_module.Fn(useReferralCodes.REFERRAL_CODES_NAMESPACE);
402
- const { data } = index_module.wn(MessageLinkQuery, { programId, engagementMedium }, !(user === null || user === void 0 ? void 0 : user.jwt) || !!props.linkOverride || (contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) !== undefined);
403
- const [sendLoadEvent] = index_module.$e(WIDGET_ENGAGEMENT_EVENT);
404
- const [setCopied, copiedRes] = index_module.$e(useReferralCodes.SET_CODE_COPIED);
405
- const copyString = (_b = ((contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) || ((_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink))) !== null && _b !== void 0 ? _b :
406
- // Shown during loading
407
- "...";
408
- const [open, setOpen] = stencilHooks_module.useState(false);
409
- async function onClick() {
410
- if (contextData) {
411
- await setCopied({ referralCode: contextData.referralCode });
412
- contextData.refresh();
413
- }
414
- // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
415
- // Only if called from a user-initiated event
416
- navigator.clipboard.writeText(copyString);
417
- setOpen(true);
418
- setTimeout(() => setOpen(false), props.tooltiplifespan);
419
- sendLoadEvent({
420
- eventMeta: {
421
- programId,
422
- id: user === null || user === void 0 ? void 0 : user.id,
423
- accountId: user === null || user === void 0 ? void 0 : user.accountId,
424
- type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
425
- meta: {
426
- engagementMedium,
427
- shareMedium: "DIRECT",
428
- },
429
- },
430
- });
431
- }
432
- return { ...props, onClick, open, copyString: copyString };
433
- }
434
-
435
- const MessageLinkQuery$1 = index_module.dist.gql `
436
- query (
437
- $programId: ID
438
- $engagementMedium: UserEngagementMedium!
439
- $shareMedium: ReferralShareMedium!
440
- ) {
441
- viewer {
442
- ... on User {
443
- messageLink(
444
- programId: $programId
445
- engagementMedium: $engagementMedium
446
- shareMedium: $shareMedium
447
- )
448
- shareLink(programId: $programId, engagementMedium: $engagementMedium)
449
- }
450
- }
451
- }
452
- `;
453
- function NativeShare(props, directLink, undefinedErrorText, unsupportedPlatformText) {
454
- const title = props.sharetitle || "Share title";
455
- const text = props.sharetext || "Share text";
456
- if (directLink === "undefined") {
457
- return alert(undefinedErrorText);
458
- }
459
- if (window.navigator.share) {
460
- window.navigator
461
- .share({
462
- title,
463
- text,
464
- url: directLink,
465
- })
466
- .catch((error) => console.error("Error on web share", error));
467
- }
468
- else {
469
- alert(unsupportedPlatformText);
470
- }
471
- }
472
- function FacebookShare(directLink, messageLink, errorText) {
473
- if (messageLink === "undefined" || directLink === "undefined") {
474
- return alert(errorText);
475
- }
476
- if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
477
- return SquatchAndroid.shareOnFacebook(directLink, messageLink);
478
- }
479
- else {
480
- return GenericShare(messageLink, errorText);
481
- }
482
- }
483
- function GenericShare(messageLink, errorText) {
484
- return messageLink ? (window.location.href = messageLink) : alert(errorText);
485
- }
486
- function useShareButton(props) {
487
- var _a, _b, _c, _d;
488
- const { sharetitle, sharetext, medium } = props;
489
- const programId = props.programId ? props.programId : index_module.H();
490
- const user = index_module.J();
491
- const engagementMedium = index_module.B();
492
- const variables = {
493
- engagementMedium,
494
- programId: programId,
495
- shareMedium: medium.toUpperCase(),
496
- };
497
- const contextData = index_module.Fn(useReferralCodes.REFERRAL_CODES_NAMESPACE);
498
- const overrideData = contextData === null || contextData === void 0 ? void 0 : contextData[medium];
499
- // only queries if a programId is available
500
- const res = index_module.wn(MessageLinkQuery$1, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || overrideData !== undefined);
501
- const [setCopied, copiedRes] = index_module.$e(useReferralCodes.SET_CODE_COPIED);
502
- const directLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.shareLink) || ((_b = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.shareLink);
503
- const environment = index_module.getEnvironmentSDK();
504
- const hide = (medium.toLocaleUpperCase() === "SMS" &&
505
- window.orientation === undefined) ||
506
- (medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
507
- const messageLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink) || ((_d = (_c = res.data) === null || _c === void 0 ? void 0 : _c.viewer) === null || _d === void 0 ? void 0 : _d.messageLink);
508
- async function onClick() {
509
- if (overrideData) {
510
- await setCopied({ referralCode: contextData.referralCode });
511
- contextData.refresh();
512
- }
513
- if (medium.toLocaleUpperCase() === "FACEBOOK" &&
514
- environment.type === "SquatchAndroid") {
515
- FacebookShare(directLink, messageLink, props.errorText);
516
- }
517
- else if (medium.toLocaleUpperCase() === "DIRECT") {
518
- NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
519
- }
520
- }
521
- const isPlainLink = !(medium.toLocaleUpperCase() === "FACEBOOK" &&
522
- environment.type === "SquatchAndroid") &&
523
- medium.toLocaleUpperCase() !== "DIRECT" &&
524
- messageLink;
525
- const userAgent = window.navigator.userAgent.toLowerCase(), safari = /safari/.test(userAgent), ios = /iphone|ipod|ipad/.test(userAgent);
526
- const openInSameTab = ios && !safari;
527
- return {
528
- ...props,
529
- loading: res.loading && !(overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink),
530
- messageLink,
531
- isPlainLink,
532
- onClick,
533
- openInSameTab,
534
- hide,
535
- };
536
- }
537
-
538
- const debug = stencilHooks_module.browser("sq:useBigStat");
539
- const LOADING = "...";
540
- const debugQuery = (query, variables, getStat) => {
541
- const res = index_module.wn(query, variables);
542
- if (!(res === null || res === void 0 ? void 0 : res.data) && !res.loading) {
543
- console.error("issue getting stat:", res);
544
- }
545
- const stat = getStat(res);
546
- return { ...stat, loading: res.loading };
547
- };
548
- const referralsCountQuery = (programId,
549
- // locale
550
- _, status) => {
551
- const programFilter = programId === "classic"
552
- ? { programId_exists: false }
553
- : { programId_eq: programId };
554
- const convertedFilter = status && status == "converted"
555
- ? { dateConverted_exists: true }
556
- : status && status == "started"
557
- ? { dateConverted_exists: false }
558
- : {};
559
- const queryFilter = { ...programFilter, ...convertedFilter };
560
- return debugQuery(index_module.dist.gql `
561
- query ($queryFilter: ReferralFilterInput) {
562
- viewer {
563
- ... on User {
564
- referrals(filter: $queryFilter) {
565
- totalCount
566
- }
567
- }
568
- }
319
+ const referralsCountQuery = (programId,
320
+ // locale
321
+ _, status) => {
322
+ const programFilter = programId === "classic"
323
+ ? { programId_exists: false }
324
+ : { programId_eq: programId };
325
+ const convertedFilter = status && status == "converted"
326
+ ? { dateConverted_exists: true }
327
+ : status && status == "started"
328
+ ? { dateConverted_exists: false }
329
+ : {};
330
+ const queryFilter = { ...programFilter, ...convertedFilter };
331
+ return debugQuery(index_module.dist.gql `
332
+ query ($queryFilter: ReferralFilterInput) {
333
+ viewer {
334
+ ... on User {
335
+ referrals(filter: $queryFilter) {
336
+ totalCount
337
+ }
338
+ }
339
+ }
569
340
  }
570
341
  `, { queryFilter }, (res) => {
571
342
  var _a, _b, _c, _d, _e, _f, _g;
@@ -1505,321 +1276,33 @@ function useDemoBigStat(props) {
1505
1276
  };
1506
1277
  }
1507
1278
 
1508
- function StatContainerView(props, children) {
1509
- const divideSpace = () => {
1510
- const spaceValue = getComputedStyle(document.documentElement).getPropertyValue(`--sl-spacing-${props.space}`);
1511
- return `${Math.floor(parseInt(spaceValue) / 2)}rem`;
1512
- };
1513
- // take alignment variable and convert it to CSS flexbox alignment
1514
- const alignment = props.alignment === "center"
1515
- ? "center"
1516
- : props.alignment === "right"
1517
- ? "flex-end"
1518
- : "flex-start";
1519
- // Dependent on props, not feasible to move out
1520
- const style = {
1521
- StatContainer: {
1522
- width: "100%",
1523
- display: "flex",
1524
- flexWrap: "wrap",
1525
- alignItems: "center",
1526
- justifyContent: alignment,
1527
- flexDirection: "row",
1528
- gap: `var(--sl-spacing-${props.gap})`,
1529
- // Apply border styles conditionally based on the hideBorder prop
1530
- "& > *": {
1531
- "border-right": props.hideBorder
1532
- ? "none"
1533
- : "1px solid var(--sqm-text-subdued)",
1534
- "padding-right": divideSpace(),
1535
- },
1536
- "& > :last-child": {
1537
- "border-right": "none",
1538
- },
1539
- "& > ::slotted(*)": {
1540
- "border-right": props.hideBorder
1541
- ? "none"
1542
- : "1px solid var(--sqm-text-subdued)",
1543
- "padding-right": divideSpace(),
1544
- },
1545
- "& > ::slotted(*:last-child)": {
1546
- "border-right": "none",
1547
- },
1548
- "@media screen and (max-width: 430px)": {
1549
- "& > ::slotted(*)": {
1550
- borderRight: "none",
1551
- },
1552
- },
1553
- },
1554
- StatFrame: {
1555
- display: "flex",
1556
- },
1557
- BorderFix: {
1558
- "border-right": "1px solid transparent",
1559
- width: "0px",
1560
- "margin-left": "-1px",
1561
- },
1562
- };
1563
- const sheet = JSS.createStyleSheet(style);
1564
- const styleString = sheet.toString();
1565
- return (index.h("div", { class: sheet.classes.StatFrame, part: "sqm-base" },
1566
- index.h("div", { class: sheet.classes.StatContainer, part: "sqm-inner-container" },
1567
- index.h("style", { type: "text/css" }, styleString),
1568
- children),
1569
- index.h("div", { class: sheet.classes.BorderFix, part: "sqm-border" })));
1570
- }
1571
-
1572
- function PortalChangePasswordView(props) {
1573
- const { states, callbacks } = props;
1574
- const style = {
1575
- Dialog: {
1576
- padding: "0",
1577
- "&::part(panel)": {
1578
- background: "var(--sqm-portal-background)",
1579
- borderRadius: "var(--sqm-border-radius-normal, var(--sl-border-radius-medium))",
1580
- },
1581
- "&::part(close-button)": {
1582
- "margin-top": "var(--sl-spacing-medium)",
1583
- },
1584
- "&::part(body)": {
1585
- padding: "0 var(--sl-spacing-x-large) var(--sl-spacing-x-large) var(--sl-spacing-x-large)",
1586
- },
1587
- },
1588
- Error: {
1589
- "&::part(erroralert-base)": {
1590
- "margin-bottom": "15px",
1591
- },
1592
- },
1593
- Success: {
1594
- "&::part(successalert-base)": {
1595
- "margin-bottom": "15px",
1596
- },
1597
- },
1598
- InputContainer: {
1599
- "& > :not(:last-child)": {
1600
- "margin-bottom": "var(--sl-spacing-x-large)",
1601
- },
1602
- },
1603
- CancelButton: {
1604
- margin: "var(--sl-spacing-large) auto",
1605
- width: "100%",
1606
- },
1607
- PasswordField: {
1608
- marginBottom: "var(--sl-spacing-large) !important",
1609
- display: "block",
1610
- },
1611
- ChangePasswordButton: {
1612
- paddingTop: "var(--sl-spacing-x-large)",
1613
- },
1614
- };
1615
- const sheet = JSS.createStyleSheet(style);
1616
- const styleString = sheet.toString();
1617
- return (index.h("div", null,
1618
- index.h("style", { type: "text/css" }, styleString),
1619
- index.h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, "onSl-hide": () => callbacks.setOpen(false) },
1620
- index.h(sqmPortalContainerView.PortalSectionView, Object.assign({}, {
1621
- labelMargin: "x-large",
1622
- padding: "none",
1623
- label: (index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), states.content.modalChangePasswordHeader)),
1624
- content: (index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "column", padding: "none", gap: "32px" }),
1625
- states.error && (index.h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
1626
- index.h("div", { part: "erroralert-text" }, states.error))),
1627
- states.success && (index.h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
1628
- index.h("div", { part: "successalert-text" }, states.content.successMessage))),
1629
- index.h("sl-form", { "onSl-submit": callbacks.submit },
1630
- index.h("div", { class: sheet.classes.InputContainer },
1631
- index.h("sqm-password-field", { exportparts: "input-label: input-label", class: sheet.classes.PasswordField, fieldLabel: states.content.passwordFieldLabel, meetsRequirementsText: states.content.meetsRequirementsText, doesNotMeetRequirementsText: states.content.doesNotMeetRequirementsText, minErrorText: states.content.minErrorText, uppercaseErrorText: states.content.uppercaseErrorText, lowercaseErrorText: states.content.lowercaseErrorText, hasErrorText: states.content.hasErrorText }),
1632
- index.h("sl-input", { exportparts: "label: input-label, base: input-base", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, required: true, togglePassword: true, disabled: states.loading, type: "password" })),
1633
- index.h(sqmPortalContainerView.PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
1634
- index.h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", exportparts: "base: primarybutton-base", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
1635
- index.h("sl-button", { class: sheet.classes.CancelButton, type: "text", exportparts: "base: secondarybutton-base", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
1636
- }))),
1637
- index.h(sqmPortalContainerView.PortalSectionView, Object.assign({}, {
1638
- labelMargin: "x-large",
1639
- padding: "xxx-large",
1640
- label: (index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), states.content.portalChangePasswordHeader)),
1641
- content: (index.h("sl-button", { exportparts: "base: primarybutton-base", onClick: () => callbacks.setOpen(true) }, states.content.portalChangePasswordButtonText)),
1642
- }),
1643
- index.h("style", { type: "text/css" }, styleString))));
1644
- }
1645
-
1646
- const style$1 = {
1647
- Wrapper: { ...mixins.AuthWrapper, "max-width": "600px" },
1648
- Column: mixins.AuthColumn,
1649
- HostBlock: mixins.HostBlock,
1650
- ":host": {
1651
- margin: "0 auto",
1652
- width: "100%",
1653
- },
1654
- ButtonsContainer: mixins.AuthButtonsContainer,
1655
- ErrorStyle: mixins.ErrorStyles,
1656
- };
1657
- const vanillaStyle = `
1658
- sqm-portal-register {
1659
- margin: 0 auto;
1660
- width: 100%;
1661
- display: block;
1662
- }
1663
-
1664
- :host{
1665
- display: block;
1666
- }
1667
-
1668
- :host([hidden]) {
1669
- display: none;
1670
- }
1671
- `;
1672
- const sheet$1 = JSS.createStyleSheet(style$1);
1673
- const styleString$1 = sheet$1.toString();
1674
- function PortalRegisterView(props) {
1675
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
1676
- const { states, refs, callbacks, content } = props;
1677
- if (states.error) {
1678
- window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
1679
- }
1680
- return (index.h("div", { class: sheet$1.classes.Wrapper, part: "sqm-base" },
1681
- index.h("style", { type: "text/css" },
1682
- vanillaStyle,
1683
- styleString$1),
1684
- index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, content.pageLabel),
1685
- index.h("sl-form", { class: sheet$1.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
1686
- states.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
1687
- index.h("div", { part: "erroralert-text" }, props.states.error))),
1688
- content.formData,
1689
- !states.hideInputs && (index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
1690
- if (!value) {
1691
- return content.requiredFieldErrorMessage;
1692
- }
1693
- // this matches shoelace validation, but could be better
1694
- if (!value.includes("@")) {
1695
- return content.invalidEmailErrorMessage;
1696
- }
1697
- } }, (((_b = (_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
1698
- class: sheet$1.classes.ErrorStyle,
1699
- helpText: ((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
1700
- content.requiredFieldErrorMessage,
1701
- }
1702
- : [])))),
1703
- !states.hideInputs && (index.h("sqm-password-field", { fieldLabel: content.passwordLabel, "disable-validation": states.disablePasswordValidation, meetsRequirementsText: content.meetsRequirementsText, doesNotMeetRequirementsText: content.doesNotMeetRequirementsText, minErrorText: content.minErrorText, uppercaseErrorText: content.uppercaseErrorText, lowercaseErrorText: content.lowercaseErrorText, hasErrorText: content.hasErrorText })),
1704
- content.passwordField,
1705
- !states.hideInputs && states.confirmPassword && (index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading || ((_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.disabled), required: true }, (((_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.confirmPassword) ? {
1706
- value: (_j = (_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.initialData) === null || _j === void 0 ? void 0 : _j.confirmPassword,
1707
- }
1708
- : {}), (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.validationErrors) === null || _l === void 0 ? void 0 : _l.confirmPassword) ? {
1709
- class: sheet$1.classes.ErrorStyle,
1710
- helpText: ((_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.validationErrors) === null || _o === void 0 ? void 0 : _o.confirmPassword) || content.requiredFieldErrorMessage,
1711
- }
1712
- : [])))),
1713
- content.terms,
1714
- index.h("div", { class: sheet$1.classes.ButtonsContainer },
1715
- index.h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
1716
- content.secondaryButton))));
1717
- }
1718
-
1719
- const style$2 = {
1720
- ErrorStyle: {
1721
- "&::part(control)": {
1722
- background: "var(--sl-color-danger-10)",
1723
- borderColor: "var(--sl-color-danger-500)",
1724
- outline: "var(--sl-color-danger-500)",
1725
- },
1726
- "&:host": {
1727
- "--focus-ring": "0 0 0 var(--sl-focus-ring-width) red !important",
1728
- },
1729
- },
1730
- ErrorMessageStyle: {
1731
- margin: 0,
1732
- marginTop: "5px",
1733
- color: "var(--sl-color-danger-500)",
1734
- fontSize: "var(--sl-input-help-text-font-size-medium)",
1735
- fontFamily: "var(--sl-font-sans)",
1736
- fontWeight: "var(--sl-font-weight-normal)",
1737
- },
1738
- FieldContainer: {
1739
- "margin-bottom": "var(--sl-spacing-large)",
1740
- },
1741
- };
1742
- const vanillaStyle$1 = `
1743
- :host {
1744
- margin: 0 auto;
1745
- width: 100%;
1746
- display: block;
1747
- }
1748
- sl-checkbox::part(label){
1749
- font-size: var(--sl-input-label-font-size-small);
1750
- font-weight: var(--sl-font-weight-normal);
1751
- line-height: 20px;
1752
- }
1753
- sl-checkbox::part(base){
1754
- align-items: start;
1755
- }
1756
- `;
1757
- JSS.jss.setup(JSS.create());
1758
- const sheet$2 = JSS.jss.createStyleSheet(style$2);
1759
- const styleString$2 = sheet$2.toString();
1760
- function CheckboxFieldView(props) {
1761
- var _b, _c;
1762
- const { states, content, callbacks } = props;
1763
- return (index.h("div", { class: sheet$2.classes.FieldContainer, part: "sqm-base" },
1764
- index.h("style", { type: "text/css" },
1765
- vanillaStyle$1,
1766
- styleString$2),
1767
- index.h("sl-checkbox", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
1768
- e.target.value = e.target.checked;
1769
- callbacks.setChecked(e.target.value);
1770
- } }, (!content.checkboxOptional ? { required: false } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled), required: false }), global.intl.formatMessage({
1771
- id: content.checkboxName + "-message",
1772
- defaultMessage: content.checkboxLabel,
1773
- }, {
1774
- labelLink: (index.h("a", { href: content.checkboxLabelLink, target: "_blank" }, content.checkboxLabelLinkText || content.checkboxLabelLink)),
1775
- }))));
1776
- }
1777
-
1778
- function ChangeMarktingView(props) {
1779
- const { states, callbacks } = props;
1780
- const { text, formState } = states;
1781
- const { error } = formState;
1279
+ function CardFeedView(props, children) {
1280
+ // Dependent on props, not feasiable to move out
1782
1281
  const style = {
1783
1282
  Container: {
1784
- display: "flex",
1785
- flexDirection: "column",
1786
- gap: "var(--sl-spacing-x-small)",
1787
- padding: "0 var(--sl-spacing-xxx-large) var(--sl-spacing-xxx-large)",
1788
- },
1789
- SubmitButton: { marginBottom: "var(--sl-spacing-medium)" },
1790
- Error: {
1791
- "&::part(erroralert-base)": {
1792
- "margin-bottom": "15px",
1793
- },
1794
- },
1795
- Success: {
1796
- "&::part(successalert-base)": {
1797
- "margin-bottom": "15px",
1798
- },
1799
- },
1800
- };
1801
- const sheet = JSS.createStyleSheet(style);
1802
- const styleString = sheet.toString();
1803
- return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
1804
- index.h("style", { type: "text/css" }, styleString),
1805
- index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), text.emailPreferencesHeader),
1806
- index.h("sl-form", { "onSl-submit": callbacks.onSubmit },
1807
- index.h(CheckboxFieldView, { states: {
1808
- checked: states.formState.marketingEmailOptIn,
1809
- }, content: {
1810
- checkboxLabel: text.marketingCheckboxLabel,
1811
- checkboxName: "marketingEmailOptIn",
1812
- }, callbacks: {
1813
- setChecked: callbacks.setChecked,
1814
- } }),
1815
- index.h("sl-button", { class: sheet.classes.SubmitButton, type: "primary", submit: true, loading: states.loading, disabled: states.submitDisabled }, text.submitChangeButtonText),
1816
- error && (index.h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
1817
- index.h("div", { part: "erroralert-text" }, error))),
1818
- states.success && (index.h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
1819
- index.h("div", { part: "successalert-text" }, states.text.successMessage))))));
1283
+ columnGap: props.gap + "px",
1284
+ columnWidth: props.width + "px",
1285
+ "& > div": {
1286
+ marginBottom: "24px",
1287
+ },
1288
+ },
1289
+ };
1290
+ const sheet = JSS.createStyleSheet(style);
1291
+ const styleString = sheet.toString();
1292
+ const vanillaStyle = `
1293
+ :host{
1294
+ display: block;
1295
+ }
1296
+
1297
+ `;
1298
+ return (index.h("div", null,
1299
+ index.h("style", { type: "text/css" },
1300
+ styleString,
1301
+ vanillaStyle),
1302
+ index.h("div", { class: sheet.classes.Container, part: "sqm-base" }, children)));
1820
1303
  }
1821
1304
 
1822
- const style$3 = {
1305
+ const style$1 = {
1823
1306
  Description: {
1824
1307
  "& .icon": {
1825
1308
  color: "var(--sqm-text)",
@@ -1864,13 +1347,13 @@ const style$3 = {
1864
1347
  },
1865
1348
  },
1866
1349
  };
1867
- const sheet$3 = JSS.createStyleSheet(style$3);
1868
- const styleString$3 = sheet$3.toString();
1350
+ const sheet$1 = JSS.createStyleSheet(style$1);
1351
+ const styleString$1 = sheet$1.toString();
1869
1352
  function Details(props) {
1870
1353
  const rid = Math.random().toString(36).slice(2);
1871
1354
  return (index.h("div", { style: { opacity: props.opacity } },
1872
- index.h("style", { type: "text/css" }, styleString$3),
1873
- index.h("span", { class: sheet$3.classes.Description },
1355
+ index.h("style", { type: "text/css" }, styleString$1),
1356
+ index.h("span", { class: sheet$1.classes.Description },
1874
1357
  index.h("input", { type: "checkbox", id: "details-" + rid }),
1875
1358
  index.h("label", { class: "details", htmlFor: "details-" + rid },
1876
1359
  index.h("sl-icon", { class: "icon", exportparts: "base: chevron-icon", name: "chevron-down" })),
@@ -1892,7 +1375,7 @@ const GreyGift = () => {
1892
1375
  index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M14 2.70949C14 3.59565 12.6694 4.93746 12 5H9V16H7.00179V5H4.58792C3.21247 4.70182 2 3.64537 2 2.52072C2 1.42474 2.47603 0.556701 3.34184 0.182041C4.16921 -0.175986 5.12452 0.0203328 5.87976 0.544666C6.80676 1.18825 7.32679 2.3963 7.79856 3.49226C7.83996 3.58845 7.88099 3.68378 7.9219 3.77778C7.96173 3.68865 8.00186 3.59793 8.0425 3.50608C8.50995 2.44948 9.04359 1.24325 9.9404 0.59563C10.7332 0.0231438 11.741 -0.193157 12.6121 0.198945C13.5129 0.604397 14 1.53453 14 2.70949ZM10.6123 1.5C11.0928 1.15305 11.668 1.09012 12.1597 1.5C12.5879 1.85694 12.6108 2.02497 12.6658 2.42926L12.6755 2.5C12.6755 3.09851 12.1597 4 11.6439 4C11.2785 4 10.9914 3.99691 10.7224 3.99402C10.2319 3.98875 9.80131 3.98412 9.06496 4C9.20533 3.72786 9.31743 3.46669 9.42434 3.21761C9.71026 2.55143 9.95907 1.97176 10.6123 1.5ZM4.93861 1.5C4.70607 1.33855 4.17281 1.4106 3.95166 1.5063C3.76894 1.58537 3.49602 1.82658 3.49602 2.52072C3.49602 3.19524 4.58792 3.77778 4.58792 3.77778C4.58792 3.77778 5.45441 4 7.00179 4C6.47506 2.69451 5.7289 2.04867 4.93861 1.5Z", fill: "#828282" })));
1893
1376
  };
1894
1377
 
1895
- const style$4 = {
1378
+ const style$2 = {
1896
1379
  ProgressBar: {
1897
1380
  "& .progress-bar": {
1898
1381
  height: "0",
@@ -2005,14 +1488,14 @@ const style$4 = {
2005
1488
  },
2006
1489
  },
2007
1490
  };
2008
- const sheet$4 = JSS.createStyleSheet(style$4, { classNamePrefix: "sqm-prog-bar" });
2009
- const styleString$4 = sheet$4.toString();
1491
+ const sheet$2 = JSS.createStyleSheet(style$2, { classNamePrefix: "sqm-prog-bar" });
1492
+ const styleString$2 = sheet$2.toString();
2010
1493
  function ProgressBarView(props) {
2011
1494
  const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, complete = false, expired = false, finite = 0, opacity = "1", } = props;
2012
1495
  let aggregate = buildProgressBar(repeatable, steps, props);
2013
1496
  const { columns, items } = aggregate;
2014
- return (index.h("div", { class: sheet$4.classes.ProgressBar, "data-expired": expired, "data-complete": complete, "data-steps": steps, "data-done": goal <= progress, style: { opacity: opacity } },
2015
- index.h("style", { type: "text/css" }, styleString$4),
1497
+ return (index.h("div", { class: sheet$2.classes.ProgressBar, "data-expired": expired, "data-complete": complete, "data-steps": steps, "data-done": goal <= progress, style: { opacity: opacity } },
1498
+ index.h("style", { type: "text/css" }, styleString$2),
2016
1499
  index.h("div", { class: (!Boolean(finite) && progress >= 2 * goal) ||
2017
1500
  (Boolean(finite) && progress > 2 * goal)
2018
1501
  ? "progress-bar repeatable-steps"
@@ -2565,109 +2048,402 @@ function TaskCardView(props) {
2565
2048
  } }, content.buttonText)))))))));
2566
2049
  }
2567
2050
 
2568
- function PoweredByImg({ color = "#A6A6A6", width = 120, height = 16, }) {
2569
- return (index.h("svg", { width: width, height: height, viewBox: "0 0 1662 254", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
2570
- index.h("path", { d: "M801.082 253.58L869.382 1.67969", stroke: color, "stroke-width": "3" }),
2571
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M125.682 42.48C123.882 42.48 121.982 42.78 120.382 43.48C118.682 44.18 117.182 45.18 115.882 46.48C114.582 47.68 113.582 49.28 112.882 50.98C112.182 52.68 111.882 54.48 111.982 56.28C112.282 59.68 113.882 63.08 116.382 65.38C118.982 67.78 122.382 68.98 125.782 68.98C129.282 68.98 132.682 67.58 135.182 65.38C137.782 62.98 139.382 59.78 139.582 56.28C139.582 54.38 139.282 52.68 138.682 50.98C137.982 49.28 136.982 47.78 135.682 46.48C134.382 45.18 132.882 44.18 131.182 43.48C129.282 42.78 127.582 42.48 125.682 42.48Z", fill: color }),
2572
- index.h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
2573
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M231.481 104.18C238.781 93.4799 251.181 87.3799 266.281 87.3799C290.981 87.3799 307.581 103.28 307.381 127.08V187.48H286.781V132.38C286.781 116.38 278.281 107.18 263.381 107.18C248.481 107.18 237.981 117.68 237.981 132.68V187.48H217.281V132.38C217.281 116.38 208.781 107.18 193.881 107.18C178.981 107.18 168.481 117.68 168.481 132.68V187.48H147.981V89.3799H168.681V97.8799C178.081 88.8799 190.181 87.4799 197.081 87.4799C211.881 87.4799 224.381 93.5799 231.481 104.18Z", fill: color }),
2574
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M370.781 87.48C358.581 87.48 347.981 91.38 339.981 98.38V89.28H319.481V226.08H339.981V177.78C347.881 185.08 358.581 188.78 370.781 188.78C398.781 188.78 419.881 166.88 419.881 138.08C419.981 109.28 398.781 87.48 370.781 87.48ZM368.881 169.58C351.481 169.58 338.881 156.38 338.881 138.28C338.881 120.38 351.381 106.98 368.881 106.98C386.281 106.98 398.881 120.08 398.881 138.28C398.881 156.48 386.381 169.58 368.881 169.58Z", fill: color }),
2575
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M701.782 169.88C707.682 169.88 714.082 167.58 719.582 163.98L721.482 162.88L731.482 178.68L729.782 179.88C721.282 186.28 710.982 189.58 700.382 189.58C678.082 189.58 665.782 176.38 665.782 152.28V108.68H645.682V89.3799H665.782V59.8799H686.482V89.2798H725.682V108.48H686.482V151.88C686.482 163.38 691.982 169.88 701.782 169.88Z", fill: color }),
2576
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M551.282 239.88C549.982 239.88 548.782 240.28 547.682 240.88C546.682 241.58 545.782 242.58 545.382 243.68C544.882 244.78 544.782 246.08 545.082 247.28C545.282 248.58 545.882 249.68 546.882 250.48C547.782 251.38 548.882 251.98 550.082 252.28C551.382 252.48 552.582 252.38 553.782 251.98C554.882 251.48 555.982 250.78 556.582 249.68C557.282 248.68 557.582 247.38 557.582 246.18C557.582 244.48 556.982 242.88 555.682 241.68C554.482 240.48 552.882 239.88 551.282 239.88Z", fill: color }),
2577
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M586.182 210.78C592.282 210.78 597.582 213.08 601.082 217.18L601.482 217.68L596.282 223.08L595.782 222.58C594.482 221.18 593.082 220.18 591.382 219.48C589.682 218.78 587.882 218.38 586.082 218.48C578.882 218.48 573.682 224.08 573.682 231.58C573.682 239.18 578.882 244.78 586.082 244.78C589.782 244.68 593.282 243.18 595.882 240.58L596.382 240.08L601.382 245.68L600.982 246.08C597.182 250.18 591.982 252.18 586.082 252.18C574.082 252.18 565.382 243.58 565.382 231.58C565.582 219.48 574.182 210.78 586.182 210.78Z", fill: color }),
2578
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M633.782 210.78C621.682 210.78 612.582 219.68 612.582 231.38C612.582 243.08 621.682 251.98 633.782 251.98C645.882 251.98 654.882 243.08 654.882 231.38C655.082 219.78 645.982 210.78 633.782 210.78ZM633.782 244.78C626.382 244.78 620.782 239.28 620.782 231.58C620.782 223.88 626.182 218.48 633.782 218.48C641.182 218.48 646.782 224.08 646.782 231.58C646.782 238.98 641.382 244.78 633.782 244.78Z", fill: color }),
2579
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M723.982 228.78C723.982 222.18 720.382 218.28 714.082 218.28C707.682 218.28 703.382 222.78 702.982 228.98V252.18H695.082V228.68C695.082 222.08 691.482 218.18 685.182 218.18C680.082 218.18 674.482 221.48 674.482 228.88V252.08H666.582V211.38H674.482V214.78L676.682 213.28C679.582 211.38 683.082 210.48 686.582 210.48C692.082 210.48 696.782 212.48 699.882 216.08L700.882 217.28L701.882 216.08C704.782 212.48 709.582 210.48 715.182 210.48C725.082 210.48 731.982 217.08 731.982 226.38V251.88H724.082V228.68H723.982V228.78Z", fill: color }),
2580
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M511.681 89.4797V98.7797C503.681 91.4797 493.181 87.6797 480.981 87.6797C452.981 87.6797 431.981 109.68 431.981 138.68C431.981 167.78 453.081 189.68 480.981 189.68C493.181 189.68 503.681 185.78 511.681 178.38V187.68H532.381V89.4797H511.681ZM482.881 169.88C465.481 169.88 452.781 156.58 452.781 138.48C452.781 120.48 465.281 106.98 482.881 106.98C500.481 106.98 512.781 120.08 512.781 138.48C512.781 156.68 500.181 169.88 482.881 169.88Z", fill: color }),
2581
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M595.281 107.08C604.181 107.08 611.781 110.38 618.781 116.98L620.481 118.68L633.981 104.58L632.581 102.98C623.781 92.98 610.781 87.48 595.781 87.48C565.981 87.48 544.481 109.08 544.481 138.48C544.481 167.98 565.981 189.48 595.781 189.48C610.481 189.48 623.681 183.98 632.581 174.08L633.981 172.58L620.981 158.18L619.281 159.88C612.481 166.48 603.981 169.98 595.481 169.98C578.381 169.98 565.681 156.68 565.681 138.58C565.581 120.58 577.881 107.08 595.281 107.08Z", fill: color }),
2582
- index.h("path", { d: "M135.882 89.2798H115.582V187.58H135.882V89.2798Z", fill: color }),
2583
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M231.481 104.18C238.781 93.4799 251.181 87.3799 266.281 87.3799C290.981 87.3799 307.581 103.28 307.381 127.08V187.48H286.781V132.38C286.781 116.38 278.281 107.18 263.381 107.18C248.481 107.18 237.981 117.68 237.981 132.68V187.48H217.281V132.38C217.281 116.38 208.781 107.18 193.881 107.18C178.981 107.18 168.481 117.68 168.481 132.68V187.48H147.981V89.3799H168.681V97.8799C178.081 88.8799 190.181 87.4799 197.081 87.4799C211.881 87.4799 224.381 93.5799 231.481 104.18Z", fill: color }),
2584
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M370.781 87.48C358.581 87.48 347.981 91.38 339.981 98.38V89.28H319.481V226.08H339.981V177.78C347.881 185.08 358.581 188.78 370.781 188.78C398.781 188.78 419.881 166.88 419.881 138.08C419.981 109.28 398.781 87.48 370.781 87.48ZM368.881 169.58C351.481 169.58 338.881 156.38 338.881 138.28C338.881 120.38 351.381 106.98 368.881 106.98C386.281 106.98 398.881 120.08 398.881 138.28C398.881 156.48 386.381 169.58 368.881 169.58Z", fill: color }),
2585
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M701.782 169.88C707.682 169.88 714.082 167.58 719.582 163.98L721.482 162.88L731.482 178.68L729.782 179.88C721.282 186.28 710.982 189.58 700.382 189.58C678.082 189.58 665.782 176.38 665.782 152.28V108.68H645.682V89.3799H665.782V59.8799H686.482V89.2798H725.682V108.48H686.482V151.88C686.482 163.38 691.982 169.88 701.782 169.88Z", fill: color }),
2586
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M511.681 89.4797V98.7797C503.681 91.4797 493.181 87.6797 480.981 87.6797C452.981 87.6797 431.981 109.68 431.981 138.68C431.981 167.78 453.081 189.68 480.981 189.68C493.181 189.68 503.681 185.78 511.681 178.38V187.68H532.381V89.4797H511.681ZM482.881 169.88C465.481 169.88 452.781 156.58 452.781 138.48C452.781 120.48 465.281 106.98 482.881 106.98C500.481 106.98 512.781 120.08 512.781 138.48C512.781 156.68 500.181 169.88 482.881 169.88Z", fill: color }),
2587
- index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M595.281 107.08C604.181 107.08 611.781 110.38 618.781 116.98L620.481 118.68L633.981 104.58L632.581 102.98C623.781 92.98 610.781 87.48 595.781 87.48C565.981 87.48 544.481 109.08 544.481 138.48C544.481 167.98 565.981 189.48 595.781 189.48C610.481 189.48 623.681 183.98 632.581 174.08L633.981 172.58L620.981 158.18L619.281 159.88C612.481 166.48 603.981 169.98 595.481 169.98C578.381 169.98 565.681 156.68 565.681 138.58C565.581 120.58 577.881 107.08 595.281 107.08Z", fill: color }),
2588
- index.h("path", { d: "M34.6815 112.78C40.6815 112.78 46.5815 114.18 51.8815 116.68C57.2815 119.18 62.0815 122.78 65.9815 127.28C67.9815 122.68 69.0815 117.78 69.0815 112.88C69.0815 108.38 68.1815 103.88 66.4815 99.8799C64.6815 95.6799 62.1815 91.9799 58.9815 88.8799C55.7815 85.7799 51.9815 83.2799 47.7815 81.4799C43.5815 79.7799 39.0815 78.8799 34.5815 78.8799C30.0815 78.8799 25.5815 79.6799 21.3815 81.4799C17.1815 83.1799 13.3815 85.7799 10.1815 88.8799C6.98154 91.9799 4.48154 95.7799 2.68154 99.8799C0.881541 104.08 0.081543 108.38 0.081543 112.88C0.181543 117.88 1.18154 122.78 3.18154 127.28C7.08154 122.68 11.8815 119.18 17.1815 116.68C22.7815 113.98 28.7815 112.68 34.6815 112.78Z", fill: color }),
2589
- index.h("path", { d: "M69.1817 153.48C69.1817 146.68 67.1817 140.18 63.2817 134.48C59.4817 128.88 54.0817 124.48 47.7817 121.88C41.4817 119.28 34.4817 118.68 27.7817 119.88C21.0817 121.28 14.8817 124.48 10.0817 129.28C5.28166 134.08 1.88166 140.08 0.681661 146.78C-0.718339 153.48 0.0816607 160.18 2.68166 166.48C5.28166 172.78 9.68166 178.08 15.4817 181.78C21.0817 185.58 27.7817 187.48 34.6817 187.48C43.7817 187.38 52.5817 183.88 59.0817 177.38C65.6817 170.98 69.1817 162.58 69.1817 153.48Z", fill: color }),
2590
- index.h("path", { d: "M69.1817 34.9799C69.1817 28.1799 67.1817 21.6799 63.2817 15.9799C59.4817 10.3799 54.1817 5.9799 47.7817 3.3799C41.4817 0.779901 34.4817 0.1799 27.7817 1.3799C21.0817 2.7799 14.8817 5.97986 10.0817 10.7799C5.28166 15.5799 1.88166 21.5799 0.681661 28.2799C-0.718339 34.9799 0.0816607 41.6799 2.68166 47.9799C5.28166 54.2799 9.68166 59.5799 15.4817 63.2799C21.0817 67.0799 27.7817 68.9799 34.6817 68.9799C43.8817 68.9799 52.6817 65.3799 59.1817 58.9799C65.5817 52.6799 69.1817 43.8799 69.1817 34.9799Z", fill: color }),
2591
- index.h("path", { d: "M962.664 203.95C953.044 203.95 945.244 201.285 939.264 195.955C933.284 190.495 930.294 183.41 930.294 174.7C930.294 165.08 933.739 157.605 940.629 152.275C947.649 146.945 957.464 144.28 970.074 144.28H993.864V138.43C993.864 129.72 991.589 123.09 987.039 118.54C982.619 113.86 976.184 111.52 967.734 111.52C962.014 111.52 956.749 112.885 951.939 115.615C947.129 118.345 943.229 122.18 940.239 127.12L933.999 120.295C937.639 114.575 942.384 110.22 948.234 107.23C954.214 104.11 960.974 102.55 968.514 102.55C979.694 102.55 988.404 105.605 994.644 111.715C1001.01 117.695 1004.2 126.015 1004.2 136.675V184.255C1004.2 188.805 1004.98 194.72 1006.54 202H997.569C996.399 199.14 995.554 194.07 995.034 186.79H994.644C990.874 192.25 986.259 196.475 980.799 199.465C975.339 202.455 969.294 203.95 962.664 203.95ZM962.664 195.175C968.124 195.175 973.259 194.07 978.069 191.86C982.879 189.52 986.714 186.465 989.574 182.695C992.434 178.795 993.864 174.7 993.864 170.41V152.665H969.489C960.389 152.665 953.239 154.615 948.039 158.515C942.969 162.415 940.434 167.81 940.434 174.7C940.434 180.68 942.514 185.62 946.674 189.52C950.834 193.29 956.164 195.175 962.664 195.175Z", fill: color }),
2592
- index.h("path", { d: "M1067.55 203.95C1055.07 203.95 1045.25 199.27 1038.1 189.91C1030.95 180.55 1027.38 167.745 1027.38 151.495C1027.38 136.415 1031.02 124.52 1038.3 115.81C1045.71 106.97 1055.72 102.55 1068.33 102.55C1074.7 102.55 1080.55 104.045 1085.88 107.035C1091.21 110.025 1095.5 114.25 1098.75 119.71H1099.14V57.3101H1109.67V178.21C1109.67 189.13 1109.86 197.06 1110.25 202H1100.89C1100.63 197.84 1100.5 192.12 1100.5 184.84H1100.11C1097.12 190.69 1092.7 195.37 1086.85 198.88C1081 202.26 1074.57 203.95 1067.55 203.95ZM1068.13 195.175C1077.23 195.175 1084.64 192.185 1090.36 186.205C1096.21 180.225 1099.14 172.49 1099.14 163V146.815C1099.14 135.895 1096.41 127.25 1090.95 120.88C1085.49 114.38 1078.08 111.13 1068.72 111.13C1059.1 111.13 1051.49 114.77 1045.9 122.05C1040.44 129.2 1037.71 139.145 1037.71 151.885C1037.71 165.275 1040.44 175.87 1045.9 183.67C1051.36 191.34 1058.77 195.175 1068.13 195.175Z", fill: color }),
2593
- index.h("path", { d: "M1208.57 104.5L1172.3 202H1161.96L1125.5 104.5H1136.61L1167.03 189.715L1197.45 104.5H1208.57Z", fill: color }),
2594
- index.h("path", { d: "M1261.51 203.95C1252.54 203.95 1244.61 201.87 1237.72 197.71C1230.96 193.55 1225.7 187.635 1221.93 179.965C1218.29 172.295 1216.47 163.39 1216.47 153.25C1216.47 143.11 1218.29 134.205 1221.93 126.535C1225.7 118.865 1230.96 112.95 1237.72 108.79C1244.61 104.63 1252.54 102.55 1261.51 102.55C1270.48 102.55 1278.35 104.63 1285.11 108.79C1292 112.95 1297.33 118.865 1301.1 126.535C1304.87 134.205 1306.75 143.11 1306.75 153.25C1306.75 163.39 1304.87 172.295 1301.1 179.965C1297.33 187.635 1292 193.55 1285.11 197.71C1278.35 201.87 1270.48 203.95 1261.51 203.95ZM1261.51 195.37C1268.4 195.37 1274.45 193.615 1279.65 190.105C1284.98 186.595 1289.07 181.655 1291.93 175.285C1294.79 168.915 1296.22 161.57 1296.22 153.25C1296.22 144.93 1294.79 137.585 1291.93 131.215C1289.07 124.845 1284.98 119.905 1279.65 116.395C1274.45 112.885 1268.4 111.13 1261.51 111.13C1254.75 111.13 1248.71 112.885 1243.38 116.395C1238.18 119.905 1234.15 124.845 1231.29 131.215C1228.43 137.585 1227 144.93 1227 153.25C1227 161.57 1228.43 168.915 1231.29 175.285C1234.15 181.655 1238.18 186.595 1243.38 190.105C1248.71 193.615 1254.75 195.37 1261.51 195.37Z", fill: color }),
2595
- index.h("path", { d: "M1366.03 203.95C1352.25 203.95 1341.52 199.53 1333.85 190.69C1326.31 181.72 1322.54 169.24 1322.54 153.25C1322.54 137.39 1326.38 124.975 1334.05 116.005C1341.72 107.035 1352.38 102.55 1366.03 102.55C1373.57 102.55 1380.26 104.11 1386.11 107.23C1391.96 110.22 1396.77 114.575 1400.54 120.295L1394.3 126.34C1391.31 121.66 1387.28 118.02 1382.21 115.42C1377.27 112.69 1371.88 111.325 1366.03 111.325C1355.76 111.325 1347.63 115.03 1341.65 122.44C1335.8 129.85 1332.88 140.12 1332.88 153.25C1332.88 166.38 1335.8 176.65 1341.65 184.06C1347.63 191.47 1355.76 195.175 1366.03 195.175C1371.88 195.175 1377.27 193.875 1382.21 191.275C1387.28 188.545 1391.31 184.84 1394.3 180.16L1400.54 186.205C1396.77 191.925 1391.96 196.345 1386.11 199.465C1380.26 202.455 1373.57 203.95 1366.03 203.95Z", fill: color }),
2596
- index.h("path", { d: "M1446.55 203.95C1436.93 203.95 1429.13 201.285 1423.15 195.955C1417.17 190.495 1414.18 183.41 1414.18 174.7C1414.18 165.08 1417.62 157.605 1424.51 152.275C1431.53 146.945 1441.35 144.28 1453.96 144.28H1477.75V138.43C1477.75 129.72 1475.47 123.09 1470.92 118.54C1466.5 113.86 1460.07 111.52 1451.62 111.52C1445.9 111.52 1440.63 112.885 1435.82 115.615C1431.01 118.345 1427.11 122.18 1424.12 127.12L1417.88 120.295C1421.52 114.575 1426.27 110.22 1432.12 107.23C1438.1 104.11 1444.86 102.55 1452.4 102.55C1463.58 102.55 1472.29 105.605 1478.53 111.715C1484.9 117.695 1488.08 126.015 1488.08 136.675V184.255C1488.08 188.805 1488.86 194.72 1490.42 202H1481.45C1480.28 199.14 1479.44 194.07 1478.92 186.79H1478.53C1474.76 192.25 1470.14 196.475 1464.68 199.465C1459.22 202.455 1453.18 203.95 1446.55 203.95ZM1446.55 195.175C1452.01 195.175 1457.14 194.07 1461.95 191.86C1466.76 189.52 1470.6 186.465 1473.46 182.695C1476.32 178.795 1477.75 174.7 1477.75 170.41V152.665H1453.37C1444.27 152.665 1437.12 154.615 1431.92 158.515C1426.85 162.415 1424.32 167.81 1424.32 174.7C1424.32 180.68 1426.4 185.62 1430.56 189.52C1434.72 193.29 1440.05 195.175 1446.55 195.175Z", fill: color }),
2597
- index.h("path", { d: "M1547.14 203.95C1539.08 203.95 1532.97 201.48 1528.81 196.54C1524.65 191.47 1522.57 184.19 1522.57 174.7V113.275H1505.02V104.5H1522.57V77.9801L1532.32 74.6651H1533.1V104.5H1560.59V113.275H1533.1V172.555C1533.1 180.355 1534.33 186.01 1536.8 189.52C1539.27 193.03 1543.17 194.785 1548.5 194.785C1553.83 194.785 1558.06 194.005 1561.18 192.445L1562.35 200.83C1558.19 202.91 1553.12 203.95 1547.14 203.95Z", fill: color }),
2598
- index.h("path", { d: "M1661.53 157.54H1589.77C1590.42 169.37 1593.54 178.535 1599.13 185.035C1604.85 191.535 1612.65 194.785 1622.53 194.785C1628.51 194.785 1633.97 193.485 1638.91 190.885C1643.98 188.285 1647.95 184.645 1650.81 179.965L1657.24 186.4C1653.34 192.12 1648.4 196.475 1642.42 199.465C1636.57 202.455 1629.94 203.95 1622.53 203.95C1609.01 203.95 1598.35 199.465 1590.55 190.495C1582.88 181.525 1579.05 169.175 1579.05 153.445C1579.05 137.585 1582.82 125.17 1590.36 116.2C1597.9 107.1 1608.23 102.55 1621.36 102.55C1633.84 102.55 1643.66 106.84 1650.81 115.42C1657.96 124 1661.53 135.895 1661.53 151.105V157.54ZM1651.39 147.4C1651.39 136.48 1648.66 127.77 1643.2 121.27C1637.74 114.77 1630.46 111.52 1621.36 111.52C1611.74 111.52 1604.2 114.77 1598.74 121.27C1593.28 127.77 1590.29 137.065 1589.77 149.155H1651.39V147.4Z", fill: color })));
2051
+ const style$3 = {
2052
+ Wrapper: { ...mixins.AuthWrapper, "max-width": "600px" },
2053
+ Column: mixins.AuthColumn,
2054
+ HostBlock: mixins.HostBlock,
2055
+ ":host": {
2056
+ margin: "0 auto",
2057
+ width: "100%",
2058
+ },
2059
+ ButtonsContainer: mixins.AuthButtonsContainer,
2060
+ ErrorStyle: mixins.ErrorStyles,
2061
+ };
2062
+ const vanillaStyle = `
2063
+ sqm-portal-register {
2064
+ margin: 0 auto;
2065
+ width: 100%;
2066
+ display: block;
2599
2067
  }
2600
2068
 
2601
- const vanillaStyle$2 = `
2069
+ :host{
2070
+ display: block;
2071
+ }
2072
+
2073
+ :host([hidden]) {
2074
+ display: none;
2075
+ }
2076
+ `;
2077
+ const sheet$3 = JSS.createStyleSheet(style$3);
2078
+ const styleString$3 = sheet$3.toString();
2079
+ function PortalRegisterView(props) {
2080
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
2081
+ const { states, refs, callbacks, content } = props;
2082
+ if (states.error) {
2083
+ window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
2084
+ }
2085
+ return (index.h("div", { class: sheet$3.classes.Wrapper, part: "sqm-base" },
2086
+ index.h("style", { type: "text/css" },
2087
+ vanillaStyle,
2088
+ styleString$3),
2089
+ index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, content.pageLabel),
2090
+ index.h("sl-form", { class: sheet$3.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
2091
+ states.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
2092
+ index.h("div", { part: "erroralert-text" }, props.states.error))),
2093
+ content.formData,
2094
+ !states.hideInputs && (index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
2095
+ if (!value) {
2096
+ return content.requiredFieldErrorMessage;
2097
+ }
2098
+ // this matches shoelace validation, but could be better
2099
+ if (!value.includes("@")) {
2100
+ return content.invalidEmailErrorMessage;
2101
+ }
2102
+ } }, (((_b = (_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
2103
+ class: sheet$3.classes.ErrorStyle,
2104
+ helpText: ((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
2105
+ content.requiredFieldErrorMessage,
2106
+ }
2107
+ : [])))),
2108
+ !states.hideInputs && (index.h("sqm-password-field", { fieldLabel: content.passwordLabel, "disable-validation": states.disablePasswordValidation, meetsRequirementsText: content.meetsRequirementsText, doesNotMeetRequirementsText: content.doesNotMeetRequirementsText, minErrorText: content.minErrorText, uppercaseErrorText: content.uppercaseErrorText, lowercaseErrorText: content.lowercaseErrorText, hasErrorText: content.hasErrorText })),
2109
+ content.passwordField,
2110
+ !states.hideInputs && states.confirmPassword && (index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading || ((_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.disabled), required: true }, (((_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.confirmPassword) ? {
2111
+ value: (_j = (_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.initialData) === null || _j === void 0 ? void 0 : _j.confirmPassword,
2112
+ }
2113
+ : {}), (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.validationErrors) === null || _l === void 0 ? void 0 : _l.confirmPassword) ? {
2114
+ class: sheet$3.classes.ErrorStyle,
2115
+ helpText: ((_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.validationErrors) === null || _o === void 0 ? void 0 : _o.confirmPassword) || content.requiredFieldErrorMessage,
2116
+ }
2117
+ : [])))),
2118
+ content.terms,
2119
+ index.h("div", { class: sheet$3.classes.ButtonsContainer },
2120
+ index.h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
2121
+ content.secondaryButton))));
2122
+ }
2123
+
2124
+ const style$4 = {
2125
+ ErrorStyle: {
2126
+ "&::part(control)": {
2127
+ background: "var(--sl-color-danger-10)",
2128
+ borderColor: "var(--sl-color-danger-500)",
2129
+ outline: "var(--sl-color-danger-500)",
2130
+ },
2131
+ "&:host": {
2132
+ "--focus-ring": "0 0 0 var(--sl-focus-ring-width) red !important",
2133
+ },
2134
+ },
2135
+ ErrorMessageStyle: {
2136
+ margin: 0,
2137
+ marginTop: "5px",
2138
+ color: "var(--sl-color-danger-500)",
2139
+ fontSize: "var(--sl-input-help-text-font-size-medium)",
2140
+ fontFamily: "var(--sl-font-sans)",
2141
+ fontWeight: "var(--sl-font-weight-normal)",
2142
+ },
2143
+ FieldContainer: {
2144
+ "margin-bottom": "var(--sl-spacing-large)",
2145
+ },
2146
+ };
2147
+ const vanillaStyle$1 = `
2148
+ :host {
2149
+ margin: 0 auto;
2150
+ width: 100%;
2151
+ display: block;
2152
+ }
2153
+ sl-checkbox::part(label){
2154
+ font-size: var(--sl-input-label-font-size-small);
2155
+ font-weight: var(--sl-font-weight-normal);
2156
+ line-height: 20px;
2157
+ }
2158
+ sl-checkbox::part(base){
2159
+ align-items: start;
2160
+ }
2161
+ `;
2162
+ JSS.jss.setup(JSS.create());
2163
+ const sheet$4 = JSS.jss.createStyleSheet(style$4);
2164
+ const styleString$4 = sheet$4.toString();
2165
+ function CheckboxFieldView(props) {
2166
+ var _b, _c;
2167
+ const { states, content, callbacks } = props;
2168
+ return (index.h("div", { class: sheet$4.classes.FieldContainer, part: "sqm-base" },
2169
+ index.h("style", { type: "text/css" },
2170
+ vanillaStyle$1,
2171
+ styleString$4),
2172
+ index.h("sl-checkbox", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
2173
+ e.target.value = e.target.checked;
2174
+ callbacks.setChecked(e.target.value);
2175
+ } }, (!content.checkboxOptional ? { required: false } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled), required: false }), global.intl.formatMessage({
2176
+ id: content.checkboxName + "-message",
2177
+ defaultMessage: content.checkboxLabel,
2178
+ }, {
2179
+ labelLink: (index.h("a", { href: content.checkboxLabelLink, target: "_blank" }, content.checkboxLabelLinkText || content.checkboxLabelLink)),
2180
+ }))));
2181
+ }
2182
+
2183
+ function CouponCodeView(props) {
2184
+ const error = !props.loading && props.error;
2185
+ const style = {
2186
+ HostBlock: mixins.HostBlock,
2187
+ couponCodeLabel: {
2188
+ margin: "var(--sl-spacing-x-small) 0",
2189
+ color: props.textColor || "var(--sqm-text-subdued)",
2190
+ fontSize: "var(--sl-font-size-small)",
2191
+ },
2192
+ };
2193
+ const vanillaStyle = `
2602
2194
  :host{
2603
- margin: 0 auto;
2195
+ display: block;
2604
2196
  width: 100%;
2605
2197
  }
2606
- a{
2607
- cursor:pointer;
2608
- color: var(--sqm-text-subdued);
2609
- text-decoration: none ;
2198
+ `;
2199
+ const sheet = JSS.createStyleSheet(style);
2200
+ const styleString = sheet.toString();
2201
+ return (index.h("div", null,
2202
+ index.h("style", { type: "text/css" },
2203
+ styleString,
2204
+ vanillaStyle),
2205
+ index.h("p", { class: sheet.classes.couponCodeLabel, style: { textAlign: props.textAlign } }, props.couponCodeLabel),
2206
+ error ? (index.h("sqm-form-message", { type: props.errorType, exportparts: "erroralert-icon" },
2207
+ index.h("div", { part: "erroralert-text" }, props.errorText))) : (index.h(copyTextView.CopyTextView, Object.assign({}, props)))));
2208
+ }
2209
+
2210
+ const style$5 = {
2211
+ ErrorStyle: {
2212
+ "--sl-input-border-color": "var(--sl-color-danger-500)",
2213
+ "--sl-input-background-color": "var(--sl-color-danger-10)",
2214
+ "--sl-input-border-color-focus": "var(--sl-color-danger-500)",
2215
+ "--sl-input-border-color-hover": "var(--sl-color-danger-500)",
2216
+ },
2217
+ ErrorMessageStyle: {
2218
+ margin: 0,
2219
+ color: "var(--sl-color-danger-500)",
2220
+ fontSize: "var(--sl-input-help-text-font-size-medium)",
2221
+ },
2222
+ FieldContainer: {
2223
+ "margin-bottom": "var(--sl-spacing-large)",
2224
+ },
2225
+ };
2226
+ const vanillaStyle$2 = `
2227
+ :host {
2228
+ margin: 0 auto;
2229
+ width: 100%;
2230
+ display: block;
2231
+ }
2232
+ sl-select::part(label){
2233
+ font-size: var(--sl-input-label-font-size-small);
2234
+ font-weight: var(--sl-font-weight-semibold);
2235
+ }
2236
+ `;
2237
+ JSS.jss.setup(JSS.create());
2238
+ const sheet$5 = JSS.jss.createStyleSheet(style$5);
2239
+ const styleString$5 = sheet$5.toString();
2240
+ function DropdownFieldView(props) {
2241
+ var _a, _b, _c, _d, _e, _f, _g;
2242
+ const { states, content } = props;
2243
+ const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2244
+ return (index.h("div", { class: sheet$5.classes.FieldContainer, part: "sqm-base" },
2245
+ index.h("style", { type: "text/css" },
2246
+ vanillaStyle$2,
2247
+ styleString$5),
2248
+ index.h("sl-select", Object.assign({ exportparts: "label: input-label, base: input-base", label: content.dropdownLabel, name: `/${content.dropdownName}` }, (!content.dropdownOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.dropdownName]) ? {
2249
+ value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.dropdownName],
2250
+ }
2251
+ : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) ? {
2252
+ class: sheet$5.classes.ErrorStyle,
2253
+ }
2254
+ : [])), content.selectOptions),
2255
+ (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (index.h("p", { class: sheet$5.classes.ErrorMessageStyle }, global.intl.formatMessage({
2256
+ id: `errorMessage-${content.dropdownName}`,
2257
+ defaultMessage: content.errorMessage,
2258
+ })))));
2259
+ }
2260
+
2261
+ const EditProfileView = (props) => {
2262
+ var _a, _b, _c, _d;
2263
+ const { states, callbacks } = props;
2264
+ const { text } = states;
2265
+ const { errors } = states.formState;
2266
+ if (states.showEdit) {
2267
+ return (index.h("div", { class: `CardWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
2268
+ index.h("h2", { part: "sqm-header", style: {
2269
+ fontSize: "var(--sl-font-size-x-large)",
2270
+ margin: "0px",
2271
+ textAlign: "center",
2272
+ } }, text.editprofileheader),
2273
+ index.h("form", { class: "FormWrapper", onSubmit: callbacks.onSubmit },
2274
+ index.h("div", { class: "FormSection" },
2275
+ states.formState.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
2276
+ index.h("div", { part: "erroralert-text" }, states.formState.error))),
2277
+ index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: states.formState.firstName, onInput: callbacks.onChange, label: text.firstnametext, disabled: states.loading }, (errors.firstName && errors.firstName.status !== "valid"
2278
+ ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
2279
+ : []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
2280
+ ? errors.firstName.message
2281
+ : undefined })),
2282
+ index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: states.formState.lastName, onInput: callbacks.onChange, label: text.lastnametext, disabled: states.loading, id: "lastName", name: "lastName" }, (errors.lastName && errors.lastName.status !== "valid"
2283
+ ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
2284
+ : []), { error: errors.lastName && errors.lastName.status !== "valid"
2285
+ ? errors.lastName.message
2286
+ : undefined }))),
2287
+ text.showregion && states.formState.currentRegion && (index.h("sl-input", { exportparts: "label: input-label, base: input-base", disabled: true, value: states.formState.currentRegion, label: text.currentregiontext, id: "currentRegion", name: "currentRegion" })),
2288
+ index.h("div", { class: "ButtonWrapper" },
2289
+ index.h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
2290
+ callbacks.onSubmit(e);
2291
+ }, submit: true, exportparts: "base: primarybutton-base" }, text.updatetext),
2292
+ index.h("sl-button", { onClick: () => {
2293
+ callbacks.setShowEdit(false);
2294
+ }, exportparts: "base: secondarybutton-base" }, text.canceltext)))));
2610
2295
  }
2611
- `;
2612
- function PortalFooterView(props) {
2296
+ return (index.h("div", { class: `CardWrapper FormWrapper ${!states.showEdit && "ShowEdit"}`, part: "sqm-base" },
2297
+ index.h("div", { class: "FormSection" },
2298
+ index.h("h2", { part: "sqm-header", style: {
2299
+ fontSize: "var(--sl-font-size-x-large)",
2300
+ marginBottom: "0px",
2301
+ textAlign: "center",
2302
+ } }, text.editprofileheader),
2303
+ index.h("div", null,
2304
+ index.h("p", { style: { fontSize: "var(--sl-font-size-medium)" } }, (_a = states.user) === null || _a === void 0 ? void 0 :
2305
+ _a.firstName,
2306
+ " ", (_b = states.user) === null || _b === void 0 ? void 0 :
2307
+ _b.lastName),
2308
+ index.h("p", { style: { fontSize: "var(--sl-font-size-medium)" }, title: (_c = states.user) === null || _c === void 0 ? void 0 : _c.email }, (_d = states.user) === null || _d === void 0 ? void 0 : _d.email))),
2309
+ index.h("sl-button", { type: "primary", loading: states.loading, onClick: () => {
2310
+ callbacks.resetForm();
2311
+ callbacks.setShowEdit(true);
2312
+ }, exportparts: "base: primarybutton-base" }, text.editprofiletext)));
2313
+ };
2314
+
2315
+ function LeaderboardView(props) {
2316
+ var _a, _b, _c;
2317
+ const { states, data, elements } = props;
2318
+ const { styles } = states;
2613
2319
  const style = {
2614
- RowContainer: {
2615
- display: "flex",
2616
- "& > :not(:last-child)": {
2617
- "margin-right": "var(--sl-spacing-large)",
2320
+ Leaderboard: {
2321
+ "& table": {
2322
+ width: "100%",
2323
+ borderCollapse: "collapse",
2324
+ background: styles.background || "transparent",
2325
+ borderRadius: styles.borderRadius ? `${styles.borderRadius}px` : "0",
2618
2326
  },
2619
- },
2620
- Container: {
2621
- display: "flex",
2622
- "flex-direction": "column",
2623
- "align-items": "center",
2624
- "font-size": "var(--sl-font-size-small)",
2625
- color: "var(--sqm-text-subdued)",
2626
- "padding-top": `var(--sl-spacing-${props.paddingTop})`,
2627
- "padding-right": `var(--sl-spacing-${props.paddingRight})`,
2628
- "padding-bottom": `var(--sl-spacing-${props.paddingBottom})`,
2629
- "padding-left": `var(--sl-spacing-${props.paddingLeft})`,
2630
- "row-gap": `var(--sl-spacing-small)`,
2631
- "& a:hover": {
2632
- color: "var(--sqm-text)",
2327
+ "& th": {
2328
+ textAlign: "left",
2329
+ padding: "var(--sl-spacing-medium)",
2330
+ paddingTop: "0",
2331
+ fontSize: "var(--sl-font-size-medium)",
2332
+ fontWeight: "var(--sl-font-weight-semibold)",
2633
2333
  },
2634
- },
2635
- SupportText: {
2636
- textAlign: "center",
2637
- margin: 0,
2638
- },
2639
- PoweredByLink: {
2640
- color: "var(--sqm-text-subdued)",
2641
- "font-size": "var(--sl-font-size-small)",
2642
- display: "flex",
2643
- alignItems: "center",
2644
- svg: {
2645
- marginTop: "2px",
2646
- shapeRendering: "geometricprecision",
2334
+ "& tr:not(:first-child)": {
2335
+ borderTop: `1px solid ${styles.borderColor || "var(--sl-color-neutral-200)"}`,
2647
2336
  },
2648
- "&:hover, &:hover *": {
2649
- color: "var(--sqm-text)",
2337
+ "& td": {
2338
+ fontSize: "var(--sl-font-size-medium)",
2339
+ fontWeight: "var(--sl-font-weight-normal)",
2340
+ },
2341
+ "& .ellipses": {
2342
+ textAlign: "left",
2343
+ padding: "0",
2344
+ color: styles.textColor || "var(--sqm-text)",
2345
+ paddingLeft: "25%",
2346
+ },
2347
+ "& .highlight": {
2348
+ background: styles.viewingUserHighlightColor ||
2349
+ "var(--sqm-accent-color-background)",
2350
+ "& td, th": {
2351
+ color: styles.viewingUserHighlightTextColor || "var(--sqm-text)",
2352
+ },
2353
+ },
2354
+ "& td, th": {
2355
+ color: styles.textColor || "var(--sqm-text)",
2356
+ padding: "var(--sl-spacing-medium)",
2357
+ },
2358
+ "& .User": {
2359
+ width: "100%",
2360
+ },
2361
+ "& .Score": {
2362
+ width: "auto",
2363
+ whiteSpace: "nowrap",
2364
+ },
2365
+ "& .Rank": {
2366
+ whiteSpace: "nowrap",
2367
+ },
2368
+ "& .fullWidth": {
2369
+ width: "100%",
2650
2370
  },
2651
2371
  },
2652
2372
  };
2653
2373
  const sheet = JSS.createStyleSheet(style);
2654
2374
  const styleString = sheet.toString();
2655
- return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
2375
+ const vanillaStyle = `
2376
+ :host{
2377
+ display: block;
2378
+ }
2379
+ `;
2380
+ if (states.isEssentials) {
2381
+ return (index.h("sqm-empty", { "empty-state-image": "https://res.cloudinary.com/saasquatch/image/upload/v1715360191/squatch-assets/Leaderboard_Not_Available.svg", "empty-state-header": "Leaderboards aren\u2019t available on your plan", "empty-state-text": "Contact {supportText} to upgrade your plan and start leveraging gamification in your program.", "support-text": "Support" }));
2382
+ }
2383
+ if (states.loading) {
2384
+ return (index.h("div", { class: sheet.classes.Leaderboard, style: { width: styles.width || "100%" } },
2385
+ index.h("style", { type: "text/css" },
2386
+ styleString,
2387
+ vanillaStyle),
2388
+ index.h("table", null, [...Array(10)].map(() => {
2389
+ return (index.h("tr", null,
2390
+ index.h("td", null,
2391
+ index.h("sl-skeleton", null))));
2392
+ }))));
2393
+ }
2394
+ if (!states.hasLeaders)
2395
+ return elements.empty;
2396
+ let userSeenFlag = false;
2397
+ const getUsersName = (user) => {
2398
+ if (!user.firstName && !user.lastInitial)
2399
+ return styles.anonymousUser;
2400
+ const { firstName, lastInitial } = user;
2401
+ if (firstName && lastInitial)
2402
+ return `${firstName} ${lastInitial}`;
2403
+ if (firstName || lastInitial)
2404
+ return firstName || lastInitial;
2405
+ return styles.anonymousUser;
2406
+ };
2407
+ const getRankCellText = (userRank, isViewingUsersRow) => {
2408
+ if (!userRank) {
2409
+ return styles.hideNames ? `${styles.viewingUserText}` : "-";
2410
+ }
2411
+ const viewingUserText = ` - ${styles.viewingUserText}`;
2412
+ return styles.rankSuffix
2413
+ ? global.intl.formatMessage({
2414
+ id: "rank",
2415
+ defaultMessage: styles.rankSuffix,
2416
+ }, {
2417
+ rank: userRank,
2418
+ }) + `${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`
2419
+ : `${userRank} ${isViewingUsersRow && styles.hideNames ? viewingUserText : ""}`;
2420
+ };
2421
+ return (index.h("div", { class: sheet.classes.Leaderboard, part: "sqm-base", style: { width: styles.width || "100%" } },
2656
2422
  index.h("style", { type: "text/css" },
2657
- vanillaStyle$2,
2658
- styleString),
2659
- index.h("div", { class: sheet.classes.RowContainer },
2660
- props.faqLink && (index.h("a", { target: "_blank", href: props.faqLink }, props.faqText)),
2661
- props.termsLink && (index.h("a", { target: "_blank", href: props.termsLink }, props.termsText))),
2662
- !props.hideSupportText && (index.h("p", { class: sheet.classes.SupportText }, global.intl.formatMessage({
2663
- id: "supportFooter",
2664
- defaultMessage: props.supportText,
2665
- }, {
2666
- email: (index.h("a", { target: "_blank", href: `mailto:${props.supportEmail}` }, props.supportEmail)),
2667
- }))),
2668
- !props.hidePoweredBy && (index.h("a", { class: sheet.classes.PoweredByLink, target: "_blank", href: props.poweredByLink },
2669
- "Powered by ",
2670
- index.h(PoweredByImg, { color: "currentColor" })))));
2423
+ styleString,
2424
+ vanillaStyle),
2425
+ index.h("table", { part: "sqm-table" },
2426
+ index.h("tr", null,
2427
+ styles.showRank && (index.h("th", { class: `Rank ${styles.hideNames ? "fullWidth" : ""}` }, styles.rankheading)),
2428
+ !styles.hideNames && index.h("th", { class: "User" }, styles.usersheading),
2429
+ index.h("th", { class: "Score" }, styles.statsheading)), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
2430
+ _a.map((user) => {
2431
+ var _a, _b;
2432
+ if (user.rowNumber === ((_a = data.viewerRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
2433
+ userSeenFlag = true;
2434
+ const isViewingUsersRow = !styles.hideViewer && user.rowNumber === ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rowNumber);
2435
+ return (index.h("tr", { class: isViewingUsersRow ? "highlight" : "" },
2436
+ styles.showRank && (index.h("td", { class: "Rank" }, getRankCellText(user.rank, isViewingUsersRow))),
2437
+ !styles.hideNames && index.h("td", { class: "User" }, getUsersName(user)),
2438
+ index.h("td", { class: "Score" }, user.textValue)));
2439
+ }),
2440
+ !userSeenFlag && !styles.hideViewer && (index.h("tr", null,
2441
+ index.h("td", { colSpan: 100, class: "ellipses" },
2442
+ index.h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
2443
+ !userSeenFlag && !styles.hideViewer && (index.h("tr", { class: "highlight" },
2444
+ styles.showRank && (index.h("td", { class: "Rank" }, getRankCellText((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rank, true))),
2445
+ !styles.hideNames && (index.h("td", { class: "User" }, getUsersName(data.viewerRank || {}))),
2446
+ index.h("td", { class: "Score" }, ((_c = data.viewerRank) === null || _c === void 0 ? void 0 : _c.textValue) || "0"))))));
2671
2447
  }
2672
2448
 
2673
2449
  const paddingList = [
@@ -2798,35 +2574,44 @@ function HeroView(props) {
2798
2574
  index.h("div", { part: "sqm-two-col-secondary-col", class: `${sheet.classes.ColumnWrapper} ${sheet.classes.ColumnPadding}` }, content.secondaryColumn))) : (index.h("div", { part: "sqm-single-col", class: `${sheet.classes.SingleColumnContainer} ${sheet.classes.ColumnPadding}` }, content.primaryColumn))));
2799
2575
  }
2800
2576
 
2801
- function ReferralIframeView(props) {
2802
- const { states, data } = props;
2803
- const { content } = states;
2804
- // dependent on props
2805
- const style = {
2806
- Container: {
2807
- position: "relative",
2808
- width: content.iframeWidth,
2809
- height: content.iframeHeight,
2810
- },
2811
- IFrame: {
2812
- position: "absolute",
2813
- width: "100%",
2814
- height: "100%",
2815
- border: "0",
2816
- top: "0",
2817
- left: "0",
2818
- right: "0",
2819
- },
2820
- };
2821
- // JSS config
2822
- const sheet = JSS.createStyleSheet(style);
2823
- const styleString = sheet.toString();
2824
- return (index.h("div", { class: sheet.classes.Container },
2825
- index.h("style", { type: "text/css" }, styleString),
2826
- index.h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
2577
+ const style$6 = {
2578
+ ErrorStyle: mixins.ErrorStyles,
2579
+ FieldContainer: {
2580
+ "margin-bottom": "var(--sl-spacing-large)",
2581
+ },
2582
+ };
2583
+ const vanillaStyle$3 = `
2584
+ :host {
2585
+ margin: 0 auto;
2586
+ width: 100%;
2587
+ display: block;
2588
+ }
2589
+ `;
2590
+ JSS.jss.setup(JSS.create());
2591
+ const sheet$6 = JSS.jss.createStyleSheet(style$6);
2592
+ const styleString$6 = sheet$6.toString();
2593
+ function InputFieldView(props) {
2594
+ var _a, _b, _c, _d, _e, _f, _g;
2595
+ const { states, content } = props;
2596
+ const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2597
+ return (index.h("div", { class: sheet$6.classes.FieldContainer, part: "sqm-base" },
2598
+ index.h("style", { type: "text/css" },
2599
+ vanillaStyle$3,
2600
+ styleString$6),
2601
+ index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.fieldName}`, type: content.fieldType, label: content.fieldLabel }, (!content.fieldOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.fieldName]) ? {
2602
+ value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.fieldName],
2603
+ }
2604
+ : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]) ? {
2605
+ class: sheet$6.classes.ErrorStyle,
2606
+ helpText: global.intl.formatMessage({
2607
+ id: `errorMessage-${content.fieldName}`,
2608
+ defaultMessage: content.errorMessage || (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]),
2609
+ }),
2610
+ }
2611
+ : [])))));
2827
2612
  }
2828
2613
 
2829
- const style$5 = {
2614
+ const style$7 = {
2830
2615
  ErrorStyle: mixins.ErrorStyles,
2831
2616
  FieldsContainer: {
2832
2617
  "& sl-input": {
@@ -2834,7 +2619,7 @@ const style$5 = {
2834
2619
  },
2835
2620
  },
2836
2621
  };
2837
- const vanillaStyle$3 = `
2622
+ const vanillaStyle$4 = `
2838
2623
  :host {
2839
2624
  margin: 0 auto;
2840
2625
  width: 100%;
@@ -2871,21 +2656,21 @@ sl-input {
2871
2656
  }
2872
2657
 
2873
2658
  `;
2874
- const sheet$5 = JSS.createStyleSheet(style$5);
2875
- const styleString$5 = sheet$5.toString();
2659
+ const sheet$7 = JSS.createStyleSheet(style$7);
2660
+ const styleString$7 = sheet$7.toString();
2876
2661
  function NameFieldsView(props) {
2877
2662
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
2878
2663
  const { states } = props;
2879
2664
  const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2880
- return (index.h("div", { class: sheet$5.classes.FieldsContainer },
2665
+ return (index.h("div", { class: sheet$7.classes.FieldsContainer },
2881
2666
  index.h("style", { type: "text/css" },
2882
- vanillaStyle$3,
2883
- styleString$5),
2667
+ vanillaStyle$4,
2668
+ styleString$7),
2884
2669
  index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/firstName", type: "text", label: states.content.firstNameLabel, required: true, disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e.firstName) ? {
2885
2670
  value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.firstName,
2886
2671
  }
2887
2672
  : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
2888
- class: sheet$5.classes.ErrorStyle,
2673
+ class: sheet$7.classes.ErrorStyle,
2889
2674
  helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
2890
2675
  }
2891
2676
  : []))),
@@ -2893,98 +2678,206 @@ function NameFieldsView(props) {
2893
2678
  value: (_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.lastName,
2894
2679
  }
2895
2680
  : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
2896
- class: sheet$5.classes.ErrorStyle,
2681
+ class: sheet$7.classes.ErrorStyle,
2897
2682
  helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) || "Cannot be empty",
2898
2683
  }
2899
2684
  : [])))));
2900
2685
  }
2901
2686
 
2902
- const style$6 = {
2903
- ErrorStyle: {
2904
- "--sl-input-border-color": "var(--sl-color-danger-500)",
2905
- "--sl-input-background-color": "var(--sl-color-danger-10)",
2906
- "--sl-input-border-color-focus": "var(--sl-color-danger-500)",
2907
- "--sl-input-border-color-hover": "var(--sl-color-danger-500)",
2908
- },
2909
- ErrorMessageStyle: {
2910
- margin: 0,
2911
- color: "var(--sl-color-danger-500)",
2912
- fontSize: "var(--sl-input-help-text-font-size-medium)",
2913
- },
2914
- FieldContainer: {
2915
- "margin-bottom": "var(--sl-spacing-large)",
2916
- },
2917
- };
2918
- const vanillaStyle$4 = `
2919
- :host {
2920
- margin: 0 auto;
2921
- width: 100%;
2922
- display: block;
2923
- }
2924
- sl-select::part(label){
2925
- font-size: var(--sl-input-label-font-size-small);
2926
- font-weight: var(--sl-font-weight-semibold);
2687
+ function ChangeMarktingView(props) {
2688
+ const { states, callbacks } = props;
2689
+ const { text, formState } = states;
2690
+ const { error } = formState;
2691
+ const style = {
2692
+ Container: {
2693
+ display: "flex",
2694
+ flexDirection: "column",
2695
+ gap: "var(--sl-spacing-x-small)",
2696
+ padding: "0 var(--sl-spacing-xxx-large) var(--sl-spacing-xxx-large)",
2697
+ },
2698
+ SubmitButton: { marginBottom: "var(--sl-spacing-medium)" },
2699
+ Error: {
2700
+ "&::part(erroralert-base)": {
2701
+ "margin-bottom": "15px",
2702
+ },
2703
+ },
2704
+ Success: {
2705
+ "&::part(successalert-base)": {
2706
+ "margin-bottom": "15px",
2707
+ },
2708
+ },
2709
+ };
2710
+ const sheet = JSS.createStyleSheet(style);
2711
+ const styleString = sheet.toString();
2712
+ return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
2713
+ index.h("style", { type: "text/css" }, styleString),
2714
+ index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), text.emailPreferencesHeader),
2715
+ index.h("sl-form", { "onSl-submit": callbacks.onSubmit },
2716
+ index.h(CheckboxFieldView, { states: {
2717
+ checked: states.formState.marketingEmailOptIn,
2718
+ }, content: {
2719
+ checkboxLabel: text.marketingCheckboxLabel,
2720
+ checkboxName: "marketingEmailOptIn",
2721
+ }, callbacks: {
2722
+ setChecked: callbacks.setChecked,
2723
+ } }),
2724
+ index.h("sl-button", { class: sheet.classes.SubmitButton, type: "primary", submit: true, loading: states.loading, disabled: states.submitDisabled }, text.submitChangeButtonText),
2725
+ error && (index.h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
2726
+ index.h("div", { part: "erroralert-text" }, error))),
2727
+ states.success && (index.h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
2728
+ index.h("div", { part: "successalert-text" }, states.text.successMessage))))));
2927
2729
  }
2730
+
2731
+ const vanillaStyle$5 = `
2732
+ :host{
2733
+ margin: 0 auto;
2734
+ width: 100%;
2735
+ }
2736
+ a{
2737
+ cursor:pointer;
2738
+ color: var(--sqm-text-subdued);
2739
+ text-decoration: none ;
2740
+ }
2928
2741
  `;
2929
- JSS.jss.setup(JSS.create());
2930
- const sheet$6 = JSS.jss.createStyleSheet(style$6);
2931
- const styleString$6 = sheet$6.toString();
2932
- function DropdownFieldView(props) {
2933
- var _a, _b, _c, _d, _e, _f, _g;
2934
- const { states, content } = props;
2935
- const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2936
- return (index.h("div", { class: sheet$6.classes.FieldContainer, part: "sqm-base" },
2742
+ function PortalFooterView(props) {
2743
+ const style = {
2744
+ RowContainer: {
2745
+ display: "flex",
2746
+ "& > :not(:last-child)": {
2747
+ "margin-right": "var(--sl-spacing-large)",
2748
+ },
2749
+ },
2750
+ Container: {
2751
+ display: "flex",
2752
+ "flex-direction": "column",
2753
+ "align-items": "center",
2754
+ "font-size": "var(--sl-font-size-small)",
2755
+ color: "var(--sqm-text-subdued)",
2756
+ "padding-top": `var(--sl-spacing-${props.paddingTop})`,
2757
+ "padding-right": `var(--sl-spacing-${props.paddingRight})`,
2758
+ "padding-bottom": `var(--sl-spacing-${props.paddingBottom})`,
2759
+ "padding-left": `var(--sl-spacing-${props.paddingLeft})`,
2760
+ "row-gap": `var(--sl-spacing-small)`,
2761
+ "& a:hover": {
2762
+ color: "var(--sqm-text)",
2763
+ },
2764
+ },
2765
+ SupportText: {
2766
+ textAlign: "center",
2767
+ margin: 0,
2768
+ },
2769
+ PoweredByLink: {
2770
+ color: "var(--sqm-text-subdued)",
2771
+ "font-size": "var(--sl-font-size-small)",
2772
+ display: "flex",
2773
+ alignItems: "center",
2774
+ svg: {
2775
+ marginTop: "2px",
2776
+ shapeRendering: "geometricprecision",
2777
+ },
2778
+ "&:hover, &:hover *": {
2779
+ color: "var(--sqm-text)",
2780
+ },
2781
+ },
2782
+ };
2783
+ const sheet = JSS.createStyleSheet(style);
2784
+ const styleString = sheet.toString();
2785
+ return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
2937
2786
  index.h("style", { type: "text/css" },
2938
- vanillaStyle$4,
2939
- styleString$6),
2940
- index.h("sl-select", Object.assign({ exportparts: "label: input-label, base: input-base", label: content.dropdownLabel, name: `/${content.dropdownName}` }, (!content.dropdownOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.dropdownName]) ? {
2941
- value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.dropdownName],
2942
- }
2943
- : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) ? {
2944
- class: sheet$6.classes.ErrorStyle,
2945
- }
2946
- : [])), content.selectOptions),
2947
- (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (index.h("p", { class: sheet$6.classes.ErrorMessageStyle }, global.intl.formatMessage({
2948
- id: `errorMessage-${content.dropdownName}`,
2949
- defaultMessage: content.errorMessage,
2950
- })))));
2787
+ vanillaStyle$5,
2788
+ styleString),
2789
+ index.h("div", { class: sheet.classes.RowContainer },
2790
+ props.faqLink && (index.h("a", { target: "_blank", href: props.faqLink }, props.faqText)),
2791
+ props.termsLink && (index.h("a", { target: "_blank", href: props.termsLink }, props.termsText))),
2792
+ !props.hideSupportText && (index.h("p", { class: sheet.classes.SupportText }, global.intl.formatMessage({
2793
+ id: "supportFooter",
2794
+ defaultMessage: props.supportText,
2795
+ }, {
2796
+ email: (index.h("a", { target: "_blank", href: `mailto:${props.supportEmail}` }, props.supportEmail)),
2797
+ }))),
2798
+ !props.hidePoweredBy && (index.h("a", { class: sheet.classes.PoweredByLink, target: "_blank", href: props.poweredByLink },
2799
+ "Powered by ",
2800
+ index.h(PoweredByImg, { color: "currentColor" })))));
2951
2801
  }
2952
2802
 
2953
- const style$7 = {
2954
- ErrorStyle: mixins.ErrorStyles,
2955
- FieldContainer: {
2956
- "margin-bottom": "var(--sl-spacing-large)",
2957
- },
2958
- };
2959
- const vanillaStyle$5 = `
2960
- :host {
2961
- margin: 0 auto;
2962
- width: 100%;
2963
- display: block;
2803
+ function PortalFrameView(props, children) {
2804
+ const { data, notFullScreen, border } = props;
2805
+ const style = {
2806
+ HostBlock: mixins.HostBlock,
2807
+ Frame: {
2808
+ display: "flex",
2809
+ "flex-direction": "column",
2810
+ "box-sizing": "border-box",
2811
+ "&:nth-child(2)": {
2812
+ background: props.backgroundColor,
2813
+ },
2814
+ },
2815
+ FooterWrapper: {
2816
+ width: "100%",
2817
+ "max-width": "100%",
2818
+ padding: "var(--sl-spacing-medium) var(--sl-spacing-x-large)",
2819
+ background: props.headerAndFooterBackgroundColor,
2820
+ display: "flex",
2821
+ "justify-content": "flex-end",
2822
+ "align-items": "center",
2823
+ "box-sizing": "border-box",
2824
+ borderTop: border,
2825
+ "margin-top": "auto",
2826
+ },
2827
+ HeaderWrapper: {
2828
+ width: "100%",
2829
+ "max-width": "100%",
2830
+ "box-sizing": "border-box",
2831
+ display: "flex",
2832
+ "justify-content": "space-between",
2833
+ padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
2834
+ "align-items": "center",
2835
+ borderBottom: border,
2836
+ background: props.headerAndFooterBackgroundColor,
2837
+ "@media screen and (max-width: 499px)": {
2838
+ "flex-direction": "row-reverse",
2839
+ "justify-content": "flex-end",
2840
+ padding: "0",
2841
+ },
2842
+ },
2843
+ };
2844
+ const sheet = JSS.createStyleSheet(style);
2845
+ const styleString = sheet.toString();
2846
+ return (index.h("div", { style: { minHeight: notFullScreen ? "100%" : "100vh" }, class: sheet.classes.Frame, part: "sqm-base" },
2847
+ index.h("style", { type: "text/css" }, styleString),
2848
+ index.h("div", { class: sheet.classes.HeaderWrapper, part: "sqm-header" },
2849
+ data.header,
2850
+ index.h("slot", { name: "sqm-navigation-menu" })),
2851
+ children,
2852
+ index.h("div", { class: sheet.classes.FooterWrapper, part: "sqm-footer" }, data.footer)));
2964
2853
  }
2965
- `;
2966
- JSS.jss.setup(JSS.create());
2967
- const sheet$7 = JSS.jss.createStyleSheet(style$7);
2968
- const styleString$7 = sheet$7.toString();
2969
- function InputFieldView(props) {
2970
- var _a, _b, _c, _d, _e, _f, _g;
2971
- const { states, content } = props;
2972
- const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
2973
- return (index.h("div", { class: sheet$7.classes.FieldContainer, part: "sqm-base" },
2974
- index.h("style", { type: "text/css" },
2975
- vanillaStyle$5,
2976
- styleString$7),
2977
- index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.fieldName}`, type: content.fieldType, label: content.fieldLabel }, (!content.fieldOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.fieldName]) ? {
2978
- value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.fieldName],
2979
- }
2980
- : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]) ? {
2981
- class: sheet$7.classes.ErrorStyle,
2982
- helpText: global.intl.formatMessage({
2983
- id: `errorMessage-${content.fieldName}`,
2984
- defaultMessage: content.errorMessage || (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]),
2985
- }),
2986
- }
2987
- : [])))));
2854
+
2855
+ function ReferralIframeView(props) {
2856
+ const { states, data } = props;
2857
+ const { content } = states;
2858
+ // dependent on props
2859
+ const style = {
2860
+ Container: {
2861
+ position: "relative",
2862
+ width: content.iframeWidth,
2863
+ height: content.iframeHeight,
2864
+ },
2865
+ IFrame: {
2866
+ position: "absolute",
2867
+ width: "100%",
2868
+ height: "100%",
2869
+ border: "0",
2870
+ top: "0",
2871
+ left: "0",
2872
+ right: "0",
2873
+ },
2874
+ };
2875
+ // JSS config
2876
+ const sheet = JSS.createStyleSheet(style);
2877
+ const styleString = sheet.toString();
2878
+ return (index.h("div", { class: sheet.classes.Container },
2879
+ index.h("style", { type: "text/css" }, styleString),
2880
+ index.h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
2988
2881
  }
2989
2882
 
2990
2883
  const CheckMark = () => (index.h("svg", { width: 12, height: 10, fill: "none", xmlns: "http://www.w3.org/2000/svg" },
@@ -4061,108 +3954,164 @@ const empty = {
4061
3954
  ...baseResponse(null, "chooseReward", null, null, false, false, null, true),
4062
3955
  };
4063
3956
 
4064
- function CardFeedView(props, children) {
4065
- // Dependent on props, not feasiable to move out
4066
- const style = {
4067
- Container: {
4068
- columnGap: props.gap + "px",
4069
- columnWidth: props.width + "px",
4070
- "& > div": {
4071
- marginBottom: "24px",
4072
- },
4073
- },
4074
- };
4075
- const sheet = JSS.createStyleSheet(style);
4076
- const styleString = sheet.toString();
4077
- const vanillaStyle = `
4078
- :host{
4079
- display: block;
3957
+ const MessageLinkQuery = index_module.dist.gql `
3958
+ query (
3959
+ $programId: ID
3960
+ $engagementMedium: UserEngagementMedium!
3961
+ $shareMedium: ReferralShareMedium!
3962
+ ) {
3963
+ viewer {
3964
+ ... on User {
3965
+ messageLink(
3966
+ programId: $programId
3967
+ engagementMedium: $engagementMedium
3968
+ shareMedium: $shareMedium
3969
+ )
3970
+ shareLink(programId: $programId, engagementMedium: $engagementMedium)
3971
+ }
4080
3972
  }
4081
-
4082
- `;
4083
- return (index.h("div", null,
4084
- index.h("style", { type: "text/css" },
4085
- styleString,
4086
- vanillaStyle),
4087
- index.h("div", { class: sheet.classes.Container, part: "sqm-base" }, children)));
4088
- }
4089
-
4090
- function CouponCodeView(props) {
4091
- const error = !props.loading && props.error;
4092
- const style = {
4093
- HostBlock: mixins.HostBlock,
4094
- couponCodeLabel: {
4095
- margin: "var(--sl-spacing-x-small) 0",
4096
- color: props.textColor || "var(--sqm-text-subdued)",
4097
- fontSize: "var(--sl-font-size-small)",
4098
- },
4099
- };
4100
- const vanillaStyle = `
4101
- :host{
4102
- display: block;
4103
- width: 100%;
4104
3973
  }
4105
3974
  `;
4106
- const sheet = JSS.createStyleSheet(style);
4107
- const styleString = sheet.toString();
4108
- return (index.h("div", null,
4109
- index.h("style", { type: "text/css" },
4110
- styleString,
4111
- vanillaStyle),
4112
- index.h("p", { class: sheet.classes.couponCodeLabel, style: { textAlign: props.textAlign } }, props.couponCodeLabel),
4113
- error ? (index.h("sqm-form-message", { type: props.errorType, exportparts: "erroralert-icon" },
4114
- index.h("div", { part: "erroralert-text" }, props.errorText))) : (index.h(copyTextView.CopyTextView, Object.assign({}, props)))));
3975
+ function NativeShare(props, directLink, undefinedErrorText, unsupportedPlatformText) {
3976
+ const title = props.sharetitle || "Share title";
3977
+ const text = props.sharetext || "Share text";
3978
+ if (directLink === "undefined") {
3979
+ return alert(undefinedErrorText);
3980
+ }
3981
+ if (window.navigator.share) {
3982
+ window.navigator
3983
+ .share({
3984
+ title,
3985
+ text,
3986
+ url: directLink,
3987
+ })
3988
+ .catch((error) => console.error("Error on web share", error));
3989
+ }
3990
+ else {
3991
+ alert(unsupportedPlatformText);
3992
+ }
4115
3993
  }
4116
-
4117
- function t(t,n,r){return Math.min(Math.max(t,r),n)}class n extends Error{constructor(t){super(`Failed to parse color: "${t}"`);}}function r(r){if("string"!=typeof r)throw new n(r);if("transparent"===r.trim().toLowerCase())return [0,0,0,0];let e=r.trim();e=u.test(r)?function(t){const r=t.toLowerCase().trim(),e=o[function(t){let n=5381,r=t.length;for(;r;)n=33*n^t.charCodeAt(--r);return (n>>>0)%2341}(r)];if(!e)throw new n(t);return `#${e}`}(r):r;const f=s.exec(e);if(f){const t=Array.from(f).slice(1);return [...t.slice(0,3).map(t=>parseInt(_(t,2),16)),parseInt(_(t[3]||"f",2),16)/255]}const p=i.exec(e);if(p){const t=Array.from(p).slice(1);return [...t.slice(0,3).map(t=>parseInt(t,16)),parseInt(t[3]||"ff",16)/255]}const z=a.exec(e);if(z){const t=Array.from(z).slice(1);return [...t.slice(0,3).map(t=>parseInt(t,10)),parseFloat(t[3]||"1")]}const h=c.exec(e);if(h){const[e,o,_,s]=Array.from(h).slice(1).map(parseFloat);if(t(0,100,o)!==o)throw new n(r);if(t(0,100,_)!==_)throw new n(r);return [...l(e,o,_),s||1]}throw new n(r)}const e=t=>parseInt(t.replace(/_/g,""),36),o="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((t,n)=>{const r=e(n.substring(0,3)),o=e(n.substring(3)).toString(16);let _="";for(let t=0;t<6-o.length;t++)_+="0";return t[r]=`${_}${o}`,t},{}),_=(t,n)=>Array.from(Array(n)).map(()=>t).join(""),s=new RegExp(`^#${_("([a-f0-9])",3)}([a-f0-9])?$`,"i"),i=new RegExp(`^#${_("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),a=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${_(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),c=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,u=/^[a-z]+$/i,f=t=>Math.round(255*t),l=(t,n,r)=>{let e=r/100;if(0===n)return [e,e,e].map(f);const o=(t%360+360)%360/60,_=(1-Math.abs(2*e-1))*(n/100),s=_*(1-Math.abs(o%2-1));let i=0,a=0,c=0;o>=0&&o<1?(i=_,a=s):o>=1&&o<2?(i=s,a=_):o>=2&&o<3?(a=_,c=s):o>=3&&o<4?(a=s,c=_):o>=4&&o<5?(i=s,c=_):o>=5&&o<6&&(i=_,c=s);const u=e-_/2;return [i+u,a+u,c+u].map(f)};function p(t){const[n,e,o,_]=r(t).map((t,n)=>3===n?t:t/255),s=Math.max(n,e,o),i=Math.min(n,e,o),a=(s+i)/2;if(s===i)return [0,0,a,_];const c=s-i;return [60*(n===s?(e-o)/c+(e<o?6:0):e===s?(o-n)/c+2:(n-e)/c+4),a>.5?c/(2-s-i):c/(s+i),a,_]}function z(n,r,e,o){return `hsla(${(n%360).toFixed()}, ${t(0,100,100*r).toFixed()}%, ${t(0,100,100*e).toFixed()}%, ${parseFloat(t(0,1,o).toFixed(3))})`}
4118
-
4119
- const colorScale = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
4120
- const lScale = [
4121
- 0.95,
4122
- 0.86,
4123
- 0.76,
4124
- 0.66,
4125
- 0.56,
4126
- 0.46,
4127
- 0.39,
4128
- 0.32,
4129
- 0.25,
4130
- 0.18,
4131
- 0.15,
4132
- ];
4133
- // https://github.com/ricokahler/color2k/blob/main/src/parseToRgba.ts
4134
- const hslaRegex = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;
4135
- function niceParseToHsla(color) {
4136
- const normalizedColor = color.trim();
4137
- const hslaMatch = hslaRegex.exec(normalizedColor);
4138
- if (hslaMatch) {
4139
- const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);
4140
- if (t(0, 100, s) !== s)
4141
- throw new n(color);
4142
- if (t(0, 100, l) !== l)
4143
- throw new n(color);
4144
- return [h, s / 100, l, a || 1];
3994
+ function FacebookShare(directLink, messageLink, errorText) {
3995
+ if (messageLink === "undefined" || directLink === "undefined") {
3996
+ return alert(errorText);
3997
+ }
3998
+ if (typeof SquatchAndroid.shareOnFacebook !== "undefined") {
3999
+ return SquatchAndroid.shareOnFacebook(directLink, messageLink);
4000
+ }
4001
+ else {
4002
+ return GenericShare(messageLink, errorText);
4145
4003
  }
4146
- // Warning -- converts to RGB first, so is lossy
4147
- return p(color);
4148
4004
  }
4149
- function generateScale(color, name = "primary") {
4150
- const [h, s, l, a] = niceParseToHsla(color);
4151
- return lScale
4152
- .map((l) => z(h, s, l, a))
4153
- .map((color, index) => {
4154
- return `--sl-color-${name}-${colorScale[index]}: ${color};\n`;
4155
- });
4005
+ function GenericShare(messageLink, errorText) {
4006
+ return messageLink ? (window.location.href = messageLink) : alert(errorText);
4156
4007
  }
4157
- /**
4158
- * Generated a Shoelace color scale css string from a base color
4159
- *
4160
- * @param color
4161
- * @param name
4162
- * @returns
4163
- */
4164
- function autoColorScaleCss(color, name = "primary") {
4165
- return generateScale(color, name).join("\n");
4008
+ function useShareButton(props) {
4009
+ var _a, _b, _c, _d;
4010
+ const { sharetitle, sharetext, medium } = props;
4011
+ const programId = props.programId ? props.programId : index_module.H();
4012
+ const user = index_module.J();
4013
+ const engagementMedium = index_module.B();
4014
+ const variables = {
4015
+ engagementMedium,
4016
+ programId: programId,
4017
+ shareMedium: medium.toUpperCase(),
4018
+ };
4019
+ const contextData = index_module.Fn(useReferralCodes.REFERRAL_CODES_NAMESPACE);
4020
+ const overrideData = contextData === null || contextData === void 0 ? void 0 : contextData[medium];
4021
+ // only queries if a programId is available
4022
+ const res = index_module.wn(MessageLinkQuery, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || overrideData !== undefined);
4023
+ const [setCopied, copiedRes] = index_module.$e(useReferralCodes.SET_CODE_COPIED);
4024
+ const directLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.shareLink) || ((_b = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.shareLink);
4025
+ const environment = index_module.getEnvironmentSDK();
4026
+ const hide = (medium.toLocaleUpperCase() === "SMS" &&
4027
+ window.orientation === undefined) ||
4028
+ (medium.toLocaleUpperCase() === "DIRECT" && !window.navigator.share);
4029
+ const messageLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink) || ((_d = (_c = res.data) === null || _c === void 0 ? void 0 : _c.viewer) === null || _d === void 0 ? void 0 : _d.messageLink);
4030
+ async function onClick() {
4031
+ if (overrideData) {
4032
+ await setCopied({ referralCode: contextData.referralCode });
4033
+ contextData.refresh();
4034
+ }
4035
+ if (medium.toLocaleUpperCase() === "FACEBOOK" &&
4036
+ environment.type === "SquatchAndroid") {
4037
+ FacebookShare(directLink, messageLink, props.errorText);
4038
+ }
4039
+ else if (medium.toLocaleUpperCase() === "DIRECT") {
4040
+ NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
4041
+ }
4042
+ }
4043
+ const isPlainLink = !(medium.toLocaleUpperCase() === "FACEBOOK" &&
4044
+ environment.type === "SquatchAndroid") &&
4045
+ medium.toLocaleUpperCase() !== "DIRECT" &&
4046
+ messageLink;
4047
+ const userAgent = window.navigator.userAgent.toLowerCase(), safari = /safari/.test(userAgent), ios = /iphone|ipod|ipad/.test(userAgent);
4048
+ const openInSameTab = ios && !safari;
4049
+ return {
4050
+ ...props,
4051
+ loading: res.loading && !(overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink),
4052
+ messageLink,
4053
+ isPlainLink,
4054
+ onClick,
4055
+ openInSameTab,
4056
+ hide,
4057
+ };
4058
+ }
4059
+
4060
+ const MessageLinkQuery$1 = index_module.dist.gql `
4061
+ query ($programId: ID, $engagementMedium: UserEngagementMedium!) {
4062
+ user: viewer {
4063
+ ... on User {
4064
+ shareLink(
4065
+ programId: $programId
4066
+ engagementMedium: $engagementMedium
4067
+ shareMedium: DIRECT
4068
+ )
4069
+ }
4070
+ }
4071
+ }
4072
+ `;
4073
+ const WIDGET_ENGAGEMENT_EVENT = index_module.dist.gql `
4074
+ mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
4075
+ createUserAnalyticsEvent(eventMeta: $eventMeta)
4076
+ }
4077
+ `;
4078
+ function useShareLink(props) {
4079
+ var _a, _b;
4080
+ const { programId = index_module.H() } = props;
4081
+ const user = index_module.J();
4082
+ const engagementMedium = index_module.B();
4083
+ const contextData = index_module.Fn(useReferralCodes.REFERRAL_CODES_NAMESPACE);
4084
+ const { data } = index_module.wn(MessageLinkQuery$1, { programId, engagementMedium }, !(user === null || user === void 0 ? void 0 : user.jwt) || !!props.linkOverride || (contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) !== undefined);
4085
+ const [sendLoadEvent] = index_module.$e(WIDGET_ENGAGEMENT_EVENT);
4086
+ const [setCopied, copiedRes] = index_module.$e(useReferralCodes.SET_CODE_COPIED);
4087
+ const copyString = (_b = ((contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) || ((_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink))) !== null && _b !== void 0 ? _b :
4088
+ // Shown during loading
4089
+ "...";
4090
+ const [open, setOpen] = stencilHooks_module.useState(false);
4091
+ async function onClick() {
4092
+ if (contextData) {
4093
+ await setCopied({ referralCode: contextData.referralCode });
4094
+ contextData.refresh();
4095
+ }
4096
+ // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
4097
+ // Only if called from a user-initiated event
4098
+ navigator.clipboard.writeText(copyString);
4099
+ setOpen(true);
4100
+ setTimeout(() => setOpen(false), props.tooltiplifespan);
4101
+ sendLoadEvent({
4102
+ eventMeta: {
4103
+ programId,
4104
+ id: user === null || user === void 0 ? void 0 : user.id,
4105
+ accountId: user === null || user === void 0 ? void 0 : user.accountId,
4106
+ type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
4107
+ meta: {
4108
+ engagementMedium,
4109
+ shareMedium: "DIRECT",
4110
+ },
4111
+ },
4112
+ });
4113
+ }
4114
+ return { ...props, onClick, open, copyString: copyString };
4166
4115
  }
4167
4116
 
4168
4117
  const map = new Map();
@@ -4223,7 +4172,6 @@ exports.ShadowViewAddon = ShadowViewAddon;
4223
4172
  exports.ShareButtonView = ShareButtonView;
4224
4173
  exports.StatContainerView = StatContainerView;
4225
4174
  exports.TaskCardView = TaskCardView;
4226
- exports.autoColorScaleCss = autoColorScaleCss;
4227
4175
  exports.chooseAmountFixed = chooseAmountFixed;
4228
4176
  exports.chooseAmountFixedNoDescription = chooseAmountFixedNoDescription;
4229
4177
  exports.chooseAmountVariable = chooseAmountVariable;