@saasquatch/mint-components 1.15.0-117 → 1.15.0-118

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 (63) hide show
  1. package/dist/cjs/{ShadowViewAddon-f1bd9b26.js → ShadowViewAddon-8fed996f.js} +1 -1
  2. package/dist/cjs/sqm-big-stat_43.cjs.entry.js +2 -2
  3. package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
  4. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +1 -1
  5. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +1 -1
  6. package/dist/esm/{ShadowViewAddon-c0600f22.js → ShadowViewAddon-928bfc1a.js} +1 -1
  7. package/dist/esm/sqm-big-stat_43.entry.js +2 -2
  8. package/dist/esm/sqm-stencilbook.entry.js +1 -1
  9. package/dist/esm-es5/{ShadowViewAddon-c0600f22.js → ShadowViewAddon-928bfc1a.js} +1 -1
  10. package/dist/esm-es5/sqm-big-stat_43.entry.js +1 -1
  11. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  12. package/dist/mint-components/mint-components.esm.js +1 -1
  13. package/dist/mint-components/{p-ed69dc98.system.entry.js → p-10507209.system.entry.js} +1 -1
  14. package/dist/mint-components/{p-be770d69.system.entry.js → p-3f1f78c0.system.entry.js} +1 -1
  15. package/dist/mint-components/{p-f9f67437.entry.js → p-56a5e3b2.entry.js} +1 -1
  16. package/dist/mint-components/{p-bdc86ee3.system.js → p-84a5b46a.system.js} +1 -1
  17. package/dist/mint-components/{p-1276830a.entry.js → p-a0c8162d.entry.js} +2 -2
  18. package/dist/mint-components/p-a89baf7b.system.js +1 -1
  19. package/dist/mint-components/{p-6b904749.js → p-d278519f.js} +1 -1
  20. package/docs/docs.docx +0 -0
  21. package/package.json +1 -1
  22. package/dist/cjs/RewardExchangeListData-a787ce54.js +0 -1144
  23. package/dist/cjs/copy-text-view-f0313f78.js +0 -121
  24. package/dist/cjs/sqm-coupon-code-view-a869384e.js +0 -35
  25. package/dist/cjs/sqm-coupon-code.cjs.entry.js +0 -285
  26. package/dist/cjs/sqm-referral-code.cjs.entry.js +0 -177
  27. package/dist/cjs/sqm-reward-exchange-list.cjs.entry.js +0 -1018
  28. package/dist/cjs/sqm-share-code.cjs.entry.js +0 -147
  29. package/dist/cjs/sqm-share-link.cjs.entry.js +0 -102
  30. package/dist/esm/RewardExchangeListData-11c043e3.js +0 -1122
  31. package/dist/esm/copy-text-view-3129fb22.js +0 -119
  32. package/dist/esm/sqm-coupon-code-view-af016712.js +0 -33
  33. package/dist/esm/sqm-coupon-code.entry.js +0 -281
  34. package/dist/esm/sqm-referral-code.entry.js +0 -173
  35. package/dist/esm/sqm-reward-exchange-list.entry.js +0 -1014
  36. package/dist/esm/sqm-share-code.entry.js +0 -143
  37. package/dist/esm/sqm-share-link.entry.js +0 -98
  38. package/dist/esm-es5/RewardExchangeListData-11c043e3.js +0 -1
  39. package/dist/esm-es5/copy-text-view-3129fb22.js +0 -1
  40. package/dist/esm-es5/sqm-coupon-code-view-af016712.js +0 -1
  41. package/dist/esm-es5/sqm-coupon-code.entry.js +0 -1
  42. package/dist/esm-es5/sqm-referral-code.entry.js +0 -1
  43. package/dist/esm-es5/sqm-reward-exchange-list.entry.js +0 -1
  44. package/dist/esm-es5/sqm-share-code.entry.js +0 -1
  45. package/dist/esm-es5/sqm-share-link.entry.js +0 -1
  46. package/dist/mint-components/RewardExchangeListData-11c043e3.js +0 -1122
  47. package/dist/mint-components/RewardExchangeListData-546ffbb9.system.js +0 -1
  48. package/dist/mint-components/copy-text-view-3129fb22.js +0 -119
  49. package/dist/mint-components/copy-text-view-33cac657.system.js +0 -1
  50. package/dist/mint-components/sqm-coupon-code-view-40fd8d8b.system.js +0 -1
  51. package/dist/mint-components/sqm-coupon-code-view-af016712.js +0 -33
  52. package/dist/mint-components/sqm-coupon-code.entry.js +0 -281
  53. package/dist/mint-components/sqm-coupon-code.system.entry.js +0 -1
  54. package/dist/mint-components/sqm-referral-code.entry.js +0 -173
  55. package/dist/mint-components/sqm-referral-code.system.entry.js +0 -1
  56. package/dist/mint-components/sqm-reward-exchange-list.entry.js +0 -1014
  57. package/dist/mint-components/sqm-reward-exchange-list.system.entry.js +0 -1
  58. package/dist/mint-components/sqm-share-code.entry.js +0 -143
  59. package/dist/mint-components/sqm-share-code.system.entry.js +0 -1
  60. package/dist/mint-components/sqm-share-link.entry.js +0 -98
  61. package/dist/mint-components/sqm-share-link.system.entry.js +0 -1
  62. package/dist/mint-components/sqm-stencilbook.entry.js +0 -20330
  63. package/dist/mint-components/sqm-stencilbook.system.entry.js +0 -1
