@saasquatch/mint-components 1.13.5-0 → 1.14.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/cjs/{ShadowViewAddon-14a02da4.js → AutoColor-3b59126f.js} +1137 -1137
  2. package/dist/cjs/ErrorView-b2fcf954.js +35 -0
  3. package/dist/cjs/IndirectTaxDetailsView-409dae6f.js +646 -0
  4. package/dist/cjs/data-6d96b89c.js +137 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/mint-components.cjs.js +1 -1
  7. package/dist/cjs/parseStates-d1effc19.js +16 -0
  8. package/dist/cjs/{sqm-banking-info-form_17.cjs.entry.js → sqm-banking-info-form_10.cjs.entry.js} +209 -1885
  9. package/dist/cjs/sqm-big-stat_41.cjs.entry.js +30 -30
  10. package/dist/cjs/sqm-code-verification.cjs.entry.js +349 -0
  11. package/dist/cjs/sqm-invoice-table-data-cell_5.cjs.entry.js +84 -0
  12. package/dist/cjs/sqm-stencilbook.cjs.entry.js +12390 -11094
  13. package/dist/cjs/sqm-tax-and-cash.cjs.entry.js +1221 -0
  14. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +11 -3
  15. package/dist/cjs/sqm-widget-verification.cjs.entry.js +17 -6
  16. package/dist/cjs/utils-8257e7ab.js +105 -0
  17. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +78 -78
  18. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +37 -3
  19. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +39 -5
  20. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +41 -6
  21. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +12 -8
  22. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +1 -1
  23. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +2 -2
  24. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -1
  25. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +1 -1
  26. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +1 -1
  27. package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +2 -2
  28. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +2 -2
  29. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +1 -1
  30. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +2 -2
  31. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +26 -1
  32. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.js +2 -2
  33. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +75 -41
  34. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +1 -1
  35. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +62 -3
  36. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +3 -3
  37. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +5 -4
  38. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +49 -11
  39. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +3 -3
  40. package/dist/collection/utils/parseStates.js +12 -0
  41. package/dist/esm/{ShadowViewAddon-23a6afab.js → AutoColor-d8d7f31d.js} +1141 -1141
  42. package/dist/esm/ErrorView-48e2b969.js +33 -0
  43. package/dist/esm/IndirectTaxDetailsView-c321099a.js +639 -0
  44. package/dist/esm/data-a05c78ae.js +121 -0
  45. package/dist/esm/loader.js +1 -1
  46. package/dist/esm/mint-components.js +1 -1
  47. package/dist/esm/parseStates-ed75e224.js +14 -0
  48. package/dist/esm/{sqm-banking-info-form_17.entry.js → sqm-banking-info-form_10.entry.js} +133 -1802
  49. package/dist/esm/sqm-big-stat_41.entry.js +1 -1
  50. package/dist/esm/sqm-code-verification.entry.js +345 -0
  51. package/dist/esm/sqm-invoice-table-data-cell_5.entry.js +76 -0
  52. package/dist/esm/sqm-stencilbook.entry.js +10501 -9205
  53. package/dist/esm/sqm-tax-and-cash.entry.js +1217 -0
  54. package/dist/esm/sqm-widget-verification-controller.entry.js +12 -4
  55. package/dist/esm/sqm-widget-verification.entry.js +17 -6
  56. package/dist/esm/utils-7c96856c.js +97 -0
  57. package/dist/esm-es5/AutoColor-d8d7f31d.js +1 -0
  58. package/dist/esm-es5/ErrorView-48e2b969.js +1 -0
  59. package/dist/esm-es5/IndirectTaxDetailsView-c321099a.js +1 -0
  60. package/dist/esm-es5/data-a05c78ae.js +1 -0
  61. package/dist/esm-es5/loader.js +1 -1
  62. package/dist/esm-es5/mint-components.js +1 -1
  63. package/dist/esm-es5/parseStates-ed75e224.js +1 -0
  64. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -0
  65. package/dist/esm-es5/sqm-big-stat_41.entry.js +1 -1
  66. package/dist/esm-es5/sqm-code-verification.entry.js +1 -0
  67. package/dist/esm-es5/sqm-invoice-table-data-cell_5.entry.js +1 -0
  68. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  69. package/dist/esm-es5/sqm-tax-and-cash.entry.js +1 -0
  70. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  71. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  72. package/dist/esm-es5/utils-7c96856c.js +1 -0
  73. package/dist/mint-components/mint-components.esm.js +1 -1
  74. package/dist/mint-components/p-0603a39f.js +1 -0
  75. package/dist/mint-components/p-0a37a288.system.entry.js +1 -0
  76. package/dist/mint-components/p-0b8f6a39.entry.js +11 -0
  77. package/dist/mint-components/p-115dfc03.system.js +1 -0
  78. package/dist/mint-components/p-13f3a647.js +1 -0
  79. package/dist/mint-components/p-1a7453c6.system.js +1 -0
  80. package/dist/mint-components/p-33d79be3.entry.js +93 -0
  81. package/dist/mint-components/p-37996351.system.js +1 -1
  82. package/dist/mint-components/p-3a62a7e2.system.js +1 -0
  83. package/dist/mint-components/p-4a46897f.system.js +1 -0
  84. package/dist/mint-components/p-4d11920f.entry.js +1 -0
  85. package/dist/mint-components/p-5510be1e.system.entry.js +1 -0
  86. package/dist/mint-components/p-6ef506ba.entry.js +16 -0
  87. package/dist/mint-components/{p-33ed6f1c.system.entry.js → p-70adcf4f.system.entry.js} +1 -1
  88. package/dist/mint-components/p-70d3d873.system.entry.js +1 -0
  89. package/dist/mint-components/p-7e0bf3de.system.entry.js +1 -0
  90. package/dist/mint-components/p-83acd617.js +1 -0
  91. package/dist/mint-components/p-84a78d09.entry.js +1 -0
  92. package/dist/mint-components/{p-01010af0.entry.js → p-84ed9923.entry.js} +5 -5
  93. package/dist/mint-components/p-889ec1df.system.entry.js +1 -0
  94. package/dist/mint-components/p-8a784f2a.system.entry.js +1 -0
  95. package/dist/mint-components/p-93e4a3c3.system.js +1 -0
  96. package/dist/mint-components/p-98a48fc4.system.entry.js +1 -0
  97. package/dist/mint-components/p-9acb5038.js +1 -0
  98. package/dist/mint-components/p-a38ca165.entry.js +9 -0
  99. package/dist/mint-components/p-c75a3b4a.js +103 -0
  100. package/dist/mint-components/p-d75c462c.entry.js +1 -0
  101. package/dist/mint-components/p-ea7f379d.js +394 -0
  102. package/dist/mint-components/p-f8175201.system.js +1 -0
  103. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +6 -0
  104. package/dist/types/components/sqm-widget-verification/sqm-widget-verification-controller.d.ts +5 -0
  105. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +5 -0
  106. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +0 -1
  107. package/dist/types/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.d.ts +1 -1
  108. package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +2 -2
  109. package/dist/types/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.d.ts +4 -0
  110. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +1 -1
  111. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +11 -10
  112. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.d.ts +1 -1
  113. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +1 -1
  114. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +10 -0
  115. package/dist/types/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.d.ts +1 -1
  116. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +7 -0
  117. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -1
  118. package/dist/types/components/tax-and-cash/utils.d.ts +1 -1
  119. package/dist/types/components.d.ts +96 -89
  120. package/dist/types/global/android.d.ts +7 -0
  121. package/dist/types/global/demo.d.ts +2 -0
  122. package/dist/types/stories/features.d.ts +4 -0
  123. package/dist/types/stories/templates.d.ts +4 -0
  124. package/dist/types/utils/parseStates.d.ts +1 -0
  125. package/docs/docs.docx +0 -0
  126. package/docs/raisins.json +1 -1
  127. package/grapesjs/grapesjs.js +1 -1
  128. package/package.json +2 -1
  129. package/dist/cjs/sqm-invoice-table-view-baded4af.js +0 -2067
  130. package/dist/esm/sqm-invoice-table-view-af69cd33.js +0 -2050
  131. package/dist/esm-es5/ShadowViewAddon-23a6afab.js +0 -1
  132. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +0 -1
  133. package/dist/esm-es5/sqm-invoice-table-view-af69cd33.js +0 -1
  134. package/dist/mint-components/p-33c96e14.entry.js +0 -16
  135. package/dist/mint-components/p-38b5f028.system.entry.js +0 -1
  136. package/dist/mint-components/p-6427e963.entry.js +0 -1
  137. package/dist/mint-components/p-7e7cbccf.system.js +0 -1
  138. package/dist/mint-components/p-9320582e.system.js +0 -1
  139. package/dist/mint-components/p-962f3200.js +0 -1
  140. package/dist/mint-components/p-9cf80e85.system.entry.js +0 -1
  141. package/dist/mint-components/p-b93fd99c.system.entry.js +0 -1
  142. package/dist/mint-components/p-c36506f6.system.entry.js +0 -1
  143. package/dist/mint-components/p-d3d74266.js +0 -394
  144. package/dist/mint-components/p-f29eda2f.entry.js +0 -205
  145. package/dist/mint-components/p-f2cc6a6f.entry.js +0 -9
  146. /package/dist/collection/components/tax-and-cash/{sqm-tax-and-cash/data.js → data.js} +0 -0
  147. /package/dist/types/components/tax-and-cash/{sqm-tax-and-cash/data.d.ts → data.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ import{h as e}from"./p-f708da7b.js";import{i as s}from"./p-65069b66.js";import{c as t}from"./p-cef45012.js";const l=t({Container:{display:"flex",flexDirection:"column",gap:"24px"},HeaderContainer:{display:"flex",flexDirection:"column",gap:"10px"},TitleSkeleton:{width:"45%",height:"40px !important"},StepSkeleton:{width:"15%"},HeaderSkeleton:{width:"25%",height:"30px !important"},InputSkeleton:{width:"75%"},ButtonSkeleton:{width:"80px",height:"30px !important"}}),n=l.toString(),o=()=>e("div",{class:l.classes.Container},e("style",{type:"text/css"},n),e("sl-skeleton",{class:l.classes.TitleSkeleton}),e("div",{class:l.classes.HeaderContainer},e("sl-skeleton",{class:l.classes.StepSkeleton}),e("sl-skeleton",{class:l.classes.HeaderSkeleton})),e("sl-skeleton",{class:l.classes.InputSkeleton}),e("sl-skeleton",{class:l.classes.InputSkeleton}),e("sl-skeleton",{class:l.classes.InputSkeleton}),e("sl-skeleton",{class:l.classes.InputSkeleton}),e("sl-skeleton",{class:l.classes.InputSkeleton}),e("sl-skeleton",{class:l.classes.StepSkeleton}),e("sl-skeleton",{class:l.classes.ButtonSkeleton}));function a(e){return!!["W9","W8BENE","W8BEN"].includes(e)}const i=e=>!Object.keys(e).find((s=>null==e[s])),c=e=>{switch(e){case"W9":return"W-9";case"W8BEN":case"W8BENE":return"W-8";default:return""}};function r(e,s){return s.trim().search(e)>-1}const p=(e,t)=>s.formatMessage({id:e,defaultMessage:t},{fieldName:e});function d({countryCode:e,locale:s}){return{countryCode:e,displayName:new Intl.DisplayNames([s],{type:"region"}).of(e)}}export{o as L,r as a,p as f,d as g,i as o,c as t,a as v}
@@ -0,0 +1 @@
1
+ import{r as e,h as t,c as i}from"./p-f708da7b.js";import{b as r,n as s,k as n,f as a}from"./p-cd651f81.js";import{I as o,u as d,i as c}from"./p-94a876b9.js";import{a as l}from"./p-38c7775a.js";const p=r("sq:widget-verification"),f=class{constructor(t){e(this,t),this.stateController="{}",s(this)}disconnectedCallback(){}render(){var e;const[r,s]=o({namespace:l,initialValue:!1}),f=JSON.parse(this.stateController),v=c()&&(null===(e=f["sqm-widget-verification-controller"])||void 0===e?void 0:e.isAuth),[u,m]=n(void 0),[b,x]=n(void 0),h=d((()=>{const e=v||r,t=b.querySelectorAll("template"),i=Array.from(t).find((t=>t.slot===(e?"verified":"not-verified")));if(i){const e=i.innerHTML||i.firstElementChild.outerHTML;e===u.innerHTML?p("don't rerender"):i&&(u.innerHTML=e)}const s=Array.from(b.children).filter((e=>"RAISINS-PLOP-TARGET"===e.tagName));if(s.length){const t=s.filter((e=>"verified"===e.slot)),i=s.filter((e=>"not-verified"===e.slot));i.forEach(((t,r)=>{e?t.style.display="none":(r===i.length-1&&(t.style.bottom="0px",t.style.left="0px",t.style.right="0px",t.style.position="absolute"),t.style.height="25px")})),t.forEach(((i,r)=>{e?(r===t.length-1&&(i.style.bottom="0px",i.style.left="0px",i.style.right="0px",i.style.position="absolute"),i.style.height="25px"):i.style.display="none"}))}}),[u,b,r,v]);return a((()=>{if(u&&b)return h(),function({parent:e,callback:t}){const i=new MutationObserver(s),r=new MutationObserver(t);function s(e){var t;null===(t=e.addedNodes)||void 0===t||t.forEach((e=>{r.observe(e.content,{childList:!0,attributes:!0,subtree:!0})}))}return i.observe(e,{childList:!0,subtree:!1}),s({addedNodes:e.querySelectorAll("template")}),()=>{i.disconnect(),r.disconnect()}}({parent:b,callback:h});p("DOM not ready:")}),[b,u,r,v]),t(i,null,t("div",{ref:x,style:{display:"contents"}},t("slot",{name:"not-verified"}),t("slot",{name:"verified"})),t("div",{ref:m},t("slot",{name:"shown"})))}};export{f as sqm_widget_verification_controller}
@@ -1,4 +1,4 @@
1
- import{r as e,h as t,c as r}from"./p-f708da7b.js";import{n as a,f as s,k as n,i,u as o,m as l,b as c,j as d}from"./p-cd651f81.js";import{i as u}from"./p-65069b66.js";import{i as h,_ as m,d as p,J as g,H as v,$ as f,w as b,B as y,L as x,y as w,j as k,r as C,V as E,u as I,Q as S,k as R}from"./p-94a876b9.js";import{j as T}from"./p-e7e129ac.js";import{c as M}from"./p-c1086930.js";import{g as q,a as _}from"./p-9ec99ced.js";import{c as N}from"./p-cef45012.js";import{C as A}from"./p-7f2d4212.js";import"./p-91521e9d.js";import{a as P}from"./p-4e451f75.js";import{u as L}from"./p-19ccb4ce.js";import"./p-5bedb58c.js";import"./p-c9f1dde7.js";import{p as D}from"./p-8d363802.js";import{R as V,u as F}from"./p-98698131.js";import{P as O}from"./p-dbcb5359.js";import{u as $}from"./p-4e526a94.js";import{A as j}from"./p-121cdc60.js";import{i as B}from"./p-8c23d1b8.js";import{b as U,U as z,B as H,O as W,J as G,i as Z,K,D as Y,E as Q,H as X,I as J,V as ee,L as te,N as re,C as ae,d as se,h as ne,P as ie,e as oe,R as le,W as ce,j as de,a as ue,S as he,u as me,c as pe,T as ge}from"./p-d3d74266.js";import"./p-a9f4ddb1.js";import{u as ve}from"./p-480e08e9.js";const fe=class{constructor(t){e(this,t),this.flexReverse=!1,this.ignored=!0,a(this)}disconnectedCallback(){}render(){var e;const{props:r,label:a}=h()?U(this):z(this),s=!!(null===(e=m().innerHTML)||void 0===e?void 0:e.trim()),n=t("slot",{name:"label"},s?t("slot",null):a);return t(H,Object.assign({},r,{labelSlot:n}))}},be=class{constructor(t){e(this,t),a(this)}disconnectedCallback(){}render(){var e,a;const n=null!==(e=function(e){if(e)try{return W(e)}catch{}}(this.brandColor))&&void 0!==e?e:"",i=(null!==(a=this.brandFont)&&void 0!==a?a:"Nunito Sans").trim()||void 0;s((()=>{if(!i)return;const e=document.createElement("link");return e.setAttribute("href",function(...e){return`https://fonts.googleapis.com/css2?${e.map((e=>`family=${encodeURIComponent(e)}`)).join("&")}`}(i)),e.setAttribute("rel","stylesheet"),document.head.appendChild(e),()=>document.head.removeChild(e)}),[i]);const o=null!=i?i:"";return t(r,null,t("style",null,`\n\n :host{\n display: contents;\n }\n /* \n Selects any element placed inside a slot\n - resets css variable inheritence for fonts\n \n */\n ::slotted(*) {\n --sl-font-sans: "${o}", arial;\n --sl-input-font-family: "${o}", arial;\n --sl-tooltip-font-family: "${o}", arial;\n font-family: "${o}", arial;\n\t\t\t\n ${n}\n\n --sl-focus-ring-color-primary: var(--sl-color-primary-100);\n --sl-input-border-color-focus: var(--sl-color-primary-500);\n --sl-color-primary-hue: var(--sl-color-primary-500);\n }`),t("slot",null))}},ye=class{constructor(t){e(this,t),this.ignored=!0,this.width=347,this.gap=24,a(this)}disconnectedCallback(){}render(){return t(G,Object.assign({},q(this)),t("slot",null))}},xe=N({IconStyle:{display:"block",position:"absolute",top:"23px"},DivStyle:{marginLeft:"28px"},Details:{marginLeft:"28px"},Heading:{display:"inline-block"},Children:{display:"none"}}),we=xe.toString();function ke({missingProps:e,heading:r="There was a problem loading this section",subheading:a="There was a technical problem that prevented this section from loading. Please contact us with the link to this page.",description:s="Error occured while loading <{tagName}>. Values for the following attributes are missing:"},i){if(!e)return!1;const o=m(),[l,c]=n(!1);return t("sl-alert",{type:"danger",open:!0},t("style",{type:"text/css"},we),t("div",{slot:"icon",class:xe.classes.IconStyle},t("sl-icon",{name:"exclamation-octagon"})),t("div",{class:xe.classes.DivStyle},t("h2",{class:xe.classes.Heading},u.formatMessage({id:"error-heading",defaultMessage:r})),t("p",null,u.formatMessage({id:"error-subheading",defaultMessage:a}))),t("details",{class:xe.classes.Details},t("summary",{onClick:()=>c(!l)},l?"Less":"More"," details"),t("p",null,u.formatMessage({id:"error-description",defaultMessage:s},{tagName:o.tagName.toLowerCase()})),t("ul",null,e.map((e=>t("li",null,t("strong",null,e.attribute)))))),t("div",{class:xe.classes.Children},i))}function Ce(e){var t;const r=i(V),[a,o]=n(!1);return s((()=>{var t,a;(null===(t=null==r?void 0:r.initialData)||void 0===t?void 0:t[e.checkboxName])&&o(!!(null===(a=null==r?void 0:r.initialData)||void 0===a?void 0:a[e.checkboxName]))}),[null===(t=null==r?void 0:r.initialData)||void 0===t?void 0:t[e.checkboxName]]),{states:{registrationFormState:r,checked:a},callbacks:{setChecked:o}}}const Ee=class{constructor(t){e(this,t),this.ignored=!0,this.checkboxLabel="By signing up you agree to the {labelLink}",this.checkboxLabelLink="https://example.com",this.checkboxLabelLinkText="Terms and Conditions",this.errorMessage="Must be checked",this.checkboxOptional=!1,a(this)}disconnectedCallback(){}render(){const e=_([{attribute:"checkbox-name",value:this.checkboxName}]);if(!h()&&e)return t(ke,{missingProps:e,heading:"An error occured while loading this form",subheading:"A technical problem prevented this checkbox field from loading. Please contact us with the link to this page.",description:"Values for the following attributes are missing:"});const r={...q(this)},{states:a,callbacks:s}=h()?M({states:{registrationFormState:{},checked:!1},callbacks:{setChecked:()=>{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):Ce(this);return t(Z,{states:a,content:r,callbacks:s})}},Ie=p.gql`
1
+ import{r as e,h as t,c as r}from"./p-f708da7b.js";import{n as a,f as s,k as n,i,u as o,m as l,b as c,j as d}from"./p-cd651f81.js";import{i as u}from"./p-65069b66.js";import{i as h,_ as m,d as p,J as g,H as v,$ as f,w as b,B as y,L as x,y as w,j as k,r as C,V as E,u as I,Q as S,k as R}from"./p-94a876b9.js";import{j as T}from"./p-e7e129ac.js";import{c as M}from"./p-c1086930.js";import{g as q,a as _}from"./p-9ec99ced.js";import{c as N}from"./p-cef45012.js";import{C as A}from"./p-7f2d4212.js";import"./p-91521e9d.js";import{a as P}from"./p-4e451f75.js";import{u as L}from"./p-19ccb4ce.js";import"./p-5bedb58c.js";import"./p-c9f1dde7.js";import{p as D}from"./p-8d363802.js";import{R as V,u as F}from"./p-98698131.js";import{P as O}from"./p-dbcb5359.js";import{u as $}from"./p-4e526a94.js";import{A as j}from"./p-121cdc60.js";import{i as B}from"./p-8c23d1b8.js";import{u as U,U as z,B as H,O as W,C as G,c as Z,e as Y,D as K,E as Q,H as X,I as J,V as ee,L as te,N as re,f as ae,P as se,g as ne,h as ie,d as oe,R as le,W as ce,i as de,G as ue,a as he,J as me,S as pe,T as ge}from"./p-ea7f379d.js";import"./p-a9f4ddb1.js";import{u as ve}from"./p-480e08e9.js";const fe=class{constructor(t){e(this,t),this.flexReverse=!1,this.ignored=!0,a(this)}disconnectedCallback(){}render(){var e;const{props:r,label:a}=h()?U(this):z(this),s=!!(null===(e=m().innerHTML)||void 0===e?void 0:e.trim()),n=t("slot",{name:"label"},s?t("slot",null):a);return t(H,Object.assign({},r,{labelSlot:n}))}},be=class{constructor(t){e(this,t),a(this)}disconnectedCallback(){}render(){var e,a;const n=null!==(e=function(e){if(e)try{return W(e)}catch{}}(this.brandColor))&&void 0!==e?e:"",i=(null!==(a=this.brandFont)&&void 0!==a?a:"Nunito Sans").trim()||void 0;s((()=>{if(!i)return;const e=document.createElement("link");return e.setAttribute("href",function(...e){return`https://fonts.googleapis.com/css2?${e.map((e=>`family=${encodeURIComponent(e)}`)).join("&")}`}(i)),e.setAttribute("rel","stylesheet"),document.head.appendChild(e),()=>document.head.removeChild(e)}),[i]);const o=null!=i?i:"";return t(r,null,t("style",null,`\n\n :host{\n display: contents;\n }\n /* \n Selects any element placed inside a slot\n - resets css variable inheritence for fonts\n \n */\n ::slotted(*) {\n --sl-font-sans: "${o}", arial;\n --sl-input-font-family: "${o}", arial;\n --sl-tooltip-font-family: "${o}", arial;\n font-family: "${o}", arial;\n\t\t\t\n ${n}\n\n --sl-focus-ring-color-primary: var(--sl-color-primary-100);\n --sl-input-border-color-focus: var(--sl-color-primary-500);\n --sl-color-primary-hue: var(--sl-color-primary-500);\n }`),t("slot",null))}},ye=class{constructor(t){e(this,t),this.ignored=!0,this.width=347,this.gap=24,a(this)}disconnectedCallback(){}render(){return t(G,Object.assign({},q(this)),t("slot",null))}},xe=N({IconStyle:{display:"block",position:"absolute",top:"23px"},DivStyle:{marginLeft:"28px"},Details:{marginLeft:"28px"},Heading:{display:"inline-block"},Children:{display:"none"}}),we=xe.toString();function ke({missingProps:e,heading:r="There was a problem loading this section",subheading:a="There was a technical problem that prevented this section from loading. Please contact us with the link to this page.",description:s="Error occured while loading <{tagName}>. Values for the following attributes are missing:"},i){if(!e)return!1;const o=m(),[l,c]=n(!1);return t("sl-alert",{type:"danger",open:!0},t("style",{type:"text/css"},we),t("div",{slot:"icon",class:xe.classes.IconStyle},t("sl-icon",{name:"exclamation-octagon"})),t("div",{class:xe.classes.DivStyle},t("h2",{class:xe.classes.Heading},u.formatMessage({id:"error-heading",defaultMessage:r})),t("p",null,u.formatMessage({id:"error-subheading",defaultMessage:a}))),t("details",{class:xe.classes.Details},t("summary",{onClick:()=>c(!l)},l?"Less":"More"," details"),t("p",null,u.formatMessage({id:"error-description",defaultMessage:s},{tagName:o.tagName.toLowerCase()})),t("ul",null,e.map((e=>t("li",null,t("strong",null,e.attribute)))))),t("div",{class:xe.classes.Children},i))}function Ce(e){var t;const r=i(V),[a,o]=n(!1);return s((()=>{var t,a;(null===(t=null==r?void 0:r.initialData)||void 0===t?void 0:t[e.checkboxName])&&o(!!(null===(a=null==r?void 0:r.initialData)||void 0===a?void 0:a[e.checkboxName]))}),[null===(t=null==r?void 0:r.initialData)||void 0===t?void 0:t[e.checkboxName]]),{states:{registrationFormState:r,checked:a},callbacks:{setChecked:o}}}const Ee=class{constructor(t){e(this,t),this.ignored=!0,this.checkboxLabel="By signing up you agree to the {labelLink}",this.checkboxLabelLink="https://example.com",this.checkboxLabelLinkText="Terms and Conditions",this.errorMessage="Must be checked",this.checkboxOptional=!1,a(this)}disconnectedCallback(){}render(){const e=_([{attribute:"checkbox-name",value:this.checkboxName}]);if(!h()&&e)return t(ke,{missingProps:e,heading:"An error occured while loading this form",subheading:"A technical problem prevented this checkbox field from loading. Please contact us with the link to this page.",description:"Values for the following attributes are missing:"});const r={...q(this)},{states:a,callbacks:s}=h()?M({states:{registrationFormState:{},checked:!1},callbacks:{setChecked:()=>{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):Ce(this);return t(Z,{states:a,content:r,callbacks:s})}},Ie=p.gql`
2
2
  query fuelTankRewardsQuery($programId: ID!) {
3
3
  user: viewer {
4
4
  ... on User {
@@ -26,7 +26,7 @@ import{r as e,h as t,c as r}from"./p-f708da7b.js";import{n as a,f as s,k as n,i,
26
26
  mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
27
27
  createUserAnalyticsEvent(eventMeta: $eventMeta)
28
28
  }
29
- `,Re=class{constructor(t){e(this,t),this.tooltiptext="Copied to Clipboard",this.tooltiplifespan=1e3,this.textAlign="left",this.copyButtonLabel="Copy Coupon",this.buttonStyle="icon",this.couponCodeLabel="Your coupon code:",this.cancelledErrorText="This code has been cancelled. Please reach out to the Support team for help resolving this issue.",this.redeemedErrorText="Looks like you’ve already redeemed this code.",this.expiredErrorText="Looks like this code has expired. Please reach out to the Support team for help resolving this issue.",this.fullfillmentErrorText="We couldn't fetch your code. Please try again later or reach out to the Support team for help resolving this issue.",this.pendingErrorText="Your code will be available on {unpendDate}. Mark your calendar and come back then to redeem your reward!",this.genericErrorText="We couldn't fetch your code. Please try again later or reach out to the Support team for help resolving this issue.",this.couponCodePlaceholder="...",a(this)}disconnectedCallback(){}render(){const e=q(this),r=h()?function(e){const[t,r]=n(!1),a="THANKSJANE125uv125";return M({copyString:a,tooltiptext:e.tooltiptext,textAlign:e.textAlign,buttonStyle:e.buttonStyle,copyButtonLabel:e.copyButtonLabel,error:!1,couponCodePlaceholder:e.couponCodePlaceholder,couponCodeLabel:e.couponCodeLabel,open:t,onClick:()=>{navigator.clipboard.writeText(a),r(!0),setTimeout((()=>r(!1)),e.tooltiplifespan)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(e):function(e){var t,r,a;const s=g(),i=v(),o=y(),[l]=f(Se),{data:c,loading:d}=b(Ie,{programId:i},!(null==s?void 0:s.jwt)),u=null===(a=null===(r=null===(t=null==c?void 0:c.user)||void 0===t?void 0:t.instantAccessRewards)||void 0===r?void 0:r.data)||void 0===a?void 0:a[0],h=(e=>{if(!e||!e.statuses)return"ERROR";const t=e.statuses[e.statuses.length-1];return"PENDING"===t&&null===e.dateScheduledFor?"EMPTY_TANK":t})(u),m="PENDING"===h&&u.dateScheduledFor?new Date(u.dateScheduledFor).toLocaleDateString("default",{day:"numeric",month:"long",year:"numeric"}):void 0,p=(null==u?void 0:u.fuelTankCode)||"...",[x,w]=n(!1),k=(t=>{switch(t){case"CANCELLED":return e.cancelledErrorText;case"EXPIRED":return e.expiredErrorText;case"EMPTY_TANK":return e.fullfillmentErrorText;case"PENDING":return e.pendingErrorText.replace("{unpendDate}",m);case"REDEEMED":return e.redeemedErrorText;case"AVAILABLE":return"";default:return e.genericErrorText}})(h),C=(e=>{switch(e){case"EXPIRED":case"EMPTY_TANK":case"CANCELLED":case"ERROR":return"warning";case"PENDING":return"info";case"REDEEMED":return"success";default:return}})(h),E="AVAILABLE"!==h;return{...e,onClick:function(){navigator.clipboard.writeText(p),w(!0),setTimeout((()=>w(!1)),e.tooltiplifespan),l({eventMeta:{programId:i,id:null==s?void 0:s.id,accountId:null==s?void 0:s.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:o,shareMedium:"DIRECT"}}})},open:x,copyString:p,error:E,errorText:k,dateAvailable:m,loading:d,errorType:C}}(e);return t(K,Object.assign({},r))}};function Te(e,r){const a=()=>"row"===e.direction?{"border-right":e.dividerStyle||"1px solid #EAEAEA"}:{"border-bottom":e.dividerStyle||"1px solid #EAEAEA"},s={LayoutContainer:{display:"contents","& > :not(:last-child)":{...a()},"& > ::slotted(*:not(:last-child))":{...a()}}},n=`\n display: flex;\n flex: 1;\n box-sizing: border-box;\n flex-direction: ${e.direction};\n background-color: var(--sqm-content-background);\n overflow-x: clip;\n ${"column"===e.direction?"width: 100%; max-width: var(--sqm-portal-main-width);":""}\n ${null!==e.contentAreaWidth?`max-width: ${e.contentAreaWidth} !important;`:""}\n `,i=`\n :host{\n ${n}\n }\n @media screen and (max-width: 570px) {\n :host {\n display: flex;\n flex-direction: column;\n }\n }\n sqm-divided-layout {\n ${n}\n }\n `,o=N(s),l=o.toString();return t("div",{class:o.classes.LayoutContainer,part:"sqm-base"},t("style",{type:"text/css"},i,l),r)}const Me=class{constructor(t){e(this,t),this.dividerStyle="1px solid #EAEAEA",a(this)}disconnectedCallback(){}render(){return t(Te,Object.assign({},q(this)),t("slot",null))}},qe=class{constructor(t){e(this,t),this.ignored=!0,this.dropdownLabel="Select an option",this.errorMessage="Select an option",this.dropdownOptional=!1,a(this)}disconnectedCallback(){}render(){const e=_([{attribute:"dropdown-name",value:this.dropdownName}]);if(!h()&&e)return t(ke,{missingProps:e,heading:"An error occured while loading this form",subheading:"A technical problem prevented this drop down field from loading. Please contact us with the link to this page.",description:"Values for the following attributes are missing:"},t("slot",null));const r={...q(this),selectOptions:t("slot",null)},{states:a}=h()?M({states:{registrationFormState:{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):{states:{registrationFormState:i(V)}};return t(Y,{states:a,content:r})}},_e=p.gql`
29
+ `,Re=class{constructor(t){e(this,t),this.tooltiptext="Copied to Clipboard",this.tooltiplifespan=1e3,this.textAlign="left",this.copyButtonLabel="Copy Coupon",this.buttonStyle="icon",this.couponCodeLabel="Your coupon code:",this.cancelledErrorText="This code has been cancelled. Please reach out to the Support team for help resolving this issue.",this.redeemedErrorText="Looks like you’ve already redeemed this code.",this.expiredErrorText="Looks like this code has expired. Please reach out to the Support team for help resolving this issue.",this.fullfillmentErrorText="We couldn't fetch your code. Please try again later or reach out to the Support team for help resolving this issue.",this.pendingErrorText="Your code will be available on {unpendDate}. Mark your calendar and come back then to redeem your reward!",this.genericErrorText="We couldn't fetch your code. Please try again later or reach out to the Support team for help resolving this issue.",this.couponCodePlaceholder="...",a(this)}disconnectedCallback(){}render(){const e=q(this),r=h()?function(e){const[t,r]=n(!1),a="THANKSJANE125uv125";return M({copyString:a,tooltiptext:e.tooltiptext,textAlign:e.textAlign,buttonStyle:e.buttonStyle,copyButtonLabel:e.copyButtonLabel,error:!1,couponCodePlaceholder:e.couponCodePlaceholder,couponCodeLabel:e.couponCodeLabel,open:t,onClick:()=>{navigator.clipboard.writeText(a),r(!0),setTimeout((()=>r(!1)),e.tooltiplifespan)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(e):function(e){var t,r,a;const s=g(),i=v(),o=y(),[l]=f(Se),{data:c,loading:d}=b(Ie,{programId:i},!(null==s?void 0:s.jwt)),u=null===(a=null===(r=null===(t=null==c?void 0:c.user)||void 0===t?void 0:t.instantAccessRewards)||void 0===r?void 0:r.data)||void 0===a?void 0:a[0],h=(e=>{if(!e||!e.statuses)return"ERROR";const t=e.statuses[e.statuses.length-1];return"PENDING"===t&&null===e.dateScheduledFor?"EMPTY_TANK":t})(u),m="PENDING"===h&&u.dateScheduledFor?new Date(u.dateScheduledFor).toLocaleDateString("default",{day:"numeric",month:"long",year:"numeric"}):void 0,p=(null==u?void 0:u.fuelTankCode)||"...",[x,w]=n(!1),k=(t=>{switch(t){case"CANCELLED":return e.cancelledErrorText;case"EXPIRED":return e.expiredErrorText;case"EMPTY_TANK":return e.fullfillmentErrorText;case"PENDING":return e.pendingErrorText.replace("{unpendDate}",m);case"REDEEMED":return e.redeemedErrorText;case"AVAILABLE":return"";default:return e.genericErrorText}})(h),C=(e=>{switch(e){case"EXPIRED":case"EMPTY_TANK":case"CANCELLED":case"ERROR":return"warning";case"PENDING":return"info";case"REDEEMED":return"success";default:return}})(h),E="AVAILABLE"!==h;return{...e,onClick:function(){navigator.clipboard.writeText(p),w(!0),setTimeout((()=>w(!1)),e.tooltiplifespan),l({eventMeta:{programId:i,id:null==s?void 0:s.id,accountId:null==s?void 0:s.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:o,shareMedium:"DIRECT"}}})},open:x,copyString:p,error:E,errorText:k,dateAvailable:m,loading:d,errorType:C}}(e);return t(Y,Object.assign({},r))}};function Te(e,r){const a=()=>"row"===e.direction?{"border-right":e.dividerStyle||"1px solid #EAEAEA"}:{"border-bottom":e.dividerStyle||"1px solid #EAEAEA"},s={LayoutContainer:{display:"contents","& > :not(:last-child)":{...a()},"& > ::slotted(*:not(:last-child))":{...a()}}},n=`\n display: flex;\n flex: 1;\n box-sizing: border-box;\n flex-direction: ${e.direction};\n background-color: var(--sqm-content-background);\n overflow-x: clip;\n ${"column"===e.direction?"width: 100%; max-width: var(--sqm-portal-main-width);":""}\n ${null!==e.contentAreaWidth?`max-width: ${e.contentAreaWidth} !important;`:""}\n `,i=`\n :host{\n ${n}\n }\n @media screen and (max-width: 570px) {\n :host {\n display: flex;\n flex-direction: column;\n }\n }\n sqm-divided-layout {\n ${n}\n }\n `,o=N(s),l=o.toString();return t("div",{class:o.classes.LayoutContainer,part:"sqm-base"},t("style",{type:"text/css"},i,l),r)}const Me=class{constructor(t){e(this,t),this.dividerStyle="1px solid #EAEAEA",a(this)}disconnectedCallback(){}render(){return t(Te,Object.assign({},q(this)),t("slot",null))}},qe=class{constructor(t){e(this,t),this.ignored=!0,this.dropdownLabel="Select an option",this.errorMessage="Select an option",this.dropdownOptional=!1,a(this)}disconnectedCallback(){}render(){const e=_([{attribute:"dropdown-name",value:this.dropdownName}]);if(!h()&&e)return t(ke,{missingProps:e,heading:"An error occured while loading this form",subheading:"A technical problem prevented this drop down field from loading. Please contact us with the link to this page.",description:"Values for the following attributes are missing:"},t("slot",null));const r={...q(this),selectOptions:t("slot",null)},{states:a}=h()?M({states:{registrationFormState:{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):{states:{registrationFormState:i(V)}};return t(K,{states:a,content:r})}},_e=p.gql`
30
30
  query {
31
31
  viewer {
32
32
  ... on User {
@@ -134,7 +134,7 @@ import{r as e,h as t,c as r}from"./p-f708da7b.js";import{n as a,f as s,k as n,i,
134
134
  }
135
135
  }
136
136
  }
137
- `,We=class{constructor(t){e(this,t),this.width="100%",this.hideViewer=!1,this.viewingUserText="You",this.hideNames=!1,this.anonymousUser="Anonymous User",this.maxRows=10,this.ignored=!0,a(this),ee(this)}disconnectedCallback(){}render(){const e={empty:t(Ge,null),usersheading:this.usersheading,statsheading:this.statsheading,rankheading:this.rankheading,rankType:this.rankType,leaderboardType:this.leaderboardType,maxRows:this.maxRows,programId:this.programId,anonymousUser:this.anonymousUser,interval:this.interval,hideViewer:this.hideViewer,viewingUserText:this.viewingUserText,hideNames:this.hideNames,showRank:this.showRank,rankSuffix:this.rankSuffix,width:this.width},r={...e,demoData:this.demoData},a=h()?function(e){var r,a;const s=(null===(a=null===(r=e.demoData)||void 0===r?void 0:r.data)||void 0===a?void 0:a.leaderboard)||[{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1},{firstName:"MF",lastInitial:"D",textValue:"73",rank:2,rowNumber:2},{firstName:"Freddie",lastInitial:"G",textValue:"64",rank:3,rowNumber:3},{firstName:"Benny",lastInitial:"B",textValue:"55",rank:4,rowNumber:4},{textValue:"46",rank:5,rowNumber:5}];return M({states:{loading:!1,hasLeaders:!0,isEssentials:!1,styles:{usersheading:e.usersheading?e.usersheading:"Top referrers",statsheading:e.statsheading?e.statsheading:"New customers",rankheading:e.rankheading?e.rankheading:"Rank",anonymousUser:e.anonymousUser?e.anonymousUser:"Anonymous User",showRank:e.showRank,hideViewer:e.hideViewer,viewingUserText:e.viewingUserText,hideNames:e.hideNames,rankSuffix:e.rankSuffix,width:e.width}},data:{rankType:"rowNumber",leaderboard:s},elements:{empty:t(Ge,null)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(r):function(e){var t,r,a,s,n,i,l,c,d,u;const h=v(),m=null!==(t=e.programId)&&void 0!==t?t:h,p=g(),f=x(),y=m?{type:e.leaderboardType,filter:{programId_eq:m}}:{type:e.leaderboardType,filter:{}};e.interval&&(y.filter.interval=e.interval),f&&(y.locale=f),e.maxRows>0&&(y.limit=e.maxRows);const{data:w,loading:k,errors:C}=b(e.hideNames?Ue:Be,y,!(null==p?void 0:p.jwt),{batch:!1}),{data:E}=b(e.hideNames?He:ze,y,!(null==p?void 0:p.jwt)),I=null==(T=null===(r=null==w?void 0:w.userLeaderboard)||void 0===r?void 0:r.rows)?void 0:T.flatMap((t=>{var r,a;return{textValue:t.textValue,firstName:t.firstName,lastInitial:t.lastInitial,rank:null===(r=t.rank)||void 0===r?void 0:r[e.rankType],rowNumber:null===(a=t.rank)||void 0===a?void 0:a.rowNumber}})),S=null==I?void 0:I.sort((function(e,t){return e.rank-t.rank})),R={textValue:null===(s=null===(a=null==E?void 0:E.viewer)||void 0===a?void 0:a.leaderboardRank)||void 0===s?void 0:s.textValue,firstName:null===(n=null==E?void 0:E.viewer)||void 0===n?void 0:n.firstName,lastInitial:null===(i=null==E?void 0:E.viewer)||void 0===i?void 0:i.lastInitial,rank:null===(c=null===(l=null==E?void 0:E.viewer)||void 0===l?void 0:l.leaderboardRank)||void 0===c?void 0:c[e.rankType],rowNumber:null===(u=null===(d=null==E?void 0:E.viewer)||void 0===d?void 0:d.leaderboardRank)||void 0===u?void 0:u.rowNumber};var T;return{states:{loading:k,isEssentials:o((()=>{var e,t;return!!(null===(t=null===(e=null==C?void 0:C.response)||void 0===e?void 0:e.errors)||void 0===t?void 0:t.find((e=>{var t,r;return 403===(null===(r=null===(t=null==e?void 0:e.extensions)||void 0===t?void 0:t.apiError)||void 0===r?void 0:r.statusCode)})))}),[C]),hasLeaders:(null==S?void 0:S.length)>0,styles:e},data:{leaderboard:S,rankType:e.rankType,viewerRank:R},elements:{empty:e.empty}}}(e);return t(te,Object.assign({},a))}};function Ge(){return t("slot",{name:"empty"},t("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png","empty-state-header":"View your rank in the leaderboard","empty-state-text":"Be the first to refer a friend and reach the top of the leaderboard"}))}const Ze=N({Container:{display:"contents"},Link:{textDecoration:"none",color:"inherit"}}),Ke=Ze.toString();function Ye(e){const{onClick:r,buttonText:a}=e;return t("span",{class:Ze.classes.Container,part:"sqm-base"},t("style",{type:"text/css"},Ke,"\n:host{\n display: inline; \n}\n"),t("sl-button",{onClick:r,type:"primary",exportparts:"base: primarybutton-base"},t("a",{class:Ze.classes.Link,part:"sqm-link"},a)))}const Qe=class{constructor(t){e(this,t),this.openInNewTab=!1,this.buttonText="Click here"}render(){return t(Ye,Object.assign({},{...q(this),onClick:()=>{window.open(this.link,this.openInNewTab?"_blank":"_parent")}}))}},Xe=class{constructor(t){e(this,t),this.ignored=!0,this.checkboxLabel="I would like to receive marketing and promotional emails for this referral program",this.checkboxName="marketingEmailOptIn",a(this)}disconnectedCallback(){}render(){const e={...q(this)},{states:r,callbacks:a}=h()?M({states:{registrationFormState:{},checked:!1},callbacks:{setChecked:()=>{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):Ce(this);return t(Z,{states:r,content:e,callbacks:a})}},Je=class{constructor(t){e(this,t),this.ignored=!0,this.firstNameLabel="First Name",this.lastNameLabel="Last Name",a(this)}disconnectedCallback(){}render(){const{states:e}=h()?M({states:{validationErrors:[],content:{firstNameLabel:this.firstNameLabel,lastNameLabel:this.lastNameLabel}}},this.demoData||{},{arrayMerge:(e,t)=>t}):function(e){return{states:{registrationFormState:i(V),content:{lastNameLabel:e.lastNameLabel,firstNameLabel:e.firstNameLabel}}}}(this);return t(re,{states:e})}};function et(e){const{states:r}=e,{styles:a}=r;return r.includeDropdown?t("sl-dropdown",{style:"margin-bottom: var(--sl-spacing-large)"},t("sl-button",{slot:"trigger",caret:!0,onClick:e.callbacks.rerender,exportparts:"base: dropdownbutton-base"},a.menuLabel),t("sl-menu",{ref:t=>{void 0===e.ref.current&&(e.ref.current=t,e.callbacks.rerender())}},t("slot",null))):""}const tt=class{constructor(t){e(this,t),this.ignored=!0,a(this)}disconnectedCallback(){}render(){const e=h()?function(e){return M({states:{includeDropdown:!0,styles:{...e,menuLabel:"Menu"}},callbacks:{rerender:()=>{}},ref:{current:void 0}},e.demoData||{},{arrayMerge:(e,t)=>t})}(q(this)):function(e){const t=l(),[,r]=w(),a=g();return s((()=>{var e;null===(e=t.current)||void 0===e||e.addEventListener("sl-select",(e=>function(e){k.push(e.detail.item.value)}(e)))}),[t.current]),{states:{includeDropdown:void 0!==((null==a?void 0:a.id)||(null==a?void 0:a.accountId)||(null==a?void 0:a.jwt)),styles:{menuLabel:e.menuLabel}},callbacks:{rerender:r},ref:t}}(q(this));return t(r,{slot:"sqm-navigation-menu"},t(et,Object.assign({},e)))}};tt.style=":host{display:block}:host([hidden]){display:none}.HeaderWrapper{width:100%;max-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:var(--sl-spacing-small) var(--sl-spacing-large);-ms-flex-align:center;align-items:center;background-color:var(--sqm-header-background)}@media screen and (max-width: 499px){.HeaderWrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:end;justify-content:flex-end;padding:0 var(--sl-spacing-x-small)}}";const rt=N({Wrapper:{maxWidth:"200px",marginLeft:"auto"},PayoutButtonDescription:{color:"var(--sl-color-neutral-500)",fontSize:"var(--sl-font-size-small)",margin:"0"}}),at=rt.toString();function st(e){const{text:r,states:a}=e;return a.payoutSettingsComplete?t("div",{class:rt.classes.Wrapper},t("style",{type:"text/css"},at),t("sqm-scroll",{"scroll-tag-name":"sqm-tabs","button-text":r.payoutButtonText,"scroll-animation":"smooth"}),t("p",{class:rt.classes.PayoutButtonDescription},r.payoutButtonDescription)):t("div",null)}const nt=p.gql`
137
+ `,We=class{constructor(t){e(this,t),this.width="100%",this.hideViewer=!1,this.viewingUserText="You",this.hideNames=!1,this.anonymousUser="Anonymous User",this.maxRows=10,this.ignored=!0,a(this),ee(this)}disconnectedCallback(){}render(){const e={empty:t(Ge,null),usersheading:this.usersheading,statsheading:this.statsheading,rankheading:this.rankheading,rankType:this.rankType,leaderboardType:this.leaderboardType,maxRows:this.maxRows,programId:this.programId,anonymousUser:this.anonymousUser,interval:this.interval,hideViewer:this.hideViewer,viewingUserText:this.viewingUserText,hideNames:this.hideNames,showRank:this.showRank,rankSuffix:this.rankSuffix,width:this.width},r={...e,demoData:this.demoData},a=h()?function(e){var r,a;const s=(null===(a=null===(r=e.demoData)||void 0===r?void 0:r.data)||void 0===a?void 0:a.leaderboard)||[{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1},{firstName:"MF",lastInitial:"D",textValue:"73",rank:2,rowNumber:2},{firstName:"Freddie",lastInitial:"G",textValue:"64",rank:3,rowNumber:3},{firstName:"Benny",lastInitial:"B",textValue:"55",rank:4,rowNumber:4},{textValue:"46",rank:5,rowNumber:5}];return M({states:{loading:!1,hasLeaders:!0,isEssentials:!1,styles:{usersheading:e.usersheading?e.usersheading:"Top referrers",statsheading:e.statsheading?e.statsheading:"New customers",rankheading:e.rankheading?e.rankheading:"Rank",anonymousUser:e.anonymousUser?e.anonymousUser:"Anonymous User",showRank:e.showRank,hideViewer:e.hideViewer,viewingUserText:e.viewingUserText,hideNames:e.hideNames,rankSuffix:e.rankSuffix,width:e.width}},data:{rankType:"rowNumber",leaderboard:s},elements:{empty:t(Ge,null)}},e.demoData||{},{arrayMerge:(e,t)=>t})}(r):function(e){var t,r,a,s,n,i,l,c,d,u;const h=v(),m=null!==(t=e.programId)&&void 0!==t?t:h,p=g(),f=x(),y=m?{type:e.leaderboardType,filter:{programId_eq:m}}:{type:e.leaderboardType,filter:{}};e.interval&&(y.filter.interval=e.interval),f&&(y.locale=f),e.maxRows>0&&(y.limit=e.maxRows);const{data:w,loading:k,errors:C}=b(e.hideNames?Ue:Be,y,!(null==p?void 0:p.jwt),{batch:!1}),{data:E}=b(e.hideNames?He:ze,y,!(null==p?void 0:p.jwt)),I=null==(T=null===(r=null==w?void 0:w.userLeaderboard)||void 0===r?void 0:r.rows)?void 0:T.flatMap((t=>{var r,a;return{textValue:t.textValue,firstName:t.firstName,lastInitial:t.lastInitial,rank:null===(r=t.rank)||void 0===r?void 0:r[e.rankType],rowNumber:null===(a=t.rank)||void 0===a?void 0:a.rowNumber}})),S=null==I?void 0:I.sort((function(e,t){return e.rank-t.rank})),R={textValue:null===(s=null===(a=null==E?void 0:E.viewer)||void 0===a?void 0:a.leaderboardRank)||void 0===s?void 0:s.textValue,firstName:null===(n=null==E?void 0:E.viewer)||void 0===n?void 0:n.firstName,lastInitial:null===(i=null==E?void 0:E.viewer)||void 0===i?void 0:i.lastInitial,rank:null===(c=null===(l=null==E?void 0:E.viewer)||void 0===l?void 0:l.leaderboardRank)||void 0===c?void 0:c[e.rankType],rowNumber:null===(u=null===(d=null==E?void 0:E.viewer)||void 0===d?void 0:d.leaderboardRank)||void 0===u?void 0:u.rowNumber};var T;return{states:{loading:k,isEssentials:o((()=>{var e,t;return!!(null===(t=null===(e=null==C?void 0:C.response)||void 0===e?void 0:e.errors)||void 0===t?void 0:t.find((e=>{var t,r;return 403===(null===(r=null===(t=null==e?void 0:e.extensions)||void 0===t?void 0:t.apiError)||void 0===r?void 0:r.statusCode)})))}),[C]),hasLeaders:(null==S?void 0:S.length)>0,styles:e},data:{leaderboard:S,rankType:e.rankType,viewerRank:R},elements:{empty:e.empty}}}(e);return t(te,Object.assign({},a))}};function Ge(){return t("slot",{name:"empty"},t("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png","empty-state-header":"View your rank in the leaderboard","empty-state-text":"Be the first to refer a friend and reach the top of the leaderboard"}))}const Ze=N({Container:{display:"contents"},Link:{textDecoration:"none",color:"inherit"}}),Ye=Ze.toString();function Ke(e){const{onClick:r,buttonText:a}=e;return t("span",{class:Ze.classes.Container,part:"sqm-base"},t("style",{type:"text/css"},Ye,"\n:host{\n display: inline; \n}\n"),t("sl-button",{onClick:r,type:"primary",exportparts:"base: primarybutton-base"},t("a",{class:Ze.classes.Link,part:"sqm-link"},a)))}const Qe=class{constructor(t){e(this,t),this.openInNewTab=!1,this.buttonText="Click here"}render(){return t(Ke,Object.assign({},{...q(this),onClick:()=>{window.open(this.link,this.openInNewTab?"_blank":"_parent")}}))}},Xe=class{constructor(t){e(this,t),this.ignored=!0,this.checkboxLabel="I would like to receive marketing and promotional emails for this referral program",this.checkboxName="marketingEmailOptIn",a(this)}disconnectedCallback(){}render(){const e={...q(this)},{states:r,callbacks:a}=h()?M({states:{registrationFormState:{},checked:!1},callbacks:{setChecked:()=>{}}},this.demoData||{},{arrayMerge:(e,t)=>t}):Ce(this);return t(Z,{states:r,content:e,callbacks:a})}},Je=class{constructor(t){e(this,t),this.ignored=!0,this.firstNameLabel="First Name",this.lastNameLabel="Last Name",a(this)}disconnectedCallback(){}render(){const{states:e}=h()?M({states:{validationErrors:[],content:{firstNameLabel:this.firstNameLabel,lastNameLabel:this.lastNameLabel}}},this.demoData||{},{arrayMerge:(e,t)=>t}):function(e){return{states:{registrationFormState:i(V),content:{lastNameLabel:e.lastNameLabel,firstNameLabel:e.firstNameLabel}}}}(this);return t(re,{states:e})}};function et(e){const{states:r}=e,{styles:a}=r;return r.includeDropdown?t("sl-dropdown",{style:"margin-bottom: var(--sl-spacing-large)"},t("sl-button",{slot:"trigger",caret:!0,onClick:e.callbacks.rerender,exportparts:"base: dropdownbutton-base"},a.menuLabel),t("sl-menu",{ref:t=>{void 0===e.ref.current&&(e.ref.current=t,e.callbacks.rerender())}},t("slot",null))):""}const tt=class{constructor(t){e(this,t),this.ignored=!0,a(this)}disconnectedCallback(){}render(){const e=h()?function(e){return M({states:{includeDropdown:!0,styles:{...e,menuLabel:"Menu"}},callbacks:{rerender:()=>{}},ref:{current:void 0}},e.demoData||{},{arrayMerge:(e,t)=>t})}(q(this)):function(e){const t=l(),[,r]=w(),a=g();return s((()=>{var e;null===(e=t.current)||void 0===e||e.addEventListener("sl-select",(e=>function(e){k.push(e.detail.item.value)}(e)))}),[t.current]),{states:{includeDropdown:void 0!==((null==a?void 0:a.id)||(null==a?void 0:a.accountId)||(null==a?void 0:a.jwt)),styles:{menuLabel:e.menuLabel}},callbacks:{rerender:r},ref:t}}(q(this));return t(r,{slot:"sqm-navigation-menu"},t(et,Object.assign({},e)))}};tt.style=":host{display:block}:host([hidden]){display:none}.HeaderWrapper{width:100%;max-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:var(--sl-spacing-small) var(--sl-spacing-large);-ms-flex-align:center;align-items:center;background-color:var(--sqm-header-background)}@media screen and (max-width: 499px){.HeaderWrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:end;justify-content:flex-end;padding:0 var(--sl-spacing-x-small)}}";const rt=N({Wrapper:{maxWidth:"200px",marginLeft:"auto"},PayoutButtonDescription:{color:"var(--sl-color-neutral-500)",fontSize:"var(--sl-font-size-small)",margin:"0"}}),at=rt.toString();function st(e){const{text:r,states:a}=e;return a.payoutSettingsComplete?t("div",{class:rt.classes.Wrapper},t("style",{type:"text/css"},at),t("sqm-scroll",{"scroll-tag-name":"sqm-tabs","button-text":r.payoutButtonText,"scroll-animation":"smooth"}),t("p",{class:rt.classes.PayoutButtonDescription},r.payoutButtonDescription)):t("div",null)}const nt=p.gql`
138
138
  query getPayoutDetails {
139
139
  user: viewer {
140
140
  ... on User {
@@ -246,7 +246,7 @@ import{r as e,h as t,c as r}from"./p-f708da7b.js";import{n as a,f as s,k as n,i,
246
246
  userId
247
247
  }
248
248
  }
249
- `,Zt=class{constructor(t){e(this,t),this.ignored=!0,this.rewardAmount="0",this.rewardUnit="Points",this.cardTitle="Title Text",this.description="",this.repeatable=!1,this.finite=0,this.showProgressBar=!1,this.goal=1,this.steps=!1,this.progressBarUnit="",this.expiryMessage="Ends {endDate}",this.startsOnMessage="Starts {startDate}",this.endedMessage="Ended {endDate}",this.completedText="Completed {finite, select, 0 {{count, plural, =1 {{count} time} other {{count} times}}} other {{count}/{finite} times}}",this.buttonText="Complete Action",this.openNewTab=!1,this.hideButton=!1,a(this)}disconnectedCallback(){}render(){const{props:e}=h()?U(this):z({...q(this),programId:this.programId}),{value:r,loading:a}=e,{states:n,callbacks:i}=h()?function(e){return M({states:{loadingEvent:!1,locale:"en"},callbacks:{sendEvent:e=>console.log(e),onClick:()=>console.log("clicked")}},e.demoData||{},{arrayMerge:(e,t)=>t})}(this):function(e){const t=g(),r=x(),[a,{data:n,loading:i}]=f(Gt),{refresh:o}=S();function l(){e.openNewTab?window.open(e.buttonLink):window.open(e.buttonLink,"_parent")}function c(e){a({userEventInput:{userId:null==t?void 0:t.id,accountId:null==t?void 0:t.accountId,events:[{key:e,fields:{}}]}})}return s((()=>{n&&(o(),l())}),[n]),{states:{loadingEvent:i,locale:r},callbacks:{sendEvent:c,onClick:function(){e.eventKey?c(e.eventKey):l()}}}}(this);return t(ge,{callbacks:i,states:{loading:a,loadingEvent:n.loadingEvent,progress:r,locale:n.locale},content:{...q(this)}})}},Kt=class{constructor(t){e(this,t),this.ignored=!0,this.icon="gift",a(this)}disconnectedCallback(){}render(){return L().forEach((e=>{try{e.setIcon(this.icon)}catch{}})),t("div",null,t("style",{type:"text/css"},"\n\t\t:host{\n\t\t\tdisplay: block; \n\t\t}\n\n\t\t::slotted(*:not(:only-child):not(:last-child)) {\n\t\t\tmargin-bottom: var(--sl-spacing-xx-large);\n\t\t}\n\t"),t("slot",null))}},Yt=()=>t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M22.5 7.5H18.6761H13.5V24H20.75C21.3023 24 21.75 23.5523 21.75 23V22.5V13.5H22.5H23C23.5523 13.5 24 13.0523 24 12.5V12V9V8.5C24 7.94772 23.5523 7.5 23 7.5H22.5Z",fill:"#F2C94C"}),t("path",{d:"M2.25 22.5V23C2.25 23.5523 2.69772 24 3.25 24H10.5V7.5H6.96363H1.5H1C0.447715 7.5 0 7.94772 0 8.5V9V12V12.5C0 13.0523 0.447715 13.5 1 13.5H1.5H2.25V22.5Z",fill:"#F2C94C"}),t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.25 13.5V15H21.75V13.5H2.25Z",fill:"#BE9720"}),t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21 4.06424C21 5.39348 19.0041 7.4062 18 7.5H13.5V24H10.5027V7.5H6.88188C4.8187 7.05273 3 5.46806 3 3.78109C3 2.1371 3.71404 0.835051 5.01276 0.273062C6.25382 -0.26398 7.68678 0.0304991 8.81964 0.817C10.2101 1.78237 10.9902 3.59446 11.6978 5.2384C11.7599 5.38268 11.8215 5.52566 11.8828 5.66667C11.9426 5.53298 12.0028 5.3969 12.0638 5.25912C12.7649 3.67422 13.5654 1.86488 14.9106 0.893444C16.0997 0.0347157 17.6114 -0.289736 18.9181 0.298417C20.2693 0.906596 21 2.3018 21 4.06424ZM15.9185 2.25C16.6392 1.72957 17.502 1.63518 18.2396 2.25C18.8819 2.78542 18.9162 3.03745 18.9987 3.64389L19.0133 3.75C19.0133 4.64776 18.2396 6 17.4659 6C16.9177 6 16.4871 5.99537 16.0836 5.99103C15.3479 5.98312 14.702 5.97618 13.5974 6C13.808 5.59179 13.9761 5.20003 14.1365 4.82641C14.5654 3.82715 14.9386 2.95763 15.9185 2.25ZM7.40792 2.25C7.05911 2.00783 6.25921 2.11591 5.92748 2.25945C5.65341 2.37805 5.24403 2.73987 5.24403 3.78109C5.24403 4.79286 6.88188 5.66667 6.88188 5.66667C6.88188 5.66667 8.18161 6 10.5027 6C9.71258 4.04177 8.59336 3.073 7.40792 2.25Z",fill:"#EB5757"})),Qt=()=>t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("circle",{cx:"12",cy:"12",r:"9",fill:"currentColor",stroke:"currentColor","stroke-width":"2"})),Xt=N({TimelineReward:{color:"var(--sl-color-neutral-900)",lineHeight:"var(--sl-line-height-dense)","& .container":{display:"flex"},"& .line":{display:"none",color:"transparent",userSelect:"none",background:"var(--sl-color-primary-300)",width:"4px",borderRadius:"4px",margin:"-2px",position:"relative",left:"12px",top:"34px"},"& .step":{display:"flex"},"& .icon":{position:"relative",top:"4px",zIndex:"1",color:"var(--sl-color-primary-300)",marginRight:"var(--sl-spacing-large)"},"& .reward":{marginRight:"var(--sl-spacing-x-small)",fontSize:"var(--sl-font-size-x-large)",fontWeight:"var(--sl-font-weight-semibold)"},"& .unit":{textTransform:"uppercase",fontSize:"var(--sl-font-size-small)"},"& .description":{fontSize:"var(--sl-font-size-medium)"}}}),Jt=Xt.toString();function er(e){var r;const a=null!==(r=e.icon)&&void 0!==r?r:e.iconState;return t("div",{class:Xt.classes.TimelineReward,part:"sqm-base"},t("style",{type:"text/css"},Jt,"\n\t:host{\n\t\tdisplay: block; \n\t}\n\n\t:host(:not(:last-of-type)) .line {\n\t\tdisplay: block; \n\t}\n\t"),t("div",{class:"container",part:"sqm-entry-container"},t("div",{class:"line"},"/"),t("div",{class:"step"},"gift"===a&&t("div",{class:"icon"},t(Yt,null)),"circle"===a&&t("div",{class:"icon"},t(Qt,null)),t("div",null,t("div",null,t("span",{class:"reward",part:"sqm-reward"},e.reward),t("span",{class:"unit",part:"sqm-unit"},e.unit)),t("div",{class:"description",part:"sqm-description"},e.desc)))))}const tr=class{constructor(t){e(this,t),this.ignored=!0,this.iconState="gift",a(this)}async setIcon(e){this.iconState=e}disconnectedCallback(){}render(){return P([this.reward]),t(er,Object.assign({},q(this)))}};function rr(e){return t(r,null,e.loading?e.loadingText:e.username)}const ar=p.gql`
249
+ `,Zt=class{constructor(t){e(this,t),this.ignored=!0,this.rewardAmount="0",this.rewardUnit="Points",this.cardTitle="Title Text",this.description="",this.repeatable=!1,this.finite=0,this.showProgressBar=!1,this.goal=1,this.steps=!1,this.progressBarUnit="",this.expiryMessage="Ends {endDate}",this.startsOnMessage="Starts {startDate}",this.endedMessage="Ended {endDate}",this.completedText="Completed {finite, select, 0 {{count, plural, =1 {{count} time} other {{count} times}}} other {{count}/{finite} times}}",this.buttonText="Complete Action",this.openNewTab=!1,this.hideButton=!1,a(this)}disconnectedCallback(){}render(){const{props:e}=h()?U(this):z({...q(this),programId:this.programId}),{value:r,loading:a}=e,{states:n,callbacks:i}=h()?function(e){return M({states:{loadingEvent:!1,locale:"en"},callbacks:{sendEvent:e=>console.log(e),onClick:()=>console.log("clicked")}},e.demoData||{},{arrayMerge:(e,t)=>t})}(this):function(e){const t=g(),r=x(),[a,{data:n,loading:i}]=f(Gt),{refresh:o}=S();function l(){e.openNewTab?window.open(e.buttonLink):window.open(e.buttonLink,"_parent")}function c(e){a({userEventInput:{userId:null==t?void 0:t.id,accountId:null==t?void 0:t.accountId,events:[{key:e,fields:{}}]}})}return s((()=>{n&&(o(),l())}),[n]),{states:{loadingEvent:i,locale:r},callbacks:{sendEvent:c,onClick:function(){e.eventKey?c(e.eventKey):l()}}}}(this);return t(ge,{callbacks:i,states:{loading:a,loadingEvent:n.loadingEvent,progress:r,locale:n.locale},content:{...q(this)}})}},Yt=class{constructor(t){e(this,t),this.ignored=!0,this.icon="gift",a(this)}disconnectedCallback(){}render(){return L().forEach((e=>{try{e.setIcon(this.icon)}catch{}})),t("div",null,t("style",{type:"text/css"},"\n\t\t:host{\n\t\t\tdisplay: block; \n\t\t}\n\n\t\t::slotted(*:not(:only-child):not(:last-child)) {\n\t\t\tmargin-bottom: var(--sl-spacing-xx-large);\n\t\t}\n\t"),t("slot",null))}},Kt=()=>t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M22.5 7.5H18.6761H13.5V24H20.75C21.3023 24 21.75 23.5523 21.75 23V22.5V13.5H22.5H23C23.5523 13.5 24 13.0523 24 12.5V12V9V8.5C24 7.94772 23.5523 7.5 23 7.5H22.5Z",fill:"#F2C94C"}),t("path",{d:"M2.25 22.5V23C2.25 23.5523 2.69772 24 3.25 24H10.5V7.5H6.96363H1.5H1C0.447715 7.5 0 7.94772 0 8.5V9V12V12.5C0 13.0523 0.447715 13.5 1 13.5H1.5H2.25V22.5Z",fill:"#F2C94C"}),t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.25 13.5V15H21.75V13.5H2.25Z",fill:"#BE9720"}),t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21 4.06424C21 5.39348 19.0041 7.4062 18 7.5H13.5V24H10.5027V7.5H6.88188C4.8187 7.05273 3 5.46806 3 3.78109C3 2.1371 3.71404 0.835051 5.01276 0.273062C6.25382 -0.26398 7.68678 0.0304991 8.81964 0.817C10.2101 1.78237 10.9902 3.59446 11.6978 5.2384C11.7599 5.38268 11.8215 5.52566 11.8828 5.66667C11.9426 5.53298 12.0028 5.3969 12.0638 5.25912C12.7649 3.67422 13.5654 1.86488 14.9106 0.893444C16.0997 0.0347157 17.6114 -0.289736 18.9181 0.298417C20.2693 0.906596 21 2.3018 21 4.06424ZM15.9185 2.25C16.6392 1.72957 17.502 1.63518 18.2396 2.25C18.8819 2.78542 18.9162 3.03745 18.9987 3.64389L19.0133 3.75C19.0133 4.64776 18.2396 6 17.4659 6C16.9177 6 16.4871 5.99537 16.0836 5.99103C15.3479 5.98312 14.702 5.97618 13.5974 6C13.808 5.59179 13.9761 5.20003 14.1365 4.82641C14.5654 3.82715 14.9386 2.95763 15.9185 2.25ZM7.40792 2.25C7.05911 2.00783 6.25921 2.11591 5.92748 2.25945C5.65341 2.37805 5.24403 2.73987 5.24403 3.78109C5.24403 4.79286 6.88188 5.66667 6.88188 5.66667C6.88188 5.66667 8.18161 6 10.5027 6C9.71258 4.04177 8.59336 3.073 7.40792 2.25Z",fill:"#EB5757"})),Qt=()=>t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("circle",{cx:"12",cy:"12",r:"9",fill:"currentColor",stroke:"currentColor","stroke-width":"2"})),Xt=N({TimelineReward:{color:"var(--sl-color-neutral-900)",lineHeight:"var(--sl-line-height-dense)","& .container":{display:"flex"},"& .line":{display:"none",color:"transparent",userSelect:"none",background:"var(--sl-color-primary-300)",width:"4px",borderRadius:"4px",margin:"-2px",position:"relative",left:"12px",top:"34px"},"& .step":{display:"flex"},"& .icon":{position:"relative",top:"4px",zIndex:"1",color:"var(--sl-color-primary-300)",marginRight:"var(--sl-spacing-large)"},"& .reward":{marginRight:"var(--sl-spacing-x-small)",fontSize:"var(--sl-font-size-x-large)",fontWeight:"var(--sl-font-weight-semibold)"},"& .unit":{textTransform:"uppercase",fontSize:"var(--sl-font-size-small)"},"& .description":{fontSize:"var(--sl-font-size-medium)"}}}),Jt=Xt.toString();function er(e){var r;const a=null!==(r=e.icon)&&void 0!==r?r:e.iconState;return t("div",{class:Xt.classes.TimelineReward,part:"sqm-base"},t("style",{type:"text/css"},Jt,"\n\t:host{\n\t\tdisplay: block; \n\t}\n\n\t:host(:not(:last-of-type)) .line {\n\t\tdisplay: block; \n\t}\n\t"),t("div",{class:"container",part:"sqm-entry-container"},t("div",{class:"line"},"/"),t("div",{class:"step"},"gift"===a&&t("div",{class:"icon"},t(Kt,null)),"circle"===a&&t("div",{class:"icon"},t(Qt,null)),t("div",null,t("div",null,t("span",{class:"reward",part:"sqm-reward"},e.reward),t("span",{class:"unit",part:"sqm-unit"},e.unit)),t("div",{class:"description",part:"sqm-description"},e.desc)))))}const tr=class{constructor(t){e(this,t),this.ignored=!0,this.iconState="gift",a(this)}async setIcon(e){this.iconState=e}disconnectedCallback(){}render(){return P([this.reward]),t(er,Object.assign({},q(this)))}};function rr(e){return t(r,null,e.loading?e.loadingText:e.username)}const ar=p.gql`
250
250
  query getUserName {
251
251
  viewer {
252
252
  ... on User {
@@ -255,4 +255,4 @@ import{r as e,h as t,c as r}from"./p-f708da7b.js";import{n as a,f as s,k as n,i,
255
255
  }
256
256
  }
257
257
  }
258
- `,sr=class{constructor(t){e(this,t),this.ignored=!0,this.fallback="Anonymous User",this.loadingText="...",a(this)}disconnectedCallback(){}render(){const e=h()?function(e){return M({loading:!1,loadingText:"...",username:"John Smith"},e.demoData||{},{arrayMerge:(e,t)=>t})}(this):function(e){var t,r,a,s,n,i,o,l;const c=g(),d=b(ar,{},!(null==c?void 0:c.jwt)),u=(null===(r=null===(t=d.data)||void 0===t?void 0:t.viewer)||void 0===r?void 0:r.firstName)||(null===(s=null===(a=d.data)||void 0===a?void 0:a.viewer)||void 0===s?void 0:s.lastName)?`${null===(i=null===(n=d.data)||void 0===n?void 0:n.viewer)||void 0===i?void 0:i.firstName} ${null===(l=null===(o=d.data)||void 0===o?void 0:o.viewer)||void 0===l?void 0:l.lastName}`:e.fallback;return{loadingText:e.loadingText,loading:d.loading,username:u}}(this);return t(rr,Object.assign({},e))}};export{fe as sqm_big_stat,be as sqm_brand,ye as sqm_card_feed,Ee as sqm_checkbox_field,Re as sqm_coupon_code,Me as sqm_divided_layout,qe as sqm_dropdown_field,Pe as sqm_edit_profile,Le as sqm_hero,Ve as sqm_hero_image,Fe as sqm_hook_story_container,$e as sqm_image,je as sqm_input_field,We as sqm_leaderboard,Qe as sqm_link_button,Xe as sqm_marketing_emails_checkbox,Je as sqm_name_fields,tt as sqm_navigation_menu,it as sqm_payout_button_scroll,dt as sqm_payout_status_alert,pt as sqm_portal_change_marketing,gt as sqm_portal_change_password,vt as sqm_portal_footer,ft as sqm_portal_frame,bt as sqm_portal_login,yt as sqm_portal_register,wt as sqm_program_explainer,Ct as sqm_program_explainer_step,It as sqm_program_menu,Mt as sqm_referral_card,_t as sqm_referral_iframe,Dt as sqm_reward_exchange_list,$t as sqm_router,jt as sqm_share_button,zt as sqm_share_code,Ht as sqm_share_link,Wt as sqm_stat_container,Zt as sqm_task_card,Kt as sqm_timeline,tr as sqm_timeline_entry,sr as sqm_user_name}
258
+ `,sr=class{constructor(t){e(this,t),this.ignored=!0,this.fallback="Anonymous User",this.loadingText="...",a(this)}disconnectedCallback(){}render(){const e=h()?function(e){return M({loading:!1,loadingText:"...",username:"John Smith"},e.demoData||{},{arrayMerge:(e,t)=>t})}(this):function(e){var t,r,a,s,n,i,o,l;const c=g(),d=b(ar,{},!(null==c?void 0:c.jwt)),u=(null===(r=null===(t=d.data)||void 0===t?void 0:t.viewer)||void 0===r?void 0:r.firstName)||(null===(s=null===(a=d.data)||void 0===a?void 0:a.viewer)||void 0===s?void 0:s.lastName)?`${null===(i=null===(n=d.data)||void 0===n?void 0:n.viewer)||void 0===i?void 0:i.firstName} ${null===(l=null===(o=d.data)||void 0===o?void 0:o.viewer)||void 0===l?void 0:l.lastName}`:e.fallback;return{loadingText:e.loadingText,loading:d.loading,username:u}}(this);return t(rr,Object.assign({},e))}};export{fe as sqm_big_stat,be as sqm_brand,ye as sqm_card_feed,Ee as sqm_checkbox_field,Re as sqm_coupon_code,Me as sqm_divided_layout,qe as sqm_dropdown_field,Pe as sqm_edit_profile,Le as sqm_hero,Ve as sqm_hero_image,Fe as sqm_hook_story_container,$e as sqm_image,je as sqm_input_field,We as sqm_leaderboard,Qe as sqm_link_button,Xe as sqm_marketing_emails_checkbox,Je as sqm_name_fields,tt as sqm_navigation_menu,it as sqm_payout_button_scroll,dt as sqm_payout_status_alert,pt as sqm_portal_change_marketing,gt as sqm_portal_change_password,vt as sqm_portal_footer,ft as sqm_portal_frame,bt as sqm_portal_login,yt as sqm_portal_register,wt as sqm_program_explainer,Ct as sqm_program_explainer_step,It as sqm_program_menu,Mt as sqm_referral_card,_t as sqm_referral_iframe,Dt as sqm_reward_exchange_list,$t as sqm_router,jt as sqm_share_button,zt as sqm_share_code,Ht as sqm_share_link,Wt as sqm_stat_container,Zt as sqm_task_card,Yt as sqm_timeline,tr as sqm_timeline_entry,sr as sqm_user_name}
@@ -0,0 +1 @@
1
+ System.register(["./p-f26aedcd.system.js","./p-48135f99.system.js","./p-6333265f.system.js","./p-6d9e52c7.system.js"],(function(t){"use strict";var n,e,i,o,r,s;return{setters:[function(t){n=t.r;e=t.h;i=t.c},function(t){o=t.n},function(t){r=t.l},function(t){s=t.l}],execute:function(){var l=t("sqm_invoice_table_data_cell",function(){function t(t){n(this,t);this.ignored=true;o(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){return this.data};return t}());var c=t("sqm_invoice_table_date_cell",function(){function t(t){n(this,t);this.ignored=true;this.locale="en";o(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t,n;var e=!this.date?"-":(n=(t=s.DateTime.fromMillis(this.date))===null||t===void 0?void 0:t.setLocale(r(this.locale)))===null||n===void 0?void 0:n.toLocaleString(s.DateTime.DATE_MED);return e};return t}());var a=t("sqm_invoice_table_download_cell",function(){function t(t){n(this,t);this.ignored=true;o(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t="svg:hover, svg:hover * {\n cursor: pointer;\n }";return e(i,null,e("style",null,t),!!this.downloadUrl&&e("a",{href:this.downloadUrl,target:"_blank"},e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M0.625 12.4375C0.79076 12.4375 0.949732 12.5033 1.06694 12.6206C1.18415 12.7378 1.25 12.8967 1.25 13.0625V16.1875C1.25 16.519 1.3817 16.837 1.61612 17.0714C1.85054 17.3058 2.16848 17.4375 2.5 17.4375H17.5C17.8315 17.4375 18.1495 17.3058 18.3839 17.0714C18.6183 16.837 18.75 16.519 18.75 16.1875V13.0625C18.75 12.8967 18.8158 12.7378 18.9331 12.6206C19.0503 12.5033 19.2092 12.4375 19.375 12.4375C19.5408 12.4375 19.6997 12.5033 19.8169 12.6206C19.9342 12.7378 20 12.8967 20 13.0625V16.1875C20 16.8505 19.7366 17.4864 19.2678 17.9553C18.7989 18.4241 18.163 18.6875 17.5 18.6875H2.5C1.83696 18.6875 1.20107 18.4241 0.732233 17.9553C0.263392 17.4864 0 16.8505 0 16.1875V13.0625C0 12.8967 0.065848 12.7378 0.183058 12.6206C0.300269 12.5033 0.45924 12.4375 0.625 12.4375Z",fill:"#717179"}),e("path",{d:"M9.5575 14.88C9.61556 14.9382 9.68453 14.9844 9.76046 15.0159C9.83639 15.0474 9.91779 15.0636 10 15.0636C10.0822 15.0636 10.1636 15.0474 10.2395 15.0159C10.3155 14.9844 10.3844 14.9382 10.4425 14.88L14.1925 11.13C14.3099 11.0126 14.3758 10.8535 14.3758 10.6875C14.3758 10.5215 14.3099 10.3624 14.1925 10.245C14.0751 10.1276 13.916 10.0617 13.75 10.0617C13.584 10.0617 13.4249 10.1276 13.3075 10.245L10.625 12.9288V1.9375C10.625 1.77174 10.5592 1.61277 10.4419 1.49556C10.3247 1.37835 10.1658 1.3125 10 1.3125C9.83424 1.3125 9.67527 1.37835 9.55806 1.49556C9.44085 1.61277 9.375 1.77174 9.375 1.9375V12.9288L6.6925 10.245C6.57514 10.1276 6.41597 10.0617 6.25 10.0617C6.08403 10.0617 5.92486 10.1276 5.8075 10.245C5.69014 10.3624 5.62421 10.5215 5.62421 10.6875C5.62421 10.8535 5.69014 11.0126 5.8075 11.13L9.5575 14.88Z",fill:"#717179"}))))};return t}());var d=t("sqm_table_cell",function(){function t(t){n(this,t);this.colspan=1;this.padding="15px 10px"}t.prototype.render=function(){return e(i,{style:{display:"contents"}},e("td",{colSpan:this.colspan,style:{padding:this.padding}},e("slot",null)))};return t}());var u=t("sqm_table_row",function(){function t(t){n(this,t);this.border="1px solid #EAEAEA"}t.prototype.render=function(){return e(i,{style:{display:"contents"}},e("tr",{style:{border:this.border}},e("slot",null)))};return t}())}}}));
@@ -0,0 +1 @@
1
+ var __makeTemplateObject=this&&this.__makeTemplateObject||function(e,t){if(Object.defineProperty){Object.defineProperty(e,"raw",{value:t})}else{e.raw=t}return e};var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function s(e){try{l(r.next(e))}catch(e){a(e)}}function o(e){try{l(r["throw"](e))}catch(e){a(e)}}function l(e){e.done?n(e.value):i(e.value).then(s,o)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(a=s[0]&2?i["return"]:s[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;if(i=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1];a=s;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(s);break}if(a[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-f26aedcd.system.js","./p-48135f99.system.js","./p-bdb7d451.system.js","./p-6cd4f2b1.system.js","./p-4bd679a7.system.js","./p-6333265f.system.js","./p-1a673057.system.js","./p-cd1d497f.system.js","./p-e07bc6c4.system.js","./p-115dfc03.system.js","./p-57dd28bd.system.js","./p-a71b9154.system.js"],(function(e){"use strict";var t,n,r,i,a,s,o,l,c,u,d,f,p,m,v,h,y,g,b,x,_,C;return{setters:[function(e){t=e.h;n=e.r},function(e){r=e.l;i=e.k;a=e.f;s=e.n},function(e){o=e.i},function(e){l=e.d;c=e.t;u=e.F;d=e.i;f=e.q},function(e){p=e.c},function(e){m=e.g},function(e){v=e.c},function(e){h=e.E},function(e){y=e.T},function(e){g=e.p},function(e){b=e.V;x=e.S;_=e.a},function(e){C=e.u}],execute:function(){var w={Wrapper:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-medium)",maxWidth:"550px"},HeaderContainer:{display:"flex",flexDirection:"column"},InputsContainer:{display:"flex",gap:"var(--sl-spacing-medium)",position:"relative",flexDirection:"column"},CodeInputContainer:{display:"flex",gap:"var(--sl-spacing-medium)"},CodeInput:{maxWidth:"40px","&::part(input)":{margin:"0",padding:"0 var(--sl-input-spacing-small)",fontSize:"var(--sl-font-size-large)"}},CodeInputError:__assign(__assign({},h),{maxWidth:"40px","&::part(input)":{margin:"0",padding:"0 var(--sl-input-spacing-small)",fontSize:"var(--sl-font-size-large)"}}),ErrorText:{color:"var(--sl-color-danger-500)",fontSize:"var(--sl-font-size-small)",margin:"0"},ContinueButton:{width:"100%",maxWidth:"100px"},FooterContainer:{display:"flex",flexDirection:"column"},SkeletonOne:{width:"50%",height:"16px"},SkeletonTwo:{width:"30%",height:"34px"},SkeletonThree:{width:"15%",height:"24px"}};var E="\n:host {\n display: block;\n}\n:host([hidden]): {\n display: none;\n}\n\n\n";var T=v(w);var k=T.toString();function j(e){var n=e.states,r=e.refs,i=e.callbacks,a=e.text;var s=o.formatMessage({id:"resendCodeText",defaultMessage:a.resendCodeText},{resendCodeLink:t("a",{href:"",style:{textDecoration:"none"},onClick:function(e){e.preventDefault();i.resendEmail()}},a.resendCodeLabel)});var l=o.formatMessage({id:"codeResentSuccessfully",defaultMessage:a.codeResentSuccessfullyText},{email:n.email});var c=n.verifyFailed?T.classes.CodeInputError:T.classes.CodeInput;return t("div",{part:"sqm-base"},t("style",{type:"text/css"},E,k),t("div",{class:T.classes.Wrapper},t("div",{class:T.classes.HeaderContainer},t(y,{type:"p"},o.formatMessage({id:"emailHeaderText",defaultMessage:n.verifyFailed?a.reverifyCodeHeaderText:a.verifyCodeHeaderText},{email:n.email}))),n.emailResent&&t("sqm-form-message",{type:"success",exportparts:"successalert-icon"},t("b",null,l)),t("div",{class:T.classes.InputsContainer},t("div",{ref:r.codeWrapperRef,class:T.classes.CodeInputContainer},t("sl-input",{class:c,name:"code"}),t("sl-input",{class:c,name:"code"}),t("sl-input",{class:c,name:"code"}),t("sl-input",{class:c,name:"code"}),t("sl-input",{class:c,name:"code"}),t("sl-input",{class:c,name:"code"})),n.verifyFailed&&t("p",{class:T.classes.ErrorText},a.invalidCodeText),t("sl-button",{class:T.classes.ContinueButton,onClick:i.submitCode,disabled:n.loading||n.initialiseLoading,loading:n.loading||n.initialiseLoading,exportparts:"base: primarybutton-base",type:"primary"},a.verifyText)),t("div",{class:T.classes.FooterContainer},t(y,{type:"p"},s))))}var S=l.gql(__makeTemplateObject(["\n mutation submitImpactPublisherEmail2FACode(\n $user: UserIdInput!\n $code: String!\n ) {\n submitImpactPublisherEmail2FACode(user: $user, code: $code) {\n verifiedEmail\n accessKey\n }\n }\n"],["\n mutation submitImpactPublisherEmail2FACode(\n $user: UserIdInput!\n $code: String!\n ) {\n submitImpactPublisherEmail2FACode(user: $user, code: $code) {\n verifiedEmail\n accessKey\n }\n }\n"]));function I(e){var t=this;var n=r();var s=c(x),o=s[0],l=s[1];var d=u(b);var f=i(false),p=f[0],m=f[1];var v=i(false),h=v[0],y=v[1];var g=i(null),_=g[0],w=g[1];var E=i(false),T=E[0],k=E[1];var j=i(false),S=j[0],I=j[1];var P=C(),F=P.initialized,R=P.verificationEmail,L=P.send,A=L[0],O=L[1],q=O.loading,M=O.errors,W=P.verify,D=W[0],$=W[1],z=$.loading,H=$.errors;a((function(){if(!_)return;var e=_.querySelectorAll("sl-input");var t=Array.from(e).map((function(e){return e.shadowRoot.querySelector('input[name="code"]')}));t.forEach((function(e,n){e.addEventListener("focus",(function(e){e.target.select()}));e.addEventListener("keydown",(function(e){if(e.key==="Backspace"&&e.target.value===""){t[Math.max(0,n-1)].focus()}}));e.addEventListener("input",(function(e){var r=e.data;if(!r)return;if(n===t.length-1){e.target.value=r.slice(0,1);return}if(r.length>1){var i=r.slice(1);e.target.value=r.slice(0,1);t[n+1].dispatchEvent(new InputEvent("input",{inputType:"insertFromPaste",data:i}))}t[n+1].focus()}))}))}),[_]);var B=function(){l(false);k(false)};var K=function(){return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:if(!F)return[2];return[4,A()];case 1:e=t.sent();if(!e){I(true);return[2]}if(p)y(true);m(true);return[2]}}))}))};var V=function(){return __awaiter(t,void 0,void 0,(function(){var t,n,r,i;return __generator(this,(function(a){switch(a.label){case 0:t=_.querySelectorAll("sl-input");n=Array.from(t).map((function(e){return e.shadowRoot.querySelector('input[name="code"]')}));if(n.find((function(e){return!e.value}))){k(true);return[2]}r="";n.forEach((function(e){r=""+r+e.value}));if(!F)return[2];k(false);return[4,D(r)];case 1:i=a.sent();if(i===null||i===void 0?void 0:i.success){e.onVerification(i.accessKey);B()}else{k(true)}return[2]}}))}))};a((function(){if(!F)return;if(!d)K();else m(true)}),[F]);return{refs:{codeWrapperRef:w},states:{email:R,emailResent:h,resendError:M||H,initialiseLoading:!F,loading:q||z,verifyFailed:!!T},callbacks:{resendEmail:K,submitCode:V},text:e.getTextProps()}}var P=e("sqm_code_verification",function(){function e(e){n(this,e);this.verifyCodeHeaderText="Enter the code sent to {email} from our referral provider, impact.com.";this.reverifyCodeHeaderText="Enter the code sent to {email} from our referral provider, impact.com.";this.resendCodeText="Didn't receive your code? {resendCodeLink}";this.resendCodeLabel="Resend code";this.codeResentSuccessfullyText="Another code has been sent to {email}";this.invalidCodeText="Please check your code and try again. If you’re still having trouble, try resending your code.";this.verifyText="Verify";this.networkErrorMessage="An error occurred while verifying your email. Please refresh the page and try again.";this.stateController="{}";s(this)}e.prototype.disconnectedCallback=function(){};e.prototype.getTextProps=function(){return m(this)};e.prototype.render=function(){var e=d()?F(this):I(this);return t(j,Object.assign({},e))};return e}());function F(e){var t=this;var n=i(false),r=n[0],a=n[1];var s=f(_);return p({states:{initialiseLoading:false,loading:false,email:"test@example.com",emailResent:r,verifyFailed:false},refs:{codeWrapperRef:function(){}},callbacks:{resendEmail:function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){return[2,a(true)]}))}))},submitCode:function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){return[2,s(true)]}))}))}},text:e.getTextProps()},e.demoData||g(e.stateController)||{},{arrayMerge:function(e,t){return t}})}}}}));
@@ -0,0 +1 @@
1
+ System.register(["./p-f26aedcd.system.js","./p-bdb7d451.system.js","./p-1a673057.system.js"],(function(e){"use strict";var s,t,n;return{setters:[function(e){s=e.h},function(e){t=e.i},function(e){n=e.c}],execute:function(){e({a:p,g:f,v:c});var l={Container:{display:"flex",flexDirection:"column",gap:"24px"},HeaderContainer:{display:"flex",flexDirection:"column",gap:"10px"},TitleSkeleton:{width:"45%",height:"40px !important"},StepSkeleton:{width:"15%"},HeaderSkeleton:{width:"25%",height:"30px !important"},InputSkeleton:{width:"75%"},ButtonSkeleton:{width:"80px",height:"30px !important"}};var a=n(l);var r=a.toString();var o=e("L",(function(){return s("div",{class:a.classes.Container},s("style",{type:"text/css"},r),s("sl-skeleton",{class:a.classes.TitleSkeleton}),s("div",{class:a.classes.HeaderContainer},s("sl-skeleton",{class:a.classes.StepSkeleton}),s("sl-skeleton",{class:a.classes.HeaderSkeleton})),s("sl-skeleton",{class:a.classes.InputSkeleton}),s("sl-skeleton",{class:a.classes.InputSkeleton}),s("sl-skeleton",{class:a.classes.InputSkeleton}),s("sl-skeleton",{class:a.classes.InputSkeleton}),s("sl-skeleton",{class:a.classes.InputSkeleton}),s("sl-skeleton",{class:a.classes.StepSkeleton}),s("sl-skeleton",{class:a.classes.ButtonSkeleton}))}));function c(e){var s=["W9","W8BENE","W8BEN"];if(s.includes(e))return true;return false}var i=e("o",(function(e){return!Object.keys(e).find((function(s){return e[s]==undefined}))}));var u=e("t",(function(e){switch(e){case"W9":return"W-9";case"W8BEN":case"W8BENE":return"W-8";default:return""}}));function p(e,s){var t=s.trim();var n=t.search(e);return n>-1}var d=e("f",(function(e,s){return t.formatMessage({id:e,defaultMessage:s},{fieldName:e})}));function f(e){var s=e.countryCode,t=e.locale;var n=new Intl.DisplayNames([t],{type:"region"}).of(s);return{countryCode:s,displayName:n}}}}}));
@@ -0,0 +1 @@
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++){t=arguments[r];for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a))e[a]=t[a]}return e};return __assign.apply(this,arguments)};var __spreadArrays=this&&this.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var i=Array(e),a=0,t=0;t<r;t++)for(var n=arguments[t],o=0,s=n.length;o<s;o++,a++)i[a]=n[o];return i};System.register(["./p-f26aedcd.system.js","./p-48135f99.system.js","./p-bdb7d451.system.js","./p-6cd4f2b1.system.js","./p-4bd679a7.system.js","./p-6333265f.system.js","./p-1a673057.system.js","./p-3a62a7e2.system.js","./p-93e4a3c3.system.js","./p-115dfc03.system.js","./p-f8175201.system.js","./p-a8645c1b.system.js"],(function(e){"use strict";var t,r,i,a,n,o,s,d,u,c,l,h,p,m,f,y,b,v,_,g,x,T,S,C,I,P,A,k,w,L,N,E,B;return{setters:[function(e){t=e.r;r=e.h},function(e){i=e.u;a=e.f;n=e.n},function(){},function(e){o=e.M;s=e._;d=e.J;u=e.L;c=e.I;l=e.S;h=e.i},function(e){p=e.c},function(e){m=e.g},function(){},function(e){f=e.E},function(e){y=e.g;b=e.L},function(e){v=e.p},function(e){_=e.T;g=e.a;x=e.U;T=e.C;S=e.b;C=e.S;I=e.c;P=e.G;A=e.d;k=e.e;w=e.F;L=e.f;N=e.g;E=e.h},function(e){B=e.e}],execute:function(){function D(e){var t,r;if(!((t=e.impactConnection)===null||t===void 0?void 0:t.connected)||!((r=e.impactConnection)===null||r===void 0?void 0:r.publisher)){return"/1"}var i=e.impactConnection.publisher,a=i.requiredTaxDocumentType,n=i.currentTaxDocument,o=i.withdrawalSettings,s=i.brandedSignup;if(a&&!n)return"/3";if(!o&&s)return"/4";return"/dashboard"}function F(){var e,t,r,n,h;var p=s();var m=d();var f=u();var b=c({namespace:_,initialValue:"/loading"}),v=b[0],B=b[1];var F=c({namespace:g,initialValue:{}}),R=F[0],q=F[1];var H=c({namespace:x,initialValue:{firstName:undefined,lastName:undefined,email:undefined,countryCode:undefined,currency:undefined}}),V=H[0],j=H[1];var O=c({namespace:T,initialValue:[]}),G=O[0],M=O[1];var U=c({namespace:S,initialValue:[]}),W=U[0],Y=U[1];var Q=c({namespace:C,initialValue:[]}),Z=Q[0],z=Q[1];var J=l({namespace:I,query:P,skip:!m,options:{batch:false}}),K=J.data,X=J.errors;var $=((r=(t=(e=K===null||K===void 0?void 0:K.user)===null||e===void 0?void 0:e.impactConnection)===null||t===void 0?void 0:t.publisher)===null||r===void 0?void 0:r.countryCode)||V.countryCode;l({namespace:A,query:k,skip:!m});var ee=l({namespace:w,query:L,skip:!m,variables:{filter:le()}}),te=ee.data,re=ee.refetch;var ie=l({namespace:N,query:E,skip:!m,variables:{locale:f}}).data;var ae=i((function(){var e,t;var r=(t=(e=te===null||te===void 0?void 0:te.impactFinanceNetworkSettings)===null||e===void 0?void 0:e.data)===null||t===void 0?void 0:t.reduce((function(e,t){var r,i;var a=(i=(r=ie===null||ie===void 0?void 0:ie.currencies)===null||r===void 0?void 0:r.data)===null||i===void 0?void 0:i.find((function(e){return e.currencyCode===t.currency}));if(!a)return e;if(e.find((function(e){return e.currencyCode===t.currency})))return e;if(V.countryCode&&t.countryCode!==$)return e;return __spreadArrays(e,[a])}),[]);return r}),[te,$]);var ne=(f===null||f===void 0?void 0:f.replace("_","-"))||"en";var oe=function(e,t){return e.displayName<t.displayName?-1:1};var se=(n=te===null||te===void 0?void 0:te.impactFinanceNetworkSettings)===null||n===void 0?void 0:n.data;var de=i((function(){return new Set(se===null||se===void 0?void 0:se.map((function(e){return e.countryCode})).filter((function(e){return e})))}),[se]);var ue=["CA","GB","US"];var ce=i((function(){return Array.from(de).map((function(e){return y({countryCode:e,locale:ne})})).sort(oe).reduce((function(e,t){if(ue.includes(t.countryCode))return __spreadArrays([t],e);return __spreadArrays(e,[t])}),[])}),[de]);a((function(){if(ce)z(ce)}),[ce]);a((function(){if(ae)M(ae)}),[ae]);a((function(){if(X){B("/error");return}if(!p||!m)return;if(K){var e=K===null||K===void 0?void 0:K.user;if(!e||v!=="/loading")return;var t=D(e);B(t)}}),[p,m,(h=K===null||K===void 0?void 0:K.user)===null||h===void 0?void 0:h.email,X]);function le(){var e,t,r;if(v==="/1")return{};if(v==="/4")return{currency_eq:(r=(t=(e=K===null||K===void 0?void 0:K.user)===null||e===void 0?void 0:e.impactConnection)===null||t===void 0?void 0:t.publisher)===null||r===void 0?void 0:r.currency};if($)return{countryCode_eq:$};return{}}return{step:v,setStep:B,context:R,namespace:o(_),loading:v==="/loading"}}var R=e("sqm_tax_and_cash",function(){function e(e){t(this,e);this.step1_firstName="First name";this.step1_lastName="Last name";this.step1_email="Email";this.step1_country="Country";this.step1_phoneNumber="Phone number";this.step1_address="Address";this.step1_city="City";this.step1_state="State";this.step1_province="Province";this.step1_region="Region";this.step1_postalCode="Postal code";this.step1_currency="Currency";this.step1_currencyHelpText="Choose your preferred payout currency";this.step1_allowBankingCollection="I have read the {termsAndConditionsLink} and allow impact.com to collect my tax and banking information";this.step1_personalInformation="Personal Information";this.step1_termsAndConditionsLabel="terms and conditions";this.step1_termsAndConditionsLink="https://terms.advocate.impact.com/PayoutTermsAndConditions.html";this.step1_searchForCurrencyText="Search for currency..";this.step2_indirectTax="Indirect Tax";this.step2_indirectTaxDescription="Indirect taxes (e.g. VAT, HST, GST) are transaction based taxes often applied to goods and services. Service providers are typically required to register with their tax authority and collect these taxes on behalf governments.";this.step2_indirectTaxDetails="Indirect tax details";this.step2_otherRegion="Registered for indirect tax";this.step2_otherRegionSubtext="If you’ve registered with your tax authority, add your information to stay tax compliant.";this.step2_notRegistered="Not registered for indirect tax";this.step2_notRegisteredSubtext="If you’ve never set up indirect tax with your tax authority, then you’re likely not considered registered.";this.step2_selectedRegion="Country / region of indirect tax";this.step2_indirectTaxNumber="{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}";this.step2_province="Province";this.step2_indirectTaxNumberError="{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}} is required";this.step2_qstNumber="QST number";this.step2_isRegisteredQST="I am registered for QST Tax";this.step2_isRegisteredSubRegionIncomeTax="I am an individual registered for Income Tax purposes in Spain, and withholding tax will apply to any payments made to me.";this.step2_subRegion="Sub-region";this.step2_subRegionTaxNumberLabel="Income Tax Number";this.step2_cannotChangeInfoAlert="Changes to your personal and indirect tax information can only be made through our {supportLink} after you complete this step. Make sure these are correct before continuing.";this.step3_taxForm="Tax form";this.step3_taxFormLabel="{documentType} Tax Form";this.step3_participantType="Participant type";this.step3_businessEntity="I represent a business";this.step3_individualParticipant="I am an individual participant";this.step3_taxFormDescription="Participants based in the US need to submit a {documentType} form.";this.step3_taxFormDescriptionIndividualParticipant="Participants residing outside of the US, joining the referral program of a US-based company, need to submit a {documentType} form.";this.step3_taxFormDescriptionBusinessEntity="Participants residing outside of the US who represent a business entity need to submit a {documentType} form.";this.step3_docusignExpired="For your security and privacy, we automatically end your session after 20 minutes of inactivity. Please refresh and re-enter your tax information to continue.";this.step3_docusignSessionWarning="For your security, we automatically end your session when you have not interacted with the form after 20 minutes.";this.step3_docusignError="There was a problem displaying this form. Please refresh the page. If this problem continues, contact our {supportLink}.";this.step3_refreshButton="Refresh Page";this.step3_exitButton="Exit";this.step4_taxAndPayouts="Payouts";this.step4_directlyToBankAccount="Directly to my bank account";this.step4_toPayPalAccount="PayPal (2% processing fee capped to {feeCap})";this.step4_paymentScheduleBalanceThreshold="Pay me when my balance reaches a threshold";this.step4_paymentScheduleFixedDay="Pay me on a fixed day of the month";this.step4_paymentDaySelectLabel="Payment Day";this.step4_paymentThresholdSelectLabel="Payment threshold";this.step4_paymentDayFirstOfMonthLabelText="1st of the month";this.step4_paymentDayFifteenthOfMonthLabelText="15th of the month";this.step4_paymentMethod="Payment method";this.step4_paymentSchedule="Payment schedule";this.step4_paymentMethodSubtext="Payouts will be sent from our referral program provider, impact.com.";this.step4_payPalInputLabel="PayPal email";this.step4_bankLocationLabel="Bank country location";this.step4_beneficiaryAccountNameLabel="Beneficiary account name";this.step4_bankAccountTypeLabel="Bank account type";this.step4_checkingSelectItemLabel="Checking";this.step4_savingsSelectItemLabel="Savings";this.step4_bankAccountNumberLabel="Bank account number";this.step4_ibanLabel="IBAN";this.step4_swiftCodeLabel="SWIFT code";this.step4_routingCodeLabel="{bankCountry, select, AU {BSB number} CA {Routing number} CZ {Bank code} HK {Clearing code} SG {Clearing code} US {ABA routing number} NZ {BSB number} ZA {Bank/Branch number} IN {IFSC} CNY {CNAPS} other {Routing code} }";this.step4_bankNameLabel="Bank name";this.step4_classificationEntityLabel="Classification entity";this.step4_businessSelectItemLabel="Business";this.step4_individualSelectItemLabel="Individual";this.step4_foreignSelectItemLabel="Foreign";this.step4_classificationCPFLabel="Classification CPF";this.step4_patronymicNameLabel="Patronymic name";this.step4_voCodeLabel="VO code";this.step4_agencyCodeLabel="Agency code";this.step4_branchCodeLabel="Branch code";this.step4_classificationLabel="Classification";this.step4_taxPayerIdLabel="Beneficiary INN";this.step4_bankAddressLabel="Bank address";this.step4_bankCityLabel="Bank city";this.step4_bankStateLabel="Bank Province / State";this.step4_bankPostalCodeLabel="Bank postal code";this.step4_eftWithdrawalLabel="EFT Withdrawal (free)";this.step4_fxWireProcessingFeeLabel="FX Wire (Processing Fee {currency}{defaultFxFee}.00)";this.step4_verifyEmailHeaderText="Verify your email";this.step4_verifyEmailDescriptionText="Verify your email to update your payment settings. Enter the code sent to {email} from our referral provider, impact.com.";this.dashboard_statusTextActive="Active";this.dashboard_statusTextNotActive="Invalid Tax Form";this.dashboard_statusTextNotVerified="Not Verified";this.dashboard_badgeTextSubmittedOn="Submitted on {dateSubmitted}.";this.dashboard_badgeTextSubmittedOnW8="Submitted on {dateSubmitted}. Valid for three years after submission.";this.dashboard_badgeTextAwaitingReview="Awaiting review. Submitted on {dateSubmitted}.";this.dashboard_taxAlertHeaderNotActiveW9="Your W9 tax form has personal information that doesn’t match your profile";this.dashboard_taxAlertHeaderNotActiveW8="{documentType} tax form is invalid";this.dashboard_taxAlertNotActiveMessageW9="Please resubmit a new {documentType} form.";this.dashboard_taxAlertNotActiveMessageW8="Your tax form may have expired or has personal information that doesn’t match your profile. Please submit a new {documentType} form.";this.dashboard_invalidForm="Make sure your information is correct and submit new form.";this.dashboard_bankingInformationSectionHeader="Payout Information";this.dashboard_taxDocumentSectionHeader="Tax documents";this.dashboard_taxDocumentSectionSubHeader="{documentType} tax form";this.dashboard_noFormNeededSubtext="Tax documents are only required if you are based in the US or joining the referral program of a US based brand.";this.dashboard_indirectTaxInfoSectionHeader="Indirect tax";this.dashboard_indirectTaxInfoCanada="Registered in {province}, {country}";this.dashboard_indirectTaxInfoOtherCountry="Registered in {country}";this.dashboard_indirectTaxInfoSpain="Registered in {country}, {subRegion}";this.dashboard_indirectTaxTooltipSupport="To make changes to your indirect tax information, please contact our {supportLink}.";this.dashboard_indirectTaxDetails="{indirectTaxType} number: {indirectTaxNumber}";this.dashboard_newFormButton="Submit new form";this.dashboard_editPaymentInformationButton="Edit Payout Information";this.dashboard_notRegisteredForTax="Not registered for indirect tax. If you’ve previously registered with your tax authority, contact our {supportLink} to add your information to stay tax compliant.";this.dashboard_qstNumber="QST number: {qstNumber}";this.dashboard_subRegionTaxNumber="Income tax number: {subRegionTaxNumber}";this.dashboard_statusBadgeText="{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }";this.dashboard_thresholdPayoutText="Next payout occurs when balance is {thresholdBalance}";this.dashboard_accountText="Account";this.dashboard_invoiceColumnTitle="Invoice";this.dashboard_dateColumnTitle="Date";this.dashboard_earningsColumnTitle="Earnings";this.dashboard_indirectTaxColumnTitle="Indirect tax";this.dashboard_payoutFromImpact="Your balance may take up to 24 hours to update. Payouts will be sent from our referral program provider, impact.com.";this.dashboard_earningsAfterTaxColumnTitle="Earnings after tax";this.dashboard_payoutHoldAlertHeader="Your payout is on hold";this.dashboard_payoutHoldAlertDescription="Please contact our {supportLink} or check your inbox for an email from our referral program provider, impact.com.";this.dashboard_payoutMissingInformationText="Missing banking information, go to Impact.com to resolve.";this.dashboard_invoiceDescription="View and download your invoices to report your earnings and stay tax compliant.";this.dashboard_invoicePrevLabel="Prev";this.dashboard_invoiceMoreLabel="Next";this.dashboard_invoiceHeader="Invoices";this.dashboard_invoiceEmptyStateHeader="View your invoice details";this.dashboard_invoiceEmptyStateText="Refer a friend to view the status of your invoices and rewards earned";this.dashboard_replaceTaxFormModalHeader="Replace existing tax form";this.dashboard_replaceTaxFormModalBodyText="Submitting a new tax form will remove your existing form. Make sure to sign and complete your new tax form to prevent any issues with your next payout.";this.dashboard_verificationRequiredHeader="Verify your identity";this.dashboard_verificationRequiredDescription="Complete your verification to start receiving your cash rewards. It should only take a few minutes verify. If you run in to an issue verifying your identity contact our {supportLink}.";this.dashboard_verificationRequiredInternalHeader="Identity Verification in Progress";this.dashboard_verificationRequiredInternalDescription="Identity verification submission has been received. Our system is currently performing additional checks and analyzing the results. You will be updated shortly. If you don't hear from us contact our {supportLink}.";this.dashboard_verificationReviewInternalHeader="Identity Verification Under Review";this.dashboard_verificationReviewInternalDescription="Identity verification requires further review due to a potential error. Our team is reviewing the information and will update you shortly. If you don't hear from us contact our {supportLink}.";this.dashboard_verificationFailedInternalHeader="Identity Verification Unsuccessful";this.dashboard_verificationFailedInternalDescription="Identity verification has failed. Our team is reviewing the report and will contact you with further information. If you don't hear from us contact our {supportLink}.";this.dashboard_verificationRequiredButtonText="Start Verification";this.formStep="Step {step} of {count}";this.generalErrorTitle="There was a problem submitting your information";this.generalErrorDescription="Please review your information and try again. If this problem continues, contact our {supportLink}.";this.fieldRequiredError="{fieldName} is required";this.invalidCharacterError="{fieldName} includes characters that aren't supported.";this.fieldInvalidError="{fieldName} is invalid";this.continueButton="Continue";this.backButton="Back";this.cancelButton="Cancel";this.isPartnerAlertHeader="An account with this email already exists with our referral program provider, impact.com";this.isPartnerAlertDescription="If you don’t recognize this referral program provider or believe this is a mistake, please contact our {supportLink} or sign up for this referral program with a different email.";this.searchForCountryText="Search for country..";this.loadingErrorAlertHeader="There was a problem loading your form";this.loadingErrorAlertDescription="Please refresh the page and try again. If this problem continues, contact our {supportLink}.";this.taxAndPayoutsDescription="Submit your tax documents and add your banking information to receive your rewards.";this.supportLink="support team";this.stateController="{}";n(this)}e.prototype.disconnectedCallback=function(){};e.prototype.getGeneralStepTextProps=function(e){var t=m(this);return __assign(__assign({},B(t,e)),{generalErrorTitle:t.generalErrorTitle,generalErrorDescription:t.generalErrorDescription,fieldRequiredError:t.fieldRequiredError,invalidCharacterError:t.invalidCharacterError,fieldInvalidError:t.fieldInvalidError,continueButton:t.continueButton,backButton:t.backButton,cancelButton:t.cancelButton,isPartnerAlertHeader:t.isPartnerAlertHeader,isPartnerAlertDescription:t.isPartnerAlertDescription,loadingErrorAlertHeader:t.loadingErrorAlertHeader,loadingErrorAlertDescription:t.loadingErrorAlertDescription,taxAndPayoutsDescription:t.taxAndPayoutsDescription,searchForCountryText:t.searchForCountryText,formStep:t.formStep,supportLink:t.supportLink})};e.prototype.render=function(){var e=this;var t,i;var a=h()?q(this):F();if((t=this.demoData)===null||t===void 0?void 0:t.showTextProps){var n=m(this);return r("div",null,(i=Object.keys(n))===null||i===void 0?void 0:i.map((function(t){if(t==="demoData")return;return r("div",null,r("b",null,t,":")," ",e[t],r("hr",null))})))}var o=function(){switch(a.step){case"/1":return r("sqm-user-info-form",Object.assign({},e.getGeneralStepTextProps("step1_"),B(a,"sqm-user-info-form_")));case"/2":return r("sqm-indirect-tax-form",Object.assign({},e.getGeneralStepTextProps("step2_")));case"/3":return r("sqm-docusign-form",Object.assign({},e.getGeneralStepTextProps("step3_")));case"/4":return r("sqm-banking-info-form",Object.assign({},e.getGeneralStepTextProps("step4_")));case"/dashboard":return r("sqm-tax-and-cash-dashboard",Object.assign({},e.getGeneralStepTextProps("dashboard_"),B(a,"sqm-tax-and-cash-dashboard_")));case"/error":return r(f,{loadingErrorAlertHeader:e.loadingErrorAlertHeader,loadingErrorAlertDescription:e.loadingErrorAlertDescription})}};return o()||r(b,null)};return e}());function q(e){var t=c({namespace:_,initialValue:"/1"}),r=t[0],i=t[1];console.log("PROPS",e);var a=v(e.stateController);var n=Object.keys(a).reduce((function(e,t){var r;return t==="sqm-tax-and-cash"?__assign(__assign({},e),a[t]):__assign(__assign({},e),(r={},r[t+"_stateController"]=a[t],r))}),{});return p({step:r,setStep:i},e.demoData||n||{},{arrayMerge:function(e,t){return t}})}}}}));
@@ -0,0 +1 @@
1
+ import{h as r}from"./p-f708da7b.js";import{c as o}from"./p-cef45012.js";const a={Alert:{"&::part(base)":{backgroundColor:"var(--sl-color-danger-100)",border:"1px solid var(--sl-color-danger-200)",padding:"0 16px"},"& sl-icon":{margin:0},"& sl-icon::part(base)":{color:"var(--sl-color-danger-500)",margin:0}}},l=l=>{const s=o(a),n=s.toString(),{classes:e}=s;return r("div",null,r("style",null,n),r("sl-alert",{exportparts:"base: alert-base, icon:alert-icon",type:"danger",open:!0,class:e.Alert},r("sl-icon",{slot:"icon",name:"exclamation-octagon",class:"Error"}),r("strong",null,l.loadingErrorAlertHeader),r("br",null),l.loadingErrorAlertDescription))};export{l as E}