@saasquatch/mint-components 1.15.2-1 → 1.15.3-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.
- package/dist/cjs/sqm-banking-info-form_17.cjs.entry.js +35 -17
- package/dist/cjs/{sqm-invoice-table-view-5c74607f.js → sqm-invoice-table-view-3f60fba9.js} +1 -0
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +1 -0
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +23 -12
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +18 -4
- package/dist/esm/sqm-banking-info-form_17.entry.js +35 -17
- package/dist/esm/{sqm-invoice-table-view-3491dd80.js → sqm-invoice-table-view-01453fa3.js} +1 -0
- package/dist/esm/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -1
- package/dist/esm-es5/sqm-invoice-table-view-01453fa3.js +1 -0
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-5868dc11.entry.js → p-1f1ce7ab.entry.js} +1 -1
- package/dist/mint-components/{p-e64e8354.system.entry.js → p-2ba713d6.system.entry.js} +1 -1
- package/dist/mint-components/p-35701119.js +1 -0
- package/dist/mint-components/p-37996351.system.js +1 -1
- package/dist/mint-components/{p-3d73cd84.entry.js → p-6f6cd994.entry.js} +2 -2
- package/dist/mint-components/p-86a5db85.system.js +1 -0
- package/dist/mint-components/{p-25ae959c.system.entry.js → p-92cebad6.system.entry.js} +1 -1
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +2 -0
- package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -0
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/esm-es5/sqm-invoice-table-view-3491dd80.js +0 -1
- package/dist/mint-components/p-49932f12.system.js +0 -1
- package/dist/mint-components/p-e8e48982.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as e,r as t,c as n}from"./p-f708da7b.js";import{a,u as r,k as o,f as i,c as s,n as l}from"./p-cd651f81.js";import"./p-65069b66.js";import{j as d,k as u,b as c,d as m,X as p,p as h}from"./p-94a876b9.js";import"./p-c1086930.js";import"./p-9ec99ced.js";import{c as g}from"./p-cef45012.js";import"./p-3f7b81b8.js";import"./p-91521e9d.js";import{C as f}from"./p-31015791.js";import{G as b}from"./p-837a0fdd.js";import"./p-19ccb4ce.js";import{l as w}from"./p-5bedb58c.js";import"./p-c9f1dde7.js";import{A as x}from"./p-229f797b.js";import{C as y}from"./p-35b475bf.js";import"./p-8d363802.js";import{E as v}from"./p-92816d1f.js";import{L as q}from"./p-00df0cac.js";import{L as E}from"./p-4e5af50c.js";import{L as A}from"./p-266a8b4d.js";import{N as C}from"./p-24db5c70.js";import{N as k}from"./p-3db34d68.js";import{P as T}from"./p-bbcd824a.js";import{P as D}from"./p-626e9e84.js";import{P as R}from"./p-dbcb5359.js";import{B as S}from"./p-91959fbe.js";import{P}from"./p-91ab3da1.js";import{P as I}from"./p-63a75798.js";import"./p-8c23d1b8.js";import{P as F}from"./p-f940190a.js";import{P as N}from"./p-7a9290ba.js";import"./p-9acb5038.js";import{Q as O}from"./p-f56bedd5.js";import{S as L,L as B,B as _,P as G,E as j,u as M,a as U,b as W,c as V,d as H,e as z,C as Y,T as $,f as X,g as J,h as K,H as Z,R as Q,N as ee,i as te,D as ne,I as ae,j as re,r as oe,k as ie,l as se,m as le,n as de,o as ue,p as ce,q as me,s as pe,t as he,v as ge,w as fe,x as be,y as we,z as xe,A as ye,F as ve,G as qe,J as Ee,K as Ae,M as Ce,O as ke,Q as Te,U as De,V as Re}from"./p-c1b074b6.js";import{P as Se,a as Pe}from"./p-a9f4ddb1.js";import{O as Ie,I as Fe,T as Ne}from"./p-e8e48982.js";import{L as Oe}from"./p-6ba44ca9.js";var Le,Be=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ge="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",je="["+Ge+"]",Me="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",Ue="\\d+",We="[a-z\\xdf-\\xf6\\xf8-\\xff]",Ve="[^\\ud800-\\udfff"+Ge+Ue+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",He="\\ud83c[\\udffb-\\udfff]",ze="[^\\ud800-\\udfff]",Ye="(?:\\ud83c[\\udde6-\\uddff]){2}",$e="[\\ud800-\\udbff][\\udc00-\\udfff]",Xe="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Je="(?:"+We+"|"+Ve+")",Ke="(?:"+Xe+"|"+Ve+")",Ze="(?:"+Me+"|"+He+")?",Qe="[\\ufe0e\\ufe0f]?"+Ze+"(?:\\u200d(?:"+[ze,Ye,$e].join("|")+")[\\ufe0e\\ufe0f]?"+Ze+")*",et="(?:"+["[\\u2700-\\u27bf]",Ye,$e].join("|")+")"+Qe,tt="(?:"+[ze+Me+"?",Me,Ye,$e,"[\\ud800-\\udfff]"].join("|")+")",nt=RegExp("['’]","g"),at=RegExp(Me,"g"),rt=RegExp(He+"(?="+He+")|"+tt+Qe,"g"),ot=RegExp([Xe+"?"+We+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[je,Xe,"$"].join("|")+")",Ke+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[je,Xe+Je,"$"].join("|")+")",Xe+"?"+Je+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Xe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?",Ue,et].join("|"),"g"),it=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),st=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,lt="object"==typeof self&&self&&self.Object===Object&&self,dt="object"==typeof a&&a&&a.Object===Object&&a||lt||Function("return this")(),ut=(Le={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"},function(e){return null==Le?void 0:Le[e]});function ct(e){return it.test(e)}var mt=Object.prototype.toString,pt=dt.Symbol,ht=pt?pt.prototype:void 0,gt=ht?ht.toString:void 0;function ft(e){return null==e?"":function(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==mt.call(e)}(e))return gt?gt.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}var bt,wt=(bt=function(e,t,n){return e+(n?" ":"")+xt(t)},function(e){return function(e,t,n){for(var a=-1,r=e?e.length:0;++a<r;)n=t(n,e[a],a,e);return n}(function(e,t){return e=ft(e),void 0===(t=t)?function(e){return st.test(e)}(e)?function(e){return e.match(ot)||[]}(e):function(e){return e.match(Be)||[]}(e):e.match(t)||[]}(function(e){return(e=ft(e))&&e.replace(_e,ut).replace(at,"")}(e).replace(nt,"")),bt,"")}),xt=("toUpperCase",function(e){var t,n,a,r,o=ct(e=ft(e))?function(e){return ct(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.split("")}(e)}(e):void 0,i=o?o[0]:e.charAt(0),s=o?(t=o,n=1,r=t.length,a=void 0===a?r:a,!n&&a>=r?t:function(e,t,n){var a=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(r);++a<r;)o[a]=e[a+t];return o}(t,n,a)).join(""):e.slice(1);return i.toUpperCase()+s}),yt=wt,vt=function(){function e(e){var t=this;this._insertTag=function(e){t.container.insertBefore(e,0===t.tags.length?t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),qt="-ms-",Et="-moz-",At="-webkit-",Ct="comm",kt="rule",Tt="decl",Dt=Math.abs,Rt=String.fromCharCode;function St(e){return e.trim()}function Pt(e,t,n){return e.replace(t,n)}function It(e,t){return e.indexOf(t)}function Ft(e,t){return 0|e.charCodeAt(t)}function Nt(e,t,n){return e.slice(t,n)}function Ot(e){return e.length}function Lt(e){return e.length}function Bt(e,t){return t.push(e),e}var _t=1,Gt=1,jt=0,Mt=0,Ut=0,Wt="";function Vt(e,t,n,a,r,o,i){return{value:e,root:t,parent:n,type:a,props:r,children:o,line:_t,column:Gt,length:i,return:""}}function Ht(e,t,n){return Vt(e,t.root,t.parent,n,t.props,t.children,0)}function zt(){return Ut=Mt>0?Ft(Wt,--Mt):0,Gt--,10===Ut&&(Gt=1,_t--),Ut}function Yt(){return Ut=Mt<jt?Ft(Wt,Mt++):0,Gt++,10===Ut&&(Gt=1,_t++),Ut}function $t(){return Ft(Wt,Mt)}function Xt(){return Mt}function Jt(e,t){return Nt(Wt,e,t)}function Kt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Zt(e){return _t=Gt=1,jt=Ot(Wt=e),Mt=0,[]}function Qt(e){return Wt="",e}function en(e){return St(Jt(Mt-1,an(91===e?e+2:40===e?e+1:e)))}function tn(e){for(;(Ut=$t())&&Ut<33;)Yt();return Kt(e)>2||Kt(Ut)>3?"":" "}function nn(e,t){for(;--t&&Yt()&&!(Ut<48||Ut>102||Ut>57&&Ut<65||Ut>70&&Ut<97););return Jt(e,Xt()+(t<6&&32==$t()&&32==Yt()))}function an(e){for(;Yt();)switch(Ut){case e:return Mt;case 34:case 39:return an(34===e||39===e?e:Ut);case 40:41===e&&an(e);break;case 92:Yt()}return Mt}function rn(e,t){for(;Yt()&&e+Ut!==57&&(e+Ut!==84||47!==$t()););return"/*"+Jt(t,Mt-1)+"*"+Rt(47===e?e:Yt())}function on(e){for(;!Kt($t());)Yt();return Jt(e,Mt)}function sn(e){return Qt(ln("",null,null,null,[""],e=Zt(e),0,[0],e))}function ln(e,t,n,a,r,o,i,s,l){for(var d=0,u=0,c=i,m=0,p=0,h=0,g=1,f=1,b=1,w=0,x="",y=r,v=o,q=a,E=x;f;)switch(h=w,w=Yt()){case 34:case 39:case 91:case 40:E+=en(w);break;case 9:case 10:case 13:case 32:E+=tn(h);break;case 92:E+=nn(Xt()-1,7);continue;case 47:switch($t()){case 42:case 47:Bt(un(rn(Yt(),Xt()),t,n),l);break;default:E+="/"}break;case 123*g:s[d++]=Ot(E)*b;case 125*g:case 59:case 0:switch(w){case 0:case 125:f=0;case 59+u:p>0&&Ot(E)-c&&Bt(p>32?cn(E+";",a,n,c-1):cn(Pt(E," ","")+";",a,n,c-2),l);break;case 59:E+=";";default:if(Bt(q=dn(E,t,n,d,u,r,s,x,y=[],v=[],c),o),123===w)if(0===u)ln(E,t,q,q,y,o,c,s,v);else switch(m){case 100:case 109:case 115:ln(e,q,q,a&&Bt(dn(e,q,q,0,0,r,s,x,r,y=[],c),v),r,v,c,s,a?y:v);break;default:ln(E,q,q,q,[""],v,c,s,v)}}d=u=p=0,g=b=1,x=E="",c=i;break;case 58:c=1+Ot(E),p=h;default:if(g<1)if(123==w)--g;else if(125==w&&0==g++&&125==zt())continue;switch(E+=Rt(w),w*g){case 38:b=u>0?1:(E+="\f",-1);break;case 44:s[d++]=(Ot(E)-1)*b,b=1;break;case 64:45===$t()&&(E+=en(Yt())),m=$t(),u=Ot(x=E+=on(Xt())),w++;break;case 45:45===h&&2==Ot(E)&&(g=0)}}return o}function dn(e,t,n,a,r,o,i,s,l,d,u){for(var c=r-1,m=0===r?o:[""],p=Lt(m),h=0,g=0,f=0;h<a;++h)for(var b=0,w=Nt(e,c+1,c=Dt(g=i[h])),x=e;b<p;++b)(x=St(g>0?m[b]+" "+w:Pt(w,/&\f/g,m[b])))&&(l[f++]=x);return Vt(e,t,n,0===r?kt:s,l,d,u)}function un(e,t,n){return Vt(e,t,n,Ct,Rt(Ut),Nt(e,2,-2),0)}function cn(e,t,n,a){return Vt(e,t,n,Tt,Nt(e,0,a),Nt(e,a+1,-1),a)}function mn(e,t){switch(function(e,t){return(((t<<2^Ft(e,0))<<2^Ft(e,1))<<2^Ft(e,2))<<2^Ft(e,3)}(e,t)){case 5103:return At+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return At+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return At+e+Et+e+qt+e+e;case 6828:case 4268:return At+e+qt+e+e;case 6165:return At+e+qt+"flex-"+e+e;case 5187:return At+e+Pt(e,/(\w+).+(:[^]+)/,At+"box-$1$2"+qt+"flex-$1$2")+e;case 5443:return At+e+qt+"flex-item-"+Pt(e,/flex-|-self/,"")+e;case 4675:return At+e+qt+"flex-line-pack"+Pt(e,/align-content|flex-|-self/,"")+e;case 5548:return At+e+qt+Pt(e,"shrink","negative")+e;case 5292:return At+e+qt+Pt(e,"basis","preferred-size")+e;case 6060:return At+"box-"+Pt(e,"-grow","")+At+e+qt+Pt(e,"grow","positive")+e;case 4554:return At+Pt(e,/([^-])(transform)/g,"$1"+At+"$2")+e;case 6187:return Pt(Pt(Pt(e,/(zoom-|grab)/,At+"$1"),/(image-set)/,At+"$1"),e,"")+e;case 5495:case 3959:return Pt(e,/(image-set\([^]*)/,At+"$1$`$1");case 4968:return Pt(Pt(e,/(.+:)(flex-)?(.*)/,At+"box-pack:$3"+qt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+At+e+e;case 4095:case 3583:case 4068:case 2532:return Pt(e,/(.+)-inline(.+)/,At+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ot(e)-1-t>6)switch(Ft(e,t+1)){case 109:if(45!==Ft(e,t+4))break;case 102:return Pt(e,/(.+:)(.+)-([^]+)/,"$1"+At+"$2-$3$1"+Et+(108==Ft(e,t+3)?"$3":"$2-$3"))+e;case 115:return~It(e,"stretch")?mn(Pt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Ft(e,t+1))break;case 6444:switch(Ft(e,Ot(e)-3-(~It(e,"!important")&&10))){case 107:return Pt(e,":",":"+At)+e;case 101:return Pt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+At+(45===Ft(e,14)?"inline-":"")+"box$3$1"+At+"$2$3$1"+qt+"$2box$3")+e}break;case 5936:switch(Ft(e,t+11)){case 114:return At+e+qt+Pt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return At+e+qt+Pt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return At+e+qt+Pt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return At+e+qt+e+e}return e}function pn(e,t){for(var n="",a=Lt(e),r=0;r<a;r++)n+=t(e[r],r,e,t)||"";return n}function hn(e,t,n,a){switch(e.type){case"@import":case Tt:return e.return=e.return||e.value;case Ct:return"";case kt:e.value=e.props.join(",")}return Ot(n=pn(e.children,a))?e.return=e.value+"{"+n+"}":""}function gn(e){return function(t){t.root||(t=t.return)&&e(t)}}function fn(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var bn=new WeakMap,wn=function(e){if("rule"===e.type&&e.parent&&e.length){for(var t=e.value,n=e.parent,a=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||bn.get(n))&&!a){bn.set(e,!0);for(var r=[],o=function(e,t){return Qt(function(e,t){var n=-1,a=44;do{switch(Kt(a)){case 0:38===a&&12===$t()&&(t[n]=1),e[n]+=on(Mt-1);break;case 2:e[n]+=en(a);break;case 4:if(44===a){e[++n]=58===$t()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Rt(a)}}while(a=Yt());return e}(Zt(e),t))}(t,r),i=n.props,s=0,l=0;s<o.length;s++)for(var d=0;d<i.length;d++,l++)e.props[l]=r[s]?o[s].replace(/&\f/g,i[d]):i[d]+" "+o[s]}}},xn=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},yn=[function(e,t,n,a){if(!e.return)switch(e.type){case Tt:e.return=mn(e.value,e.length);break;case"@keyframes":return pn([Ht(Pt(e.value,"@","@"+At),e,"")],a);case kt:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return pn([Ht(Pt(t,/:(read-\w+)/,":-moz-$1"),e,"")],a);case"::placeholder":return pn([Ht(Pt(t,/:(plac\w+)/,":"+At+"input-$1"),e,""),Ht(Pt(t,/:(plac\w+)/,":-moz-$1"),e,""),Ht(Pt(t,/:(plac\w+)/,qt+"input-$1"),e,"")],a)}return""}))}}],vn={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},qn=/[A-Z]|^ms/g,En=/_EMO_([^_]+?)_([^]*?)_EMO_/g,An=function(e){return 45===e.charCodeAt(1)},Cn=function(e){return null!=e&&"boolean"!=typeof e},kn=fn((function(e){return An(e)?e:e.replace(qn,"-$&").toLowerCase()})),Tn=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(En,(function(e,t,n){return Rn={name:t,styles:n,next:Rn},t}))}return 1===vn[e]||An(e)||"number"!=typeof t||0===t?t:t+"px"};function Dn(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Rn={name:n.name,styles:n.styles,next:Rn},n.name;if(void 0!==n.styles){var a=n.next;if(void 0!==a)for(;void 0!==a;)Rn={name:a.name,styles:a.styles,next:Rn},a=a.next;return n.styles+";"}return function(e,t,n){var a="";if(Array.isArray(n))for(var r=0;r<n.length;r++)a+=Dn(e,t,n[r])+";";else for(var o in n){var i=n[o];if("object"!=typeof i)null!=t&&void 0!==t[i]?a+=o+"{"+t[i]+"}":Cn(i)&&(a+=kn(o)+":"+Tn(o,i)+";");else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var s=Dn(e,t,i);switch(o){case"animation":case"animationName":a+=kn(o)+":"+s+";";break;default:a+=o+"{"+s+"}"}}else for(var l=0;l<i.length;l++)Cn(i[l])&&(a+=kn(o)+":"+Tn(o,i[l])+";")}return a}(e,t,n);case"function":if(void 0!==e){var r=Rn,o=n(e);return Rn=r,Dn(e,t,o)}}if(null==t)return n;var i=t[n];return void 0!==i?i:n}var Rn,Sn=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Pn=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var a=!0,r="";Rn=void 0;var o=e[0];null==o||void 0===o.raw?(a=!1,r+=Dn(n,t,o)):r+=o[0];for(var i=1;i<e.length;i++)r+=Dn(n,t,e[i]),a&&(r+=o[i]);Sn.lastIndex=0;for(var s,l="";null!==(s=Sn.exec(r));)l+="-"+s[1];return{name:function(e){for(var t,n=0,a=0,r=e.length;r>=4;++a,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(a+2))<<16;case 2:n^=(255&e.charCodeAt(a+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(a)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(r)+l,styles:r,next:Rn}};function In(e,t,n){var a="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):a+=n+" "})),a}var Fn=function(e,t,n){var a=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[a]&&(e.registered[a]=t.styles),void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+a:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}};function Nn(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function On(e,t,n){var a=[],r=In(e,a,n);return a.length<2?n:r+t(a)}var Ln=function e(t){for(var n="",a=0;a<t.length;a++){var r=t[a];if(null!=r){var o=void 0;switch(typeof r){case"boolean":break;case"object":if(Array.isArray(r))o=e(r);else for(var i in o="",r)r[i]&&i&&(o&&(o+=" "),o+=i);break;default:o=r}o&&(n&&(n+=" "),n+=o)}}return n},Bn=function(){var e=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var a,r,o=e.stylisPlugins||yn,i={},s=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)i[t[n]]=!0;s.push(e)}));var l,d=[wn,xn],u=[hn,gn((function(e){l.insert(e)}))],c=function(e){var t=Lt(e);return function(n,a,r,o){for(var i="",s=0;s<t;s++)i+=e[s](n,a,r,o)||"";return i}}(d.concat(o,u));r=function(e,t,n,a){l=n,pn(sn(e?e+"{"+t.styles+"}":t.styles),c),a&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new vt({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend}),nonce:e.nonce,inserted:i,registered:{},insert:r};return m.sheet.hydrate(s),m}({key:"css"});e.sheet.speedy=function(e){this.isSpeedy=e},e.compat=!0;var t=function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];var r=Pn(n,e.registered,void 0);return Fn(e,r,!1),e.key+"-"+r.name};return{css:t,cx:function(){for(var n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];return On(e.registered,t,Ln(a))},injectGlobal:function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];var r=Pn(n,e.registered);Nn(e,r)},keyframes:function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];var r=Pn(n,e.registered),o="animation-"+r.name;return Nn(e,{name:r.name,styles:"@keyframes "+o+"{"+r.styles+"}"}),o},hydrate:function(t){t.forEach((function(t){e.inserted[t]=!0}))},flush:function(){e.registered={},e.inserted={},e.sheet.flush()},sheet:e.sheet,cache:e,getRegisteredStyles:In.bind(null,e.registered),merge:On.bind(null,e.registered,t)}}().css;function _n(){return(_n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function Gn(e,t){return t||(t=e.slice(0)),e.raw=t,e}var jn,Mn,Un,Wn=Bn(jn||(jn=Gn(['\n width: 100vw;\n height: 100vh;\n\n .story-book-outer-div {\n .story-div {\n font-family: "Arial", sans-serif;\n font-size: 12px;\n }\n padding-bottom: 500px;\n }\n\n .story-div {\n position: fixed;\n box-sizing: border-box;\n top: 0;\n width: 250px;\n height: 100vh;\n z-index: 999;\n overflow-y: scroll;\n background: white;\n margin-bottom: 32px;\n }\n\n .header {\n padding: 24px 0 16px 16px;\n margin-bottom: 24px;\n color: white;\n background: #333;\n cursor: pointer;\n\n h2 {\n letter-spacing: 3px;\n font-weight: 400;\n }\n }\n\n .parentStoryList {\n list-style: none;\n padding-left: 16px;\n\n summary {\n margin-bottom: 4px;\n }\n }\n .parentStory {\n cursor: pointer;\n }\n .parentStory.selected {\n font-weight: bold;\n }\n\n .subStory {\n font-size: 12px;\n cursor: pointer;\n line-height: 1.5em;\n margin-top: 4px;\n\n a {\n display: block;\n padding: 4px 4px 4px 16px;\n }\n }\n .subStory:hover {\n background-color: #eee;\n }\n .subStory.selected {\n background-color: lightgreen;\n }\n\n .component {\n padding: 24px 16px;\n }\n\n h4.group-header {\n margin: 8px 0;\n text-transform: uppercase;\n font-weight: 600;\n font-size: 14px;\n color: #575757;\n }\n\n .group-wrapper {\n margin-bottom: 24px;\n }\n\n .dynamic-display-wrapper {\n position: fixed;\n display: flex;\n flex-direction: column;\n bottom: 0;\n left: 100%;\n padding: 16px;\n z-index: 1000;\n background: white;\n transform: translateX(-100%);\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n\n & > :not(:first-child) {\n margin-top: 12px;\n }\n\n p {\n font-size: 12px;\n margin: 0;\n padding: 0;\n }\n\n .button-wrapper {\n display: flex;\n\n & > :not(:first-child) {\n margin-left: 12px;\n }\n }\n\n & button {\n border: 1px solid #eaeaea;\n background: white;\n border-radius: 4px;\n color: #777;\n padding: 4px 12px;\n justify-content: center;\n align-items: center;\n text-align: center;\n\n &.active {\n background: #555;\n border-color: #555;\n color: white;\n }\n }\n }\n'])));function Vn(e,t){var n,a=t.story.title.split("/"),r=a[1]?a[0]:"_";return _n({},e,((n={})[r]=[].concat(e[r]||[],[{story:_n({},t.story,{title:a[1]||a[0]}),subs:t.subs}]).sort((function(e,t){return e.story.title.localeCompare(t.story.title)})),n))}function Hn(e){return{story:e.default,subs:function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)t.indexOf(n=o[a])>=0||(r[n]=e[n]);return r}(e,["default"])}}function zn(e,t){var n,a;if(e){var r=decodeURIComponent(e).split("-"),o=r[1],i=r[2],s=null==t||null==(n=t[r[0]])?void 0:n.find((function(e){return e.story.title===o})),l=null==s||null==(a=s.subs)?void 0:a[i],d={key:e,story:l,parent:null==s?void 0:s.story,label:null==l?void 0:l.name};return d.key&&d.story&&d.parent&&d.label?d:void 0}}const Yn=Object.freeze({__proto__:null,default:{title:"Components/Share Button",parameters:{scenario:'@author:noah\n@owner:noah\nFeature: Share Button\n\n The share button redirects users to a platform where they can share their referral link\n\n @motivating\n @ui\n Scenario Outline: Share button displays for various platforms\n Given the share button\'s medium prop is "<medium>"\n And the button\'s child is text saying "BUTTON_TEXT"\n When the share button is rendered\n Then the button has text "BUTTON_TEXT"\n And the button is <colour>\n And it displays an <icon> beside the text\n And clicking the button redirects to an appropriate link\n Examples:\n | medium | colour | icon |\n | facebook | #1877f2 | facebook logo |\n | twitter | #000000 | twitter x logo |\n | email | #666666 | envelope |\n | direct | brand colour | paper plane |\n | linkedin | #0077b5 | linkedIn logo |\n | sms | #34DA50 | chat bubble |\n | fbmessenger | #0084ff | messenger logo |\n | whatsapp | #25d366 | whatsapp logo |\n | linemessenger | #00B300 | linemessenger logo |\n | pinterest | #e60023 | pinterest logo |\n\n @minutia\n @ui\n Scenario Outline: Default icons can be overwritten\n Given a share button for any medium with <iconPropValue>\n When the share button is rendered\n Then it displays a <iconPropValue> instead of the share mediums default icon\n Examples:\n | iconPropValue |\n | basket |\n | bluetooth |\n | bandaid |\n\n @motivating\n @ui\n Scenario Outline: Default share medium colours can be overwritten\n Given a share button for any medium with <backgroundColourPropValue>\n When the share button is rendered\n Then the share button is <backgroundColourPropValue>\n Examples:\n | backgroundColourPropValue |\n | blue |\n | black |\n | green |\n\n @minutia\n @ui\n Scenario Outline: Share medium icons and text can be hidden\n Given a share button with <prop> <value>\n When the share button is rendered\n Then <element> is hidden\n Examples:\n | prop | value | element |\n | hideicon | true | icon |\n | hidetext | true | text |\n\n @minutia\n @ui\n Scenario Outline: Icons can be on either side of the text\n Given a share button with <iconslotPropValue>\n When the share button is rendered\n Then the icon is displayed to the <direction> of the text\n Examples:\n | iconslotPropValue | direction |\n | suffix | right |\n | prefix | left |\n | prefix | left |\n\n @minutia\n Scenario: Unsupported browsers hide native share buttons\n Given the share button\'s medium prop is "direct"\n And your browser does not support the Web Share API\n Then the share button is hidden\n\n @minutia\n Scenario: SMS share buttons are hidden on non Android and iOS devices\n Given the share button\'s medium is "sms"\n And the share button is being viewed on a device which is not an Android or iOS device\n Then the share button is hidden\n\n @motivating\n Scenario: Facebook share buttons uses SquatchAndroid sharing features\n Given the share button\'s medium is "facebook"\n And the share button is being viewed in a web view with the SquatchAndroid API\n And the Facebook app is available\n Then tapping the share button opens the phone\'s Facebook app\n And a share activity is opened with the share link prefilled\n\n @motivating\n Scenario: SquatchAndroid falls back to the Facebook website if no app is available\n Given the share button\'s medium is "facebook"\n And the share button is being viewed in a web view with the SquatchAndroid API\n And the Facebook app is not available\n Then tapping the share button opens the the Facebook mobile site in the device\'s browser\n And a share activity is opened with the share link prefilled\n\n @minutia\n Scenario: A supplied program ID is used if available\n Given the program id is supplied to the component in the "programId" prop\n Then the program ID in the "programId" prop is used to retrieve share links\n\n @minutia\n Scenario: The program ID is automatically fetched from context\n Given the program id is not supplied to the component in the "programId" prop\n Then the program ID is retrieved from context'}},WithIconPrefix:()=>e(L,Object.assign({},{medium:"whatsapp",iconslot:"prefix"}),"Share"),WithIconSuffix:()=>e(L,Object.assign({},{medium:"whatsapp",iconslot:"suffix"}),"Share"),WithIconOverride:()=>e(L,Object.assign({},{medium:"facebook",icon:"person-badge"}),"Share"),TextStyle:()=>e(L,Object.assign({},{medium:"facebook",type:"text"}),"Share"),WithoutIcon:()=>e(L,Object.assign({},{medium:"facebook",hideicon:!0}),"Share"),WithoutText:()=>e(L,Object.assign({},{medium:"facebook",hidetext:!0}),"Share"),TextStyleWithoutIcon:()=>e(L,Object.assign({},{medium:"facebook",type:"text",hideicon:!0}),"Share"),WithCustomColors:()=>e(L,Object.assign({},{medium:"facebook",type:"text",backgroundcolor:"red",textcolor:"yellow",iconslot:"prefix"}),"Facebook"),WithCustomBorderRadius:()=>e(L,Object.assign({},{medium:"facebook",type:"text",borderradius:8,iconslot:"prefix"}),"Facebook"),LinkLocationTest:()=>e(L,Object.assign({},{medium:"facebook",type:"text",onClick:void 0,messageLink:"https://www.example.com"}),"Click me"),FullStackIcon:()=>e("div",null,e("sqm-share-button",{medium:"facebook"},e("span",null,"Facebook")),e("br",null),e("sqm-share-button",{medium:"email"},e("span",null,"Email"))),AllMediums:()=>e("div",null,e("sqm-share-button",{medium:"facebook"},e("span",null,"Facebook")),e("br",null),e("sqm-share-button",{medium:"email"},e("span",null,"Email")),e("br",null),e("sqm-share-button",{medium:"whatsapp"},e("span",null,"WhatsApp")),e("br",null),e("sqm-share-button",{medium:"linkedin"},e("span",null,"Linkedin")),e("br",null),e("sqm-share-button",{medium:"twitter"},e("span",null,"Post on X")),e("br",null),e("sqm-share-button",{medium:"pinterest"},e("span",null,"Pinterest")),e("br",null),e("sqm-share-button",{medium:"fbmessenger"},e("span",null,"Messenger")),e("br",null),e("sqm-share-button",{medium:"sms"},e("span",null,"SMS")),e("br",null),e("sqm-share-button",{medium:"linemessenger"},e("span",null,"Line Messenger")),e("br",null),e("sqm-share-button",{medium:"direct"},e("span",null,"Share")))}),$n={usersheading:"TOP REFERRERS",statsheading:"NEW CUSTOMERS"},Xn={empty:e("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"}),essentials:e("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1715360191/squatch-assets/Leaderboard_Not_Available.svg","empty-state-header":"Leaderboards aren’t available on your plan","empty-state-text":"Contact {supportText} to upgrade your plan and start leveraging gamification in your program.","support-text":"Support"}),loadingstate:e("slot",{name:"loading"},e("table",null,[...Array(10)].map((()=>e("tr",null,e("td",null,e("sl-skeleton",null)))))))},Jn=Object.freeze({__proto__:null,default:{title:"Components/Empty State",parameters:{scenario:'@author:derek\n@owner:derek\nFeature: Empty State\n\n The sqm-empty component acts as a universal template for the empty states that are used accross our mint components.\n\n @motivating\n @ui\n Scenario: The empty state displays an image, a header and description text\n Given a empty component with the following props\n | prop | value |\n | empty-state-image | https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_reward2.png |\n | empty-state-header | My Custom Empty State |\n | empty-state-text | Description about why this empty state is being shown! |\n And it is wrapped by a component with an "empty" slot\n When a user views a component using the empty state\n Then it is displayed in the "empty" slot\n And they see an image\n And below they see "My Custom Empty State"\n And below they see "Description about why this empty state is being shown!"\n And the images/text are centered aligned'}},Empty:()=>e("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"}),SlottedIntoComponent:()=>{const t={states:{loading:!1,hasLeaders:!1,isEssentials:!1,styles:{...$n}},data:{rankType:"rowNumber",leaderboard:[],rowNumber:10,showUser:!0,userRank:{firstName:"Kutay",lastInitial:"C",value:8,rowNumber:11,rank:23}},elements:{...Xn}};return e(B,Object.assign({},t))}}),Kn=Object.freeze({__proto__:null,default:{title:"Components/Link Button"},Default:()=>e("sqm-pagination",null)}),Zn=Object.freeze({__proto__:null,default:{title:"Components/Share Link",parameters:{scenario:'@author:johan\n@owner:johan\nFeature: Share Link\n\n The share link component is a box that allows users to see and copy their share link for a given program\n\n Background: Environment\n Given there is a valid program ID in the environment\n And there is a valid user ID and account ID in the environment\n\n @motivating\n Scenario: A Users sharelink can be copied to their clipboard\n Given tooltipText is "hello tooltip"\n When the component renders\n Then there is a textbox with the user\'s share link\n When the clipboard icon is clicked\n Then the link is copied to clipboard\n And a tooltip appears for ~1 second\n\n @minutia\n Scenario: Tooltip lifespan defaults to 2000\n Given the tooltip\'s lifespan is set to 2000\n And there is tooltip text\n When the component renders\n And the clipboard icon is clicked\n Then a tooltip appears for ~2 seconds\n\n @minutia\n Scenario: Demo\n Given isDemo() returns true\n Then the share link is "https://www.example.com/sharelink/abc"\n And the component won\'t be interactive\n And the tooltip is hidden\n\n @minutia\n Scenario: Program ID can be sourced from prop\n Given the programId prop is set to "program-a"\n And window.widgetIdent.programId is set to "program-b"\n When the component renders\n Then the share link is for "program-a"\n\n @minutia\n Scenario: Program ID can be sourced from window\n Given the programId prop is unset\n And window.widgetIdent.programId is set to "program-b"\n When the component renders\n Then the share link is for "program-b"\n\n @minutia\n Scenario: An analytic event is fired when a user copies their sharelink\n Given a user viewing the share link component\n And the component is rendered for "program-a"\n When they click to copy their link\n Then an "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT" analytic event is fired\n And it is for "program-a"\n And it has share medium "DIRECT"\n\n\n @ui\n Scenario Outline: user can edit the alignment of the share link text\n Given a user is editing the share link component\n Then they see "Align text" props\n And the default value is "left"\n When they change the option to <option>\n Then they see the text in <position>\n Examples:\n | option | position |\n | left | left |\n | center | center |\n | right | right |\n\n @ui\n Scenario Outline: The position of the copy button can be changed\n Given a user is editing the share link component\n Then they see "Style" props\n And the default value is "icon"\n When they change the option to <option>\n Then they see the copy button in <position>\n Examples:\n | option | position |\n | button outside | outside the input, on the right |\n | button below | outside the input, below |\n | icon | inside the input as an icon |\n'}},Default:()=>e(f,Object.assign({},{copyString:"https://noah.example.com",open:!1,tooltiptext:"Copied!"})),Tooltip:()=>e(f,Object.assign({},{copyString:"https://noah.example.com",tooltiptext:"Some text for the tooltip",open:!0})),Disabled:()=>e(f,Object.assign({},{copyString:"https://noah.example.com",disabled:!0,open:!0,tooltiptext:"Copied!"})),Error:()=>e(f,Object.assign({},{copyString:"https://noah.example.com",disabled:!0,open:!0,tooltiptext:"Copied!",error:!0})),TextAlignCenter:()=>e("sqm-share-link",{textAlign:"center"}),TextAlignRight:()=>e("sqm-share-link",{textAlign:"right"}),CopyButton:()=>e(f,Object.assign({},{copyString:"https://noah.example.com",open:!1,tooltiptext:"Copied!",isCopyIcon:!1})),CopyButtonBelow:()=>e(f,Object.assign({},{copyString:"https://noah.example.com",open:!1,tooltiptext:"Copied!",buttonStyle:"button-below"})),FullStack:()=>e("sqm-share-link",null)}),Qn=Object.freeze({__proto__:null,default:{title:"Components/Big Stat",parameters:{scenario:'@author:sam\n@owner:sam\nFeature: Big Stat\n\n Big stat is a component for displaying a statistic as a large number with a label\n\n @minutia\n Scenario: Demo hook retrieves label using stat pattern\n Given isDemo() returns true\n And the component renders with props:\n | type |\n | /referralsCount |\n Then the label is: "REFERRALS - COUNT"\n And the value is: "12345"\n\n @minutia\n Scenario: Demo hook falls back to default label on invalid path\n Given isDemo() returns true\n And the component renders with props:\n | type |\n | a bad path |\n Then the label is: "Demo Label"\n And the value is: "12345"\n\n @motivating\n Scenario: Displays error on unrecognized path\n Given isDemo() returns false\n And the component renders with props:\n | type |\n | /(doesNotExistNopeNotHere) |\n Then the label is: "BAD PROP TYPE"\n And the value is: "!!!"\n\n @motivating\n Scenario Outline: Label displays correctly\n Given the type prop is set to <type>\n When the component renders\n Then the label is <label>\n Given isDemo() returns true\n When the component renders\n Then the label is <inferredLabel>\n Examples:\n | path | label | inferredLabel |\n | rewardsAssigned | Rewards Earned | Rewards Assigned |\n | rewardsRedeemed | Rewards Paid | Rewards Redeemed |\n | rewardsAvailable | Rewards Available | Rewards Available |\n | referralsCount | Referrals - Count | Referrals Count |\n | referralsMonth | Referrals - This Month | Referrals Month |\n | referralsWeek | Referrals - This Week | Referrals Week |\n | rewardsCount | Rewards - Count | Rewards Count |\n | rewardsMonth | Rewards - This Month | Rewards Month |\n | rewardsWeek | Rewards - This Week | Rewards Week |\n | rewardBalance | Balance - Credit Earned | Reward Balance |\n | customField | Custom Fields | Custom Fields |\n | programGoals | Program Goals | Program Goals |\n\n @motivating\n Scenario: Display user\'s credit\n Given isDemo() returns false\n And the user has earned 34 COFFEE from the program\n And the component renders with props:\n | type |\n | /rewardBalance/CREDIT/COFFEE/prettyValue |\n Then the label is: "Balance - Credit Earned"\n And the value is: "34 COFFEE"\n\n @minutia\n Scenario: Memoizes most recent query\n Given isDemo() returns false\n And the component\'s type prop is set to a variable named PATH\n And PATH is "/referralsWeek"\n Then the component shows a loading state before showing the result\n When the component reloads given some external reload\n Then the component doesn\'t show a loading state\n When PATH is set to "/rewardsWeek"\n Then the component shows a loading state before showing the result\n When PATH is set to "/referralsWeek"\n Then the component shows a loading state before showing the result\n\n @motivating\n Scenario: Stat has a loading state\n Given isDemo() returns false\n And the component\'s stat type prop is valid\n When the component renders\n Then The stat value displays "..."\n And when the stat query is completed\n And the stat value displays a value\n\n @motivating\n Scenario Outline: Program Goal stat requires metricType and goalId\n Given the statType prop is <statType>\n When the component renders\n Then the label is <label>\n And the stat value is <InvalidStatValue>\n Examples:\n | statType | label | InvalidStatValue |\n | /programGoals | BAD PROP TYPE | true |\n | /programGoals/count | BAD PROP TYPE | true |\n | /programGoals/conversionCount | BAD PROP TYPE | true |\n | /programGoals/My-Goal | BAD PROP TYPE | true |\n | /programGoals/count/My-Goal | Program Goals | false |\n | /programGoals/conversionCount/My-Goal | Program Goals | false |\n\n @motivating\n Scenario Outline: rewardCountFiltered supports many formats\n Given the statType begins with "/rewardCountFiltered"\n When the component renders with <statType>\n Then the stat <mayRender> a value\n Examples:\n | statType | mayRender |\n | /rewardsCountFiltered | renders |\n | /rewardsCountFiltered/COFFEE | doesn\'t render |\n | /rewardsCountFiltered/global | renders |\n | /rewardsCountFiltered/INTEGRATION | renders |\n | /rewardsCountFiltered/INTEGRATION/global | renders |\n | /rewardsCountFiltered/PCT_DISCOUNT | renders |\n | /rewardsCountFiltered/PCT_DISCOUNT/global | renders |\n | /rewardsCountFiltered/CREDIT | renders |\n | /rewardsCountFiltered/CREDIT/COFFEE | renders |\n | /rewardsCountFiltered/CREDIT/global | renders |\n | /rewardsCountFiltered/CREDIT/COFFEE/PENDING | renders |\n | /rewardsCountFiltered/CREDIT/COFFEE/AVAILABLE | renders |\n | /rewardsCountFiltered/CREDIT/CASH%2FUSD | renders |\n | /rewardsCountFiltered/CREDIT/CASH%2FUSD/global | renders |\n | /rewardsCountFiltered/CREDIT/CASH%2FUSD/PENDING | renders |\n | /rewardsCountFiltered/CREDIT/CASH%2FUSD/PENDING/global | renders |\n\n @motivating\n Scenario Outline: Program Goals and Reward units with currencies must be encoded\n Given the statType is <statType>\n When the stat is queried\n Then the stat is filtered by <decodedFilter>\n And a value <mayBe> rendered\n Examples:\n | statType | decodedFilter | may |\n | /rewardBalance/CREDIT/COFFEE | COFFEE | is |\n | /rewardBalance/CREDIT/CENTS | CENTS | is |\n | /rewardBalance/CREDIT/COFFEE%2FUSD | COFFEE/USD | is |\n | /rewardBalance/CREDIT/COFFEE/USD | COFFEE | is |\n | /rewardBalance/CREDIT/CASH | CASH | is |\n | /rewardBalance/CREDIT/CASH/USD | CASH | is |\n | /rewardBalance/CREDIT/CASH%2FUSD | CASH/USD | is |\n | /programGoals/count/My-Goal | My-Goal | is |\n | /programGoals/count/My-Goal/referrals | | isn\'t |\n | /programGoals/count/My-Goal%2Freferrals | My-Goal/referrals | is |\n\n @motivating\n Scenario Outline: User custom fields can be queried\n Given the StatType is <statType>\n When the stat is queried\n Then the value matches that of the users <customField>\n Examples:\n | statType | customField |\n | /customFields/videosShared | videosShared |\n | /customFields/totalPurchaseCount | totalPurchaseCount |\n\n @motivating\n Scenario Outline: Some stats can use a global value instead of filtered by program\n Given the stat <statName>\n Then the global value <mayBe> available\n Examples:\n | statName | mayBe |\n | referralsCount | isn\'t |\n | referralsMonth | isn\'t |\n | referralsWeek | isn\'t |\n | rewardsCount | is |\n | rewardsCountFiltered | is |\n | integrationRewardsCountFiltered | is |\n | rewardsMonth | is |\n | rewardsWeek | is |\n | rewardsAssigned | is |\n | rewardsRedeemed | is |\n | rewardsRedeemedWeek | is |\n | rewardsRedeemedMonth | is |\n | rewardsPending | is |\n | rewardsAvailable | is |\n | rewardBalance | is |\n\n @motivating\n Scenario Outline: referralsCount stat can be filtered by Converted and Started\n Given statType prop is <statType>\n Then the stat returned has a <filter>\n Examples:\n | statType | filter |\n | /referralsCount | { programId_eq: programId } |\n | /referralsCount/converted | { programId_eq: programId, dateConverted_exists: true } |\n | /referralsCount/started | { programId_eq: programId, dateConverted_exists: false } |\n\n @motivating\n Scenario: Program context is used by default to source the programId used for queries\n Given a valid "statType"\n And its not a global stat\n And the stat is loaded in an environment for "program-a"\n And the "program-id" prop is not used\n When the stat is queried\n Then the query is filtered by "{ programId_eq: \'program-a\' }"\n And only results from "program-a" are returned\n\n @motivating\n Scenario Outline: ProgramId can be specified to overwrite the program context default\n Given a valid "statType"\n And its not a global stat\n And the "program-id" prop has <value>\n When the stat is queried\n Then the query has a <filter>\n And only results from <value> are returned\n Examples:\n | value | filter |\n | program-b | { programId_eq: "program-b" } |\n | program-c | { programId_eq: "program-c" } |\n\n\n @motivating\n Scenario: "/rewardsReedemedWeek" stat shows rewards that have been redeemed this week\n Given a user reeemed the following rewards\n | reward | dateRedeemed | programId |\n | $1.00 USD | 2023-08-18 | A |\n | $1.00 CAD | 2023-08-18 | A |\n | $1.00 AUD | 2023-08-18 | A |\n | $1.00 USD | 2023-08-10 | A |\n | $20.00 USD | 2023-08-18 | B |\n | $20.00 CAD | 2023-08-18 | B |\n | $20.00 AUD | 2023-08-18 | B |\n | $20.00 USD | 2023-08-01 | B |\n | $20.00 GBP | 2023-08-01 | B |\n | $20.00 GBP | 2023-08-20 | |\n And the current date is "2023-08-22"\n And the program of the stat is <programId>\n And the statType is <statType>\n Then the stat displays <statValue>\n | programId | statType | statValue |\n | A | /rewardsReedemedWeek/CREDIT/USD | USD1.00 |\n | A | /rewardsReedemedWeek/CREDIT/CAD | CAD1.00 |\n | A | /rewardsReedemedWeek/CREDIT/AUD | AUD1.00 |\n | B | /rewardsReedemedWeek/CREDIT/USD | USD20.00 |\n | B | /rewardsReedemedWeek/CREDIT/CAD | CAD20.00 |\n | B | /rewardsReedemedWeek/CREDIT/AUD | AUD20.00 |\n | N/A | /rewardsReedemedWeek/CREDIT/USD/global | USD21.00 |\n | N/A | /rewardsReedemedWeek/CREDIT/CAD/global | CAD21.00 |\n | N/A | /rewardsReedemedWeek/CREDIT/GBP/global | GBP20.00 |\n\n @motivating\n Scenario: "/rewardsReedemedMonth" stat shows rewards that have been redeemed this month\n Given a user reeemed the following rewards\n | reward | dateRedeemed | programId |\n | $1.00 USD | 2023-08-18 | A |\n | $1.00 CAD | 2023-08-18 | A |\n | $1.00 AUD | 2023-08-18 | A |\n | $1.00 USD | 2023-07-31 | A |\n | $20.00 USD | 2023-08-18 | B |\n | $20.00 CAD | 2023-08-18 | B |\n | $20.00 AUD | 2023-08-18 | B |\n | $20.00 USD | 2023-08-01 | B |\n | $20.00 GBP | 2023-08-01 | B |\n | $20.00 GBP | 2023-08-20 | |\n | $20.00 GBP | 2023-07-31 | |\n And the current date is "2023-08-22"\n And the program of the stat is <programId>\n And the statType is <statType>\n Then the stat displays <statValue>\n | programId | statType | statValue |\n | A | /rewardsReedemedMonth/CREDIT/USD | USD1.00 |\n | A | /rewardsReedemedMonth/CREDIT/CAD | CAD1.00 |\n | A | /rewardsReedemedMonth/CREDIT/AUD | AUD1.00 |\n | B | /rewardsReedemedMonth/CREDIT/USD | USD20.00 |\n | B | /rewardsReedemedMonth/CREDIT/CAD | CAD20.00 |\n | B | /rewardsReedemedMonth/CREDIT/AUD | AUD20.00 |\n | N/A | /rewardsReedemedMonth/CREDIT/USD/global | USD41.00 |\n | N/A | /rewardsReedemedMonth/CREDIT/CAD/global | CAD21.00 |\n | N/A | /rewardsReedemedMonth/CREDIT/GBP/global | GBP40.00 |\n\n\n @landmine\n Scenario Outline: Rewards redeemed by week and month stats only include rewards that have been fully redeemed\n Given statType prop is <statType>\n And the user has fully redeemed a $50.00 USD reward\n And the user has redeemed <amountRedeemed> of a $50.00 USD reward\n Then the stat displays <statValue>\n Examples:\n | statType | amountRedeemed | statValue |\n | /rewardsRedeemed/CREDIT/USD/global | $0.00 | $50.00 |\n | /rewardsRedeemedWeek/CREDIT/USD/global | $0.00 | $50.00 |\n | /rewardsRedeemedMonth/CREDIT/USD/global | $0.00 | $50.00 |\n | /rewardsRedeemed/CREDIT/USD/global | $25.00 | $75.00 |\n | /rewardsRedeemedWeek/CREDIT/USD/global | $25.00 | $50.00 |\n | /rewardsRedeemedMonth/CREDIT/USD/global | $25.00 | $50.00 |\n | /rewardsRedeemed/CREDIT/USD/global | $50.00 | $100.00 |\n | /rewardsRedeemedWeek/CREDIT/USD/global | $50.00 | $100.00 |\n | /rewardsRedeemedMonth/CREDIT/USD/global | $50.00 | $100.00 |\n\n @landmine\n Scenario Outline: Rewards redeemed by week and month stats can only count up to 1000 redeemed rewards during the period\n Given statType prop is <statType>\n And the user has fully redeemed 1001 $1.00 USD rewards in the past <timeframe>\n Then the stat displays <statValue>\n Examples:\n | statType | timeframe | statValue |\n | /rewardsRedeemed/CREDIT/USD/global | N/A | $1001.00 |\n | /rewardsRedeemedWeek/CREDIT/USD/global | week | $1000.00 |\n | /rewardsRedeemedMonth/CREDIT/USD/global | month | $1000.00 |\n'}},Default:()=>e(_,Object.assign({},{value:99e4,statvalue:"9.900,00",loading:!1}),"Big stat"),LeftAlign:()=>e(_,Object.assign({},{value:500,statvalue:"500",alignment:"left",loading:!1}),"Big stat"),RightAlign:()=>e(_,Object.assign({},{value:500,statvalue:"500",alignment:"right",loading:!1}),"Big stat"),FlexReverse:()=>e(_,Object.assign({},{value:500,statvalue:"500",flexReverse:!0,loading:!1}),"Big stat"),FlexReverseRight:()=>e(_,Object.assign({},{value:500,statvalue:"500",flexReverse:!0,alignment:"right",loading:!1}),"Big stat"),FlexReverseLeft:()=>e(_,Object.assign({},{value:500,statvalue:"500",flexReverse:!0,alignment:"left",loading:!1}),"Big stat"),NoStatValue:()=>e(_,Object.assign({},{value:0,statvalue:"...",loading:!1}),"Big stat"),InvalidStatValue:()=>e(_,Object.assign({},{value:0,statvalue:"!!!",loading:!1}),"Big stat"),MultipleStats:()=>e("sqm-stat-container",{space:"xxx-large",display:"flex"},e("sqm-big-stat",{"flex-reverse":"true",alignment:"left","stat-type":"/referralsCount"},e("sqm-text",null,e("p",null,"Rewards Redeemed"))),e("sqm-big-stat",{"flex-reverse":"true",alignment:"left","stat-type":"/rewardsRedeemed/CREDIT/global"},e("sqm-text",null,e("p",null,"Rewards Redeemed"))),e("sqm-big-stat",{"flex-reverse":"true",alignment:"left","stat-type":"/rewardBalance/CREDIT/POINT/value/global"},e("sqm-text",null,e("p",null,"Points Balance"))))}),ea=[{firstName:"",lastInitial:"",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},{firstName:"Mos",lastInitial:"D",textValue:"46",rank:5,rowNumber:5},{firstName:"Joe",lastInitial:"S",textValue:"42",rank:6,rowNumber:6},{firstName:"Zach",lastInitial:"H",textValue:"41",rank:7,rowNumber:7},{firstName:"Sarah",lastInitial:"S",textValue:"39",rank:8,rowNumber:8},{firstName:"James",lastInitial:"",textValue:"33",rank:9,rowNumber:9},{firstName:"",lastInitial:"J",textValue:"29",rank:10,rowNumber:10}],ta=[{firstName:"Tom",lastInitial:"Smith",textValue:"82 Points",rank:1,rowNumber:1},{firstName:"MF",lastInitial:"D",textValue:"73 Points",rank:2,rowNumber:2},{firstName:"Freddie",lastInitial:"G",textValue:"64 Points",rank:3,rowNumber:3},{firstName:"Benny",lastInitial:"B",textValue:"55 Points",rank:4,rowNumber:4},{firstName:"Mos",lastInitial:"D",textValue:"46 Points",rank:5,rowNumber:5},{firstName:"Joe",lastInitial:"S",textValue:"42 Points",rank:6,rowNumber:6},{firstName:"Zach",lastInitial:"H",textValue:"41 Points",rank:7,rowNumber:7},{firstName:"Sarah",lastInitial:"S",textValue:"39 Points",rank:8,rowNumber:8},{firstName:"James",lastInitial:"",textValue:"33 Points",rank:9,rowNumber:9},{firstName:"",lastInitial:"J",textValue:"29 Points",rank:10,rowNumber:10}],na={usersheading:"User",statsheading:"Referrals",rankheading:"Rank",anonymousUser:"Anonymous User",viewingUserText:"You",rankSuffix:"{rank, selectordinal, one {#st} two {#nd} few {#rd} other {#th}}"},aa=(e("a",null,"Support"),{empty:e("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"})}),ra=Object.freeze({__proto__:null,default:{title:"Components/Leaderboard",parameters:{scenario:'@owner:noah @author:noah\nFeature: Leaderboard\n\tThe leaderboard supports three main cases\n\t- Top Started Referrers\n\t- Top Converted Referrers\n\t- Top Point Earners\n\tTo display these different types of leaderboards it uses the backends pre-canned options.\n\tThe backend supports filtering on programId and interval, programId is sourced from program context.\n\n Background: A user exists\n Given a user\n And they are viewing the leaderboard\n\n @motivating\n Scenario Outline: Two types of referrals leaderboards can be displayed\n Given a leaderboard has prop "leaderboard-type" with <value>\n And there are started referrals on the tenant\n And there are started converted on the tenant\n When the user views the leaderboard\n Then they see the referral <referralType> leaderboard\n\n Examples:\n | value | referralType |\n | topStartedReferrers | started |\n | topConvertedReferrers | converted |\n\n @motivating\n Scenario: The top point earners leaderboard can be displayed\n Given a leaderboard has prop "leaderboard-type" with value "topPointEarners"\n And there are users with points\n When the user views the leaderboard\n Then they see the top point earners leaderboard\n And text values are displayed for point counts\n\n @minutia\n Scenario Outline: Reward pretty value is used on the top point earners leaderboard\n Given top point earners leaderboard\n And the "POINT" reward unit has a pretty value for the following locales\n | locale |\n | en |\n | fr |\n | tr |\n When the user views the leaderboard\n And they have <locale>\n Then they see the translated pretty value in the stat value column\n\n @motivating\n Scenario Outline: Program Context is used by default to filter leaderboard results\n Given a <leaderboardType> leaderboard loaded with program context for "my-program"\n When the user views the leaderboard\n Then they only see <results> from "my-program"\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Program Id context can be overwritten with a prop\n Given a <leaderboardType> leaderboard has prop "program-Id" with value "my-test-program"\n When the user views the leaderboard\n Then they only see <results> from "my-test-program"\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Global leaderboards can be displayed by clearing program context\n\t\t#This is important for clients with use cases like StaffTracks global points leaderboard\n\t\t#This can also be done with a program section in a similar manner\n Given a <leaderboardType> leaderboard has prop "program-Id" with value ""\n When the user views the leaderboard\n Then they see global <results>\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario: Leaderboard results are shown in descending order\n Given there are leaderboard results\n When the user views the leaderboard\n Then they see up to the 10 top leaderboard results\n And leaderboard is in descending order\n\n @motivating\n Scenario Outline: Leaderboard results can be filtered with a time interval\n Given a <leaderboardType> leaderboard\n And it has prop "interval" with value "2021-11-02T07:00:00.000Z/2021-11-07T07:00:00.000Z"\n When the user views the leaderboard\n Then they only see <results> from within "2021-11-02T07:00:00.000Z/2021-11-07T07:00:00.000Z"\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Leaderboard rank type can be configured\n Given a leaderboard has prop "rank-type" with <value>\n When the user views the leaderboard\n Then their leaderboard rank is their <rank>\n\n Examples:\n | value | rank |\n | rowNumber | row number |\n | denseRank | dense rank |\n | rank | rank |\n\n @minutia\n Scenario Outline: The max number of leaderboard rows displayed can be configured but defaults to 10\n Given a leaderboard has prop "max-rows" with <value>\n And the leaderboard has <resultCount>\n When the user views the leaderboard\n Then they see <number> rows\n\n Examples:\n | value | resultCount | number |\n | | 10 | 10 |\n | 5 | 10 | 5 |\n | 3 | 1 | 1 |\n | 25 | 15 | 15 |\n\n @minutiae @ui\n Scenario: Leaderboards with no results show an empty state\n Given a leaderboard has no results\n When the user views the leaderboard\n Then an empty state is dislayed\n And they see an image of a leaderboard\n And below they see "View your rank in the leaderboard"\n And below they see "Be the first to refer a friend and reach the top of the leaderboard"\n And the text is center aligned\n\n @minutiae @ui\n Scenario: A custom empty state can be provided\n Given a leaderboard has no results\n When the user views the leaderboard\n Then the contents of the "empty" slot are displayed\n\n @minutiae @ui\n Scenario: User is on Essentials plan\n Given the user has an Essentials plan\n When they view the leaderboard\n Then a message telling them to upgrade their plan appears:\n """\n Contact Support to upgrade your plan and start leveraging\n gamification in your program.\n """\n And an empty table image is displayed\n\n @minutiae @ui\n Scenario: Leaderboard headings can be customized\n Given a leaderboard\n And it has the following props\n | prop | value |\n | rankheading | Place |\n | usersheading | Customer |\n | statsheading | Referral Count |\n | show-rank | true |\n When the user views the leaderboard\n Then they see the following columns with headings\n | column | heading |\n | rank | Place |\n | user | Customer |\n | stat | Referral Count |\n\n @motivating @ui\n Scenario Outline: Leaderboard rank can be hidden or shown\n Given a leaderboard\n And it has prop "show-rank" with <propValue>\n When the user views the leaderboard\n Then they <maySee> the rank column\n\n Examples:\n | propValue | maySee |\n | true | see |\n | false | don\'t see |\n | | don\'t see |\n\n Scenario Outline: Users names can be hidden or shown\n Given a leaderboard\n And it has prop "hide-names" with <propValue>\n When the user views the leaderboard\n Then they <maySee> the referrer column\n\n Examples:\n | propValue | maySee |\n | true | don\'t see |\n | false | see |\n | | see |\n\n @motivating @ui\n Scenario: Users in the top 10 of the leaderboard results see their leaderboard row highlighted\n Given a user in the top 10 of the leaderboard results\n When they view the leaderboard\n Then they see the row with their name highlighted with brand colour\n\n @motivating @ui\n Scenario Outline: Users not in the top 10 leaderboard results can see their progress at the bottom of the leaderboard\n Given a user <mayHave> completed actions counted by the leaderboard\n And they are not in the top 10 leaderboard results\n And the leaderboard has prop "show-user" with <value>\n When they view the leaderboard\n Then they <maySee> "..." under the top 10 leaderboard results\n And under "..." they <maySee> a row highlighted with brand colour\n And they <maySee> their name\n And they <maySee> their leaderboard value\n And they <maySeeRank>\n\n Examples:\n | mayHave | value | maySee | maySeeRank |\n | has | true | see | see their rank |\n | hasn\'t | true | see | don\'t see their rank |\n | N/A | false | don\'t see | don\'t see their rank |\n | hasn\'t | | see | don\'t see their rank |\n\n @minutiae\n Scenario: Users without names are displayed as an "Anonymous User"\n Given a user\n And they do not have a first name\n And they do not have a last initial\n When they view the leaderboard\n Then they see the user displayed as "Anonymous User"\n\n @minutiae\n Scenario Outline: If a user only has a first or last name, then only that is displayed\n Given a user\n And they only have a <name>\n When they view the leaderboard\n Then they only see their <name>\n\n Examples:\n | name |\n | firstName |\n | lastName |\n'}},Empty:()=>{const t={states:{loading:!1,hasLeaders:!1,styles:{...na}},data:{rankType:"rowNumber",leaderboard:[],rowNumber:10,viewerRank:{firstName:"Kutay",lastInitial:"C",textValue:"8",rowNumber:11,rank:23}},elements:{...aa}};return e(B,Object.assign({},t))},Loading:()=>{const t={states:{loading:!0,hasLeaders:!1,styles:{...na}},data:{rankType:"rowNumber",rowNumber:10,leaderboard:[]},elements:{...aa}};return e(B,Object.assign({},t))},Essentials:()=>{const t={states:{loading:!1,isEssentials:!0,hasLeaders:!1,styles:{...na}},data:{rankType:"rowNumber",leaderboard:[],rowNumber:10,viewerRank:{firstName:"Kutay",lastInitial:"C",textValue:"8",rowNumber:11,rank:23}},elements:{...aa}};return e(B,Object.assign({},t))},One:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na}},data:{rankType:"rowNumber",rowNumber:1,leaderboard:[{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1}],viewerRank:{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1}},elements:{...aa}};return e(B,Object.assign({},t))},Five:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na}},data:{rankType:"rowNumber",rowNumber:5,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},{firstName:"Mos",lastInitial:"D",textValue:"46",rank:5,rowNumber:5}],viewerRank:{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1}},elements:{...aa}};return e(B,Object.assign({},t))},ReferralLeaderboard:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na,rankheading:"Rank",usersheading:"User",statsheading:"Referrals",showRank:!1}},data:{rankType:"rowNumber",leaderboard:ea,rowNumber:10,viewerRank:{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1}},elements:{...aa}};return e(B,Object.assign({},t))},ReferralLeaderboardWithMaxWidth:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na,rankheading:"Rank",usersheading:"User",statsheading:"Referrals",showRank:!1,maxWidth:"300px"}},data:{rankType:"rowNumber",leaderboard:ea,rowNumber:10,viewerRank:{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1}},elements:{...aa}};return e(B,Object.assign({},t))},PointsLeaderboard:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na,rankheading:"Rank",usersheading:"User",statsheading:"Points",showRank:!1}},data:{rankType:"rowNumber",leaderboard:ta,rowNumber:10,viewerRank:{firstName:"Viktor",lastInitial:"V",textValue:"82 Points",rank:1,rowNumber:1}},elements:{...aa}};return e(B,Object.assign({},t))},TenWithRank:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na,showRank:!0}},data:{rankType:"rowNumber",leaderboard:ea,rowNumber:10,viewerRank:{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1}},elements:{...aa}};return e(B,Object.assign({},t))},ViewerOutside:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na,showRank:!0}},data:{rankType:"rowNumber",leaderboard:ea,rowNumber:10,viewerRank:{firstName:"Kutay",lastInitial:"C",textValue:"8",rowNumber:11,rank:24}},elements:{...aa}};return e(B,Object.assign({},t))},ViewerAnonymous:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na,showRank:!0}},data:{rankType:"rowNumber",leaderboard:ea,rowNumber:10,viewerRank:null},elements:{...aa}};return e(B,Object.assign({},t))},HideNamesWithViewerOutside:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na,showRank:!0,hideNames:!0}},data:{rankType:"rowNumber",leaderboard:ea,rowNumber:10,viewerRank:{textValue:"8",rowNumber:11,rank:42}},elements:{...aa}};return e(B,Object.assign({},t))},HideViewer:()=>{const t={states:{loading:!1,hasLeaders:!0,rowNumber:10,styles:{...na,showRank:!0,hideViewer:!0}},data:{rankType:"rowNumber",leaderboard:ea,rowNumber:10,viewerRank:{firstName:"Viktor",lastInitial:"V",textValue:"82",rowNumber:1,rank:1}},elements:{...aa}};return e(B,Object.assign({},t))},HideNames:()=>{const t={states:{loading:!1,hasLeaders:!0,rowNumber:10,styles:{...na,showRank:!0,hideNames:!0}},data:{rankType:"rowNumber",leaderboard:ea,rowNumber:10,viewerRank:{firstName:"Viktor",lastInitial:"V",textValue:"82",rowNumber:1,rank:1}},elements:{...aa}};return e(B,Object.assign({},t))},LeaderboardWithNoNamesAndGraphic:()=>e("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"center",width:"100%",gap:"50px"}},e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10px",maxWidth:"30%"}},e("sqm-image",{width:"70%",alignment:"center",imageUrl:"https://res.cloudinary.com/saasquatch-staging/image/upload/v1729728469/Leaderboard_image_z87lsm.png"}),e("h2",{style:{margin:"auto"}}," Top Performers"),e("p",{style:{margin:"0"}},"The leaderboard highlights the top performers in real-time. Stay motivated, stay competitive!")),e("sqm-leaderboard",{width:"300px",usersheading:"Referrer",statsheading:"Referrals","rank-type":"rank","leaderboard-type":"topStartedReferrers",rankheading:"Rank","show-rank":"true","hide-names":"true","hide-viewer":"true"},e("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"})))}),oa=({story:t},n)=>{var a;const r=null===(a=t.story.parameters)||void 0===a?void 0:a.hookStory;if(!r)return n;const o=Math.round(1e5*Math.random());return e("sqm-hook-story-container-"+o,null,e("sqm-hook-story-container",{hookStory:r}))};function ia(t){const n=()=>e("div",null);return n.parameters={hookStory:t},n}const sa=ia((()=>e("div",null,e("button",{onClick:()=>d.push("/")},"/"),e("button",{onClick:()=>d.push("/foo")},"/foo"),e("button",{onClick:()=>d.push("/bar")},"/bar"),e("button",{onClick:()=>d.push("/baz/bang")},"/baz/bang"),e("button",{onClick:()=>d.push("/refer")},"/refer"),e("button",{onClick:()=>d.push("/refer/1")},"/refer/1"),e("button",{onClick:()=>d.push("/refer/2")},"/refer/2"),e("button",{onClick:()=>d.back()},"Back"),e("button",{onClick:()=>d.forward()},"Forward"),e("hr",null),e("sqm-router",{innerHTML:'\n <template path="/foo"><h1>foo</h1>\n \n <p>These elements don\'t produce a specific box by themselves. They are replaced by their pseudo-box and their child boxes. Please note that the CSS Display Level 3 spec defines how the contents value should affect "unusual elements" — elements that aren’t rendered purely by CSS box concepts such as replaced elements. See Appendix B: Effects of display: contents on Unusual Elements for more details.\n\n Due to a bug in browsers this will currently remove the element from the accessibility tree — screen readers will not look at what\'s inside. See the Accessibility concerns section below for more details.</p>\n </template>\n <template path="/bar"><h2>bar</h2>\n \n <p>Turns off the display of an element so that it has no effect on layout (the document is rendered as though the element did not exist). All descendant elements also have their display turned off.\n To have an element take up the space that it would normally take, but without actually rendering anything, use the visibility property instead.</p>\n </template>\n <template path="/baz/bang"><h3>baz/bang</h3>\n <pre>\n ▄▄▄▄▄▄▄░▄▄▄▄▄▄▄░▄▄▄▄▄▄░▄▄▄▄▄\n ░░▀███░░░░▀██░░░░██▀░░░░██░░\n ░░░▀██░░░░░▀██░░▄█░░░░░▄█░░░\n ░░░░███░░░░░▀██▄█░░░░░░█░░░░\n ░░░░░███░░░░░▀██░░░░░░█▀░░░░\n ░░░░░░███░░░░▄███░░░░█▀░░░░░\n ░░░░░░░██▄░░▄▀░███░░█▀░░░░░░\n ░░░░░░░▀██▄█▀░░░███▄▀░░░░░░░\n ░░░░░░░░▀██▀░░░░░███░░░░░░░░\n ░░░░░░░░░▀▀░░░░░░░▀░░░░░░░░░\n </pre>\n </template>\n <template path="/refer/:page"><h3>/refer/:page</h3>\n <pre>\n refer/:page\n </pre>\n </template>\n'})))),la=ia((()=>e("div",null,e("button",{onClick:()=>d.push("/")},"/"),e("button",{onClick:()=>d.push("/foo")},"/foo"),e("button",{onClick:()=>d.push("/bar")},"/bar"),e("button",{onClick:()=>d.push("/baz/bang")},"/baz/bang"),e("button",{onClick:()=>d.push("/refer")},"/refer"),e("button",{onClick:()=>d.push("/refer/1")},"/refer/1"),e("button",{onClick:()=>d.push("/refer/2")},"/refer/2"),e("button",{onClick:()=>d.back()},"Back"),e("button",{onClick:()=>d.forward()},"Forward"),e("hr",null),e("sqm-router",{innerHTML:'\n <sqm-route path="/foo"><h1>foo</h1>\n \n <p>These elements don\'t produce a specific box by themselves. They are replaced by their pseudo-box and their child boxes. Please note that the CSS Display Level 3 spec defines how the contents value should affect "unusual elements" — elements that aren’t rendered purely by CSS box concepts such as replaced elements. See Appendix B: Effects of display: contents on Unusual Elements for more details.\n\n Due to a bug in browsers this will currently remove the element from the accessibility tree — screen readers will not look at what\'s inside. See the Accessibility concerns section below for more details.</p>\n </sqm-route>\n <sqm-route path="/bar"><h2>bar</h2>\n <p>Turns off the display of an element so that it has no effect on layout (the document is rendered as though the element did not exist). All descendant elements also have their display turned off.\n To have an element take up the space that it would normally take, but without actually rendering anything, use the visibility property instead.</p>\n </sqm-route>\n <sqm-route path="/baz/bang"><h3>baz/bang</h3>\n <pre>\n ▄▄▄▄▄▄▄░▄▄▄▄▄▄▄░▄▄▄▄▄▄░▄▄▄▄▄\n ░░▀███░░░░▀██░░░░██▀░░░░██░░\n ░░░▀██░░░░░▀██░░▄█░░░░░▄█░░░\n ░░░░███░░░░░▀██▄█░░░░░░█░░░░\n ░░░░░███░░░░░▀██░░░░░░█▀░░░░\n ░░░░░░███░░░░▄███░░░░█▀░░░░░\n ░░░░░░░██▄░░▄▀░███░░█▀░░░░░░\n ░░░░░░░▀██▄█▀░░░███▄▀░░░░░░░\n ░░░░░░░░▀██▀░░░░░███░░░░░░░░\n ░░░░░░░░░▀▀░░░░░░░▀░░░░░░░░░\n </pre>\n </sqm-route>\n <sqm-route path="/refer/:page"><h3>/refer/:page</h3>\n <pre>\n refer/:page\n </pre>\n </sqm-route>\n'})))),da=ia((()=>e("div",null,e("button",{onClick:()=>d.push("/")},"/"),e("button",{onClick:()=>d.push("/foo")},"/foo"),e("hr",null),e("div",{style:{display:"flex",justifyContent:"space-around"}},e("sqm-router",{innerHTML:'<template path="/">\n \n <div>Column 1</div>\n <div>Column 2 </div>\n </template>'})))));function ua(t){const{states:n,callbacks:a}=t;return[e("textarea",{style:{width:"100%",height:"300px"},onChange:e=>a.setEditedTemplate(e.target.value)},n.editedTemplate),e("button",{onClick:()=>a.setPreviewTemplate(n.editedTemplate)},"Update Preview"),e("label",null,"Current path:",e("input",{onInput:a.setPath,value:"/"})),e("div",{innerHTML:n.previewTemplate})]}const ca=ia((()=>{const{states:t,callbacks:n}=function(e){const[t,n]=o(e),[a,r]=o(e);return{states:{previewTemplate:a,editedTemplate:t},callbacks:{setEditedTemplate:n,setPreviewTemplate:r,setPath:function(e){d.push(e.target.value)}}}}('\n<sqm-router>\n <template path="/">\n <div>hello world</div>\n </template>\n</sqm-router>\n');return e(ua,{states:t,callbacks:n})})),ma=Object.freeze({__proto__:null,default:{title:"Tests/Router"},TemplateNavigation:sa,RouteNavigation:la,Styling:da,RouterPlayground:ca}),pa=Object.freeze({__proto__:null,default:{title:"Components/Leaderboard Rank",parameters:{scenario:'@owner:noah\n@author:noah\nFeature: Leaderboard Rank\n\n The leaderboard rank components displays the current users rank on the leaderboard.\n\n @minutiae\n Scenario: Users without a rank are shown a generic message\n Given a user has no rank\n Then the component displays a generic message\n And the message is the string from the prop "unrankedText"\n\n @motivating\n Scenario: Users with a rank are shown a message containing their rank\n Given a user has a valid rank\n And the prop "rankText" is an ICU message\n Then the ICU message is parsed to include the user\'s rank\n And the parsed message is displayed to the users\n\n @motivating\n Scenario Outline: Ranks from any of the three standard leaderboards can be displayed\n Given a leaderboard rank component with <leaderboardType>\n And a user has a valid rank\n When they view the leaderboard rank component\n Then they see their rank for <leaderboardType>\n Examples:\n | leaderboardType |\n | topStartedReferrers |\n | topConvertedReferrers |\n | topPointEarners |\n\n @motivating\n Scenario Outline: Leaderboard rank can be filtered with a time interval\n Given a leaderboard rank component with <leaderboardType>\n And it has prop "interval" with value "2021-11-02T07:00:00.000Z/2021-11-07T07:00:00.000Z"\n When they view the leaderboard rank component\n Then they see their rank for <results> from within "2021-11-02T07:00:00.000Z/2021-11-07T07:00:00.000Z"\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Program Context is used by default to filter leaderboard rank\n Given a <leaderboardType> leaderboard rank component loaded with program context for "my-program"\n When they view the leaderboard rank component\n Then they see their rank for <leaderboardType> from "my-program"\n Examples:\n | leaderboardType |\n | topStartedReferrers |\n | topConvertedReferrers |\n | topPointEarners |\n\n @motivating\n Scenario Outline: Program Id context can be overwritten with a prop\n Given a <leaderboardType> leaderboard rank component has prop "program-Id" with value "my-test-program"\n When they view the leaderboard rank component\n Then they see their rank for <leaderboardType> from "my-test-program"\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Global leaderboards ranks can be displayed by clearing program context\n #This can also be done with a program section in a similar manner\n Given a <leaderboardType> leaderboard rank component has prop "program-Id" with value ""\n When they view the leaderboard rank component\n Then they see global <results> rank\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario: Rank calculation is controlled by the "rankType" prop\n Given the current user is User C\n And User C has <points>\n And User A has <points>\n And User B has <points>\n And the value of the "rankType" prop is <rankType>\n Then the rank of the current user is <rank>\n Examples:\n | user | points | rankType | rank |\n | User A | 5 | rowNumber | 3 |\n | User B | 10 | rowNumber | 1 |\n | User C | 10 | rowNumber | 2 |\n\n | user | points | rankType | rank |\n | User A | 10 | rank | 1 |\n | User B | 10 | rank | 1 |\n | User C | 5 | rank | 3 |\n\n | user | points | rankType | rank |\n | User A | 10 | denseRank | 1 |\n | User B | 10 | denseRank | 1 |\n | User C | 5 | denseRank | 2 |'}},First:()=>e("p",null,"Your rank is ",e(E,Object.assign({},{data:{rank:"1st"}}))," on the leaderboard"),Second:()=>e("p",null,"Your rank is ",e(E,Object.assign({},{data:{rank:"2nd"}}))," on the leaderboard"),Unranked:()=>e("p",null,"You are currently ",e(E,Object.assign({},{data:{rank:"unranked"}})),", refer a friend!")}),ha={data:{footer:e("span",null,"example@example.com"),header:e("div",{slot:"header",style:{display:"flex",flexDirection:"column"}},e("span",{style:{fontSize:"var(--sl-font-size-large)",fontWeight:"bold"}},"Microsite Header"),e("span",{style:{fontSize:"var(--sl-font-size-small)"}},"A description for the microsite"))},callbacks:{rerender:()=>{}},ref:{current:void 0}},ga=Object.freeze({__proto__:null,default:{title:"Components/Microsite Frame"},FrameWithMenu:()=>{const t={...ha};return e(G,Object.assign({},t),e("sqm-navigation-menu",{"menu-label":"Menu"},e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/widget"},"Dashboard"),e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/editProfile"},"Edit Profile"),e("sl-menu-divider",null),e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/logout"},"Logout")))},FrameWithoutMenu:()=>{const t={...ha};return e(G,Object.assign({},t))},FullStackFrame:()=>{var t;return function(){const e="worried-camera@uexwltgh.mailosaur.net";window.SquatchAndroid=!0,window.widgetIdent={tenantAlias:"test_as36zjtpfy7oo",appDomain:"https://staging.referralsaasquatch.com",token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6IndvcnJpZWQtY2FtZXJhQHVleHdsdGdoLm1haWxvc2F1ci5uZXQiLCJpZCI6IndvcnJpZWQtY2FtZXJhQHVleHdsdGdoLm1haWxvc2F1ci5uZXQifX0.-WGV4_bzGCFp-OTIO-h-yp0MlgtkdufT_GgI4T691OY",userId:e,accountId:"worried-camera@uexwltgh.mailosaur.net",programId:"a-referral-program"}}(),e("div",null,e("sqm-portal-frame",null,e("div",{slot:"header",style:{display:"flex",flexDirection:"column"}},e("span",{style:{fontSize:"var(--sl-font-size-large)",fontWeight:"bold"}},"Portal Header"),e("span",{style:{fontSize:"var(--sl-font-size-small)"}},"A description for the portal")),e("a",{slot:"footer",class:"FooterEmail",href:"mailto:referrals@servicetitan.com"},"referrals@servicetitan.com"),e("sqm-navigation-menu",{"menu-label":"Menu"},e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/widget"},"Dashboard"),e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/editProfile"},"Edit Profile"),e("sl-menu-divider",null),e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/logout"},"Logout")),e("h1",null,"Something")),e("p",null,"Current path:"," ",e("code",null,e("strong",null,null===(t=u())||void 0===t?void 0:t.pathname))),e("button",{onClick:d.back},"Go Back"))},FullStackFrameLoggedOut:()=>{var t;return window.SquatchAndroid=!0,window.widgetIdent={tenantAlias:"test_as36zjtpfy7oo",appDomain:"https://staging.referralsaasquatch.com",programId:"a-referral-program"},e("div",null,e("sqm-portal-frame",null,e("div",{slot:"header",style:{display:"flex",flexDirection:"column"}},e("span",{style:{fontSize:"var(--sl-font-size-large)",fontWeight:"bold"}},"Portal Header"),e("span",{style:{fontSize:"var(--sl-font-size-small)"}},"A description for the portal")),e("span",{slot:"footer"},"sample@example.com"),e("sqm-navigation-menu",{"menu-label":"Menu"},e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/widget"},"Dashboard"),e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/editProfile"},"Edit Profile"),e("sl-menu-divider",null),e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/logout"},"Logout")),e("h1",null,"Something")),e("p",null,"Current path:"," ",e("code",null,e("strong",null,null===(t=u())||void 0===t?void 0:t.pathname))),e("button",{onClick:d.back},"Go Back"))}}),fa={states:{loading:!1,submitDisabled:!1,formState:{currentRegion:"Canada",firstName:"Bill",lastName:"Bob",errors:{},error:"An error string"},user:{firstName:"Bill",lastName:"Bob",email:"billbob@example.com"},showEdit:!1,text:{editprofileheader:"Edit Profile",editprofiletext:"Update your profile.",firstnametext:"Bill",lastnametext:"Bob",canceltext:"Cancel",updatetext:"Update",currentregiontext:"Canada"}},callbacks:{onSubmit:e=>{console.log(e)},resetForm:()=>{console.log("reset")},onChange:()=>{console.log("change")},setShowEdit:e=>{console.log(e)}}},ba=Object.freeze({__proto__:null,default:{title:"Components/Edit Profile Form"},EditProfileFormDisabled:()=>e(j,Object.assign({},fa)),EditProfileFormEnabled:()=>{const t={...fa,states:{...fa.states,showEdit:!0}};return e(j,Object.assign({},t))},FullStackFrameWithMenu:()=>e("sqm-edit-profile",{editprofileheader:"Edit Profile",editprofiletext:"Update your profile.",firstnametext:"Bill",lastnametext:"Bob",canceltext:"Cancel",updatetext:"Update",currentregiontext:"Current Region",showregion:!0})});function wa(){window.widgetIdent={tenantAlias:"test_a74miwdpofztj",appDomain:"https://staging.referralsaasquatch.com",programId:"klip-referral-program"},i((()=>(c({accountId:"zach.harrison@referralsaasquatch.com",id:"zach.harrison@referralsaasquatch.com",jwt:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoiemFjaC5oYXJyaXNvbkByZWZlcnJhbHNhYXNxdWF0Y2guY29tIiwiYWNjb3VudElkIjoiemFjaC5oYXJyaXNvbkByZWZlcnJhbHNhYXNxdWF0Y2guY29tIn19.Wi8Vd5r64g5n8VNhiY-v5cqFcLwGxPG3Wi3dVSfkFZI"}),()=>{window.widgetIdent=void 0,c(void 0)})),[])}const xa=ia((()=>{wa();const t=M({programId:"klip-referral-program",tooltiplifespan:0,tooltiptext:""});return e("div",null,"Sharelink:"," ",e("code",{style:{borderStyle:"solid",borderWidth:"1px",padding:"2px"}},t.copyString))})),ya=ia((()=>(wa(),e(f,Object.assign({},M({programId:"klip-referral-program",tooltiptext:"Copied to clipboard",tooltiplifespan:1e3})))))),va=ia((()=>(wa(),e(f,Object.assign({},M({programId:"klip-referral-program",tooltiptext:"⠀⠀⠀⠀⠀⠀⠀⠀⠀HELLO THERE!!!\n⠀⠀⠀⡯⡯⡾⠝⠘⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢊⠘⡮⣣⠪⠢⡑⡌\n⠀⠀⠀⠟⠝⠈⠀⠀⠀⠡⠀⠠⢈⠠⢐⢠⢂⢔⣐⢄⡂⢔⠀⡁⢉⠸⢨⢑⠕⡌\n⠀⠀⡀⠁⠀⠀⠀⡀⢂⠡⠈⡔⣕⢮⣳⢯⣿⣻⣟⣯⣯⢷⣫⣆⡂⠀⠀⢐⠑⡌\n⢀⠠⠐⠈⠀⢀⢂⠢⡂⠕⡁⣝⢮⣳⢽⡽⣾⣻⣿⣯⡯⣟⣞⢾⢜⢆⠀⡀⠀⠪\n⣬⠂⠀⠀⢀⢂⢪⠨⢂⠥⣺⡪⣗⢗⣽⢽⡯⣿⣽⣷⢿⡽⡾⡽⣝⢎⠀⠀⠀⢡\n⣿⠀⠀⠀⢂⠢⢂⢥⢱⡹⣪⢞⡵⣻⡪⡯⡯⣟⡾⣿⣻⡽⣯⡻⣪⠧⠑⠀⠁⢐\n⣿⠀⠀⠀⠢⢑⠠⠑⠕⡝⡎⡗⡝⡎⣞⢽⡹⣕⢯⢻⠹⡹⢚⠝⡷⡽⡨⠀⠀⢔\n⣿⡯⠀⢈⠈⢄⠂⠂⠐⠀⠌⠠⢑⠱⡱⡱⡑⢔⠁⠀⡀⠐⠐⠐⡡⡹⣪⠀⠀⢘\n⣿⣽⠀⡀⡊⠀⠐⠨⠈⡁⠂⢈⠠⡱⡽⣷⡑⠁⠠⠑⠀⢉⢇⣤⢘⣪⢽⠀⢌⢎\n⣿⢾⠀⢌⠌⠀⡁⠢⠂⠐⡀⠀⢀⢳⢽⣽⡺⣨⢄⣑⢉⢃⢭⡲⣕⡭⣹⠠⢐⢗\n⣿⡗⠀⠢⠡⡱⡸⣔⢵⢱⢸⠈⠀⡪⣳⣳⢹⢜⡵⣱⢱⡱⣳⡹⣵⣻⢔⢅⢬⡷\n⣷⡇⡂⠡⡑⢕⢕⠕⡑⠡⢂⢊⢐⢕⡝⡮⡧⡳⣝⢴⡐⣁⠃⡫⡒⣕⢏⡮⣷⡟\n⣷⣻⣅⠑⢌⠢⠁⢐⠠⠑⡐⠐⠌⡪⠮⡫⠪⡪⡪⣺⢸⠰⠡⠠⠐⢱⠨⡪⡪⡰\n⣯⢷⣟⣇⡂⡂⡌⡀⠀⠁⡂⠅⠂⠀⡑⡄⢇⠇⢝⡨⡠⡁⢐⠠⢀⢪⡐⡜⡪⡊\n⣿⢽⡾⢹⡄⠕⡅⢇⠂⠑⣴⡬⣬⣬⣆⢮⣦⣷⣵⣷⡗⢃⢮⠱⡸⢰⢱⢸⢨⢌\n⣯⢯⣟⠸⣳⡅⠜⠔⡌⡐⠈⠻⠟⣿⢿⣿⣿⠿⡻⣃⠢⣱⡳⡱⡩⢢⠣⡃⠢⠁\n⡯⣟⣞⡇⡿⣽⡪⡘⡰⠨⢐⢀⠢⢢⢄⢤⣰⠼⡾⢕⢕⡵⣝⠎⢌⢪⠪⡘⡌⠀\n⡯⣳⠯⠚⢊⠡⡂⢂⠨⠊⠔⡑⠬⡸⣘⢬⢪⣪⡺⡼⣕⢯⢞⢕⢝⠎⢻⢼⣀⠀\n⠁⡂⠔⡁⡢⠣⢀⠢⠀⠅⠱⡐⡱⡘⡔⡕⡕⣲⡹⣎⡮⡏⡑⢜⢼⡱⢩⣗⣯⣟\n⢀⢂⢑⠀⡂⡃⠅⠊⢄⢑⠠⠑⢕⢕⢝⢮⢺⢕⢟⢮⢊⢢⢱⢄⠃⣇⣞⢞⣞⢾\n⢀⠢⡑⡀⢂⢊⠠⠁⡂⡐⠀⠅⡈⠪⠪⠪⠣⠫⠑⡁⢔⠕⣜⣜⢦⡰⡎⡯⡾⡽",tooltiplifespan:500})))))),qa=Object.freeze({__proto__:null,default:{title:"Hooks / useShareLink"},BareBonesView:xa,RegularView:ya,FastTooltip:va});function Ea(){window.widgetIdent={tenantAlias:"test_a8b41jotf8a1v",appDomain:"https://staging.referralsaasquatch.com",programId:"sam-partner-test-2"},i((()=>(c({accountId:"testestest",id:"testestest",jwt:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs"}),()=>{window.widgetIdent=void 0,c(void 0)})),[])}const Aa=ia((()=>{Ea();const t="sam-partner-test-2",n=[U({programId:t,medium:"facebook"}),U({programId:t,medium:"twitter"}),U({programId:t,medium:"email"}),U({programId:t,medium:"direct"}),U({programId:t,medium:"sms"})];return e("div",null,n.map((t=>e("div",null,e("button",{onClick:t.onClick},"Share link (",t.medium,")")))))})),Ca=ia((()=>(Ea(),e("div",null,["facebook","twitter","email","direct","sms"].map((t=>e("div",null,e("sqm-share-button",Object.assign({},{programId:"sam-partner-test-2",medium:t}),"BUTTON_TEXT")))))))),ka=Object.freeze({__proto__:null,default:{title:"Hooks / useShareButton"},BareBonesView:Aa,RegularView:Ca}),Ta=(t,n,a)=>(window.widgetIdent={tenantAlias:"test_a74miwdpofztj",appDomain:"https://staging.referralsaasquatch.com",programId:"klip-referral-program"},i((()=>(c({accountId:"zach.harrison@referralsaasquatch.com",id:"zach.harrison@referralsaasquatch.com",jwt:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoiemFjaC5oYXJyaXNvbkByZWZlcnJhbHNhYXNxdWF0Y2guY29tIiwiYWNjb3VudElkIjoiemFjaC5oYXJyaXNvbkByZWZlcnJhbHNhYXNxdWF0Y2guY29tIn19.Wi8Vd5r64g5n8VNhiY-v5cqFcLwGxPG3Wi3dVSfkFZI"}),()=>{window.widgetIdent=void 0,c(void 0)})),[]),e("div",null,e("b",null,"Stat format:"),e("pre",null,n),e("br",null),e("b",null,"Stat selected:")," ",e("pre",{style:{color:"green"}},t),e("sqm-big-stat",{"stat-type":t},a))),Da=ia((()=>{const[t,n]=o("/someRandomThing/with/someArguments/1234"),{props:a,label:r}=W({statType:t,render:()=>{},disconnectedCallback:()=>{},ignored:!0});return e("div",null,e("div",null,"Stat type:"," ",e("input",{style:{width:"300px"},type:"text",value:t,onInput:e=>n(e.target.value)})),e("hr",null),e("div",null,e(_,Object.assign({},a),r)))})),Ra=ia((()=>Ta("/referralsCount","/(referralsCount)/:status?"))),Sa=ia((()=>Ta("/referralsCount/converted","/(referralsCount)/:status?"))),Pa=ia((()=>Ta("/referralsCount/started","/(referralsCount)/:status?"))),Ia=ia((()=>Ta("/referralsMonth","/(referralsMonth)"))),Fa=ia((()=>Ta("/referralsWeek","/(referralsWeek)"))),Na=ia((()=>Ta("/rewardsCount","/(rewardsCount)/:global?"))),Oa=ia((()=>Ta("/rewardsCount/global","/(rewardsCount)/:global"))),La=ia((()=>Ta("/rewardsCountFiltered/global","/(rewardsCountFiltered)/:statType([INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),Ba=ia((()=>Ta("/rewardsCountFiltered/PCT_DISCOUNT/global","/(rewardsCountFiltered)/:statType([INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),_a=ia((()=>Ta("/rewardsCountFiltered/PCT_DISCOUNT/PENDING/global","/(rewardsCountFiltered)/:statType([INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),Ga=ia((()=>Ta("/rewardsCountFiltered/CREDIT/COFFEE","/(rewardsCountFiltered)/:statType([INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),ja=ia((()=>Ta("/rewardsCountFiltered/CREDIT/COFFEE/global","/(rewardsCountFiltered)/:statType([INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),Ma=ia((()=>Ta("/rewardsCountFiltered/CREDIT/COFFEE/PENDING/global","/(rewardsCountFiltered)/:statType([INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),Ua=ia((()=>Ta("/rewardsCountFiltered/AVAILABLE","/(rewardsCountFiltered)/:statType([INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),Wa=ia((()=>Ta("/integrationRewardsCountFiltered/AVAILABLE/global","/(integrationRewardsCountFiltered)/:format([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),Va=ia((()=>Ta("/integrationRewardsCountFiltered/PENDING/global","/(integrationRewardsCountFiltered)/:format([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),Ha=ia((()=>Ta("/rewardsMonth","/(rewardsMonth)/:global?"))),za=ia((()=>Ta("/rewardsWeek","/(rewardsWeek)/:global?"))),Ya=ia((()=>Ta("/rewardsAssigned/CREDIT/COFFEE","/(rewardsAssigned)/:statType/:unit/:global?"))),$a=ia((()=>Ta("/rewardsAssigned/CREDIT/CASH%2FUSD","/(rewardsAssigned)/:statType/:unit/:global?"))),Xa=ia((()=>Ta("/rewardsPending/CREDIT/USD","/(rewardsPending)/:statType/:unit/:global?"))),Ja=ia((()=>Ta("/rewardsPending/CREDIT/USD/global","/(rewardsPending)/:statType/:unit/:global?"))),Ka=ia((()=>Ta("/rewardsRedeemed/CREDIT/USD","/(rewardsRedeemed)/:statType/:unit/:global?"))),Za=ia((()=>Ta("/rewardsRedeemedWeek/CREDIT/USD","/(rewardsRedeemedWeek)/:statType/:unit/:global?"))),Qa=ia((()=>Ta("/rewardsRedeemedMonth/CREDIT/USD","/(rewardsRedeemedMonth)/:statType/:unit/:global?"))),er=ia((()=>Ta("/rewardsRedeemed/CREDIT/USD/global","/(rewardsRedeemed)/:statType/:unit/:global?"))),tr=ia((()=>Ta("/rewardsRedeemedWeek/CREDIT/USD/global","/(rewardsRedeemedWeek)/:statType/:unit/:global?"))),nr=ia((()=>Ta("/rewardsRedeemedMonth/CREDIT/USD/global","/(rewardsRedeemedMonth)/:statType/:unit/:global?"))),ar=ia((()=>Ta("/rewardsAvailable/CREDIT/COFFEE","/(rewardsAvailable)/:statType/:unit/:global?"))),rr=ia((()=>Ta("/rewardsAvailable/CREDIT/CASH%2FUSD","/(rewardsAvailable)/:statType/:unit/:global?"))),or=ia((()=>Ta("/rewardBalance/CREDIT/COFFEE/prettyValue","/(rewardBalance)/:statType/:unit/:format([prettyValue|value]*)?/:global?"))),ir=ia((()=>{const e=encodeURIComponent("CASH/USD");return Ta(`/rewardBalance/CREDIT/${e}/prettyValue`,"/(rewardBalance)/:statType/:unit/:format([prettyValue|value]*)?/:global?")})),sr=ia((()=>{const e=encodeURIComponent("Paid-Member-Goal/referrals");return Ta(`/programGoals/count/${e}`,"/(programGoals)/:metricType/:goalId")})),lr=ia((()=>Ta("/customFields/thingCount","/(customFields)/:customField"))),dr=ia((()=>Ta("/customFields/thingCount","/(customFields)/:customField",e("sqm-text",null,"Thing Count")))),ur=ia((()=>Ta("/customFields/thingCount","/(customFields)/:customField"," "))),cr=ia((()=>Ta("/customFields/thingCount","/(customFields)/:customField","\n "))),mr=ia((()=>Ta("/customFields/thingCount","/(customFields)/:customField","Thing Count"))),pr=ia((()=>Ta("/traffic","/(traffic)"))),hr=ia((()=>Ta("/userStats/traffic","/(userStat)/:statId","Traffic"))),gr=ia((()=>Ta("/userStats/referrals","/(userStat)/:statId","Referrals"))),fr=ia((()=>Ta("/userStats/conversions","/(userStat)/:statId","Conversions"))),br=ia((()=>Ta("/userStats/goals","/(userStat)/:statId","Goals"))),wr=ia((()=>Ta("/userStats/rewards","/(userStat)/:statId","Rewards"))),xr=ia((()=>Ta("/userStats/widgetLoads","/(userStat)/:statId","Widget Loads"))),yr=ia((()=>Ta("/userStats/revenue","/(userStat)/:statId","Revenue"))),vr=ia((()=>Ta("/userStats/generatedRevenue","/(userStat)/:statId","Generated Revenue"))),qr=ia((()=>Ta("/userStats/referredRevenue","/(userStat)/:statId","Referred Revenue"))),Er=ia((()=>Ta("/payoutBalance","/(payoutBalance)"))),Ar=Object.freeze({__proto__:null,default:{title:"Hooks / useBigStat"},Demo:Da,ReferralsCount:Ra,referralsConvertedCount:Sa,referralsStartedCount:Pa,ReferralsMonth:Ia,ReferralsWeek:Fa,RewardsCount:Na,GlobalRewardsCount:Oa,GlobalRewardsCountFiltered:La,GlobalRewardsCountPctDiscount:Ba,GlobalRewardsCountPctDiscountPending:_a,RewardsCountByUnit:Ga,GlobalRewardsCountByUnit:ja,GlobalPendingRewardsCount:Ma,RewardsAvailableCount:Ua,GlobalRewardsCountByIntegration:Wa,GlobalRewardsCountByPendingIntegration:Va,RewardsMonth:Ha,RewardsWeek:za,RewardsAssigned:Ya,RewardsAssignedCashUSD:$a,RewardsPending:Xa,RewardsPendingGlobal:Ja,RewardsRedeemed:Ka,RewardsRedeemedWeek:Za,RewardsRedeemedMonth:Qa,RewardsRedeemedGlobal:er,RewardsRedeemedWeekGlobal:tr,RewardsRedeemedMonthGlobal:nr,RewardsAvailable:ar,RewardsAvailableWithSlash:rr,RewardBalance:or,RewardBalanceCashUSD:ir,ProgramGoals:sr,CustomField:lr,CustomFieldWithLabel:dr,CustomFieldWithEmptyLabel:ur,CustomFieldWithEmptySpaceLabel:cr,CustomFieldWithTextLabel:mr,Traffic:pr,TrafficTwo:hr,Referrals:gr,Conversions:fr,Goals:br,Rewards:wr,WidgetLoads:xr,Revenue:yr,GeneratedRevenue:vr,ReferredRevenue:qr,PayoutBalance:Er}),Cr=ia((()=>(window.widgetIdent={tenantAlias:"test_as36zjtpfy7oo",appDomain:"https://staging.referralsaasquatch.com",programId:"a-referral-program"},i((()=>(c({accountId:"worried-camera@uexwltgh.mailosaur.net",id:"worried-camera@uexwltgh.mailosaur.net",jwt:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6IndvcnJpZWQtY2FtZXJhQHVleHdsdGdoLm1haWxvc2F1ci5uZXQiLCJpZCI6IndvcnJpZWQtY2FtZXJhQHVleHdsdGdoLm1haWxvc2F1ci5uZXQiLCJmaXJzdE5hbWUiOiJ0ZXN0IiwibGFzdE5hbWUiOiJ0ZXN0In19.ziDWbdCwsTo1ijxl8d2__Ga-6iFOVShaJUPp2ZBMeO0"}),()=>{window.widgetIdent=void 0,c(void 0)})),[]),e("sqm-edit-profile",Object.assign({},{editprofileheader:"HEADER",editprofiletext:"TEXT",firstnametext:"FIRST NAME",lastnametext:"LAST NAME",canceltext:"CANCEL",updatetext:"UPDATE",currentregiontext:"CURRENT REGION TEXT"}))))),kr=Object.freeze({__proto__:null,default:{title:"Hooks / useEditProfile"},RegularView:Cr});function Tr(){window.widgetIdent={tenantAlias:"test_a8b41jotf8a1v",appDomain:"https://staging.referralsaasquatch.com",programId:"sam-partner-test-2"},i((()=>(c({accountId:"testestest",id:"testestest",jwt:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs"}),()=>{window.widgetIdent=void 0,c(void 0)})),[])}const Dr=t=>{const n={"leaderboard-type":"topConvertedReferrers",showRank:!0,"rank-type":"rowNumber",usersheading:"Top Referrers",statsheading:"Completed Referrals",interval:"",...t},{leaderboardType:a,rankType:r}=n;return e("div",{style:{marginBottom:"20px"}},e("sqm-divided-layout",{direction:"row"},e("div",{style:{padding:"10px"}},e("b",null,"Leaderboard Type"),e("pre",null,a)),e("div",{style:{padding:"10px"}},e("b",null,"Rank Type"),e("pre",null,r))),e("sqm-leaderboard",Object.assign({},n),e("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"})),e("hr",null))},Rr=ia((()=>(Tr(),[Dr({}),Dr({rankType:"rank"}),Dr({rankType:"denseRank"})]))),Sr=ia((()=>(Tr(),[Dr({leaderboardType:"topStartedReferrers",statsheading:"New Referrals"}),Dr({leaderboardType:"topStartedReferrers",rankType:"rank",statsheading:"New Referrals"}),Dr({leaderboardType:"topStartedReferrers",rankType:"denseRank",statsheading:"New Referrals"})]))),Pr=ia((()=>(Tr(),[Dr({leaderboardType:"topPointEarners",statsheading:"Points",usersheading:"Top Earners"}),Dr({leaderboardType:"topPointEarners",rankType:"rank",statsheading:"Points",usersheading:"Top Earners"}),Dr({leaderboardType:"topPointEarners",rankType:"denseRank",statsheading:"Points",usersheading:"Top Earners"})]))),Ir=ia((()=>(Tr(),[Dr({leaderboardType:"topPointEarners",rankType:"rank",statsheading:"Points",usersheading:"Top Earners",programId:""}),Dr({leaderboardType:"topStartedReferrers",rankType:"rank",statsheading:"Referrals",programId:""}),Dr({leaderboardType:"topConvertedReferrers",rankType:"rank",statsheading:"Referrals",programId:""})]))),Fr=ia((()=>(Tr(),[Dr({leaderboardType:"topStartedReferrers",maxRows:5,statsheading:"Referrals"})]))),Nr=ia((()=>(function(){const e="sam+klip@saasquat.ch";window.widgetIdent={tenantAlias:"test_a74miwdpofztj",appDomain:"https://staging.referralsaasquatch.com",programId:"klip-referral-program"},i((()=>(c({accountId:"sam+klip@saasquat.ch",id:e,jwt:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InNhbStrbGlwQHNhYXNxdWF0LmNoIiwiaWQiOiJzYW0ra2xpcEBzYWFzcXVhdC5jaCIsImVtYWlsIjoic2FtK2tsaXBAc2Fhc3F1YXQuY2giLCJsb2NhbGUiOiJlbiJ9fQ.a2nYYrSJ81FHXlCU-Sqp_-wquQizinHBhzwzULDzimg"}),()=>{window.widgetIdent=void 0,c(void 0)})),[])}(),[Dr({leaderboardType:"topStartedReferrers",statsheading:"New Referrals",interval:"2021-02-11T08:00:00.000Z/2021-02-13T08:00:00.000Z"}),Dr({leaderboardType:"topStartedReferrers",rankType:"rank",statsheading:"New Referrals",interval:"2021-02-11T08:00:00.000Z/2021-02-13T08:00:00.000Z"}),Dr({leaderboardType:"topStartedReferrers",rankType:"denseRank",statsheading:"New Referrals",interval:"2021-02-11T08:00:00.000Z/2021-02-13T08:00:00.000Z"})]))),Or=ia((()=>e("sqm-leaderboard",{usersheading:"Referrer",statsheading:"Referrals","rank-type":"rank","leaderboard-type":"topStartedReferrers",rankheading:"Rank","show-rank":"true"},e("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"})))),Lr=ia((()=>e("sqm-leaderboard",{usersheading:"Referrer",statsheading:"Referrals","rank-type":"rank","leaderboard-type":"topStartedReferrers",rankheading:"Rank","show-rank":"true",demoData:{data:{rankType:"rank",leaderboard:[]},states:{loading:!1,hasLeaders:!1,styles:{usersheading:"Top referrers",statsheading:"New customers",rankheading:"Rank",anonymousUser:"Anonymous User",showRank:!0}}}},e("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"})))),Br=Object.freeze({__proto__:null,default:{title:"Hooks / useLeaderboard"},TopConvertedReferrers:Rr,TopStartedReferrers:Sr,topPointEarners:Pr,globalLeaderboards:Ir,FiveResults:Fr,EmptyLeaderboard:Nr,DemoHook:Or,DemoHookEmpty:Lr}),_r=Object.freeze({__proto__:null,default:{title:"Components/Form Message"},SuccessAlert:()=>e("sqm-form-message",{type:"success"},e("div",null,"This is a success message.")),ErrorAlert:()=>e("sqm-form-message",{type:"error"},e("div",null,"This is an error message")),WarningAlert:()=>e("sqm-form-message",{type:"warning"},e("div",null,"This is an error message")),InfoAlert:()=>e("sqm-form-message",{type:"info"},e("div",null,"This is an info message")),FullStackSuccess:()=>e("sqm-form-message",{type:"success",exportparts:"successalert-icon"},e("div",{class:"AlertContent"},e("div",{part:"successalert-text"},"Title"),e("div",{part:"successalert-subtext"},"Body text."),e("sl-button",{type:"default",exportparts:"base: defaultbutton-base",onClick:()=>{console.log("click")}},"Primary Action"),e("sl-button",{class:"SecondaryTextButton",type:"text",onClick:()=>{console.log("click")}},"Secondary Action")))}),Gr=m.gql`
|
|
1
|
+
import{h as e,r as t,c as n}from"./p-f708da7b.js";import{a,u as r,k as o,f as i,c as s,n as l}from"./p-cd651f81.js";import"./p-65069b66.js";import{j as d,k as u,b as c,d as m,X as p,p as h}from"./p-94a876b9.js";import"./p-c1086930.js";import"./p-9ec99ced.js";import{c as g}from"./p-cef45012.js";import"./p-3f7b81b8.js";import"./p-91521e9d.js";import{C as f}from"./p-31015791.js";import{G as b}from"./p-837a0fdd.js";import"./p-19ccb4ce.js";import{l as w}from"./p-5bedb58c.js";import"./p-c9f1dde7.js";import{A as x}from"./p-229f797b.js";import{C as y}from"./p-35b475bf.js";import"./p-8d363802.js";import{E as v}from"./p-92816d1f.js";import{L as q}from"./p-00df0cac.js";import{L as E}from"./p-4e5af50c.js";import{L as A}from"./p-266a8b4d.js";import{N as C}from"./p-24db5c70.js";import{N as k}from"./p-3db34d68.js";import{P as T}from"./p-bbcd824a.js";import{P as D}from"./p-626e9e84.js";import{P as R}from"./p-dbcb5359.js";import{B as S}from"./p-91959fbe.js";import{P}from"./p-91ab3da1.js";import{P as I}from"./p-63a75798.js";import"./p-8c23d1b8.js";import{P as F}from"./p-f940190a.js";import{P as N}from"./p-7a9290ba.js";import"./p-9acb5038.js";import{Q as O}from"./p-f56bedd5.js";import{S as L,L as B,B as _,P as G,E as j,u as M,a as U,b as W,c as V,d as H,e as z,C as Y,T as $,f as X,g as J,h as K,H as Z,R as Q,N as ee,i as te,D as ne,I as ae,j as re,r as oe,k as ie,l as se,m as le,n as de,o as ue,p as ce,q as me,s as pe,t as he,v as ge,w as fe,x as be,y as we,z as xe,A as ye,F as ve,G as qe,J as Ee,K as Ae,M as Ce,O as ke,Q as Te,U as De,V as Re}from"./p-c1b074b6.js";import{P as Se,a as Pe}from"./p-a9f4ddb1.js";import{O as Ie,I as Fe,T as Ne}from"./p-35701119.js";import{L as Oe}from"./p-6ba44ca9.js";var Le,Be=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ge="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",je="["+Ge+"]",Me="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",Ue="\\d+",We="[a-z\\xdf-\\xf6\\xf8-\\xff]",Ve="[^\\ud800-\\udfff"+Ge+Ue+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",He="\\ud83c[\\udffb-\\udfff]",ze="[^\\ud800-\\udfff]",Ye="(?:\\ud83c[\\udde6-\\uddff]){2}",$e="[\\ud800-\\udbff][\\udc00-\\udfff]",Xe="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Je="(?:"+We+"|"+Ve+")",Ke="(?:"+Xe+"|"+Ve+")",Ze="(?:"+Me+"|"+He+")?",Qe="[\\ufe0e\\ufe0f]?"+Ze+"(?:\\u200d(?:"+[ze,Ye,$e].join("|")+")[\\ufe0e\\ufe0f]?"+Ze+")*",et="(?:"+["[\\u2700-\\u27bf]",Ye,$e].join("|")+")"+Qe,tt="(?:"+[ze+Me+"?",Me,Ye,$e,"[\\ud800-\\udfff]"].join("|")+")",nt=RegExp("['’]","g"),at=RegExp(Me,"g"),rt=RegExp(He+"(?="+He+")|"+tt+Qe,"g"),ot=RegExp([Xe+"?"+We+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[je,Xe,"$"].join("|")+")",Ke+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[je,Xe+Je,"$"].join("|")+")",Xe+"?"+Je+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Xe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?",Ue,et].join("|"),"g"),it=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),st=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,lt="object"==typeof self&&self&&self.Object===Object&&self,dt="object"==typeof a&&a&&a.Object===Object&&a||lt||Function("return this")(),ut=(Le={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"},function(e){return null==Le?void 0:Le[e]});function ct(e){return it.test(e)}var mt=Object.prototype.toString,pt=dt.Symbol,ht=pt?pt.prototype:void 0,gt=ht?ht.toString:void 0;function ft(e){return null==e?"":function(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==mt.call(e)}(e))return gt?gt.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}var bt,wt=(bt=function(e,t,n){return e+(n?" ":"")+xt(t)},function(e){return function(e,t,n){for(var a=-1,r=e?e.length:0;++a<r;)n=t(n,e[a],a,e);return n}(function(e,t){return e=ft(e),void 0===(t=t)?function(e){return st.test(e)}(e)?function(e){return e.match(ot)||[]}(e):function(e){return e.match(Be)||[]}(e):e.match(t)||[]}(function(e){return(e=ft(e))&&e.replace(_e,ut).replace(at,"")}(e).replace(nt,"")),bt,"")}),xt=("toUpperCase",function(e){var t,n,a,r,o=ct(e=ft(e))?function(e){return ct(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.split("")}(e)}(e):void 0,i=o?o[0]:e.charAt(0),s=o?(t=o,n=1,r=t.length,a=void 0===a?r:a,!n&&a>=r?t:function(e,t,n){var a=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(r);++a<r;)o[a]=e[a+t];return o}(t,n,a)).join(""):e.slice(1);return i.toUpperCase()+s}),yt=wt,vt=function(){function e(e){var t=this;this._insertTag=function(e){t.container.insertBefore(e,0===t.tags.length?t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),qt="-ms-",Et="-moz-",At="-webkit-",Ct="comm",kt="rule",Tt="decl",Dt=Math.abs,Rt=String.fromCharCode;function St(e){return e.trim()}function Pt(e,t,n){return e.replace(t,n)}function It(e,t){return e.indexOf(t)}function Ft(e,t){return 0|e.charCodeAt(t)}function Nt(e,t,n){return e.slice(t,n)}function Ot(e){return e.length}function Lt(e){return e.length}function Bt(e,t){return t.push(e),e}var _t=1,Gt=1,jt=0,Mt=0,Ut=0,Wt="";function Vt(e,t,n,a,r,o,i){return{value:e,root:t,parent:n,type:a,props:r,children:o,line:_t,column:Gt,length:i,return:""}}function Ht(e,t,n){return Vt(e,t.root,t.parent,n,t.props,t.children,0)}function zt(){return Ut=Mt>0?Ft(Wt,--Mt):0,Gt--,10===Ut&&(Gt=1,_t--),Ut}function Yt(){return Ut=Mt<jt?Ft(Wt,Mt++):0,Gt++,10===Ut&&(Gt=1,_t++),Ut}function $t(){return Ft(Wt,Mt)}function Xt(){return Mt}function Jt(e,t){return Nt(Wt,e,t)}function Kt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Zt(e){return _t=Gt=1,jt=Ot(Wt=e),Mt=0,[]}function Qt(e){return Wt="",e}function en(e){return St(Jt(Mt-1,an(91===e?e+2:40===e?e+1:e)))}function tn(e){for(;(Ut=$t())&&Ut<33;)Yt();return Kt(e)>2||Kt(Ut)>3?"":" "}function nn(e,t){for(;--t&&Yt()&&!(Ut<48||Ut>102||Ut>57&&Ut<65||Ut>70&&Ut<97););return Jt(e,Xt()+(t<6&&32==$t()&&32==Yt()))}function an(e){for(;Yt();)switch(Ut){case e:return Mt;case 34:case 39:return an(34===e||39===e?e:Ut);case 40:41===e&&an(e);break;case 92:Yt()}return Mt}function rn(e,t){for(;Yt()&&e+Ut!==57&&(e+Ut!==84||47!==$t()););return"/*"+Jt(t,Mt-1)+"*"+Rt(47===e?e:Yt())}function on(e){for(;!Kt($t());)Yt();return Jt(e,Mt)}function sn(e){return Qt(ln("",null,null,null,[""],e=Zt(e),0,[0],e))}function ln(e,t,n,a,r,o,i,s,l){for(var d=0,u=0,c=i,m=0,p=0,h=0,g=1,f=1,b=1,w=0,x="",y=r,v=o,q=a,E=x;f;)switch(h=w,w=Yt()){case 34:case 39:case 91:case 40:E+=en(w);break;case 9:case 10:case 13:case 32:E+=tn(h);break;case 92:E+=nn(Xt()-1,7);continue;case 47:switch($t()){case 42:case 47:Bt(un(rn(Yt(),Xt()),t,n),l);break;default:E+="/"}break;case 123*g:s[d++]=Ot(E)*b;case 125*g:case 59:case 0:switch(w){case 0:case 125:f=0;case 59+u:p>0&&Ot(E)-c&&Bt(p>32?cn(E+";",a,n,c-1):cn(Pt(E," ","")+";",a,n,c-2),l);break;case 59:E+=";";default:if(Bt(q=dn(E,t,n,d,u,r,s,x,y=[],v=[],c),o),123===w)if(0===u)ln(E,t,q,q,y,o,c,s,v);else switch(m){case 100:case 109:case 115:ln(e,q,q,a&&Bt(dn(e,q,q,0,0,r,s,x,r,y=[],c),v),r,v,c,s,a?y:v);break;default:ln(E,q,q,q,[""],v,c,s,v)}}d=u=p=0,g=b=1,x=E="",c=i;break;case 58:c=1+Ot(E),p=h;default:if(g<1)if(123==w)--g;else if(125==w&&0==g++&&125==zt())continue;switch(E+=Rt(w),w*g){case 38:b=u>0?1:(E+="\f",-1);break;case 44:s[d++]=(Ot(E)-1)*b,b=1;break;case 64:45===$t()&&(E+=en(Yt())),m=$t(),u=Ot(x=E+=on(Xt())),w++;break;case 45:45===h&&2==Ot(E)&&(g=0)}}return o}function dn(e,t,n,a,r,o,i,s,l,d,u){for(var c=r-1,m=0===r?o:[""],p=Lt(m),h=0,g=0,f=0;h<a;++h)for(var b=0,w=Nt(e,c+1,c=Dt(g=i[h])),x=e;b<p;++b)(x=St(g>0?m[b]+" "+w:Pt(w,/&\f/g,m[b])))&&(l[f++]=x);return Vt(e,t,n,0===r?kt:s,l,d,u)}function un(e,t,n){return Vt(e,t,n,Ct,Rt(Ut),Nt(e,2,-2),0)}function cn(e,t,n,a){return Vt(e,t,n,Tt,Nt(e,0,a),Nt(e,a+1,-1),a)}function mn(e,t){switch(function(e,t){return(((t<<2^Ft(e,0))<<2^Ft(e,1))<<2^Ft(e,2))<<2^Ft(e,3)}(e,t)){case 5103:return At+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return At+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return At+e+Et+e+qt+e+e;case 6828:case 4268:return At+e+qt+e+e;case 6165:return At+e+qt+"flex-"+e+e;case 5187:return At+e+Pt(e,/(\w+).+(:[^]+)/,At+"box-$1$2"+qt+"flex-$1$2")+e;case 5443:return At+e+qt+"flex-item-"+Pt(e,/flex-|-self/,"")+e;case 4675:return At+e+qt+"flex-line-pack"+Pt(e,/align-content|flex-|-self/,"")+e;case 5548:return At+e+qt+Pt(e,"shrink","negative")+e;case 5292:return At+e+qt+Pt(e,"basis","preferred-size")+e;case 6060:return At+"box-"+Pt(e,"-grow","")+At+e+qt+Pt(e,"grow","positive")+e;case 4554:return At+Pt(e,/([^-])(transform)/g,"$1"+At+"$2")+e;case 6187:return Pt(Pt(Pt(e,/(zoom-|grab)/,At+"$1"),/(image-set)/,At+"$1"),e,"")+e;case 5495:case 3959:return Pt(e,/(image-set\([^]*)/,At+"$1$`$1");case 4968:return Pt(Pt(e,/(.+:)(flex-)?(.*)/,At+"box-pack:$3"+qt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+At+e+e;case 4095:case 3583:case 4068:case 2532:return Pt(e,/(.+)-inline(.+)/,At+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ot(e)-1-t>6)switch(Ft(e,t+1)){case 109:if(45!==Ft(e,t+4))break;case 102:return Pt(e,/(.+:)(.+)-([^]+)/,"$1"+At+"$2-$3$1"+Et+(108==Ft(e,t+3)?"$3":"$2-$3"))+e;case 115:return~It(e,"stretch")?mn(Pt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Ft(e,t+1))break;case 6444:switch(Ft(e,Ot(e)-3-(~It(e,"!important")&&10))){case 107:return Pt(e,":",":"+At)+e;case 101:return Pt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+At+(45===Ft(e,14)?"inline-":"")+"box$3$1"+At+"$2$3$1"+qt+"$2box$3")+e}break;case 5936:switch(Ft(e,t+11)){case 114:return At+e+qt+Pt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return At+e+qt+Pt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return At+e+qt+Pt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return At+e+qt+e+e}return e}function pn(e,t){for(var n="",a=Lt(e),r=0;r<a;r++)n+=t(e[r],r,e,t)||"";return n}function hn(e,t,n,a){switch(e.type){case"@import":case Tt:return e.return=e.return||e.value;case Ct:return"";case kt:e.value=e.props.join(",")}return Ot(n=pn(e.children,a))?e.return=e.value+"{"+n+"}":""}function gn(e){return function(t){t.root||(t=t.return)&&e(t)}}function fn(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var bn=new WeakMap,wn=function(e){if("rule"===e.type&&e.parent&&e.length){for(var t=e.value,n=e.parent,a=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||bn.get(n))&&!a){bn.set(e,!0);for(var r=[],o=function(e,t){return Qt(function(e,t){var n=-1,a=44;do{switch(Kt(a)){case 0:38===a&&12===$t()&&(t[n]=1),e[n]+=on(Mt-1);break;case 2:e[n]+=en(a);break;case 4:if(44===a){e[++n]=58===$t()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Rt(a)}}while(a=Yt());return e}(Zt(e),t))}(t,r),i=n.props,s=0,l=0;s<o.length;s++)for(var d=0;d<i.length;d++,l++)e.props[l]=r[s]?o[s].replace(/&\f/g,i[d]):i[d]+" "+o[s]}}},xn=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},yn=[function(e,t,n,a){if(!e.return)switch(e.type){case Tt:e.return=mn(e.value,e.length);break;case"@keyframes":return pn([Ht(Pt(e.value,"@","@"+At),e,"")],a);case kt:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return pn([Ht(Pt(t,/:(read-\w+)/,":-moz-$1"),e,"")],a);case"::placeholder":return pn([Ht(Pt(t,/:(plac\w+)/,":"+At+"input-$1"),e,""),Ht(Pt(t,/:(plac\w+)/,":-moz-$1"),e,""),Ht(Pt(t,/:(plac\w+)/,qt+"input-$1"),e,"")],a)}return""}))}}],vn={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},qn=/[A-Z]|^ms/g,En=/_EMO_([^_]+?)_([^]*?)_EMO_/g,An=function(e){return 45===e.charCodeAt(1)},Cn=function(e){return null!=e&&"boolean"!=typeof e},kn=fn((function(e){return An(e)?e:e.replace(qn,"-$&").toLowerCase()})),Tn=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(En,(function(e,t,n){return Rn={name:t,styles:n,next:Rn},t}))}return 1===vn[e]||An(e)||"number"!=typeof t||0===t?t:t+"px"};function Dn(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return Rn={name:n.name,styles:n.styles,next:Rn},n.name;if(void 0!==n.styles){var a=n.next;if(void 0!==a)for(;void 0!==a;)Rn={name:a.name,styles:a.styles,next:Rn},a=a.next;return n.styles+";"}return function(e,t,n){var a="";if(Array.isArray(n))for(var r=0;r<n.length;r++)a+=Dn(e,t,n[r])+";";else for(var o in n){var i=n[o];if("object"!=typeof i)null!=t&&void 0!==t[i]?a+=o+"{"+t[i]+"}":Cn(i)&&(a+=kn(o)+":"+Tn(o,i)+";");else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var s=Dn(e,t,i);switch(o){case"animation":case"animationName":a+=kn(o)+":"+s+";";break;default:a+=o+"{"+s+"}"}}else for(var l=0;l<i.length;l++)Cn(i[l])&&(a+=kn(o)+":"+Tn(o,i[l])+";")}return a}(e,t,n);case"function":if(void 0!==e){var r=Rn,o=n(e);return Rn=r,Dn(e,t,o)}}if(null==t)return n;var i=t[n];return void 0!==i?i:n}var Rn,Sn=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Pn=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var a=!0,r="";Rn=void 0;var o=e[0];null==o||void 0===o.raw?(a=!1,r+=Dn(n,t,o)):r+=o[0];for(var i=1;i<e.length;i++)r+=Dn(n,t,e[i]),a&&(r+=o[i]);Sn.lastIndex=0;for(var s,l="";null!==(s=Sn.exec(r));)l+="-"+s[1];return{name:function(e){for(var t,n=0,a=0,r=e.length;r>=4;++a,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(a+2))<<16;case 2:n^=(255&e.charCodeAt(a+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(a)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(r)+l,styles:r,next:Rn}};function In(e,t,n){var a="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):a+=n+" "})),a}var Fn=function(e,t,n){var a=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[a]&&(e.registered[a]=t.styles),void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+a:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}};function Nn(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function On(e,t,n){var a=[],r=In(e,a,n);return a.length<2?n:r+t(a)}var Ln=function e(t){for(var n="",a=0;a<t.length;a++){var r=t[a];if(null!=r){var o=void 0;switch(typeof r){case"boolean":break;case"object":if(Array.isArray(r))o=e(r);else for(var i in o="",r)r[i]&&i&&(o&&(o+=" "),o+=i);break;default:o=r}o&&(n&&(n+=" "),n+=o)}}return n},Bn=function(){var e=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var a,r,o=e.stylisPlugins||yn,i={},s=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)i[t[n]]=!0;s.push(e)}));var l,d=[wn,xn],u=[hn,gn((function(e){l.insert(e)}))],c=function(e){var t=Lt(e);return function(n,a,r,o){for(var i="",s=0;s<t;s++)i+=e[s](n,a,r,o)||"";return i}}(d.concat(o,u));r=function(e,t,n,a){l=n,pn(sn(e?e+"{"+t.styles+"}":t.styles),c),a&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new vt({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend}),nonce:e.nonce,inserted:i,registered:{},insert:r};return m.sheet.hydrate(s),m}({key:"css"});e.sheet.speedy=function(e){this.isSpeedy=e},e.compat=!0;var t=function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];var r=Pn(n,e.registered,void 0);return Fn(e,r,!1),e.key+"-"+r.name};return{css:t,cx:function(){for(var n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];return On(e.registered,t,Ln(a))},injectGlobal:function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];var r=Pn(n,e.registered);Nn(e,r)},keyframes:function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];var r=Pn(n,e.registered),o="animation-"+r.name;return Nn(e,{name:r.name,styles:"@keyframes "+o+"{"+r.styles+"}"}),o},hydrate:function(t){t.forEach((function(t){e.inserted[t]=!0}))},flush:function(){e.registered={},e.inserted={},e.sheet.flush()},sheet:e.sheet,cache:e,getRegisteredStyles:In.bind(null,e.registered),merge:On.bind(null,e.registered,t)}}().css;function _n(){return(_n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function Gn(e,t){return t||(t=e.slice(0)),e.raw=t,e}var jn,Mn,Un,Wn=Bn(jn||(jn=Gn(['\n width: 100vw;\n height: 100vh;\n\n .story-book-outer-div {\n .story-div {\n font-family: "Arial", sans-serif;\n font-size: 12px;\n }\n padding-bottom: 500px;\n }\n\n .story-div {\n position: fixed;\n box-sizing: border-box;\n top: 0;\n width: 250px;\n height: 100vh;\n z-index: 999;\n overflow-y: scroll;\n background: white;\n margin-bottom: 32px;\n }\n\n .header {\n padding: 24px 0 16px 16px;\n margin-bottom: 24px;\n color: white;\n background: #333;\n cursor: pointer;\n\n h2 {\n letter-spacing: 3px;\n font-weight: 400;\n }\n }\n\n .parentStoryList {\n list-style: none;\n padding-left: 16px;\n\n summary {\n margin-bottom: 4px;\n }\n }\n .parentStory {\n cursor: pointer;\n }\n .parentStory.selected {\n font-weight: bold;\n }\n\n .subStory {\n font-size: 12px;\n cursor: pointer;\n line-height: 1.5em;\n margin-top: 4px;\n\n a {\n display: block;\n padding: 4px 4px 4px 16px;\n }\n }\n .subStory:hover {\n background-color: #eee;\n }\n .subStory.selected {\n background-color: lightgreen;\n }\n\n .component {\n padding: 24px 16px;\n }\n\n h4.group-header {\n margin: 8px 0;\n text-transform: uppercase;\n font-weight: 600;\n font-size: 14px;\n color: #575757;\n }\n\n .group-wrapper {\n margin-bottom: 24px;\n }\n\n .dynamic-display-wrapper {\n position: fixed;\n display: flex;\n flex-direction: column;\n bottom: 0;\n left: 100%;\n padding: 16px;\n z-index: 1000;\n background: white;\n transform: translateX(-100%);\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n\n & > :not(:first-child) {\n margin-top: 12px;\n }\n\n p {\n font-size: 12px;\n margin: 0;\n padding: 0;\n }\n\n .button-wrapper {\n display: flex;\n\n & > :not(:first-child) {\n margin-left: 12px;\n }\n }\n\n & button {\n border: 1px solid #eaeaea;\n background: white;\n border-radius: 4px;\n color: #777;\n padding: 4px 12px;\n justify-content: center;\n align-items: center;\n text-align: center;\n\n &.active {\n background: #555;\n border-color: #555;\n color: white;\n }\n }\n }\n'])));function Vn(e,t){var n,a=t.story.title.split("/"),r=a[1]?a[0]:"_";return _n({},e,((n={})[r]=[].concat(e[r]||[],[{story:_n({},t.story,{title:a[1]||a[0]}),subs:t.subs}]).sort((function(e,t){return e.story.title.localeCompare(t.story.title)})),n))}function Hn(e){return{story:e.default,subs:function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)t.indexOf(n=o[a])>=0||(r[n]=e[n]);return r}(e,["default"])}}function zn(e,t){var n,a;if(e){var r=decodeURIComponent(e).split("-"),o=r[1],i=r[2],s=null==t||null==(n=t[r[0]])?void 0:n.find((function(e){return e.story.title===o})),l=null==s||null==(a=s.subs)?void 0:a[i],d={key:e,story:l,parent:null==s?void 0:s.story,label:null==l?void 0:l.name};return d.key&&d.story&&d.parent&&d.label?d:void 0}}const Yn=Object.freeze({__proto__:null,default:{title:"Components/Share Button",parameters:{scenario:'@author:noah\n@owner:noah\nFeature: Share Button\n\n The share button redirects users to a platform where they can share their referral link\n\n @motivating\n @ui\n Scenario Outline: Share button displays for various platforms\n Given the share button\'s medium prop is "<medium>"\n And the button\'s child is text saying "BUTTON_TEXT"\n When the share button is rendered\n Then the button has text "BUTTON_TEXT"\n And the button is <colour>\n And it displays an <icon> beside the text\n And clicking the button redirects to an appropriate link\n Examples:\n | medium | colour | icon |\n | facebook | #1877f2 | facebook logo |\n | twitter | #000000 | twitter x logo |\n | email | #666666 | envelope |\n | direct | brand colour | paper plane |\n | linkedin | #0077b5 | linkedIn logo |\n | sms | #34DA50 | chat bubble |\n | fbmessenger | #0084ff | messenger logo |\n | whatsapp | #25d366 | whatsapp logo |\n | linemessenger | #00B300 | linemessenger logo |\n | pinterest | #e60023 | pinterest logo |\n\n @minutia\n @ui\n Scenario Outline: Default icons can be overwritten\n Given a share button for any medium with <iconPropValue>\n When the share button is rendered\n Then it displays a <iconPropValue> instead of the share mediums default icon\n Examples:\n | iconPropValue |\n | basket |\n | bluetooth |\n | bandaid |\n\n @motivating\n @ui\n Scenario Outline: Default share medium colours can be overwritten\n Given a share button for any medium with <backgroundColourPropValue>\n When the share button is rendered\n Then the share button is <backgroundColourPropValue>\n Examples:\n | backgroundColourPropValue |\n | blue |\n | black |\n | green |\n\n @minutia\n @ui\n Scenario Outline: Share medium icons and text can be hidden\n Given a share button with <prop> <value>\n When the share button is rendered\n Then <element> is hidden\n Examples:\n | prop | value | element |\n | hideicon | true | icon |\n | hidetext | true | text |\n\n @minutia\n @ui\n Scenario Outline: Icons can be on either side of the text\n Given a share button with <iconslotPropValue>\n When the share button is rendered\n Then the icon is displayed to the <direction> of the text\n Examples:\n | iconslotPropValue | direction |\n | suffix | right |\n | prefix | left |\n | prefix | left |\n\n @minutia\n Scenario: Unsupported browsers hide native share buttons\n Given the share button\'s medium prop is "direct"\n And your browser does not support the Web Share API\n Then the share button is hidden\n\n @minutia\n Scenario: SMS share buttons are hidden on non Android and iOS devices\n Given the share button\'s medium is "sms"\n And the share button is being viewed on a device which is not an Android or iOS device\n Then the share button is hidden\n\n @motivating\n Scenario: Facebook share buttons uses SquatchAndroid sharing features\n Given the share button\'s medium is "facebook"\n And the share button is being viewed in a web view with the SquatchAndroid API\n And the Facebook app is available\n Then tapping the share button opens the phone\'s Facebook app\n And a share activity is opened with the share link prefilled\n\n @motivating\n Scenario: SquatchAndroid falls back to the Facebook website if no app is available\n Given the share button\'s medium is "facebook"\n And the share button is being viewed in a web view with the SquatchAndroid API\n And the Facebook app is not available\n Then tapping the share button opens the the Facebook mobile site in the device\'s browser\n And a share activity is opened with the share link prefilled\n\n @minutia\n Scenario: A supplied program ID is used if available\n Given the program id is supplied to the component in the "programId" prop\n Then the program ID in the "programId" prop is used to retrieve share links\n\n @minutia\n Scenario: The program ID is automatically fetched from context\n Given the program id is not supplied to the component in the "programId" prop\n Then the program ID is retrieved from context'}},WithIconPrefix:()=>e(L,Object.assign({},{medium:"whatsapp",iconslot:"prefix"}),"Share"),WithIconSuffix:()=>e(L,Object.assign({},{medium:"whatsapp",iconslot:"suffix"}),"Share"),WithIconOverride:()=>e(L,Object.assign({},{medium:"facebook",icon:"person-badge"}),"Share"),TextStyle:()=>e(L,Object.assign({},{medium:"facebook",type:"text"}),"Share"),WithoutIcon:()=>e(L,Object.assign({},{medium:"facebook",hideicon:!0}),"Share"),WithoutText:()=>e(L,Object.assign({},{medium:"facebook",hidetext:!0}),"Share"),TextStyleWithoutIcon:()=>e(L,Object.assign({},{medium:"facebook",type:"text",hideicon:!0}),"Share"),WithCustomColors:()=>e(L,Object.assign({},{medium:"facebook",type:"text",backgroundcolor:"red",textcolor:"yellow",iconslot:"prefix"}),"Facebook"),WithCustomBorderRadius:()=>e(L,Object.assign({},{medium:"facebook",type:"text",borderradius:8,iconslot:"prefix"}),"Facebook"),LinkLocationTest:()=>e(L,Object.assign({},{medium:"facebook",type:"text",onClick:void 0,messageLink:"https://www.example.com"}),"Click me"),FullStackIcon:()=>e("div",null,e("sqm-share-button",{medium:"facebook"},e("span",null,"Facebook")),e("br",null),e("sqm-share-button",{medium:"email"},e("span",null,"Email"))),AllMediums:()=>e("div",null,e("sqm-share-button",{medium:"facebook"},e("span",null,"Facebook")),e("br",null),e("sqm-share-button",{medium:"email"},e("span",null,"Email")),e("br",null),e("sqm-share-button",{medium:"whatsapp"},e("span",null,"WhatsApp")),e("br",null),e("sqm-share-button",{medium:"linkedin"},e("span",null,"Linkedin")),e("br",null),e("sqm-share-button",{medium:"twitter"},e("span",null,"Post on X")),e("br",null),e("sqm-share-button",{medium:"pinterest"},e("span",null,"Pinterest")),e("br",null),e("sqm-share-button",{medium:"fbmessenger"},e("span",null,"Messenger")),e("br",null),e("sqm-share-button",{medium:"sms"},e("span",null,"SMS")),e("br",null),e("sqm-share-button",{medium:"linemessenger"},e("span",null,"Line Messenger")),e("br",null),e("sqm-share-button",{medium:"direct"},e("span",null,"Share")))}),$n={usersheading:"TOP REFERRERS",statsheading:"NEW CUSTOMERS"},Xn={empty:e("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"}),essentials:e("sqm-empty",{"empty-state-image":"https://res.cloudinary.com/saasquatch/image/upload/v1715360191/squatch-assets/Leaderboard_Not_Available.svg","empty-state-header":"Leaderboards aren’t available on your plan","empty-state-text":"Contact {supportText} to upgrade your plan and start leveraging gamification in your program.","support-text":"Support"}),loadingstate:e("slot",{name:"loading"},e("table",null,[...Array(10)].map((()=>e("tr",null,e("td",null,e("sl-skeleton",null)))))))},Jn=Object.freeze({__proto__:null,default:{title:"Components/Empty State",parameters:{scenario:'@author:derek\n@owner:derek\nFeature: Empty State\n\n The sqm-empty component acts as a universal template for the empty states that are used accross our mint components.\n\n @motivating\n @ui\n Scenario: The empty state displays an image, a header and description text\n Given a empty component with the following props\n | prop | value |\n | empty-state-image | https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_reward2.png |\n | empty-state-header | My Custom Empty State |\n | empty-state-text | Description about why this empty state is being shown! |\n And it is wrapped by a component with an "empty" slot\n When a user views a component using the empty state\n Then it is displayed in the "empty" slot\n And they see an image\n And below they see "My Custom Empty State"\n And below they see "Description about why this empty state is being shown!"\n And the images/text are centered aligned'}},Empty:()=>e("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"}),SlottedIntoComponent:()=>{const t={states:{loading:!1,hasLeaders:!1,isEssentials:!1,styles:{...$n}},data:{rankType:"rowNumber",leaderboard:[],rowNumber:10,showUser:!0,userRank:{firstName:"Kutay",lastInitial:"C",value:8,rowNumber:11,rank:23}},elements:{...Xn}};return e(B,Object.assign({},t))}}),Kn=Object.freeze({__proto__:null,default:{title:"Components/Link Button"},Default:()=>e("sqm-pagination",null)}),Zn=Object.freeze({__proto__:null,default:{title:"Components/Share Link",parameters:{scenario:'@author:johan\n@owner:johan\nFeature: Share Link\n\n The share link component is a box that allows users to see and copy their share link for a given program\n\n Background: Environment\n Given there is a valid program ID in the environment\n And there is a valid user ID and account ID in the environment\n\n @motivating\n Scenario: A Users sharelink can be copied to their clipboard\n Given tooltipText is "hello tooltip"\n When the component renders\n Then there is a textbox with the user\'s share link\n When the clipboard icon is clicked\n Then the link is copied to clipboard\n And a tooltip appears for ~1 second\n\n @minutia\n Scenario: Tooltip lifespan defaults to 2000\n Given the tooltip\'s lifespan is set to 2000\n And there is tooltip text\n When the component renders\n And the clipboard icon is clicked\n Then a tooltip appears for ~2 seconds\n\n @minutia\n Scenario: Demo\n Given isDemo() returns true\n Then the share link is "https://www.example.com/sharelink/abc"\n And the component won\'t be interactive\n And the tooltip is hidden\n\n @minutia\n Scenario: Program ID can be sourced from prop\n Given the programId prop is set to "program-a"\n And window.widgetIdent.programId is set to "program-b"\n When the component renders\n Then the share link is for "program-a"\n\n @minutia\n Scenario: Program ID can be sourced from window\n Given the programId prop is unset\n And window.widgetIdent.programId is set to "program-b"\n When the component renders\n Then the share link is for "program-b"\n\n @minutia\n Scenario: An analytic event is fired when a user copies their sharelink\n Given a user viewing the share link component\n And the component is rendered for "program-a"\n When they click to copy their link\n Then an "USER_REFERRAL_PROGRAM_ENGAGEMENT_EVENT" analytic event is fired\n And it is for "program-a"\n And it has share medium "DIRECT"\n\n\n @ui\n Scenario Outline: user can edit the alignment of the share link text\n Given a user is editing the share link component\n Then they see "Align text" props\n And the default value is "left"\n When they change the option to <option>\n Then they see the text in <position>\n Examples:\n | option | position |\n | left | left |\n | center | center |\n | right | right |\n\n @ui\n Scenario Outline: The position of the copy button can be changed\n Given a user is editing the share link component\n Then they see "Style" props\n And the default value is "icon"\n When they change the option to <option>\n Then they see the copy button in <position>\n Examples:\n | option | position |\n | button outside | outside the input, on the right |\n | button below | outside the input, below |\n | icon | inside the input as an icon |\n'}},Default:()=>e(f,Object.assign({},{copyString:"https://noah.example.com",open:!1,tooltiptext:"Copied!"})),Tooltip:()=>e(f,Object.assign({},{copyString:"https://noah.example.com",tooltiptext:"Some text for the tooltip",open:!0})),Disabled:()=>e(f,Object.assign({},{copyString:"https://noah.example.com",disabled:!0,open:!0,tooltiptext:"Copied!"})),Error:()=>e(f,Object.assign({},{copyString:"https://noah.example.com",disabled:!0,open:!0,tooltiptext:"Copied!",error:!0})),TextAlignCenter:()=>e("sqm-share-link",{textAlign:"center"}),TextAlignRight:()=>e("sqm-share-link",{textAlign:"right"}),CopyButton:()=>e(f,Object.assign({},{copyString:"https://noah.example.com",open:!1,tooltiptext:"Copied!",isCopyIcon:!1})),CopyButtonBelow:()=>e(f,Object.assign({},{copyString:"https://noah.example.com",open:!1,tooltiptext:"Copied!",buttonStyle:"button-below"})),FullStack:()=>e("sqm-share-link",null)}),Qn=Object.freeze({__proto__:null,default:{title:"Components/Big Stat",parameters:{scenario:'@author:sam\n@owner:sam\nFeature: Big Stat\n\n Big stat is a component for displaying a statistic as a large number with a label\n\n @minutia\n Scenario: Demo hook retrieves label using stat pattern\n Given isDemo() returns true\n And the component renders with props:\n | type |\n | /referralsCount |\n Then the label is: "REFERRALS - COUNT"\n And the value is: "12345"\n\n @minutia\n Scenario: Demo hook falls back to default label on invalid path\n Given isDemo() returns true\n And the component renders with props:\n | type |\n | a bad path |\n Then the label is: "Demo Label"\n And the value is: "12345"\n\n @motivating\n Scenario: Displays error on unrecognized path\n Given isDemo() returns false\n And the component renders with props:\n | type |\n | /(doesNotExistNopeNotHere) |\n Then the label is: "BAD PROP TYPE"\n And the value is: "!!!"\n\n @motivating\n Scenario Outline: Label displays correctly\n Given the type prop is set to <type>\n When the component renders\n Then the label is <label>\n Given isDemo() returns true\n When the component renders\n Then the label is <inferredLabel>\n Examples:\n | path | label | inferredLabel |\n | rewardsAssigned | Rewards Earned | Rewards Assigned |\n | rewardsRedeemed | Rewards Paid | Rewards Redeemed |\n | rewardsAvailable | Rewards Available | Rewards Available |\n | referralsCount | Referrals - Count | Referrals Count |\n | referralsMonth | Referrals - This Month | Referrals Month |\n | referralsWeek | Referrals - This Week | Referrals Week |\n | rewardsCount | Rewards - Count | Rewards Count |\n | rewardsMonth | Rewards - This Month | Rewards Month |\n | rewardsWeek | Rewards - This Week | Rewards Week |\n | rewardBalance | Balance - Credit Earned | Reward Balance |\n | customField | Custom Fields | Custom Fields |\n | programGoals | Program Goals | Program Goals |\n\n @motivating\n Scenario: Display user\'s credit\n Given isDemo() returns false\n And the user has earned 34 COFFEE from the program\n And the component renders with props:\n | type |\n | /rewardBalance/CREDIT/COFFEE/prettyValue |\n Then the label is: "Balance - Credit Earned"\n And the value is: "34 COFFEE"\n\n @minutia\n Scenario: Memoizes most recent query\n Given isDemo() returns false\n And the component\'s type prop is set to a variable named PATH\n And PATH is "/referralsWeek"\n Then the component shows a loading state before showing the result\n When the component reloads given some external reload\n Then the component doesn\'t show a loading state\n When PATH is set to "/rewardsWeek"\n Then the component shows a loading state before showing the result\n When PATH is set to "/referralsWeek"\n Then the component shows a loading state before showing the result\n\n @motivating\n Scenario: Stat has a loading state\n Given isDemo() returns false\n And the component\'s stat type prop is valid\n When the component renders\n Then The stat value displays "..."\n And when the stat query is completed\n And the stat value displays a value\n\n @motivating\n Scenario Outline: Program Goal stat requires metricType and goalId\n Given the statType prop is <statType>\n When the component renders\n Then the label is <label>\n And the stat value is <InvalidStatValue>\n Examples:\n | statType | label | InvalidStatValue |\n | /programGoals | BAD PROP TYPE | true |\n | /programGoals/count | BAD PROP TYPE | true |\n | /programGoals/conversionCount | BAD PROP TYPE | true |\n | /programGoals/My-Goal | BAD PROP TYPE | true |\n | /programGoals/count/My-Goal | Program Goals | false |\n | /programGoals/conversionCount/My-Goal | Program Goals | false |\n\n @motivating\n Scenario Outline: rewardCountFiltered supports many formats\n Given the statType begins with "/rewardCountFiltered"\n When the component renders with <statType>\n Then the stat <mayRender> a value\n Examples:\n | statType | mayRender |\n | /rewardsCountFiltered | renders |\n | /rewardsCountFiltered/COFFEE | doesn\'t render |\n | /rewardsCountFiltered/global | renders |\n | /rewardsCountFiltered/INTEGRATION | renders |\n | /rewardsCountFiltered/INTEGRATION/global | renders |\n | /rewardsCountFiltered/PCT_DISCOUNT | renders |\n | /rewardsCountFiltered/PCT_DISCOUNT/global | renders |\n | /rewardsCountFiltered/CREDIT | renders |\n | /rewardsCountFiltered/CREDIT/COFFEE | renders |\n | /rewardsCountFiltered/CREDIT/global | renders |\n | /rewardsCountFiltered/CREDIT/COFFEE/PENDING | renders |\n | /rewardsCountFiltered/CREDIT/COFFEE/AVAILABLE | renders |\n | /rewardsCountFiltered/CREDIT/CASH%2FUSD | renders |\n | /rewardsCountFiltered/CREDIT/CASH%2FUSD/global | renders |\n | /rewardsCountFiltered/CREDIT/CASH%2FUSD/PENDING | renders |\n | /rewardsCountFiltered/CREDIT/CASH%2FUSD/PENDING/global | renders |\n\n @motivating\n Scenario Outline: Program Goals and Reward units with currencies must be encoded\n Given the statType is <statType>\n When the stat is queried\n Then the stat is filtered by <decodedFilter>\n And a value <mayBe> rendered\n Examples:\n | statType | decodedFilter | may |\n | /rewardBalance/CREDIT/COFFEE | COFFEE | is |\n | /rewardBalance/CREDIT/CENTS | CENTS | is |\n | /rewardBalance/CREDIT/COFFEE%2FUSD | COFFEE/USD | is |\n | /rewardBalance/CREDIT/COFFEE/USD | COFFEE | is |\n | /rewardBalance/CREDIT/CASH | CASH | is |\n | /rewardBalance/CREDIT/CASH/USD | CASH | is |\n | /rewardBalance/CREDIT/CASH%2FUSD | CASH/USD | is |\n | /programGoals/count/My-Goal | My-Goal | is |\n | /programGoals/count/My-Goal/referrals | | isn\'t |\n | /programGoals/count/My-Goal%2Freferrals | My-Goal/referrals | is |\n\n @motivating\n Scenario Outline: User custom fields can be queried\n Given the StatType is <statType>\n When the stat is queried\n Then the value matches that of the users <customField>\n Examples:\n | statType | customField |\n | /customFields/videosShared | videosShared |\n | /customFields/totalPurchaseCount | totalPurchaseCount |\n\n @motivating\n Scenario Outline: Some stats can use a global value instead of filtered by program\n Given the stat <statName>\n Then the global value <mayBe> available\n Examples:\n | statName | mayBe |\n | referralsCount | isn\'t |\n | referralsMonth | isn\'t |\n | referralsWeek | isn\'t |\n | rewardsCount | is |\n | rewardsCountFiltered | is |\n | integrationRewardsCountFiltered | is |\n | rewardsMonth | is |\n | rewardsWeek | is |\n | rewardsAssigned | is |\n | rewardsRedeemed | is |\n | rewardsRedeemedWeek | is |\n | rewardsRedeemedMonth | is |\n | rewardsPending | is |\n | rewardsAvailable | is |\n | rewardBalance | is |\n\n @motivating\n Scenario Outline: referralsCount stat can be filtered by Converted and Started\n Given statType prop is <statType>\n Then the stat returned has a <filter>\n Examples:\n | statType | filter |\n | /referralsCount | { programId_eq: programId } |\n | /referralsCount/converted | { programId_eq: programId, dateConverted_exists: true } |\n | /referralsCount/started | { programId_eq: programId, dateConverted_exists: false } |\n\n @motivating\n Scenario: Program context is used by default to source the programId used for queries\n Given a valid "statType"\n And its not a global stat\n And the stat is loaded in an environment for "program-a"\n And the "program-id" prop is not used\n When the stat is queried\n Then the query is filtered by "{ programId_eq: \'program-a\' }"\n And only results from "program-a" are returned\n\n @motivating\n Scenario Outline: ProgramId can be specified to overwrite the program context default\n Given a valid "statType"\n And its not a global stat\n And the "program-id" prop has <value>\n When the stat is queried\n Then the query has a <filter>\n And only results from <value> are returned\n Examples:\n | value | filter |\n | program-b | { programId_eq: "program-b" } |\n | program-c | { programId_eq: "program-c" } |\n\n\n @motivating\n Scenario: "/rewardsReedemedWeek" stat shows rewards that have been redeemed this week\n Given a user reeemed the following rewards\n | reward | dateRedeemed | programId |\n | $1.00 USD | 2023-08-18 | A |\n | $1.00 CAD | 2023-08-18 | A |\n | $1.00 AUD | 2023-08-18 | A |\n | $1.00 USD | 2023-08-10 | A |\n | $20.00 USD | 2023-08-18 | B |\n | $20.00 CAD | 2023-08-18 | B |\n | $20.00 AUD | 2023-08-18 | B |\n | $20.00 USD | 2023-08-01 | B |\n | $20.00 GBP | 2023-08-01 | B |\n | $20.00 GBP | 2023-08-20 | |\n And the current date is "2023-08-22"\n And the program of the stat is <programId>\n And the statType is <statType>\n Then the stat displays <statValue>\n | programId | statType | statValue |\n | A | /rewardsReedemedWeek/CREDIT/USD | USD1.00 |\n | A | /rewardsReedemedWeek/CREDIT/CAD | CAD1.00 |\n | A | /rewardsReedemedWeek/CREDIT/AUD | AUD1.00 |\n | B | /rewardsReedemedWeek/CREDIT/USD | USD20.00 |\n | B | /rewardsReedemedWeek/CREDIT/CAD | CAD20.00 |\n | B | /rewardsReedemedWeek/CREDIT/AUD | AUD20.00 |\n | N/A | /rewardsReedemedWeek/CREDIT/USD/global | USD21.00 |\n | N/A | /rewardsReedemedWeek/CREDIT/CAD/global | CAD21.00 |\n | N/A | /rewardsReedemedWeek/CREDIT/GBP/global | GBP20.00 |\n\n @motivating\n Scenario: "/rewardsReedemedMonth" stat shows rewards that have been redeemed this month\n Given a user reeemed the following rewards\n | reward | dateRedeemed | programId |\n | $1.00 USD | 2023-08-18 | A |\n | $1.00 CAD | 2023-08-18 | A |\n | $1.00 AUD | 2023-08-18 | A |\n | $1.00 USD | 2023-07-31 | A |\n | $20.00 USD | 2023-08-18 | B |\n | $20.00 CAD | 2023-08-18 | B |\n | $20.00 AUD | 2023-08-18 | B |\n | $20.00 USD | 2023-08-01 | B |\n | $20.00 GBP | 2023-08-01 | B |\n | $20.00 GBP | 2023-08-20 | |\n | $20.00 GBP | 2023-07-31 | |\n And the current date is "2023-08-22"\n And the program of the stat is <programId>\n And the statType is <statType>\n Then the stat displays <statValue>\n | programId | statType | statValue |\n | A | /rewardsReedemedMonth/CREDIT/USD | USD1.00 |\n | A | /rewardsReedemedMonth/CREDIT/CAD | CAD1.00 |\n | A | /rewardsReedemedMonth/CREDIT/AUD | AUD1.00 |\n | B | /rewardsReedemedMonth/CREDIT/USD | USD20.00 |\n | B | /rewardsReedemedMonth/CREDIT/CAD | CAD20.00 |\n | B | /rewardsReedemedMonth/CREDIT/AUD | AUD20.00 |\n | N/A | /rewardsReedemedMonth/CREDIT/USD/global | USD41.00 |\n | N/A | /rewardsReedemedMonth/CREDIT/CAD/global | CAD21.00 |\n | N/A | /rewardsReedemedMonth/CREDIT/GBP/global | GBP40.00 |\n\n\n @landmine\n Scenario Outline: Rewards redeemed by week and month stats only include rewards that have been fully redeemed\n Given statType prop is <statType>\n And the user has fully redeemed a $50.00 USD reward\n And the user has redeemed <amountRedeemed> of a $50.00 USD reward\n Then the stat displays <statValue>\n Examples:\n | statType | amountRedeemed | statValue |\n | /rewardsRedeemed/CREDIT/USD/global | $0.00 | $50.00 |\n | /rewardsRedeemedWeek/CREDIT/USD/global | $0.00 | $50.00 |\n | /rewardsRedeemedMonth/CREDIT/USD/global | $0.00 | $50.00 |\n | /rewardsRedeemed/CREDIT/USD/global | $25.00 | $75.00 |\n | /rewardsRedeemedWeek/CREDIT/USD/global | $25.00 | $50.00 |\n | /rewardsRedeemedMonth/CREDIT/USD/global | $25.00 | $50.00 |\n | /rewardsRedeemed/CREDIT/USD/global | $50.00 | $100.00 |\n | /rewardsRedeemedWeek/CREDIT/USD/global | $50.00 | $100.00 |\n | /rewardsRedeemedMonth/CREDIT/USD/global | $50.00 | $100.00 |\n\n @landmine\n Scenario Outline: Rewards redeemed by week and month stats can only count up to 1000 redeemed rewards during the period\n Given statType prop is <statType>\n And the user has fully redeemed 1001 $1.00 USD rewards in the past <timeframe>\n Then the stat displays <statValue>\n Examples:\n | statType | timeframe | statValue |\n | /rewardsRedeemed/CREDIT/USD/global | N/A | $1001.00 |\n | /rewardsRedeemedWeek/CREDIT/USD/global | week | $1000.00 |\n | /rewardsRedeemedMonth/CREDIT/USD/global | month | $1000.00 |\n'}},Default:()=>e(_,Object.assign({},{value:99e4,statvalue:"9.900,00",loading:!1}),"Big stat"),LeftAlign:()=>e(_,Object.assign({},{value:500,statvalue:"500",alignment:"left",loading:!1}),"Big stat"),RightAlign:()=>e(_,Object.assign({},{value:500,statvalue:"500",alignment:"right",loading:!1}),"Big stat"),FlexReverse:()=>e(_,Object.assign({},{value:500,statvalue:"500",flexReverse:!0,loading:!1}),"Big stat"),FlexReverseRight:()=>e(_,Object.assign({},{value:500,statvalue:"500",flexReverse:!0,alignment:"right",loading:!1}),"Big stat"),FlexReverseLeft:()=>e(_,Object.assign({},{value:500,statvalue:"500",flexReverse:!0,alignment:"left",loading:!1}),"Big stat"),NoStatValue:()=>e(_,Object.assign({},{value:0,statvalue:"...",loading:!1}),"Big stat"),InvalidStatValue:()=>e(_,Object.assign({},{value:0,statvalue:"!!!",loading:!1}),"Big stat"),MultipleStats:()=>e("sqm-stat-container",{space:"xxx-large",display:"flex"},e("sqm-big-stat",{"flex-reverse":"true",alignment:"left","stat-type":"/referralsCount"},e("sqm-text",null,e("p",null,"Rewards Redeemed"))),e("sqm-big-stat",{"flex-reverse":"true",alignment:"left","stat-type":"/rewardsRedeemed/CREDIT/global"},e("sqm-text",null,e("p",null,"Rewards Redeemed"))),e("sqm-big-stat",{"flex-reverse":"true",alignment:"left","stat-type":"/rewardBalance/CREDIT/POINT/value/global"},e("sqm-text",null,e("p",null,"Points Balance"))))}),ea=[{firstName:"",lastInitial:"",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},{firstName:"Mos",lastInitial:"D",textValue:"46",rank:5,rowNumber:5},{firstName:"Joe",lastInitial:"S",textValue:"42",rank:6,rowNumber:6},{firstName:"Zach",lastInitial:"H",textValue:"41",rank:7,rowNumber:7},{firstName:"Sarah",lastInitial:"S",textValue:"39",rank:8,rowNumber:8},{firstName:"James",lastInitial:"",textValue:"33",rank:9,rowNumber:9},{firstName:"",lastInitial:"J",textValue:"29",rank:10,rowNumber:10}],ta=[{firstName:"Tom",lastInitial:"Smith",textValue:"82 Points",rank:1,rowNumber:1},{firstName:"MF",lastInitial:"D",textValue:"73 Points",rank:2,rowNumber:2},{firstName:"Freddie",lastInitial:"G",textValue:"64 Points",rank:3,rowNumber:3},{firstName:"Benny",lastInitial:"B",textValue:"55 Points",rank:4,rowNumber:4},{firstName:"Mos",lastInitial:"D",textValue:"46 Points",rank:5,rowNumber:5},{firstName:"Joe",lastInitial:"S",textValue:"42 Points",rank:6,rowNumber:6},{firstName:"Zach",lastInitial:"H",textValue:"41 Points",rank:7,rowNumber:7},{firstName:"Sarah",lastInitial:"S",textValue:"39 Points",rank:8,rowNumber:8},{firstName:"James",lastInitial:"",textValue:"33 Points",rank:9,rowNumber:9},{firstName:"",lastInitial:"J",textValue:"29 Points",rank:10,rowNumber:10}],na={usersheading:"User",statsheading:"Referrals",rankheading:"Rank",anonymousUser:"Anonymous User",viewingUserText:"You",rankSuffix:"{rank, selectordinal, one {#st} two {#nd} few {#rd} other {#th}}"},aa=(e("a",null,"Support"),{empty:e("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"})}),ra=Object.freeze({__proto__:null,default:{title:"Components/Leaderboard",parameters:{scenario:'@owner:noah @author:noah\nFeature: Leaderboard\n\tThe leaderboard supports three main cases\n\t- Top Started Referrers\n\t- Top Converted Referrers\n\t- Top Point Earners\n\tTo display these different types of leaderboards it uses the backends pre-canned options.\n\tThe backend supports filtering on programId and interval, programId is sourced from program context.\n\n Background: A user exists\n Given a user\n And they are viewing the leaderboard\n\n @motivating\n Scenario Outline: Two types of referrals leaderboards can be displayed\n Given a leaderboard has prop "leaderboard-type" with <value>\n And there are started referrals on the tenant\n And there are started converted on the tenant\n When the user views the leaderboard\n Then they see the referral <referralType> leaderboard\n\n Examples:\n | value | referralType |\n | topStartedReferrers | started |\n | topConvertedReferrers | converted |\n\n @motivating\n Scenario: The top point earners leaderboard can be displayed\n Given a leaderboard has prop "leaderboard-type" with value "topPointEarners"\n And there are users with points\n When the user views the leaderboard\n Then they see the top point earners leaderboard\n And text values are displayed for point counts\n\n @minutia\n Scenario Outline: Reward pretty value is used on the top point earners leaderboard\n Given top point earners leaderboard\n And the "POINT" reward unit has a pretty value for the following locales\n | locale |\n | en |\n | fr |\n | tr |\n When the user views the leaderboard\n And they have <locale>\n Then they see the translated pretty value in the stat value column\n\n @motivating\n Scenario Outline: Program Context is used by default to filter leaderboard results\n Given a <leaderboardType> leaderboard loaded with program context for "my-program"\n When the user views the leaderboard\n Then they only see <results> from "my-program"\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Program Id context can be overwritten with a prop\n Given a <leaderboardType> leaderboard has prop "program-Id" with value "my-test-program"\n When the user views the leaderboard\n Then they only see <results> from "my-test-program"\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Global leaderboards can be displayed by clearing program context\n\t\t#This is important for clients with use cases like StaffTracks global points leaderboard\n\t\t#This can also be done with a program section in a similar manner\n Given a <leaderboardType> leaderboard has prop "program-Id" with value ""\n When the user views the leaderboard\n Then they see global <results>\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario: Leaderboard results are shown in descending order\n Given there are leaderboard results\n When the user views the leaderboard\n Then they see up to the 10 top leaderboard results\n And leaderboard is in descending order\n\n @motivating\n Scenario Outline: Leaderboard results can be filtered with a time interval\n Given a <leaderboardType> leaderboard\n And it has prop "interval" with value "2021-11-02T07:00:00.000Z/2021-11-07T07:00:00.000Z"\n When the user views the leaderboard\n Then they only see <results> from within "2021-11-02T07:00:00.000Z/2021-11-07T07:00:00.000Z"\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Leaderboard rank type can be configured\n Given a leaderboard has prop "rank-type" with <value>\n When the user views the leaderboard\n Then their leaderboard rank is their <rank>\n\n Examples:\n | value | rank |\n | rowNumber | row number |\n | denseRank | dense rank |\n | rank | rank |\n\n @minutia\n Scenario Outline: The max number of leaderboard rows displayed can be configured but defaults to 10\n Given a leaderboard has prop "max-rows" with <value>\n And the leaderboard has <resultCount>\n When the user views the leaderboard\n Then they see <number> rows\n\n Examples:\n | value | resultCount | number |\n | | 10 | 10 |\n | 5 | 10 | 5 |\n | 3 | 1 | 1 |\n | 25 | 15 | 15 |\n\n @minutiae @ui\n Scenario: Leaderboards with no results show an empty state\n Given a leaderboard has no results\n When the user views the leaderboard\n Then an empty state is dislayed\n And they see an image of a leaderboard\n And below they see "View your rank in the leaderboard"\n And below they see "Be the first to refer a friend and reach the top of the leaderboard"\n And the text is center aligned\n\n @minutiae @ui\n Scenario: A custom empty state can be provided\n Given a leaderboard has no results\n When the user views the leaderboard\n Then the contents of the "empty" slot are displayed\n\n @minutiae @ui\n Scenario: User is on Essentials plan\n Given the user has an Essentials plan\n When they view the leaderboard\n Then a message telling them to upgrade their plan appears:\n """\n Contact Support to upgrade your plan and start leveraging\n gamification in your program.\n """\n And an empty table image is displayed\n\n @minutiae @ui\n Scenario: Leaderboard headings can be customized\n Given a leaderboard\n And it has the following props\n | prop | value |\n | rankheading | Place |\n | usersheading | Customer |\n | statsheading | Referral Count |\n | show-rank | true |\n When the user views the leaderboard\n Then they see the following columns with headings\n | column | heading |\n | rank | Place |\n | user | Customer |\n | stat | Referral Count |\n\n @motivating @ui\n Scenario Outline: Leaderboard rank can be hidden or shown\n Given a leaderboard\n And it has prop "show-rank" with <propValue>\n When the user views the leaderboard\n Then they <maySee> the rank column\n\n Examples:\n | propValue | maySee |\n | true | see |\n | false | don\'t see |\n | | don\'t see |\n\n Scenario Outline: Users names can be hidden or shown\n Given a leaderboard\n And it has prop "hide-names" with <propValue>\n When the user views the leaderboard\n Then they <maySee> the referrer column\n\n Examples:\n | propValue | maySee |\n | true | don\'t see |\n | false | see |\n | | see |\n\n @motivating @ui\n Scenario: Users in the top 10 of the leaderboard results see their leaderboard row highlighted\n Given a user in the top 10 of the leaderboard results\n When they view the leaderboard\n Then they see the row with their name highlighted with brand colour\n\n @motivating @ui\n Scenario Outline: Users not in the top 10 leaderboard results can see their progress at the bottom of the leaderboard\n Given a user <mayHave> completed actions counted by the leaderboard\n And they are not in the top 10 leaderboard results\n And the leaderboard has prop "show-user" with <value>\n When they view the leaderboard\n Then they <maySee> "..." under the top 10 leaderboard results\n And under "..." they <maySee> a row highlighted with brand colour\n And they <maySee> their name\n And they <maySee> their leaderboard value\n And they <maySeeRank>\n\n Examples:\n | mayHave | value | maySee | maySeeRank |\n | has | true | see | see their rank |\n | hasn\'t | true | see | don\'t see their rank |\n | N/A | false | don\'t see | don\'t see their rank |\n | hasn\'t | | see | don\'t see their rank |\n\n @minutiae\n Scenario: Users without names are displayed as an "Anonymous User"\n Given a user\n And they do not have a first name\n And they do not have a last initial\n When they view the leaderboard\n Then they see the user displayed as "Anonymous User"\n\n @minutiae\n Scenario Outline: If a user only has a first or last name, then only that is displayed\n Given a user\n And they only have a <name>\n When they view the leaderboard\n Then they only see their <name>\n\n Examples:\n | name |\n | firstName |\n | lastName |\n'}},Empty:()=>{const t={states:{loading:!1,hasLeaders:!1,styles:{...na}},data:{rankType:"rowNumber",leaderboard:[],rowNumber:10,viewerRank:{firstName:"Kutay",lastInitial:"C",textValue:"8",rowNumber:11,rank:23}},elements:{...aa}};return e(B,Object.assign({},t))},Loading:()=>{const t={states:{loading:!0,hasLeaders:!1,styles:{...na}},data:{rankType:"rowNumber",rowNumber:10,leaderboard:[]},elements:{...aa}};return e(B,Object.assign({},t))},Essentials:()=>{const t={states:{loading:!1,isEssentials:!0,hasLeaders:!1,styles:{...na}},data:{rankType:"rowNumber",leaderboard:[],rowNumber:10,viewerRank:{firstName:"Kutay",lastInitial:"C",textValue:"8",rowNumber:11,rank:23}},elements:{...aa}};return e(B,Object.assign({},t))},One:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na}},data:{rankType:"rowNumber",rowNumber:1,leaderboard:[{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1}],viewerRank:{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1}},elements:{...aa}};return e(B,Object.assign({},t))},Five:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na}},data:{rankType:"rowNumber",rowNumber:5,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},{firstName:"Mos",lastInitial:"D",textValue:"46",rank:5,rowNumber:5}],viewerRank:{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1}},elements:{...aa}};return e(B,Object.assign({},t))},ReferralLeaderboard:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na,rankheading:"Rank",usersheading:"User",statsheading:"Referrals",showRank:!1}},data:{rankType:"rowNumber",leaderboard:ea,rowNumber:10,viewerRank:{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1}},elements:{...aa}};return e(B,Object.assign({},t))},ReferralLeaderboardWithMaxWidth:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na,rankheading:"Rank",usersheading:"User",statsheading:"Referrals",showRank:!1,maxWidth:"300px"}},data:{rankType:"rowNumber",leaderboard:ea,rowNumber:10,viewerRank:{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1}},elements:{...aa}};return e(B,Object.assign({},t))},PointsLeaderboard:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na,rankheading:"Rank",usersheading:"User",statsheading:"Points",showRank:!1}},data:{rankType:"rowNumber",leaderboard:ta,rowNumber:10,viewerRank:{firstName:"Viktor",lastInitial:"V",textValue:"82 Points",rank:1,rowNumber:1}},elements:{...aa}};return e(B,Object.assign({},t))},TenWithRank:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na,showRank:!0}},data:{rankType:"rowNumber",leaderboard:ea,rowNumber:10,viewerRank:{firstName:"Viktor",lastInitial:"V",textValue:"82",rank:1,rowNumber:1}},elements:{...aa}};return e(B,Object.assign({},t))},ViewerOutside:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na,showRank:!0}},data:{rankType:"rowNumber",leaderboard:ea,rowNumber:10,viewerRank:{firstName:"Kutay",lastInitial:"C",textValue:"8",rowNumber:11,rank:24}},elements:{...aa}};return e(B,Object.assign({},t))},ViewerAnonymous:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na,showRank:!0}},data:{rankType:"rowNumber",leaderboard:ea,rowNumber:10,viewerRank:null},elements:{...aa}};return e(B,Object.assign({},t))},HideNamesWithViewerOutside:()=>{const t={states:{loading:!1,hasLeaders:!0,styles:{...na,showRank:!0,hideNames:!0}},data:{rankType:"rowNumber",leaderboard:ea,rowNumber:10,viewerRank:{textValue:"8",rowNumber:11,rank:42}},elements:{...aa}};return e(B,Object.assign({},t))},HideViewer:()=>{const t={states:{loading:!1,hasLeaders:!0,rowNumber:10,styles:{...na,showRank:!0,hideViewer:!0}},data:{rankType:"rowNumber",leaderboard:ea,rowNumber:10,viewerRank:{firstName:"Viktor",lastInitial:"V",textValue:"82",rowNumber:1,rank:1}},elements:{...aa}};return e(B,Object.assign({},t))},HideNames:()=>{const t={states:{loading:!1,hasLeaders:!0,rowNumber:10,styles:{...na,showRank:!0,hideNames:!0}},data:{rankType:"rowNumber",leaderboard:ea,rowNumber:10,viewerRank:{firstName:"Viktor",lastInitial:"V",textValue:"82",rowNumber:1,rank:1}},elements:{...aa}};return e(B,Object.assign({},t))},LeaderboardWithNoNamesAndGraphic:()=>e("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"center",width:"100%",gap:"50px"}},e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10px",maxWidth:"30%"}},e("sqm-image",{width:"70%",alignment:"center",imageUrl:"https://res.cloudinary.com/saasquatch-staging/image/upload/v1729728469/Leaderboard_image_z87lsm.png"}),e("h2",{style:{margin:"auto"}}," Top Performers"),e("p",{style:{margin:"0"}},"The leaderboard highlights the top performers in real-time. Stay motivated, stay competitive!")),e("sqm-leaderboard",{width:"300px",usersheading:"Referrer",statsheading:"Referrals","rank-type":"rank","leaderboard-type":"topStartedReferrers",rankheading:"Rank","show-rank":"true","hide-names":"true","hide-viewer":"true"},e("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"})))}),oa=({story:t},n)=>{var a;const r=null===(a=t.story.parameters)||void 0===a?void 0:a.hookStory;if(!r)return n;const o=Math.round(1e5*Math.random());return e("sqm-hook-story-container-"+o,null,e("sqm-hook-story-container",{hookStory:r}))};function ia(t){const n=()=>e("div",null);return n.parameters={hookStory:t},n}const sa=ia((()=>e("div",null,e("button",{onClick:()=>d.push("/")},"/"),e("button",{onClick:()=>d.push("/foo")},"/foo"),e("button",{onClick:()=>d.push("/bar")},"/bar"),e("button",{onClick:()=>d.push("/baz/bang")},"/baz/bang"),e("button",{onClick:()=>d.push("/refer")},"/refer"),e("button",{onClick:()=>d.push("/refer/1")},"/refer/1"),e("button",{onClick:()=>d.push("/refer/2")},"/refer/2"),e("button",{onClick:()=>d.back()},"Back"),e("button",{onClick:()=>d.forward()},"Forward"),e("hr",null),e("sqm-router",{innerHTML:'\n <template path="/foo"><h1>foo</h1>\n \n <p>These elements don\'t produce a specific box by themselves. They are replaced by their pseudo-box and their child boxes. Please note that the CSS Display Level 3 spec defines how the contents value should affect "unusual elements" — elements that aren’t rendered purely by CSS box concepts such as replaced elements. See Appendix B: Effects of display: contents on Unusual Elements for more details.\n\n Due to a bug in browsers this will currently remove the element from the accessibility tree — screen readers will not look at what\'s inside. See the Accessibility concerns section below for more details.</p>\n </template>\n <template path="/bar"><h2>bar</h2>\n \n <p>Turns off the display of an element so that it has no effect on layout (the document is rendered as though the element did not exist). All descendant elements also have their display turned off.\n To have an element take up the space that it would normally take, but without actually rendering anything, use the visibility property instead.</p>\n </template>\n <template path="/baz/bang"><h3>baz/bang</h3>\n <pre>\n ▄▄▄▄▄▄▄░▄▄▄▄▄▄▄░▄▄▄▄▄▄░▄▄▄▄▄\n ░░▀███░░░░▀██░░░░██▀░░░░██░░\n ░░░▀██░░░░░▀██░░▄█░░░░░▄█░░░\n ░░░░███░░░░░▀██▄█░░░░░░█░░░░\n ░░░░░███░░░░░▀██░░░░░░█▀░░░░\n ░░░░░░███░░░░▄███░░░░█▀░░░░░\n ░░░░░░░██▄░░▄▀░███░░█▀░░░░░░\n ░░░░░░░▀██▄█▀░░░███▄▀░░░░░░░\n ░░░░░░░░▀██▀░░░░░███░░░░░░░░\n ░░░░░░░░░▀▀░░░░░░░▀░░░░░░░░░\n </pre>\n </template>\n <template path="/refer/:page"><h3>/refer/:page</h3>\n <pre>\n refer/:page\n </pre>\n </template>\n'})))),la=ia((()=>e("div",null,e("button",{onClick:()=>d.push("/")},"/"),e("button",{onClick:()=>d.push("/foo")},"/foo"),e("button",{onClick:()=>d.push("/bar")},"/bar"),e("button",{onClick:()=>d.push("/baz/bang")},"/baz/bang"),e("button",{onClick:()=>d.push("/refer")},"/refer"),e("button",{onClick:()=>d.push("/refer/1")},"/refer/1"),e("button",{onClick:()=>d.push("/refer/2")},"/refer/2"),e("button",{onClick:()=>d.back()},"Back"),e("button",{onClick:()=>d.forward()},"Forward"),e("hr",null),e("sqm-router",{innerHTML:'\n <sqm-route path="/foo"><h1>foo</h1>\n \n <p>These elements don\'t produce a specific box by themselves. They are replaced by their pseudo-box and their child boxes. Please note that the CSS Display Level 3 spec defines how the contents value should affect "unusual elements" — elements that aren’t rendered purely by CSS box concepts such as replaced elements. See Appendix B: Effects of display: contents on Unusual Elements for more details.\n\n Due to a bug in browsers this will currently remove the element from the accessibility tree — screen readers will not look at what\'s inside. See the Accessibility concerns section below for more details.</p>\n </sqm-route>\n <sqm-route path="/bar"><h2>bar</h2>\n <p>Turns off the display of an element so that it has no effect on layout (the document is rendered as though the element did not exist). All descendant elements also have their display turned off.\n To have an element take up the space that it would normally take, but without actually rendering anything, use the visibility property instead.</p>\n </sqm-route>\n <sqm-route path="/baz/bang"><h3>baz/bang</h3>\n <pre>\n ▄▄▄▄▄▄▄░▄▄▄▄▄▄▄░▄▄▄▄▄▄░▄▄▄▄▄\n ░░▀███░░░░▀██░░░░██▀░░░░██░░\n ░░░▀██░░░░░▀██░░▄█░░░░░▄█░░░\n ░░░░███░░░░░▀██▄█░░░░░░█░░░░\n ░░░░░███░░░░░▀██░░░░░░█▀░░░░\n ░░░░░░███░░░░▄███░░░░█▀░░░░░\n ░░░░░░░██▄░░▄▀░███░░█▀░░░░░░\n ░░░░░░░▀██▄█▀░░░███▄▀░░░░░░░\n ░░░░░░░░▀██▀░░░░░███░░░░░░░░\n ░░░░░░░░░▀▀░░░░░░░▀░░░░░░░░░\n </pre>\n </sqm-route>\n <sqm-route path="/refer/:page"><h3>/refer/:page</h3>\n <pre>\n refer/:page\n </pre>\n </sqm-route>\n'})))),da=ia((()=>e("div",null,e("button",{onClick:()=>d.push("/")},"/"),e("button",{onClick:()=>d.push("/foo")},"/foo"),e("hr",null),e("div",{style:{display:"flex",justifyContent:"space-around"}},e("sqm-router",{innerHTML:'<template path="/">\n \n <div>Column 1</div>\n <div>Column 2 </div>\n </template>'})))));function ua(t){const{states:n,callbacks:a}=t;return[e("textarea",{style:{width:"100%",height:"300px"},onChange:e=>a.setEditedTemplate(e.target.value)},n.editedTemplate),e("button",{onClick:()=>a.setPreviewTemplate(n.editedTemplate)},"Update Preview"),e("label",null,"Current path:",e("input",{onInput:a.setPath,value:"/"})),e("div",{innerHTML:n.previewTemplate})]}const ca=ia((()=>{const{states:t,callbacks:n}=function(e){const[t,n]=o(e),[a,r]=o(e);return{states:{previewTemplate:a,editedTemplate:t},callbacks:{setEditedTemplate:n,setPreviewTemplate:r,setPath:function(e){d.push(e.target.value)}}}}('\n<sqm-router>\n <template path="/">\n <div>hello world</div>\n </template>\n</sqm-router>\n');return e(ua,{states:t,callbacks:n})})),ma=Object.freeze({__proto__:null,default:{title:"Tests/Router"},TemplateNavigation:sa,RouteNavigation:la,Styling:da,RouterPlayground:ca}),pa=Object.freeze({__proto__:null,default:{title:"Components/Leaderboard Rank",parameters:{scenario:'@owner:noah\n@author:noah\nFeature: Leaderboard Rank\n\n The leaderboard rank components displays the current users rank on the leaderboard.\n\n @minutiae\n Scenario: Users without a rank are shown a generic message\n Given a user has no rank\n Then the component displays a generic message\n And the message is the string from the prop "unrankedText"\n\n @motivating\n Scenario: Users with a rank are shown a message containing their rank\n Given a user has a valid rank\n And the prop "rankText" is an ICU message\n Then the ICU message is parsed to include the user\'s rank\n And the parsed message is displayed to the users\n\n @motivating\n Scenario Outline: Ranks from any of the three standard leaderboards can be displayed\n Given a leaderboard rank component with <leaderboardType>\n And a user has a valid rank\n When they view the leaderboard rank component\n Then they see their rank for <leaderboardType>\n Examples:\n | leaderboardType |\n | topStartedReferrers |\n | topConvertedReferrers |\n | topPointEarners |\n\n @motivating\n Scenario Outline: Leaderboard rank can be filtered with a time interval\n Given a leaderboard rank component with <leaderboardType>\n And it has prop "interval" with value "2021-11-02T07:00:00.000Z/2021-11-07T07:00:00.000Z"\n When they view the leaderboard rank component\n Then they see their rank for <results> from within "2021-11-02T07:00:00.000Z/2021-11-07T07:00:00.000Z"\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Program Context is used by default to filter leaderboard rank\n Given a <leaderboardType> leaderboard rank component loaded with program context for "my-program"\n When they view the leaderboard rank component\n Then they see their rank for <leaderboardType> from "my-program"\n Examples:\n | leaderboardType |\n | topStartedReferrers |\n | topConvertedReferrers |\n | topPointEarners |\n\n @motivating\n Scenario Outline: Program Id context can be overwritten with a prop\n Given a <leaderboardType> leaderboard rank component has prop "program-Id" with value "my-test-program"\n When they view the leaderboard rank component\n Then they see their rank for <leaderboardType> from "my-test-program"\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Global leaderboards ranks can be displayed by clearing program context\n #This can also be done with a program section in a similar manner\n Given a <leaderboardType> leaderboard rank component has prop "program-Id" with value ""\n When they view the leaderboard rank component\n Then they see global <results> rank\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario: Rank calculation is controlled by the "rankType" prop\n Given the current user is User C\n And User C has <points>\n And User A has <points>\n And User B has <points>\n And the value of the "rankType" prop is <rankType>\n Then the rank of the current user is <rank>\n Examples:\n | user | points | rankType | rank |\n | User A | 5 | rowNumber | 3 |\n | User B | 10 | rowNumber | 1 |\n | User C | 10 | rowNumber | 2 |\n\n | user | points | rankType | rank |\n | User A | 10 | rank | 1 |\n | User B | 10 | rank | 1 |\n | User C | 5 | rank | 3 |\n\n | user | points | rankType | rank |\n | User A | 10 | denseRank | 1 |\n | User B | 10 | denseRank | 1 |\n | User C | 5 | denseRank | 2 |'}},First:()=>e("p",null,"Your rank is ",e(E,Object.assign({},{data:{rank:"1st"}}))," on the leaderboard"),Second:()=>e("p",null,"Your rank is ",e(E,Object.assign({},{data:{rank:"2nd"}}))," on the leaderboard"),Unranked:()=>e("p",null,"You are currently ",e(E,Object.assign({},{data:{rank:"unranked"}})),", refer a friend!")}),ha={data:{footer:e("span",null,"example@example.com"),header:e("div",{slot:"header",style:{display:"flex",flexDirection:"column"}},e("span",{style:{fontSize:"var(--sl-font-size-large)",fontWeight:"bold"}},"Microsite Header"),e("span",{style:{fontSize:"var(--sl-font-size-small)"}},"A description for the microsite"))},callbacks:{rerender:()=>{}},ref:{current:void 0}},ga=Object.freeze({__proto__:null,default:{title:"Components/Microsite Frame"},FrameWithMenu:()=>{const t={...ha};return e(G,Object.assign({},t),e("sqm-navigation-menu",{"menu-label":"Menu"},e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/widget"},"Dashboard"),e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/editProfile"},"Edit Profile"),e("sl-menu-divider",null),e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/logout"},"Logout")))},FrameWithoutMenu:()=>{const t={...ha};return e(G,Object.assign({},t))},FullStackFrame:()=>{var t;return function(){const e="worried-camera@uexwltgh.mailosaur.net";window.SquatchAndroid=!0,window.widgetIdent={tenantAlias:"test_as36zjtpfy7oo",appDomain:"https://staging.referralsaasquatch.com",token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6IndvcnJpZWQtY2FtZXJhQHVleHdsdGdoLm1haWxvc2F1ci5uZXQiLCJpZCI6IndvcnJpZWQtY2FtZXJhQHVleHdsdGdoLm1haWxvc2F1ci5uZXQifX0.-WGV4_bzGCFp-OTIO-h-yp0MlgtkdufT_GgI4T691OY",userId:e,accountId:"worried-camera@uexwltgh.mailosaur.net",programId:"a-referral-program"}}(),e("div",null,e("sqm-portal-frame",null,e("div",{slot:"header",style:{display:"flex",flexDirection:"column"}},e("span",{style:{fontSize:"var(--sl-font-size-large)",fontWeight:"bold"}},"Portal Header"),e("span",{style:{fontSize:"var(--sl-font-size-small)"}},"A description for the portal")),e("a",{slot:"footer",class:"FooterEmail",href:"mailto:referrals@servicetitan.com"},"referrals@servicetitan.com"),e("sqm-navigation-menu",{"menu-label":"Menu"},e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/widget"},"Dashboard"),e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/editProfile"},"Edit Profile"),e("sl-menu-divider",null),e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/logout"},"Logout")),e("h1",null,"Something")),e("p",null,"Current path:"," ",e("code",null,e("strong",null,null===(t=u())||void 0===t?void 0:t.pathname))),e("button",{onClick:d.back},"Go Back"))},FullStackFrameLoggedOut:()=>{var t;return window.SquatchAndroid=!0,window.widgetIdent={tenantAlias:"test_as36zjtpfy7oo",appDomain:"https://staging.referralsaasquatch.com",programId:"a-referral-program"},e("div",null,e("sqm-portal-frame",null,e("div",{slot:"header",style:{display:"flex",flexDirection:"column"}},e("span",{style:{fontSize:"var(--sl-font-size-large)",fontWeight:"bold"}},"Portal Header"),e("span",{style:{fontSize:"var(--sl-font-size-small)"}},"A description for the portal")),e("span",{slot:"footer"},"sample@example.com"),e("sqm-navigation-menu",{"menu-label":"Menu"},e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/widget"},"Dashboard"),e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/editProfile"},"Edit Profile"),e("sl-menu-divider",null),e("sl-menu-item",{exportparts:"base: menuitem-base",value:"/logout"},"Logout")),e("h1",null,"Something")),e("p",null,"Current path:"," ",e("code",null,e("strong",null,null===(t=u())||void 0===t?void 0:t.pathname))),e("button",{onClick:d.back},"Go Back"))}}),fa={states:{loading:!1,submitDisabled:!1,formState:{currentRegion:"Canada",firstName:"Bill",lastName:"Bob",errors:{},error:"An error string"},user:{firstName:"Bill",lastName:"Bob",email:"billbob@example.com"},showEdit:!1,text:{editprofileheader:"Edit Profile",editprofiletext:"Update your profile.",firstnametext:"Bill",lastnametext:"Bob",canceltext:"Cancel",updatetext:"Update",currentregiontext:"Canada"}},callbacks:{onSubmit:e=>{console.log(e)},resetForm:()=>{console.log("reset")},onChange:()=>{console.log("change")},setShowEdit:e=>{console.log(e)}}},ba=Object.freeze({__proto__:null,default:{title:"Components/Edit Profile Form"},EditProfileFormDisabled:()=>e(j,Object.assign({},fa)),EditProfileFormEnabled:()=>{const t={...fa,states:{...fa.states,showEdit:!0}};return e(j,Object.assign({},t))},FullStackFrameWithMenu:()=>e("sqm-edit-profile",{editprofileheader:"Edit Profile",editprofiletext:"Update your profile.",firstnametext:"Bill",lastnametext:"Bob",canceltext:"Cancel",updatetext:"Update",currentregiontext:"Current Region",showregion:!0})});function wa(){window.widgetIdent={tenantAlias:"test_a74miwdpofztj",appDomain:"https://staging.referralsaasquatch.com",programId:"klip-referral-program"},i((()=>(c({accountId:"zach.harrison@referralsaasquatch.com",id:"zach.harrison@referralsaasquatch.com",jwt:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoiemFjaC5oYXJyaXNvbkByZWZlcnJhbHNhYXNxdWF0Y2guY29tIiwiYWNjb3VudElkIjoiemFjaC5oYXJyaXNvbkByZWZlcnJhbHNhYXNxdWF0Y2guY29tIn19.Wi8Vd5r64g5n8VNhiY-v5cqFcLwGxPG3Wi3dVSfkFZI"}),()=>{window.widgetIdent=void 0,c(void 0)})),[])}const xa=ia((()=>{wa();const t=M({programId:"klip-referral-program",tooltiplifespan:0,tooltiptext:""});return e("div",null,"Sharelink:"," ",e("code",{style:{borderStyle:"solid",borderWidth:"1px",padding:"2px"}},t.copyString))})),ya=ia((()=>(wa(),e(f,Object.assign({},M({programId:"klip-referral-program",tooltiptext:"Copied to clipboard",tooltiplifespan:1e3})))))),va=ia((()=>(wa(),e(f,Object.assign({},M({programId:"klip-referral-program",tooltiptext:"⠀⠀⠀⠀⠀⠀⠀⠀⠀HELLO THERE!!!\n⠀⠀⠀⡯⡯⡾⠝⠘⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢊⠘⡮⣣⠪⠢⡑⡌\n⠀⠀⠀⠟⠝⠈⠀⠀⠀⠡⠀⠠⢈⠠⢐⢠⢂⢔⣐⢄⡂⢔⠀⡁⢉⠸⢨⢑⠕⡌\n⠀⠀⡀⠁⠀⠀⠀⡀⢂⠡⠈⡔⣕⢮⣳⢯⣿⣻⣟⣯⣯⢷⣫⣆⡂⠀⠀⢐⠑⡌\n⢀⠠⠐⠈⠀⢀⢂⠢⡂⠕⡁⣝⢮⣳⢽⡽⣾⣻⣿⣯⡯⣟⣞⢾⢜⢆⠀⡀⠀⠪\n⣬⠂⠀⠀⢀⢂⢪⠨⢂⠥⣺⡪⣗⢗⣽⢽⡯⣿⣽⣷⢿⡽⡾⡽⣝⢎⠀⠀⠀⢡\n⣿⠀⠀⠀⢂⠢⢂⢥⢱⡹⣪⢞⡵⣻⡪⡯⡯⣟⡾⣿⣻⡽⣯⡻⣪⠧⠑⠀⠁⢐\n⣿⠀⠀⠀⠢⢑⠠⠑⠕⡝⡎⡗⡝⡎⣞⢽⡹⣕⢯⢻⠹⡹⢚⠝⡷⡽⡨⠀⠀⢔\n⣿⡯⠀⢈⠈⢄⠂⠂⠐⠀⠌⠠⢑⠱⡱⡱⡑⢔⠁⠀⡀⠐⠐⠐⡡⡹⣪⠀⠀⢘\n⣿⣽⠀⡀⡊⠀⠐⠨⠈⡁⠂⢈⠠⡱⡽⣷⡑⠁⠠⠑⠀⢉⢇⣤⢘⣪⢽⠀⢌⢎\n⣿⢾⠀⢌⠌⠀⡁⠢⠂⠐⡀⠀⢀⢳⢽⣽⡺⣨⢄⣑⢉⢃⢭⡲⣕⡭⣹⠠⢐⢗\n⣿⡗⠀⠢⠡⡱⡸⣔⢵⢱⢸⠈⠀⡪⣳⣳⢹⢜⡵⣱⢱⡱⣳⡹⣵⣻⢔⢅⢬⡷\n⣷⡇⡂⠡⡑⢕⢕⠕⡑⠡⢂⢊⢐⢕⡝⡮⡧⡳⣝⢴⡐⣁⠃⡫⡒⣕⢏⡮⣷⡟\n⣷⣻⣅⠑⢌⠢⠁⢐⠠⠑⡐⠐⠌⡪⠮⡫⠪⡪⡪⣺⢸⠰⠡⠠⠐⢱⠨⡪⡪⡰\n⣯⢷⣟⣇⡂⡂⡌⡀⠀⠁⡂⠅⠂⠀⡑⡄⢇⠇⢝⡨⡠⡁⢐⠠⢀⢪⡐⡜⡪⡊\n⣿⢽⡾⢹⡄⠕⡅⢇⠂⠑⣴⡬⣬⣬⣆⢮⣦⣷⣵⣷⡗⢃⢮⠱⡸⢰⢱⢸⢨⢌\n⣯⢯⣟⠸⣳⡅⠜⠔⡌⡐⠈⠻⠟⣿⢿⣿⣿⠿⡻⣃⠢⣱⡳⡱⡩⢢⠣⡃⠢⠁\n⡯⣟⣞⡇⡿⣽⡪⡘⡰⠨⢐⢀⠢⢢⢄⢤⣰⠼⡾⢕⢕⡵⣝⠎⢌⢪⠪⡘⡌⠀\n⡯⣳⠯⠚⢊⠡⡂⢂⠨⠊⠔⡑⠬⡸⣘⢬⢪⣪⡺⡼⣕⢯⢞⢕⢝⠎⢻⢼⣀⠀\n⠁⡂⠔⡁⡢⠣⢀⠢⠀⠅⠱⡐⡱⡘⡔⡕⡕⣲⡹⣎⡮⡏⡑⢜⢼⡱⢩⣗⣯⣟\n⢀⢂⢑⠀⡂⡃⠅⠊⢄⢑⠠⠑⢕⢕⢝⢮⢺⢕⢟⢮⢊⢢⢱⢄⠃⣇⣞⢞⣞⢾\n⢀⠢⡑⡀⢂⢊⠠⠁⡂⡐⠀⠅⡈⠪⠪⠪⠣⠫⠑⡁⢔⠕⣜⣜⢦⡰⡎⡯⡾⡽",tooltiplifespan:500})))))),qa=Object.freeze({__proto__:null,default:{title:"Hooks / useShareLink"},BareBonesView:xa,RegularView:ya,FastTooltip:va});function Ea(){window.widgetIdent={tenantAlias:"test_a8b41jotf8a1v",appDomain:"https://staging.referralsaasquatch.com",programId:"sam-partner-test-2"},i((()=>(c({accountId:"testestest",id:"testestest",jwt:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs"}),()=>{window.widgetIdent=void 0,c(void 0)})),[])}const Aa=ia((()=>{Ea();const t="sam-partner-test-2",n=[U({programId:t,medium:"facebook"}),U({programId:t,medium:"twitter"}),U({programId:t,medium:"email"}),U({programId:t,medium:"direct"}),U({programId:t,medium:"sms"})];return e("div",null,n.map((t=>e("div",null,e("button",{onClick:t.onClick},"Share link (",t.medium,")")))))})),Ca=ia((()=>(Ea(),e("div",null,["facebook","twitter","email","direct","sms"].map((t=>e("div",null,e("sqm-share-button",Object.assign({},{programId:"sam-partner-test-2",medium:t}),"BUTTON_TEXT")))))))),ka=Object.freeze({__proto__:null,default:{title:"Hooks / useShareButton"},BareBonesView:Aa,RegularView:Ca}),Ta=(t,n,a)=>(window.widgetIdent={tenantAlias:"test_a74miwdpofztj",appDomain:"https://staging.referralsaasquatch.com",programId:"klip-referral-program"},i((()=>(c({accountId:"zach.harrison@referralsaasquatch.com",id:"zach.harrison@referralsaasquatch.com",jwt:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoiemFjaC5oYXJyaXNvbkByZWZlcnJhbHNhYXNxdWF0Y2guY29tIiwiYWNjb3VudElkIjoiemFjaC5oYXJyaXNvbkByZWZlcnJhbHNhYXNxdWF0Y2guY29tIn19.Wi8Vd5r64g5n8VNhiY-v5cqFcLwGxPG3Wi3dVSfkFZI"}),()=>{window.widgetIdent=void 0,c(void 0)})),[]),e("div",null,e("b",null,"Stat format:"),e("pre",null,n),e("br",null),e("b",null,"Stat selected:")," ",e("pre",{style:{color:"green"}},t),e("sqm-big-stat",{"stat-type":t},a))),Da=ia((()=>{const[t,n]=o("/someRandomThing/with/someArguments/1234"),{props:a,label:r}=W({statType:t,render:()=>{},disconnectedCallback:()=>{},ignored:!0});return e("div",null,e("div",null,"Stat type:"," ",e("input",{style:{width:"300px"},type:"text",value:t,onInput:e=>n(e.target.value)})),e("hr",null),e("div",null,e(_,Object.assign({},a),r)))})),Ra=ia((()=>Ta("/referralsCount","/(referralsCount)/:status?"))),Sa=ia((()=>Ta("/referralsCount/converted","/(referralsCount)/:status?"))),Pa=ia((()=>Ta("/referralsCount/started","/(referralsCount)/:status?"))),Ia=ia((()=>Ta("/referralsMonth","/(referralsMonth)"))),Fa=ia((()=>Ta("/referralsWeek","/(referralsWeek)"))),Na=ia((()=>Ta("/rewardsCount","/(rewardsCount)/:global?"))),Oa=ia((()=>Ta("/rewardsCount/global","/(rewardsCount)/:global"))),La=ia((()=>Ta("/rewardsCountFiltered/global","/(rewardsCountFiltered)/:statType([INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),Ba=ia((()=>Ta("/rewardsCountFiltered/PCT_DISCOUNT/global","/(rewardsCountFiltered)/:statType([INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),_a=ia((()=>Ta("/rewardsCountFiltered/PCT_DISCOUNT/PENDING/global","/(rewardsCountFiltered)/:statType([INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),Ga=ia((()=>Ta("/rewardsCountFiltered/CREDIT/COFFEE","/(rewardsCountFiltered)/:statType([INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),ja=ia((()=>Ta("/rewardsCountFiltered/CREDIT/COFFEE/global","/(rewardsCountFiltered)/:statType([INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),Ma=ia((()=>Ta("/rewardsCountFiltered/CREDIT/COFFEE/PENDING/global","/(rewardsCountFiltered)/:statType([INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),Ua=ia((()=>Ta("/rewardsCountFiltered/AVAILABLE","/(rewardsCountFiltered)/:statType([INTEGRATION|PCT_DISCOUNT|CREDIT]*)?/:unit((?!global)(?!PENDING)(?!CANCELLED)(?!EXPIRED)(?!REDEEMED)(?!AVAILABLE)[a-zA-Z0-9%]+)?/:status([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),Wa=ia((()=>Ta("/integrationRewardsCountFiltered/AVAILABLE/global","/(integrationRewardsCountFiltered)/:format([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),Va=ia((()=>Ta("/integrationRewardsCountFiltered/PENDING/global","/(integrationRewardsCountFiltered)/:format([PENDING|CANCELLED|EXPIRED|REDEEMED|AVAILABLE]*)?/:global?"))),Ha=ia((()=>Ta("/rewardsMonth","/(rewardsMonth)/:global?"))),za=ia((()=>Ta("/rewardsWeek","/(rewardsWeek)/:global?"))),Ya=ia((()=>Ta("/rewardsAssigned/CREDIT/COFFEE","/(rewardsAssigned)/:statType/:unit/:global?"))),$a=ia((()=>Ta("/rewardsAssigned/CREDIT/CASH%2FUSD","/(rewardsAssigned)/:statType/:unit/:global?"))),Xa=ia((()=>Ta("/rewardsPending/CREDIT/USD","/(rewardsPending)/:statType/:unit/:global?"))),Ja=ia((()=>Ta("/rewardsPending/CREDIT/USD/global","/(rewardsPending)/:statType/:unit/:global?"))),Ka=ia((()=>Ta("/rewardsRedeemed/CREDIT/USD","/(rewardsRedeemed)/:statType/:unit/:global?"))),Za=ia((()=>Ta("/rewardsRedeemedWeek/CREDIT/USD","/(rewardsRedeemedWeek)/:statType/:unit/:global?"))),Qa=ia((()=>Ta("/rewardsRedeemedMonth/CREDIT/USD","/(rewardsRedeemedMonth)/:statType/:unit/:global?"))),er=ia((()=>Ta("/rewardsRedeemed/CREDIT/USD/global","/(rewardsRedeemed)/:statType/:unit/:global?"))),tr=ia((()=>Ta("/rewardsRedeemedWeek/CREDIT/USD/global","/(rewardsRedeemedWeek)/:statType/:unit/:global?"))),nr=ia((()=>Ta("/rewardsRedeemedMonth/CREDIT/USD/global","/(rewardsRedeemedMonth)/:statType/:unit/:global?"))),ar=ia((()=>Ta("/rewardsAvailable/CREDIT/COFFEE","/(rewardsAvailable)/:statType/:unit/:global?"))),rr=ia((()=>Ta("/rewardsAvailable/CREDIT/CASH%2FUSD","/(rewardsAvailable)/:statType/:unit/:global?"))),or=ia((()=>Ta("/rewardBalance/CREDIT/COFFEE/prettyValue","/(rewardBalance)/:statType/:unit/:format([prettyValue|value]*)?/:global?"))),ir=ia((()=>{const e=encodeURIComponent("CASH/USD");return Ta(`/rewardBalance/CREDIT/${e}/prettyValue`,"/(rewardBalance)/:statType/:unit/:format([prettyValue|value]*)?/:global?")})),sr=ia((()=>{const e=encodeURIComponent("Paid-Member-Goal/referrals");return Ta(`/programGoals/count/${e}`,"/(programGoals)/:metricType/:goalId")})),lr=ia((()=>Ta("/customFields/thingCount","/(customFields)/:customField"))),dr=ia((()=>Ta("/customFields/thingCount","/(customFields)/:customField",e("sqm-text",null,"Thing Count")))),ur=ia((()=>Ta("/customFields/thingCount","/(customFields)/:customField"," "))),cr=ia((()=>Ta("/customFields/thingCount","/(customFields)/:customField","\n "))),mr=ia((()=>Ta("/customFields/thingCount","/(customFields)/:customField","Thing Count"))),pr=ia((()=>Ta("/traffic","/(traffic)"))),hr=ia((()=>Ta("/userStats/traffic","/(userStat)/:statId","Traffic"))),gr=ia((()=>Ta("/userStats/referrals","/(userStat)/:statId","Referrals"))),fr=ia((()=>Ta("/userStats/conversions","/(userStat)/:statId","Conversions"))),br=ia((()=>Ta("/userStats/goals","/(userStat)/:statId","Goals"))),wr=ia((()=>Ta("/userStats/rewards","/(userStat)/:statId","Rewards"))),xr=ia((()=>Ta("/userStats/widgetLoads","/(userStat)/:statId","Widget Loads"))),yr=ia((()=>Ta("/userStats/revenue","/(userStat)/:statId","Revenue"))),vr=ia((()=>Ta("/userStats/generatedRevenue","/(userStat)/:statId","Generated Revenue"))),qr=ia((()=>Ta("/userStats/referredRevenue","/(userStat)/:statId","Referred Revenue"))),Er=ia((()=>Ta("/payoutBalance","/(payoutBalance)"))),Ar=Object.freeze({__proto__:null,default:{title:"Hooks / useBigStat"},Demo:Da,ReferralsCount:Ra,referralsConvertedCount:Sa,referralsStartedCount:Pa,ReferralsMonth:Ia,ReferralsWeek:Fa,RewardsCount:Na,GlobalRewardsCount:Oa,GlobalRewardsCountFiltered:La,GlobalRewardsCountPctDiscount:Ba,GlobalRewardsCountPctDiscountPending:_a,RewardsCountByUnit:Ga,GlobalRewardsCountByUnit:ja,GlobalPendingRewardsCount:Ma,RewardsAvailableCount:Ua,GlobalRewardsCountByIntegration:Wa,GlobalRewardsCountByPendingIntegration:Va,RewardsMonth:Ha,RewardsWeek:za,RewardsAssigned:Ya,RewardsAssignedCashUSD:$a,RewardsPending:Xa,RewardsPendingGlobal:Ja,RewardsRedeemed:Ka,RewardsRedeemedWeek:Za,RewardsRedeemedMonth:Qa,RewardsRedeemedGlobal:er,RewardsRedeemedWeekGlobal:tr,RewardsRedeemedMonthGlobal:nr,RewardsAvailable:ar,RewardsAvailableWithSlash:rr,RewardBalance:or,RewardBalanceCashUSD:ir,ProgramGoals:sr,CustomField:lr,CustomFieldWithLabel:dr,CustomFieldWithEmptyLabel:ur,CustomFieldWithEmptySpaceLabel:cr,CustomFieldWithTextLabel:mr,Traffic:pr,TrafficTwo:hr,Referrals:gr,Conversions:fr,Goals:br,Rewards:wr,WidgetLoads:xr,Revenue:yr,GeneratedRevenue:vr,ReferredRevenue:qr,PayoutBalance:Er}),Cr=ia((()=>(window.widgetIdent={tenantAlias:"test_as36zjtpfy7oo",appDomain:"https://staging.referralsaasquatch.com",programId:"a-referral-program"},i((()=>(c({accountId:"worried-camera@uexwltgh.mailosaur.net",id:"worried-camera@uexwltgh.mailosaur.net",jwt:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6IndvcnJpZWQtY2FtZXJhQHVleHdsdGdoLm1haWxvc2F1ci5uZXQiLCJpZCI6IndvcnJpZWQtY2FtZXJhQHVleHdsdGdoLm1haWxvc2F1ci5uZXQiLCJmaXJzdE5hbWUiOiJ0ZXN0IiwibGFzdE5hbWUiOiJ0ZXN0In19.ziDWbdCwsTo1ijxl8d2__Ga-6iFOVShaJUPp2ZBMeO0"}),()=>{window.widgetIdent=void 0,c(void 0)})),[]),e("sqm-edit-profile",Object.assign({},{editprofileheader:"HEADER",editprofiletext:"TEXT",firstnametext:"FIRST NAME",lastnametext:"LAST NAME",canceltext:"CANCEL",updatetext:"UPDATE",currentregiontext:"CURRENT REGION TEXT"}))))),kr=Object.freeze({__proto__:null,default:{title:"Hooks / useEditProfile"},RegularView:Cr});function Tr(){window.widgetIdent={tenantAlias:"test_a8b41jotf8a1v",appDomain:"https://staging.referralsaasquatch.com",programId:"sam-partner-test-2"},i((()=>(c({accountId:"testestest",id:"testestest",jwt:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InRlc3Rlc3Rlc3QiLCJpZCI6InRlc3Rlc3Rlc3QifX0.qYnU5hNeIj9C_G3NogfG7btgCPGZC7JRXY0MG6a63zs"}),()=>{window.widgetIdent=void 0,c(void 0)})),[])}const Dr=t=>{const n={"leaderboard-type":"topConvertedReferrers",showRank:!0,"rank-type":"rowNumber",usersheading:"Top Referrers",statsheading:"Completed Referrals",interval:"",...t},{leaderboardType:a,rankType:r}=n;return e("div",{style:{marginBottom:"20px"}},e("sqm-divided-layout",{direction:"row"},e("div",{style:{padding:"10px"}},e("b",null,"Leaderboard Type"),e("pre",null,a)),e("div",{style:{padding:"10px"}},e("b",null,"Rank Type"),e("pre",null,r))),e("sqm-leaderboard",Object.assign({},n),e("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"})),e("hr",null))},Rr=ia((()=>(Tr(),[Dr({}),Dr({rankType:"rank"}),Dr({rankType:"denseRank"})]))),Sr=ia((()=>(Tr(),[Dr({leaderboardType:"topStartedReferrers",statsheading:"New Referrals"}),Dr({leaderboardType:"topStartedReferrers",rankType:"rank",statsheading:"New Referrals"}),Dr({leaderboardType:"topStartedReferrers",rankType:"denseRank",statsheading:"New Referrals"})]))),Pr=ia((()=>(Tr(),[Dr({leaderboardType:"topPointEarners",statsheading:"Points",usersheading:"Top Earners"}),Dr({leaderboardType:"topPointEarners",rankType:"rank",statsheading:"Points",usersheading:"Top Earners"}),Dr({leaderboardType:"topPointEarners",rankType:"denseRank",statsheading:"Points",usersheading:"Top Earners"})]))),Ir=ia((()=>(Tr(),[Dr({leaderboardType:"topPointEarners",rankType:"rank",statsheading:"Points",usersheading:"Top Earners",programId:""}),Dr({leaderboardType:"topStartedReferrers",rankType:"rank",statsheading:"Referrals",programId:""}),Dr({leaderboardType:"topConvertedReferrers",rankType:"rank",statsheading:"Referrals",programId:""})]))),Fr=ia((()=>(Tr(),[Dr({leaderboardType:"topStartedReferrers",maxRows:5,statsheading:"Referrals"})]))),Nr=ia((()=>(function(){const e="sam+klip@saasquat.ch";window.widgetIdent={tenantAlias:"test_a74miwdpofztj",appDomain:"https://staging.referralsaasquatch.com",programId:"klip-referral-program"},i((()=>(c({accountId:"sam+klip@saasquat.ch",id:e,jwt:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InNhbStrbGlwQHNhYXNxdWF0LmNoIiwiaWQiOiJzYW0ra2xpcEBzYWFzcXVhdC5jaCIsImVtYWlsIjoic2FtK2tsaXBAc2Fhc3F1YXQuY2giLCJsb2NhbGUiOiJlbiJ9fQ.a2nYYrSJ81FHXlCU-Sqp_-wquQizinHBhzwzULDzimg"}),()=>{window.widgetIdent=void 0,c(void 0)})),[])}(),[Dr({leaderboardType:"topStartedReferrers",statsheading:"New Referrals",interval:"2021-02-11T08:00:00.000Z/2021-02-13T08:00:00.000Z"}),Dr({leaderboardType:"topStartedReferrers",rankType:"rank",statsheading:"New Referrals",interval:"2021-02-11T08:00:00.000Z/2021-02-13T08:00:00.000Z"}),Dr({leaderboardType:"topStartedReferrers",rankType:"denseRank",statsheading:"New Referrals",interval:"2021-02-11T08:00:00.000Z/2021-02-13T08:00:00.000Z"})]))),Or=ia((()=>e("sqm-leaderboard",{usersheading:"Referrer",statsheading:"Referrals","rank-type":"rank","leaderboard-type":"topStartedReferrers",rankheading:"Rank","show-rank":"true"},e("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"})))),Lr=ia((()=>e("sqm-leaderboard",{usersheading:"Referrer",statsheading:"Referrals","rank-type":"rank","leaderboard-type":"topStartedReferrers",rankheading:"Rank","show-rank":"true",demoData:{data:{rankType:"rank",leaderboard:[]},states:{loading:!1,hasLeaders:!1,styles:{usersheading:"Top referrers",statsheading:"New customers",rankheading:"Rank",anonymousUser:"Anonymous User",showRank:!0}}}},e("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"})))),Br=Object.freeze({__proto__:null,default:{title:"Hooks / useLeaderboard"},TopConvertedReferrers:Rr,TopStartedReferrers:Sr,topPointEarners:Pr,globalLeaderboards:Ir,FiveResults:Fr,EmptyLeaderboard:Nr,DemoHook:Or,DemoHookEmpty:Lr}),_r=Object.freeze({__proto__:null,default:{title:"Components/Form Message"},SuccessAlert:()=>e("sqm-form-message",{type:"success"},e("div",null,"This is a success message.")),ErrorAlert:()=>e("sqm-form-message",{type:"error"},e("div",null,"This is an error message")),WarningAlert:()=>e("sqm-form-message",{type:"warning"},e("div",null,"This is an error message")),InfoAlert:()=>e("sqm-form-message",{type:"info"},e("div",null,"This is an info message")),FullStackSuccess:()=>e("sqm-form-message",{type:"success",exportparts:"successalert-icon"},e("div",{class:"AlertContent"},e("div",{part:"successalert-text"},"Title"),e("div",{part:"successalert-subtext"},"Body text."),e("sl-button",{type:"default",exportparts:"base: defaultbutton-base",onClick:()=>{console.log("click")}},"Primary Action"),e("sl-button",{class:"SecondaryTextButton",type:"text",onClick:()=>{console.log("click")}},"Secondary Action")))}),Gr=m.gql`
|
|
2
2
|
mutation exchange($exchangeRewardInput: ExchangeRewardInput!) {
|
|
3
3
|
exchangeReward(exchangeRewardInput: $exchangeRewardInput) {
|
|
4
4
|
reward {
|