@stigg/react-sdk 7.7.1-beta.1 → 7.8.0-beta.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.
@@ -1,3506 +0,0 @@
1
- "use strict";var Po=Object.create;var sn=Object.defineProperty,So=Object.defineProperties,Do=Object.getOwnPropertyDescriptor,vo=Object.getOwnPropertyDescriptors,xo=Object.getOwnPropertyNames,St=Object.getOwnPropertySymbols,Io=Object.getPrototypeOf,cn=Object.prototype.hasOwnProperty,Ei=Object.prototype.propertyIsEnumerable;var bi=(e,n,i)=>n in e?sn(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i,I=(e,n)=>{for(var i in n||(n={}))cn.call(n,i)&&bi(e,i,n[i]);if(St)for(var i of St(n))Ei.call(n,i)&&bi(e,i,n[i]);return e},_=(e,n)=>So(e,vo(n));var se=(e,n)=>{var i={};for(var r in e)cn.call(e,r)&&n.indexOf(r)<0&&(i[r]=e[r]);if(e!=null&&St)for(var r of St(e))n.indexOf(r)<0&&Ei.call(e,r)&&(i[r]=e[r]);return i};var To=(e,n,i,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of xo(n))!cn.call(e,t)&&t!==i&&sn(e,t,{get:()=>n[t],enumerable:!(r=Do(n,t))||r.enumerable});return e};var Ao=(e,n,i)=>(i=e!=null?Po(Io(e)):{},To(n||!e||!e.__esModule?sn(i,"default",{value:e,enumerable:!0}):i,e));var B=(e,n,i)=>new Promise((r,t)=>{var a=l=>{try{c(i.next(l))}catch(u){t(u)}},s=l=>{try{c(i.throw(l))}catch(u){t(u)}},c=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,s);c((i=i.apply(e,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("@stigg/js-client-sdk"),o=require("react/jsx-runtime"),D=require("react"),Dr=require("classnames"),R=require("@mui/material/Grid"),ee=require("lodash"),vr=require("react-spinners/ClipLoader"),le=require("color"),ft=require("lodash/merge"),oe=require("moment"),De=require("lodash/isNil"),ko=require("currency-symbol-map"),No=require("@mui/material/InputAdornment"),we=require("@mui/material/Button"),wo=require("@mui/material/TextField"),We=require("@mui/material/Divider"),H=require("react-loading-skeleton"),Fo=require("@mui/material/OutlinedInput"),jo=require("@mui/material/Select"),Ro=require("@mui/material/MenuItem"),K=require("@mui/material"),Mo=require("react-switch"),Gt=require("lodash/sortBy"),ln=require("@mui/material/styles"),Q=require("@mui/material/Box"),Uo=require("@mui/material/Tabs"),Oe=require("react-feather"),xr=require("@mui/material/Link"),un=require("@mui/material/Tooltip"),It=require("@mui/material/LinearProgress"),Oo=require("immer"),Lo=require("lodash/cloneDeep"),Bo=require("lodash/remove"),Pi=require("lodash/keyBy"),Si=require("lodash/compact"),_o=require("lodash/partition"),Bn=require("@mui/material/CircularProgress"),$o=require("@mui/material/Paper"),_n=require("lodash/isEmpty"),st=require("@stripe/react-stripe-js"),Go=require("react-lottie"),Ir=require("@mui/material/Collapse"),dn=require("lodash/lowerCase"),Tr=require("@mui/material/Alert"),Ar=require("@mui/material/Radio"),Vo=require("@mui/material/Chip"),he=require("chart.js"),Ho=require("chartjs-plugin-datalabels"),qo=require("chartjs-plugin-annotation"),Wo=require("chartjs-plugin-gradient"),Yo=require("react-chartjs-2"),Zo=require("lodash/debounce"),kr=require("lodash/flatMap"),Di=require("@mui/material/Tab"),xi=require("lodash/isUndefined"),zo=require("@mui/material/StepIcon");function Ko(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:()=>e[i]})}}return n.default=e,Object.freeze(n)}const E=Ko(D);function In(){return In=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},In.apply(this,arguments)}function Nr(e){var n=Object.create(null);return function(i){return n[i]===void 0&&(n[i]=e(i)),n[i]}}var Qo=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Xo=Nr(function(e){return Qo.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function Jo(e){if(e.sheet)return e.sheet;for(var n=0;n<document.styleSheets.length;n++)if(document.styleSheets[n].ownerNode===e)return document.styleSheets[n]}function es(e){var n=document.createElement("style");return n.setAttribute("data-emotion",e.key),e.nonce!==void 0&&n.setAttribute("nonce",e.nonce),n.appendChild(document.createTextNode("")),n.setAttribute("data-s",""),n}var ts=(function(){function e(i){var r=this;this._insertTag=function(t){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(t,a),r.tags.push(t)},this.isSpeedy=i.speedy===void 0?process.env.NODE_ENV==="production":i.speedy,this.tags=[],this.ctr=0,this.nonce=i.nonce,this.key=i.key,this.container=i.container,this.prepend=i.prepend,this.insertionPoint=i.insertionPoint,this.before=null}var n=e.prototype;return n.hydrate=function(r){r.forEach(this._insertTag)},n.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(es(this));var t=this.tags[this.tags.length-1];if(process.env.NODE_ENV!=="production"){var a=r.charCodeAt(0)===64&&r.charCodeAt(1)===105;a&&this._alreadyInsertedOrderInsensitiveRule&&console.error(`You're attempting to insert the following rule:
2
- `+r+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!a}if(this.isSpeedy){var s=Jo(t);try{s.insertRule(r,s.cssRules.length)}catch(c){process.env.NODE_ENV!=="production"&&!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(r)&&console.error('There was a problem inserting the following rule: "'+r+'"',c)}}else t.appendChild(document.createTextNode(r));this.ctr++},n.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0,process.env.NODE_ENV!=="production"&&(this._alreadyInsertedOrderInsensitiveRule=!1)},e})(),ae="-ms-",Ot="-moz-",$="-webkit-",$n="comm",Gn="rule",Vn="decl",ns="@import",wr="@keyframes",is=Math.abs,Vt=String.fromCharCode,rs=Object.assign;function as(e,n){return ie(e,0)^45?(((n<<2^ie(e,0))<<2^ie(e,1))<<2^ie(e,2))<<2^ie(e,3):0}function Fr(e){return e.trim()}function os(e,n){return(e=n.exec(e))?e[0]:e}function G(e,n,i){return e.replace(n,i)}function Tn(e,n){return e.indexOf(n)}function ie(e,n){return e.charCodeAt(n)|0}function ct(e,n,i){return e.slice(n,i)}function Ee(e){return e.length}function Hn(e){return e.length}function Dt(e,n){return n.push(e),e}function ss(e,n){return e.map(n).join("")}var Ht=1,Ye=1,jr=0,ce=0,J=0,ze="";function qt(e,n,i,r,t,a,s){return{value:e,root:n,parent:i,type:r,props:t,children:a,line:Ht,column:Ye,length:s,return:""}}function nt(e,n){return rs(qt("",null,null,"",null,null,0),e,{length:-e.length},n)}function cs(){return J}function ls(){return J=ce>0?ie(ze,--ce):0,Ye--,J===10&&(Ye=1,Ht--),J}function de(){return J=ce<jr?ie(ze,ce++):0,Ye++,J===10&&(Ye=1,Ht++),J}function Pe(){return ie(ze,ce)}function Tt(){return ce}function ht(e,n){return ct(ze,e,n)}function lt(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 Rr(e){return Ht=Ye=1,jr=Ee(ze=e),ce=0,[]}function Mr(e){return ze="",e}function At(e){return Fr(ht(ce-1,An(e===91?e+2:e===40?e+1:e)))}function us(e){for(;(J=Pe())&&J<33;)de();return lt(e)>2||lt(J)>3?"":" "}function ds(e,n){for(;--n&&de()&&!(J<48||J>102||J>57&&J<65||J>70&&J<97););return ht(e,Tt()+(n<6&&Pe()==32&&de()==32))}function An(e){for(;de();)switch(J){case e:return ce;case 34:case 39:e!==34&&e!==39&&An(J);break;case 40:e===41&&An(e);break;case 92:de();break}return ce}function ms(e,n){for(;de()&&e+J!==57;)if(e+J===84&&Pe()===47)break;return"/*"+ht(n,ce-1)+"*"+Vt(e===47?e:de())}function gs(e){for(;!lt(Pe());)de();return ht(e,ce)}function ps(e){return Mr(kt("",null,null,null,[""],e=Rr(e),0,[0],e))}function kt(e,n,i,r,t,a,s,c,l){for(var u=0,d=0,p=s,m=0,f=0,g=0,y=1,P=1,S=1,v=0,A="",k=t,w=a,T=r,N=A;P;)switch(g=v,v=de()){case 40:if(g!=108&&ie(N,p-1)==58){Tn(N+=G(At(v),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:N+=At(v);break;case 9:case 10:case 13:case 32:N+=us(g);break;case 92:N+=ds(Tt()-1,7);continue;case 47:switch(Pe()){case 42:case 47:Dt(fs(ms(de(),Tt()),n,i),l);break;default:N+="/"}break;case 123*y:c[u++]=Ee(N)*S;case 125*y:case 59:case 0:switch(v){case 0:case 125:P=0;case 59+d:f>0&&Ee(N)-p&&Dt(f>32?Ti(N+";",r,i,p-1):Ti(G(N," ","")+";",r,i,p-2),l);break;case 59:N+=";";default:if(Dt(T=Ii(N,n,i,u,d,t,c,A,k=[],w=[],p),a),v===123)if(d===0)kt(N,n,T,T,k,a,p,c,w);else switch(m===99&&ie(N,3)===110?100:m){case 100:case 109:case 115:kt(e,T,T,r&&Dt(Ii(e,T,T,0,0,t,c,A,t,k=[],p),w),t,w,p,c,r?k:w);break;default:kt(N,T,T,T,[""],w,0,c,w)}}u=d=f=0,y=S=1,A=N="",p=s;break;case 58:p=1+Ee(N),f=g;default:if(y<1){if(v==123)--y;else if(v==125&&y++==0&&ls()==125)continue}switch(N+=Vt(v),v*y){case 38:S=d>0?1:(N+="\f",-1);break;case 44:c[u++]=(Ee(N)-1)*S,S=1;break;case 64:Pe()===45&&(N+=At(de())),m=Pe(),d=p=Ee(A=N+=gs(Tt())),v++;break;case 45:g===45&&Ee(N)==2&&(y=0)}}return a}function Ii(e,n,i,r,t,a,s,c,l,u,d){for(var p=t-1,m=t===0?a:[""],f=Hn(m),g=0,y=0,P=0;g<r;++g)for(var S=0,v=ct(e,p+1,p=is(y=s[g])),A=e;S<f;++S)(A=Fr(y>0?m[S]+" "+v:G(v,/&\f/g,m[S])))&&(l[P++]=A);return qt(e,n,i,t===0?Gn:c,l,u,d)}function fs(e,n,i){return qt(e,n,i,$n,Vt(cs()),ct(e,2,-2),0)}function Ti(e,n,i,r){return qt(e,n,i,Vn,ct(e,0,r),ct(e,r+1,-1),r)}function qe(e,n){for(var i="",r=Hn(e),t=0;t<r;t++)i+=n(e[t],t,e,n)||"";return i}function hs(e,n,i,r){switch(e.type){case ns:case Vn:return e.return=e.return||e.value;case $n:return"";case wr:return e.return=e.value+"{"+qe(e.children,r)+"}";case Gn:e.value=e.props.join(",")}return Ee(i=qe(e.children,r))?e.return=e.value+"{"+i+"}":""}function ys(e){var n=Hn(e);return function(i,r,t,a){for(var s="",c=0;c<n;c++)s+=e[c](i,r,t,a)||"";return s}}function Cs(e){return function(n){n.root||(n=n.return)&&e(n)}}var Ai=function(n){var i=new WeakMap;return function(r){if(i.has(r))return i.get(r);var t=n(r);return i.set(r,t),t}},bs=function(n,i,r){for(var t=0,a=0;t=a,a=Pe(),t===38&&a===12&&(i[r]=1),!lt(a);)de();return ht(n,ce)},Es=function(n,i){var r=-1,t=44;do switch(lt(t)){case 0:t===38&&Pe()===12&&(i[r]=1),n[r]+=bs(ce-1,i,r);break;case 2:n[r]+=At(t);break;case 4:if(t===44){n[++r]=Pe()===58?"&\f":"",i[r]=n[r].length;break}default:n[r]+=Vt(t)}while(t=de());return n},Ps=function(n,i){return Mr(Es(Rr(n),i))},ki=new WeakMap,Ss=function(n){if(!(n.type!=="rule"||!n.parent||n.length<1)){for(var i=n.value,r=n.parent,t=n.column===r.column&&n.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(n.props.length===1&&i.charCodeAt(0)!==58&&!ki.get(r))&&!t){ki.set(n,!0);for(var a=[],s=Ps(i,a),c=r.props,l=0,u=0;l<s.length;l++)for(var d=0;d<c.length;d++,u++)n.props[u]=a[l]?s[l].replace(/&\f/g,c[d]):c[d]+" "+s[l]}}},Ds=function(n){if(n.type==="decl"){var i=n.value;i.charCodeAt(0)===108&&i.charCodeAt(2)===98&&(n.return="",n.value="")}},vs="emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason",xs=function(n){return n.type==="comm"&&n.children.indexOf(vs)>-1},Is=function(n){return function(i,r,t){if(!(i.type!=="rule"||n.compat)){var a=i.value.match(/(:first|:nth|:nth-last)-child/g);if(a){for(var s=i.parent===t[0],c=s?t[0].children:t,l=c.length-1;l>=0;l--){var u=c[l];if(u.line<i.line)break;if(u.column<i.column){if(xs(u))return;break}}a.forEach(function(d){console.error('The pseudo class "'+d+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+d.split("-child")[0]+'-of-type".')})}}}},Ur=function(n){return n.type.charCodeAt(1)===105&&n.type.charCodeAt(0)===64},Ts=function(n,i){for(var r=n-1;r>=0;r--)if(!Ur(i[r]))return!0;return!1},Ni=function(n){n.type="",n.value="",n.return="",n.children="",n.props=""},As=function(n,i,r){Ur(n)&&(n.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),Ni(n)):Ts(i,r)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),Ni(n)))};function Or(e,n){switch(as(e,n)){case 5103:return $+"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 $+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return $+e+Ot+e+ae+e+e;case 6828:case 4268:return $+e+ae+e+e;case 6165:return $+e+ae+"flex-"+e+e;case 5187:return $+e+G(e,/(\w+).+(:[^]+)/,$+"box-$1$2"+ae+"flex-$1$2")+e;case 5443:return $+e+ae+"flex-item-"+G(e,/flex-|-self/,"")+e;case 4675:return $+e+ae+"flex-line-pack"+G(e,/align-content|flex-|-self/,"")+e;case 5548:return $+e+ae+G(e,"shrink","negative")+e;case 5292:return $+e+ae+G(e,"basis","preferred-size")+e;case 6060:return $+"box-"+G(e,"-grow","")+$+e+ae+G(e,"grow","positive")+e;case 4554:return $+G(e,/([^-])(transform)/g,"$1"+$+"$2")+e;case 6187:return G(G(G(e,/(zoom-|grab)/,$+"$1"),/(image-set)/,$+"$1"),e,"")+e;case 5495:case 3959:return G(e,/(image-set\([^]*)/,$+"$1$`$1");case 4968:return G(G(e,/(.+:)(flex-)?(.*)/,$+"box-pack:$3"+ae+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+$+e+e;case 4095:case 3583:case 4068:case 2532:return G(e,/(.+)-inline(.+)/,$+"$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(Ee(e)-1-n>6)switch(ie(e,n+1)){case 109:if(ie(e,n+4)!==45)break;case 102:return G(e,/(.+:)(.+)-([^]+)/,"$1"+$+"$2-$3$1"+Ot+(ie(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~Tn(e,"stretch")?Or(G(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(ie(e,n+1)!==115)break;case 6444:switch(ie(e,Ee(e)-3-(~Tn(e,"!important")&&10))){case 107:return G(e,":",":"+$)+e;case 101:return G(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+$+(ie(e,14)===45?"inline-":"")+"box$3$1"+$+"$2$3$1"+ae+"$2box$3")+e}break;case 5936:switch(ie(e,n+11)){case 114:return $+e+ae+G(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return $+e+ae+G(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return $+e+ae+G(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return $+e+ae+e+e}return e}var ks=function(n,i,r,t){if(n.length>-1&&!n.return)switch(n.type){case Vn:n.return=Or(n.value,n.length);break;case wr:return qe([nt(n,{value:G(n.value,"@","@"+$)})],t);case Gn:if(n.length)return ss(n.props,function(a){switch(os(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return qe([nt(n,{props:[G(a,/:(read-\w+)/,":"+Ot+"$1")]})],t);case"::placeholder":return qe([nt(n,{props:[G(a,/:(plac\w+)/,":"+$+"input-$1")]}),nt(n,{props:[G(a,/:(plac\w+)/,":"+Ot+"$1")]}),nt(n,{props:[G(a,/:(plac\w+)/,ae+"input-$1")]})],t)}return""})}},Ns=[ks],ws=function(n){var i=n.key;if(process.env.NODE_ENV!=="production"&&!i)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
3
- If multiple caches share the same key they might "fight" for each other's style elements.`);if(i==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var P=y.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var t=n.stylisPlugins||Ns;if(process.env.NODE_ENV!=="production"&&/[^a-z-]/.test(i))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+i+'" was passed');var a={},s,c=[];s=n.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+i+' "]'),function(y){for(var P=y.getAttribute("data-emotion").split(" "),S=1;S<P.length;S++)a[P[S]]=!0;c.push(y)});var l,u=[Ss,Ds];process.env.NODE_ENV!=="production"&&u.push(Is({get compat(){return g.compat}}),As);{var d,p=[hs,process.env.NODE_ENV!=="production"?function(y){y.root||(y.return?d.insert(y.return):y.value&&y.type!==$n&&d.insert(y.value+"{}"))}:Cs(function(y){d.insert(y)})],m=ys(u.concat(t,p)),f=function(P){return qe(ps(P),m)};l=function(P,S,v,A){d=v,process.env.NODE_ENV!=="production"&&S.map!==void 0&&(d={insert:function(w){v.insert(w+S.map)}}),f(P?P+"{"+S.styles+"}":S.styles),A&&(g.inserted[S.name]=!0)}}var g={key:i,sheet:new ts({key:i,container:s,nonce:n.nonce,speedy:n.speedy,prepend:n.prepend,insertionPoint:n.insertionPoint}),nonce:n.nonce,inserted:a,registered:{},insert:l};return g.sheet.hydrate(c),g};function kn(){return kn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},kn.apply(this,arguments)}function Fs(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var n=e.default;if(typeof n=="function"){var i=function r(){var t=!1;try{t=this instanceof r}catch(a){}return t?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};i.prototype=n.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(i,r,t.get?t:{enumerable:!0,get:function(){return e[r]}})}),i}var js=!0;function qn(e,n,i){var r="";return i.split(" ").forEach(function(t){e[t]!==void 0?n.push(e[t]+";"):r+=t+" "}),r}var Wt=function(n,i,r){var t=n.key+"-"+i.name;(r===!1||js===!1)&&n.registered[t]===void 0&&(n.registered[t]=i.styles)},Yt=function(n,i,r){Wt(n,i,r);var t=n.key+"-"+i.name;if(n.inserted[i.name]===void 0){var a=i;do n.insert(i===a?"."+t:"",a,n.sheet,!0),a=a.next;while(a!==void 0)}};function Rs(e){for(var n=0,i,r=0,t=e.length;t>=4;++r,t-=4)i=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,i=(i&65535)*1540483477+((i>>>16)*59797<<16),i^=i>>>24,n=(i&65535)*1540483477+((i>>>16)*59797<<16)^(n&65535)*1540483477+((n>>>16)*59797<<16);switch(t){case 3:n^=(e.charCodeAt(r+2)&255)<<16;case 2:n^=(e.charCodeAt(r+1)&255)<<8;case 1:n^=e.charCodeAt(r)&255,n=(n&65535)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,n=(n&65535)*1540483477+((n>>>16)*59797<<16),((n^n>>>15)>>>0).toString(36)}var Ms={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},wi=`You have illegal escape sequence in your template literal, most likely inside content's property value.
4
- Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
5
- You can read more about this here:
6
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,Us="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",Os=/[A-Z]|^ms/g,Lr=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Wn=function(n){return n.charCodeAt(1)===45},Fi=function(n){return n!=null&&typeof n!="boolean"},mn=Nr(function(e){return Wn(e)?e:e.replace(Os,"-$&").toLowerCase()}),Lt=function(n,i){switch(n){case"animation":case"animationName":if(typeof i=="string")return i.replace(Lr,function(r,t,a){return Ce={name:t,styles:a,next:Ce},t})}return Ms[n]!==1&&!Wn(n)&&typeof i=="number"&&i!==0?i+"px":i};if(process.env.NODE_ENV!=="production"){var Ls=/(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,Bs=["normal","none","initial","inherit","unset"],_s=Lt,$s=/^-ms-/,Gs=/-(.)/g,ji={};Lt=function(n,i){if(n==="content"&&(typeof i!="string"||Bs.indexOf(i)===-1&&!Ls.test(i)&&(i.charAt(0)!==i.charAt(i.length-1)||i.charAt(0)!=='"'&&i.charAt(0)!=="'")))throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+i+"\"'`");var r=_s(n,i);return r!==""&&!Wn(n)&&n.indexOf("-")!==-1&&ji[n]===void 0&&(ji[n]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean "+n.replace($s,"ms-").replace(Gs,function(t,a){return a.toUpperCase()})+"?")),r}}var Br="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ut(e,n,i){if(i==null)return"";if(i.__emotion_styles!==void 0){if(process.env.NODE_ENV!=="production"&&i.toString()==="NO_COMPONENT_SELECTOR")throw new Error(Br);return i}switch(typeof i){case"boolean":return"";case"object":{if(i.anim===1)return Ce={name:i.name,styles:i.styles,next:Ce},i.name;if(i.styles!==void 0){var r=i.next;if(r!==void 0)for(;r!==void 0;)Ce={name:r.name,styles:r.styles,next:Ce},r=r.next;var t=i.styles+";";return process.env.NODE_ENV!=="production"&&i.map!==void 0&&(t+=i.map),t}return Vs(e,n,i)}case"function":{if(e!==void 0){var a=Ce,s=i(e);return Ce=a,ut(e,n,s)}else process.env.NODE_ENV!=="production"&&console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break}case"string":if(process.env.NODE_ENV!=="production"){var c=[],l=i.replace(Lr,function(d,p,m){var f="animation"+c.length;return c.push("const "+f+" = keyframes`"+m.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+f+"}"});c.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(c,["`"+l+"`"]).join(`
7
- `)+`
8
-
9
- You should wrap it with \`css\` like this:
10
-
11
- `+("css`"+l+"`"))}break}if(n==null)return i;var u=n[i];return u!==void 0?u:i}function Vs(e,n,i){var r="";if(Array.isArray(i))for(var t=0;t<i.length;t++)r+=ut(e,n,i[t])+";";else for(var a in i){var s=i[a];if(typeof s!="object")n!=null&&n[s]!==void 0?r+=a+"{"+n[s]+"}":Fi(s)&&(r+=mn(a)+":"+Lt(a,s)+";");else{if(a==="NO_COMPONENT_SELECTOR"&&process.env.NODE_ENV!=="production")throw new Error(Br);if(Array.isArray(s)&&typeof s[0]=="string"&&(n==null||n[s[0]]===void 0))for(var c=0;c<s.length;c++)Fi(s[c])&&(r+=mn(a)+":"+Lt(a,s[c])+";");else{var l=ut(e,n,s);switch(a){case"animation":case"animationName":{r+=mn(a)+":"+l+";";break}default:process.env.NODE_ENV!=="production"&&a==="undefined"&&console.error(Us),r+=a+"{"+l+"}"}}}}return r}var Ri=/label:\s*([^\s;\n{]+)\s*(;|$)/g,_r;process.env.NODE_ENV!=="production"&&(_r=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g);var Ce,Ze=function(n,i,r){if(n.length===1&&typeof n[0]=="object"&&n[0]!==null&&n[0].styles!==void 0)return n[0];var t=!0,a="";Ce=void 0;var s=n[0];s==null||s.raw===void 0?(t=!1,a+=ut(r,i,s)):(process.env.NODE_ENV!=="production"&&s[0]===void 0&&console.error(wi),a+=s[0]);for(var c=1;c<n.length;c++)a+=ut(r,i,n[c]),t&&(process.env.NODE_ENV!=="production"&&s[c]===void 0&&console.error(wi),a+=s[c]);var l;process.env.NODE_ENV!=="production"&&(a=a.replace(_r,function(m){return l=m,""})),Ri.lastIndex=0;for(var u="",d;(d=Ri.exec(a))!==null;)u+="-"+d[1];var p=Rs(a)+u;return process.env.NODE_ENV!=="production"?{name:p,styles:a,map:l,next:Ce,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}:{name:p,styles:a,next:Ce}},Hs=function(n){return n()},$r=E.useInsertionEffect?E.useInsertionEffect:!1,Yn=$r||Hs,Mi=$r||D.useLayoutEffect,qs={}.hasOwnProperty,Gr=D.createContext(typeof HTMLElement!="undefined"?ws({key:"css"}):null);process.env.NODE_ENV!=="production"&&(Gr.displayName="EmotionCacheContext");var Zt=function(n){return D.forwardRef(function(i,r){var t=D.useContext(Gr);return n(i,t,r)})},Fe=D.createContext({});process.env.NODE_ENV!=="production"&&(Fe.displayName="EmotionThemeContext");var zt=function(){return D.useContext(Fe)},Ws=function(n,i){if(typeof i=="function"){var r=i(n);if(process.env.NODE_ENV!=="production"&&(r==null||typeof r!="object"||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if(process.env.NODE_ENV!=="production"&&(i==null||typeof i!="object"||Array.isArray(i)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return kn({},n,i)},Ys=Ai(function(e){return Ai(function(n){return Ws(e,n)})}),Zs=function(n){var i=D.useContext(Fe);return n.theme!==i&&(i=Ys(i)(n.theme)),D.createElement(Fe.Provider,{value:i},n.children)},Ui="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Oi="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",zs=function(n){var i=n.cache,r=n.serialized,t=n.isStringTag;return Wt(i,r,t),Yn(function(){return Yt(i,r,t)}),null},Ks=Zt(function(e,n,i){var r=e.css;typeof r=="string"&&n.registered[r]!==void 0&&(r=n.registered[r]);var t=e[Ui],a=[r],s="";typeof e.className=="string"?s=qn(n.registered,a,e.className):e.className!=null&&(s=e.className+" ");var c=Ze(a,void 0,D.useContext(Fe));if(process.env.NODE_ENV!=="production"&&c.name.indexOf("-")===-1){var l=e[Oi];l&&(c=Ze([c,"label:"+l+";"]))}s+=n.key+"-"+c.name;var u={};for(var d in e)qs.call(e,d)&&d!=="css"&&d!==Ui&&(process.env.NODE_ENV==="production"||d!==Oi)&&(u[d]=e[d]);return u.ref=i,u.className=s,D.createElement(D.Fragment,null,D.createElement(zs,{cache:n,serialized:c,isStringTag:typeof t=="string"}),D.createElement(t,u))});process.env.NODE_ENV!=="production"&&(Ks.displayName="EmotionCssPropInternal");var Qs={version:"11.10.5"},Li=!1,Vr=Zt(function(e,n){process.env.NODE_ENV!=="production"&&!Li&&(e.className||e.css)&&(console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"),Li=!0);var i=e.styles,r=Ze([i],void 0,D.useContext(Fe)),t=D.useRef();return Mi(function(){var a=n.key+"-global",s=new n.sheet.constructor({key:a,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy}),c=!1,l=document.querySelector('style[data-emotion="'+a+" "+r.name+'"]');return n.sheet.tags.length&&(s.before=n.sheet.tags[0]),l!==null&&(c=!0,l.setAttribute("data-emotion",a),s.hydrate([l])),t.current=[s,c],function(){s.flush()}},[n]),Mi(function(){var a=t.current,s=a[0],c=a[1];if(c){a[1]=!1;return}if(r.next!==void 0&&Yt(n,r.next,!0),s.tags.length){var l=s.tags[s.tags.length-1].nextElementSibling;s.before=l,s.flush()}n.insert("",r,s,!1)},[n,r.name]),null});process.env.NODE_ENV!=="production"&&(Vr.displayName="EmotionGlobal");function Ie(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return Ze(n)}var Xs=function e(n){for(var i=n.length,r=0,t="";r<i;r++){var a=n[r];if(a!=null){var s=void 0;switch(typeof a){case"boolean":break;case"object":{if(Array.isArray(a))s=e(a);else{process.env.NODE_ENV!=="production"&&a.styles!==void 0&&a.name!==void 0&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),s="";for(var c in a)a[c]&&c&&(s&&(s+=" "),s+=c)}break}default:s=a}s&&(t&&(t+=" "),t+=s)}}return t};function Js(e,n,i){var r=[],t=qn(e,r,i);return r.length<2?i:t+n(r)}var ec=function(n){var i=n.cache,r=n.serializedArr;return Yn(function(){for(var t=0;t<r.length;t++)Yt(i,r[t],!1)}),null},tc=Zt(function(e,n){var i=!1,r=[],t=function(){if(i&&process.env.NODE_ENV!=="production")throw new Error("css can only be used during render");for(var u=arguments.length,d=new Array(u),p=0;p<u;p++)d[p]=arguments[p];var m=Ze(d,n.registered);return r.push(m),Wt(n,m,!1),n.key+"-"+m.name},a=function(){if(i&&process.env.NODE_ENV!=="production")throw new Error("cx can only be used during render");for(var u=arguments.length,d=new Array(u),p=0;p<u;p++)d[p]=arguments[p];return Js(n.registered,t,Xs(d))},s={css:t,cx:a,theme:D.useContext(Fe)},c=e.children(s);return i=!0,D.createElement(D.Fragment,null,D.createElement(ec,{cache:n,serializedArr:r}),c)});process.env.NODE_ENV!=="production"&&(tc.displayName="EmotionClassNames");if(process.env.NODE_ENV!=="production"){var Bi=!0,nc=typeof jest!="undefined"||typeof vi!="undefined";if(Bi&&!nc){var _i=typeof globalThis!="undefined"?globalThis:Bi?window:global,$i="__EMOTION_REACT_"+Qs.version.split(".")[0]+"__";_i[$i]&&console.warn("You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used."),_i[$i]=!0}}var ic=Xo,rc=function(n){return n!=="theme"},Gi=function(n){return typeof n=="string"&&n.charCodeAt(0)>96?ic:rc},Vi=function(n,i,r){var t;if(i){var a=i.shouldForwardProp;t=n.__emotion_forwardProp&&a?function(s){return n.__emotion_forwardProp(s)&&a(s)}:a}return typeof t!="function"&&r&&(t=n.__emotion_forwardProp),t},Hi=`You have illegal escape sequence in your template literal, most likely inside content's property value.
12
- Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
13
- You can read more about this here:
14
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,ac=function(n){var i=n.cache,r=n.serialized,t=n.isStringTag;return Wt(i,r,t),Yn(function(){return Yt(i,r,t)}),null},oc=function e(n,i){if(process.env.NODE_ENV!=="production"&&n===void 0)throw new Error(`You are trying to create a styled element with an undefined component.
15
- You may have forgotten to import it.`);var r=n.__emotion_real===n,t=r&&n.__emotion_base||n,a,s;i!==void 0&&(a=i.label,s=i.target);var c=Vi(n,i,r),l=c||Gi(t),u=!l("as");return function(){var d=arguments,p=r&&n.__emotion_styles!==void 0?n.__emotion_styles.slice(0):[];if(a!==void 0&&p.push("label:"+a+";"),d[0]==null||d[0].raw===void 0)p.push.apply(p,d);else{process.env.NODE_ENV!=="production"&&d[0][0]===void 0&&console.error(Hi),p.push(d[0][0]);for(var m=d.length,f=1;f<m;f++)process.env.NODE_ENV!=="production"&&d[0][f]===void 0&&console.error(Hi),p.push(d[f],d[0][f])}var g=Zt(function(y,P,S){var v=u&&y.as||t,A="",k=[],w=y;if(y.theme==null){w={};for(var T in y)w[T]=y[T];w.theme=D.useContext(Fe)}typeof y.className=="string"?A=qn(P.registered,k,y.className):y.className!=null&&(A=y.className+" ");var N=Ze(p.concat(k),P.registered,w);A+=P.key+"-"+N.name,s!==void 0&&(A+=" "+s);var F=u&&c===void 0?Gi(v):l,U={};for(var L in y)u&&L==="as"||F(L)&&(U[L]=y[L]);return U.className=A,U.ref=S,D.createElement(D.Fragment,null,D.createElement(ac,{cache:P,serialized:N,isStringTag:typeof v=="string"}),D.createElement(v,U))});return g.displayName=a!==void 0?a:"Styled("+(typeof t=="string"?t:t.displayName||t.name||"Component")+")",g.defaultProps=n.defaultProps,g.__emotion_real=g,g.__emotion_base=t,g.__emotion_styles=p,g.__emotion_forwardProp=c,Object.defineProperty(g,"toString",{value:function(){return s===void 0&&process.env.NODE_ENV!=="production"?"NO_COMPONENT_SELECTOR":"."+s}}),g.withComponent=function(y,P){return e(y,In({},i,P,{shouldForwardProp:Vi(g,P,!0)})).apply(void 0,p)},g}},sc=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Bt=oc.bind();sc.forEach(function(e){Bt[e]=Bt(e)});const Hr={shouldForwardProp:e=>!e.startsWith("$")},h=e=>Bt(e,Hr),cc=["div","span","button","input","form","p","h1","h2","h3","h4","h5","h6","a","img","ul","ol","li","table","thead","tbody","tr","td","th"];cc.forEach(e=>{h[e]=Bt(e,Hr)});function qr(e,n,i){const r=i?` ${i}`:"";return(!e||e===1)&&n?`Up to ${n}${r}`:e&&e>1&&n?`${e}-${n}${r}`:e&&e>1?`Minimum ${e}${r}`:""}function Wr(e){return e==null?void 0:e.toLocaleString("en-US",{maximumFractionDigits:0})}function lc(e,n){const i=e.stigg.palette;switch(n){case"white":return"white";case"primary.main":return i.primary;case"primary.main.light":return i.primaryLight;case"warning":return i.warning;case"error":return i.error;default:return i.text[n]||i.text.primary}}function Nn(e,n="body1"){const i=e.stigg.typography,r={h1:i.h1,h3:i.h2,h6:i.h3,body1:i.body,caption:i.caption};return r[n]||r.body1}const uc=h.div`
16
- margin: 0;
17
- ${({$isInline:e})=>e&&"display: inline"};
18
-
19
- /* Apply typography styles from theme */
20
- font-family: ${({theme:e})=>e.stigg.typography.fontFamily};
21
- color: ${({$color:e})=>e};
22
- font-weight: ${({$bold:e,theme:n,$variant:i})=>e?"bold":Nn(n,i).fontWeight};
23
- font-size: ${({theme:e,$variant:n})=>Nn(e,n).fontSize};
24
- ${({$lineHeight:e})=>e&&`line-height: ${e};`}
25
- `,C=D.forwardRef((e,n)=>{const P=e,{children:i,style:r,variant:t="body1",color:a="primary",overrideColor:s,bold:c=!1,as:l,className:u,lineHeight:d}=P,p=se(P,["children","style","variant","color","overrideColor","bold","as","className","lineHeight"]),m=zt(),f=Nn(m,t),g=l||f.semanticElement,y=s||lc(m,a);return o.jsx(uc,_(I({as:g,ref:n},p),{className:u,style:r,$variant:t,$bold:c,$color:y,$lineHeight:d,$isInline:g==="span",children:i}))});C.displayName="Typography";const gn=(e,n)=>{switch(e){case"primary":return n.stigg.palette.text.primary;case"secondary":return n.stigg.palette.text.secondary;default:return e}},dc=e=>E.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{clipPath:"url(#clip0_834_118930)"},E.createElement("path",{d:"M12 6.85712V17.1428",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M6.85712 12H17.1428",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M18 0.857117H5.99997C3.15966 0.857117 0.857117 3.15966 0.857117 5.99997V18C0.857117 20.8404 3.15966 23.1428 5.99997 23.1428H18C20.8404 23.1428 23.1428 20.8404 23.1428 18V5.99997C23.1428 3.15966 20.8404 0.857117 18 0.857117Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})),E.createElement("defs",null,E.createElement("clipPath",{id:"clip0_834_118930"},E.createElement("rect",{width:24,height:24,fill:"white"})))),mc=e=>E.createElement("svg",I({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),E.createElement("path",{d:"M26 27V25C26 22.7909 24.2091 21 22 21H14C11.7909 21 10 22.7909 10 25V27",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 17C20.2091 17 22 15.2091 22 13C22 10.7909 20.2091 9 18 9C15.7909 9 14 10.7909 14 13C14 15.2091 15.7909 17 18 17Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("defs",null,E.createElement("linearGradient",{id:"paint0_linear_67_8545",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"},E.createElement("stop",{stopColor:"#56ACF6"}),E.createElement("stop",{offset:1,stopColor:"#1559E6"})))),gc=e=>E.createElement("svg",I({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),E.createElement("path",{d:"M27 18.22C27 12.73 22.74 9 18 9C13.31 9 9 12.65 9 18.28C8.4 18.62 8 19.26 8 20V22C8 23.1 8.9 24 10 24H11V17.9C11 14.03 14.13 10.9 18 10.9C21.87 10.9 25 14.03 25 17.9V25H17V27H25C26.1 27 27 26.1 27 25V23.78C27.59 23.47 28 22.86 28 22.14V19.84C28 19.14 27.59 18.53 27 18.22Z",fill:"#7586B0"}),E.createElement("path",{d:"M15 20C15.5523 20 16 19.5523 16 19C16 18.4477 15.5523 18 15 18C14.4477 18 14 18.4477 14 19C14 19.5523 14.4477 20 15 20Z",fill:"#7586B0"}),E.createElement("path",{d:"M21 20C21.5523 20 22 19.5523 22 19C22 18.4477 21.5523 18 21 18C20.4477 18 20 18.4477 20 19C20 19.5523 20.4477 20 21 20Z",fill:"#7586B0"}),E.createElement("path",{d:"M24 17.03C23.52 14.18 21.04 12 18.05 12C15.02 12 11.76 14.51 12.02 18.45C14.49 17.44 16.35 15.24 16.88 12.56C18.19 15.19 20.88 17 24 17.03Z",fill:"#7586B0"}),E.createElement("defs",null,E.createElement("linearGradient",{id:"paint0_linear_267_19310",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"},E.createElement("stop",{stopColor:"#56ACF6"}),E.createElement("stop",{offset:1,stopColor:"#1559E6"})))),pc=e=>E.createElement("svg",I({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),E.createElement("path",{d:"M26 10H10C8.89 10 8.01 10.89 8.01 12L8 24C8 25.11 8.89 26 10 26H26C27.11 26 28 25.11 28 24V12C28 10.89 27.11 10 26 10ZM26 24H10V18H26V24ZM26 14H10V12H26V14Z",fill:"#7586B0"}),E.createElement("defs",null,E.createElement("linearGradient",{id:"paint0_linear_67_8556",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"},E.createElement("stop",{stopColor:"#56ACF6"}),E.createElement("stop",{offset:1,stopColor:"#1559E6"})))),fc=e=>E.createElement("svg",I({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{clipPath:"url(#clip0_834_120339)"},E.createElement("path",{d:"M10.3336 19.2858C15.462 19.2858 19.6193 15.1285 19.6193 10.0001C19.6193 4.87171 15.462 0.714355 10.3336 0.714355C5.20521 0.714355 1.04785 4.87171 1.04785 10.0001C1.04785 15.1285 5.20521 19.2858 10.3336 19.2858Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12.7649 7.46052C12.6813 7.22393 12.5523 7.0088 12.3883 6.8256C12.0395 6.43592 11.5327 6.19067 10.9685 6.19067H9.4942C8.55517 6.19067 7.79395 6.9519 7.79395 7.89093C7.79395 8.68995 8.3503 9.38116 9.13086 9.5519L11.3756 10.0429C12.25 10.2342 12.8733 11.0091 12.8733 11.9043C12.8733 12.9562 12.0205 13.8097 10.9685 13.8097H9.6987C8.86936 13.8097 8.16382 13.2797 7.90233 12.5399",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M10.3335 6.19065V4.28589",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M10.3335 15.7144V13.8096",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})),E.createElement("defs",null,E.createElement("clipPath",{id:"clip0_834_120339"},E.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0.333496)"})))),Yr=e=>E.createElement("svg",I({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.95392 1.03353C7.1196 1.56038 6.82682 2.12178 6.29997 2.28746C5.79034 2.44773 5.30237 2.68036 4.85175 2.98146C3.76168 3.70982 2.95789 4.79361 2.57732 6.04817C2.19675 7.30273 2.26296 8.65044 2.76466 9.86166C3.26637 11.0729 4.17252 12.0727 5.32873 12.6907C6.48494 13.3087 7.81967 13.5067 9.10549 13.2509C10.3913 12.9951 11.5487 12.3014 12.3804 11.288C13.2121 10.2746 13.6666 9.00413 13.6666 7.69312C13.6666 7.14083 14.1144 6.69312 14.6666 6.69312C15.2189 6.69312 15.6666 7.14083 15.6666 7.69312C15.6666 7.92228 15.6564 8.15052 15.6361 8.37721C15.6465 8.44937 15.6492 8.52379 15.6432 8.59952L15.6392 8.64883C15.6298 8.75932 15.6028 8.86407 15.5612 8.96057C15.3409 10.2743 14.7807 11.5158 13.9264 12.5568C12.8012 13.9279 11.2353 14.8664 9.49568 15.2125C7.75603 15.5585 5.95022 15.2906 4.38594 14.4545C2.82166 13.6184 1.59568 12.2657 0.916905 10.627C0.238131 8.98832 0.148554 7.16495 0.663439 5.4676C1.17832 3.77025 2.26581 2.30394 3.74061 1.31852C4.35023 0.911179 5.01049 0.596408 5.69999 0.379577C6.22684 0.213898 6.78824 0.506683 6.95392 1.03353ZM7.56761 1.27284C7.61434 0.722538 8.09832 0.314306 8.64863 0.361031L8.69791 0.365373C9.24791 0.415584 9.65307 0.902149 9.60286 1.45215C9.55265 2.00214 9.06608 2.4073 8.51608 2.35709L8.47942 2.35386C7.92912 2.30714 7.52089 1.82315 7.56761 1.27284ZM12.4186 2.90891C12.8384 2.55014 13.4697 2.59967 13.8284 3.01954C13.8498 3.04454 13.871 3.06967 13.892 3.09494C14.2454 3.51937 14.1878 4.14991 13.7634 4.50329C13.339 4.85667 12.7084 4.79906 12.355 4.37463C12.3395 4.35592 12.3238 4.33731 12.3079 4.31879C11.9492 3.89892 11.9987 3.26769 12.4186 2.90891ZM8.99998 5.33352C8.99998 4.78124 8.55226 4.33352 7.99998 4.33352C7.44769 4.33352 6.99998 4.78124 6.99998 5.33352V8.00019C6.99998 8.55247 7.44769 9.00019 7.99998 9.00019H10.6666C11.2189 9.00019 11.6666 8.55247 11.6666 8.00019C11.6666 7.4479 11.2189 7.00019 10.6666 7.00019H8.99998V5.33352Z",fill:"#7586B0"})),hc=e=>E.createElement("svg",I({width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{clipPath:"url(#clip0_834_116282)"},E.createElement("path",{d:"M21.4286 5.32483H2.57146C1.62469 5.32483 0.857178 6.09235 0.857178 7.03911V10.4677C0.857178 11.4145 1.62469 12.182 2.57146 12.182H21.4286C22.3754 12.182 23.1429 11.4145 23.1429 10.4677V7.03911C23.1429 6.09235 22.3754 5.32483 21.4286 5.32483Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M21.4287 12.182V21.6106C21.4287 22.0652 21.248 22.5013 20.9266 22.8227C20.6051 23.1442 20.169 23.3249 19.7144 23.3249H4.28582C3.83116 23.3249 3.39513 23.1442 3.07363 22.8227C2.75215 22.5013 2.57153 22.0652 2.57153 21.6106V12.182",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12 5.32483V23.3248",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M17.1429 1.03912L12 5.32484L6.85718 1.03912",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})),E.createElement("defs",null,E.createElement("clipPath",{id:"clip0_834_116282"},E.createElement("rect",{width:24,height:24,fill:"white",transform:"translate(0 0.182007)"})))),Zr=e=>E.createElement("svg",I({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M10.8333 2.5C6.69168 2.5 3.33334 5.85833 3.33334 10H0.833344L4.07501 13.2417L4.13334 13.3583L7.50001 10H5.00001C5.00001 6.775 7.60834 4.16667 10.8333 4.16667C14.0583 4.16667 16.6667 6.775 16.6667 10C16.6667 13.225 14.0583 15.8333 10.8333 15.8333C9.22501 15.8333 7.76668 15.175 6.71668 14.1167L5.53334 15.3C6.89168 16.6583 8.75834 17.5 10.8333 17.5C14.975 17.5 18.3333 14.1417 18.3333 10C18.3333 5.85833 14.975 2.5 10.8333 2.5ZM10 6.66667V10.8333L13.5667 12.95L14.1667 11.9417L11.25 10.2083V6.66667H10Z",fill:"#6678A7"})),yc=e=>E.createElement("svg",I({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("rect",{width:36,height:36,rx:10,fill:"url(#paint0_linear_834_118583)"}),E.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9539 7.70028C16.1196 8.22713 15.8268 8.78853 15.3 8.95421C14.4906 9.20875 13.7155 9.57824 12.9999 10.0564C11.2686 11.2132 9.99197 12.9346 9.38754 14.9271C8.78311 16.9196 8.88826 19.0601 9.68509 20.9838C10.4819 22.9075 11.9211 24.4954 13.7574 25.477C15.5938 26.4585 17.7136 26.7729 19.7558 26.3667C21.798 25.9605 23.6362 24.8588 24.9571 23.2492C26.278 21.6396 27 19.6219 27 17.5397C27 16.9874 27.4477 16.5397 28 16.5397C28.5523 16.5397 29 16.9874 29 17.5397C29 17.8969 28.9826 18.2526 28.9483 18.6056C28.9662 18.6949 28.9722 18.7883 28.9645 18.8837L28.9606 18.9309C28.9496 19.0607 28.9143 19.1825 28.8595 19.2924C28.5513 21.2017 27.7432 23.007 26.5031 24.518C24.8886 26.4852 22.642 27.8318 20.146 28.3283C17.65 28.8248 15.059 28.4405 12.8146 27.2408C10.5702 26.0411 8.81122 24.1004 7.83733 21.7492C6.86343 19.398 6.73491 16.7819 7.47366 14.3465C8.21241 11.9112 9.77272 9.80737 11.8887 8.3935C12.7634 7.80905 13.7107 7.35743 14.7 7.04633C15.2269 6.88065 15.7883 7.17343 15.9539 7.70028ZM17.8497 7.95155C17.8964 7.40125 18.3804 6.99302 18.9307 7.03974L18.9779 7.04385C19.528 7.0929 19.9342 7.57861 19.8851 8.12871C19.8361 8.67881 19.3503 9.085 18.8002 9.03595L18.7615 9.03257C18.2112 8.98585 17.8029 8.50186 17.8497 7.95155ZM22.8579 9.19953C23.172 8.74525 23.7949 8.63161 24.2492 8.9457C24.2751 8.96361 24.3009 8.98162 24.3266 8.99974C24.7782 9.31772 24.8865 9.94155 24.5685 10.3931C24.2505 10.8447 23.6267 10.953 23.1751 10.635C23.1541 10.6202 23.1329 10.6054 23.1118 10.5908C22.6575 10.2767 22.5438 9.6538 22.8579 9.19953ZM26.6058 12.8085C27.1045 12.5712 27.7011 12.7831 27.9384 13.2818C27.9519 13.3102 27.9653 13.3387 27.9786 13.3672C28.2116 13.868 27.9946 14.4628 27.4939 14.6958C26.9931 14.9288 26.3983 14.7117 26.1653 14.211L26.1506 14.1796L26.1324 14.1411C25.8951 13.6424 26.1071 13.0458 26.6058 12.8085ZM19 14.0003C19 13.448 18.5523 13.0003 18 13.0003C17.4477 13.0003 17 13.448 17 14.0003V18.0003C17 18.5526 17.4477 19.0003 18 19.0003H22C22.5523 19.0003 23 18.5526 23 18.0003C23 17.448 22.5523 17.0003 22 17.0003H19V14.0003Z",fill:"#7586B0"}),E.createElement("defs",null,E.createElement("linearGradient",{id:"paint0_linear_834_118583",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"}))),Cc=e=>E.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.95394 1.70028C10.1196 2.22713 9.82684 2.78853 9.29999 2.95421C8.49057 3.20875 7.71555 3.57824 6.99987 4.05644C5.26859 5.21324 3.99197 6.93456 3.38754 8.9271C2.78311 10.9196 2.88826 13.0601 3.68509 14.9838C4.48191 16.9075 5.9211 18.4954 7.75743 19.477C9.59377 20.4585 11.7136 20.7729 13.7558 20.3667C15.798 19.9605 17.6362 18.8588 18.9571 17.2492C20.278 15.6396 21 13.6219 21 11.5397C21 10.9874 21.4477 10.5397 22 10.5397C22.5523 10.5397 23 10.9874 23 11.5397C23 11.8969 22.9826 12.2526 22.9483 12.6056C22.9662 12.6949 22.9722 12.7883 22.9645 12.8837L22.9606 12.9309C22.9496 13.0607 22.9143 13.1825 22.8595 13.2924C22.5513 15.2017 21.7432 17.007 20.5031 18.518C18.8886 20.4852 16.642 21.8318 14.146 22.3283C11.65 22.8248 9.05905 22.4405 6.81464 21.2408C4.57023 20.0411 2.81122 18.1004 1.83733 15.7492C0.863434 13.398 0.734911 10.7819 1.47366 8.34653C2.21241 5.91121 3.77272 3.80737 5.88873 2.3935C6.76341 1.80905 7.71072 1.35743 8.70001 1.04633C9.22686 0.880646 9.78826 1.17343 9.95394 1.70028ZM11.8497 1.95155C11.8964 1.40125 12.3804 0.993017 12.9307 1.03974L12.9779 1.04385C13.528 1.0929 13.9342 1.57861 13.8851 2.12871C13.8361 2.67881 13.3503 3.085 12.8002 3.03595L12.7615 3.03257C12.2112 2.98585 11.8029 2.50186 11.8497 1.95155ZM16.8579 3.19953C17.172 2.74525 17.7949 2.63161 18.2492 2.9457C18.2751 2.96361 18.3009 2.98162 18.3266 2.99974C18.7782 3.31772 18.8865 3.94155 18.5685 4.39311C18.2505 4.84467 17.6267 4.95296 17.1751 4.63498C17.1541 4.62016 17.1329 4.60542 17.1118 4.59078C16.6575 4.27669 16.5438 3.6538 16.8579 3.19953ZM20.6058 6.80846C21.1045 6.57117 21.7011 6.78308 21.9384 7.28179C21.9519 7.3102 21.9653 7.33869 21.9786 7.36723C22.2116 7.86796 21.9946 8.46276 21.4939 8.69577C20.9931 8.92877 20.3983 8.71174 20.1653 8.21101L20.1506 8.17957L20.1324 8.14112C19.8951 7.64241 20.1071 7.04576 20.6058 6.80846ZM13 8.00027C13 7.44798 12.5523 7.00027 12 7.00027C11.4477 7.00027 11 7.44798 11 8.00027V12.0003C11 12.5526 11.4477 13.0003 12 13.0003H16C16.5523 13.0003 17 12.5526 17 12.0003C17 11.448 16.5523 11.0003 16 11.0003H13V8.00027Z",fill:"#7586B0"})),bc=e=>E.createElement("svg",I({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"}),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C9 10.8954 9.89543 10 11 10H25C26.1046 10 27 10.8954 27 12V26C27 27.1046 26.1046 28 25 28H11C9.89543 28 9 27.1046 9 26V12Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M22 8V12",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M14 8V12",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M9 16H27",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("defs",null,E.createElement("linearGradient",{id:"paint0_linear_45_8861",x1:35.0204,y1:1.22449,x2:0,y2:36,gradientUnits:"userSpaceOnUse"},E.createElement("stop",{stopColor:"#56ACF6"}),E.createElement("stop",{offset:1,stopColor:"#1559E6"})))),Ec=e=>E.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{id:"trash-2"},E.createElement("path",{id:"Shape",d:"M3 6H5H21",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{id:"Shape_2",d:"M20 6C20 5.44772 19.5523 5 19 5C18.4477 5 18 5.44772 18 6H20ZM6 6C6 5.44772 5.55228 5 5 5C4.44772 5 4 5.44772 4 6H6ZM7 6C7 6.55228 7.44772 7 8 7C8.55228 7 9 6.55228 9 6H7ZM15 6C15 6.55228 15.4477 7 16 7C16.5523 7 17 6.55228 17 6H15ZM18 6V20H20V6H18ZM18 20C18 20.5523 17.5523 21 17 21V23C18.6569 23 20 21.6569 20 20H18ZM17 21H7V23H17V21ZM7 21C6.44772 21 6 20.5523 6 20H4C4 21.6569 5.34315 23 7 23V21ZM6 20V6H4V20H6ZM9 6V4H7V6H9ZM9 4C9 3.44772 9.44772 3 10 3V1C8.34315 1 7 2.34315 7 4H9ZM10 3H14V1H10V3ZM14 3C14.5523 3 15 3.44772 15 4H17C17 2.34315 15.6569 1 14 1V3ZM15 4V6H17V4H15Z",fill:"#F88078"}),E.createElement("path",{id:"Shape_3",d:"M10 11V17",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{id:"Shape_4",d:"M14 11V17",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),Pc=e=>E.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M21.1667 4H2.83333C1.82081 4 1 4.89543 1 6V18C1 19.1046 1.82081 20 2.83333 20H21.1667C22.1792 20 23 19.1046 23 18V6C23 4.89543 22.1792 4 21.1667 4Z",fill:"#C6C6C7"}),E.createElement("path",{opacity:.3,d:"M19.75 16.4286H17.5C17.0125 16.4286 16.75 16.2 16.75 15.6667C16.75 15.1334 17.0125 14.9048 17.5 14.9048H19.75C20.2375 14.9048 20.5 15.1334 20.5 15.6667C20.5 16.2 20.2375 16.4286 19.75 16.4286ZM15.25 16.4286H13C12.5125 16.4286 12.25 16.2 12.25 15.6667C12.25 15.1334 12.5125 14.9048 13 14.9048H15.25C15.7375 14.9048 16 15.1334 16 15.6667C16 16.2 15.7375 16.4286 15.25 16.4286ZM10.75 16.4286H8.5C8.0125 16.4286 7.75 16.2 7.75 15.6667C7.75 15.1334 8.0125 14.9048 8.5 14.9048H10.75C11.2375 14.9048 11.5 15.1334 11.5 15.6667C11.5 16.2 11.2375 16.4286 10.75 16.4286ZM6.25 16.4286H4C3.5125 16.4286 3.25 16.2 3.25 15.6667C3.25 15.1334 3.5125 14.9048 4 14.9048H6.25C6.7375 14.9048 7 15.1334 7 15.6667C7 16.2 6.7375 16.4286 6.25 16.4286Z",fill:"black"})),Sc=e=>E.createElement("svg",I({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("circle",{cx:10.333,cy:10,r:9,fill:"white",stroke:"#327EEE",strokeWidth:2})),Dc=e=>E.createElement("svg",I({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{id:"Group 16159"},E.createElement("circle",{id:"Ellipse 5",cx:10,cy:10,r:9.25,fill:"#327EEE",stroke:"#327EEE",strokeWidth:1.5}),E.createElement("path",{id:"Shape",d:"M5 10.3636L8.63667 14L12.637 10L14.6372 8",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),vc=e=>E.createElement("svg",I({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{id:"Stepper indicators"},E.createElement("circle",{id:"Ellipse 5",cx:10.667,cy:10,r:9.25,fill:"#B3BCD3",stroke:"#B3BCD3",strokeWidth:1.5}),E.createElement("path",{id:"Shape",d:"M5.66699 10.3636L9.30366 14L13.304 10L15.3042 8",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),xc=e=>E.createElement("svg",I({width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M9 3L7.9425 4.0575L12.1275 8.25H3V9.75H12.1275L7.9425 13.9425L9 15L15 9L9 3Z",fill:"white"})),Ic=e=>E.createElement("svg",I({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M15.8337 5.34199L14.6587 4.16699L10.0003 8.82533L5.34199 4.16699L4.16699 5.34199L8.82533 10.0003L4.16699 14.6587L5.34199 15.8337L10.0003 11.1753L14.6587 15.8337L15.8337 14.6587L11.1753 10.0003L15.8337 5.34199Z",fill:"#327EEE"})),Tc=e=>E.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{id:"check"},E.createElement("path",{id:"Shape",d:"M20 7L9 18L4 13",stroke:"#F5F6F9",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),Ac=e=>E.createElement("svg",I({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{clipPath:"url(#clip0_1889_12169)"},E.createElement("path",{d:"M11.4286 7.42578L8 13.1401",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M14.857 13.1412C15.3274 12.0123 15.5118 10.7848 15.3938 9.56751C15.2758 8.35027 14.8592 7.18097 14.1808 6.16341C13.5024 5.14585 12.5833 4.31152 11.5051 3.73446C10.4268 3.1574 9.22281 2.85547 7.99986 2.85547C6.77691 2.85547 5.57288 3.1574 4.49463 3.73446C3.41639 4.31152 2.49729 5.14585 1.81892 6.16341C1.14055 7.18097 0.723889 8.35027 0.605928 9.56751C0.487968 10.7848 0.672354 12.0123 1.14272 13.1412H14.857Z",stroke:"#7586B0",strokeWidth:1.71429,strokeLinecap:"round",strokeLinejoin:"round"})),E.createElement("defs",null,E.createElement("clipPath",{id:"clip0_1889_12169"},E.createElement("rect",{width:16,height:16,fill:"white"})))),kc=e=>E.createElement("svg",I({width:16,height:16,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{id:"tag--tags-bookmark-favorite"},E.createElement("path",{id:"Vector",d:"M1.26995 11.9426L6.05743 16.7301C6.2305 16.903 6.4651 17.0001 6.7097 17.0001C6.95431 17.0001 7.18891 16.903 7.36198 16.7301L16.8631 7.22895C16.9108 7.18332 16.9478 7.12758 16.9712 7.06583C16.9946 7.00408 17.0039 6.93787 16.9985 6.87205L16.2724 2.15839C16.2664 2.04607 16.2192 1.93992 16.1396 1.86038C16.0601 1.78085 15.9539 1.73357 15.8416 1.72764L11.128 1.00152C11.0622 0.996055 10.9959 1.00538 10.9342 1.0288C10.8724 1.05222 10.8167 1.08916 10.7711 1.1369L1.26995 10.638C1.09709 10.8111 1 11.0457 1 11.2903C1 11.5349 1.09709 11.7695 1.26995 11.9426Z",stroke:"#327EEE",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{id:"Vector_2",d:"M12.5548 6.05884C12.3916 6.05884 12.2351 5.99401 12.1197 5.87861C12.0043 5.76321 11.9395 5.60669 11.9395 5.44348C11.9395 5.28028 12.0043 5.12376 12.1197 5.00836C12.2351 4.89296 12.3916 4.82812 12.5548 4.82812C12.718 4.82812 12.8745 4.89296 12.9899 5.00836C13.1053 5.12376 13.1702 5.28028 13.1702 5.44348C13.1702 5.60669 13.1053 5.76321 12.9899 5.87861C12.8745 5.99401 12.718 6.05884 12.5548 6.05884Z",stroke:"#327EEE",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))),Nc=e=>E.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M12 3V21.0001M3 11.9446H21",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),wc=e=>E.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M3 12H21",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Fc=e=>E.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M3 11.1429L9.71572 17.8586C9.79383 17.9367 9.92046 17.9367 9.99856 17.8586L21.8571 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),jc=Object.freeze(Object.defineProperty({__proto__:null,Add:Nc,Addons:dc,ArrowForward:xc,BillingInfoCustomer:mc,Check:Tc,Close:Ic,ContactSupport:gc,Coupon:kc,CreditCard:pc,DollarCoin:fc,EntitlementCheck:Fc,MiniSchedule:Yr,OutlinedCheckedCircle:Dc,OutlinedCheckedCircleDisabled:vc,OutlinedCircle:Sc,PayAsYouGoCharge:Ac,PaymentMethod:Pc,Promotions:hc,Remove:wc,RenewSubscription:bc,Restore:Zr,ScheduleBox:yc,ScheduleClock:Cc,Trash:Ec},Symbol.toStringTag,{value:"Module"})),Rc=h.div`
26
- ${({$pathColor:e})=>e&&Ie`
27
- path {
28
- fill: ${e};
29
- }
30
- `}
31
-
32
- ${({$rectColor:e})=>e&&Ie`
33
- svg rect {
34
- fill: ${e};
35
- }
36
- `}
37
-
38
-
39
- ${({$strokeColor:e})=>e&&Ie`
40
- g {
41
- stroke: ${e};
42
- }
43
- `}
44
- `;function fe({icon:e,className:n,style:i,svgPathColor:r,svgRectColor:t,svgStrokeColor:a}){const s=jc[e],c=zt();return o.jsx(Rc,{className:n,style:i,$pathColor:gn(r,c),$rectColor:gn(t,c),$strokeColor:gn(a,c),children:o.jsx(s,{})})}const Mc=h(C)`
45
- margin: 0;
46
- `,Uc=h.div`
47
- display: flex;
48
- align-items: center;
49
- gap: 16px;
50
- `,Oc=h.div`
51
- display: flex;
52
- align-items: center;
53
- flex-shrink: 0;
54
- `,Lc=h(fe)`
55
- width: 24px;
56
- height: 24px;
57
- color: ${({theme:e})=>e.stigg.palette.primary};
58
- `;function Bc(e){if(!e)return"";switch(e){case b.EntitlementResetPeriod.Day:return"per day";case b.EntitlementResetPeriod.Hour:return"per hour";case b.EntitlementResetPeriod.Week:return"per week";case b.EntitlementResetPeriod.Month:return"per month";case b.EntitlementResetPeriod.Year:return"per year";default:return""}}function _c({hasUnlimitedUsage:e,feature:n,resetPeriod:i,usageLimit:r,minUnitQuantity:t,maxUnitQuantity:a,isCustom:s,enumValues:c}){const l=t||a,u=`${i&&r?`${Bc(i)}`:""}`;if(c){const d=c.length===1?n==null?void 0:n.units:n==null?void 0:n.unitsPlural;return`${c.length} ${d}`}if(e)return`Unlimited ${n==null?void 0:n.unitsPlural}`;if(s)return`Custom ${n==null?void 0:n.unitsPlural}`;if(r){const d=r===1?n==null?void 0:n.units:n==null?void 0:n.unitsPlural;return`${Wr(r)} ${d} ${u}`}return l?qr(t,a,n==null?void 0:n.unitsPlural):n==null?void 0:n.displayName}function qi(e){var a;const t=e,{displayNameOverride:n}=t,i=se(t,["displayNameOverride"]),r=_c(i);return o.jsxs(Uc,{className:`stigg-entitlement-row-container stigg-entitlement-${(a=i.feature)==null?void 0:a.id}`,children:[o.jsx(Oc,{children:o.jsx(Lc,{icon:"EntitlementCheck",className:"stigg-entitlement-row-icon"})}),o.jsx(Mc,{className:"stigg-entitlement-name",variant:"h6",color:"secondary",children:n||r})]})}const $c=h.div`
59
- display: flex;
60
- flex-direction: column;
61
- gap: 16px;
62
- `;function Gc(e,n,i){if(n.entitlementsTitle)return n.entitlementsTitle(e);let r=i?"Includes:":"";return e.basePlan&&(r=`Everything in ${e.basePlan.displayName}${i?", plus:":""}`),r}function Vc({plan:e,billingPeriod:n,paywallLocale:i}){var c;const t=(((c=e.pricePoints)==null?void 0:c.filter(l=>l.billingPeriod===n))||[]).filter(l=>(l==null?void 0:l.minUnitQuantity)&&(l==null?void 0:l.minUnitQuantity)>1||(l==null?void 0:l.maxUnitQuantity)).map(l=>{var u;return o.jsx(qi,{feature:l!=null&&l.feature?_(I({},l.feature),{id:l.feature.featureId}):null,minUnitQuantity:l==null?void 0:l.minUnitQuantity,maxUnitQuantity:l==null?void 0:l.maxUnitQuantity},`priceUnitEntitlement-${(u=l==null?void 0:l.feature)==null?void 0:u.displayName}`)}),a=e.entitlements.filter(({isGranted:l})=>l).filter(l=>!(l.hiddenFromWidgets||[]).includes(b.WidgetType.Paywall)),s=t.length>0||a.length>0;return o.jsxs($c,{className:"stigg-plan-entitlements-container",children:[o.jsx(C,{className:"stigg-plan-entitlements-title",color:"secondary",variant:"h6",bold:!0,children:Gc(e,i,s)}),t,a.map(l=>{var u;return o.jsx(qi,{displayNameOverride:l.displayNameOverride,feature:l.feature,resetPeriod:l.resetPeriod,hasUnlimitedUsage:l.hasUnlimitedUsage,usageLimit:l.usageLimit,enumValues:l.enumValues,isCustom:l.isCustom},(u=l.feature)==null?void 0:u.id)})]})}var ye=(e=>(e.START_TRIAL="START_TRIAL",e.UPGRADE_TRIAL_TO_PAID="UPGRADE_TRIAL_TO_PAID",e.REQUEST_CUSTOM_PLAN_ACCESS="REQUEST_CUSTOM_PLAN_ACCESS",e.CHANGE_BILLING_PERIOD="CHANGE_BILLING_PERIOD",e.CHANGE_UNIT_QUANTITY="CHANGE_UNIT_QUANTITY",e.UPGRADE_PLAN="UPGRADE_PLAN",e.DOWNGRADE_PLAN="DOWNGRADE_PLAN",e.CANCEL_SCHEDULED_UPDATES="CANCEL_SCHEDULED_UPDATES",e))(ye||{});const zr=e=>({left:"flex-start",center:"center",right:"flex-end"})[e],Hc=e=>{var u,d,p;const n=le(((u=e==null?void 0:e.palette)==null?void 0:u.primary)||"#327EEE"),i=le(((p=(d=e==null?void 0:e.palette)==null?void 0:d.text)==null?void 0:p.primary)||"#001E6C"),r=le("#4CAF50"),t=le("#f44336"),a=le("#ff9800"),s=le("#2196f3"),c=le("#9e9e9e"),l={palette:{primary:n.hex(),primaryDark:n.darken(.3).hex(),primaryLight:n.alpha(.5).toString(),backgroundPaper:"#FFFFFF",backgroundHighlight:"#F5F6F9",backgroundSection:n.alpha(.1).toString(),backgroundButton:n.alpha(.08).toString(),outlinedBorder:"#C4CBDD",outlinedRestingBorder:n.alpha(.5).toString(),outlinedHoverBackground:n.lightness(95).hex(),switchBorder:n.lighten(.1).hex(),switchFill:n.lighten(.5).hex(),switchHandle:n.hex(),warning:"#ed6c02",error:t.hex(),errorDark:t.darken(.3).hex(),success:r.hex(),successDark:r.darken(.3).hex(),white:"#FFFFFF",text:{primary:i.hex(),secondary:i.alpha(.75).toString(),tertiary:i.alpha(.5).toString(),disabled:i.alpha(.35).toString()},statusChips:{success:{background:r.alpha(.15).toString(),text:r.darken(.2).hex(),border:"transparent"},warning:{background:a.alpha(.15).toString(),text:a.darken(.2).hex(),border:"transparent"},error:{background:t.alpha(.15).toString(),text:t.darken(.1).hex(),border:"transparent"},info:{background:s.alpha(.15).toString(),text:s.darken(.2).hex(),border:"transparent"},neutral:{background:c.alpha(.15).toString(),text:c.darken(.2).hex(),border:"transparent"}},progress:{background:"#e0e0e0",low:"#4caf50",medium:"#ff9800",high:"#f44336"}},layout:{planMinWidth:"330px",planMaxWidth:"330px",planMargin:"20px",planPadding:"40px",ctaAlignment:"left",headerAlignment:"left",descriptionAlignment:"left",descriptionMinHeight:"80px",switchBottomSpacing:"40px"},shadows:{light:"0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px rgba(0, 0, 0, 0.14), 0px 1px 3px rgba(0, 0, 0, 0.12)",popover:"0px 4px 5px -2px rgba(0, 30, 108, 0.2), 0px 7px 10px 1px rgba(0, 30, 108, 0.14), 0px 2px 16px 1px rgba(0, 30, 108, 0.12)"},border:{radius:"10px"},typography:{fontFamily:"custom-font, DM Sans, sans-serif",h1:{fontSize:"32px",fontWeight:"bold",semanticElement:"h1"},h2:{fontSize:"24px",fontWeight:"normal",semanticElement:"h2"},h3:{fontSize:"16px",fontWeight:"normal",semanticElement:"h3"},body:{fontSize:"14px",fontWeight:"normal",semanticElement:"p"},caption:{fontSize:"12px",fontWeight:"normal",semanticElement:"span"}},customCss:""};return ft(l,e)},pn=e=>oe.utc(e).format("MMMM Do, yyyy");function Kr({scheduledUpdate:e,subscriptionPrices:n,billingPeriodRange:i,options:r={}}){var s,c;if(!e)return{};const{withDate:t,postfix:a=""}=r;switch(e.subscriptionScheduleType){case b.SubscriptionScheduleType.Downgrade:{let l=t;return ee.isNil(l)&&(i!=null&&i.end)&&(l=!oe(e.scheduledExecutionTime).isSame(i==null?void 0:i.end,"day")),{line1:o.jsxs(o.Fragment,{children:["Your subscription will be downgraded to the ",o.jsxs("b",{children:[(s=e.targetPackage)==null?void 0:s.displayName," plan"]})," ",l?o.jsxs(o.Fragment,{children:["on ",pn(e.scheduledExecutionTime)]}):a,"."]}),line2:"Until then you still have access to your current plan."}}case b.SubscriptionScheduleType.BillingPeriod:{const l=e.scheduleVariables;return{line1:o.jsxs(o.Fragment,{children:["Your billing cycle will change to ",o.jsx("b",{children:(c=l.billingPeriod)==null?void 0:c.toLocaleLowerCase()})," ",t?o.jsxs(o.Fragment,{children:["on ",pn(e.scheduledExecutionTime)]}):a,"."]})}}case b.SubscriptionScheduleType.UnitAmount:{const l=e.scheduleVariables,d=ee.compact(n==null?void 0:n.map(({feature:P})=>P)).find(({id:P})=>P===l.featureId),{featureUnits:p,featureUnitsPlural:m}=d||{},f=l.newUnitAmount===1?p:m,g=o.jsxs(o.Fragment,{children:["Your subscription will be updated to ",o.jsx("b",{children:l.newUnitAmount})," ",f," ",t?o.jsxs(o.Fragment,{children:["on ",pn(e.scheduledExecutionTime)]}):a,"."]}),y=`Until then you still have access to your current ${p} count.`;return{line1:g,line2:y}}default:return{}}}function qc(e){return e.feature&&(e.feature.unitQuantity!==1?e.feature.unitsPlural:e.feature.units)||""}function Qr(e,n){const i=[...e];i.sort((r,t)=>r.upTo?t.upTo?r.upTo-t.upTo:-1:1);for(const r of i)if(r.upTo&&n<=r.upTo)return r;return i[i.length-1]}function Wi(e,n,i){return n===b.BillingPeriod.Annually&&i?e/12:e}function wn(e,n,i,r){let t=0;if(e.unitPrice){const a=Wi(e.unitPrice.amount,i,r);t+=a*n}return e.flatPrice&&(t+=Wi(e.flatPrice.amount,i,r)),t}function Xr(e,n,i,r){let t=n,a=0,s=0;const c=[];for(;t>0&&s<e.length;){const u=e[s],{upTo:d}=u;if(De(d))c.push({unitQuantity:t,amount:wn(u,t,i,r)}),t=0;else{const p=d-a,m=Math.min(t,p);c.push({unitQuantity:m,amount:wn(u,m,i,r)}),t-=m,a=d}s+=1}const l=ee.sum(c.map(({amount:u})=>u));return{breakdown:c,total:l}}function Zn(e,n,i,r){if(!e.tiers)return 0;switch(e.tiersMode){case b.TiersMode.Volume:{const t=Qr(e.tiers,n);return wn(t,n,i,r)}case b.TiersMode.Graduated:return Xr(e.tiers,n,i,r).total;default:return 0}}function zn(e){return e==null?void 0:e.some(({unitPrice:n,upTo:i})=>n&&!De(i))}function Wc(e){return e==null?void 0:e.every(({unitPrice:n,upTo:i})=>!n||De(i))}function Yc(e,n){return(e==null?void 0:e[0].upTo)&&n<=e[0].upTo}function Jr({plan:e,billingPeriod:n,currentSubscription:i,currentSubscriptionOverride:r,selectDefaultTierIndex:t}){const a=e.pricePoints.filter(s=>s.billingPeriod===n&&s.isTieredPrice);if(a.length===1){const[s]=a,{featureId:c}=s.feature,l=t?t({plan:e}):0,u=s.tiers[l];let d=zn(s.tiers)?1:u.upTo||1;if(i&&i.plan.id===e.id){const m=i.prices.find(f=>{var g;return f.pricingModel===b.BillingModel.PerUnit&&f.tiersMode&&((g=f.feature)==null?void 0:g.featureId)===c});m&&(d=m.feature.unitQuantity||1)}if((r==null?void 0:r.planId)===e.id){const m=r.billableFeatures.find(f=>f.featureId===c);m&&(d=m.quantity)}const p={};return p[c]=d,p}return{}}var Fn=(e=>(e[e.Lower=-1]="Lower",e[e.Equal=0]="Equal",e[e.Higher=1]="Higher",e))(Fn||{});function Zc({perUnitQuantityByFeature:e,plan:n,currentSubscription:i,currentSubscriptionOverride:r}){var d,p;if(!i)return 0;let t=i.prices.find(m=>m.pricingModel===b.BillingModel.PerUnit&&m.tiersMode);const a=n.id===(r==null?void 0:r.planId);if(a&&(t=(d=n.pricePoints.find(m=>m.pricingModel===b.BillingModel.PerUnit&&m.tiersMode))!=null?d:t),!t)return 0;const{featureId:s,unitQuantity:c}=t.feature;let l=c;if(a){const m=(p=r==null?void 0:r.billableFeatures)==null?void 0:p.find(f=>f.featureId===s);m&&(l=m.quantity)}if(De(l))return 0;const u=e[s];return u<l?-1:u>l?1:0}const zc=h(vr)`
63
- margin-left: 10px;
64
- `,Kc=h.button`
65
- cursor: ${({$disabled:e})=>e?"default":"pointer"};
66
- padding: 8px 12px;
67
- background-color: ${({theme:e})=>e.stigg.palette.backgroundButton};
68
- border: ${({theme:e})=>`1px solid ${e.stigg.palette.outlinedRestingBorder}`};
69
- border-radius: 10px;
70
- display: flex;
71
- align-items: center;
72
- justify-content: center;
73
- min-height: 42px;
74
- min-width: 120px;
75
-
76
- ${({$disabled:e})=>e&&Ie`
77
- opacity: 0.5;
78
- `}
79
-
80
- &:hover {
81
- background-color: ${({theme:e,$disabled:n})=>n?e.stigg.palette.backgroundButton:e.stigg.palette.outlinedHoverBackground};
82
- }
83
- `,Qc=h(C)`
84
- margin: 0;
85
- font-size: 15px;
86
- `,Xc=h(C)`
87
- min-height: 87px;
88
- `,Jc=h.button`
89
- background: none;
90
- border: none;
91
- padding: 0;
92
- color: ${({theme:e})=>e.stigg.palette.text.secondary};
93
-
94
- text-decoration: underline;
95
- cursor: pointer;
96
- `,el=h(C)`
97
- margin-top: 8px;
98
- margin-bottom: 17px;
99
- min-height: 20px;
100
- `,tl=h.div`
101
- display: flex;
102
- flex-direction: column;
103
- margin-top: 4px;
104
- align-self: ${({theme:e})=>zr(e.stigg.layout.ctaAlignment)};
105
- width: 100%;
106
- `;function nl({isNextPlan:e,customer:n,plan:i,billingPeriod:r,isCustomerOnTrial:t,onPlanSelected:a,paywallLocale:s,withTrialLeftRow:c,currentSubscription:l,currentSubscriptionOverride:u,perUnitQuantityByFeature:d}){const p=zt(),[m,f]=D.useState(!1),{currentPlan:g,custom:y,downgrade:P,startTrial:S,upgrade:v,startNew:A,switchToBillingPeriod:k,cancelScheduledUpdate:w}=s.planCTAButton,T=ee.isFunction(P)?P(i):P,N=ee.isFunction(v)?v(i):v,F={title:n?i.isLowerThanCurrentPlan?T:N:A,disabled:!1,intentionType:i.isLowerThanCurrentPlan?ye.DOWNGRADE_PLAN:t?ye.UPGRADE_TRIAL_TO_PAID:ye.UPGRADE_PLAN},U=i.pricingType===b.PricingType.Custom,{line1:L}=Kr({scheduledUpdate:i.scheduledUpdate,options:{withDate:!0}});if(i.isTriable&&!i.isCurrentCustomerPlan&&!t)F.title=S(i),F.intentionType=ye.START_TRIAL;else if(i.isCurrentCustomerPlan&&!t)if(r===i.currentCustomerPlanBillingPeriod||i.pricingType&&[b.PricingType.Free,b.PricingType.Custom].includes(i.pricingType))switch(Zc({perUnitQuantityByFeature:d,plan:i,currentSubscription:l,currentSubscriptionOverride:u})){case Fn.Lower:F.intentionType=ye.CHANGE_UNIT_QUANTITY,F.title=T;break;case Fn.Higher:F.intentionType=ye.CHANGE_UNIT_QUANTITY,F.title=N;break;default:F.title=g,F.disabled=!0;break}else F.title=k(r),F.intentionType=ye.CHANGE_BILLING_PERIOD;else U&&(F.title=typeof y=="function"?y({plan:i,selectedBillingPeriod:r}):y,F.intentionType=ye.REQUEST_CUSTOM_PLAN_ACCESS);e&&i.scheduledUpdate&&(F.disabled=!1,F.title=w,F.intentionType=ye.CANCEL_SCHEDULED_UPDATES);const j=m||F.disabled;return o.jsx(o.Fragment,{children:o.jsx(tl,{className:"stigg-paywall-plan-button-layout",children:e&&L?o.jsxs(Xc,{color:"secondary",variant:"body1",className:"stigg-paywall-schedule-update-text",children:[L," ",o.jsx(Jc,{color:"secondary",onClick:()=>{f(!0),Promise.resolve(a(F.intentionType)).finally(()=>f(!1))},children:F.title})]}):o.jsxs(o.Fragment,{children:[o.jsxs(Kc,{className:"stigg-paywall-plan-button","data-testid":`paywall-card-cta-${i.displayName}`,disabled:j,$disabled:j,onClick:()=>{f(!0),Promise.resolve(a(F.intentionType)).finally(()=>f(!1))},children:[o.jsx(Qc,{className:"stigg-paywall-plan-button-text",variant:"h6",color:"primary.main",children:F.title}),m&&o.jsx(zc,{color:p.stigg.palette.text.disabled,loading:!0,size:16})]}),c?o.jsx(el,{className:"stigg-trial-days-left-text",variant:"h6",color:"secondary",children:i.isCurrentCustomerPlan&&i.trialDaysLeft&&o.jsxs(o.Fragment,{children:[o.jsxs("b",{children:[i.trialDaysLeft," days"]})," left on your free trial"]})}):o.jsx("div",{style:{height:"20px"}})]})})})}const re=({amount:e,currency:n=b.Currency.Usd,locale:i,maximumFractionDigits:r=5,minimumFractionDigits:t=0,removeTrailingZero:a})=>{const s=n.toString(),c=ko(s);let l=new Intl.NumberFormat(i,I({maximumFractionDigits:r,minimumFractionDigits:t,style:"currency",currency:s,trailingZeroDisplay:a?"stripIfInteger":"auto"},c?{currencyDisplay:"code"}:{})).format(e||0);return c&&(l=l.replace(s,c)),l=l.replace(/\s/g,""),l};function pe(e,{locale:n,maximumFractionDigits:i}={}){return new Intl.NumberFormat(n,{maximumFractionDigits:i}).format(e)}function il({planPrices:e,paywallCalculatedPrice:n,selectedBillingPeriod:i,locale:r,shouldShowMonthlyPriceAmount:t,paywallLocale:a,perUnitQuantityByFeature:s}){var P,S,v;const{amount:c,currency:l}=n||e[0],u=c||0,d=e.length===1;let p=i===b.BillingPeriod.Annually&&t?u/12:u,m,f;const g=a.price.pricePeriod(t?b.BillingPeriod.Monthly:b.BillingPeriod.Annually);let y=g;for(const A of e)if(A.isTieredPrice&&A.tiers){const k=(s==null?void 0:s[A.feature.featureId])||1;m=A.tiers,f=qc(A),p+=Zn(A,k,i,t)}if(d){const A=e[0],k=A.blockSize&&A.blockSize>1?`for ${pe(A.blockSize)} ${((P=A.feature)==null?void 0:P.unitsPlural)||((S=A.feature)==null?void 0:S.units)||""}`:`per ${((v=A.feature)==null?void 0:v.units)||""}`;A.pricingModel===b.BillingModel.PerUnit&&!A.isTieredPrice?y=`${k} ${g}`:A.pricingModel===b.BillingModel.UsageBased&&(y=`${k}`)}return{price:re({amount:p,currency:l,locale:r,minimumFractionDigits:2,removeTrailingZero:!0}),unit:y,tiers:m,tierUnits:f}}function ea(e,n,i,r,t,a){var s;switch(e.pricingType){case b.PricingType.Free:return typeof i.price.free=="function"?i.price.free(e.paywallCurrency):i.price.free;case b.PricingType.Custom:return{price:typeof i.price.custom=="function"?i.price.custom({plan:e,selectedBillingPeriod:n}):i.price.custom};case b.PricingType.Paid:{const c=e.pricePoints.filter(d=>d.billingPeriod===n),l=(s=e.paywallCalculatedPricePoints)==null?void 0:s.find(d=>d.billingPeriod===n);if(!(c!=null&&c.length)&&!l)return{price:i.price.priceNotSet};const u={planPrices:c,paywallCalculatedPrice:l,selectedBillingPeriod:n,perUnitQuantityByFeature:a||{}};return i.price.paid?i.price.paid(_(I({},u),{plan:e})):il(_(I({},u),{locale:r,shouldShowMonthlyPriceAmount:t,paywallLocale:i}))}default:return{price:""}}}const rl=h(we)`
107
- border-radius: 10px;
108
- text-transform: none;
109
-
110
- background-color: ${({theme:e,$success:n,$error:i})=>n?e.stigg.palette.success:i?e.stigg.palette.error:""};
111
-
112
- &:hover {
113
- background-color: ${({theme:e,$success:n,$error:i})=>n?e.stigg.palette.successDark:i?e.stigg.palette.errorDark:""};
114
- }
115
- `,Le=i=>{var r=i,{variant:e="outlined"}=r,n=se(r,["variant"]);return o.jsx(rl,I({variant:e},n))},Kt=h(wo)(({theme:e})=>({"& .MuiOutlinedInput-root":{height:"42px",borderRadius:e.stigg.border.radius,fieldset:{borderColor:e.stigg.palette.outlinedBorder},"&:not(.Mui-focused):hover fieldset":{borderColor:e.stigg.palette.outlinedRestingBorder}},"& .MuiInputBase-input":I({padding:"8px 12px",borderRadius:e.stigg.border.radius,fontFamily:e.stigg.typography.fontFamily,color:e.stigg.palette.text.primary},e.stigg.typography.body),"& .Mui-error":{fontFamily:e.stigg.typography.fontFamily}})),dt=h(R)`
116
- display: flex;
117
- flex-direction: ${({$flexDirection:e})=>e||"row"};
118
- gap: ${({$gap:e})=>e}px;
119
- `,al=h(dt)`
120
- span {
121
- display: flex;
122
- flex: 1;
123
- }
124
- `,jn=h(R)`
125
- span {
126
- display: flex;
127
- flex: ${({flex:e})=>e};
128
- }
129
- `,te=h(H)`
130
- border-radius: 4px;
131
- `,Yi=h(R)`
132
- display: flex;
133
- flex-direction: column;
134
- `;function ol(){return o.jsxs(Yi,{container:!0,children:[o.jsxs(dt,{item:!0,$gap:48,children:[o.jsx(te,{width:120,height:20}),o.jsx(te,{width:120,height:20})]}),o.jsx(We,{className:"stigg-checkout-plan-header-divider",sx:{marginY:2}}),o.jsxs(Yi,{item:!0,children:[o.jsx(te,{width:120,height:20}),o.jsxs(al,{$gap:16,marginTop:3,children:[o.jsx(te,{height:20}),o.jsx(te,{height:20})]}),o.jsxs(dt,{$gap:130,marginTop:3,children:[o.jsx(jn,{flex:1,children:o.jsx(te,{height:20})}),o.jsx(jn,{flex:3,children:o.jsx(te,{height:20})})]})]})]})}const Kn=e=>e.target.blur();function sl({width:e,tierUnits:n,value:i,handleChange:r,errorMessage:t}){return o.jsx(Kt,{type:"number",onWheel:Kn,fullWidth:!0,error:!!t,sx:{minHeight:"46px",width:e},InputProps:{endAdornment:o.jsx(No,{position:"end",children:o.jsx(C,{variant:"body1",color:"primary",children:n})})},value:i,onChange:a=>{var c,l;const s=(c=a==null?void 0:a.target)!=null&&c.value?Number((l=a==null?void 0:a.target)==null?void 0:l.value):null;s&&r(s)}})}const cl=h(jo)`
135
- border-radius: 10px;
136
- min-height: 42px;
137
- min-width: 120px;
138
-
139
- &:hover .MuiOutlinedInput-notchedOutline {
140
- border-color: ${({theme:e})=>e.stigg.palette.outlinedBorder};
141
- }
142
- `,ll=h(Fo)`
143
- & .MuiInputBase-input {
144
- padding: 10px 12px;
145
- }
146
-
147
- &.Mui-focused .MuiOutlinedInput-notchedOutline {
148
- border-color: ${({theme:e})=>e.stigg.palette.primary} !important;
149
- }
150
- `;function ul({value:e,componentId:n,tierUnits:i,tiers:r,handleChange:t,errorMessage:a}){return r?o.jsx(cl,{value:e.toString(),fullWidth:!0,error:!!a,onChange:s=>{var l,u;const c=(l=s==null?void 0:s.target)!=null&&l.value?Number((u=s==null?void 0:s.target)==null?void 0:u.value):null;c&&t(c)},id:n,input:o.jsx(ll,{}),MenuProps:{MenuListProps:{disablePadding:!0},PaperProps:{sx:{marginTop:"4px",borderRadius:"10px"}}},children:ee.map(r,s=>{var c;return o.jsx(Ro,{className:"stigg-price-tier-menu-item-text",value:(c=s.upTo)==null?void 0:c.toString(),children:o.jsxs(C,{variant:"body1",color:"primary",style:{lineHeight:"unset"},children:[Wr(s.upTo)," ",i]})},s.upTo)})}):null}const dl=h(C)`
151
- min-height: 46px;
152
- `;function ta(e){const{tiers:n,errorMessage:i}=e;return o.jsx(o.Fragment,{children:o.jsxs(K.Box,{display:"flex",flexDirection:"column",justifyContent:"center",style:{width:"100%"},children:[o.jsx(dl,{as:"div",className:"stigg-price-tier-select",children:zn(n)?o.jsx(sl,I({},e)):o.jsx(ul,I({},e))}),o.jsx(C,{style:{margin:"4px"},variant:"caption",color:"error",children:i})]})})}const na="‎",ml=h(C)`
153
- word-break: break-word;
154
- width: 100%;
155
- `,gl=h(C)`
156
- white-space: nowrap;
157
- `,pl=h(C)`
158
- white-space: normal;
159
- min-height: 39px;
160
- `;function fl({plan:e,billingPeriod:n,hasMonthlyPrice:i,hasAnnuallyPrice:r,paywallLocale:t}){var c,l;const a=e.pricePoints.find(u=>u.billingPeriod===n);let s=na;return a&&i&&r&&(s=((l=(c=t.price).billingPeriod)==null?void 0:l.call(c,n))||`, billed ${n.toLowerCase()}`),o.jsx(C,{as:"span",className:"stigg-price-billing-period-text",variant:"h6",color:"secondary",children:s})}const hl=({showStartingAt:e,withUnitPriceRow:n,withStartingAtRow:i,withTiersRow:r,plan:t,billingPeriod:a,paywallLocale:s,locale:c,hasMonthlyPrice:l,hasAnnuallyPrice:u,perUnitQuantityByFeature:d,setPerUnitQuantityByFeature:p})=>{var k;const{price:m,unit:f,tiers:g,tierUnits:y}=ea(t,a,s,c,l,d),P=t.pricePoints.find(w=>w.billingPeriod===a&&w.isTieredPrice),S=P?P.feature.featureId:void 0,v=(k=d[S||""])!=null?k:1,A=w=>{S&&p(T=>_(I({},T),{[S]:w}))};return o.jsx(ml,{as:"div",className:"stigg-price-text",children:o.jsxs(o.Fragment,{children:[i&&o.jsx(C,{style:{minHeight:"20px"},className:"stigg-starting-at-text",variant:"body1",color:"secondary",children:e?s.price.startingAtCaption:na}),o.jsx(pl,{className:"stigg-price-point",variant:"h1",children:m}),n&&o.jsxs(C,{as:"div",className:"stigg-price-unit-and-billing-period-text",style:{minHeight:"48px"},children:[o.jsx(gl,{className:"stigg-price-unit-text",as:"span",variant:"h6",color:"secondary",children:f}),o.jsx(fl,{plan:t,billingPeriod:a,hasAnnuallyPrice:u,hasMonthlyPrice:l,paywallLocale:s})]}),r?o.jsx(ta,{componentId:`${t.id}_${S}_tier`,tiers:g,tierUnits:y,tiersMode:P==null?void 0:P.tiersMode,handleChange:A,value:v}):null]})})},yl=h(we)`
161
- padding: 0px;
162
- text-transform: none;
163
- margin-left: 0px;
164
- `,Cl=h(C)`
165
- font-size: 14px;
166
- font-weight: 500;
167
- `,bl=h.div`
168
- width: 100%;
169
- gap: 10px;
170
- `,El=h.div`
171
- margin-top: 10px;
172
- overflow: hidden;
173
- display: flex;
174
- flex-direction: column;
175
- gap: 4px;
176
- width: 100%;
177
- `,Pl=h.div`
178
- display: flex;
179
- flex-direction: row;
180
- flex-wrap: nowrap;
181
- align-items: center;
182
- justify-content: space-between;
183
- padding: 8px 0px;
184
- max-height: 44px;
185
- gap: 16px;
186
- `,Sl=h(C)`
187
- overflow: hidden;
188
- font-feature-settings: 'liga' off, 'clig' off;
189
- text-overflow: ellipsis;
190
- font-family: 'DM Sans';
191
- letter-spacing: 0.15px;
192
- white-space: nowrap;
193
- min-width: 0;
194
- flex-shrink: 1;
195
- `,Dl=h(fe)`
196
- width: 24px;
197
- height: 24px;
198
- color: ${({theme:e})=>e.stigg.palette.primary};
199
- `,vl=h.div`
200
- flex: 1;
201
- min-width: 0;
202
- `,xl=h.div`
203
- margin-top: 16px;
204
- display: flex;
205
- `,fn=4;function Il({addons:e,paywallLocale:n}){const[i,r]=D.useState(!1);if(!e||e.length===0)return null;const t=e.filter(c=>{var l;return!((l=c.hiddenFromWidgets)!=null&&l.includes(b.WidgetType.Paywall))}),a=()=>{r(!i)},s=i?t:t.slice(0,fn);return s.length===0?null:o.jsxs(bl,{className:"stigg-compatible-addons-container",children:[o.jsx(C,{className:"stigg-compatible-addons-header",color:"secondary",variant:"body1",bold:!0,children:n.addonsTitle}),o.jsx(El,{className:"stigg-compatible-addons-list",children:s.map(c=>o.jsxs(Pl,{className:Dr(`stigg-compatible-addon--${c.id}`,"stigg-compatible-addon-item"),children:[o.jsx(Dl,{icon:"Add",className:"stigg-compatible-addon-icon"}),o.jsx(vl,{className:"stigg-compatible-addon-content",children:o.jsx(Sl,{variant:"body1",color:"primary",className:"stigg-compatible-addon-name",children:c.displayName})})]},c.id))}),t.length>fn&&o.jsx(xl,{children:o.jsx(yl,{variant:"text",onClick:a,children:o.jsx(Cl,{color:"primary.main",children:i?"Show less":`Show ${t.length-fn} more`})})})]})}const Tl="66px",Al=h.div`
206
- position: relative;
207
- background-color: ${({theme:e,$isCurrentPlan:n})=>n?e.stigg.palette.backgroundHighlight:e.stigg.palette.backgroundPaper};
208
- border: ${({theme:e,$isHighlighted:n})=>n?`3px solid ${e.stigg.palette.primary}`:`1px solid ${e.stigg.palette.outlinedBorder}`};
209
- border-radius: 10px;
210
- padding: ${({theme:e})=>e.stigg.layout.planPadding};
211
- display: flex;
212
- min-width: ${({theme:e})=>e.stigg.layout.planMinWidth};
213
- max-width: ${({theme:e})=>e.stigg.layout.planMaxWidth};
214
- flex-direction: column;
215
- align-items: flex-start;
216
- justify-content: flex-start;
217
- position: relative;
218
- `,kl=h.div`
219
- margin-top: ${({$planHasEntitlements:e})=>e?"32px":"0px"};
220
- `,Nl=h(C)`
221
- padding-bottom: 8px;
222
- `,wl=h.div`
223
- height: 2px;
224
- width: 100%;
225
- background-color: ${({theme:e})=>e.stigg.palette.outlinedBorder};
226
- margin-bottom: 40px;
227
- `,Fl=h(C)`
228
- text-align: ${({theme:e})=>e.stigg.layout.descriptionAlignment};
229
- min-height: ${({theme:e})=>e.stigg.layout.descriptionMinHeight};
230
- `,jl=h.div`
231
- background-color: ${({theme:e})=>e.stigg.palette.primary};
232
- border-radius: 40px;
233
- position: absolute;
234
- top: -12px;
235
- `,Rl=h(C)`
236
- margin: 0;
237
- padding: 2px 8px;
238
- `,Ml=h.div`
239
- width: 100%;
240
- display: flex;
241
- flex-direction: column;
242
- align-items: ${({theme:e})=>zr(e.stigg.layout.headerAlignment)};
243
- `,Ul=h.div`
244
- position: absolute;
245
- top: 0;
246
- background-color: ${({theme:e})=>e.stigg.palette.outlinedBorder};
247
- border-radius: 0px 0px 10px 10px;
248
- padding: 3px 12px;
249
- `,Ol=h(Yr)`
250
- display: flex;
251
- height: 100%;
252
- margin-right: 4px;
253
-
254
- path {
255
- fill: ${({theme:e})=>e.stigg.palette.text.primary};
256
- }
257
- `;function Ll({text:e="Next",iconsColor:n}){return o.jsx(Ul,{children:o.jsxs(R,{display:"flex",alignItems:"center",gap:1,children:[o.jsx(Ol,{$iconsColor:n}),o.jsx(C,{color:"primary",variant:"body1",children:e})]})})}function Bl({withUnitPriceRow:e,withTiersRow:n,withTrialLeftRow:i,customer:r,plan:t,billingPeriod:a,isHighlighted:s,currentSubscription:c,currentSubscriptionOverride:l,shouldShowDescriptionSection:u,hasMonthlyPrice:d,hasAnnuallyPrice:p,isCustomerOnTrial:m,onPlanSelected:f,paywallLocale:g,locale:y,withStartingAtRow:P,isCustomerInCustomPlan:S,selectDefaultTierIndex:v,hideCompatibleAddons:A}){var z;const k=t.isNextPlan&&t.isNextPlan(a),w=t.pricePoints.filter(X=>X.billingPeriod===a),T=(z=t.paywallCalculatedPricePoints)==null?void 0:z.find(X=>X.billingPeriod===a),N=w.length>1&&!!(T!=null&&T.additionalChargesMayApply),F=!S||t.pricingType===b.PricingType.Custom;let U=null;k?U=o.jsx(Ll,{text:"Next plan"}):s&&g.highlightChip&&(U=o.jsx(jl,{className:"stigg-highlight-badge",children:o.jsx(Rl,{className:"stigg-highlight-badge-text",color:"white",bold:!0,children:g.highlightChip})}));const[L,j]=D.useState(Jr({plan:t,billingPeriod:a,currentSubscription:c,currentSubscriptionOverride:l,selectDefaultTierIndex:v})),O=X=>{const me=Object.keys(L).map(xe=>({featureId:xe,quantity:L[xe]}));return f(X,me)};return o.jsxs(Al,{className:Dr(`stigg-${t.id}`,"stigg-plan-offering-container",{"stigg-current-plan":t.isCurrentCustomerPlan}),$isHighlighted:s,$isCurrentPlan:t.isCurrentCustomerPlan,children:[U,o.jsxs(Ml,{className:"stigg-header-wrapper",children:[o.jsx(Nl,{className:"stigg-plan-header",variant:"h3",children:t.displayName}),u&&o.jsx(Fl,{className:"stigg-plan-description",variant:"h6",color:"secondary",children:t.description}),o.jsx(hl,{showStartingAt:N,withUnitPriceRow:e,withStartingAtRow:P,withTiersRow:n,plan:t,billingPeriod:a,paywallLocale:g,locale:y,hasAnnuallyPrice:p,hasMonthlyPrice:d,setPerUnitQuantityByFeature:j,perUnitQuantityByFeature:L}),F?o.jsx(nl,{isNextPlan:k,customer:r,plan:t,currentSubscription:c,currentSubscriptionOverride:l,billingPeriod:a,isCustomerOnTrial:m,onPlanSelected:O,paywallLocale:g,withTrialLeftRow:i,perUnitQuantityByFeature:L}):o.jsx("div",{style:{height:Tl}}),o.jsx(wl,{className:"stigg-plan-header-divider"})]}),o.jsx(Vc,{plan:t,billingPeriod:a,paywallLocale:g}),o.jsx(kl,{$planHasEntitlements:t.entitlements.length>0,className:"stigg-addons-container",children:!A&&t.compatibleAddons&&t.compatibleAddons.length>0&&o.jsx(Il,{addons:t.compatibleAddons,paywallLocale:g})})]})}const _l=h.div`
258
- height: 40px;
259
- padding: 0 20px;
260
- margin-bottom: ${({theme:e})=>e.stigg.layout.switchBottomSpacing};
261
- border-radius: 10px;
262
- border: ${({theme:e})=>`1px solid ${e.stigg.palette.outlinedBorder}`};
263
- background-color: ${({theme:e})=>e.stigg.palette.backgroundPaper};
264
- display: flex;
265
- align-items: center;
266
- justify-content: center;
267
- `,Zi=h(C)`
268
- margin: 0 8px;
269
- `,$l=h(Mo)`
270
- & .react-switch-bg {
271
- border: ${({theme:e})=>`1px solid ${e.stigg.palette.switchBorder}`};
272
- background: ${({theme:e})=>e.stigg.palette.switchFill} !important;
273
- }
274
-
275
- & .react-switch-handle {
276
- box-shadow: ${({theme:e})=>e.stigg.shadows.light};
277
- background: ${({theme:e})=>e.stigg.palette.switchHandle} !important;
278
- top: 0.5px !important;
279
- }
280
- `;function Gl({discount:e,disabled:n}){return o.jsxs(C,{variant:"h6",color:n?"disabled":"primary",className:"stigg-discount-rate-text",children:[e,"% off"]})}function Vl({discountRate:e,selectedBillingPeriod:n,onBillingPeriodChanged:i,availableBillingPeriods:r}){if(r.length<=1)return null;const t=n===b.BillingPeriod.Monthly;return o.jsxs(_l,{className:"stigg-period-picker-container",children:[o.jsx(Zi,{variant:"h6",className:"stigg-monthly-period-text",color:t?"primary":"disabled",children:"Monthly"}),o.jsx($l,{className:"stigg-period-switch",uncheckedIcon:!1,checkedIcon:!1,height:16,width:33,onChange:a=>i(a?b.BillingPeriod.Annually:b.BillingPeriod.Monthly),checked:!t,borderRadius:10,handleDiameter:19}),o.jsx(Zi,{variant:"h6",className:"stigg-annual-period-text",color:t?"disabled":"primary",children:"Annual"}),e!==0&&o.jsx(Gl,{discount:e,disabled:t})]})}function Hl(e,n){if(!De(e)&&!De(n)){const i=n/12;return Math.round((e-i)/e*100)}return null}function zi(e,n){var r;let i;if(i=(r=e.paywallCalculatedPricePoints)==null?void 0:r.find(t=>t.billingPeriod===n),i||(i=e.pricePoints.find(t=>t.billingPeriod===n)),!(i!=null&&i.amount)){const t=e.pricePoints.find(a=>a.isTieredPrice&&a.billingPeriod===n);if(t)return Zn(t,1)}return i==null?void 0:i.amount}function ql(e){return e.reduce((n,i)=>{const r=zi(i,b.BillingPeriod.Monthly),t=zi(i,b.BillingPeriod.Annually),a=Hl(r,t);return a&&(n=Math.max(n,a)),n},0)}const Wl=e=>E.createElement("svg",I({width:135,height:16,viewBox:"0 0 135 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M0.0987549 3.43016V12.9878H1.15589V9.52681H3.96527C5.94922 9.52681 7.28874 8.25245 7.28874 6.47848C7.28874 4.70452 5.94922 3.43016 3.96527 3.43016H0.0987549ZM1.15589 8.55656V4.40765H4.04492C5.33376 4.40765 6.18816 5.26205 6.18816 6.47848C6.18816 7.69492 5.33376 8.55656 4.04492 8.55656H1.15589Z",fill:"#001E6C"}),E.createElement("path",{d:"M11.7787 13.1616C13.9075 13.1616 15.6525 11.5397 15.6525 9.38199C15.6525 7.21703 13.9365 5.62408 11.8077 5.62408C9.64999 5.62408 7.93395 7.24599 7.93395 9.41095C7.93395 11.5687 9.62103 13.1616 11.7787 13.1616ZM11.7932 12.2276C10.2365 12.2276 9.02005 11.0256 9.02005 9.39647C9.02005 7.76732 10.2365 6.56537 11.7932 6.56537C13.321 6.56537 14.5664 7.76732 14.5664 9.39647C14.5664 11.0256 13.321 12.2276 11.7932 12.2276Z",fill:"#001E6C"}),E.createElement("path",{d:"M19.9054 12.9878L21.4766 6.94189H21.5056L23.0623 12.9878H24.4018L26.5958 5.8051H25.4155L23.7936 11.909H23.7647L22.2152 5.8051H20.7815L19.232 11.909H19.203L17.5522 5.8051H16.3575L18.5659 12.9878H19.9054Z",fill:"#001E6C"}),E.createElement("path",{d:"M34.9835 9.42544C34.9835 7.30392 33.4051 5.62408 31.1532 5.62408C29.0534 5.62408 27.3084 7.18083 27.3084 9.41095C27.3084 11.5542 28.9086 13.1616 31.1822 13.1616C32.7679 13.1616 34.0567 12.3941 34.6794 11.1922L33.7816 10.707C33.3688 11.6049 32.3696 12.2348 31.1966 12.2348C29.5241 12.2348 28.5031 10.9894 28.4017 9.7223H34.969C34.9835 9.59197 34.9835 9.54129 34.9835 9.42544ZM31.1387 6.55089C32.5434 6.55089 33.6657 7.49942 33.854 8.80998H28.4307C28.6552 7.5501 29.7558 6.55089 31.1387 6.55089Z",fill:"#001E6C"}),E.createElement("path",{d:"M39.5922 5.68201C38.564 5.68201 37.8182 6.20334 37.4924 6.93464L37.391 5.8051H36.486V12.9878H37.5431V8.5638C37.5431 7.44873 38.1585 6.77535 39.3171 6.77535H39.9977V5.68201H39.5922Z",fill:"#001E6C"}),E.createElement("path",{d:"M48.2486 9.42544C48.2486 7.30392 46.6702 5.62408 44.4183 5.62408C42.3185 5.62408 40.5735 7.18083 40.5735 9.41095C40.5735 11.5542 42.1737 13.1616 44.4473 13.1616C46.033 13.1616 47.3218 12.3941 47.9445 11.1922L47.0467 10.707C46.634 11.6049 45.6348 12.2348 44.4618 12.2348C42.7892 12.2348 41.7682 10.9894 41.6669 9.7223H48.2342C48.2486 9.59197 48.2486 9.54129 48.2486 9.42544ZM44.4039 6.55089C45.8085 6.55089 46.9308 7.49942 47.1191 8.80998H41.6958C41.9203 7.5501 43.0209 6.55089 44.4039 6.55089Z",fill:"#001E6C"}),E.createElement("path",{d:"M55.846 7.02877C55.2161 6.13817 54.2024 5.63132 53.0149 5.63132C50.9224 5.63132 49.2425 7.21703 49.2425 9.39647C49.2425 11.5759 50.8934 13.1616 52.986 13.1616C54.1807 13.1616 55.2161 12.6403 55.8533 11.7425L55.9981 12.9878H56.9032V2.56128L55.846 2.67713V7.02877ZM53.0294 12.2276C51.5306 12.2276 50.3286 11.0401 50.3286 9.39647C50.3286 7.75284 51.5306 6.56537 53.0294 6.56537C54.5789 6.56537 55.846 7.76732 55.846 9.39647C55.846 11.0256 54.5789 12.2276 53.0294 12.2276Z",fill:"#001E6C"}),E.createElement("path",{d:"M65.7314 5.63132C64.5367 5.63132 63.5085 6.14541 62.8713 7.04325V2.56128L61.8142 2.67713V12.9878H62.7192L62.8641 11.7497C63.494 12.6475 64.5077 13.1616 65.7024 13.1616C67.795 13.1616 69.4748 11.5759 69.4748 9.39647C69.4748 7.21703 67.8239 5.63132 65.7314 5.63132ZM65.6879 12.2276C64.1384 12.2276 62.8713 11.0256 62.8713 9.39647C62.8713 7.76732 64.1384 6.56537 65.6879 6.56537C67.1867 6.56537 68.3887 7.75284 68.3887 9.39647C68.3887 11.0401 67.1867 12.2276 65.6879 12.2276Z",fill:"#001E6C"}),E.createElement("path",{d:"M76.2187 5.8051V9.9178C76.2187 11.3297 75.3136 12.1841 74.0465 12.1841C72.7866 12.1841 72.077 11.4456 72.077 10.1133V5.8051H71.0199V10.2726C71.0199 11.9669 72.1349 13.0965 73.7641 13.0965C74.843 13.0965 75.6901 12.6765 76.2187 11.9814V12.8937C76.2187 14.1608 75.2629 15.0804 73.8727 15.0804C72.7504 15.0804 71.8236 14.4794 71.5847 13.4295L70.6579 13.9074C71.0995 15.16 72.3087 16 73.8582 16C75.8132 16 77.2758 14.5953 77.2758 12.7923V5.8051H76.2187Z",fill:"#001E6C"}),E.createElement("path",{d:"M108.672 10.4867C108.672 11.9077 107.411 12.7873 105.491 12.7873C104.464 12.7873 103.634 12.6028 102.84 12.2091C102.914 11.76 102.982 11.2187 103 10.5913C103.738 11.0219 104.575 11.231 105.381 11.231C106.34 11.231 106.839 11.0096 106.839 10.5421C106.857 10.0807 106.5 9.87155 105.067 9.59473C103.406 9.26255 102.668 8.57359 102.668 7.35559C102.668 5.97767 103.929 5.0857 105.848 5.0857C106.697 5.0857 107.54 5.24564 108.186 5.52246L107.866 7.06647C107.226 6.7712 106.537 6.63587 105.848 6.63587C104.95 6.63587 104.507 6.85733 104.507 7.29408C104.507 7.67547 104.815 7.83541 106.217 8.12453C108.007 8.50592 108.678 9.19488 108.678 10.4744L108.672 10.4867ZM112.879 11.0957C112.16 11.0957 111.581 10.7143 111.581 9.70546V6.88808H113.408L113.747 5.25794H111.581V2.93884C111.157 3.06187 110.517 3.2095 109.681 3.28332L109.662 10.0315C109.662 11.8708 110.763 12.7996 112.412 12.7996C112.787 12.7996 113.113 12.7627 113.39 12.6951L113.753 10.9665C113.525 11.0465 113.236 11.1018 112.879 11.1018V11.0957ZM114.965 12.6889H116.884V5.25794H114.965V12.6889ZM115.93 2.21912C115.309 2.21297 114.829 2.66817 114.823 3.27102C114.823 3.89232 115.278 4.35983 115.894 4.36598C116.515 4.36598 116.976 3.92923 116.989 3.32638C117.001 2.70508 116.546 2.23142 115.937 2.21912H115.93ZM126.056 5.25794V11.5263C126.056 13.8946 124.456 15.5247 121.756 15.5247C120.784 15.5247 119.714 15.3094 118.994 14.8973C119.492 14.3867 119.831 13.9438 120.046 13.6239C120.532 13.79 121.042 13.8762 121.565 13.8762C123.275 13.8762 124.143 12.9288 124.143 11.7354V11.4955C123.534 12.1968 122.654 12.6336 121.602 12.6336C119.584 12.6336 118.065 11.1326 118.065 8.90577C118.065 6.67893 119.726 5.098 121.756 5.098C122.808 5.098 123.724 5.4794 124.333 6.19912L124.395 5.25179H126.062L126.056 5.25794ZM124.155 8.90577C124.155 7.72468 123.294 6.82657 122.107 6.82657C120.919 6.82657 120.046 7.72468 120.046 8.90577C120.046 10.0868 120.907 10.9542 122.107 10.9542C123.306 10.9542 124.155 10.0561 124.155 8.90577ZM134.994 5.25794V11.5263C134.994 13.8946 133.394 15.5247 130.694 15.5247C129.722 15.5247 128.652 15.3094 127.932 14.8973C128.43 14.3867 128.769 13.9438 128.984 13.6239C129.47 13.79 129.98 13.8762 130.503 13.8762C132.213 13.8762 133.081 12.9288 133.081 11.7354V11.4955C132.472 12.1968 131.592 12.6336 130.54 12.6336C128.523 12.6336 127.003 11.1326 127.003 8.90577C127.003 6.67893 128.664 5.098 130.694 5.098C131.746 5.098 132.662 5.4794 133.271 6.19912L133.333 5.25179H135L134.994 5.25794ZM133.093 8.90577C133.093 7.72468 132.232 6.82657 131.045 6.82657C129.857 6.82657 128.984 7.72468 128.984 8.90577C128.984 10.0868 129.845 10.9542 131.045 10.9542C132.244 10.9542 133.093 10.0561 133.093 8.90577Z",fill:"#001E6C"}),E.createElement("path",{d:"M95.7092 14.9825C95.6354 15.0194 94.2267 15.6407 91.7353 15.5238C90.4374 15.4623 89.3117 15.2224 88.512 15.0009L92.8241 9.99361C93.5931 10.1905 94.5835 10.375 95.7092 10.4304C98.2005 10.5534 99.6092 9.92594 99.683 9.88903L95.7092 14.9886V14.9825ZM89.2686 5.36155C88.5612 2.96863 88.838 1.45537 88.8564 1.3754L84.8457 6.44421C84.8334 6.52418 84.5566 8.03744 85.2578 10.4304C85.6269 11.673 86.1252 12.7126 86.5312 13.4384L90.3759 8.0682C90.0068 7.36693 89.5885 6.44421 89.2686 5.3677V5.36155ZM99.2647 5.89058C98.6988 3.97132 97.813 2.55033 97.4501 2.009L93.8822 6.55494L94.5527 9.77216C94.9526 9.82752 95.3462 9.86443 95.7461 9.88903C95.9491 9.89518 96.1521 9.90134 96.3489 9.90134C98.2805 9.90134 99.357 9.44613 99.4739 9.39076L99.7507 9.26773C99.7753 8.60338 99.7322 7.42844 99.2709 5.88443L99.2647 5.89058ZM97.0256 1.68297C96.4166 1.45537 94.8295 0.932493 92.8303 0.83407C91.2248 0.754101 90.0744 0.987856 89.4347 1.1724L89.3793 1.46767C89.367 1.52919 89.121 2.96248 89.7792 5.20777C89.8899 5.58916 90.0252 5.9644 90.1729 6.33964L93.4577 6.22891L97.0318 1.68912L97.0256 1.68297Z",fill:"#001E6C"})),ia="stigg-watermark",Yl=h(Wl)`
281
- * {
282
- fill: ${({theme:e})=>e.stigg.palette.text.secondary};
283
- }
284
- `,Zl=h.div`
285
- align-self: ${({$alignSelf:e})=>e||"unset"};
286
-
287
- @media (max-width: 1040px) {
288
- ${({$smallScreenAlign:e})=>e&&`align-self: ${e};`}
289
- }
290
- `;function Ke({source:e,showWatermark:n,align:i,smallScreenAlign:r="center",style:t={}}){if(!n)return null;const a=()=>{const s=window.location.hostname.replace("www.","");window.open(`https://www.stigg.io/?utm_source=${s}&utm_medium=referral&utm_campaign=${e}`,"_blank")};return o.jsx(Zl,{$alignSelf:i,$smallScreenAlign:r,className:ia,style:I({cursor:"pointer"},t),onClick:a,children:o.jsx(Yl,{})})}function ra(e,n){return e.pricePoints.some(i=>i.billingPeriod===n)}function Ki(e,n){return e.some(i=>ra(i,n))}function zl(e,n,i){return e.filter(r=>r.pricingType!==b.PricingType.Paid||ra(r,n)).filter(r=>!i||!i({plan:r}))}const Kl=h.div`
291
- color: ${({theme:e})=>e.stigg.palette.text.primary};
292
- display: flex;
293
- align-items: stretch;
294
- justify-content: center;
295
- flex-wrap: wrap;
296
- padding: 10px 0;
297
- gap: ${({theme:e})=>e.stigg.layout.planMargin};
298
- `,Ql=h.div`
299
- display: flex;
300
- flex-direction: column;
301
- align-items: center;
302
-
303
- & * {
304
- box-sizing: border-box;
305
- }
306
- `,Xl=h.div`
307
- display: flex;
308
- flex-direction: column;
309
- align-items: center;
310
- `,Jl=({plans:e,customer:n,currentSubscription:i,highlightedPlanId:r,selectedBillingPeriod:t,onBillingPeriodChanged:a,availableBillingPeriods:s,isCustomerOnTrial:c,onPlanSelected:l,paywallLocale:u,locale:d,shouldHidePlan:p,selectDefaultTierIndex:m,currentSubscriptionOverride:f,hideCompatibleAddons:g,showWatermark:y})=>{const P=ql(e),S=e.some(j=>!!j.description),v=Ki(e,b.BillingPeriod.Monthly),A=Ki(e,b.BillingPeriod.Annually),k=zl(e,t,p),w=D.useCallback((j,O,z)=>l({plan:j,customer:n,subscription:i,intentionType:O,selectedBillingPeriod:t,billableFeatures:z}),[n,t,i,l]),T=!!i&&i.plan.pricingType===b.PricingType.Custom,N=D.useMemo(()=>k.some(j=>{var X;const O=j.pricePoints.filter(me=>me.billingPeriod===t),z=(X=j.paywallCalculatedPricePoints)==null?void 0:X.find(me=>me.billingPeriod===t);return O.length>1&&!!(z!=null&&z.additionalChargesMayApply)}),[t,k]),F=D.useMemo(()=>k.some(j=>!!ea(j,t,u,d,v).unit),[t,v,d,u,k]),U=D.useMemo(()=>!T&&k.some(j=>{const O=Jr({plan:j,billingPeriod:t,currentSubscription:i,currentSubscriptionOverride:f});return Object.values(O).length>0}),[t,i,f,T,k]),L=k.some(j=>j.isCurrentCustomerPlan&&j.trialDaysLeft);return o.jsx(Ql,{className:"stigg-paywall-container",children:o.jsxs(Xl,{className:"stigg-paywall-layout",children:[o.jsx(Vl,{onBillingPeriodChanged:a,selectedBillingPeriod:t,availableBillingPeriods:s,discountRate:P}),o.jsx(Kl,{className:"stigg-paywall-plans-layout",children:k.map(j=>o.jsx(Bl,{withUnitPriceRow:F,withTiersRow:U,withTrialLeftRow:L,shouldShowDescriptionSection:S,hasMonthlyPrice:v,hasAnnuallyPrice:A,plan:j,withStartingAtRow:N,currentSubscription:i,currentSubscriptionOverride:f,billingPeriod:t,isHighlighted:j.id===r,isCustomerOnTrial:c,onPlanSelected:(O,z)=>w(j,O,z),paywallLocale:u,locale:d,customer:n,isCustomerInCustomPlan:T,selectDefaultTierIndex:m,hideCompatibleAddons:g},j.id))}),o.jsx(Ke,{source:"paywall",align:"end",style:{marginTop:16},showWatermark:y})]})})};class eu{error(n,i,...r){console.error(n,i||{},r)}log(n,i){console.log(n,i||{})}debug(n,i){console.debug(n,i||{})}}const Qt=new eu;function tu(e,n,i){const r=e.flatMap(c=>c.pricePoints).map(c=>c.billingPeriod),t=ee.countBy(r),a=ee.uniq(r);let s;if(i&&a.includes(i))s=i;else if(n){const c=n.find(l=>l.status===b.SubscriptionStatus.Active);c&&c.prices.length>0&&(s=c==null?void 0:c.prices[0].billingPeriod)}return s||(s=(t[b.BillingPeriod.Monthly]||0)>(t[b.BillingPeriod.Annually]||0)?b.BillingPeriod.Monthly:b.BillingPeriod.Annually),{defaultBillingPeriod:s,availableBillingPeriods:a}}function nu(e){return oe.utc(e).diff(oe.utc(),"days",!1)+1}const aa={h1:{fontSize:"24px",fontWeight:"bold",semanticElement:"h1"},h2:{fontSize:"16px",fontWeight:"normal",semanticElement:"h2"},h3:{fontSize:"16px",fontWeight:"normal",semanticElement:"h3"},body:{fontSize:"14px",fontWeight:"normal",semanticElement:"p"}};function ke(e,n="px"){if(e)return`${e}${n}`}function vt(e){if(!e)return"normal";switch(e){case b.FontWeight.Normal:return"normal";case b.FontWeight.Bold:return"bold";default:return"normal"}}function Xt(e,n){var r,t,a,s,c,l,u,d;const i=n||{h1:{fontSize:"32px",fontWeight:"bold",semanticElement:"h1"},h2:{fontSize:"24px",fontWeight:"normal",semanticElement:"h2"},h3:{fontSize:"16px",fontWeight:"normal",semanticElement:"h3"},body:{fontSize:"14px",fontWeight:"normal",semanticElement:"p"}};return{fontFamilyUrl:(e==null?void 0:e.fontFamily)||void 0,h1:{fontSize:ke((r=e==null?void 0:e.h1)==null?void 0:r.fontSize)||i.h1.fontSize,fontWeight:vt((t=e==null?void 0:e.h1)==null?void 0:t.fontWeight)||i.h1.fontWeight,semanticElement:i.h1.semanticElement},h2:{fontSize:ke((a=e==null?void 0:e.h2)==null?void 0:a.fontSize)||i.h2.fontSize,fontWeight:vt((s=e==null?void 0:e.h2)==null?void 0:s.fontWeight)||i.h2.fontWeight,semanticElement:i.h2.semanticElement},h3:{fontSize:ke((c=e==null?void 0:e.h3)==null?void 0:c.fontSize)||i.h3.fontSize,fontWeight:vt((l=e==null?void 0:e.h3)==null?void 0:l.fontWeight)||i.h3.fontWeight,semanticElement:i.h3.semanticElement},body:{fontSize:ke((u=e==null?void 0:e.body)==null?void 0:u.fontSize)||i.body.fontSize,fontWeight:vt((d=e==null?void 0:e.body)==null?void 0:d.fontWeight)||i.body.fontWeight,semanticElement:i.body.semanticElement}}}function hn(e){if(e)switch(e){case b.Alignment.Left:return"left";case b.Alignment.Center:return"center";case b.Alignment.Right:return"right";default:return}}function iu(e){const{palette:n,customCss:i,typography:r}=e;return{palette:{primary:(n==null?void 0:n.primary)||void 0,backgroundPaper:(n==null?void 0:n.paywallBackgroundColor)||void 0,outlinedBorder:(n==null?void 0:n.borderColor)||void 0,backgroundHighlight:(n==null?void 0:n.currentPlanBackground)||void 0,text:{primary:(n==null?void 0:n.textColor)||void 0}},typography:Xt(r),customCss:i||void 0}}function ru(e){const{palette:n,layout:i,customCss:r,typography:t}=e;return{customCss:r||void 0,palette:{primary:(n==null?void 0:n.primary)||void 0,backgroundPaper:(n==null?void 0:n.backgroundColor)||void 0,outlinedBorder:(n==null?void 0:n.borderColor)||void 0,backgroundHighlight:(n==null?void 0:n.currentPlanBackground)||void 0,text:{primary:(n==null?void 0:n.textColor)||void 0}},typography:Xt(t),layout:{ctaAlignment:hn(i==null?void 0:i.alignment),headerAlignment:hn(i==null?void 0:i.alignment),descriptionAlignment:hn(i==null?void 0:i.alignment),planMaxWidth:ke(i==null?void 0:i.planWidth),planMinWidth:ke(i==null?void 0:i.planWidth),planMargin:ke(i==null?void 0:i.planMargin),planPadding:ke(i==null?void 0:i.planPadding)}}}function au(e){const{palette:n,typography:i,customCss:r}=e;return{palette:{primary:(n==null?void 0:n.primary)||void 0,backgroundPaper:(n==null?void 0:n.backgroundColor)||void 0,outlinedBorder:(n==null?void 0:n.borderColor)||void 0,text:{primary:(n==null?void 0:n.textColor)||void 0},backgroundHighlight:(n==null?void 0:n.summaryBackgroundColor)||void 0},typography:Xt(i,aa),customCss:r||void 0}}function ou(e){let n=!0,i=(e==null?void 0:e.find(a=>a.status===b.SubscriptionStatus.InTrial))||null,r=i==null?void 0:i.plan;const t=i!=null&&i.trialEndDate?nu(i.trialEndDate):void 0;return r||(n=!1,i=(e==null?void 0:e.find(a=>a.status===b.SubscriptionStatus.Active))||null,r=i==null?void 0:i.plan),{currentSubscription:i,currentPlan:r,isCustomerOnTrial:n,trialDaysLeft:t}}function su(e,n,i){var k,w;const{plans:r,currency:t,configuration:a,customer:s,activeSubscriptions:c,paywallCalculatedPricePoints:l}=e||{},{currentSubscription:u,currentPlan:d,isCustomerOnTrial:p,trialDaysLeft:m}=ou(c),f=i==null?void 0:i({currentSubscription:u}),g=(u==null?void 0:u.scheduledUpdates)||[],y=(k=u==null?void 0:u.price)==null?void 0:k.billingPeriod,P=g.find(({subscriptionScheduleType:T})=>T===b.SubscriptionScheduleType.Downgrade),S=g.find(({subscriptionScheduleType:T})=>T===b.SubscriptionScheduleType.BillingPeriod);let v=Gt(r,T=>T.order).map(T=>{var L;const N=(L=s==null?void 0:s.eligibleForTrial)==null?void 0:L.find(j=>j.productId===T.product.id),F=f!=null&&f.planId?(f==null?void 0:f.planId)===T.id:T.id===(d==null?void 0:d.id),U=j=>{var me;const O=P==null?void 0:P.scheduleVariables,z=S==null?void 0:S.scheduleVariables,X=T.pricePoints.some(xe=>xe.billingPeriod===j);return P?((me=P.targetPackage)==null?void 0:me.refId)===T.id&&(!X||O.billingPeriod===j):S&&F?z.billingPeriod===j:!1};return _(I({},T),{paywallCalculatedPricePoints:l==null?void 0:l.filter(j=>j.planId===T.id),isTriable:!De(T.defaultTrialConfig)&&(!N||N.eligible),isCurrentCustomerPlan:F,currentCustomerPlanBillingPeriod:y,isUpcomingPlan:!1,trialDaysLeft:m,isNextPlan:U,paywallCurrency:t,scheduledUpdate:P||S})});if(r&&d){const T=d&&((w=r==null?void 0:r.find(N=>N.id===(d==null?void 0:d.id)))==null?void 0:w.order);De(T)||(v=v.map(N=>_(I({},N),{isLowerThanCurrentPlan:T>N.order})),n&&(v=v.filter(N=>N.order>=T)))}const A=a?ru(a):void 0;return{currentPlan:d,currentSubscription:u,currentSubscriptionOverride:f,isCustomerOnTrial:p,plans:v,paywallConfiguration:A}}const cu="7.7.1-beta.1",lu="@stigg/react-sdk",Jt=D.createContext(null);Jt.displayName="StiggContext";const uu="en-US",du=({apiKey:e,baseUri:n,baseEdgeUri:i,enableEdge:r,customerId:t,customerToken:a,resourceId:s,theme:c,locale:l,cacheTtlMs:u,useEntitlementPolling:d,entitlementPollingInterval:p,entitlementsFallback:m,stiggClient:f,children:g,offline:y,clientName:P=lu,clientVersion:S=cu})=>{const v=D.useRef(e),A={apiKey:e,customerId:t,customerToken:a,resourceId:s,baseUri:n,baseEdgeUri:i,enableEdge:r,entitlementsFallback:m,cacheTtlMs:u,useEntitlementPolling:d,entitlementPollingInterval:p,clientName:P,clientVersion:S,offline:y},[k,w]=D.useState(()=>({stigg:f!=null?f:b.initialize(_(I({},A),{lazyLoad:!0})),locale:l||uu,isInitialized:!1,theme:c,refreshData:()=>B(null,null,function*(){w(T=>_(I({},T),{customerPortalUpdatedAt:new Date})),yield k.stigg.refresh()})}));return D.useEffect(()=>{let T=!0;const N=j=>{T&&w(j)},F=()=>N(j=>_(I({},j),{updatedAt:new Date})),U=j=>N(O=>(O.stigg&&O.stigg.removeListener("entitlementsUpdated",F),j.addListener("entitlementsUpdated",F),_(I({},O),{stigg:j,isInitialized:!0,updatedAt:new Date})));return B(null,null,function*(){let j=k.stigg;e!==v.current&&(Qt.log("Updating stigg client",{apiKey:e}),v.current=e,j=b.initialize(I({},A)),N(O=>_(I({},O),{isInitialized:!1,updatedAt:new Date}))),yield j.waitForInitialization(),U(j)}),()=>{T=!1,k.stigg.removeListener("entitlementsUpdated",F),k.stigg.clearCustomer()}},[e]),D.useEffect(()=>{const T=k.stigg;t?T.setCustomerId(t,a,s):T.clearCustomer()},[t,a,s]),D.useEffect(()=>{w(T=>_(I({},T),{theme:c}))},[c]),o.jsx(Jt.Provider,{value:k,children:o.jsx(H.SkeletonTheme,{baseColor:"#F5F6F9",highlightColor:"#e5e6ea",children:g})})};function q(e){const{optional:n}=e||{},i=D.useContext(Jt);if(!i&&!n)throw new Error("Could not find Stigg context; You need to wrap your app in an <StiggProvider> component.");return i}function mu({productId:e,resourceId:n,showOnlyEligiblePlans:i,billingCountryCode:r,preferredBillingPeriod:t,currentSubscriptionOverrideFn:a}){const{stigg:s,locale:c}=q(),[l,u]=D.useState(b.BillingPeriod.Annually),[d,p]=D.useState([]),[m,f]=D.useState(null),[g,y]=D.useState(!0);D.useEffect(()=>{B(null,null,function*(){try{y(!0),yield s.waitForInitialization();const v=yield s.getPaywall({productId:e,resourceId:n,billingCountryCode:r}),{availableBillingPeriods:A,defaultBillingPeriod:k}=tu(v.plans,v.activeSubscriptions,t);f(v),p(A),u(k)}catch(v){Qt.error(`Failed to load paywall ${v==null?void 0:v.message}`,v)}finally{y(!1)}})},[s,e,s.isCustomerLoaded,r,n,t]);const P=su(m,i,a);return I({customer:(m==null?void 0:m.customer)||null,isLoading:g,selectedBillingPeriod:l,setSelectedBillingPeriod:u,availableBillingPeriods:d,locale:c,configuration:P.paywallConfiguration,showWatermark:s.getShowWatermark()},P)}function gu(e){return ft({highlightChip:"Recommended",addonsTitle:"Available add-ons:",planCTAButton:{upgrade:"Upgrade",downgrade:"Downgrade",startTrial:i=>{var r;return`Start ${(r=i.defaultTrialConfig)==null?void 0:r.duration} day trial`},custom:"Contact us",currentPlan:"Current plan",startNew:"Get started",switchToBillingPeriod:i=>i===b.BillingPeriod.Monthly?"Switch to monthly billing":"Switch to annual billing",cancelScheduledUpdate:"Cancel"},price:{startingAtCaption:"Starts at",pricePeriod:i=>i===b.BillingPeriod.Monthly?"/ month":"/ year",free:i=>({price:`${i==null?void 0:i.symbol}0`}),custom:"Custom",priceNotSet:"Price not set"}},e)}const pu=e=>E.createElement("svg",I({width:15,height:11,viewBox:"0 0 15 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M5.59 7.9899L2.125 4.5249C1.73524 4.13514 1.10365 4.13402 0.712509 4.52241V4.52241C0.319409 4.91274 0.318286 5.54819 0.710005 5.9399L5.59 10.8199L14.2948 2.11513C14.6843 1.72565 14.6843 1.09417 14.2948 0.704691V0.704691C13.9055 0.315381 13.2743 0.315184 12.8848 0.70425L5.59 7.9899Z",fill:"#B2BBD3"})),fu=h.div`
311
- display: flex;
312
- flex-direction: column;
313
- align-items: center;
314
- `,yn=h(pu)`
315
- margin-right: 16px;
316
- `,hu=h.div`
317
- display: flex;
318
- flex-direction: column;
319
- align-items: flex-start;
320
- gap: 20px;
321
- border-radius: 10px;
322
- padding: ${({theme:e})=>e.stigg.layout.planPadding};
323
- background-color: ${({theme:e})=>e.stigg.palette.backgroundPaper};
324
- min-width: ${({theme:e})=>e.stigg.layout.planMinWidth};
325
- max-width: ${({theme:e})=>e.stigg.layout.planMaxWidth};
326
- min-height: 450px;
327
- border: ${({theme:e})=>`1px solid ${e.stigg.palette.outlinedBorder}`};
328
- `,yu=h.div`
329
- display: flex;
330
- gap: ${({theme:e})=>e.stigg.layout.planMargin};
331
- flex-wrap: wrap;
332
- justify-content: center;
333
- `,Cn=h.div`
334
- display: flex;
335
- align-items: center;
336
- margin-bottom: 12px;
337
- `,Cu=h.div`
338
- margin-top: auto;
339
- `,bu=h.div`
340
- width: 150px;
341
- margin-bottom: ${({theme:e})=>e.stigg.layout.switchBottomSpacing};
342
- padding: 12px 12px;
343
- border-radius: 10px;
344
- background-color: white;
345
- border: ${({theme:e})=>`1px solid ${e.stigg.palette.outlinedBorder}`};
346
- `;function bn(){return o.jsxs(hu,{children:[o.jsx(H,{width:120,borderRadius:4}),o.jsx(H,{circle:!0,width:40,height:40}),o.jsx(H,{style:{marginBottom:33},width:120,borderRadius:4}),o.jsxs(Cn,{children:[o.jsx(yn,{}),o.jsx(H,{width:120,borderRadius:4})]}),o.jsxs(Cn,{children:[o.jsx(yn,{}),o.jsx(H,{width:120,borderRadius:4})]}),o.jsxs(Cn,{children:[o.jsx(yn,{}),o.jsx(H,{width:120,borderRadius:4})]}),o.jsx(Cu,{children:o.jsx(H,{height:50,borderRadius:4})})]})}function Eu(){return o.jsxs(fu,{className:"stigg-skeleton-loader-container",children:[o.jsx(bu,{className:"stigg-skeleton-loader-billing-period",children:o.jsx(H,{borderRadius:4})}),o.jsxs(yu,{className:"stigg-skeleton-loader-plans-container",children:[o.jsx(bn,{}),o.jsx(bn,{}),o.jsx(bn,{})]})]})}const Pu=({externalFontUrl:e})=>o.jsx(Vr,{styles:Ie`
347
- ${e&&`
348
- @font-face {
349
- font-family: 'custom-font';
350
- font-style: normal;
351
- font-weight: normal;
352
- src: local('custom-font'), url(${e}) format('woff');
353
- }
354
- `}
355
-
356
- /* latin-ext */
357
- @font-face {
358
- font-family: 'DM Sans';
359
- font-style: normal;
360
- font-weight: 400;
361
- font-display: swap;
362
- src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Hp2ywxg089UriCZ2IHTWEBlwu8Q.woff2) format('woff2');
363
- unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,
364
- U+A720-A7FF;
365
- }
366
- /* latin */
367
- @font-face {
368
- font-family: 'DM Sans';
369
- font-style: normal;
370
- font-weight: 400;
371
- font-display: swap;
372
- src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Hp2ywxg089UriCZOIHTWEBlw.woff2) format('woff2');
373
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,
374
- U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
375
- }
376
- /* latin-ext */
377
- @font-face {
378
- font-family: 'DM Sans';
379
- font-style: normal;
380
- font-weight: 500;
381
- font-display: swap;
382
- src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriAWCrCBamC3YU-CnE6Q.woff2) format('woff2');
383
- unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,
384
- U+A720-A7FF;
385
- }
386
- /* latin */
387
- @font-face {
388
- font-family: 'DM Sans';
389
- font-style: normal;
390
- font-weight: 500;
391
- font-display: swap;
392
- src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriAWCrCBimC3YU-Ck.woff2) format('woff2');
393
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,
394
- U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
395
- }
396
- /* latin-ext */
397
- @font-face {
398
- font-family: 'DM Sans';
399
- font-style: normal;
400
- font-weight: 700;
401
- font-display: swap;
402
- src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriASitCBamC3YU-CnE6Q.woff2) format('woff2');
403
- unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,
404
- U+A720-A7FF;
405
- }
406
- /* latin */
407
- @font-face {
408
- font-family: 'DM Sans';
409
- font-style: normal;
410
- font-weight: 700;
411
- font-display: swap;
412
- src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriASitCBimC3YU-Ck.woff2) format('woff2');
413
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,
414
- U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
415
- }
416
- `}),Su=h.div`
417
- ${({$customCss:e})=>e&&Ie`
418
- ${e}
419
- `}
420
- `;function en(e){const{theme:n}=q(),i=ft(e,n);return Hc(i)}const Du=e=>({primary:{main:e.palette.primary}}),$e=({children:e,componentTheme:n})=>{const i=en(n),r=Du(i),t=ln.createTheme({palette:r,stigg:i});return o.jsx(ln.ThemeProvider,{theme:{[ln.THEME_ID]:t},children:o.jsx(Zs,{theme:{stigg:i},children:o.jsxs(Su,{$customCss:i.customCss,children:[o.jsx(Pu,{externalFontUrl:i.typography.fontFamilyUrl}),e]})})})},Qe=D.createContext(null);Qe.displayName="CustomerPortalContext";const ve=()=>{const e=D.useContext(Qe);if(!e)throw new Error("Could not find Customer portal context; You need to wrap your customer portal components in an <CustomerPortalProvider> component.");return e};function Qn(e){return!!D.useContext(e)}const vu=({productId:e,resourceId:n,highlightedPlanId:i,showOnlyEligiblePlans:r,textOverrides:t,onPlanSelected:a,preferredBillingPeriod:s,onBillingPeriodChange:c,billingCountryCode:l,shouldHidePlan:u,selectDefaultTierIndex:d,currentSubscriptionOverride:p,hideCompatibleAddons:m})=>{const f=Qn(Qe);let g=!1;if(f){const{isLoading:X,resourceId:me}=ve();g=X,n=me}const{plans:y,customer:P,currentSubscription:S,currentSubscriptionOverride:v,isCustomerOnTrial:A,isLoading:k,selectedBillingPeriod:w,setSelectedBillingPeriod:T,availableBillingPeriods:N,locale:F,configuration:U,showWatermark:L}=mu({productId:e,resourceId:n,showOnlyEligiblePlans:r,billingCountryCode:l,preferredBillingPeriod:s,currentSubscriptionOverrideFn:p}),j=gu(t),O=X=>{T(X),c&&c(X)},z=!y||k||g?o.jsx(Eu,{}):o.jsx(Jl,{plans:y,customer:P,currentSubscription:S,currentSubscriptionOverride:v,selectedBillingPeriod:w,onBillingPeriodChanged:O,availableBillingPeriods:N,highlightedPlanId:i,isCustomerOnTrial:A,onPlanSelected:a,paywallLocale:j,locale:F,shouldHidePlan:u,selectDefaultTierIndex:d,hideCompatibleAddons:m,showWatermark:L});return f?z:o.jsx($e,{componentTheme:U,children:z})};function xu({resourceId:e,productId:n}){const{stigg:i,customerPortalUpdatedAt:r}=q(),[t,a]=D.useState(!1),[s,c]=D.useState();return D.useEffect(()=>{B(null,null,function*(){if(i.isCustomerLoaded)try{a(!0);const u=yield i.getCustomerPortal({resourceId:e,productId:n});c(u)}catch(u){Qt.error(`Failed to load customer portal ${u==null?void 0:u.message}`,u)}finally{a(!1)}})},[i,i.isCustomerLoaded,r,e,n]),{customerPortal:s,showWatermark:i.getShowWatermark(),isLoading:t}}function Iu(e){return ft({manageSubscription:"Manage",usageTabTitle:"Usage",addonsTabTitle:"Add-ons",promotionsTabTitle:"Promotions",promotionsSubtitle:"You were granted access to additional functionality at no additional cost.",contactSupportTitle:"Have questions about your subscription?",contactSupportLink:"Contact support",editBilling:"Edit billing details",invoicesTitle:"Invoices",viewInvoiceHistory:"View invoice history",editPaymentDetails:"Edit",paywallSectionTitle:"Plans",cancelScheduledUpdatesButtonTitle:"Cancel"},e)}function Tu(e,n,i){var t,a,s,c;return{sectionTitleColor:(n==null?void 0:n.sectionTitleColor)||e.palette.text.secondary,planNameColor:(n==null?void 0:n.planNameColor)||e.palette.text.primary,backgroundColor:(n==null?void 0:n.backgroundColor)||((t=i==null?void 0:i.palette)==null?void 0:t.backgroundColor)||"white",borderColor:(n==null?void 0:n.borderColor)||((a=i==null?void 0:i.palette)==null?void 0:a.borderColor)||"rgba(0, 30, 108, 0.15)",listItemBackgroundColor:(n==null?void 0:n.backgroundColor)||((s=i==null?void 0:i.palette)==null?void 0:s.backgroundColor)||"white",tabMaxHeight:(n==null?void 0:n.tabMaxHeight)||"380px",iconsColor:(n==null?void 0:n.iconsColor)||((c=i==null?void 0:i.palette)==null?void 0:c.iconsColor)||void 0,iconsBackgroundColor:n==null?void 0:n.iconsBackgroundColor}}function oa({children:e,textOverrides:n,theme:i,resourceId:r,productId:t}){const{customerPortalUpdatedAt:a}=q(),{customerPortal:s,isLoading:c,showWatermark:l}=xu({resourceId:r,productId:t}),u=s!=null&&s.configuration?iu(s.configuration):void 0,d=en(u),p=Tu(d,i,s==null?void 0:s.configuration),m=Iu(n);return o.jsx($e,{componentTheme:u,children:o.jsx(Qe.Provider,{value:{customerPortal:s,isLoading:c,showWatermark:l,textOverrides:m,theme:p,resourceId:r},children:e},a==null?void 0:a.toString())})}const tn=h(we)`
421
- border-radius: 10px;
422
- padding: 8px 16px;
423
- text-transform: none;
424
-
425
- &,
426
- &:hover {
427
- border-color: ${({theme:e})=>e.stigg.palette.outlinedRestingBorder};
428
- }
429
- `,Au=e=>E.createElement("svg",I({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.3333 2.5L17.5 6.66667L6.66667 17.5H2.5V13.3333L13.3333 2.5V2.5Z",stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),yt=h.div`
430
- display: flex;
431
- align-items: center;
432
- justify-content: space-between;
433
-
434
- ${({$disableMargin:e})=>!e&&`
435
- &:not(:last-child) {
436
- margin-bottom: 32px;
437
- }
438
- `};
439
- `;function Ct({title:e,className:n,isLoading:i}){const{theme:r}=ve();return i?o.jsx(H,{width:120}):o.jsx(C,{className:n,overrideColor:r.sectionTitleColor,variant:"h3",bold:!0,children:e})}var nn=(e=>(e.MANAGE_SUBSCRIPTION="MANAGE_SUBSCRIPTION",e.UPGRADE_PLAN="UPGRADE_PLAN",e.UPGRADE_TRIAL_PLAN="UPGRADE_TRIAL_PLAN",e))(nn||{});const ku=h(Au)`
440
- path {
441
- stroke: ${({theme:e})=>e.stigg.palette.primary};
442
- }
443
- `;function Nu({onManageSubscription:e,hideManageButton:n,textOverrides:i}){return o.jsxs(yt,{className:"stigg-customer-portal-overview-header",$disableMargin:!0,children:[o.jsx(Ct,{title:"Subscription",className:"stigg-overview-title"}),!n&&o.jsxs(tn,{className:"stigg-manage-subscription-button",variant:"outlined",onClick:()=>e({intentionType:nn.MANAGE_SUBSCRIPTION}),children:[o.jsx(ku,{className:"stigg-manage-subscription-button-image"}),o.jsx(C,{className:"stigg-manage-subscription-button-text",color:"primary.main",style:{marginLeft:"8px"},variant:"body1",children:i==null?void 0:i.manageSubscription})]})]})}function sa(){const{customerPortal:e}=ve(),n=kr(e==null?void 0:e.subscriptions,i=>i.addons);return _n(n)?null:o.jsx("div",{className:"stigg-addons-list-layout",children:n.map((i,r)=>o.jsxs(C,{as:"span",className:"stigg-addon-list-item-text",variant:"body1",children:[i.quantity>1&&`${i.quantity} X `,i.displayName,r===n.length-1?"":", "]},i.addonId))})}const Qi=h.div`
444
- display: flex;
445
- justify-content: space-between;
446
- align-items: center;
447
- gap: 64px;
448
- border-bottom: ${({$borderColor:e})=>`1px solid ${e}`};
449
- padding: 16px 0;
450
-
451
- & > *:first-of-type {
452
- max-width: 60%;
453
- }
454
- `;function wu(e){var t;const{displayName:n,usageLimit:i,hasUnlimitedUsage:r}=e;return r?`Unlimited ${n}`:i?`${n} x ${(t=e.usageLimit)==null?void 0:t.toLocaleString()}`:n}function ca(){const{customerPortal:e,textOverrides:n,theme:i}=ve(),r=e==null?void 0:e.promotionalEntitlements;return o.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[o.jsx(C,{color:"secondary",children:n.promotionsSubtitle}),o.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[o.jsxs(Qi,{$borderColor:i.borderColor,children:[o.jsx(C,{variant:"body1",bold:!0,children:"Feature"}),o.jsx(C,{variant:"body1",bold:!0,children:"Expiration date"})]}),r==null?void 0:r.map((t,a)=>o.jsxs(Qi,{$borderColor:i.borderColor,children:[o.jsx(C,{variant:"body1",children:wu(t)}),o.jsx(C,{variant:"body1",color:"disabled",children:t.endDate?oe.utc(t.endDate).format("MMM Do, YYYY"):"None"})]},`${t.displayName}-${a}`))]})]})}const Fu=h(Uo)`
455
- .MuiTabs-indicator {
456
- background-color: #001e6c;
457
- }
458
- `,ju=h.div`
459
- width: 100%;
460
- flex: 1;
461
- margin-top: 16px;
462
- `,Ru=h(Q)`
463
- margin-top: 16px;
464
- max-height: ${({$maxHeight:e})=>e};
465
- overflow-y: auto;
466
- `;h.div`
467
- display: flex;
468
- flex-direction: column;
469
- padding: 24px;
470
- border: ${({$borderColor:e})=>`1px solid ${e}`};
471
- border-radius: 10px;
472
- margin-bottom: 16px;
473
- row-gap: 16px;
474
- background-color: ${({$backgroundColor:e})=>e};
475
- `;function Xi(e){const s=e,{children:n,value:i,index:r,maxHeight:t}=s,a=se(s,["children","value","index","maxHeight"]);return o.jsx("div",_(I({role:"tabpanel",hidden:i!==r},a),{children:i===r&&o.jsx(Ru,{$maxHeight:t,children:n})}))}function Ji({isSelected:e,label:n,icon:i}){const r=e?"primary":"secondary";return o.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[o.jsx(fe,{icon:i,svgStrokeColor:r}),o.jsx(C,{variant:"h6",bold:e,color:r,children:n})]})}function Mu({customerPortal:e,hiddenSections:n,textOverrides:i,theme:r}){const t=kr(e.subscriptions,m=>m.addons),a=m=>n==null?void 0:n.some(f=>f===m),s=t.length>0&&!a("addons"),c=e.promotionalEntitlements.length>0&&!a("promotionalEntitlements"),[l,u]=D.useState(s?1:2),d=(m,f)=>{u(f)};return s||c?o.jsxs(ju,{children:[o.jsx(Q,{sx:{borderBottom:1,borderColor:"divider"},children:o.jsxs(Fu,{value:l,onChange:d,children:[s?o.jsx(Di,{sx:{textTransform:"none"},value:1,label:o.jsx(Ji,{isSelected:l===1,label:i.addonsTabTitle,icon:"Addons"})}):null,c?o.jsx(Di,{sx:{textTransform:"none"},value:2,label:o.jsx(Ji,{isSelected:l===2,label:i.promotionsTabTitle,icon:"Promotions"})}):null]})}),o.jsx(Xi,{value:l,index:1,maxHeight:r.tabMaxHeight,children:o.jsx(sa,{})}),o.jsx(Xi,{value:l,index:2,maxHeight:r.tabMaxHeight,children:o.jsx(ca,{})})]}):null}const la={xs:320,sm:640,md:768,lg:1024,xl:1280,xxl:1536},ua=e=>`(min-width: ${la[e]}px)`,Se=Object.keys(la).reduce((e,n)=>_(I({},e),{[n]:`@media ${ua(n)}`}),{});function Ge(e){return K.useMediaQuery(ua(e))}const Uu=h.div`
476
- display: flex;
477
- justify-content: space-between;
478
- flex-wrap: wrap;
479
- `,Ou=h.div`
480
- display: flex;
481
- flex-direction: column;
482
- gap: 32px;
483
- `;function Lu(){const e=Ge("md");return o.jsxs(Uu,{className:"stigg-subscription-overview-skeleton-layout",children:[o.jsxs(Ou,{children:[o.jsx(H,{width:120}),o.jsx(H,{width:120})]}),o.jsx(H,{width:e?295:260,height:193})]})}function Bu({scheduleUpdate:e}){const{targetPackage:n}=e;return o.jsxs(R,{container:!0,alignItems:"center",children:[o.jsx(R,{children:o.jsx(Oe.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})}),o.jsx(R,{item:!0,children:o.jsxs(C,{className:"stigg-scheduled-updates-description",variant:"body1",children:["Downgrade to the ",o.jsx("b",{children:n==null?void 0:n.displayName})," plan"]})})]})}function _u({scheduleUpdate:e}){const{scheduleVariables:n}=e,{billingPeriod:i}=n,r=i===b.BillingPeriod.Monthly?"annually":"monthly",t=i===b.BillingPeriod.Monthly?"monthly":"annually";return o.jsxs(R,{container:!0,alignItems:"center",children:[o.jsx(R,{children:o.jsx(Oe.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})}),o.jsx(R,{item:!0,children:o.jsxs(C,{className:"stigg-scheduled-updates-description",variant:"body1",children:["Change from an ",r," to a ",o.jsx("b",{children:t})," billing cycle"]})})]})}function $u({subscription:e,scheduleUpdate:n}){const{scheduleVariables:i}=n,{newUnitAmount:r,featureId:t}=i,s=ee.compact(e.prices.map(({feature:d})=>d)).find(d=>d.id===t);if(!s)return null;const{featureUnits:c,featureUnitsPlural:l}=s,u=r===1?c:l;return o.jsxs(R,{container:!0,alignItems:"flex-start",flexWrap:"nowrap",children:[o.jsx(R,{children:o.jsx(Oe.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})}),o.jsx(R,{item:!0,children:o.jsxs(C,{className:"stigg-scheduled-updates-description",variant:"body1",children:["Reduce the ",o.jsx("b",{children:c})," quantity to ",r," ",u]})})]})}function Gu({scheduleUpdate:e,subscription:n}){switch(e.subscriptionScheduleType){case b.SubscriptionScheduleType.Downgrade:return o.jsx(Bu,{scheduleUpdate:e});case b.SubscriptionScheduleType.BillingPeriod:return o.jsx(_u,{scheduleUpdate:e});case b.SubscriptionScheduleType.UnitAmount:return o.jsx($u,{scheduleUpdate:e,subscription:n});default:return null}}const Vu=h(Q)`
484
- border-bottom: ${({$borderColor:e})=>`1px solid ${e}`};
485
- border-top-left-radius: 10px;
486
- border-top-right-radius: 10px;
487
- margin: -64px -64px 64px -64px;
488
- padding: 24px 32px;
489
- `,Hu=h(vr)`
490
- margin-left: 4px;
491
- `,qu=h(Zr)`
492
- color: ${({theme:e})=>e.stigg.palette.primary};
493
- path {
494
- fill: ${({theme:e})=>e.stigg.palette.primary};
495
- }
496
- `;function Wu({subscription:e}){const{scheduledUpdates:n}=e;return o.jsxs(o.Fragment,{children:[o.jsx(R,{container:!0,alignItems:"center",justifyContent:"space-between",gap:1,children:o.jsx(R,{children:o.jsx(C,{className:"stigg-scheduled-updates-description",variant:"body1",children:"The following updates will take effect in the next billing cycle:"})})}),o.jsx(R,{children:(n||[]).map(i=>o.jsx(Gu,{scheduleUpdate:i,subscription:e},i.subscriptionScheduleType))})]})}function Yu({subscription:e}){const{scheduledUpdates:n}=e,[i]=n||[],{line1:r,line2:t}=Kr({scheduledUpdate:i,subscriptionPrices:e.prices,billingPeriodRange:e.billingPeriodRange,options:{postfix:"at the end of the current billing period"}});return o.jsxs(o.Fragment,{children:[o.jsx(R,{container:!0,alignItems:"center",justifyContent:"space-between",gap:1,children:o.jsx(R,{children:o.jsx(C,{className:"stigg-scheduled-updates-title",variant:"body1",color:"primary",children:r})})}),t&&o.jsx(R,{children:o.jsx(C,{className:"stigg-scheduled-updates-subtitle",variant:"body1",color:"secondary",children:t})})]})}function Zu({subscription:e,onCancelScheduledUpdates:n,theme:i,cancelScheduledUpdatesButtonTitle:r}){const t=zt(),[a,s]=D.useState(!1),{scheduledUpdates:c}=e;if(!c||c.length===0)return null;const l=c.length===1;return o.jsx(Vu,{$borderColor:i.borderColor,className:"stigg-scheduled-updates-alert-container",children:o.jsxs(R,{container:!0,alignItems:l?"center":"flex-start",gap:2,children:[o.jsx(R,{item:!0,display:"flex",children:o.jsx(fe,{icon:"ScheduleBox",svgPathColor:i.iconsColor,svgRectColor:i.iconsBackgroundColor})}),o.jsx(R,{item:!0,flex:1,children:l?o.jsx(Yu,{subscription:e}):o.jsx(Wu,{subscription:e})}),!!n&&o.jsx(R,{item:!0,children:o.jsxs(tn,{variant:"outlined",onClick:()=>{s(!0),Promise.resolve(n(e)).finally(()=>s(!1))},children:[a?o.jsx(Hu,{loading:!0,size:16,color:t.stigg.palette.text.disabled}):o.jsx(qu,{style:{display:"flex",marginRight:4},className:"stigg-scheduled-updates-cancel-update-button-icon"}),o.jsx(C,{variant:"body1",color:"primary.main",className:"stigg-scheduled-updates-cancel-update-button",children:r})]})})]})})}const bt=h.div`
497
- width: 100%;
498
- display: flex;
499
- flex-direction: column;
500
- border-radius: 10px;
501
- background-color: ${({$backgroundColor:e})=>e};
502
- border: ${({$borderColor:e})=>`1px solid ${e}`};
503
-
504
- padding: 16px;
505
- ${Se.sm} {
506
- padding: 32px;
507
- }
508
- ${Se.md} {
509
- padding: 48px;
510
- }
511
- ${Se.lg} {
512
- padding: 64px;
513
- }
514
- `;function zu({billingPeriod:e,rangeEnd:n,amount:i,currency:r}){return o.jsxs(o.Fragment,{children:[o.jsx(C,{variant:"h6",children:"Next estimated bill"}),o.jsx(C,{variant:"h1",children:re({amount:i,currency:r,maximumFractionDigits:2})}),o.jsxs(C,{as:"div",variant:"body1",color:"secondary",children:["Billed ",e===b.BillingPeriod.Monthly?"monthly":"annually"," on"," ",o.jsx(C,{variant:"body1",as:"span",color:"primary",children:oe.utc(n).format("MMM Do, YYYY")})]}),o.jsx(C,{variant:"body1",color:"secondary",children:"* Additional tax rates may apply"})]})}function En({description:e}){return o.jsxs(o.Fragment,{children:[o.jsx(C,{variant:"h6",color:"secondary",children:"No upcoming bill"}),o.jsx(C,{variant:"body1",color:"secondary",children:e})]})}const Ku=h.div`
515
- display: flex;
516
- flex-direction: column;
517
- align-items: left;
518
- gap: 8px;
519
- `,Qu=h(we)`
520
- width: fit-content;
521
- &.MuiButton-root {
522
- padding: 0;
523
- &:hover {
524
- background: none;
525
- }
526
- }
527
- `;function Xu({onContactSupport:e,label:n,linkLabel:i}){const r=o.jsx(C,{color:e?"primary.main":"secondary",children:i});return o.jsxs(Ku,{className:"stigg-contact-support-layout",children:[o.jsx(C,{className:"stigg-contact-support-label",color:"secondary",children:n}),e?o.jsx(Qu,{className:"stigg-contact-support-button",style:{textTransform:"none"},variant:"text",onClick:e,children:r}):r]})}const Ju=h.div`
528
- max-height: 278px;
529
- display: flex;
530
- flex-direction: column;
531
- border-radius: 10px;
532
- background-color: ${({theme:e})=>e.stigg.palette.backgroundSection};
533
- border: ${({$borderColor:e})=>`1px solid ${e}`};
534
- padding: 32px;
535
- gap: 16px;
536
- `;function ed({subscription:e,theme:n,textOverrides:i,onContactSupport:r}){var l,u,d,p,m,f,g;const{pricingType:t}=e;let a;const s=(u=(l=e.prices)==null?void 0:l.every(y=>y.billingModel!==b.BillingModel.UsageBased))!=null?u:!0,c=(d=e.scheduledUpdates)==null?void 0:d.find(({subscriptionScheduleType:y,targetPackage:P})=>y===b.SubscriptionScheduleType.Downgrade&&(P==null?void 0:P.pricingType)===b.PricingType.Free);if(t===b.PricingType.Free)a=o.jsx(En,{description:"You're on a free plan, so you don’t have any upcoming charges"});else if(t===b.PricingType.Paid)if(c&&s)a=o.jsx(En,{description:"Your plan will be downgraded to a free plan, so you don’t have any upcoming charges"});else if(e.status===b.SubscriptionStatus.InTrial)a=o.jsx(En,{description:`You’re on a free trial of the ${e.planName} plan, so you don’t have any upcoming charges`});else{const y=(m=(p=e.prices)==null?void 0:p[0])==null?void 0:m.billingPeriod,P=(f=e.billingPeriodRange)==null?void 0:f.end,S=(g=e.totalPrice)==null?void 0:g.total;y&&P&&S&&(a=o.jsx(zu,{billingPeriod:y,rangeEnd:P,amount:S.amount,currency:S.currency}))}else t===b.PricingType.Custom&&(a=o.jsx(Xu,{onContactSupport:r,label:i.contactSupportTitle,linkLabel:i.contactSupportLink}));return o.jsx(Ju,{className:"stigg-subscription-total-price-layout",$borderColor:n.borderColor,children:a})}const td=e=>E.createElement("svg",I({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("path",{d:"M12.9469 13.5999H11.9344L11.935 10.7756C11.935 10.6288 11.87 10.4819 11.7557 10.3838L8.62061 7.91816L11.755 5.4532C11.8694 5.35507 11.9344 5.22444 11.9344 5.06132L11.935 2.40004H12.9475C13.225 2.40004 13.4375 2.18755 13.4375 1.91004C13.4375 1.63254 13.225 1.42004 12.9475 1.42004L3.05311 1.42067C2.77561 1.42067 2.56311 1.63316 2.56311 1.91067C2.56311 2.18817 2.77561 2.40067 3.05311 2.40067H4.06561L4.06498 5.06131C4.06498 5.20818 4.12998 5.35505 4.24436 5.45318L7.36244 7.91814L4.245 10.3837C4.13062 10.4819 4.06562 10.6125 4.06562 10.7756V13.5999H3.05313C2.77562 13.5999 2.56313 13.8124 2.56313 14.0899C2.56313 14.3674 2.77562 14.5799 3.05313 14.5799H12.9469C13.2244 14.5799 13.4369 14.3674 13.4369 14.0899C13.4369 13.8124 13.2244 13.5999 12.9469 13.5999ZM5.04498 2.39995H10.9551V4.81627L8.00002 7.16747L5.04498 4.81627V2.39995ZM5.04498 11.0206L8.00002 8.66939L10.9551 11.0044V13.5838H5.04498V11.0206Z",fill:"white"}),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.05303 1.25404L12.9474 1.25342C13.317 1.25342 13.6041 1.54053 13.6041 1.91008C13.6041 2.27964 13.317 2.56675 12.9474 2.56675H12.1016L12.101 5.06136V5.06136C12.101 5.2747 12.0135 5.45101 11.8635 5.57973L11.8581 5.58436L8.89014 7.9182L11.8642 10.2572C12.0164 10.3878 12.1016 10.5814 12.1016 10.7757L12.101 13.4333H12.9468C13.3164 13.4333 13.6035 13.7204 13.6035 14.09C13.6035 14.4595 13.3164 14.7466 12.9468 14.7466H3.05304C2.68349 14.7466 2.39638 14.4595 2.39638 14.09C2.39638 13.7204 2.68349 13.4333 3.05304 13.4333H3.89887V10.7757C3.89887 10.5623 3.98635 10.386 4.13639 10.2573L4.14144 10.253L7.09365 7.91821L4.13566 5.57982C3.98346 5.44923 3.89823 5.25562 3.89823 5.06135L3.89882 2.56738H3.05303C2.68348 2.56738 2.39636 2.28026 2.39636 1.91071C2.39636 1.54116 2.68348 1.25405 3.05303 1.25404V1.25404ZM12.9474 1.58675L3.05304 1.58738C2.86758 1.58738 2.7297 1.72525 2.7297 1.91071C2.7297 2.09617 2.86757 2.23404 3.05303 2.23404H4.23223L4.23157 5.06135V5.06135C4.23158 5.15983 4.27538 5.25908 4.35053 5.32476L7.63107 7.91815L4.35113 10.5123C4.2739 10.5795 4.23221 10.6639 4.23221 10.7757V13.7666H3.05304C2.86759 13.7666 2.72971 13.9045 2.72971 14.09C2.72971 14.2754 2.86759 14.4133 3.05304 14.4133H12.9468C13.1323 14.4133 13.2701 14.2754 13.2701 14.09C13.2701 13.9045 13.1323 13.7667 12.9468 13.7667H11.7676L11.7683 10.7757V10.7757C11.7683 10.6772 11.7245 10.5781 11.6495 10.5124L8.35092 7.91819L11.6489 5.32461C11.726 5.25743 11.7676 5.17306 11.7676 5.06136L11.7683 2.23342H12.9474C13.1329 2.23342 13.2708 2.09554 13.2708 1.91008C13.2708 1.72463 13.1329 1.58676 12.9474 1.58675V1.58675ZM4.87823 2.23332H11.1216V4.89669L7.99994 7.3805L4.87823 4.89669V2.23332ZM5.21157 2.56666V4.73593L7.99994 6.95452L10.7883 4.73593V2.56666H5.21157ZM7.99958 8.45673L11.1216 10.9237V13.7505H4.87823V10.9403L7.99958 8.45673ZM8.0003 8.88213L5.21157 11.101V13.4172H10.7883V11.0852L8.0003 8.88213Z",fill:"white"})),Xn=h(t=>{var a=t,{children:e,className:n,placement:i="top"}=a,r=se(a,["children","className","placement"]);return o.jsx(un,_(I({arrow:!0,placement:i},r),{classes:{popper:n,tooltip:"stigg-tooltip",arrow:"stigg-tooltip-arrow"},children:o.jsx("div",{children:e})}))})(({theme:e,$padding:n=8,$maxWidth:i=300})=>({[`& .${un.tooltipClasses.tooltip}`]:{backgroundColor:e.stigg.palette.white,maxWidth:i,boxShadow:e.stigg.shadows.popover,padding:n,borderRadius:e.stigg.border.radius,color:e.stigg.palette.text.primary},[`& .${un.tooltipClasses.arrow}`]:{color:e.stigg.palette.white}})),nd=h(C)`
537
- display: ${({$display:e})=>e};
538
- -webkit-line-clamp: ${({$maxLines:e})=>e};
539
- -webkit-box-orient: vertical;
540
- text-overflow: ellipsis;
541
- overflow: hidden;
542
- white-space: normal;
543
- ${({$wordBreak:e})=>e&&Ie`
544
- word-break: break-word;
545
- `}
546
-
547
- ${({$bold:e})=>e&&Ie`
548
- font-weight: bold;
549
- `}
550
- `;function er(e){return e&&(e.clientHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)}const mt=({leaveDelay:e,children:n,variant:i,color:r,maxLines:t=1,wordBreak:a,bold:s,tooltipPlacement:c="top",className:l,display:u="-webkit-box",style:d,"data-testid":p})=>{const[m,f]=D.useState(!1),g=D.useRef(null),y=o.jsx(nd,{ref:g,variant:i,color:r,$maxLines:t,$wordBreak:a,$bold:s,className:l,$display:u,style:d,"data-testid":p,children:n});D.useEffect(()=>{if(g!=null&&g.current){const S=er(g.current);f(S)}},[g]);const P=(g==null?void 0:g.current)&&er(g.current);return o.jsx("span",{children:m||P?o.jsx(Xn,{placement:c,leaveDelay:e,title:o.jsx(C,{variant:"body1",children:n}),children:y}):y})},id=h.div`
551
- width: 100%;
552
- display: flex;
553
- align-items: center;
554
- gap: 4px;
555
- background-color: ${({theme:e})=>e.stigg.palette.warning};
556
- border-radius: 10px;
557
- padding: 8px 16px;
558
- margin-top: 16px;
559
- `,rd=h(xr)`
560
- text-decoration-color: white;
561
- color: white;
562
- cursor: pointer;
563
- `;function ad({subscription:e,includePlanName:n,onManageSubscription:i}){return(e==null?void 0:e.status)!==b.SubscriptionStatus.InTrial?null:o.jsxs(id,{className:"stigg-subscription-trial-badge",children:[o.jsx(td,{className:"stigg-subscription-trial-badge-image"}),o.jsx("div",{style:{flex:1,marginRight:4},children:o.jsxs(mt,{variant:"body1",className:"stigg-subscription-trial-badge-text",color:"white",children:[`${e.trialRemainingDays} days remaining in trial`,n&&` of the ${e.planName} plan`]})}),o.jsx(rd,{className:"stigg-subscription-trial-upgrade-button",onClick:()=>i({intentionType:nn.UPGRADE_TRIAL_PLAN}),children:o.jsx(C,{color:"white",children:"Upgrade plan"})})]})}function od({mainSubscription:e,trialSubscription:n,onManageSubscription:i,theme:r}){return o.jsxs("div",{className:"stigg-subscription-view-layout",children:[o.jsxs(C,{className:"stigg-subscription-plan-name",variant:"h1",overrideColor:r.planNameColor,style:{marginTop:8},children:[e.planName," plan"]}),o.jsx(ad,{subscription:n,includePlanName:(n==null?void 0:n.planName)!==e.planName,onManageSubscription:i})]})}const da=70;function Jn(e,n){return Math.min(Math.floor(e/n*100),100)}function sd(e){let n;return e<da?n="standard":e<100?n="warning":n="error",n}function cd(e){if(!e.resetPeriod||!e.usagePeriodEnd)return null;const n=i=>oe.utc(e.usagePeriodEnd).diff(oe.utc(),i);switch(e.resetPeriod){case b.EntitlementResetPeriod.Month:return`Resets monthly - in ${n("days")} days`;case b.EntitlementResetPeriod.Week:return`Resets weekly - in ${n("days")} days`;case b.EntitlementResetPeriod.Day:return`Resets daily - in ${n("hours")} hours`;case b.EntitlementResetPeriod.Hour:return`Resets hourly - in ${n("minutes")} minutes`;default:return null}}const ld=h(It)`
564
- height: 4px;
565
- background-color: ${({theme:e})=>le(e.stigg.palette.primary).alpha(.4).string()};
566
-
567
- span {
568
- background-color: ${({$progressStatus:e,theme:n})=>{switch(e){case"standard":return n.stigg.palette.primary;case"warning":return n.stigg.palette.warning;case"error":return n.stigg.palette.error;default:return n.stigg.palette.primary}}};
569
- }
570
- `,ud=h(We)`
571
- border-style: dotted;
572
- border-bottom-width: 2px;
573
- border-color: ${({theme:e})=>le(e.stigg.palette.outlinedRestingBorder).alpha(.4).string()};
574
- `;function ma({entitlement:e}){if(e.hasUnlimitedUsage)return o.jsx(ud,{});const n=Jn(e.currentUsage||0,e.usageLimit),i=sd(n);return o.jsx(ld,{$progressStatus:i,className:`stigg-feature-usage-progress-bar-${i.toString()}`,variant:"determinate",value:n})}const tr=h(we)`
575
- text-transform: none;
576
- padding: 0;
577
- white-space: nowrap;
578
- `;function ga({entitlement:e,feature:n,onManageSubscription:i,onBuyMore:r,canBuyMore:t,canUpgradeSubscription:a,hasCustomSubscription:s}){return s||e.hasUnlimitedUsage||Jn(e.currentUsage||0,e.usageLimit)<da?null:t?r?o.jsx(tr,{variant:"text",onClick:()=>r(n,e),children:o.jsx(C,{color:"primary.main",children:"Buy more"})}):null:a&&i?o.jsx(tr,{variant:"text",onClick:()=>i({intentionType:nn.UPGRADE_PLAN}),children:o.jsx(C,{color:"primary.main",children:"Upgrade"})}):null}function dd({amount:e,currency:n,blockSize:i,entitlement:r,feature:t,hideChargePrice:a,onBuyMore:s,onManageSubscription:c,canUpgradeSubscription:l,hasCustomSubscription:u}){var d,p,m;return o.jsxs("div",{className:`stigg-charge-list-item stigg-charge-list-item-${r.feature.refId}`,style:{display:"flex",flexDirection:"column",gap:12},children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:12},children:[o.jsxs("div",{style:{display:"flex",gap:12},children:[o.jsx(mt,{variant:"body1",color:"primary",children:t.displayName}),!a&&o.jsxs(mt,{variant:"body1",color:"secondary",children:[re({amount:e,currency:n})," per ",i?`${i} `:"",i?t.featureUnitsPlural:t.featureUnits]})]}),o.jsxs("div",{style:{display:"flex",gap:12},children:[o.jsx(ga,{entitlement:r,feature:t,canBuyMore:!0,onBuyMore:s,onManageSubscription:c,canUpgradeSubscription:l,hasCustomSubscription:u}),o.jsx(C,{variant:"body1",color:"primary",style:{whiteSpace:"nowrap"},children:r.hasUnlimitedUsage?(d=r.currentUsage)==null?void 0:d.toLocaleString():`${(p=r.currentUsage)==null?void 0:p.toLocaleString()} of ${(m=r.usageLimit)==null?void 0:m.toLocaleString()}`})]})]}),o.jsx(ma,{entitlement:r})]})}function md({subscription:e,entitlements:n,onBuyMore:i,onManageSubscription:r,hasCustomSubscription:t,canUpgradeSubscription:a}){const s=ee.keyBy(n,"feature.refId"),c=e.prices.filter(({feature:l,price:u})=>!!l&&s[l.refId]&&!!u);return c.length?o.jsx("div",{className:"stigg-charge-list",style:{display:"flex",flexDirection:"column",gap:16,marginTop:32},children:c.map(({feature:l,price:u,blockSize:d,billingModel:p})=>{if(!l||!u)return null;const m=s[l.refId];return!m||!m.feature?null:o.jsx(dd,{entitlement:m,feature:m.feature,amount:u.amount,blockSize:d,currency:u.currency,hideChargePrice:p===b.BillingModel.PerUnit,onBuyMore:i,onManageSubscription:r,canUpgradeSubscription:a,hasCustomSubscription:t},l.refId)})}):null}function pa({onManageSubscription:e,onBuyMore:n,onCancelScheduledUpdates:i,onContactSupport:r,hiddenSections:t,cancelScheduledUpdatesButtonTitle:a}){const{customerPortal:s,isLoading:c,textOverrides:l,theme:u}=ve(),d=c||!s,{subscriptions:p,entitlements:m,canUpgradeSubscription:f}=s||{},g=p==null?void 0:p.find(({status:v})=>v===b.SubscriptionStatus.Active),y=p==null?void 0:p.find(({status:v})=>v===b.SubscriptionStatus.InTrial),P=(g==null?void 0:g.pricingType)===b.PricingType.Custom,S=g||y;return o.jsxs(bt,{className:"stigg-customer-portal-subscriptions-overview",$backgroundColor:u.backgroundColor,$borderColor:u.borderColor,children:[!d&&g&&g.scheduledUpdates&&o.jsx(Zu,{theme:u,subscription:g,onCancelScheduledUpdates:i,cancelScheduledUpdatesButtonTitle:a}),d||!S?o.jsx(Lu,{}):o.jsxs("div",{className:"stigg-overview-layout",style:{display:"flex",alignItems:"flex-start",gap:64,flexWrap:"wrap"},children:[o.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1},children:[o.jsx(Nu,{onManageSubscription:e,hideManageButton:P,textOverrides:l}),o.jsx(od,{mainSubscription:S,trialSubscription:y,theme:u,onManageSubscription:e}),g&&m&&o.jsx(md,{subscription:g,entitlements:m,onBuyMore:n,onManageSubscription:e,canUpgradeSubscription:!!f,hasCustomSubscription:P}),o.jsx(Mu,{customerPortal:s,hiddenSections:t,textOverrides:l,theme:u})]}),o.jsx("div",{style:{display:"flex",flexDirection:"column",width:319,gap:24},children:o.jsx(ed,{subscription:S,theme:u,onContactSupport:r,textOverrides:l})})]})]})}const gd=h.div`
579
- display: flex;
580
- width: 100%;
581
- align-items: flex-end;
582
- justify-content: flex-end;
583
- margin-bottom: 24px;
584
- `;function pd({showWatermark:e}){return o.jsx(gd,{className:"stigg-customer-portal-header-layout",children:o.jsx(Ke,{source:"customer_portal",showWatermark:e})})}const fd=h(C)`
585
- text-transform: none;
586
- `,hd=h(Oe.ExternalLink)`
587
- color: ${({theme:e})=>e.stigg.palette.primary};
588
- `;function fa({text:e,url:n,className:i}){const r=()=>{window.open(n,"_blank")};return o.jsx(tn,{className:i,variant:"outlined",startIcon:o.jsx(hd,{size:20,strokeWidth:2.5}),onClick:r,children:o.jsx(fd,{color:"primary.main",children:e})})}const Rn=h.div`
589
- display: flex;
590
- flex-direction: column;
591
- align-items: flex-start;
592
- gap: 16px;
593
- flex: 1 0 0;
594
- `,yd=h.div`
595
- display: flex;
596
- align-items: flex-start;
597
- gap: 16px;
598
- align-self: stretch;
599
- flex-wrap: wrap;
600
- `;function nr({title:e,rows:n}){return o.jsxs(Rn,{children:[o.jsx(C,{variant:"h6",color:"secondary",bold:!0,children:e}),n.map(({classNamePrefix:i,label:r,value:t,labelTypographyProps:a,valueTypographyProps:s})=>o.jsxs(yd,{children:[o.jsx(C,_(I({className:`${i}-label`,variant:"body1",color:"secondary",style:{width:80}},a),{children:r})),o.jsx(C,_(I({className:`${i}-text`,variant:"body1",color:"secondary"},s),{children:t}))]},r))]})}function ha(){return o.jsx(H,{width:220,height:42})}const ir="-";function ya(){const{customerPortal:e,isLoading:n,textOverrides:i,theme:r}=ve(),t=Ge("md"),{billingInformation:a}=e||{},s=!a||n,c=[];if(s?c.push(o.jsxs(Rn,{children:[o.jsx(H,{width:220,height:12}),o.jsx(H,{width:220,height:12}),o.jsx(H,{width:220,height:12})]},"information-loading-data-top"),o.jsx(We,{orientation:"vertical",style:{minHeight:93,display:t?"block":"none"}},"information-loading-data-divider"),o.jsxs(Rn,{children:[o.jsx(H,{width:220,height:12}),o.jsx(H,{width:220,height:12}),o.jsx(H,{width:220,height:12})]},"information-loading-data-bottom")):(c.push(o.jsx(nr,{title:"Billed to",rows:[{classNamePrefix:"stigg-customer-name",label:"Name",value:(a==null?void 0:a.name)||ir,valueTypographyProps:a!=null&&a.name?{}:{color:"disabled"}},{classNamePrefix:"stigg-customer-email",label:"Email",value:(a==null?void 0:a.email)||ir,valueTypographyProps:a!=null&&a.email?{}:{color:"disabled"}}]},"information-billing-data-billed-to")),a!=null&&a.defaultPaymentMethodId&&a.defaultPaymentMethodLast4Digits&&a.defaultPaymentExpirationMonth&&a.defaultPaymentExpirationYear&&(c.unshift(o.jsx(We,{orientation:"vertical",style:{minHeight:93,display:t?"block":"none"}},"information-billing-data-divider")),c.unshift(o.jsx(nr,{title:"Payment method",rows:[{classNamePrefix:"stigg-credit-card",label:"Card",value:`Ending in ${a.defaultPaymentMethodLast4Digits}`},{classNamePrefix:"stigg-credit-card-expiration",label:"Expires",value:`${ee.padStart(a.defaultPaymentExpirationMonth.toString(),2,"0")}/${a.defaultPaymentExpirationYear}`}]},"information-billing-data-payment-method")))),!s&&!(a!=null&&a.name)&&!(a!=null&&a.email)&&!(a!=null&&a.defaultPaymentMethodId))return null;const l=s?o.jsx(ha,{}):e!=null&&e.billingPortalUrl?o.jsx(fa,{url:e.billingPortalUrl,text:i.editPaymentDetails,className:"stigg-edit-payment-details-button"}):null;return o.jsxs(bt,{className:"stigg-payment-details-section-layout",$backgroundColor:r.backgroundColor,$borderColor:r.borderColor,children:[o.jsxs(yt,{className:"stigg-payment-details-section-header",children:[o.jsx(Ct,{isLoading:s,className:"stigg-payment-details-section-title",title:"Payment details"}),l]}),o.jsx("div",{style:{display:"flex",alignItems:"stretch",gap:t?64:32,flexWrap:"wrap"},children:c})]})}const Cd=h(bt)`
601
- position: relative;
602
-
603
- .stigg-paywall-layout {
604
- width: 100%;
605
- }
606
-
607
- .stigg-paywall-plans-layout {
608
- flex-wrap: nowrap;
609
- width: 100%;
610
- overflow-x: auto;
611
- justify-content: unset;
612
- padding: 10px 0px 0px 0px;
613
- }
614
-
615
- .stigg-paywall-plans-layout .stigg-plan-offering-container:first-of-type {
616
- margin-left: auto;
617
- }
618
- .stigg-paywall-plans-layout .stigg-plan-offering-container:last-child {
619
- margin-right: auto;
620
- }
621
-
622
- .${ia} {
623
- display: none;
624
- }
625
- `,Ca=D.forwardRef(({paywallComponent:e,theme:n,title:i,isLoading:r},t)=>e?o.jsxs(Cd,{className:"stigg-customer-portal-paywall-section",ref:t,$backgroundColor:n.backgroundColor,$borderColor:n.borderColor,children:[o.jsx(yt,{className:"stigg-customer-portal-paywall-header",children:o.jsx(Ct,{isLoading:r,className:"stigg-customer-portal-paywall-section-title",title:i})}),e]}):null);Ca.displayName="CustomerPortalPaywall";const bd=h.div`
626
- width: 100%;
627
- display: flex;
628
- flex-direction: column;
629
- align-items: center;
630
-
631
- & * {
632
- box-sizing: border-box;
633
- }
634
- `,Ed=h.div`
635
- width: 100%;
636
- display: flex;
637
- flex-direction: column;
638
- align-items: center;
639
- row-gap: 24px;
640
- `;function ei(e,n,i){if(!n&&!i)return e;const r=dn(e);return r===dn(n||"")||r===dn(i||"")?e:`${e} (${i})`}function Pd(e){return ei(e.displayName,e.featureUnits,e.featureUnitsPlural)}const Sd=h.div`
641
- display: flex;
642
- flex-direction: column;
643
- padding: 24px;
644
- border: ${({$borderColor:e})=>`1px solid ${e}`};
645
- border-radius: 10px;
646
- row-gap: 16px;
647
- height: 100%;
648
-
649
- ${({theme:e,$highlight:n})=>n&&`background-color: ${e.stigg.palette.backgroundSection}`};
650
- `;function Dd({entitlement:e,subscriptionPrice:n,onManageSubscription:i,onBuyMore:r,hasCustomSubscription:t,canUpgradeSubscription:a}){var l,u,d;const{theme:s}=ve(),c=!e.hasUnlimitedUsage&&e.currentUsage>e.usageLimit;return e.feature?o.jsxs(Sd,{$highlight:!!n,$borderColor:s.borderColor,children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:16},children:[o.jsx(mt,{variant:"body1",children:e.feature&&Pd(e.feature)}),n&&o.jsx(Xn,{title:o.jsx(C,{variant:"body1",children:n.billingModel===b.BillingModel.PerUnit?"Billed for committed usage":"Billed for actual usage"}),children:o.jsx(fe,{icon:"DollarCoin",svgStrokeColor:s.iconsColor})})]}),o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8},children:[o.jsxs(mt,{variant:"body1",color:c?"error":"primary","data-testid":`usage-data-${(l=e.feature)==null?void 0:l.refId}`,children:[(u=e.currentUsage)==null?void 0:u.toLocaleString(),!e.hasUnlimitedUsage&&` / ${(d=e.usageLimit)==null?void 0:d.toLocaleString()} (${Jn(e.currentUsage||0,e.usageLimit)}%)`]}),o.jsx(ga,{entitlement:e,feature:e.feature,onBuyMore:r,canBuyMore:!!n,onManageSubscription:i,canUpgradeSubscription:a,hasCustomSubscription:t})]}),o.jsx(ma,{entitlement:e}),!e.hasUnlimitedUsage&&!xi(e.usageLimit)&&!xi(e.currentUsage)&&e.resetPeriod&&e.usagePeriodEnd?o.jsx(C,{color:"secondary",children:cd(e)}):null,e.hasUnlimitedUsage&&o.jsx(C,{color:"secondary",children:"In current billing period"})]}):null}const vd=h.div`
651
- margin-top: 32px;
652
- `;function xd(){const e=Ge("md");return o.jsx(R,{container:!0,spacing:4,className:"stigg-subscription-usage-skeleton-layout",sx:{flexWrap:"wrap"},children:ee.range(6).map(n=>o.jsx(R,{item:!0,xs:e?4:12,children:o.jsx(H,{width:280,height:120})},n))})}const rr=6;function ba({onManageSubscription:e,onBuyMore:n,filterEntitlements:i}){var L,j;const[r,t]=D.useState(!1),a=Ge("md"),{customerPortal:s,isLoading:c,textOverrides:l,theme:u}=ve(),d=c||!s,{entitlements:p,subscriptions:m}=s||{},f=p==null?void 0:p.filter(O=>{var z,X;return((z=O.feature)==null?void 0:z.meterType)===b.MeterType.Fluctuating||((X=O.feature)==null?void 0:X.meterType)===b.MeterType.Incremental}),g=m==null?void 0:m.find(({status:O})=>O===b.SubscriptionStatus.Active),y=(g==null?void 0:g.pricingType)===b.PricingType.Custom,P=!!(s!=null&&s.canUpgradeSubscription),S=ee.keyBy((L=g==null?void 0:g.prices)!=null?L:[],"feature.refId"),v=ee.keyBy(f!=null?f:[],"feature.refId"),A=ee.compact(((j=g==null?void 0:g.prices)!=null?j:[]).map(O=>O.feature&&v[O.feature.refId]||void 0)),k=ee.compact((f!=null?f:[]).filter(O=>!S[O.feature.refId])),w=[...A,...k].filter(O=>O.usageLimit!==0),T=i?i(w):w,N=a?T.length>2?4:6:12,F=r?T:T.slice(0,rr),U=()=>t(O=>!O);return!d&&!(f!=null&&f.length)?null:o.jsxs(bt,{className:"stigg-subscription-usage-layout",$backgroundColor:u.backgroundColor,$borderColor:u.borderColor,children:[o.jsx(yt,{children:o.jsx(Ct,{title:l.usageTabTitle,className:"stigg-customer-portal-usage-section-title",isLoading:d})}),d?o.jsx(xd,{}):o.jsxs(o.Fragment,{children:[o.jsx(R,{container:!0,spacing:4,children:F.map(O=>o.jsx(R,{className:`stigg-entitlement-usage-${O.feature.refId}`,item:!0,xs:N,children:o.jsx(Dd,{subscriptionPrice:S[O.feature.refId],entitlement:O,onManageSubscription:e,onBuyMore:n,hasCustomSubscription:y,canUpgradeSubscription:P},O.feature.refId)},O.feature.refId))}),T.length>rr&&o.jsx(vd,{children:o.jsx(tn,{className:"stigg-usage-toggle-many-button",variant:"text",startIcon:r?o.jsx(Oe.Minus,{}):o.jsx(Oe.Plus,{}),onClick:U,children:r?"Show less":"Show more"})})]})]})}function Id({onManageSubscription:e,onBuyMore:n,onCancelScheduledUpdates:i,onContactSupport:r,paywallComponent:t,hiddenSections:a,filterEntitlements:s}){const{customerPortal:c,textOverrides:l,theme:u,isLoading:d,showWatermark:p}=ve(),m=D.useRef(null),f=({intentionType:S})=>{var v,A;e?e({intentionType:S,customerSubscriptions:(v=c==null?void 0:c.subscriptions)!=null?v:[]}):(A=m==null?void 0:m.current)==null||A.scrollIntoView({behavior:"smooth"})},g=!(a!=null&&a.some(S=>S==="usage")),y=!(a!=null&&a.some(S=>S==="paymentDetails"||S==="billingInformation")),P=!(a!=null&&a.some(S=>S==="invoices"||S==="billingInformation"));return o.jsxs(bd,{className:"stigg-customer-portal-layout",children:[o.jsx(pd,{showWatermark:p}),o.jsxs(Ed,{className:"stigg-customer-portal-sections",children:[o.jsx(pa,{onCancelScheduledUpdates:i,onBuyMore:n,onManageSubscription:f,onContactSupport:r,hiddenSections:a,cancelScheduledUpdatesButtonTitle:l.cancelScheduledUpdatesButtonTitle}),g&&o.jsx(ba,{onManageSubscription:f,onBuyMore:n,filterEntitlements:s}),o.jsx(Ca,{ref:m,paywallComponent:t,theme:u,title:l.paywallSectionTitle,isLoading:!c||d}),y&&o.jsx(ya,{}),P&&o.jsx(Ea,{})]})]})}function Td(a){var s=a,{textOverrides:e,theme:n,resourceId:i,productId:r}=s,t=se(s,["textOverrides","theme","resourceId","productId"]);return o.jsx(oa,{textOverrides:e,theme:n,resourceId:i,productId:r,children:o.jsx(Id,I({},t))})}function Ea(){const{customerPortal:e,isLoading:n,textOverrides:i,theme:r}=ve(),t=!e||n,a=t?o.jsx(ha,{}):e!=null&&e.billingPortalUrl?o.jsx(fa,{url:e.billingPortalUrl,text:i.viewInvoiceHistory,className:"stigg-view-invoice-history-button"}):null;return!t&&!(e!=null&&e.billingPortalUrl)?null:o.jsx(bt,{className:"stigg-invoices-section-layout",$backgroundColor:r.backgroundColor,$borderColor:r.borderColor,children:o.jsxs(yt,{className:"stigg-invoices-section-header",children:[o.jsx(Ct,{isLoading:t,className:"stigg-invoices-section-title",title:i.invoicesTitle}),a]})})}const Ad=e=>Gt(e,"displayName"),Pa=e=>Gt(e,"addon.displayName");function kd(e,n){return e.pricePoints.some(i=>i.billingPeriod===n)}function Sa({addon:e,currency:n,billingCountryCode:i}){return _(I({},e),{pricePoints:e.pricePoints.filter(r=>r.currency===n&&(i?r.billingCountryCode===i:!0))})}function Nd({addons:e,billingCountryCode:n,currency:i}){var r;return((r=e==null?void 0:e.filter(t=>{var a;return!((a=t.hiddenFromWidgets)!=null&&a.includes(b.WidgetType.Checkout))}))==null?void 0:r.map(t=>Sa({addon:t,currency:i,billingCountryCode:n})))||[]}function wd({addons:e,billingPeriod:n,billingCountryCode:i,currency:r}){var t;return((t=e==null?void 0:e.filter(a=>kd(a.addon,n)))==null?void 0:t.map(a=>_(I({},a),{addon:Sa({addon:a.addon,currency:r,billingCountryCode:i})})))||[]}function Fd({activeSubscription:e,plan:n,billingCountryCode:i}){var c,l;let r=[];const t=((l=(c=n==null?void 0:n.pricePoints)==null?void 0:c[0])==null?void 0:l.currency)||b.Currency.Usd,a=Ad(Nd({addons:n==null?void 0:n.compatibleAddons,billingCountryCode:i,currency:t})),s=wd({addons:e==null?void 0:e.addons,billingCountryCode:i,currency:t});return s!=null&&s.length&&(a!=null&&a.length)&&(r=Pa(s.filter(u=>a.some(d=>d.id===u.addon.id)))),{addons:r,initialAddons:Lo(r),availableAddons:a}}function jd(){const[,e]=W();return(n,i)=>e(r=>{const t=r.addonsStep.addons.find(a=>a.addon.id===n.id);t?t.quantity=i:(r.addonsStep.addons.push({addon:n,quantity:i}),r.addonsStep.addons=Pa(r.addonsStep.addons))})}function Rd(){const[,e]=W();return n=>e(i=>{Bo(i.addonsStep.addons,r=>r.addon.id===n)})}function Md(){const[{addonsStep:e}]=W();return e}function Ud(){const e=Md();return _(I({},e),{setAddon:jd(),removeAddon:Rd()})}function Od(){const[{checkout:e,widgetState:n,checkoutLocalization:i,checkoutSuccess:r}]=W();return{checkoutState:e,widgetState:n,checkoutLocalization:i,checkoutSuccess:r}}function Ld(){const[,e]=W();return n=>e(i=>{i.widgetState.readOnly=n})}function Bd(){const[,e]=W();return n=>e(i=>{i.widgetState.isValid=n})}function _d(){const[,e]=W();return n=>e(i=>{i.checkoutSuccess=n})}function ne(){const{checkoutState:e,widgetState:n,checkoutLocalization:i,checkoutSuccess:r}=Od();return{checkoutState:e,widgetState:n,checkoutLocalization:i,checkoutSuccess:r,setWidgetReadOnly:Ld(),setIsValid:Bd(),setCheckoutSuccess:_d()}}function $d({planId:e,resourceId:n,billingCountryCode:i,onMockCheckoutState:r}){const{stigg:t}=q(),[a,s]=D.useState(!0),[c,l]=D.useState();return D.useEffect(()=>{const u=()=>B(null,null,function*(){try{const d=yield t.getCheckoutState({planId:e,resourceId:n,billingCountryCode:i});l(d)}catch(d){Qt.error(`Failed to load checkout ${d==null?void 0:d.message}`,d)}finally{s(!1)}});if(r){s(!1),l(r({planId:e,resourceId:n,billingCountryCode:i}));return}t.isCustomerLoaded&&(s(!0),u())},[t,t.isCustomerLoaded,n,e,i,r]),{checkout:c,isLoading:a,showWatermark:t.getShowWatermark()}}var Pn={},_t=function(){return _t=Object.assign||function(n){for(var i,r=1,t=arguments.length;r<t;r++){i=arguments[r];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])}return n},_t.apply(this,arguments)};function Nt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nt=function(i){return typeof i}:Nt=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Nt(e)}function Gd(e){return Nt(e)=="object"&&e!==null}var Da=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";function Mn(e,n){for(var i=/\r\n|[\n\r]/g,r=1,t=n+1,a;(a=i.exec(e.body))&&a.index<n;)r+=1,t=n+1-(a.index+a[0].length);return{line:r,column:t}}function Vd(e){return va(e.source,Mn(e.source,e.start))}function va(e,n){var i=e.locationOffset.column-1,r=wt(i)+e.body,t=n.line-1,a=e.locationOffset.line-1,s=n.line+a,c=n.line===1?i:0,l=n.column+c,u="".concat(e.name,":").concat(s,":").concat(l,`
653
- `),d=r.split(/\r\n|[\n\r]/g),p=d[t];if(p.length>120){for(var m=Math.floor(l/80),f=l%80,g=[],y=0;y<p.length;y+=80)g.push(p.slice(y,y+80));return u+ar([["".concat(s),g[0]]].concat(g.slice(1,m+1).map(function(P){return["",P]}),[[" ",wt(f-1)+"^"],["",g[m+1]]]))}return u+ar([["".concat(s-1),d[t-1]],["".concat(s),p],["",wt(l-1)+"^"],["".concat(s+1),d[t+1]]])}function ar(e){var n=e.filter(function(r){var t=r[1];return t!==void 0}),i=Math.max.apply(Math,n.map(function(r){var t=r[0];return t.length}));return n.map(function(r){var t=r[0],a=r[1];return Hd(i,t)+(a?" | "+a:" |")}).join(`
654
- `)}function wt(e){return Array(e+1).join(" ")}function Hd(e,n){return wt(e-n.length)+n}function Ft(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ft=function(i){return typeof i}:Ft=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ft(e)}function or(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,r)}return i}function qd(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?or(Object(i),!0).forEach(function(r){Wd(e,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):or(Object(i)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(i,r))})}return e}function Wd(e,n,i){return n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Yd(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Zd(e,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zd(e,n,i){return n&&Zd(e.prototype,n),e}function Kd(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&gt(e,n)}function Qd(e){var n=Ia();return function(){var r=pt(e),t;if(n){var a=pt(this).constructor;t=Reflect.construct(r,arguments,a)}else t=r.apply(this,arguments);return xa(this,t)}}function xa(e,n){return n&&(Ft(n)==="object"||typeof n=="function")?n:at(e)}function at(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Un(e){var n=typeof Map=="function"?new Map:void 0;return Un=function(r){if(r===null||!Xd(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(r))return n.get(r);n.set(r,t)}function t(){return jt(r,arguments,pt(this).constructor)}return t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),gt(t,r)},Un(e)}function jt(e,n,i){return Ia()?jt=Reflect.construct:jt=function(t,a,s){var c=[null];c.push.apply(c,a);var l=Function.bind.apply(t,c),u=new l;return s&&gt(u,s.prototype),u},jt.apply(null,arguments)}function Ia(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function Xd(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function gt(e,n){return gt=Object.setPrototypeOf||function(r,t){return r.__proto__=t,r},gt(e,n)}function pt(e){return pt=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},pt(e)}var Jd=(function(e){Kd(i,e);var n=Qd(i);function i(r,t,a,s,c,l,u){var d,p,m,f;Yd(this,i),f=n.call(this,r),f.name="GraphQLError",f.originalError=l!=null?l:void 0,f.nodes=sr(Array.isArray(t)?t:t?[t]:void 0);for(var g=[],y=0,P=(S=f.nodes)!==null&&S!==void 0?S:[];y<P.length;y++){var S,v=P[y],A=v.loc;A!=null&&g.push(A)}g=sr(g),f.source=a!=null?a:(d=g)===null||d===void 0?void 0:d[0].source,f.positions=s!=null?s:(p=g)===null||p===void 0?void 0:p.map(function(w){return w.start}),f.locations=s&&a?s.map(function(w){return Mn(a,w)}):(m=g)===null||m===void 0?void 0:m.map(function(w){return Mn(w.source,w.start)}),f.path=c!=null?c:void 0;var k=l==null?void 0:l.extensions;return u==null&&Gd(k)?f.extensions=qd({},k):f.extensions=u!=null?u:{},Object.defineProperties(at(f),{message:{enumerable:!0},locations:{enumerable:f.locations!=null},path:{enumerable:f.path!=null},extensions:{enumerable:f.extensions!=null&&Object.keys(f.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),l!=null&&l.stack?(Object.defineProperty(at(f),"stack",{value:l.stack,writable:!0,configurable:!0}),xa(f)):(Error.captureStackTrace?Error.captureStackTrace(at(f),i):Object.defineProperty(at(f),"stack",{value:Error().stack,writable:!0,configurable:!0}),f)}return zd(i,[{key:"toString",value:function(){return em(this)}},{key:Da,get:function(){return"Object"}}]),i})(Un(Error));function sr(e){return e===void 0||e.length===0?void 0:e}function em(e){var n=e.message;if(e.nodes)for(var i=0,r=e.nodes;i<r.length;i++){var t=r[i];t.loc&&(n+=`
655
-
656
- `+Vd(t.loc))}else if(e.source&&e.locations)for(var a=0,s=e.locations;a<s.length;a++){var c=s[a];n+=`
657
-
658
- `+va(e.source,c)}return n}function ue(e,n,i){return new Jd("Syntax Error: ".concat(i),void 0,e,[n])}var M=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});function tm(e,n){var i=!!e;if(!i)throw new Error("Unexpected invariant triggered.")}var On=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):void 0;function Ta(e){var n=e.prototype.toJSON;typeof n=="function"||tm(0),e.prototype.inspect=n,On&&(e.prototype[On]=n)}var Aa=(function(){function e(i,r,t){this.start=i.start,this.end=r.end,this.startToken=i,this.endToken=r,this.source=t}var n=e.prototype;return n.toJSON=function(){return{start:this.start,end:this.end}},e})();Ta(Aa);var Z=(function(){function e(i,r,t,a,s,c,l){this.kind=i,this.start=r,this.end=t,this.line=a,this.column=s,this.value=l,this.prev=c,this.next=null}var n=e.prototype;return n.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e})();Ta(Z);var x=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function Rt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Rt=function(i){return typeof i}:Rt=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Rt(e)}var nm=10,ka=2;function Na(e){return rn(e,[])}function rn(e,n){switch(Rt(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return e===null?"null":im(e,n);default:return String(e)}}function im(e,n){if(n.indexOf(e)!==-1)return"[Circular]";var i=[].concat(n,[e]),r=om(e);if(r!==void 0){var t=r.call(e);if(t!==e)return typeof t=="string"?t:rn(t,i)}else if(Array.isArray(e))return am(e,i);return rm(e,i)}function rm(e,n){var i=Object.keys(e);if(i.length===0)return"{}";if(n.length>ka)return"["+sm(e)+"]";var r=i.map(function(t){var a=rn(e[t],n);return t+": "+a});return"{ "+r.join(", ")+" }"}function am(e,n){if(e.length===0)return"[]";if(n.length>ka)return"[Array]";for(var i=Math.min(nm,e.length),r=e.length-i,t=[],a=0;a<i;++a)t.push(rn(e[a],n));return r===1?t.push("... 1 more item"):r>1&&t.push("... ".concat(r," more items")),"["+t.join(", ")+"]"}function om(e){var n=e[String(On)];if(typeof n=="function")return n;if(typeof e.inspect=="function")return e.inspect}function sm(e){var n=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(n==="Object"&&typeof e.constructor=="function"){var i=e.constructor.name;if(typeof i=="string"&&i!=="")return i}return n}function Sn(e,n){var i=!!e;if(!i)throw new Error(n)}function Mt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mt=function(i){return typeof i}:Mt=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Mt(e)}const cm=process.env.NODE_ENV==="production"?function(n,i){return n instanceof i}:function(n,i){if(n instanceof i)return!0;if(Mt(n)==="object"&&n!==null){var r,t=i.prototype[Symbol.toStringTag],a=Symbol.toStringTag in n?n[Symbol.toStringTag]:(r=n.constructor)===null||r===void 0?void 0:r.name;if(t===a){var s=Na(n);throw new Error("Cannot use ".concat(t,' "').concat(s,`" from another module or realm.
659
-
660
- Ensure that there is only one instance of "graphql" in the node_modules
661
- directory. If different versions of "graphql" are the dependencies of other
662
- relied on modules, use "resolutions" to ensure only one version is installed.
663
-
664
- https://yarnpkg.com/en/docs/selective-version-resolutions
665
-
666
- Duplicate "graphql" modules cannot be used at the same time since different
667
- versions may have different capabilities and behavior. The data from one
668
- version used in the function from another could produce confusing and
669
- spurious results.`))}}return!1};function lm(e,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function um(e,n,i){return n&&lm(e.prototype,n),e}var wa=(function(){function e(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof n=="string"||Sn(0,"Body must be a string. Received: ".concat(Na(n),".")),this.body=n,this.name=i,this.locationOffset=r,this.locationOffset.line>0||Sn(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Sn(0,"column in locationOffset is 1-indexed and must be positive.")}return um(e,[{key:Da,get:function(){return"Source"}}]),e})();function dm(e){return cm(e,wa)}var mm=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function gm(e){var n=e.split(/\r\n|[\n\r]/g),i=pm(e);if(i!==0)for(var r=1;r<n.length;r++)n[r]=n[r].slice(i);for(var t=0;t<n.length&&cr(n[t]);)++t;for(var a=n.length;a>t&&cr(n[a-1]);)--a;return n.slice(t,a).join(`
670
- `)}function cr(e){for(var n=0;n<e.length;++n)if(e[n]!==" "&&e[n]!==" ")return!1;return!0}function pm(e){for(var n,i=!0,r=!0,t=0,a=null,s=0;s<e.length;++s)switch(e.charCodeAt(s)){case 13:e.charCodeAt(s+1)===10&&++s;case 10:i=!1,r=!0,t=0;break;case 9:case 32:++t;break;default:r&&!i&&(a===null||t<a)&&(a=t),r=!1}return(n=a)!==null&&n!==void 0?n:0}var fm=(function(){function e(i){var r=new Z(x.SOF,0,0,0,0,null);this.source=i,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}var n=e.prototype;return n.advance=function(){this.lastToken=this.token;var r=this.token=this.lookahead();return r},n.lookahead=function(){var r=this.token;if(r.kind!==x.EOF)do{var t;r=(t=r.next)!==null&&t!==void 0?t:r.next=ym(this,r)}while(r.kind===x.COMMENT);return r},e})();function hm(e){return e===x.BANG||e===x.DOLLAR||e===x.AMP||e===x.PAREN_L||e===x.PAREN_R||e===x.SPREAD||e===x.COLON||e===x.EQUALS||e===x.AT||e===x.BRACKET_L||e===x.BRACKET_R||e===x.BRACE_L||e===x.PIPE||e===x.BRACE_R}function Be(e){return isNaN(e)?x.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function ym(e,n){for(var i=e.source,r=i.body,t=r.length,a=n.end;a<t;){var s=r.charCodeAt(a),c=e.line,l=1+a-e.lineStart;switch(s){case 65279:case 9:case 32:case 44:++a;continue;case 10:++a,++e.line,e.lineStart=a;continue;case 13:r.charCodeAt(a+1)===10?a+=2:++a,++e.line,e.lineStart=a;continue;case 33:return new Z(x.BANG,a,a+1,c,l,n);case 35:return bm(i,a,c,l,n);case 36:return new Z(x.DOLLAR,a,a+1,c,l,n);case 38:return new Z(x.AMP,a,a+1,c,l,n);case 40:return new Z(x.PAREN_L,a,a+1,c,l,n);case 41:return new Z(x.PAREN_R,a,a+1,c,l,n);case 46:if(r.charCodeAt(a+1)===46&&r.charCodeAt(a+2)===46)return new Z(x.SPREAD,a,a+3,c,l,n);break;case 58:return new Z(x.COLON,a,a+1,c,l,n);case 61:return new Z(x.EQUALS,a,a+1,c,l,n);case 64:return new Z(x.AT,a,a+1,c,l,n);case 91:return new Z(x.BRACKET_L,a,a+1,c,l,n);case 93:return new Z(x.BRACKET_R,a,a+1,c,l,n);case 123:return new Z(x.BRACE_L,a,a+1,c,l,n);case 124:return new Z(x.PIPE,a,a+1,c,l,n);case 125:return new Z(x.BRACE_R,a,a+1,c,l,n);case 34:return r.charCodeAt(a+1)===34&&r.charCodeAt(a+2)===34?Sm(i,a,c,l,n,e):Pm(i,a,c,l,n);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Em(i,a,s,c,l,n);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return vm(i,a,c,l,n)}throw ue(i,a,Cm(s))}var u=e.line,d=1+a-e.lineStart;return new Z(x.EOF,t,t,u,d,n)}function Cm(e){return e<32&&e!==9&&e!==10&&e!==13?"Cannot contain the invalid character ".concat(Be(e),"."):e===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:"Cannot parse the unexpected character ".concat(Be(e),".")}function bm(e,n,i,r,t){var a=e.body,s,c=n;do s=a.charCodeAt(++c);while(!isNaN(s)&&(s>31||s===9));return new Z(x.COMMENT,n,c,i,r,t,a.slice(n+1,c))}function Em(e,n,i,r,t,a){var s=e.body,c=i,l=n,u=!1;if(c===45&&(c=s.charCodeAt(++l)),c===48){if(c=s.charCodeAt(++l),c>=48&&c<=57)throw ue(e,l,"Invalid number, unexpected digit after 0: ".concat(Be(c),"."))}else l=Dn(e,l,c),c=s.charCodeAt(l);if(c===46&&(u=!0,c=s.charCodeAt(++l),l=Dn(e,l,c),c=s.charCodeAt(l)),(c===69||c===101)&&(u=!0,c=s.charCodeAt(++l),(c===43||c===45)&&(c=s.charCodeAt(++l)),l=Dn(e,l,c),c=s.charCodeAt(l)),c===46||xm(c))throw ue(e,l,"Invalid number, expected digit but got: ".concat(Be(c),"."));return new Z(u?x.FLOAT:x.INT,n,l,r,t,a,s.slice(n,l))}function Dn(e,n,i){var r=e.body,t=n,a=i;if(a>=48&&a<=57){do a=r.charCodeAt(++t);while(a>=48&&a<=57);return t}throw ue(e,t,"Invalid number, expected digit but got: ".concat(Be(a),"."))}function Pm(e,n,i,r,t){for(var a=e.body,s=n+1,c=s,l=0,u="";s<a.length&&!isNaN(l=a.charCodeAt(s))&&l!==10&&l!==13;){if(l===34)return u+=a.slice(c,s),new Z(x.STRING,n,s+1,i,r,t,u);if(l<32&&l!==9)throw ue(e,s,"Invalid character within String: ".concat(Be(l),"."));if(++s,l===92){switch(u+=a.slice(c,s-1),l=a.charCodeAt(s),l){case 34:u+='"';break;case 47:u+="/";break;case 92:u+="\\";break;case 98:u+="\b";break;case 102:u+="\f";break;case 110:u+=`
671
- `;break;case 114:u+="\r";break;case 116:u+=" ";break;case 117:{var d=Dm(a.charCodeAt(s+1),a.charCodeAt(s+2),a.charCodeAt(s+3),a.charCodeAt(s+4));if(d<0){var p=a.slice(s+1,s+5);throw ue(e,s,"Invalid character escape sequence: \\u".concat(p,"."))}u+=String.fromCharCode(d),s+=4;break}default:throw ue(e,s,"Invalid character escape sequence: \\".concat(String.fromCharCode(l),"."))}++s,c=s}}throw ue(e,s,"Unterminated string.")}function Sm(e,n,i,r,t,a){for(var s=e.body,c=n+3,l=c,u=0,d="";c<s.length&&!isNaN(u=s.charCodeAt(c));){if(u===34&&s.charCodeAt(c+1)===34&&s.charCodeAt(c+2)===34)return d+=s.slice(l,c),new Z(x.BLOCK_STRING,n,c+3,i,r,t,gm(d));if(u<32&&u!==9&&u!==10&&u!==13)throw ue(e,c,"Invalid character within String: ".concat(Be(u),"."));u===10?(++c,++a.line,a.lineStart=c):u===13?(s.charCodeAt(c+1)===10?c+=2:++c,++a.line,a.lineStart=c):u===92&&s.charCodeAt(c+1)===34&&s.charCodeAt(c+2)===34&&s.charCodeAt(c+3)===34?(d+=s.slice(l,c)+'"""',c+=4,l=c):++c}throw ue(e,c,"Unterminated string.")}function Dm(e,n,i,r){return xt(e)<<12|xt(n)<<8|xt(i)<<4|xt(r)}function xt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function vm(e,n,i,r,t){for(var a=e.body,s=a.length,c=n+1,l=0;c!==s&&!isNaN(l=a.charCodeAt(c))&&(l===95||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++c;return new Z(x.NAME,n,c,i,r,t,a.slice(n,c))}function xm(e){return e===95||e>=65&&e<=90||e>=97&&e<=122}function Im(e,n){var i=new Tm(e,n);return i.parseDocument()}var Tm=(function(){function e(i,r){var t=dm(i)?i:new wa(i);this._lexer=new fm(t),this._options=r}var n=e.prototype;return n.parseName=function(){var r=this.expectToken(x.NAME);return{kind:M.NAME,value:r.value,loc:this.loc(r)}},n.parseDocument=function(){var r=this._lexer.token;return{kind:M.DOCUMENT,definitions:this.many(x.SOF,this.parseDefinition,x.EOF),loc:this.loc(r)}},n.parseDefinition=function(){if(this.peek(x.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(x.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},n.parseOperationDefinition=function(){var r=this._lexer.token;if(this.peek(x.BRACE_L))return{kind:M.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(r)};var t=this.parseOperationType(),a;return this.peek(x.NAME)&&(a=this.parseName()),{kind:M.OPERATION_DEFINITION,operation:t,name:a,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(r)}},n.parseOperationType=function(){var r=this.expectToken(x.NAME);switch(r.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(r)},n.parseVariableDefinitions=function(){return this.optionalMany(x.PAREN_L,this.parseVariableDefinition,x.PAREN_R)},n.parseVariableDefinition=function(){var r=this._lexer.token;return{kind:M.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(x.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(x.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(r)}},n.parseVariable=function(){var r=this._lexer.token;return this.expectToken(x.DOLLAR),{kind:M.VARIABLE,name:this.parseName(),loc:this.loc(r)}},n.parseSelectionSet=function(){var r=this._lexer.token;return{kind:M.SELECTION_SET,selections:this.many(x.BRACE_L,this.parseSelection,x.BRACE_R),loc:this.loc(r)}},n.parseSelection=function(){return this.peek(x.SPREAD)?this.parseFragment():this.parseField()},n.parseField=function(){var r=this._lexer.token,t=this.parseName(),a,s;return this.expectOptionalToken(x.COLON)?(a=t,s=this.parseName()):s=t,{kind:M.FIELD,alias:a,name:s,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(x.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},n.parseArguments=function(r){var t=r?this.parseConstArgument:this.parseArgument;return this.optionalMany(x.PAREN_L,t,x.PAREN_R)},n.parseArgument=function(){var r=this._lexer.token,t=this.parseName();return this.expectToken(x.COLON),{kind:M.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(r)}},n.parseConstArgument=function(){var r=this._lexer.token;return{kind:M.ARGUMENT,name:this.parseName(),value:(this.expectToken(x.COLON),this.parseValueLiteral(!0)),loc:this.loc(r)}},n.parseFragment=function(){var r=this._lexer.token;this.expectToken(x.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(x.NAME)?{kind:M.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(r)}:{kind:M.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(r)}},n.parseFragmentDefinition=function(){var r,t=this._lexer.token;return this.expectKeyword("fragment"),((r=this._options)===null||r===void 0?void 0:r.experimentalFragmentVariables)===!0?{kind:M.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:M.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},n.parseFragmentName=function(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()},n.parseValueLiteral=function(r){var t=this._lexer.token;switch(t.kind){case x.BRACKET_L:return this.parseList(r);case x.BRACE_L:return this.parseObject(r);case x.INT:return this._lexer.advance(),{kind:M.INT,value:t.value,loc:this.loc(t)};case x.FLOAT:return this._lexer.advance(),{kind:M.FLOAT,value:t.value,loc:this.loc(t)};case x.STRING:case x.BLOCK_STRING:return this.parseStringLiteral();case x.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:M.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:M.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:M.NULL,loc:this.loc(t)};default:return{kind:M.ENUM,value:t.value,loc:this.loc(t)}}case x.DOLLAR:if(!r)return this.parseVariable();break}throw this.unexpected()},n.parseStringLiteral=function(){var r=this._lexer.token;return this._lexer.advance(),{kind:M.STRING,value:r.value,block:r.kind===x.BLOCK_STRING,loc:this.loc(r)}},n.parseList=function(r){var t=this,a=this._lexer.token,s=function(){return t.parseValueLiteral(r)};return{kind:M.LIST,values:this.any(x.BRACKET_L,s,x.BRACKET_R),loc:this.loc(a)}},n.parseObject=function(r){var t=this,a=this._lexer.token,s=function(){return t.parseObjectField(r)};return{kind:M.OBJECT,fields:this.any(x.BRACE_L,s,x.BRACE_R),loc:this.loc(a)}},n.parseObjectField=function(r){var t=this._lexer.token,a=this.parseName();return this.expectToken(x.COLON),{kind:M.OBJECT_FIELD,name:a,value:this.parseValueLiteral(r),loc:this.loc(t)}},n.parseDirectives=function(r){for(var t=[];this.peek(x.AT);)t.push(this.parseDirective(r));return t},n.parseDirective=function(r){var t=this._lexer.token;return this.expectToken(x.AT),{kind:M.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(r),loc:this.loc(t)}},n.parseTypeReference=function(){var r=this._lexer.token,t;return this.expectOptionalToken(x.BRACKET_L)?(t=this.parseTypeReference(),this.expectToken(x.BRACKET_R),t={kind:M.LIST_TYPE,type:t,loc:this.loc(r)}):t=this.parseNamedType(),this.expectOptionalToken(x.BANG)?{kind:M.NON_NULL_TYPE,type:t,loc:this.loc(r)}:t},n.parseNamedType=function(){var r=this._lexer.token;return{kind:M.NAMED_TYPE,name:this.parseName(),loc:this.loc(r)}},n.parseTypeSystemDefinition=function(){var r=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(r.kind===x.NAME)switch(r.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(r)},n.peekDescription=function(){return this.peek(x.STRING)||this.peek(x.BLOCK_STRING)},n.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},n.parseSchemaDefinition=function(){var r=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var a=this.parseDirectives(!0),s=this.many(x.BRACE_L,this.parseOperationTypeDefinition,x.BRACE_R);return{kind:M.SCHEMA_DEFINITION,description:t,directives:a,operationTypes:s,loc:this.loc(r)}},n.parseOperationTypeDefinition=function(){var r=this._lexer.token,t=this.parseOperationType();this.expectToken(x.COLON);var a=this.parseNamedType();return{kind:M.OPERATION_TYPE_DEFINITION,operation:t,type:a,loc:this.loc(r)}},n.parseScalarTypeDefinition=function(){var r=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var a=this.parseName(),s=this.parseDirectives(!0);return{kind:M.SCALAR_TYPE_DEFINITION,description:t,name:a,directives:s,loc:this.loc(r)}},n.parseObjectTypeDefinition=function(){var r=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var a=this.parseName(),s=this.parseImplementsInterfaces(),c=this.parseDirectives(!0),l=this.parseFieldsDefinition();return{kind:M.OBJECT_TYPE_DEFINITION,description:t,name:a,interfaces:s,directives:c,fields:l,loc:this.loc(r)}},n.parseImplementsInterfaces=function(){var r;if(!this.expectOptionalKeyword("implements"))return[];if(((r=this._options)===null||r===void 0?void 0:r.allowLegacySDLImplementsInterfaces)===!0){var t=[];this.expectOptionalToken(x.AMP);do t.push(this.parseNamedType());while(this.expectOptionalToken(x.AMP)||this.peek(x.NAME));return t}return this.delimitedMany(x.AMP,this.parseNamedType)},n.parseFieldsDefinition=function(){var r;return((r=this._options)===null||r===void 0?void 0:r.allowLegacySDLEmptyFields)===!0&&this.peek(x.BRACE_L)&&this._lexer.lookahead().kind===x.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(x.BRACE_L,this.parseFieldDefinition,x.BRACE_R)},n.parseFieldDefinition=function(){var r=this._lexer.token,t=this.parseDescription(),a=this.parseName(),s=this.parseArgumentDefs();this.expectToken(x.COLON);var c=this.parseTypeReference(),l=this.parseDirectives(!0);return{kind:M.FIELD_DEFINITION,description:t,name:a,arguments:s,type:c,directives:l,loc:this.loc(r)}},n.parseArgumentDefs=function(){return this.optionalMany(x.PAREN_L,this.parseInputValueDef,x.PAREN_R)},n.parseInputValueDef=function(){var r=this._lexer.token,t=this.parseDescription(),a=this.parseName();this.expectToken(x.COLON);var s=this.parseTypeReference(),c;this.expectOptionalToken(x.EQUALS)&&(c=this.parseValueLiteral(!0));var l=this.parseDirectives(!0);return{kind:M.INPUT_VALUE_DEFINITION,description:t,name:a,type:s,defaultValue:c,directives:l,loc:this.loc(r)}},n.parseInterfaceTypeDefinition=function(){var r=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var a=this.parseName(),s=this.parseImplementsInterfaces(),c=this.parseDirectives(!0),l=this.parseFieldsDefinition();return{kind:M.INTERFACE_TYPE_DEFINITION,description:t,name:a,interfaces:s,directives:c,fields:l,loc:this.loc(r)}},n.parseUnionTypeDefinition=function(){var r=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var a=this.parseName(),s=this.parseDirectives(!0),c=this.parseUnionMemberTypes();return{kind:M.UNION_TYPE_DEFINITION,description:t,name:a,directives:s,types:c,loc:this.loc(r)}},n.parseUnionMemberTypes=function(){return this.expectOptionalToken(x.EQUALS)?this.delimitedMany(x.PIPE,this.parseNamedType):[]},n.parseEnumTypeDefinition=function(){var r=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var a=this.parseName(),s=this.parseDirectives(!0),c=this.parseEnumValuesDefinition();return{kind:M.ENUM_TYPE_DEFINITION,description:t,name:a,directives:s,values:c,loc:this.loc(r)}},n.parseEnumValuesDefinition=function(){return this.optionalMany(x.BRACE_L,this.parseEnumValueDefinition,x.BRACE_R)},n.parseEnumValueDefinition=function(){var r=this._lexer.token,t=this.parseDescription(),a=this.parseName(),s=this.parseDirectives(!0);return{kind:M.ENUM_VALUE_DEFINITION,description:t,name:a,directives:s,loc:this.loc(r)}},n.parseInputObjectTypeDefinition=function(){var r=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var a=this.parseName(),s=this.parseDirectives(!0),c=this.parseInputFieldsDefinition();return{kind:M.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:a,directives:s,fields:c,loc:this.loc(r)}},n.parseInputFieldsDefinition=function(){return this.optionalMany(x.BRACE_L,this.parseInputValueDef,x.BRACE_R)},n.parseTypeSystemExtension=function(){var r=this._lexer.lookahead();if(r.kind===x.NAME)switch(r.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(r)},n.parseSchemaExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),a=this.optionalMany(x.BRACE_L,this.parseOperationTypeDefinition,x.BRACE_R);if(t.length===0&&a.length===0)throw this.unexpected();return{kind:M.SCHEMA_EXTENSION,directives:t,operationTypes:a,loc:this.loc(r)}},n.parseScalarTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),a=this.parseDirectives(!0);if(a.length===0)throw this.unexpected();return{kind:M.SCALAR_TYPE_EXTENSION,name:t,directives:a,loc:this.loc(r)}},n.parseObjectTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),a=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),c=this.parseFieldsDefinition();if(a.length===0&&s.length===0&&c.length===0)throw this.unexpected();return{kind:M.OBJECT_TYPE_EXTENSION,name:t,interfaces:a,directives:s,fields:c,loc:this.loc(r)}},n.parseInterfaceTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),a=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),c=this.parseFieldsDefinition();if(a.length===0&&s.length===0&&c.length===0)throw this.unexpected();return{kind:M.INTERFACE_TYPE_EXTENSION,name:t,interfaces:a,directives:s,fields:c,loc:this.loc(r)}},n.parseUnionTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),a=this.parseDirectives(!0),s=this.parseUnionMemberTypes();if(a.length===0&&s.length===0)throw this.unexpected();return{kind:M.UNION_TYPE_EXTENSION,name:t,directives:a,types:s,loc:this.loc(r)}},n.parseEnumTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),a=this.parseDirectives(!0),s=this.parseEnumValuesDefinition();if(a.length===0&&s.length===0)throw this.unexpected();return{kind:M.ENUM_TYPE_EXTENSION,name:t,directives:a,values:s,loc:this.loc(r)}},n.parseInputObjectTypeExtension=function(){var r=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),a=this.parseDirectives(!0),s=this.parseInputFieldsDefinition();if(a.length===0&&s.length===0)throw this.unexpected();return{kind:M.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:a,fields:s,loc:this.loc(r)}},n.parseDirectiveDefinition=function(){var r=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(x.AT);var a=this.parseName(),s=this.parseArgumentDefs(),c=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var l=this.parseDirectiveLocations();return{kind:M.DIRECTIVE_DEFINITION,description:t,name:a,arguments:s,repeatable:c,locations:l,loc:this.loc(r)}},n.parseDirectiveLocations=function(){return this.delimitedMany(x.PIPE,this.parseDirectiveLocation)},n.parseDirectiveLocation=function(){var r=this._lexer.token,t=this.parseName();if(mm[t.value]!==void 0)return t;throw this.unexpected(r)},n.loc=function(r){var t;if(((t=this._options)===null||t===void 0?void 0:t.noLocation)!==!0)return new Aa(r,this._lexer.lastToken,this._lexer.source)},n.peek=function(r){return this._lexer.token.kind===r},n.expectToken=function(r){var t=this._lexer.token;if(t.kind===r)return this._lexer.advance(),t;throw ue(this._lexer.source,t.start,"Expected ".concat(Fa(r),", found ").concat(vn(t),"."))},n.expectOptionalToken=function(r){var t=this._lexer.token;if(t.kind===r)return this._lexer.advance(),t},n.expectKeyword=function(r){var t=this._lexer.token;if(t.kind===x.NAME&&t.value===r)this._lexer.advance();else throw ue(this._lexer.source,t.start,'Expected "'.concat(r,'", found ').concat(vn(t),"."))},n.expectOptionalKeyword=function(r){var t=this._lexer.token;return t.kind===x.NAME&&t.value===r?(this._lexer.advance(),!0):!1},n.unexpected=function(r){var t=r!=null?r:this._lexer.token;return ue(this._lexer.source,t.start,"Unexpected ".concat(vn(t),"."))},n.any=function(r,t,a){this.expectToken(r);for(var s=[];!this.expectOptionalToken(a);)s.push(t.call(this));return s},n.optionalMany=function(r,t,a){if(this.expectOptionalToken(r)){var s=[];do s.push(t.call(this));while(!this.expectOptionalToken(a));return s}return[]},n.many=function(r,t,a){this.expectToken(r);var s=[];do s.push(t.call(this));while(!this.expectOptionalToken(a));return s},n.delimitedMany=function(r,t){this.expectOptionalToken(r);var a=[];do a.push(t.call(this));while(this.expectOptionalToken(r));return a},e})();function vn(e){var n=e.value;return Fa(e.kind)+(n!=null?' "'.concat(n,'"'):"")}function Fa(e){return hm(e)?'"'.concat(e,'"'):e}var Ut=new Map,Ln=new Map,ja=!0,$t=!1;function Ra(e){return e.replace(/[\s,]+/g," ").trim()}function Am(e){return Ra(e.source.body.substring(e.start,e.end))}function km(e){var n=new Set,i=[];return e.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var t=r.name.value,a=Am(r.loc),s=Ln.get(t);s&&!s.has(a)?ja&&console.warn("Warning: fragment with name "+t+` already exists.
672
- graphql-tag enforces all fragment names across your application to be unique; read more about
673
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||Ln.set(t,s=new Set),s.add(a),n.has(a)||(n.add(a),i.push(r))}else i.push(r)}),_t(_t({},e),{definitions:i})}function Nm(e){var n=new Set(e.definitions);n.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(t){var a=r[t];a&&typeof a=="object"&&n.add(a)})});var i=e.loc;return i&&(delete i.startToken,delete i.endToken),e}function wm(e){var n=Ra(e);if(!Ut.has(n)){var i=Im(e,{experimentalFragmentVariables:$t,allowLegacyFragmentVariables:$t});if(!i||i.kind!=="Document")throw new Error("Not a valid GraphQL document.");Ut.set(n,Nm(km(i)))}return Ut.get(n)}function _e(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];typeof e=="string"&&(e=[e]);var r=e[0];return n.forEach(function(t,a){t&&t.kind==="Document"?r+=t.loc.source.body:r+=t,r+=e[a+1]}),wm(r)}function Ma(){Ut.clear(),Ln.clear()}function Ua(){ja=!1}function Oa(){$t=!0}function La(){$t=!1}var it={gql:_e,resetCaches:Ma,disableFragmentWarnings:Ua,enableExperimentalFragmentVariables:Oa,disableExperimentalFragmentVariables:La};(function(e){e.gql=it.gql,e.resetCaches=it.resetCaches,e.disableFragmentWarnings=it.disableFragmentWarnings,e.enableExperimentalFragmentVariables=it.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=it.disableExperimentalFragmentVariables})(_e||(_e={}));_e.default=_e;const Fm=_e,jm=Object.freeze(Object.defineProperty({__proto__:null,default:Fm,disableExperimentalFragmentVariables:La,disableFragmentWarnings:Ua,enableExperimentalFragmentVariables:Oa,get gql(){return _e},resetCaches:Ma},Symbol.toStringTag,{value:"Module"})),Rm=Fs(jm);var lr;function Mm(){return lr||(lr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureStatus=e.FeatureSortFields=e.FeatureGroupStatus=e.FeatureGroupSortFields=e.ExperimentStatus=e.ExperimentSortFields=e.EventLogType=e.EventLogSortFields=e.EventEntityType=e.EventActor=e.ErrorCode=e.EnvironmentType=e.EnvironmentSortFields=e.EnvironmentProvisionStatus=e.EnvironmentAccessRole=e.EntitySelectionMode=e.EntitlementsStateAccessDeniedReason=e.EntitlementResetPeriod=e.EntitlementBehavior=e.DiscountType=e.DiscountDurationType=e.Department=e.CustomerSubscriptionSortFields=e.CustomerSortFields=e.CustomerResourceSortFields=e.Currency=e.CreditUsageTimeRange=e.CreditLedgerEventType=e.CreditGrantType=e.CouponType=e.CouponStatus=e.CouponSource=e.CouponSortFields=e.ConditionOperation=e.ChangeType=e.BillingVendorIdentifier=e.BillingPeriod=e.BillingModel=e.BillingCadence=e.BillingAnchor=e.Auth0ApplicationType=e.ApiKeyType=e.ApiKeySortFields=e.Alignment=e.AggregationFunction=e.AddonSortFields=e.AccountStatus=e.AccountAccessRole=e.AccountAccessMethod=e.AccessDeniedReason=void 0,e.SubscriptionPriceSortFields=e.SubscriptionMigrationTime=e.SubscriptionMigrationTaskSortFields=e.SubscriptionInvoiceStatus=e.SubscriptionInvoiceBillingReason=e.SubscriptionEntitlementSortFields=e.SubscriptionEndSetup=e.SubscriptionDecisionStrategy=e.SubscriptionCouponStatus=e.SubscriptionCancellationTime=e.SubscriptionCancellationAction=e.SubscriptionCancelReason=e.SubscriptionAddonSortFields=e.SourceType=e.SortNulls=e.SortDirection=e.ScheduleStrategy=e.PublishMigrationType=e.ProvisionSubscriptionStatus=e.ProrationBehavior=e.PromotionalEntitlementStatus=e.PromotionalEntitlementSortFields=e.PromotionalEntitlementPeriod=e.ProductSortFields=e.PricingType=e.PriceSortFields=e.PlanSortFields=e.PlanChangeType=e.PaymentMethodType=e.PaymentCollectionMethod=e.PaymentCollection=e.PackageStatus=e.PackageGroupStatus=e.PackageGroupSortFields=e.PackageEntitlementSortFields=e.PackageDtoSortFields=e.OverageBillingPeriod=e.OfferStatus=e.OfferSortFields=e.MonthlyAccordingTo=e.MeterType=e.MemberStatus=e.MemberSortFields=e.InvoiceLineItemType=e.IntegrationSortFields=e.ImportIntegrationTaskSortFields=e.HookStatus=e.HookSortFields=e.FontWeight=e.FeatureType=void 0,e.SubscriptionPreviewFragmentDoc=e.CustomerStatisticsFragmentDoc=e.CustomerWithSubscriptionsFragmentDoc=e.SubscriptionFragmentDoc=e.SubscriptionTrialConfigurationFragmentDoc=e.SubscriptionFutureUpdateDataFragmentDoc=e.SubscriptionScheduledUpdateDataFragmentDoc=e.ScheduleVariablesFragmentDoc=e.PlanFragmentDoc=e.PlanCompatiblePackageGroupsFragmentDoc=e.AddonFragmentDoc=e.AddonDependencyFragmentDoc=e.OveragePriceFragmentDoc=e.PackageEntitlementFragmentDoc=e.ProductFragmentDoc=e.TotalPriceFragmentDoc=e.PriceFragmentDoc=e.PriceTierFragmentDoc=e.CustomerResourceFragmentDoc=e.SubscriptionInvoiceFragmentDoc=e.CustomerFragmentDoc=e.PromotionalEntitlementFragmentDoc=e.CouponFragmentDoc=e.SlimCustomerFragmentDoc=e.SlimSubscriptionFragmentV2FragmentDoc=e.SubscriptionQueryFragmentDoc=e.PageInfoFragmentDoc=e.ExperimentGroupType=e.YearlyAccordingTo=e.WidgetType=e.WeeklyAccordingTo=e.VendorType=e.VendorIdentifier=e.UsageUpdateBehavior=e.UsageMeasurementSortFields=e.UsageMarkerType=e.UnitTransformationRound=e.TrialPeriodUnits=e.TrialEndBehavior=e.TiersMode=e.TaskType=e.TaskStatus=e.SyncStatus=e.SubscriptionUpdateUsageCutoffBehavior=e.SubscriptionStatus=e.SubscriptionStartSetup=e.SubscriptionScheduleType=e.SubscriptionScheduleStatus=e.SubscriptionQuerySortFields=e.SubscriptionProrationBehavior=void 0,e.PaymentSessionFragmentDoc=e.CreditsBalanceSummaryFragmentDoc=e.CreditBalanceFragmentDoc=e.CreditLedgerFragmentDoc=e.CreditGrantFragmentDoc=e.ReportUsageFragmentDoc=e.ProvisionSubscriptionFragmentDoc=e.ApplySubscriptionFragmentDoc=e.ProvisionCustomerFragmentDoc=e.SlimSubscriptionFragmentDoc=e.UsageHistoryV2FragmentDoc=e.UsageHistoryFragmentDoc=e.PaywallFragmentDoc=e.PaywallCalculatedPricePointsFragmentDoc=e.PaywallConfigurationFragmentDoc=e.LayoutConfigurationFragmentDoc=e.PaywallCurrencyFragmentDoc=e.MockPaywallPlanFragmentDoc=e.MockPaywallPlanCompatiblePackageGroupsFragmentDoc=e.MockPaywallAddonFragmentDoc=e.MockPaywallAddonDependencyFragmentDoc=e.MockPaywallPriceFragmentDoc=e.MockPaywallPackageEntitlementFragmentDoc=e.CheckoutStateFragmentDoc=e.ZuoraCheckoutCredentialsFragmentDoc=e.StripeCheckoutCredentialsFragmentDoc=e.CheckoutConfigurationFragmentDoc=e.CustomerPortalFragmentDoc=e.CustomerPortalConfigurationFragmentDoc=e.TypographyConfigurationFragmentDoc=e.FontVariantFragmentDoc=e.CustomerPortalBillingInformationFragmentDoc=e.CustomerPortalPromotionalEntitlementFragmentDoc=e.CustomerPortalEntitlementFragmentDoc=e.CustomerPortalSubscriptionFragmentDoc=e.CustomerPortalSubscriptionScheduledUpdateDataFragmentDoc=e.CustomerPortalSubscriptionAddonFragmentDoc=e.CustomerPortalSubscriptionPriceFragmentDoc=e.CreditBalanceUpdatedPayloadFragmentDoc=e.PackagePublishedPayloadFragmentDoc=e.EntitlementUsageUpdatedFragmentDoc=e.UsageUpdatedFragmentDoc=e.EntitlementsUpdatedPayloadFragmentDoc=e.EntitlementFragmentDoc=e.FeatureFragmentDoc=e.ResetPeriodConfigurationFragmentDoc=e.SubscriptionInvoicePreviewFragmentDoc=e.SubscriptionPreviewV2FragmentDoc=e.SubscriptionPreviewInvoiceFragmentDoc=e.ImmediateSubscriptionPreviewInvoiceFragmentDoc=void 0,e.GetCustomerPortalByRefIdDocument=e.GetSdkConfigurationDocument=e.GetProductsDocument=e.GetEntitlementDocument=e.GetEntitlementsStateDocument=e.GetEntitlementsDocument=e.GetPaywallDocument=e.GetCouponsDocument=e.GetSubscriptionDocument=e.GetSubscriptionsDocument=e.GetActiveSubscriptionsListDocument=e.GetActiveSubscriptionsDocument=e.GetCustomerStatisticsDocument=e.GetCustomerByIdDocument=e.VoidCreditGrantDocument=e.CreatePaymentSessionDocument=e.UnlinkPromotionalEntitlementsGroupDocument=e.RevokePromotionalEntitlementsGroupDocument=e.GrantPromotionalEntitlementsGroupDocument=e.GrantCreditsDocument=e.TransferSubscriptionToResourceDocument=e.DelegateSubscriptionToCustomerDocument=e.TransferSubscriptionDocument=e.UnarchiveCustomerDocument=e.ArchiveCustomerDocument=e.MigrateSubscriptionToLatestDocument=e.CreateSubscriptionDocument=e.ReportEntitlementCheckRequestedDocument=e.ReportEventDocument=e.ReportUsageBulkDocument=e.ReportUsageDocument=e.CancelSubscriptionUpdatesDocument=e.PreviewNextInvoiceDocument=e.PreviewSubscriptionDocument=e.EstimateSubscriptionUpdateDocument=e.EstimateSubscriptionDocument=e.CancelSubscriptionDocument=e.UpdateSubscriptionDocument=e.ImportSubscriptionsBulkDocument=e.ApplySubscriptionDocument=e.ProvisionSubscriptionDocument=e.RevokePromotionalEntitlementDocument=e.GrantPromotionalEntitlementsDocument=e.DetachCustomerPaymentMethodDocument=e.UpdateCustomerDocument=e.ImportCustomerDocument=e.ImportCustomerBulkDocument=e.ProvisionCustomerDocument=e.CreditUsageFragmentDoc=e.SlimCustomCurrencyFragmentDoc=void 0,e.getSdk=e.OnCreditBalanceUpdatedDocument=e.OnPackagePublishedDocument=e.OnUsageUpdatedDocument=e.OnEntitlementsUpdatedDocument=e.GetCreditUsageDocument=e.GetCreditLedgerDocument=e.GetCreditGrantsDocument=e.GetCreditBalanceDocument=e.GetUsageHistoryV2Document=e.GetUsageHistoryDocument=e.GetMockPaywallDocument=e.GetCheckoutStateDocument=void 0;const n=Rm;(function(t){t.BudgetExceeded="BudgetExceeded",t.CustomerIsArchived="CustomerIsArchived",t.CustomerNotFound="CustomerNotFound",t.CustomerResourceNotFound="CustomerResourceNotFound",t.FeatureNotFound="FeatureNotFound",t.FeatureTypeMismatch="FeatureTypeMismatch",t.InsufficientCredits="InsufficientCredits",t.NoActiveSubscription="NoActiveSubscription",t.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",t.RequestedUsageExceedingLimit="RequestedUsageExceedingLimit",t.RequestedValuesMismatch="RequestedValuesMismatch",t.Revoked="Revoked",t.Unknown="Unknown"})(e.AccessDeniedReason||(e.AccessDeniedReason={})),(function(t){t.AuthorizedDomain="AUTHORIZED_DOMAIN",t.InviteOnly="INVITE_ONLY",t.Sso="SSO"})(e.AccountAccessMethod||(e.AccountAccessMethod={})),(function(t){t.Member="MEMBER",t.Owner="OWNER"})(e.AccountAccessRole||(e.AccountAccessRole={})),(function(t){t.Active="ACTIVE",t.Blocked="BLOCKED"})(e.AccountStatus||(e.AccountStatus={})),(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsLatest="isLatest",t.PricingType="pricingType",t.ProductId="productId",t.RefId="refId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber"})(e.AddonSortFields||(e.AddonSortFields={})),(function(t){t.Avg="AVG",t.Count="COUNT",t.Max="MAX",t.Min="MIN",t.Sum="SUM",t.Unique="UNIQUE"})(e.AggregationFunction||(e.AggregationFunction={})),(function(t){t.Center="CENTER",t.Left="LEFT",t.Right="RIGHT"})(e.Alignment||(e.Alignment={})),(function(t){t.Id="id"})(e.ApiKeySortFields||(e.ApiKeySortFields={})),(function(t){t.Client="CLIENT",t.Salesforce="SALESFORCE",t.Server="SERVER",t.Workflow="WORKFLOW"})(e.ApiKeyType||(e.ApiKeyType={})),(function(t){t.Both="BOTH",t.Individual="INDIVIDUAL",t.Organization="ORGANIZATION"})(e.Auth0ApplicationType||(e.Auth0ApplicationType={})),(function(t){t.StartOfTheMonth="START_OF_THE_MONTH",t.SubscriptionsConsolidateBilling="SUBSCRIPTIONS_CONSOLIDATE_BILLING",t.SubscriptionStart="SUBSCRIPTION_START"})(e.BillingAnchor||(e.BillingAnchor={})),(function(t){t.OneOff="ONE_OFF",t.Recurring="RECURRING"})(e.BillingCadence||(e.BillingCadence={})),(function(t){t.CreditBased="CREDIT_BASED",t.FlatFee="FLAT_FEE",t.MinimumSpend="MINIMUM_SPEND",t.PerUnit="PER_UNIT",t.UsageBased="USAGE_BASED"})(e.BillingModel||(e.BillingModel={})),(function(t){t.Annually="ANNUALLY",t.Monthly="MONTHLY"})(e.BillingPeriod||(e.BillingPeriod={})),(function(t){t.Stripe="STRIPE",t.Zuora="ZUORA"})(e.BillingVendorIdentifier||(e.BillingVendorIdentifier={})),(function(t){t.Added="ADDED",t.Deleted="DELETED",t.Modified="MODIFIED",t.Reordered="REORDERED"})(e.ChangeType||(e.ChangeType={})),(function(t){t.Equals="EQUALS",t.GreaterThan="GREATER_THAN",t.GreaterThanOrEqual="GREATER_THAN_OR_EQUAL",t.IsNotNull="IS_NOT_NULL",t.IsNull="IS_NULL",t.LessThan="LESS_THAN",t.LessThanOrEqual="LESS_THAN_OR_EQUAL",t.NotEquals="NOT_EQUALS"})(e.ConditionOperation||(e.ConditionOperation={})),(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.EnvironmentId="environmentId",t.Id="id",t.Name="name",t.RefId="refId",t.Source="source",t.Status="status",t.Type="type",t.UpdatedAt="updatedAt"})(e.CouponSortFields||(e.CouponSortFields={})),(function(t){t.Stigg="STIGG",t.StiggAdhoc="STIGG_ADHOC",t.Stripe="STRIPE"})(e.CouponSource||(e.CouponSource={})),(function(t){t.Active="ACTIVE",t.Archived="ARCHIVED"})(e.CouponStatus||(e.CouponStatus={})),(function(t){t.Fixed="FIXED",t.Percentage="PERCENTAGE"})(e.CouponType||(e.CouponType={})),(function(t){t.Paid="PAID",t.Promotional="PROMOTIONAL"})(e.CreditGrantType||(e.CreditGrantType={})),(function(t){t.CreditsConsumed="CREDITS_CONSUMED",t.CreditsExpired="CREDITS_EXPIRED",t.CreditsGranted="CREDITS_GRANTED",t.CreditsVoided="CREDITS_VOIDED"})(e.CreditLedgerEventType||(e.CreditLedgerEventType={})),(function(t){t.LastDay="LAST_DAY",t.LastMonth="LAST_MONTH",t.LastWeek="LAST_WEEK",t.LastYear="LAST_YEAR"})(e.CreditUsageTimeRange||(e.CreditUsageTimeRange={})),(function(t){t.Aed="AED",t.All="ALL",t.Amd="AMD",t.Ang="ANG",t.Aud="AUD",t.Awg="AWG",t.Azn="AZN",t.Bam="BAM",t.Bbd="BBD",t.Bdt="BDT",t.Bgn="BGN",t.Bif="BIF",t.Bmd="BMD",t.Bnd="BND",t.Brl="BRL",t.Bsd="BSD",t.Bwp="BWP",t.Byn="BYN",t.Bzd="BZD",t.Cad="CAD",t.Cdf="CDF",t.Chf="CHF",t.Clp="CLP",t.Cny="CNY",t.Czk="CZK",t.Djf="DJF",t.Dkk="DKK",t.Dop="DOP",t.Dzd="DZD",t.Egp="EGP",t.Etb="ETB",t.Eur="EUR",t.Fjd="FJD",t.Gbp="GBP",t.Gel="GEL",t.Gip="GIP",t.Gmd="GMD",t.Gnf="GNF",t.Gyd="GYD",t.Hkd="HKD",t.Hrk="HRK",t.Htg="HTG",t.Idr="IDR",t.Ils="ILS",t.Inr="INR",t.Isk="ISK",t.Jmd="JMD",t.Jpy="JPY",t.Kes="KES",t.Kgs="KGS",t.Khr="KHR",t.Kmf="KMF",t.Krw="KRW",t.Kyd="KYD",t.Kzt="KZT",t.Lbp="LBP",t.Lkr="LKR",t.Lrd="LRD",t.Lsl="LSL",t.Mad="MAD",t.Mdl="MDL",t.Mga="MGA",t.Mkd="MKD",t.Mmk="MMK",t.Mnt="MNT",t.Mop="MOP",t.Mro="MRO",t.Mvr="MVR",t.Mwk="MWK",t.Mxn="MXN",t.Myr="MYR",t.Mzn="MZN",t.Nad="NAD",t.Ngn="NGN",t.Nok="NOK",t.Npr="NPR",t.Nzd="NZD",t.Pgk="PGK",t.Php="PHP",t.Pkr="PKR",t.Pln="PLN",t.Pyg="PYG",t.Qar="QAR",t.Ron="RON",t.Rsd="RSD",t.Rub="RUB",t.Rwf="RWF",t.Sar="SAR",t.Sbd="SBD",t.Scr="SCR",t.Sek="SEK",t.Sgd="SGD",t.Sle="SLE",t.Sll="SLL",t.Sos="SOS",t.Szl="SZL",t.Thb="THB",t.Tjs="TJS",t.Top="TOP",t.Try="TRY",t.Ttd="TTD",t.Tzs="TZS",t.Uah="UAH",t.Ugx="UGX",t.Usd="USD",t.Uzs="UZS",t.Vnd="VND",t.Vuv="VUV",t.Wst="WST",t.Xaf="XAF",t.Xcd="XCD",t.Xof="XOF",t.Xpf="XPF",t.Yer="YER",t.Zar="ZAR",t.Zmw="ZMW"})(e.Currency||(e.Currency={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.ResourceId="resourceId"})(e.CustomerResourceSortFields||(e.CustomerResourceSortFields={})),(function(t){t.AwsMarketplaceCustomerId="awsMarketplaceCustomerId",t.BillingId="billingId",t.CreatedAt="createdAt",t.CrmHubspotCompanyId="crmHubspotCompanyId",t.CrmHubspotCompanyUrl="crmHubspotCompanyUrl",t.CrmId="crmId",t.CustomerId="customerId",t.DeletedAt="deletedAt",t.Email="email",t.EnvironmentId="environmentId",t.Id="id",t.Name="name",t.RefId="refId",t.SalesforceId="salesforceId",t.SearchQuery="searchQuery",t.UpdatedAt="updatedAt"})(e.CustomerSortFields||(e.CustomerSortFields={})),(function(t){t.BillingCycleAnchor="billingCycleAnchor",t.BillingId="billingId",t.CancelReason="cancelReason",t.CancellationDate="cancellationDate",t.CreatedAt="createdAt",t.CrmId="crmId",t.CrmLinkUrl="crmLinkUrl",t.CurrentBillingPeriodEnd="currentBillingPeriodEnd",t.CurrentBillingPeriodStart="currentBillingPeriodStart",t.CustomerId="customerId",t.EffectiveEndDate="effectiveEndDate",t.EndDate="endDate",t.EnvironmentId="environmentId",t.Id="id",t.OldBillingId="oldBillingId",t.PayingCustomerId="payingCustomerId",t.PaymentCollection="paymentCollection",t.PricingType="pricingType",t.RefId="refId",t.ResourceId="resourceId",t.SalesforceId="salesforceId",t.StartDate="startDate",t.Status="status",t.SubscriptionId="subscriptionId",t.TrialEndDate="trialEndDate"})(e.CustomerSubscriptionSortFields||(e.CustomerSubscriptionSortFields={})),(function(t){t.CeoOrFounder="CEO_OR_FOUNDER",t.Engineering="ENGINEERING",t.Growth="GROWTH",t.Marketing="MARKETING",t.Monetization="MONETIZATION",t.Other="OTHER",t.Product="PRODUCT"})(e.Department||(e.Department={})),(function(t){t.Forever="FOREVER",t.Once="ONCE",t.Repeating="REPEATING"})(e.DiscountDurationType||(e.DiscountDurationType={})),(function(t){t.Fixed="FIXED",t.Percentage="PERCENTAGE"})(e.DiscountType||(e.DiscountType={})),(function(t){t.Increment="Increment",t.Override="Override"})(e.EntitlementBehavior||(e.EntitlementBehavior={})),(function(t){t.Day="DAY",t.Hour="HOUR",t.Month="MONTH",t.Week="WEEK",t.Year="YEAR"})(e.EntitlementResetPeriod||(e.EntitlementResetPeriod={})),(function(t){t.CustomerNotFound="CustomerNotFound",t.NoActiveSubscription="NoActiveSubscription"})(e.EntitlementsStateAccessDeniedReason||(e.EntitlementsStateAccessDeniedReason={})),(function(t){t.BlackList="BLACK_LIST",t.WhiteList="WHITE_LIST"})(e.EntitySelectionMode||(e.EntitySelectionMode={})),(function(t){t.Admin="ADMIN",t.None="NONE",t.Support="SUPPORT",t.Viewer="VIEWER"})(e.EnvironmentAccessRole||(e.EnvironmentAccessRole={})),(function(t){t.Done="DONE",t.Failed="FAILED",t.InProgress="IN_PROGRESS",t.NotProvisioned="NOT_PROVISIONED"})(e.EnvironmentProvisionStatus||(e.EnvironmentProvisionStatus={})),(function(t){t.CreatedAt="createdAt",t.DisplayName="displayName",t.Id="id",t.PermanentDeletionDate="permanentDeletionDate",t.Slug="slug"})(e.EnvironmentSortFields||(e.EnvironmentSortFields={})),(function(t){t.Development="DEVELOPMENT",t.Production="PRODUCTION",t.Sandbox="SANDBOX"})(e.EnvironmentType||(e.EnvironmentType={})),(function(t){t.AccessDeniedError="AccessDeniedError",t.AccountNotFoundError="AccountNotFoundError",t.AddonDependencyMissingError="AddonDependencyMissingError",t.AddonHasToHavePriceError="AddonHasToHavePriceError",t.AddonIsCompatibleWithGroup="AddonIsCompatibleWithGroup",t.AddonIsCompatibleWithPlan="AddonIsCompatibleWithPlan",t.AddonNotFound="AddonNotFound",t.AddonQuantityExceedsLimitError="AddonQuantityExceedsLimitError",t.AddonWithDraftCannotBeDeletedError="AddonWithDraftCannotBeDeletedError",t.AddonsNotFound="AddonsNotFound",t.AmountTooLarge="AmountTooLarge",t.ArchivedCouponCantBeApplied="ArchivedCouponCantBeApplied",t.AuthCustomerMismatch="AuthCustomerMismatch",t.AuthCustomerReadonly="AuthCustomerReadonly",t.AwsMarketplaceIntegrationError="AwsMarketplaceIntegrationError",t.AwsMarketplaceIntegrationValidationError="AwsMarketplaceIntegrationValidationError",t.BadUserInput="BadUserInput",t.BillingIntegrationAlreadyExistsError="BillingIntegrationAlreadyExistsError",t.BillingIntegrationMissing="BillingIntegrationMissing",t.BillingPeriodMissingError="BillingPeriodMissingError",t.CanNotUpdateEntitlementsFeatureGroup="CanNotUpdateEntitlementsFeatureGroup",t.CannotAddOverrideEntitlementToPlan="CannotAddOverrideEntitlementToPlan",t.CannotArchiveFeatureError="CannotArchiveFeatureError",t.CannotArchiveFeatureGroupError="CannotArchiveFeatureGroupError",t.CannotChangeBillingIntegration="CannotChangeBillingIntegration",t.CannotDeleteCustomerError="CannotDeleteCustomerError",t.CannotDeleteDefaultIntegration="CannotDeleteDefaultIntegration",t.CannotDeleteFeatureError="CannotDeleteFeatureError",t.CannotDeleteProductError="CannotDeleteProductError",t.CannotEditPackageInNonDraftMode="CannotEditPackageInNonDraftMode",t.CannotRemovePaymentMethodFromCustomerError="CannotRemovePaymentMethodFromCustomerError",t.CannotReportUsageForEntitlementWithMeterError="CannotReportUsageForEntitlementWithMeterError",t.CannotUpdateExpireAtForExpiredCreditGrantError="CannotUpdateExpireAtForExpiredCreditGrantError",t.CannotUpdateUnitTransformationError="CannotUpdateUnitTransformationError",t.CannotUpsertToPackageThatHasDraft="CannotUpsertToPackageThatHasDraft",t.ChangingPayingCustomerIsNotSupportedError="ChangingPayingCustomerIsNotSupportedError",t.CheckoutIsNotSupported="CheckoutIsNotSupported",t.CouponNotFound="CouponNotFound",t.CreditGrantAlreadyVoided="CreditGrantAlreadyVoided",t.CreditGrantNotFound="CreditGrantNotFound",t.CustomCurrencyNotFound="CustomCurrencyNotFound",t.CustomerAlreadyHaveCustomerCoupon="CustomerAlreadyHaveCustomerCoupon",t.CustomerAlreadyUsesCoupon="CustomerAlreadyUsesCoupon",t.CustomerHasNoEmailAddress="CustomerHasNoEmailAddress",t.CustomerNoBillingId="CustomerNoBillingId",t.CustomerNotFound="CustomerNotFound",t.CustomerResourceNotFound="CustomerResourceNotFound",t.DeprecatedEstimateSubscriptionError="DeprecatedEstimateSubscriptionError",t.DowngradeBillingPeriodNotSupportedError="DowngradeBillingPeriodNotSupportedError",t.DraftAddonCantBeArchived="DraftAddonCantBeArchived",t.DraftAlreadyExists="DraftAlreadyExists",t.DraftPlanCantBeArchived="DraftPlanCantBeArchived",t.DuplicateAddonProvisionedError="DuplicateAddonProvisionedError",t.DuplicateIntegrationNotAllowed="DuplicateIntegrationNotAllowed",t.DuplicateProductValidationError="DuplicateProductValidationError",t.DuplicatedEntityNotAllowed="DuplicatedEntityNotAllowed",t.EditAllowedOnDraftPackageOnlyError="EditAllowedOnDraftPackageOnlyError",t.EntitlementBelongsToFeatureGroupError="EntitlementBelongsToFeatureGroupError",t.EntitlementLimitExceededError="EntitlementLimitExceededError",t.EntitlementUsageOutOfRangeError="EntitlementUsageOutOfRangeError",t.EntitlementsMustBelongToSamePackage="EntitlementsMustBelongToSamePackage",t.EntityIdDifferentFromRefIdError="EntityIdDifferentFromRefIdError",t.EntityIsArchivedError="EntityIsArchivedError",t.EnvironmentMissing="EnvironmentMissing",t.ExperimentAlreadyRunning="ExperimentAlreadyRunning",t.ExperimentNotFoundError="ExperimentNotFoundError",t.ExperimentStatusError="ExperimentStatusError",t.ExpireAtMustBeLaterThanEffectiveAtError="ExpireAtMustBeLaterThanEffectiveAtError",t.FailedToCreateCheckoutSessionError="FailedToCreateCheckoutSessionError",t.FailedToImportCustomer="FailedToImportCustomer",t.FailedToImportSubscriptions="FailedToImportSubscriptions",t.FailedToResolveBillingIntegration="FailedToResolveBillingIntegration",t.FeatureConfigurationExceededLimitError="FeatureConfigurationExceededLimitError",t.FeatureGroupMissingFeaturesError="FeatureGroupMissingFeaturesError",t.FeatureGroupNotFoundError="FeatureGroupNotFoundError",t.FeatureNotBelongToFeatureGroupError="FeatureNotBelongToFeatureGroupError",t.FeatureNotFound="FeatureNotFound",t.FetchAllCountriesPricesNotAllowed="FetchAllCountriesPricesNotAllowed",t.FreePlanCantHaveCompatiblePackageGroupError="FreePlanCantHaveCompatiblePackageGroupError",t.GraphQlAliasesLimitExceeded="GraphQLAliasesLimitExceeded",t.GraphQlBatchedOperationsLimitExceeded="GraphQLBatchedOperationsLimitExceeded",t.GraphQlUnsupportedDirective="GraphQLUnsupportedDirective",t.HubspotIntegrationError="HubspotIntegrationError",t.IdentityForbidden="IdentityForbidden",t.ImportAlreadyInProgress="ImportAlreadyInProgress",t.ImportSubscriptionsBulkError="ImportSubscriptionsBulkError",t.IncompatibleSubscriptionAddon="IncompatibleSubscriptionAddon",t.InitStripePaymentMethodError="InitStripePaymentMethodError",t.IntegrationNotFound="IntegrationNotFound",t.IntegrationValidationError="IntegrationValidationError",t.IntegrityViolation="IntegrityViolation",t.InvalidAddressError="InvalidAddressError",t.InvalidArgumentError="InvalidArgumentError",t.InvalidCancellationDate="InvalidCancellationDate",t.InvalidDoggoSignatureError="InvalidDoggoSignatureError",t.InvalidEntitlementResetPeriod="InvalidEntitlementResetPeriod",t.InvalidMemberDelete="InvalidMemberDelete",t.InvalidMetadataError="InvalidMetadataError",t.InvalidQuantity="InvalidQuantity",t.InvalidSubscriptionStatus="InvalidSubscriptionStatus",t.InvalidUpdatePriceUnitAmountError="InvalidUpdatePriceUnitAmountError",t.MemberInvitationError="MemberInvitationError",t.MemberNotFound="MemberNotFound",t.MergeEnvironmentValidationError="MergeEnvironmentValidationError",t.MeterMustBeAssociatedToMeteredFeature="MeterMustBeAssociatedToMeteredFeature",t.MeteringNotAvailableForFeatureType="MeteringNotAvailableForFeatureType",t.MissingEntityIdError="MissingEntityIdError",t.MissingSubscriptionInvoiceError="MissingSubscriptionInvoiceError",t.MultiSubscriptionCantBeAutoCancellationSourceError="MultiSubscriptionCantBeAutoCancellationSourceError",t.NoActiveSubscriptionForCustomer="NoActiveSubscriptionForCustomer",t.NoDraftOfferFound="NoDraftOfferFound",t.NoFeatureEntitlementError="NoFeatureEntitlementError",t.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",t.NoProductsAvailable="NoProductsAvailable",t.OfferAlreadyExists="OfferAlreadyExists",t.OfferNotFound="OfferNotFound",t.OperationNotAllowedDuringInProgressExperiment="OperationNotAllowedDuringInProgressExperiment",t.PackageAlreadyPublished="PackageAlreadyPublished",t.PackageGroupMinItemsError="PackageGroupMinItemsError",t.PackageGroupNotFound="PackageGroupNotFound",t.PackagePricingTypeNotSet="PackagePricingTypeNotSet",t.PaymentMethodNotFoundError="PaymentMethodNotFoundError",t.PlanCannotBePublishWhenBasePlanIsDraft="PlanCannotBePublishWhenBasePlanIsDraft",t.PlanCannotBePublishWhenCompatibleAddonIsDraft="PlanCannotBePublishWhenCompatibleAddonIsDraft",t.PlanIsUsedAsDefaultStartPlan="PlanIsUsedAsDefaultStartPlan",t.PlanIsUsedAsDowngradePlan="PlanIsUsedAsDowngradePlan",t.PlanNotFound="PlanNotFound",t.PlanWithChildCantBeDeleted="PlanWithChildCantBeDeleted",t.PlansCircularDependencyError="PlansCircularDependencyError",t.PreparePaymentMethodFormError="PreparePaymentMethodFormError",t.PriceNotFound="PriceNotFound",t.ProductNotFoundError="ProductNotFoundError",t.PromotionCodeCustomerNotFirstPurchase="PromotionCodeCustomerNotFirstPurchase",t.PromotionCodeMaxRedemptionsReached="PromotionCodeMaxRedemptionsReached",t.PromotionCodeMinimumAmountNotReached="PromotionCodeMinimumAmountNotReached",t.PromotionCodeNotActive="PromotionCodeNotActive",t.PromotionCodeNotForCustomer="PromotionCodeNotForCustomer",t.PromotionCodeNotFound="PromotionCodeNotFound",t.PromotionalEntitlementNotFoundError="PromotionalEntitlementNotFoundError",t.RateLimitExceeded="RateLimitExceeded",t.RecalculateEntitlementsError="RecalculateEntitlementsError",t.RequiredSsoAuthenticationError="RequiredSsoAuthenticationError",t.ResyncAlreadyInProgress="ResyncAlreadyInProgress",t.ScheduledMigrationAlreadyExistsError="ScheduledMigrationAlreadyExistsError",t.SelectedBillingModelDoesntMatchImportedItemError="SelectedBillingModelDoesntMatchImportedItemError",t.SingleSubscriptionCantBeAutoCancellationTargetError="SingleSubscriptionCantBeAutoCancellationTargetError",t.StripeCustomerIsDeleted="StripeCustomerIsDeleted",t.StripeError="StripeError",t.SubscriptionAlreadyCanceledOrExpired="SubscriptionAlreadyCanceledOrExpired",t.SubscriptionAlreadyOnLatestPlanError="SubscriptionAlreadyOnLatestPlanError",t.SubscriptionDoesNotHaveBillingPeriod="SubscriptionDoesNotHaveBillingPeriod",t.SubscriptionInvoiceStatusError="SubscriptionInvoiceStatusError",t.SubscriptionMustHaveSinglePlanError="SubscriptionMustHaveSinglePlanError",t.SubscriptionNoBillingId="SubscriptionNoBillingId",t.SubscriptionNotFound="SubscriptionNotFound",t.TooManyCustomCurrencies="TooManyCustomCurrencies",t.TooManySubscriptionsPerCustomer="TooManySubscriptionsPerCustomer",t.TrialMustBeCancelledImmediately="TrialMustBeCancelledImmediately",t.UnPublishedPackage="UnPublishedPackage",t.Unauthenticated="Unauthenticated",t.UnexpectedError="UnexpectedError",t.UnsupportedFeatureType="UnsupportedFeatureType",t.UnsupportedParameter="UnsupportedParameter",t.UnsupportedSubscriptionScheduleType="UnsupportedSubscriptionScheduleType",t.UnsupportedVendorIdentifier="UnsupportedVendorIdentifier",t.UsageMeasurementDiffOutOfRangeError="UsageMeasurementDiffOutOfRangeError",t.VersionExceedsMaxValueError="VersionExceedsMaxValueError",t.WorkflowTriggerNotFound="WorkflowTriggerNotFound"})(e.ErrorCode||(e.ErrorCode={})),(function(t){t.AppCustomer="APP_CUSTOMER",t.AppPublic="APP_PUBLIC",t.AppServer="APP_SERVER",t.Aws="AWS",t.Import="IMPORT",t.Migration="MIGRATION",t.Salesforce="SALESFORCE",t.Scheduler="SCHEDULER",t.Service="SERVICE",t.Stripe="STRIPE",t.Support="SUPPORT",t.System="SYSTEM",t.User="USER",t.Workflow="WORKFLOW"})(e.EventActor||(e.EventActor={})),(function(t){t.Addon="ADDON",t.Coupon="COUPON",t.Credit="CREDIT",t.Customer="CUSTOMER",t.Entitlement="ENTITLEMENT",t.Feature="FEATURE",t.FeatureGroup="FEATURE_GROUP",t.Import="IMPORT",t.Measurement="MEASUREMENT",t.Package="PACKAGE",t.PackageGroup="PACKAGE_GROUP",t.Plan="PLAN",t.Product="PRODUCT",t.PromotionalEntitlement="PROMOTIONAL_ENTITLEMENT",t.Subscription="SUBSCRIPTION"})(e.EventEntityType||(e.EventEntityType={})),(function(t){t.CreatedAt="createdAt",t.EntityId="entityId",t.EnvironmentId="environmentId",t.EventLogType="eventLogType",t.Id="id",t.ParentEntityId="parentEntityId"})(e.EventLogSortFields||(e.EventLogSortFields={})),(function(t){t.AddonCreated="ADDON_CREATED",t.AddonDeleted="ADDON_DELETED",t.AddonUpdated="ADDON_UPDATED",t.CouponArchived="COUPON_ARCHIVED",t.CouponCreated="COUPON_CREATED",t.CouponUpdated="COUPON_UPDATED",t.CreateSubscriptionFailed="CREATE_SUBSCRIPTION_FAILED",t.CreditsBalanceDepletedOld="CREDITS_BALANCE_DEPLETED_OLD",t.CreditsBalanceLowOld="CREDITS_BALANCE_LOW_OLD",t.CreditsGrantBalanceLowOld="CREDITS_GRANT_BALANCE_LOW_OLD",t.CreditsGrantDepletedOld="CREDITS_GRANT_DEPLETED_OLD",t.CreditsGrantExpiredOld="CREDITS_GRANT_EXPIRED_OLD",t.CreditsGrantGrantedOld="CREDITS_GRANT_GRANTED_OLD",t.CreditsGrantUpdatedOld="CREDITS_GRANT_UPDATED_OLD",t.CreditBalanceDepleted="CREDIT_BALANCE_DEPLETED",t.CreditBalanceLow="CREDIT_BALANCE_LOW",t.CreditGrantBalanceLow="CREDIT_GRANT_BALANCE_LOW",t.CreditGrantCreated="CREDIT_GRANT_CREATED",t.CreditGrantDepleted="CREDIT_GRANT_DEPLETED",t.CreditGrantExpired="CREDIT_GRANT_EXPIRED",t.CreditGrantUpdated="CREDIT_GRANT_UPDATED",t.CreditGrantVoided="CREDIT_GRANT_VOIDED",t.CustomerCreated="CUSTOMER_CREATED",t.CustomerDeleted="CUSTOMER_DELETED",t.CustomerEntitlementCalculationTriggered="CUSTOMER_ENTITLEMENT_CALCULATION_TRIGGERED",t.CustomerPaymentFailed="CUSTOMER_PAYMENT_FAILED",t.CustomerResourceEntitlementCalculationTriggered="CUSTOMER_RESOURCE_ENTITLEMENT_CALCULATION_TRIGGERED",t.CustomerUpdated="CUSTOMER_UPDATED",t.EdgeApiClientConfigurationDataResync="EDGE_API_CLIENT_CONFIGURATION_DATA_RESYNC",t.EdgeApiCustomerDataResync="EDGE_API_CUSTOMER_DATA_RESYNC",t.EdgeApiDataResync="EDGE_API_DATA_RESYNC",t.EdgeApiDoggoResync="EDGE_API_DOGGO_RESYNC",t.EdgeApiPackageEntitlementsDataResync="EDGE_API_PACKAGE_ENTITLEMENTS_DATA_RESYNC",t.EdgeApiSubscriptionsDataResync="EDGE_API_SUBSCRIPTIONS_DATA_RESYNC",t.EntitlementsUpdated="ENTITLEMENTS_UPDATED",t.EntitlementDenied="ENTITLEMENT_DENIED",t.EntitlementGranted="ENTITLEMENT_GRANTED",t.EntitlementRequested="ENTITLEMENT_REQUESTED",t.EntitlementUsageExceeded="ENTITLEMENT_USAGE_EXCEEDED",t.EnvironmentDeleted="ENVIRONMENT_DELETED",t.FeatureArchived="FEATURE_ARCHIVED",t.FeatureCreated="FEATURE_CREATED",t.FeatureDeleted="FEATURE_DELETED",t.FeatureGroupArchived="FEATURE_GROUP_ARCHIVED",t.FeatureGroupCreated="FEATURE_GROUP_CREATED",t.FeatureGroupUnArchived="FEATURE_GROUP_UN_ARCHIVED",t.FeatureGroupUpdated="FEATURE_GROUP_UPDATED",t.FeatureUpdated="FEATURE_UPDATED",t.ImportIntegrationCatalogTriggered="IMPORT_INTEGRATION_CATALOG_TRIGGERED",t.ImportIntegrationCustomersTriggered="IMPORT_INTEGRATION_CUSTOMERS_TRIGGERED",t.ImportSubscriptionsBulkTriggered="IMPORT_SUBSCRIPTIONS_BULK_TRIGGERED",t.MeasurementReported="MEASUREMENT_REPORTED",t.PackageGroupCreated="PACKAGE_GROUP_CREATED",t.PackageGroupUpdated="PACKAGE_GROUP_UPDATED",t.PackagePublished="PACKAGE_PUBLISHED",t.PlanCreated="PLAN_CREATED",t.PlanDeleted="PLAN_DELETED",t.PlanUpdated="PLAN_UPDATED",t.ProductCreated="PRODUCT_CREATED",t.ProductDeleted="PRODUCT_DELETED",t.ProductUpdated="PRODUCT_UPDATED",t.PromotionalEntitlementEndsSoon="PROMOTIONAL_ENTITLEMENT_ENDS_SOON",t.PromotionalEntitlementExpired="PROMOTIONAL_ENTITLEMENT_EXPIRED",t.PromotionalEntitlementGranted="PROMOTIONAL_ENTITLEMENT_GRANTED",t.PromotionalEntitlementRevoked="PROMOTIONAL_ENTITLEMENT_REVOKED",t.PromotionalEntitlementUpdated="PROMOTIONAL_ENTITLEMENT_UPDATED",t.RecalculateEntitlementsTriggered="RECALCULATE_ENTITLEMENTS_TRIGGERED",t.ResyncIntegrationTriggered="RESYNC_INTEGRATION_TRIGGERED",t.SubscriptionsMigrated="SUBSCRIPTIONS_MIGRATED",t.SubscriptionsMigrationTriggered="SUBSCRIPTIONS_MIGRATION_TRIGGERED",t.SubscriptionBillingMonthEndsSoon="SUBSCRIPTION_BILLING_MONTH_ENDS_SOON",t.SubscriptionCanceled="SUBSCRIPTION_CANCELED",t.SubscriptionCreated="SUBSCRIPTION_CREATED",t.SubscriptionExpired="SUBSCRIPTION_EXPIRED",t.SubscriptionSpentLimitExceeded="SUBSCRIPTION_SPENT_LIMIT_EXCEEDED",t.SubscriptionTrialConverted="SUBSCRIPTION_TRIAL_CONVERTED",t.SubscriptionTrialEndsSoon="SUBSCRIPTION_TRIAL_ENDS_SOON",t.SubscriptionTrialExpired="SUBSCRIPTION_TRIAL_EXPIRED",t.SubscriptionTrialStarted="SUBSCRIPTION_TRIAL_STARTED",t.SubscriptionUpdated="SUBSCRIPTION_UPDATED",t.SubscriptionUsageChargeTriggered="SUBSCRIPTION_USAGE_CHARGE_TRIGGERED",t.SubscriptionUsageUpdated="SUBSCRIPTION_USAGE_UPDATED",t.SyncFailed="SYNC_FAILED",t.WidgetConfigurationUpdated="WIDGET_CONFIGURATION_UPDATED"})(e.EventLogType||(e.EventLogType={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Name="name",t.ProductId="productId",t.RefId="refId",t.Status="status"})(e.ExperimentSortFields||(e.ExperimentSortFields={})),(function(t){t.Completed="COMPLETED",t.Draft="DRAFT",t.InProgress="IN_PROGRESS"})(e.ExperimentStatus||(e.ExperimentStatus={})),(function(t){t.CreatedAt="createdAt",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.FeatureGroupId="featureGroupId",t.Id="id",t.IsLatest="isLatest",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber"})(e.FeatureGroupSortFields||(e.FeatureGroupSortFields={})),(function(t){t.Archived="ARCHIVED",t.Published="PUBLISHED"})(e.FeatureGroupStatus||(e.FeatureGroupStatus={})),(function(t){t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.FeatureStatus="featureStatus",t.FeatureType="featureType",t.Id="id",t.MeterType="meterType",t.RefId="refId",t.UpdatedAt="updatedAt"})(e.FeatureSortFields||(e.FeatureSortFields={})),(function(t){t.Active="ACTIVE",t.New="NEW",t.Suspended="SUSPENDED"})(e.FeatureStatus||(e.FeatureStatus={})),(function(t){t.Boolean="BOOLEAN",t.Enum="ENUM",t.Number="NUMBER"})(e.FeatureType||(e.FeatureType={})),(function(t){t.Bold="BOLD",t.Normal="NORMAL"})(e.FontWeight||(e.FontWeight={})),(function(t){t.CreatedAt="createdAt",t.Endpoint="endpoint",t.EnvironmentId="environmentId",t.Id="id",t.Status="status"})(e.HookSortFields||(e.HookSortFields={})),(function(t){t.Active="ACTIVE",t.Inactive="INACTIVE"})(e.HookStatus||(e.HookStatus={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Status="status",t.TaskType="taskType"})(e.ImportIntegrationTaskSortFields||(e.ImportIntegrationTaskSortFields={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.VendorIdentifier="vendorIdentifier",t.VendorType="vendorType"})(e.IntegrationSortFields||(e.IntegrationSortFields={})),(function(t){t.AddonCharge="AddonCharge",t.BaseCharge="BaseCharge",t.InAdvanceCommitmentCharge="InAdvanceCommitmentCharge",t.MinimumSpendAdjustmentCharge="MinimumSpendAdjustmentCharge",t.MinimumSpendCharge="MinimumSpendCharge",t.Other="Other",t.OverageCharge="OverageCharge",t.PayAsYouGoCharge="PayAsYouGoCharge",t.TierCharge="TierCharge",t.ZeroAmountBaseCharge="ZeroAmountBaseCharge"})(e.InvoiceLineItemType||(e.InvoiceLineItemType={})),(function(t){t.CreatedAt="createdAt",t.Email="email",t.Id="id"})(e.MemberSortFields||(e.MemberSortFields={})),(function(t){t.Invited="INVITED",t.Registered="REGISTERED"})(e.MemberStatus||(e.MemberStatus={})),(function(t){t.Fluctuating="Fluctuating",t.Incremental="Incremental",t.None="None"})(e.MeterType||(e.MeterType={})),(function(t){t.StartOfTheMonth="StartOfTheMonth",t.SubscriptionStart="SubscriptionStart"})(e.MonthlyAccordingTo||(e.MonthlyAccordingTo={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.IsDefault="isDefault",t.IsLatest="isLatest",t.OfferId="offerId",t.Status="status",t.Version="version"})(e.OfferSortFields||(e.OfferSortFields={})),(function(t){t.Archived="ARCHIVED",t.Draft="DRAFT",t.Published="PUBLISHED"})(e.OfferStatus||(e.OfferStatus={})),(function(t){t.Monthly="MONTHLY",t.OnSubscriptionRenewal="ON_SUBSCRIPTION_RENEWAL"})(e.OverageBillingPeriod||(e.OverageBillingPeriod={})),(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsLatest="isLatest",t.PricingType="pricingType",t.ProductId="productId",t.RefId="refId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber"})(e.PackageDtoSortFields||(e.PackageDtoSortFields={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.PackageId="packageId",t.UpdatedAt="updatedAt"})(e.PackageEntitlementSortFields||(e.PackageEntitlementSortFields={})),(function(t){t.CreatedAt="createdAt",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.IsLatest="isLatest",t.PackageGroupId="packageGroupId",t.ProductId="productId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber"})(e.PackageGroupSortFields||(e.PackageGroupSortFields={})),(function(t){t.Archived="ARCHIVED",t.Draft="DRAFT",t.Published="PUBLISHED"})(e.PackageGroupStatus||(e.PackageGroupStatus={})),(function(t){t.Archived="ARCHIVED",t.Draft="DRAFT",t.Published="PUBLISHED"})(e.PackageStatus||(e.PackageStatus={})),(function(t){t.ActionRequired="ACTION_REQUIRED",t.Failed="FAILED",t.NotRequired="NOT_REQUIRED",t.Processing="PROCESSING"})(e.PaymentCollection||(e.PaymentCollection={})),(function(t){t.Charge="CHARGE",t.Invoice="INVOICE",t.None="NONE"})(e.PaymentCollectionMethod||(e.PaymentCollectionMethod={})),(function(t){t.Bank="BANK",t.Card="CARD",t.CashApp="CASH_APP"})(e.PaymentMethodType||(e.PaymentMethodType={})),(function(t){t.Downgrade="DOWNGRADE",t.None="NONE",t.Upgrade="UPGRADE"})(e.PlanChangeType||(e.PlanChangeType={})),(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsLatest="isLatest",t.PricingType="pricingType",t.ProductId="productId",t.RefId="refId",t.Status="status",t.UpdatedAt="updatedAt",t.VersionNumber="versionNumber"})(e.PlanSortFields||(e.PlanSortFields={})),(function(t){t.BillingCadence="billingCadence",t.BillingId="billingId",t.BillingModel="billingModel",t.BillingPeriod="billingPeriod",t.CreatedAt="createdAt",t.Id="id",t.TiersMode="tiersMode"})(e.PriceSortFields||(e.PriceSortFields={})),(function(t){t.Custom="CUSTOM",t.Free="FREE",t.Paid="PAID"})(e.PricingType||(e.PricingType={})),(function(t){t.AwsMarketplaceProductCode="awsMarketplaceProductCode",t.AwsMarketplaceProductId="awsMarketplaceProductId",t.CreatedAt="createdAt",t.Description="description",t.DisplayName="displayName",t.EnvironmentId="environmentId",t.Id="id",t.IsDefaultProduct="isDefaultProduct",t.MultipleSubscriptions="multipleSubscriptions",t.RefId="refId",t.UpdatedAt="updatedAt"})(e.ProductSortFields||(e.ProductSortFields={})),(function(t){t.Custom="CUSTOM",t.Lifetime="LIFETIME",t.OneMonth="ONE_MONTH",t.OneWeek="ONE_WEEK",t.OneYear="ONE_YEAR",t.SixMonth="SIX_MONTH"})(e.PromotionalEntitlementPeriod||(e.PromotionalEntitlementPeriod={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Status="status",t.UpdatedAt="updatedAt"})(e.PromotionalEntitlementSortFields||(e.PromotionalEntitlementSortFields={})),(function(t){t.Active="Active",t.Expired="Expired",t.Paused="Paused"})(e.PromotionalEntitlementStatus||(e.PromotionalEntitlementStatus={})),(function(t){t.CreateProrations="CREATE_PRORATIONS",t.InvoiceImmediately="INVOICE_IMMEDIATELY"})(e.ProrationBehavior||(e.ProrationBehavior={})),(function(t){t.PaymentRequired="PAYMENT_REQUIRED",t.Success="SUCCESS"})(e.ProvisionSubscriptionStatus||(e.ProvisionSubscriptionStatus={})),(function(t){t.AllCustomers="ALL_CUSTOMERS",t.NewCustomers="NEW_CUSTOMERS"})(e.PublishMigrationType||(e.PublishMigrationType={})),(function(t){t.EndOfBillingMonth="END_OF_BILLING_MONTH",t.EndOfBillingPeriod="END_OF_BILLING_PERIOD",t.Immediate="IMMEDIATE"})(e.ScheduleStrategy||(e.ScheduleStrategy={})),(function(t){t.Asc="ASC",t.Desc="DESC"})(e.SortDirection||(e.SortDirection={})),(function(t){t.NullsFirst="NULLS_FIRST",t.NullsLast="NULLS_LAST"})(e.SortNulls||(e.SortNulls={})),(function(t){t.JsClientSdk="JS_CLIENT_SDK",t.NodeServerSdk="NODE_SERVER_SDK",t.PersistentCacheService="PERSISTENT_CACHE_SERVICE"})(e.SourceType||(e.SourceType={})),(function(t){t.CreatedAt="createdAt",t.Id="id",t.Quantity="quantity",t.UpdatedAt="updatedAt"})(e.SubscriptionAddonSortFields||(e.SubscriptionAddonSortFields={})),(function(t){t.AutoCancellationRule="AutoCancellationRule",t.CancelledByBilling="CancelledByBilling",t.CustomerArchived="CustomerArchived",t.DetachBilling="DetachBilling",t.Expired="Expired",t.Immediate="Immediate",t.PendingPaymentExpired="PendingPaymentExpired",t.ScheduledCancellation="ScheduledCancellation",t.TrialConverted="TrialConverted",t.TrialEnded="TrialEnded",t.UpgradeOrDowngrade="UpgradeOrDowngrade"})(e.SubscriptionCancelReason||(e.SubscriptionCancelReason={})),(function(t){t.Default="DEFAULT",t.RevokeEntitlements="REVOKE_ENTITLEMENTS"})(e.SubscriptionCancellationAction||(e.SubscriptionCancellationAction={})),(function(t){t.EndOfBillingPeriod="END_OF_BILLING_PERIOD",t.Immediate="IMMEDIATE",t.SpecificDate="SPECIFIC_DATE"})(e.SubscriptionCancellationTime||(e.SubscriptionCancellationTime={})),(function(t){t.Active="ACTIVE",t.Expired="EXPIRED",t.Removed="REMOVED"})(e.SubscriptionCouponStatus||(e.SubscriptionCouponStatus={})),(function(t){t.PredefinedFreePlan="PREDEFINED_FREE_PLAN",t.PredefinedTrialPlan="PREDEFINED_TRIAL_PLAN",t.RequestedPlan="REQUESTED_PLAN",t.SkippedSubscriptionCreation="SKIPPED_SUBSCRIPTION_CREATION"})(e.SubscriptionDecisionStrategy||(e.SubscriptionDecisionStrategy={})),(function(t){t.CancelSubscription="CANCEL_SUBSCRIPTION",t.DowngradeToFree="DOWNGRADE_TO_FREE"})(e.SubscriptionEndSetup||(e.SubscriptionEndSetup={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.SubscriptionId="subscriptionId",t.UpdatedAt="updatedAt"})(e.SubscriptionEntitlementSortFields||(e.SubscriptionEntitlementSortFields={})),(function(t){t.BillingCycle="BILLING_CYCLE",t.Manual="MANUAL",t.MinimumInvoiceAmountExceeded="MINIMUM_INVOICE_AMOUNT_EXCEEDED",t.Other="OTHER",t.SubscriptionCreation="SUBSCRIPTION_CREATION",t.SubscriptionUpdate="SUBSCRIPTION_UPDATE"})(e.SubscriptionInvoiceBillingReason||(e.SubscriptionInvoiceBillingReason={})),(function(t){t.Canceled="CANCELED",t.Open="OPEN",t.Paid="PAID"})(e.SubscriptionInvoiceStatus||(e.SubscriptionInvoiceStatus={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id",t.Status="status",t.TaskType="taskType"})(e.SubscriptionMigrationTaskSortFields||(e.SubscriptionMigrationTaskSortFields={})),(function(t){t.EndOfBillingPeriod="END_OF_BILLING_PERIOD",t.Immediate="IMMEDIATE"})(e.SubscriptionMigrationTime||(e.SubscriptionMigrationTime={})),(function(t){t.BillingModel="billingModel",t.CreatedAt="createdAt",t.FeatureId="featureId",t.HasSoftLimit="hasSoftLimit",t.Id="id",t.UpdatedAt="updatedAt",t.UsageLimit="usageLimit"})(e.SubscriptionPriceSortFields||(e.SubscriptionPriceSortFields={})),(function(t){t.CreateProrations="CREATE_PRORATIONS",t.InvoiceImmediately="INVOICE_IMMEDIATELY",t.None="NONE"})(e.SubscriptionProrationBehavior||(e.SubscriptionProrationBehavior={})),(function(t){t.BillingId="billingId",t.CreatedAt="createdAt",t.CustomerId="customerId",t.EnvironmentId="environmentId",t.ProductId="productId",t.ResourceId="resourceId",t.SalesforceId="salesforceId",t.StartDate="startDate",t.Status="status",t.SubscriptionId="subscriptionId"})(e.SubscriptionQuerySortFields||(e.SubscriptionQuerySortFields={})),(function(t){t.Canceled="Canceled",t.Done="Done",t.Failed="Failed",t.PendingPayment="PendingPayment",t.Scheduled="Scheduled"})(e.SubscriptionScheduleStatus||(e.SubscriptionScheduleStatus={})),(function(t){t.AdditionalMetaData="AdditionalMetaData",t.Addon="Addon",t.BillingInfoMetadata="BillingInfoMetadata",t.BillingPeriod="BillingPeriod",t.Coupon="Coupon",t.Downgrade="Downgrade",t.MigrateToLatest="MigrateToLatest",t.Plan="Plan",t.PriceOverride="PriceOverride",t.UnitAmount="UnitAmount"})(e.SubscriptionScheduleType||(e.SubscriptionScheduleType={})),(function(t){t.FreePlan="FREE_PLAN",t.PlanSelection="PLAN_SELECTION",t.TrialPeriod="TRIAL_PERIOD"})(e.SubscriptionStartSetup||(e.SubscriptionStartSetup={})),(function(t){t.Active="ACTIVE",t.Canceled="CANCELED",t.Expired="EXPIRED",t.InTrial="IN_TRIAL",t.NotStarted="NOT_STARTED",t.PaymentPending="PAYMENT_PENDING"})(e.SubscriptionStatus||(e.SubscriptionStatus={})),(function(t){t.AlwaysReset="ALWAYS_RESET",t.BillingPeriodChange="BILLING_PERIOD_CHANGE",t.NeverReset="NEVER_RESET"})(e.SubscriptionUpdateUsageCutoffBehavior||(e.SubscriptionUpdateUsageCutoffBehavior={})),(function(t){t.Error="ERROR",t.NoSyncRequired="NO_SYNC_REQUIRED",t.Pending="PENDING",t.Success="SUCCESS"})(e.SyncStatus||(e.SyncStatus={})),(function(t){t.Canceled="CANCELED",t.Completed="COMPLETED",t.Failed="FAILED",t.InProgress="IN_PROGRESS",t.PartiallyFailed="PARTIALLY_FAILED",t.Pending="PENDING"})(e.TaskStatus||(e.TaskStatus={})),(function(t){t.ImportIntegrationCatalog="IMPORT_INTEGRATION_CATALOG",t.ImportIntegrationCustomers="IMPORT_INTEGRATION_CUSTOMERS",t.ImportSubscriptionsBulk="IMPORT_SUBSCRIPTIONS_BULK",t.RecalculateBatchEntitlements="RECALCULATE_BATCH_ENTITLEMENTS",t.RecalculateEntitlements="RECALCULATE_ENTITLEMENTS",t.ResyncIntegration="RESYNC_INTEGRATION",t.SubscriptionMigration="SUBSCRIPTION_MIGRATION",t.SubscriptionMigrationV2="SUBSCRIPTION_MIGRATION_V2"})(e.TaskType||(e.TaskType={})),(function(t){t.Graduated="GRADUATED",t.Volume="VOLUME"})(e.TiersMode||(e.TiersMode={})),(function(t){t.CancelSubscription="CANCEL_SUBSCRIPTION",t.ConvertToPaid="CONVERT_TO_PAID"})(e.TrialEndBehavior||(e.TrialEndBehavior={})),(function(t){t.Day="DAY",t.Month="MONTH"})(e.TrialPeriodUnits||(e.TrialPeriodUnits={})),(function(t){t.Down="DOWN",t.Up="UP"})(e.UnitTransformationRound||(e.UnitTransformationRound={})),(function(t){t.PeriodicReset="PERIODIC_RESET",t.SubscriptionChangeReset="SUBSCRIPTION_CHANGE_RESET"})(e.UsageMarkerType||(e.UsageMarkerType={})),(function(t){t.CreatedAt="createdAt",t.EnvironmentId="environmentId",t.Id="id"})(e.UsageMeasurementSortFields||(e.UsageMeasurementSortFields={})),(function(t){t.Delta="DELTA",t.Set="SET"})(e.UsageUpdateBehavior||(e.UsageUpdateBehavior={})),(function(t){t.Auth0="AUTH0",t.AwsMarketplace="AWS_MARKETPLACE",t.BigQuery="BIG_QUERY",t.Hubspot="HUBSPOT",t.OpenFga="OPEN_FGA",t.Salesforce="SALESFORCE",t.Snowflake="SNOWFLAKE",t.Stripe="STRIPE",t.Zuora="ZUORA"})(e.VendorIdentifier||(e.VendorIdentifier={})),(function(t){t.Auth="AUTH",t.Billing="BILLING",t.Crm="CRM",t.DataExport="DATA_EXPORT",t.Marketplace="MARKETPLACE"})(e.VendorType||(e.VendorType={})),(function(t){t.EveryFriday="EveryFriday",t.EveryMonday="EveryMonday",t.EverySaturday="EverySaturday",t.EverySunday="EverySunday",t.EveryThursday="EveryThursday",t.EveryTuesday="EveryTuesday",t.EveryWednesday="EveryWednesday",t.SubscriptionStart="SubscriptionStart"})(e.WeeklyAccordingTo||(e.WeeklyAccordingTo={})),(function(t){t.Checkout="CHECKOUT",t.CustomerPortal="CUSTOMER_PORTAL",t.Paywall="PAYWALL"})(e.WidgetType||(e.WidgetType={})),(function(t){t.SubscriptionStart="SubscriptionStart"})(e.YearlyAccordingTo||(e.YearlyAccordingTo={})),(function(t){t.Control="CONTROL",t.Variant="VARIANT"})(e.ExperimentGroupType||(e.ExperimentGroupType={})),e.PageInfoFragmentDoc=(0,n.default)`
674
- fragment PageInfoFragment on PageInfo {
675
- startCursor
676
- endCursor
677
- hasNextPage
678
- hasPreviousPage
679
- }
680
- `,e.SubscriptionQueryFragmentDoc=(0,n.default)`
681
- fragment SubscriptionQueryFragment on SubscriptionQuery {
682
- subscriptionId
683
- status
684
- pricingType
685
- startDate
686
- currentBillingPeriodEnd
687
- customer {
688
- customerId
689
- }
690
- payingCustomer {
691
- customerId
692
- }
693
- resource {
694
- resourceId
695
- }
696
- plan {
697
- planId: refId
698
- displayName
699
- }
700
- addons {
701
- quantity
702
- addon {
703
- addonId: refId
704
- }
705
- }
706
- trialConfiguration {
707
- trialEndBehavior
708
- }
709
- trialEndDate
710
- }
711
- `,e.SlimSubscriptionFragmentV2FragmentDoc=(0,n.default)`
712
- fragment SlimSubscriptionFragmentV2 on CustomerSubscription {
713
- subscriptionId
714
- status
715
- pricingType
716
- startDate
717
- cancellationDate
718
- currentBillingPeriodEnd
719
- customer {
720
- customerId
721
- }
722
- payingCustomer {
723
- customerId
724
- }
725
- resource {
726
- resourceId
727
- }
728
- plan {
729
- planId: refId
730
- displayName
731
- }
732
- addons {
733
- quantity
734
- addon {
735
- addonId: refId
736
- }
737
- }
738
- trialConfiguration {
739
- trialEndBehavior
740
- }
741
- trialEndDate
742
- }
743
- `,e.SlimCustomerFragmentDoc=(0,n.default)`
744
- fragment SlimCustomerFragment on Customer {
745
- id
746
- name
747
- email
748
- createdAt
749
- updatedAt
750
- refId
751
- customerId
752
- billingId
753
- additionalMetaData
754
- awsMarketplaceCustomerId
755
- }
756
- `,e.CouponFragmentDoc=(0,n.default)`
757
- fragment CouponFragment on Coupon {
758
- id
759
- discountValue
760
- percentOff
761
- amountsOff {
762
- amount
763
- currency
764
- }
765
- type
766
- additionalMetaData
767
- refId
768
- name
769
- description
770
- createdAt
771
- updatedAt
772
- billingId
773
- billingLinkUrl
774
- status
775
- syncStates {
776
- vendorIdentifier
777
- status
778
- }
779
- }
780
- `,e.PromotionalEntitlementFragmentDoc=(0,n.default)`
781
- fragment PromotionalEntitlementFragment on PromotionalEntitlement {
782
- status
783
- usageLimit
784
- featureId
785
- hasUnlimitedUsage
786
- hasSoftLimit
787
- resetPeriod
788
- endDate
789
- isVisible
790
- feature {
791
- featureType
792
- meterType
793
- featureUnits
794
- featureUnitsPlural
795
- displayName
796
- description
797
- refId
798
- additionalMetaData
799
- }
800
- }
801
- `,e.CustomerFragmentDoc=(0,n.default)`
802
- fragment CustomerFragment on Customer {
803
- ...SlimCustomerFragment
804
- hasPaymentMethod
805
- hasActiveSubscription
806
- defaultPaymentExpirationMonth
807
- defaultPaymentExpirationYear
808
- defaultPaymentMethodLast4Digits
809
- defaultPaymentMethodType
810
- trialedPlans {
811
- productId
812
- productRefId
813
- planRefId
814
- planId
815
- }
816
- experimentInfo {
817
- groupType
818
- groupName
819
- id
820
- name
821
- }
822
- coupon {
823
- ...CouponFragment
824
- }
825
- eligibleForTrial {
826
- productId
827
- productRefId
828
- eligible
829
- }
830
- promotionalEntitlements {
831
- ...PromotionalEntitlementFragment
832
- }
833
- }
834
- `,e.SubscriptionInvoiceFragmentDoc=(0,n.default)`
835
- fragment SubscriptionInvoiceFragment on SubscriptionInvoice {
836
- billingId
837
- status
838
- createdAt
839
- dueDate
840
- updatedAt
841
- errorMessage
842
- requiresAction
843
- paymentSecret
844
- paymentUrl
845
- pdfUrl
846
- billingReason
847
- currency
848
- subTotal
849
- subTotalExcludingTax
850
- total
851
- totalExcludingTax
852
- tax
853
- amountDue
854
- attemptCount
855
- }
856
- `,e.CustomerResourceFragmentDoc=(0,n.default)`
857
- fragment CustomerResourceFragment on CustomerResource {
858
- resourceId
859
- }
860
- `,e.PriceTierFragmentDoc=(0,n.default)`
861
- fragment PriceTierFragment on PriceTier {
862
- upTo
863
- unitPrice {
864
- amount
865
- currency
866
- }
867
- flatPrice {
868
- amount
869
- currency
870
- }
871
- }
872
- `,e.PriceFragmentDoc=(0,n.default)`
873
- fragment PriceFragment on Price {
874
- billingModel
875
- billingPeriod
876
- billingCadence
877
- billingId
878
- minUnitQuantity
879
- maxUnitQuantity
880
- billingCountryCode
881
- price {
882
- amount
883
- currency
884
- }
885
- creditRate {
886
- amount
887
- customCurrencyId
888
- currencyId
889
- }
890
- tiersMode
891
- tiers {
892
- ...PriceTierFragment
893
- }
894
- feature {
895
- refId
896
- featureUnits
897
- featureUnitsPlural
898
- displayName
899
- description
900
- }
901
- blockSize
902
- }
903
- `,e.TotalPriceFragmentDoc=(0,n.default)`
904
- fragment TotalPriceFragment on CustomerSubscriptionTotalPrice {
905
- subTotal {
906
- amount
907
- currency
908
- }
909
- total {
910
- amount
911
- currency
912
- }
913
- }
914
- `,e.ProductFragmentDoc=(0,n.default)`
915
- fragment ProductFragment on Product {
916
- refId
917
- displayName
918
- description
919
- additionalMetaData
920
- productSettings {
921
- downgradePlan {
922
- refId
923
- displayName
924
- }
925
- }
926
- }
927
- `,e.PackageEntitlementFragmentDoc=(0,n.default)`
928
- fragment PackageEntitlementFragment on PackageEntitlement {
929
- usageLimit
930
- hasUnlimitedUsage
931
- hasSoftLimit
932
- featureId
933
- resetPeriod
934
- hiddenFromWidgets
935
- isCustom
936
- displayNameOverride
937
- enumValues
938
- isGranted
939
- feature {
940
- featureType
941
- meterType
942
- featureUnits
943
- featureUnitsPlural
944
- displayName
945
- description
946
- refId
947
- additionalMetaData
948
- }
949
- }
950
- `,e.OveragePriceFragmentDoc=(0,n.default)`
951
- fragment OveragePriceFragment on Price {
952
- billingModel
953
- billingPeriod
954
- billingId
955
- billingCountryCode
956
- price {
957
- amount
958
- currency
959
- }
960
- tiersMode
961
- tiers {
962
- ...PriceTierFragment
963
- }
964
- feature {
965
- refId
966
- featureUnits
967
- featureUnitsPlural
968
- displayName
969
- description
970
- }
971
- }
972
- `,e.AddonDependencyFragmentDoc=(0,n.default)`
973
- fragment AddonDependencyFragment on Addon {
974
- id
975
- refId
976
- displayName
977
- description
978
- }
979
- `,e.AddonFragmentDoc=(0,n.default)`
980
- fragment AddonFragment on Addon {
981
- id
982
- refId
983
- billingId
984
- displayName
985
- description
986
- additionalMetaData
987
- hiddenFromWidgets
988
- entitlements {
989
- ...PackageEntitlementFragment
990
- }
991
- prices {
992
- ...PriceFragment
993
- }
994
- overagePrices {
995
- ...OveragePriceFragment
996
- }
997
- pricingType
998
- maxQuantity
999
- dependencies {
1000
- ...AddonDependencyFragment
1001
- }
1002
- }
1003
- `,e.PlanCompatiblePackageGroupsFragmentDoc=(0,n.default)`
1004
- fragment PlanCompatiblePackageGroupsFragment on PlanCompatiblePackageGroups {
1005
- packageGroupId
1006
- displayName
1007
- addons {
1008
- ...AddonFragment
1009
- }
1010
- options {
1011
- minItems
1012
- freeItems
1013
- }
1014
- }
1015
- `,e.PlanFragmentDoc=(0,n.default)`
1016
- fragment PlanFragment on Plan {
1017
- id
1018
- refId
1019
- displayName
1020
- description
1021
- billingId
1022
- versionNumber
1023
- additionalMetaData
1024
- hiddenFromWidgets
1025
- product {
1026
- ...ProductFragment
1027
- }
1028
- basePlan {
1029
- refId
1030
- displayName
1031
- }
1032
- entitlements {
1033
- ...PackageEntitlementFragment
1034
- }
1035
- inheritedEntitlements {
1036
- ...PackageEntitlementFragment
1037
- }
1038
- compatibleAddons {
1039
- ...AddonFragment
1040
- }
1041
- compatiblePackageGroups {
1042
- ...PlanCompatiblePackageGroupsFragment
1043
- }
1044
- prices {
1045
- ...PriceFragment
1046
- }
1047
- overagePrices {
1048
- ...OveragePriceFragment
1049
- }
1050
- pricingType
1051
- defaultTrialConfig {
1052
- duration
1053
- units
1054
- budget {
1055
- limit
1056
- }
1057
- trialEndBehavior
1058
- }
1059
- }
1060
- `,e.ScheduleVariablesFragmentDoc=(0,n.default)`
1061
- fragment ScheduleVariablesFragment on ScheduleVariables {
1062
- __typename
1063
- ... on PlanChangeVariables {
1064
- planRefId
1065
- changeType
1066
- billingPeriod
1067
- billableFeatures {
1068
- featureId
1069
- quantity
1070
- }
1071
- addons {
1072
- addonRefId
1073
- quantity
1074
- }
1075
- priceOverrides {
1076
- planRefId
1077
- addonRefId
1078
- featureId
1079
- }
1080
- }
1081
- ... on DowngradeChangeVariables {
1082
- downgradePlanRefId
1083
- billingPeriod
1084
- billableFeatures {
1085
- featureId
1086
- quantity
1087
- }
1088
- addons {
1089
- addonRefId
1090
- quantity
1091
- }
1092
- priceOverrides {
1093
- planRefId
1094
- addonRefId
1095
- featureId
1096
- }
1097
- }
1098
- ... on BillingPeriodChangeVariables {
1099
- billingPeriod
1100
- }
1101
- ... on UnitAmountChangeVariables {
1102
- newUnitAmount
1103
- featureId
1104
- }
1105
- ... on AddonChangeVariables {
1106
- addonRefId
1107
- newQuantity
1108
- }
1109
- ... on PlanPriceOverrideChangeVariables {
1110
- planRefId
1111
- featureId
1112
- }
1113
- ... on AddonPriceOverrideChangeVariables {
1114
- addonRefId
1115
- featureId
1116
- }
1117
- }
1118
- `,e.SubscriptionScheduledUpdateDataFragmentDoc=(0,n.default)`
1119
- fragment SubscriptionScheduledUpdateData on SubscriptionScheduledUpdate {
1120
- subscriptionScheduleType
1121
- scheduleStatus
1122
- scheduledExecutionTime
1123
- targetPackage {
1124
- id
1125
- refId
1126
- displayName
1127
- }
1128
- scheduleVariables {
1129
- ...ScheduleVariablesFragment
1130
- }
1131
- }
1132
- `,e.SubscriptionFutureUpdateDataFragmentDoc=(0,n.default)`
1133
- fragment SubscriptionFutureUpdateData on SubscriptionFutureUpdate {
1134
- subscriptionScheduleType
1135
- scheduleStatus
1136
- scheduledExecutionTime
1137
- targetPackage {
1138
- id
1139
- refId
1140
- displayName
1141
- }
1142
- scheduleVariables {
1143
- ...ScheduleVariablesFragment
1144
- }
1145
- }
1146
- `,e.SubscriptionTrialConfigurationFragmentDoc=(0,n.default)`
1147
- fragment SubscriptionTrialConfigurationFragment on TrialConfiguration {
1148
- trialEndBehavior
1149
- }
1150
- `,e.SubscriptionFragmentDoc=(0,n.default)`
1151
- fragment SubscriptionFragment on CustomerSubscription {
1152
- id
1153
- subscriptionId
1154
- payingCustomer {
1155
- ...SlimCustomerFragment
1156
- }
1157
- startDate
1158
- endDate
1159
- trialEndDate
1160
- cancellationDate
1161
- effectiveEndDate
1162
- status
1163
- refId
1164
- currentBillingPeriodEnd
1165
- additionalMetaData
1166
- billingId
1167
- billingLinkUrl
1168
- latestInvoice {
1169
- ...SubscriptionInvoiceFragment
1170
- }
1171
- paymentCollection
1172
- paymentCollectionMethod
1173
- billingSyncError
1174
- resource {
1175
- ...CustomerResourceFragment
1176
- }
1177
- experimentInfo {
1178
- name
1179
- groupType
1180
- groupName
1181
- id
1182
- }
1183
- prices {
1184
- usageLimit
1185
- price {
1186
- ...PriceFragment
1187
- }
1188
- }
1189
- totalPrice {
1190
- ...TotalPriceFragment
1191
- }
1192
- pricingType
1193
- plan {
1194
- ...PlanFragment
1195
- }
1196
- addons {
1197
- id
1198
- quantity
1199
- addon {
1200
- ...AddonFragment
1201
- }
1202
- }
1203
- scheduledUpdates {
1204
- ...SubscriptionScheduledUpdateData
1205
- }
1206
- futureUpdates {
1207
- ...SubscriptionFutureUpdateData
1208
- }
1209
- trialConfiguration {
1210
- ...SubscriptionTrialConfigurationFragment
1211
- }
1212
- }
1213
- `,e.CustomerWithSubscriptionsFragmentDoc=(0,n.default)`
1214
- fragment CustomerWithSubscriptionsFragment on Customer {
1215
- ...CustomerFragment
1216
- subscriptions {
1217
- ...SubscriptionFragment
1218
- }
1219
- }
1220
- `,e.CustomerStatisticsFragmentDoc=(0,n.default)`
1221
- fragment CustomerStatisticsFragment on Customer {
1222
- statistics {
1223
- activeSubscriptionsByPricingType {
1224
- pricingType
1225
- totalCount
1226
- }
1227
- }
1228
- }
1229
- `,e.SubscriptionPreviewFragmentDoc=(0,n.default)`
1230
- fragment SubscriptionPreviewFragment on SubscriptionPreview {
1231
- subTotal {
1232
- amount
1233
- currency
1234
- }
1235
- totalExcludingTax {
1236
- amount
1237
- currency
1238
- }
1239
- total {
1240
- amount
1241
- currency
1242
- }
1243
- discountAmount {
1244
- amount
1245
- currency
1246
- }
1247
- taxDetails {
1248
- displayName
1249
- percentage
1250
- inclusive
1251
- }
1252
- tax {
1253
- amount
1254
- currency
1255
- }
1256
- billingPeriodRange {
1257
- start
1258
- end
1259
- }
1260
- discount {
1261
- name
1262
- type
1263
- value
1264
- durationType
1265
- durationInMonths
1266
- }
1267
- subscription {
1268
- subTotal {
1269
- amount
1270
- currency
1271
- }
1272
- totalExcludingTax {
1273
- amount
1274
- currency
1275
- }
1276
- total {
1277
- amount
1278
- currency
1279
- }
1280
- tax {
1281
- amount
1282
- currency
1283
- }
1284
- discountAmount {
1285
- amount
1286
- currency
1287
- }
1288
- taxDetails {
1289
- displayName
1290
- percentage
1291
- inclusive
1292
- }
1293
- discount {
1294
- name
1295
- type
1296
- value
1297
- durationType
1298
- durationInMonths
1299
- }
1300
- }
1301
- proration {
1302
- prorationDate
1303
- credit {
1304
- amount
1305
- currency
1306
- }
1307
- debit {
1308
- amount
1309
- currency
1310
- }
1311
- netAmount {
1312
- amount
1313
- currency
1314
- }
1315
- }
1316
- isPlanDowngrade
1317
- hasScheduledUpdates
1318
- credits {
1319
- initial {
1320
- amount
1321
- currency
1322
- }
1323
- used {
1324
- amount
1325
- currency
1326
- }
1327
- remaining {
1328
- amount
1329
- currency
1330
- }
1331
- }
1332
- }
1333
- `,e.ImmediateSubscriptionPreviewInvoiceFragmentDoc=(0,n.default)`
1334
- fragment ImmediateSubscriptionPreviewInvoiceFragment on ImmediateSubscriptionPreviewInvoice {
1335
- total {
1336
- amount
1337
- currency
1338
- }
1339
- subTotal {
1340
- amount
1341
- currency
1342
- }
1343
- totalExcludingTax {
1344
- amount
1345
- currency
1346
- }
1347
- tax {
1348
- amount
1349
- currency
1350
- }
1351
- discount {
1352
- amount
1353
- currency
1354
- }
1355
- taxDetails {
1356
- displayName
1357
- percentage
1358
- inclusive
1359
- }
1360
- discountDetails {
1361
- type
1362
- value
1363
- durationType
1364
- durationInMonths
1365
- }
1366
- credits {
1367
- initial {
1368
- amount
1369
- currency
1370
- }
1371
- used {
1372
- amount
1373
- currency
1374
- }
1375
- remaining {
1376
- amount
1377
- currency
1378
- }
1379
- }
1380
- proration {
1381
- prorationDate
1382
- hasProrations
1383
- credit {
1384
- amount
1385
- currency
1386
- }
1387
- debit {
1388
- amount
1389
- currency
1390
- }
1391
- netAmount {
1392
- amount
1393
- currency
1394
- }
1395
- }
1396
- }
1397
- `,e.SubscriptionPreviewInvoiceFragmentDoc=(0,n.default)`
1398
- fragment SubscriptionPreviewInvoiceFragment on SubscriptionPreviewInvoice {
1399
- total {
1400
- amount
1401
- currency
1402
- }
1403
- subTotal {
1404
- amount
1405
- currency
1406
- }
1407
- totalExcludingTax {
1408
- amount
1409
- currency
1410
- }
1411
- tax {
1412
- amount
1413
- currency
1414
- }
1415
- discount {
1416
- amount
1417
- currency
1418
- }
1419
- taxDetails {
1420
- displayName
1421
- percentage
1422
- inclusive
1423
- }
1424
- discountDetails {
1425
- type
1426
- value
1427
- durationType
1428
- durationInMonths
1429
- }
1430
- }
1431
- `,e.SubscriptionPreviewV2FragmentDoc=(0,n.default)`
1432
- fragment SubscriptionPreviewV2Fragment on SubscriptionPreviewV2 {
1433
- immediateInvoice {
1434
- ...ImmediateSubscriptionPreviewInvoiceFragment
1435
- }
1436
- recurringInvoice {
1437
- ...SubscriptionPreviewInvoiceFragment
1438
- }
1439
- billingPeriodRange {
1440
- start
1441
- end
1442
- }
1443
- isPlanDowngrade
1444
- hasScheduledUpdates
1445
- }
1446
- `,e.SubscriptionInvoicePreviewFragmentDoc=(0,n.default)`
1447
- fragment SubscriptionInvoicePreviewFragment on SubscriptionInvoicePreview {
1448
- amountDue {
1449
- amount
1450
- currency
1451
- }
1452
- minimumSpendAdjustment {
1453
- amount
1454
- currency
1455
- }
1456
- total {
1457
- amount
1458
- currency
1459
- }
1460
- totalExcludingTax {
1461
- amount
1462
- currency
1463
- }
1464
- subTotal {
1465
- amount
1466
- currency
1467
- }
1468
- subTotalExcludingTax {
1469
- amount
1470
- currency
1471
- }
1472
- tax {
1473
- amount
1474
- currency
1475
- }
1476
- taxDetails {
1477
- displayName
1478
- percentage
1479
- inclusive
1480
- }
1481
- discount {
1482
- amount
1483
- currency
1484
- }
1485
- discountDetails {
1486
- name
1487
- type
1488
- value
1489
- durationType
1490
- durationInMonths
1491
- }
1492
- credits {
1493
- initial {
1494
- amount
1495
- currency
1496
- }
1497
- used {
1498
- amount
1499
- currency
1500
- }
1501
- remaining {
1502
- amount
1503
- currency
1504
- }
1505
- }
1506
- lastUpdatedAt
1507
- lines {
1508
- type
1509
- description
1510
- costDescription
1511
- amount {
1512
- amount
1513
- currency
1514
- }
1515
- unitPrice {
1516
- amount
1517
- currency
1518
- }
1519
- quantity
1520
- proration
1521
- price {
1522
- ...PriceFragment
1523
- }
1524
- usageLimit
1525
- period {
1526
- start
1527
- end
1528
- }
1529
- hasSoftLimit
1530
- lines {
1531
- type
1532
- description
1533
- costDescription
1534
- quantity
1535
- proration
1536
- usageLimit
1537
- hasSoftLimit
1538
- }
1539
- }
1540
- }
1541
- `,e.ResetPeriodConfigurationFragmentDoc=(0,n.default)`
1542
- fragment ResetPeriodConfigurationFragment on ResetPeriodConfiguration {
1543
- __typename
1544
- ... on YearlyResetPeriodConfig {
1545
- yearlyAccordingTo
1546
- }
1547
- ... on MonthlyResetPeriodConfig {
1548
- monthlyAccordingTo
1549
- }
1550
- ... on WeeklyResetPeriodConfig {
1551
- weeklyAccordingTo
1552
- }
1553
- }
1554
- `,e.FeatureFragmentDoc=(0,n.default)`
1555
- fragment FeatureFragment on EntitlementFeature {
1556
- __typename
1557
- featureType
1558
- meterType
1559
- featureUnits
1560
- featureUnitsPlural
1561
- description
1562
- displayName
1563
- refId
1564
- unitTransformation {
1565
- divide
1566
- round
1567
- }
1568
- }
1569
- `,e.EntitlementFragmentDoc=(0,n.default)`
1570
- fragment EntitlementFragment on Entitlement {
1571
- __typename
1572
- isGranted
1573
- accessDeniedReason
1574
- customerId
1575
- resourceId
1576
- usageLimit
1577
- hasUnlimitedUsage
1578
- hasSoftLimit
1579
- currentUsage
1580
- requestedUsage
1581
- requestedValues
1582
- enumValues
1583
- entitlementUpdatedAt
1584
- usageUpdatedAt
1585
- usagePeriodAnchor
1586
- usagePeriodStart
1587
- usagePeriodEnd
1588
- nextResetDate
1589
- resetPeriod
1590
- resetPeriodConfiguration {
1591
- ...ResetPeriodConfigurationFragment
1592
- }
1593
- feature {
1594
- ...FeatureFragment
1595
- }
1596
- creditRate {
1597
- amount
1598
- currencyId
1599
- }
1600
- validUntil
1601
- }
1602
- `,e.EntitlementsUpdatedPayloadFragmentDoc=(0,n.default)`
1603
- fragment EntitlementsUpdatedPayload on EntitlementsUpdated {
1604
- customerId
1605
- resourceId
1606
- entitlements {
1607
- ...EntitlementFragment
1608
- }
1609
- }
1610
- `,e.UsageUpdatedFragmentDoc=(0,n.default)`
1611
- fragment UsageUpdatedFragment on UsageMeasurementUpdated {
1612
- customerId
1613
- resourceId
1614
- featureId
1615
- currentUsage
1616
- usagePeriodStart
1617
- usagePeriodEnd
1618
- nextResetDate
1619
- }
1620
- `,e.EntitlementUsageUpdatedFragmentDoc=(0,n.default)`
1621
- fragment EntitlementUsageUpdated on UsageUpdated {
1622
- usage {
1623
- ...UsageUpdatedFragment
1624
- }
1625
- entitlement {
1626
- ...EntitlementFragment
1627
- }
1628
- }
1629
- `,e.PackagePublishedPayloadFragmentDoc=(0,n.default)`
1630
- fragment PackagePublishedPayload on PackagePublished {
1631
- accountId
1632
- environmentId
1633
- packageType
1634
- packageRefId
1635
- packageVersion
1636
- migrationType
1637
- }
1638
- `,e.CreditBalanceUpdatedPayloadFragmentDoc=(0,n.default)`
1639
- fragment CreditBalanceUpdatedPayload on CreditBalanceUpdated {
1640
- currency {
1641
- currencyId
1642
- displayName
1643
- symbol
1644
- units {
1645
- singular
1646
- plural
1647
- }
1648
- }
1649
- currencyId
1650
- currentBalance
1651
- customerId
1652
- validUntil
1653
- resourceId
1654
- totalConsumed
1655
- totalGranted
1656
- }
1657
- `,e.CustomerPortalSubscriptionPriceFragmentDoc=(0,n.default)`
1658
- fragment CustomerPortalSubscriptionPriceFragment on CustomerPortalSubscriptionPrice {
1659
- billingPeriod
1660
- billingModel
1661
- blockSize
1662
- price {
1663
- amount
1664
- currency
1665
- }
1666
- creditRate {
1667
- amount
1668
- currencyId
1669
- }
1670
- feature {
1671
- id
1672
- refId
1673
- displayName
1674
- featureUnits
1675
- featureUnitsPlural
1676
- }
1677
- }
1678
- `,e.CustomerPortalSubscriptionAddonFragmentDoc=(0,n.default)`
1679
- fragment CustomerPortalSubscriptionAddonFragment on CustomerPortalAddon {
1680
- addonId
1681
- description
1682
- displayName
1683
- quantity
1684
- }
1685
- `,e.CustomerPortalSubscriptionScheduledUpdateDataFragmentDoc=(0,n.default)`
1686
- fragment CustomerPortalSubscriptionScheduledUpdateDataFragment on SubscriptionScheduledUpdate {
1687
- subscriptionScheduleType
1688
- scheduleStatus
1689
- scheduledExecutionTime
1690
- targetPackage {
1691
- id
1692
- refId
1693
- displayName
1694
- pricingType
1695
- }
1696
- scheduleVariables {
1697
- ...ScheduleVariablesFragment
1698
- }
1699
- }
1700
- `,e.CustomerPortalSubscriptionFragmentDoc=(0,n.default)`
1701
- fragment CustomerPortalSubscriptionFragment on CustomerPortalSubscription {
1702
- subscriptionId
1703
- planId
1704
- planName
1705
- pricingType
1706
- prices {
1707
- ...CustomerPortalSubscriptionPriceFragment
1708
- }
1709
- pricing {
1710
- unitQuantity
1711
- billingPeriod
1712
- billingModel
1713
- pricingType
1714
- usageBasedEstimatedBill
1715
- price {
1716
- amount
1717
- currency
1718
- }
1719
- creditRate {
1720
- amount
1721
- currencyId
1722
- }
1723
- feature {
1724
- featureUnits
1725
- featureUnitsPlural
1726
- displayName
1727
- }
1728
- }
1729
- status
1730
- trialRemainingDays
1731
- billingPeriodRange {
1732
- start
1733
- end
1734
- }
1735
- totalPrice {
1736
- subTotal {
1737
- amount
1738
- currency
1739
- }
1740
- total {
1741
- amount
1742
- currency
1743
- }
1744
- addonsTotal {
1745
- amount
1746
- currency
1747
- }
1748
- }
1749
- addons {
1750
- ...CustomerPortalSubscriptionAddonFragment
1751
- }
1752
- scheduledUpdates {
1753
- ...CustomerPortalSubscriptionScheduledUpdateDataFragment
1754
- }
1755
- }
1756
- `,e.CustomerPortalEntitlementFragmentDoc=(0,n.default)`
1757
- fragment CustomerPortalEntitlementFragment on Entitlement {
1758
- isGranted
1759
- usageLimit
1760
- currentUsage
1761
- hasUnlimitedUsage
1762
- hasSoftLimit
1763
- usagePeriodStart
1764
- usagePeriodEnd
1765
- nextResetDate
1766
- resetPeriod
1767
- resetPeriodConfiguration {
1768
- ...ResetPeriodConfigurationFragment
1769
- }
1770
- feature {
1771
- ...FeatureFragment
1772
- }
1773
- }
1774
- `,e.CustomerPortalPromotionalEntitlementFragmentDoc=(0,n.default)`
1775
- fragment CustomerPortalPromotionalEntitlementFragment on CustomerPortalPromotionalEntitlement {
1776
- displayName
1777
- hasUnlimitedUsage
1778
- hasSoftLimit
1779
- usageLimit
1780
- period
1781
- startDate
1782
- endDate
1783
- }
1784
- `,e.CustomerPortalBillingInformationFragmentDoc=(0,n.default)`
1785
- fragment CustomerPortalBillingInformationFragment on CustomerPortalBillingInformation {
1786
- email
1787
- name
1788
- defaultPaymentMethodLast4Digits
1789
- defaultPaymentMethodId
1790
- defaultPaymentExpirationMonth
1791
- defaultPaymentExpirationYear
1792
- defaultPaymentMethodType
1793
- }
1794
- `,e.FontVariantFragmentDoc=(0,n.default)`
1795
- fragment FontVariantFragment on FontVariant {
1796
- fontSize
1797
- fontWeight
1798
- }
1799
- `,e.TypographyConfigurationFragmentDoc=(0,n.default)`
1800
- fragment TypographyConfigurationFragment on TypographyConfiguration {
1801
- fontFamily
1802
- h1 {
1803
- ...FontVariantFragment
1804
- }
1805
- h2 {
1806
- ...FontVariantFragment
1807
- }
1808
- h3 {
1809
- ...FontVariantFragment
1810
- }
1811
- body {
1812
- ...FontVariantFragment
1813
- }
1814
- }
1815
- `,e.CustomerPortalConfigurationFragmentDoc=(0,n.default)`
1816
- fragment CustomerPortalConfigurationFragment on CustomerPortalConfiguration {
1817
- palette {
1818
- primary
1819
- textColor
1820
- backgroundColor
1821
- borderColor
1822
- currentPlanBackground
1823
- iconsColor
1824
- paywallBackgroundColor
1825
- }
1826
- typography {
1827
- ...TypographyConfigurationFragment
1828
- }
1829
- customCss
1830
- }
1831
- `,e.CustomerPortalFragmentDoc=(0,n.default)`
1832
- fragment CustomerPortalFragment on CustomerPortal {
1833
- subscriptions {
1834
- ...CustomerPortalSubscriptionFragment
1835
- }
1836
- entitlements {
1837
- ...CustomerPortalEntitlementFragment
1838
- }
1839
- promotionalEntitlements {
1840
- ...CustomerPortalPromotionalEntitlementFragment
1841
- }
1842
- billingInformation {
1843
- ...CustomerPortalBillingInformationFragment
1844
- }
1845
- showWatermark
1846
- billingPortalUrl
1847
- canUpgradeSubscription
1848
- configuration {
1849
- ...CustomerPortalConfigurationFragment
1850
- }
1851
- resource {
1852
- ...CustomerResourceFragment
1853
- }
1854
- }
1855
- `,e.CheckoutConfigurationFragmentDoc=(0,n.default)`
1856
- fragment CheckoutConfigurationFragment on CheckoutConfiguration {
1857
- palette {
1858
- primary
1859
- textColor
1860
- backgroundColor
1861
- borderColor
1862
- summaryBackgroundColor
1863
- __typename
1864
- }
1865
- typography {
1866
- ...TypographyConfigurationFragment
1867
- __typename
1868
- }
1869
- customCss
1870
- content {
1871
- collectPhoneNumber
1872
- }
1873
- __typename
1874
- }
1875
- `,e.StripeCheckoutCredentialsFragmentDoc=(0,n.default)`
1876
- fragment StripeCheckoutCredentialsFragment on StripeCheckoutCredentials {
1877
- accountId
1878
- setupSecret
1879
- publicKey
1880
- }
1881
- `,e.ZuoraCheckoutCredentialsFragmentDoc=(0,n.default)`
1882
- fragment ZuoraCheckoutCredentialsFragment on ZuoraCheckoutCredentials {
1883
- publishableKey
1884
- }
1885
- `,e.CheckoutStateFragmentDoc=(0,n.default)`
1886
- fragment CheckoutStateFragment on CheckoutState {
1887
- configuration {
1888
- ...CheckoutConfigurationFragment
1889
- }
1890
- setupSecret
1891
- customer {
1892
- ...CustomerFragment
1893
- }
1894
- activeSubscription {
1895
- ...SubscriptionFragment
1896
- }
1897
- resource {
1898
- ...CustomerResourceFragment
1899
- }
1900
- plan {
1901
- ...PlanFragment
1902
- }
1903
- billingIntegration {
1904
- billingIdentifier
1905
- billingCredentials {
1906
- ... on StripeCheckoutCredentials {
1907
- ...StripeCheckoutCredentialsFragment
1908
- }
1909
- ... on ZuoraCheckoutCredentials {
1910
- ...ZuoraCheckoutCredentialsFragment
1911
- }
1912
- }
1913
- credentials {
1914
- accountId
1915
- publicKey
1916
- }
1917
- }
1918
- }
1919
- `,e.MockPaywallPackageEntitlementFragmentDoc=(0,n.default)`
1920
- fragment MockPaywallPackageEntitlementFragment on Entitlement {
1921
- usageLimit
1922
- hasUnlimitedUsage
1923
- hasSoftLimit
1924
- resetPeriod
1925
- hiddenFromWidgets
1926
- displayNameOverride
1927
- enumValues
1928
- isGranted
1929
- feature {
1930
- featureType
1931
- meterType
1932
- featureUnits
1933
- featureUnitsPlural
1934
- displayName
1935
- description
1936
- refId
1937
- additionalMetaData
1938
- }
1939
- }
1940
- `,e.MockPaywallPriceFragmentDoc=(0,n.default)`
1941
- fragment MockPaywallPriceFragment on PaywallPrice {
1942
- billingModel
1943
- billingPeriod
1944
- billingId
1945
- minUnitQuantity
1946
- maxUnitQuantity
1947
- billingCountryCode
1948
- price {
1949
- amount
1950
- currency
1951
- }
1952
- creditRate {
1953
- amount
1954
- currencyId
1955
- }
1956
- tiersMode
1957
- tiers {
1958
- ...PriceTierFragment
1959
- }
1960
- feature {
1961
- refId
1962
- featureUnits
1963
- featureUnitsPlural
1964
- displayName
1965
- }
1966
- blockSize
1967
- }
1968
- `,e.MockPaywallAddonDependencyFragmentDoc=(0,n.default)`
1969
- fragment MockPaywallAddonDependencyFragment on PaywallAddon {
1970
- refId
1971
- displayName
1972
- description
1973
- }
1974
- `,e.MockPaywallAddonFragmentDoc=(0,n.default)`
1975
- fragment MockPaywallAddonFragment on PaywallAddon {
1976
- refId
1977
- displayName
1978
- description
1979
- additionalMetaData
1980
- billingId
1981
- maxQuantity
1982
- hiddenFromWidgets
1983
- dependencies {
1984
- ...MockPaywallAddonDependencyFragment
1985
- }
1986
- entitlements {
1987
- ...MockPaywallPackageEntitlementFragment
1988
- }
1989
- prices {
1990
- ...MockPaywallPriceFragment
1991
- }
1992
- pricingType
1993
- }
1994
- `,e.MockPaywallPlanCompatiblePackageGroupsFragmentDoc=(0,n.default)`
1995
- fragment MockPaywallPlanCompatiblePackageGroupsFragment on PaywallPlanCompatiblePackageGroup {
1996
- packageGroupId
1997
- displayName
1998
- description
1999
- addons {
2000
- ...MockPaywallAddonFragment
2001
- }
2002
- options {
2003
- minItems
2004
- freeItems
2005
- }
2006
- }
2007
- `,e.MockPaywallPlanFragmentDoc=(0,n.default)`
2008
- fragment MockPaywallPlanFragment on PaywallPlan {
2009
- refId
2010
- description
2011
- displayName
2012
- billingId
2013
- additionalMetaData
2014
- product {
2015
- refId
2016
- displayName
2017
- description
2018
- additionalMetaData
2019
- }
2020
- basePlan {
2021
- refId
2022
- displayName
2023
- }
2024
- entitlements {
2025
- ...MockPaywallPackageEntitlementFragment
2026
- }
2027
- inheritedEntitlements {
2028
- ...MockPaywallPackageEntitlementFragment
2029
- }
2030
- prices {
2031
- ...MockPaywallPriceFragment
2032
- }
2033
- pricingType
2034
- defaultTrialConfig {
2035
- duration
2036
- units
2037
- budget {
2038
- limit
2039
- }
2040
- trialEndBehavior
2041
- }
2042
- compatibleAddons {
2043
- ...MockPaywallAddonFragment
2044
- }
2045
- compatiblePackageGroups {
2046
- ...MockPaywallPlanCompatiblePackageGroupsFragment
2047
- }
2048
- }
2049
- `,e.PaywallCurrencyFragmentDoc=(0,n.default)`
2050
- fragment PaywallCurrencyFragment on PaywallCurrency {
2051
- code
2052
- symbol
2053
- }
2054
- `,e.LayoutConfigurationFragmentDoc=(0,n.default)`
2055
- fragment LayoutConfigurationFragment on PaywallLayoutConfiguration {
2056
- alignment
2057
- planWidth
2058
- planMargin
2059
- planPadding
2060
- }
2061
- `,e.PaywallConfigurationFragmentDoc=(0,n.default)`
2062
- fragment PaywallConfigurationFragment on PaywallConfiguration {
2063
- palette {
2064
- primary
2065
- textColor
2066
- backgroundColor
2067
- borderColor
2068
- currentPlanBackground
2069
- }
2070
- typography {
2071
- ...TypographyConfigurationFragment
2072
- }
2073
- layout {
2074
- ...LayoutConfigurationFragment
2075
- }
2076
- customCss
2077
- }
2078
- `,e.PaywallCalculatedPricePointsFragmentDoc=(0,n.default)`
2079
- fragment PaywallCalculatedPricePointsFragment on PaywallPricePoint {
2080
- planId
2081
- additionalChargesMayApply
2082
- billingPeriod
2083
- amount
2084
- currency
2085
- billingCountryCode
2086
- feature {
2087
- refId
2088
- featureUnits
2089
- featureUnitsPlural
2090
- displayName
2091
- description
2092
- }
2093
- }
2094
- `,e.PaywallFragmentDoc=(0,n.default)`
2095
- fragment PaywallFragment on Paywall {
2096
- plans {
2097
- ...PlanFragment
2098
- }
2099
- currency {
2100
- ...PaywallCurrencyFragment
2101
- }
2102
- configuration {
2103
- ...PaywallConfigurationFragment
2104
- }
2105
- customer {
2106
- ...CustomerFragment
2107
- }
2108
- activeSubscriptions {
2109
- ...SubscriptionFragment
2110
- }
2111
- resource {
2112
- ...CustomerResourceFragment
2113
- }
2114
- paywallCalculatedPricePoints {
2115
- ...PaywallCalculatedPricePointsFragment
2116
- }
2117
- }
2118
- `,e.UsageHistoryFragmentDoc=(0,n.default)`
2119
- fragment UsageHistoryFragment on UsageHistory {
2120
- startDate
2121
- endDate
2122
- markers {
2123
- type
2124
- timestamp
2125
- }
2126
- usageMeasurements {
2127
- date
2128
- value
2129
- isResetPoint
2130
- }
2131
- groups {
2132
- groupInfo {
2133
- key
2134
- value
2135
- }
2136
- usageMeasurements {
2137
- date
2138
- value
2139
- isResetPoint
2140
- }
2141
- }
2142
- }
2143
- `,e.UsageHistoryV2FragmentDoc=(0,n.default)`
2144
- fragment UsageHistoryV2Fragment on UsageHistoryV2 {
2145
- markers {
2146
- type
2147
- timestamp
2148
- }
2149
- series {
2150
- tags {
2151
- key
2152
- value
2153
- }
2154
- points {
2155
- timestamp
2156
- value
2157
- isResetPoint
2158
- }
2159
- }
2160
- }
2161
- `,e.SlimSubscriptionFragmentDoc=(0,n.default)`
2162
- fragment SlimSubscriptionFragment on CustomerSubscription {
2163
- id
2164
- subscriptionId
2165
- refId
2166
- status
2167
- additionalMetaData
2168
- billingId
2169
- billingLinkUrl
2170
- effectiveEndDate
2171
- cancellationDate
2172
- currentBillingPeriodEnd
2173
- pricingType
2174
- latestInvoice {
2175
- ...SubscriptionInvoiceFragment
2176
- }
2177
- paymentCollection
2178
- billingSyncError
2179
- resource {
2180
- ...CustomerResourceFragment
2181
- }
2182
- experimentInfo {
2183
- name
2184
- id
2185
- groupType
2186
- groupName
2187
- }
2188
- prices {
2189
- usageLimit
2190
- price {
2191
- ...PriceFragment
2192
- }
2193
- }
2194
- totalPrice {
2195
- ...TotalPriceFragment
2196
- }
2197
- plan {
2198
- id
2199
- refId
2200
- }
2201
- addons {
2202
- quantity
2203
- addon {
2204
- id
2205
- refId
2206
- }
2207
- }
2208
- customer {
2209
- id
2210
- refId
2211
- }
2212
- }
2213
- `,e.ProvisionCustomerFragmentDoc=(0,n.default)`
2214
- fragment ProvisionCustomerFragment on ProvisionedCustomer {
2215
- customer {
2216
- ...SlimCustomerFragment
2217
- }
2218
- subscriptionDecisionStrategy
2219
- subscription {
2220
- ...SlimSubscriptionFragment
2221
- }
2222
- entitlements {
2223
- ...EntitlementFragment
2224
- }
2225
- }
2226
- `,e.ApplySubscriptionFragmentDoc=(0,n.default)`
2227
- fragment ApplySubscriptionFragment on ApplySubscription {
2228
- subscription {
2229
- ...SubscriptionFragment
2230
- }
2231
- entitlements {
2232
- ...EntitlementFragment
2233
- }
2234
- }
2235
- `,e.ProvisionSubscriptionFragmentDoc=(0,n.default)`
2236
- fragment ProvisionSubscriptionFragment on ProvisionSubscriptionResult {
2237
- status
2238
- checkoutUrl
2239
- checkoutBillingId
2240
- subscription {
2241
- ...SlimSubscriptionFragment
2242
- }
2243
- entitlements {
2244
- ...EntitlementFragment
2245
- }
2246
- }
2247
- `,e.ReportUsageFragmentDoc=(0,n.default)`
2248
- fragment ReportUsageFragment on UsageMeasurementWithCurrentUsage {
2249
- id
2250
- featureId
2251
- customerId
2252
- resourceId
2253
- currentUsage
2254
- usagePeriodStart
2255
- usagePeriodEnd
2256
- nextResetDate
2257
- timestamp
2258
- }
2259
- `,e.CreditGrantFragmentDoc=(0,n.default)`
2260
- fragment CreditGrantFragment on CreditGrant {
2261
- grantId
2262
- amount
2263
- comment
2264
- currencyId
2265
- customerId
2266
- displayName
2267
- effectiveAt
2268
- expireAt
2269
- grantType
2270
- priority
2271
- consumedAmount
2272
- cost {
2273
- amount
2274
- currency
2275
- }
2276
- createdAt
2277
- updatedAt
2278
- resourceId
2279
- additionalMetaData
2280
- }
2281
- `,e.CreditLedgerFragmentDoc=(0,n.default)`
2282
- fragment CreditLedgerFragment on CreditLedgerEvent {
2283
- timestamp
2284
- eventType
2285
- customerId
2286
- resourceId
2287
- eventId
2288
- featureId
2289
- amount
2290
- creditGrantId
2291
- creditCurrencyId
2292
- }
2293
- `,e.CreditBalanceFragmentDoc=(0,n.default)`
2294
- fragment CreditBalanceFragment on CreditBalance {
2295
- customerId
2296
- currency {
2297
- currencyId
2298
- displayName
2299
- symbol
2300
- units {
2301
- singular
2302
- plural
2303
- }
2304
- }
2305
- currentBalance
2306
- totalConsumed
2307
- totalGranted
2308
- resourceId
2309
- validUntil
2310
- }
2311
- `,e.CreditsBalanceSummaryFragmentDoc=(0,n.default)`
2312
- fragment CreditsBalanceSummaryFragment on CreditBalanceSummary {
2313
- customerId
2314
- balances {
2315
- ...CreditBalanceFragment
2316
- }
2317
- }
2318
- `,e.PaymentSessionFragmentDoc=(0,n.default)`
2319
- fragment PaymentSessionFragment on PaymentSession {
2320
- token
2321
- }
2322
- `,e.SlimCustomCurrencyFragmentDoc=(0,n.default)`
2323
- fragment SlimCustomCurrencyFragment on SlimCustomCurrency {
2324
- currencyId
2325
- displayName
2326
- units {
2327
- singular
2328
- plural
2329
- }
2330
- }
2331
- `,e.CreditUsageFragmentDoc=(0,n.default)`
2332
- fragment CreditUsageFragment on CreditUsage {
2333
- series {
2334
- featureId
2335
- featureName
2336
- totalCredits
2337
- points {
2338
- timestamp
2339
- value
2340
- }
2341
- }
2342
- currency {
2343
- ...SlimCustomCurrencyFragment
2344
- }
2345
- }
2346
- `,e.ProvisionCustomerDocument=(0,n.default)`
2347
- mutation ProvisionCustomer($input: ProvisionCustomerInput!) {
2348
- provisionCustomer(input: $input) {
2349
- ...ProvisionCustomerFragment
2350
- }
2351
- }
2352
- ${e.ProvisionCustomerFragmentDoc}
2353
- ${e.SlimCustomerFragmentDoc}
2354
- ${e.SlimSubscriptionFragmentDoc}
2355
- ${e.SubscriptionInvoiceFragmentDoc}
2356
- ${e.CustomerResourceFragmentDoc}
2357
- ${e.PriceFragmentDoc}
2358
- ${e.PriceTierFragmentDoc}
2359
- ${e.TotalPriceFragmentDoc}
2360
- ${e.EntitlementFragmentDoc}
2361
- ${e.ResetPeriodConfigurationFragmentDoc}
2362
- ${e.FeatureFragmentDoc}`,e.ImportCustomerBulkDocument=(0,n.default)`
2363
- mutation ImportCustomerBulk($input: ImportCustomerBulkInput!) {
2364
- importCustomersBulk(input: $input)
2365
- }
2366
- `,e.ImportCustomerDocument=(0,n.default)`
2367
- mutation ImportCustomer($input: ImportCustomerInput!) {
2368
- importCustomer: importOneCustomer(input: $input) {
2369
- ...SlimCustomerFragment
2370
- }
2371
- }
2372
- ${e.SlimCustomerFragmentDoc}`,e.UpdateCustomerDocument=(0,n.default)`
2373
- mutation UpdateCustomer($input: UpdateCustomerInput!) {
2374
- updateCustomer: updateOneCustomer(input: $input) {
2375
- ...SlimCustomerFragment
2376
- }
2377
- }
2378
- ${e.SlimCustomerFragmentDoc}`,e.DetachCustomerPaymentMethodDocument=(0,n.default)`
2379
- mutation DetachCustomerPaymentMethod($input: DetachCustomerPaymentMethodInput!) {
2380
- detachCustomerPaymentMethod(input: $input) {
2381
- ...SlimCustomerFragment
2382
- }
2383
- }
2384
- ${e.SlimCustomerFragmentDoc}`,e.GrantPromotionalEntitlementsDocument=(0,n.default)`
2385
- mutation GrantPromotionalEntitlements($input: GrantPromotionalEntitlementsInput!) {
2386
- grantPromotionalEntitlements(input: $input) {
2387
- ...PromotionalEntitlementFragment
2388
- }
2389
- }
2390
- ${e.PromotionalEntitlementFragmentDoc}`,e.RevokePromotionalEntitlementDocument=(0,n.default)`
2391
- mutation RevokePromotionalEntitlement($input: RevokePromotionalEntitlementInput!) {
2392
- revokePromotionalEntitlement(input: $input) {
2393
- id
2394
- }
2395
- }
2396
- `,e.ProvisionSubscriptionDocument=(0,n.default)`
2397
- mutation ProvisionSubscription($input: ProvisionSubscriptionInput!) {
2398
- provisionSubscription: provisionSubscriptionV2(input: $input) {
2399
- ...ProvisionSubscriptionFragment
2400
- }
2401
- }
2402
- ${e.ProvisionSubscriptionFragmentDoc}
2403
- ${e.SlimSubscriptionFragmentDoc}
2404
- ${e.SubscriptionInvoiceFragmentDoc}
2405
- ${e.CustomerResourceFragmentDoc}
2406
- ${e.PriceFragmentDoc}
2407
- ${e.PriceTierFragmentDoc}
2408
- ${e.TotalPriceFragmentDoc}
2409
- ${e.EntitlementFragmentDoc}
2410
- ${e.ResetPeriodConfigurationFragmentDoc}
2411
- ${e.FeatureFragmentDoc}`,e.ApplySubscriptionDocument=(0,n.default)`
2412
- mutation ApplySubscription($input: ApplySubscriptionInput!) {
2413
- applySubscription(input: $input) {
2414
- ...ApplySubscriptionFragment
2415
- }
2416
- }
2417
- ${e.ApplySubscriptionFragmentDoc}
2418
- ${e.SubscriptionFragmentDoc}
2419
- ${e.SlimCustomerFragmentDoc}
2420
- ${e.SubscriptionInvoiceFragmentDoc}
2421
- ${e.CustomerResourceFragmentDoc}
2422
- ${e.PriceFragmentDoc}
2423
- ${e.PriceTierFragmentDoc}
2424
- ${e.TotalPriceFragmentDoc}
2425
- ${e.PlanFragmentDoc}
2426
- ${e.ProductFragmentDoc}
2427
- ${e.PackageEntitlementFragmentDoc}
2428
- ${e.AddonFragmentDoc}
2429
- ${e.OveragePriceFragmentDoc}
2430
- ${e.AddonDependencyFragmentDoc}
2431
- ${e.PlanCompatiblePackageGroupsFragmentDoc}
2432
- ${e.SubscriptionScheduledUpdateDataFragmentDoc}
2433
- ${e.ScheduleVariablesFragmentDoc}
2434
- ${e.SubscriptionFutureUpdateDataFragmentDoc}
2435
- ${e.SubscriptionTrialConfigurationFragmentDoc}
2436
- ${e.EntitlementFragmentDoc}
2437
- ${e.ResetPeriodConfigurationFragmentDoc}
2438
- ${e.FeatureFragmentDoc}`,e.ImportSubscriptionsBulkDocument=(0,n.default)`
2439
- mutation ImportSubscriptionsBulk($input: ImportSubscriptionsBulkInput!) {
2440
- importSubscriptionsBulk(input: $input)
2441
- }
2442
- `,e.UpdateSubscriptionDocument=(0,n.default)`
2443
- mutation UpdateSubscription($input: UpdateSubscriptionInput!) {
2444
- updateSubscription: updateOneSubscription(input: $input) {
2445
- ...SlimSubscriptionFragment
2446
- }
2447
- }
2448
- ${e.SlimSubscriptionFragmentDoc}
2449
- ${e.SubscriptionInvoiceFragmentDoc}
2450
- ${e.CustomerResourceFragmentDoc}
2451
- ${e.PriceFragmentDoc}
2452
- ${e.PriceTierFragmentDoc}
2453
- ${e.TotalPriceFragmentDoc}`,e.CancelSubscriptionDocument=(0,n.default)`
2454
- mutation CancelSubscription($input: SubscriptionCancellationInput!) {
2455
- cancelSubscription(input: $input) {
2456
- ...SlimSubscriptionFragment
2457
- }
2458
- }
2459
- ${e.SlimSubscriptionFragmentDoc}
2460
- ${e.SubscriptionInvoiceFragmentDoc}
2461
- ${e.CustomerResourceFragmentDoc}
2462
- ${e.PriceFragmentDoc}
2463
- ${e.PriceTierFragmentDoc}
2464
- ${e.TotalPriceFragmentDoc}`,e.EstimateSubscriptionDocument=(0,n.default)`
2465
- mutation EstimateSubscription($input: EstimateSubscriptionInput!) {
2466
- estimateSubscription(input: $input) {
2467
- ...SubscriptionPreviewFragment
2468
- }
2469
- }
2470
- ${e.SubscriptionPreviewFragmentDoc}`,e.EstimateSubscriptionUpdateDocument=(0,n.default)`
2471
- mutation EstimateSubscriptionUpdate($input: EstimateSubscriptionUpdateInput!) {
2472
- estimateSubscriptionUpdate(input: $input) {
2473
- ...SubscriptionPreviewFragment
2474
- }
2475
- }
2476
- ${e.SubscriptionPreviewFragmentDoc}`,e.PreviewSubscriptionDocument=(0,n.default)`
2477
- mutation PreviewSubscription($input: PreviewSubscriptionInput!) {
2478
- previewSubscription(input: $input) {
2479
- ...SubscriptionPreviewV2Fragment
2480
- }
2481
- }
2482
- ${e.SubscriptionPreviewV2FragmentDoc}
2483
- ${e.ImmediateSubscriptionPreviewInvoiceFragmentDoc}
2484
- ${e.SubscriptionPreviewInvoiceFragmentDoc}`,e.PreviewNextInvoiceDocument=(0,n.default)`
2485
- mutation PreviewNextInvoice($input: PreviewNextInvoiceInput!) {
2486
- previewNextInvoice(input: $input) {
2487
- ...SubscriptionInvoicePreviewFragment
2488
- }
2489
- }
2490
- ${e.SubscriptionInvoicePreviewFragmentDoc}
2491
- ${e.PriceFragmentDoc}
2492
- ${e.PriceTierFragmentDoc}`,e.CancelSubscriptionUpdatesDocument=(0,n.default)`
2493
- mutation CancelSubscriptionUpdates($input: SubscriptionUpdateScheduleCancellationInput!) {
2494
- cancelSchedule(input: $input)
2495
- }
2496
- `,e.ReportUsageDocument=(0,n.default)`
2497
- mutation ReportUsage($input: ReportUsageInput!) {
2498
- reportUsage(input: $input) {
2499
- ...ReportUsageFragment
2500
- }
2501
- }
2502
- ${e.ReportUsageFragmentDoc}`,e.ReportUsageBulkDocument=(0,n.default)`
2503
- mutation ReportUsageBulk($input: ReportUsageBulkInput!) {
2504
- reportUsageBulk(input: $input) {
2505
- ...ReportUsageFragment
2506
- }
2507
- }
2508
- ${e.ReportUsageFragmentDoc}`,e.ReportEventDocument=(0,n.default)`
2509
- mutation ReportEvent($input: UsageEventsReportInput!) {
2510
- reportEvent(events: $input)
2511
- }
2512
- `,e.ReportEntitlementCheckRequestedDocument=(0,n.default)`
2513
- mutation ReportEntitlementCheckRequested($entitlementCheckRequested: EntitlementCheckRequested!) {
2514
- reportEntitlementCheckRequested(
2515
- entitlementCheckRequested: $entitlementCheckRequested
2516
- )
2517
- }
2518
- `,e.CreateSubscriptionDocument=(0,n.default)`
2519
- mutation CreateSubscription($input: SubscriptionInput!) {
2520
- createSubscription(subscription: $input) {
2521
- ...SlimSubscriptionFragment
2522
- }
2523
- }
2524
- ${e.SlimSubscriptionFragmentDoc}
2525
- ${e.SubscriptionInvoiceFragmentDoc}
2526
- ${e.CustomerResourceFragmentDoc}
2527
- ${e.PriceFragmentDoc}
2528
- ${e.PriceTierFragmentDoc}
2529
- ${e.TotalPriceFragmentDoc}`,e.MigrateSubscriptionToLatestDocument=(0,n.default)`
2530
- mutation MigrateSubscriptionToLatest($input: SubscriptionMigrationInput!) {
2531
- migrateSubscriptionToLatest(input: $input) {
2532
- subscriptionId
2533
- }
2534
- }
2535
- `,e.ArchiveCustomerDocument=(0,n.default)`
2536
- mutation ArchiveCustomer($input: ArchiveCustomerInput!) {
2537
- archiveCustomer(input: $input) {
2538
- customerId
2539
- }
2540
- }
2541
- `,e.UnarchiveCustomerDocument=(0,n.default)`
2542
- mutation UnarchiveCustomer($input: UnarchiveCustomerInput!) {
2543
- unarchiveCustomer(input: $input) {
2544
- ...SlimCustomerFragment
2545
- }
2546
- }
2547
- ${e.SlimCustomerFragmentDoc}`,e.TransferSubscriptionDocument=(0,n.default)`
2548
- mutation TransferSubscription($input: TransferSubscriptionInput!) {
2549
- transferSubscription(input: $input) {
2550
- ...SlimSubscriptionFragment
2551
- }
2552
- }
2553
- ${e.SlimSubscriptionFragmentDoc}
2554
- ${e.SubscriptionInvoiceFragmentDoc}
2555
- ${e.CustomerResourceFragmentDoc}
2556
- ${e.PriceFragmentDoc}
2557
- ${e.PriceTierFragmentDoc}
2558
- ${e.TotalPriceFragmentDoc}`,e.DelegateSubscriptionToCustomerDocument=(0,n.default)`
2559
- mutation DelegateSubscriptionToCustomer($input: DelegateSubscriptionToCustomerInput!) {
2560
- delegateSubscriptionToCustomer(input: $input) {
2561
- ...SlimSubscriptionFragment
2562
- }
2563
- }
2564
- ${e.SlimSubscriptionFragmentDoc}
2565
- ${e.SubscriptionInvoiceFragmentDoc}
2566
- ${e.CustomerResourceFragmentDoc}
2567
- ${e.PriceFragmentDoc}
2568
- ${e.PriceTierFragmentDoc}
2569
- ${e.TotalPriceFragmentDoc}`,e.TransferSubscriptionToResourceDocument=(0,n.default)`
2570
- mutation TransferSubscriptionToResource($input: TransferSubscriptionToResourceInput!) {
2571
- transferSubscriptionToResource(input: $input) {
2572
- ...SlimSubscriptionFragment
2573
- }
2574
- }
2575
- ${e.SlimSubscriptionFragmentDoc}
2576
- ${e.SubscriptionInvoiceFragmentDoc}
2577
- ${e.CustomerResourceFragmentDoc}
2578
- ${e.PriceFragmentDoc}
2579
- ${e.PriceTierFragmentDoc}
2580
- ${e.TotalPriceFragmentDoc}`,e.GrantCreditsDocument=(0,n.default)`
2581
- mutation GrantCredits($input: CreditGrantInput!) {
2582
- createCreditGrant(input: $input) {
2583
- ...CreditGrantFragment
2584
- }
2585
- }
2586
- ${e.CreditGrantFragmentDoc}`,e.GrantPromotionalEntitlementsGroupDocument=(0,n.default)`
2587
- mutation GrantPromotionalEntitlementsGroup($input: GrantPromotionalEntitlementsGroupInput!) {
2588
- grantPromotionalEntitlementsGroup(input: $input) {
2589
- ...PromotionalEntitlementFragment
2590
- }
2591
- }
2592
- ${e.PromotionalEntitlementFragmentDoc}`,e.RevokePromotionalEntitlementsGroupDocument=(0,n.default)`
2593
- mutation RevokePromotionalEntitlementsGroup($input: RevokePromotionalEntitlementsGroupInput!) {
2594
- revokePromotionalEntitlementsGroup(input: $input) {
2595
- ...PromotionalEntitlementFragment
2596
- }
2597
- }
2598
- ${e.PromotionalEntitlementFragmentDoc}`,e.UnlinkPromotionalEntitlementsGroupDocument=(0,n.default)`
2599
- mutation UnlinkPromotionalEntitlementsGroup($input: UnlinkPromotionalEntitlementsGroupInput!) {
2600
- unlinkPromotionalEntitlementsGroup(input: $input) {
2601
- ...PromotionalEntitlementFragment
2602
- }
2603
- }
2604
- ${e.PromotionalEntitlementFragmentDoc}`,e.CreatePaymentSessionDocument=(0,n.default)`
2605
- mutation CreatePaymentSession($input: PaymentSessionInput!) {
2606
- createPaymentSession(input: $input) {
2607
- ...PaymentSessionFragment
2608
- }
2609
- }
2610
- ${e.PaymentSessionFragmentDoc}`,e.VoidCreditGrantDocument=(0,n.default)`
2611
- mutation VoidCreditGrant($input: VoidCreditGrantInput!) {
2612
- voidCreditGrant(input: $input) {
2613
- ...CreditGrantFragment
2614
- }
2615
- }
2616
- ${e.CreditGrantFragmentDoc}`,e.GetCustomerByIdDocument=(0,n.default)`
2617
- query GetCustomerById($input: GetCustomerByRefIdInput!) {
2618
- getCustomerByRefId(input: $input) {
2619
- ...CustomerWithSubscriptionsFragment
2620
- }
2621
- }
2622
- ${e.CustomerWithSubscriptionsFragmentDoc}
2623
- ${e.CustomerFragmentDoc}
2624
- ${e.SlimCustomerFragmentDoc}
2625
- ${e.CouponFragmentDoc}
2626
- ${e.PromotionalEntitlementFragmentDoc}
2627
- ${e.SubscriptionFragmentDoc}
2628
- ${e.SubscriptionInvoiceFragmentDoc}
2629
- ${e.CustomerResourceFragmentDoc}
2630
- ${e.PriceFragmentDoc}
2631
- ${e.PriceTierFragmentDoc}
2632
- ${e.TotalPriceFragmentDoc}
2633
- ${e.PlanFragmentDoc}
2634
- ${e.ProductFragmentDoc}
2635
- ${e.PackageEntitlementFragmentDoc}
2636
- ${e.AddonFragmentDoc}
2637
- ${e.OveragePriceFragmentDoc}
2638
- ${e.AddonDependencyFragmentDoc}
2639
- ${e.PlanCompatiblePackageGroupsFragmentDoc}
2640
- ${e.SubscriptionScheduledUpdateDataFragmentDoc}
2641
- ${e.ScheduleVariablesFragmentDoc}
2642
- ${e.SubscriptionFutureUpdateDataFragmentDoc}
2643
- ${e.SubscriptionTrialConfigurationFragmentDoc}`,e.GetCustomerStatisticsDocument=(0,n.default)`
2644
- query GetCustomerStatistics($input: GetCustomerByRefIdInput!) {
2645
- getCustomerByRefId(input: $input) {
2646
- ...CustomerStatisticsFragment
2647
- }
2648
- }
2649
- ${e.CustomerStatisticsFragmentDoc}`,e.GetActiveSubscriptionsDocument=(0,n.default)`
2650
- query GetActiveSubscriptions($input: GetActiveSubscriptionsInput!) {
2651
- getActiveSubscriptions(input: $input) {
2652
- ...SubscriptionFragment
2653
- }
2654
- }
2655
- ${e.SubscriptionFragmentDoc}
2656
- ${e.SlimCustomerFragmentDoc}
2657
- ${e.SubscriptionInvoiceFragmentDoc}
2658
- ${e.CustomerResourceFragmentDoc}
2659
- ${e.PriceFragmentDoc}
2660
- ${e.PriceTierFragmentDoc}
2661
- ${e.TotalPriceFragmentDoc}
2662
- ${e.PlanFragmentDoc}
2663
- ${e.ProductFragmentDoc}
2664
- ${e.PackageEntitlementFragmentDoc}
2665
- ${e.AddonFragmentDoc}
2666
- ${e.OveragePriceFragmentDoc}
2667
- ${e.AddonDependencyFragmentDoc}
2668
- ${e.PlanCompatiblePackageGroupsFragmentDoc}
2669
- ${e.SubscriptionScheduledUpdateDataFragmentDoc}
2670
- ${e.ScheduleVariablesFragmentDoc}
2671
- ${e.SubscriptionFutureUpdateDataFragmentDoc}
2672
- ${e.SubscriptionTrialConfigurationFragmentDoc}`,e.GetActiveSubscriptionsListDocument=(0,n.default)`
2673
- query GetActiveSubscriptionsList($input: GetActiveSubscriptionsInput!) {
2674
- getActiveSubscriptions(input: $input) {
2675
- ...SlimSubscriptionFragmentV2
2676
- }
2677
- }
2678
- ${e.SlimSubscriptionFragmentV2FragmentDoc}`,e.GetSubscriptionsDocument=(0,n.default)`
2679
- query GetSubscriptions($filter: SubscriptionQueryFilter, $paging: CursorPaging, $sorting: [SubscriptionQuerySort!]) {
2680
- subscriptions(filter: $filter, paging: $paging, sorting: $sorting) {
2681
- edges {
2682
- node {
2683
- ...SubscriptionQueryFragment
2684
- }
2685
- }
2686
- pageInfo {
2687
- ...PageInfoFragment
2688
- }
2689
- }
2690
- }
2691
- ${e.SubscriptionQueryFragmentDoc}
2692
- ${e.PageInfoFragmentDoc}`,e.GetSubscriptionDocument=(0,n.default)`
2693
- query GetSubscription($input: GetSubscriptionInput!) {
2694
- getSubscription(input: $input) {
2695
- ...SubscriptionFragment
2696
- }
2697
- }
2698
- ${e.SubscriptionFragmentDoc}
2699
- ${e.SlimCustomerFragmentDoc}
2700
- ${e.SubscriptionInvoiceFragmentDoc}
2701
- ${e.CustomerResourceFragmentDoc}
2702
- ${e.PriceFragmentDoc}
2703
- ${e.PriceTierFragmentDoc}
2704
- ${e.TotalPriceFragmentDoc}
2705
- ${e.PlanFragmentDoc}
2706
- ${e.ProductFragmentDoc}
2707
- ${e.PackageEntitlementFragmentDoc}
2708
- ${e.AddonFragmentDoc}
2709
- ${e.OveragePriceFragmentDoc}
2710
- ${e.AddonDependencyFragmentDoc}
2711
- ${e.PlanCompatiblePackageGroupsFragmentDoc}
2712
- ${e.SubscriptionScheduledUpdateDataFragmentDoc}
2713
- ${e.ScheduleVariablesFragmentDoc}
2714
- ${e.SubscriptionFutureUpdateDataFragmentDoc}
2715
- ${e.SubscriptionTrialConfigurationFragmentDoc}`,e.GetCouponsDocument=(0,n.default)`
2716
- query GetCoupons {
2717
- coupons(filter: {status: {eq: ACTIVE}}, paging: {first: 50}) {
2718
- edges {
2719
- node {
2720
- ...CouponFragment
2721
- }
2722
- }
2723
- }
2724
- }
2725
- ${e.CouponFragmentDoc}`,e.GetPaywallDocument=(0,n.default)`
2726
- query GetPaywall($input: GetPaywallInput!) {
2727
- paywall(input: $input) {
2728
- ...PaywallFragment
2729
- }
2730
- }
2731
- ${e.PaywallFragmentDoc}
2732
- ${e.PlanFragmentDoc}
2733
- ${e.ProductFragmentDoc}
2734
- ${e.PackageEntitlementFragmentDoc}
2735
- ${e.AddonFragmentDoc}
2736
- ${e.PriceFragmentDoc}
2737
- ${e.PriceTierFragmentDoc}
2738
- ${e.OveragePriceFragmentDoc}
2739
- ${e.AddonDependencyFragmentDoc}
2740
- ${e.PlanCompatiblePackageGroupsFragmentDoc}
2741
- ${e.PaywallCurrencyFragmentDoc}
2742
- ${e.PaywallConfigurationFragmentDoc}
2743
- ${e.TypographyConfigurationFragmentDoc}
2744
- ${e.FontVariantFragmentDoc}
2745
- ${e.LayoutConfigurationFragmentDoc}
2746
- ${e.CustomerFragmentDoc}
2747
- ${e.SlimCustomerFragmentDoc}
2748
- ${e.CouponFragmentDoc}
2749
- ${e.PromotionalEntitlementFragmentDoc}
2750
- ${e.SubscriptionFragmentDoc}
2751
- ${e.SubscriptionInvoiceFragmentDoc}
2752
- ${e.CustomerResourceFragmentDoc}
2753
- ${e.TotalPriceFragmentDoc}
2754
- ${e.SubscriptionScheduledUpdateDataFragmentDoc}
2755
- ${e.ScheduleVariablesFragmentDoc}
2756
- ${e.SubscriptionFutureUpdateDataFragmentDoc}
2757
- ${e.SubscriptionTrialConfigurationFragmentDoc}
2758
- ${e.PaywallCalculatedPricePointsFragmentDoc}`,e.GetEntitlementsDocument=(0,n.default)`
2759
- query GetEntitlements($query: FetchEntitlementsQuery!) {
2760
- entitlements: cachedEntitlements(query: $query) {
2761
- ...EntitlementFragment
2762
- }
2763
- }
2764
- ${e.EntitlementFragmentDoc}
2765
- ${e.ResetPeriodConfigurationFragmentDoc}
2766
- ${e.FeatureFragmentDoc}`,e.GetEntitlementsStateDocument=(0,n.default)`
2767
- query GetEntitlementsState($query: FetchEntitlementsQuery!) {
2768
- entitlementsState(query: $query) {
2769
- entitlements {
2770
- ...EntitlementFragment
2771
- }
2772
- accessDeniedReason
2773
- }
2774
- }
2775
- ${e.EntitlementFragmentDoc}
2776
- ${e.ResetPeriodConfigurationFragmentDoc}
2777
- ${e.FeatureFragmentDoc}`,e.GetEntitlementDocument=(0,n.default)`
2778
- query GetEntitlement($query: FetchEntitlementQuery!) {
2779
- entitlement(query: $query) {
2780
- ...EntitlementFragment
2781
- }
2782
- }
2783
- ${e.EntitlementFragmentDoc}
2784
- ${e.ResetPeriodConfigurationFragmentDoc}
2785
- ${e.FeatureFragmentDoc}`,e.GetProductsDocument=(0,n.default)`
2786
- query GetProducts {
2787
- products(paging: {first: 20}) {
2788
- edges {
2789
- node {
2790
- ...ProductFragment
2791
- }
2792
- }
2793
- }
2794
- }
2795
- ${e.ProductFragmentDoc}`,e.GetSdkConfigurationDocument=(0,n.default)`
2796
- query GetSdkConfiguration {
2797
- sdkConfiguration {
2798
- sentryDsn
2799
- isWidgetWatermarkEnabled
2800
- showWatermark
2801
- }
2802
- }
2803
- `,e.GetCustomerPortalByRefIdDocument=(0,n.default)`
2804
- query GetCustomerPortalByRefId($input: CustomerPortalInput!) {
2805
- customerPortal(input: $input) {
2806
- ...CustomerPortalFragment
2807
- }
2808
- }
2809
- ${e.CustomerPortalFragmentDoc}
2810
- ${e.CustomerPortalSubscriptionFragmentDoc}
2811
- ${e.CustomerPortalSubscriptionPriceFragmentDoc}
2812
- ${e.CustomerPortalSubscriptionAddonFragmentDoc}
2813
- ${e.CustomerPortalSubscriptionScheduledUpdateDataFragmentDoc}
2814
- ${e.ScheduleVariablesFragmentDoc}
2815
- ${e.CustomerPortalEntitlementFragmentDoc}
2816
- ${e.ResetPeriodConfigurationFragmentDoc}
2817
- ${e.FeatureFragmentDoc}
2818
- ${e.CustomerPortalPromotionalEntitlementFragmentDoc}
2819
- ${e.CustomerPortalBillingInformationFragmentDoc}
2820
- ${e.CustomerPortalConfigurationFragmentDoc}
2821
- ${e.TypographyConfigurationFragmentDoc}
2822
- ${e.FontVariantFragmentDoc}
2823
- ${e.CustomerResourceFragmentDoc}`,e.GetCheckoutStateDocument=(0,n.default)`
2824
- query GetCheckoutState($input: CheckoutStateInput!) {
2825
- checkoutState(input: $input) {
2826
- ...CheckoutStateFragment
2827
- }
2828
- }
2829
- ${e.CheckoutStateFragmentDoc}
2830
- ${e.CheckoutConfigurationFragmentDoc}
2831
- ${e.TypographyConfigurationFragmentDoc}
2832
- ${e.FontVariantFragmentDoc}
2833
- ${e.CustomerFragmentDoc}
2834
- ${e.SlimCustomerFragmentDoc}
2835
- ${e.CouponFragmentDoc}
2836
- ${e.PromotionalEntitlementFragmentDoc}
2837
- ${e.SubscriptionFragmentDoc}
2838
- ${e.SubscriptionInvoiceFragmentDoc}
2839
- ${e.CustomerResourceFragmentDoc}
2840
- ${e.PriceFragmentDoc}
2841
- ${e.PriceTierFragmentDoc}
2842
- ${e.TotalPriceFragmentDoc}
2843
- ${e.PlanFragmentDoc}
2844
- ${e.ProductFragmentDoc}
2845
- ${e.PackageEntitlementFragmentDoc}
2846
- ${e.AddonFragmentDoc}
2847
- ${e.OveragePriceFragmentDoc}
2848
- ${e.AddonDependencyFragmentDoc}
2849
- ${e.PlanCompatiblePackageGroupsFragmentDoc}
2850
- ${e.SubscriptionScheduledUpdateDataFragmentDoc}
2851
- ${e.ScheduleVariablesFragmentDoc}
2852
- ${e.SubscriptionFutureUpdateDataFragmentDoc}
2853
- ${e.SubscriptionTrialConfigurationFragmentDoc}
2854
- ${e.StripeCheckoutCredentialsFragmentDoc}
2855
- ${e.ZuoraCheckoutCredentialsFragmentDoc}`,e.GetMockPaywallDocument=(0,n.default)`
2856
- query GetMockPaywall($input: GetPaywallInput!) {
2857
- mockPaywall(input: $input) {
2858
- plans {
2859
- ...MockPaywallPlanFragment
2860
- }
2861
- configuration {
2862
- ...PaywallConfigurationFragment
2863
- }
2864
- }
2865
- }
2866
- ${e.MockPaywallPlanFragmentDoc}
2867
- ${e.MockPaywallPackageEntitlementFragmentDoc}
2868
- ${e.MockPaywallPriceFragmentDoc}
2869
- ${e.PriceTierFragmentDoc}
2870
- ${e.MockPaywallAddonFragmentDoc}
2871
- ${e.MockPaywallAddonDependencyFragmentDoc}
2872
- ${e.MockPaywallPlanCompatiblePackageGroupsFragmentDoc}
2873
- ${e.PaywallConfigurationFragmentDoc}
2874
- ${e.TypographyConfigurationFragmentDoc}
2875
- ${e.FontVariantFragmentDoc}
2876
- ${e.LayoutConfigurationFragmentDoc}`,e.GetUsageHistoryDocument=(0,n.default)`
2877
- query GetUsageHistory($usageHistoryInput: UsageHistoryInput!) {
2878
- usageHistory(usageHistoryInput: $usageHistoryInput) {
2879
- ...UsageHistoryFragment
2880
- }
2881
- }
2882
- ${e.UsageHistoryFragmentDoc}`,e.GetUsageHistoryV2Document=(0,n.default)`
2883
- query GetUsageHistoryV2($input: UsageHistoryV2Input!) {
2884
- usageHistoryV2(input: $input) {
2885
- ...UsageHistoryV2Fragment
2886
- }
2887
- }
2888
- ${e.UsageHistoryV2FragmentDoc}`,e.GetCreditBalanceDocument=(0,n.default)`
2889
- query GetCreditBalance($input: CreditBalanceSummaryInput!) {
2890
- creditBalanceSummary(input: $input) {
2891
- ...CreditsBalanceSummaryFragment
2892
- }
2893
- }
2894
- ${e.CreditsBalanceSummaryFragmentDoc}
2895
- ${e.CreditBalanceFragmentDoc}`,e.GetCreditGrantsDocument=(0,n.default)`
2896
- query GetCreditGrants($input: GetCreditGrantsInput!) {
2897
- creditGrants(input: $input) {
2898
- pageInfo {
2899
- ...PageInfoFragment
2900
- }
2901
- edges {
2902
- node {
2903
- ...CreditGrantFragment
2904
- }
2905
- }
2906
- totalCount
2907
- }
2908
- }
2909
- ${e.PageInfoFragmentDoc}
2910
- ${e.CreditGrantFragmentDoc}`,e.GetCreditLedgerDocument=(0,n.default)`
2911
- query GetCreditLedger($input: CreditLedgerInput!) {
2912
- creditsLedger(input: $input) {
2913
- events {
2914
- ...CreditLedgerFragment
2915
- }
2916
- }
2917
- }
2918
- ${e.CreditLedgerFragmentDoc}`,e.GetCreditUsageDocument=(0,n.default)`
2919
- query GetCreditUsage($input: CreditUsageInput!) {
2920
- creditUsage(input: $input) {
2921
- ...CreditUsageFragment
2922
- }
2923
- }
2924
- ${e.CreditUsageFragmentDoc}
2925
- ${e.SlimCustomCurrencyFragmentDoc}`,e.OnEntitlementsUpdatedDocument=(0,n.default)`
2926
- subscription OnEntitlementsUpdated {
2927
- entitlementsUpdated {
2928
- ...EntitlementsUpdatedPayload
2929
- }
2930
- }
2931
- ${e.EntitlementsUpdatedPayloadFragmentDoc}
2932
- ${e.EntitlementFragmentDoc}
2933
- ${e.ResetPeriodConfigurationFragmentDoc}
2934
- ${e.FeatureFragmentDoc}`,e.OnUsageUpdatedDocument=(0,n.default)`
2935
- subscription OnUsageUpdated {
2936
- usageUpdated {
2937
- ...EntitlementUsageUpdated
2938
- }
2939
- }
2940
- ${e.EntitlementUsageUpdatedFragmentDoc}
2941
- ${e.UsageUpdatedFragmentDoc}
2942
- ${e.EntitlementFragmentDoc}
2943
- ${e.ResetPeriodConfigurationFragmentDoc}
2944
- ${e.FeatureFragmentDoc}`,e.OnPackagePublishedDocument=(0,n.default)`
2945
- subscription OnPackagePublished {
2946
- packagePublished {
2947
- ...PackagePublishedPayload
2948
- }
2949
- }
2950
- ${e.PackagePublishedPayloadFragmentDoc}`,e.OnCreditBalanceUpdatedDocument=(0,n.default)`
2951
- subscription OnCreditBalanceUpdated {
2952
- creditBalanceUpdated {
2953
- ...CreditBalanceUpdatedPayload
2954
- }
2955
- }
2956
- ${e.CreditBalanceUpdatedPayloadFragmentDoc}`;const i=(t,a,s)=>t();function r(t,a=i){return{ProvisionCustomer(s,c){return a(l=>t.request(e.ProvisionCustomerDocument,s,Object.assign(Object.assign({},c),l)),"ProvisionCustomer","mutation")},ImportCustomerBulk(s,c){return a(l=>t.request(e.ImportCustomerBulkDocument,s,Object.assign(Object.assign({},c),l)),"ImportCustomerBulk","mutation")},ImportCustomer(s,c){return a(l=>t.request(e.ImportCustomerDocument,s,Object.assign(Object.assign({},c),l)),"ImportCustomer","mutation")},UpdateCustomer(s,c){return a(l=>t.request(e.UpdateCustomerDocument,s,Object.assign(Object.assign({},c),l)),"UpdateCustomer","mutation")},DetachCustomerPaymentMethod(s,c){return a(l=>t.request(e.DetachCustomerPaymentMethodDocument,s,Object.assign(Object.assign({},c),l)),"DetachCustomerPaymentMethod","mutation")},GrantPromotionalEntitlements(s,c){return a(l=>t.request(e.GrantPromotionalEntitlementsDocument,s,Object.assign(Object.assign({},c),l)),"GrantPromotionalEntitlements","mutation")},RevokePromotionalEntitlement(s,c){return a(l=>t.request(e.RevokePromotionalEntitlementDocument,s,Object.assign(Object.assign({},c),l)),"RevokePromotionalEntitlement","mutation")},ProvisionSubscription(s,c){return a(l=>t.request(e.ProvisionSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"ProvisionSubscription","mutation")},ApplySubscription(s,c){return a(l=>t.request(e.ApplySubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"ApplySubscription","mutation")},ImportSubscriptionsBulk(s,c){return a(l=>t.request(e.ImportSubscriptionsBulkDocument,s,Object.assign(Object.assign({},c),l)),"ImportSubscriptionsBulk","mutation")},UpdateSubscription(s,c){return a(l=>t.request(e.UpdateSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"UpdateSubscription","mutation")},CancelSubscription(s,c){return a(l=>t.request(e.CancelSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"CancelSubscription","mutation")},EstimateSubscription(s,c){return a(l=>t.request(e.EstimateSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"EstimateSubscription","mutation")},EstimateSubscriptionUpdate(s,c){return a(l=>t.request(e.EstimateSubscriptionUpdateDocument,s,Object.assign(Object.assign({},c),l)),"EstimateSubscriptionUpdate","mutation")},PreviewSubscription(s,c){return a(l=>t.request(e.PreviewSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"PreviewSubscription","mutation")},PreviewNextInvoice(s,c){return a(l=>t.request(e.PreviewNextInvoiceDocument,s,Object.assign(Object.assign({},c),l)),"PreviewNextInvoice","mutation")},CancelSubscriptionUpdates(s,c){return a(l=>t.request(e.CancelSubscriptionUpdatesDocument,s,Object.assign(Object.assign({},c),l)),"CancelSubscriptionUpdates","mutation")},ReportUsage(s,c){return a(l=>t.request(e.ReportUsageDocument,s,Object.assign(Object.assign({},c),l)),"ReportUsage","mutation")},ReportUsageBulk(s,c){return a(l=>t.request(e.ReportUsageBulkDocument,s,Object.assign(Object.assign({},c),l)),"ReportUsageBulk","mutation")},ReportEvent(s,c){return a(l=>t.request(e.ReportEventDocument,s,Object.assign(Object.assign({},c),l)),"ReportEvent","mutation")},ReportEntitlementCheckRequested(s,c){return a(l=>t.request(e.ReportEntitlementCheckRequestedDocument,s,Object.assign(Object.assign({},c),l)),"ReportEntitlementCheckRequested","mutation")},CreateSubscription(s,c){return a(l=>t.request(e.CreateSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"CreateSubscription","mutation")},MigrateSubscriptionToLatest(s,c){return a(l=>t.request(e.MigrateSubscriptionToLatestDocument,s,Object.assign(Object.assign({},c),l)),"MigrateSubscriptionToLatest","mutation")},ArchiveCustomer(s,c){return a(l=>t.request(e.ArchiveCustomerDocument,s,Object.assign(Object.assign({},c),l)),"ArchiveCustomer","mutation")},UnarchiveCustomer(s,c){return a(l=>t.request(e.UnarchiveCustomerDocument,s,Object.assign(Object.assign({},c),l)),"UnarchiveCustomer","mutation")},TransferSubscription(s,c){return a(l=>t.request(e.TransferSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"TransferSubscription","mutation")},DelegateSubscriptionToCustomer(s,c){return a(l=>t.request(e.DelegateSubscriptionToCustomerDocument,s,Object.assign(Object.assign({},c),l)),"DelegateSubscriptionToCustomer","mutation")},TransferSubscriptionToResource(s,c){return a(l=>t.request(e.TransferSubscriptionToResourceDocument,s,Object.assign(Object.assign({},c),l)),"TransferSubscriptionToResource","mutation")},GrantCredits(s,c){return a(l=>t.request(e.GrantCreditsDocument,s,Object.assign(Object.assign({},c),l)),"GrantCredits","mutation")},GrantPromotionalEntitlementsGroup(s,c){return a(l=>t.request(e.GrantPromotionalEntitlementsGroupDocument,s,Object.assign(Object.assign({},c),l)),"GrantPromotionalEntitlementsGroup","mutation")},RevokePromotionalEntitlementsGroup(s,c){return a(l=>t.request(e.RevokePromotionalEntitlementsGroupDocument,s,Object.assign(Object.assign({},c),l)),"RevokePromotionalEntitlementsGroup","mutation")},UnlinkPromotionalEntitlementsGroup(s,c){return a(l=>t.request(e.UnlinkPromotionalEntitlementsGroupDocument,s,Object.assign(Object.assign({},c),l)),"UnlinkPromotionalEntitlementsGroup","mutation")},CreatePaymentSession(s,c){return a(l=>t.request(e.CreatePaymentSessionDocument,s,Object.assign(Object.assign({},c),l)),"CreatePaymentSession","mutation")},VoidCreditGrant(s,c){return a(l=>t.request(e.VoidCreditGrantDocument,s,Object.assign(Object.assign({},c),l)),"VoidCreditGrant","mutation")},GetCustomerById(s,c){return a(l=>t.request(e.GetCustomerByIdDocument,s,Object.assign(Object.assign({},c),l)),"GetCustomerById","query")},GetCustomerStatistics(s,c){return a(l=>t.request(e.GetCustomerStatisticsDocument,s,Object.assign(Object.assign({},c),l)),"GetCustomerStatistics","query")},GetActiveSubscriptions(s,c){return a(l=>t.request(e.GetActiveSubscriptionsDocument,s,Object.assign(Object.assign({},c),l)),"GetActiveSubscriptions","query")},GetActiveSubscriptionsList(s,c){return a(l=>t.request(e.GetActiveSubscriptionsListDocument,s,Object.assign(Object.assign({},c),l)),"GetActiveSubscriptionsList","query")},GetSubscriptions(s,c){return a(l=>t.request(e.GetSubscriptionsDocument,s,Object.assign(Object.assign({},c),l)),"GetSubscriptions","query")},GetSubscription(s,c){return a(l=>t.request(e.GetSubscriptionDocument,s,Object.assign(Object.assign({},c),l)),"GetSubscription","query")},GetCoupons(s,c){return a(l=>t.request(e.GetCouponsDocument,s,Object.assign(Object.assign({},c),l)),"GetCoupons","query")},GetPaywall(s,c){return a(l=>t.request(e.GetPaywallDocument,s,Object.assign(Object.assign({},c),l)),"GetPaywall","query")},GetEntitlements(s,c){return a(l=>t.request(e.GetEntitlementsDocument,s,Object.assign(Object.assign({},c),l)),"GetEntitlements","query")},GetEntitlementsState(s,c){return a(l=>t.request(e.GetEntitlementsStateDocument,s,Object.assign(Object.assign({},c),l)),"GetEntitlementsState","query")},GetEntitlement(s,c){return a(l=>t.request(e.GetEntitlementDocument,s,Object.assign(Object.assign({},c),l)),"GetEntitlement","query")},GetProducts(s,c){return a(l=>t.request(e.GetProductsDocument,s,Object.assign(Object.assign({},c),l)),"GetProducts","query")},GetSdkConfiguration(s,c){return a(l=>t.request(e.GetSdkConfigurationDocument,s,Object.assign(Object.assign({},c),l)),"GetSdkConfiguration","query")},GetCustomerPortalByRefId(s,c){return a(l=>t.request(e.GetCustomerPortalByRefIdDocument,s,Object.assign(Object.assign({},c),l)),"GetCustomerPortalByRefId","query")},GetCheckoutState(s,c){return a(l=>t.request(e.GetCheckoutStateDocument,s,Object.assign(Object.assign({},c),l)),"GetCheckoutState","query")},GetMockPaywall(s,c){return a(l=>t.request(e.GetMockPaywallDocument,s,Object.assign(Object.assign({},c),l)),"GetMockPaywall","query")},GetUsageHistory(s,c){return a(l=>t.request(e.GetUsageHistoryDocument,s,Object.assign(Object.assign({},c),l)),"GetUsageHistory","query")},GetUsageHistoryV2(s,c){return a(l=>t.request(e.GetUsageHistoryV2Document,s,Object.assign(Object.assign({},c),l)),"GetUsageHistoryV2","query")},GetCreditBalance(s,c){return a(l=>t.request(e.GetCreditBalanceDocument,s,Object.assign(Object.assign({},c),l)),"GetCreditBalance","query")},GetCreditGrants(s,c){return a(l=>t.request(e.GetCreditGrantsDocument,s,Object.assign(Object.assign({},c),l)),"GetCreditGrants","query")},GetCreditLedger(s,c){return a(l=>t.request(e.GetCreditLedgerDocument,s,Object.assign(Object.assign({},c),l)),"GetCreditLedger","query")},GetCreditUsage(s,c){return a(l=>t.request(e.GetCreditUsageDocument,s,Object.assign(Object.assign({},c),l)),"GetCreditUsage","query")},OnEntitlementsUpdated(s,c){return a(l=>t.request(e.OnEntitlementsUpdatedDocument,s,Object.assign(Object.assign({},c),l)),"OnEntitlementsUpdated","subscription")},OnUsageUpdated(s,c){return a(l=>t.request(e.OnUsageUpdatedDocument,s,Object.assign(Object.assign({},c),l)),"OnUsageUpdated","subscription")},OnPackagePublished(s,c){return a(l=>t.request(e.OnPackagePublishedDocument,s,Object.assign(Object.assign({},c),l)),"OnPackagePublished","subscription")},OnCreditBalanceUpdated(s,c){return a(l=>t.request(e.OnCreditBalanceUpdatedDocument,s,Object.assign(Object.assign({},c),l)),"OnCreditBalanceUpdated","subscription")}}}e.getSdk=r})(Pn)),Pn}var Me=Mm();const Ba=(e,n)=>e.minUnitQuantity&&n<e.minUnitQuantity?e.minUnitQuantity:e.maxUnitQuantity&&n>e.maxUnitQuantity?e.maxUnitQuantity:n,_a=e=>!!(e!=null&&e.pricePoints.some(n=>n.billingPeriod===Me.BillingPeriod.Monthly)),$a=e=>!!(e!=null&&e.pricePoints.some(n=>n.billingPeriod===Me.BillingPeriod.Annually)),Um=e=>_a(e)&&$a(e),ur=(e,n,i)=>e===Me.BillingPeriod.Monthly&&n||e===Me.BillingPeriod.Annually&&i?e:null,dr=({pricingModel:e})=>e===b.BillingModel.PerUnit;function Om(e,n,i){var a;if(!n)return[];const r=Pi(e,"featureId"),t=Pi(Si((a=i==null?void 0:i.prices)==null?void 0:a.map(s=>{const{feature:c}=s;return!c||!dr(s)?null:{featureId:c.featureId,quantity:c.unitQuantity||null}})),"featureId");return Si(n==null?void 0:n.map(s=>{var d,p,m;const c=(d=s.feature)==null?void 0:d.featureId;if(!c||!dr(s))return null;let l;const u=((p=r[c])==null?void 0:p.quantity)||((m=t[c])==null?void 0:m.quantity);return l=Ba(s,u||1),s.isTieredPrice&&!zn(s.tiers)&&(l=Qr(s.tiers,l).upTo),{featureId:c,quantity:l}}))}function Lm({plan:e,activeSubscription:n,preferredBillingPeriod:i}){var s,c;const r=_a(e),t=$a(e);if(i){const l=ur(i,r,t);if(l)return l}if(((s=n==null?void 0:n.plan)==null?void 0:s.id)===(e==null?void 0:e.id))return((c=n==null?void 0:n.price)==null?void 0:c.billingPeriod)||Me.BillingPeriod.Monthly;if(n!=null&&n.prices&&(n==null?void 0:n.prices.length)>0){const l=ur(n==null?void 0:n.prices[0].billingPeriod,r,t);if(l)return l}return t?Me.BillingPeriod.Annually:Me.BillingPeriod.Monthly}function Bm({preferredBillingPeriod:e,plan:n,activeSubscription:i,billingCountryCode:r,preconfiguredBillableFeatures:t}){const a=Lm({plan:n,activeSubscription:i,preferredBillingPeriod:e}),s=n==null?void 0:n.pricePoints.filter(l=>l.billingPeriod===a),c=Om(t,s,i);return{billingPeriod:a,billableFeatures:c,billingCountryCode:r}}function _m(){const[{planStep:e}]=W();return e}function $m(){const[,e]=W();return(n,i)=>e(r=>{const t=r.planStep.billableFeatures.find(a=>a.featureId===n);t?t.quantity=i:r.planStep.billableFeatures.push({featureId:n,quantity:i})})}function Gm(){const[,e]=W();return n=>e(i=>{i.planStep.billingPeriod=n,i.addonsStep.addons=i.addonsStep.addons.filter(r=>r.addon.pricePoints.some(t=>t.billingPeriod===n))})}function Xe(){const e=_m();return _(I({},e),{setBillingPeriod:Gm(),setBillableFeature:$m()})}var Te=(e=>(e.PLAN="PLAN",e.ADDONS="ADDONS",e.PAYMENT="PAYMENT",e))(Te||{});const Ga=[{key:Te.PLAN,label:"Plan"},{key:Te.ADDONS,label:"Add-ons"},{key:Te.PAYMENT,label:"Payment details"}],mr={activeStep:0,completedSteps:[],steps:Ga,isDisabled:!1},Vm=(e,n,i,r)=>{if(Um(e)&&!r)return!1;const t=n.map(s=>s.featureId),a=i.map(s=>s.featureId);return!(t.length!==a.length||!t.every(s=>a.includes(s)))};function Hm({isLoading:e,skipCheckoutSteps:n,plan:i,availableAddons:r,availableCharges:t,preferredBillingPeriod:a,preconfiguredBillableFeatures:s}){if(e||!i)return mr;const c=[];return n.includes("PLAN")&&Vm(i,t,s,a)&&c.push(Te.PLAN),((r==null?void 0:r.length)===0||n.includes("ADDONS"))&&c.push(Te.ADDONS),_(I({},mr),{steps:Ga.filter(l=>!c.includes(l.key))})}function qm(){const[{progressBar:e}]=W();return e}function Wm(){const[e,n]=W();return i=>B(null,null,function*(){const{progressBar:r,planStep:t,addonsStep:a,paymentStep:s,onBeforeStepChange:c}=e;if(i!==r.activeStep&&c){const l=r.steps[r.activeStep],u=r.steps[i];if(l&&u){const d={planStep:t,addonsStep:a,paymentStep:s};if(!(yield c({from:l.key,to:u.key,state:d})))return}}n(({progressBar:l})=>{l.activeStep=i})})}function Ym(){const[,e]=W();return n=>e(({progressBar:i})=>{i.completedSteps.push(n)})}function Zm(e){return e.completedSteps.length>=e.steps.length-1}function zm(){const[e,n]=W();return()=>B(null,null,function*(){const{progressBar:i,planStep:r,addonsStep:t,paymentStep:a,onBeforeStepChange:s}=e;if(i.isDisabled)return;const c=i.steps[i.activeStep],l=i.steps[i.activeStep+1];if(l&&s){const u={planStep:r,addonsStep:t,paymentStep:a};if(!(yield s({from:c.key,to:l.key,state:u})))return}n(({progressBar:u})=>{u.completedSteps.includes(u.activeStep)||u.completedSteps.push(u.activeStep),u.activeStep<u.steps.length-1&&(u.activeStep+=1)})})}function Km(){const[,e]=W();return n=>e(({progressBar:i})=>{i.isDisabled=!!n})}function Et(){const e=qm();return{currentStep:e.steps[e.activeStep],progressBarState:e,isLastStep:e.activeStep===e.steps.length-1,isCheckoutComplete:Zm(e),setActiveStep:Wm(),markStepAsCompleted:Ym(),goNext:zm(),setIsDisabled:Km()}}function ti(){const[{planStep:e,addonsStep:n,promotionCode:i,paymentStep:r}]=W();return _(I({},e),{addons:n.addons,promotionCode:i,billingAddress:r.billingAddress,taxPercentage:r.taxPercentage})}function Qm({billingAddress:e,taxPercentage:n}){return!e&&!n?{}:{billingInformation:I(I({},e?{billingAddress:e}:{}),n?{taxPercentage:n}:{})}}const Xm=m=>B(null,[m],function*({stigg:e,customerId:n,planId:i,resourceId:r,promotionCode:t,addons:a,billableFeatures:s,billingCountryCode:c,billingPeriod:l,billingAddress:u,taxPercentage:d,onMockCheckoutPreview:p}){var P;const f=a.map(({addon:S,quantity:v})=>({addonId:S.id,quantity:v}));let g=null,y=null;try{if(n&&i){const S=I({customerId:n,planId:i,resourceId:r,billingCountryCode:c,addons:f,billingPeriod:l,promotionCode:t,billableFeatures:_n(s)?void 0:s},Qm({billingAddress:u,taxPercentage:d}));g=p?p(S):yield e.previewSubscription(S)}}catch(S){const[,v]=((P=S==null?void 0:S.message)==null?void 0:P.split("Error:"))||[];y=v==null?void 0:v.trim()}return{subscriptionPreview:g,errorMessage:y}}),Va=({onMockCheckoutPreview:e}={})=>{const{stigg:n}=q(),i=ti(),[{resourceId:r}]=W(),{checkoutState:t,widgetState:a}=ne(),{plan:s,customer:c}=t||{};return{previewSubscriptionAction:D.useCallback((...d)=>B(null,[...d],function*({promotionCode:u}={}){return a.isValid?Xm({stigg:n,customerId:c==null?void 0:c.id,planId:s==null?void 0:s.id,resourceId:r,addons:i.addons,billableFeatures:i.billableFeatures,billingCountryCode:i.billingCountryCode,billingPeriod:i.billingPeriod,billingAddress:i.billingAddress,taxPercentage:i.taxPercentage,promotionCode:u!=null?u:i.promotionCode,onMockCheckoutPreview:e}):{subscriptionPreview:null,errorMessage:null}}),[n,c==null?void 0:c.id,s==null?void 0:s.id,r,i.addons,i.billableFeatures,i.billingCountryCode,i.billingPeriod,i.billingAddress,i.taxPercentage,i.promotionCode,a.isValid,e])}},Jm=500,eg=({onMockCheckoutPreview:e}={})=>{const[n,i]=D.useState(null),[r,t]=D.useState(!1),{previewSubscriptionAction:a}=Va({onMockCheckoutPreview:e});return D.useEffect(()=>{const s=()=>B(null,null,function*(){const{subscriptionPreview:l}=yield a();l&&i(l),t(!1)});t(!0);const c=setTimeout(()=>{t(!0),s()},Jm);return()=>{clearTimeout(c)}},[a]),{subscriptionPreview:n,isFetchingSubscriptionPreview:r}};function tg({customer:e,taxPercentage:n}){return{useNewPaymentMethod:!(e!=null&&e.paymentMethodDetails),taxPercentage:n}}function ng(){const[,e]=W();return n=>e(i=>{i.paymentStep.useNewPaymentMethod=n})}function ig(){const[,e]=W();return n=>e(i=>{i.paymentStep.errorMessage=n})}function rg(){const[,e]=W();return n=>e(i=>{i.paymentStep.billingAddress=n})}function ag(){const[{paymentStep:e}]=W();return e}function Ve(){const e=ag();return _(I({},e),{setUseNewPaymentMethod:ng(),setErrorMessage:ig(),setBillingAddress:rg()})}function og(e){return ft({changePlan:"Change",billingPeriodsTitle:"Billing cycle",addAddonText:"Add",addonBillingPeriodNotAvailableText:({planBillingPeriod:i})=>i===b.BillingPeriod.Monthly?"Exclusively available on annual plans":"Exclusively available on monthly plans",newPaymentMethodText:"New payment method",newPaymentMethodBillingAddressTitle:"Billing address",newPaymentMethodCardTitle:"Payment method",summary:{title:"Order summary",planName:({plan:i})=>`${i.displayName} plan`,addCouponCodeText:"Add promotion code",couponCodeTitle:"Promotion code",addonsSectionTitle:"Add-ons",discountsSectionTitle:"Discounts",onlyPayAsYouGoText:"Varies by usage",startsAtText:"Starts at ",proratedTotalDueText:"Prorated charge today",baseChargeText:()=>"Base charge",totalText:"Total",totalDueText:"Total due today",totalBillingPeriodText:({billingPeriod:i})=>`Billed ${i.toLowerCase()}`,appliedCreditsTitle:"Applied credits",creditsForUnusedTimeText:({credits:i})=>`Your account will be granted credits worth ${i} for unused time, which will be automatically applied to future payments.`,discountText:({discountDetails:i,currency:r})=>{let t="";i.type===b.DiscountType.Percentage?t=`${i.value}% off`:t=`${re({amount:i.value,currency:r})}`;let a="";switch(i.durationType){case b.DiscountDurationType.Once:{a=" once";break}case b.DiscountDurationType.Repeating:{a=`${i.type===b.DiscountType.Fixed?" per month":""} for ${i.durationInMonths} months`;break}case b.DiscountDurationType.Forever:default:a=""}return`${t}${a}`},taxTitle:({taxDetails:i})=>`Tax (${i==null?void 0:i.percentage}%)`,changesWillApplyAtEndOfBillingPeriod:({billingPeriodEnd:i})=>`Your changes will take effect at the end of your current billing cycle on ${oe(i).format("MMMM D, YYYY")}.`,checkoutSuccessText:"Changes applied",payAsYouGoTooltipText:"Billed according to actual usage"},checkoutButton:{nextText:"Next",noChangesText:"No changes",updateText:"Update subscription",downgradeToFreeText:"Cancel subscription",upgradeText:"Subscribe"},downgradeToFree:{alertText:()=>"We’re sorry to see you cancel your paid subscription 😭",freePlanHeader:()=>"New plan",freePlanName:({plan:i})=>`${i.displayName}`,freePlanPriceText:()=>"Free",paidPlanHeader:()=>"Current plan",paidPlanName:({plan:i})=>`${i.displayName}`,paidPlanPriceText:({billingPeriod:i})=>`Paid plan${i?`, billed ${i.toLowerCase()}`:""}`}},e)}const rt={primary:"rgb(50, 126, 238)",textColor:"rgb(0, 30, 108)",backgroundColor:"rgb(255, 255, 255)",borderColor:"rgb(235, 237, 243)",summaryBackgroundColor:"rgb(109, 121, 144)"};function sg(e,n,i){const{palette:r}=e||{};return{primary:(n==null?void 0:n.primary)||(r==null?void 0:r.primary)||rt.primary,textColor:(n==null?void 0:n.textColor)||(r==null?void 0:r.text.primary)||rt.textColor,backgroundColor:(n==null?void 0:n.backgroundColor)||(r==null?void 0:r.backgroundPaper)||rt.backgroundColor,borderColor:(n==null?void 0:n.borderColor)||(r==null?void 0:r.outlinedBorder)||rt.borderColor,summaryBackgroundColor:(n==null?void 0:n.summaryBackgroundColor)||(r==null?void 0:r.backgroundHighlight)||rt.summaryBackgroundColor,paymentInputBackgroundColor:n==null?void 0:n.paymentInputBackgroundColor,paymentInputBorderColor:n==null?void 0:n.paymentInputBorderColor,paymentInputBorderRadius:n==null?void 0:n.paymentInputBorderRadius}}const ni=D.createContext(null);ni.displayName="CheckoutContext";const W=()=>{const e=D.useContext(ni);if(!e)throw new Error("Could not find Checkout context; You need to wrap your checkout components in an <CheckoutProvider> component.");return e},cg=({children:e,initialState:n})=>{const[i,r]=D.useState(n);D.useEffect(()=>{r(n)},[n]);const t=D.useCallback(c=>r(l=>Oo.produce(l,u=>c(u))),[r]),[a,s]=D.useMemo(()=>[i,t],[t,i]);return o.jsx(ni.Provider,{value:[a,s],children:e})};function lg({children:e,textOverrides:n,theme:i,preferredBillingPeriod:r,billableFeatures:t,resourceId:a,planId:s,billingCountryCode:c,billingInformation:l,onMockCheckoutState:u,skipCheckoutSteps:d,onBeforeStepChange:p}){var v;const{checkout:m,isLoading:f,showWatermark:g}=$d({resourceId:a,planId:s,billingCountryCode:c,onMockCheckoutState:u}),y=m!=null&&m.configuration?au(m.configuration):{typography:Xt(null,aa)},P=en(y),S=D.useMemo(()=>{var L,j;const A=sg(P,i),k=og(n),w=Bm({preferredBillingPeriod:r,plan:m==null?void 0:m.plan,activeSubscription:m==null?void 0:m.activeSubscription,billingCountryCode:c,preconfiguredBillableFeatures:t!=null?t:[]}),T=Fd({plan:m==null?void 0:m.plan,activeSubscription:m==null?void 0:m.activeSubscription}),N=tg({customer:m==null?void 0:m.customer,taxPercentage:(L=l==null?void 0:l.taxDetails)==null?void 0:L.taxPercentage}),F=Hm({isLoading:f,skipCheckoutSteps:d!=null?d:[],plan:m==null?void 0:m.plan,availableAddons:T.availableAddons,availableCharges:w.billableFeatures,preferredBillingPeriod:r,preconfiguredBillableFeatures:t!=null?t:[]});return{checkout:m,checkoutLocalization:k,stiggTheme:P,theme:A,progressBar:F,planStep:w,addonsStep:T,paymentStep:N,resourceId:(j=m==null?void 0:m.resource)==null?void 0:j.id,widgetState:{readOnly:!1,isValid:!0,isLoadingCheckoutData:f},showWatermark:g,checkoutSuccess:!1,onBeforeStepChange:p}},[r,c,m,f,d,(v=l==null?void 0:l.taxDetails)==null?void 0:v.taxPercentage,p]);return o.jsx($e,{componentTheme:y,children:o.jsx(cg,{initialState:S,children:e})},m==null?void 0:m.plan.id)}const ug=h.div`
2957
- margin: auto;
2958
- min-height: 760px;
2959
- max-width: 920px;
2960
- display: flex;
2961
- position: relative;
2962
- flex-direction: column;
2963
- align-items: center;
2964
-
2965
- background-color: ${({theme:e})=>e.stigg.palette.backgroundPaper};
2966
- border: ${({theme:e})=>`1px solid ${e.stigg.palette.outlinedBorder}`};
2967
-
2968
- & * {
2969
- box-sizing: border-box;
2970
- }
2971
-
2972
- padding: 16px 16px;
2973
- ${Se.md} {
2974
- padding: 32px;
2975
- width: calc(100% - 64px);
2976
- border-radius: 10px;
2977
- }
2978
- `,dg=h(Q)`
2979
- display: flex;
2980
- align-items: flex-start;
2981
- gap: 32px;
2982
- flex-wrap: wrap;
2983
- width: 100%;
2984
-
2985
- flex-direction: column;
2986
- ${Se.md} {
2987
- flex-direction: row;
2988
- }
2989
- `,mg=h(Q)`
2990
- display: flex;
2991
- flex-direction: column;
2992
- gap: 0;
2993
- flex: 2;
2994
-
2995
- width: 100%;
2996
- ${Se.md} {
2997
- width: auto;
2998
- }
2999
- `,gg=h(It)(({theme:e,$disabled:n})=>({[`&.${It.linearProgressClasses.root}`]:{borderRadius:e.stigg.border.radius,backgroundColor:e.stigg.palette.outlinedBorder},[`& .${It.linearProgressClasses.bar}`]:{backgroundColor:n?e.stigg.palette.primaryLight:e.stigg.palette.primary}})),pg=h(we)(()=>({[`&.${we.buttonClasses.root}`]:{textTransform:"none",lineHeight:"inherit",justifyContent:"flex-start",padding:"8px 4px"}})),fg=h(fe)(({theme:e,$disabled:n,$shouldFill:i})=>({circle:{stroke:n?e.stigg.palette.primaryLight:e.stigg.palette.primary,fill:i?n?e.stigg.palette.primaryLight:e.stigg.palette.primary:void 0}})),hg=()=>{const{progressBarState:e,setActiveStep:n,currentStep:i}=Et(),{widgetState:r}=ne(),t=Ge("md"),a=D.useRef(),{readOnly:s,isLoadingCheckoutData:c}=r,{activeStep:l,completedSteps:u,steps:d}=e||{},p=(l+1)*100/d.length,[m,f]=D.useState(i);return D.useEffect(()=>{t||a.current&&i!==m&&a.current.scrollIntoView({behavior:"smooth"}),f(i)},[i,t,m,f]),e.steps.length===1?null:o.jsxs(Q,{className:"stigg-checkout-progress-container",sx:{width:"100%",mb:3},ref:a,children:[o.jsx(gg,{variant:"determinate",value:p,$disabled:s}),o.jsx(R,{container:!0,display:"flex",children:d.map(({key:g,label:y},P)=>{const S=u.includes(P),v=s||P>l&&!S&&!u.includes(P-1)||l!==P&&e.isDisabled,A=v?"OutlinedCheckedCircleDisabled":"OutlinedCheckedCircle";return o.jsx(R,{item:!0,display:"flex",flexDirection:"row",flex:t?1:"auto",justifyContent:"flex-start",children:c?o.jsx(te,{width:120,height:20,style:{marginTop:8}}):o.jsx(pg,{onClick:()=>n(P),fullWidth:!0,disabled:v,children:o.jsxs(R,{item:!0,display:"flex",flexDirection:"row",alignItems:"center",gap:1,children:[o.jsx(zo,{icon:o.jsx(fg,{icon:S?A:"OutlinedCircle",$disabled:v,$shouldFill:S})}),o.jsx(C,{variant:"h6",color:v?"primary.main.light":"primary.main",children:y})]})})},g)})})]})},yg=[b.BillingModel.FlatFee,b.BillingModel.PerUnit,b.BillingModel.UsageBased],Cg=e=>Gt(e,[n=>yg.indexOf(n.pricingModel),n=>{var i;return(i=n.feature)==null?void 0:i.displayName}]),Ha=e=>D.useMemo(()=>Cg(e),[e]);function bg(){const[{promotionCode:e}]=W();return e}function Eg(){const[,e]=W();return n=>e(i=>{i.promotionCode=n})}function qa(){return{promotionCode:bg(),setPromotionCode:Eg()}}const Pg=e=>E.createElement("svg",I({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{id:"plus"},E.createElement("path",{id:"Shape",d:"M10 4.16666V15.8333",stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{id:"Shape_2",d:"M4.16699 10H15.8337",stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),Sg=h(Pg)`
3000
- margin-right: 8px;
3001
- path {
3002
- stroke: ${({theme:e,$disabled:n})=>n?e.stigg.palette.text.disabled:e.stigg.palette.primary};
3003
- }
3004
- `,Dg=({onAddClick:e,checkoutLocalization:n,disabled:i})=>o.jsxs(Le,{disabled:i,fullWidth:!0,className:"stigg-checkout-summary-add-coupon-code-button",sx:{textTransform:"none",justifyContent:"flex-start",color:i?"text.disabled":"primary.main"},variant:"text",size:"medium",onClick:e,children:[o.jsx(Sg,{$disabled:i,className:"stigg-checkout-summary-add-coupon-code-button-icon"}),o.jsx(C,{className:"stigg-checkout-change-plan-button-text",color:i?"disabled":"primary.main",style:{lineHeight:"24px"},variant:"h3",children:n.summary.addCouponCodeText})]}),vg=h(Le)`
3005
- padding: 4px 10px;
3006
- min-width: unset;
3007
- border-radius: ${({theme:e})=>e.stigg.border.radius};
3008
- display: flex;
3009
- align-items: center;
3010
- `,xg=({disabled:e,checkoutLocalization:n,onMockCheckoutPreview:i})=>{const{setPromotionCode:r}=qa(),[t,a]=D.useState(!1),[s,c]=D.useState(""),[l,u]=D.useState(!1),[d,p]=D.useState(""),{previewSubscriptionAction:m}=Va({onMockCheckoutPreview:i}),f=()=>B(null,null,function*(){var P;u(!0),p("");const{subscriptionPreview:g,errorMessage:y}=yield m({promotionCode:s});!y&&((P=g==null?void 0:g.immediateInvoice)!=null&&P.discountDetails)?(r(s.toUpperCase()),a(!1)):y&&p(y),u(!1)});return t?o.jsxs(R,{children:[o.jsx(C,{variant:"body1",color:d?"error":e?"disabled":"primary.main",children:n.summary.couponCodeTitle}),o.jsx(Kt,{disabled:e,autoFocus:!0,variant:"outlined",fullWidth:!0,error:!!d,value:s,onChange:g=>{c(g.target.value)},inputProps:{maxLength:20},onKeyDown:g=>{g.key==="Enter"&&(f(),g.preventDefault())},InputProps:{endAdornment:o.jsx(vg,{variant:"contained",disabled:e,onClick:()=>{f()},children:l?o.jsx(Bn,{size:18,sx:{color:"white"}}):o.jsx(fe,{style:{display:"flex"},icon:"ArrowForward"})})}}),!!d&&o.jsx(C,{variant:"body1",color:"error",children:d})]}):o.jsx(Dg,{disabled:e,onAddClick:()=>a(!0),checkoutLocalization:n})},Ig=h(R)`
3011
- width: auto;
3012
- display: inline-flex;
3013
- align-items: center;
3014
- flex-direction: row;
3015
- gap: 8px;
3016
- padding: 6px 8px;
3017
- border-radius: ${({theme:e})=>e.stigg.border.radius};
3018
- border: 1px solid ${({theme:e})=>e.stigg.palette.primary};
3019
- `,gr=h(fe)`
3020
- display: flex;
3021
-
3022
- g {
3023
- stroke: ${({theme:e})=>e.stigg.palette.primary};
3024
- }
3025
-
3026
- path {
3027
- fill: ${({theme:e,$shouldFill:n})=>n?e.stigg.palette.primary:void 0};
3028
- }
3029
- `,Tg=({promotionCode:e,onClearPromotionCode:n})=>o.jsxs(Ig,{container:!0,children:[o.jsxs(R,{item:!0,display:"flex",gap:1,alignItems:"center",children:[o.jsx(gr,{icon:"Coupon"}),o.jsx(C,{variant:"body1",color:"primary.main",lineHeight:"auto",children:e})]}),o.jsx(R,{item:!0,children:o.jsx(Le,{variant:"text",sx:{minWidth:"unset",padding:0},onClick:n,children:o.jsx(gr,{icon:"Close",$shouldFill:!0})})})]}),Ag=h.div`
3030
- margin: 16px 0;
3031
- `,kg=({disabled:e,checkoutLocalization:n,onMockCheckoutPreview:i})=>{const{promotionCode:r,setPromotionCode:t}=qa(),a=()=>{t("")},s=r?o.jsx(Tg,{promotionCode:r,onClearPromotionCode:a}):o.jsx(xg,{disabled:e,checkoutLocalization:n,onMockCheckoutPreview:i});return o.jsx(Ag,{children:s})};function Ng({onBillingAddressChange:e,collectPhoneNumber:n}){var m;const{checkoutState:i,checkoutLocalization:r,widgetState:t,setWidgetReadOnly:a}=ne(),{setBillingAddress:s}=Ve(),{customer:c,configuration:l}=i||{},{readOnly:u}=t,d=!!(n!=null?n:(m=l==null?void 0:l.content)!=null&&m.collectPhoneNumber),p=f=>{if(!f.complete)return;const S=f.value.address,{postal_code:g}=S,y=se(S,["postal_code"]),P=I({postalCode:g},y);a(!0),s(P),e?B(null,null,function*(){yield e({billingAddress:P}),a(!1)}):a(!1)};return o.jsxs(R,{flexDirection:"column",container:!0,gap:3,padding:"16px",sx:{pointerEvents:u?"none":void 0},children:[o.jsxs(R,{flexDirection:"column",container:!0,gap:2,children:[o.jsx(C,{variant:"h6",children:r.newPaymentMethodBillingAddressTitle}),o.jsx(st.AddressElement,{onChange:p,options:{mode:"billing",fields:{phone:d?"always":"auto"},defaultValues:I({},(c==null?void 0:c.name)&&{name:c.name})}})]}),o.jsxs(R,{flexDirection:"column",container:!0,gap:2,children:[o.jsx(C,{variant:"h6",children:r.newPaymentMethodCardTitle}),o.jsx(st.PaymentElement,{onChange:()=>{},onReady:()=>{},options:{readOnly:u,terms:{card:"never"},defaultValues:{billingDetails:I(I({},(c==null?void 0:c.name)&&{name:c.name}),(c==null?void 0:c.email)&&{email:c.email})}}})]})]})}function wg(){const[e,n]=D.useState(null),{checkoutState:i}=ne(),{billingIntegration:r,setupSecret:t}=i||{};return D.useEffect(()=>{if(r){const{billingIdentifier:a,credentials:s}=r;if(a!==b.BillingVendorIdentifier.Stripe)return;const{accountId:c,publicKey:l}=s;if(!c||!l){console.error("Stripe account ID or public key is missing");return}import("@stripe/stripe-js").then(({loadStripe:u})=>{n(u(l,{stripeAccount:c}))})}},[r]),{stripePromise:e,setupIntentClientSecret:t}}function Wa(e){var r;const n=q({optional:!0}),i=n==null?void 0:n.stigg;return i?i.getBooleanEntitlement(e):I(I({},b.BOOLEAN_DEFAULT_FALLBACK_ENTITLEMENT),(r=e.options)==null?void 0:r.fallback)}function Ya(e){var r;const n=q({optional:!0}),i=n==null?void 0:n.stigg;return i?i.getNumericEntitlement(e):I(I({},b.NUMERIC_DEFAULT_FALLBACK_ENTITLEMENT),(r=e.options)==null?void 0:r.fallback)}function Za(e){var r;const n=q({optional:!0}),i=n==null?void 0:n.stigg;return i?i.getMeteredEntitlement(e):I(I({},b.METERED_DEFAULT_FALLBACK_ENTITLEMENT),(r=e.options)==null?void 0:r.fallback)}function za(e){var r;const n=q({optional:!0}),i=n==null?void 0:n.stigg;return i?i.getEnumEntitlement(e):I(I({},b.ENUM_DEFAULT_FALLBACK_ENTITLEMENT),(r=e.options)==null?void 0:r.fallback)}function Je({func:e}){const[n,i]=D.useState(!0),[r,t]=D.useState(null),[a,s]=D.useState(null);return D.useEffect(()=>{B(null,null,function*(){i(!0);try{const l=yield e();s(l),t(null)}catch(l){t(l)}finally{i(!1)}})},[e]),{isLoading:n,error:r,data:a}}function Fg(e){const n=q({optional:!0}),i=n==null?void 0:n.stigg,r=D.useCallback(()=>i?i.getActiveSubscriptions(e):Promise.resolve([]),[e,i]),{data:t,error:a,isLoading:s}=Je({func:r});return D.useMemo(()=>({activeSubscriptions:t,isLoading:s,error:a}),[t,a,s])}function jg(e){const n=q({optional:!0}),i=n==null?void 0:n.stigg,r=D.useCallback(()=>i?i.getPaywall(e):Promise.resolve(null),[e,i]),{data:t,error:a,isLoading:s}=Je({func:r});return D.useMemo(()=>({paywall:t,isLoading:s,error:a}),[t,a,s])}function Rg(e){const n=q({optional:!0}),i=n==null?void 0:n.stigg,r=D.useCallback(()=>i?i.getCustomerPortal(e):Promise.resolve(null),[e,i]),{data:t,error:a,isLoading:s}=Je({func:r});return D.useMemo(()=>({customerPortal:t,isLoading:s,error:a}),[t,a,s])}function Ka(){const e=ti(),[{resourceId:n}]=W(),{checkoutState:i}=ne(),{plan:r}=i||{},t=e.addons.map(({addon:a,quantity:s})=>({addonId:a.id,quantity:s}));if(r!=null&&r.id)return{resourceId:n,planId:r.id,billingPeriod:e.billingPeriod,billableFeatures:e.billableFeatures,addons:t,promotionCode:e.promotionCode,billingCountryCode:e.billingCountryCode}}const Mg=[b.PaymentCollection.Failed,b.PaymentCollection.Processing];function Ug(n){return B(this,arguments,function*({elements:e}){if(!e){const r="Stripe elements not initialized";return console.error(r),{success:!1,errorMessage:r}}const{error:i}=yield e.submit();return i?(console.log(i.message),{success:!1,errorMessage:i.message||""}):{success:!0}})}function pr(i){return B(this,arguments,function*({applySubscriptionResults:e,stripe:n}){var s,c;const r=e==null?void 0:e.subscription,t=(s=r==null?void 0:r.latestInvoice)==null?void 0:s.paymentSecret,a=r==null?void 0:r.paymentCollection;if(n&&t&&a===b.PaymentCollection.ActionRequired){const{error:l}=yield n.handleNextAction({clientSecret:t});if(l)return{errorMessage:l.message||""}}else if(a&&Mg.includes(a))return{errorMessage:((c=r==null?void 0:r.latestInvoice)==null?void 0:c.errorMessage)||"An error occurred - try again later"};return{subscription:r}})}function Og(r){return B(this,arguments,function*({stripe:e,elements:n,clientSecret:i}){let t,a;const{error:s}=yield e.confirmSetup({elements:n,confirmParams:{return_url:window.location.href},redirect:"if_required"});if(s)s.type==="card_error"||s.type==="validation_error"?s.type==="card_error"&&(a=s.message||""):a="An unexpected error occurred.";else try{const{setupIntent:c}=yield e.retrieveSetupIntent(i);c!=null&&c.payment_method&&(t=c.payment_method)}catch(c){a="An unexpected error occurred.",console.error(c)}return{newPaymentMethodId:t,setupErrorMessage:a}})}function Lg(r){return B(this,arguments,function*({stripe:e,elements:n,setupIntentClientSecret:i}){if(!e||!n||!i)return{success:!1};const t=yield Ug({elements:n});if(!t.success)return{success:!1,errorMessage:t.errorMessage};const{newPaymentMethodId:a,setupErrorMessage:s}=yield Og({stripe:e,elements:n,clientSecret:i});return s||!a?{success:!1,errorMessage:s}:{success:!0,paymentMethodId:a}})}const Bg="5.12.1",_g=30,$g=0,Gg=201,Vg=700,Hg=700,qg="Check",Wg=0,Yg=[],Zg=JSON.parse('[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 8","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":315,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 7","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":270,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 6","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":225,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Shape Layer 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":180,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Shape Layer 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":135,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Shape Layer 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":45,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[-304,91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-304,-241],[-304,-161]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[100]},{"t":145.5,"s":[0]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":130,"s":[100]},{"t":139.6005859375,"s":[0]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":130,"op":204,"st":-2,"ct":1,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"Check v","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-1.9,"ix":10},"p":{"a":0,"k":[352,360,0],"ix":2,"l":2},"a":{"a":0,"k":[-120.265,116.765,0],"ix":1,"l":2},"s":{"a":0,"k":[278,278,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-161,123],[-137,148],[-79.531,85.531]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":5.5,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":135,"s":[0]},{"t":148,"s":[100]}],"ix":1},"e":{"a":0,"k":0,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":135,"op":201,"st":-35,"ct":1,"bm":0},{"ddd":0,"ind":11,"ty":4,"nm":"Circle Stroke","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":7,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[4,-6,0],"ix":1,"l":2},"s":{"a":0,"k":[132,132,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[306,306],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[1,1,1,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":30,"s":[1,1,1,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":61,"s":[1,1,1,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":87,"s":[1,1,1,1]},{"t":136,"s":[1,1,1,1]}],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":8,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[4,-6],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.338],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":87,"s":[50]},{"t":122,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.338],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":87,"s":[45]},{"t":122,"s":[0]}],"ix":2},"o":{"a":1,"k":[{"i":{"x":[0.474],"y":[1]},"o":{"x":[0.43],"y":[0]},"t":0,"s":[-170.4]},{"t":111,"s":[-1250.4]}],"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":201,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":13,"ty":1,"nm":"Dark Gray Solid 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[350,350,0],"ix":2,"l":2},"a":{"a":0,"k":[350,350,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"sw":700,"sh":700,"sc":"#2d2d2d","ip":0,"op":201,"st":0,"bm":0}]'),zg=[],Kg={},Qg={v:Bg,fr:_g,ip:$g,op:Gg,w:Vg,h:Hg,nm:qg,ddd:Wg,assets:Yg,layers:Zg,markers:zg,props:Kg},Qa=5e3,Xg=h(Q)`
3032
- @keyframes blurFade {
3033
- 0% {
3034
- background-color: ${({theme:e})=>le(e.stigg.palette.backgroundPaper).alpha(0).toString()};
3035
- backdrop-filter: blur(0px);
3036
- }
3037
- 100% {
3038
- background-color: ${({theme:e})=>le(e.stigg.palette.backgroundPaper).alpha(.9).toString()};
3039
- backdrop-filter: blur(6.5px);
3040
- }
3041
- }
3042
-
3043
- position: absolute;
3044
- top: 0;
3045
- left: 0;
3046
- bottom: 0;
3047
- right: 0;
3048
- z-index: 5;
3049
- background-color: ${({theme:e})=>le(e.stigg.palette.backgroundPaper).alpha(.9).toString()};
3050
- animation: blurFade 2s ease-in forwards;
3051
- display: flex;
3052
- flex-direction: column;
3053
- justify-content: center;
3054
-
3055
- * rect {
3056
- fill: transparent;
3057
- }
3058
-
3059
- & path {
3060
- stroke: ${({theme:e})=>e.stigg.palette.primary};
3061
- }
3062
- `,Jg=h(C)`
3063
- @keyframes fadeIn {
3064
- 0% {
3065
- opacity: 0;
3066
- }
3067
- 75% {
3068
- opacity: 0;
3069
- }
3070
- 100% {
3071
- opacity: 1;
3072
- }
3073
- }
3074
-
3075
- align-self: center;
3076
- animation: fadeIn 5s ease-in forwards;
3077
- `;function e1({checkoutLocalization:e}){const n=D.useRef();return D.useEffect(()=>{n.current&&n.current.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},[]),o.jsxs(Xg,{className:"stigg-checkout-success-container",ref:n,children:[o.jsx(Go,{options:{animationData:Qg,loop:!1,autoplay:!0},width:350,height:"auto",style:{display:"flex",justifyContent:"center"}}),o.jsx(Jg,{variant:"h1",color:"primary.main",children:e.summary.checkoutSuccessText})]})}const t1=e=>new Promise(n=>setTimeout(n,e));function n1({isMocked:e=!1,onCheckout:n,onCheckoutCompleted:i,onSuccess:r,disableSuccessAnimation:t}){const{stigg:a}=q(),{useNewPaymentMethod:s}=Ve(),c=Ka(),{checkoutState:l,widgetState:u,setWidgetReadOnly:d}=ne(),{setupSecret:p,customer:m}=l||{},f=st.useStripe(),g=st.useElements();return{handleSubmit:P=>B(null,null,function*(){if(P.preventDefault(),!c)return{success:!1,errorMessage:"Unexpected error, please contact support."};let S=!0,v,A=!1,k;if(d(!0),!e&&s){const F=yield Lg({elements:g,stripe:f,setupIntentClientSecret:p});F.success?k=F.paymentMethodId:(v=F.errorMessage,S=!1)}const w=_(I({},c),{paymentMethodId:k}),T=F=>B(null,null,function*(){A=!0;try{const U=yield a.applySubscription(F),L=yield pr({applySubscriptionResults:U,stripe:f});return{success:!L.errorMessage,errorMessage:L.errorMessage,results:U}}catch(U){return console.error(U),v=U==null?void 0:U.message,{success:!1,errorMessage:v}}});let N;if(S)if(n){const F=yield n({customerId:m.id,checkoutParams:w,checkoutAction:T});if(F.errorMessage&&(v=F.errorMessage),!A&&F.results&&F.success){const U=yield pr({applySubscriptionResults:F.results,stripe:f});U.errorMessage&&(v=U.errorMessage,S=!1)}S=S&&F.success&&!v,N=F.results}else{const F=yield T(w);!F.success&&F.errorMessage&&(v=F.errorMessage),S=F.success&&!v,N=F.results}return d(!1),S&&r&&(r(),t||(yield t1(Qa))),yield i({success:S,error:v}),{results:N,success:!v,errorMessage:v}}),isLoading:!!(u!=null&&u.readOnly)}}function i1(){return!!window.Zuora}function r1(){const e=document.createElement("script");e.type="text/javascript",e.src="https://js.zuora.com/payment/v3/zuora.js",e.async=!0,e.onerror=()=>{throw new Error("Failed to load Zuora library")},document.head.appendChild(e)}function a1(e,n,i,r){return{locale:r||"en",region:(r==null?void 0:r.toUpperCase())||"US",currency:i,amount:"1",createPaymentSession:e,onComplete:n}}function ii(){const{stigg:e}=q(),{setErrorMessage:n}=Ve(),{billingCountryCode:i}=Xe(),[r,t]=D.useState(!1),{checkoutState:a}=ne(),{billingIntegration:s}=a||{},c=D.useCallback(()=>B(null,null,function*(){if(!(a!=null&&a.customer.id)||!(a!=null&&a.plan.id))throw new Error("Customer and plan are required");const{token:d}=yield e.createPaymentSession({planId:a.plan.id,billingCountryCode:i});return d}),[a,e,i]),l=D.useCallback(()=>{try{i1()||r1(),t(!0)}catch(d){n("Failed to initialize Zuora")}},[t,n]);return D.useEffect(()=>{if(s){const{billingIdentifier:d}=s;d===b.BillingVendorIdentifier.Zuora&&l()}},[s,l]),{isZuoraIntegration:(s==null?void 0:s.billingIdentifier)===b.BillingVendorIdentifier.Zuora,isInitialized:r,createPaymentSession:c}}const o1=e=>new Promise(n=>setTimeout(n,e));function Xa({onCheckout:e,onCheckoutCompleted:n,onSuccess:i,disableSuccessAnimation:r}){const{stigg:t}=q(),a=Ka(),{checkoutState:s,setWidgetReadOnly:c,setCheckoutSuccess:l}=ne(),{setErrorMessage:u}=Ve();return{handleZuoraSubmit:D.useCallback(p=>B(null,null,function*(){c(!0);let m=!0,f;const g=a;if(!g)m=!1,f="Unexpected error, please contact support.";else{const y=_(I({},g),{paymentMethodId:p}),P=S=>B(null,null,function*(){try{return{success:!0,results:yield t.applySubscription(S)}}catch(v){return console.error(v),{success:!1,errorMessage:(v==null?void 0:v.message)||"Failed to apply subscription"}}});try{if(e){const S=yield e({customerId:s.customer.id,checkoutParams:y,checkoutAction:P});S.errorMessage&&(f=S.errorMessage),m=m&&S.success&&!f}else{const S=yield P(y);!S.success&&S.errorMessage&&(f=S.errorMessage),m=S.success&&!f}}catch(S){m=!1,f=S.message||"Failed to process checkout"}}return m?(l(!0),i&&(i(),r||(yield o1(Qa)))):u(f),c(!1),yield n({success:m,error:f}),{success:m,errorMessage:f}}),[t,a,s,e,n,i,r,c,l,u])}}const Ne=({isLoading:e,width:n=50,height:i=16,children:r})=>e?o.jsx(te,{width:n,height:i}):o.jsx(o.Fragment,{children:r}),s1=({subscriptionPreview:e,isFetchingSubscriptionPreview:n,checkoutLocalization:i})=>{var s,c,l,u;const{immediateInvoice:r}=e||{};if(!((c=(s=r==null?void 0:r.proration)==null?void 0:s.netAmount)!=null&&c.amount)||((u=(l=r==null?void 0:r.proration)==null?void 0:l.netAmount)==null?void 0:u.amount)>=0)return null;const t=r.proration.netAmount.amount*-1,a=re({amount:t,currency:r.proration.netAmount.currency,minimumFractionDigits:2});return o.jsx(C,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-remaining-credits",children:o.jsx(Ne,{isLoading:n,width:"100%",children:i.summary.creditsForUnusedTimeText({credits:a})})})},c1=({subscriptionPreview:e,activeSubscription:n,isFetchingSubscriptionPreview:i,checkoutLocalization:r})=>{if(!(e!=null&&e.hasScheduledUpdates)||!(n!=null&&n.currentBillingPeriodEnd))return null;const{currentBillingPeriodEnd:t}=n,a=typeof r.summary.changesWillApplyAtEndOfBillingPeriod=="function"?r.summary.changesWillApplyAtEndOfBillingPeriod({billingPeriodEnd:t}):r.summary.changesWillApplyAtEndOfBillingPeriod;return o.jsx(C,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-scheduled-updates",children:o.jsx(Ne,{isLoading:i,width:"100%",children:a})})},l1=({subscriptionPreview:e,activeSubscription:n,plan:i,isFetchingSubscriptionPreview:r,billingPeriod:t})=>{const{recurringInvoice:a}=e||{};if(!e||!(a!=null&&a.total.amount))return null;const s=e.hasScheduledUpdates?n==null?void 0:n.currentBillingPeriodEnd:e==null?void 0:e.billingPeriodRange.end,c=re(_(I({},a.total),{minimumFractionDigits:2})),l=i==null?void 0:i.pricePoints.some(g=>g.pricingModel===b.BillingModel.UsageBased),u=i==null?void 0:i.pricePoints.some(g=>g.pricingModel!==b.BillingModel.UsageBased);let d="We will bill you ",p=`${c} `;l&&(u?p+="+":p="for",p+=" applicable usage-based charges for this subscription ");let m,f;switch(t){case b.BillingPeriod.Monthly:f="month",m=`the ${oe(s).format("Do")}`;break;case b.BillingPeriod.Annually:f="year",m=oe(s).format("MMMM Do");break}return d+=`${p}for this subscription every ${f} on ${m}, unless you cancel.`,o.jsx(C,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-next-billing",children:o.jsx(Ne,{isLoading:r,width:"100%",children:d})})};function u1(e){return o.jsxs(K.Box,{className:"stigg-checkout-summary-captions",children:[o.jsx(s1,I({},e)),o.jsx(c1,I({},e)),o.jsx(l1,I({},e))]})}function Ja({quantity:e,totalAmount:n,pricingModel:i,billingPeriod:r,currency:t,blockSize:a,priceAmount:s,availableBillingPeriods:c}){const l=c==null?void 0:c.has(b.BillingPeriod.Monthly),u=i===b.BillingModel.PerUnit,d=a||1,p=r===b.BillingPeriod.Annually&&l,m=e&&(u||e>1)?`${pe(e)} ${d>1?"for":"x"} `:"",f=p?" x 12 months":"",g=(s||n/e)/(p?12:1),y=re({amount:g,currency:t,minimumFractionDigits:2}),P=re({amount:n,currency:t,minimumFractionDigits:2});return`${m}${y}${f} ${f||m?` = ${P}`:""}`}function d1(e){const{totalAmount:n,quantity:i,tiersMode:r,tiers:t,currency:a}=e;if(Wc(t)||r===b.TiersMode.Graduated&&!Yc(t,i)){const s=re({amount:n,currency:a,minimumFractionDigits:2});return`${pe(i)} for ${s}`}return Ja(e)}function m1(e,n){const{unitPrice:i,upTo:r}=e[n];if(!i)return"";if(n===0)return`First ${r}`;const a=(e[n-1].upTo||0)+1;return De(r)?`${pe(a)} and above`:`Next ${pe(a)} to ${pe(r)}`}function g1({price:e,unitQuantity:n}){const i=e.tiers||[],{checkoutState:r}=ne(),t=r==null?void 0:r.plan,{breakdown:a}=Xr(i,n);return a.length===1?null:o.jsx(o.Fragment,{children:a.map(({unitQuantity:s,amount:c},l)=>o.jsx(je,{children:o.jsxs(Ae,{style:{alignItems:"flex-start"},children:[o.jsx(C,{variant:"body1",color:"tertiary",style:{whiteSpace:"nowrap"},children:m1(i,l)}),o.jsx(C,{variant:"body1",color:"tertiary",style:{whiteSpace:"nowrap"},children:Ja({quantity:s,totalAmount:c,currency:e.currency,pricingModel:e.pricingModel,billingPeriod:e.billingPeriod,blockSize:e.blockSize,priceAmount:e.amount,availableBillingPeriods:new Set(t==null?void 0:t.pricePoints.map(u=>u.billingPeriod))})})]})},l))})}const p1=h(Oe.ChevronRight)`
3078
- height: ${({$size:e=24})=>`${e}px`};
3079
- width: ${({$size:e=24})=>`${e}px`};
3080
- transition: all 0.2s ease-in;
3081
- ${({$isOpen:e})=>e&&"transform: rotate(90deg)"}
3082
- `,je=h.div`
3083
- & + & {
3084
- margin-top: 16px;
3085
- }
3086
- `,f1=h.div`
3087
- margin-top: 16px;
3088
- margin-left: 16px;
3089
- `,Ae=h.div`
3090
- display: flex;
3091
- flex-direction: column;
3092
- gap: 16px;
3093
-
3094
- ${Se.lg} {
3095
- flex-direction: row;
3096
- align-items: center;
3097
- justify-content: space-between;
3098
- }
3099
- `,h1=({checkoutLocalization:e})=>{const n=o.jsx(C,{variant:"body1",children:e.summary.payAsYouGoTooltipText});return o.jsx(Xn,{placement:"left",title:n,children:o.jsx(fe,{icon:"PayAsYouGoCharge",style:{display:"flex"}})})},xn=({checkoutLocalization:e,label:n,quantity:i,price:r})=>{const{checkoutState:t}=ne(),a=t==null?void 0:t.plan,s=Ge("lg"),[c,l]=D.useState(!1),u=()=>l(y=>!y),d=r.pricingModel===b.BillingModel.UsageBased,p=r.isTieredPrice?Zn(r,i):(r.amount||0)*Math.ceil(i/(r.blockSize||1));let m;r.tiersMode===b.TiersMode.Graduated&&!!r.tiers&&!_n(r.tiers)&&!De(r.tiers[0].upTo)&&i>r.tiers[0].upTo&&(m=o.jsx(g1,{price:r,unitQuantity:i}));let g=o.jsx(C,{variant:"body1",color:"secondary",children:n});return m&&(g=o.jsx(xr,{onClick:u,underline:"none",style:{cursor:"pointer"},children:g})),o.jsxs(je,{className:"stigg-checkout-summary-base-charges-container",children:[o.jsxs(Ae,{style:{alignItems:"flex-start"},children:[o.jsxs(R,{item:!0,display:"flex",gap:.5,style:{whiteSpace:s?"nowrap":"break-spaces"},children:[g,m&&o.jsx(K.IconButton,{onClick:u,sx:{padding:0},children:o.jsx(p1,{$isOpen:c,$size:16})})]}),o.jsxs(R,{item:!0,display:"flex",gap:1,alignItems:"center",children:[d&&o.jsx(h1,{checkoutLocalization:e}),o.jsxs(C,{variant:"body1",color:"secondary",style:{whiteSpace:s?"nowrap":"break-spaces"},children:[d1({totalAmount:p,quantity:i,currency:r.currency,pricingModel:r.pricingModel,billingPeriod:r.billingPeriod,tiers:r.tiers,tiersMode:r.tiersMode,blockSize:r.blockSize,priceAmount:r.amount,availableBillingPeriods:new Set(a==null?void 0:a.pricePoints.map(y=>y.billingPeriod))}),d&&" / unit"]})]})]}),m&&o.jsx(Ir,{in:c,children:o.jsx(f1,{children:m})})]})},y1=({label:e})=>o.jsx(je,{children:o.jsxs(Ae,{style:{alignItems:"flex-end"},children:[o.jsx(R,{item:!0,children:o.jsx(C,{variant:"body1",color:"secondary",children:e})}),o.jsx(R,{item:!0,display:"flex",gap:1,alignItems:"center",children:o.jsx(C,{variant:"body1",color:"secondary",style:{wordBreak:"break-word"},children:"Free"})})]})}),C1=({subscriptionPreview:e,isFetchingSubscriptionPreview:n,checkoutLocalization:i})=>{const{immediateInvoice:r,recurringInvoice:t}=e,{discount:a,discountDetails:s}=t||{};return!a||!s?null:o.jsx(je,{children:o.jsxs(Ae,{children:[o.jsx(C,{variant:"body1",color:"secondary",children:i.summary.discountText({discountDetails:s,currency:r.total.currency})}),o.jsx(C,{variant:"body1",color:"secondary",children:n?o.jsx(te,{width:50,height:16}):re({amount:a.amount,currency:a.currency,minimumFractionDigits:2})})]})})},b1=({subscriptionPreview:e,isFetchingSubscriptionPreview:n,checkoutLocalization:i})=>{const{immediateInvoice:r}=e||{},{credits:t}=r||{};return!t||!t.used||t.used.amount<=0?null:o.jsx(je,{children:o.jsxs(Ae,{children:[o.jsx(C,{variant:"body1",color:"secondary",children:i.summary.appliedCreditsTitle}),o.jsx(C,{variant:"body1",color:"secondary",children:o.jsx(Ne,{isLoading:n,children:re({amount:-1*t.used.amount,currency:t.used.currency,minimumFractionDigits:2})})})]})})},E1=({tax:e,taxDetails:n,isFetchingSubscriptionPreview:i,checkoutLocalization:r})=>!n||!e||(e==null?void 0:e.amount)<=0?null:o.jsx(je,{children:o.jsxs(Ae,{children:[o.jsx(C,{variant:"body1",color:"secondary",children:r.summary.taxTitle({taxDetails:n})}),o.jsx(C,{variant:"body1",color:"secondary",children:o.jsx(Ne,{isLoading:i,children:re({amount:e==null?void 0:e.amount,currency:e==null?void 0:e.currency,minimumFractionDigits:2})})})]})}),eo=h(Q)`
3100
- width: 100%;
3101
- max-width: 470px;
3102
- flex: 1.5;
3103
- `,ri=h($o)`
3104
- background: ${({theme:e})=>e.stigg.palette.backgroundHighlight};
3105
- padding: 16px;
3106
-
3107
- ${Se.md} {
3108
- border-radius: 10px;
3109
- }
3110
- `;ri.defaultProps={elevation:0};const P1=h(C)`
3111
- margin-bottom: 16px;
3112
- font-weight: 500;
3113
- `,He=h(We)`
3114
- margin: 16px 0;
3115
- `,fr=h(C)`
3116
- margin-bottom: 8px;
3117
- `;function S1({isLastStep:e,checkoutHasChanges:n,isFreeDowngrade:i,checkoutLocalization:r,isPlanUpdate:t}){return e?n?t?r.checkoutButton.updateText:i?r.checkoutButton.downgradeToFreeText:r.checkoutButton.upgradeText:r.checkoutButton.noChangesText:r.checkoutButton.nextText}const D1=({onCheckout:e,onCheckoutCompleted:n,disablePromotionCode:i,disableSuccessAnimation:r,isFreeDowngrade:t,onMockCheckoutPreview:a,showWatermark:s})=>{var mi,gi,pi,fi,hi;const[c,l]=D.useState(!1),{setErrorMessage:u,useNewPaymentMethod:d}=Ve(),p=Et(),m=ti(),{checkoutState:f,checkoutLocalization:g,checkoutSuccess:y,widgetState:P}=ne(),{plan:S,activeSubscription:v}=f||{},A=Ha(((mi=S==null?void 0:S.pricePoints)==null?void 0:mi.filter(V=>V.billingPeriod===m.billingPeriod))||[]),[k,w]=_o(A,V=>V.pricingModel===b.BillingModel.FlatFee),T=k[0],N=t||p.isCheckoutComplete&&p.isLastStep,{isZuoraIntegration:F}=ii(),U=c||y,{subscriptionPreview:L,isFetchingSubscriptionPreview:j}=eg({onMockCheckoutPreview:a}),{handleSubmit:O,isLoading:z}=n1({isMocked:!!a,disableSuccessAnimation:r,onCheckout:e,onCheckoutCompleted:n,onSuccess:()=>{l(!0),p.markStepAsCompleted(p.progressBarState.activeStep)}}),{handleZuoraSubmit:X}=Xa({onCheckout:e,onCheckoutCompleted:n,disableSuccessAnimation:r,onSuccess:()=>{p.markStepAsCompleted(p.progressBarState.activeStep)}}),me=V=>B(null,null,function*(){if(U)return;let be;F&&!d?be=yield X():be=yield O(V);const{errorMessage:Re}=be||{};Re?(u(Re),l(!1)):u(void 0)}),xe=F&&!d?P.readOnly:z,bo=V=>B(null,null,function*(){xe||(N?yield me(V):p.goNext())}),{immediateInvoice:Y,recurringInvoice:ge}=L||{},si=!!L&&(!!(Y!=null&&Y.proration)||!!L.hasScheduledUpdates),ci=!i&&!t&&!F,li=!!(ge!=null&&ge.discountDetails)&&!t,an=ci||li,ui=w.some(V=>V.pricingModel===b.BillingModel.UsageBased),on=ui&&!T&&w.every(V=>V.pricingModel===b.BillingModel.UsageBased),di=typeof g.summary.baseChargeText=="function"?g.summary.baseChargeText({billingPeriod:m.billingPeriod}):g.summary.baseChargeText;return o.jsxs(eo,{children:[o.jsxs(ri,{children:[o.jsx(P1,{variant:"h3",children:g.summary.title}),o.jsxs(R,{className:"stigg-checkout-summary-plan-title-container",display:"flex",flexDirection:"row",alignItems:"center",marginY:2,children:[o.jsx(C,{variant:"h6",color:"primary",style:{paddingRight:"8px"},children:g.summary.planName({plan:S})}),o.jsx(He,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})]}),T&&o.jsx(xn,{checkoutLocalization:g,label:di,quantity:1,price:T}),!T&&t?o.jsx(y1,{label:di}):null,o.jsx(R,{item:!0,className:"stigg-checkout-summary-usage-charges-container",children:w.map(V=>{var Re,et,tt,Pt,yi;const be=(Re=m.billableFeatures)==null?void 0:Re.find(Eo=>{var Ci;return Eo.featureId===((Ci=V.feature)==null?void 0:Ci.featureId)});return o.jsx(xn,{checkoutLocalization:g,label:ei(((et=V.feature)==null?void 0:et.displayName)||"",(tt=V.feature)==null?void 0:tt.units,(Pt=V.feature)==null?void 0:Pt.unitsPlural),quantity:(be==null?void 0:be.quantity)||1,price:V},(yi=V.feature)==null?void 0:yi.featureId)})}),!!((gi=m.addons)!=null&&gi.length)&&o.jsxs(o.Fragment,{children:[o.jsxs(R,{display:"flex",flexDirection:"row",alignItems:"center",marginY:2,children:[o.jsx(C,{variant:"h6",color:"primary",style:{paddingRight:"8px"},children:g.summary.addonsSectionTitle}),o.jsx(He,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})]}),m.addons.map(V=>{var et,tt;const be=(et=V.addon.pricePoints)==null?void 0:et.find(Pt=>Pt.billingPeriod===m.billingPeriod);if(!be)return null;const Re=V.quantity&&V.quantity>0?V.quantity:1;return o.jsx(xn,{checkoutLocalization:g,label:V.addon.displayName,quantity:Re,price:be},(tt=V==null?void 0:V.addon)==null?void 0:tt.id)})]}),!an&&o.jsx(He,{className:"stigg-checkout-summary-divider"}),an&&o.jsxs(R,{display:"flex",flexDirection:"row",alignItems:"center",marginY:2,children:[o.jsx(C,{variant:"h6",color:"primary",style:{paddingRight:"8px"},children:g.summary.discountsSectionTitle}),o.jsx(He,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})]}),ci&&o.jsx(kg,{disabled:xe||j,checkoutLocalization:g,onMockCheckoutPreview:a}),li&&L&&o.jsx(C1,{subscriptionPreview:L,isFetchingSubscriptionPreview:j,checkoutLocalization:g}),an&&o.jsx(He,{className:"stigg-checkout-summary-divider"}),o.jsx(E1,{tax:ge==null?void 0:ge.tax,taxDetails:ge==null?void 0:ge.taxDetails,isFetchingSubscriptionPreview:j,checkoutLocalization:g}),t?null:o.jsxs(o.Fragment,{children:[o.jsx(Ae,{style:{marginTop:16},children:o.jsxs(R,{display:"flex",flexDirection:"column",container:!0,children:[o.jsxs(R,{item:!0,display:"flex",justifyContent:"space-between",children:[o.jsx(C,{variant:"h6",children:g.summary.totalText}),o.jsx(C,{variant:"h6",children:o.jsxs(Ne,{isLoading:j,children:[on?g.summary.onlyPayAsYouGoText:null,!on&&ui?g.summary.startsAtText:null,on?null:re(_(I({amount:0},ge==null?void 0:ge.total),{minimumFractionDigits:2}))]})})]}),o.jsx(R,{item:!0,children:o.jsx(C,{variant:"body1",color:"secondary",children:g.summary.totalBillingPeriodText({billingPeriod:m.billingPeriod})})})]})}),o.jsx(He,{className:"stigg-checkout-summary-divider"})]}),(pi=Y==null?void 0:Y.proration)!=null&&pi.hasProrations&&(Y!=null&&Y.subTotal)&&(Y==null?void 0:Y.subTotal.amount)>0?o.jsx(je,{children:o.jsxs(Ae,{children:[o.jsx(C,{variant:"body1",color:"secondary",children:g.summary.proratedTotalDueText}),o.jsx(C,{variant:"body1",color:"secondary",children:o.jsx(Ne,{isLoading:j,children:re({amount:Number(((fi=Y==null?void 0:Y.subTotal)==null?void 0:fi.amount)||0)+Number(((hi=Y==null?void 0:Y.tax)==null?void 0:hi.amount)||0),currency:Y==null?void 0:Y.subTotal.currency,minimumFractionDigits:2})})})]})}):null,o.jsx(b1,{subscriptionPreview:L,isFetchingSubscriptionPreview:j,checkoutLocalization:g}),o.jsx(je,{children:o.jsxs(Ae,{children:[o.jsx(fr,{variant:"h6",children:g.summary.totalDueText}),o.jsx(fr,{variant:"h6",children:o.jsx(Ne,{isLoading:j,children:re(_(I({amount:0},Y==null?void 0:Y.total),{minimumFractionDigits:2}))})})]})}),o.jsx(u1,{plan:S,activeSubscription:v,subscriptionPreview:L,isFetchingSubscriptionPreview:j,checkoutLocalization:g,billingPeriod:m.billingPeriod}),(!N||!F||F&&!d)&&o.jsx(Le,{$success:U,$error:N&&t,disabled:xe||j||p.progressBarState.isDisabled||N&&!si,className:"stigg-checkout-summary-cta-button",sx:{textTransform:"none",borderRadius:"10px",marginTop:"24px",height:"36px"},variant:"contained",size:"medium",onClick:V=>{bo(V)},fullWidth:!0,children:o.jsx(C,{className:"stigg-checkout-summary-cta-button-text",variant:"h3",color:"white",style:{display:"flex"},children:U?o.jsx(fe,{icon:"Check",style:{display:"contents"}}):xe||j?o.jsx(Bn,{size:20,sx:{color:"white"}}):S1({isLastStep:N,checkoutHasChanges:si,isFreeDowngrade:t,checkoutLocalization:g,isPlanUpdate:!!v&&(v==null?void 0:v.plan.id)===(S==null?void 0:S.id)})})})]}),o.jsx(Ke,{source:"checkout",showWatermark:s,style:{marginTop:8,display:"flex",justifyContent:"center"}}),!r&&U&&o.jsx(e1,{checkoutLocalization:g})]})},v1=({showWatermark:e})=>o.jsxs(eo,{children:[o.jsxs(ri,{children:[o.jsxs(dt,{$flexDirection:"column",$gap:24,children:[o.jsx(te,{width:120,height:20}),o.jsx(te,{width:120,height:20}),o.jsx(te,{width:120,height:20}),o.jsx(te,{width:120,height:20})]}),o.jsxs(dt,{$flexDirection:"column",$gap:24,marginTop:5,children:[o.jsx(te,{height:20}),o.jsx(te,{height:20}),o.jsx(te,{height:20})]}),o.jsx(jn,{flex:1,marginTop:5,children:o.jsx(te,{height:34})})]}),o.jsx(Ke,{source:"checkout",showWatermark:e,style:{marginTop:8,display:"flex",justifyContent:"center"}})]}),x1=h(R)`
3118
- width: 100%;
3119
- gap: 8px;
3120
- `,I1=h(R)`
3121
- display: flex;
3122
- flex-direction: column;
3123
- gap: 16px;
3124
- width: 100%;
3125
-
3126
- ${Se.md} {
3127
- gap: 0;
3128
- flex-direction: row;
3129
- justify-content: space-between;
3130
- min-height: 80px;
3131
- align-items: flex-start;
3132
- padding-top: 16px;
3133
- padding-bottom: 16px;
3134
- }
3135
- `,T1=h(Le)`
3136
- min-width: unset;
3137
- width: 41px;
3138
- height: 41px;
3139
- padding: 0;
3140
- `,A1=K.styled(K.Grid)`
3141
- display: flex;
3142
- flex-direction: row;
3143
- align-items: center;
3144
- width: 100%;
3145
- justify-content: flex-end;
3146
- `;function k1({addon:e,addonState:n,hasChanges:i,errorMessage:r,isPriceForBillingPeriodAvailable:t,checkoutLocalization:a,handleQuantityChange:s,handleUndo:c,handleRemoveAddon:l}){var p;const u=Ge("lg"),d=!!n;return o.jsxs(A1,{item:!0,sx:{gap:"16px"},container:!u,children:[i&&o.jsx(Le,{variant:"text",size:"small",sx:{padding:"8px",minWidth:"unset"},onClick:c,children:o.jsx(C,{color:"primary.main",variant:"body1",children:"Undo"})}),d&&o.jsxs(K.Grid,{sx:{display:"flex",width:"100%"},children:[o.jsx(Kt,{id:`${e.id}-input`,type:"number",onWheel:Kn,sx:u?{marginX:2,width:"100%"}:{flex:1},value:(p=n==null?void 0:n.quantity)!=null?p:"",error:!!r,helperText:r,FormHelperTextProps:{sx:{margin:"4px"}},onChange:m=>{var f,g;return s((f=m==null?void 0:m.target)!=null&&f.value?Number((g=m==null?void 0:m.target)==null?void 0:g.value):null)}}),o.jsx(T1,{color:"error",onClick:l,children:o.jsx(fe,{icon:"Trash",style:{display:"flex",padding:"8px"}})})]}),!d&&o.jsx(Le,{sx:{paddingX:"22px",paddingY:"8px"},onClick:()=>s(1),disabled:!t,children:o.jsx(C,{color:t?"primary.main":"disabled",variant:"body1",children:a.addAddonText})})]})}const N1=h(K.Grid)`
3147
- display: flex;
3148
- flex-direction: column;
3149
- justify-content: center;
3150
- width: 100%;
3151
- height: 42px;
3152
- `;function w1({addon:e,billingPeriod:n,checkoutLocalization:i}){const r=e.pricePoints.find(t=>t.billingPeriod===n);return o.jsxs(N1,{item:!0,children:[o.jsx(C,{variant:"h6",lineHeight:"24px",children:e.displayName}),r?o.jsx(C,{variant:"body1",lineHeight:"20px",color:"secondary",children:`${re({amount:r.amount,currency:r.currency,minimumFractionDigits:2})}/${n===b.BillingPeriod.Annually?"year":"month"}`}):o.jsx(C,{variant:"body1",lineHeight:"20px",color:"secondary",children:i.addonBillingPeriodNotAvailableText({planBillingPeriod:n})})]})}function F1({addon:e,billingPeriod:n,addonState:i,initialAddonState:r,setAddon:t,removeAddon:a,checkoutLocalization:s,onAddonsValidationChange:c,onAddonChange:l}){const[u,d]=D.useState(void 0),p=!!i&&!!r&&i.quantity!==r.quantity||!!r&&!i,m=e.pricePoints.some(P=>P.billingPeriod===n),f=P=>B(null,null,function*(){if(!P||P<=0){c({addonId:e.id,isValid:!1}),d("Minimum 1"),t(e,P!=null?P:null);return}const S=yield l==null?void 0:l({addon:e,quantity:P});d(S==null?void 0:S.errorMessage),c({addonId:e.id,isValid:!(S!=null&&S.disableNextStep)}),t(e,P)}),g=()=>B(null,null,function*(){yield l==null?void 0:l({addon:e,quantity:0}),a(e.id),c({addonId:e.id,isValid:!0})}),y=()=>B(null,null,function*(){if(r){const P=yield l==null?void 0:l({addon:e,quantity:r.quantity});c({addonId:e.id,isValid:!(P!=null&&P.disableNextStep)}),t(e,r.quantity)}else yield g();c({addonId:e.id,isValid:!0})});return o.jsxs(I1,{children:[o.jsx(w1,{addon:e,billingPeriod:n,checkoutLocalization:s}),o.jsx(k1,{addon:e,addonState:i,hasChanges:p,handleUndo:y,errorMessage:u,handleQuantityChange:f,isPriceForBillingPeriodAvailable:m,checkoutLocalization:s,handleRemoveAddon:g})]})}function j1({onAddonChange:e}){const{checkoutLocalization:n,setIsValid:i}=ne(),{billingPeriod:r}=Xe(),{setIsDisabled:t}=Et(),{initialAddons:a,addons:s,availableAddons:c,setAddon:l,removeAddon:u}=Ud(),[d,p]=D.useState((c==null?void 0:c.reduce((m,f)=>(m[f.id]=!0,m),{}))||{});return D.useEffect(()=>{const m=Object.values(d).some(f=>!f);t(m),i(!m)},[d,t,i]),o.jsx(x1,{container:!0,children:c==null?void 0:c.map(m=>{const f=s.find(y=>y.addon.id===m.id),g=a==null?void 0:a.find(y=>y.addon.id===m.id);return o.jsx(F1,{addon:m,billingPeriod:r,addonState:f,initialAddonState:g,setAddon:l,removeAddon:u,checkoutLocalization:n,onAddonsValidationChange:({addonId:y,isValid:P})=>p(_(I({},d),{[y]:P})),onAddonChange:e},m.id)})})}const to=h(R)`
3153
- padding: 8px;
3154
- border-radius: 10px;
3155
- border: 1px solid ${({theme:e})=>e.stigg.palette.outlinedBorder};
3156
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
3157
- opacity: ${({$disabled:e})=>e?.6:1};
3158
- `,R1=h(to)`
3159
- flex-direction: column;
3160
- align-items: unset;
3161
- ${({$hideBorders:e})=>e&&Ie`
3162
- border: none;
3163
- padding: 0;
3164
- `}
3165
- `,M1=h(R)`
3166
- display: flex;
3167
- align-items: center;
3168
- flex: 1;
3169
- gap: 12px;
3170
- `,U1=h(R)`
3171
- display: flex;
3172
- flex-direction: column;
3173
- `,O1=h(Q)`
3174
- position: relative;
3175
- max-width: 500px;
3176
- `,L1=h(Q)`
3177
- opacity: ${({$showLoading:e})=>e?.6:1};
3178
- pointer-events: ${({$showLoading:e})=>e?"none":"auto"};
3179
- `,B1=h(Q)`
3180
- position: absolute;
3181
- top: 40px;
3182
- left: 0;
3183
- right: 0;
3184
- bottom: 0;
3185
- background-color: rgba(255, 255, 255, 0.8);
3186
- display: flex;
3187
- align-items: center;
3188
- justify-content: center;
3189
- border-radius: 4px;
3190
- z-index: 10;
3191
- `,_1=h(Q)`
3192
- display: flex;
3193
- flex-direction: column;
3194
- align-items: center;
3195
- gap: 12px;
3196
- `;function $1({onCheckout:e,onCheckoutCompleted:n}){var P,S,v;const{isZuoraIntegration:i,isInitialized:r,createPaymentSession:t}=ii(),{setErrorMessage:a}=Ve(),{billingCountryCode:s}=Xe(),{checkoutState:c,widgetState:l}=ne(),{handleZuoraSubmit:u}=Xa({onCheckout:e,onCheckoutCompleted:n}),d=D.useRef(!1),[p,m]=D.useState(!1),f=((v=(S=(P=c==null?void 0:c.plan)==null?void 0:P.pricePoints)==null?void 0:S[0])==null?void 0:v.currency)||b.Currency.Usd,{publishableKey:g}=c==null?void 0:c.billingIntegration.billingCredentials,y=D.useCallback(A=>B(null,null,function*(){var k;if(!A.success||!A.paymentMethodId){const w=((k=A.error)==null?void 0:k.message)||"Payment failed";a(w),yield n({success:!1,error:w});return}yield u(A.paymentMethodId)}),[u,a,n]);return D.useEffect(()=>(B(null,null,function*(){if(!(!r||d.current)){m(!0),a(void 0);try{d.current=!0;const k=window.Zuora(g),w=a1(t,y,f,s);(yield k.createPaymentForm(w)).mount("#zuora_payment")}catch(k){d.current=!1,a("Failed to render Zuora payment form")}finally{m(!1)}}}),()=>{d.current=!1}),[r]),i?o.jsxs(O1,{children:[o.jsx(L1,{id:"zuora_payment",$showLoading:l.readOnly||p}),(l.readOnly||p)&&o.jsx(B1,{children:o.jsx(_1,{children:o.jsx(Bn,{size:28})})})]}):null}function no({checked:e,text:n,subtitle:i,readOnly:r}){return o.jsxs(M1,{children:[o.jsx(Ar,{checked:e,disabled:r}),o.jsxs(U1,{container:!0,children:[o.jsx(R,{item:!0,children:n}),i&&o.jsx(R,{item:!0,children:i})]})]})}function G1({checked:e,paymentMethodDetails:n,readOnly:i,onSelect:r}){if(!n)return null;const{last4Digits:t,expirationMonth:a,expirationYear:s}=n;return o.jsx(to,{item:!0,onClick:r,$disabled:i,children:o.jsx(no,{checked:e,readOnly:i,text:o.jsx(C,{variant:"h6",children:`Card ending in ${t}`}),subtitle:!!a&&!!s&&o.jsx(C,{variant:"body1",children:`Expires ${a.toString().padStart(2,"0")}/${s}`})})})}function V1({hasExistingPaymentMethod:e,checked:n,onSelect:i,readOnly:r,checkoutLocalization:t,onBillingAddressChange:a,collectPhoneNumber:s,onCheckout:c,onCheckoutCompleted:l}){const{isZuoraIntegration:u}=ii();return o.jsxs(R1,{item:!0,$hideBorders:!e,onClick:i,$disabled:r,children:[e&&o.jsx(no,{checked:n,readOnly:r,text:o.jsx(C,{variant:"h6",children:t.newPaymentMethodText})}),o.jsx(Ir,{in:n,children:u?o.jsx($1,{onCheckout:c,onCheckoutCompleted:l}):o.jsx(Ng,{onBillingAddressChange:a,collectPhoneNumber:s})})]})}const H1=h(R)`
3197
- display: flex;
3198
- flex-direction: column;
3199
- gap: 24px;
3200
- `;function q1({onBillingAddressChange:e,collectPhoneNumber:n,onCheckout:i,onCheckoutCompleted:r}){const{checkoutState:t,checkoutLocalization:a,widgetState:s}=ne(),{customer:c}=t||{},{errorMessage:l,useNewPaymentMethod:u,setUseNewPaymentMethod:d}=Ve(),{readOnly:p}=s,m=f=>{p||d(f)};return o.jsxs(H1,{container:!0,children:[!!l&&o.jsx(Tr,{severity:"error",sx:{alignItems:"center"},children:o.jsx(C,{overrideColor:"inherit",children:l})}),o.jsx(G1,{readOnly:p,checked:!u,paymentMethodDetails:c==null?void 0:c.paymentMethodDetails,onSelect:()=>m(!1)}),o.jsx(V1,{hasExistingPaymentMethod:!!(c!=null&&c.paymentMethodDetails),readOnly:p,checked:u,checkoutLocalization:a,onSelect:()=>m(!0),onBillingAddressChange:e,collectPhoneNumber:n,onCheckout:i,onCheckoutCompleted:r})]})}const io=({onClick:e,checkoutLocalization:n,size:i})=>o.jsx(we,{className:"stigg-checkout-change-plan-button",sx:{textTransform:"none"},variant:"text",size:i,onClick:e,children:o.jsx(C,{className:"stigg-checkout-change-plan-button-text",color:"primary.main",variant:"h3",style:{lineHeight:"24px"},children:n.changePlan})});function W1({allowChangePlan:e=!1,onChangePlan:n}){const{checkoutState:i,checkoutLocalization:r}=ne(),{plan:t}=i||{};return o.jsxs(o.Fragment,{children:[o.jsxs(Q,{sx:{marginBottom:"16px"},children:[o.jsx(C,{variant:"body1",color:"disabled",style:{opacity:.6,marginBottom:"8px"},children:"Selected plan"}),o.jsxs(Q,{sx:{display:"flex",justifyContent:"space-between"},children:[o.jsx(C,{variant:"h1",children:t==null?void 0:t.displayName}),e&&n&&o.jsx(io,{onClick:()=>{n({currentPlan:t})},checkoutLocalization:r,size:"medium"})]})]}),o.jsx(We,{className:"stigg-checkout-plan-header-divider"})]})}function hr(e){switch(e){case b.BillingPeriod.Annually:return"Annual";case b.BillingPeriod.Monthly:return"Monthly";default:return""}}const Y1=h(Q)`
3201
- margin: 16px 0;
3202
- `,Z1=h.button`
3203
- cursor: ${({$disabled:e,$isOnlyBillingPeriod:n})=>e||n?"default":"pointer"};
3204
- flex: 1;
3205
- display: flex;
3206
- align-items: center;
3207
- justify-content: flex-start;
3208
- padding: 2px 8px;
3209
- border-radius: 10px;
3210
- border: ${({theme:e,$isActive:n,$isOnlyBillingPeriod:i})=>{let r=e.stigg.palette.outlinedBorder;return i?r="transparent":n&&(r=e.stigg.palette.outlinedRestingBorder),`1px solid ${r}`}};
3211
- background: ${({theme:e,$isActive:n,$isOnlyBillingPeriod:i})=>i?"transparent":n?le(e.stigg.palette.primary).alpha(.15).toString():"transparent"};
3212
- text-transform: none;
3213
- text-align: start;
3214
- height: 36px;
3215
-
3216
- &.MuiButton-root {
3217
- padding: 0 16px 0 8px;
3218
- &:hover {
3219
- background: none;
3220
- }
3221
- }
3222
- `,z1=h(Q)`
3223
- display: flex;
3224
- gap: 16px;
3225
- margin-top: 16px;
3226
- `;h.div`
3227
- display: flex;
3228
- align-items: baseline;
3229
- gap: 8px;
3230
- `;h(Vo)`
3231
- & .MuiChip-label {
3232
- font-size: 12px;
3233
- }
3234
- `;const yr=({billingPeriod:e,isOnlyBillingPeriod:n})=>{const{billingPeriod:i,setBillingPeriod:r}=Xe(),t=i===e;return o.jsxs(Z1,{onClick:()=>r(e),$isActive:t,$isOnlyBillingPeriod:n,children:[o.jsx(Ar,{checked:t,onChange:()=>r(e),value:e,disabled:n,inputProps:{"aria-label":hr(e)},sx:{padding:0,marginRight:"8px"}}),o.jsx(Q,{children:o.jsx(C,{variant:"h3",color:"primary",children:hr(e)})})]})};function K1({plan:e,checkoutLocalization:n}){const[i,r]=ee.partition(e==null?void 0:e.pricePoints,a=>a.billingPeriod===b.BillingPeriod.Monthly),t=!!(i!=null&&i.length)&&!!(r!=null&&r.length);return t?o.jsxs(Y1,{children:[o.jsx(C,{variant:"h6",color:"primary",children:n.billingPeriodsTitle}),o.jsxs(z1,{children:[!!(i!=null&&i.length)&&o.jsx(yr,{billingPeriod:b.BillingPeriod.Monthly,isOnlyBillingPeriod:!t},b.BillingPeriod.Monthly),!!(r!=null&&r.length)&&o.jsx(yr,{billingPeriod:b.BillingPeriod.Annually,isOnlyBillingPeriod:!t},b.BillingPeriod.Annually)]})]}):null}const Q1=h.div`
3235
- display: flex;
3236
- min-height: 60px;
3237
- margin-top: 16px;
3238
- flex-direction: column;
3239
-
3240
- ${Se.md} {
3241
- flex-direction: row;
3242
- align-items: flex-start;
3243
- justify-content: space-between;
3244
- }
3245
- `,X1=h(Q)`
3246
- display: flex;
3247
- flex-direction: column;
3248
- justify-content: center;
3249
- width: 100%;
3250
- height: 42px;
3251
- `,J1=h(C)`
3252
- display: flex;
3253
- align-items: center;
3254
- justify-content: flex-end;
3255
- width: 100%;
3256
- min-height: 42px;
3257
- `,ep=(e,n)=>{const{minUnitQuantity:i,maxUnitQuantity:r}=e;return!n||n<(i||1)?`Minimum ${i||1}`:r&&n>r?`Maximum ${r}`:""};function tp({charge:e,setBillableFeature:n,billableFeature:i,onValidationChange:r,onBillableFeatureChange:t}){var g,y,P,S,v,A;const[a,s]=D.useState(void 0),c=(g=e.feature)==null?void 0:g.featureId,l=!c,u=e.pricingModel===b.BillingModel.UsageBased,d=l?"Base charge":ei(((y=e.feature)==null?void 0:y.displayName)||"",(P=e.feature)==null?void 0:P.units,(S=e.feature)==null?void 0:S.unitsPlural),p=!!(e!=null&&e.minUnitQuantity||e!=null&&e.maxUnitQuantity),m=k=>B(null,null,function*(){var L,j;if(l||!c)return;const{minUnitQuantity:w,maxUnitQuantity:T}=e,N=(L=k==null?void 0:k.target)!=null&&L.value?Number((j=k==null?void 0:k.target)==null?void 0:j.value):null;if(!N||N<=0||w&&N<w||T&&N>T){r({featureId:c,isValid:!1}),s(ep(e,N!=null?N:void 0)),n(c,N!=null?N:null);return}const F=Ba(e,N),U=yield t==null?void 0:t({feature:e.feature,quantity:F});s(U==null?void 0:U.errorMessage),r({featureId:c,isValid:!(U!=null&&U.disableNextStep)}),n(c,F)});let f;if(l||u)f=`${re({amount:e.amount,currency:e.currency,locale:"en-us",minimumFractionDigits:2})}`,u&&(f+=" / unit");else if(e.isTieredPrice&&e.tiersMode&&c){const k=(i==null?void 0:i.quantity)||1;f=o.jsx(ta,{componentId:`${c}-tiers`,tiers:e.tiers,tiersMode:e.tiersMode,value:k,errorMessage:a,handleChange:w=>B(null,null,function*(){const T=yield t==null?void 0:t({feature:e.feature,quantity:w});s(T==null?void 0:T.errorMessage),r({featureId:c,isValid:!(T!=null&&T.disableNextStep)}),n(c,w)}),width:"100%"})}else f=o.jsx(Kt,{sx:{width:"100%"},id:`${c}-input`,type:"number",onWheel:Kn,error:!!a,helperText:a,FormHelperTextProps:{sx:{margin:"4px"}},value:(v=i==null?void 0:i.quantity)!=null?v:"",onChange:m});return o.jsxs(Q1,{children:[o.jsxs(X1,{children:[o.jsx(C,{variant:"h6",color:"primary",lineHeight:"24px",children:d}),p&&o.jsx(C,{variant:"body1",color:"secondary",lineHeight:"20px",children:qr(e.minUnitQuantity,e.maxUnitQuantity,(A=e.feature)==null?void 0:A.unitsPlural)})]}),o.jsx(J1,{variant:"h6",color:"primary",children:f})]})}function np({plan:e,billingPeriod:n,onBillableFeatureChange:i}){var d;const{billableFeatures:r,setBillableFeature:t}=Xe(),{setIsDisabled:a}=Et(),{setIsValid:s}=ne(),c=Ha(((d=e==null?void 0:e.pricePoints)==null?void 0:d.filter(p=>p.billingPeriod===n))||[]),[l,u]=D.useState(c==null?void 0:c.reduce((p,m)=>{var f;return p[((f=m.feature)==null?void 0:f.featureId)||"base-charge"]=!0,p},{}));return D.useEffect(()=>{const p=Object.values(l).some(m=>!m);a(p),s(!p)},[l,a,s]),o.jsx(o.Fragment,{children:c==null?void 0:c.map(p=>{var f;const m=r.find(g=>{var y;return g.featureId===((y=p.feature)==null?void 0:y.featureId)});return o.jsx(tp,{charge:p,setBillableFeature:t,billableFeature:m,onValidationChange:({featureId:g,isValid:y})=>u(P=>_(I({},P),{[g]:y})),onBillableFeatureChange:i},((f=p.feature)==null?void 0:f.featureId)||"base-charge")})})}const ip=h(Q)`
3258
- width: 100%;
3259
- `,rp=({onChangePlan:e,onBillableFeatureChange:n})=>{const{checkoutState:i,checkoutLocalization:r}=ne(),{plan:t}=i||{},{billingPeriod:a}=Xe();return o.jsxs(o.Fragment,{children:[o.jsx(W1,{allowChangePlan:!0,onChangePlan:e}),o.jsxs(ip,{children:[o.jsx(K1,{plan:t,checkoutLocalization:r}),o.jsx(np,{plan:t,billingPeriod:a,onBillableFeatureChange:n})]})]})},ap=e=>E.createElement("svg",I({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),E.createElement("g",{id:"arrow-right"},E.createElement("path",{id:"Shape",d:"M2.66699 8H13.3337",stroke:"#7586B0",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{id:"Shape_2",d:"M9.33301 4L13.333 8L9.33301 12",stroke:"#7586B0",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}))),op=h(ap)`
3260
- path {
3261
- stroke: ${({theme:e})=>e.stigg.palette.text.secondary};
3262
- }
3263
- `,sp=h(Q)`
3264
- display: flex;
3265
- `,cp=h(Tr)`
3266
- margin-bottom: 16px;
3267
- `,lp=h(Q)`
3268
- padding: 16px;
3269
- border-radius: 10px;
3270
- width: 100%;
3271
- border: ${({theme:e})=>`1px solid ${e.stigg.palette.outlinedBorder}`};
3272
- `,Cr=({headerText:e,planName:n,priceText:i})=>o.jsxs(lp,{className:"stigg-checkout-downgrade-to-free-container",children:[o.jsx(C,{className:"stigg-checkout-downgrade-to-free-text-header",style:{opacity:.8},variant:"caption",color:"disabled",children:e}),o.jsx(C,{className:"stigg-checkout-downgrade-to-free-plan-name",bold:!0,variant:"h3",color:"primary",children:n}),o.jsx(C,{className:"stigg-checkout-downgrade-to-free-price-text",color:"secondary",children:i})]}),up=({checkoutLocalization:e,activeSubscription:n,freePlan:i,allowChangePlan:r=!1,onChangePlan:t})=>{let a;r&&t&&(a=o.jsx(io,{onClick:()=>{t({currentPlan:i})},checkoutLocalization:e,size:"small"}));const s=n.prices.length>0?n.prices[0].billingPeriod:void 0;return o.jsxs(o.Fragment,{children:[o.jsx(cp,{action:a,className:"stigg-checkout-downgrade-to-free-alert",severity:"info",children:o.jsx(C,{as:"span",color:"secondary",children:e.downgradeToFree.alertText({plan:n.plan})})}),o.jsxs(sp,{className:"stigg-checkout-downgrade-to-free-plans-container",children:[o.jsx(Cr,{headerText:e.downgradeToFree.paidPlanHeader({plan:n.plan}),planName:e.downgradeToFree.paidPlanName({plan:n.plan}),priceText:e.downgradeToFree.paidPlanPriceText({plan:n.plan,billingPeriod:s})}),o.jsx(op,{className:"stigg-checkout-downgrade-to-free-arrow",style:{margin:"auto 16px",minWidth:"16px"}}),o.jsx(Cr,{headerText:e.downgradeToFree.freePlanHeader({plan:i}),planName:e.downgradeToFree.freePlanName({plan:i}),priceText:e.downgradeToFree.freePlanPriceText({plan:i})})]})]})},dp=(e,{onBillingAddressChange:n,onChangePlan:i,onBillableFeatureChange:r,onAddonChange:t,collectPhoneNumber:a,onCheckout:s,onCheckoutCompleted:c})=>{switch(e.key){case Te.PLAN:return{content:o.jsx(rp,{onChangePlan:i,onBillableFeatureChange:r})};case Te.ADDONS:return{content:o.jsx(j1,{onAddonChange:t})};case Te.PAYMENT:return{content:o.jsx(q1,{onBillingAddressChange:n,collectPhoneNumber:a,onCheckout:s,onCheckoutCompleted:c})};default:return{content:null}}};function mp({onCheckout:e,onCheckoutCompleted:n,onChangePlan:i,onBillingAddressChange:r,onBillableFeatureChange:t,onAddonChange:a,collectPhoneNumber:s,disablePromotionCode:c,disableSuccessAnimation:l,onMockCheckoutPreview:u}){const{stripePromise:d,setupIntentClientSecret:p}=wg(),[{stiggTheme:m,widgetState:f,theme:g,showWatermark:y}]=W(),{currentStep:P}=Et(),{isLoadingCheckoutData:S}=f,{checkoutState:v,checkoutLocalization:A}=ne(),{plan:k,activeSubscription:w}=v||{},T=!!k&&k.pricingType===b.PricingType.Free&&!!w&&w.pricingType!==b.PricingType.Free,{content:N}=dp(P,{onBillingAddressChange:r,onChangePlan:i,onBillableFeatureChange:t,onAddonChange:a,collectPhoneNumber:s,onCheckout:e,onCheckoutCompleted:n}),F=o.jsx(o.Fragment,{children:T?o.jsx(up,{freePlan:k,activeSubscription:w,allowChangePlan:!0,checkoutLocalization:A,onChangePlan:i}):o.jsx(o.Fragment,{children:N})}),U=D.useMemo(()=>p?{clientSecret:p}:{mode:"setup",currency:"usd"},[p]);return o.jsx(st.Elements,{stripe:d,options:_(I({},U),{appearance:{theme:"stripe",variables:{colorText:m.palette.text.primary,colorPrimaryText:m.palette.text.primary,colorTextPlaceholder:m.palette.text.disabled,fontFamily:m.typography.fontFamily,colorBackground:g==null?void 0:g.paymentInputBackgroundColor,borderRadius:g==null?void 0:g.paymentInputBorderRadius},rules:g!=null&&g.paymentInputBorderColor?{".Input":{borderColor:g==null?void 0:g.paymentInputBorderColor}}:void 0}}),children:o.jsxs(ug,{className:"stigg-checkout-layout",children:[!T&&o.jsx(hg,{}),o.jsxs(dg,{children:[o.jsx(mg,{children:S?o.jsx(ol,{}):F}),S?o.jsx(v1,{showWatermark:y}):o.jsx(D1,{disablePromotionCode:c,disableSuccessAnimation:l,onCheckout:e,onCheckoutCompleted:n,isFreeDowngrade:T,onMockCheckoutPreview:u,showWatermark:y})]})]})},p)}const gp=m=>{var f=m,{textOverrides:e,theme:n,resourceId:i,planId:r,preferredBillingPeriod:t,billingCountryCode:a,billableFeatures:s,billingInformation:c,onMockCheckoutState:l,skipCheckoutSteps:u,onBeforeStepChange:d}=f,p=se(f,["textOverrides","theme","resourceId","planId","preferredBillingPeriod","billingCountryCode","billableFeatures","billingInformation","onMockCheckoutState","skipCheckoutSteps","onBeforeStepChange"]);return o.jsx(lg,{textOverrides:e,theme:n,resourceId:i,planId:r,preferredBillingPeriod:t,billingCountryCode:a,billableFeatures:s,billingInformation:c,onMockCheckoutState:l,skipCheckoutSteps:u,onBeforeStepChange:d,children:o.jsx(mp,I({},p))})};function pp(e){return D.useMemo(()=>new URLSearchParams(window.location.search).get(e),[e,window.location.search])}var ro=(e=>(e.IN_PROGRESS="IN_PROGRESS",e.SUCCEEDED="SUCCEEDED",e.FAILED="FAILED",e))(ro||{});const fp=({onProvisionStart:e,onProvisionSucceeded:n,onProvisionFailed:i}={})=>{const{stigg:r}=q(),[t,a]=D.useState("IN_PROGRESS"),[s,c]=D.useState(!1),l=pp("checkoutCompleted");return D.useEffect(()=>{B(null,null,function*(){if(!(!l||l.toLowerCase()==="false"||s)){c(!0),e&&e();try{const d=yield r.waitForCheckoutCompleted();a("SUCCEEDED"),n&&n(d)}catch(d){console.error("Failed to wait for checkout to complete",d),a("FAILED"),i&&i(d)}finally{c(!1)}}})},[r,l]),{isAwaitingCheckout:s,provisionStatus:t}};function hp(r){var t=r,{noAccessComponent:e,children:n}=t,i=se(t,["noAccessComponent","children"]);const{hasAccess:a}=Wa(i);return a?n:o.jsx(o.Fragment,{children:e!=null?e:null})}function yp(r){var t=r,{noAccessComponent:e,children:n}=t,i=se(t,["noAccessComponent","children"]);const{hasAccess:a}=Ya(i);return a?n:o.jsx(o.Fragment,{children:e!=null?e:null})}function Cp(r){var t=r,{noAccessComponent:e,children:n}=t,i=se(t,["noAccessComponent","children"]);const{hasAccess:a}=Za(i);return a?n:o.jsx(o.Fragment,{children:e!=null?e:null})}function bp(r){var t=r,{noAccessComponent:e,children:n}=t,i=se(t,["noAccessComponent","children"]);const{hasAccess:a}=za(i);return a?n:o.jsx(o.Fragment,{children:e!=null?e:null})}function ai(e){const n=q(),i=n==null?void 0:n.stigg,r=n==null?void 0:n.updatedAt,t=D.useCallback(()=>B(null,null,function*(){if(!i||!i.isCustomerLoaded)return null;try{const l={currencyId:e.currencyId},u=yield i.getCreditBalance(l);if(u.balances&&u.balances.length>0){const{currentBalance:d,totalConsumed:p,totalGranted:m,currency:{currencyId:f,displayName:g,units:y,symbol:P}}=u.balances[0];return{currentBalance:d,totalConsumed:p,totalGranted:m,currencyId:f,displayName:g,units:y,symbol:P}}return{currencyId:e.currencyId,currentBalance:0,totalConsumed:0,totalGranted:0}}catch(l){throw console.error(l),l}}),[i,e.currencyId,r]),{data:a,error:s,isLoading:c}=Je({func:t});return D.useMemo(()=>({balance:a,isLoading:c,error:s}),[a,s,c])}const ot=(e,n)=>e?pe(e,{maximumFractionDigits:n!=null?n:void 0}):0,ao=(e,n=!0,i=!1)=>{const{currentBalance:r,displayName:t,units:a,symbol:s}=e,c=i&&s,l=a?r===1?a.singular:a.plural:t;return[c,n?l:""].filter(Boolean).join(" ")},Ep=(e,n)=>n===0?0:Math.min(e/n*100,100),Pp=h.div`
3273
- display: flex;
3274
- flex-direction: row;
3275
- gap: 4px;
3276
- align-items: baseline;
3277
- `;function Sp({currencyId:e,decimalPlaces:n=null,showUnits:i=!0,showSymbol:r=!1}){const{balance:t,isLoading:a,error:s}=ai({currencyId:e});if(s)return o.jsx(C,{variant:"body1",color:"error",className:"stigg-credit-balance-value-error",children:s.message||"Failed to load balance"});if(a)return o.jsx(H,{width:120,height:24,className:"stigg-credit-balance-value-loading"});if(t){const c=ao(t,i,r);return o.jsxs(Pp,{children:[o.jsx(C,{variant:"h3",color:"primary",bold:!0,className:"stigg-credit-balance-value-amount",children:ot(t.currentBalance,n)}),o.jsx(C,{variant:"caption",color:"secondary",className:"stigg-credit-balance-value-suffix",children:c})]})}return o.jsx(C,{variant:"body1",color:"disabled",className:"stigg-credit-balance-value-no-balance",children:"No balance data available"})}const Dp={title:"Credit balance"},oo={title:"Credit utilization",remaining:"Remaining"},vp={receivedAt:"Received",effectiveAt:"Effective At",grantType:"Grant Type",status:"State",balance:"Balance",expiryDate:"Expires",emptyState:"No credit grants found",loadingState:"Loading credit grants...",errorState:"Failed to load credit grants"},xp={title:"Usage",totalSpend:"Total spend"},Ip=h.div`
3278
- display: flex;
3279
- flex-direction: column;
3280
- gap: 8px;
3281
- width: 100%;
3282
- `,Tp=h.div`
3283
- display: flex;
3284
- flex-direction: column;
3285
- gap: 8px;
3286
- padding: 16px;
3287
- border-radius: 8px;
3288
- border: 1px solid ${({theme:e})=>{var n,i;return(i=(n=e.stigg)==null?void 0:n.palette)==null?void 0:i.outlinedBorder}};
3289
- background-color: ${({theme:e})=>{var n,i;return(i=(n=e==null?void 0:e.stigg)==null?void 0:n.palette)==null?void 0:i.backgroundPaper}};
3290
- `;function Ap({currencyId:e,localization:n,decimalPlaces:i,showUnits:r=!0,showSymbol:t=!1}){var d;const a=Qn(Qe),s=q({optional:!0}),c=s==null?void 0:s.theme,l=(d=n==null?void 0:n.title)!=null?d:Dp.title,u=o.jsx(Ip,{className:"stigg-credit-balance-container",children:o.jsxs(Tp,{className:"stigg-credit-balance-card",children:[o.jsx(C,{variant:"h6",color:"primary",className:"stigg-credit-balance-title",children:l}),o.jsx(Sp,{currencyId:e,decimalPlaces:i,showUnits:r,showSymbol:t})]})});return a?u:o.jsx($e,{componentTheme:c,children:u})}const kp=[he.CategoryScale,he.LinearScale,he.BarElement,he.Title,he.Tooltip,he.Legend,Ho,he.PointElement,he.LineElement,he.Filler,he.ArcElement,qo,Wo];he.Chart.register(...kp);function so(e){const n=q(),i=n==null?void 0:n.stigg,r=n==null?void 0:n.updatedAt,t=D.useCallback(()=>B(null,null,function*(){if(!i||!i.isCustomerLoaded)return null;try{const l={currencyId:e.currencyId,timeRange:e.timeRange};return yield i.getCreditUsage(l)}catch(l){throw console.error(l),l}}),[i,e.currencyId,e.timeRange,r]),{data:a,error:s,isLoading:c}=Je({func:t});return D.useMemo(()=>({creditUsage:a,isLoading:c,error:s}),[a,s,c])}const Np={id:"redrawBeforeFirstDrawPlugin",beforeDraw(e){e.$rendered||(e.$rendered=!0,e.update("none"))}},co=(e,n=1)=>{const i=Math.round(n*255).toString(16).padStart(2,"0");return`${e}${i}`},br=e=>e.palette.text.secondary,Er=e=>e.palette.outlinedBorder,Pr=e=>({family:e.typography.fontFamily,size:parseInt(e.typography.body.fontSize)});function lo(e){const n=["#4caf50","#2196f3","#ff5722","#ff9800","#e91e63","#3f51b5","#00bcd4","#81c784","#64b5f6","#ff8a65","#ffb74d","#f06292","#7986cb","#4dd0e1","#a5d6a7","#90caf9","#ffab91","#ffcc80","#f48fb1","#9fa8da","#80deea"];return n[e%n.length]}function wp(e){const n=[],i=new Date;switch(e){case b.CreditUsageTimeRange.LastDay:{const r=new Date(i);r.setHours(r.getHours()-23),r.setMinutes(0,0,0);for(let t=0;t<24;t++){const a=new Date(r);a.setHours(a.getHours()+t),n.push(a.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}))}break}case b.CreditUsageTimeRange.LastWeek:{for(let r=6;r>=0;r--){const t=new Date(i);t.setDate(t.getDate()-r),n.push(t.toLocaleDateString("en-US",{month:"short",day:"2-digit"}))}break}case b.CreditUsageTimeRange.LastYear:{for(let r=11;r>=0;r--){const t=new Date(i);t.setMonth(t.getMonth()-r),n.push(t.toLocaleDateString("en-US",{month:"short",year:"2-digit"}))}break}case b.CreditUsageTimeRange.LastMonth:default:{for(let r=29;r>=0;r--){const t=new Date(i);t.setDate(t.getDate()-r),n.push(t.toLocaleDateString("en-US",{month:"short",day:"2-digit"}))}break}}return n}function Fp(e,n){const i=new Date(e);switch(i.setMinutes(0,0,0),n){case b.CreditUsageTimeRange.LastDay:return i.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});case b.CreditUsageTimeRange.LastYear:return e.toLocaleDateString("en-US",{month:"short",year:"2-digit"});case b.CreditUsageTimeRange.LastWeek:case b.CreditUsageTimeRange.LastMonth:default:return e.toLocaleDateString("en-US",{month:"short",day:"2-digit"})}}function jp(e,n){return{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"point",intersect:!0},elements:{bar:{borderRadius:4,borderSkipped:"bottom"}},plugins:{legend:{display:!1},tooltip:{enabled:!1,external:n},datalabels:{display:!1}},scales:{x:{type:"category",stacked:!0,ticks:{color:br(e),font:Pr(e),maxRotation:45,maxTicksLimit:15},grid:{color:Er(e),drawOnChartArea:!1,drawTicks:!1}},y:{type:"linear",stacked:!0,beginAtZero:!0,ticks:{color:br(e),font:Pr(e),callback:i=>pe(Number(i))},grid:{color:co(Er(e),.5),drawOnChartArea:!0,drawTicks:!1,borderDash:[5,5]}}}}}function Rp(e,n,i,r){const t=wp(r);if(!e||!e.series||e.series.length===0)return{data:null,options:null};const a=e.series.map((l,u)=>{const d=l.featureName,p=new Map;l.points.forEach(g=>{const y=Fp(new Date(g.timestamp),r),P=p.get(y)||0;p.set(y,P+g.value)});const m=t.map(g=>p.get(g)||0),f=lo(u);return{label:d,data:m,backgroundColor:co(f,.8),borderColor:f,borderWidth:1}}).reverse(),s={labels:t,datasets:a},c=jp(n,i);return{data:s,options:c}}const Mp=300;function Up(e,n){const i=n.dataPoints[0],r=i.parsed.y,t=e.scales.y,a=r/t.max*(t.bottom-t.top),s=n.caretY+a/2,c=e.getDatasetMeta(i.datasetIndex).data[i.dataIndex],l=c.x-c.width/2,u=e.canvas.offsetTop+s,d=e.canvas.offsetLeft+l;return{top:u,left:d}}function Op(e,n){const i=e.canvas.offsetTop+n.caretY,r=e.canvas.offsetLeft+n.caretX;return{top:i,left:r}}function Lp(e,n=Op){const[i,r]=D.useState(0),[t,a]=D.useState(0),[s,c]=D.useState(!1),[l,u]=D.useState(),d=D.useCallback(m=>{const{chart:f,tooltip:g}=m;if(g.opacity===0){c(!1);return}const{top:y,left:P}=n(f,g);a(P),r(y),u(e(g)),c(!0)},[e,n]);return{tooltipInfo:{positionTop:i,positionLeft:t,isOpen:s,payload:l},tooltipHandler:d}}const Bp=h(K.Box)`
3291
- position: absolute;
3292
- `,_p=h.div`
3293
- position: absolute;
3294
- background-color: white;
3295
- border-radius: 8px;
3296
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
3297
- padding: ${({$padding:e=16})=>e}px;
3298
- max-width: 500px;
3299
- z-index: 1000;
3300
- pointer-events: none;
3301
- opacity: ${({$isOpen:e})=>e?1:0};
3302
- transition: opacity 0.2s ease-in-out;
3303
- transform: translateY(-50%); /* Center vertically on the anchor point */
3304
-
3305
- &::before {
3306
- content: '';
3307
- position: absolute;
3308
- width: 0;
3309
- height: 0;
3310
- border: 8px solid transparent;
3311
- border-left-color: white;
3312
- right: -16px;
3313
- top: 50%;
3314
- transform: translateY(-50%);
3315
- filter: drop-shadow(2px 0 2px rgba(0, 0, 0, 0.1));
3316
- }
3317
- `,$p=({children:e,tooltipInfo:{positionTop:n,positionLeft:i,payload:r,isOpen:t},$padding:a})=>{const[s,c]=D.useState(!1),[l,u]=D.useState(!1),d=D.useRef(Zo(()=>u(!1),Mp));return D.useEffect(()=>{r&&(s||t)?(d.current.cancel(),u(!0)):d.current()},[r,s,t]),o.jsxs(o.Fragment,{children:[o.jsx(Bp,{style:{top:n,left:i}}),o.jsx(_p,{$isOpen:l,$padding:a,style:{top:n,left:i-140},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:e})]})},Gp=h.div`
3318
- width: 3px;
3319
- margin-right: 15px;
3320
- `;function Vp({tooltipInfo:e}){if(!e.payload)return o.jsx(o.Fragment,{});const{featureName:n,usage:i,date:r,color:t}=e.payload;return o.jsx($p,{tooltipInfo:e,placement:"top",$padding:16,children:o.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:8},className:"stigg-credit-usage-chart-tooltip",children:[o.jsx(Gp,{style:{backgroundColor:t,marginTop:2}}),o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[o.jsx(C,{variant:"body1",color:"secondary",children:r}),o.jsx(C,{variant:"body1",color:"primary",children:n}),o.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:4,alignItems:"center"},children:[o.jsx(C,{variant:"body1",color:"primary",children:pe(i)}),o.jsx(C,{variant:"body1",color:"primary",children:"Credits"})]})]})]})})}function Hp(){const e=D.useCallback(n=>{if(ee.isEmpty(n.dataPoints)||ee.isEmpty(n.labelColors))return;const i=n.dataPoints[0],r=n.labelColors[0];if(!i||!r)return;const t=i.dataset.label||"Unknown Feature",a=i.parsed.y||0,s=i.label||"",c=r.backgroundColor;return{featureName:t,usage:a,date:s,color:c}},[]);return Lp(e,Up)}const qp=h.div`
3321
- padding: 8px;
3322
- margin: 0 12px;
3323
- `,Wp=h.div`
3324
- display: flex;
3325
- align-items: center;
3326
- `,Yp=h.div`
3327
- flex: 1;
3328
- position: relative;
3329
- align-items: center;
3330
- display: flex;
3331
- `,Zp=h.div`
3332
- height: 24px;
3333
- width: ${({$width:e,$minContentWidth:n})=>{const i=Math.min(e,100),r=Math.max(n,80);return`max(${i}%, ${r}px)`}};
3334
- background-color: #f5f6f9;
3335
- border-radius: 4px;
3336
- position: relative;
3337
- display: flex;
3338
- align-items: center;
3339
- justify-content: space-between;
3340
- padding: 0 8px;
3341
- `,zp=h.div`
3342
- width: 12px;
3343
- height: 12px;
3344
- border-radius: 2px;
3345
- background-color: ${({$color:e})=>e};
3346
- margin-right: 8px;
3347
- flex-shrink: 0;
3348
- `,Kp=h.div`
3349
- margin-right: 24px;
3350
- flex-shrink: 0;
3351
- overflow: hidden;
3352
- text-overflow: ellipsis;
3353
- white-space: nowrap;
3354
- `;function Qp({creditUsageData:e}){var t,a;if(!e||!e.series||e.series.length===0)return null;const n=e.series.map((s,c)=>{const l=s.featureId,u=s.featureName,d=s.totalCredits,p=lo(c);return{featureId:l,featureName:u,totalCredits:d,color:p}}).sort((s,c)=>c.totalCredits-s.totalCredits),i=Math.max(...n.map(s=>s.totalCredits)),r=(s,c)=>{const l=Math.min(s.length*7,200),u=pe(c).length*8;return 20+l+16+u+16};return o.jsxs(qp,{className:"stigg-credit-usage-chart-legend",children:[o.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(C,{style:{marginBottom:12},variant:"body1",color:"secondary",className:"stigg-credit-usage-chart-legend-title",children:"Top sources"}),o.jsx(C,{variant:"caption",color:"disabled",className:"stigg-credit-usage-chart-legend-title-currency-units",children:(a=(t=e.currency)==null?void 0:t.units)==null?void 0:a.plural})]}),o.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:n.map(s=>{const c=i>0?s.totalCredits/i*100:0,l=r(s.featureName,s.totalCredits);return o.jsx(Wp,{className:`stigg-credit-usage-chart-legend-item stigg-credit-usage-chart-legend-item-${s.featureId}`,children:o.jsx(Yp,{className:"stigg-credit-usage-chart-legend-bar-container",children:o.jsxs(Zp,{$width:c,$minContentWidth:l,children:[o.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[o.jsx(zp,{$color:s.color}),o.jsx(Kp,{className:"stigg-credit-usage-chart-legend-feature-name",children:o.jsx(C,{variant:"body1",color:"primary",className:"stigg-credit-usage-chart-legend-feature-name-text",children:s.featureName})})]}),o.jsx(C,{variant:"caption",color:"primary",bold:!0,className:"stigg-credit-usage-chart-legend-value",children:pe(s.totalCredits)})]})})},s.featureId)})})]})}const Xp=h.div`
3355
- display: flex;
3356
- flex-direction: column;
3357
- justify-content: center;
3358
- align-items: center;
3359
- height: 100%;
3360
- `,Jp=h(fe)`
3361
- svg {
3362
- width: 32px;
3363
- height: 32px;
3364
- }
3365
- `;function ef(){return o.jsxs(Xp,{className:"stigg-credit-usage-chart-empty-state",children:[o.jsx(Jp,{icon:"PayAsYouGoCharge",style:{display:"flex"}}),o.jsx(C,{variant:"body1",color:"primary",bold:!0,children:"No Usage Recorded"})]})}const tf=h.div`
3366
- display: flex;
3367
- justify-content: center;
3368
- align-items: center;
3369
- height: 100%;
3370
- `;function nf(){return o.jsx(tf,{className:"stigg-credit-usage-chart-error-state",children:o.jsx(C,{variant:"body1",color:"error",children:"Failed to load credit usage"})})}const Sr=[{value:b.CreditUsageTimeRange.LastDay,label:"Last 24 Hours"},{value:b.CreditUsageTimeRange.LastWeek,label:"Last 7 Days"},{value:b.CreditUsageTimeRange.LastMonth,label:"Last 30 Days"},{value:b.CreditUsageTimeRange.LastYear,label:"Last 12 Months"}],rf=h(K.Select)`
3371
- border-radius: 10px;
3372
- height: 38px;
3373
- min-width: 150px;
3374
-
3375
- &:hover .MuiOutlinedInput-notchedOutline {
3376
- border-color: ${({theme:e})=>e.stigg.palette.outlinedBorder};
3377
- }
3378
- `,af=h(K.OutlinedInput)`
3379
- & .MuiInputBase-input {
3380
- padding: 10px 12px;
3381
- }
3382
-
3383
- &.Mui-focused .MuiOutlinedInput-notchedOutline {
3384
- border-color: ${({theme:e})=>e.stigg.palette.primary} !important;
3385
- }
3386
- `;function of({isLoading:e,totalCredits:n,selectedTimeRange:i,setSelectedTimeRange:r,error:t,localization:a,currencyUnit:s}){return o.jsxs("div",{className:"stigg-credit-usage-chart-header",style:{display:"flex",flexDirection:"row",marginBottom:16,justifyContent:"space-between"},children:[o.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:8,alignItems:"center"},children:[o.jsx(C,{variant:"h3",color:"primary",className:"stigg-credit-usage-chart-title",children:a.title}),e?o.jsx(te,{width:100,height:24}):o.jsxs(o.Fragment,{children:[o.jsx(C,{variant:"h6",color:"secondary",className:"stigg-credit-usage-chart-total",children:"|"}),o.jsxs(C,{variant:"h6",color:"secondary",className:"stigg-credit-usage-chart-total",children:[a.totalSpend,": ",pe(n||0)," ",s||""]})]})]}),!e&&!t&&o.jsx(rf,{className:"stigg-credit-usage-chart-time-range-select",value:i,input:o.jsx(af,{}),onChange:c=>r(c.target.value),renderValue:c=>{var l;return o.jsxs(C,{variant:"body1",color:"primary",children:[((l=Sr.find(u=>u.value===c))==null?void 0:l.label)||""," "]})},children:Sr.map(c=>o.jsx(K.MenuItem,{value:c.value,children:o.jsx(C,{variant:"body1",color:"primary",children:c.label})},c.value))})]})}const sf=h.div`
3387
- display: flex;
3388
- flex-direction: column;
3389
- gap: 8px;
3390
- `,cf=h.div`
3391
- align-items: center;
3392
- justify-content: center;
3393
- min-height: 480px;
3394
- display: flex;
3395
- flex-direction: column;
3396
- gap: 8px;
3397
- padding: 16px;
3398
- border-radius: 8px;
3399
- border: 1px solid ${({theme:e})=>{var n,i;return((i=(n=e==null?void 0:e.stigg)==null?void 0:n.palette)==null?void 0:i.outlinedBorder)||"#e0e0e0"}};
3400
- background-color: ${({theme:e})=>{var n,i;return((i=(n=e==null?void 0:e.stigg)==null?void 0:n.palette)==null?void 0:i.backgroundPaper)||"#ffffff"}};
3401
- `,lf=h(H)`
3402
- border-radius: 4px;
3403
- height: 400px;
3404
- width: 100%;
3405
- `;function uf({currencyId:e,timeRange:n,localization:i}){var v,A;const r=en(),t=q({optional:!0}),a=t==null?void 0:t.stigg,s=I(I({},xp),i),[c,l]=D.useState(n),{creditUsage:u,isLoading:d,error:p}=so({currencyId:e,timeRange:c}),{tooltipInfo:m,tooltipHandler:f}=Hp(),{data:g,options:y}=D.useMemo(()=>Rp(u||null,r,f,c),[u,r,f,c]),P=D.useMemo(()=>(u==null?void 0:u.series.reduce((k,w)=>k+w.totalCredits,0))||0,[u]),S=(A=(v=u==null?void 0:u.currency)==null?void 0:v.units)==null?void 0:A.plural;return o.jsx($e,{componentTheme:r,children:o.jsxs(sf,{className:"stigg-credit-usage-chart-container",children:[o.jsx(cf,{className:"stigg-credit-usage-chart-card",children:o.jsxs("div",{style:{width:"100%"},children:[o.jsx(of,{isLoading:d,totalCredits:P,selectedTimeRange:c,setSelectedTimeRange:l,error:p,localization:s,currencyUnit:S}),o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[o.jsx("div",{style:{height:"400px",position:"relative"},children:d?o.jsx(lf,{className:"stigg-credit-usage-chart-skeleton"}):p?o.jsx(nf,{}):(u==null?void 0:u.series.length)===0?o.jsx(ef,{}):o.jsxs(o.Fragment,{children:[o.jsx(Vp,{tooltipInfo:m}),o.jsx(Yo.Bar,{className:"stigg-credit-usage-chart-bar",data:g!=null?g:{labels:[],datasets:[]},options:y!=null?y:{},plugins:[Np]})]})}),!d&&o.jsx(Qp,{creditUsageData:u})]})]})}),o.jsx(Ke,{source:"credit_usage_chart",align:"end",smallScreenAlign:"end",style:{marginTop:0},showWatermark:a==null?void 0:a.getShowWatermark()})]})})}const df=(e,n)=>e>=100?n.palette.progress.high:e>=75?n.palette.progress.medium:n.palette.progress.low,mf=h.div`
3406
- width: 100%;
3407
- height: 8px;
3408
- background-color: ${({theme:e})=>e.stigg.palette.progress.background};
3409
- border-radius: 4px;
3410
- overflow: hidden;
3411
- `,gf=h.div`
3412
- height: 100%;
3413
- width: ${({percentage:e})=>Math.max(0,Math.min(100,e))}%;
3414
- background-color: ${({theme:e,percentage:n})=>df(n,e.stigg)};
3415
- border-radius: 4px;
3416
- transition: width 0.3s ease-in-out;
3417
- `;function pf({percentage:e,className:n}){return o.jsx(mf,{className:n,children:o.jsx(gf,{percentage:e})})}const ff=h.div`
3418
- display: flex;
3419
- flex-direction: row;
3420
- justify-content: space-between;
3421
- align-items: baseline;
3422
- width: 100%;
3423
- `,hf=h.div`
3424
- display: flex;
3425
- flex-direction: row;
3426
- gap: 4px;
3427
- align-items: baseline;
3428
- `,yf=h.div`
3429
- display: flex;
3430
- flex-direction: row;
3431
- gap: 4px;
3432
- align-items: baseline;
3433
- `,Cf=({totalConsumed:e,totalGranted:n})=>{const i=Ep(e!=null?e:0,n!=null?n:0);return o.jsx(pf,{percentage:i,className:"stigg-credit-utilization-progress"})};function bf({currencyId:e,decimalPlaces:n=null,showUnits:i=!0,showSymbol:r=!1,remainingLabel:t=oo.remaining}){const{balance:a,isLoading:s,error:c}=ai({currencyId:e});if(c)return o.jsx(C,{variant:"body1",color:"error",className:"stigg-credit-utilization-value-error",children:c.message||"Failed to load balance"});if(s)return o.jsx(H,{width:280,height:24,className:"stigg-credit-utilization-value-loading"});if(a){const{currentBalance:l,totalConsumed:u,totalGranted:d}=a,p=ao(a,i,r);return o.jsxs(o.Fragment,{children:[o.jsxs(ff,{children:[o.jsxs(hf,{children:[o.jsx(C,{variant:"h3",color:"primary",bold:!0,className:"stigg-credit-utilization-usage",children:ot(u,n)}),o.jsx(C,{variant:"h3",color:"primary",className:"stigg-credit-utilization-separator",children:"/"}),o.jsx(C,{variant:"h3",color:"primary",className:"stigg-credit-utilization-total",children:ot(d,n)}),o.jsx(C,{variant:"caption",color:"secondary",className:"stigg-credit-utilization-suffix",children:p})]}),o.jsxs(yf,{children:[o.jsx(C,{variant:"caption",color:"secondary",className:"stigg-credit-utilization-remaining-label",children:t}),o.jsx(C,{variant:"caption",color:"primary",bold:!0,className:"stigg-credit-utilization-remaining-value",children:ot(l,n)})]})]}),o.jsx(Cf,{totalConsumed:a.totalConsumed,totalGranted:a.totalGranted})]})}return o.jsx(C,{variant:"body1",color:"disabled",className:"stigg-credit-utilization-value-no-balance",children:"No balance data available"})}const Ef=h.div`
3434
- display: flex;
3435
- flex-direction: column;
3436
- gap: 8px;
3437
- width: 100%;
3438
- `,Pf=h.div`
3439
- display: flex;
3440
- flex-direction: column;
3441
- gap: 16px;
3442
- padding: 16px;
3443
- border-radius: 8px;
3444
- border: 1px solid ${({theme:e})=>{var n,i;return(i=(n=e.stigg)==null?void 0:n.palette)==null?void 0:i.outlinedBorder}};
3445
- background-color: ${({theme:e})=>{var n,i;return(i=(n=e==null?void 0:e.stigg)==null?void 0:n.palette)==null?void 0:i.backgroundPaper}};
3446
- min-height: 90px;
3447
- `;function Sf({currencyId:e,localization:n,decimalPlaces:i,showUnits:r=!0,showSymbol:t=!1}){const a=Qn(Qe),s=q({optional:!0}),c=s==null?void 0:s.theme,{title:l,remaining:u}=I(I({},oo),n),d=o.jsx(Ef,{className:"stigg-credit-utilization-container",children:o.jsxs(Pf,{className:"stigg-credit-utilization-card",children:[o.jsx(C,{variant:"h6",color:"primary",className:"stigg-credit-utilization-title",children:l}),o.jsx(bf,{currencyId:e,decimalPlaces:i,showUnits:r,showSymbol:t,remainingLabel:u})]})});return a?d:o.jsx($e,{componentTheme:c,children:d})}function uo(e){const n=q(),i=n==null?void 0:n.stigg,r=n==null?void 0:n.updatedAt,t=D.useCallback(()=>B(null,null,function*(){if(!i||!i.isCustomerLoaded)return null;try{return i.getCreditGrants({currencyId:e.currencyId})}catch(l){throw console.error("Error fetching credit grants:",l),l}}),[i,e.currencyId,r]),{data:a,error:s,isLoading:c}=Je({func:t});return D.useMemo(()=>({creditGrants:(a==null?void 0:a.data)||[],isLoading:c,error:s}),[a,s,c])}function Df({skeletonRows:e,visibleHeadCells:n,hideLastRowBorder:i}){return o.jsx(o.Fragment,{children:Array.from({length:e}).map((r,t)=>o.jsx(K.TableRow,{children:n.map(a=>o.jsx(oi,{$alignment:a.alignment,$width:a.width,$maxWidth:a.maxWidth,$minWidth:a.minWidth,$isLastRow:t===e-1,$hideLastRowBorder:i,children:o.jsx(H,{width:a.width?parseInt(a.width.replace("px",""))-40:100,height:20})},String(a.id)))},t))})}function vf({data:e,visibleHeadCells:n,onRowClick:i,hideLastRowBorder:r}){return o.jsx(o.Fragment,{children:e.map((t,a)=>o.jsx(Af,{$clickable:!!i,onClick:()=>i&&i(t),children:n.map(s=>o.jsx(oi,{$alignment:s.alignment,$width:s.width,$maxWidth:s.maxWidth,$minWidth:s.minWidth,$isLastRow:a===e.length-1,$hideLastRowBorder:r,onClick:s.disableClick?c=>c.stopPropagation():void 0,children:o.jsx(kf,{$alignment:s.alignment,children:s.render(t)})},String(s.id)))},a))})}function mo({errorMessage:e,className:n}){return e===void 0||typeof e=="string"?o.jsx(C,{variant:"body1",color:"error",className:n,children:e||"An error occurred"}):o.jsx(o.Fragment,{children:e})}function go({message:e,className:n}){return e===void 0||typeof e=="string"?o.jsx(C,{variant:"body1",color:"secondary",className:n,children:e||"No data available"}):o.jsx(o.Fragment,{children:e})}const xf=h(K.TableContainer)`
3448
- border-radius: 8px;
3449
- border: 1px solid ${({theme:e})=>e.stigg.palette.outlinedBorder};
3450
- background-color: ${({theme:e})=>e.stigg.palette.backgroundPaper};
3451
- min-width: 100%;
3452
- overflow-x: auto;
3453
-
3454
- ${({$hasMinHeight:e})=>e&&`
3455
- min-height: 160px;
3456
- display: flex;
3457
- align-items: center;
3458
- justify-content: center;
3459
- `}
3460
- `,If=h(K.Table)`
3461
- min-width: 600px;
3462
- table-layout: auto;
3463
- width: 100%;
3464
- `,oi=h(K.TableCell)`
3465
- padding: 8px 12px;
3466
- border-bottom: 1px solid ${({theme:e})=>e.stigg.palette.outlinedBorder};
3467
- text-align: ${({$alignment:e})=>e||"left"};
3468
- white-space: nowrap;
3469
- overflow: hidden;
3470
- text-overflow: ellipsis;
3471
-
3472
- ${({$width:e})=>e&&`width: ${e};`}
3473
- ${({$maxWidth:e})=>e&&`max-width: ${e};`}
3474
- ${({$minWidth:e})=>e&&`min-width: ${e};`}
3475
-
3476
- ${({$isLastRow:e,$hideLastRowBorder:n})=>e&&n&&"border-bottom: none;"}
3477
- `,Tf=h(oi)`
3478
- background-color: transparent;
3479
- `,Af=h(K.TableRow)`
3480
- ${({$clickable:e,theme:n})=>e&&`
3481
- cursor: pointer;
3482
- &:hover {
3483
- background-color: ${n.stigg.palette.backgroundHighlight};
3484
- }
3485
- `}
3486
- `,kf=h.div`
3487
- display: flex;
3488
- align-items: center;
3489
- justify-content: ${({$alignment:e})=>{switch(e){case"center":return"center";case"right":return"flex-end";default:return"flex-start"}}};
3490
- width: 100%;
3491
- `;function Nf({visibleHeadCells:e}){return o.jsx(K.TableHead,{children:o.jsx(K.TableRow,{children:e.map(n=>o.jsx(Tf,{$alignment:n.alignment,$width:n.width,$maxWidth:n.maxWidth,$minWidth:n.minWidth,children:o.jsx(C,{variant:"caption",children:n.label})},String(n.id)))})})}function po({data:e,headCells:n,isLoading:i=!1,error:r=null,emptyMessage:t,errorMessage:a,onRowClick:s,className:c,skeletonRows:l=3,hideLastRowBorder:u=!0}){const d=n.filter(m=>m.visible!==!1),p=!!r||!i&&e.length===0;return o.jsx(xf,{className:c,$hasMinHeight:p,children:r?o.jsx(mo,{errorMessage:a,className:`${c}-error`}):!i&&e.length===0?o.jsx(go,{message:t,className:`${c}-empty`}):o.jsxs(If,{children:[o.jsx(Nf,{visibleHeadCells:d}),o.jsx(K.TableBody,{children:i?o.jsx(Df,{skeletonRows:l,visibleHeadCells:d,hideLastRowBorder:u}):o.jsx(vf,{data:e,visibleHeadCells:d,onRowClick:s,hideLastRowBorder:u})})]})})}const wf=h(K.Chip)`
3492
- font-size: 0.75rem;
3493
- height: 24px;
3494
- border-radius: 4px;
3495
- border: none;
3496
- background-color: ${({theme:e,$variant:n})=>{var i,r,t,a;return(a=(t=(r=(i=e==null?void 0:e.stigg)==null?void 0:i.palette)==null?void 0:r.statusChips)==null?void 0:t[n])==null?void 0:a.background}};
3497
- color: ${({theme:e,$variant:n})=>{var i,r,t,a;return(a=(t=(r=(i=e==null?void 0:e.stigg)==null?void 0:i.palette)==null?void 0:r.statusChips)==null?void 0:t[n])==null?void 0:a.text}};
3498
- `;function fo(a){var s=a,{variant:e,label:n,className:i,size:r="small"}=s,t=se(s,["variant","label","className","size"]);return o.jsx(wf,I({label:n,size:r,$variant:e,className:i},t))}var Ue=(e=>(e.SCHEDULED="SCHEDULED",e.AVAILABLE="AVAILABLE",e.EXPIRED="EXPIRED",e))(Ue||{});function Ff(e){const n=oe(),i=oe(e.effectiveAt),r=e.expireAt?oe(e.expireAt):null;return i.isAfter(n)?Ue.SCHEDULED:r&&r.isBefore(n)?Ue.EXPIRED:Ue.AVAILABLE}function jf(e,n){return console.log("decimalPlaces",n),`${ot(e.consumedAmount,n)} / ${e.amount}`}function ho(e){return oe(e).format("MMM D, YYYY h:mmA")}function yo(e){return oe(e).format("MMM D, YYYY")}const Co=e=>{switch(e){case Ue.AVAILABLE:return"success";case Ue.SCHEDULED:return"warning";case Ue.EXPIRED:return"error";default:return"neutral"}},Rf=e=>{switch(e){case b.CreditGrantType.Promotional:return"Promotional";case b.CreditGrantType.Paid:return"Top-up"}};function Mf({creditGrants:e,isLoading:n,error:i,localization:r,decimalPlaces:t}){const a=e.map(c=>_(I({},c),{status:Ff(c)})),s=[{id:"effectiveAt",label:r.receivedAt,width:"205px",render:({effectiveAt:c})=>o.jsx(C,{variant:"body1",className:"stigg-credit-grants-effective-date",children:ho(c)})},{id:"grantType",label:r.grantType,width:"205px",render:({grantType:c})=>o.jsx(C,{variant:"body1",className:"stigg-credit-grants-grant-type",children:Rf(c)})},{id:"status",label:r.status,width:"205px",render:({status:c})=>{const l=ee.capitalize(c),u=Co(c);return o.jsx(fo,{label:l,variant:u,className:"stigg-credit-grants-status-chip"})}},{id:"amount",label:r.balance,width:"205px",render:c=>o.jsx(C,{variant:"body1",className:"stigg-credit-grants-balance",children:jf(c,t)})},{id:"expireAt",label:r.expiryDate,width:"205px",render:({expireAt:c})=>o.jsx(C,{variant:"body1",className:"stigg-credit-grants-expiry-date",children:c?yo(c):"-"})}];return o.jsx(po,{data:a,headCells:s,isLoading:n,error:i,emptyMessage:r.emptyState,loadingMessage:r.loadingState,errorMessage:r.errorState,className:"stigg-credit-grants-table",skeletonRows:3})}const Uf=h.div`
3499
- display: flex;
3500
- flex-direction: column;
3501
- gap: 8px;
3502
- `,Of=h.div`
3503
- display: flex;
3504
- flex-direction: column;
3505
- gap: 16px;
3506
- `;function Lf({currencyId:e,localization:n,decimalPlaces:i}){const r=q({optional:!0}),t=r==null?void 0:r.stigg,a=r==null?void 0:r.theme,s=I(I({},vp),n),{creditGrants:c,isLoading:l,error:u}=uo({currencyId:e});return o.jsx($e,{componentTheme:a,children:o.jsxs(Uf,{className:"stigg-credit-grants-container",children:[o.jsx(Of,{className:"stigg-credit-grants-card",children:o.jsx(Mf,{creditGrants:c,isLoading:l,error:u,localization:s,decimalPlaces:i})}),o.jsx(Ke,{source:"grant_list",align:"end",smallScreenAlign:"end",style:{marginTop:0},showWatermark:t==null?void 0:t.getShowWatermark()})]})})}exports.AddonsList=sa;exports.BooleanEntitlementGuard=hp;exports.Checkout=gp;exports.CreditBalance=Ap;exports.CreditGrants=Lf;exports.CreditUsageChart=uf;exports.CreditUtilization=Sf;exports.CustomerPortal=Td;exports.CustomerPortalProvider=oa;exports.CustomerUsageData=ba;exports.EmptyState=go;exports.EnumEntitlementGuard=bp;exports.ErrorState=mo;exports.GenericTable=po;exports.InvoicesSection=Ea;exports.MeteredEntitlementGuard=Cp;exports.NumericEntitlementGuard=yp;exports.PaymentDetailsSection=ya;exports.Paywall=vu;exports.Promotions=ca;exports.ProvisionStatus=ro;exports.StatusChip=fo;exports.StiggContext=Jt;exports.StiggProvider=du;exports.SubscribeIntentionType=ye;exports.SubscriptionsOverview=pa;exports.formatDateOnly=yo;exports.formatDateTime=ho;exports.mapCreditGrantStatusToVariant=Co;exports.useActiveSubscriptions=Fg;exports.useBooleanEntitlement=Wa;exports.useCreditBalance=ai;exports.useCreditGrants=uo;exports.useCreditUsage=so;exports.useCustomerPortal=Rg;exports.useEnumEntitlement=za;exports.useMeteredEntitlement=Za;exports.useNumericEntitlement=Ya;exports.usePaywall=jg;exports.useStiggContext=q;exports.useWaitForCheckoutCompleted=fp;Object.keys(b).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>b[e]})});