@@ -1 +0,0 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var a,s=1,t=arguments.length;s<t;s++){a=arguments[s];for(var i in a)if(Object.prototype.hasOwnProperty.call(a,i))e[i]=a[i]}return e};return __assign.apply(this,arguments)};var __spreadArrays=this&&this.__spreadArrays||function(){for(var e=0,a=0,s=arguments.length;a<s;a++)e+=arguments[a].length;for(var t=Array(e),i=0,a=0;a<s;a++)for(var n=arguments[a],o=0,r=n.length;o<r;o++,i++)t[i]=n[o];return t};System.register(["./index-bfed5e90.system.js","./global-c9084753.system.js","./JSS-840a8fea.system.js","./mixins-8c4521b7.system.js","./copy-text-view-33cac657.system.js"],(function(e){"use strict";var a,s,t,i,n,o;return{setters:[function(e){a=e.h;s=e.j},function(e){t=e.i},function(e){i=e.c},function(e){n=e.H},function(e){o=e.C}],execute:function(){e({P:v,R:y});var r=function(){return a("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{marginBottom:"-2px",marginRight:"5px"}},a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.34655 1.90573C7.75405 2.31323 7.75405 2.97392 7.34655 3.38143L3.56266 7.16531H14.9565C15.5328 7.16531 16 7.6325 16 8.20879C16 8.78509 15.5328 9.25227 14.9565 9.25227H3.56266L7.69437 13.384C8.10188 13.7915 8.10188 14.4522 7.69437 14.8597C7.28687 15.2672 6.62617 15.2672 6.21867 14.8597L0.305628 8.94664C-0.101876 8.53914 -0.101876 7.87845 0.305628 7.47094L5.87084 1.90573C6.27835 1.49822 6.93904 1.49822 7.34655 1.90573Z",fill:"#858585"}))};var l=function(){return a("svg",{width:19,height:15,fill:"none",xmlns:"http://www.w3.org/2000/svg"},a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.125 14.783a.6.6 0 0 1-.851 0l-3.9-3.923a.6.6 0 1 1 .85-.846L4.1 12.905V1.52a.6.6 0 0 1 1.2 0v11.385l2.875-2.891a.6.6 0 1 1 .85.846l-3.9 3.923Zm9.6-13.686a.6.6 0 0 0-.851 0l-3.9 3.923a.6.6 0 0 0 .85.846L13.7 2.975V14.36a.6.6 0 1 0 1.2 0V2.975l2.875 2.891a.6.6 0 1 0 .85-.846l-3.9-3.923Z",fill:"#333"}))};var c=function(){return a("svg",{width:12,height:10,fill:"none",xmlns:"http://www.w3.org/2000/svg"},a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.58.23c.475.371.56 1.057.19 1.532L5.69 9.554a1.091 1.091 0 0 1-1.631.1L.32 5.915a1.09 1.09 0 1 1 1.542-1.542L4.73 7.239 10.049.42A1.09 1.09 0 0 1 11.58.23Z",fill:"#fff"}))};var d=function(){return a("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M0 9C0 4.02944 4.02944 0 9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9Z",fill:"currentColor"}),a("path",{d:"M5.68394 8.77046C5.28103 8.39273 4.64819 8.41315 4.27046 8.81606C3.89273 9.21897 3.91315 9.85181 4.31606 10.2295L5.68394 8.77046ZM7.66667 12L6.98273 12.7295C7.36738 13.0902 7.96595 13.0902 8.35061 12.7295L7.66667 12ZM13.6839 7.72954C14.0869 7.35181 14.1073 6.71897 13.7295 6.31606C13.3518 5.91315 12.719 5.89273 12.3161 6.27046L13.6839 7.72954ZM4.31606 10.2295L6.98273 12.7295L8.35061 11.2705L5.68394 8.77046L4.31606 10.2295ZM8.35061 12.7295L13.6839 7.72954L12.3161 6.27046L6.98273 11.2705L8.35061 12.7295Z",fill:"white"}))};var u=function(){return a("svg",{width:156,height:157,fill:"none",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M40.18 126h83.663a3 3 0 0 0 3-3V73.966a3 3 0 0 0-3-3H40.18a3 3 0 0 0-3 3V123a3 3 0 0 0 3 3Z",fill:"#FFD34F"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M37.18 73.862v7.966h89.663v-7.966H37.18Z",fill:"#E9BB30"}),a("path",{d:"M133.039 74.224a2.18 2.18 0 0 0 2.187-2.172v-19.19c0-1.2-.98-2.172-2.187-2.172H31.347a2.18 2.18 0 0 0-2.187 2.172v19.19c0 1.2.98 2.172 2.187 2.172H133.04Z",fill:"#FFC000"}),a("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M123.287 35.172c0 6.056-9.155 15.226-13.76 15.654H88.888V126H75.141V50.826H58.534c-9.462-2.038-17.803-9.258-17.803-16.944 0-7.49 3.274-13.422 9.23-15.983 5.693-2.446 12.265-1.105 17.46 2.479 6.378 4.398 9.956 12.654 13.202 20.144.284.657.567 1.308.848 1.95.274-.608.55-1.228.83-1.856 3.216-7.22 6.887-15.464 13.057-19.89 5.454-3.913 12.387-5.39 18.38-2.711 6.197 2.77 9.549 9.127 9.549 17.157Zm-23.306-8.266c3.305-2.37 7.262-2.8 10.645 0 2.946 2.44 3.103 3.588 3.482 6.351l.067.483c0 4.09-3.549 10.252-7.097 10.252-2.515 0-4.489-.022-6.34-.041-3.375-.036-6.337-.068-11.403.04.966-1.86 1.737-3.644 2.473-5.346 1.967-4.553 3.678-8.515 8.173-11.739Zm-39.034 0c-1.6-1.103-5.268-.61-6.79.043-1.257.54-3.134 2.19-3.134 6.933 0 4.61 7.511 8.59 7.511 8.59s5.962 1.52 16.607 1.52c-3.624-8.922-8.757-13.336-14.194-17.086Z",fill:"#EB5757"}),a("path",{d:"M75.086 74.224h13.85v7.604h-13.85v-7.604Z",fill:"#DD4747"}),a("g",{filter:"url(#a)"},a("ellipse",{cx:82.008,cy:141.207,rx:36.813,ry:5.793,fill:"#E0DDDD","fill-opacity":.8})),a("path",{d:"M150.446 79.134a.5.5 0 0 1 .9 0l1.133 2.336c.05.102.132.184.234.233l2.344 1.122a.5.5 0 0 1 0 .902l-2.344 1.122a.503.503 0 0 0-.234.233l-1.133 2.336a.5.5 0 0 1-.9 0l-1.134-2.336a.499.499 0 0 0-.234-.233l-2.343-1.122a.5.5 0 0 1 0-.902l2.343-1.122a.499.499 0 0 0 .234-.233l1.134-2.336Z",fill:"#FAB6B6"}),a("path",{d:"M14.86 29.168a.5.5 0 0 1 .9 0l1.133 2.336a.5.5 0 0 0 .234.233l2.344 1.122a.5.5 0 0 1 0 .902l-2.344 1.122a.5.5 0 0 0-.234.233l-1.133 2.336a.5.5 0 0 1-.9 0l-1.134-2.336a.5.5 0 0 0-.234-.233l-2.343-1.122a.5.5 0 0 1 0-.902l2.344-1.122a.5.5 0 0 0 .233-.233l1.134-2.336Z",fill:"#F4EFBC"}),a("path",{d:"m125.382 0 .712 1.466 1.475.706-1.475.707-.712 1.466-.711-1.466-1.476-.707 1.476-.706.711-1.466Z",fill:"#FDA802"}),a("path",{d:"m2.187 103.552.711 1.466 1.476.706-1.476.707-.711 1.466-.711-1.466L0 105.724l1.476-.706.71-1.466Z",fill:"#E4599C"}),a("defs",null,a("filter",{id:"a",x:35.195,y:125.414,width:93.625,height:31.586,filterUnits:"userSpaceOnUse","color-interpolation-filters":"s-rGB"},a("feFlood",{"flood-opacity":0,result:"BackgroundImageFix"}),a("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),a("feGaussianBlur",{stdDeviation:5,result:"effect1_foregroundBlur_653_17907"}))))};function g(e){var s=e.active,t=e.completed,i=e.incomplete,n=e.stage;return a("div",{style:{display:"flex"}},a("div",{style:{backgroundColor:t?"var(--sqm-success-color-icon)":i?"var(--sqm-border-color)":"white",border:s?"1px solid var(--sqm-success-color-border)":i?"1px solid var(--sqm-border-color)":"1px solid var(--sqm-success-color-border)",borderRadius:"50%",width:"23px",height:"23px",margin:"-11px",zIndex:"1",boxSizing:"content-box"}},t?a("div",{style:{top:"-10.5%",left:"23.5%",position:"relative"}},a(c,null)):a("div",{style:{color:s?"var(--sqm-success-color-border)":"var(--sqm-text-subdued)",width:"23px",lineHeight:"24px",textAlign:"center",position:"relative"}},n+1)))}function p(e){var s=e.incomplete,t=s===void 0?false:s,i=e.active,n=i===void 0?false:i,o=e.invisible,r=o===void 0?false:o;return a("div",{style:{content:"''",flex:"0.5 0.5 0",height:"4px",borderRadius:"4px",background:t||n?"var(--sqm-border-color)":"var(--sqm-success-color-icon)",position:"relative",bottom:"0",left:"0",display:"flex",justifyContent:"center",columnGap:"50px",marginRight:"-2px",boxSizing:"content-box",opacity:r?"0":"1"}})}function m(e){var s=e.active,t=e.completed,i=e.incomplete,n=e.stage;return[a(p,{incomplete:i,invisible:n===0}),a(g,{active:s,completed:t,incomplete:i,stage:n}),a(p,{incomplete:i,active:s,invisible:n===2})]}function v(e){var s=e.stageCount,t=e.currentStage;return a("div",{style:{display:"flex",columnGap:"-2px"}},Array.from(Array(s).keys()).map((function(e){return a(m,{active:t===e,completed:t>e,incomplete:t<e,stage:e})})))}var _={HostBlock:n,Container:{minWidth:"300px",position:"relative"},FullImage:{objectFit:"contain",maxWidth:"100%",height:"250px",display:"flex",margin:"0 auto"},Select:{"&::part(base)":{borderRadius:"var(--sqm-input-border-radius)"},"&::part(label)":{color:"var(--sqm-input-label-color)"},"&::part(menu)":{maxHeight:"450px"},"& sl-menu-item::part(checked-icon)":{top:"8px",color:"var(--sqm-text)"},"& sl-menu-item::part(base)":{flexDirection:"column"},"& sl-menu-item::part(base):focus":{background:"var(--sqm-accent-color-background)",color:"var(--sqm-text)"}},ProgressBar:{maxWidth:"350px",width:"100%",margin:"auto",marginBottom:"var(--sl-spacing-xxx-large)","& .text-area":{marginTop:"5px",display:"flex",justifyContent:"center",textAlign:"center",whiteSpace:"nowrap",marginBottom:"6px","& .text":{marginBottom:"var(--sl-spacing-x-small)",flex:"1 1 0"},"& .text.subdued":{color:"var(--sqm-text-subdued)"}}},CardLayout:{display:"flex",width:"100%",borderRadius:"3px",background:"rgba(0, 0, 0, 0)"},Card:{display:"flex",userSelect:"none",height:"120px","&::part(base)":{background:"var(--sqm-portal-background)",border:"var(--sqm-border-thickness) solid var(--sqm-border-color)",borderRadius:"var(--sqm-border-radius-normal)",boxShadow:"none",width:"100%"},"&::part(body)":{display:"flex",padding:0},"& .selected":{borderRadius:"var(--sqm-border-radius-normal)",position:"relative",top:"-2%",left:"100%",color:"var(--sqm-primary-color)",margin:"-9px"}},Title:{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-semibold)",margin:"var(--sl-spacing-large) 0"},Image:{padding:"var(--sl-spacing-small)",minWidth:"96px",maxWidth:"96px","& .image":{width:"100%",height:"100%",objectFit:"contain",borderRadius:"4px"},"& .image.subdued":{filter:"brightness(0.95)",opacity:"0.5"}},TextArea:{textAlign:"left",padding:"var(--sl-spacing-small)",paddingLeft:"0","& .title":{fontSize:"var(--sl-font-size-medium)",lineHeight:"var(--sl-line-height-dense)",fontWeight:"600",color:"var(--sqm-text)",display:"-webkit-box","-webkit-line-clamp":"1","-webkit-box-orient":"vertical",overflow:"hidden"},"& .amount":{fontSize:"var(--sl-font-size-small)",lineHeight:"var(--sl-line-height-dense)",marginTop:"var(--sl-spacing-x-small)",color:"var(--sqm-text-subdued)",display:"-webkit-box","-webkit-line-clamp":"1","-webkit-box-orient":"vertical",overflow:"hidden"},"& .error":{fontSize:"var(--sl-font-size-small)",lineHeight:"var(--sl-line-height-dense)",marginTop:"var(--sl-spacing-x-small)",fontWeight:"600",color:"var(--sqm-warning-color-icon)",display:"-webkit-box","-webkit-line-clamp":"1","-webkit-box-orient":"vertical",overflow:"hidden","& .icon":{position:"relative",top:"0.1em",marginRight:"var(--sl-spacing-xx-small)"}}},ChooseAmount:{maxWidth:"800px",margin:"auto","& .wrapper":{display:"flex",gap:"var(--sl-spacing-xx-large)","@media (max-width: 799px)":{flexDirection:"column"}},"& .image":{width:"50%",objectFit:"contain",maxWidth:"100%",height:"250px",display:"flex","@media (max-width: 799px)":{width:"auto"}},"& .text":{width:"50%",maxWidth:"400px","@media (max-width: 799px)":{width:"auto",margin:"auto"}},"& .title":{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-semibold)",color:"var(--sqm-text)"},"& .points":{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-semibold)",color:"var(--sqm-accent-color-text)"},"& .description":{fontSize:"var(--sl-font-size-medium)",fontWeight:"var(--sl-font-weight-normal)",color:"var(--sqm-text-subdued)",margin:"var(--sl-spacing-medium) 0",lineHeight:"var(--sl-line-height-dense)",marginTop:"var(--sl-spacing-xx-small)"},"& .space":{marginBottom:"var(--sl-spacing-xxx-large)"},"& sl-menu-item[disabled]::part(label)":{color:"var(sqm-text-subdued)"},"& sl-menu-item[disabled]":{"& .step-cost":{color:"var(sqm-text-subdued)"},"& .step-value":{color:"var(sqm-text-subdued)"}}},SelectItem:{display:"flex",flexDirection:"column","&::part(label)":{color:"var(--sqm-text)",margin:"0"},"& .step-cost":{color:"var(--sqm-text-subdued)",marginBottom:"var(--sl-spacing-x-small)"},"& .step-unavailable":{fontSize:"var(--sl-font-size-small)",color:"var(--sqm-warning-color-text)",margin:"0"}},Success:{textAlign:"center","& .title":{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-semibold)",color:"var(--sqm-text)"},"& .description":{color:"var(--sqm-text-subued)",maxWidth:"350px",margin:"0 auto",lineHeight:"var(--sl-line-height-dense)",marginBottom:"var(--sl-spacing-xx-large)",marginTop:"var(--sl-spacing-xx-small)"},"& .promo":{maxWidth:"350px",margin:"-30px auto var(--sl-spacing-xxx-large) auto",textAlign:"left",color:"var(--sqm-text-subdued)"}},Grid:{display:"grid",justifyContent:"center",gap:"20px",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))"},Confirmation:{maxWidth:"800px",margin:"auto","& .wrapper":{display:"flex","@media (max-width: 499px)":{flexDirection:"column"}},"& .reward-item-container":{"@media (max-width: 499px)":{display:"flex",flexDirection:"row-reverse",justifyContent:"flex-end",alignItems:"center"}},"& .reward-item-container .reward-title":{paddingBottom:"var(--sl-spacing-medium)",lineHeight:"20px","@media (max-width: 499px)":{paddingBottom:"none",paddingLeft:"var(--sl-spacing-small)"}},"& .padding":{padding:"var(--sl-spacing-medium) 0","@media (max-width: 499px)":{padding:"var(--sl-spacing-small) 0"}},"& .field":{width:"30%",fontSize:"var(--sl-font-size-medium)",fontWeight:"var(--sl-font-weight-normal)",color:"var(--sqm-text-subdued)",textAlign:"left",paddingRight:"var(--sl-spacing-xxx-large)","@media (max-width: 499px)":{width:"100%",paddingRight:"0",paddingBottom:"0"}},"& .value":{fontSize:"var(--sl-font-size-large)",fontWeight:"var(--sl-font-weight-semibold)"},"& .top-border":{borderTop:"var(--sqm-border-thickness) solid var(--sqm-border-color)"},"& .image":{width:"200px","@media (max-width: 499px)":{width:"100px"}}},Button:{display:"flex",flexWrap:"wrap-reverse",margin:"var(--sl-spacing-medium) 0","& .cancel":{marginLeft:"auto",marginRight:"var(--sl-spacing-medium)","@media (max-width: 499px)":{width:"100%",marginRight:"0",marginTop:"var(--sl-spacing-small)"}},"& .continue":{"@media (max-width: 499px)":{width:"100%"}},"& .continue.right":{marginLeft:"auto"},"& .continue.center":{margin:"0 auto"}},Confetti:{pointerEvents:"none",position:"absolute",width:"100%",height:"100%",top:"0%",left:"0%",zIndex:"1"}};var h=i(_);var f=h.toString();var x=["chooseReward","chooseAmount","confirmation","success"];function y(e){var i=e.states,n=e.data,r=e.callbacks,l=e.refs;var c=i.selectedItem,g=i.selectedStep;var p={chooseReward:i.content.text.chooseRewardTitle,chooseAmount:i.content.text.chooseAmountTitle,confirmation:i.content.text.confirmationTitle};function m(){var e,s,n;var o=i.selectedItem;if(!o||(o===null||o===void 0?void 0:o.ruleType)==="FIXED_GLOBAL_REWARD")return a("span",{class:"points"},o===null||o===void 0?void 0:o.prettySourceValue);if(!((e=o.steps)===null||e===void 0?void 0:e.length)){return a("p",null,t.formatMessage({id:"notEnoughError",defaultMessage:i.content.text.notEnoughError},{sourceUnit:o.sourceUnit}))}return a("sl-select",{style:{width:"auto"},label:(s=i===null||i===void 0?void 0:i.content)===null||s===void 0?void 0:s.text.selectText,class:h.classes.Select,value:i.selectedStep,"onSl-select":function(e){var a,s,t,i,n;return r.setExchangeState({amount:(t=(s=(a=e.detail)===null||a===void 0?void 0:a.item)===null||s===void 0?void 0:s.value)===null||t===void 0?void 0:t.sourceValue,selectedStep:(n=(i=e.detail)===null||i===void 0?void 0:i.item)===null||n===void 0?void 0:n.value})}},(n=o.steps)===null||n===void 0?void 0:n.map((function(e){var s,n;return a("sl-menu-item",{value:e,disabled:!e.available,class:h.classes.SelectItem},e.prettyDestinationValue,a("br",null),a("div",{class:"step-cost",slot:"suffix"},e.prettySourceValue,e.unavailableReasonCode&&a("p",{class:"step-unavailable"},t.formatMessage({id:"unavailableCode",defaultMessage:(n=(s=i.content)===null||s===void 0?void 0:s.text)===null||n===void 0?void 0:n.notAvailableError},{unavailableReasonCode:e.unavailableReasonCode,sourceUnit:o.sourceUnit,sourceValue:e.prettySourceValue||o.prettySourceMinValue}))))})))}function _(){var e;return[a("div",{part:"choose-reward-container"},a("div",{class:h.classes.Title},i.content.text.rewardTitle),i.loading||i.queryError?R():a("div",{class:h.classes.Grid},(e=n.exchangeList)===null||e===void 0?void 0:e.map((function(e){var n,o,l,u,g;var p={boxShadow:e.key===(c===null||c===void 0?void 0:c.key)?"0 0 0 2px var(--sqm-primary-color)":"none",borderRadius:"var(--sqm-border-radius-normal)",borderColor:"none"};return a("div",{key:e.key,style:p},a("sl-card",{exportparts:"base: exchange-card-container",class:h.classes.Card,style:{cursor:e.unavailableReasonCode?"not-allowed":"pointer"},onClick:function(){return e.available&&r.setExchangeState({selectedItem:e})}},e.key===(c===null||c===void 0?void 0:c.key)&&a("div",{class:"selected"},a(d,null)),a("div",{style:{display:"flex",width:"100%",height:"120px",borderRadius:"3px",background:e.unavailableReasonCode?"rgba(0, 0, 0, 0.05)":"rgba(0, 0, 0, 0)"}},a("div",{class:h.classes.Image,style:{opacity:e.unavailableReasonCode?"0.5":"1"}},a("img",{class:e.unavailableReasonCode?"image subdued":"image",src:(e===null||e===void 0?void 0:e.imageUrl)||s("./assets/Reward-image.png")})),a("div",{class:h.classes.TextArea,style:{opacity:e.unavailableReasonCode?"0.5":"1"}},a("div",{class:"title",style:{"-webkit-line-clamp":e.unavailableReasonCode?"1":"2"}},(n=e.name)!==null&&n!==void 0?n:""),a("div",{class:"amount",style:{"-webkit-line-clamp":e.unavailableReasonCode?"1":"2"}},t.formatMessage({id:"sourceAmountMessage",defaultMessage:(l=(o=i.content)===null||o===void 0?void 0:o.text)===null||l===void 0?void 0:l.sourceAmountMessage},{ruleType:e.ruleType,sourceValue:e.prettySourceValue,sourceMinValue:e.prettySourceMinValue,sourceMaxValue:e.prettySourceMaxValue})),e.unavailableReasonCode&&a("div",{class:"error"},a("sl-icon",{class:"icon",name:"exclamation-triangle-fill"}),t.formatMessage({id:"unavailableCode",defaultMessage:(g=(u=i.content)===null||u===void 0?void 0:u.text)===null||g===void 0?void 0:g.notAvailableError},{unavailableReasonCode:e.unavailableReasonCode,sourceUnit:e.sourceUnit,sourceValue:e.prettySourceValue||e.prettySourceMinValue}))))))}))),a("div",{class:h.classes.Button},a("sl-button",{exportparts:"base: primarybutton-base",type:"primary",class:"continue right",size:"large",onClick:function(){return r.setStage("chooseAmount")},loading:i.loading,disabled:!i.selectedItem},i.content.text.continueText)))]}function y(){var e,t,n,o;var l=m();var d=((e=i.selectedItem)===null||e===void 0?void 0:e.ruleType)==="FIXED_GLOBAL_REWARD"?false:l&&!i.amount;return a("div",null,a("div",{class:h.classes.ChooseAmount,part:"choose-amount-container"},a("div",{class:"wrapper"},a("img",{class:"image",src:(c===null||c===void 0?void 0:c.imageUrl)||s("./assets/Reward-image.png")}),a("div",{class:"text"},a("div",{class:"title"},(t=c===null||c===void 0?void 0:c.name)!==null&&t!==void 0?t:""),((n=i.selectedItem)===null||n===void 0?void 0:n.ruleType)==="FIXED_GLOBAL_REWARD"?a("div",{class:"points"},l):a("div",{class:"description"},c===null||c===void 0?void 0:c.description),((o=i.selectedItem)===null||o===void 0?void 0:o.ruleType)==="FIXED_GLOBAL_REWARD"?a("div",{class:"description"},c===null||c===void 0?void 0:c.description):a("div",null,l),a("div",{class:"space"}))),a("div",{class:h.classes.Button},a("sl-button",{exportparts:"base: secondarybutton-base",class:"cancel",size:"large",type:"secondary",onClick:function(){return r.resetState()}},i.content.text.cancelText),a("sl-button",{exportparts:"base: primarybutton-base",class:"continue",size:"large",type:"primary",onClick:function(){return r.setStage("confirmation")},disabled:d},i.content.text.continueToConfirmationText))))}function b(){var e=(g===null||g===void 0?void 0:g.prettySourceValue)||c.prettySourceValue;var t=g===null||g===void 0?void 0:g.prettyDestinationValue;return a("div",null,a("div",{class:h.classes.Confirmation,part:"confirmation-container"},a("div",{class:h.classes.Title},i.content.text.redeemTitle),a("div",{class:"wrapper"},a("div",{class:"field"},i.content.text.rewardNameTitle),a("div",{class:"reward-item-container"},a("div",{class:"reward-title"},c.name),a("img",{class:"image",src:(c===null||c===void 0?void 0:c.imageUrl)||s("./assets/Reward-image.png")}))),a("div",{class:"wrapper padding"},a("div",{class:"field"})),t&&a("div",{class:"wrapper top-border padding"},a("div",{class:"field"},i.content.text.rewardAmountTitle),a("div",null,t)),a("div",{class:"wrapper top-border padding"},a("div",{class:"field"},i.content.text.costTitle),a("div",{class:"value"},e)),a("div",{class:h.classes.Button},a("sl-button",{class:"cancel",type:"secondary",size:"large",onClick:function(){return r.setStage("chooseAmount")}},i.content.text.backText),a("sl-button",{class:"continue",size:"large",type:"primary",loading:i.loading,onClick:r.exchangeReward},i.content.text.redeemText))))}function w(){var e,s,l,c,d,g;return a("div",{class:h.classes.Success,part:"success-container"},a(u,null),a(V,null),a("div",{class:"title"},(e=i.content.text)===null||e===void 0?void 0:e.rewardRedeemedText),a("div",{class:"description"},t.formatMessage({id:"successMessage",defaultMessage:i.content.text.redemptionSuccessText},{sourceValue:(s=i.selectedItem.prettySourceValue)!==null&&s!==void 0?s:(l=i.selectedStep)===null||l===void 0?void 0:l.prettySourceValue,destinationValue:((c=i.selectedStep)===null||c===void 0?void 0:c.prettyDestinationValue)||((d=i.selectedItem)===null||d===void 0?void 0:d.name)||i.selectedItem.globalRewardKey})),(n===null||n===void 0?void 0:n.fuelTankCode)&&a("div",{class:"promo"},i.content.text.promoCode,a(o,{copyString:n.fuelTankCode,tooltiptext:(g=i===null||i===void 0?void 0:i.content)===null||g===void 0?void 0:g.text.tooltipText,open:i.open,onClick:r.copyFuelTankCode})),a("div",{class:h.classes.Button},a("sl-button",{class:"continue center",type:"primary",size:"large",onClick:function(){return r.resetState(true)}},i.content.text.doneText)))}var S={chooseReward:function(){return _()},chooseAmount:function(){return y()},confirmation:function(){return b()},success:function(){return w()}};var q=S[i.redeemStage];function C(){var e=x.indexOf(i.redeemStage);return a("div",{class:h.classes.ProgressBar},a("div",{class:"text-area"},Object.keys(p).map((function(s){if(x.indexOf(s)<=e){return a("span",{class:"text"},p[s])}else{return a("span",{class:"text subdued"},p[s])}}))),a(v,{stageCount:3,currentStage:e}))}function R(){return a("div",{class:h.classes.Grid,part:"loading-container"},__spreadArrays(Array(i.content.text.skeletonCardNum)).map((function(){return a("div",null,a("sl-card",{class:h.classes.Card},a("div",{class:h.classes.CardLayout},a("div",null,a("sl-skeleton",{style:{width:"100px",height:"100px",margin:"9px","--border-radius":"var(--sqm-border-radius-normal)"}})),a("div",{style:{margin:"var(--sl-spacing-small) var(--sl-spacing-small) 0 0",width:"100%"}},a("sl-skeleton",{style:{marginBottom:"var(--sl-spacing-small)"}}),a("sl-skeleton",{style:{marginBottom:"var(--sl-spacing-small)"}}),a("sl-skeleton",{style:{width:"45%"}})))))})))}function E(){return a("sl-alert",{type:"danger",open:true},a("sl-icon",{slot:"icon",name:"exclamation-octagon"}),i.content.text.redemptionError)}function T(){return a("sl-alert",{type:"danger",open:true},a("sl-icon",{slot:"icon",name:"exclamation-octagon"}),i.content.text.queryError)}function V(){return a("canvas",{ref:function(e){if(!(l===null||l===void 0?void 0:l.canvasRef))return;l.canvasRef.current=e},id:"my-canvas",class:h.classes.Confetti})}if(i.noExchangeOptions)return i.content.text.empty;return a("div",{class:h.classes.Container,part:"sqm-base"},a("style",{type:"text/css"},f),a("div",null,C(),i.exchangeError&&E(),i.queryError&&!i.exchangeError&&T(),q&&q(),i.redeemStage==="success"))}var b=function(e,s,t,i,n,o,r,l,c){if(s===void 0){s="chooseReward"}if(t===void 0){t=null}if(i===void 0){i=null}if(n===void 0){n=false}if(o===void 0){o=false}if(r===void 0){r=null}if(l===void 0){l=false}if(c===void 0){c=false}return{states:{content:{text:{notAvailableError:"{unavailableReasonCode, select, NOT_CHAMPION {CUSTOM ERROR MESSAGE } US_TAX {Exceeds tax limit for this year} INSUFFICIENT_REDEEMABLE_CREDIT {{sourceValue} required} AVAILABILITY_PREDICATE {Not available} other {unavailableReasonCode} }",chooseRewardTitle:"Rewards",chooseAmountTitle:"Select",confirmationTitle:"Confirm",rewardTitle:"Choose a reward",cancelText:"Cancel",backText:"Back",continueText:"Continue",continueToConfirmationText:"Continue to confirmation",redeemText:"Redeem",redeemTitle:"Confirm and redeem",redemptionSuccessText:"Redeemed {sourceValue} for {destinationValue}",doneText:"Done",tooltipText:"Copied!",selectText:"Select amount to receive",sourceAmountMessage:"{ruleType, select, FIXED_GLOBAL_REWARD {{sourceValue}} other {{sourceMinValue} to {sourceMaxValue}}}",rewardRedeemedText:"Reward redeemed",redemptionError:"An error occured trying to redeem this reward. Please try again",queryError:"Unable to load reward exchange list. Please try again",promoCode:"Promo code",skeletonCardNum:8,rewardNameTitle:"Reward Name",rewardAmountTitle:"Reward Amount",costTitle:"Cost",notEnoughError:"Sorry not enough!",empty:a("sqm-empty",{emptyStateImage:"https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_exchange2.png",emptyStateHeader:"Redeem rewards",emptyStateText:"Use your points to redeem rewards once they become available"})}},queryError:c,redeemStage:s,amount:0,exchangeError:n,loading:o,selectedItem:t,selectedStep:i,noExchangeOptions:l,open:false},data:{exchangeList:e,fuelTankCode:r},callbacks:{exchangeReward:null,resetState:null,setStage:null,setExchangeState:null,copyFuelTankCode:null},refs:null}};var w={key:"reward",name:"Demo Reward",description:"Description of reward. Lorem ipsum dolor sit amet, consectetur adipiscing. Id nec semper sapien dignissim rhoncus nunc.",imageUrl:"https://res.cloudinary.com/saasquatch/image/upload/v1643653103/squatch-assets/default_rewards_1.png",available:true,unavailableReasonCode:null,ruleType:"FIXED_GLOBAL_REWARD",sourceUnit:"POINT",sourceValue:10,prettySourceValue:"10 SaaSquatch Points",sourceMinValue:null,prettySourceMinValue:null,sourceMaxValue:null,prettySourceMaxValue:null,destinationMinValue:null,prettyDestinationMinValue:null,destinationMaxValue:null,prettyDestinationMaxValue:null,globalRewardKey:"",destinationUnit:null,steps:[{prettyDestinationValue:"Reward Step 1",prettySourceValue:"50 Points",available:true,unavailableReasonCode:null,destinationValue:10,sourceValue:1,globalRewardKey:"reward1",rewardInput:{accountId:"zach",userId:"zach"}},{prettyDestinationValue:"Reward Step 2",prettySourceValue:"100 Points",available:false,unavailableReasonCode:"Not enough points",destinationValue:10,sourceValue:1,globalRewardKey:"reward1",rewardInput:{accountId:"zach",userId:"zach"}}]};var S={available:false,unavailableReasonCode:"INSUFFICIENT_REDEEMABLE_CREDIT"};var q={available:false,unavailableReasonCode:"US_TAX"};var C={available:false,unavailableReasonCode:"NOT_CHAMPION"};var R={key:"r1"};var E=function(e){return{imageUrl:e}};var T=function(e){return{name:e}};var V=function(e){return{description:e}};var A=function(e){return{prettySourceValue:e}};var P=function(e,a,s){return{ruleType:"VARIABLE_CREDIT_REWARD",sourceMinValue:e,prettySourceMinValue:e+" "+s,sourceMaxValue:a,prettySourceMaxValue:a+" "+s}};var k=[__assign(__assign(__assign(__assign({},w),T("Free swag with a promo code")),E("https://res.cloudinary.com/saasquatch/image/upload/v1643653103/squatch-assets/default_rewards_1.png")),A("40 Points")),__assign(__assign(__assign(__assign(__assign({},w),R),T("Visa® Prepaid Card USD")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000268/squatch-assets/veHErQX.png")),P(20,80,"Points")),__assign(__assign(__assign(__assign({},w),T("$50 Store credit")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000270/squatch-assets/WkCMVSE.png")),A("100 Points")),__assign(__assign(__assign(__assign({},w),T("Variable amount of store credit")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000240/squatch-assets/Jn2fE0s.png")),P(20,100,"Points"))];var I=[__assign(__assign(__assign(__assign({},w),T("Free swag with a promo code")),E("https://res.cloudinary.com/saasquatch/image/upload/v1643653103/squatch-assets/default_rewards_1.png")),A("40 SaaSquatch Points")),__assign(__assign(__assign(__assign(__assign({},w),R),T("Visa® Prepaid Card USD")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000268/squatch-assets/veHErQX.png")),P(20,80,"Points")),__assign(__assign(__assign(__assign({},w),T("A very exclusive gift box")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000223/squatch-assets/93BvEgH.png")),A("30 SaaSquatch Points")),__assign(__assign(__assign(__assign({},w),T("$50 Store credit")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000270/squatch-assets/WkCMVSE.png")),A("100 SaaSquatch Points")),__assign(__assign(__assign(__assign({},w),T("Variable amount of store credit")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000240/squatch-assets/Jn2fE0s.png")),P(20,100,"Points")),__assign(__assign(__assign(__assign(__assign({},w),S),T("A very rare cactus")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000224/squatch-assets/hhlF2Ey.png")),A("2000 SaaSquatch Points")),__assign(__assign(__assign(__assign(__assign({},w),q),T("$1000 Store credit with a really super long name in the front page")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000273/squatch-assets/y9HSls1.png")),A("2000 SaaSquatch Long Points")),__assign(__assign(__assign(__assign(__assign({},w),S),T("A holiday gift box")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000223/squatch-assets/dWEdB3p.png")),A("100 SaaSquatch Points"))];var M=e("r",__assign({},b(I)));var D=e("p",__assign({},b(k)));var L=e("b",__assign({},b(__spreadArrays([__assign(__assign(__assign(__assign(__assign({},w),S),T("Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt ratione a itaque non obcaecati iste, amet repudiandae at consequatur adipisci culpa nam, incidunt exercitationem aliquid.")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000223/squatch-assets/dWEdB3p.png")),A("Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt ratione a itaque non obcaecati iste, amet repudiandae at consequatur adipisci culpa nam, incidunt exercitationem aliquid.")),__assign(__assign(__assign(__assign({},w),T("Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt ratione a itaque non obcaecati iste, amet repudiandae at consequatur adipisci culpa nam, incidunt exercitationem aliquid.")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000273/squatch-assets/y9HSls1.png")),A("Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt ratione a itaque non obcaecati iste, amet repudiandae at consequatur adipisci culpa nam, incidunt exercitationem aliquid.")),__assign(__assign(__assign(__assign({},w),T("Suuuuuuuuper aweeeeesssssoooommme reward!!!!!!")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000270/squatch-assets/WkCMVSE.png")),A("Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt ratione a itaque non obcaecati iste, amet repudiandae at consequatur adipisci culpa nam, incidunt exercitationem aliquid."))],I))));var B=e("a",__assign({},b(__spreadArrays([__assign(__assign(__assign(__assign(__assign({},w),C),T("A very rare cactus")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000224/squatch-assets/hhlF2Ey.png")),A("2000 SaaSquatch Points"))],I))));var F=e("c",__assign({},b(I,"chooseReward",__assign(__assign(__assign(__assign(__assign({},w),R),T("Visa® Prepaid Card USD")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000268/squatch-assets/veHErQX.png")),P(20,80,"Points")))));var U=function(e,a,s){var t=[];for(var i=e;i<=a;i+=s){t.push({sourceValue:i,prettySourceValue:i+" SaaSquatch Points",destinationValue:i,prettyDestinationValue:"$"+i,available:true,unavailableReasonCode:null})}return t};var z=function(e,a,s,t,i,n){if(i===void 0){i=true}if(n===void 0){n=null}return{destinationValue:e,prettyDestinationValue:a+e,sourceValue:s,prettySourceValue:s+" "+t,available:i,unavailableReasonCode:n}};var H=e("f",__assign({},b(I,"chooseAmount",__assign(__assign(__assign(__assign(__assign({},w),T("Visa® Prepaid Card USD")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000268/squatch-assets/veHErQX.png")),P(20,80,"Points")),{steps:[z(20,"$",40,"Points"),z(30,"$",60,"Points"),z(40,"$",80,"Points"),z(50,"$",100,"Points"),z(60,"$",120,"Points")]}))));var W=e("g",__assign({},b(I,"chooseAmount",__assign(__assign(__assign(__assign(__assign(__assign({},w),T("Visa® Prepaid Card USD")),V("")),E("https://i.imgur.com/veHErQX.png")),P(20,80,"Points")),{steps:[z(20,"$",40,"Points"),z(30,"$",60,"Points"),z(40,"$",80,"Points"),z(50,"$",100,"Points"),z(60,"$",120,"Points")]}))));var $=e("h",__assign({},b(I,"chooseAmount",__assign(__assign(__assign(__assign(__assign({},w),T("Visa® Prepaid Card USD")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000268/squatch-assets/veHErQX.png")),P(20,80,"Points")),{steps:[z(20,"$",40,"Points"),z(30,"$",60,"Points"),z(40,"$",80,"Points",false,"INSUFFICIENT_REDEEMABLE_CREDIT"),z(50,"$",100,"Points",false,"INSUFFICIENT_REDEEMABLE_CREDIT"),z(60,"$",120,"Points",false,"INSUFFICIENT_REDEEMABLE_CREDIT")]}))));var N=e("i",__assign({},b(I,"chooseAmount",__assign(__assign(__assign(__assign(__assign({},w),T("Visa® Prepaid Card USD")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000268/squatch-assets/veHErQX.png")),P(20,80,"Points")),{steps:[z(20,"$",40,"Points"),z(30,"$",60,"Points"),z(40,"$",80,"Points",false,"US_TAX"),z(50,"$",100,"Points",false,"US_TAX"),z(60,"$",120,"Points",false,"US_TAX")]}))));var O=e("d",__assign({},b(I,"chooseAmount",__assign(__assign(__assign(__assign({},w),T("Free swag with a promo code")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000252/squatch-assets/n7vC4BR.png")),A("40 SaaSquatch Points")))));var Z=e("e",__assign({},b(I,"chooseAmount",__assign(__assign(__assign(__assign(__assign({},w),V("")),T("Free swag with a promo code")),E("https://i.imgur.com/n7vC4BR.png")),A("40 SaaSquatch Points")))));var X=e("j",__assign({},b(I,"confirmation",__assign(__assign(__assign(__assign({},w),T("Free swag with a promo code")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000252/squatch-assets/n7vC4BR.png")),A("40 SaaSquatch Points")))));var j=e("k",__assign({},b(I,"confirmation",__assign(__assign(__assign(__assign({},w),T("Visa® Prepaid Card USD")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000268/squatch-assets/veHErQX.png")),P(20,80,"Points")),z(20,"$",40,"Points"))));var G=e("l",__assign({},b(I,"confirmation",__assign(__assign(__assign(__assign({},w),T("Visa® Prepaid Card USD")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000268/squatch-assets/veHErQX.png")),P(20,80,"Points")),z(20,"$",40,"Points"),true)));var Q=e("q",__assign({},b(undefined,"chooseReward",undefined,undefined,undefined,undefined,undefined,undefined,true)));var K=e("s",__assign({},b(I,"success",__assign(__assign(__assign(__assign({},w),T("Free swag with a promo code")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000252/squatch-assets/n7vC4BR.png")),A("40 SaaSquatch Points")),undefined,undefined,undefined,"4ah2-hh46-gk7r")));var J=e("m",__assign({},b(I,"success",__assign(__assign(__assign(__assign({},w),T("Visa® Prepaid Card USD")),E("https://res.cloudinary.com/saasquatch/image/upload/v1644000223/squatch-assets/93BvEgH.png")),P(20,80,"Points")),z(20,"$",40,"Points"))));var Y=e("n",__assign({},b(null,"chooseReward",null,null,false,true)));var ee=e("o",__assign({},b(null,"chooseReward",null,null,false,false,null,true)))}}}));
@@ -1,119 +0,0 @@
1
- import { h } from './index-bfb7f924.js';
2
- import { c as createStyleSheet } from './JSS-8c381d8b.js';
3
- import { H as HostBlock } from './mixins-acc245cc.js';
4
-
5
- const vanillaStyle = `
6
- :host{
7
- display: block;
8
- width: 100%;
9
- }
10
- `;
11
- const textAlignStyle = {
12
- right: `
13
- sl-input::part(input){
14
- text-align: right;
15
- }`,
16
- center: `
17
- sl-input::part(input){
18
- text-align: center;
19
- }`,
20
- left: ``,
21
- };
22
- const disabledStyles = `
23
- sl-input::part(input){
24
- cursor: default;
25
- }
26
- `;
27
- function CopyTextView(props) {
28
- const { buttonStyle = "icon" } = props;
29
- const style = {
30
- HostBlock: HostBlock,
31
- inputStyle: {
32
- "&::part(input)": {
33
- textOverflow: "ellipsis",
34
- width: "100%",
35
- },
36
- "&::part(base)": {
37
- "--sl-input-border-radius": `${props.borderRadius}px` || "var(--sqm-border-radius-normal)",
38
- "--sl-input-background-color": props.backgroundColor || "var(--sqm-portal-background)",
39
- "--sl-input-color": props.textColor || "var(--sqm-input-color)",
40
- "--sl-input-border-color": "var(--sqm-border-color)",
41
- "--sl-input-border-color-hover": "#999999",
42
- "--sl-input-border-color-focus": "#999999",
43
- "--sl-input-color-hover": "var(--sqm-input-color-hover)",
44
- "--sl-input-color-focus": "var(--sqm-input-color-focus)",
45
- "--sl-input-color-disabled": "var(--sqm-input-disabled-color)",
46
- "--sl-input-background-color-focus": "var(--sqm-portal-background)",
47
- "--sl-input-background-color-hover": "var(--sqm-portal-background)",
48
- cursor: "pointer",
49
- overflow: "visible",
50
- borderRadius: `${props.borderRadius}px` || "var(--sqm-border-radius-normal)",
51
- background: props.backgroundColor || "var(--sqm-portal-background)",
52
- border: `var(--sqm-border-thickness) solid ${props.borderColor || "var(--sqm-input-border-color)"}`,
53
- },
54
- width: "100%",
55
- },
56
- icon: {
57
- "&::part(base)": {
58
- color: props.textColor || "var(--sqm-input-color)",
59
- },
60
- },
61
- inputErrorStyle: {
62
- "&::part(base)": {
63
- border: "2px solid red",
64
- },
65
- },
66
- ContainerDiv: {
67
- display: "flex",
68
- alignItems: "flex-start",
69
- flexDirection: "column",
70
- justifyContent: "center",
71
- gap: "var(--sl-spacing-x-small)",
72
- width: "100%",
73
- },
74
- containerStyle: {
75
- display: "flex",
76
- alignItems: "center",
77
- gap: "var(--sl-spacing-x-small)",
78
- width: "100%",
79
- },
80
- errorTextStyle: {
81
- margin: "0",
82
- color: "var(--sqm-danger-color-text)",
83
- },
84
- notificationTextStyle: {
85
- margin: "0",
86
- color: "inherit",
87
- },
88
- };
89
- const sheet = createStyleSheet(style);
90
- const styleString = sheet.toString();
91
- const error = !props.loading && props.error;
92
- const inputText = error ? props.inputPlaceholderText : props.copyString;
93
- const disabled = error || props.loading || props.disabled;
94
- const tooltipPlacement = props.buttonStyle === "button-below"
95
- ? "bottom"
96
- : props.buttonStyle === "button-outside"
97
- ? "top"
98
- : "top-end";
99
- const copyButton = (h("sl-tooltip", { trigger: "manual", content: props.tooltiptext, placement: tooltipPlacement, disabled: props.disabled, open: props.open, skidding: props.buttonStyle === "icon" ? -5 : 0, slot: "suffix" }, buttonStyle === "icon" ? (h("sl-icon-button", { class: sheet.classes.icon, exportparts: "base: icon-button-base", onClick: () => { var _a; return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props); }, name: "files", disabled: disabled })) : (h("sl-button", { exportparts: `base: ${props.buttonType || "primary"}button-base`, onClick: () => { var _a; return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props); }, size: "medium", style: { width: `${buttonStyle === "button-below" && "100%"}` }, disabled: disabled, type: "primary" }, props.copyButtonLabel || "Copy"))));
100
- return (h("div", { class: sheet.classes.ContainerDiv },
101
- h("style", { type: "text/css" },
102
- styleString,
103
- vanillaStyle,
104
- textAlignStyle[props.textAlign],
105
- disabled && disabledStyles),
106
- h("div", { class: sheet.classes.containerStyle, style: {
107
- flexDirection: `${buttonStyle === "button-below" ? "column" : "row"}`,
108
- } },
109
- h("sl-input", { class: `${sheet.classes.inputStyle} ${error ? sheet.classes.inputErrorStyle : ""}`, exportparts: "base: input-base, input: input-field", value: props.loading ? "Loading..." : inputText, readonly: true, disabled: disabled },
110
- buttonStyle === "icon" && copyButton,
111
- error && (h("p", { slot: "help-text", class: sheet.classes.errorTextStyle }, props.errorText))),
112
- (buttonStyle === "button-outside" || buttonStyle === "button-below") &&
113
- copyButton),
114
- props.isCopied &&
115
- props.showNotificationText &&
116
- props.notificationText && (h("p", { part: "sqm-notification-text", class: sheet.classes.notificationTextStyle }, props.notificationText))));
117
- }
118
-
119
- export { CopyTextView as C };
@@ -1 +0,0 @@
1
- System.register(["./index-bfed5e90.system.js","./JSS-840a8fea.system.js","./mixins-8c4521b7.system.js"],(function(t){"use strict";var o,r,n;return{setters:[function(t){o=t.h},function(t){r=t.c},function(t){n=t.H}],execute:function(){t("C",s);var e="\n :host{\n display: block; \n width: 100%;\n }\n";var i={right:"\nsl-input::part(input){\n text-align: right;\n}",center:" \nsl-input::part(input){\n text-align: center;\n}",left:""};var l="\n sl-input::part(input){\n cursor: default;\n }\n";function s(t){var s=t.buttonStyle,a=s===void 0?"icon":s;var c={HostBlock:n,inputStyle:{"&::part(input)":{textOverflow:"ellipsis",width:"100%"},"&::part(base)":{"--sl-input-border-radius":t.borderRadius+"px"||"var(--sqm-border-radius-normal)","--sl-input-background-color":t.backgroundColor||"var(--sqm-portal-background)","--sl-input-color":t.textColor||"var(--sqm-input-color)","--sl-input-border-color":"var(--sqm-border-color)","--sl-input-border-color-hover":"#999999","--sl-input-border-color-focus":"#999999","--sl-input-color-hover":"var(--sqm-input-color-hover)","--sl-input-color-focus":"var(--sqm-input-color-focus)","--sl-input-color-disabled":"var(--sqm-input-disabled-color)","--sl-input-background-color-focus":"var(--sqm-portal-background)","--sl-input-background-color-hover":"var(--sqm-portal-background)",cursor:"pointer",overflow:"visible",borderRadius:t.borderRadius+"px"||"var(--sqm-border-radius-normal)",background:t.backgroundColor||"var(--sqm-portal-background)",border:"var(--sqm-border-thickness) solid "+(t.borderColor||"var(--sqm-input-border-color)")},width:"100%"},icon:{"&::part(base)":{color:t.textColor||"var(--sqm-input-color)"}},inputErrorStyle:{"&::part(base)":{border:"2px solid red"}},ContainerDiv:{display:"flex",alignItems:"flex-start",flexDirection:"column",justifyContent:"center",gap:"var(--sl-spacing-x-small)",width:"100%"},containerStyle:{display:"flex",alignItems:"center",gap:"var(--sl-spacing-x-small)",width:"100%"},errorTextStyle:{margin:"0",color:"var(--sqm-danger-color-text)"},notificationTextStyle:{margin:"0",color:"inherit"}};var u=r(c);var d=u.toString();var p=!t.loading&&t.error;var b=p?t.inputPlaceholderText:t.copyString;var v=p||t.loading||t.disabled;var m=t.buttonStyle==="button-below"?"bottom":t.buttonStyle==="button-outside"?"top":"top-end";var x=o("sl-tooltip",{trigger:"manual",content:t.tooltiptext,placement:m,disabled:t.disabled,open:t.open,skidding:t.buttonStyle==="icon"?-5:0,slot:"suffix"},a==="icon"?o("sl-icon-button",{class:u.classes.icon,exportparts:"base: icon-button-base",onClick:function(){var o;return(o=t.onClick)===null||o===void 0?void 0:o.call(t)},name:"files",disabled:v}):o("sl-button",{exportparts:"base: "+(t.buttonType||"primary")+"button-base",onClick:function(){var o;return(o=t.onClick)===null||o===void 0?void 0:o.call(t)},size:"medium",style:{width:""+(a==="button-below"&&"100%")},disabled:v,type:"primary"},t.copyButtonLabel||"Copy"));return o("div",{class:u.classes.ContainerDiv},o("style",{type:"text/css"},d,e,i[t.textAlign],v&&l),o("div",{class:u.classes.containerStyle,style:{flexDirection:""+(a==="button-below"?"column":"row")}},o("sl-input",{class:u.classes.inputStyle+" "+(p?u.classes.inputErrorStyle:""),exportparts:"base: input-base, input: input-field",value:t.loading?"Loading...":b,readonly:true,disabled:v},a==="icon"&&x,p&&o("p",{slot:"help-text",class:u.classes.errorTextStyle},t.errorText)),(a==="button-outside"||a==="button-below")&&x),t.isCopied&&t.showNotificationText&&t.notificationText&&o("p",{part:"sqm-notification-text",class:u.classes.notificationTextStyle},t.notificationText))}}}}));
@@ -1 +0,0 @@
1
- System.register(["./index-bfed5e90.system.js","./JSS-840a8fea.system.js","./mixins-8c4521b7.system.js","./copy-text-view-33cac657.system.js"],(function(e){"use strict";var t,s,r,n;return{setters:[function(e){t=e.h},function(e){s=e.c},function(e){r=e.H},function(e){n=e.C}],execute:function(){e("C",o);function o(e){var o=!e.loading&&e.error;var a={HostBlock:r,couponCodeLabel:{margin:"var(--sl-spacing-x-small) 0",color:e.textColor||"var(--sqm-text-subdued)",fontSize:"var(--sl-font-size-small)"}};var i="\n :host{\n display: block; \n width: 100%;\n }\n";var c=s(a);var l=c.toString();return t("div",null,t("style",{type:"text/css"},l,i),t("p",{class:c.classes.couponCodeLabel,style:{textAlign:e.textAlign}},e.couponCodeLabel),o?t("sqm-form-message",{type:e.errorType,exportparts:"erroralert-icon"},t("div",{part:"erroralert-text"},e.errorText)):t(n,Object.assign({},e)))}}}}));
@@ -1,33 +0,0 @@
1
- import { h } from './index-bfb7f924.js';
2
- import { c as createStyleSheet } from './JSS-8c381d8b.js';
3
- import { H as HostBlock } from './mixins-acc245cc.js';
4
- import { C as CopyTextView } from './copy-text-view-3129fb22.js';
5
-
6
- function CouponCodeView(props) {
7
- const error = !props.loading && props.error;
8
- const style = {
9
- HostBlock: HostBlock,
10
- couponCodeLabel: {
11
- margin: "var(--sl-spacing-x-small) 0",
12
- color: props.textColor || "var(--sqm-text-subdued)",
13
- fontSize: "var(--sl-font-size-small)",
14
- },
15
- };
16
- const vanillaStyle = `
17
- :host{
18
- display: block;
19
- width: 100%;
20
- }
21
- `;
22
- const sheet = createStyleSheet(style);
23
- const styleString = sheet.toString();
24
- return (h("div", null,
25
- h("style", { type: "text/css" },
26
- styleString,
27
- vanillaStyle),
28
- h("p", { class: sheet.classes.couponCodeLabel, style: { textAlign: props.textAlign } }, props.couponCodeLabel),
29
- error ? (h("sqm-form-message", { type: props.errorType, exportparts: "erroralert-icon" },
30
- h("div", { part: "erroralert-text" }, props.errorText))) : (h(CopyTextView, Object.assign({}, props)))));
31
- }
32
-
33
- export { CouponCodeView as C };
@@ -1,281 +0,0 @@
1
- import { r as registerInstance, h as h$1 } from './index-bfb7f924.js';
2
- import { i as useState, o as h } from './dom-context-hooks.module-01c1b885.js';
3
- import { d as dist, J, H, B, $ as $e, w as wn, i as isDemo } from './index.module-83586215.js';
4
- import './jss-preset-default.esm-c36417f8.js';
5
- import './JSS-8c381d8b.js';
6
- import './mixins-acc245cc.js';
7
- import { g as getProps } from './utils-93e14db3.js';
8
- import { c as cjs } from './cjs-e829b75b.js';
9
- import './copy-text-view-3129fb22.js';
10
- import { C as CouponCodeView } from './sqm-coupon-code-view-af016712.js';
11
-
12
- const FuelTankRewardsQuery = dist.gql `
13
- query fuelTankRewardsQuery($programId: ID!) {
14
- user: viewer {
15
- ... on User {
16
- instantAccessRewards(
17
- filter: { type_eq: FUELTANK, programId_eq: $programId }
18
- ) {
19
- data {
20
- fuelTankCode
21
- fuelTankType
22
- statuses
23
- dateGiven
24
- dateExpires
25
- dateRedeemed
26
- dateCancelled
27
- dateScheduledFor
28
- datePendingForUnhandledError
29
- }
30
- count
31
- totalCount
32
- }
33
- }
34
- }
35
- }
36
- `;
37
- const WIDGET_ENGAGEMENT_EVENT = dist.gql `
38
- mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
39
- createUserAnalyticsEvent(eventMeta: $eventMeta)
40
- }
41
- `;
42
- function useCouponCode(props) {
43
- var _a, _b, _c;
44
- const user = J();
45
- const programId = H();
46
- const engagementMedium = B();
47
- const [sendLoadEvent] = $e(WIDGET_ENGAGEMENT_EVENT);
48
- const { data, loading, refetch, errors } = wn(FuelTankRewardsQuery, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt));
49
- const getStatus = (reward) => {
50
- if (!reward || !reward.statuses)
51
- return "ERROR";
52
- const state = reward.statuses[reward.statuses.length - 1];
53
- if (state === "PENDING" && reward.dateScheduledFor === null)
54
- return "EMPTY_TANK";
55
- return state;
56
- };
57
- const reward = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.instantAccessRewards) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c[0];
58
- const rewardStatus = getStatus(reward);
59
- const dateAvailable = rewardStatus === "PENDING" && reward.dateScheduledFor
60
- ? new Date(reward.dateScheduledFor).toLocaleDateString("default", {
61
- day: "numeric",
62
- month: "long",
63
- year: "numeric",
64
- })
65
- : undefined;
66
- const copyString = (reward === null || reward === void 0 ? void 0 : reward.fuelTankCode) || "...";
67
- const [open, setOpen] = useState(false);
68
- function onClick() {
69
- // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
70
- // Only if called from a user-initiated event
71
- navigator.clipboard.writeText(copyString);
72
- setOpen(true);
73
- setTimeout(() => setOpen(false), props.tooltiplifespan);
74
- sendLoadEvent({
75
- eventMeta: {
76
- programId,
77
- id: user === null || user === void 0 ? void 0 : user.id,
78
- accountId: user === null || user === void 0 ? void 0 : user.accountId,
79
- type: "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",
80
- meta: {
81
- engagementMedium,
82
- shareMedium: "DIRECT",
83
- },
84
- },
85
- });
86
- }
87
- const getRewardStatusText = (status) => {
88
- switch (status) {
89
- case "CANCELLED":
90
- return props.cancelledErrorText;
91
- case "EXPIRED":
92
- return props.expiredErrorText;
93
- case "EMPTY_TANK":
94
- return props.fullfillmentErrorText;
95
- case "PENDING":
96
- return props.pendingErrorText.replace("{unpendDate}", dateAvailable);
97
- case "REDEEMED":
98
- return props.redeemedErrorText;
99
- case "AVAILABLE":
100
- return "";
101
- default:
102
- return props.genericErrorText;
103
- }
104
- };
105
- const getRewardStatusErrorType = (status) => {
106
- switch (status) {
107
- case "EXPIRED":
108
- case "EMPTY_TANK":
109
- case "CANCELLED":
110
- case "ERROR":
111
- return "warning";
112
- case "PENDING":
113
- return "info";
114
- case "REDEEMED":
115
- return "success";
116
- default:
117
- return;
118
- }
119
- };
120
- const errorText = getRewardStatusText(rewardStatus);
121
- const errorType = getRewardStatusErrorType(rewardStatus);
122
- const error = rewardStatus !== "AVAILABLE";
123
- return {
124
- ...props,
125
- onClick,
126
- open,
127
- copyString,
128
- error,
129
- errorText,
130
- dateAvailable,
131
- loading,
132
- errorType,
133
- buttonType: props.buttonType || "primary",
134
- };
135
- }
136
-
137
- const CouponCode = class {
138
- constructor(hostRef) {
139
- registerInstance(this, hostRef);
140
- /**
141
- * Shown inside a tooltip after someone has successfully copied the link to their clipboard.
142
- *
143
- * @uiName Tooltip text
144
- */
145
- this.tooltiptext = "Copied to Clipboard";
146
- /**
147
- * The number of milliseconds that the tooltip appears for
148
- *
149
- * @uiName Tooltip lifespan
150
- */
151
- this.tooltiplifespan = 1000;
152
- /**
153
- * @uiName Coupon code alignment
154
- * @uiType string
155
- * @uiEnum ["left", "center", "right"]
156
- * @uiEnumNames ["Left", "Center", "Right"]
157
- * @uiGroup Style
158
- */
159
- this.textAlign = "left";
160
- /**
161
- * @uiName Copy button label
162
- */
163
- this.copyButtonLabel = "Copy Coupon";
164
- /**
165
- * Set the copy button style and placement.
166
- *
167
- * @uiName Style
168
- * @uiType string
169
- * @uiEnum ["icon", "button-outside", "button-below"]
170
- * @uiEnumNames ["Icon", "Button outside", "Button below"]
171
- * @uiGroup Style
172
- */
173
- this.buttonStyle = "icon";
174
- /**
175
- * @uiName Coupon code label
176
- */
177
- this.couponCodeLabel = "Your coupon code:";
178
- /**
179
- * Display this message when the coupon code has been cancelled.
180
- *
181
- * @uiWidget textArea
182
- * @uiName Cancelled code error message
183
- * @uiGroup Coupon code error
184
- */
185
- this.cancelledErrorText = "This code has been cancelled. Please reach out to the Support team for help resolving this issue.";
186
- /**
187
- * Display this message when the coupon code has already been redeemed.
188
- *
189
- * @uiWidget textArea
190
- * @uiName Redeemed code error message
191
- * @uiGroup Coupon code error
192
- */
193
- this.redeemedErrorText = "Looks like you’ve already redeemed this code.";
194
- /**
195
- * Display this message when the coupon code has expired.
196
- *
197
- * @uiWidget textArea
198
- * @uiName Expired code error message
199
- * @uiGroup Coupon code error
200
- */
201
- this.expiredErrorText = "Looks like this code has expired. Please reach out to the Support team for help resolving this issue.";
202
- /**
203
- * Display this message when the code fails to load due to a fulfillment error.
204
- *
205
- * @uiWidget textArea
206
- * @uiName Code fulfillment error message
207
- * @uiGroup Coupon code error
208
- */
209
- this.fullfillmentErrorText = "We couldn't fetch your code. Please try again later or reach out to the Support team for help resolving this issue.";
210
- /**
211
- * Display this message when the coupon code not available yet. Use the ICU message, {unpendDate}, to show the date the code will be available.
212
- *
213
- * @uiWidget textArea
214
- * @uiName Code pending error message
215
- * @uiGroup Coupon code error
216
- */
217
- this.pendingErrorText = "Your code will be available on {unpendDate}. Mark your calendar and come back then to redeem your reward!";
218
- /**
219
- * Display this message when the code fails to load due to an unspecified error.
220
- *
221
- * @uiWidget textArea
222
- * @uiName Code retrieval error message
223
- * @uiGroup Coupon code error
224
- */
225
- this.genericErrorText = "We couldn't fetch your code. Please try again later or reach out to the Support team for help resolving this issue.";
226
- /**
227
- * Display this text when the coupon code can’t be retrieved.
228
- *
229
- * @uiName Coupon code placeholder
230
- * @uiGroup Coupon code error
231
- */
232
- this.couponCodePlaceholder = "...";
233
- /**
234
- * The type of the button (primary or secondary) that will be used to copy the link.
235
- * @uiName Button Type
236
- * @uiType string
237
- * @uiEnum ["primary", "secondary"]
238
- * @uiEnumNames ["Primary", "Secondary"]
239
- * @uiGroup Style
240
- */
241
- this.buttonType = "primary";
242
- h(this);
243
- }
244
- disconnectedCallback() { }
245
- render() {
246
- const thisProps = getProps(this);
247
- const props = isDemo()
248
- ? useDemoCouponCode(thisProps)
249
- : useCouponCode(thisProps);
250
- return h$1(CouponCodeView, Object.assign({}, props));
251
- }
252
- };
253
- function useDemoCouponCode(props) {
254
- const [open, setOpen] = useState(false);
255
- const copyString = "THANKSJANE125uv125";
256
- return cjs({
257
- copyString,
258
- tooltiptext: props.tooltiptext,
259
- textAlign: props.textAlign,
260
- buttonStyle: props.buttonStyle,
261
- copyButtonLabel: props.copyButtonLabel,
262
- error: false,
263
- couponCodePlaceholder: props.couponCodePlaceholder,
264
- couponCodeLabel: props.couponCodeLabel,
265
- borderColor: props.borderColor,
266
- backgroundColor: props.backgroundColor,
267
- textColor: props.textColor,
268
- borderRadius: props.borderRadius,
269
- buttonType: props.buttonType,
270
- open,
271
- onClick: () => {
272
- // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
273
- // Only if called from a user-initiated event
274
- navigator.clipboard.writeText(copyString);
275
- setOpen(true);
276
- setTimeout(() => setOpen(false), props.tooltiplifespan);
277
- },
278
- }, props.demoData || {}, { arrayMerge: (_, a) => a });
279
- }
280
-
281
- export { CouponCode as sqm_coupon_code };
@@ -1 +0,0 @@
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 o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return __assign.apply(this,arguments)};System.register(["./index-bfed5e90.system.js","./dom-context-hooks.module-7cdc0e68.system.js","./index.module-3ae23e6a.system.js","./jss-preset-default.esm-62a04d6d.system.js","./JSS-840a8fea.system.js","./mixins-8c4521b7.system.js","./utils-e473b250.system.js","./cjs-f0ef8d23.system.js","./copy-text-view-33cac657.system.js","./sqm-coupon-code-view-40fd8d8b.system.js"],(function(e){"use strict";var t,n,r,o,a,i,s,u,d,l,c,p,f,v;return{setters:[function(e){t=e.r;n=e.h},function(e){r=e.i;o=e.o},function(e){a=e.d;i=e.J;s=e.H;u=e.B;d=e.$;l=e.w;c=e.i},function(){},function(){},function(){},function(e){p=e.g},function(e){f=e.c},function(){},function(e){v=e.C}],execute:function(){var h=a.gql(__makeTemplateObject(["\n query fuelTankRewardsQuery($programId: ID!) {\n user: viewer {\n ... on User {\n instantAccessRewards(\n filter: { type_eq: FUELTANK, programId_eq: $programId }\n ) {\n data {\n fuelTankCode\n fuelTankType\n statuses\n dateGiven\n dateExpires\n dateRedeemed\n dateCancelled\n dateScheduledFor\n datePendingForUnhandledError\n }\n count\n totalCount\n }\n }\n }\n }\n"],["\n query fuelTankRewardsQuery($programId: ID!) {\n user: viewer {\n ... on User {\n instantAccessRewards(\n filter: { type_eq: FUELTANK, programId_eq: $programId }\n ) {\n data {\n fuelTankCode\n fuelTankType\n statuses\n dateGiven\n dateExpires\n dateRedeemed\n dateCancelled\n dateScheduledFor\n datePendingForUnhandledError\n }\n count\n totalCount\n }\n }\n }\n }\n"]));var m=a.gql(__makeTemplateObject(["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"],["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"]));function E(e){var t,n,o;var a=i();var c=s();var p=u();var f=d(m)[0];var v=l(h,{programId:c},!(a===null||a===void 0?void 0:a.jwt)),E=v.data,y=v.loading,g=v.refetch,T=v.errors;var b=function(e){if(!e||!e.statuses)return"ERROR";var t=e.statuses[e.statuses.length-1];if(t==="PENDING"&&e.dateScheduledFor===null)return"EMPTY_TANK";return t};var x=(o=(n=(t=E===null||E===void 0?void 0:E.user)===null||t===void 0?void 0:t.instantAccessRewards)===null||n===void 0?void 0:n.data)===null||o===void 0?void 0:o[0];var _=b(x);var C=_==="PENDING"&&x.dateScheduledFor?new Date(x.dateScheduledFor).toLocaleDateString("default",{day:"numeric",month:"long",year:"numeric"}):undefined;var A=(x===null||x===void 0?void 0:x.fuelTankCode)||"...";var R=r(false),k=R[0],j=R[1];function w(){navigator.clipboard.writeText(A);j(true);setTimeout((function(){return j(false)}),e.tooltiplifespan);f({eventMeta:{programId:c,id:a===null||a===void 0?void 0:a.id,accountId:a===null||a===void 0?void 0:a.accountId,type:"USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT",meta:{engagementMedium:p,shareMedium:"DIRECT"}}})}var P=function(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}",C);case"REDEEMED":return e.redeemedErrorText;case"AVAILABLE":return"";default:return e.genericErrorText}};var I=function(e){switch(e){case"EXPIRED":case"EMPTY_TANK":case"CANCELLED":case"ERROR":return"warning";case"PENDING":return"info";case"REDEEMED":return"success";default:return}};var D=P(_);var L=I(_);var N=_!=="AVAILABLE";return __assign(__assign({},e),{onClick:w,open:k,copyString:A,error:N,errorText:D,dateAvailable:C,loading:y,errorType:L,buttonType:e.buttonType||"primary"})}var y=e("sqm_coupon_code",function(){function e(e){t(this,e);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="...";this.buttonType="primary";o(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=p(this);var t=c()?g(e):E(e);return n(v,Object.assign({},t))};return e}());function g(e){var t=r(false),n=t[0],o=t[1];var a="THANKSJANE125uv125";return f({copyString:a,tooltiptext:e.tooltiptext,textAlign:e.textAlign,buttonStyle:e.buttonStyle,copyButtonLabel:e.copyButtonLabel,error:false,couponCodePlaceholder:e.couponCodePlaceholder,couponCodeLabel:e.couponCodeLabel,borderColor:e.borderColor,backgroundColor:e.backgroundColor,textColor:e.textColor,borderRadius:e.borderRadius,buttonType:e.buttonType,open:n,onClick:function(){navigator.clipboard.writeText(a);o(true);setTimeout((function(){return o(false)}),e.tooltiplifespan)}},e.demoData||{},{arrayMerge:function(e,t){return t}})}}}}));