@stigg/react-sdk 6.1.0 → 6.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@stigg/js-client-sdk"),n=e(t),r=require("react"),i=e(r),a=e(require("@emotion/styled/base")),o=e(require("classnames")),l=e(require("@mui/material/Grid")),c=require("styled-typography"),u=require("@emotion/react"),s=require("lodash"),d=e(require("react-spinners/ClipLoader")),p=e(require("color")),m=e(require("lodash/merge")),g=e(require("moment")),h=e(require("lodash/isNil")),f=e(require("currency-symbol-map")),y=e(require("@mui/material/InputAdornment")),v=require("@mui/material/Button"),b=e(v),x=e(require("@emotion/styled")),E=e(require("@mui/material/TextField")),k=e(require("@mui/material/Divider")),w=require("react-loading-skeleton"),P=e(w),C=e(require("@mui/material/OutlinedInput")),S=e(require("@mui/material/Select")),T=e(require("@mui/material/MenuItem")),M=e(require("react-switch")),A=e(require("lodash/sortBy")),B=require("styled-components"),L=e(B),N=require("@mui/material/styles"),U=e(require("lodash/flatMap")),I=e(require("@mui/material/Box")),F=e(require("@mui/material/Tab")),O=e(require("lodash/isEmpty")),D=e(require("@mui/material/Tabs")),j=require("@mui/material"),W=require("react-feather"),R=e(require("@mui/material/Link")),q=require("@mui/material/Tooltip"),_=e(q),z=require("@mui/material/LinearProgress"),H=e(z),V=e(require("lodash/isUndefined")),$=e(require("lodash/lowerCase")),Z=require("immer"),G=e(require("lodash/cloneDeep")),Y=e(require("lodash/remove")),Q=e(require("lodash/keyBy")),K=e(require("lodash/compact")),X=require("@stigg/api-client-js/src/generated/sdk"),J=require("@stripe/react-stripe-js"),ee=e(require("@mui/material/StepIcon")),te=e(require("lodash/partition")),ne=e(require("@mui/material/CircularProgress")),re=e(require("@mui/material/Paper")),ie=require("@stripe/stripe-js"),ae=e(require("react-lottie")),oe=e(require("@mui/material/Collapse")),le=e(require("@mui/material/Alert")),ce=e(require("@mui/material/Radio"));function ue(e,t,n,r,i,a,o){try{var l=e[a](o),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,i)}function se(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){ue(a,r,i,o,l,"next",e)}function l(e){ue(a,r,i,o,l,"throw",e)}o(void 0)}))}}function de(){return(de=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function pe(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}function me(e,t){return t||(t=e.slice(0)),e.raw=t,e}function ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function he(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ge(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ge(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function fe(e,t,n){var r=n?" "+n:"";return e&&1!==e||!t?e&&e>1&&t?e+"-"+t+r:e&&e>1?"Minimum "+e+r:"":"Up to "+t+r}function ye(e){return null==e?void 0:e.toLocaleString("en-US",{maximumFractionDigits:0})}require("@mui/material/Chip");var ve=["children","span","style","fontWeight","variant","color","overrideColor","bold","as"];function be(e,t){switch(t){case"white":return"white";case"primary.main":return e.stigg.palette.primary;case"primary.main.light":return e.stigg.palette.primaryLight;case"warning":return e.stigg.palette.warning;case"error":return e.stigg.palette.error;default:return e.stigg.palette.text[t]}}var xe=a(c.Text,{target:"ewjez2x0"})("margin:0;",(function(e){return e.$span&&"display: inline"}),";");function Ee(e){switch(e){case"bold":return c.FontWeight.Bold;case"normal":default:return c.FontWeight.Normal}}function ke(e,t){var n=e.stigg.typography;switch(t){case"h1":return Ee(n.h1.fontWeight);case"h3":return Ee(n.h2.fontWeight);case"h6":return Ee(n.h3.fontWeight);case"body1":return Ee(n.body.fontWeight);case"caption":return Ee(n.caption.fontWeight);default:return c.FontWeight.Normal}}var we,Pe,Ce,Se,Te,Me,Ae,Be,Le,Ne,Ue,Ie,Fe,Oe,De=r.forwardRef((function(e,t){var n=e.children,r=e.span,a=e.style,o=e.fontWeight,l=e.variant,s=void 0===l?"body1":l,d=e.color,p=void 0===d?"primary":d,m=e.overrideColor,g=e.bold,h=e.as,f=void 0===h?"p":h,y=pe(e,ve),v=u.useTheme(),b=function(e){switch(e){case"h1":return 1;case"h3":return 2;case"h6":return 3;case"body1":return 4;case"caption":return 5;default:return 3}}(s),x="typography-level-"+b;return i.createElement(xe,Object.assign({as:f,ref:t},y,{className:e.className?e.className+" "+x:x,style:a,level:b,color:m||be(v,p),fontWeight:null!=o?o:g?c.FontWeight.Bold:ke(v,s),$span:r}),n)})),je=function(e,t){switch(e){case"primary":return t.stigg.palette.text.primary;case"secondary":return t.stigg.palette.text.secondary;default:return e}};function We(){return(We=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Re(){return(Re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function qe(){return(qe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _e(){return(_e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ze(){return(ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function He(){return(He=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ve,$e,Ze,Ge=function(e){return r.createElement("svg",He({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Oe||(Oe=r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.954 1.034A1 1 0 0 1 6.3 2.287a5.666 5.666 0 1 0 7.367 5.406 1 1 0 0 1 2 0c0 .23-.01.458-.03.684.01.072.012.147.006.223l-.004.049a1 1 0 0 1-.078.312A7.668 7.668 0 1 1 5.7.38a1 1 0 0 1 1.254.654Zm.614.239A1 1 0 0 1 8.648.36l.05.004a1 1 0 1 1-.182 1.992l-.037-.003a1 1 0 0 1-.911-1.081Zm4.85 1.636a1 1 0 0 1 1.41.11l.064.076a1 1 0 1 1-1.537 1.28 4.154 4.154 0 0 0-.047-.056 1 1 0 0 1 .11-1.41ZM9 5.334a1 1 0 0 0-2 0V8a1 1 0 0 0 1 1h2.667a1 1 0 1 0 0-2H9V5.334Z",fill:"#7586B0"})))};function Ye(){return(Ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Qe(){return(Qe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ke,Xe,Je,et,tt,nt,rt,it,at,ot,lt,ct,ut,st,dt,pt,mt,gt,ht,ft,yt,vt,bt,xt,Et,kt,wt,Pt=function(e){return r.createElement("svg",Qe({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ze||(Ze=r.createElement("path",{d:"M10.833 2.5a7.5 7.5 0 0 0-7.5 7.5h-2.5l3.242 3.242.058.116L7.5 10H5a5.829 5.829 0 0 1 5.833-5.833A5.83 5.83 0 0 1 16.667 10a5.83 5.83 0 0 1-5.834 5.833 5.786 5.786 0 0 1-4.116-1.716L5.533 15.3a7.462 7.462 0 0 0 5.3 2.2 7.5 7.5 0 0 0 0-15ZM10 6.667v4.166l3.567 2.117.6-1.008-2.917-1.734V6.667H10Z",fill:"#6678A7"})))};function Ct(){return(Ct=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function St(){return(St=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Tt(){return(Tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Mt(){return(Mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function At(){return(At=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Bt(){return(Bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Lt(){return(Lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Nt(){return(Nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ut(){return(Ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function It(){return(It=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ft(){return(Ft=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ot(){return(Ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Dt(){return(Dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function jt(){return(jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Wt(){return(Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Rt(){return(Rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var qt,_t,zt,Ht={__proto__:null,Addons:function(e){return r.createElement("svg",We({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),we||(we=r.createElement("g",{clipPath:"url(#addons_svg__a)",stroke:"#7586B0",strokeWidth:1.714,strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M12 6.857v10.286M6.857 12h10.286M18 .857H6A5.143 5.143 0 0 0 .857 6v12A5.143 5.143 0 0 0 6 23.143h12A5.143 5.143 0 0 0 23.143 18V6A5.143 5.143 0 0 0 18 .857Z"}))),Pe||(Pe=r.createElement("defs",null,r.createElement("clipPath",{id:"addons_svg__a"},r.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))))},BillingInfoCustomer:function(e){return r.createElement("svg",Re({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ce||(Ce=r.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),Se||(Se=r.createElement("path",{d:"M26 27v-2a4 4 0 0 0-4-4h-8a4 4 0 0 0-4 4v2",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Te||(Te=r.createElement("path",{clipRule:"evenodd",d:"M18 17a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},ContactSupport:function(e){return r.createElement("svg",qe({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Me||(Me=r.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),Ae||(Ae=r.createElement("path",{d:"M27 18.22C27 12.73 22.74 9 18 9c-4.69 0-9 3.65-9 9.28-.6.34-1 .98-1 1.72v2c0 1.1.9 2 2 2h1v-6.1c0-3.87 3.13-7 7-7s7 3.13 7 7V25h-8v2h8c1.1 0 2-.9 2-2v-1.22c.59-.31 1-.92 1-1.64v-2.3c0-.7-.41-1.31-1-1.62Z",fill:"#7586B0"})),Be||(Be=r.createElement("path",{d:"M15 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM21 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",fill:"#7586B0"})),Le||(Le=r.createElement("path",{d:"M24 17.03A6.04 6.04 0 0 0 18.05 12c-3.03 0-6.29 2.51-6.03 6.45a8.075 8.075 0 0 0 4.86-5.89c1.31 2.63 4 4.44 7.12 4.47Z",fill:"#7586B0"})))},CreditCard:function(e){return r.createElement("svg",_e({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ne||(Ne=r.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),Ue||(Ue=r.createElement("path",{d:"M26 10H10c-1.11 0-1.99.89-1.99 2L8 24c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V12c0-1.11-.89-2-2-2Zm0 14H10v-6h16v6Zm0-10H10v-2h16v2Z",fill:"#7586B0"})))},DollarCoin:function(e){return r.createElement("svg",ze({width:21,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ie||(Ie=r.createElement("g",{clipPath:"url(#dollar-coin_svg__a)",stroke:"#7586B0",strokeWidth:1.714,strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M10.334 19.286A9.286 9.286 0 1 0 1.048 10a9.286 9.286 0 0 0 9.286 9.286Z"}),r.createElement("path",{d:"M12.765 7.46a1.903 1.903 0 0 0-1.796-1.27H9.494a1.7 1.7 0 0 0-.363 3.362l2.245.49a1.905 1.905 0 0 1-.407 3.768h-1.27c-.83 0-1.535-.53-1.797-1.27M10.334 6.19V4.287M10.334 15.714V13.81"}))),Fe||(Fe=r.createElement("defs",null,r.createElement("clipPath",{id:"dollar-coin_svg__a"},r.createElement("path",{fill:"#fff",transform:"translate(.333)",d:"M0 0h20v20H0z"})))))},MiniSchedule:Ge,Promotions:function(e){return r.createElement("svg",Ye({width:24,height:25,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ve||(Ve=r.createElement("g",{clipPath:"url(#promotions_svg__a)",stroke:"#7586B0",strokeWidth:1.714,strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M21.429 5.325H2.57c-.946 0-1.714.767-1.714 1.714v3.429c0 .947.768 1.714 1.714 1.714H21.43c.946 0 1.714-.768 1.714-1.714V7.039c0-.947-.768-1.714-1.714-1.714ZM21.429 12.182v9.429a1.714 1.714 0 0 1-1.715 1.714H4.286a1.714 1.714 0 0 1-1.714-1.714v-9.429M12 5.325v18M17.143 1.04 12 5.324 6.857 1.039"}))),$e||($e=r.createElement("defs",null,r.createElement("clipPath",{id:"promotions_svg__a"},r.createElement("path",{fill:"#fff",transform:"translate(0 .182)",d:"M0 0h24v24H0z"})))))},Restore:Pt,ScheduleBox:function(e){return r.createElement("svg",Ct({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ke||(Ke=r.createElement("rect",{width:36,height:36,rx:10,fill:"url(#schedule-box_svg__a)"})),Xe||(Xe=r.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),Je||(Je=r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.954 7.7a1 1 0 0 1-.654 1.254 8.998 8.998 0 0 0-1.543 16.523A9 9 0 0 0 27 17.54a1 1 0 1 1 2 0c0 .357-.017.713-.052 1.066.018.089.024.182.017.278l-.004.047a.997.997 0 0 1-.101.361A11 11 0 1 1 14.7 7.046a1 1 0 0 1 1.254.654Zm1.896.252a1 1 0 0 1 1.08-.912l.048.004a1 1 0 1 1-.178 1.992l-.038-.003a1 1 0 0 1-.912-1.081ZM22.858 9.2a1 1 0 0 1 1.391-.254l.078.054a1 1 0 1 1-1.152 1.635 8.98 8.98 0 0 0-.063-.044 1 1 0 0 1-.254-1.391Zm3.748 3.609a1 1 0 0 1 1.332.473l.04.085a1 1 0 1 1-1.813.844l-.014-.031-.019-.039a1 1 0 0 1 .474-1.332ZM19 14a1 1 0 1 0-2 0v4a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-3Z",fill:"#7586B0"})),et||(et=r.createElement("defs",null,r.createElement("linearGradient",{id:"schedule-box_svg__a",x1:35.02,y1:1.224,x2:0,y2:36,gradientUnits:"userSpaceOnUse"}))))},ScheduleClock:function(e){return r.createElement("svg",St({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),tt||(tt=r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.954 1.7A1 1 0 0 1 9.3 2.954a8.998 8.998 0 0 0-5.615 12.03A9 9 0 0 0 21 11.54a1 1 0 1 1 2 0c0 .357-.017.713-.052 1.066.018.089.024.182.017.278l-.004.047a.997.997 0 0 1-.101.361A11 11 0 1 1 8.7 1.046a1 1 0 0 1 1.254.654Zm1.896.252a1 1 0 0 1 1.08-.912l.048.004a1 1 0 1 1-.178 1.992l-.039-.003a1 1 0 0 1-.911-1.081ZM16.858 3.2a1 1 0 0 1 1.391-.254l.078.054a1 1 0 1 1-1.152 1.635 9.7 9.7 0 0 0-.063-.044 1 1 0 0 1-.254-1.391Zm3.748 3.608a1 1 0 0 1 1.332.474l.04.085a1 1 0 1 1-1.813.844l-.014-.031-.019-.039a1 1 0 0 1 .474-1.333ZM13 8a1 1 0 1 0-2 0v4a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3V8Z",fill:"#7586B0"})))},RenewSubscription:function(e){return r.createElement("svg",Tt({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),nt||(nt=r.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),rt||(rt=r.createElement("path",{clipRule:"evenodd",d:"M9 12a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H11a2 2 0 0 1-2-2V12Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),it||(it=r.createElement("path",{d:"M22 8v4M14 8v4M9 16h18",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},Trash:function(e){return r.createElement("svg",Mt({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),at||(at=r.createElement("path",{d:"M3 6h18",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),ot||(ot=r.createElement("path",{d:"M20 6a1 1 0 1 0-2 0h2ZM6 6a1 1 0 0 0-2 0h2Zm1 0a1 1 0 0 0 2 0H7Zm8 0a1 1 0 1 0 2 0h-2Zm3 0v14h2V6h-2Zm0 14a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2Zm-1 1H7v2h10v-2ZM7 21a1 1 0 0 1-1-1H4a3 3 0 0 0 3 3v-2Zm-1-1V6H4v14h2ZM9 6V4H7v2h2Zm0-2a1 1 0 0 1 1-1V1a3 3 0 0 0-3 3h2Zm1-1h4V1h-4v2Zm4 0a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3v2Zm1 1v2h2V4h-2Z",fill:"#F88078"})),lt||(lt=r.createElement("path",{d:"M10 11v6M14 11v6",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},PaymentMethod:function(e){return r.createElement("svg",At({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ct||(ct=r.createElement("path",{d:"M21.167 4H2.833C1.821 4 1 4.895 1 6v12c0 1.105.82 2 1.833 2h18.334C22.179 20 23 19.105 23 18V6c0-1.105-.82-2-1.833-2Z",fill:"#C6C6C7"})),ut||(ut=r.createElement("path",{opacity:.3,d:"M19.75 16.429H17.5c-.488 0-.75-.229-.75-.762 0-.534.262-.762.75-.762h2.25c.488 0 .75.228.75.762 0 .533-.262.762-.75.762Zm-4.5 0H13c-.488 0-.75-.229-.75-.762 0-.534.262-.762.75-.762h2.25c.488 0 .75.228.75.762 0 .533-.262.762-.75.762Zm-4.5 0H8.5c-.488 0-.75-.229-.75-.762 0-.534.262-.762.75-.762h2.25c.488 0 .75.228.75.762 0 .533-.262.762-.75.762Zm-4.5 0H4c-.487 0-.75-.229-.75-.762 0-.534.263-.762.75-.762h2.25c.487 0 .75.228.75.762 0 .533-.263.762-.75.762Z",fill:"#000"})))},OutlinedCircle:function(e){return r.createElement("svg",Bt({width:21,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),st||(st=r.createElement("circle",{cx:10.333,cy:10,r:9,fill:"#fff",stroke:"#327EEE",strokeWidth:2})))},OutlinedCheckedCircle:function(e){return r.createElement("svg",Lt({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),dt||(dt=r.createElement("circle",{cx:10,cy:10,r:9.25,fill:"#327EEE",stroke:"#327EEE",strokeWidth:1.5})),pt||(pt=r.createElement("path",{d:"M5 10.364 8.637 14l4-4 2-2",stroke:"#fff",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},OutlinedCheckedCircleDisabled:function(e){return r.createElement("svg",Nt({width:21,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),mt||(mt=r.createElement("circle",{cx:10.667,cy:10,r:9.25,fill:"#B3BCD3",stroke:"#B3BCD3",strokeWidth:1.5})),gt||(gt=r.createElement("path",{d:"M5.667 10.364 9.304 14l4-4 2-2",stroke:"#fff",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},ArrowForward:function(e){return r.createElement("svg",Ut({width:18,height:18,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ht||(ht=r.createElement("path",{d:"M9 3 7.942 4.058l4.185 4.192H3v1.5h9.127l-4.185 4.193L9 15l6-6-6-6Z",fill:"#fff"})))},Close:function(e){return r.createElement("svg",It({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ft||(ft=r.createElement("path",{d:"m15.834 5.342-1.175-1.175L10 8.825 5.342 4.167 4.167 5.342 8.825 10 4.167 14.66l1.175 1.175L10 11.175l4.659 4.659 1.175-1.175L11.175 10l4.659-4.658Z",fill:"#327EEE"})))},Check:function(e){return r.createElement("svg",Ft({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),yt||(yt=r.createElement("path",{d:"M20 7 9 18l-5-5",stroke:"#F5F6F9",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},PayAsYouGoCharge:function(e){return r.createElement("svg",Ot({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),vt||(vt=r.createElement("g",{clipPath:"url(#pay-as-you-go-charge_svg__a)",stroke:"#7586B0",strokeWidth:1.714,strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M11.429 7.426 8 13.14M14.857 13.141a7.428 7.428 0 1 0-13.714 0h13.714Z"}))),bt||(bt=r.createElement("defs",null,r.createElement("clipPath",{id:"pay-as-you-go-charge_svg__a"},r.createElement("path",{fill:"#fff",d:"M0 0h16v16H0z"})))))},Coupon:function(e){return r.createElement("svg",Dt({width:16,height:16,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),xt||(xt=r.createElement("g",{stroke:"#327EEE",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"m1.27 11.943 4.787 4.787a.923.923 0 0 0 1.305 0l9.501-9.501A.443.443 0 0 0 17 6.872l-.727-4.714a.455.455 0 0 0-.43-.43l-4.714-.726a.443.443 0 0 0-.357.135L1.27 10.638a.923.923 0 0 0 0 1.305Z"}),r.createElement("path",{d:"M12.555 6.059a.615.615 0 1 1 0-1.23.615.615 0 0 1 0 1.23Z"}))))},Add:function(e){return r.createElement("svg",jt({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Et||(Et=r.createElement("path",{d:"M12 3v18m-9-9.055h18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},Remove:function(e){return r.createElement("svg",Wt({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),kt||(kt=r.createElement("path",{d:"M3 12h18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},EntitlementCheck:function(e){return r.createElement("svg",Rt({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),wt||(wt=r.createElement("path",{d:"m3 11.143 6.716 6.716a.2.2 0 0 0 .283 0L21.857 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})))}},Vt=a("div",{target:"e1ds7xyn0"})((function(e){var t=e.$pathColor;return t&&u.css(qt||(qt=me(["\n path {\n fill: ",";\n }\n "])),t)})," ",(function(e){var t=e.$rectColor;return t&&u.css(_t||(_t=me(["\n svg rect {\n fill: ",";\n }\n "])),t)})," ",(function(e){var t=e.$strokeColor;return t&&u.css(zt||(zt=me(["\n g {\n stroke: ",";\n }\n "])),t)}),";");function $t(e){var t=e.className,n=e.style,r=e.svgPathColor,a=e.svgRectColor,o=e.svgStrokeColor,l=Ht[e.icon],c=u.useTheme();return i.createElement(Vt,{className:t,style:n,$pathColor:je(r,c),$rectColor:je(a,c),$strokeColor:je(o,c)},i.createElement(l,null))}var Zt=["displayNameOverride"],Gt=a(De,{target:"e1mddeqb3"})({name:"ti75j2",styles:"margin:0"}),Yt=a("div",{target:"e1mddeqb2"})({name:"1wcglds",styles:"display:flex;align-items:center;gap:16px"}),Qt=a("div",{target:"e1mddeqb1"})({name:"za0kxg",styles:"display:flex;align-items:center;flex-shrink:0"}),Kt=a($t,{target:"e1mddeqb0"})("width:24px;height:24px;color:",(function(e){return e.theme.stigg.palette.primary}),";");function Xt(e){var n,r=e.displayNameOverride,a=pe(e,Zt),o=function(e){var n=e.hasUnlimitedUsage,r=e.feature,i=e.resetPeriod,a=e.usageLimit,o=e.minUnitQuantity,l=e.maxUnitQuantity,c=e.isCustom,u=o||l,s=i&&a?""+function(e){if(!e)return"";switch(e){case t.EntitlementResetPeriod.Day:return"per day";case t.EntitlementResetPeriod.Hour:return"per hour";case t.EntitlementResetPeriod.Week:return"per week";case t.EntitlementResetPeriod.Month:return"per month";case t.EntitlementResetPeriod.Year:return"per year";default:return""}}(i):"";if(n)return"Unlimited "+(null==r?void 0:r.unitsPlural);if(c)return"Custom "+(null==r?void 0:r.unitsPlural);if(a){var d=1===a?null==r?void 0:r.units:null==r?void 0:r.unitsPlural;return ye(a)+" "+d+" "+s}return u?fe(o,l,null==r?void 0:r.unitsPlural):null==r?void 0:r.displayName}(a);return i.createElement(Yt,{className:"stigg-entitlement-row-container stigg-entitlement-"+(null==(n=a.feature)?void 0:n.id)},i.createElement(Qt,null,i.createElement(Kt,{icon:"EntitlementCheck",className:"stigg-entitlement-row-icon"})),i.createElement(Gt,{className:"stigg-entitlement-name",variant:"h6",color:"secondary"},r||o))}var Jt,en=a("div",{target:"e1yz7zcg0"})({name:"budh8k",styles:"display:flex;flex-direction:column;gap:16px"});function tn(e){var n,r=e.plan,a=e.billingPeriod,o=e.paywallLocale,l=((null==(n=r.pricePoints)?void 0:n.filter((function(e){return e.billingPeriod===a})))||[]).filter((function(e){return(null==e?void 0:e.minUnitQuantity)&&(null==e?void 0:e.minUnitQuantity)>1||(null==e?void 0:e.maxUnitQuantity)})).map((function(e){var t;return i.createElement(Xt,{key:"priceUnitEntitlement-"+(null==e||null==(t=e.feature)?void 0:t.displayName),feature:null!=e&&e.feature?de({},e.feature,{id:e.feature.featureId}):null,minUnitQuantity:null==e?void 0:e.minUnitQuantity,maxUnitQuantity:null==e?void 0:e.maxUnitQuantity})})),c=r.entitlements.filter((function(e){return!(e.hiddenFromWidgets||[]).includes(t.WidgetType.Paywall)}));return i.createElement(en,{className:"stigg-plan-entitlements-container"},i.createElement(De,{className:"stigg-plan-entitlements-title",color:"secondary",variant:"h6",bold:!0},function(e,t,n){if(t.entitlementsTitle)return t.entitlementsTitle(e);var r=n?"Includes:":"";return e.basePlan&&(r="Everything in "+e.basePlan.displayName+(n?", plus:":"")),r}(r,o,l.length>0||c.length>0)),l,c.map((function(e){var t;return i.createElement(Xt,{key:null==(t=e.feature)?void 0:t.id,displayNameOverride:e.displayNameOverride,feature:e.feature,resetPeriod:e.resetPeriod,hasUnlimitedUsage:e.hasUnlimitedUsage,usageLimit:e.usageLimit,isCustom:e.isCustom})})))}(Jt=exports.SubscribeIntentionType||(exports.SubscribeIntentionType={})).START_TRIAL="START_TRIAL",Jt.UPGRADE_TRIAL_TO_PAID="UPGRADE_TRIAL_TO_PAID",Jt.REQUEST_CUSTOM_PLAN_ACCESS="REQUEST_CUSTOM_PLAN_ACCESS",Jt.CHANGE_BILLING_PERIOD="CHANGE_BILLING_PERIOD",Jt.CHANGE_UNIT_QUANTITY="CHANGE_UNIT_QUANTITY",Jt.UPGRADE_PLAN="UPGRADE_PLAN",Jt.DOWNGRADE_PLAN="DOWNGRADE_PLAN",Jt.CANCEL_SCHEDULED_UPDATES="CANCEL_SCHEDULED_UPDATES";var nn,rn,an=function(e){return{left:"flex-start",center:"center",right:"flex-end"}[e]},on=function(e){return g.utc(e).format("MMMM Do, yyyy")};function ln(e){var n=e.scheduledUpdate,r=e.subscriptionPrices,a=e.billingPeriodRange,o=e.options,l=void 0===o?{}:o;if(!n)return{};var c=l.withDate,u=l.postfix,d=void 0===u?"":u;switch(n.subscriptionScheduleType){case t.SubscriptionScheduleType.Downgrade:var p,m=c;return h(m)&&null!=a&&a.end&&(m=!g(n.scheduledExecutionTime).isSame(null==a?void 0:a.end,"day")),{line1:i.createElement(i.Fragment,null,"Your subscription will be downgraded to the ",i.createElement("b",null,null==(p=n.targetPackage)?void 0:p.displayName," plan")," ",m?i.createElement(i.Fragment,null,"on ",on(n.scheduledExecutionTime)):d,"."),line2:"Until then you still have access to your current plan."};case t.SubscriptionScheduleType.BillingPeriod:var f;return{line1:i.createElement(i.Fragment,null,"Your billing cycle will change to ",i.createElement("b",null,null==(f=n.scheduleVariables.billingPeriod)?void 0:f.toLocaleLowerCase())," ",c?i.createElement(i.Fragment,null,"on ",on(n.scheduledExecutionTime)):d,".")};case t.SubscriptionScheduleType.UnitAmount:var y=n.scheduleVariables,v=s.compact(s.map(r,"feature")).find((function(e){return e.id===y.featureId}))||{},b=v.featureUnits,x=1===y.newUnitAmount?b:v.featureUnitsPlural;return{line1:i.createElement(i.Fragment,null,"Your subscription will be updated to ",i.createElement("b",null,y.newUnitAmount)," ",x," ",c?i.createElement(i.Fragment,null,"on ",on(n.scheduledExecutionTime)):d,"."),line2:"Until then you still have access to your current "+b+" count."};default:return{}}}function cn(e){return e.feature&&(1!==e.feature.unitQuantity?e.feature.unitsPlural:e.feature.units)||""}function un(e,t){var n=[].concat(e);n.sort((function(e,t){return e.upTo?t.upTo?e.upTo-t.upTo:-1:1}));for(var r,i=he(n);!(r=i()).done;){var a=r.value;if(a.upTo&&t<=a.upTo)return a}return n[n.length-1]}function sn(e,n,r){return n===t.BillingPeriod.Annually&&r?e/12:e}function dn(e,t,n,r){var i=0;return e.unitPrice&&(i+=sn(e.unitPrice.amount,n,r)*t),e.flatPrice&&(i+=sn(e.flatPrice.amount,n,r)),i}function pn(e,t,n,r){for(var i=t,a=0,o=0,l=[];i>0&&o<e.length;){var c=e[o],u=c.upTo;if(h(u))l.push({unitQuantity:i,amount:dn(c,i,n,r)}),i=0;else{var d=Math.min(i,u-a);l.push({unitQuantity:d,amount:dn(c,d,n,r)}),i-=d,a=u}o+=1}var p=s.sum(l.map((function(e){return e.amount})));return{breakdown:l,total:p}}function mn(e,n,r,i){if(!e.tiers)return 0;switch(e.tiersMode){case t.TiersMode.Volume:return dn(un(e.tiers,n),n,r,i);case t.TiersMode.Graduated:return pn(e.tiers,n,r,i).total;default:return 0}}function gn(e){return null==e?void 0:e.some((function(e){return e.unitPrice&&!h(e.upTo)}))}function hn(e){var n=e.plan,r=e.billingPeriod,i=e.currentSubscription,a=e.currentSubscriptionOverride,o=e.selectDefaultTierIndex,l=n.pricePoints.filter((function(e){return e.billingPeriod===r&&e.isTieredPrice}));if(1===l.length){var c=l[0],u=c.feature.featureId,s=o?o({plan:n}):0,d=c.tiers[s],p=gn(c.tiers)?1:d.upTo||1;if(i&&i.plan.id===n.id){var m=i.prices.find((function(e){var n;return e.pricingModel===t.BillingModel.PerUnit&&e.tiersMode&&(null==(n=e.feature)?void 0:n.featureId)===u}));m&&(p=m.feature.unitQuantity||1)}if((null==a?void 0:a.planId)===n.id){var g=a.billableFeatures.find((function(e){return e.featureId===u}));g&&(p=g.quantity)}var h={};return h[u]=p,h}return{}}!function(e){e[e.Lower=-1]="Lower",e[e.Equal=0]="Equal",e[e.Higher=1]="Higher"}(nn||(nn={}));var fn=a(d,{target:"e199qof96"})({name:"1a2afmv",styles:"margin-left:10px"}),yn=a("button",{target:"e199qof95"})("cursor:",(function(e){return e.$disabled?"default":"pointer"}),";padding:8px 12px;background-color:",(function(e){return e.theme.stigg.palette.backgroundButton}),";border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedRestingBorder}),";border-radius:10px;display:flex;align-items:center;justify-content:center;min-height:42px;min-width:120px;",(function(e){return e.$disabled&&u.css(rn||(rn=me(["\n opacity: 0.5;\n "])))})," &:hover{background-color:",(function(e){var t=e.theme;return e.$disabled?t.stigg.palette.backgroundButton:t.stigg.palette.outlinedHoverBackground}),";}"),vn=a(De,{target:"e199qof94"})({name:"h05omw",styles:"margin:0;font-size:15px"}),bn=a(De,{target:"e199qof93"})({name:"1cnls12",styles:"min-height:87px"}),xn=a("button",{target:"e199qof92"})("background:none;border:none;padding:0;color:",(function(e){return e.theme.stigg.palette.text.secondary}),";text-decoration:underline;cursor:pointer;"),En=a(De,{target:"e199qof91"})({name:"1etgg0o",styles:"margin-top:8px;margin-bottom:17px;min-height:20px"}),kn=a("div",{target:"e199qof90"})("display:flex;flex-direction:column;margin-top:4px;align-self:",(function(e){return an(e.theme.stigg.layout.ctaAlignment)}),";width:100%;");function wn(e){var n=e.isNextPlan,a=e.customer,o=e.plan,l=e.billingPeriod,c=e.isCustomerOnTrial,d=e.onPlanSelected,p=e.paywallLocale,m=e.withTrialLeftRow,g=e.currentSubscription,f=e.currentSubscriptionOverride,y=e.perUnitQuantityByFeature,v=u.useTheme(),b=r.useState(!1),x=b[0],E=b[1],k=p.planCTAButton,w=k.currentPlan,P=k.custom,C=k.downgrade,S=k.startTrial,T=k.upgrade,M=k.startNew,A=k.switchToBillingPeriod,B=k.cancelScheduledUpdate,L=s.isFunction(C)?C(o):C,N=s.isFunction(T)?T(o):T,U={title:a?o.isLowerThanCurrentPlan?L:N:M,disabled:!1,intentionType:o.isLowerThanCurrentPlan?exports.SubscribeIntentionType.DOWNGRADE_PLAN:c?exports.SubscribeIntentionType.UPGRADE_TRIAL_TO_PAID:exports.SubscribeIntentionType.UPGRADE_PLAN},I=o.pricingType===t.PricingType.Custom,F=ln({scheduledUpdate:o.scheduledUpdate,options:{withDate:!0}}).line1;if(!o.isTriable||o.isCurrentCustomerPlan||c)if(o.isCurrentCustomerPlan&&!c)if(l===o.currentCustomerPlanBillingPeriod||o.pricingType&&[t.PricingType.Free,t.PricingType.Custom].includes(o.pricingType))switch(function(e){var n=e.perUnitQuantityByFeature,r=e.plan,i=e.currentSubscription,a=e.currentSubscriptionOverride;if(!i)return nn.Equal;var o,l=i.prices.find((function(e){return e.pricingModel===t.BillingModel.PerUnit&&e.tiersMode})),c=r.id===(null==a?void 0:a.planId);if(c&&(l=null!=(o=r.pricePoints.find((function(e){return e.pricingModel===t.BillingModel.PerUnit&&e.tiersMode})))?o:l),!l)return nn.Equal;var u=l.feature,s=u.featureId,d=u.unitQuantity;if(c){var p,m=null==a||null==(p=a.billableFeatures)?void 0:p.find((function(e){return e.featureId===s}));m&&(d=m.quantity)}if(h(d))return nn.Equal;var g=n[s];return g<d?nn.Lower:g>d?nn.Higher:nn.Equal}({perUnitQuantityByFeature:y,plan:o,currentSubscription:g,currentSubscriptionOverride:f})){case nn.Lower:U.intentionType=exports.SubscribeIntentionType.CHANGE_UNIT_QUANTITY,U.title=L;break;case nn.Higher:U.intentionType=exports.SubscribeIntentionType.CHANGE_UNIT_QUANTITY,U.title=N;break;default:U.title=w,U.disabled=!0}else U.title=A(l),U.intentionType=exports.SubscribeIntentionType.CHANGE_BILLING_PERIOD;else I&&(U.title="function"==typeof P?P({plan:o,selectedBillingPeriod:l}):P,U.intentionType=exports.SubscribeIntentionType.REQUEST_CUSTOM_PLAN_ACCESS);else U.title=S(o),U.intentionType=exports.SubscribeIntentionType.START_TRIAL;n&&o.scheduledUpdate&&(U.disabled=!1,U.title=B,U.intentionType=exports.SubscribeIntentionType.CANCEL_SCHEDULED_UPDATES);var O=x||U.disabled;return i.createElement(i.Fragment,null,i.createElement(kn,{className:"stigg-paywall-plan-button-layout"},n&&F?i.createElement(bn,{color:"secondary",variant:"body1",className:"stigg-paywall-schedule-update-text"},F," ",i.createElement(xn,{color:"secondary",onClick:function(){E(!0),Promise.resolve(d(U.intentionType)).finally((function(){return E(!1)}))}},U.title)):i.createElement(i.Fragment,null,i.createElement(yn,{className:"stigg-paywall-plan-button","data-testid":"paywall-card-cta-"+o.displayName,disabled:O,$disabled:O,onClick:function(){E(!0),Promise.resolve(d(U.intentionType)).finally((function(){return E(!1)}))}},i.createElement(vn,{className:"stigg-paywall-plan-button-text",variant:"h6",color:"primary.main"},U.title),x&&i.createElement(fn,{color:v.stigg.palette.text.disabled,loading:!0,size:16})),m?i.createElement(En,{className:"stigg-trial-days-left-text",variant:"h6",color:"secondary"},o.isCurrentCustomerPlan&&o.trialDaysLeft&&i.createElement(i.Fragment,null,i.createElement("b",null,o.trialDaysLeft," days")," left on your free trial")):i.createElement("div",{style:{height:"20px"}}))))}var Pn=function(e){var n=e.amount,r=e.currency,i=e.locale,a=e.maximumFractionDigits,o=void 0===a?5:a,l=e.minimumFractionDigits,c=void 0===l?0:l,u=e.removeTrailingZero,s=(void 0===r?t.Currency.Usd:r).toString(),d=f(s),p=new Intl.NumberFormat(i,de({maximumFractionDigits:o,minimumFractionDigits:c,style:"currency",currency:s,trailingZeroDisplay:u?"stripIfInteger":"auto"},d?{currencyDisplay:"code"}:{})).format(n||0);return d&&(p=p.replace(s,d)),p.replace(/\s/g,"")};function Cn(e,t){return new Intl.NumberFormat((void 0===t?{}:t).locale).format(e)}function Sn(e,n,r,i,a,o){switch(e.pricingType){case t.PricingType.Free:return"function"==typeof r.price.free?r.price.free(e.paywallCurrency):r.price.free;case t.PricingType.Custom:return{price:"function"==typeof r.price.custom?r.price.custom({plan:e,selectedBillingPeriod:n}):r.price.custom};case t.PricingType.Paid:var l,c=e.pricePoints.filter((function(e){return e.billingPeriod===n})),u=null==(l=e.paywallCalculatedPricePoints)?void 0:l.find((function(e){return e.billingPeriod===n}));if(!(null!=c&&c.length||u))return{price:r.price.priceNotSet};var s={planPrices:c,paywallCalculatedPrice:u,selectedBillingPeriod:n,perUnitQuantityByFeature:o||{}};return r.price.paid?r.price.paid(de({},s,{plan:e})):function(e){for(var n,r,i,a=e.planPrices,o=e.selectedBillingPeriod,l=e.locale,c=e.shouldShowMonthlyPriceAmount,u=e.perUnitQuantityByFeature,s=e.paywallCalculatedPrice||a[0],d=s.currency,p=s.amount||0,m=1===a.length,g=o===t.BillingPeriod.Annually&&c?p/12:p,h=e.paywallLocale.price.pricePeriod(c?t.BillingPeriod.Monthly:t.BillingPeriod.Annually),f=h,y=he(a);!(i=y()).done;){var v=i.value;if(v.isTieredPrice&&v.tiers){var b=(null==u?void 0:u[v.feature.featureId])||1;n=v.tiers,r=cn(v),g+=mn(v,b,o,c)}}if(m){var x,E,k,w=a[0],P=w.blockSize&&w.blockSize>1?"for "+Cn(w.blockSize)+" "+((null==(x=w.feature)?void 0:x.unitsPlural)||(null==(E=w.feature)?void 0:E.units)||""):"per "+((null==(k=w.feature)?void 0:k.units)||"");w.pricingModel!==t.BillingModel.PerUnit||w.isTieredPrice?w.pricingModel===t.BillingModel.UsageBased&&(f=""+P):f=P+" "+h}return{price:Pn({amount:g,currency:d,locale:l,minimumFractionDigits:2,removeTrailingZero:!0}),unit:f,tiers:n,tierUnits:r}}(de({},s,{locale:i,shouldShowMonthlyPriceAmount:a,paywallLocale:r}));default:return{price:""}}}var Tn=["variant"],Mn=a(b,{shouldForwardProp:function(e){return!e.startsWith("$")},target:"effv4rq0"})("border-radius:10px;text-transform:none;background-color:",(function(e){var t=e.theme;return e.$success?t.stigg.palette.success:e.$error?t.stigg.palette.error:""}),";&:hover{background-color:",(function(e){var t=e.theme;return e.$success?t.stigg.palette.successDark:e.$error?t.stigg.palette.errorDark:""}),";}"),An=function(e){var t=e.variant,n=void 0===t?"outlined":t,r=pe(e,Tn);return i.createElement(Mn,Object.assign({variant:n},r))},Bn=x(E)((function(e){var t=e.theme;return{"& .MuiOutlinedInput-root":{height:"42px",borderRadius:t.stigg.border.radius,fieldset:{borderColor:t.stigg.palette.outlinedBorder},"&:not(.Mui-focused):hover fieldset":{borderColor:t.stigg.palette.outlinedRestingBorder}},"& .MuiInputBase-input":de({padding:"8px 12px",borderRadius:t.stigg.border.radius,fontFamily:t.stigg.typography.fontFamily,color:t.stigg.palette.text.primary},t.stigg.typography.body),"& .Mui-error":{fontFamily:t.stigg.typography.fontFamily}}})),Ln=a(l,{shouldForwardProp:function(e){return!e.startsWith("$")},target:"e1v7qkry3"})("display:flex;flex-direction:",(function(e){return e.$flexDirection||"row"}),";gap:",(function(e){return e.$gap}),"px;"),Nn=a(Ln,{target:"e1v7qkry2"})({name:"o7lzx8",styles:"span{display:flex;flex:1;}"}),Un=a(l,{target:"e1v7qkry1"})("span{display:flex;flex:",(function(e){return e.flex}),";}"),In=a(P,{target:"e1v7qkry0"})({name:"1u8hqvf",styles:"border-radius:4px"}),Fn=a(l,{target:"e1q84ats0"})({name:"1fttcpj",styles:"display:flex;flex-direction:column"});function On(){return i.createElement(Fn,{container:!0},i.createElement(Ln,{item:!0,$gap:48},i.createElement(In,{width:120,height:20}),i.createElement(In,{width:120,height:20})),i.createElement(k,{className:"stigg-checkout-plan-header-divider",sx:{marginY:2}}),i.createElement(Fn,{item:!0},i.createElement(In,{width:120,height:20}),i.createElement(Nn,{$gap:16,marginTop:3},i.createElement(In,{height:20}),i.createElement(In,{height:20})),i.createElement(Ln,{$gap:130,marginTop:3},i.createElement(Un,{flex:1},i.createElement(In,{height:20})),i.createElement(Un,{flex:3},i.createElement(In,{height:20})))))}var Dn=function(e){return e.target.blur()};function jn(e){var t=e.value,n=e.handleChange;return i.createElement(Bn,{type:"number",onWheel:Dn,fullWidth:!0,sx:{minHeight:"46px",width:e.width},InputProps:{endAdornment:i.createElement(y,{position:"end"},i.createElement(De,{variant:"body1",color:"primary"},e.tierUnits))},value:t,onChange:function(e){var t,r,i=null!=e&&null!=(t=e.target)&&t.value?Number(null==e||null==(r=e.target)?void 0:r.value):null;i&&n(i)}})}var Wn=a(S,{target:"e1v59qar1"})("border-radius:10px;min-height:42px;min-width:120px;&:hover .MuiOutlinedInput-notchedOutline{border-color:",(function(e){return e.theme.stigg.palette.outlinedBorder}),";}"),Rn=a(C,{target:"e1v59qar0"})("& .MuiInputBase-input{padding:10px 12px;}&.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:",(function(e){return e.theme.stigg.palette.primary}),"!important;}");function qn(e){var t=e.componentId,n=e.tierUnits,r=e.tiers,a=e.handleChange;return r?i.createElement(Wn,{value:e.value.toString(),fullWidth:!0,onChange:function(e){var t,n,r=null!=e&&null!=(t=e.target)&&t.value?Number(null==e||null==(n=e.target)?void 0:n.value):null;r&&a(r)},id:t,input:i.createElement(Rn,null),MenuProps:{MenuListProps:{disablePadding:!0},PaperProps:{sx:{marginTop:"4px",borderRadius:"10px"}}}},s.map(r,(function(e){var t;return i.createElement(T,{className:"stigg-price-tier-menu-item-text",key:e.upTo,value:null==(t=e.upTo)?void 0:t.toString()},i.createElement(De,{variant:"body1",color:"primary",style:{lineHeight:"unset"}},ye(e.upTo)," ",n))}))):null}var _n=a(De,{target:"eeq8l4e0"})({name:"1m2htit",styles:"min-height:46px"});function zn(e){return i.createElement(_n,{as:"div",className:"stigg-price-tier-select"},gn(e.tiers)?i.createElement(jn,Object.assign({},e)):i.createElement(qn,Object.assign({},e)))}var Hn=a(De,{target:"e1gsqbi12"})({name:"bfvx8c",styles:"word-break:break-word;width:100%"}),Vn=a(De,{target:"e1gsqbi11"})({name:"1bmnxg7",styles:"white-space:nowrap"}),$n=a(De,{target:"e1gsqbi10"})({name:"nurf5y",styles:"white-space:normal;min-height:39px"});function Zn(e){var t=e.billingPeriod,n=e.hasMonthlyPrice,r=e.hasAnnuallyPrice,a=e.paywallLocale,o="‎";return e.plan.pricePoints.find((function(e){return e.billingPeriod===t}))&&n&&r&&(o=(null==a.price.billingPeriod?void 0:a.price.billingPeriod(t))||", billed "+t.toLowerCase()),i.createElement(De,{span:!0,className:"stigg-price-billing-period-text",variant:"h6",color:"secondary"},o)}var Gn=function(e){var t,n=e.showStartingAt,r=e.withUnitPriceRow,a=e.withStartingAtRow,o=e.withTiersRow,l=e.plan,c=e.billingPeriod,u=e.paywallLocale,s=e.hasMonthlyPrice,d=e.hasAnnuallyPrice,p=e.perUnitQuantityByFeature,m=e.setPerUnitQuantityByFeature,g=Sn(l,c,u,e.locale,s,p),h=g.price,f=g.unit,y=g.tiers,v=g.tierUnits,b=l.pricePoints.find((function(e){return e.billingPeriod===c&&e.isTieredPrice})),x=b?b.feature.featureId:void 0,E=null!=(t=p[x||""])?t:1;return i.createElement(Hn,{as:"div",className:"stigg-price-text"},i.createElement(i.Fragment,null,a&&i.createElement(De,{style:{minHeight:"20px"},className:"stigg-starting-at-text",variant:"body1",color:"secondary"},n?u.price.startingAtCaption:"‎"),i.createElement($n,{className:"stigg-price-point",variant:"h1"},h),r&&i.createElement(De,{as:"div",className:"stigg-price-unit-and-billing-period-text",style:{minHeight:"48px"}},i.createElement(Vn,{className:"stigg-price-unit-text",span:!0,variant:"h6",color:"secondary"},f),i.createElement(Zn,{plan:l,billingPeriod:c,hasAnnuallyPrice:d,hasMonthlyPrice:s,paywallLocale:u})),o?i.createElement(zn,{componentId:l.id+"_"+x+"_tier",tiers:y,tierUnits:v,tiersMode:null==b?void 0:b.tiersMode,handleChange:function(e){x&&m((function(t){var n;return de({},t,((n={})[x]=e,n))}))},value:E}):null))},Yn=a(b,{target:"es1eyot8"})({name:"1j8c8e1",styles:"padding:0px;text-transform:none;margin-left:0px"}),Qn=a(De,{target:"es1eyot7"})({name:"1sdidca",styles:"font-size:14px;font-weight:500"}),Kn=a("div",{target:"es1eyot6"})({name:"1flhffq",styles:"width:100%;gap:10px"}),Xn=a("div",{target:"es1eyot5"})({name:"1j79gdw",styles:"margin-top:10px;overflow:hidden;display:flex;flex-direction:column;gap:4px;width:100%"}),Jn=a("div",{target:"es1eyot4"})({name:"16xmbx6",styles:"display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between;padding:8px 0px;max-height:44px;gap:16px"}),er=a(De,{target:"es1eyot3"})({name:"irnfe6",styles:"overflow:hidden;font-feature-settings:'liga' off,'clig' off;text-overflow:ellipsis;font-family:'DM Sans';letter-spacing:0.15px;white-space:nowrap;min-width:0;flex-shrink:1"}),tr=a($t,{target:"es1eyot2"})("width:24px;height:24px;color:",(function(e){return e.theme.stigg.palette.primary}),";"),nr=a("div",{target:"es1eyot1"})({name:"fxp7t8",styles:"flex:1;min-width:0"}),rr=a("div",{target:"es1eyot0"})({name:"152fk9e",styles:"margin-top:16px;display:flex"});function ir(e){var n=e.addons,a=e.paywallLocale,l=r.useState(!1),c=l[0],u=l[1];if(!n||0===n.length)return null;var s=n.filter((function(e){var n;return!(null!=(n=e.hiddenFromWidgets)&&n.includes(t.WidgetType.Paywall))})),d=c?s:s.slice(0,4);return i.createElement(Kn,{className:"stigg-compatible-addons-container"},i.createElement(De,{className:"stigg-compatible-addons-header",color:"secondary",variant:"body1",bold:!0},a.addonsTitle),i.createElement(Xn,{className:"stigg-compatible-addons-list"},d.map((function(e){return i.createElement(Jn,{key:e.id,className:o("stigg-compatible-addon--"+e.id,"stigg-compatible-addon-item")},i.createElement(tr,{icon:"Add",className:"stigg-compatible-addon-icon"}),i.createElement(nr,{className:"stigg-compatible-addon-content"},i.createElement(er,{variant:"body1",color:"primary",className:"stigg-compatible-addon-name"},e.displayName)))}))),s.length>4&&i.createElement(rr,null,i.createElement(Yn,{variant:"text",onClick:function(){u(!c)}},i.createElement(Qn,{color:"primary.main"},c?"Show less":"Show "+(s.length-4)+" more"))))}var ar=a("div",{target:"eacdu8d9"})("position:relative;background-color:",(function(e){var t=e.theme;return e.$isCurrentPlan?t.stigg.palette.backgroundHighlight:t.stigg.palette.backgroundPaper}),";border:",(function(e){var t=e.theme;return e.$isHighlighted?"3px solid "+t.stigg.palette.primary:"1px solid "+t.stigg.palette.outlinedBorder}),";border-radius:10px;padding:",(function(e){return e.theme.stigg.layout.planPadding}),";display:flex;min-width:",(function(e){return e.theme.stigg.layout.planMinWidth}),";max-width:",(function(e){return e.theme.stigg.layout.planMaxWidth}),";flex-direction:column;align-items:flex-start;justify-content:flex-start;position:relative;"),or=a("div",{target:"eacdu8d8"})("margin-top:",(function(e){return e.$planHasEntitlements?"32px":"0px"}),";"),lr=a(De,{target:"eacdu8d7"})({name:"mpkj0c",styles:"padding-bottom:8px"}),cr=a("div",{target:"eacdu8d6"})("height:2px;width:100%;background-color:",(function(e){return e.theme.stigg.palette.outlinedBorder}),";margin-bottom:40px;"),ur=a(De,{target:"eacdu8d5"})("text-align:",(function(e){return e.theme.stigg.layout.descriptionAlignment}),";min-height:",(function(e){return e.theme.stigg.layout.descriptionMinHeight}),";"),sr=a("div",{target:"eacdu8d4"})("background-color:",(function(e){return e.theme.stigg.palette.primary}),";border-radius:40px;position:absolute;top:-12px;"),dr=a(De,{target:"eacdu8d3"})({name:"a8c38r",styles:"margin:0;padding:2px 8px"}),pr=a("div",{target:"eacdu8d2"})("width:100%;display:flex;flex-direction:column;align-items:",(function(e){return an(e.theme.stigg.layout.headerAlignment)}),";"),mr=a("div",{target:"eacdu8d1"})("position:absolute;top:0;background-color:",(function(e){return e.theme.stigg.palette.outlinedBorder}),";border-radius:0px 0px 10px 10px;padding:3px 12px;"),gr=a(Ge,{target:"eacdu8d0"})("display:flex;height:100%;margin-right:4px;path{fill:",(function(e){return e.theme.stigg.palette.text.primary}),";}");function hr(e){var t=e.text,n=void 0===t?"Next":t;return i.createElement(mr,null,i.createElement(l,{display:"flex",alignItems:"center",gap:1},i.createElement(gr,{$iconsColor:e.iconsColor}),i.createElement(De,{color:"primary",variant:"body1"},n)))}function fr(e){var n,a=e.withUnitPriceRow,l=e.withTiersRow,c=e.withTrialLeftRow,u=e.customer,s=e.plan,d=e.billingPeriod,p=e.isHighlighted,m=e.currentSubscription,g=e.currentSubscriptionOverride,h=e.shouldShowDescriptionSection,f=e.hasMonthlyPrice,y=e.hasAnnuallyPrice,v=e.isCustomerOnTrial,b=e.onPlanSelected,x=e.paywallLocale,E=e.locale,k=e.withStartingAtRow,w=e.isCustomerInCustomPlan,P=e.selectDefaultTierIndex,C=e.hideCompatibleAddons,S=s.isNextPlan&&s.isNextPlan(d),T=s.pricePoints.filter((function(e){return e.billingPeriod===d})),M=null==(n=s.paywallCalculatedPricePoints)?void 0:n.find((function(e){return e.billingPeriod===d})),A=T.length>1&&!(null==M||!M.additionalChargesMayApply),B=!w||s.pricingType===t.PricingType.Custom,L=null;S?L=i.createElement(hr,{text:"Next plan"}):p&&x.highlightChip&&(L=i.createElement(sr,{className:"stigg-highlight-badge"},i.createElement(dr,{className:"stigg-highlight-badge-text",color:"white",bold:!0},x.highlightChip)));var N=r.useState(hn({plan:s,billingPeriod:d,currentSubscription:m,currentSubscriptionOverride:g,selectDefaultTierIndex:P})),U=N[0],I=N[1];return i.createElement(ar,{className:o("stigg-"+s.id,"stigg-plan-offering-container",{"stigg-current-plan":s.isCurrentCustomerPlan}),$isHighlighted:p,$isCurrentPlan:s.isCurrentCustomerPlan},L,i.createElement(pr,{className:"stigg-header-wrapper"},i.createElement(lr,{className:"stigg-plan-header",variant:"h3"},s.displayName),h&&i.createElement(ur,{className:"stigg-plan-description",variant:"h6",color:"secondary"},s.description),i.createElement(Gn,{showStartingAt:A,withUnitPriceRow:a,withStartingAtRow:k,withTiersRow:l,plan:s,billingPeriod:d,paywallLocale:x,locale:E,hasAnnuallyPrice:y,hasMonthlyPrice:f,setPerUnitQuantityByFeature:I,perUnitQuantityByFeature:U}),B?i.createElement(wn,{isNextPlan:S,customer:u,plan:s,currentSubscription:m,currentSubscriptionOverride:g,billingPeriod:d,isCustomerOnTrial:v,onPlanSelected:function(e){var t=Object.keys(U).map((function(e){return{featureId:e,quantity:U[e]}}));return b(e,t)},paywallLocale:x,withTrialLeftRow:c,perUnitQuantityByFeature:U}):i.createElement("div",{style:{height:"66px"}}),i.createElement(cr,{className:"stigg-plan-header-divider"})),i.createElement(tn,{plan:s,billingPeriod:d,paywallLocale:x}),i.createElement(or,{$planHasEntitlements:s.entitlements.length>0,className:"stigg-addons-container"},!C&&s.compatibleAddons&&s.compatibleAddons.length>0&&i.createElement(ir,{addons:s.compatibleAddons,paywallLocale:x})))}var yr,vr=a("div",{target:"esqa6i42"})("height:40px;padding:0 20px;margin-bottom:",(function(e){return e.theme.stigg.layout.switchBottomSpacing}),";border-radius:10px;border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";background-color:",(function(e){return e.theme.stigg.palette.backgroundPaper}),";display:flex;align-items:center;justify-content:center;"),br=a(De,{target:"esqa6i41"})({name:"zvmrfm",styles:"margin:0 8px"}),xr=a(M,{target:"esqa6i40"})("& .react-switch-bg{border:",(function(e){return"1px solid "+e.theme.stigg.palette.switchBorder}),";background:",(function(e){return e.theme.stigg.palette.switchFill}),"!important;}& .react-switch-handle{box-shadow:",(function(e){return e.theme.stigg.shadows.light}),";background:",(function(e){return e.theme.stigg.palette.switchHandle}),"!important;top:0.5px!important;}");function Er(e){return i.createElement(De,{variant:"h6",color:e.disabled?"disabled":"primary",className:"stigg-discount-rate-text"},e.discount,"% off")}function kr(e){var n=e.discountRate,r=e.onBillingPeriodChanged;if(e.availableBillingPeriods.length<=1)return null;var a=e.selectedBillingPeriod===t.BillingPeriod.Monthly;return i.createElement(vr,{className:"stigg-period-picker-container"},i.createElement(br,{variant:"h6",className:"stigg-monthly-period-text",color:a?"primary":"disabled"},"Monthly"),i.createElement(xr,{className:"stigg-period-switch",uncheckedIcon:!1,checkedIcon:!1,height:16,width:33,onChange:function(e){return r(e?t.BillingPeriod.Annually:t.BillingPeriod.Monthly)},checked:!a,borderRadius:10,handleDiameter:19}),i.createElement(br,{variant:"h6",className:"stigg-annual-period-text",color:a?"disabled":"primary"},"Annual"),0!==n&&i.createElement(Er,{discount:n,disabled:a}))}function wr(e,t){var n,r,i,a;if((a=null==(n=e.paywallCalculatedPricePoints)?void 0:n.find((function(e){return e.billingPeriod===t})))||(a=e.pricePoints.find((function(e){return e.billingPeriod===t}))),null==(r=a)||!r.amount){var o=e.pricePoints.find((function(e){return e.isTieredPrice&&e.billingPeriod===t}));if(o)return mn(o,1)}return null==(i=a)?void 0:i.amount}function Pr(){return(Pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Cr=a((function(e){return r.createElement("svg",Pr({width:135,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),yr||(yr=r.createElement("path",{d:"M.099 3.43v9.558h1.057V9.527h2.81c1.983 0 3.323-1.275 3.323-3.049 0-1.773-1.34-3.048-3.324-3.048H.1Zm1.057 5.127v-4.15h2.889c1.289 0 2.143.855 2.143 2.071 0 1.217-.854 2.079-2.143 2.079h-2.89ZM11.779 13.162c2.129 0 3.873-1.622 3.873-3.78 0-2.165-1.715-3.758-3.844-3.758-2.158 0-3.874 1.622-3.874 3.787 0 2.158 1.687 3.75 3.845 3.75Zm.014-.934c-1.556 0-2.773-1.202-2.773-2.832 0-1.629 1.216-2.83 2.773-2.83 1.528 0 2.773 1.201 2.773 2.83 0 1.63-1.245 2.832-2.773 2.832ZM19.905 12.988l1.572-6.046h.029l1.556 6.046h1.34l2.194-7.183h-1.18l-1.622 6.104h-.03l-1.549-6.104h-1.433l-1.55 6.104h-.029l-1.65-6.104h-1.195l2.208 7.183h1.34ZM34.983 9.425c0-2.121-1.578-3.8-3.83-3.8-2.1 0-3.845 1.556-3.845 3.786 0 2.143 1.6 3.75 3.874 3.75 1.586 0 2.875-.767 3.497-1.969l-.897-.485c-.413.898-1.412 1.528-2.585 1.528-1.673 0-2.694-1.246-2.795-2.513h6.567c.014-.13.014-.18.014-.297ZM31.14 6.551c1.404 0 2.527.948 2.715 2.259h-5.423a2.745 2.745 0 0 1 2.708-2.26ZM39.592 5.682c-1.028 0-1.774.521-2.1 1.253l-.101-1.13h-.905v7.183h1.057V8.564c0-1.115.615-1.789 1.774-1.789h.68V5.682h-.405ZM48.249 9.425c0-2.121-1.579-3.8-3.83-3.8-2.1 0-3.845 1.556-3.845 3.786 0 2.143 1.6 3.75 3.873 3.75 1.586 0 2.875-.767 3.497-1.969l-.897-.485c-.413.898-1.412 1.528-2.585 1.528-1.673 0-2.694-1.246-2.795-2.513h6.567c.015-.13.015-.18.015-.297Zm-3.845-2.874c1.404 0 2.527.948 2.715 2.259h-5.423a2.745 2.745 0 0 1 2.708-2.26ZM55.846 7.029c-.63-.89-1.644-1.398-2.831-1.398-2.093 0-3.773 1.586-3.773 3.765 0 2.18 1.651 3.766 3.744 3.766 1.195 0 2.23-.522 2.867-1.42l.145 1.246h.905V2.56l-1.057.116V7.03Zm-2.817 5.199c-1.498 0-2.7-1.188-2.7-2.832 0-1.643 1.202-2.83 2.7-2.83a2.787 2.787 0 0 1 2.817 2.83 2.787 2.787 0 0 1-2.817 2.832ZM65.731 5.631c-1.194 0-2.222.514-2.86 1.412V2.561l-1.057.116v10.31h.905l.145-1.237c.63.898 1.644 1.412 2.838 1.412 2.093 0 3.773-1.586 3.773-3.766 0-2.179-1.651-3.765-3.744-3.765Zm-.043 6.597a2.787 2.787 0 0 1-2.817-2.832 2.787 2.787 0 0 1 2.817-2.83c1.499 0 2.7 1.187 2.7 2.83 0 1.644-1.201 2.832-2.7 2.832ZM76.219 5.805v4.113c0 1.412-.905 2.266-2.172 2.266-1.26 0-1.97-.738-1.97-2.07V5.804H71.02v4.468c0 1.694 1.115 2.824 2.744 2.824 1.079 0 1.926-.42 2.455-1.116v.913c0 1.267-.956 2.186-2.346 2.186-1.123 0-2.05-.6-2.288-1.65l-.927.477C71.1 15.16 72.308 16 73.858 16c1.955 0 3.418-1.405 3.418-3.208V5.805h-1.057ZM108.672 10.487c0 1.42-1.261 2.3-3.181 2.3-1.027 0-1.857-.184-2.651-.578.074-.449.142-.99.16-1.618.738.43 1.575.64 2.381.64.959 0 1.458-.221 1.458-.689.018-.461-.339-.67-1.772-.947-1.661-.332-2.399-1.021-2.399-2.24 0-1.377 1.261-2.27 3.18-2.27.849 0 1.692.16 2.338.437l-.32 1.544a4.803 4.803 0 0 0-2.018-.43c-.898 0-1.341.221-1.341.658 0 .381.308.541 1.71.83 1.79.382 2.461 1.07 2.461 2.35l-.006.013Zm4.207.609c-.719 0-1.298-.382-1.298-1.39V6.887h1.827l.339-1.63h-2.166v-2.32a9.976 9.976 0 0 1-1.9.345l-.019 6.748c0 1.84 1.101 2.769 2.75 2.769.375 0 .701-.037.978-.105l.363-1.729c-.228.08-.517.136-.874.136v-.006Zm2.086 1.593h1.919V5.258h-1.919v7.43Zm.965-10.47c-.621-.006-1.101.45-1.107 1.052 0 .621.455 1.089 1.071 1.095.621 0 1.082-.437 1.095-1.04.012-.62-.443-1.095-1.052-1.107h-.007Zm10.126 3.039v6.268c0 2.369-1.6 3.999-4.3 3.999-.972 0-2.042-.216-2.762-.628.498-.51.837-.953 1.052-1.273.486.166.996.252 1.519.252 1.71 0 2.578-.947 2.578-2.14v-.24c-.609.7-1.489 1.138-2.541 1.138-2.018 0-3.537-1.501-3.537-3.728 0-2.227 1.661-3.808 3.691-3.808 1.052 0 1.968.381 2.577 1.101l.062-.947h1.667l-.006.006Zm-1.901 3.648c0-1.181-.861-2.08-2.048-2.08-1.188 0-2.061.899-2.061 2.08 0 1.18.861 2.048 2.061 2.048 1.199 0 2.048-.898 2.048-2.048Zm10.839-3.648v6.268c0 2.369-1.6 3.999-4.3 3.999-.972 0-2.042-.216-2.762-.628.498-.51.837-.953 1.052-1.273.486.166.996.252 1.519.252 1.71 0 2.578-.947 2.578-2.14v-.24c-.609.7-1.489 1.138-2.541 1.138-2.017 0-3.537-1.501-3.537-3.728 0-2.227 1.661-3.808 3.691-3.808 1.052 0 1.968.381 2.577 1.101l.062-.947H135l-.006.006Zm-1.901 3.648c0-1.181-.861-2.08-2.048-2.08-1.188 0-2.061.899-2.061 2.08 0 1.18.861 2.048 2.061 2.048 1.199 0 2.048-.898 2.048-2.048ZM95.71 14.982c-.075.037-1.483.659-3.975.542A14.827 14.827 0 0 1 88.512 15l4.312-5.007c.77.197 1.76.381 2.885.436 2.492.123 3.9-.504 3.974-.541l-3.974 5.1v-.007Zm-6.441-9.62c-.708-2.393-.431-3.907-.413-3.987l-4.01 5.07c-.013.08-.29 1.592.412 3.985a14.98 14.98 0 0 0 1.273 3.008l3.845-5.37a15.042 15.042 0 0 1-1.107-2.7v-.006Zm9.996.529a14.561 14.561 0 0 0-1.815-3.882l-3.568 4.546.67 3.217c.4.056.794.092 1.194.117.203.006.406.012.603.012 1.931 0 3.008-.455 3.125-.51l.277-.123c.024-.665-.019-1.84-.48-3.384l-.006.007Zm-2.24-4.208A14.43 14.43 0 0 0 92.83.834c-1.605-.08-2.756.154-3.395.338l-.056.296c-.012.061-.258 1.494.4 3.74.11.381.246.756.394 1.132l3.285-.111 3.574-4.54-.006-.006Z",fill:"#001E6C"})))}),{target:"ee5i8qp1"})("*{fill:",(function(e){return e.theme.stigg.palette.text.secondary}),";}"),Sr=a("div",{target:"ee5i8qp0"})("align-self:",(function(e){return e.$alignSelf||"unset"}),";@media (max-width: 1040px){align-self:center;}");function Tr(e){var t=e.source,n=e.style;return e.showWatermark?i.createElement(Sr,{$alignSelf:e.align,className:"stigg-watermark",style:de({cursor:"pointer"},void 0===n?{}:n),onClick:function(){var e=window.location.hostname.replace("www.","");window.open("https://www.stigg.io/?utm_source="+e+"&utm_medium=referral&utm_campaign="+t,"_blank")}},i.createElement(Cr,null)):null}function Mr(e,t){return e.pricePoints.some((function(e){return e.billingPeriod===t}))}function Ar(e,t){return e.some((function(e){return Mr(e,t)}))}var Br,Lr=a("div",{target:"e19kubi82"})("color:",(function(e){return e.theme.stigg.palette.text.primary}),";display:flex;align-items:stretch;justify-content:center;flex-wrap:wrap;padding:10px 0;gap:",(function(e){return e.theme.stigg.layout.planMargin}),";"),Nr=a("div",{target:"e19kubi81"})({name:"1rdsyw8",styles:"display:flex;flex-direction:column;align-items:center;& *{box-sizing:border-box;}"}),Ur=a("div",{target:"e19kubi80"})({name:"zigog8",styles:"display:flex;flex-direction:column;align-items:center"}),Ir=function(e){var n=e.plans,a=e.customer,o=e.currentSubscription,l=e.highlightedPlanId,c=e.selectedBillingPeriod,u=e.onBillingPeriodChanged,s=e.availableBillingPeriods,d=e.isCustomerOnTrial,p=e.onPlanSelected,m=e.paywallLocale,g=e.locale,f=e.shouldHidePlan,y=e.selectDefaultTierIndex,v=e.currentSubscriptionOverride,b=e.hideCompatibleAddons,x=Vr().stigg,E=function(e){return e.reduce((function(e,n){var r,i,a=wr(n,t.BillingPeriod.Monthly),o=(i=wr(n,t.BillingPeriod.Annually),h(r=a)||h(i)?null:Math.round((r-i/12)/r*100));return o&&(e=Math.max(e,o)),e}),0)}(n),k=n.some((function(e){return!!e.description})),w=Ar(n,t.BillingPeriod.Monthly),P=Ar(n,t.BillingPeriod.Annually),C=function(e,n,r){return e.filter((function(e){return e.pricingType!==t.PricingType.Paid||Mr(e,n)})).filter((function(e){return!r||!r({plan:e})}))}(n,c,f),S=r.useCallback((function(e,t,n){return p({plan:e,customer:a,subscription:o,intentionType:t,selectedBillingPeriod:c,billableFeatures:n})}),[a,c,o,p]),T=!!o&&o.plan.pricingType===t.PricingType.Custom,M=r.useMemo((function(){return C.some((function(e){var t,n=e.pricePoints.filter((function(e){return e.billingPeriod===c})),r=null==(t=e.paywallCalculatedPricePoints)?void 0:t.find((function(e){return e.billingPeriod===c}));return n.length>1&&!(null==r||!r.additionalChargesMayApply)}))}),[c,C]),A=r.useMemo((function(){return C.some((function(e){return!!Sn(e,c,m,g,w).unit}))}),[c,w,g,m,C]),B=r.useMemo((function(){return!T&&C.some((function(e){var t=hn({plan:e,billingPeriod:c,currentSubscription:o,currentSubscriptionOverride:v});return Object.values(t).length>0}))}),[c,o,v,T,C]),L=C.some((function(e){return e.isCurrentCustomerPlan&&e.trialDaysLeft}));return i.createElement(Nr,{className:"stigg-paywall-container"},i.createElement(Ur,{className:"stigg-paywall-layout"},i.createElement(kr,{onBillingPeriodChanged:u,selectedBillingPeriod:c,availableBillingPeriods:s,discountRate:E}),i.createElement(Lr,{className:"stigg-paywall-plans-layout"},C.map((function(e){return i.createElement(fr,{withUnitPriceRow:A,withTiersRow:B,withTrialLeftRow:L,key:e.id,shouldShowDescriptionSection:k,hasMonthlyPrice:w,hasAnnuallyPrice:P,plan:e,withStartingAtRow:M,currentSubscription:o,currentSubscriptionOverride:v,billingPeriod:c,isHighlighted:e.id===l,isCustomerOnTrial:d,onPlanSelected:function(t,n){return S(e,t,n)},paywallLocale:m,locale:g,customer:a,isCustomerInCustomPlan:T,selectDefaultTierIndex:y,hideCompatibleAddons:b})}))),i.createElement(Tr,{source:"paywall",align:"end",style:{marginTop:16},showWatermark:x.isWidgetWatermarkEnabled})))},Fr=(function(e){var t=function(e){var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",o=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=Object.create((t&&t.prototype instanceof d?t:d).prototype),a=new w(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return{value:void 0,done:!0}}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var l=x(o,n);if(l){if(l===s)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===s)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var s={};function d(){}function p(){}function m(){}var g={};l(g,i,(function(){return this}));var h=Object.getPrototypeOf,f=h&&h(h(P([])));f&&f!==t&&n.call(f,i)&&(g=f);var y=m.prototype=d.prototype=Object.create(g);function v(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,a){function o(){return new t((function(r,o){!function r(i,a,o,l){var c=u(e[i],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(d).then((function(e){s.value=e,o(s)}),(function(e){return r("throw",e,o,l)}))}l(c.arg)}(i,a,r,o)}))}return r=r?r.then(o,o):o()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,s;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=m,l(y,"constructor",m),l(m,"constructor",p),p.displayName=l(m,o,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,l(e,o,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),l(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new b(c(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},v(y),l(y,o,"Generator"),l(y,i,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=P,w.prototype={constructor:w,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,s):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),s},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),s}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}(Br={exports:{}}),Br.exports),Or=new(function(){function e(){}var t=e.prototype;return t.error=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];console.error(e,t||{},r)},t.log=function(e,t){console.log(e,t||{})},t.debug=function(e,t){console.debug(e,t||{})},e}());function Dr(e,n,r){var i,a=e.flatMap((function(e){return e.pricePoints})).map((function(e){return e.billingPeriod})),o=s.countBy(a),l=s.uniq(a);if(r&&l.includes(r))i=r;else if(n){var c=n.find((function(e){return e.status===t.SubscriptionStatus.Active}));c&&c.prices.length>0&&(i=null==c?void 0:c.prices[0].billingPeriod)}return i||(i=(o[t.BillingPeriod.Monthly]||0)>(o[t.BillingPeriod.Annually]||0)?t.BillingPeriod.Monthly:t.BillingPeriod.Annually),{defaultBillingPeriod:i,availableBillingPeriods:l}}var jr={h1:{fontSize:24,fontWeight:t.FontWeight.Bold},h2:{fontSize:16,fontWeight:t.FontWeight.Normal},h3:{fontSize:16,fontWeight:t.FontWeight.Normal},body:{fontSize:14,fontWeight:t.FontWeight.Normal}};function Wr(e,t){if(void 0===t&&(t="px"),e)return""+e+t}function Rr(e,n){if(!n)return e;switch(n){case t.FontWeight.Normal:return"normal";case t.FontWeight.Bold:return"bold";default:return"normal"}}function qr(e,t){var n,r,i,a,o,l,c,u,s,d,p,m,g,h,f;return{fontFamilyUrl:(null==e?void 0:e.fontFamily)||void 0,h1:{fontSize:Wr((null==e||null==(n=e.h1)?void 0:n.fontSize)||(null==t||null==(r=t.h1)?void 0:r.fontSize)),fontWeight:Rr("bold",(null==e||null==(i=e.h1)?void 0:i.fontWeight)||(null==t||null==(a=t.h1)?void 0:a.fontWeight))},h2:{fontSize:Wr((null==e||null==(o=e.h2)?void 0:o.fontSize)||(null==t||null==(l=t.h2)?void 0:l.fontSize)),fontWeight:Rr("normal",null==t||null==(c=t.h2)?void 0:c.fontWeight)},h3:{fontSize:Wr((null==e||null==(u=e.h3)?void 0:u.fontSize)||(null==t||null==(s=t.h3)?void 0:s.fontSize)),fontWeight:Rr("normal",(null==e||null==(d=e.h3)?void 0:d.fontWeight)||(null==t||null==(p=t.h3)?void 0:p.fontWeight))},body:{fontSize:Wr((null==e||null==(m=e.body)?void 0:m.fontSize)||(null==t||null==(g=t.body)?void 0:g.fontSize)),fontWeight:Rr("normal",(null==e||null==(h=e.body)?void 0:h.fontWeight)||(null==t||null==(f=t.body)?void 0:f.fontWeight))}}}function _r(e){if(e)switch(e){case t.Alignment.Left:return"left";case t.Alignment.Center:return"center";case t.Alignment.Right:return"right";default:return}}var zr,Hr=i.createContext(null);function Vr(e){var t=(e||{}).optional,n=r.useContext(Hr);if(!n&&!t)throw new Error("Could not find Stigg context; You need to wrap your app in an <StiggProvider> component.");return n}function $r(){return($r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Hr.displayName="StiggContext";var Zr,Gr=function(e){return r.createElement("svg",$r({width:15,height:11,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),zr||(zr=r.createElement("path",{d:"M5.59 7.99 2.125 4.525A1 1 0 1 0 .71 5.94l4.88 4.88 8.705-8.705a.997.997 0 0 0-1.41-1.41L5.59 7.99Z",fill:"#B2BBD3"})))},Yr=a("div",{target:"e1f7khji6"})({name:"zigog8",styles:"display:flex;flex-direction:column;align-items:center"}),Qr=a(Gr,{target:"e1f7khji5"})({name:"o7nnmj",styles:"margin-right:16px"}),Kr=a("div",{target:"e1f7khji4"})("display:flex;flex-direction:column;align-items:flex-start;gap:20px;border-radius:10px;padding:",(function(e){return e.theme.stigg.layout.planPadding}),";background-color:",(function(e){return e.theme.stigg.palette.backgroundPaper}),";min-width:",(function(e){return e.theme.stigg.layout.planMinWidth}),";max-width:",(function(e){return e.theme.stigg.layout.planMaxWidth}),";min-height:450px;border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";"),Xr=a("div",{target:"e1f7khji3"})("display:flex;gap:",(function(e){return e.theme.stigg.layout.planMargin}),";flex-wrap:wrap;justify-content:center;"),Jr=a("div",{target:"e1f7khji2"})({name:"k8xojc",styles:"display:flex;align-items:center;margin-bottom:12px"}),ei=a("div",{target:"e1f7khji1"})({name:"xdvdnl",styles:"margin-top:auto"}),ti=a("div",{target:"e1f7khji0"})("width:150px;margin-bottom:",(function(e){return e.theme.stigg.layout.switchBottomSpacing}),";padding:12px 12px;border-radius:10px;background-color:white;border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";");function ni(){return i.createElement(Kr,null,i.createElement(P,{width:120,borderRadius:4}),i.createElement(P,{circle:!0,width:40,height:40}),i.createElement(P,{style:{marginBottom:33},width:120,borderRadius:4}),i.createElement(Jr,null,i.createElement(Qr,null),i.createElement(P,{width:120,borderRadius:4})),i.createElement(Jr,null,i.createElement(Qr,null),i.createElement(P,{width:120,borderRadius:4})),i.createElement(Jr,null,i.createElement(Qr,null),i.createElement(P,{width:120,borderRadius:4})),i.createElement(ei,null,i.createElement(P,{height:50,borderRadius:4})))}function ri(){return i.createElement(Yr,{className:"stigg-skeleton-loader-container"},i.createElement(ti,{className:"stigg-skeleton-loader-billing-period"},i.createElement(P,{borderRadius:4})),i.createElement(Xr,{className:"stigg-skeleton-loader-plans-container"},i.createElement(ni,null),i.createElement(ni,null),i.createElement(ni,null)))}var ii,ai=function(e){var t=e.externalFontUrl;return i.createElement(u.Global,{styles:u.css(Zr||(Zr=me(["\n ","\n\n /* latin-ext */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Hp2ywxg089UriCZ2IHTWEBlwu8Q.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,\n U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Hp2ywxg089UriCZOIHTWEBlw.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,\n U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriAWCrCBamC3YU-CnE6Q.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,\n U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriAWCrCBimC3YU-Ck.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,\n U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriASitCBamC3YU-CnE6Q.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,\n U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriASitCBimC3YU-Ck.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,\n U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n "])),t&&"\n @font-face {\n font-family: 'custom-font';\n font-style: normal;\n font-weight: normal;\n src: local('custom-font'), url("+t+") format('woff');\n }\n ")})},oi=a("div",{target:"emcdfp60"})((function(e){var t=e.customCss;return t&&u.css(ii||(ii=me(["\n ","\n "])),t)}),";");function li(e){var t,n,r,i,a,o,l,c,u,d=Vr(),g=s.merge(e,d.theme);return a=p((null==(t=g)||null==(n=t.palette)?void 0:n.primary)||"#327EEE"),o=p((null==t||null==(r=t.palette)||null==(i=r.text)?void 0:i.primary)||"#001E6C"),l=p("#4CAF50"),c=p("#f44336"),u={palette:{primary:a.hex(),primaryDark:a.darken(.3).hex(),primaryLight:a.alpha(.5).toString(),backgroundPaper:"#FFFFFF",backgroundHighlight:"#F5F6F9",backgroundSection:a.alpha(.1).toString(),backgroundButton:a.alpha(.08).toString(),outlinedBorder:"#C4CBDD",outlinedRestingBorder:a.alpha(.5).toString(),outlinedHoverBackground:a.lightness(95).hex(),switchBorder:a.lighten(.1).hex(),switchFill:a.lighten(.5).hex(),switchHandle:a.hex(),warning:"#ed6c02",error:c.hex(),errorDark:c.darken(.3).hex(),success:l.hex(),successDark:l.darken(.3).hex(),white:"#FFFFFF",text:{primary:o.hex(),secondary:o.alpha(.75).toString(),tertiary:o.alpha(.5).toString(),disabled:o.alpha(.35).toString()}},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"},h2:{fontSize:"24px",fontWeight:"normal"},h3:{fontSize:"16px",fontWeight:"normal"},body:{fontSize:"14px",fontWeight:"normal"},caption:{fontSize:"12px",fontWeight:"normal"}},customCss:""},m(u,t)}function ci(e){var t=e.typography,n=Number(t.body.fontSize.replace("px",""))/14;return{pxToRem:function(e){return e/16*n+"rem"},bodyFontFamily:t.fontFamily,headingFontFamily:t.fontFamily,fontSizes:[t.h1.fontSize,t.h2.fontSize,t.h3.fontSize,t.body.fontSize,"12px","10px"]}}var ui=function(e){var t,n=e.children,r=li(e.componentTheme),a=function(e){return{primary:{main:e.palette.primary}}}(r),o=N.createTheme({palette:a,stigg:r});return i.createElement(N.ThemeProvider,{theme:(t={},t[N.THEME_ID]=o,t)},i.createElement(u.ThemeProvider,{theme:{stigg:r}},i.createElement(oi,{customCss:r.customCss},i.createElement(ai,{externalFontUrl:r.typography.fontFamilyUrl}),i.createElement(B.ThemeProvider,{theme:{typography:ci(r)}},n))))},si=i.createContext(null);si.displayName="CustomerPortalContext";var di=function(){var e=r.useContext(si);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 pi(e){var t,n,a,o,l,c,u,s=e.children,d=e.textOverrides,p=e.theme,g=e.resourceId,h=e.productId,f=Vr().customerPortalUpdatedAt,y=function(e){var t=e.resourceId,n=e.productId,i=Vr(),a=i.stigg,o=i.customerPortalUpdatedAt,l=r.useState(!1),c=l[0],u=l[1],s=r.useState(),d=s[0],p=s[1];return r.useEffect((function(){!function(){var e=se(Fr.mark((function e(){return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.isCustomerLoaded){e.next=15;break}return e.prev=1,u(!0),e.next=5,a.getCustomerPortal({resourceId:t,productId:n});case 5:p(e.sent),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),Or.error("Failed to load customer portal "+(null==e.t0?void 0:e.t0.message),e.t0);case 12:return e.prev=12,u(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[1,9,12,15]])})));return function(){return e.apply(this,arguments)}}()()}),[a,a.isCustomerLoaded,o,t,n]),{customerPortal:d,isLoading:c}}({resourceId:g,productId:h}),v=y.customerPortal,b=y.isLoading,x=null!=v&&v.configuration?function(e){var t=e.palette,n=e.customCss;return{palette:{primary:(null==t?void 0:t.primary)||void 0,backgroundPaper:(null==t?void 0:t.paywallBackgroundColor)||void 0,outlinedBorder:(null==t?void 0:t.borderColor)||void 0,backgroundHighlight:(null==t?void 0:t.currentPlanBackground)||void 0,text:{primary:(null==t?void 0:t.textColor)||void 0}},typography:qr(e.typography),customCss:n||void 0}}(v.configuration):void 0,E=(t=li(x),a=null==v?void 0:v.configuration,{sectionTitleColor:(null==(n=p)?void 0:n.sectionTitleColor)||t.palette.text.secondary,planNameColor:(null==n?void 0:n.planNameColor)||t.palette.text.primary,backgroundColor:(null==n?void 0:n.backgroundColor)||(null==a||null==(o=a.palette)?void 0:o.backgroundColor)||"white",borderColor:(null==n?void 0:n.borderColor)||(null==a||null==(l=a.palette)?void 0:l.borderColor)||"rgba(0, 30, 108, 0.15)",listItemBackgroundColor:(null==n?void 0:n.backgroundColor)||(null==a||null==(c=a.palette)?void 0:c.backgroundColor)||"white",tabMaxHeight:(null==n?void 0:n.tabMaxHeight)||"380px",iconsColor:(null==n?void 0:n.iconsColor)||(null==a||null==(u=a.palette)?void 0:u.iconsColor)||void 0,iconsBackgroundColor:null==n?void 0:n.iconsBackgroundColor}),k=m({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"},d);return i.createElement(ui,{componentTheme:x},i.createElement(si.Provider,{key:null==f?void 0:f.toString(),value:{customerPortal:v,isLoading:b,textOverrides:k,theme:E,resourceId:g}},s))}var mi,gi=a(b,{target:"emvioms0"})("border-radius:10px;padding:8px 16px;text-transform:none;&,&:hover{border-color:",(function(e){return e.theme.stigg.palette.outlinedRestingBorder}),";}");function hi(){return(hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var fi,yi=function(e){return r.createElement("svg",hi({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),mi||(mi=r.createElement("path",{clipRule:"evenodd",d:"M13.333 2.5 17.5 6.667 6.667 17.5H2.5v-4.167L13.333 2.5v0Z",stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},vi=a("div",{target:"ewz8krb0"})("display:flex;align-items:center;justify-content:space-between;",(function(e){return!e.$disableMargin&&"\n &:not(:last-child) {\n margin-bottom: 32px;\n }\n "}),";");function bi(e){var t=e.title,n=e.className,r=e.isLoading,a=di().theme;return r?i.createElement(P,{width:120}):i.createElement(De,{className:n,overrideColor:a.sectionTitleColor,variant:"h3",bold:!0},t)}(fi=exports.CustomerPortalIntentionType||(exports.CustomerPortalIntentionType={})).MANAGE_SUBSCRIPTION="MANAGE_SUBSCRIPTION",fi.UPGRADE_PLAN="UPGRADE_PLAN",fi.UPGRADE_TRIAL_PLAN="UPGRADE_TRIAL_PLAN";var xi=a(yi,{target:"e1fjw26b0"})("path{stroke:",(function(e){return e.theme.stigg.palette.primary}),";}");function Ei(e){var t=e.onManageSubscription,n=e.hideManageButton,r=e.textOverrides;return i.createElement(vi,{className:"stigg-customer-portal-overview-header",$disableMargin:!0},i.createElement(bi,{title:"Subscription",className:"stigg-overview-title"}),!n&&i.createElement(gi,{className:"stigg-manage-subscription-button",variant:"outlined",onClick:function(){return t({intentionType:exports.CustomerPortalIntentionType.MANAGE_SUBSCRIPTION})}},i.createElement(xi,{className:"stigg-manage-subscription-button-image"}),i.createElement(De,{className:"stigg-manage-subscription-button-text",color:"primary.main",style:{marginLeft:"8px"},variant:"body1"},null==r?void 0:r.manageSubscription)))}function ki(){var e=di().customerPortal,t=U(null==e?void 0:e.subscriptions,(function(e){return e.addons}));return O(t)?null:i.createElement("div",{className:"stigg-addons-list-layout"},t.map((function(e,n){return i.createElement(De,{key:e.addonId,span:!0,className:"stigg-addon-list-item-text",variant:"body1"},e.quantity>1&&e.quantity+" X ",e.displayName,n===t.length-1?"":", ")})))}var wi=a("div",{target:"e1g6q2f50"})("display:flex;justify-content:space-between;align-items:center;gap:64px;border-bottom:",(function(e){return"1px solid "+e.$borderColor}),";padding:16px 0;&>*:first-of-type{max-width:60%;}");function Pi(){var e=di(),t=e.customerPortal,n=e.theme,r=null==t?void 0:t.promotionalEntitlements;return i.createElement("div",{style:{display:"flex",flexDirection:"column"}},i.createElement(De,{color:"secondary"},e.textOverrides.promotionsSubtitle),i.createElement("div",{style:{display:"flex",flexDirection:"column"}},i.createElement(wi,{$borderColor:n.borderColor},i.createElement(De,{variant:"body1",bold:!0},"Feature"),i.createElement(De,{variant:"body1",bold:!0},"Expiration date")),null==r?void 0:r.map((function(e,t){return i.createElement(wi,{key:e.displayName+"-"+t,$borderColor:n.borderColor},i.createElement(De,{variant:"body1"},function(e){var t,n=e.displayName;return e.hasUnlimitedUsage?"Unlimited "+n:e.usageLimit?n+" x "+(null==(t=e.usageLimit)?void 0:t.toLocaleString()):n}(e)),i.createElement(De,{variant:"body1",color:"disabled"},e.endDate?g.utc(e.endDate).format("MMM Do, YYYY"):"None"))}))))}var Ci=a(D,{target:"exlfw3j3"})({name:"jlwfj4",styles:".MuiTabs-indicator{background-color:#001e6c;}"}),Si=a("div",{target:"exlfw3j2"})({name:"1dqkbz0",styles:"width:100%;flex:1;margin-top:16px"}),Ti=a(I,{shouldForwardProp:function(e){return!e.startsWith("$")},target:"exlfw3j1"})("margin-top:16px;max-height:",(function(e){return e.$maxHeight}),";overflow-y:auto;"),Mi=["children","value","index","maxHeight"];function Ai(e){var t=e.children,n=e.value,r=e.index,a=e.maxHeight,o=pe(e,Mi);return i.createElement("div",Object.assign({role:"tabpanel",hidden:n!==r},o),n===r&&i.createElement(Ti,{$maxHeight:a},t))}function Bi(e){var t=e.isSelected,n=e.label,r=t?"primary":"secondary";return i.createElement("div",{style:{display:"flex",gap:8,alignItems:"center"}},i.createElement($t,{icon:e.icon,svgStrokeColor:r}),i.createElement(De,{variant:"h6",bold:t,fontWeight:c.FontWeight.Medium,color:r},n))}function Li(e){var t=e.customerPortal,n=e.hiddenSections,a=e.textOverrides,o=e.theme,l=function(e){return null==n?void 0:n.some((function(t){return t===e}))},c=U(t.subscriptions,(function(e){return e.addons})).length>0&&!l("addons"),u=t.promotionalEntitlements.length>0&&!l("promotionalEntitlements"),s=r.useState(c?1:2),d=s[0],p=s[1];return c||u?i.createElement(Si,null,i.createElement(I,{sx:{borderBottom:1,borderColor:"divider"}},i.createElement(Ci,{value:d,onChange:function(e,t){p(t)}},c?i.createElement(F,{sx:{textTransform:"none"},value:1,label:i.createElement(Bi,{isSelected:1===d,label:a.addonsTabTitle,icon:"Addons"})}):null,u?i.createElement(F,{sx:{textTransform:"none"},value:2,label:i.createElement(Bi,{isSelected:2===d,label:a.promotionsTabTitle,icon:"Promotions"})}):null)),i.createElement(Ai,{value:d,index:1,maxHeight:o.tabMaxHeight},i.createElement(ki,null)),i.createElement(Ai,{value:d,index:2,maxHeight:o.tabMaxHeight},i.createElement(Pi,null))):null}var Ni={xs:320,sm:640,md:768,lg:1024,xl:1280,xxl:1536},Ui=function(e){return"(min-width: "+Ni[e]+"px)"},Ii=Object.keys(Ni).reduce((function(e,t){var n;return de({},e,((n={})[t]="@media "+Ui(t),n))}),{});function Fi(e){return j.useMediaQuery(Ui(e))}var Oi=a("div",{target:"ejq3grd1"})({name:"qgg235",styles:"display:flex;justify-content:space-between;flex-wrap:wrap"}),Di=a("div",{target:"ejq3grd0"})({name:"43cxha",styles:"display:flex;flex-direction:column;gap:32px"});function ji(){var e=Fi("md");return i.createElement(Oi,{className:"stigg-subscription-overview-skeleton-layout"},i.createElement(Di,null,i.createElement(P,{width:120}),i.createElement(P,{width:120})),i.createElement(P,{width:e?295:260,height:193}))}function Wi(e){var t=e.scheduleUpdate.targetPackage;return i.createElement(l,{container:!0,alignItems:"center"},i.createElement(l,null,i.createElement(W.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})),i.createElement(l,{item:!0},i.createElement(De,{className:"stigg-scheduled-updates-description",variant:"body1"},"Downgrade to the ",i.createElement("b",null,null==t?void 0:t.displayName)," plan")))}function Ri(e){var n=e.scheduleUpdate.scheduleVariables.billingPeriod,r=n===t.BillingPeriod.Monthly?"annually":"monthly",a=n===t.BillingPeriod.Monthly?"monthly":"annually";return i.createElement(l,{container:!0,alignItems:"center"},i.createElement(l,null,i.createElement(W.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})),i.createElement(l,{item:!0},i.createElement(De,{className:"stigg-scheduled-updates-description",variant:"body1"},"Change from an ",r," to a ",i.createElement("b",null,a)," billing cycle")))}function qi(e){var t=e.scheduleUpdate.scheduleVariables,n=t.newUnitAmount,r=t.featureId,a=s.compact(s.map(e.subscription.prices,"feature")).find((function(e){return e.id===r}));if(!a)return null;var o=a.featureUnits,c=1===n?o:a.featureUnitsPlural;return i.createElement(l,{container:!0,alignItems:"flex-start",flexWrap:"nowrap"},i.createElement(l,null,i.createElement(W.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})),i.createElement(l,{item:!0},i.createElement(De,{className:"stigg-scheduled-updates-description",variant:"body1"},"Reduce the ",i.createElement("b",null,o)," quantity to ",n," ",c)))}function _i(e){var n=e.scheduleUpdate,r=e.subscription;switch(n.subscriptionScheduleType){case t.SubscriptionScheduleType.Downgrade:return i.createElement(Wi,{scheduleUpdate:n});case t.SubscriptionScheduleType.BillingPeriod:return i.createElement(Ri,{scheduleUpdate:n});case t.SubscriptionScheduleType.UnitAmount:return i.createElement(qi,{scheduleUpdate:n,subscription:r});default:return null}}var zi=a(I,{target:"eju957a2"})("border-bottom:",(function(e){return"1px solid "+e.$borderColor}),";border-top-left-radius:10px;border-top-right-radius:10px;margin:-64px -64px 64px -64px;padding:24px 32px;"),Hi=a(d,{target:"eju957a1"})({name:"158icaa",styles:"margin-left:4px"}),Vi=a(Pt,{target:"eju957a0"})("color:",(function(e){return e.theme.stigg.palette.primary}),";path{fill:",(function(e){return e.theme.stigg.palette.primary}),";}");function $i(e){var t=e.subscription,n=t.scheduledUpdates;return i.createElement(i.Fragment,null,i.createElement(l,{container:!0,alignItems:"center",justifyContent:"space-between",gap:1},i.createElement(l,null,i.createElement(De,{className:"stigg-scheduled-updates-description",variant:"body1"},"The following updates will take effect in the next billing cycle:"))),i.createElement(l,null,(n||[]).map((function(e){return i.createElement(_i,{key:e.subscriptionScheduleType,scheduleUpdate:e,subscription:t})}))))}function Zi(e){var t=e.subscription,n=ln({scheduledUpdate:(t.scheduledUpdates||[])[0],subscriptionPrices:t.prices,billingPeriodRange:t.billingPeriodRange,options:{postfix:"at the end of the current billing period"}}),r=n.line2;return i.createElement(i.Fragment,null,i.createElement(l,{container:!0,alignItems:"center",justifyContent:"space-between",gap:1},i.createElement(l,null,i.createElement(De,{className:"stigg-scheduled-updates-title",variant:"body1",color:"primary"},n.line1))),r&&i.createElement(l,null,i.createElement(De,{className:"stigg-scheduled-updates-subtitle",variant:"body1",color:"secondary"},r)))}function Gi(e){var t=e.subscription,n=e.onCancelScheduledUpdates,a=e.theme,o=e.cancelScheduledUpdatesButtonTitle,c=u.useTheme(),s=r.useState(!1),d=s[0],p=s[1],m=t.scheduledUpdates;if(!m||0===m.length)return null;var g=1===m.length;return i.createElement(zi,{$borderColor:a.borderColor,className:"stigg-scheduled-updates-alert-container"},i.createElement(l,{container:!0,alignItems:g?"center":"flex-start",gap:2},i.createElement(l,{item:!0,display:"flex"},i.createElement($t,{icon:"ScheduleBox",svgPathColor:a.iconsColor,svgRectColor:a.iconsBackgroundColor})),i.createElement(l,{item:!0,flex:1},i.createElement(g?Zi:$i,{subscription:t})),!!n&&i.createElement(l,{item:!0},i.createElement(gi,{variant:"outlined",onClick:function(){p(!0),Promise.resolve(n(t)).finally((function(){return p(!1)}))}},d?i.createElement(Hi,{loading:!0,size:16,color:c.stigg.palette.text.disabled}):i.createElement(Vi,{style:{display:"flex",marginRight:4},className:"stigg-scheduled-updates-cancel-update-button-icon"}),i.createElement(De,{variant:"body1",color:"primary.main",className:"stigg-scheduled-updates-cancel-update-button"},o)))))}var Yi=a("div",{target:"e1kw2z1l0"})("width:100%;display:flex;flex-direction:column;border-radius:10px;background-color:",(function(e){return e.$backgroundColor}),";border:",(function(e){return"1px solid "+e.$borderColor}),";padding:16px;",Ii.sm,"{padding:32px;}",Ii.md,"{padding:48px;}",Ii.lg,"{padding:64px;}");function Qi(e){var n=e.billingPeriod,r=e.rangeEnd,a=e.amount,o=e.currency;return i.createElement(i.Fragment,null,i.createElement(De,{variant:"h6"},"Next estimated bill"),i.createElement(De,{variant:"h1"},Pn({amount:a,currency:o,maximumFractionDigits:2})),i.createElement(De,{as:"div",variant:"body1",color:"secondary"},"Billed ",n===t.BillingPeriod.Monthly?"monthly":"annually"," on"," ",i.createElement(De,{variant:"body1",span:!0,color:"primary"},g.utc(r).format("MMM Do, YYYY"))),i.createElement(De,{variant:"body1",color:"secondary"},"* Additional tax rates may apply"))}function Ki(e){var t=e.description;return i.createElement(i.Fragment,null,i.createElement(De,{variant:"h6",color:"secondary"},"No upcoming bill"),i.createElement(De,{variant:"body1",color:"secondary"},t))}var Xi=a("div",{target:"e1ftdtst1"})({name:"1nocm2b",styles:"display:flex;flex-direction:column;align-items:left;gap:8px"}),Ji=a(b,{target:"e1ftdtst0"})({name:"1l28f5r",styles:"width:fit-content;&.MuiButton-root{padding:0;&:hover{background:none;}}"});function ea(e){var t=e.onContactSupport,n=e.label,r=i.createElement(De,{color:t?"primary.main":"secondary"},e.linkLabel);return i.createElement(Xi,{className:"stigg-contact-support-layout"},i.createElement(De,{className:"stigg-contact-support-label",color:"secondary"},n),t?i.createElement(Ji,{className:"stigg-contact-support-button",style:{textTransform:"none"},variant:"text",onClick:t},r):r)}var ta,na,ra=a("div",{target:"e1u4onrr0"})("max-height:278px;display:flex;flex-direction:column;border-radius:10px;background-color:",(function(e){return e.theme.stigg.palette.backgroundSection}),";border:",(function(e){return"1px solid "+e.$borderColor}),";padding:32px;gap:16px;");function ia(e){var n,r,a,o,l=e.subscription,c=e.theme,u=e.textOverrides,s=e.onContactSupport,d=l.pricingType,p=null==(n=null==(r=l.prices)?void 0:r.every((function(e){return e.billingModel!==t.BillingModel.UsageBased})))||n,m=null==(a=l.scheduledUpdates)?void 0:a.find((function(e){var n=e.targetPackage;return e.subscriptionScheduleType===t.SubscriptionScheduleType.Downgrade&&(null==n?void 0:n.pricingType)===t.PricingType.Free}));if(d===t.PricingType.Free)o=i.createElement(Ki,{description:"You're on a free plan, so you don’t have any upcoming charges"});else if(d===t.PricingType.Paid)if(m&&p)o=i.createElement(Ki,{description:"Your plan will be downgraded to a free plan, so you don’t have any upcoming charges"});else if(l.status===t.SubscriptionStatus.InTrial)o=i.createElement(Ki,{description:"You’re on a free trial of the "+l.planName+" plan, so you don’t have any upcoming charges"});else{var g,h,f,y,v=null==(g=l.prices)||null==(h=g[0])?void 0:h.billingPeriod,b=null==(f=l.billingPeriodRange)?void 0:f.end,x=null==(y=l.totalPrice)?void 0:y.total;v&&b&&x&&(o=i.createElement(Qi,{billingPeriod:v,rangeEnd:b,amount:x.amount,currency:x.currency}))}else d===t.PricingType.Custom&&(o=i.createElement(ea,{onContactSupport:s,label:u.contactSupportTitle,linkLabel:u.contactSupportLink}));return i.createElement(ra,{className:"stigg-subscription-total-price-layout",$borderColor:c.borderColor},o)}function aa(){return(aa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var oa,la,ca,ua=function(e){return r.createElement("svg",aa({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ta||(ta=r.createElement("path",{d:"M12.947 13.6h-1.013l.001-2.824a.522.522 0 0 0-.18-.392L8.622 7.918l3.134-2.465a.497.497 0 0 0 .18-.392V2.4h1.012c.278 0 .49-.212.49-.49a.481.481 0 0 0-.49-.49H3.053a.481.481 0 0 0-.49.49c0 .278.213.49.49.49h1.013l-.001 2.661c0 .147.065.294.18.392l3.117 2.465-3.117 2.466a.497.497 0 0 0-.18.392V13.6H3.054a.481.481 0 0 0-.49.49c0 .277.213.49.49.49h9.894c.277 0 .49-.213.49-.49a.481.481 0 0 0-.49-.49ZM5.045 2.4h5.91v2.416L8 7.167l-2.955-2.35V2.4Zm0 8.62L8 8.67l2.955 2.334v2.58h-5.91V11.02Z",fill:"#fff"})),na||(na=r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.053 1.254h9.894c.37 0 .657.287.657.656 0 .37-.287.657-.657.657h-.845L12.1 5.06c0 .214-.088.39-.238.519l-.005.004L8.89 7.918l2.974 2.34c.152.13.238.323.238.518l-.001 2.657h.846c.37 0 .657.287.657.657 0 .37-.288.657-.657.657H3.053a.648.648 0 0 1-.657-.657c0-.37.287-.657.657-.657h.846v-2.657c0-.214.087-.39.237-.519l.005-.004 2.953-2.335L4.136 5.58a.688.688 0 0 1-.238-.519V2.567h-.845a.648.648 0 0 1-.657-.656c0-.37.287-.657.657-.657Zm9.894.333H3.053a.315.315 0 0 0-.323.324c0 .185.138.323.323.323h1.18l-.001 2.827c0 .099.043.198.119.264l3.28 2.593-3.28 2.594a.33.33 0 0 0-.119.264v2.99H3.053a.315.315 0 0 0-.323.324c0 .185.138.323.323.323h9.894a.315.315 0 0 0 .323-.323.315.315 0 0 0-.323-.323h-1.18l.001-2.991a.355.355 0 0 0-.119-.264L8.351 7.918l3.298-2.593a.33.33 0 0 0 .119-.264V2.233h1.18a.315.315 0 0 0 .323-.323.315.315 0 0 0-.324-.323Zm-8.069.646h6.244v2.664L8 7.38 4.878 4.897V2.233Zm.334.334v2.169L8 6.955l2.788-2.22V2.568H5.212ZM8 8.457l3.122 2.467v2.827H4.878v-2.81L8 8.456Zm0 .425-2.788 2.219v2.316h5.576v-2.332L8 8.882Z",fill:"#fff"})))},sa=["children","className","placement"],da=a((function(e){var t=e.children,n=e.className,r=e.placement,a=void 0===r?"top":r,o=pe(e,sa);return i.createElement(_,Object.assign({arrow:!0,placement:a},o,{classes:{popper:n,tooltip:"stigg-tooltip",arrow:"stigg-tooltip-arrow"}}),i.createElement("div",null,t))}),{target:"enddsuj0"})((function(e){var t,n=e.theme,r=e.$padding,i=e.$maxWidth;return(t={})["& ."+q.tooltipClasses.tooltip]={backgroundColor:n.stigg.palette.white,maxWidth:void 0===i?300:i,boxShadow:n.stigg.shadows.popover,padding:void 0===r?8:r,borderRadius:n.stigg.border.radius,color:n.stigg.palette.text.primary},t["& ."+q.tooltipClasses.arrow]={color:n.stigg.palette.white},t}),""),pa=L(De)(oa||(oa=me(["\n display: ",";\n -webkit-line-clamp: ",";\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: normal;\n ","\n\n ","\n"])),(function(e){return e.$display}),(function(e){return e.$maxLines}),(function(e){return e.$wordBreak&&B.css(la||(la=me(["\n word-break: break-word;\n "])))}),(function(e){return e.$bold&&B.css(ca||(ca=me(["\n font-weight: bold;\n "])))}));function ma(e){return e&&(e.clientHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)}var ga=function(e){var t=e.leaveDelay,n=e.children,a=e.variant,o=e.color,l=e.maxLines,c=void 0===l?1:l,u=e.wordBreak,s=e.bold,d=e.tooltipPlacement,p=void 0===d?"top":d,m=e.className,g=e.display,h=void 0===g?"-webkit-box":g,f=e.style,y=e["data-testid"],v=r.useState(!1),b=v[0],x=v[1],E=r.useRef(null),k=i.createElement(pa,{ref:E,variant:a,color:o,$maxLines:c,$wordBreak:u,$bold:s,className:m,$display:h,style:f,"data-testid":y},n);r.useEffect((function(){if(null!=E&&E.current){var e=ma(E.current);x(e)}}),[E]);var w=(null==E?void 0:E.current)&&ma(E.current);return i.createElement("span",null,b||w?i.createElement(da,{placement:p,leaveDelay:t,title:i.createElement(De,{variant:"body1"},n)},k):k)},ha=a("div",{target:"el5iwyw1"})("width:100%;display:flex;align-items:center;gap:4px;background-color:",(function(e){return e.theme.stigg.palette.warning}),";border-radius:10px;padding:8px 16px;margin-top:16px;"),fa=a(R,{target:"el5iwyw0"})({name:"69ka7t",styles:"text-decoration-color:white;color:white;cursor:pointer"});function ya(e){var n=e.subscription,r=e.includePlanName,a=e.onManageSubscription;return(null==n?void 0:n.status)!==t.SubscriptionStatus.InTrial?null:i.createElement(ha,{className:"stigg-subscription-trial-badge"},i.createElement(ua,{className:"stigg-subscription-trial-badge-image"}),i.createElement("div",{style:{flex:1,marginRight:4}},i.createElement(ga,{variant:"body1",className:"stigg-subscription-trial-badge-text",color:"white"},n.trialRemainingDays+" days remaining in trial",r&&" of the "+n.planName+" plan")),i.createElement(fa,{className:"stigg-subscription-trial-upgrade-button",onClick:function(){return a({intentionType:exports.CustomerPortalIntentionType.UPGRADE_TRIAL_PLAN})}},i.createElement(De,{color:"white"},"Upgrade plan")))}function va(e){var t=e.mainSubscription,n=e.trialSubscription,r=e.onManageSubscription;return i.createElement("div",{className:"stigg-subscription-view-layout"},i.createElement(De,{className:"stigg-subscription-plan-name",variant:"h1",overrideColor:e.theme.planNameColor,style:{marginTop:8}},t.planName," plan"),i.createElement(ya,{subscription:n,includePlanName:(null==n?void 0:n.planName)!==t.planName,onManageSubscription:r}))}function ba(e,t){return Math.min(Math.floor(e/t*100),100)}var xa,Ea=a(H,{shouldForwardProp:function(e){return!e.startsWith("$")},target:"e1cbsoof1"})("height:4px;background-color:",(function(e){return p(e.theme.stigg.palette.primary).alpha(.4).string()}),";span{background-color:",(function(e){var t=e.theme;switch(e.$progressStatus){case"standard":return t.stigg.palette.primary;case"warning":return t.stigg.palette.warning;case"error":return t.stigg.palette.error;default:return t.stigg.palette.primary}}),";}"),ka=a(k,{target:"e1cbsoof0"})("border-style:dotted;border-bottom-width:2px;border-color:",(function(e){return p(e.theme.stigg.palette.outlinedRestingBorder).alpha(.4).string()}),";");function wa(e){var t=e.entitlement;if(t.hasUnlimitedUsage)return i.createElement(ka,null);var n,r=ba(t.currentUsage||0,t.usageLimit),a=(n=r)<70?"standard":n<100?"warning":"error";return i.createElement(Ea,{$progressStatus:a,className:"stigg-feature-usage-progress-bar-"+a.toString(),variant:"determinate",value:r})}var Pa=L(b)(xa||(xa=me(["\n text-transform: none;\n padding: 0;\n white-space: nowrap;\n"])));function Ca(e){var t=e.entitlement,n=e.feature,r=e.onManageSubscription,a=e.onBuyMore,o=e.canBuyMore,l=e.canUpgradeSubscription;return e.hasCustomSubscription||t.hasUnlimitedUsage||ba(t.currentUsage||0,t.usageLimit)<70?null:o?a?i.createElement(Pa,{variant:"text",onClick:function(){return a(n,t)}},i.createElement(De,{color:"primary.main"},"Buy more")):null:l&&r?i.createElement(Pa,{variant:"text",onClick:function(){return r({intentionType:exports.CustomerPortalIntentionType.UPGRADE_PLAN})}},i.createElement(De,{color:"primary.main"},"Upgrade")):null}function Sa(e){var t,n,r,a=e.amount,o=e.currency,l=e.blockSize,c=e.entitlement,u=e.feature,s=e.hideChargePrice,d=e.onBuyMore,p=e.onManageSubscription,m=e.canUpgradeSubscription,g=e.hasCustomSubscription;return i.createElement("div",{className:"stigg-charge-list-item stigg-charge-list-item-"+c.feature.refId,style:{display:"flex",flexDirection:"column",gap:12}},i.createElement("div",{style:{display:"flex",justifyContent:"space-between",gap:12}},i.createElement("div",{style:{display:"flex",gap:12}},i.createElement(ga,{variant:"body1",color:"primary"},u.displayName),!s&&i.createElement(ga,{variant:"body1",color:"secondary"},Pn({amount:a,currency:o})," per ",l?l+" ":"",l?u.featureUnitsPlural:u.featureUnits)),i.createElement("div",{style:{display:"flex",gap:12}},i.createElement(Ca,{entitlement:c,feature:u,canBuyMore:!0,onBuyMore:d,onManageSubscription:p,canUpgradeSubscription:m,hasCustomSubscription:g}),i.createElement(De,{variant:"body1",color:"primary",style:{whiteSpace:"nowrap"}},c.hasUnlimitedUsage?null==(t=c.currentUsage)?void 0:t.toLocaleString():(null==(n=c.currentUsage)?void 0:n.toLocaleString())+" of "+(null==(r=c.usageLimit)?void 0:r.toLocaleString())))),i.createElement(wa,{entitlement:c}))}function Ta(e){var n=e.subscription,r=e.onBuyMore,a=e.onManageSubscription,o=e.hasCustomSubscription,l=e.canUpgradeSubscription,c=s.keyBy(e.entitlements,"feature.refId"),u=n.prices.filter((function(e){var t=e.feature;return!!t&&c[t.refId]&&!!e.price}));return u.length?i.createElement("div",{className:"stigg-charge-list",style:{display:"flex",flexDirection:"column",gap:16,marginTop:32}},u.map((function(e){var n=e.feature,u=e.price;if(!n||!u)return null;var s=c[n.refId];return s&&s.feature?i.createElement(Sa,{key:n.refId,entitlement:s,feature:s.feature,amount:u.amount,blockSize:e.blockSize,currency:u.currency,hideChargePrice:e.billingModel===t.BillingModel.PerUnit,onBuyMore:r,onManageSubscription:a,canUpgradeSubscription:l,hasCustomSubscription:o}):null}))):null}function Ma(e){var n=e.onManageSubscription,r=e.onBuyMore,a=e.onCancelScheduledUpdates,o=e.onContactSupport,l=e.hiddenSections,c=e.cancelScheduledUpdatesButtonTitle,u=di(),s=u.customerPortal,d=u.textOverrides,p=u.theme,m=u.isLoading||!s,g=s||{},h=g.subscriptions,f=g.entitlements,y=g.canUpgradeSubscription,v=null==h?void 0:h.find((function(e){return e.status===t.SubscriptionStatus.Active})),b=null==h?void 0:h.find((function(e){return e.status===t.SubscriptionStatus.InTrial})),x=(null==v?void 0:v.pricingType)===t.PricingType.Custom,E=v||b;return i.createElement(Yi,{className:"stigg-customer-portal-subscriptions-overview",$backgroundColor:p.backgroundColor,$borderColor:p.borderColor},!m&&v&&v.scheduledUpdates&&i.createElement(Gi,{theme:p,subscription:v,onCancelScheduledUpdates:a,cancelScheduledUpdatesButtonTitle:c}),m||!E?i.createElement(ji,null):i.createElement("div",{className:"stigg-overview-layout",style:{display:"flex",alignItems:"flex-start",gap:64,flexWrap:"wrap"}},i.createElement("div",{style:{display:"flex",flexDirection:"column",flex:1}},i.createElement(Ei,{onManageSubscription:n,hideManageButton:x,textOverrides:d}),i.createElement(va,{mainSubscription:E,trialSubscription:b,theme:p,onManageSubscription:n}),v&&f&&i.createElement(Ta,{subscription:v,entitlements:f,onBuyMore:r,onManageSubscription:n,canUpgradeSubscription:!!y,hasCustomSubscription:x}),i.createElement(Li,{customerPortal:s,hiddenSections:l,textOverrides:d,theme:p})),i.createElement("div",{style:{display:"flex",flexDirection:"column",width:319,gap:24}},i.createElement(ia,{subscription:E,theme:p,onContactSupport:o,textOverrides:d}))))}var Aa=a("div",{target:"e2lw8x70"})({name:"7wpci2",styles:"display:flex;width:100%;align-items:flex-end;justify-content:flex-end;margin-bottom:24px"});function Ba(e){return i.createElement(Aa,{className:"stigg-customer-portal-header-layout"},i.createElement(Tr,{source:"customer_portal",showWatermark:e.showWatermark}))}var La=a(De,{target:"eb0pe7a1"})({name:"kxbue8",styles:"text-transform:none"}),Na=a(W.ExternalLink,{target:"eb0pe7a0"})("color:",(function(e){return e.theme.stigg.palette.primary}),";");function Ua(e){var t=e.text,n=e.url;return i.createElement(gi,{className:e.className,variant:"outlined",startIcon:i.createElement(Na,{size:20,strokeWidth:2.5}),onClick:function(){window.open(n,"_blank")}},i.createElement(La,{color:"primary.main"},t))}var Ia=a("div",{target:"e12mjvl51"})({name:"1hidw77",styles:"display:flex;flex-direction:column;align-items:flex-start;gap:16px;flex:1 0 0"}),Fa=a("div",{target:"e12mjvl50"})({name:"1jp5dot",styles:"display:flex;align-items:flex-start;gap:16px;align-self:stretch;flex-wrap:wrap"});function Oa(e){var t=e.rows;return i.createElement(Ia,null,i.createElement(De,{variant:"h6",color:"secondary",fontWeight:c.FontWeight.Medium},e.title),t.map((function(e){var t=e.classNamePrefix,n=e.label,r=e.value,a=e.valueTypographyProps;return i.createElement(Fa,{key:n},i.createElement(De,Object.assign({className:t+"-label",variant:"body1",color:"secondary",style:{width:80}},e.labelTypographyProps),n),i.createElement(De,Object.assign({className:t+"-text",variant:"body1",color:"secondary"},a),r))})))}function Da(){return i.createElement(P,{width:220,height:42})}function ja(){var e=di(),t=e.customerPortal,n=e.isLoading,r=e.textOverrides,a=e.theme,o=Fi("md"),l=(t||{}).billingInformation,c=!l||n,u=[];if(c?u.push.apply(u,[i.createElement(Ia,{key:"information-loading-data-top"},i.createElement(P,{width:220,height:12}),i.createElement(P,{width:220,height:12}),i.createElement(P,{width:220,height:12})),i.createElement(k,{key:"information-loading-data-divider",orientation:"vertical",style:{minHeight:93,display:o?"block":"none"}}),i.createElement(Ia,{key:"information-loading-data-bottom"},i.createElement(P,{width:220,height:12}),i.createElement(P,{width:220,height:12}),i.createElement(P,{width:220,height:12}))]):(u.push(i.createElement(Oa,{key:"information-billing-data-billed-to",title:"Billed to",rows:[{classNamePrefix:"stigg-customer-name",label:"Name",value:(null==l?void 0:l.name)||"-",valueTypographyProps:null!=l&&l.name?{}:{color:"disabled"}},{classNamePrefix:"stigg-customer-email",label:"Email",value:(null==l?void 0:l.email)||"-",valueTypographyProps:null!=l&&l.email?{}:{color:"disabled"}}]})),null!=l&&l.defaultPaymentMethodId&&l.defaultPaymentMethodLast4Digits&&l.defaultPaymentExpirationMonth&&l.defaultPaymentExpirationYear&&(u.unshift(i.createElement(k,{key:"information-billing-data-divider",orientation:"vertical",style:{minHeight:93,display:o?"block":"none"}})),u.unshift(i.createElement(Oa,{key:"information-billing-data-payment-method",title:"Payment method",rows:[{classNamePrefix:"stigg-credit-card",label:"Card",value:"Ending in "+l.defaultPaymentMethodLast4Digits},{classNamePrefix:"stigg-credit-card-expiration",label:"Expires",value:s.padStart(l.defaultPaymentExpirationMonth.toString(),2,"0")+"/"+l.defaultPaymentExpirationYear}]})))),!(c||null!=l&&l.name||null!=l&&l.email||null!=l&&l.defaultPaymentMethodId))return null;var d=c?i.createElement(Da,null):null!=t&&t.billingPortalUrl?i.createElement(Ua,{url:t.billingPortalUrl,text:r.editPaymentDetails,className:"stigg-edit-payment-details-button"}):null;return i.createElement(Yi,{className:"stigg-payment-details-section-layout",$backgroundColor:a.backgroundColor,$borderColor:a.borderColor},i.createElement(vi,{className:"stigg-payment-details-section-header"},i.createElement(bi,{isLoading:c,className:"stigg-payment-details-section-title",title:"Payment details"}),d),i.createElement("div",{style:{display:"flex",alignItems:"stretch",gap:o?64:32,flexWrap:"wrap"}},u))}var Wa=a(Yi,{target:"eqpkdww0"})("position:relative;.stigg-paywall-layout{width:100%;}.stigg-paywall-plans-layout{flex-wrap:nowrap;width:100%;overflow-x:auto;justify-content:unset;padding:10px 0px 0px 0px;}.stigg-paywall-plans-layout .stigg-plan-offering-container:first-of-type{margin-left:auto;}.stigg-paywall-plans-layout .stigg-plan-offering-container:last-child{margin-right:auto;}.","stigg-watermark","{display:none;}"),Ra=i.forwardRef((function(e,t){var n=e.paywallComponent,r=e.theme;return n?i.createElement(Wa,{className:"stigg-customer-portal-paywall-section",ref:t,$backgroundColor:r.backgroundColor,$borderColor:r.borderColor},i.createElement(vi,{className:"stigg-customer-portal-paywall-header"},i.createElement(bi,{isLoading:e.isLoading,className:"stigg-customer-portal-paywall-section-title",title:e.title})),n):null})),qa=a("div",{target:"e1gjjeod1"})({name:"6xtw2",styles:"width:100%;display:flex;flex-direction:column;align-items:center;& *{box-sizing:border-box;}"}),_a=a("div",{target:"e1gjjeod0"})({name:"1c31jfu",styles:"width:100%;display:flex;flex-direction:column;align-items:center;row-gap:24px"});function za(e,t,n){if(!t&&!n)return e;var r=$(e);return r===$(t||"")||r===$(n||"")?e:e+" ("+n+")"}var Ha=a("div",{target:"eqqveb80"})("display:flex;flex-direction:column;padding:24px;border:",(function(e){return"1px solid "+e.$borderColor}),";border-radius:10px;row-gap:16px;height:100%;",(function(e){return e.$highlight&&"background-color: "+e.theme.stigg.palette.backgroundSection}),";");function Va(e){var n,r,a,o,l=e.entitlement,c=e.subscriptionPrice,u=e.onManageSubscription,s=e.onBuyMore,d=e.hasCustomSubscription,p=e.canUpgradeSubscription,m=di().theme,h=!l.hasUnlimitedUsage&&l.currentUsage>l.usageLimit;return l.feature?i.createElement(Ha,{$highlight:!!c,$borderColor:m.borderColor},i.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:16}},i.createElement(ga,{variant:"body1"},l.feature&&za((o=l.feature).displayName,o.featureUnits,o.featureUnitsPlural)),c&&i.createElement(da,{title:i.createElement(De,{variant:"body1"},c.billingModel===t.BillingModel.PerUnit?"Billed for committed usage":"Billed for actual usage")},i.createElement($t,{icon:"DollarCoin",svgStrokeColor:m.iconsColor}))),i.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8}},i.createElement(ga,{variant:"body1",color:h?"error":"primary","data-testid":"usage-data-"+(null==(n=l.feature)?void 0:n.refId)},null==(r=l.currentUsage)?void 0:r.toLocaleString(),!l.hasUnlimitedUsage&&" / "+(null==(a=l.usageLimit)?void 0:a.toLocaleString())+" ("+ba(l.currentUsage||0,l.usageLimit)+"%)"),i.createElement(Ca,{entitlement:l,feature:l.feature,onBuyMore:s,canBuyMore:!!c,onManageSubscription:u,canUpgradeSubscription:p,hasCustomSubscription:d})),i.createElement(wa,{entitlement:l}),l.hasUnlimitedUsage||V(l.usageLimit)||V(l.currentUsage)||!l.resetPeriod||!l.usagePeriodEnd?null:i.createElement(De,{color:"secondary"},function(e){if(!e.resetPeriod||!e.usagePeriodEnd)return null;var t=function(t){return g.utc(e.usagePeriodEnd).diff(g.utc(),t)};switch(e.resetPeriod){case"MONTH":return"Resets monthly - in "+t("days")+" days";case"WEEK":return"Resets weekly - in "+t("days")+" days";case"DAY":return"Resets daily - in "+t("hours")+" hours";case"HOUR":return"Resets hourly - in "+t("minutes")+" minutes";default:return null}}(l)),l.hasUnlimitedUsage&&i.createElement(De,{color:"secondary"},"In current billing period")):null}var $a=a("div",{target:"eoaojje0"})({name:"3hgi0y",styles:"margin-top:32px"});function Za(){var e=Fi("md");return i.createElement(l,{container:!0,spacing:4,className:"stigg-subscription-usage-skeleton-layout",sx:{flexWrap:"wrap"}},s.range(6).map((function(t){return i.createElement(l,{key:t,item:!0,xs:e?4:12},i.createElement(P,{width:280,height:120}))})))}function Ga(e){var n=e.onManageSubscription,a=e.onBuyMore,o=e.filterEntitlements,c=r.useState(!1),u=c[0],d=c[1],p=Fi("md"),m=di(),g=m.customerPortal,h=m.textOverrides,f=m.theme,y=m.isLoading||!g,v=g||{},b=v.entitlements,x=v.subscriptions,E=null==b?void 0:b.filter((function(e){var n,r;return(null==(n=e.feature)?void 0:n.meterType)===t.MeterType.Fluctuating||(null==(r=e.feature)?void 0:r.meterType)===t.MeterType.Incremental})),k=null==x?void 0:x.find((function(e){return e.status===t.SubscriptionStatus.Active})),w=(null==k?void 0:k.pricingType)===t.PricingType.Custom,P=!(null==g||!g.canUpgradeSubscription),C=s.keyBy(null==k?void 0:k.prices,"feature.refId"),S=s.keyBy(E,"feature.refId"),T=s.compact(null==k?void 0:k.prices.map((function(e){return e.feature&&S[e.feature.refId]}))),M=s.compact(null==E?void 0:E.filter((function(e){return!C[e.feature.refId]}))),A=[].concat(T,M),B=o?o(A):A,L=p?B.length>2?4:6:12,N=u?B:B.slice(0,6);return y||null!=E&&E.length?i.createElement(Yi,{className:"stigg-subscription-usage-layout",$backgroundColor:f.backgroundColor,$borderColor:f.borderColor},i.createElement(vi,null,i.createElement(bi,{title:h.usageTabTitle,className:"stigg-customer-portal-usage-section-title",isLoading:y})),y?i.createElement(Za,null):i.createElement(i.Fragment,null,i.createElement(l,{container:!0,spacing:4},N.map((function(e){return i.createElement(l,{className:"stigg-entitlement-usage-"+e.feature.refId,key:e.feature.refId,item:!0,xs:L},i.createElement(Va,{key:e.feature.refId,subscriptionPrice:C[e.feature.refId],entitlement:e,onManageSubscription:n,onBuyMore:a,hasCustomSubscription:w,canUpgradeSubscription:P}))}))),B.length>6&&i.createElement($a,null,i.createElement(gi,{className:"stigg-usage-toggle-many-button",variant:"text",startIcon:i.createElement(u?W.Minus:W.Plus,null),onClick:function(){return d((function(e){return!e}))}},u?"Show less":"Show more")))):null}function Ya(e){var t=e.onManageSubscription,n=e.onBuyMore,a=e.onCancelScheduledUpdates,o=e.onContactSupport,l=e.paywallComponent,c=e.hiddenSections,u=e.filterEntitlements,s=Vr().stigg,d=di(),p=d.customerPortal,m=d.textOverrides,g=d.theme,h=d.isLoading,f=r.useRef(null),y=function(e){var n,r;t?t({intentionType:e.intentionType,customerSubscriptions:null!=(n=null==p?void 0:p.subscriptions)?n:[]}):null==f||null==(r=f.current)||r.scrollIntoView({behavior:"smooth"})},v=!(null!=c&&c.some((function(e){return"usage"===e}))),b=!(null!=c&&c.some((function(e){return"paymentDetails"===e||"billingInformation"===e}))),x=!(null!=c&&c.some((function(e){return"invoices"===e||"billingInformation"===e})));return i.createElement(qa,{className:"stigg-customer-portal-layout"},i.createElement(Ba,{showWatermark:s.isWidgetWatermarkEnabled&&!!p}),i.createElement(_a,{className:"stigg-customer-portal-sections"},i.createElement(Ma,{onCancelScheduledUpdates:a,onBuyMore:n,onManageSubscription:y,onContactSupport:o,hiddenSections:c,cancelScheduledUpdatesButtonTitle:m.cancelScheduledUpdatesButtonTitle}),v&&i.createElement(Ga,{onManageSubscription:y,onBuyMore:n,filterEntitlements:u}),i.createElement(Ra,{ref:f,paywallComponent:l,theme:g,title:m.paywallSectionTitle,isLoading:!p||h}),b&&i.createElement(ja,null),x&&i.createElement(Ka,null)))}var Qa=["textOverrides","theme","resourceId","productId"];function Ka(){var e=di(),t=e.customerPortal,n=e.textOverrides,r=e.theme,a=!t||e.isLoading,o=a?i.createElement(Da,null):null!=t&&t.billingPortalUrl?i.createElement(Ua,{url:t.billingPortalUrl,text:n.viewInvoiceHistory,className:"stigg-view-invoice-history-button"}):null;return a||null!=t&&t.billingPortalUrl?i.createElement(Yi,{className:"stigg-invoices-section-layout",$backgroundColor:r.backgroundColor,$borderColor:r.borderColor},i.createElement(vi,{className:"stigg-invoices-section-header"},i.createElement(bi,{isLoading:a,className:"stigg-invoices-section-title",title:n.invoicesTitle}),o)):null}var Xa=function(e){return A(e,"addon.displayName")};function Ja(e,t){return e.pricePoints.some((function(e){return e.billingPeriod===t}))}function eo(e){var t=e.addon,n=e.currency,r=e.billingCountryCode;return de({},t,{pricePoints:t.pricePoints.filter((function(e){return e.currency===n&&(!r||e.billingCountryCode===r)}))})}function to(){var e=To()[1];return function(t){return e((function(e){Y(e.addonsStep.addons,(function(e){return e.addon.id===t}))}))}}function no(){var e=To()[1];return function(t){return e((function(e){e.widgetState.isValid=t}))}}function ro(){var e,t,n={checkoutState:(e=To()[0]).checkout,widgetState:e.widgetState,checkoutLocalization:e.checkoutLocalization};return{checkoutState:n.checkoutState,widgetState:n.widgetState,checkoutLocalization:n.checkoutLocalization,setWidgetReadOnly:(t=To()[1],function(e){return t((function(t){t.widgetState.readOnly=e}))}),setIsValid:no()}}var io,ao=function(e,t){return e.minUnitQuantity&&t<e.minUnitQuantity?e.minUnitQuantity:e.maxUnitQuantity&&t>e.maxUnitQuantity?e.maxUnitQuantity:t},oo=function(e){return!(null==e||!e.pricePoints.some((function(e){return e.billingPeriod===X.BillingPeriod.Monthly})))},lo=function(e){return!(null==e||!e.pricePoints.some((function(e){return e.billingPeriod===X.BillingPeriod.Annually})))},co=function(e,t,n){return e===X.BillingPeriod.Monthly&&t||e===X.BillingPeriod.Annually&&n?e:null},uo=function(e){return e.pricingModel===t.BillingModel.PerUnit};function so(){var e=To()[1];return function(t,n){return e((function(e){var r=e.planStep.billableFeatures.find((function(e){return e.featureId===t}));r?r.quantity=n:e.planStep.billableFeatures.push({featureId:t,quantity:n})}))}}function po(){var e;return de({},To()[0].planStep,{setBillingPeriod:(e=To()[1],function(t){return e((function(e){e.planStep.billingPeriod=t}))}),setBillableFeature:so()})}!function(e){e.PLAN="PLAN",e.ADDONS="ADDONS",e.PAYMENT="PAYMENT"}(io||(io={}));var mo=[{key:io.PLAN,label:"Plan"},{key:io.ADDONS,label:"Add-ons"},{key:io.PAYMENT,label:"Payment details"}],go={activeStep:0,completedSteps:[],steps:mo,isDisabled:!1};function ho(){var e=To()[1];return function(t){return e((function(e){e.progressBar.completedSteps.push(t)}))}}function fo(){var e=To()[1];return function(){return e((function(e){var t=e.progressBar;t.isDisabled||(t.completedSteps.includes(t.activeStep)||t.completedSteps.push(t.activeStep),t.activeStep<t.steps.length-1&&(t.activeStep+=1))}))}}function yo(){var e=To()[1];return function(t){return e((function(e){e.progressBar.isDisabled=!!t}))}}function vo(){var e,t,n=To()[0].progressBar;return{currentStep:n.steps[n.activeStep],progressBarState:n,isLastStep:n.activeStep===n.steps.length-1,isCheckoutComplete:(t=n,t.completedSteps.length>=t.steps.length-1),setActiveStep:(e=To()[1],function(t){return e((function(e){e.progressBar.activeStep=t}))}),markStepAsCompleted:ho(),goNext:fo(),setIsDisabled:yo()}}function bo(){var e=To()[0],t=e.paymentStep;return de({},e.planStep,{addons:e.addonsStep.addons,promotionCode:e.promotionCode,billingAddress:t.billingAddress,taxPercentage:t.taxPercentage})}function xo(e){var t=e.billingAddress,n=e.taxPercentage;return t||n?{billingInformation:de({},t?{billingAddress:t}:{},n?{taxPercentage:n}:{})}:{}}var Eo=function(){var e=se(Fr.mark((function e(t){var n,r,i,a,o,l,c,u,s,d,p,m,g,h,f,y,v,b;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.stigg,r=t.customerId,i=t.planId,a=t.resourceId,o=t.promotionCode,l=t.billableFeatures,c=t.billingCountryCode,u=t.billingPeriod,s=t.billingAddress,d=t.taxPercentage,p=t.onMockCheckoutPreview,m=t.addons.map((function(e){return{addonId:e.addon.id,quantity:e.quantity}})),g=null,h=null,e.prev=4,!r||!i){e.next=15;break}if(f=de({customerId:r,planId:i,resourceId:a,billingCountryCode:c,addons:m,billingPeriod:u,promotionCode:o,billableFeatures:O(l)?void 0:l},xo({billingAddress:s,taxPercentage:d})),!p){e.next=11;break}e.t0=p(f),e.next=14;break;case 11:return e.next=13,n.previewSubscription(f);case 13:e.t0=e.sent;case 14:g=e.t0;case 15:e.next=21;break;case 17:e.prev=17,e.t1=e.catch(4),v=(null==e.t1||null==(y=e.t1.message)?void 0:y.split("Error:"))||[],h=null==(b=v[1])?void 0:b.trim();case 21:return e.abrupt("return",{subscriptionPreview:g,errorMessage:h});case 22:case"end":return e.stop()}}),e,null,[[4,17]])})));return function(t){return e.apply(this,arguments)}}(),ko=function(e){var t=(void 0===e?{}:e).onMockCheckoutPreview,n=Vr().stigg,i=bo(),a=To()[0].resourceId,o=ro(),l=o.widgetState,c=o.checkoutState||{},u=c.plan,s=c.customer;return{previewSubscriptionAction:r.useCallback(function(){var e=se(Fr.mark((function e(r){var o;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(void 0===r?{}:r).promotionCode,l.isValid){e.next=3;break}return e.abrupt("return",{subscriptionPreview:null,errorMessage:null});case 3:return e.abrupt("return",Eo({stigg:n,customerId:null==s?void 0:s.id,planId:null==u?void 0:u.id,resourceId:a,addons:i.addons,billableFeatures:i.billableFeatures,billingCountryCode:i.billingCountryCode,billingPeriod:i.billingPeriod,billingAddress:i.billingAddress,taxPercentage:i.taxPercentage,promotionCode:null!=o?o:i.promotionCode,onMockCheckoutPreview:t}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[n,null==s?void 0:s.id,null==u?void 0:u.id,a,i.addons,i.billableFeatures,i.billingCountryCode,i.billingPeriod,i.billingAddress,i.taxPercentage,i.promotionCode,l.isValid,t])}};function wo(){var e=To()[1];return function(t){return e((function(e){e.paymentStep.errorMessage=t}))}}function Po(){var e=To()[1];return function(t){return e((function(e){e.paymentStep.billingAddress=t}))}}function Co(){var e;return de({},To()[0].paymentStep,{setUseNewPaymentMethod:(e=To()[1],function(t){return e((function(e){e.paymentStep.useNewPaymentMethod=t}))}),setErrorMessage:wo(),setBillingAddress:Po()})}var So=i.createContext(null);So.displayName="CheckoutContext";var To=function(){var e=r.useContext(So);if(!e)throw new Error("Could not find Checkout context; You need to wrap your checkout components in an <CheckoutProvider> component.");return e},Mo=function(e){var t=e.children,n=e.initialState,a=r.useState(n),o=a[0],l=a[1];r.useEffect((function(){l(n)}),[n]);var c=r.useCallback((function(e){return l((function(t){return Z.produce(t,(function(t){return e(t)}))}))}),[l]),u=r.useMemo((function(){return[o,c]}),[c,o]);return i.createElement(So.Provider,{value:[u[0],u[1]]},t)};function Ao(e){var n,a=e.children,o=e.textOverrides,l=e.theme,c=e.preferredBillingPeriod,u=e.billableFeatures,s=e.billingCountryCode,d=e.billingInformation,p=e.skipCheckoutSteps,h=function(e){var t=e.planId,n=e.resourceId,i=e.billingCountryCode,a=e.onMockCheckoutState,o=Vr().stigg,l=r.useState(!0),c=l[0],u=l[1],s=r.useState(),d=s[0],p=s[1];return r.useEffect((function(){var e=function(){var e=se(Fr.mark((function e(){return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.getCheckoutState({planId:t,resourceId:n,billingCountryCode:i});case 3:p(e.sent),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),Or.error("Failed to load checkout "+(null==e.t0?void 0:e.t0.message),e.t0);case 10:return e.prev=10,u(!1),e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[0,7,10,13]])})));return function(){return e.apply(this,arguments)}}();if(a)return u(!1),void p(a({planId:t,resourceId:n,billingCountryCode:i}));o.isCustomerLoaded&&(u(!0),e())}),[o,o.isCustomerLoaded,n,t,i,a]),{checkout:d,isLoading:c,isWidgetWatermarkEnabled:o.isWidgetWatermarkEnabled}}({resourceId:e.resourceId,planId:e.planId,billingCountryCode:s,onMockCheckoutState:e.onMockCheckoutState}),f=h.checkout,y=h.isLoading,v=h.isWidgetWatermarkEnabled,b=null!=f&&f.configuration?function(e){var t=e.palette,n=e.customCss;return{palette:{primary:(null==t?void 0:t.primary)||void 0,backgroundPaper:(null==t?void 0:t.backgroundColor)||void 0,outlinedBorder:(null==t?void 0:t.borderColor)||void 0,text:{primary:(null==t?void 0:t.textColor)||void 0},backgroundHighlight:(null==t?void 0:t.summaryBackgroundColor)||void 0},typography:qr(e.typography,jr),customCss:n||void 0}}(f.configuration):{typography:qr(jr)},x=li(b),E=r.useMemo((function(){var e,n,r,i,a=function(e,t,n){var r=(e||{}).palette;return{primary:(null==t?void 0:t.primary)||(null==r?void 0:r.primary)||"rgb(50, 126, 238)",textColor:(null==t?void 0:t.textColor)||(null==r?void 0:r.text.primary)||"rgb(0, 30, 108)",backgroundColor:(null==t?void 0:t.backgroundColor)||(null==r?void 0:r.backgroundPaper)||"rgb(255, 255, 255)",borderColor:(null==t?void 0:t.borderColor)||(null==r?void 0:r.outlinedBorder)||"rgb(235, 237, 243)",summaryBackgroundColor:(null==t?void 0:t.summaryBackgroundColor)||(null==r?void 0:r.backgroundHighlight)||"rgb(109, 121, 144)",paymentInputBackgroundColor:null==t?void 0:t.paymentInputBackgroundColor,paymentInputBorderColor:null==t?void 0:t.paymentInputBorderColor,paymentInputBorderRadius:null==t?void 0:t.paymentInputBorderRadius}}(x,l),h=m({changePlan:"Change",billingPeriodsTitle:"Billing cycle",addAddonText:"Add",newPaymentMethodText:"New payment method",newPaymentMethodBillingAddressTitle:"Billing address",newPaymentMethodCardTitle:"Payment method",summary:{title:"Order summary",planName:function(e){return e.plan.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:function(){return"Base charge"},totalText:"Total",totalDueText:"Total due today",totalBillingPeriodText:function(e){return"Billed "+e.billingPeriod.toLowerCase()},appliedCreditsTitle:"Applied credits",creditsForUnusedTimeText:function(e){return"Your account will be granted credits worth "+e.credits+" for unused time, which will be automatically applied to future payments."},discountText:function(e){var n,r=e.discountDetails;n=r.type===t.DiscountType.Percentage?r.value+"% off":""+Pn({amount:r.value,currency:e.currency});var i="";switch(r.durationType){case t.DiscountDurationType.Once:i=" once";break;case t.DiscountDurationType.Repeating:i=(r.type===t.DiscountType.Fixed?" per month":"")+" for "+r.durationInMonths+" months";break;case t.DiscountDurationType.Forever:default:i=""}return""+n+i},taxTitle:function(e){var t=e.taxDetails;return"Tax ("+(null==t?void 0:t.percentage)+"%)"},changesWillApplyAtEndOfBillingPeriod:function(e){return"Your changes will take effect at the end of your current billing cycle on "+g(e.billingPeriodEnd).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:function(){return"We’re sorry to see you cancel your paid subscription 😭"},freePlanHeader:function(){return"New plan"},freePlanName:function(e){return""+e.plan.displayName},freePlanPriceText:function(){return"Free"},paidPlanHeader:function(){return"Current plan"},paidPlanName:function(e){return""+e.plan.displayName},paidPlanPriceText:function(e){var t=e.billingPeriod;return"Paid plan"+(t?", billed "+t.toLowerCase():"")}}},o),b=function(e){var t=e.plan,n=e.activeSubscription,r=e.billingCountryCode,i=e.preconfiguredBillableFeatures,a=function(e){var t,n,r=e.plan,i=e.activeSubscription,a=e.preferredBillingPeriod,o=oo(r),l=lo(r);if(a){var c=co(a,o,l);if(c)return c}if((null==i||null==(t=i.plan)?void 0:t.id)===(null==r?void 0:r.id))return(null==i||null==(n=i.price)?void 0:n.billingPeriod)||X.BillingPeriod.Monthly;if(null!=i&&i.prices&&(null==i?void 0:i.prices.length)>0){var u=co(null==i?void 0:i.prices[0].billingPeriod,o,l);if(u)return u}return l?X.BillingPeriod.Annually:X.BillingPeriod.Monthly}({plan:t,activeSubscription:n,preferredBillingPeriod:e.preferredBillingPeriod}),o=function(e,t,n){var r;if(!t)return[];var i=Q(e,"featureId"),a=Q(K(null==n||null==(r=n.prices)?void 0:r.map((function(e){var t=e.feature;return t&&uo(e)?{featureId:t.featureId,quantity:t.unitQuantity||null}:null}))),"featureId");return K(null==t?void 0:t.map((function(e){var t,n,r,o,l=null==(t=e.feature)?void 0:t.featureId;if(!l||!uo(e))return null;var c=(null==(n=i[l])?void 0:n.quantity)||(null==(r=a[l])?void 0:r.quantity);return o=ao(e,c||1),e.isTieredPrice&&!gn(e.tiers)&&(o=un(e.tiers,o).upTo),{featureId:l,quantity:o}})))}(i,null==t?void 0:t.pricePoints.filter((function(e){return e.billingPeriod===a})),n);return{billingPeriod:a,billableFeatures:o,billingCountryCode:r}}({preferredBillingPeriod:c,plan:null==f?void 0:f.plan,activeSubscription:null==f?void 0:f.activeSubscription,billingCountryCode:s,preconfiguredBillableFeatures:null!=u?u:[]}),E=function(e){var n,r,i=e.activeSubscription,a=e.plan,o=e.billingPeriod,l=e.billingCountryCode,c=[],u=(null==a||null==(n=a.pricePoints)||null==(r=n[0])?void 0:r.currency)||t.Currency.Usd,s=function(e){return A(e,"displayName")}(function(e){var t,n=e.addons,r=e.billingPeriod,i=e.billingCountryCode,a=e.currency;return(null==n||null==(t=n.filter((function(e){return Ja(e,r)})))?void 0:t.map((function(e){return eo({addon:e,currency:a,billingCountryCode:i})})))||[]}({addons:null==a?void 0:a.compatibleAddons,billingPeriod:o,billingCountryCode:l,currency:u})),d=function(e){var t,n=e.addons,r=e.billingPeriod,i=e.billingCountryCode,a=e.currency;return(null==n||null==(t=n.filter((function(e){return Ja(e.addon,r)})))?void 0:t.map((function(e){return de({},e,{addon:eo({addon:e.addon,currency:a,billingCountryCode:i})})})))||[]}({addons:null==i?void 0:i.addons,billingPeriod:o,billingCountryCode:l,currency:u});return null!=d&&d.length&&null!=s&&s.length&&(c=Xa(d.filter((function(e){return s.some((function(t){return t.id===e.addon.id}))})))),{addons:c,initialAddons:G(c),availableAddons:s}}({plan:null==f?void 0:f.plan,billingPeriod:b.billingPeriod,activeSubscription:null==f?void 0:f.activeSubscription}),k={useNewPaymentMethod:!(null!=(i=(r={customer:null==f?void 0:f.customer,taxPercentage:null==d||null==(e=d.taxDetails)?void 0:e.taxPercentage}).customer)&&i.paymentMethodDetails),taxPercentage:r.taxPercentage},w=function(e){var t=e.skipCheckoutSteps,n=e.plan,r=e.availableAddons,i=e.availableCharges,a=e.preferredBillingPeriod,o=e.preconfiguredBillableFeatures;if(e.isLoading||!n)return go;var l=[];return t.includes("PLAN")&&function(e,t,n,r){if(function(e){return oo(e)&&lo(e)}(e)&&!r)return!1;var i=t.map((function(e){return e.featureId})),a=n.map((function(e){return e.featureId}));return!(i.length!==a.length||!i.every((function(e){return a.includes(e)})))}(n,i,o,a)&&l.push(io.PLAN),(0===(null==r?void 0:r.length)||t.includes("ADDONS"))&&l.push(io.ADDONS),de({},go,{steps:mo.filter((function(e){return!l.includes(e.key)}))})}({isLoading:y,skipCheckoutSteps:null!=p?p:[],plan:null==f?void 0:f.plan,availableAddons:E.availableAddons,availableCharges:b.billableFeatures,preferredBillingPeriod:c,preconfiguredBillableFeatures:null!=u?u:[]});return{checkout:f,checkoutLocalization:h,stiggTheme:x,theme:a,progressBar:w,planStep:b,addonsStep:E,paymentStep:k,resourceId:null==f||null==(n=f.resource)?void 0:n.id,widgetState:{readOnly:!1,isValid:!0,isLoadingCheckoutData:y},isWidgetWatermarkEnabled:v}}),[c,s,f,y,p,null==d||null==(n=d.taxDetails)?void 0:n.taxPercentage]);return i.createElement(ui,{key:null==f?void 0:f.plan.id,componentTheme:b},i.createElement(Mo,{initialState:E},a))}var Bo,Lo=a("div",{target:"ergo9xd2"})("margin:auto;min-height:760px;max-width:920px;display:flex;position:relative;flex-direction:column;align-items:center;background-color:",(function(e){return e.theme.stigg.palette.backgroundPaper}),";border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";& *{box-sizing:border-box;}padding:16px 16px;",Ii.md,"{padding:32px;width:calc(100% - 64px);border-radius:10px;}"),No=a(I,{target:"ergo9xd1"})("display:flex;align-items:flex-start;gap:32px;flex-wrap:wrap;width:100%;flex-direction:column;",Ii.md,"{flex-direction:row;}"),Uo=a(I,{target:"ergo9xd0"})("display:flex;flex-direction:column;gap:0;flex:2;width:100%;",Ii.md,"{width:auto;}"),Io=a(H,{shouldForwardProp:function(e){return!e.startsWith("$")},target:"e9upyia2"})((function(e){var t,n=e.theme,r=e.$disabled;return(t={})["&."+z.linearProgressClasses.root]={borderRadius:n.stigg.border.radius,backgroundColor:n.stigg.palette.outlinedBorder},t["& ."+z.linearProgressClasses.bar]={backgroundColor:r?n.stigg.palette.primaryLight:n.stigg.palette.primary},t}),""),Fo=a(b,{target:"e9upyia1"})((function(){var e;return(e={})["&."+v.buttonClasses.root]={textTransform:"none",lineHeight:"inherit",justifyContent:"flex-start",padding:"8px 4px"},e}),""),Oo=a($t,{shouldForwardProp:function(e){return!e.startsWith("$")},target:"e9upyia0"})((function(e){var t=e.theme,n=e.$disabled;return{circle:{stroke:n?t.stigg.palette.primaryLight:t.stigg.palette.primary,fill:e.$shouldFill?n?t.stigg.palette.primaryLight:t.stigg.palette.primary:void 0}}}),""),Do=function(){var e=vo(),t=e.progressBarState,n=e.setActiveStep,a=e.currentStep,o=ro().widgetState,c=Fi("md"),u=r.useRef(),s=o.readOnly,d=o.isLoadingCheckoutData,p=t||{},m=p.activeStep,g=p.completedSteps,h=p.steps,f=100*(m+1)/h.length,y=i.useState(a),v=y[0],b=y[1];return r.useEffect((function(){c||u.current&&a!==v&&u.current.scrollIntoView({behavior:"smooth"}),b(a)}),[a,c,v,b]),1===t.steps.length?null:i.createElement(I,{className:"stigg-checkout-progress-container",sx:{width:"100%",mb:3},ref:u},i.createElement(Io,{variant:"determinate",value:f,$disabled:s}),i.createElement(l,{container:!0,display:"flex"},h.map((function(e,r){var a=e.key,o=e.label,u=g.includes(r),p=s||r>m&&!u&&!g.includes(r-1)||m!==r&&t.isDisabled,h=p?"OutlinedCheckedCircleDisabled":"OutlinedCheckedCircle";return i.createElement(l,{key:a,item:!0,display:"flex",flexDirection:"row",flex:c?1:"auto",justifyContent:"flex-start"},d?i.createElement(In,{width:120,height:20,style:{marginTop:8}}):i.createElement(Fo,{onClick:function(){return n(r)},fullWidth:!0,disabled:p},i.createElement(l,{item:!0,display:"flex",flexDirection:"row",alignItems:"center",gap:1},i.createElement(ee,{icon:i.createElement(Oo,{icon:u?h:"OutlinedCircle",$disabled:p,$shouldFill:u})}),i.createElement(De,{variant:"h6",color:p?"primary.main.light":"primary.main"},o))))}))))},jo=[t.BillingModel.FlatFee,t.BillingModel.PerUnit,t.BillingModel.UsageBased],Wo=function(e){return r.useMemo((function(){return function(e){return A(e,[function(e){return jo.indexOf(e.pricingModel)},function(e){var t;return null==(t=e.feature)?void 0:t.displayName}])}(e)}),[e])};function Ro(){var e;return{promotionCode:To()[0].promotionCode,setPromotionCode:(e=To()[1],function(t){return e((function(e){e.promotionCode=t}))})}}function qo(){return(qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var _o=a((function(e){return r.createElement("svg",qo({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Bo||(Bo=r.createElement("g",{stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M10 4.167v11.666M4.167 10h11.667"}))))}),{shouldForwardProp:function(e){return!e.startsWith("$")},target:"e3hfkj90"})("margin-right:8px;path{stroke:",(function(e){var t=e.theme;return e.$disabled?t.stigg.palette.text.disabled:t.stigg.palette.primary}),";}"),zo=function(e){var t=e.checkoutLocalization,n=e.disabled;return i.createElement(An,{disabled:n,fullWidth:!0,className:"stigg-checkout-summary-add-coupon-code-button",sx:{textTransform:"none",justifyContent:"flex-start",color:n?"text.disabled":"primary.main"},variant:"text",size:"medium",onClick:e.onAddClick},i.createElement(_o,{$disabled:n,className:"stigg-checkout-summary-add-coupon-code-button-icon"}),i.createElement(De,{className:"stigg-checkout-change-plan-button-text",color:n?"disabled":"primary.main",style:{lineHeight:"24px"},variant:"h3"},t.summary.addCouponCodeText))},Ho=a(An,{target:"e8kocin0"})("padding:4px 10px;min-width:unset;border-radius:",(function(e){return e.theme.stigg.border.radius}),";display:flex;align-items:center;"),Vo=function(e){var t=e.disabled,n=e.checkoutLocalization,a=e.onMockCheckoutPreview,o=Ro().setPromotionCode,c=r.useState(!1),u=c[0],s=c[1],d=i.useState(""),p=d[0],m=d[1],g=i.useState(!1),h=g[0],f=g[1],y=i.useState(""),v=y[0],b=y[1],x=ko({onMockCheckoutPreview:a}).previewSubscriptionAction,E=function(){var e=se(Fr.mark((function e(){var t,n,r,i;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),b(""),e.next=4,x({promotionCode:p});case 4:r=(n=e.sent).subscriptionPreview,!(i=n.errorMessage)&&null!=r&&null!=(t=r.immediateInvoice)&&t.discountDetails?(o(p.toUpperCase()),s(!1)):i&&b(i),f(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return u?i.createElement(l,null,i.createElement(De,{variant:"body1",color:v?"error":t?"disabled":"primary.main"},n.summary.couponCodeTitle),i.createElement(Bn,{disabled:t,autoFocus:!0,variant:"outlined",fullWidth:!0,error:!!v,value:p,onChange:function(e){m(e.target.value)},inputProps:{maxLength:20},onKeyDown:function(e){"Enter"===e.key&&(E(),e.preventDefault())},InputProps:{endAdornment:i.createElement(Ho,{variant:"contained",disabled:t,onClick:function(){E()}},h?i.createElement(ne,{size:18,sx:{color:"white"}}):i.createElement($t,{style:{display:"flex"},icon:"ArrowForward"}))}}),!!v&&i.createElement(De,{variant:"body1",color:"error"},v)):i.createElement(zo,{disabled:t,onAddClick:function(){return s(!0)},checkoutLocalization:n})},$o=a(l,{target:"e1cvrfx31"})("width:auto;display:inline-flex;align-items:center;flex-direction:row;gap:8px;padding:6px 8px;border-radius:",(function(e){return e.theme.stigg.border.radius}),";border:1px solid ",(function(e){return e.theme.stigg.palette.primary}),";"),Zo=a($t,{shouldForwardProp:function(e){return"style"!==e},target:"e1cvrfx30"})("display:flex;g{stroke:",(function(e){return e.theme.stigg.palette.primary}),";}path{fill:",(function(e){return e.$shouldFill?e.theme.stigg.palette.primary:void 0}),";}"),Go=function(e){var t=e.promotionCode,n=e.onClearPromotionCode;return i.createElement($o,{container:!0},i.createElement(l,{item:!0,display:"flex",gap:1,alignItems:"center"},i.createElement(Zo,{icon:"Coupon"}),i.createElement(De,{variant:"body1",color:"primary.main",lineHeight:"auto"},t)),i.createElement(l,{item:!0},i.createElement(An,{variant:"text",sx:{minWidth:"unset",padding:0},onClick:n},i.createElement(Zo,{icon:"Close",$shouldFill:!0}))))},Yo=a("div",{target:"eqejwsl0"})({name:"1k6141t",styles:"margin:16px 0"}),Qo=function(e){var t=e.disabled,n=e.checkoutLocalization,r=e.onMockCheckoutPreview,a=Ro(),o=a.promotionCode,l=a.setPromotionCode,c=o?i.createElement(Go,{promotionCode:o,onClearPromotionCode:function(){l("")}}):i.createElement(Vo,{disabled:t,checkoutLocalization:n,onMockCheckoutPreview:r});return i.createElement(Yo,null,c)},Ko=["postal_code"];function Xo(e){var t,n=e.onBillingAddressChange,r=e.collectPhoneNumber,a=ro(),o=a.checkoutState,c=a.checkoutLocalization,u=a.widgetState,s=a.setWidgetReadOnly,d=Co().setBillingAddress,p=o||{},m=p.customer,g=p.configuration,h=u.readOnly,f=!!(null!=r?r:null==g||null==(t=g.content)?void 0:t.collectPhoneNumber);return i.createElement(l,{flexDirection:"column",container:!0,gap:3,padding:"16px",sx:{pointerEvents:h?"none":void 0}},i.createElement(l,{flexDirection:"column",container:!0,gap:2},i.createElement(De,{variant:"h6"},c.newPaymentMethodBillingAddressTitle),i.createElement(J.AddressElement,{onChange:function(e){if(e.complete){var t=e.value.address,r=de({postalCode:t.postal_code},pe(t,Ko));s(!0),d(r),n?function(){var e=se(Fr.mark((function e(){return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({billingAddress:r});case 2:s(!1);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()():s(!1)}},options:{mode:"billing",fields:{phone:f?"always":"auto"},defaultValues:de({},(null==m?void 0:m.name)&&{name:m.name})}})),i.createElement(l,{flexDirection:"column",container:!0,gap:2},i.createElement(De,{variant:"h6"},c.newPaymentMethodCardTitle),i.createElement(J.PaymentElement,{onChange:function(){},onReady:function(){},options:{readOnly:h,terms:{card:"never"},defaultValues:{billingDetails:de({},(null==m?void 0:m.name)&&{name:m.name},(null==m?void 0:m.email)&&{email:m.email})}}})))}var Jo=[t.PaymentCollection.Failed,t.PaymentCollection.Processing];function el(e){return tl.apply(this,arguments)}function tl(){return(tl=se(Fr.mark((function e(t){var n,r;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.elements){e.next=5;break}return console.error("Stripe elements not initialized"),e.abrupt("return",{success:!1,errorMessage:"Stripe elements not initialized"});case 5:return e.next=7,n.submit();case 7:if(!(r=e.sent.error)){e.next=12;break}return console.log(r.message),e.abrupt("return",{success:!1,errorMessage:r.message||""});case 12:return e.abrupt("return",{success:!0});case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function nl(e){return rl.apply(this,arguments)}function rl(){return(rl=se(Fr.mark((function e(n){var r,i,a,o,l,c,u,s;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=null==(o=null==(i=n.applySubscriptionResults)?void 0:i.subscription)||null==(r=o.latestInvoice)?void 0:r.paymentSecret,c=null==o?void 0:o.paymentCollection,!(a=n.stripe)||!l||c!==t.PaymentCollection.ActionRequired){e.next=13;break}return e.next=7,a.handleNextAction({clientSecret:l});case 7:if(!(u=e.sent.error)){e.next=11;break}return e.abrupt("return",{errorMessage:u.message||""});case 11:e.next=15;break;case 13:if(!c||!Jo.includes(c)){e.next=15;break}return e.abrupt("return",{errorMessage:(null==o||null==(s=o.latestInvoice)?void 0:s.errorMessage)||"An error occurred - try again later"});case 15:return e.abrupt("return",{subscription:o});case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function il(e){return al.apply(this,arguments)}function al(){return(al=se(Fr.mark((function e(t){var n,r,i,a,o,l,c;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.stripe,r=t.elements,i=t.clientSecret,e.next=3,n.confirmSetup({elements:r,confirmParams:{return_url:window.location.href},redirect:"if_required"});case 3:if(!(l=e.sent.error)){e.next=9;break}"card_error"===l.type||"validation_error"===l.type?"card_error"===l.type&&(o=l.message||""):o="An unexpected error occurred.",e.next=21;break;case 9:return e.prev=9,e.next=12,n.retrieveSetupIntent(i);case 12:null!=(c=e.sent.setupIntent)&&c.payment_method&&(a=c.payment_method),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(9),o="An unexpected error occurred.",console.error(e.t0);case 21:return e.abrupt("return",{newPaymentMethodId:a,setupErrorMessage:o});case 22:case"end":return e.stop()}}),e,null,[[9,17]])})))).apply(this,arguments)}function ol(e){return ll.apply(this,arguments)}function ll(){return(ll=se(Fr.mark((function e(t){var n,r,i,a,o,l,c;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.elements,i=t.setupIntentClientSecret,(n=t.stripe)&&r&&i){e.next=3;break}return e.abrupt("return",{success:!1});case 3:return e.next=5,el({elements:r});case 5:if((a=e.sent).success){e.next=8;break}return e.abrupt("return",{success:!1,errorMessage:a.errorMessage});case 8:return e.next=10,il({stripe:n,elements:r,clientSecret:i});case 10:if(l=(o=e.sent).newPaymentMethodId,!(c=o.setupErrorMessage)&&l){e.next=15;break}return e.abrupt("return",{success:!1,errorMessage:c});case 15:return e.abrupt("return",{success:!0,paymentMethodId:l});case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var cl={v:"5.12.1",fr:30,ip:0,op:201,w:700,h:700,nm:"Check",ddd:0,assets:[],layers:[{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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.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:!1}],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:[.833],y:[.833]},o:{x:[.167],y:[.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:!1},{ty:"st",c:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:0,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:30,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:61,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.338],y:[1]},o:{x:[.333],y:[0]},t:87,s:[50]},{t:122,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.338],y:[1]},o:{x:[.333],y:[0]},t:87,s:[45]},{t:122,s:[0]}],ix:2},o:{a:1,k:[{i:{x:[.474],y:[1]},o:{x:[.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:!1}],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}],markers:[],props:{}},ul=a(I,{target:"eeyi5d31"})("@keyframes blurFade{0%{background-color:",(function(e){return p(e.theme.stigg.palette.backgroundPaper).alpha(0).toString()}),";backdrop-filter:blur(0px);}100%{background-color:",(function(e){return p(e.theme.stigg.palette.backgroundPaper).alpha(.9).toString()}),";backdrop-filter:blur(6.5px);}}position:absolute;top:0;left:0;bottom:0;right:0;z-index:5;background-color:",(function(e){return p(e.theme.stigg.palette.backgroundPaper).alpha(.9).toString()}),";animation:blurFade 2s ease-in forwards;display:flex;flex-direction:column;justify-content:center;* rect{fill:transparent;}& path{stroke:",(function(e){return e.theme.stigg.palette.primary}),";}"),sl=a(De,{target:"eeyi5d30"})({name:"1kkk1zv",styles:"@keyframes fadeIn{0%{opacity:0;}75%{opacity:0;}100%{opacity:1;}}align-self:center;animation:fadeIn 5s ease-in forwards"});function dl(e){var t=e.checkoutLocalization,n=r.useRef();return r.useEffect((function(){n.current&&n.current.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})}),[]),i.createElement(ul,{className:"stigg-checkout-success-container",ref:n},i.createElement(ae,{options:{animationData:cl,loop:!1,autoplay:!0},width:350,height:"auto",style:{display:"flex",justifyContent:"center"}}),i.createElement(sl,{variant:"h1",color:"primary.main"},t.summary.checkoutSuccessText))}var pl,ml=function(e){return new Promise((function(t){return setTimeout(t,e)}))},gl=function(e){var t=e.width,n=e.height,r=e.children;return e.isLoading?i.createElement(In,{width:void 0===t?50:t,height:void 0===n?16:n}):i.createElement(i.Fragment,null,r)},hl=function(e){var t,n,r,a,o=e.isFetchingSubscriptionPreview,l=e.checkoutLocalization,c=(e.subscriptionPreview||{}).immediateInvoice;if(null==c||null==(t=c.proration)||null==(n=t.netAmount)||!n.amount||(null==c||null==(r=c.proration)||null==(a=r.netAmount)?void 0:a.amount)>=0)return null;var u=Pn({amount:-1*c.proration.netAmount.amount,currency:c.proration.netAmount.currency,minimumFractionDigits:2});return i.createElement(De,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-remaining-credits"},i.createElement(gl,{isLoading:o,width:"100%"},l.summary.creditsForUnusedTimeText({credits:u})))},fl=function(e){var t=e.subscriptionPreview,n=e.activeSubscription,r=e.isFetchingSubscriptionPreview,a=e.checkoutLocalization;if(null==t||!t.hasScheduledUpdates||null==n||!n.currentBillingPeriodEnd)return null;var o="function"==typeof a.summary.changesWillApplyAtEndOfBillingPeriod?a.summary.changesWillApplyAtEndOfBillingPeriod({billingPeriodEnd:n.currentBillingPeriodEnd}):a.summary.changesWillApplyAtEndOfBillingPeriod;return i.createElement(De,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-scheduled-updates"},i.createElement(gl,{isLoading:r,width:"100%"},o))},yl=function(e){var n=e.subscriptionPreview,r=e.activeSubscription,a=e.plan,o=e.isFetchingSubscriptionPreview,l=e.billingPeriod,c=(n||{}).recurringInvoice;if(!n||null==c||!c.total.amount)return null;var u,s,d=n.hasScheduledUpdates?null==r?void 0:r.currentBillingPeriodEnd:null==n?void 0:n.billingPeriodRange.end,p=Pn(de({},c.total,{minimumFractionDigits:2})),m=null==a?void 0:a.pricePoints.some((function(e){return e.pricingModel===t.BillingModel.UsageBased})),h=null==a?void 0:a.pricePoints.some((function(e){return e.pricingModel!==t.BillingModel.UsageBased})),f="We will bill you ",y=p+" ";switch(m&&(h?y+="+":y="for",y+=" applicable usage-based charges for this subscription "),l){case t.BillingPeriod.Monthly:s="month",u="the "+g(d).format("Do");break;case t.BillingPeriod.Annually:s="year",u=g(d).format("MMMM Do")}return i.createElement(De,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-next-billing"},i.createElement(gl,{isLoading:o,width:"100%"},f+=y+"for this subscription every "+s+" on "+u+", unless you cancel."))};function vl(e){return i.createElement(j.Box,{className:"stigg-checkout-summary-captions"},i.createElement(hl,Object.assign({},e)),i.createElement(fl,Object.assign({},e)),i.createElement(yl,Object.assign({},e)))}function bl(e){var n=e.quantity,r=e.totalAmount,i=e.billingPeriod,a=e.currency,o=e.priceAmount,l=e.blockSize||1,c=n&&(e.pricingModel===t.BillingModel.PerUnit||n>1)?Cn(n)+" "+(l>1?"for":"x")+" ":"",u=i===t.BillingPeriod.Annually?" x 12 months":"",s=Pn({amount:(o||r/n)/(i===t.BillingPeriod.Annually?12:1),currency:a,minimumFractionDigits:2}),d=Pn({amount:r,currency:a,minimumFractionDigits:2});return""+c+s+u+" "+(u||c?" = "+d:"")}function xl(e){var t=e.price,n=t.tiers||[],r=pn(n,e.unitQuantity).breakdown;return 1===r.length?null:i.createElement(i.Fragment,null,r.map((function(e,r){var a=e.unitQuantity,o=e.amount;return i.createElement(kl,null,i.createElement(Pl,{key:r,style:{alignItems:"flex-start"}},i.createElement(De,{variant:"body1",color:"tertiary",style:{whiteSpace:"nowrap"}},function(e,t){var n=e[t],r=n.upTo;if(!n.unitPrice)return"";if(0===t)return"First "+r;var i=(e[t-1].upTo||0)+1;return h(r)?Cn(i)+" and above":"Next "+Cn(i)+" to "+Cn(r)}(n,r)),i.createElement(De,{variant:"body1",color:"tertiary",style:{whiteSpace:"nowrap"}},bl({quantity:a,totalAmount:o,currency:t.currency,pricingModel:t.pricingModel,billingPeriod:t.billingPeriod,tiers:t.tiers,tiersMode:t.tiersMode,blockSize:t.blockSize,priceAmount:t.amount}))))})))}var El=L(W.ChevronRight)(pl||(pl=me(["\n height: ",";\n width: ",";\n transition: all 0.2s ease-in;\n ","\n"])),(function(e){var t=e.$size;return(void 0===t?24:t)+"px"}),(function(e){var t=e.$size;return(void 0===t?24:t)+"px"}),(function(e){return e.$isOpen&&"transform: rotate(90deg)"})),kl=a("div",{target:"e1ultpe62"})({name:"x9km8e",styles:"&+&{margin-top:16px;}"}),wl=a("div",{target:"e1ultpe61"})({name:"96yaa5",styles:"margin-top:16px;margin-left:16px"}),Pl=a("div",{target:"e1ultpe60"})("display:flex;flex-direction:column;gap:16px;",Ii.lg,"{flex-direction:row;align-items:center;justify-content:space-between;}"),Cl=function(e){var t=i.createElement(De,{variant:"body1"},e.checkoutLocalization.summary.payAsYouGoTooltipText);return i.createElement(da,{placement:"left",title:t},i.createElement($t,{icon:"PayAsYouGoCharge",style:{display:"flex"}}))},Sl=function(e){var n,a=e.checkoutLocalization,o=e.label,c=e.quantity,u=e.price,s=Fi("lg"),d=r.useState(!1),p=d[0],m=d[1],g=function(){return m((function(e){return!e}))},f=u.pricingModel===t.BillingModel.UsageBased,y=u.isTieredPrice?mn(u,c):(u.amount||0)*Math.ceil(c/(u.blockSize||1));u.tiersMode===t.TiersMode.Graduated&&u.tiers&&!O(u.tiers)&&!h(u.tiers[0].upTo)&&c>u.tiers[0].upTo&&(n=i.createElement(xl,{price:u,unitQuantity:c}));var v=i.createElement(De,{variant:"body1",color:"secondary"},o);return n&&(v=i.createElement(R,{onClick:g,underline:"none",style:{cursor:"pointer"}},v)),i.createElement(kl,{className:"stigg-checkout-summary-base-charges-container"},i.createElement(Pl,{style:{alignItems:"flex-start"}},i.createElement(l,{item:!0,display:"flex",gap:.5,style:{whiteSpace:s?"nowrap":"break-spaces"}},v,n&&i.createElement(j.IconButton,{onClick:g,sx:{padding:0}},i.createElement(El,{$isOpen:p,$size:16}))),i.createElement(l,{item:!0,display:"flex",gap:1,alignItems:"center"},f&&i.createElement(Cl,{checkoutLocalization:a}),i.createElement(De,{variant:"body1",color:"secondary",style:{whiteSpace:s?"nowrap":"break-spaces"}},function(e){var n=e.totalAmount,r=e.quantity,i=e.tiersMode,a=e.tiers,o=e.currency;if(function(e){return null==e?void 0:e.every((function(e){return!e.unitPrice||h(e.upTo)}))}(a)||i===t.TiersMode.Graduated&&!function(e,t){return(null==e?void 0:e[0].upTo)&&t<=e[0].upTo}(a,r)){var l=Pn({amount:n,currency:o,minimumFractionDigits:2});return Cn(r)+" for "+l}return bl(e)}({totalAmount:y,quantity:c,currency:u.currency,pricingModel:u.pricingModel,billingPeriod:u.billingPeriod,tiers:u.tiers,tiersMode:u.tiersMode,blockSize:u.blockSize,priceAmount:u.amount}),f&&" / unit"))),n&&i.createElement(oe,{in:p},i.createElement(wl,null,n)))},Tl=function(e){return i.createElement(kl,null,i.createElement(Pl,{style:{alignItems:"flex-end"}},i.createElement(l,{item:!0},i.createElement(De,{variant:"body1",color:"secondary"},e.label)),i.createElement(l,{item:!0,display:"flex",gap:1,alignItems:"center"},i.createElement(De,{variant:"body1",color:"secondary",style:{wordBreak:"break-word"}},"Free"))))},Ml=function(e){var t=e.subscriptionPreview,n=e.isFetchingSubscriptionPreview,r=t.recurringInvoice||{},a=r.discount,o=r.discountDetails;return a&&o?i.createElement(kl,null,i.createElement(Pl,null,i.createElement(De,{variant:"body1",color:"secondary"},e.checkoutLocalization.summary.discountText({discountDetails:o,currency:t.immediateInvoice.total.currency})),i.createElement(De,{variant:"body1",color:"secondary"},n?i.createElement(In,{width:50,height:16}):Pn({amount:a.amount,currency:a.currency,minimumFractionDigits:2})))):null},Al=function(e){var t=e.isFetchingSubscriptionPreview,n=((e.subscriptionPreview||{}).immediateInvoice||{}).credits;return!n||!n.used||n.used.amount<=0?null:i.createElement(kl,null,i.createElement(Pl,null,i.createElement(De,{variant:"body1",color:"secondary"},e.checkoutLocalization.summary.appliedCreditsTitle),i.createElement(De,{variant:"body1",color:"secondary"},i.createElement(gl,{isLoading:t},Pn({amount:-1*n.used.amount,currency:n.used.currency,minimumFractionDigits:2})))))},Bl=function(e){var t=e.tax,n=e.taxDetails,r=e.isFetchingSubscriptionPreview;return!n||!t||(null==t?void 0:t.amount)<=0?null:i.createElement(kl,null,i.createElement(Pl,null,i.createElement(De,{variant:"body1",color:"secondary"},e.checkoutLocalization.summary.taxTitle({taxDetails:n})),i.createElement(De,{variant:"body1",color:"secondary"},i.createElement(gl,{isLoading:r},Pn({amount:null==t?void 0:t.amount,currency:null==t?void 0:t.currency,minimumFractionDigits:2})))))},Ll=a(I,{target:"e9ji7bp4"})({name:"1w9aiz5",styles:"width:100%;max-width:470px;flex:1.5"}),Nl=a(re,{target:"e9ji7bp3"})("background:",(function(e){return e.theme.stigg.palette.backgroundHighlight}),";padding:16px;",Ii.md,"{border-radius:10px;}");Nl.defaultProps={elevation:0};var Ul,Il,Fl,Ol,Dl,jl=a(De,{target:"e9ji7bp2"})({name:"1jcocwa",styles:"margin-bottom:16px;font-weight:500"}),Wl=a(k,{target:"e9ji7bp1"})({name:"1k6141t",styles:"margin:16px 0"}),Rl=a(De,{target:"e9ji7bp0"})({name:"5bhc30",styles:"margin-bottom:8px"}),ql=function(e){var n,a,o,c,u,s=e.onCheckout,d=e.onCheckoutCompleted,p=e.disablePromotionCode,m=e.disableSuccessAnimation,g=e.isFreeDowngrade,h=e.onMockCheckoutPreview,f=e.isWidgetWatermarkEnabled,y=r.useState(!1),v=y[0],b=y[1],x=Co().setErrorMessage,E=vo(),k=bo(),w=ro(),P=w.checkoutLocalization,C=w.checkoutState||{},S=C.plan,T=C.activeSubscription,M=Wo((null==S||null==(n=S.pricePoints)?void 0:n.filter((function(e){return e.billingPeriod===k.billingPeriod})))||[]),A=te(M,(function(e){return e.pricingModel===t.BillingModel.FlatFee})),B=A[1],L=(A[0]||[])[0],N=g||E.isCheckoutComplete&&E.isLastStep,U=function(e){var t=(void 0===e?{}:e).onMockCheckoutPreview,n=r.useState(null),i=n[0],a=n[1],o=r.useState(!1),l=o[0],c=o[1],u=ko({onMockCheckoutPreview:t}).previewSubscriptionAction;return r.useEffect((function(){var e=function(){var e=se(Fr.mark((function e(){var t;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u();case 2:(t=e.sent.subscriptionPreview)&&a(t),c(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();c(!0);var t=setTimeout((function(){c(!0),e()}),500);return function(){clearTimeout(t)}}),[u]),{subscriptionPreview:i,isFetchingSubscriptionPreview:l}}({onMockCheckoutPreview:h}),I=U.subscriptionPreview,F=U.isFetchingSubscriptionPreview,O=function(e){var t=e.isMocked,n=void 0!==t&&t,r=e.onCheckout,i=e.onCheckoutCompleted,a=e.onSuccess,o=e.disableSuccessAnimation,l=Vr().stigg,c=Co().useNewPaymentMethod,u=function(){var e=bo(),t=To()[0].resourceId,n=(ro().checkoutState||{}).plan,r=e.addons.map((function(e){return{addonId:e.addon.id,quantity:e.quantity}}));if(null!=n&&n.id)return{resourceId:t,planId:n.id,billingPeriod:e.billingPeriod,billableFeatures:e.billableFeatures,addons:r,promotionCode:e.promotionCode,billingCountryCode:e.billingCountryCode}}(),s=ro(),d=s.widgetState,p=s.setWidgetReadOnly,m=s.checkoutState||{},g=m.setupSecret,h=m.customer,f=J.useStripe(),y=J.useElements();return{handleSubmit:function(){var e=se(Fr.mark((function e(t){var s,d,m,v,b,x,E,k,w,P,C;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),u){e.next=3;break}return e.abrupt("return",{success:!1,errorMessage:"Unexpected error, please contact support."});case 3:if(s=!0,m=!1,p(!0),n||!c){e.next=11;break}return e.next=9,ol({elements:y,stripe:f,setupIntentClientSecret:g});case 9:(b=e.sent).success?v=b.paymentMethodId:(d=b.errorMessage,s=!1);case 11:if(x=de({},u,{paymentMethodId:v}),E=function(){var e=se(Fr.mark((function e(t){var n,r;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m=!0,e.prev=1,e.next=4,l.applySubscription(t);case 4:return n=e.sent,e.next=7,nl({applySubscriptionResults:n,stripe:f});case 7:return e.abrupt("return",{success:!(r=e.sent).errorMessage,errorMessage:r.errorMessage,results:n});case 11:return e.prev=11,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",{success:!1,errorMessage:d=null==e.t0?void 0:e.t0.message});case 16:case"end":return e.stop()}}),e,null,[[1,11]])})));return function(t){return e.apply(this,arguments)}}(),!s){e.next=34;break}if(!r){e.next=28;break}return e.next=17,r({customerId:h.id,checkoutParams:x,checkoutAction:E});case 17:if((w=e.sent).errorMessage&&(d=w.errorMessage),m||!w.results||!w.success){e.next=24;break}return e.next=22,nl({applySubscriptionResults:w.results,stripe:f});case 22:(P=e.sent).errorMessage&&(d=P.errorMessage,s=!1);case 24:s=s&&w.success&&!d,k=w.results,e.next=34;break;case 28:return e.next=30,E(x);case 30:!(C=e.sent).success&&C.errorMessage&&(d=C.errorMessage),s=C.success&&!d,k=C.results;case 34:if(p(!1),!s||!a){e.next=40;break}if(a(),o){e.next=40;break}return e.next=40,ml(5e3);case 40:return e.next=42,i({success:s,error:d});case 42:return e.abrupt("return",{results:k,success:!d,errorMessage:d});case 43:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),isLoading:!(null==d||!d.readOnly)}}({isMocked:!!h,disableSuccessAnimation:m,onCheckout:s,onCheckoutCompleted:d,onSuccess:function(){b(!0),E.markStepAsCompleted(E.progressBarState.activeStep)}}),D=O.handleSubmit,j=O.isLoading,W=function(){var e=se(Fr.mark((function e(t){var n;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!v){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,D(t);case 4:if(e.t0=e.sent,e.t0){e.next=7;break}e.t0={};case 7:(n=e.t0.errorMessage)?(x(n),b(!1)):x(void 0);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),R=function(){var e=se(Fr.mark((function e(t){return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!j){e.next=2;break}return e.abrupt("return");case 2:if(!N){e.next=7;break}return e.next=5,W(t);case 5:e.next=8;break;case 7:E.goNext();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),q=I||{},_=q.immediateInvoice,z=q.recurringInvoice,H=!(!I||(null==_||!_.proration)&&!I.hasScheduledUpdates),V=!p&&!g,$=!(null==z||!z.discountDetails||g),Z=V||$,G=B.some((function(e){return e.pricingModel===t.BillingModel.UsageBased})),Y=G&&!L&&B.every((function(e){return e.pricingModel===t.BillingModel.UsageBased})),Q="function"==typeof P.summary.baseChargeText?P.summary.baseChargeText({billingPeriod:k.billingPeriod}):P.summary.baseChargeText;return i.createElement(Ll,null,i.createElement(Nl,null,i.createElement(jl,{variant:"h3"},P.summary.title),i.createElement(l,{className:"stigg-checkout-summary-plan-title-container",display:"flex",flexDirection:"row",alignItems:"center",marginY:2},i.createElement(De,{variant:"h6",color:"primary",style:{paddingRight:"8px"}},P.summary.planName({plan:S})),i.createElement(Wl,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})),L&&i.createElement(Sl,{checkoutLocalization:P,label:Q,quantity:1,price:L}),!L&&g?i.createElement(Tl,{label:Q}):null,i.createElement(l,{item:!0,className:"stigg-checkout-summary-usage-charges-container"},B.map((function(e){var t,n,r,a,o,l=null==(t=k.billableFeatures)?void 0:t.find((function(t){var n;return t.featureId===(null==(n=e.feature)?void 0:n.featureId)}));return i.createElement(Sl,{checkoutLocalization:P,key:null==(n=e.feature)?void 0:n.featureId,label:za((null==(r=e.feature)?void 0:r.displayName)||"",null==(a=e.feature)?void 0:a.units,null==(o=e.feature)?void 0:o.unitsPlural),quantity:(null==l?void 0:l.quantity)||1,price:e})}))),!(null==(a=k.addons)||!a.length)&&i.createElement(i.Fragment,null,i.createElement(l,{display:"flex",flexDirection:"row",alignItems:"center",marginY:2},i.createElement(De,{variant:"h6",color:"primary",style:{paddingRight:"8px"}},P.summary.addonsSectionTitle),i.createElement(Wl,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})),k.addons.map((function(e){var t,n,r=null==(t=e.addon.pricePoints)?void 0:t.find((function(e){return e.billingPeriod===k.billingPeriod}));return r?i.createElement(Sl,{checkoutLocalization:P,key:null==e||null==(n=e.addon)?void 0:n.id,label:e.addon.displayName,quantity:e.quantity&&e.quantity>0?e.quantity:1,price:r}):null}))),!Z&&i.createElement(Wl,{className:"stigg-checkout-summary-divider"}),Z&&i.createElement(l,{display:"flex",flexDirection:"row",alignItems:"center",marginY:2},i.createElement(De,{variant:"h6",color:"primary",style:{paddingRight:"8px"}},P.summary.discountsSectionTitle),i.createElement(Wl,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})),V&&i.createElement(Qo,{disabled:j||F,checkoutLocalization:P,onMockCheckoutPreview:h}),$&&i.createElement(Ml,{subscriptionPreview:I,isFetchingSubscriptionPreview:F,checkoutLocalization:P}),Z&&i.createElement(Wl,{className:"stigg-checkout-summary-divider"}),i.createElement(Bl,{tax:null==z?void 0:z.tax,taxDetails:null==z?void 0:z.taxDetails,isFetchingSubscriptionPreview:F,checkoutLocalization:P}),g?null:i.createElement(i.Fragment,null,i.createElement(Pl,{style:{marginTop:16}},i.createElement(l,{display:"flex",flexDirection:"column",container:!0},i.createElement(l,{item:!0,display:"flex",justifyContent:"space-between"},i.createElement(De,{variant:"h6"},P.summary.totalText),i.createElement(De,{variant:"h6"},i.createElement(gl,{isLoading:F},Y?P.summary.onlyPayAsYouGoText:null,!Y&&G?P.summary.startsAtText:null,Y?null:Pn(de({amount:0},null==z?void 0:z.total,{minimumFractionDigits:2}))))),i.createElement(l,{item:!0},i.createElement(De,{variant:"body1",color:"secondary"},P.summary.totalBillingPeriodText({billingPeriod:k.billingPeriod}))))),i.createElement(Wl,{className:"stigg-checkout-summary-divider"})),null!=_&&null!=(o=_.proration)&&o.hasProrations&&null!=_&&_.subTotal&&(null==_?void 0:_.subTotal.amount)>0?i.createElement(kl,null,i.createElement(Pl,null,i.createElement(De,{variant:"body1",color:"secondary"},P.summary.proratedTotalDueText),i.createElement(De,{variant:"body1",color:"secondary"},i.createElement(gl,{isLoading:F},Pn({amount:(null==_||null==(c=_.subTotal)?void 0:c.amount)+((null==_||null==(u=_.tax)?void 0:u.amount)||0),currency:null==_?void 0:_.subTotal.currency,minimumFractionDigits:2}))))):null,i.createElement(Al,{subscriptionPreview:I,isFetchingSubscriptionPreview:F,checkoutLocalization:P}),i.createElement(kl,null,i.createElement(Pl,null,i.createElement(Rl,{variant:"h6"},P.summary.totalDueText),i.createElement(Rl,{variant:"h6"},i.createElement(gl,{isLoading:F},Pn(de({amount:0},null==_?void 0:_.total,{minimumFractionDigits:2})))))),i.createElement(vl,{plan:S,activeSubscription:T,subscriptionPreview:I,isFetchingSubscriptionPreview:F,checkoutLocalization:P,billingPeriod:k.billingPeriod}),i.createElement(An,{$success:v,$error:N&&g,disabled:j||F||E.progressBarState.isDisabled||N&&!H,className:"stigg-checkout-summary-cta-button",sx:{textTransform:"none",borderRadius:"10px",marginTop:"24px",height:"36px"},variant:"contained",size:"medium",onClick:function(e){R(e)},fullWidth:!0},i.createElement(De,{className:"stigg-checkout-summary-cta-button-text",variant:"h3",color:"white",style:{display:"flex"}},v?i.createElement($t,{icon:"Check",style:{display:"contents"}}):j||F?i.createElement(ne,{size:20,sx:{color:"white"}}):function(e){var t=e.checkoutLocalization;return e.isLastStep?e.checkoutHasChanges?e.isPlanUpdate?t.checkoutButton.updateText:e.isFreeDowngrade?t.checkoutButton.downgradeToFreeText:t.checkoutButton.upgradeText:t.checkoutButton.noChangesText:t.checkoutButton.nextText}({isLastStep:N,checkoutHasChanges:H,isFreeDowngrade:g,checkoutLocalization:P,isPlanUpdate:!!T&&(null==T?void 0:T.plan.id)===(null==S?void 0:S.id)})))),i.createElement(Tr,{source:"checkout",showWatermark:f,style:{marginTop:8,display:"flex",justifyContent:"center"}}),!m&&v&&i.createElement(dl,{checkoutLocalization:P}))},_l=function(e){var t=e.isWidgetWatermarkEnabled;return i.createElement(Ll,null,i.createElement(Nl,null,i.createElement(Ln,{$flexDirection:"column",$gap:24},i.createElement(In,{width:120,height:20}),i.createElement(In,{width:120,height:20}),i.createElement(In,{width:120,height:20}),i.createElement(In,{width:120,height:20})),i.createElement(Ln,{$flexDirection:"column",$gap:24,marginTop:5},i.createElement(In,{height:20}),i.createElement(In,{height:20}),i.createElement(In,{height:20})),i.createElement(Un,{flex:1,marginTop:5},i.createElement(In,{height:34}))),i.createElement(Tr,{source:"checkout",showWatermark:t,style:{marginTop:8,display:"flex",justifyContent:"center"}}))},zl=a(l,{target:"e1o28dc92"})({name:"1wte80x",styles:"width:100%;gap:8px"}),Hl=a(l,{target:"e1o28dc91"})("display:flex;flex-direction:column;gap:16px;",Ii.md,"{gap:0;flex-direction:row;justify-content:space-between;height:80px;align-items:center;}"),Vl=a(An,{target:"e1o28dc90"})({name:"156064h",styles:"min-width:unset;width:41px;height:41px;padding:0"});function $l(e){var n,r=e.addon,a=e.billingPeriod,o=e.addonState,c=e.initialAddonState,u=e.setAddon,s=e.removeAddon,d=e.checkoutLocalization,p=e.onAddonsValidationChange,m=e.isValid,g=Fi("lg"),h=r.pricePoints.find((function(e){return e.billingPeriod===a})),f=!!o,y=!!o&&!!c&&o.quantity!==c.quantity||!!c&&!o,v=function(e){if(!e||e<=0)return p({addonId:r.id,isValid:!1}),void u(r,null!=e?e:null);p({addonId:r.id,isValid:!0}),u(r,e)};return i.createElement(Hl,{container:!0},i.createElement(l,{item:!0},i.createElement(De,{variant:"h6",lineHeight:"24px"},r.displayName),!!h&&i.createElement(De,{variant:"body1",lineHeight:"20px",color:"secondary"},Pn({amount:h.amount,currency:h.currency,minimumFractionDigits:2})+"/"+(a===t.BillingPeriod.Annually?"year":"month"))),i.createElement(l,{item:!0,sx:{gap:"16px"},container:!g},y&&i.createElement(An,{variant:"text",size:"small",sx:{padding:"8px",minWidth:"unset"},onClick:function(){c?u(r,c.quantity):s(r.id),p({addonId:r.id,isValid:!0})}},i.createElement(De,{color:"primary.main",variant:"body1"},"Undo")),f&&i.createElement(i.Fragment,null,i.createElement(Bn,{id:r.id+"-input",type:"number",onWheel:Dn,sx:g?{marginX:2,width:120}:{flex:1},value:null!=(n=null==o?void 0:o.quantity)?n:"",error:!m,helperText:m?void 0:"Minimum 1",FormHelperTextProps:{sx:{margin:"4px"}},onChange:function(e){var t,n;return v(null!=e&&null!=(t=e.target)&&t.value?Number(null==e||null==(n=e.target)?void 0:n.value):null)}}),i.createElement(Vl,{color:"error",onClick:function(){s(r.id),p({addonId:r.id,isValid:!0})}},i.createElement($t,{icon:"Trash",style:{display:"flex"}}))),!f&&i.createElement(An,{sx:{paddingX:"22px",paddingY:"8px"},onClick:function(){return v(1)}},i.createElement(De,{color:"primary.main",variant:"body1"},d.addAddonText))))}function Zl(){var e,t=ro(),n=t.checkoutLocalization,a=t.setIsValid,o=po().billingPeriod,l=vo().setIsDisabled,c=de({},To()[0].addonsStep,{setAddon:(e=To()[1],function(t,n){return e((function(e){var r=e.addonsStep.addons.find((function(e){return e.addon.id===t.id}));r?r.quantity=n:(e.addonsStep.addons.push({addon:t,quantity:n}),e.addonsStep.addons=Xa(e.addonsStep.addons))}))}),removeAddon:to()}),u=c.initialAddons,s=c.addons,d=c.availableAddons,p=c.setAddon,m=c.removeAddon,g=r.useState((null==d?void 0:d.reduce((function(e,t){return e[t.id]=!0,e}),{}))||{}),h=g[0],f=g[1];return r.useEffect((function(){var e=Object.values(h).some((function(e){return!e}));l(e),a(!e)}),[h,l,a]),i.createElement(zl,{container:!0},null==d?void 0:d.map((function(e){var t=s.find((function(t){return t.addon.id===e.id})),r=null==u?void 0:u.find((function(t){return t.addon.id===e.id}));return i.createElement($l,{key:e.id,addon:e,billingPeriod:o,addonState:t,initialAddonState:r,setAddon:p,removeAddon:m,checkoutLocalization:n,onAddonsValidationChange:function(e){var t;return f(de({},h,((t={})[e.addonId]=e.isValid,t)))},isValid:h[e.id]})})))}var Gl,Yl=x(l,{shouldForwardProp:function(e){return!e.startsWith("$")}})(Ul||(Ul=me(["\n padding: 8px;\n border-radius: 10px;\n border: 1px solid ",";\n cursor: ",";\n opacity: ",";\n"])),(function(e){return e.theme.stigg.palette.outlinedBorder}),(function(e){return e.$disabled?"not-allowed":"pointer"}),(function(e){return e.$disabled?.6:1})),Ql=x(Yl)(Il||(Il=me(["\n flex-direction: column;\n align-items: unset;\n ","\n"])),(function(e){return e.$hideBorders&&u.css(Fl||(Fl=me(["\n border: none;\n padding: 0;\n "])))})),Kl=x(l)(Ol||(Ol=me(["\n display: flex;\n align-items: center;\n flex: 1;\n gap: 12px;\n"]))),Xl=x(l)(Dl||(Dl=me(["\n display: flex;\n flex-direction: column;\n"])));function Jl(e){var t=e.text,n=e.subtitle;return i.createElement(Kl,null,i.createElement(ce,{checked:e.checked,disabled:e.readOnly}),i.createElement(Xl,{container:!0},i.createElement(l,{item:!0},t),n&&i.createElement(l,{item:!0},n)))}function ec(e){var t=e.paymentMethodDetails,n=e.readOnly;if(!t)return null;var r=t.expirationMonth,a=t.expirationYear;return i.createElement(Yl,{item:!0,onClick:e.onSelect,$disabled:n},i.createElement(Jl,{checked:e.checked,readOnly:n,text:i.createElement(De,{variant:"h6"},"Card ending in "+t.last4Digits),subtitle:!!r&&!!a&&i.createElement(De,{variant:"body1"},"Expires "+r.toString().padStart(2,"0")+"/"+a)}))}function tc(e){var t=e.hasExistingPaymentMethod,n=e.checked,r=e.readOnly,a=e.onBillingAddressChange,o=e.collectPhoneNumber;return i.createElement(Ql,{item:!0,$hideBorders:!t,onClick:e.onSelect,$disabled:r},t&&i.createElement(Jl,{checked:n,readOnly:r,text:i.createElement(De,{variant:"h6"},e.checkoutLocalization.newPaymentMethodText)}),i.createElement(oe,{in:n},i.createElement(Xo,{onBillingAddressChange:a,collectPhoneNumber:o})))}var nc=x(l)(Gl||(Gl=me(["\n display: flex;\n flex-direction: column;\n gap: 24px;\n"])));function rc(e){var t=e.onBillingAddressChange,n=e.collectPhoneNumber,r=ro(),a=r.checkoutLocalization,o=r.widgetState,l=(r.checkoutState||{}).customer,c=Co(),u=c.errorMessage,s=c.useNewPaymentMethod,d=c.setUseNewPaymentMethod,p=o.readOnly,m=function(e){p||d(e)};return i.createElement(nc,{container:!0},!!u&&i.createElement(le,{severity:"error",sx:{alignItems:"center"}},i.createElement(De,{overrideColor:"inherit"},u)),i.createElement(ec,{readOnly:p,checked:!s,paymentMethodDetails:null==l?void 0:l.paymentMethodDetails,onSelect:function(){return m(!1)}}),i.createElement(tc,{hasExistingPaymentMethod:!(null==l||!l.paymentMethodDetails),readOnly:p,checked:s,checkoutLocalization:a,onSelect:function(){return m(!0)},onBillingAddressChange:t,collectPhoneNumber:n}))}var ic=function(e){return i.createElement(b,{className:"stigg-checkout-change-plan-button",sx:{textTransform:"none"},variant:"text",size:e.size,onClick:e.onClick},i.createElement(De,{className:"stigg-checkout-change-plan-button-text",color:"primary.main",variant:"h3",style:{lineHeight:"24px"}},e.checkoutLocalization.changePlan))};function ac(e){var t=e.allowChangePlan,n=void 0!==t&&t,r=e.onChangePlan,a=ro(),o=a.checkoutLocalization,l=(a.checkoutState||{}).plan;return i.createElement(i.Fragment,null,i.createElement(I,{sx:{marginBottom:"16px"}},i.createElement(De,{variant:"body1",color:"disabled",style:{opacity:.6,marginBottom:"8px"}},"Selected plan"),i.createElement(I,{sx:{display:"flex",justifyContent:"space-between"}},i.createElement(De,{variant:"h1"},null==l?void 0:l.displayName),n&&r&&i.createElement(ic,{onClick:function(){r({currentPlan:l})},checkoutLocalization:o,size:"medium"}))),i.createElement(k,{className:"stigg-checkout-plan-header-divider"}))}function oc(e){switch(e){case t.BillingPeriod.Annually:return"Annual";case t.BillingPeriod.Monthly:return"Monthly";default:return""}}var lc,cc=a(I,{target:"ekae5v44"})({name:"1k6141t",styles:"margin:16px 0"}),uc=a("button",{target:"ekae5v43"})("cursor:",(function(e){return e.$disabled||e.$isOnlyBillingPeriod?"default":"pointer"}),";flex:1;display:flex;align-items:center;justify-content:flex-start;padding:2px 8px;border-radius:10px;border:",(function(e){var t=e.theme,n=t.stigg.palette.outlinedBorder;return e.$isOnlyBillingPeriod?n="transparent":e.$isActive&&(n=t.stigg.palette.outlinedRestingBorder),"1px solid "+n}),";background:",(function(e){return e.$isOnlyBillingPeriod?"transparent":e.$isActive?p(e.theme.stigg.palette.primary).alpha(.15).toString():"transparent"}),";text-transform:none;text-align:start;height:36px;&.MuiButton-root{padding:0 16px 0 8px;&:hover{background:none;}}"),sc=a(I,{target:"ekae5v42"})({name:"1neb8ay",styles:"display:flex;gap:16px;margin-top:16px"}),dc=function(e){var t=e.billingPeriod,n=e.isOnlyBillingPeriod,r=po(),a=r.setBillingPeriod,o=r.billingPeriod===t;return i.createElement(uc,{onClick:function(){return a(t)},$isActive:o,$isOnlyBillingPeriod:n},i.createElement(ce,{checked:o,onChange:function(){return a(t)},value:t,disabled:n,inputProps:{"aria-label":oc(t)},sx:{padding:0,marginRight:"8px"}}),i.createElement(I,null,i.createElement(De,{variant:"h3",color:"primary"},oc(t))))};function pc(e){var n=e.plan,r=e.checkoutLocalization,a=s.partition(null==n?void 0:n.pricePoints,(function(e){return e.billingPeriod===t.BillingPeriod.Monthly})),o=a[0],l=a[1],u=!(null==o||!o.length||null==l||!l.length);return u?i.createElement(cc,null,i.createElement(De,{variant:"h6",color:"primary",fontWeight:c.FontWeight.Medium},r.billingPeriodsTitle),i.createElement(sc,null,!(null==o||!o.length)&&i.createElement(dc,{key:t.BillingPeriod.Monthly,billingPeriod:t.BillingPeriod.Monthly,isOnlyBillingPeriod:!u}),!(null==l||!l.length)&&i.createElement(dc,{key:t.BillingPeriod.Annually,billingPeriod:t.BillingPeriod.Annually,isOnlyBillingPeriod:!u}))):null}var mc=x.div(lc||(lc=me(["\n display: flex;\n min-height: 60px;\n margin-top: 16px;\n flex-direction: column;\n\n "," {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n }\n"])),Ii.md),gc=function(e,t){var n=e.minUnitQuantity,r=e.maxUnitQuantity;return!t||t<(n||1)?"Minimum "+(n||1):r&&t>r?"Maximum "+r:""};function hc(e){var n,r,a,o,l,c,u=e.charge,s=e.isValid,d=e.setBillableFeature,p=e.billableFeature,m=e.onValidationChange,g=Fi("md"),h=null==(n=u.feature)?void 0:n.featureId,f=!h,y=u.pricingModel===t.BillingModel.UsageBased,v=f?"Base charge":za((null==(r=u.feature)?void 0:r.displayName)||"",null==(a=u.feature)?void 0:a.units,null==(o=u.feature)?void 0:o.unitsPlural),b=!!(null!=u&&u.minUnitQuantity||null!=u&&u.maxUnitQuantity);if(f||y)c=""+Pn({amount:u.amount,currency:u.currency,locale:"en-us",minimumFractionDigits:2}),y&&(c+=" / unit");else if(u.isTieredPrice&&u.tiersMode&&h)c=i.createElement(zn,{componentId:h+"-tiers",tiers:u.tiers,tiersMode:u.tiersMode,value:(null==p?void 0:p.quantity)||1,handleChange:function(e){d(h,e)},width:120});else{var x;c=i.createElement(Bn,{sx:{width:g?120:"100%"},id:h+"-input",type:"number",onWheel:Dn,error:!s,helperText:s?void 0:gc(u,null==p?void 0:p.quantity),FormHelperTextProps:{sx:{margin:"4px"}},value:null!=(x=null==p?void 0:p.quantity)?x:"",onChange:function(e){var t,n;if(!f&&h){var r=u.minUnitQuantity,i=u.maxUnitQuantity,a=null!=e&&null!=(t=e.target)&&t.value?Number(null==e||null==(n=e.target)?void 0:n.value):null;if(!a||a<=0||r&&a<r||i&&a>i)return m({featureId:h,isValid:!1}),void d(h,null!=a?a:null);m({featureId:h,isValid:!0});var o=ao(u,a);d(h,o)}}})}return i.createElement(mc,null,i.createElement(I,{display:"flex",flexDirection:"column"},i.createElement(De,{variant:"h6",color:"primary",lineHeight:"24px"},v),b&&i.createElement(De,{variant:"body1",color:"secondary",lineHeight:"20px"},fe(u.minUnitQuantity,u.maxUnitQuantity,null==(l=u.feature)?void 0:l.unitsPlural))),i.createElement(De,{variant:"h6",color:"primary"},c))}function fc(e){var t,n=e.plan,a=e.billingPeriod,o=po(),l=o.billableFeatures,c=o.setBillableFeature,u=vo().setIsDisabled,s=ro().setIsValid,d=Wo((null==n||null==(t=n.pricePoints)?void 0:t.filter((function(e){return e.billingPeriod===a})))||[]),p=r.useState(null==d?void 0:d.reduce((function(e,t){var n;return e[(null==(n=t.feature)?void 0:n.featureId)||"base-charge"]=!0,e}),{})),m=p[0],g=p[1];return r.useEffect((function(){var e=Object.values(m).some((function(e){return!e}));u(e),s(!e)}),[m,u,s]),i.createElement(i.Fragment,null,null==d?void 0:d.map((function(e){var t,n,r=l.find((function(t){var n;return t.featureId===(null==(n=e.feature)?void 0:n.featureId)}));return i.createElement(hc,{key:(null==(t=e.feature)?void 0:t.featureId)||"base-charge",charge:e,setBillableFeature:c,billableFeature:r,isValid:m[(null==(n=e.feature)?void 0:n.featureId)||"base-charge"],onValidationChange:function(e){var t=e.featureId,n=e.isValid;return g((function(e){var r;return de({},e,((r={})[t]=n,r))}))}})})))}var yc,vc=a(I,{target:"emtnukp0"})({name:"1d3w5wq",styles:"width:100%"}),bc=function(e){var t=e.onChangePlan,n=ro(),r=n.checkoutLocalization,a=(n.checkoutState||{}).plan,o=po().billingPeriod;return i.createElement(i.Fragment,null,i.createElement(ac,{allowChangePlan:!0,onChangePlan:t}),i.createElement(vc,null,i.createElement(pc,{plan:a,checkoutLocalization:r}),i.createElement(fc,{plan:a,billingPeriod:o})))};function xc(){return(xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ec=a((function(e){return r.createElement("svg",xc({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),yc||(yc=r.createElement("g",{stroke:"#7586B0",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M2.667 8h10.667M9.333 4l4 4-4 4"}))))}),{target:"e8986nu0"})("path{stroke:",(function(e){return e.theme.stigg.palette.text.secondary}),";}"),kc=a(I,{target:"eaawmuo2"})({name:"zjik7",styles:"display:flex"}),wc=a(le,{target:"eaawmuo1"})({name:"18uqayh",styles:"margin-bottom:16px"}),Pc=a(I,{target:"eaawmuo0"})("padding:16px;border-radius:10px;width:100%;border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";"),Cc=function(e){var t=e.planName,n=e.priceText;return i.createElement(Pc,{className:"stigg-checkout-downgrade-to-free-container"},i.createElement(De,{className:"stigg-checkout-downgrade-to-free-text-header",style:{opacity:.8},variant:"caption",color:"disabled"},e.headerText),i.createElement(De,{className:"stigg-checkout-downgrade-to-free-plan-name",bold:!0,variant:"h3",color:"primary"},t),i.createElement(De,{className:"stigg-checkout-downgrade-to-free-price-text",color:"secondary"},n))},Sc=function(e){var t,n=e.checkoutLocalization,r=e.activeSubscription,a=e.freePlan,o=e.allowChangePlan,l=e.onChangePlan;void 0!==o&&o&&l&&(t=i.createElement(ic,{onClick:function(){l({currentPlan:a})},checkoutLocalization:n,size:"small"}));var c=r.prices.length>0?r.prices[0].billingPeriod:void 0;return i.createElement(i.Fragment,null,i.createElement(wc,{action:t,className:"stigg-checkout-downgrade-to-free-alert",severity:"info"},i.createElement(De,{span:!0,color:"secondary"},n.downgradeToFree.alertText({plan:r.plan}))),i.createElement(kc,{className:"stigg-checkout-downgrade-to-free-plans-container"},i.createElement(Cc,{headerText:n.downgradeToFree.paidPlanHeader({plan:r.plan}),planName:n.downgradeToFree.paidPlanName({plan:r.plan}),priceText:n.downgradeToFree.paidPlanPriceText({plan:r.plan,billingPeriod:c})}),i.createElement(Ec,{className:"stigg-checkout-downgrade-to-free-arrow",style:{margin:"auto 16px",minWidth:"16px"}}),i.createElement(Cc,{headerText:n.downgradeToFree.freePlanHeader({plan:a}),planName:n.downgradeToFree.freePlanName({plan:a}),priceText:n.downgradeToFree.freePlanPriceText({plan:a})})))};function Tc(e){var n=e.onCheckout,a=e.onCheckoutCompleted,o=e.onChangePlan,l=e.onBillingAddressChange,c=e.collectPhoneNumber,u=e.disablePromotionCode,s=e.disableSuccessAnimation,d=e.onMockCheckoutPreview,p=function(){var e=r.useState(null),n=e[0],i=e[1],a=ro().checkoutState||{},o=a.billingIntegration,l=a.setupSecret;return r.useEffect((function(){if(o){var e=o.credentials;if(o.billingIdentifier!==t.BillingVendorIdentifier.Stripe)return void console.error("Currently only stripe integration is supported");i(ie.loadStripe(e.publicKey,{stripeAccount:e.accountId}))}}),[o]),{stripePromise:n,setupIntentClientSecret:l}}(),m=p.stripePromise,g=p.setupIntentClientSecret,h=To()[0],f=h.stiggTheme,y=h.widgetState,v=h.theme,b=h.isWidgetWatermarkEnabled,x=vo().currentStep,E=y.isLoadingCheckoutData,k=ro(),w=k.checkoutLocalization,P=k.checkoutState||{},C=P.plan,S=P.activeSubscription,T=!!C&&C.pricingType===t.PricingType.Free&&!!S&&S.pricingType!==t.PricingType.Free,M=function(e,t){var n=t.onBillingAddressChange,r=t.onChangePlan,a=t.collectPhoneNumber;switch(e.key){case io.PLAN:return{content:i.createElement(bc,{onChangePlan:r})};case io.ADDONS:return{content:i.createElement(Zl,null)};case io.PAYMENT:return{content:i.createElement(rc,{onBillingAddressChange:n,collectPhoneNumber:a})};default:return{content:null}}}(x,{onBillingAddressChange:l,onChangePlan:o,collectPhoneNumber:c}).content,A=i.createElement(i.Fragment,null,T?i.createElement(Sc,{freePlan:C,activeSubscription:S,allowChangePlan:!0,checkoutLocalization:w,onChangePlan:o}):i.createElement(i.Fragment,null,M)),B=r.useMemo((function(){return g?{clientSecret:g}:{mode:"setup",currency:"usd"}}),[g]);return i.createElement(J.Elements,{key:g,stripe:m,options:de({},B,{appearance:{theme:"stripe",variables:{colorText:f.palette.text.primary,colorPrimaryText:f.palette.text.primary,colorTextPlaceholder:f.palette.text.disabled,fontFamily:f.typography.fontFamily,colorBackground:null==v?void 0:v.paymentInputBackgroundColor,borderRadius:null==v?void 0:v.paymentInputBorderRadius},rules:null!=v&&v.paymentInputBorderColor?{".Input":{borderColor:null==v?void 0:v.paymentInputBorderColor}}:void 0}})},i.createElement(Lo,{className:"stigg-checkout-layout"},!T&&i.createElement(Do,null),i.createElement(No,null,i.createElement(Uo,null,E?i.createElement(On,null):A),E?i.createElement(_l,{isWidgetWatermarkEnabled:b}):i.createElement(ql,{disablePromotionCode:u,disableSuccessAnimation:s,onCheckout:n,onCheckoutCompleted:a,isFreeDowngrade:T,onMockCheckoutPreview:d,isWidgetWatermarkEnabled:b}))))}var Mc,Ac=["textOverrides","theme","resourceId","planId","preferredBillingPeriod","billingCountryCode","billableFeatures","billingInformation","onMockCheckoutState","skipCheckoutSteps"];function Bc(e){var n,r=Vr({optional:!0}),i=null==r?void 0:r.stigg;return i?i.getBooleanEntitlement(e):de({},t.BOOLEAN_DEFAULT_FALLBACK_ENTITLEMENT,null==(n=e.options)?void 0:n.fallback)}function Lc(e){var n,r=Vr({optional:!0}),i=null==r?void 0:r.stigg;return i?i.getNumericEntitlement(e):de({},t.NUMERIC_DEFAULT_FALLBACK_ENTITLEMENT,null==(n=e.options)?void 0:n.fallback)}function Nc(e){var n,r=Vr({optional:!0}),i=null==r?void 0:r.stigg;return i?i.getMeteredEntitlement(e):de({},t.METERED_DEFAULT_FALLBACK_ENTITLEMENT,null==(n=e.options)?void 0:n.fallback)}function Uc(e){var t=e.func,n=r.useState(!1),i=n[0],a=n[1],o=r.useState(null),l=o[0],c=o[1],u=r.useState(null),s=u[0],d=u[1];return r.useEffect((function(){!function(){var e=se(Fr.mark((function e(){return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a(!0),e.prev=1,e.next=4,t();case 4:d(e.sent),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),c(e.t0);case 11:return e.prev=11,a(!1),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[1,8,11,14]])})));return function(){return e.apply(this,arguments)}}()()}),[t]),{isLoaded:i,error:l,data:s}}(Mc=exports.ProvisionStatus||(exports.ProvisionStatus={})).IN_PROGRESS="IN_PROGRESS",Mc.SUCCEEDED="SUCCEEDED",Mc.FAILED="FAILED";var Ic=["noAccessComponent","children"],Fc=["noAccessComponent","children"],Oc=["noAccessComponent","children"];Object.keys(t).forEach((function(e){"default"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return t[e]}})})),exports.AddonsList=ki,exports.BooleanEntitlementGuard=function(e){var t=e.noAccessComponent,n=e.children;return Bc(pe(e,Ic)).hasAccess?n:i.createElement(i.Fragment,null,null!=t?t:null)},exports.Checkout=function(e){var t=e.textOverrides,n=e.theme,r=e.resourceId,a=e.planId,o=e.preferredBillingPeriod,l=e.billingCountryCode,c=e.billableFeatures,u=e.billingInformation,s=e.onMockCheckoutState,d=e.skipCheckoutSteps,p=pe(e,Ac);return i.createElement(Ao,{textOverrides:t,theme:n,resourceId:r,planId:a,preferredBillingPeriod:o,billingCountryCode:l,billableFeatures:c,billingInformation:u,onMockCheckoutState:s,skipCheckoutSteps:d},i.createElement(Tc,Object.assign({},p)))},exports.CustomerPortal=function(e){var t=e.textOverrides,n=e.theme,r=e.resourceId,a=e.productId,o=pe(e,Qa);return i.createElement(pi,{textOverrides:t,theme:n,resourceId:r,productId:a},i.createElement(Ya,Object.assign({},o)))},exports.CustomerPortalProvider=pi,exports.CustomerUsageData=Ga,exports.InvoicesSection=Ka,exports.MeteredEntitlementGuard=function(e){var t=e.noAccessComponent,n=e.children;return Nc(pe(e,Oc)).hasAccess?n:i.createElement(i.Fragment,null,null!=t?t:null)},exports.NumericEntitlementGuard=function(e){var t=e.noAccessComponent,n=e.children;return Lc(pe(e,Fc)).hasAccess?n:i.createElement(i.Fragment,null,null!=t?t:null)},exports.PaymentDetailsSection=ja,exports.Paywall=function(e){var n=e.productId,a=e.resourceId,o=e.highlightedPlanId,l=e.showOnlyEligiblePlans,c=e.textOverrides,u=e.onPlanSelected,s=e.preferredBillingPeriod,d=e.onBillingPeriodChange,p=e.billingCountryCode,f=e.shouldHidePlan,y=e.selectDefaultTierIndex,v=e.currentSubscriptionOverride,b=e.hideCompatibleAddons,x=!!r.useContext(si),E=!1;if(x){var k=di();E=k.isLoading,a=k.resourceId}var w=function(e){var n=e.productId,i=e.resourceId,a=e.showOnlyEligiblePlans,o=e.billingCountryCode,l=e.preferredBillingPeriod,c=e.currentSubscriptionOverrideFn,u=Vr(),s=u.stigg,d=u.locale,p=r.useState(t.BillingPeriod.Annually),m=p[0],f=p[1],y=r.useState([]),v=y[0],b=y[1],x=r.useState(null),E=x[0],k=x[1],w=r.useState(!0),P=w[0],C=w[1];r.useEffect((function(){!function(){var e=se(Fr.mark((function e(){var t,r,a,c;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,C(!0),e.next=4,s.waitForInitialization();case 4:return e.next=6,s.getPaywall({productId:n,resourceId:i,billingCountryCode:o});case 6:r=Dr((t=e.sent).plans,t.activeSubscriptions,l),a=r.availableBillingPeriods,c=r.defaultBillingPeriod,k(t),b(a),f(c),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(0),Or.error("Failed to load paywall "+(null==e.t0?void 0:e.t0.message),e.t0);case 16:return e.prev=16,C(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[0,13,16,19]])})));return function(){return e.apply(this,arguments)}}()()}),[s,n,s.isCustomerLoaded,o,i,l]);var S=function(e,n,r){var i,a=e||{},o=a.plans,l=a.currency,c=a.configuration,u=a.customer,s=a.paywallCalculatedPricePoints,d=function(e){var n,r,i,a=!0,o=(null==e?void 0:e.find((function(e){return e.status===t.SubscriptionStatus.InTrial})))||null,l=null==(n=o)?void 0:n.plan,c=null!=(r=o)&&r.trialEndDate?g.utc(o.trialEndDate).diff(g.utc(),"days",!1)+1:void 0;return l||(a=!1,l=null==(i=o=(null==e?void 0:e.find((function(e){return e.status===t.SubscriptionStatus.Active})))||null)?void 0:i.plan),{currentSubscription:o,currentPlan:l,isCustomerOnTrial:a,trialDaysLeft:c}}(a.activeSubscriptions),p=d.currentSubscription,m=d.currentPlan,f=d.isCustomerOnTrial,y=d.trialDaysLeft,v=null==r?void 0:r({currentSubscription:p}),b=(null==p?void 0:p.scheduledUpdates)||[],x=null==p||null==(i=p.price)?void 0:i.billingPeriod,E=b.find((function(e){return e.subscriptionScheduleType===t.SubscriptionScheduleType.Downgrade})),k=b.find((function(e){return e.subscriptionScheduleType===t.SubscriptionScheduleType.BillingPeriod})),w=A(o,(function(e){return e.order})).map((function(e){var t,n=null==u||null==(t=u.eligibleForTrial)?void 0:t.find((function(t){return t.productId===e.product.id})),r=null!=v&&v.planId?(null==v?void 0:v.planId)===e.id:e.id===(null==m?void 0:m.id);return de({},e,{paywallCalculatedPricePoints:null==s?void 0:s.filter((function(t){return t.planId===e.id})),isTriable:!h(e.defaultTrialConfig)&&(!n||n.eligible),isCurrentCustomerPlan:r,currentCustomerPlanBillingPeriod:x,isUpcomingPlan:!1,trialDaysLeft:y,isNextPlan:function(t){var n,i=null==E?void 0:E.scheduleVariables,a=null==k?void 0:k.scheduleVariables,o=e.pricePoints.some((function(e){return e.billingPeriod===t}));return E?(null==(n=E.targetPackage)?void 0:n.refId)===e.id&&(!o||i.billingPeriod===t):!(!k||!r)&&a.billingPeriod===t},paywallCurrency:l,scheduledUpdate:E||k})}));if(o&&m){var P,C=m&&(null==o||null==(P=o.find((function(e){return e.id===(null==m?void 0:m.id)})))?void 0:P.order);h(C)||(w=w.map((function(e){return de({},e,{isLowerThanCurrentPlan:C>e.order})})),n&&(w=w.filter((function(e){return e.order>=C}))))}var S=c?function(e){var t=e.palette,n=e.layout;return{customCss:e.customCss||void 0,palette:{primary:(null==t?void 0:t.primary)||void 0,backgroundPaper:(null==t?void 0:t.backgroundColor)||void 0,outlinedBorder:(null==t?void 0:t.borderColor)||void 0,backgroundHighlight:(null==t?void 0:t.currentPlanBackground)||void 0,text:{primary:(null==t?void 0:t.textColor)||void 0}},typography:qr(e.typography),layout:{ctaAlignment:_r(null==n?void 0:n.alignment),headerAlignment:_r(null==n?void 0:n.alignment),descriptionAlignment:_r(null==n?void 0:n.alignment),planMaxWidth:Wr(null==n?void 0:n.planWidth),planMinWidth:Wr(null==n?void 0:n.planWidth),planMargin:Wr(null==n?void 0:n.planMargin),planPadding:Wr(null==n?void 0:n.planPadding)}}}(c):void 0;return{currentPlan:m,currentSubscription:p,currentSubscriptionOverride:v,isCustomerOnTrial:f,plans:w,paywallConfiguration:S}}(E,a,c);return de({customer:(null==E?void 0:E.customer)||null,isLoading:P,selectedBillingPeriod:m,setSelectedBillingPeriod:f,availableBillingPeriods:v,locale:d,configuration:S.paywallConfiguration},S)}({productId:n,resourceId:a,showOnlyEligiblePlans:l,billingCountryCode:p,preferredBillingPeriod:s,currentSubscriptionOverrideFn:v}),P=w.plans,C=w.customer,S=w.currentSubscription,T=w.currentSubscriptionOverride,M=w.isCustomerOnTrial,B=w.isLoading,L=w.selectedBillingPeriod,N=w.setSelectedBillingPeriod,U=w.availableBillingPeriods,I=w.locale,F=w.configuration,O=m({highlightChip:"Recommended",addonsTitle:"Available add-ons:",planCTAButton:{upgrade:"Upgrade",downgrade:"Downgrade",startTrial:function(e){var t;return"Start "+(null==(t=e.defaultTrialConfig)?void 0:t.duration)+" day trial"},custom:"Contact us",currentPlan:"Current plan",startNew:"Get started",switchToBillingPeriod:function(e){return e===t.BillingPeriod.Monthly?"Switch to monthly billing":"Switch to annual billing"},cancelScheduledUpdate:"Cancel"},price:{startingAtCaption:"Starts at",pricePeriod:function(e){return e===t.BillingPeriod.Monthly?"/ month":"/ year"},free:function(e){return{price:(null==e?void 0:e.symbol)+"0"}},custom:"Custom",priceNotSet:"Price not set"}},c),D=!P||B||E?i.createElement(ri,null):i.createElement(Ir,{plans:P,customer:C,currentSubscription:S,currentSubscriptionOverride:T,selectedBillingPeriod:L,onBillingPeriodChanged:function(e){N(e),d&&d(e)},availableBillingPeriods:U,highlightedPlanId:o,isCustomerOnTrial:M,onPlanSelected:u,paywallLocale:O,locale:I,shouldHidePlan:f,selectDefaultTierIndex:y,hideCompatibleAddons:b});return x?D:i.createElement(ui,{componentTheme:F},D)},exports.Promotions=Pi,exports.StiggContext=Hr,exports.StiggProvider=function(e){var t=e.apiKey,a=e.baseUri,o=e.baseEdgeUri,l=e.enableEdge,c=e.customerId,u=e.customerToken,s=e.resourceId,d=e.theme,p=e.locale,m=e.cacheTtlMs,g=e.useEntitlementPolling,h=e.entitlementPollingInterval,f=e.entitlementsFallback,y=e.stiggClient,v=e.children,b=e.offline,x=e.clientName,E=void 0===x?"@stigg/react-sdk":x,k=e.clientVersion,P=void 0===k?"6.1.0":k,C=r.useRef(t),S={apiKey:t,customerId:c,customerToken:u,resourceId:s,baseUri:a,baseEdgeUri:o,enableEdge:l,entitlementsFallback:f,cacheTtlMs:m,useEntitlementPolling:g,entitlementPollingInterval:h,clientName:E,clientVersion:P,offline:b},T=r.useState((function(){return{stigg:null!=y?y:n.initialize(de({},S,{lazyLoad:!0})),locale:p||"en-US",isInitialized:!1,theme:d,refreshData:(e=se(Fr.mark((function e(){return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A((function(e){return de({},e,{customerPortalUpdatedAt:new Date})})),e.next=3,M.stigg.refresh();case 3:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})};var e})),M=T[0],A=T[1];return r.useEffect((function(){var e=!0,r=function(t){e&&A(t)},i=function(){return r((function(e){return de({},e,{updatedAt:new Date})}))},a=function(e){return r((function(t){return t.stigg&&t.stigg.removeListener("entitlementsUpdated",i),e.addListener("entitlementsUpdated",i),de({},t,{stigg:e,isInitialized:!0,updatedAt:new Date})}))};return function(){var e=se(Fr.mark((function e(){var i;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=M.stigg,t!==C.current&&(Or.log("Updating stigg client",{apiKey:t}),C.current=t,i=n.initialize(de({},S)),r((function(e){return de({},e,{isInitialized:!1,updatedAt:new Date})}))),e.next=4,i.waitForInitialization();case 4:a(i);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()(),function(){e=!1,M.stigg.removeListener("entitlementsUpdated",i),M.stigg.clearCustomer()}}),[t]),r.useEffect((function(){var e=M.stigg;c?e.setCustomerId(c,u,s):e.clearCustomer()}),[c,u,s]),r.useEffect((function(){A((function(e){return de({},e,{theme:d})}))}),[d]),i.createElement(Hr.Provider,{value:M},i.createElement(w.SkeletonTheme,{baseColor:"#F5F6F9",highlightColor:"#e5e6ea"},v))},exports.SubscriptionsOverview=Ma,exports.useActiveSubscriptions=function(e){var t=Vr({optional:!0}),n=null==t?void 0:t.stigg,i=Uc({func:r.useCallback((function(){return n?n.getActiveSubscriptions(e):Promise.resolve([])}),[e,n])}),a=i.data,o=i.error,l=i.isLoaded;return r.useMemo((function(){return{activeSubscriptions:a,isLoaded:l,error:o}}),[a,o,l])},exports.useBooleanEntitlement=Bc,exports.useCustomerPortal=function(e){var t=Vr({optional:!0}),n=null==t?void 0:t.stigg,i=Uc({func:r.useCallback((function(){return n?n.getCustomerPortal(e):Promise.resolve(null)}),[e,n])}),a=i.data,o=i.error,l=i.isLoaded;return r.useMemo((function(){return{customerPortal:a,isLoaded:l,error:o}}),[a,o,l])},exports.useMeteredEntitlement=Nc,exports.useNumericEntitlement=Lc,exports.usePaywall=function(e){var t=Vr({optional:!0}),n=null==t?void 0:t.stigg,i=Uc({func:r.useCallback((function(){return n?n.getPaywall(e):Promise.resolve(null)}),[e,n])}),a=i.data,o=i.error,l=i.isLoaded;return r.useMemo((function(){return{paywall:a,isLoaded:l,error:o}}),[a,o,l])},exports.useStiggContext=Vr,exports.useWaitForCheckoutCompleted=function(e){var t,n=void 0===e?{}:e,i=n.onProvisionStart,a=n.onProvisionSucceeded,o=n.onProvisionFailed,l=Vr().stigg,c=r.useState(exports.ProvisionStatus.IN_PROGRESS),u=c[0],s=c[1],d=r.useState(!1),p=d[0],m=d[1],g=r.useMemo((function(){var e=new URLSearchParams(window.location.search);return t?e.get(t):e}),[t="checkoutCompleted",window.location.search]);return r.useEffect((function(){!function(){var e=se(Fr.mark((function e(){var t;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g&&"false"!==g.toLowerCase()&&!p){e.next=2;break}return e.abrupt("return");case 2:return m(!0),i&&i(),e.prev=4,e.next=7,l.waitForCheckoutCompleted();case 7:t=e.sent,s(exports.ProvisionStatus.SUCCEEDED),a&&a(t),e.next=17;break;case 12:e.prev=12,e.t0=e.catch(4),console.error("Failed to wait for checkout to complete",e.t0),s(exports.ProvisionStatus.FAILED),o&&o(e.t0);case 17:return e.prev=17,m(!1),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[4,12,17,20]])})));return function(){return e.apply(this,arguments)}}()()}),[l,g]),{isAwaitingCheckout:p,provisionStatus:u}};
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@stigg/js-client-sdk"),n=e(t),r=require("react"),i=e(r),a=e(require("@emotion/styled/base")),o=e(require("classnames")),l=e(require("@mui/material/Grid")),c=require("styled-typography"),u=require("@emotion/react"),s=require("lodash"),d=e(require("react-spinners/ClipLoader")),p=e(require("color")),m=e(require("lodash/merge")),g=e(require("moment")),h=e(require("lodash/isNil")),f=e(require("currency-symbol-map")),y=e(require("@mui/material/InputAdornment")),v=require("@mui/material/Button"),b=e(v),x=e(require("@emotion/styled")),E=e(require("@mui/material/TextField")),k=e(require("@mui/material/Divider")),w=require("react-loading-skeleton"),P=e(w),C=e(require("@mui/material/OutlinedInput")),S=e(require("@mui/material/Select")),T=e(require("@mui/material/MenuItem")),M=e(require("react-switch")),A=e(require("lodash/sortBy")),B=require("styled-components"),L=e(B),N=require("@mui/material/styles"),U=e(require("lodash/flatMap")),I=e(require("@mui/material/Box")),F=e(require("@mui/material/Tab")),O=e(require("lodash/isEmpty")),D=e(require("@mui/material/Tabs")),j=require("@mui/material"),W=require("react-feather"),R=e(require("@mui/material/Link")),q=require("@mui/material/Tooltip"),_=e(q),z=require("@mui/material/LinearProgress"),H=e(z),V=e(require("lodash/isUndefined")),$=e(require("lodash/lowerCase")),Z=require("immer"),G=e(require("lodash/cloneDeep")),Y=e(require("lodash/remove")),Q=e(require("lodash/keyBy")),K=e(require("lodash/compact")),X=require("@stigg/api-client-js/src/generated/sdk"),J=require("@stripe/react-stripe-js"),ee=e(require("@mui/material/StepIcon")),te=e(require("lodash/partition")),ne=e(require("@mui/material/CircularProgress")),re=e(require("@mui/material/Paper")),ie=require("@stripe/stripe-js"),ae=e(require("react-lottie")),oe=e(require("@mui/material/Collapse")),le=e(require("@mui/material/Alert")),ce=e(require("@mui/material/Radio"));function ue(e,t,n,r,i,a,o){try{var l=e[a](o),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,i)}function se(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){ue(a,r,i,o,l,"next",e)}function l(e){ue(a,r,i,o,l,"throw",e)}o(void 0)}))}}function de(){return(de=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function pe(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}function me(e,t){return t||(t=e.slice(0)),e.raw=t,e}function ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function he(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ge(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ge(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function fe(e,t,n){var r=n?" "+n:"";return e&&1!==e||!t?e&&e>1&&t?e+"-"+t+r:e&&e>1?"Minimum "+e+r:"":"Up to "+t+r}function ye(e){return null==e?void 0:e.toLocaleString("en-US",{maximumFractionDigits:0})}require("@mui/material/Chip");var ve=["children","span","style","fontWeight","variant","color","overrideColor","bold","as"];function be(e,t){switch(t){case"white":return"white";case"primary.main":return e.stigg.palette.primary;case"primary.main.light":return e.stigg.palette.primaryLight;case"warning":return e.stigg.palette.warning;case"error":return e.stigg.palette.error;default:return e.stigg.palette.text[t]}}var xe=a(c.Text,{target:"ewjez2x0"})("margin:0;",(function(e){return e.$span&&"display: inline"}),";");function Ee(e){switch(e){case"bold":return c.FontWeight.Bold;case"normal":default:return c.FontWeight.Normal}}function ke(e,t){var n=e.stigg.typography;switch(t){case"h1":return Ee(n.h1.fontWeight);case"h3":return Ee(n.h2.fontWeight);case"h6":return Ee(n.h3.fontWeight);case"body1":return Ee(n.body.fontWeight);case"caption":return Ee(n.caption.fontWeight);default:return c.FontWeight.Normal}}var we,Pe,Ce,Se,Te,Me,Ae,Be,Le,Ne,Ue,Ie,Fe,Oe,De=r.forwardRef((function(e,t){var n=e.children,r=e.span,a=e.style,o=e.fontWeight,l=e.variant,s=void 0===l?"body1":l,d=e.color,p=void 0===d?"primary":d,m=e.overrideColor,g=e.bold,h=e.as,f=void 0===h?"p":h,y=pe(e,ve),v=u.useTheme(),b=function(e){switch(e){case"h1":return 1;case"h3":return 2;case"h6":return 3;case"body1":return 4;case"caption":return 5;default:return 3}}(s),x="typography-level-"+b;return i.createElement(xe,Object.assign({as:f,ref:t},y,{className:e.className?e.className+" "+x:x,style:a,level:b,color:m||be(v,p),fontWeight:null!=o?o:g?c.FontWeight.Bold:ke(v,s),$span:r}),n)})),je=function(e,t){switch(e){case"primary":return t.stigg.palette.text.primary;case"secondary":return t.stigg.palette.text.secondary;default:return e}};function We(){return(We=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Re(){return(Re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function qe(){return(qe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _e(){return(_e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ze(){return(ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function He(){return(He=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ve,$e,Ze,Ge=function(e){return r.createElement("svg",He({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Oe||(Oe=r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.954 1.034A1 1 0 0 1 6.3 2.287a5.666 5.666 0 1 0 7.367 5.406 1 1 0 0 1 2 0c0 .23-.01.458-.03.684.01.072.012.147.006.223l-.004.049a1 1 0 0 1-.078.312A7.668 7.668 0 1 1 5.7.38a1 1 0 0 1 1.254.654Zm.614.239A1 1 0 0 1 8.648.36l.05.004a1 1 0 1 1-.182 1.992l-.037-.003a1 1 0 0 1-.911-1.081Zm4.85 1.636a1 1 0 0 1 1.41.11l.064.076a1 1 0 1 1-1.537 1.28 4.154 4.154 0 0 0-.047-.056 1 1 0 0 1 .11-1.41ZM9 5.334a1 1 0 0 0-2 0V8a1 1 0 0 0 1 1h2.667a1 1 0 1 0 0-2H9V5.334Z",fill:"#7586B0"})))};function Ye(){return(Ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Qe(){return(Qe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ke,Xe,Je,et,tt,nt,rt,it,at,ot,lt,ct,ut,st,dt,pt,mt,gt,ht,ft,yt,vt,bt,xt,Et,kt,wt,Pt=function(e){return r.createElement("svg",Qe({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ze||(Ze=r.createElement("path",{d:"M10.833 2.5a7.5 7.5 0 0 0-7.5 7.5h-2.5l3.242 3.242.058.116L7.5 10H5a5.829 5.829 0 0 1 5.833-5.833A5.83 5.83 0 0 1 16.667 10a5.83 5.83 0 0 1-5.834 5.833 5.786 5.786 0 0 1-4.116-1.716L5.533 15.3a7.462 7.462 0 0 0 5.3 2.2 7.5 7.5 0 0 0 0-15ZM10 6.667v4.166l3.567 2.117.6-1.008-2.917-1.734V6.667H10Z",fill:"#6678A7"})))};function Ct(){return(Ct=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function St(){return(St=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Tt(){return(Tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Mt(){return(Mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function At(){return(At=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Bt(){return(Bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Lt(){return(Lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Nt(){return(Nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ut(){return(Ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function It(){return(It=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ft(){return(Ft=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ot(){return(Ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Dt(){return(Dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function jt(){return(jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Wt(){return(Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Rt(){return(Rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var qt,_t,zt,Ht={__proto__:null,Addons:function(e){return r.createElement("svg",We({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),we||(we=r.createElement("g",{clipPath:"url(#addons_svg__a)",stroke:"#7586B0",strokeWidth:1.714,strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M12 6.857v10.286M6.857 12h10.286M18 .857H6A5.143 5.143 0 0 0 .857 6v12A5.143 5.143 0 0 0 6 23.143h12A5.143 5.143 0 0 0 23.143 18V6A5.143 5.143 0 0 0 18 .857Z"}))),Pe||(Pe=r.createElement("defs",null,r.createElement("clipPath",{id:"addons_svg__a"},r.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})))))},BillingInfoCustomer:function(e){return r.createElement("svg",Re({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ce||(Ce=r.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),Se||(Se=r.createElement("path",{d:"M26 27v-2a4 4 0 0 0-4-4h-8a4 4 0 0 0-4 4v2",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Te||(Te=r.createElement("path",{clipRule:"evenodd",d:"M18 17a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},ContactSupport:function(e){return r.createElement("svg",qe({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Me||(Me=r.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),Ae||(Ae=r.createElement("path",{d:"M27 18.22C27 12.73 22.74 9 18 9c-4.69 0-9 3.65-9 9.28-.6.34-1 .98-1 1.72v2c0 1.1.9 2 2 2h1v-6.1c0-3.87 3.13-7 7-7s7 3.13 7 7V25h-8v2h8c1.1 0 2-.9 2-2v-1.22c.59-.31 1-.92 1-1.64v-2.3c0-.7-.41-1.31-1-1.62Z",fill:"#7586B0"})),Be||(Be=r.createElement("path",{d:"M15 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM21 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",fill:"#7586B0"})),Le||(Le=r.createElement("path",{d:"M24 17.03A6.04 6.04 0 0 0 18.05 12c-3.03 0-6.29 2.51-6.03 6.45a8.075 8.075 0 0 0 4.86-5.89c1.31 2.63 4 4.44 7.12 4.47Z",fill:"#7586B0"})))},CreditCard:function(e){return r.createElement("svg",_e({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ne||(Ne=r.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),Ue||(Ue=r.createElement("path",{d:"M26 10H10c-1.11 0-1.99.89-1.99 2L8 24c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V12c0-1.11-.89-2-2-2Zm0 14H10v-6h16v6Zm0-10H10v-2h16v2Z",fill:"#7586B0"})))},DollarCoin:function(e){return r.createElement("svg",ze({width:21,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ie||(Ie=r.createElement("g",{clipPath:"url(#dollar-coin_svg__a)",stroke:"#7586B0",strokeWidth:1.714,strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M10.334 19.286A9.286 9.286 0 1 0 1.048 10a9.286 9.286 0 0 0 9.286 9.286Z"}),r.createElement("path",{d:"M12.765 7.46a1.903 1.903 0 0 0-1.796-1.27H9.494a1.7 1.7 0 0 0-.363 3.362l2.245.49a1.905 1.905 0 0 1-.407 3.768h-1.27c-.83 0-1.535-.53-1.797-1.27M10.334 6.19V4.287M10.334 15.714V13.81"}))),Fe||(Fe=r.createElement("defs",null,r.createElement("clipPath",{id:"dollar-coin_svg__a"},r.createElement("path",{fill:"#fff",transform:"translate(.333)",d:"M0 0h20v20H0z"})))))},MiniSchedule:Ge,Promotions:function(e){return r.createElement("svg",Ye({width:24,height:25,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ve||(Ve=r.createElement("g",{clipPath:"url(#promotions_svg__a)",stroke:"#7586B0",strokeWidth:1.714,strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M21.429 5.325H2.57c-.946 0-1.714.767-1.714 1.714v3.429c0 .947.768 1.714 1.714 1.714H21.43c.946 0 1.714-.768 1.714-1.714V7.039c0-.947-.768-1.714-1.714-1.714ZM21.429 12.182v9.429a1.714 1.714 0 0 1-1.715 1.714H4.286a1.714 1.714 0 0 1-1.714-1.714v-9.429M12 5.325v18M17.143 1.04 12 5.324 6.857 1.039"}))),$e||($e=r.createElement("defs",null,r.createElement("clipPath",{id:"promotions_svg__a"},r.createElement("path",{fill:"#fff",transform:"translate(0 .182)",d:"M0 0h24v24H0z"})))))},Restore:Pt,ScheduleBox:function(e){return r.createElement("svg",Ct({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ke||(Ke=r.createElement("rect",{width:36,height:36,rx:10,fill:"url(#schedule-box_svg__a)"})),Xe||(Xe=r.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),Je||(Je=r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.954 7.7a1 1 0 0 1-.654 1.254 8.998 8.998 0 0 0-1.543 16.523A9 9 0 0 0 27 17.54a1 1 0 1 1 2 0c0 .357-.017.713-.052 1.066.018.089.024.182.017.278l-.004.047a.997.997 0 0 1-.101.361A11 11 0 1 1 14.7 7.046a1 1 0 0 1 1.254.654Zm1.896.252a1 1 0 0 1 1.08-.912l.048.004a1 1 0 1 1-.178 1.992l-.038-.003a1 1 0 0 1-.912-1.081ZM22.858 9.2a1 1 0 0 1 1.391-.254l.078.054a1 1 0 1 1-1.152 1.635 8.98 8.98 0 0 0-.063-.044 1 1 0 0 1-.254-1.391Zm3.748 3.609a1 1 0 0 1 1.332.473l.04.085a1 1 0 1 1-1.813.844l-.014-.031-.019-.039a1 1 0 0 1 .474-1.332ZM19 14a1 1 0 1 0-2 0v4a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-3Z",fill:"#7586B0"})),et||(et=r.createElement("defs",null,r.createElement("linearGradient",{id:"schedule-box_svg__a",x1:35.02,y1:1.224,x2:0,y2:36,gradientUnits:"userSpaceOnUse"}))))},ScheduleClock:function(e){return r.createElement("svg",St({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),tt||(tt=r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.954 1.7A1 1 0 0 1 9.3 2.954a8.998 8.998 0 0 0-5.615 12.03A9 9 0 0 0 21 11.54a1 1 0 1 1 2 0c0 .357-.017.713-.052 1.066.018.089.024.182.017.278l-.004.047a.997.997 0 0 1-.101.361A11 11 0 1 1 8.7 1.046a1 1 0 0 1 1.254.654Zm1.896.252a1 1 0 0 1 1.08-.912l.048.004a1 1 0 1 1-.178 1.992l-.039-.003a1 1 0 0 1-.911-1.081ZM16.858 3.2a1 1 0 0 1 1.391-.254l.078.054a1 1 0 1 1-1.152 1.635 9.7 9.7 0 0 0-.063-.044 1 1 0 0 1-.254-1.391Zm3.748 3.608a1 1 0 0 1 1.332.474l.04.085a1 1 0 1 1-1.813.844l-.014-.031-.019-.039a1 1 0 0 1 .474-1.333ZM13 8a1 1 0 1 0-2 0v4a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3V8Z",fill:"#7586B0"})))},RenewSubscription:function(e){return r.createElement("svg",Tt({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),nt||(nt=r.createElement("rect",{width:36,height:36,rx:10,fill:"#F5F6F9"})),rt||(rt=r.createElement("path",{clipRule:"evenodd",d:"M9 12a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H11a2 2 0 0 1-2-2V12Z",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),it||(it=r.createElement("path",{d:"M22 8v4M14 8v4M9 16h18",stroke:"#7586B0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},Trash:function(e){return r.createElement("svg",Mt({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),at||(at=r.createElement("path",{d:"M3 6h18",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),ot||(ot=r.createElement("path",{d:"M20 6a1 1 0 1 0-2 0h2ZM6 6a1 1 0 0 0-2 0h2Zm1 0a1 1 0 0 0 2 0H7Zm8 0a1 1 0 1 0 2 0h-2Zm3 0v14h2V6h-2Zm0 14a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2Zm-1 1H7v2h10v-2ZM7 21a1 1 0 0 1-1-1H4a3 3 0 0 0 3 3v-2Zm-1-1V6H4v14h2ZM9 6V4H7v2h2Zm0-2a1 1 0 0 1 1-1V1a3 3 0 0 0-3 3h2Zm1-1h4V1h-4v2Zm4 0a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3v2Zm1 1v2h2V4h-2Z",fill:"#F88078"})),lt||(lt=r.createElement("path",{d:"M10 11v6M14 11v6",stroke:"#F88078",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},PaymentMethod:function(e){return r.createElement("svg",At({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ct||(ct=r.createElement("path",{d:"M21.167 4H2.833C1.821 4 1 4.895 1 6v12c0 1.105.82 2 1.833 2h18.334C22.179 20 23 19.105 23 18V6c0-1.105-.82-2-1.833-2Z",fill:"#C6C6C7"})),ut||(ut=r.createElement("path",{opacity:.3,d:"M19.75 16.429H17.5c-.488 0-.75-.229-.75-.762 0-.534.262-.762.75-.762h2.25c.488 0 .75.228.75.762 0 .533-.262.762-.75.762Zm-4.5 0H13c-.488 0-.75-.229-.75-.762 0-.534.262-.762.75-.762h2.25c.488 0 .75.228.75.762 0 .533-.262.762-.75.762Zm-4.5 0H8.5c-.488 0-.75-.229-.75-.762 0-.534.262-.762.75-.762h2.25c.488 0 .75.228.75.762 0 .533-.262.762-.75.762Zm-4.5 0H4c-.487 0-.75-.229-.75-.762 0-.534.263-.762.75-.762h2.25c.487 0 .75.228.75.762 0 .533-.263.762-.75.762Z",fill:"#000"})))},OutlinedCircle:function(e){return r.createElement("svg",Bt({width:21,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),st||(st=r.createElement("circle",{cx:10.333,cy:10,r:9,fill:"#fff",stroke:"#327EEE",strokeWidth:2})))},OutlinedCheckedCircle:function(e){return r.createElement("svg",Lt({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),dt||(dt=r.createElement("circle",{cx:10,cy:10,r:9.25,fill:"#327EEE",stroke:"#327EEE",strokeWidth:1.5})),pt||(pt=r.createElement("path",{d:"M5 10.364 8.637 14l4-4 2-2",stroke:"#fff",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},OutlinedCheckedCircleDisabled:function(e){return r.createElement("svg",Nt({width:21,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),mt||(mt=r.createElement("circle",{cx:10.667,cy:10,r:9.25,fill:"#B3BCD3",stroke:"#B3BCD3",strokeWidth:1.5})),gt||(gt=r.createElement("path",{d:"M5.667 10.364 9.304 14l4-4 2-2",stroke:"#fff",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},ArrowForward:function(e){return r.createElement("svg",Ut({width:18,height:18,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ht||(ht=r.createElement("path",{d:"M9 3 7.942 4.058l4.185 4.192H3v1.5h9.127l-4.185 4.193L9 15l6-6-6-6Z",fill:"#fff"})))},Close:function(e){return r.createElement("svg",It({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ft||(ft=r.createElement("path",{d:"m15.834 5.342-1.175-1.175L10 8.825 5.342 4.167 4.167 5.342 8.825 10 4.167 14.66l1.175 1.175L10 11.175l4.659 4.659 1.175-1.175L11.175 10l4.659-4.658Z",fill:"#327EEE"})))},Check:function(e){return r.createElement("svg",Ft({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),yt||(yt=r.createElement("path",{d:"M20 7 9 18l-5-5",stroke:"#F5F6F9",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},PayAsYouGoCharge:function(e){return r.createElement("svg",Ot({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),vt||(vt=r.createElement("g",{clipPath:"url(#pay-as-you-go-charge_svg__a)",stroke:"#7586B0",strokeWidth:1.714,strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M11.429 7.426 8 13.14M14.857 13.141a7.428 7.428 0 1 0-13.714 0h13.714Z"}))),bt||(bt=r.createElement("defs",null,r.createElement("clipPath",{id:"pay-as-you-go-charge_svg__a"},r.createElement("path",{fill:"#fff",d:"M0 0h16v16H0z"})))))},Coupon:function(e){return r.createElement("svg",Dt({width:16,height:16,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),xt||(xt=r.createElement("g",{stroke:"#327EEE",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"m1.27 11.943 4.787 4.787a.923.923 0 0 0 1.305 0l9.501-9.501A.443.443 0 0 0 17 6.872l-.727-4.714a.455.455 0 0 0-.43-.43l-4.714-.726a.443.443 0 0 0-.357.135L1.27 10.638a.923.923 0 0 0 0 1.305Z"}),r.createElement("path",{d:"M12.555 6.059a.615.615 0 1 1 0-1.23.615.615 0 0 1 0 1.23Z"}))))},Add:function(e){return r.createElement("svg",jt({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Et||(Et=r.createElement("path",{d:"M12 3v18m-9-9.055h18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},Remove:function(e){return r.createElement("svg",Wt({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),kt||(kt=r.createElement("path",{d:"M3 12h18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},EntitlementCheck:function(e){return r.createElement("svg",Rt({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),wt||(wt=r.createElement("path",{d:"m3 11.143 6.716 6.716a.2.2 0 0 0 .283 0L21.857 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})))}},Vt=a("div",{target:"e1ds7xyn0"})((function(e){var t=e.$pathColor;return t&&u.css(qt||(qt=me(["\n path {\n fill: ",";\n }\n "])),t)})," ",(function(e){var t=e.$rectColor;return t&&u.css(_t||(_t=me(["\n svg rect {\n fill: ",";\n }\n "])),t)})," ",(function(e){var t=e.$strokeColor;return t&&u.css(zt||(zt=me(["\n g {\n stroke: ",";\n }\n "])),t)}),";");function $t(e){var t=e.className,n=e.style,r=e.svgPathColor,a=e.svgRectColor,o=e.svgStrokeColor,l=Ht[e.icon],c=u.useTheme();return i.createElement(Vt,{className:t,style:n,$pathColor:je(r,c),$rectColor:je(a,c),$strokeColor:je(o,c)},i.createElement(l,null))}var Zt=["displayNameOverride"],Gt=a(De,{target:"e1mddeqb3"})({name:"ti75j2",styles:"margin:0"}),Yt=a("div",{target:"e1mddeqb2"})({name:"1wcglds",styles:"display:flex;align-items:center;gap:16px"}),Qt=a("div",{target:"e1mddeqb1"})({name:"za0kxg",styles:"display:flex;align-items:center;flex-shrink:0"}),Kt=a($t,{target:"e1mddeqb0"})("width:24px;height:24px;color:",(function(e){return e.theme.stigg.palette.primary}),";");function Xt(e){var n,r=e.displayNameOverride,a=pe(e,Zt),o=function(e){var n=e.hasUnlimitedUsage,r=e.feature,i=e.resetPeriod,a=e.usageLimit,o=e.minUnitQuantity,l=e.maxUnitQuantity,c=e.isCustom,u=e.enumValues,s=o||l,d=i&&a?""+function(e){if(!e)return"";switch(e){case t.EntitlementResetPeriod.Day:return"per day";case t.EntitlementResetPeriod.Hour:return"per hour";case t.EntitlementResetPeriod.Week:return"per week";case t.EntitlementResetPeriod.Month:return"per month";case t.EntitlementResetPeriod.Year:return"per year";default:return""}}(i):"";if(u)return u.length+" "+(1===u.length?null==r?void 0:r.units:null==r?void 0:r.unitsPlural);if(n)return"Unlimited "+(null==r?void 0:r.unitsPlural);if(c)return"Custom "+(null==r?void 0:r.unitsPlural);if(a){var p=1===a?null==r?void 0:r.units:null==r?void 0:r.unitsPlural;return ye(a)+" "+p+" "+d}return s?fe(o,l,null==r?void 0:r.unitsPlural):null==r?void 0:r.displayName}(a);return i.createElement(Yt,{className:"stigg-entitlement-row-container stigg-entitlement-"+(null==(n=a.feature)?void 0:n.id)},i.createElement(Qt,null,i.createElement(Kt,{icon:"EntitlementCheck",className:"stigg-entitlement-row-icon"})),i.createElement(Gt,{className:"stigg-entitlement-name",variant:"h6",color:"secondary"},r||o))}var Jt,en=a("div",{target:"e1yz7zcg0"})({name:"budh8k",styles:"display:flex;flex-direction:column;gap:16px"});function tn(e){var n,r=e.plan,a=e.billingPeriod,o=e.paywallLocale,l=((null==(n=r.pricePoints)?void 0:n.filter((function(e){return e.billingPeriod===a})))||[]).filter((function(e){return(null==e?void 0:e.minUnitQuantity)&&(null==e?void 0:e.minUnitQuantity)>1||(null==e?void 0:e.maxUnitQuantity)})).map((function(e){var t;return i.createElement(Xt,{key:"priceUnitEntitlement-"+(null==e||null==(t=e.feature)?void 0:t.displayName),feature:null!=e&&e.feature?de({},e.feature,{id:e.feature.featureId}):null,minUnitQuantity:null==e?void 0:e.minUnitQuantity,maxUnitQuantity:null==e?void 0:e.maxUnitQuantity})})),c=r.entitlements.filter((function(e){return!(e.hiddenFromWidgets||[]).includes(t.WidgetType.Paywall)}));return i.createElement(en,{className:"stigg-plan-entitlements-container"},i.createElement(De,{className:"stigg-plan-entitlements-title",color:"secondary",variant:"h6",bold:!0},function(e,t,n){if(t.entitlementsTitle)return t.entitlementsTitle(e);var r=n?"Includes:":"";return e.basePlan&&(r="Everything in "+e.basePlan.displayName+(n?", plus:":"")),r}(r,o,l.length>0||c.length>0)),l,c.map((function(e){var t;return i.createElement(Xt,{key:null==(t=e.feature)?void 0:t.id,displayNameOverride:e.displayNameOverride,feature:e.feature,resetPeriod:e.resetPeriod,hasUnlimitedUsage:e.hasUnlimitedUsage,usageLimit:e.usageLimit,enumValues:e.enumValues,isCustom:e.isCustom})})))}(Jt=exports.SubscribeIntentionType||(exports.SubscribeIntentionType={})).START_TRIAL="START_TRIAL",Jt.UPGRADE_TRIAL_TO_PAID="UPGRADE_TRIAL_TO_PAID",Jt.REQUEST_CUSTOM_PLAN_ACCESS="REQUEST_CUSTOM_PLAN_ACCESS",Jt.CHANGE_BILLING_PERIOD="CHANGE_BILLING_PERIOD",Jt.CHANGE_UNIT_QUANTITY="CHANGE_UNIT_QUANTITY",Jt.UPGRADE_PLAN="UPGRADE_PLAN",Jt.DOWNGRADE_PLAN="DOWNGRADE_PLAN",Jt.CANCEL_SCHEDULED_UPDATES="CANCEL_SCHEDULED_UPDATES";var nn,rn,an=function(e){return{left:"flex-start",center:"center",right:"flex-end"}[e]},on=function(e){return g.utc(e).format("MMMM Do, yyyy")};function ln(e){var n=e.scheduledUpdate,r=e.subscriptionPrices,a=e.billingPeriodRange,o=e.options,l=void 0===o?{}:o;if(!n)return{};var c=l.withDate,u=l.postfix,d=void 0===u?"":u;switch(n.subscriptionScheduleType){case t.SubscriptionScheduleType.Downgrade:var p,m=c;return h(m)&&null!=a&&a.end&&(m=!g(n.scheduledExecutionTime).isSame(null==a?void 0:a.end,"day")),{line1:i.createElement(i.Fragment,null,"Your subscription will be downgraded to the ",i.createElement("b",null,null==(p=n.targetPackage)?void 0:p.displayName," plan")," ",m?i.createElement(i.Fragment,null,"on ",on(n.scheduledExecutionTime)):d,"."),line2:"Until then you still have access to your current plan."};case t.SubscriptionScheduleType.BillingPeriod:var f;return{line1:i.createElement(i.Fragment,null,"Your billing cycle will change to ",i.createElement("b",null,null==(f=n.scheduleVariables.billingPeriod)?void 0:f.toLocaleLowerCase())," ",c?i.createElement(i.Fragment,null,"on ",on(n.scheduledExecutionTime)):d,".")};case t.SubscriptionScheduleType.UnitAmount:var y=n.scheduleVariables,v=s.compact(s.map(r,"feature")).find((function(e){return e.id===y.featureId}))||{},b=v.featureUnits,x=1===y.newUnitAmount?b:v.featureUnitsPlural;return{line1:i.createElement(i.Fragment,null,"Your subscription will be updated to ",i.createElement("b",null,y.newUnitAmount)," ",x," ",c?i.createElement(i.Fragment,null,"on ",on(n.scheduledExecutionTime)):d,"."),line2:"Until then you still have access to your current "+b+" count."};default:return{}}}function cn(e){return e.feature&&(1!==e.feature.unitQuantity?e.feature.unitsPlural:e.feature.units)||""}function un(e,t){var n=[].concat(e);n.sort((function(e,t){return e.upTo?t.upTo?e.upTo-t.upTo:-1:1}));for(var r,i=he(n);!(r=i()).done;){var a=r.value;if(a.upTo&&t<=a.upTo)return a}return n[n.length-1]}function sn(e,n,r){return n===t.BillingPeriod.Annually&&r?e/12:e}function dn(e,t,n,r){var i=0;return e.unitPrice&&(i+=sn(e.unitPrice.amount,n,r)*t),e.flatPrice&&(i+=sn(e.flatPrice.amount,n,r)),i}function pn(e,t,n,r){for(var i=t,a=0,o=0,l=[];i>0&&o<e.length;){var c=e[o],u=c.upTo;if(h(u))l.push({unitQuantity:i,amount:dn(c,i,n,r)}),i=0;else{var d=Math.min(i,u-a);l.push({unitQuantity:d,amount:dn(c,d,n,r)}),i-=d,a=u}o+=1}var p=s.sum(l.map((function(e){return e.amount})));return{breakdown:l,total:p}}function mn(e,n,r,i){if(!e.tiers)return 0;switch(e.tiersMode){case t.TiersMode.Volume:return dn(un(e.tiers,n),n,r,i);case t.TiersMode.Graduated:return pn(e.tiers,n,r,i).total;default:return 0}}function gn(e){return null==e?void 0:e.some((function(e){return e.unitPrice&&!h(e.upTo)}))}function hn(e){var n=e.plan,r=e.billingPeriod,i=e.currentSubscription,a=e.currentSubscriptionOverride,o=e.selectDefaultTierIndex,l=n.pricePoints.filter((function(e){return e.billingPeriod===r&&e.isTieredPrice}));if(1===l.length){var c=l[0],u=c.feature.featureId,s=o?o({plan:n}):0,d=c.tiers[s],p=gn(c.tiers)?1:d.upTo||1;if(i&&i.plan.id===n.id){var m=i.prices.find((function(e){var n;return e.pricingModel===t.BillingModel.PerUnit&&e.tiersMode&&(null==(n=e.feature)?void 0:n.featureId)===u}));m&&(p=m.feature.unitQuantity||1)}if((null==a?void 0:a.planId)===n.id){var g=a.billableFeatures.find((function(e){return e.featureId===u}));g&&(p=g.quantity)}var h={};return h[u]=p,h}return{}}!function(e){e[e.Lower=-1]="Lower",e[e.Equal=0]="Equal",e[e.Higher=1]="Higher"}(nn||(nn={}));var fn=a(d,{target:"e199qof96"})({name:"1a2afmv",styles:"margin-left:10px"}),yn=a("button",{target:"e199qof95"})("cursor:",(function(e){return e.$disabled?"default":"pointer"}),";padding:8px 12px;background-color:",(function(e){return e.theme.stigg.palette.backgroundButton}),";border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedRestingBorder}),";border-radius:10px;display:flex;align-items:center;justify-content:center;min-height:42px;min-width:120px;",(function(e){return e.$disabled&&u.css(rn||(rn=me(["\n opacity: 0.5;\n "])))})," &:hover{background-color:",(function(e){var t=e.theme;return e.$disabled?t.stigg.palette.backgroundButton:t.stigg.palette.outlinedHoverBackground}),";}"),vn=a(De,{target:"e199qof94"})({name:"h05omw",styles:"margin:0;font-size:15px"}),bn=a(De,{target:"e199qof93"})({name:"1cnls12",styles:"min-height:87px"}),xn=a("button",{target:"e199qof92"})("background:none;border:none;padding:0;color:",(function(e){return e.theme.stigg.palette.text.secondary}),";text-decoration:underline;cursor:pointer;"),En=a(De,{target:"e199qof91"})({name:"1etgg0o",styles:"margin-top:8px;margin-bottom:17px;min-height:20px"}),kn=a("div",{target:"e199qof90"})("display:flex;flex-direction:column;margin-top:4px;align-self:",(function(e){return an(e.theme.stigg.layout.ctaAlignment)}),";width:100%;");function wn(e){var n=e.isNextPlan,a=e.customer,o=e.plan,l=e.billingPeriod,c=e.isCustomerOnTrial,d=e.onPlanSelected,p=e.paywallLocale,m=e.withTrialLeftRow,g=e.currentSubscription,f=e.currentSubscriptionOverride,y=e.perUnitQuantityByFeature,v=u.useTheme(),b=r.useState(!1),x=b[0],E=b[1],k=p.planCTAButton,w=k.currentPlan,P=k.custom,C=k.downgrade,S=k.startTrial,T=k.upgrade,M=k.startNew,A=k.switchToBillingPeriod,B=k.cancelScheduledUpdate,L=s.isFunction(C)?C(o):C,N=s.isFunction(T)?T(o):T,U={title:a?o.isLowerThanCurrentPlan?L:N:M,disabled:!1,intentionType:o.isLowerThanCurrentPlan?exports.SubscribeIntentionType.DOWNGRADE_PLAN:c?exports.SubscribeIntentionType.UPGRADE_TRIAL_TO_PAID:exports.SubscribeIntentionType.UPGRADE_PLAN},I=o.pricingType===t.PricingType.Custom,F=ln({scheduledUpdate:o.scheduledUpdate,options:{withDate:!0}}).line1;if(!o.isTriable||o.isCurrentCustomerPlan||c)if(o.isCurrentCustomerPlan&&!c)if(l===o.currentCustomerPlanBillingPeriod||o.pricingType&&[t.PricingType.Free,t.PricingType.Custom].includes(o.pricingType))switch(function(e){var n=e.perUnitQuantityByFeature,r=e.plan,i=e.currentSubscription,a=e.currentSubscriptionOverride;if(!i)return nn.Equal;var o,l=i.prices.find((function(e){return e.pricingModel===t.BillingModel.PerUnit&&e.tiersMode})),c=r.id===(null==a?void 0:a.planId);if(c&&(l=null!=(o=r.pricePoints.find((function(e){return e.pricingModel===t.BillingModel.PerUnit&&e.tiersMode})))?o:l),!l)return nn.Equal;var u=l.feature,s=u.featureId,d=u.unitQuantity;if(c){var p,m=null==a||null==(p=a.billableFeatures)?void 0:p.find((function(e){return e.featureId===s}));m&&(d=m.quantity)}if(h(d))return nn.Equal;var g=n[s];return g<d?nn.Lower:g>d?nn.Higher:nn.Equal}({perUnitQuantityByFeature:y,plan:o,currentSubscription:g,currentSubscriptionOverride:f})){case nn.Lower:U.intentionType=exports.SubscribeIntentionType.CHANGE_UNIT_QUANTITY,U.title=L;break;case nn.Higher:U.intentionType=exports.SubscribeIntentionType.CHANGE_UNIT_QUANTITY,U.title=N;break;default:U.title=w,U.disabled=!0}else U.title=A(l),U.intentionType=exports.SubscribeIntentionType.CHANGE_BILLING_PERIOD;else I&&(U.title="function"==typeof P?P({plan:o,selectedBillingPeriod:l}):P,U.intentionType=exports.SubscribeIntentionType.REQUEST_CUSTOM_PLAN_ACCESS);else U.title=S(o),U.intentionType=exports.SubscribeIntentionType.START_TRIAL;n&&o.scheduledUpdate&&(U.disabled=!1,U.title=B,U.intentionType=exports.SubscribeIntentionType.CANCEL_SCHEDULED_UPDATES);var O=x||U.disabled;return i.createElement(i.Fragment,null,i.createElement(kn,{className:"stigg-paywall-plan-button-layout"},n&&F?i.createElement(bn,{color:"secondary",variant:"body1",className:"stigg-paywall-schedule-update-text"},F," ",i.createElement(xn,{color:"secondary",onClick:function(){E(!0),Promise.resolve(d(U.intentionType)).finally((function(){return E(!1)}))}},U.title)):i.createElement(i.Fragment,null,i.createElement(yn,{className:"stigg-paywall-plan-button","data-testid":"paywall-card-cta-"+o.displayName,disabled:O,$disabled:O,onClick:function(){E(!0),Promise.resolve(d(U.intentionType)).finally((function(){return E(!1)}))}},i.createElement(vn,{className:"stigg-paywall-plan-button-text",variant:"h6",color:"primary.main"},U.title),x&&i.createElement(fn,{color:v.stigg.palette.text.disabled,loading:!0,size:16})),m?i.createElement(En,{className:"stigg-trial-days-left-text",variant:"h6",color:"secondary"},o.isCurrentCustomerPlan&&o.trialDaysLeft&&i.createElement(i.Fragment,null,i.createElement("b",null,o.trialDaysLeft," days")," left on your free trial")):i.createElement("div",{style:{height:"20px"}}))))}var Pn=function(e){var n=e.amount,r=e.currency,i=e.locale,a=e.maximumFractionDigits,o=void 0===a?5:a,l=e.minimumFractionDigits,c=void 0===l?0:l,u=e.removeTrailingZero,s=(void 0===r?t.Currency.Usd:r).toString(),d=f(s),p=new Intl.NumberFormat(i,de({maximumFractionDigits:o,minimumFractionDigits:c,style:"currency",currency:s,trailingZeroDisplay:u?"stripIfInteger":"auto"},d?{currencyDisplay:"code"}:{})).format(n||0);return d&&(p=p.replace(s,d)),p.replace(/\s/g,"")};function Cn(e,t){return new Intl.NumberFormat((void 0===t?{}:t).locale).format(e)}function Sn(e,n,r,i,a,o){switch(e.pricingType){case t.PricingType.Free:return"function"==typeof r.price.free?r.price.free(e.paywallCurrency):r.price.free;case t.PricingType.Custom:return{price:"function"==typeof r.price.custom?r.price.custom({plan:e,selectedBillingPeriod:n}):r.price.custom};case t.PricingType.Paid:var l,c=e.pricePoints.filter((function(e){return e.billingPeriod===n})),u=null==(l=e.paywallCalculatedPricePoints)?void 0:l.find((function(e){return e.billingPeriod===n}));if(!(null!=c&&c.length||u))return{price:r.price.priceNotSet};var s={planPrices:c,paywallCalculatedPrice:u,selectedBillingPeriod:n,perUnitQuantityByFeature:o||{}};return r.price.paid?r.price.paid(de({},s,{plan:e})):function(e){for(var n,r,i,a=e.planPrices,o=e.selectedBillingPeriod,l=e.locale,c=e.shouldShowMonthlyPriceAmount,u=e.perUnitQuantityByFeature,s=e.paywallCalculatedPrice||a[0],d=s.currency,p=s.amount||0,m=1===a.length,g=o===t.BillingPeriod.Annually&&c?p/12:p,h=e.paywallLocale.price.pricePeriod(c?t.BillingPeriod.Monthly:t.BillingPeriod.Annually),f=h,y=he(a);!(i=y()).done;){var v=i.value;if(v.isTieredPrice&&v.tiers){var b=(null==u?void 0:u[v.feature.featureId])||1;n=v.tiers,r=cn(v),g+=mn(v,b,o,c)}}if(m){var x,E,k,w=a[0],P=w.blockSize&&w.blockSize>1?"for "+Cn(w.blockSize)+" "+((null==(x=w.feature)?void 0:x.unitsPlural)||(null==(E=w.feature)?void 0:E.units)||""):"per "+((null==(k=w.feature)?void 0:k.units)||"");w.pricingModel!==t.BillingModel.PerUnit||w.isTieredPrice?w.pricingModel===t.BillingModel.UsageBased&&(f=""+P):f=P+" "+h}return{price:Pn({amount:g,currency:d,locale:l,minimumFractionDigits:2,removeTrailingZero:!0}),unit:f,tiers:n,tierUnits:r}}(de({},s,{locale:i,shouldShowMonthlyPriceAmount:a,paywallLocale:r}));default:return{price:""}}}var Tn=["variant"],Mn=a(b,{shouldForwardProp:function(e){return!e.startsWith("$")},target:"effv4rq0"})("border-radius:10px;text-transform:none;background-color:",(function(e){var t=e.theme;return e.$success?t.stigg.palette.success:e.$error?t.stigg.palette.error:""}),";&:hover{background-color:",(function(e){var t=e.theme;return e.$success?t.stigg.palette.successDark:e.$error?t.stigg.palette.errorDark:""}),";}"),An=function(e){var t=e.variant,n=void 0===t?"outlined":t,r=pe(e,Tn);return i.createElement(Mn,Object.assign({variant:n},r))},Bn=x(E)((function(e){var t=e.theme;return{"& .MuiOutlinedInput-root":{height:"42px",borderRadius:t.stigg.border.radius,fieldset:{borderColor:t.stigg.palette.outlinedBorder},"&:not(.Mui-focused):hover fieldset":{borderColor:t.stigg.palette.outlinedRestingBorder}},"& .MuiInputBase-input":de({padding:"8px 12px",borderRadius:t.stigg.border.radius,fontFamily:t.stigg.typography.fontFamily,color:t.stigg.palette.text.primary},t.stigg.typography.body),"& .Mui-error":{fontFamily:t.stigg.typography.fontFamily}}})),Ln=a(l,{shouldForwardProp:function(e){return!e.startsWith("$")},target:"e1v7qkry3"})("display:flex;flex-direction:",(function(e){return e.$flexDirection||"row"}),";gap:",(function(e){return e.$gap}),"px;"),Nn=a(Ln,{target:"e1v7qkry2"})({name:"o7lzx8",styles:"span{display:flex;flex:1;}"}),Un=a(l,{target:"e1v7qkry1"})("span{display:flex;flex:",(function(e){return e.flex}),";}"),In=a(P,{target:"e1v7qkry0"})({name:"1u8hqvf",styles:"border-radius:4px"}),Fn=a(l,{target:"e1q84ats0"})({name:"1fttcpj",styles:"display:flex;flex-direction:column"});function On(){return i.createElement(Fn,{container:!0},i.createElement(Ln,{item:!0,$gap:48},i.createElement(In,{width:120,height:20}),i.createElement(In,{width:120,height:20})),i.createElement(k,{className:"stigg-checkout-plan-header-divider",sx:{marginY:2}}),i.createElement(Fn,{item:!0},i.createElement(In,{width:120,height:20}),i.createElement(Nn,{$gap:16,marginTop:3},i.createElement(In,{height:20}),i.createElement(In,{height:20})),i.createElement(Ln,{$gap:130,marginTop:3},i.createElement(Un,{flex:1},i.createElement(In,{height:20})),i.createElement(Un,{flex:3},i.createElement(In,{height:20})))))}var Dn=function(e){return e.target.blur()};function jn(e){var t=e.value,n=e.handleChange;return i.createElement(Bn,{type:"number",onWheel:Dn,fullWidth:!0,sx:{minHeight:"46px",width:e.width},InputProps:{endAdornment:i.createElement(y,{position:"end"},i.createElement(De,{variant:"body1",color:"primary"},e.tierUnits))},value:t,onChange:function(e){var t,r,i=null!=e&&null!=(t=e.target)&&t.value?Number(null==e||null==(r=e.target)?void 0:r.value):null;i&&n(i)}})}var Wn=a(S,{target:"e1v59qar1"})("border-radius:10px;min-height:42px;min-width:120px;&:hover .MuiOutlinedInput-notchedOutline{border-color:",(function(e){return e.theme.stigg.palette.outlinedBorder}),";}"),Rn=a(C,{target:"e1v59qar0"})("& .MuiInputBase-input{padding:10px 12px;}&.Mui-focused .MuiOutlinedInput-notchedOutline{border-color:",(function(e){return e.theme.stigg.palette.primary}),"!important;}");function qn(e){var t=e.componentId,n=e.tierUnits,r=e.tiers,a=e.handleChange;return r?i.createElement(Wn,{value:e.value.toString(),fullWidth:!0,onChange:function(e){var t,n,r=null!=e&&null!=(t=e.target)&&t.value?Number(null==e||null==(n=e.target)?void 0:n.value):null;r&&a(r)},id:t,input:i.createElement(Rn,null),MenuProps:{MenuListProps:{disablePadding:!0},PaperProps:{sx:{marginTop:"4px",borderRadius:"10px"}}}},s.map(r,(function(e){var t;return i.createElement(T,{className:"stigg-price-tier-menu-item-text",key:e.upTo,value:null==(t=e.upTo)?void 0:t.toString()},i.createElement(De,{variant:"body1",color:"primary",style:{lineHeight:"unset"}},ye(e.upTo)," ",n))}))):null}var _n=a(De,{target:"eeq8l4e0"})({name:"1m2htit",styles:"min-height:46px"});function zn(e){return i.createElement(_n,{as:"div",className:"stigg-price-tier-select"},gn(e.tiers)?i.createElement(jn,Object.assign({},e)):i.createElement(qn,Object.assign({},e)))}var Hn=a(De,{target:"e1gsqbi12"})({name:"bfvx8c",styles:"word-break:break-word;width:100%"}),Vn=a(De,{target:"e1gsqbi11"})({name:"1bmnxg7",styles:"white-space:nowrap"}),$n=a(De,{target:"e1gsqbi10"})({name:"nurf5y",styles:"white-space:normal;min-height:39px"});function Zn(e){var t=e.billingPeriod,n=e.hasMonthlyPrice,r=e.hasAnnuallyPrice,a=e.paywallLocale,o="‎";return e.plan.pricePoints.find((function(e){return e.billingPeriod===t}))&&n&&r&&(o=(null==a.price.billingPeriod?void 0:a.price.billingPeriod(t))||", billed "+t.toLowerCase()),i.createElement(De,{span:!0,className:"stigg-price-billing-period-text",variant:"h6",color:"secondary"},o)}var Gn=function(e){var t,n=e.showStartingAt,r=e.withUnitPriceRow,a=e.withStartingAtRow,o=e.withTiersRow,l=e.plan,c=e.billingPeriod,u=e.paywallLocale,s=e.hasMonthlyPrice,d=e.hasAnnuallyPrice,p=e.perUnitQuantityByFeature,m=e.setPerUnitQuantityByFeature,g=Sn(l,c,u,e.locale,s,p),h=g.price,f=g.unit,y=g.tiers,v=g.tierUnits,b=l.pricePoints.find((function(e){return e.billingPeriod===c&&e.isTieredPrice})),x=b?b.feature.featureId:void 0,E=null!=(t=p[x||""])?t:1;return i.createElement(Hn,{as:"div",className:"stigg-price-text"},i.createElement(i.Fragment,null,a&&i.createElement(De,{style:{minHeight:"20px"},className:"stigg-starting-at-text",variant:"body1",color:"secondary"},n?u.price.startingAtCaption:"‎"),i.createElement($n,{className:"stigg-price-point",variant:"h1"},h),r&&i.createElement(De,{as:"div",className:"stigg-price-unit-and-billing-period-text",style:{minHeight:"48px"}},i.createElement(Vn,{className:"stigg-price-unit-text",span:!0,variant:"h6",color:"secondary"},f),i.createElement(Zn,{plan:l,billingPeriod:c,hasAnnuallyPrice:d,hasMonthlyPrice:s,paywallLocale:u})),o?i.createElement(zn,{componentId:l.id+"_"+x+"_tier",tiers:y,tierUnits:v,tiersMode:null==b?void 0:b.tiersMode,handleChange:function(e){x&&m((function(t){var n;return de({},t,((n={})[x]=e,n))}))},value:E}):null))},Yn=a(b,{target:"es1eyot8"})({name:"1j8c8e1",styles:"padding:0px;text-transform:none;margin-left:0px"}),Qn=a(De,{target:"es1eyot7"})({name:"1sdidca",styles:"font-size:14px;font-weight:500"}),Kn=a("div",{target:"es1eyot6"})({name:"1flhffq",styles:"width:100%;gap:10px"}),Xn=a("div",{target:"es1eyot5"})({name:"1j79gdw",styles:"margin-top:10px;overflow:hidden;display:flex;flex-direction:column;gap:4px;width:100%"}),Jn=a("div",{target:"es1eyot4"})({name:"16xmbx6",styles:"display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between;padding:8px 0px;max-height:44px;gap:16px"}),er=a(De,{target:"es1eyot3"})({name:"irnfe6",styles:"overflow:hidden;font-feature-settings:'liga' off,'clig' off;text-overflow:ellipsis;font-family:'DM Sans';letter-spacing:0.15px;white-space:nowrap;min-width:0;flex-shrink:1"}),tr=a($t,{target:"es1eyot2"})("width:24px;height:24px;color:",(function(e){return e.theme.stigg.palette.primary}),";"),nr=a("div",{target:"es1eyot1"})({name:"fxp7t8",styles:"flex:1;min-width:0"}),rr=a("div",{target:"es1eyot0"})({name:"152fk9e",styles:"margin-top:16px;display:flex"});function ir(e){var n=e.addons,a=e.paywallLocale,l=r.useState(!1),c=l[0],u=l[1];if(!n||0===n.length)return null;var s=n.filter((function(e){var n;return!(null!=(n=e.hiddenFromWidgets)&&n.includes(t.WidgetType.Paywall))})),d=c?s:s.slice(0,4);return i.createElement(Kn,{className:"stigg-compatible-addons-container"},i.createElement(De,{className:"stigg-compatible-addons-header",color:"secondary",variant:"body1",bold:!0},a.addonsTitle),i.createElement(Xn,{className:"stigg-compatible-addons-list"},d.map((function(e){return i.createElement(Jn,{key:e.id,className:o("stigg-compatible-addon--"+e.id,"stigg-compatible-addon-item")},i.createElement(tr,{icon:"Add",className:"stigg-compatible-addon-icon"}),i.createElement(nr,{className:"stigg-compatible-addon-content"},i.createElement(er,{variant:"body1",color:"primary",className:"stigg-compatible-addon-name"},e.displayName)))}))),s.length>4&&i.createElement(rr,null,i.createElement(Yn,{variant:"text",onClick:function(){u(!c)}},i.createElement(Qn,{color:"primary.main"},c?"Show less":"Show "+(s.length-4)+" more"))))}var ar=a("div",{target:"eacdu8d9"})("position:relative;background-color:",(function(e){var t=e.theme;return e.$isCurrentPlan?t.stigg.palette.backgroundHighlight:t.stigg.palette.backgroundPaper}),";border:",(function(e){var t=e.theme;return e.$isHighlighted?"3px solid "+t.stigg.palette.primary:"1px solid "+t.stigg.palette.outlinedBorder}),";border-radius:10px;padding:",(function(e){return e.theme.stigg.layout.planPadding}),";display:flex;min-width:",(function(e){return e.theme.stigg.layout.planMinWidth}),";max-width:",(function(e){return e.theme.stigg.layout.planMaxWidth}),";flex-direction:column;align-items:flex-start;justify-content:flex-start;position:relative;"),or=a("div",{target:"eacdu8d8"})("margin-top:",(function(e){return e.$planHasEntitlements?"32px":"0px"}),";"),lr=a(De,{target:"eacdu8d7"})({name:"mpkj0c",styles:"padding-bottom:8px"}),cr=a("div",{target:"eacdu8d6"})("height:2px;width:100%;background-color:",(function(e){return e.theme.stigg.palette.outlinedBorder}),";margin-bottom:40px;"),ur=a(De,{target:"eacdu8d5"})("text-align:",(function(e){return e.theme.stigg.layout.descriptionAlignment}),";min-height:",(function(e){return e.theme.stigg.layout.descriptionMinHeight}),";"),sr=a("div",{target:"eacdu8d4"})("background-color:",(function(e){return e.theme.stigg.palette.primary}),";border-radius:40px;position:absolute;top:-12px;"),dr=a(De,{target:"eacdu8d3"})({name:"a8c38r",styles:"margin:0;padding:2px 8px"}),pr=a("div",{target:"eacdu8d2"})("width:100%;display:flex;flex-direction:column;align-items:",(function(e){return an(e.theme.stigg.layout.headerAlignment)}),";"),mr=a("div",{target:"eacdu8d1"})("position:absolute;top:0;background-color:",(function(e){return e.theme.stigg.palette.outlinedBorder}),";border-radius:0px 0px 10px 10px;padding:3px 12px;"),gr=a(Ge,{target:"eacdu8d0"})("display:flex;height:100%;margin-right:4px;path{fill:",(function(e){return e.theme.stigg.palette.text.primary}),";}");function hr(e){var t=e.text,n=void 0===t?"Next":t;return i.createElement(mr,null,i.createElement(l,{display:"flex",alignItems:"center",gap:1},i.createElement(gr,{$iconsColor:e.iconsColor}),i.createElement(De,{color:"primary",variant:"body1"},n)))}function fr(e){var n,a=e.withUnitPriceRow,l=e.withTiersRow,c=e.withTrialLeftRow,u=e.customer,s=e.plan,d=e.billingPeriod,p=e.isHighlighted,m=e.currentSubscription,g=e.currentSubscriptionOverride,h=e.shouldShowDescriptionSection,f=e.hasMonthlyPrice,y=e.hasAnnuallyPrice,v=e.isCustomerOnTrial,b=e.onPlanSelected,x=e.paywallLocale,E=e.locale,k=e.withStartingAtRow,w=e.isCustomerInCustomPlan,P=e.selectDefaultTierIndex,C=e.hideCompatibleAddons,S=s.isNextPlan&&s.isNextPlan(d),T=s.pricePoints.filter((function(e){return e.billingPeriod===d})),M=null==(n=s.paywallCalculatedPricePoints)?void 0:n.find((function(e){return e.billingPeriod===d})),A=T.length>1&&!(null==M||!M.additionalChargesMayApply),B=!w||s.pricingType===t.PricingType.Custom,L=null;S?L=i.createElement(hr,{text:"Next plan"}):p&&x.highlightChip&&(L=i.createElement(sr,{className:"stigg-highlight-badge"},i.createElement(dr,{className:"stigg-highlight-badge-text",color:"white",bold:!0},x.highlightChip)));var N=r.useState(hn({plan:s,billingPeriod:d,currentSubscription:m,currentSubscriptionOverride:g,selectDefaultTierIndex:P})),U=N[0],I=N[1];return i.createElement(ar,{className:o("stigg-"+s.id,"stigg-plan-offering-container",{"stigg-current-plan":s.isCurrentCustomerPlan}),$isHighlighted:p,$isCurrentPlan:s.isCurrentCustomerPlan},L,i.createElement(pr,{className:"stigg-header-wrapper"},i.createElement(lr,{className:"stigg-plan-header",variant:"h3"},s.displayName),h&&i.createElement(ur,{className:"stigg-plan-description",variant:"h6",color:"secondary"},s.description),i.createElement(Gn,{showStartingAt:A,withUnitPriceRow:a,withStartingAtRow:k,withTiersRow:l,plan:s,billingPeriod:d,paywallLocale:x,locale:E,hasAnnuallyPrice:y,hasMonthlyPrice:f,setPerUnitQuantityByFeature:I,perUnitQuantityByFeature:U}),B?i.createElement(wn,{isNextPlan:S,customer:u,plan:s,currentSubscription:m,currentSubscriptionOverride:g,billingPeriod:d,isCustomerOnTrial:v,onPlanSelected:function(e){var t=Object.keys(U).map((function(e){return{featureId:e,quantity:U[e]}}));return b(e,t)},paywallLocale:x,withTrialLeftRow:c,perUnitQuantityByFeature:U}):i.createElement("div",{style:{height:"66px"}}),i.createElement(cr,{className:"stigg-plan-header-divider"})),i.createElement(tn,{plan:s,billingPeriod:d,paywallLocale:x}),i.createElement(or,{$planHasEntitlements:s.entitlements.length>0,className:"stigg-addons-container"},!C&&s.compatibleAddons&&s.compatibleAddons.length>0&&i.createElement(ir,{addons:s.compatibleAddons,paywallLocale:x})))}var yr,vr=a("div",{target:"esqa6i42"})("height:40px;padding:0 20px;margin-bottom:",(function(e){return e.theme.stigg.layout.switchBottomSpacing}),";border-radius:10px;border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";background-color:",(function(e){return e.theme.stigg.palette.backgroundPaper}),";display:flex;align-items:center;justify-content:center;"),br=a(De,{target:"esqa6i41"})({name:"zvmrfm",styles:"margin:0 8px"}),xr=a(M,{target:"esqa6i40"})("& .react-switch-bg{border:",(function(e){return"1px solid "+e.theme.stigg.palette.switchBorder}),";background:",(function(e){return e.theme.stigg.palette.switchFill}),"!important;}& .react-switch-handle{box-shadow:",(function(e){return e.theme.stigg.shadows.light}),";background:",(function(e){return e.theme.stigg.palette.switchHandle}),"!important;top:0.5px!important;}");function Er(e){return i.createElement(De,{variant:"h6",color:e.disabled?"disabled":"primary",className:"stigg-discount-rate-text"},e.discount,"% off")}function kr(e){var n=e.discountRate,r=e.onBillingPeriodChanged;if(e.availableBillingPeriods.length<=1)return null;var a=e.selectedBillingPeriod===t.BillingPeriod.Monthly;return i.createElement(vr,{className:"stigg-period-picker-container"},i.createElement(br,{variant:"h6",className:"stigg-monthly-period-text",color:a?"primary":"disabled"},"Monthly"),i.createElement(xr,{className:"stigg-period-switch",uncheckedIcon:!1,checkedIcon:!1,height:16,width:33,onChange:function(e){return r(e?t.BillingPeriod.Annually:t.BillingPeriod.Monthly)},checked:!a,borderRadius:10,handleDiameter:19}),i.createElement(br,{variant:"h6",className:"stigg-annual-period-text",color:a?"disabled":"primary"},"Annual"),0!==n&&i.createElement(Er,{discount:n,disabled:a}))}function wr(e,t){var n,r,i,a;if((a=null==(n=e.paywallCalculatedPricePoints)?void 0:n.find((function(e){return e.billingPeriod===t})))||(a=e.pricePoints.find((function(e){return e.billingPeriod===t}))),null==(r=a)||!r.amount){var o=e.pricePoints.find((function(e){return e.isTieredPrice&&e.billingPeriod===t}));if(o)return mn(o,1)}return null==(i=a)?void 0:i.amount}function Pr(){return(Pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Cr=a((function(e){return r.createElement("svg",Pr({width:135,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),yr||(yr=r.createElement("path",{d:"M.099 3.43v9.558h1.057V9.527h2.81c1.983 0 3.323-1.275 3.323-3.049 0-1.773-1.34-3.048-3.324-3.048H.1Zm1.057 5.127v-4.15h2.889c1.289 0 2.143.855 2.143 2.071 0 1.217-.854 2.079-2.143 2.079h-2.89ZM11.779 13.162c2.129 0 3.873-1.622 3.873-3.78 0-2.165-1.715-3.758-3.844-3.758-2.158 0-3.874 1.622-3.874 3.787 0 2.158 1.687 3.75 3.845 3.75Zm.014-.934c-1.556 0-2.773-1.202-2.773-2.832 0-1.629 1.216-2.83 2.773-2.83 1.528 0 2.773 1.201 2.773 2.83 0 1.63-1.245 2.832-2.773 2.832ZM19.905 12.988l1.572-6.046h.029l1.556 6.046h1.34l2.194-7.183h-1.18l-1.622 6.104h-.03l-1.549-6.104h-1.433l-1.55 6.104h-.029l-1.65-6.104h-1.195l2.208 7.183h1.34ZM34.983 9.425c0-2.121-1.578-3.8-3.83-3.8-2.1 0-3.845 1.556-3.845 3.786 0 2.143 1.6 3.75 3.874 3.75 1.586 0 2.875-.767 3.497-1.969l-.897-.485c-.413.898-1.412 1.528-2.585 1.528-1.673 0-2.694-1.246-2.795-2.513h6.567c.014-.13.014-.18.014-.297ZM31.14 6.551c1.404 0 2.527.948 2.715 2.259h-5.423a2.745 2.745 0 0 1 2.708-2.26ZM39.592 5.682c-1.028 0-1.774.521-2.1 1.253l-.101-1.13h-.905v7.183h1.057V8.564c0-1.115.615-1.789 1.774-1.789h.68V5.682h-.405ZM48.249 9.425c0-2.121-1.579-3.8-3.83-3.8-2.1 0-3.845 1.556-3.845 3.786 0 2.143 1.6 3.75 3.873 3.75 1.586 0 2.875-.767 3.497-1.969l-.897-.485c-.413.898-1.412 1.528-2.585 1.528-1.673 0-2.694-1.246-2.795-2.513h6.567c.015-.13.015-.18.015-.297Zm-3.845-2.874c1.404 0 2.527.948 2.715 2.259h-5.423a2.745 2.745 0 0 1 2.708-2.26ZM55.846 7.029c-.63-.89-1.644-1.398-2.831-1.398-2.093 0-3.773 1.586-3.773 3.765 0 2.18 1.651 3.766 3.744 3.766 1.195 0 2.23-.522 2.867-1.42l.145 1.246h.905V2.56l-1.057.116V7.03Zm-2.817 5.199c-1.498 0-2.7-1.188-2.7-2.832 0-1.643 1.202-2.83 2.7-2.83a2.787 2.787 0 0 1 2.817 2.83 2.787 2.787 0 0 1-2.817 2.832ZM65.731 5.631c-1.194 0-2.222.514-2.86 1.412V2.561l-1.057.116v10.31h.905l.145-1.237c.63.898 1.644 1.412 2.838 1.412 2.093 0 3.773-1.586 3.773-3.766 0-2.179-1.651-3.765-3.744-3.765Zm-.043 6.597a2.787 2.787 0 0 1-2.817-2.832 2.787 2.787 0 0 1 2.817-2.83c1.499 0 2.7 1.187 2.7 2.83 0 1.644-1.201 2.832-2.7 2.832ZM76.219 5.805v4.113c0 1.412-.905 2.266-2.172 2.266-1.26 0-1.97-.738-1.97-2.07V5.804H71.02v4.468c0 1.694 1.115 2.824 2.744 2.824 1.079 0 1.926-.42 2.455-1.116v.913c0 1.267-.956 2.186-2.346 2.186-1.123 0-2.05-.6-2.288-1.65l-.927.477C71.1 15.16 72.308 16 73.858 16c1.955 0 3.418-1.405 3.418-3.208V5.805h-1.057ZM108.672 10.487c0 1.42-1.261 2.3-3.181 2.3-1.027 0-1.857-.184-2.651-.578.074-.449.142-.99.16-1.618.738.43 1.575.64 2.381.64.959 0 1.458-.221 1.458-.689.018-.461-.339-.67-1.772-.947-1.661-.332-2.399-1.021-2.399-2.24 0-1.377 1.261-2.27 3.18-2.27.849 0 1.692.16 2.338.437l-.32 1.544a4.803 4.803 0 0 0-2.018-.43c-.898 0-1.341.221-1.341.658 0 .381.308.541 1.71.83 1.79.382 2.461 1.07 2.461 2.35l-.006.013Zm4.207.609c-.719 0-1.298-.382-1.298-1.39V6.887h1.827l.339-1.63h-2.166v-2.32a9.976 9.976 0 0 1-1.9.345l-.019 6.748c0 1.84 1.101 2.769 2.75 2.769.375 0 .701-.037.978-.105l.363-1.729c-.228.08-.517.136-.874.136v-.006Zm2.086 1.593h1.919V5.258h-1.919v7.43Zm.965-10.47c-.621-.006-1.101.45-1.107 1.052 0 .621.455 1.089 1.071 1.095.621 0 1.082-.437 1.095-1.04.012-.62-.443-1.095-1.052-1.107h-.007Zm10.126 3.039v6.268c0 2.369-1.6 3.999-4.3 3.999-.972 0-2.042-.216-2.762-.628.498-.51.837-.953 1.052-1.273.486.166.996.252 1.519.252 1.71 0 2.578-.947 2.578-2.14v-.24c-.609.7-1.489 1.138-2.541 1.138-2.018 0-3.537-1.501-3.537-3.728 0-2.227 1.661-3.808 3.691-3.808 1.052 0 1.968.381 2.577 1.101l.062-.947h1.667l-.006.006Zm-1.901 3.648c0-1.181-.861-2.08-2.048-2.08-1.188 0-2.061.899-2.061 2.08 0 1.18.861 2.048 2.061 2.048 1.199 0 2.048-.898 2.048-2.048Zm10.839-3.648v6.268c0 2.369-1.6 3.999-4.3 3.999-.972 0-2.042-.216-2.762-.628.498-.51.837-.953 1.052-1.273.486.166.996.252 1.519.252 1.71 0 2.578-.947 2.578-2.14v-.24c-.609.7-1.489 1.138-2.541 1.138-2.017 0-3.537-1.501-3.537-3.728 0-2.227 1.661-3.808 3.691-3.808 1.052 0 1.968.381 2.577 1.101l.062-.947H135l-.006.006Zm-1.901 3.648c0-1.181-.861-2.08-2.048-2.08-1.188 0-2.061.899-2.061 2.08 0 1.18.861 2.048 2.061 2.048 1.199 0 2.048-.898 2.048-2.048ZM95.71 14.982c-.075.037-1.483.659-3.975.542A14.827 14.827 0 0 1 88.512 15l4.312-5.007c.77.197 1.76.381 2.885.436 2.492.123 3.9-.504 3.974-.541l-3.974 5.1v-.007Zm-6.441-9.62c-.708-2.393-.431-3.907-.413-3.987l-4.01 5.07c-.013.08-.29 1.592.412 3.985a14.98 14.98 0 0 0 1.273 3.008l3.845-5.37a15.042 15.042 0 0 1-1.107-2.7v-.006Zm9.996.529a14.561 14.561 0 0 0-1.815-3.882l-3.568 4.546.67 3.217c.4.056.794.092 1.194.117.203.006.406.012.603.012 1.931 0 3.008-.455 3.125-.51l.277-.123c.024-.665-.019-1.84-.48-3.384l-.006.007Zm-2.24-4.208A14.43 14.43 0 0 0 92.83.834c-1.605-.08-2.756.154-3.395.338l-.056.296c-.012.061-.258 1.494.4 3.74.11.381.246.756.394 1.132l3.285-.111 3.574-4.54-.006-.006Z",fill:"#001E6C"})))}),{target:"ee5i8qp1"})("*{fill:",(function(e){return e.theme.stigg.palette.text.secondary}),";}"),Sr=a("div",{target:"ee5i8qp0"})("align-self:",(function(e){return e.$alignSelf||"unset"}),";@media (max-width: 1040px){align-self:center;}");function Tr(e){var t=e.source,n=e.style;return e.showWatermark?i.createElement(Sr,{$alignSelf:e.align,className:"stigg-watermark",style:de({cursor:"pointer"},void 0===n?{}:n),onClick:function(){var e=window.location.hostname.replace("www.","");window.open("https://www.stigg.io/?utm_source="+e+"&utm_medium=referral&utm_campaign="+t,"_blank")}},i.createElement(Cr,null)):null}function Mr(e,t){return e.pricePoints.some((function(e){return e.billingPeriod===t}))}function Ar(e,t){return e.some((function(e){return Mr(e,t)}))}var Br,Lr=a("div",{target:"e19kubi82"})("color:",(function(e){return e.theme.stigg.palette.text.primary}),";display:flex;align-items:stretch;justify-content:center;flex-wrap:wrap;padding:10px 0;gap:",(function(e){return e.theme.stigg.layout.planMargin}),";"),Nr=a("div",{target:"e19kubi81"})({name:"1rdsyw8",styles:"display:flex;flex-direction:column;align-items:center;& *{box-sizing:border-box;}"}),Ur=a("div",{target:"e19kubi80"})({name:"zigog8",styles:"display:flex;flex-direction:column;align-items:center"}),Ir=function(e){var n=e.plans,a=e.customer,o=e.currentSubscription,l=e.highlightedPlanId,c=e.selectedBillingPeriod,u=e.onBillingPeriodChanged,s=e.availableBillingPeriods,d=e.isCustomerOnTrial,p=e.onPlanSelected,m=e.paywallLocale,g=e.locale,f=e.shouldHidePlan,y=e.selectDefaultTierIndex,v=e.currentSubscriptionOverride,b=e.hideCompatibleAddons,x=Vr().stigg,E=function(e){return e.reduce((function(e,n){var r,i,a=wr(n,t.BillingPeriod.Monthly),o=(i=wr(n,t.BillingPeriod.Annually),h(r=a)||h(i)?null:Math.round((r-i/12)/r*100));return o&&(e=Math.max(e,o)),e}),0)}(n),k=n.some((function(e){return!!e.description})),w=Ar(n,t.BillingPeriod.Monthly),P=Ar(n,t.BillingPeriod.Annually),C=function(e,n,r){return e.filter((function(e){return e.pricingType!==t.PricingType.Paid||Mr(e,n)})).filter((function(e){return!r||!r({plan:e})}))}(n,c,f),S=r.useCallback((function(e,t,n){return p({plan:e,customer:a,subscription:o,intentionType:t,selectedBillingPeriod:c,billableFeatures:n})}),[a,c,o,p]),T=!!o&&o.plan.pricingType===t.PricingType.Custom,M=r.useMemo((function(){return C.some((function(e){var t,n=e.pricePoints.filter((function(e){return e.billingPeriod===c})),r=null==(t=e.paywallCalculatedPricePoints)?void 0:t.find((function(e){return e.billingPeriod===c}));return n.length>1&&!(null==r||!r.additionalChargesMayApply)}))}),[c,C]),A=r.useMemo((function(){return C.some((function(e){return!!Sn(e,c,m,g,w).unit}))}),[c,w,g,m,C]),B=r.useMemo((function(){return!T&&C.some((function(e){var t=hn({plan:e,billingPeriod:c,currentSubscription:o,currentSubscriptionOverride:v});return Object.values(t).length>0}))}),[c,o,v,T,C]),L=C.some((function(e){return e.isCurrentCustomerPlan&&e.trialDaysLeft}));return i.createElement(Nr,{className:"stigg-paywall-container"},i.createElement(Ur,{className:"stigg-paywall-layout"},i.createElement(kr,{onBillingPeriodChanged:u,selectedBillingPeriod:c,availableBillingPeriods:s,discountRate:E}),i.createElement(Lr,{className:"stigg-paywall-plans-layout"},C.map((function(e){return i.createElement(fr,{withUnitPriceRow:A,withTiersRow:B,withTrialLeftRow:L,key:e.id,shouldShowDescriptionSection:k,hasMonthlyPrice:w,hasAnnuallyPrice:P,plan:e,withStartingAtRow:M,currentSubscription:o,currentSubscriptionOverride:v,billingPeriod:c,isHighlighted:e.id===l,isCustomerOnTrial:d,onPlanSelected:function(t,n){return S(e,t,n)},paywallLocale:m,locale:g,customer:a,isCustomerInCustomPlan:T,selectDefaultTierIndex:y,hideCompatibleAddons:b})}))),i.createElement(Tr,{source:"paywall",align:"end",style:{marginTop:16},showWatermark:x.isWidgetWatermarkEnabled})))},Fr=(function(e){var t=function(e){var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",o=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=Object.create((t&&t.prototype instanceof d?t:d).prototype),a=new w(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return{value:void 0,done:!0}}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var l=x(o,n);if(l){if(l===s)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===s)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var s={};function d(){}function p(){}function m(){}var g={};l(g,i,(function(){return this}));var h=Object.getPrototypeOf,f=h&&h(h(P([])));f&&f!==t&&n.call(f,i)&&(g=f);var y=m.prototype=d.prototype=Object.create(g);function v(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,a){function o(){return new t((function(r,o){!function r(i,a,o,l){var c=u(e[i],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(d).then((function(e){s.value=e,o(s)}),(function(e){return r("throw",e,o,l)}))}l(c.arg)}(i,a,r,o)}))}return r=r?r.then(o,o):o()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,s;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=m,l(y,"constructor",m),l(m,"constructor",p),p.displayName=l(m,o,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,l(e,o,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(b.prototype),l(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new b(c(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},v(y),l(y,o,"Generator"),l(y,i,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=P,w.prototype={constructor:w,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,s):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),s},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),s}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}(Br={exports:{}}),Br.exports),Or=new(function(){function e(){}var t=e.prototype;return t.error=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];console.error(e,t||{},r)},t.log=function(e,t){console.log(e,t||{})},t.debug=function(e,t){console.debug(e,t||{})},e}());function Dr(e,n,r){var i,a=e.flatMap((function(e){return e.pricePoints})).map((function(e){return e.billingPeriod})),o=s.countBy(a),l=s.uniq(a);if(r&&l.includes(r))i=r;else if(n){var c=n.find((function(e){return e.status===t.SubscriptionStatus.Active}));c&&c.prices.length>0&&(i=null==c?void 0:c.prices[0].billingPeriod)}return i||(i=(o[t.BillingPeriod.Monthly]||0)>(o[t.BillingPeriod.Annually]||0)?t.BillingPeriod.Monthly:t.BillingPeriod.Annually),{defaultBillingPeriod:i,availableBillingPeriods:l}}var jr={h1:{fontSize:24,fontWeight:t.FontWeight.Bold},h2:{fontSize:16,fontWeight:t.FontWeight.Normal},h3:{fontSize:16,fontWeight:t.FontWeight.Normal},body:{fontSize:14,fontWeight:t.FontWeight.Normal}};function Wr(e,t){if(void 0===t&&(t="px"),e)return""+e+t}function Rr(e,n){if(!n)return e;switch(n){case t.FontWeight.Normal:return"normal";case t.FontWeight.Bold:return"bold";default:return"normal"}}function qr(e,t){var n,r,i,a,o,l,c,u,s,d,p,m,g,h,f;return{fontFamilyUrl:(null==e?void 0:e.fontFamily)||void 0,h1:{fontSize:Wr((null==e||null==(n=e.h1)?void 0:n.fontSize)||(null==t||null==(r=t.h1)?void 0:r.fontSize)),fontWeight:Rr("bold",(null==e||null==(i=e.h1)?void 0:i.fontWeight)||(null==t||null==(a=t.h1)?void 0:a.fontWeight))},h2:{fontSize:Wr((null==e||null==(o=e.h2)?void 0:o.fontSize)||(null==t||null==(l=t.h2)?void 0:l.fontSize)),fontWeight:Rr("normal",null==t||null==(c=t.h2)?void 0:c.fontWeight)},h3:{fontSize:Wr((null==e||null==(u=e.h3)?void 0:u.fontSize)||(null==t||null==(s=t.h3)?void 0:s.fontSize)),fontWeight:Rr("normal",(null==e||null==(d=e.h3)?void 0:d.fontWeight)||(null==t||null==(p=t.h3)?void 0:p.fontWeight))},body:{fontSize:Wr((null==e||null==(m=e.body)?void 0:m.fontSize)||(null==t||null==(g=t.body)?void 0:g.fontSize)),fontWeight:Rr("normal",(null==e||null==(h=e.body)?void 0:h.fontWeight)||(null==t||null==(f=t.body)?void 0:f.fontWeight))}}}function _r(e){if(e)switch(e){case t.Alignment.Left:return"left";case t.Alignment.Center:return"center";case t.Alignment.Right:return"right";default:return}}var zr,Hr=i.createContext(null);function Vr(e){var t=(e||{}).optional,n=r.useContext(Hr);if(!n&&!t)throw new Error("Could not find Stigg context; You need to wrap your app in an <StiggProvider> component.");return n}function $r(){return($r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Hr.displayName="StiggContext";var Zr,Gr=function(e){return r.createElement("svg",$r({width:15,height:11,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),zr||(zr=r.createElement("path",{d:"M5.59 7.99 2.125 4.525A1 1 0 1 0 .71 5.94l4.88 4.88 8.705-8.705a.997.997 0 0 0-1.41-1.41L5.59 7.99Z",fill:"#B2BBD3"})))},Yr=a("div",{target:"e1f7khji6"})({name:"zigog8",styles:"display:flex;flex-direction:column;align-items:center"}),Qr=a(Gr,{target:"e1f7khji5"})({name:"o7nnmj",styles:"margin-right:16px"}),Kr=a("div",{target:"e1f7khji4"})("display:flex;flex-direction:column;align-items:flex-start;gap:20px;border-radius:10px;padding:",(function(e){return e.theme.stigg.layout.planPadding}),";background-color:",(function(e){return e.theme.stigg.palette.backgroundPaper}),";min-width:",(function(e){return e.theme.stigg.layout.planMinWidth}),";max-width:",(function(e){return e.theme.stigg.layout.planMaxWidth}),";min-height:450px;border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";"),Xr=a("div",{target:"e1f7khji3"})("display:flex;gap:",(function(e){return e.theme.stigg.layout.planMargin}),";flex-wrap:wrap;justify-content:center;"),Jr=a("div",{target:"e1f7khji2"})({name:"k8xojc",styles:"display:flex;align-items:center;margin-bottom:12px"}),ei=a("div",{target:"e1f7khji1"})({name:"xdvdnl",styles:"margin-top:auto"}),ti=a("div",{target:"e1f7khji0"})("width:150px;margin-bottom:",(function(e){return e.theme.stigg.layout.switchBottomSpacing}),";padding:12px 12px;border-radius:10px;background-color:white;border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";");function ni(){return i.createElement(Kr,null,i.createElement(P,{width:120,borderRadius:4}),i.createElement(P,{circle:!0,width:40,height:40}),i.createElement(P,{style:{marginBottom:33},width:120,borderRadius:4}),i.createElement(Jr,null,i.createElement(Qr,null),i.createElement(P,{width:120,borderRadius:4})),i.createElement(Jr,null,i.createElement(Qr,null),i.createElement(P,{width:120,borderRadius:4})),i.createElement(Jr,null,i.createElement(Qr,null),i.createElement(P,{width:120,borderRadius:4})),i.createElement(ei,null,i.createElement(P,{height:50,borderRadius:4})))}function ri(){return i.createElement(Yr,{className:"stigg-skeleton-loader-container"},i.createElement(ti,{className:"stigg-skeleton-loader-billing-period"},i.createElement(P,{borderRadius:4})),i.createElement(Xr,{className:"stigg-skeleton-loader-plans-container"},i.createElement(ni,null),i.createElement(ni,null),i.createElement(ni,null)))}var ii,ai=function(e){var t=e.externalFontUrl;return i.createElement(u.Global,{styles:u.css(Zr||(Zr=me(["\n ","\n\n /* latin-ext */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Hp2ywxg089UriCZ2IHTWEBlwu8Q.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,\n U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Hp2ywxg089UriCZOIHTWEBlw.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,\n U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriAWCrCBamC3YU-CnE6Q.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,\n U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriAWCrCBimC3YU-Ck.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,\n U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriASitCBamC3YU-CnE6Q.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,\n U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'DM Sans';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/dmsans/v11/rP2Cp2ywxg089UriASitCBimC3YU-Ck.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074,\n U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n "])),t&&"\n @font-face {\n font-family: 'custom-font';\n font-style: normal;\n font-weight: normal;\n src: local('custom-font'), url("+t+") format('woff');\n }\n ")})},oi=a("div",{target:"emcdfp60"})((function(e){var t=e.customCss;return t&&u.css(ii||(ii=me(["\n ","\n "])),t)}),";");function li(e){var t,n,r,i,a,o,l,c,u,d=Vr(),g=s.merge(e,d.theme);return a=p((null==(t=g)||null==(n=t.palette)?void 0:n.primary)||"#327EEE"),o=p((null==t||null==(r=t.palette)||null==(i=r.text)?void 0:i.primary)||"#001E6C"),l=p("#4CAF50"),c=p("#f44336"),u={palette:{primary:a.hex(),primaryDark:a.darken(.3).hex(),primaryLight:a.alpha(.5).toString(),backgroundPaper:"#FFFFFF",backgroundHighlight:"#F5F6F9",backgroundSection:a.alpha(.1).toString(),backgroundButton:a.alpha(.08).toString(),outlinedBorder:"#C4CBDD",outlinedRestingBorder:a.alpha(.5).toString(),outlinedHoverBackground:a.lightness(95).hex(),switchBorder:a.lighten(.1).hex(),switchFill:a.lighten(.5).hex(),switchHandle:a.hex(),warning:"#ed6c02",error:c.hex(),errorDark:c.darken(.3).hex(),success:l.hex(),successDark:l.darken(.3).hex(),white:"#FFFFFF",text:{primary:o.hex(),secondary:o.alpha(.75).toString(),tertiary:o.alpha(.5).toString(),disabled:o.alpha(.35).toString()}},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"},h2:{fontSize:"24px",fontWeight:"normal"},h3:{fontSize:"16px",fontWeight:"normal"},body:{fontSize:"14px",fontWeight:"normal"},caption:{fontSize:"12px",fontWeight:"normal"}},customCss:""},m(u,t)}function ci(e){var t=e.typography,n=Number(t.body.fontSize.replace("px",""))/14;return{pxToRem:function(e){return e/16*n+"rem"},bodyFontFamily:t.fontFamily,headingFontFamily:t.fontFamily,fontSizes:[t.h1.fontSize,t.h2.fontSize,t.h3.fontSize,t.body.fontSize,"12px","10px"]}}var ui=function(e){var t,n=e.children,r=li(e.componentTheme),a=function(e){return{primary:{main:e.palette.primary}}}(r),o=N.createTheme({palette:a,stigg:r});return i.createElement(N.ThemeProvider,{theme:(t={},t[N.THEME_ID]=o,t)},i.createElement(u.ThemeProvider,{theme:{stigg:r}},i.createElement(oi,{customCss:r.customCss},i.createElement(ai,{externalFontUrl:r.typography.fontFamilyUrl}),i.createElement(B.ThemeProvider,{theme:{typography:ci(r)}},n))))},si=i.createContext(null);si.displayName="CustomerPortalContext";var di=function(){var e=r.useContext(si);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 pi(e){var t,n,a,o,l,c,u,s=e.children,d=e.textOverrides,p=e.theme,g=e.resourceId,h=e.productId,f=Vr().customerPortalUpdatedAt,y=function(e){var t=e.resourceId,n=e.productId,i=Vr(),a=i.stigg,o=i.customerPortalUpdatedAt,l=r.useState(!1),c=l[0],u=l[1],s=r.useState(),d=s[0],p=s[1];return r.useEffect((function(){!function(){var e=se(Fr.mark((function e(){return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.isCustomerLoaded){e.next=15;break}return e.prev=1,u(!0),e.next=5,a.getCustomerPortal({resourceId:t,productId:n});case 5:p(e.sent),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),Or.error("Failed to load customer portal "+(null==e.t0?void 0:e.t0.message),e.t0);case 12:return e.prev=12,u(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[1,9,12,15]])})));return function(){return e.apply(this,arguments)}}()()}),[a,a.isCustomerLoaded,o,t,n]),{customerPortal:d,isLoading:c}}({resourceId:g,productId:h}),v=y.customerPortal,b=y.isLoading,x=null!=v&&v.configuration?function(e){var t=e.palette,n=e.customCss;return{palette:{primary:(null==t?void 0:t.primary)||void 0,backgroundPaper:(null==t?void 0:t.paywallBackgroundColor)||void 0,outlinedBorder:(null==t?void 0:t.borderColor)||void 0,backgroundHighlight:(null==t?void 0:t.currentPlanBackground)||void 0,text:{primary:(null==t?void 0:t.textColor)||void 0}},typography:qr(e.typography),customCss:n||void 0}}(v.configuration):void 0,E=(t=li(x),a=null==v?void 0:v.configuration,{sectionTitleColor:(null==(n=p)?void 0:n.sectionTitleColor)||t.palette.text.secondary,planNameColor:(null==n?void 0:n.planNameColor)||t.palette.text.primary,backgroundColor:(null==n?void 0:n.backgroundColor)||(null==a||null==(o=a.palette)?void 0:o.backgroundColor)||"white",borderColor:(null==n?void 0:n.borderColor)||(null==a||null==(l=a.palette)?void 0:l.borderColor)||"rgba(0, 30, 108, 0.15)",listItemBackgroundColor:(null==n?void 0:n.backgroundColor)||(null==a||null==(c=a.palette)?void 0:c.backgroundColor)||"white",tabMaxHeight:(null==n?void 0:n.tabMaxHeight)||"380px",iconsColor:(null==n?void 0:n.iconsColor)||(null==a||null==(u=a.palette)?void 0:u.iconsColor)||void 0,iconsBackgroundColor:null==n?void 0:n.iconsBackgroundColor}),k=m({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"},d);return i.createElement(ui,{componentTheme:x},i.createElement(si.Provider,{key:null==f?void 0:f.toString(),value:{customerPortal:v,isLoading:b,textOverrides:k,theme:E,resourceId:g}},s))}var mi,gi=a(b,{target:"emvioms0"})("border-radius:10px;padding:8px 16px;text-transform:none;&,&:hover{border-color:",(function(e){return e.theme.stigg.palette.outlinedRestingBorder}),";}");function hi(){return(hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var fi,yi=function(e){return r.createElement("svg",hi({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),mi||(mi=r.createElement("path",{clipRule:"evenodd",d:"M13.333 2.5 17.5 6.667 6.667 17.5H2.5v-4.167L13.333 2.5v0Z",stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},vi=a("div",{target:"ewz8krb0"})("display:flex;align-items:center;justify-content:space-between;",(function(e){return!e.$disableMargin&&"\n &:not(:last-child) {\n margin-bottom: 32px;\n }\n "}),";");function bi(e){var t=e.title,n=e.className,r=e.isLoading,a=di().theme;return r?i.createElement(P,{width:120}):i.createElement(De,{className:n,overrideColor:a.sectionTitleColor,variant:"h3",bold:!0},t)}(fi=exports.CustomerPortalIntentionType||(exports.CustomerPortalIntentionType={})).MANAGE_SUBSCRIPTION="MANAGE_SUBSCRIPTION",fi.UPGRADE_PLAN="UPGRADE_PLAN",fi.UPGRADE_TRIAL_PLAN="UPGRADE_TRIAL_PLAN";var xi=a(yi,{target:"e1fjw26b0"})("path{stroke:",(function(e){return e.theme.stigg.palette.primary}),";}");function Ei(e){var t=e.onManageSubscription,n=e.hideManageButton,r=e.textOverrides;return i.createElement(vi,{className:"stigg-customer-portal-overview-header",$disableMargin:!0},i.createElement(bi,{title:"Subscription",className:"stigg-overview-title"}),!n&&i.createElement(gi,{className:"stigg-manage-subscription-button",variant:"outlined",onClick:function(){return t({intentionType:exports.CustomerPortalIntentionType.MANAGE_SUBSCRIPTION})}},i.createElement(xi,{className:"stigg-manage-subscription-button-image"}),i.createElement(De,{className:"stigg-manage-subscription-button-text",color:"primary.main",style:{marginLeft:"8px"},variant:"body1"},null==r?void 0:r.manageSubscription)))}function ki(){var e=di().customerPortal,t=U(null==e?void 0:e.subscriptions,(function(e){return e.addons}));return O(t)?null:i.createElement("div",{className:"stigg-addons-list-layout"},t.map((function(e,n){return i.createElement(De,{key:e.addonId,span:!0,className:"stigg-addon-list-item-text",variant:"body1"},e.quantity>1&&e.quantity+" X ",e.displayName,n===t.length-1?"":", ")})))}var wi=a("div",{target:"e1g6q2f50"})("display:flex;justify-content:space-between;align-items:center;gap:64px;border-bottom:",(function(e){return"1px solid "+e.$borderColor}),";padding:16px 0;&>*:first-of-type{max-width:60%;}");function Pi(){var e=di(),t=e.customerPortal,n=e.theme,r=null==t?void 0:t.promotionalEntitlements;return i.createElement("div",{style:{display:"flex",flexDirection:"column"}},i.createElement(De,{color:"secondary"},e.textOverrides.promotionsSubtitle),i.createElement("div",{style:{display:"flex",flexDirection:"column"}},i.createElement(wi,{$borderColor:n.borderColor},i.createElement(De,{variant:"body1",bold:!0},"Feature"),i.createElement(De,{variant:"body1",bold:!0},"Expiration date")),null==r?void 0:r.map((function(e,t){return i.createElement(wi,{key:e.displayName+"-"+t,$borderColor:n.borderColor},i.createElement(De,{variant:"body1"},function(e){var t,n=e.displayName;return e.hasUnlimitedUsage?"Unlimited "+n:e.usageLimit?n+" x "+(null==(t=e.usageLimit)?void 0:t.toLocaleString()):n}(e)),i.createElement(De,{variant:"body1",color:"disabled"},e.endDate?g.utc(e.endDate).format("MMM Do, YYYY"):"None"))}))))}var Ci=a(D,{target:"exlfw3j3"})({name:"jlwfj4",styles:".MuiTabs-indicator{background-color:#001e6c;}"}),Si=a("div",{target:"exlfw3j2"})({name:"1dqkbz0",styles:"width:100%;flex:1;margin-top:16px"}),Ti=a(I,{shouldForwardProp:function(e){return!e.startsWith("$")},target:"exlfw3j1"})("margin-top:16px;max-height:",(function(e){return e.$maxHeight}),";overflow-y:auto;"),Mi=["children","value","index","maxHeight"];function Ai(e){var t=e.children,n=e.value,r=e.index,a=e.maxHeight,o=pe(e,Mi);return i.createElement("div",Object.assign({role:"tabpanel",hidden:n!==r},o),n===r&&i.createElement(Ti,{$maxHeight:a},t))}function Bi(e){var t=e.isSelected,n=e.label,r=t?"primary":"secondary";return i.createElement("div",{style:{display:"flex",gap:8,alignItems:"center"}},i.createElement($t,{icon:e.icon,svgStrokeColor:r}),i.createElement(De,{variant:"h6",bold:t,fontWeight:c.FontWeight.Medium,color:r},n))}function Li(e){var t=e.customerPortal,n=e.hiddenSections,a=e.textOverrides,o=e.theme,l=function(e){return null==n?void 0:n.some((function(t){return t===e}))},c=U(t.subscriptions,(function(e){return e.addons})).length>0&&!l("addons"),u=t.promotionalEntitlements.length>0&&!l("promotionalEntitlements"),s=r.useState(c?1:2),d=s[0],p=s[1];return c||u?i.createElement(Si,null,i.createElement(I,{sx:{borderBottom:1,borderColor:"divider"}},i.createElement(Ci,{value:d,onChange:function(e,t){p(t)}},c?i.createElement(F,{sx:{textTransform:"none"},value:1,label:i.createElement(Bi,{isSelected:1===d,label:a.addonsTabTitle,icon:"Addons"})}):null,u?i.createElement(F,{sx:{textTransform:"none"},value:2,label:i.createElement(Bi,{isSelected:2===d,label:a.promotionsTabTitle,icon:"Promotions"})}):null)),i.createElement(Ai,{value:d,index:1,maxHeight:o.tabMaxHeight},i.createElement(ki,null)),i.createElement(Ai,{value:d,index:2,maxHeight:o.tabMaxHeight},i.createElement(Pi,null))):null}var Ni={xs:320,sm:640,md:768,lg:1024,xl:1280,xxl:1536},Ui=function(e){return"(min-width: "+Ni[e]+"px)"},Ii=Object.keys(Ni).reduce((function(e,t){var n;return de({},e,((n={})[t]="@media "+Ui(t),n))}),{});function Fi(e){return j.useMediaQuery(Ui(e))}var Oi=a("div",{target:"ejq3grd1"})({name:"qgg235",styles:"display:flex;justify-content:space-between;flex-wrap:wrap"}),Di=a("div",{target:"ejq3grd0"})({name:"43cxha",styles:"display:flex;flex-direction:column;gap:32px"});function ji(){var e=Fi("md");return i.createElement(Oi,{className:"stigg-subscription-overview-skeleton-layout"},i.createElement(Di,null,i.createElement(P,{width:120}),i.createElement(P,{width:120})),i.createElement(P,{width:e?295:260,height:193}))}function Wi(e){var t=e.scheduleUpdate.targetPackage;return i.createElement(l,{container:!0,alignItems:"center"},i.createElement(l,null,i.createElement(W.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})),i.createElement(l,{item:!0},i.createElement(De,{className:"stigg-scheduled-updates-description",variant:"body1"},"Downgrade to the ",i.createElement("b",null,null==t?void 0:t.displayName)," plan")))}function Ri(e){var n=e.scheduleUpdate.scheduleVariables.billingPeriod,r=n===t.BillingPeriod.Monthly?"annually":"monthly",a=n===t.BillingPeriod.Monthly?"monthly":"annually";return i.createElement(l,{container:!0,alignItems:"center"},i.createElement(l,null,i.createElement(W.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})),i.createElement(l,{item:!0},i.createElement(De,{className:"stigg-scheduled-updates-description",variant:"body1"},"Change from an ",r," to a ",i.createElement("b",null,a)," billing cycle")))}function qi(e){var t=e.scheduleUpdate.scheduleVariables,n=t.newUnitAmount,r=t.featureId,a=s.compact(s.map(e.subscription.prices,"feature")).find((function(e){return e.id===r}));if(!a)return null;var o=a.featureUnits,c=1===n?o:a.featureUnitsPlural;return i.createElement(l,{container:!0,alignItems:"flex-start",flexWrap:"nowrap"},i.createElement(l,null,i.createElement(W.ArrowDown,{color:"#D94052",height:20,className:"stigg-scheduled-updates-arrow-down"})),i.createElement(l,{item:!0},i.createElement(De,{className:"stigg-scheduled-updates-description",variant:"body1"},"Reduce the ",i.createElement("b",null,o)," quantity to ",n," ",c)))}function _i(e){var n=e.scheduleUpdate,r=e.subscription;switch(n.subscriptionScheduleType){case t.SubscriptionScheduleType.Downgrade:return i.createElement(Wi,{scheduleUpdate:n});case t.SubscriptionScheduleType.BillingPeriod:return i.createElement(Ri,{scheduleUpdate:n});case t.SubscriptionScheduleType.UnitAmount:return i.createElement(qi,{scheduleUpdate:n,subscription:r});default:return null}}var zi=a(I,{target:"eju957a2"})("border-bottom:",(function(e){return"1px solid "+e.$borderColor}),";border-top-left-radius:10px;border-top-right-radius:10px;margin:-64px -64px 64px -64px;padding:24px 32px;"),Hi=a(d,{target:"eju957a1"})({name:"158icaa",styles:"margin-left:4px"}),Vi=a(Pt,{target:"eju957a0"})("color:",(function(e){return e.theme.stigg.palette.primary}),";path{fill:",(function(e){return e.theme.stigg.palette.primary}),";}");function $i(e){var t=e.subscription,n=t.scheduledUpdates;return i.createElement(i.Fragment,null,i.createElement(l,{container:!0,alignItems:"center",justifyContent:"space-between",gap:1},i.createElement(l,null,i.createElement(De,{className:"stigg-scheduled-updates-description",variant:"body1"},"The following updates will take effect in the next billing cycle:"))),i.createElement(l,null,(n||[]).map((function(e){return i.createElement(_i,{key:e.subscriptionScheduleType,scheduleUpdate:e,subscription:t})}))))}function Zi(e){var t=e.subscription,n=ln({scheduledUpdate:(t.scheduledUpdates||[])[0],subscriptionPrices:t.prices,billingPeriodRange:t.billingPeriodRange,options:{postfix:"at the end of the current billing period"}}),r=n.line2;return i.createElement(i.Fragment,null,i.createElement(l,{container:!0,alignItems:"center",justifyContent:"space-between",gap:1},i.createElement(l,null,i.createElement(De,{className:"stigg-scheduled-updates-title",variant:"body1",color:"primary"},n.line1))),r&&i.createElement(l,null,i.createElement(De,{className:"stigg-scheduled-updates-subtitle",variant:"body1",color:"secondary"},r)))}function Gi(e){var t=e.subscription,n=e.onCancelScheduledUpdates,a=e.theme,o=e.cancelScheduledUpdatesButtonTitle,c=u.useTheme(),s=r.useState(!1),d=s[0],p=s[1],m=t.scheduledUpdates;if(!m||0===m.length)return null;var g=1===m.length;return i.createElement(zi,{$borderColor:a.borderColor,className:"stigg-scheduled-updates-alert-container"},i.createElement(l,{container:!0,alignItems:g?"center":"flex-start",gap:2},i.createElement(l,{item:!0,display:"flex"},i.createElement($t,{icon:"ScheduleBox",svgPathColor:a.iconsColor,svgRectColor:a.iconsBackgroundColor})),i.createElement(l,{item:!0,flex:1},i.createElement(g?Zi:$i,{subscription:t})),!!n&&i.createElement(l,{item:!0},i.createElement(gi,{variant:"outlined",onClick:function(){p(!0),Promise.resolve(n(t)).finally((function(){return p(!1)}))}},d?i.createElement(Hi,{loading:!0,size:16,color:c.stigg.palette.text.disabled}):i.createElement(Vi,{style:{display:"flex",marginRight:4},className:"stigg-scheduled-updates-cancel-update-button-icon"}),i.createElement(De,{variant:"body1",color:"primary.main",className:"stigg-scheduled-updates-cancel-update-button"},o)))))}var Yi=a("div",{target:"e1kw2z1l0"})("width:100%;display:flex;flex-direction:column;border-radius:10px;background-color:",(function(e){return e.$backgroundColor}),";border:",(function(e){return"1px solid "+e.$borderColor}),";padding:16px;",Ii.sm,"{padding:32px;}",Ii.md,"{padding:48px;}",Ii.lg,"{padding:64px;}");function Qi(e){var n=e.billingPeriod,r=e.rangeEnd,a=e.amount,o=e.currency;return i.createElement(i.Fragment,null,i.createElement(De,{variant:"h6"},"Next estimated bill"),i.createElement(De,{variant:"h1"},Pn({amount:a,currency:o,maximumFractionDigits:2})),i.createElement(De,{as:"div",variant:"body1",color:"secondary"},"Billed ",n===t.BillingPeriod.Monthly?"monthly":"annually"," on"," ",i.createElement(De,{variant:"body1",span:!0,color:"primary"},g.utc(r).format("MMM Do, YYYY"))),i.createElement(De,{variant:"body1",color:"secondary"},"* Additional tax rates may apply"))}function Ki(e){var t=e.description;return i.createElement(i.Fragment,null,i.createElement(De,{variant:"h6",color:"secondary"},"No upcoming bill"),i.createElement(De,{variant:"body1",color:"secondary"},t))}var Xi=a("div",{target:"e1ftdtst1"})({name:"1nocm2b",styles:"display:flex;flex-direction:column;align-items:left;gap:8px"}),Ji=a(b,{target:"e1ftdtst0"})({name:"1l28f5r",styles:"width:fit-content;&.MuiButton-root{padding:0;&:hover{background:none;}}"});function ea(e){var t=e.onContactSupport,n=e.label,r=i.createElement(De,{color:t?"primary.main":"secondary"},e.linkLabel);return i.createElement(Xi,{className:"stigg-contact-support-layout"},i.createElement(De,{className:"stigg-contact-support-label",color:"secondary"},n),t?i.createElement(Ji,{className:"stigg-contact-support-button",style:{textTransform:"none"},variant:"text",onClick:t},r):r)}var ta,na,ra=a("div",{target:"e1u4onrr0"})("max-height:278px;display:flex;flex-direction:column;border-radius:10px;background-color:",(function(e){return e.theme.stigg.palette.backgroundSection}),";border:",(function(e){return"1px solid "+e.$borderColor}),";padding:32px;gap:16px;");function ia(e){var n,r,a,o,l=e.subscription,c=e.theme,u=e.textOverrides,s=e.onContactSupport,d=l.pricingType,p=null==(n=null==(r=l.prices)?void 0:r.every((function(e){return e.billingModel!==t.BillingModel.UsageBased})))||n,m=null==(a=l.scheduledUpdates)?void 0:a.find((function(e){var n=e.targetPackage;return e.subscriptionScheduleType===t.SubscriptionScheduleType.Downgrade&&(null==n?void 0:n.pricingType)===t.PricingType.Free}));if(d===t.PricingType.Free)o=i.createElement(Ki,{description:"You're on a free plan, so you don’t have any upcoming charges"});else if(d===t.PricingType.Paid)if(m&&p)o=i.createElement(Ki,{description:"Your plan will be downgraded to a free plan, so you don’t have any upcoming charges"});else if(l.status===t.SubscriptionStatus.InTrial)o=i.createElement(Ki,{description:"You’re on a free trial of the "+l.planName+" plan, so you don’t have any upcoming charges"});else{var g,h,f,y,v=null==(g=l.prices)||null==(h=g[0])?void 0:h.billingPeriod,b=null==(f=l.billingPeriodRange)?void 0:f.end,x=null==(y=l.totalPrice)?void 0:y.total;v&&b&&x&&(o=i.createElement(Qi,{billingPeriod:v,rangeEnd:b,amount:x.amount,currency:x.currency}))}else d===t.PricingType.Custom&&(o=i.createElement(ea,{onContactSupport:s,label:u.contactSupportTitle,linkLabel:u.contactSupportLink}));return i.createElement(ra,{className:"stigg-subscription-total-price-layout",$borderColor:c.borderColor},o)}function aa(){return(aa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var oa,la,ca,ua=function(e){return r.createElement("svg",aa({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ta||(ta=r.createElement("path",{d:"M12.947 13.6h-1.013l.001-2.824a.522.522 0 0 0-.18-.392L8.622 7.918l3.134-2.465a.497.497 0 0 0 .18-.392V2.4h1.012c.278 0 .49-.212.49-.49a.481.481 0 0 0-.49-.49H3.053a.481.481 0 0 0-.49.49c0 .278.213.49.49.49h1.013l-.001 2.661c0 .147.065.294.18.392l3.117 2.465-3.117 2.466a.497.497 0 0 0-.18.392V13.6H3.054a.481.481 0 0 0-.49.49c0 .277.213.49.49.49h9.894c.277 0 .49-.213.49-.49a.481.481 0 0 0-.49-.49ZM5.045 2.4h5.91v2.416L8 7.167l-2.955-2.35V2.4Zm0 8.62L8 8.67l2.955 2.334v2.58h-5.91V11.02Z",fill:"#fff"})),na||(na=r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.053 1.254h9.894c.37 0 .657.287.657.656 0 .37-.287.657-.657.657h-.845L12.1 5.06c0 .214-.088.39-.238.519l-.005.004L8.89 7.918l2.974 2.34c.152.13.238.323.238.518l-.001 2.657h.846c.37 0 .657.287.657.657 0 .37-.288.657-.657.657H3.053a.648.648 0 0 1-.657-.657c0-.37.287-.657.657-.657h.846v-2.657c0-.214.087-.39.237-.519l.005-.004 2.953-2.335L4.136 5.58a.688.688 0 0 1-.238-.519V2.567h-.845a.648.648 0 0 1-.657-.656c0-.37.287-.657.657-.657Zm9.894.333H3.053a.315.315 0 0 0-.323.324c0 .185.138.323.323.323h1.18l-.001 2.827c0 .099.043.198.119.264l3.28 2.593-3.28 2.594a.33.33 0 0 0-.119.264v2.99H3.053a.315.315 0 0 0-.323.324c0 .185.138.323.323.323h9.894a.315.315 0 0 0 .323-.323.315.315 0 0 0-.323-.323h-1.18l.001-2.991a.355.355 0 0 0-.119-.264L8.351 7.918l3.298-2.593a.33.33 0 0 0 .119-.264V2.233h1.18a.315.315 0 0 0 .323-.323.315.315 0 0 0-.324-.323Zm-8.069.646h6.244v2.664L8 7.38 4.878 4.897V2.233Zm.334.334v2.169L8 6.955l2.788-2.22V2.568H5.212ZM8 8.457l3.122 2.467v2.827H4.878v-2.81L8 8.456Zm0 .425-2.788 2.219v2.316h5.576v-2.332L8 8.882Z",fill:"#fff"})))},sa=["children","className","placement"],da=a((function(e){var t=e.children,n=e.className,r=e.placement,a=void 0===r?"top":r,o=pe(e,sa);return i.createElement(_,Object.assign({arrow:!0,placement:a},o,{classes:{popper:n,tooltip:"stigg-tooltip",arrow:"stigg-tooltip-arrow"}}),i.createElement("div",null,t))}),{target:"enddsuj0"})((function(e){var t,n=e.theme,r=e.$padding,i=e.$maxWidth;return(t={})["& ."+q.tooltipClasses.tooltip]={backgroundColor:n.stigg.palette.white,maxWidth:void 0===i?300:i,boxShadow:n.stigg.shadows.popover,padding:void 0===r?8:r,borderRadius:n.stigg.border.radius,color:n.stigg.palette.text.primary},t["& ."+q.tooltipClasses.arrow]={color:n.stigg.palette.white},t}),""),pa=L(De)(oa||(oa=me(["\n display: ",";\n -webkit-line-clamp: ",";\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: normal;\n ","\n\n ","\n"])),(function(e){return e.$display}),(function(e){return e.$maxLines}),(function(e){return e.$wordBreak&&B.css(la||(la=me(["\n word-break: break-word;\n "])))}),(function(e){return e.$bold&&B.css(ca||(ca=me(["\n font-weight: bold;\n "])))}));function ma(e){return e&&(e.clientHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)}var ga=function(e){var t=e.leaveDelay,n=e.children,a=e.variant,o=e.color,l=e.maxLines,c=void 0===l?1:l,u=e.wordBreak,s=e.bold,d=e.tooltipPlacement,p=void 0===d?"top":d,m=e.className,g=e.display,h=void 0===g?"-webkit-box":g,f=e.style,y=e["data-testid"],v=r.useState(!1),b=v[0],x=v[1],E=r.useRef(null),k=i.createElement(pa,{ref:E,variant:a,color:o,$maxLines:c,$wordBreak:u,$bold:s,className:m,$display:h,style:f,"data-testid":y},n);r.useEffect((function(){if(null!=E&&E.current){var e=ma(E.current);x(e)}}),[E]);var w=(null==E?void 0:E.current)&&ma(E.current);return i.createElement("span",null,b||w?i.createElement(da,{placement:p,leaveDelay:t,title:i.createElement(De,{variant:"body1"},n)},k):k)},ha=a("div",{target:"el5iwyw1"})("width:100%;display:flex;align-items:center;gap:4px;background-color:",(function(e){return e.theme.stigg.palette.warning}),";border-radius:10px;padding:8px 16px;margin-top:16px;"),fa=a(R,{target:"el5iwyw0"})({name:"69ka7t",styles:"text-decoration-color:white;color:white;cursor:pointer"});function ya(e){var n=e.subscription,r=e.includePlanName,a=e.onManageSubscription;return(null==n?void 0:n.status)!==t.SubscriptionStatus.InTrial?null:i.createElement(ha,{className:"stigg-subscription-trial-badge"},i.createElement(ua,{className:"stigg-subscription-trial-badge-image"}),i.createElement("div",{style:{flex:1,marginRight:4}},i.createElement(ga,{variant:"body1",className:"stigg-subscription-trial-badge-text",color:"white"},n.trialRemainingDays+" days remaining in trial",r&&" of the "+n.planName+" plan")),i.createElement(fa,{className:"stigg-subscription-trial-upgrade-button",onClick:function(){return a({intentionType:exports.CustomerPortalIntentionType.UPGRADE_TRIAL_PLAN})}},i.createElement(De,{color:"white"},"Upgrade plan")))}function va(e){var t=e.mainSubscription,n=e.trialSubscription,r=e.onManageSubscription;return i.createElement("div",{className:"stigg-subscription-view-layout"},i.createElement(De,{className:"stigg-subscription-plan-name",variant:"h1",overrideColor:e.theme.planNameColor,style:{marginTop:8}},t.planName," plan"),i.createElement(ya,{subscription:n,includePlanName:(null==n?void 0:n.planName)!==t.planName,onManageSubscription:r}))}function ba(e,t){return Math.min(Math.floor(e/t*100),100)}var xa,Ea=a(H,{shouldForwardProp:function(e){return!e.startsWith("$")},target:"e1cbsoof1"})("height:4px;background-color:",(function(e){return p(e.theme.stigg.palette.primary).alpha(.4).string()}),";span{background-color:",(function(e){var t=e.theme;switch(e.$progressStatus){case"standard":return t.stigg.palette.primary;case"warning":return t.stigg.palette.warning;case"error":return t.stigg.palette.error;default:return t.stigg.palette.primary}}),";}"),ka=a(k,{target:"e1cbsoof0"})("border-style:dotted;border-bottom-width:2px;border-color:",(function(e){return p(e.theme.stigg.palette.outlinedRestingBorder).alpha(.4).string()}),";");function wa(e){var t=e.entitlement;if(t.hasUnlimitedUsage)return i.createElement(ka,null);var n,r=ba(t.currentUsage||0,t.usageLimit),a=(n=r)<70?"standard":n<100?"warning":"error";return i.createElement(Ea,{$progressStatus:a,className:"stigg-feature-usage-progress-bar-"+a.toString(),variant:"determinate",value:r})}var Pa=L(b)(xa||(xa=me(["\n text-transform: none;\n padding: 0;\n white-space: nowrap;\n"])));function Ca(e){var t=e.entitlement,n=e.feature,r=e.onManageSubscription,a=e.onBuyMore,o=e.canBuyMore,l=e.canUpgradeSubscription;return e.hasCustomSubscription||t.hasUnlimitedUsage||ba(t.currentUsage||0,t.usageLimit)<70?null:o?a?i.createElement(Pa,{variant:"text",onClick:function(){return a(n,t)}},i.createElement(De,{color:"primary.main"},"Buy more")):null:l&&r?i.createElement(Pa,{variant:"text",onClick:function(){return r({intentionType:exports.CustomerPortalIntentionType.UPGRADE_PLAN})}},i.createElement(De,{color:"primary.main"},"Upgrade")):null}function Sa(e){var t,n,r,a=e.amount,o=e.currency,l=e.blockSize,c=e.entitlement,u=e.feature,s=e.hideChargePrice,d=e.onBuyMore,p=e.onManageSubscription,m=e.canUpgradeSubscription,g=e.hasCustomSubscription;return i.createElement("div",{className:"stigg-charge-list-item stigg-charge-list-item-"+c.feature.refId,style:{display:"flex",flexDirection:"column",gap:12}},i.createElement("div",{style:{display:"flex",justifyContent:"space-between",gap:12}},i.createElement("div",{style:{display:"flex",gap:12}},i.createElement(ga,{variant:"body1",color:"primary"},u.displayName),!s&&i.createElement(ga,{variant:"body1",color:"secondary"},Pn({amount:a,currency:o})," per ",l?l+" ":"",l?u.featureUnitsPlural:u.featureUnits)),i.createElement("div",{style:{display:"flex",gap:12}},i.createElement(Ca,{entitlement:c,feature:u,canBuyMore:!0,onBuyMore:d,onManageSubscription:p,canUpgradeSubscription:m,hasCustomSubscription:g}),i.createElement(De,{variant:"body1",color:"primary",style:{whiteSpace:"nowrap"}},c.hasUnlimitedUsage?null==(t=c.currentUsage)?void 0:t.toLocaleString():(null==(n=c.currentUsage)?void 0:n.toLocaleString())+" of "+(null==(r=c.usageLimit)?void 0:r.toLocaleString())))),i.createElement(wa,{entitlement:c}))}function Ta(e){var n=e.subscription,r=e.onBuyMore,a=e.onManageSubscription,o=e.hasCustomSubscription,l=e.canUpgradeSubscription,c=s.keyBy(e.entitlements,"feature.refId"),u=n.prices.filter((function(e){var t=e.feature;return!!t&&c[t.refId]&&!!e.price}));return u.length?i.createElement("div",{className:"stigg-charge-list",style:{display:"flex",flexDirection:"column",gap:16,marginTop:32}},u.map((function(e){var n=e.feature,u=e.price;if(!n||!u)return null;var s=c[n.refId];return s&&s.feature?i.createElement(Sa,{key:n.refId,entitlement:s,feature:s.feature,amount:u.amount,blockSize:e.blockSize,currency:u.currency,hideChargePrice:e.billingModel===t.BillingModel.PerUnit,onBuyMore:r,onManageSubscription:a,canUpgradeSubscription:l,hasCustomSubscription:o}):null}))):null}function Ma(e){var n=e.onManageSubscription,r=e.onBuyMore,a=e.onCancelScheduledUpdates,o=e.onContactSupport,l=e.hiddenSections,c=e.cancelScheduledUpdatesButtonTitle,u=di(),s=u.customerPortal,d=u.textOverrides,p=u.theme,m=u.isLoading||!s,g=s||{},h=g.subscriptions,f=g.entitlements,y=g.canUpgradeSubscription,v=null==h?void 0:h.find((function(e){return e.status===t.SubscriptionStatus.Active})),b=null==h?void 0:h.find((function(e){return e.status===t.SubscriptionStatus.InTrial})),x=(null==v?void 0:v.pricingType)===t.PricingType.Custom,E=v||b;return i.createElement(Yi,{className:"stigg-customer-portal-subscriptions-overview",$backgroundColor:p.backgroundColor,$borderColor:p.borderColor},!m&&v&&v.scheduledUpdates&&i.createElement(Gi,{theme:p,subscription:v,onCancelScheduledUpdates:a,cancelScheduledUpdatesButtonTitle:c}),m||!E?i.createElement(ji,null):i.createElement("div",{className:"stigg-overview-layout",style:{display:"flex",alignItems:"flex-start",gap:64,flexWrap:"wrap"}},i.createElement("div",{style:{display:"flex",flexDirection:"column",flex:1}},i.createElement(Ei,{onManageSubscription:n,hideManageButton:x,textOverrides:d}),i.createElement(va,{mainSubscription:E,trialSubscription:b,theme:p,onManageSubscription:n}),v&&f&&i.createElement(Ta,{subscription:v,entitlements:f,onBuyMore:r,onManageSubscription:n,canUpgradeSubscription:!!y,hasCustomSubscription:x}),i.createElement(Li,{customerPortal:s,hiddenSections:l,textOverrides:d,theme:p})),i.createElement("div",{style:{display:"flex",flexDirection:"column",width:319,gap:24}},i.createElement(ia,{subscription:E,theme:p,onContactSupport:o,textOverrides:d}))))}var Aa=a("div",{target:"e2lw8x70"})({name:"7wpci2",styles:"display:flex;width:100%;align-items:flex-end;justify-content:flex-end;margin-bottom:24px"});function Ba(e){return i.createElement(Aa,{className:"stigg-customer-portal-header-layout"},i.createElement(Tr,{source:"customer_portal",showWatermark:e.showWatermark}))}var La=a(De,{target:"eb0pe7a1"})({name:"kxbue8",styles:"text-transform:none"}),Na=a(W.ExternalLink,{target:"eb0pe7a0"})("color:",(function(e){return e.theme.stigg.palette.primary}),";");function Ua(e){var t=e.text,n=e.url;return i.createElement(gi,{className:e.className,variant:"outlined",startIcon:i.createElement(Na,{size:20,strokeWidth:2.5}),onClick:function(){window.open(n,"_blank")}},i.createElement(La,{color:"primary.main"},t))}var Ia=a("div",{target:"e12mjvl51"})({name:"1hidw77",styles:"display:flex;flex-direction:column;align-items:flex-start;gap:16px;flex:1 0 0"}),Fa=a("div",{target:"e12mjvl50"})({name:"1jp5dot",styles:"display:flex;align-items:flex-start;gap:16px;align-self:stretch;flex-wrap:wrap"});function Oa(e){var t=e.rows;return i.createElement(Ia,null,i.createElement(De,{variant:"h6",color:"secondary",fontWeight:c.FontWeight.Medium},e.title),t.map((function(e){var t=e.classNamePrefix,n=e.label,r=e.value,a=e.valueTypographyProps;return i.createElement(Fa,{key:n},i.createElement(De,Object.assign({className:t+"-label",variant:"body1",color:"secondary",style:{width:80}},e.labelTypographyProps),n),i.createElement(De,Object.assign({className:t+"-text",variant:"body1",color:"secondary"},a),r))})))}function Da(){return i.createElement(P,{width:220,height:42})}function ja(){var e=di(),t=e.customerPortal,n=e.isLoading,r=e.textOverrides,a=e.theme,o=Fi("md"),l=(t||{}).billingInformation,c=!l||n,u=[];if(c?u.push.apply(u,[i.createElement(Ia,{key:"information-loading-data-top"},i.createElement(P,{width:220,height:12}),i.createElement(P,{width:220,height:12}),i.createElement(P,{width:220,height:12})),i.createElement(k,{key:"information-loading-data-divider",orientation:"vertical",style:{minHeight:93,display:o?"block":"none"}}),i.createElement(Ia,{key:"information-loading-data-bottom"},i.createElement(P,{width:220,height:12}),i.createElement(P,{width:220,height:12}),i.createElement(P,{width:220,height:12}))]):(u.push(i.createElement(Oa,{key:"information-billing-data-billed-to",title:"Billed to",rows:[{classNamePrefix:"stigg-customer-name",label:"Name",value:(null==l?void 0:l.name)||"-",valueTypographyProps:null!=l&&l.name?{}:{color:"disabled"}},{classNamePrefix:"stigg-customer-email",label:"Email",value:(null==l?void 0:l.email)||"-",valueTypographyProps:null!=l&&l.email?{}:{color:"disabled"}}]})),null!=l&&l.defaultPaymentMethodId&&l.defaultPaymentMethodLast4Digits&&l.defaultPaymentExpirationMonth&&l.defaultPaymentExpirationYear&&(u.unshift(i.createElement(k,{key:"information-billing-data-divider",orientation:"vertical",style:{minHeight:93,display:o?"block":"none"}})),u.unshift(i.createElement(Oa,{key:"information-billing-data-payment-method",title:"Payment method",rows:[{classNamePrefix:"stigg-credit-card",label:"Card",value:"Ending in "+l.defaultPaymentMethodLast4Digits},{classNamePrefix:"stigg-credit-card-expiration",label:"Expires",value:s.padStart(l.defaultPaymentExpirationMonth.toString(),2,"0")+"/"+l.defaultPaymentExpirationYear}]})))),!(c||null!=l&&l.name||null!=l&&l.email||null!=l&&l.defaultPaymentMethodId))return null;var d=c?i.createElement(Da,null):null!=t&&t.billingPortalUrl?i.createElement(Ua,{url:t.billingPortalUrl,text:r.editPaymentDetails,className:"stigg-edit-payment-details-button"}):null;return i.createElement(Yi,{className:"stigg-payment-details-section-layout",$backgroundColor:a.backgroundColor,$borderColor:a.borderColor},i.createElement(vi,{className:"stigg-payment-details-section-header"},i.createElement(bi,{isLoading:c,className:"stigg-payment-details-section-title",title:"Payment details"}),d),i.createElement("div",{style:{display:"flex",alignItems:"stretch",gap:o?64:32,flexWrap:"wrap"}},u))}var Wa=a(Yi,{target:"eqpkdww0"})("position:relative;.stigg-paywall-layout{width:100%;}.stigg-paywall-plans-layout{flex-wrap:nowrap;width:100%;overflow-x:auto;justify-content:unset;padding:10px 0px 0px 0px;}.stigg-paywall-plans-layout .stigg-plan-offering-container:first-of-type{margin-left:auto;}.stigg-paywall-plans-layout .stigg-plan-offering-container:last-child{margin-right:auto;}.","stigg-watermark","{display:none;}"),Ra=i.forwardRef((function(e,t){var n=e.paywallComponent,r=e.theme;return n?i.createElement(Wa,{className:"stigg-customer-portal-paywall-section",ref:t,$backgroundColor:r.backgroundColor,$borderColor:r.borderColor},i.createElement(vi,{className:"stigg-customer-portal-paywall-header"},i.createElement(bi,{isLoading:e.isLoading,className:"stigg-customer-portal-paywall-section-title",title:e.title})),n):null})),qa=a("div",{target:"e1gjjeod1"})({name:"6xtw2",styles:"width:100%;display:flex;flex-direction:column;align-items:center;& *{box-sizing:border-box;}"}),_a=a("div",{target:"e1gjjeod0"})({name:"1c31jfu",styles:"width:100%;display:flex;flex-direction:column;align-items:center;row-gap:24px"});function za(e,t,n){if(!t&&!n)return e;var r=$(e);return r===$(t||"")||r===$(n||"")?e:e+" ("+n+")"}var Ha=a("div",{target:"eqqveb80"})("display:flex;flex-direction:column;padding:24px;border:",(function(e){return"1px solid "+e.$borderColor}),";border-radius:10px;row-gap:16px;height:100%;",(function(e){return e.$highlight&&"background-color: "+e.theme.stigg.palette.backgroundSection}),";");function Va(e){var n,r,a,o,l=e.entitlement,c=e.subscriptionPrice,u=e.onManageSubscription,s=e.onBuyMore,d=e.hasCustomSubscription,p=e.canUpgradeSubscription,m=di().theme,h=!l.hasUnlimitedUsage&&l.currentUsage>l.usageLimit;return l.feature?i.createElement(Ha,{$highlight:!!c,$borderColor:m.borderColor},i.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:16}},i.createElement(ga,{variant:"body1"},l.feature&&za((o=l.feature).displayName,o.featureUnits,o.featureUnitsPlural)),c&&i.createElement(da,{title:i.createElement(De,{variant:"body1"},c.billingModel===t.BillingModel.PerUnit?"Billed for committed usage":"Billed for actual usage")},i.createElement($t,{icon:"DollarCoin",svgStrokeColor:m.iconsColor}))),i.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8}},i.createElement(ga,{variant:"body1",color:h?"error":"primary","data-testid":"usage-data-"+(null==(n=l.feature)?void 0:n.refId)},null==(r=l.currentUsage)?void 0:r.toLocaleString(),!l.hasUnlimitedUsage&&" / "+(null==(a=l.usageLimit)?void 0:a.toLocaleString())+" ("+ba(l.currentUsage||0,l.usageLimit)+"%)"),i.createElement(Ca,{entitlement:l,feature:l.feature,onBuyMore:s,canBuyMore:!!c,onManageSubscription:u,canUpgradeSubscription:p,hasCustomSubscription:d})),i.createElement(wa,{entitlement:l}),l.hasUnlimitedUsage||V(l.usageLimit)||V(l.currentUsage)||!l.resetPeriod||!l.usagePeriodEnd?null:i.createElement(De,{color:"secondary"},function(e){if(!e.resetPeriod||!e.usagePeriodEnd)return null;var t=function(t){return g.utc(e.usagePeriodEnd).diff(g.utc(),t)};switch(e.resetPeriod){case"MONTH":return"Resets monthly - in "+t("days")+" days";case"WEEK":return"Resets weekly - in "+t("days")+" days";case"DAY":return"Resets daily - in "+t("hours")+" hours";case"HOUR":return"Resets hourly - in "+t("minutes")+" minutes";default:return null}}(l)),l.hasUnlimitedUsage&&i.createElement(De,{color:"secondary"},"In current billing period")):null}var $a=a("div",{target:"eoaojje0"})({name:"3hgi0y",styles:"margin-top:32px"});function Za(){var e=Fi("md");return i.createElement(l,{container:!0,spacing:4,className:"stigg-subscription-usage-skeleton-layout",sx:{flexWrap:"wrap"}},s.range(6).map((function(t){return i.createElement(l,{key:t,item:!0,xs:e?4:12},i.createElement(P,{width:280,height:120}))})))}function Ga(e){var n=e.onManageSubscription,a=e.onBuyMore,o=e.filterEntitlements,c=r.useState(!1),u=c[0],d=c[1],p=Fi("md"),m=di(),g=m.customerPortal,h=m.textOverrides,f=m.theme,y=m.isLoading||!g,v=g||{},b=v.entitlements,x=v.subscriptions,E=null==b?void 0:b.filter((function(e){var n,r;return(null==(n=e.feature)?void 0:n.meterType)===t.MeterType.Fluctuating||(null==(r=e.feature)?void 0:r.meterType)===t.MeterType.Incremental})),k=null==x?void 0:x.find((function(e){return e.status===t.SubscriptionStatus.Active})),w=(null==k?void 0:k.pricingType)===t.PricingType.Custom,P=!(null==g||!g.canUpgradeSubscription),C=s.keyBy(null==k?void 0:k.prices,"feature.refId"),S=s.keyBy(E,"feature.refId"),T=s.compact(null==k?void 0:k.prices.map((function(e){return e.feature&&S[e.feature.refId]}))),M=s.compact(null==E?void 0:E.filter((function(e){return!C[e.feature.refId]}))),A=[].concat(T,M),B=o?o(A):A,L=p?B.length>2?4:6:12,N=u?B:B.slice(0,6);return y||null!=E&&E.length?i.createElement(Yi,{className:"stigg-subscription-usage-layout",$backgroundColor:f.backgroundColor,$borderColor:f.borderColor},i.createElement(vi,null,i.createElement(bi,{title:h.usageTabTitle,className:"stigg-customer-portal-usage-section-title",isLoading:y})),y?i.createElement(Za,null):i.createElement(i.Fragment,null,i.createElement(l,{container:!0,spacing:4},N.map((function(e){return i.createElement(l,{className:"stigg-entitlement-usage-"+e.feature.refId,key:e.feature.refId,item:!0,xs:L},i.createElement(Va,{key:e.feature.refId,subscriptionPrice:C[e.feature.refId],entitlement:e,onManageSubscription:n,onBuyMore:a,hasCustomSubscription:w,canUpgradeSubscription:P}))}))),B.length>6&&i.createElement($a,null,i.createElement(gi,{className:"stigg-usage-toggle-many-button",variant:"text",startIcon:i.createElement(u?W.Minus:W.Plus,null),onClick:function(){return d((function(e){return!e}))}},u?"Show less":"Show more")))):null}function Ya(e){var t=e.onManageSubscription,n=e.onBuyMore,a=e.onCancelScheduledUpdates,o=e.onContactSupport,l=e.paywallComponent,c=e.hiddenSections,u=e.filterEntitlements,s=Vr().stigg,d=di(),p=d.customerPortal,m=d.textOverrides,g=d.theme,h=d.isLoading,f=r.useRef(null),y=function(e){var n,r;t?t({intentionType:e.intentionType,customerSubscriptions:null!=(n=null==p?void 0:p.subscriptions)?n:[]}):null==f||null==(r=f.current)||r.scrollIntoView({behavior:"smooth"})},v=!(null!=c&&c.some((function(e){return"usage"===e}))),b=!(null!=c&&c.some((function(e){return"paymentDetails"===e||"billingInformation"===e}))),x=!(null!=c&&c.some((function(e){return"invoices"===e||"billingInformation"===e})));return i.createElement(qa,{className:"stigg-customer-portal-layout"},i.createElement(Ba,{showWatermark:s.isWidgetWatermarkEnabled&&!!p}),i.createElement(_a,{className:"stigg-customer-portal-sections"},i.createElement(Ma,{onCancelScheduledUpdates:a,onBuyMore:n,onManageSubscription:y,onContactSupport:o,hiddenSections:c,cancelScheduledUpdatesButtonTitle:m.cancelScheduledUpdatesButtonTitle}),v&&i.createElement(Ga,{onManageSubscription:y,onBuyMore:n,filterEntitlements:u}),i.createElement(Ra,{ref:f,paywallComponent:l,theme:g,title:m.paywallSectionTitle,isLoading:!p||h}),b&&i.createElement(ja,null),x&&i.createElement(Ka,null)))}var Qa=["textOverrides","theme","resourceId","productId"];function Ka(){var e=di(),t=e.customerPortal,n=e.textOverrides,r=e.theme,a=!t||e.isLoading,o=a?i.createElement(Da,null):null!=t&&t.billingPortalUrl?i.createElement(Ua,{url:t.billingPortalUrl,text:n.viewInvoiceHistory,className:"stigg-view-invoice-history-button"}):null;return a||null!=t&&t.billingPortalUrl?i.createElement(Yi,{className:"stigg-invoices-section-layout",$backgroundColor:r.backgroundColor,$borderColor:r.borderColor},i.createElement(vi,{className:"stigg-invoices-section-header"},i.createElement(bi,{isLoading:a,className:"stigg-invoices-section-title",title:n.invoicesTitle}),o)):null}var Xa=function(e){return A(e,"addon.displayName")};function Ja(e,t){return e.pricePoints.some((function(e){return e.billingPeriod===t}))}function eo(e){var t=e.addon,n=e.currency,r=e.billingCountryCode;return de({},t,{pricePoints:t.pricePoints.filter((function(e){return e.currency===n&&(!r||e.billingCountryCode===r)}))})}function to(){var e=To()[1];return function(t){return e((function(e){Y(e.addonsStep.addons,(function(e){return e.addon.id===t}))}))}}function no(){var e=To()[1];return function(t){return e((function(e){e.widgetState.isValid=t}))}}function ro(){var e,t,n={checkoutState:(e=To()[0]).checkout,widgetState:e.widgetState,checkoutLocalization:e.checkoutLocalization};return{checkoutState:n.checkoutState,widgetState:n.widgetState,checkoutLocalization:n.checkoutLocalization,setWidgetReadOnly:(t=To()[1],function(e){return t((function(t){t.widgetState.readOnly=e}))}),setIsValid:no()}}var io,ao=function(e,t){return e.minUnitQuantity&&t<e.minUnitQuantity?e.minUnitQuantity:e.maxUnitQuantity&&t>e.maxUnitQuantity?e.maxUnitQuantity:t},oo=function(e){return!(null==e||!e.pricePoints.some((function(e){return e.billingPeriod===X.BillingPeriod.Monthly})))},lo=function(e){return!(null==e||!e.pricePoints.some((function(e){return e.billingPeriod===X.BillingPeriod.Annually})))},co=function(e,t,n){return e===X.BillingPeriod.Monthly&&t||e===X.BillingPeriod.Annually&&n?e:null},uo=function(e){return e.pricingModel===t.BillingModel.PerUnit};function so(){var e=To()[1];return function(t,n){return e((function(e){var r=e.planStep.billableFeatures.find((function(e){return e.featureId===t}));r?r.quantity=n:e.planStep.billableFeatures.push({featureId:t,quantity:n})}))}}function po(){var e;return de({},To()[0].planStep,{setBillingPeriod:(e=To()[1],function(t){return e((function(e){e.planStep.billingPeriod=t}))}),setBillableFeature:so()})}!function(e){e.PLAN="PLAN",e.ADDONS="ADDONS",e.PAYMENT="PAYMENT"}(io||(io={}));var mo=[{key:io.PLAN,label:"Plan"},{key:io.ADDONS,label:"Add-ons"},{key:io.PAYMENT,label:"Payment details"}],go={activeStep:0,completedSteps:[],steps:mo,isDisabled:!1};function ho(){var e=To()[1];return function(t){return e((function(e){e.progressBar.completedSteps.push(t)}))}}function fo(){var e=To()[1];return function(){return e((function(e){var t=e.progressBar;t.isDisabled||(t.completedSteps.includes(t.activeStep)||t.completedSteps.push(t.activeStep),t.activeStep<t.steps.length-1&&(t.activeStep+=1))}))}}function yo(){var e=To()[1];return function(t){return e((function(e){e.progressBar.isDisabled=!!t}))}}function vo(){var e,t,n=To()[0].progressBar;return{currentStep:n.steps[n.activeStep],progressBarState:n,isLastStep:n.activeStep===n.steps.length-1,isCheckoutComplete:(t=n,t.completedSteps.length>=t.steps.length-1),setActiveStep:(e=To()[1],function(t){return e((function(e){e.progressBar.activeStep=t}))}),markStepAsCompleted:ho(),goNext:fo(),setIsDisabled:yo()}}function bo(){var e=To()[0],t=e.paymentStep;return de({},e.planStep,{addons:e.addonsStep.addons,promotionCode:e.promotionCode,billingAddress:t.billingAddress,taxPercentage:t.taxPercentage})}function xo(e){var t=e.billingAddress,n=e.taxPercentage;return t||n?{billingInformation:de({},t?{billingAddress:t}:{},n?{taxPercentage:n}:{})}:{}}var Eo=function(){var e=se(Fr.mark((function e(t){var n,r,i,a,o,l,c,u,s,d,p,m,g,h,f,y,v,b;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.stigg,r=t.customerId,i=t.planId,a=t.resourceId,o=t.promotionCode,l=t.billableFeatures,c=t.billingCountryCode,u=t.billingPeriod,s=t.billingAddress,d=t.taxPercentage,p=t.onMockCheckoutPreview,m=t.addons.map((function(e){return{addonId:e.addon.id,quantity:e.quantity}})),g=null,h=null,e.prev=4,!r||!i){e.next=15;break}if(f=de({customerId:r,planId:i,resourceId:a,billingCountryCode:c,addons:m,billingPeriod:u,promotionCode:o,billableFeatures:O(l)?void 0:l},xo({billingAddress:s,taxPercentage:d})),!p){e.next=11;break}e.t0=p(f),e.next=14;break;case 11:return e.next=13,n.previewSubscription(f);case 13:e.t0=e.sent;case 14:g=e.t0;case 15:e.next=21;break;case 17:e.prev=17,e.t1=e.catch(4),v=(null==e.t1||null==(y=e.t1.message)?void 0:y.split("Error:"))||[],h=null==(b=v[1])?void 0:b.trim();case 21:return e.abrupt("return",{subscriptionPreview:g,errorMessage:h});case 22:case"end":return e.stop()}}),e,null,[[4,17]])})));return function(t){return e.apply(this,arguments)}}(),ko=function(e){var t=(void 0===e?{}:e).onMockCheckoutPreview,n=Vr().stigg,i=bo(),a=To()[0].resourceId,o=ro(),l=o.widgetState,c=o.checkoutState||{},u=c.plan,s=c.customer;return{previewSubscriptionAction:r.useCallback(function(){var e=se(Fr.mark((function e(r){var o;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(void 0===r?{}:r).promotionCode,l.isValid){e.next=3;break}return e.abrupt("return",{subscriptionPreview:null,errorMessage:null});case 3:return e.abrupt("return",Eo({stigg:n,customerId:null==s?void 0:s.id,planId:null==u?void 0:u.id,resourceId:a,addons:i.addons,billableFeatures:i.billableFeatures,billingCountryCode:i.billingCountryCode,billingPeriod:i.billingPeriod,billingAddress:i.billingAddress,taxPercentage:i.taxPercentage,promotionCode:null!=o?o:i.promotionCode,onMockCheckoutPreview:t}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[n,null==s?void 0:s.id,null==u?void 0:u.id,a,i.addons,i.billableFeatures,i.billingCountryCode,i.billingPeriod,i.billingAddress,i.taxPercentage,i.promotionCode,l.isValid,t])}};function wo(){var e=To()[1];return function(t){return e((function(e){e.paymentStep.errorMessage=t}))}}function Po(){var e=To()[1];return function(t){return e((function(e){e.paymentStep.billingAddress=t}))}}function Co(){var e;return de({},To()[0].paymentStep,{setUseNewPaymentMethod:(e=To()[1],function(t){return e((function(e){e.paymentStep.useNewPaymentMethod=t}))}),setErrorMessage:wo(),setBillingAddress:Po()})}var So=i.createContext(null);So.displayName="CheckoutContext";var To=function(){var e=r.useContext(So);if(!e)throw new Error("Could not find Checkout context; You need to wrap your checkout components in an <CheckoutProvider> component.");return e},Mo=function(e){var t=e.children,n=e.initialState,a=r.useState(n),o=a[0],l=a[1];r.useEffect((function(){l(n)}),[n]);var c=r.useCallback((function(e){return l((function(t){return Z.produce(t,(function(t){return e(t)}))}))}),[l]),u=r.useMemo((function(){return[o,c]}),[c,o]);return i.createElement(So.Provider,{value:[u[0],u[1]]},t)};function Ao(e){var n,a=e.children,o=e.textOverrides,l=e.theme,c=e.preferredBillingPeriod,u=e.billableFeatures,s=e.billingCountryCode,d=e.billingInformation,p=e.skipCheckoutSteps,h=function(e){var t=e.planId,n=e.resourceId,i=e.billingCountryCode,a=e.onMockCheckoutState,o=Vr().stigg,l=r.useState(!0),c=l[0],u=l[1],s=r.useState(),d=s[0],p=s[1];return r.useEffect((function(){var e=function(){var e=se(Fr.mark((function e(){return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.getCheckoutState({planId:t,resourceId:n,billingCountryCode:i});case 3:p(e.sent),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),Or.error("Failed to load checkout "+(null==e.t0?void 0:e.t0.message),e.t0);case 10:return e.prev=10,u(!1),e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[0,7,10,13]])})));return function(){return e.apply(this,arguments)}}();if(a)return u(!1),void p(a({planId:t,resourceId:n,billingCountryCode:i}));o.isCustomerLoaded&&(u(!0),e())}),[o,o.isCustomerLoaded,n,t,i,a]),{checkout:d,isLoading:c,isWidgetWatermarkEnabled:o.isWidgetWatermarkEnabled}}({resourceId:e.resourceId,planId:e.planId,billingCountryCode:s,onMockCheckoutState:e.onMockCheckoutState}),f=h.checkout,y=h.isLoading,v=h.isWidgetWatermarkEnabled,b=null!=f&&f.configuration?function(e){var t=e.palette,n=e.customCss;return{palette:{primary:(null==t?void 0:t.primary)||void 0,backgroundPaper:(null==t?void 0:t.backgroundColor)||void 0,outlinedBorder:(null==t?void 0:t.borderColor)||void 0,text:{primary:(null==t?void 0:t.textColor)||void 0},backgroundHighlight:(null==t?void 0:t.summaryBackgroundColor)||void 0},typography:qr(e.typography,jr),customCss:n||void 0}}(f.configuration):{typography:qr(jr)},x=li(b),E=r.useMemo((function(){var e,n,r,i,a=function(e,t,n){var r=(e||{}).palette;return{primary:(null==t?void 0:t.primary)||(null==r?void 0:r.primary)||"rgb(50, 126, 238)",textColor:(null==t?void 0:t.textColor)||(null==r?void 0:r.text.primary)||"rgb(0, 30, 108)",backgroundColor:(null==t?void 0:t.backgroundColor)||(null==r?void 0:r.backgroundPaper)||"rgb(255, 255, 255)",borderColor:(null==t?void 0:t.borderColor)||(null==r?void 0:r.outlinedBorder)||"rgb(235, 237, 243)",summaryBackgroundColor:(null==t?void 0:t.summaryBackgroundColor)||(null==r?void 0:r.backgroundHighlight)||"rgb(109, 121, 144)",paymentInputBackgroundColor:null==t?void 0:t.paymentInputBackgroundColor,paymentInputBorderColor:null==t?void 0:t.paymentInputBorderColor,paymentInputBorderRadius:null==t?void 0:t.paymentInputBorderRadius}}(x,l),h=m({changePlan:"Change",billingPeriodsTitle:"Billing cycle",addAddonText:"Add",newPaymentMethodText:"New payment method",newPaymentMethodBillingAddressTitle:"Billing address",newPaymentMethodCardTitle:"Payment method",summary:{title:"Order summary",planName:function(e){return e.plan.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:function(){return"Base charge"},totalText:"Total",totalDueText:"Total due today",totalBillingPeriodText:function(e){return"Billed "+e.billingPeriod.toLowerCase()},appliedCreditsTitle:"Applied credits",creditsForUnusedTimeText:function(e){return"Your account will be granted credits worth "+e.credits+" for unused time, which will be automatically applied to future payments."},discountText:function(e){var n,r=e.discountDetails;n=r.type===t.DiscountType.Percentage?r.value+"% off":""+Pn({amount:r.value,currency:e.currency});var i="";switch(r.durationType){case t.DiscountDurationType.Once:i=" once";break;case t.DiscountDurationType.Repeating:i=(r.type===t.DiscountType.Fixed?" per month":"")+" for "+r.durationInMonths+" months";break;case t.DiscountDurationType.Forever:default:i=""}return""+n+i},taxTitle:function(e){var t=e.taxDetails;return"Tax ("+(null==t?void 0:t.percentage)+"%)"},changesWillApplyAtEndOfBillingPeriod:function(e){return"Your changes will take effect at the end of your current billing cycle on "+g(e.billingPeriodEnd).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:function(){return"We’re sorry to see you cancel your paid subscription 😭"},freePlanHeader:function(){return"New plan"},freePlanName:function(e){return""+e.plan.displayName},freePlanPriceText:function(){return"Free"},paidPlanHeader:function(){return"Current plan"},paidPlanName:function(e){return""+e.plan.displayName},paidPlanPriceText:function(e){var t=e.billingPeriod;return"Paid plan"+(t?", billed "+t.toLowerCase():"")}}},o),b=function(e){var t=e.plan,n=e.activeSubscription,r=e.billingCountryCode,i=e.preconfiguredBillableFeatures,a=function(e){var t,n,r=e.plan,i=e.activeSubscription,a=e.preferredBillingPeriod,o=oo(r),l=lo(r);if(a){var c=co(a,o,l);if(c)return c}if((null==i||null==(t=i.plan)?void 0:t.id)===(null==r?void 0:r.id))return(null==i||null==(n=i.price)?void 0:n.billingPeriod)||X.BillingPeriod.Monthly;if(null!=i&&i.prices&&(null==i?void 0:i.prices.length)>0){var u=co(null==i?void 0:i.prices[0].billingPeriod,o,l);if(u)return u}return l?X.BillingPeriod.Annually:X.BillingPeriod.Monthly}({plan:t,activeSubscription:n,preferredBillingPeriod:e.preferredBillingPeriod}),o=function(e,t,n){var r;if(!t)return[];var i=Q(e,"featureId"),a=Q(K(null==n||null==(r=n.prices)?void 0:r.map((function(e){var t=e.feature;return t&&uo(e)?{featureId:t.featureId,quantity:t.unitQuantity||null}:null}))),"featureId");return K(null==t?void 0:t.map((function(e){var t,n,r,o,l=null==(t=e.feature)?void 0:t.featureId;if(!l||!uo(e))return null;var c=(null==(n=i[l])?void 0:n.quantity)||(null==(r=a[l])?void 0:r.quantity);return o=ao(e,c||1),e.isTieredPrice&&!gn(e.tiers)&&(o=un(e.tiers,o).upTo),{featureId:l,quantity:o}})))}(i,null==t?void 0:t.pricePoints.filter((function(e){return e.billingPeriod===a})),n);return{billingPeriod:a,billableFeatures:o,billingCountryCode:r}}({preferredBillingPeriod:c,plan:null==f?void 0:f.plan,activeSubscription:null==f?void 0:f.activeSubscription,billingCountryCode:s,preconfiguredBillableFeatures:null!=u?u:[]}),E=function(e){var n,r,i=e.activeSubscription,a=e.plan,o=e.billingPeriod,l=e.billingCountryCode,c=[],u=(null==a||null==(n=a.pricePoints)||null==(r=n[0])?void 0:r.currency)||t.Currency.Usd,s=function(e){return A(e,"displayName")}(function(e){var t,n=e.addons,r=e.billingPeriod,i=e.billingCountryCode,a=e.currency;return(null==n||null==(t=n.filter((function(e){return Ja(e,r)})))?void 0:t.map((function(e){return eo({addon:e,currency:a,billingCountryCode:i})})))||[]}({addons:null==a?void 0:a.compatibleAddons,billingPeriod:o,billingCountryCode:l,currency:u})),d=function(e){var t,n=e.addons,r=e.billingPeriod,i=e.billingCountryCode,a=e.currency;return(null==n||null==(t=n.filter((function(e){return Ja(e.addon,r)})))?void 0:t.map((function(e){return de({},e,{addon:eo({addon:e.addon,currency:a,billingCountryCode:i})})})))||[]}({addons:null==i?void 0:i.addons,billingPeriod:o,billingCountryCode:l,currency:u});return null!=d&&d.length&&null!=s&&s.length&&(c=Xa(d.filter((function(e){return s.some((function(t){return t.id===e.addon.id}))})))),{addons:c,initialAddons:G(c),availableAddons:s}}({plan:null==f?void 0:f.plan,billingPeriod:b.billingPeriod,activeSubscription:null==f?void 0:f.activeSubscription}),k={useNewPaymentMethod:!(null!=(i=(r={customer:null==f?void 0:f.customer,taxPercentage:null==d||null==(e=d.taxDetails)?void 0:e.taxPercentage}).customer)&&i.paymentMethodDetails),taxPercentage:r.taxPercentage},w=function(e){var t=e.skipCheckoutSteps,n=e.plan,r=e.availableAddons,i=e.availableCharges,a=e.preferredBillingPeriod,o=e.preconfiguredBillableFeatures;if(e.isLoading||!n)return go;var l=[];return t.includes("PLAN")&&function(e,t,n,r){if(function(e){return oo(e)&&lo(e)}(e)&&!r)return!1;var i=t.map((function(e){return e.featureId})),a=n.map((function(e){return e.featureId}));return!(i.length!==a.length||!i.every((function(e){return a.includes(e)})))}(n,i,o,a)&&l.push(io.PLAN),(0===(null==r?void 0:r.length)||t.includes("ADDONS"))&&l.push(io.ADDONS),de({},go,{steps:mo.filter((function(e){return!l.includes(e.key)}))})}({isLoading:y,skipCheckoutSteps:null!=p?p:[],plan:null==f?void 0:f.plan,availableAddons:E.availableAddons,availableCharges:b.billableFeatures,preferredBillingPeriod:c,preconfiguredBillableFeatures:null!=u?u:[]});return{checkout:f,checkoutLocalization:h,stiggTheme:x,theme:a,progressBar:w,planStep:b,addonsStep:E,paymentStep:k,resourceId:null==f||null==(n=f.resource)?void 0:n.id,widgetState:{readOnly:!1,isValid:!0,isLoadingCheckoutData:y},isWidgetWatermarkEnabled:v}}),[c,s,f,y,p,null==d||null==(n=d.taxDetails)?void 0:n.taxPercentage]);return i.createElement(ui,{key:null==f?void 0:f.plan.id,componentTheme:b},i.createElement(Mo,{initialState:E},a))}var Bo,Lo=a("div",{target:"ergo9xd2"})("margin:auto;min-height:760px;max-width:920px;display:flex;position:relative;flex-direction:column;align-items:center;background-color:",(function(e){return e.theme.stigg.palette.backgroundPaper}),";border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";& *{box-sizing:border-box;}padding:16px 16px;",Ii.md,"{padding:32px;width:calc(100% - 64px);border-radius:10px;}"),No=a(I,{target:"ergo9xd1"})("display:flex;align-items:flex-start;gap:32px;flex-wrap:wrap;width:100%;flex-direction:column;",Ii.md,"{flex-direction:row;}"),Uo=a(I,{target:"ergo9xd0"})("display:flex;flex-direction:column;gap:0;flex:2;width:100%;",Ii.md,"{width:auto;}"),Io=a(H,{shouldForwardProp:function(e){return!e.startsWith("$")},target:"e9upyia2"})((function(e){var t,n=e.theme,r=e.$disabled;return(t={})["&."+z.linearProgressClasses.root]={borderRadius:n.stigg.border.radius,backgroundColor:n.stigg.palette.outlinedBorder},t["& ."+z.linearProgressClasses.bar]={backgroundColor:r?n.stigg.palette.primaryLight:n.stigg.palette.primary},t}),""),Fo=a(b,{target:"e9upyia1"})((function(){var e;return(e={})["&."+v.buttonClasses.root]={textTransform:"none",lineHeight:"inherit",justifyContent:"flex-start",padding:"8px 4px"},e}),""),Oo=a($t,{shouldForwardProp:function(e){return!e.startsWith("$")},target:"e9upyia0"})((function(e){var t=e.theme,n=e.$disabled;return{circle:{stroke:n?t.stigg.palette.primaryLight:t.stigg.palette.primary,fill:e.$shouldFill?n?t.stigg.palette.primaryLight:t.stigg.palette.primary:void 0}}}),""),Do=function(){var e=vo(),t=e.progressBarState,n=e.setActiveStep,a=e.currentStep,o=ro().widgetState,c=Fi("md"),u=r.useRef(),s=o.readOnly,d=o.isLoadingCheckoutData,p=t||{},m=p.activeStep,g=p.completedSteps,h=p.steps,f=100*(m+1)/h.length,y=i.useState(a),v=y[0],b=y[1];return r.useEffect((function(){c||u.current&&a!==v&&u.current.scrollIntoView({behavior:"smooth"}),b(a)}),[a,c,v,b]),1===t.steps.length?null:i.createElement(I,{className:"stigg-checkout-progress-container",sx:{width:"100%",mb:3},ref:u},i.createElement(Io,{variant:"determinate",value:f,$disabled:s}),i.createElement(l,{container:!0,display:"flex"},h.map((function(e,r){var a=e.key,o=e.label,u=g.includes(r),p=s||r>m&&!u&&!g.includes(r-1)||m!==r&&t.isDisabled,h=p?"OutlinedCheckedCircleDisabled":"OutlinedCheckedCircle";return i.createElement(l,{key:a,item:!0,display:"flex",flexDirection:"row",flex:c?1:"auto",justifyContent:"flex-start"},d?i.createElement(In,{width:120,height:20,style:{marginTop:8}}):i.createElement(Fo,{onClick:function(){return n(r)},fullWidth:!0,disabled:p},i.createElement(l,{item:!0,display:"flex",flexDirection:"row",alignItems:"center",gap:1},i.createElement(ee,{icon:i.createElement(Oo,{icon:u?h:"OutlinedCircle",$disabled:p,$shouldFill:u})}),i.createElement(De,{variant:"h6",color:p?"primary.main.light":"primary.main"},o))))}))))},jo=[t.BillingModel.FlatFee,t.BillingModel.PerUnit,t.BillingModel.UsageBased],Wo=function(e){return r.useMemo((function(){return function(e){return A(e,[function(e){return jo.indexOf(e.pricingModel)},function(e){var t;return null==(t=e.feature)?void 0:t.displayName}])}(e)}),[e])};function Ro(){var e;return{promotionCode:To()[0].promotionCode,setPromotionCode:(e=To()[1],function(t){return e((function(e){e.promotionCode=t}))})}}function qo(){return(qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var _o=a((function(e){return r.createElement("svg",qo({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Bo||(Bo=r.createElement("g",{stroke:"#327EEE",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M10 4.167v11.666M4.167 10h11.667"}))))}),{shouldForwardProp:function(e){return!e.startsWith("$")},target:"e3hfkj90"})("margin-right:8px;path{stroke:",(function(e){var t=e.theme;return e.$disabled?t.stigg.palette.text.disabled:t.stigg.palette.primary}),";}"),zo=function(e){var t=e.checkoutLocalization,n=e.disabled;return i.createElement(An,{disabled:n,fullWidth:!0,className:"stigg-checkout-summary-add-coupon-code-button",sx:{textTransform:"none",justifyContent:"flex-start",color:n?"text.disabled":"primary.main"},variant:"text",size:"medium",onClick:e.onAddClick},i.createElement(_o,{$disabled:n,className:"stigg-checkout-summary-add-coupon-code-button-icon"}),i.createElement(De,{className:"stigg-checkout-change-plan-button-text",color:n?"disabled":"primary.main",style:{lineHeight:"24px"},variant:"h3"},t.summary.addCouponCodeText))},Ho=a(An,{target:"e8kocin0"})("padding:4px 10px;min-width:unset;border-radius:",(function(e){return e.theme.stigg.border.radius}),";display:flex;align-items:center;"),Vo=function(e){var t=e.disabled,n=e.checkoutLocalization,a=e.onMockCheckoutPreview,o=Ro().setPromotionCode,c=r.useState(!1),u=c[0],s=c[1],d=i.useState(""),p=d[0],m=d[1],g=i.useState(!1),h=g[0],f=g[1],y=i.useState(""),v=y[0],b=y[1],x=ko({onMockCheckoutPreview:a}).previewSubscriptionAction,E=function(){var e=se(Fr.mark((function e(){var t,n,r,i;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),b(""),e.next=4,x({promotionCode:p});case 4:r=(n=e.sent).subscriptionPreview,!(i=n.errorMessage)&&null!=r&&null!=(t=r.immediateInvoice)&&t.discountDetails?(o(p.toUpperCase()),s(!1)):i&&b(i),f(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return u?i.createElement(l,null,i.createElement(De,{variant:"body1",color:v?"error":t?"disabled":"primary.main"},n.summary.couponCodeTitle),i.createElement(Bn,{disabled:t,autoFocus:!0,variant:"outlined",fullWidth:!0,error:!!v,value:p,onChange:function(e){m(e.target.value)},inputProps:{maxLength:20},onKeyDown:function(e){"Enter"===e.key&&(E(),e.preventDefault())},InputProps:{endAdornment:i.createElement(Ho,{variant:"contained",disabled:t,onClick:function(){E()}},h?i.createElement(ne,{size:18,sx:{color:"white"}}):i.createElement($t,{style:{display:"flex"},icon:"ArrowForward"}))}}),!!v&&i.createElement(De,{variant:"body1",color:"error"},v)):i.createElement(zo,{disabled:t,onAddClick:function(){return s(!0)},checkoutLocalization:n})},$o=a(l,{target:"e1cvrfx31"})("width:auto;display:inline-flex;align-items:center;flex-direction:row;gap:8px;padding:6px 8px;border-radius:",(function(e){return e.theme.stigg.border.radius}),";border:1px solid ",(function(e){return e.theme.stigg.palette.primary}),";"),Zo=a($t,{shouldForwardProp:function(e){return"style"!==e},target:"e1cvrfx30"})("display:flex;g{stroke:",(function(e){return e.theme.stigg.palette.primary}),";}path{fill:",(function(e){return e.$shouldFill?e.theme.stigg.palette.primary:void 0}),";}"),Go=function(e){var t=e.promotionCode,n=e.onClearPromotionCode;return i.createElement($o,{container:!0},i.createElement(l,{item:!0,display:"flex",gap:1,alignItems:"center"},i.createElement(Zo,{icon:"Coupon"}),i.createElement(De,{variant:"body1",color:"primary.main",lineHeight:"auto"},t)),i.createElement(l,{item:!0},i.createElement(An,{variant:"text",sx:{minWidth:"unset",padding:0},onClick:n},i.createElement(Zo,{icon:"Close",$shouldFill:!0}))))},Yo=a("div",{target:"eqejwsl0"})({name:"1k6141t",styles:"margin:16px 0"}),Qo=function(e){var t=e.disabled,n=e.checkoutLocalization,r=e.onMockCheckoutPreview,a=Ro(),o=a.promotionCode,l=a.setPromotionCode,c=o?i.createElement(Go,{promotionCode:o,onClearPromotionCode:function(){l("")}}):i.createElement(Vo,{disabled:t,checkoutLocalization:n,onMockCheckoutPreview:r});return i.createElement(Yo,null,c)},Ko=["postal_code"];function Xo(e){var t,n=e.onBillingAddressChange,r=e.collectPhoneNumber,a=ro(),o=a.checkoutState,c=a.checkoutLocalization,u=a.widgetState,s=a.setWidgetReadOnly,d=Co().setBillingAddress,p=o||{},m=p.customer,g=p.configuration,h=u.readOnly,f=!!(null!=r?r:null==g||null==(t=g.content)?void 0:t.collectPhoneNumber);return i.createElement(l,{flexDirection:"column",container:!0,gap:3,padding:"16px",sx:{pointerEvents:h?"none":void 0}},i.createElement(l,{flexDirection:"column",container:!0,gap:2},i.createElement(De,{variant:"h6"},c.newPaymentMethodBillingAddressTitle),i.createElement(J.AddressElement,{onChange:function(e){if(e.complete){var t=e.value.address,r=de({postalCode:t.postal_code},pe(t,Ko));s(!0),d(r),n?function(){var e=se(Fr.mark((function e(){return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({billingAddress:r});case 2:s(!1);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()():s(!1)}},options:{mode:"billing",fields:{phone:f?"always":"auto"},defaultValues:de({},(null==m?void 0:m.name)&&{name:m.name})}})),i.createElement(l,{flexDirection:"column",container:!0,gap:2},i.createElement(De,{variant:"h6"},c.newPaymentMethodCardTitle),i.createElement(J.PaymentElement,{onChange:function(){},onReady:function(){},options:{readOnly:h,terms:{card:"never"},defaultValues:{billingDetails:de({},(null==m?void 0:m.name)&&{name:m.name},(null==m?void 0:m.email)&&{email:m.email})}}})))}var Jo=[t.PaymentCollection.Failed,t.PaymentCollection.Processing];function el(e){return tl.apply(this,arguments)}function tl(){return(tl=se(Fr.mark((function e(t){var n,r;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.elements){e.next=5;break}return console.error("Stripe elements not initialized"),e.abrupt("return",{success:!1,errorMessage:"Stripe elements not initialized"});case 5:return e.next=7,n.submit();case 7:if(!(r=e.sent.error)){e.next=12;break}return console.log(r.message),e.abrupt("return",{success:!1,errorMessage:r.message||""});case 12:return e.abrupt("return",{success:!0});case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function nl(e){return rl.apply(this,arguments)}function rl(){return(rl=se(Fr.mark((function e(n){var r,i,a,o,l,c,u,s;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=null==(o=null==(i=n.applySubscriptionResults)?void 0:i.subscription)||null==(r=o.latestInvoice)?void 0:r.paymentSecret,c=null==o?void 0:o.paymentCollection,!(a=n.stripe)||!l||c!==t.PaymentCollection.ActionRequired){e.next=13;break}return e.next=7,a.handleNextAction({clientSecret:l});case 7:if(!(u=e.sent.error)){e.next=11;break}return e.abrupt("return",{errorMessage:u.message||""});case 11:e.next=15;break;case 13:if(!c||!Jo.includes(c)){e.next=15;break}return e.abrupt("return",{errorMessage:(null==o||null==(s=o.latestInvoice)?void 0:s.errorMessage)||"An error occurred - try again later"});case 15:return e.abrupt("return",{subscription:o});case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function il(e){return al.apply(this,arguments)}function al(){return(al=se(Fr.mark((function e(t){var n,r,i,a,o,l,c;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.stripe,r=t.elements,i=t.clientSecret,e.next=3,n.confirmSetup({elements:r,confirmParams:{return_url:window.location.href},redirect:"if_required"});case 3:if(!(l=e.sent.error)){e.next=9;break}"card_error"===l.type||"validation_error"===l.type?"card_error"===l.type&&(o=l.message||""):o="An unexpected error occurred.",e.next=21;break;case 9:return e.prev=9,e.next=12,n.retrieveSetupIntent(i);case 12:null!=(c=e.sent.setupIntent)&&c.payment_method&&(a=c.payment_method),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(9),o="An unexpected error occurred.",console.error(e.t0);case 21:return e.abrupt("return",{newPaymentMethodId:a,setupErrorMessage:o});case 22:case"end":return e.stop()}}),e,null,[[9,17]])})))).apply(this,arguments)}function ol(e){return ll.apply(this,arguments)}function ll(){return(ll=se(Fr.mark((function e(t){var n,r,i,a,o,l,c;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.elements,i=t.setupIntentClientSecret,(n=t.stripe)&&r&&i){e.next=3;break}return e.abrupt("return",{success:!1});case 3:return e.next=5,el({elements:r});case 5:if((a=e.sent).success){e.next=8;break}return e.abrupt("return",{success:!1,errorMessage:a.errorMessage});case 8:return e.next=10,il({stripe:n,elements:r,clientSecret:i});case 10:if(l=(o=e.sent).newPaymentMethodId,!(c=o.setupErrorMessage)&&l){e.next=15;break}return e.abrupt("return",{success:!1,errorMessage:c});case 15:return e.abrupt("return",{success:!0,paymentMethodId:l});case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var cl={v:"5.12.1",fr:30,ip:0,op:201,w:700,h:700,nm:"Check",ddd:0,assets:[],layers:[{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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:135,s:[100]},{t:145.5,s:[0]}],ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.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:!1}],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:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[0],y:[1]},o:{x:[.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:!1}],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:[.833],y:[.833]},o:{x:[.167],y:[.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:!1},{ty:"st",c:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:0,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:30,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:61,s:[1,1,1,1]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.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:!1},{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:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.338],y:[1]},o:{x:[.333],y:[0]},t:87,s:[50]},{t:122,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.338],y:[1]},o:{x:[.333],y:[0]},t:87,s:[45]},{t:122,s:[0]}],ix:2},o:{a:1,k:[{i:{x:[.474],y:[1]},o:{x:[.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:!1}],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}],markers:[],props:{}},ul=a(I,{target:"eeyi5d31"})("@keyframes blurFade{0%{background-color:",(function(e){return p(e.theme.stigg.palette.backgroundPaper).alpha(0).toString()}),";backdrop-filter:blur(0px);}100%{background-color:",(function(e){return p(e.theme.stigg.palette.backgroundPaper).alpha(.9).toString()}),";backdrop-filter:blur(6.5px);}}position:absolute;top:0;left:0;bottom:0;right:0;z-index:5;background-color:",(function(e){return p(e.theme.stigg.palette.backgroundPaper).alpha(.9).toString()}),";animation:blurFade 2s ease-in forwards;display:flex;flex-direction:column;justify-content:center;* rect{fill:transparent;}& path{stroke:",(function(e){return e.theme.stigg.palette.primary}),";}"),sl=a(De,{target:"eeyi5d30"})({name:"1kkk1zv",styles:"@keyframes fadeIn{0%{opacity:0;}75%{opacity:0;}100%{opacity:1;}}align-self:center;animation:fadeIn 5s ease-in forwards"});function dl(e){var t=e.checkoutLocalization,n=r.useRef();return r.useEffect((function(){n.current&&n.current.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})}),[]),i.createElement(ul,{className:"stigg-checkout-success-container",ref:n},i.createElement(ae,{options:{animationData:cl,loop:!1,autoplay:!0},width:350,height:"auto",style:{display:"flex",justifyContent:"center"}}),i.createElement(sl,{variant:"h1",color:"primary.main"},t.summary.checkoutSuccessText))}var pl,ml=function(e){return new Promise((function(t){return setTimeout(t,e)}))},gl=function(e){var t=e.width,n=e.height,r=e.children;return e.isLoading?i.createElement(In,{width:void 0===t?50:t,height:void 0===n?16:n}):i.createElement(i.Fragment,null,r)},hl=function(e){var t,n,r,a,o=e.isFetchingSubscriptionPreview,l=e.checkoutLocalization,c=(e.subscriptionPreview||{}).immediateInvoice;if(null==c||null==(t=c.proration)||null==(n=t.netAmount)||!n.amount||(null==c||null==(r=c.proration)||null==(a=r.netAmount)?void 0:a.amount)>=0)return null;var u=Pn({amount:-1*c.proration.netAmount.amount,currency:c.proration.netAmount.currency,minimumFractionDigits:2});return i.createElement(De,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-remaining-credits"},i.createElement(gl,{isLoading:o,width:"100%"},l.summary.creditsForUnusedTimeText({credits:u})))},fl=function(e){var t=e.subscriptionPreview,n=e.activeSubscription,r=e.isFetchingSubscriptionPreview,a=e.checkoutLocalization;if(null==t||!t.hasScheduledUpdates||null==n||!n.currentBillingPeriodEnd)return null;var o="function"==typeof a.summary.changesWillApplyAtEndOfBillingPeriod?a.summary.changesWillApplyAtEndOfBillingPeriod({billingPeriodEnd:n.currentBillingPeriodEnd}):a.summary.changesWillApplyAtEndOfBillingPeriod;return i.createElement(De,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-scheduled-updates"},i.createElement(gl,{isLoading:r,width:"100%"},o))},yl=function(e){var n=e.subscriptionPreview,r=e.activeSubscription,a=e.plan,o=e.isFetchingSubscriptionPreview,l=e.billingPeriod,c=(n||{}).recurringInvoice;if(!n||null==c||!c.total.amount)return null;var u,s,d=n.hasScheduledUpdates?null==r?void 0:r.currentBillingPeriodEnd:null==n?void 0:n.billingPeriodRange.end,p=Pn(de({},c.total,{minimumFractionDigits:2})),m=null==a?void 0:a.pricePoints.some((function(e){return e.pricingModel===t.BillingModel.UsageBased})),h=null==a?void 0:a.pricePoints.some((function(e){return e.pricingModel!==t.BillingModel.UsageBased})),f="We will bill you ",y=p+" ";switch(m&&(h?y+="+":y="for",y+=" applicable usage-based charges for this subscription "),l){case t.BillingPeriod.Monthly:s="month",u="the "+g(d).format("Do");break;case t.BillingPeriod.Annually:s="year",u=g(d).format("MMMM Do")}return i.createElement(De,{variant:"body1",style:{marginTop:14},className:"stigg-checkout-summary-captions-next-billing"},i.createElement(gl,{isLoading:o,width:"100%"},f+=y+"for this subscription every "+s+" on "+u+", unless you cancel."))};function vl(e){return i.createElement(j.Box,{className:"stigg-checkout-summary-captions"},i.createElement(hl,Object.assign({},e)),i.createElement(fl,Object.assign({},e)),i.createElement(yl,Object.assign({},e)))}function bl(e){var n=e.quantity,r=e.totalAmount,i=e.billingPeriod,a=e.currency,o=e.priceAmount,l=e.blockSize||1,c=n&&(e.pricingModel===t.BillingModel.PerUnit||n>1)?Cn(n)+" "+(l>1?"for":"x")+" ":"",u=i===t.BillingPeriod.Annually?" x 12 months":"",s=Pn({amount:(o||r/n)/(i===t.BillingPeriod.Annually?12:1),currency:a,minimumFractionDigits:2}),d=Pn({amount:r,currency:a,minimumFractionDigits:2});return""+c+s+u+" "+(u||c?" = "+d:"")}function xl(e){var t=e.price,n=t.tiers||[],r=pn(n,e.unitQuantity).breakdown;return 1===r.length?null:i.createElement(i.Fragment,null,r.map((function(e,r){var a=e.unitQuantity,o=e.amount;return i.createElement(kl,null,i.createElement(Pl,{key:r,style:{alignItems:"flex-start"}},i.createElement(De,{variant:"body1",color:"tertiary",style:{whiteSpace:"nowrap"}},function(e,t){var n=e[t],r=n.upTo;if(!n.unitPrice)return"";if(0===t)return"First "+r;var i=(e[t-1].upTo||0)+1;return h(r)?Cn(i)+" and above":"Next "+Cn(i)+" to "+Cn(r)}(n,r)),i.createElement(De,{variant:"body1",color:"tertiary",style:{whiteSpace:"nowrap"}},bl({quantity:a,totalAmount:o,currency:t.currency,pricingModel:t.pricingModel,billingPeriod:t.billingPeriod,tiers:t.tiers,tiersMode:t.tiersMode,blockSize:t.blockSize,priceAmount:t.amount}))))})))}var El=L(W.ChevronRight)(pl||(pl=me(["\n height: ",";\n width: ",";\n transition: all 0.2s ease-in;\n ","\n"])),(function(e){var t=e.$size;return(void 0===t?24:t)+"px"}),(function(e){var t=e.$size;return(void 0===t?24:t)+"px"}),(function(e){return e.$isOpen&&"transform: rotate(90deg)"})),kl=a("div",{target:"e1ultpe62"})({name:"x9km8e",styles:"&+&{margin-top:16px;}"}),wl=a("div",{target:"e1ultpe61"})({name:"96yaa5",styles:"margin-top:16px;margin-left:16px"}),Pl=a("div",{target:"e1ultpe60"})("display:flex;flex-direction:column;gap:16px;",Ii.lg,"{flex-direction:row;align-items:center;justify-content:space-between;}"),Cl=function(e){var t=i.createElement(De,{variant:"body1"},e.checkoutLocalization.summary.payAsYouGoTooltipText);return i.createElement(da,{placement:"left",title:t},i.createElement($t,{icon:"PayAsYouGoCharge",style:{display:"flex"}}))},Sl=function(e){var n,a=e.checkoutLocalization,o=e.label,c=e.quantity,u=e.price,s=Fi("lg"),d=r.useState(!1),p=d[0],m=d[1],g=function(){return m((function(e){return!e}))},f=u.pricingModel===t.BillingModel.UsageBased,y=u.isTieredPrice?mn(u,c):(u.amount||0)*Math.ceil(c/(u.blockSize||1));u.tiersMode===t.TiersMode.Graduated&&u.tiers&&!O(u.tiers)&&!h(u.tiers[0].upTo)&&c>u.tiers[0].upTo&&(n=i.createElement(xl,{price:u,unitQuantity:c}));var v=i.createElement(De,{variant:"body1",color:"secondary"},o);return n&&(v=i.createElement(R,{onClick:g,underline:"none",style:{cursor:"pointer"}},v)),i.createElement(kl,{className:"stigg-checkout-summary-base-charges-container"},i.createElement(Pl,{style:{alignItems:"flex-start"}},i.createElement(l,{item:!0,display:"flex",gap:.5,style:{whiteSpace:s?"nowrap":"break-spaces"}},v,n&&i.createElement(j.IconButton,{onClick:g,sx:{padding:0}},i.createElement(El,{$isOpen:p,$size:16}))),i.createElement(l,{item:!0,display:"flex",gap:1,alignItems:"center"},f&&i.createElement(Cl,{checkoutLocalization:a}),i.createElement(De,{variant:"body1",color:"secondary",style:{whiteSpace:s?"nowrap":"break-spaces"}},function(e){var n=e.totalAmount,r=e.quantity,i=e.tiersMode,a=e.tiers,o=e.currency;if(function(e){return null==e?void 0:e.every((function(e){return!e.unitPrice||h(e.upTo)}))}(a)||i===t.TiersMode.Graduated&&!function(e,t){return(null==e?void 0:e[0].upTo)&&t<=e[0].upTo}(a,r)){var l=Pn({amount:n,currency:o,minimumFractionDigits:2});return Cn(r)+" for "+l}return bl(e)}({totalAmount:y,quantity:c,currency:u.currency,pricingModel:u.pricingModel,billingPeriod:u.billingPeriod,tiers:u.tiers,tiersMode:u.tiersMode,blockSize:u.blockSize,priceAmount:u.amount}),f&&" / unit"))),n&&i.createElement(oe,{in:p},i.createElement(wl,null,n)))},Tl=function(e){return i.createElement(kl,null,i.createElement(Pl,{style:{alignItems:"flex-end"}},i.createElement(l,{item:!0},i.createElement(De,{variant:"body1",color:"secondary"},e.label)),i.createElement(l,{item:!0,display:"flex",gap:1,alignItems:"center"},i.createElement(De,{variant:"body1",color:"secondary",style:{wordBreak:"break-word"}},"Free"))))},Ml=function(e){var t=e.subscriptionPreview,n=e.isFetchingSubscriptionPreview,r=t.recurringInvoice||{},a=r.discount,o=r.discountDetails;return a&&o?i.createElement(kl,null,i.createElement(Pl,null,i.createElement(De,{variant:"body1",color:"secondary"},e.checkoutLocalization.summary.discountText({discountDetails:o,currency:t.immediateInvoice.total.currency})),i.createElement(De,{variant:"body1",color:"secondary"},n?i.createElement(In,{width:50,height:16}):Pn({amount:a.amount,currency:a.currency,minimumFractionDigits:2})))):null},Al=function(e){var t=e.isFetchingSubscriptionPreview,n=((e.subscriptionPreview||{}).immediateInvoice||{}).credits;return!n||!n.used||n.used.amount<=0?null:i.createElement(kl,null,i.createElement(Pl,null,i.createElement(De,{variant:"body1",color:"secondary"},e.checkoutLocalization.summary.appliedCreditsTitle),i.createElement(De,{variant:"body1",color:"secondary"},i.createElement(gl,{isLoading:t},Pn({amount:-1*n.used.amount,currency:n.used.currency,minimumFractionDigits:2})))))},Bl=function(e){var t=e.tax,n=e.taxDetails,r=e.isFetchingSubscriptionPreview;return!n||!t||(null==t?void 0:t.amount)<=0?null:i.createElement(kl,null,i.createElement(Pl,null,i.createElement(De,{variant:"body1",color:"secondary"},e.checkoutLocalization.summary.taxTitle({taxDetails:n})),i.createElement(De,{variant:"body1",color:"secondary"},i.createElement(gl,{isLoading:r},Pn({amount:null==t?void 0:t.amount,currency:null==t?void 0:t.currency,minimumFractionDigits:2})))))},Ll=a(I,{target:"e9ji7bp4"})({name:"1w9aiz5",styles:"width:100%;max-width:470px;flex:1.5"}),Nl=a(re,{target:"e9ji7bp3"})("background:",(function(e){return e.theme.stigg.palette.backgroundHighlight}),";padding:16px;",Ii.md,"{border-radius:10px;}");Nl.defaultProps={elevation:0};var Ul,Il,Fl,Ol,Dl,jl=a(De,{target:"e9ji7bp2"})({name:"1jcocwa",styles:"margin-bottom:16px;font-weight:500"}),Wl=a(k,{target:"e9ji7bp1"})({name:"1k6141t",styles:"margin:16px 0"}),Rl=a(De,{target:"e9ji7bp0"})({name:"5bhc30",styles:"margin-bottom:8px"}),ql=function(e){var n,a,o,c,u,s=e.onCheckout,d=e.onCheckoutCompleted,p=e.disablePromotionCode,m=e.disableSuccessAnimation,g=e.isFreeDowngrade,h=e.onMockCheckoutPreview,f=e.isWidgetWatermarkEnabled,y=r.useState(!1),v=y[0],b=y[1],x=Co().setErrorMessage,E=vo(),k=bo(),w=ro(),P=w.checkoutLocalization,C=w.checkoutState||{},S=C.plan,T=C.activeSubscription,M=Wo((null==S||null==(n=S.pricePoints)?void 0:n.filter((function(e){return e.billingPeriod===k.billingPeriod})))||[]),A=te(M,(function(e){return e.pricingModel===t.BillingModel.FlatFee})),B=A[1],L=(A[0]||[])[0],N=g||E.isCheckoutComplete&&E.isLastStep,U=function(e){var t=(void 0===e?{}:e).onMockCheckoutPreview,n=r.useState(null),i=n[0],a=n[1],o=r.useState(!1),l=o[0],c=o[1],u=ko({onMockCheckoutPreview:t}).previewSubscriptionAction;return r.useEffect((function(){var e=function(){var e=se(Fr.mark((function e(){var t;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u();case 2:(t=e.sent.subscriptionPreview)&&a(t),c(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();c(!0);var t=setTimeout((function(){c(!0),e()}),500);return function(){clearTimeout(t)}}),[u]),{subscriptionPreview:i,isFetchingSubscriptionPreview:l}}({onMockCheckoutPreview:h}),I=U.subscriptionPreview,F=U.isFetchingSubscriptionPreview,O=function(e){var t=e.isMocked,n=void 0!==t&&t,r=e.onCheckout,i=e.onCheckoutCompleted,a=e.onSuccess,o=e.disableSuccessAnimation,l=Vr().stigg,c=Co().useNewPaymentMethod,u=function(){var e=bo(),t=To()[0].resourceId,n=(ro().checkoutState||{}).plan,r=e.addons.map((function(e){return{addonId:e.addon.id,quantity:e.quantity}}));if(null!=n&&n.id)return{resourceId:t,planId:n.id,billingPeriod:e.billingPeriod,billableFeatures:e.billableFeatures,addons:r,promotionCode:e.promotionCode,billingCountryCode:e.billingCountryCode}}(),s=ro(),d=s.widgetState,p=s.setWidgetReadOnly,m=s.checkoutState||{},g=m.setupSecret,h=m.customer,f=J.useStripe(),y=J.useElements();return{handleSubmit:function(){var e=se(Fr.mark((function e(t){var s,d,m,v,b,x,E,k,w,P,C;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),u){e.next=3;break}return e.abrupt("return",{success:!1,errorMessage:"Unexpected error, please contact support."});case 3:if(s=!0,m=!1,p(!0),n||!c){e.next=11;break}return e.next=9,ol({elements:y,stripe:f,setupIntentClientSecret:g});case 9:(b=e.sent).success?v=b.paymentMethodId:(d=b.errorMessage,s=!1);case 11:if(x=de({},u,{paymentMethodId:v}),E=function(){var e=se(Fr.mark((function e(t){var n,r;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m=!0,e.prev=1,e.next=4,l.applySubscription(t);case 4:return n=e.sent,e.next=7,nl({applySubscriptionResults:n,stripe:f});case 7:return e.abrupt("return",{success:!(r=e.sent).errorMessage,errorMessage:r.errorMessage,results:n});case 11:return e.prev=11,e.t0=e.catch(1),console.error(e.t0),e.abrupt("return",{success:!1,errorMessage:d=null==e.t0?void 0:e.t0.message});case 16:case"end":return e.stop()}}),e,null,[[1,11]])})));return function(t){return e.apply(this,arguments)}}(),!s){e.next=34;break}if(!r){e.next=28;break}return e.next=17,r({customerId:h.id,checkoutParams:x,checkoutAction:E});case 17:if((w=e.sent).errorMessage&&(d=w.errorMessage),m||!w.results||!w.success){e.next=24;break}return e.next=22,nl({applySubscriptionResults:w.results,stripe:f});case 22:(P=e.sent).errorMessage&&(d=P.errorMessage,s=!1);case 24:s=s&&w.success&&!d,k=w.results,e.next=34;break;case 28:return e.next=30,E(x);case 30:!(C=e.sent).success&&C.errorMessage&&(d=C.errorMessage),s=C.success&&!d,k=C.results;case 34:if(p(!1),!s||!a){e.next=40;break}if(a(),o){e.next=40;break}return e.next=40,ml(5e3);case 40:return e.next=42,i({success:s,error:d});case 42:return e.abrupt("return",{results:k,success:!d,errorMessage:d});case 43:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),isLoading:!(null==d||!d.readOnly)}}({isMocked:!!h,disableSuccessAnimation:m,onCheckout:s,onCheckoutCompleted:d,onSuccess:function(){b(!0),E.markStepAsCompleted(E.progressBarState.activeStep)}}),D=O.handleSubmit,j=O.isLoading,W=function(){var e=se(Fr.mark((function e(t){var n;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!v){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,D(t);case 4:if(e.t0=e.sent,e.t0){e.next=7;break}e.t0={};case 7:(n=e.t0.errorMessage)?(x(n),b(!1)):x(void 0);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),R=function(){var e=se(Fr.mark((function e(t){return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!j){e.next=2;break}return e.abrupt("return");case 2:if(!N){e.next=7;break}return e.next=5,W(t);case 5:e.next=8;break;case 7:E.goNext();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),q=I||{},_=q.immediateInvoice,z=q.recurringInvoice,H=!(!I||(null==_||!_.proration)&&!I.hasScheduledUpdates),V=!p&&!g,$=!(null==z||!z.discountDetails||g),Z=V||$,G=B.some((function(e){return e.pricingModel===t.BillingModel.UsageBased})),Y=G&&!L&&B.every((function(e){return e.pricingModel===t.BillingModel.UsageBased})),Q="function"==typeof P.summary.baseChargeText?P.summary.baseChargeText({billingPeriod:k.billingPeriod}):P.summary.baseChargeText;return i.createElement(Ll,null,i.createElement(Nl,null,i.createElement(jl,{variant:"h3"},P.summary.title),i.createElement(l,{className:"stigg-checkout-summary-plan-title-container",display:"flex",flexDirection:"row",alignItems:"center",marginY:2},i.createElement(De,{variant:"h6",color:"primary",style:{paddingRight:"8px"}},P.summary.planName({plan:S})),i.createElement(Wl,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})),L&&i.createElement(Sl,{checkoutLocalization:P,label:Q,quantity:1,price:L}),!L&&g?i.createElement(Tl,{label:Q}):null,i.createElement(l,{item:!0,className:"stigg-checkout-summary-usage-charges-container"},B.map((function(e){var t,n,r,a,o,l=null==(t=k.billableFeatures)?void 0:t.find((function(t){var n;return t.featureId===(null==(n=e.feature)?void 0:n.featureId)}));return i.createElement(Sl,{checkoutLocalization:P,key:null==(n=e.feature)?void 0:n.featureId,label:za((null==(r=e.feature)?void 0:r.displayName)||"",null==(a=e.feature)?void 0:a.units,null==(o=e.feature)?void 0:o.unitsPlural),quantity:(null==l?void 0:l.quantity)||1,price:e})}))),!(null==(a=k.addons)||!a.length)&&i.createElement(i.Fragment,null,i.createElement(l,{display:"flex",flexDirection:"row",alignItems:"center",marginY:2},i.createElement(De,{variant:"h6",color:"primary",style:{paddingRight:"8px"}},P.summary.addonsSectionTitle),i.createElement(Wl,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})),k.addons.map((function(e){var t,n,r=null==(t=e.addon.pricePoints)?void 0:t.find((function(e){return e.billingPeriod===k.billingPeriod}));return r?i.createElement(Sl,{checkoutLocalization:P,key:null==e||null==(n=e.addon)?void 0:n.id,label:e.addon.displayName,quantity:e.quantity&&e.quantity>0?e.quantity:1,price:r}):null}))),!Z&&i.createElement(Wl,{className:"stigg-checkout-summary-divider"}),Z&&i.createElement(l,{display:"flex",flexDirection:"row",alignItems:"center",marginY:2},i.createElement(De,{variant:"h6",color:"primary",style:{paddingRight:"8px"}},P.summary.discountsSectionTitle),i.createElement(Wl,{className:"stigg-checkout-summary-divider",sx:{flex:1,margin:"0 !important"}})),V&&i.createElement(Qo,{disabled:j||F,checkoutLocalization:P,onMockCheckoutPreview:h}),$&&i.createElement(Ml,{subscriptionPreview:I,isFetchingSubscriptionPreview:F,checkoutLocalization:P}),Z&&i.createElement(Wl,{className:"stigg-checkout-summary-divider"}),i.createElement(Bl,{tax:null==z?void 0:z.tax,taxDetails:null==z?void 0:z.taxDetails,isFetchingSubscriptionPreview:F,checkoutLocalization:P}),g?null:i.createElement(i.Fragment,null,i.createElement(Pl,{style:{marginTop:16}},i.createElement(l,{display:"flex",flexDirection:"column",container:!0},i.createElement(l,{item:!0,display:"flex",justifyContent:"space-between"},i.createElement(De,{variant:"h6"},P.summary.totalText),i.createElement(De,{variant:"h6"},i.createElement(gl,{isLoading:F},Y?P.summary.onlyPayAsYouGoText:null,!Y&&G?P.summary.startsAtText:null,Y?null:Pn(de({amount:0},null==z?void 0:z.total,{minimumFractionDigits:2}))))),i.createElement(l,{item:!0},i.createElement(De,{variant:"body1",color:"secondary"},P.summary.totalBillingPeriodText({billingPeriod:k.billingPeriod}))))),i.createElement(Wl,{className:"stigg-checkout-summary-divider"})),null!=_&&null!=(o=_.proration)&&o.hasProrations&&null!=_&&_.subTotal&&(null==_?void 0:_.subTotal.amount)>0?i.createElement(kl,null,i.createElement(Pl,null,i.createElement(De,{variant:"body1",color:"secondary"},P.summary.proratedTotalDueText),i.createElement(De,{variant:"body1",color:"secondary"},i.createElement(gl,{isLoading:F},Pn({amount:(null==_||null==(c=_.subTotal)?void 0:c.amount)+((null==_||null==(u=_.tax)?void 0:u.amount)||0),currency:null==_?void 0:_.subTotal.currency,minimumFractionDigits:2}))))):null,i.createElement(Al,{subscriptionPreview:I,isFetchingSubscriptionPreview:F,checkoutLocalization:P}),i.createElement(kl,null,i.createElement(Pl,null,i.createElement(Rl,{variant:"h6"},P.summary.totalDueText),i.createElement(Rl,{variant:"h6"},i.createElement(gl,{isLoading:F},Pn(de({amount:0},null==_?void 0:_.total,{minimumFractionDigits:2})))))),i.createElement(vl,{plan:S,activeSubscription:T,subscriptionPreview:I,isFetchingSubscriptionPreview:F,checkoutLocalization:P,billingPeriod:k.billingPeriod}),i.createElement(An,{$success:v,$error:N&&g,disabled:j||F||E.progressBarState.isDisabled||N&&!H,className:"stigg-checkout-summary-cta-button",sx:{textTransform:"none",borderRadius:"10px",marginTop:"24px",height:"36px"},variant:"contained",size:"medium",onClick:function(e){R(e)},fullWidth:!0},i.createElement(De,{className:"stigg-checkout-summary-cta-button-text",variant:"h3",color:"white",style:{display:"flex"}},v?i.createElement($t,{icon:"Check",style:{display:"contents"}}):j||F?i.createElement(ne,{size:20,sx:{color:"white"}}):function(e){var t=e.checkoutLocalization;return e.isLastStep?e.checkoutHasChanges?e.isPlanUpdate?t.checkoutButton.updateText:e.isFreeDowngrade?t.checkoutButton.downgradeToFreeText:t.checkoutButton.upgradeText:t.checkoutButton.noChangesText:t.checkoutButton.nextText}({isLastStep:N,checkoutHasChanges:H,isFreeDowngrade:g,checkoutLocalization:P,isPlanUpdate:!!T&&(null==T?void 0:T.plan.id)===(null==S?void 0:S.id)})))),i.createElement(Tr,{source:"checkout",showWatermark:f,style:{marginTop:8,display:"flex",justifyContent:"center"}}),!m&&v&&i.createElement(dl,{checkoutLocalization:P}))},_l=function(e){var t=e.isWidgetWatermarkEnabled;return i.createElement(Ll,null,i.createElement(Nl,null,i.createElement(Ln,{$flexDirection:"column",$gap:24},i.createElement(In,{width:120,height:20}),i.createElement(In,{width:120,height:20}),i.createElement(In,{width:120,height:20}),i.createElement(In,{width:120,height:20})),i.createElement(Ln,{$flexDirection:"column",$gap:24,marginTop:5},i.createElement(In,{height:20}),i.createElement(In,{height:20}),i.createElement(In,{height:20})),i.createElement(Un,{flex:1,marginTop:5},i.createElement(In,{height:34}))),i.createElement(Tr,{source:"checkout",showWatermark:t,style:{marginTop:8,display:"flex",justifyContent:"center"}}))},zl=a(l,{target:"e1o28dc92"})({name:"1wte80x",styles:"width:100%;gap:8px"}),Hl=a(l,{target:"e1o28dc91"})("display:flex;flex-direction:column;gap:16px;",Ii.md,"{gap:0;flex-direction:row;justify-content:space-between;height:80px;align-items:center;}"),Vl=a(An,{target:"e1o28dc90"})({name:"156064h",styles:"min-width:unset;width:41px;height:41px;padding:0"});function $l(e){var n,r=e.addon,a=e.billingPeriod,o=e.addonState,c=e.initialAddonState,u=e.setAddon,s=e.removeAddon,d=e.checkoutLocalization,p=e.onAddonsValidationChange,m=e.isValid,g=Fi("lg"),h=r.pricePoints.find((function(e){return e.billingPeriod===a})),f=!!o,y=!!o&&!!c&&o.quantity!==c.quantity||!!c&&!o,v=function(e){if(!e||e<=0)return p({addonId:r.id,isValid:!1}),void u(r,null!=e?e:null);p({addonId:r.id,isValid:!0}),u(r,e)};return i.createElement(Hl,{container:!0},i.createElement(l,{item:!0},i.createElement(De,{variant:"h6",lineHeight:"24px"},r.displayName),!!h&&i.createElement(De,{variant:"body1",lineHeight:"20px",color:"secondary"},Pn({amount:h.amount,currency:h.currency,minimumFractionDigits:2})+"/"+(a===t.BillingPeriod.Annually?"year":"month"))),i.createElement(l,{item:!0,sx:{gap:"16px"},container:!g},y&&i.createElement(An,{variant:"text",size:"small",sx:{padding:"8px",minWidth:"unset"},onClick:function(){c?u(r,c.quantity):s(r.id),p({addonId:r.id,isValid:!0})}},i.createElement(De,{color:"primary.main",variant:"body1"},"Undo")),f&&i.createElement(i.Fragment,null,i.createElement(Bn,{id:r.id+"-input",type:"number",onWheel:Dn,sx:g?{marginX:2,width:120}:{flex:1},value:null!=(n=null==o?void 0:o.quantity)?n:"",error:!m,helperText:m?void 0:"Minimum 1",FormHelperTextProps:{sx:{margin:"4px"}},onChange:function(e){var t,n;return v(null!=e&&null!=(t=e.target)&&t.value?Number(null==e||null==(n=e.target)?void 0:n.value):null)}}),i.createElement(Vl,{color:"error",onClick:function(){s(r.id),p({addonId:r.id,isValid:!0})}},i.createElement($t,{icon:"Trash",style:{display:"flex"}}))),!f&&i.createElement(An,{sx:{paddingX:"22px",paddingY:"8px"},onClick:function(){return v(1)}},i.createElement(De,{color:"primary.main",variant:"body1"},d.addAddonText))))}function Zl(){var e,t=ro(),n=t.checkoutLocalization,a=t.setIsValid,o=po().billingPeriod,l=vo().setIsDisabled,c=de({},To()[0].addonsStep,{setAddon:(e=To()[1],function(t,n){return e((function(e){var r=e.addonsStep.addons.find((function(e){return e.addon.id===t.id}));r?r.quantity=n:(e.addonsStep.addons.push({addon:t,quantity:n}),e.addonsStep.addons=Xa(e.addonsStep.addons))}))}),removeAddon:to()}),u=c.initialAddons,s=c.addons,d=c.availableAddons,p=c.setAddon,m=c.removeAddon,g=r.useState((null==d?void 0:d.reduce((function(e,t){return e[t.id]=!0,e}),{}))||{}),h=g[0],f=g[1];return r.useEffect((function(){var e=Object.values(h).some((function(e){return!e}));l(e),a(!e)}),[h,l,a]),i.createElement(zl,{container:!0},null==d?void 0:d.map((function(e){var t=s.find((function(t){return t.addon.id===e.id})),r=null==u?void 0:u.find((function(t){return t.addon.id===e.id}));return i.createElement($l,{key:e.id,addon:e,billingPeriod:o,addonState:t,initialAddonState:r,setAddon:p,removeAddon:m,checkoutLocalization:n,onAddonsValidationChange:function(e){var t;return f(de({},h,((t={})[e.addonId]=e.isValid,t)))},isValid:h[e.id]})})))}var Gl,Yl=x(l,{shouldForwardProp:function(e){return!e.startsWith("$")}})(Ul||(Ul=me(["\n padding: 8px;\n border-radius: 10px;\n border: 1px solid ",";\n cursor: ",";\n opacity: ",";\n"])),(function(e){return e.theme.stigg.palette.outlinedBorder}),(function(e){return e.$disabled?"not-allowed":"pointer"}),(function(e){return e.$disabled?.6:1})),Ql=x(Yl)(Il||(Il=me(["\n flex-direction: column;\n align-items: unset;\n ","\n"])),(function(e){return e.$hideBorders&&u.css(Fl||(Fl=me(["\n border: none;\n padding: 0;\n "])))})),Kl=x(l)(Ol||(Ol=me(["\n display: flex;\n align-items: center;\n flex: 1;\n gap: 12px;\n"]))),Xl=x(l)(Dl||(Dl=me(["\n display: flex;\n flex-direction: column;\n"])));function Jl(e){var t=e.text,n=e.subtitle;return i.createElement(Kl,null,i.createElement(ce,{checked:e.checked,disabled:e.readOnly}),i.createElement(Xl,{container:!0},i.createElement(l,{item:!0},t),n&&i.createElement(l,{item:!0},n)))}function ec(e){var t=e.paymentMethodDetails,n=e.readOnly;if(!t)return null;var r=t.expirationMonth,a=t.expirationYear;return i.createElement(Yl,{item:!0,onClick:e.onSelect,$disabled:n},i.createElement(Jl,{checked:e.checked,readOnly:n,text:i.createElement(De,{variant:"h6"},"Card ending in "+t.last4Digits),subtitle:!!r&&!!a&&i.createElement(De,{variant:"body1"},"Expires "+r.toString().padStart(2,"0")+"/"+a)}))}function tc(e){var t=e.hasExistingPaymentMethod,n=e.checked,r=e.readOnly,a=e.onBillingAddressChange,o=e.collectPhoneNumber;return i.createElement(Ql,{item:!0,$hideBorders:!t,onClick:e.onSelect,$disabled:r},t&&i.createElement(Jl,{checked:n,readOnly:r,text:i.createElement(De,{variant:"h6"},e.checkoutLocalization.newPaymentMethodText)}),i.createElement(oe,{in:n},i.createElement(Xo,{onBillingAddressChange:a,collectPhoneNumber:o})))}var nc=x(l)(Gl||(Gl=me(["\n display: flex;\n flex-direction: column;\n gap: 24px;\n"])));function rc(e){var t=e.onBillingAddressChange,n=e.collectPhoneNumber,r=ro(),a=r.checkoutLocalization,o=r.widgetState,l=(r.checkoutState||{}).customer,c=Co(),u=c.errorMessage,s=c.useNewPaymentMethod,d=c.setUseNewPaymentMethod,p=o.readOnly,m=function(e){p||d(e)};return i.createElement(nc,{container:!0},!!u&&i.createElement(le,{severity:"error",sx:{alignItems:"center"}},i.createElement(De,{overrideColor:"inherit"},u)),i.createElement(ec,{readOnly:p,checked:!s,paymentMethodDetails:null==l?void 0:l.paymentMethodDetails,onSelect:function(){return m(!1)}}),i.createElement(tc,{hasExistingPaymentMethod:!(null==l||!l.paymentMethodDetails),readOnly:p,checked:s,checkoutLocalization:a,onSelect:function(){return m(!0)},onBillingAddressChange:t,collectPhoneNumber:n}))}var ic=function(e){return i.createElement(b,{className:"stigg-checkout-change-plan-button",sx:{textTransform:"none"},variant:"text",size:e.size,onClick:e.onClick},i.createElement(De,{className:"stigg-checkout-change-plan-button-text",color:"primary.main",variant:"h3",style:{lineHeight:"24px"}},e.checkoutLocalization.changePlan))};function ac(e){var t=e.allowChangePlan,n=void 0!==t&&t,r=e.onChangePlan,a=ro(),o=a.checkoutLocalization,l=(a.checkoutState||{}).plan;return i.createElement(i.Fragment,null,i.createElement(I,{sx:{marginBottom:"16px"}},i.createElement(De,{variant:"body1",color:"disabled",style:{opacity:.6,marginBottom:"8px"}},"Selected plan"),i.createElement(I,{sx:{display:"flex",justifyContent:"space-between"}},i.createElement(De,{variant:"h1"},null==l?void 0:l.displayName),n&&r&&i.createElement(ic,{onClick:function(){r({currentPlan:l})},checkoutLocalization:o,size:"medium"}))),i.createElement(k,{className:"stigg-checkout-plan-header-divider"}))}function oc(e){switch(e){case t.BillingPeriod.Annually:return"Annual";case t.BillingPeriod.Monthly:return"Monthly";default:return""}}var lc,cc=a(I,{target:"ekae5v44"})({name:"1k6141t",styles:"margin:16px 0"}),uc=a("button",{target:"ekae5v43"})("cursor:",(function(e){return e.$disabled||e.$isOnlyBillingPeriod?"default":"pointer"}),";flex:1;display:flex;align-items:center;justify-content:flex-start;padding:2px 8px;border-radius:10px;border:",(function(e){var t=e.theme,n=t.stigg.palette.outlinedBorder;return e.$isOnlyBillingPeriod?n="transparent":e.$isActive&&(n=t.stigg.palette.outlinedRestingBorder),"1px solid "+n}),";background:",(function(e){return e.$isOnlyBillingPeriod?"transparent":e.$isActive?p(e.theme.stigg.palette.primary).alpha(.15).toString():"transparent"}),";text-transform:none;text-align:start;height:36px;&.MuiButton-root{padding:0 16px 0 8px;&:hover{background:none;}}"),sc=a(I,{target:"ekae5v42"})({name:"1neb8ay",styles:"display:flex;gap:16px;margin-top:16px"}),dc=function(e){var t=e.billingPeriod,n=e.isOnlyBillingPeriod,r=po(),a=r.setBillingPeriod,o=r.billingPeriod===t;return i.createElement(uc,{onClick:function(){return a(t)},$isActive:o,$isOnlyBillingPeriod:n},i.createElement(ce,{checked:o,onChange:function(){return a(t)},value:t,disabled:n,inputProps:{"aria-label":oc(t)},sx:{padding:0,marginRight:"8px"}}),i.createElement(I,null,i.createElement(De,{variant:"h3",color:"primary"},oc(t))))};function pc(e){var n=e.plan,r=e.checkoutLocalization,a=s.partition(null==n?void 0:n.pricePoints,(function(e){return e.billingPeriod===t.BillingPeriod.Monthly})),o=a[0],l=a[1],u=!(null==o||!o.length||null==l||!l.length);return u?i.createElement(cc,null,i.createElement(De,{variant:"h6",color:"primary",fontWeight:c.FontWeight.Medium},r.billingPeriodsTitle),i.createElement(sc,null,!(null==o||!o.length)&&i.createElement(dc,{key:t.BillingPeriod.Monthly,billingPeriod:t.BillingPeriod.Monthly,isOnlyBillingPeriod:!u}),!(null==l||!l.length)&&i.createElement(dc,{key:t.BillingPeriod.Annually,billingPeriod:t.BillingPeriod.Annually,isOnlyBillingPeriod:!u}))):null}var mc=x.div(lc||(lc=me(["\n display: flex;\n min-height: 60px;\n margin-top: 16px;\n flex-direction: column;\n\n "," {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n }\n"])),Ii.md),gc=function(e,t){var n=e.minUnitQuantity,r=e.maxUnitQuantity;return!t||t<(n||1)?"Minimum "+(n||1):r&&t>r?"Maximum "+r:""};function hc(e){var n,r,a,o,l,c,u=e.charge,s=e.isValid,d=e.setBillableFeature,p=e.billableFeature,m=e.onValidationChange,g=Fi("md"),h=null==(n=u.feature)?void 0:n.featureId,f=!h,y=u.pricingModel===t.BillingModel.UsageBased,v=f?"Base charge":za((null==(r=u.feature)?void 0:r.displayName)||"",null==(a=u.feature)?void 0:a.units,null==(o=u.feature)?void 0:o.unitsPlural),b=!!(null!=u&&u.minUnitQuantity||null!=u&&u.maxUnitQuantity);if(f||y)c=""+Pn({amount:u.amount,currency:u.currency,locale:"en-us",minimumFractionDigits:2}),y&&(c+=" / unit");else if(u.isTieredPrice&&u.tiersMode&&h)c=i.createElement(zn,{componentId:h+"-tiers",tiers:u.tiers,tiersMode:u.tiersMode,value:(null==p?void 0:p.quantity)||1,handleChange:function(e){d(h,e)},width:120});else{var x;c=i.createElement(Bn,{sx:{width:g?120:"100%"},id:h+"-input",type:"number",onWheel:Dn,error:!s,helperText:s?void 0:gc(u,null==p?void 0:p.quantity),FormHelperTextProps:{sx:{margin:"4px"}},value:null!=(x=null==p?void 0:p.quantity)?x:"",onChange:function(e){var t,n;if(!f&&h){var r=u.minUnitQuantity,i=u.maxUnitQuantity,a=null!=e&&null!=(t=e.target)&&t.value?Number(null==e||null==(n=e.target)?void 0:n.value):null;if(!a||a<=0||r&&a<r||i&&a>i)return m({featureId:h,isValid:!1}),void d(h,null!=a?a:null);m({featureId:h,isValid:!0});var o=ao(u,a);d(h,o)}}})}return i.createElement(mc,null,i.createElement(I,{display:"flex",flexDirection:"column"},i.createElement(De,{variant:"h6",color:"primary",lineHeight:"24px"},v),b&&i.createElement(De,{variant:"body1",color:"secondary",lineHeight:"20px"},fe(u.minUnitQuantity,u.maxUnitQuantity,null==(l=u.feature)?void 0:l.unitsPlural))),i.createElement(De,{variant:"h6",color:"primary"},c))}function fc(e){var t,n=e.plan,a=e.billingPeriod,o=po(),l=o.billableFeatures,c=o.setBillableFeature,u=vo().setIsDisabled,s=ro().setIsValid,d=Wo((null==n||null==(t=n.pricePoints)?void 0:t.filter((function(e){return e.billingPeriod===a})))||[]),p=r.useState(null==d?void 0:d.reduce((function(e,t){var n;return e[(null==(n=t.feature)?void 0:n.featureId)||"base-charge"]=!0,e}),{})),m=p[0],g=p[1];return r.useEffect((function(){var e=Object.values(m).some((function(e){return!e}));u(e),s(!e)}),[m,u,s]),i.createElement(i.Fragment,null,null==d?void 0:d.map((function(e){var t,n,r=l.find((function(t){var n;return t.featureId===(null==(n=e.feature)?void 0:n.featureId)}));return i.createElement(hc,{key:(null==(t=e.feature)?void 0:t.featureId)||"base-charge",charge:e,setBillableFeature:c,billableFeature:r,isValid:m[(null==(n=e.feature)?void 0:n.featureId)||"base-charge"],onValidationChange:function(e){var t=e.featureId,n=e.isValid;return g((function(e){var r;return de({},e,((r={})[t]=n,r))}))}})})))}var yc,vc=a(I,{target:"emtnukp0"})({name:"1d3w5wq",styles:"width:100%"}),bc=function(e){var t=e.onChangePlan,n=ro(),r=n.checkoutLocalization,a=(n.checkoutState||{}).plan,o=po().billingPeriod;return i.createElement(i.Fragment,null,i.createElement(ac,{allowChangePlan:!0,onChangePlan:t}),i.createElement(vc,null,i.createElement(pc,{plan:a,checkoutLocalization:r}),i.createElement(fc,{plan:a,billingPeriod:o})))};function xc(){return(xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ec=a((function(e){return r.createElement("svg",xc({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),yc||(yc=r.createElement("g",{stroke:"#7586B0",strokeWidth:1.333,strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("path",{d:"M2.667 8h10.667M9.333 4l4 4-4 4"}))))}),{target:"e8986nu0"})("path{stroke:",(function(e){return e.theme.stigg.palette.text.secondary}),";}"),kc=a(I,{target:"eaawmuo2"})({name:"zjik7",styles:"display:flex"}),wc=a(le,{target:"eaawmuo1"})({name:"18uqayh",styles:"margin-bottom:16px"}),Pc=a(I,{target:"eaawmuo0"})("padding:16px;border-radius:10px;width:100%;border:",(function(e){return"1px solid "+e.theme.stigg.palette.outlinedBorder}),";"),Cc=function(e){var t=e.planName,n=e.priceText;return i.createElement(Pc,{className:"stigg-checkout-downgrade-to-free-container"},i.createElement(De,{className:"stigg-checkout-downgrade-to-free-text-header",style:{opacity:.8},variant:"caption",color:"disabled"},e.headerText),i.createElement(De,{className:"stigg-checkout-downgrade-to-free-plan-name",bold:!0,variant:"h3",color:"primary"},t),i.createElement(De,{className:"stigg-checkout-downgrade-to-free-price-text",color:"secondary"},n))},Sc=function(e){var t,n=e.checkoutLocalization,r=e.activeSubscription,a=e.freePlan,o=e.allowChangePlan,l=e.onChangePlan;void 0!==o&&o&&l&&(t=i.createElement(ic,{onClick:function(){l({currentPlan:a})},checkoutLocalization:n,size:"small"}));var c=r.prices.length>0?r.prices[0].billingPeriod:void 0;return i.createElement(i.Fragment,null,i.createElement(wc,{action:t,className:"stigg-checkout-downgrade-to-free-alert",severity:"info"},i.createElement(De,{span:!0,color:"secondary"},n.downgradeToFree.alertText({plan:r.plan}))),i.createElement(kc,{className:"stigg-checkout-downgrade-to-free-plans-container"},i.createElement(Cc,{headerText:n.downgradeToFree.paidPlanHeader({plan:r.plan}),planName:n.downgradeToFree.paidPlanName({plan:r.plan}),priceText:n.downgradeToFree.paidPlanPriceText({plan:r.plan,billingPeriod:c})}),i.createElement(Ec,{className:"stigg-checkout-downgrade-to-free-arrow",style:{margin:"auto 16px",minWidth:"16px"}}),i.createElement(Cc,{headerText:n.downgradeToFree.freePlanHeader({plan:a}),planName:n.downgradeToFree.freePlanName({plan:a}),priceText:n.downgradeToFree.freePlanPriceText({plan:a})})))};function Tc(e){var n=e.onCheckout,a=e.onCheckoutCompleted,o=e.onChangePlan,l=e.onBillingAddressChange,c=e.collectPhoneNumber,u=e.disablePromotionCode,s=e.disableSuccessAnimation,d=e.onMockCheckoutPreview,p=function(){var e=r.useState(null),n=e[0],i=e[1],a=ro().checkoutState||{},o=a.billingIntegration,l=a.setupSecret;return r.useEffect((function(){if(o){var e=o.credentials;if(o.billingIdentifier!==t.BillingVendorIdentifier.Stripe)return void console.error("Currently only stripe integration is supported");i(ie.loadStripe(e.publicKey,{stripeAccount:e.accountId}))}}),[o]),{stripePromise:n,setupIntentClientSecret:l}}(),m=p.stripePromise,g=p.setupIntentClientSecret,h=To()[0],f=h.stiggTheme,y=h.widgetState,v=h.theme,b=h.isWidgetWatermarkEnabled,x=vo().currentStep,E=y.isLoadingCheckoutData,k=ro(),w=k.checkoutLocalization,P=k.checkoutState||{},C=P.plan,S=P.activeSubscription,T=!!C&&C.pricingType===t.PricingType.Free&&!!S&&S.pricingType!==t.PricingType.Free,M=function(e,t){var n=t.onBillingAddressChange,r=t.onChangePlan,a=t.collectPhoneNumber;switch(e.key){case io.PLAN:return{content:i.createElement(bc,{onChangePlan:r})};case io.ADDONS:return{content:i.createElement(Zl,null)};case io.PAYMENT:return{content:i.createElement(rc,{onBillingAddressChange:n,collectPhoneNumber:a})};default:return{content:null}}}(x,{onBillingAddressChange:l,onChangePlan:o,collectPhoneNumber:c}).content,A=i.createElement(i.Fragment,null,T?i.createElement(Sc,{freePlan:C,activeSubscription:S,allowChangePlan:!0,checkoutLocalization:w,onChangePlan:o}):i.createElement(i.Fragment,null,M)),B=r.useMemo((function(){return g?{clientSecret:g}:{mode:"setup",currency:"usd"}}),[g]);return i.createElement(J.Elements,{key:g,stripe:m,options:de({},B,{appearance:{theme:"stripe",variables:{colorText:f.palette.text.primary,colorPrimaryText:f.palette.text.primary,colorTextPlaceholder:f.palette.text.disabled,fontFamily:f.typography.fontFamily,colorBackground:null==v?void 0:v.paymentInputBackgroundColor,borderRadius:null==v?void 0:v.paymentInputBorderRadius},rules:null!=v&&v.paymentInputBorderColor?{".Input":{borderColor:null==v?void 0:v.paymentInputBorderColor}}:void 0}})},i.createElement(Lo,{className:"stigg-checkout-layout"},!T&&i.createElement(Do,null),i.createElement(No,null,i.createElement(Uo,null,E?i.createElement(On,null):A),E?i.createElement(_l,{isWidgetWatermarkEnabled:b}):i.createElement(ql,{disablePromotionCode:u,disableSuccessAnimation:s,onCheckout:n,onCheckoutCompleted:a,isFreeDowngrade:T,onMockCheckoutPreview:d,isWidgetWatermarkEnabled:b}))))}var Mc,Ac=["textOverrides","theme","resourceId","planId","preferredBillingPeriod","billingCountryCode","billableFeatures","billingInformation","onMockCheckoutState","skipCheckoutSteps"];function Bc(e){var n,r=Vr({optional:!0}),i=null==r?void 0:r.stigg;return i?i.getBooleanEntitlement(e):de({},t.BOOLEAN_DEFAULT_FALLBACK_ENTITLEMENT,null==(n=e.options)?void 0:n.fallback)}function Lc(e){var n,r=Vr({optional:!0}),i=null==r?void 0:r.stigg;return i?i.getNumericEntitlement(e):de({},t.NUMERIC_DEFAULT_FALLBACK_ENTITLEMENT,null==(n=e.options)?void 0:n.fallback)}function Nc(e){var n,r=Vr({optional:!0}),i=null==r?void 0:r.stigg;return i?i.getMeteredEntitlement(e):de({},t.METERED_DEFAULT_FALLBACK_ENTITLEMENT,null==(n=e.options)?void 0:n.fallback)}function Uc(e){var t=e.func,n=r.useState(!1),i=n[0],a=n[1],o=r.useState(null),l=o[0],c=o[1],u=r.useState(null),s=u[0],d=u[1];return r.useEffect((function(){!function(){var e=se(Fr.mark((function e(){return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a(!0),e.prev=1,e.next=4,t();case 4:d(e.sent),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),c(e.t0);case 11:return e.prev=11,a(!1),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[1,8,11,14]])})));return function(){return e.apply(this,arguments)}}()()}),[t]),{isLoaded:i,error:l,data:s}}(Mc=exports.ProvisionStatus||(exports.ProvisionStatus={})).IN_PROGRESS="IN_PROGRESS",Mc.SUCCEEDED="SUCCEEDED",Mc.FAILED="FAILED";var Ic=["noAccessComponent","children"],Fc=["noAccessComponent","children"],Oc=["noAccessComponent","children"];Object.keys(t).forEach((function(e){"default"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return t[e]}})})),exports.AddonsList=ki,exports.BooleanEntitlementGuard=function(e){var t=e.noAccessComponent,n=e.children;return Bc(pe(e,Ic)).hasAccess?n:i.createElement(i.Fragment,null,null!=t?t:null)},exports.Checkout=function(e){var t=e.textOverrides,n=e.theme,r=e.resourceId,a=e.planId,o=e.preferredBillingPeriod,l=e.billingCountryCode,c=e.billableFeatures,u=e.billingInformation,s=e.onMockCheckoutState,d=e.skipCheckoutSteps,p=pe(e,Ac);return i.createElement(Ao,{textOverrides:t,theme:n,resourceId:r,planId:a,preferredBillingPeriod:o,billingCountryCode:l,billableFeatures:c,billingInformation:u,onMockCheckoutState:s,skipCheckoutSteps:d},i.createElement(Tc,Object.assign({},p)))},exports.CustomerPortal=function(e){var t=e.textOverrides,n=e.theme,r=e.resourceId,a=e.productId,o=pe(e,Qa);return i.createElement(pi,{textOverrides:t,theme:n,resourceId:r,productId:a},i.createElement(Ya,Object.assign({},o)))},exports.CustomerPortalProvider=pi,exports.CustomerUsageData=Ga,exports.InvoicesSection=Ka,exports.MeteredEntitlementGuard=function(e){var t=e.noAccessComponent,n=e.children;return Nc(pe(e,Oc)).hasAccess?n:i.createElement(i.Fragment,null,null!=t?t:null)},exports.NumericEntitlementGuard=function(e){var t=e.noAccessComponent,n=e.children;return Lc(pe(e,Fc)).hasAccess?n:i.createElement(i.Fragment,null,null!=t?t:null)},exports.PaymentDetailsSection=ja,exports.Paywall=function(e){var n=e.productId,a=e.resourceId,o=e.highlightedPlanId,l=e.showOnlyEligiblePlans,c=e.textOverrides,u=e.onPlanSelected,s=e.preferredBillingPeriod,d=e.onBillingPeriodChange,p=e.billingCountryCode,f=e.shouldHidePlan,y=e.selectDefaultTierIndex,v=e.currentSubscriptionOverride,b=e.hideCompatibleAddons,x=!!r.useContext(si),E=!1;if(x){var k=di();E=k.isLoading,a=k.resourceId}var w=function(e){var n=e.productId,i=e.resourceId,a=e.showOnlyEligiblePlans,o=e.billingCountryCode,l=e.preferredBillingPeriod,c=e.currentSubscriptionOverrideFn,u=Vr(),s=u.stigg,d=u.locale,p=r.useState(t.BillingPeriod.Annually),m=p[0],f=p[1],y=r.useState([]),v=y[0],b=y[1],x=r.useState(null),E=x[0],k=x[1],w=r.useState(!0),P=w[0],C=w[1];r.useEffect((function(){!function(){var e=se(Fr.mark((function e(){var t,r,a,c;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,C(!0),e.next=4,s.waitForInitialization();case 4:return e.next=6,s.getPaywall({productId:n,resourceId:i,billingCountryCode:o});case 6:r=Dr((t=e.sent).plans,t.activeSubscriptions,l),a=r.availableBillingPeriods,c=r.defaultBillingPeriod,k(t),b(a),f(c),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(0),Or.error("Failed to load paywall "+(null==e.t0?void 0:e.t0.message),e.t0);case 16:return e.prev=16,C(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[0,13,16,19]])})));return function(){return e.apply(this,arguments)}}()()}),[s,n,s.isCustomerLoaded,o,i,l]);var S=function(e,n,r){var i,a=e||{},o=a.plans,l=a.currency,c=a.configuration,u=a.customer,s=a.paywallCalculatedPricePoints,d=function(e){var n,r,i,a=!0,o=(null==e?void 0:e.find((function(e){return e.status===t.SubscriptionStatus.InTrial})))||null,l=null==(n=o)?void 0:n.plan,c=null!=(r=o)&&r.trialEndDate?g.utc(o.trialEndDate).diff(g.utc(),"days",!1)+1:void 0;return l||(a=!1,l=null==(i=o=(null==e?void 0:e.find((function(e){return e.status===t.SubscriptionStatus.Active})))||null)?void 0:i.plan),{currentSubscription:o,currentPlan:l,isCustomerOnTrial:a,trialDaysLeft:c}}(a.activeSubscriptions),p=d.currentSubscription,m=d.currentPlan,f=d.isCustomerOnTrial,y=d.trialDaysLeft,v=null==r?void 0:r({currentSubscription:p}),b=(null==p?void 0:p.scheduledUpdates)||[],x=null==p||null==(i=p.price)?void 0:i.billingPeriod,E=b.find((function(e){return e.subscriptionScheduleType===t.SubscriptionScheduleType.Downgrade})),k=b.find((function(e){return e.subscriptionScheduleType===t.SubscriptionScheduleType.BillingPeriod})),w=A(o,(function(e){return e.order})).map((function(e){var t,n=null==u||null==(t=u.eligibleForTrial)?void 0:t.find((function(t){return t.productId===e.product.id})),r=null!=v&&v.planId?(null==v?void 0:v.planId)===e.id:e.id===(null==m?void 0:m.id);return de({},e,{paywallCalculatedPricePoints:null==s?void 0:s.filter((function(t){return t.planId===e.id})),isTriable:!h(e.defaultTrialConfig)&&(!n||n.eligible),isCurrentCustomerPlan:r,currentCustomerPlanBillingPeriod:x,isUpcomingPlan:!1,trialDaysLeft:y,isNextPlan:function(t){var n,i=null==E?void 0:E.scheduleVariables,a=null==k?void 0:k.scheduleVariables,o=e.pricePoints.some((function(e){return e.billingPeriod===t}));return E?(null==(n=E.targetPackage)?void 0:n.refId)===e.id&&(!o||i.billingPeriod===t):!(!k||!r)&&a.billingPeriod===t},paywallCurrency:l,scheduledUpdate:E||k})}));if(o&&m){var P,C=m&&(null==o||null==(P=o.find((function(e){return e.id===(null==m?void 0:m.id)})))?void 0:P.order);h(C)||(w=w.map((function(e){return de({},e,{isLowerThanCurrentPlan:C>e.order})})),n&&(w=w.filter((function(e){return e.order>=C}))))}var S=c?function(e){var t=e.palette,n=e.layout;return{customCss:e.customCss||void 0,palette:{primary:(null==t?void 0:t.primary)||void 0,backgroundPaper:(null==t?void 0:t.backgroundColor)||void 0,outlinedBorder:(null==t?void 0:t.borderColor)||void 0,backgroundHighlight:(null==t?void 0:t.currentPlanBackground)||void 0,text:{primary:(null==t?void 0:t.textColor)||void 0}},typography:qr(e.typography),layout:{ctaAlignment:_r(null==n?void 0:n.alignment),headerAlignment:_r(null==n?void 0:n.alignment),descriptionAlignment:_r(null==n?void 0:n.alignment),planMaxWidth:Wr(null==n?void 0:n.planWidth),planMinWidth:Wr(null==n?void 0:n.planWidth),planMargin:Wr(null==n?void 0:n.planMargin),planPadding:Wr(null==n?void 0:n.planPadding)}}}(c):void 0;return{currentPlan:m,currentSubscription:p,currentSubscriptionOverride:v,isCustomerOnTrial:f,plans:w,paywallConfiguration:S}}(E,a,c);return de({customer:(null==E?void 0:E.customer)||null,isLoading:P,selectedBillingPeriod:m,setSelectedBillingPeriod:f,availableBillingPeriods:v,locale:d,configuration:S.paywallConfiguration},S)}({productId:n,resourceId:a,showOnlyEligiblePlans:l,billingCountryCode:p,preferredBillingPeriod:s,currentSubscriptionOverrideFn:v}),P=w.plans,C=w.customer,S=w.currentSubscription,T=w.currentSubscriptionOverride,M=w.isCustomerOnTrial,B=w.isLoading,L=w.selectedBillingPeriod,N=w.setSelectedBillingPeriod,U=w.availableBillingPeriods,I=w.locale,F=w.configuration,O=m({highlightChip:"Recommended",addonsTitle:"Available add-ons:",planCTAButton:{upgrade:"Upgrade",downgrade:"Downgrade",startTrial:function(e){var t;return"Start "+(null==(t=e.defaultTrialConfig)?void 0:t.duration)+" day trial"},custom:"Contact us",currentPlan:"Current plan",startNew:"Get started",switchToBillingPeriod:function(e){return e===t.BillingPeriod.Monthly?"Switch to monthly billing":"Switch to annual billing"},cancelScheduledUpdate:"Cancel"},price:{startingAtCaption:"Starts at",pricePeriod:function(e){return e===t.BillingPeriod.Monthly?"/ month":"/ year"},free:function(e){return{price:(null==e?void 0:e.symbol)+"0"}},custom:"Custom",priceNotSet:"Price not set"}},c),D=!P||B||E?i.createElement(ri,null):i.createElement(Ir,{plans:P,customer:C,currentSubscription:S,currentSubscriptionOverride:T,selectedBillingPeriod:L,onBillingPeriodChanged:function(e){N(e),d&&d(e)},availableBillingPeriods:U,highlightedPlanId:o,isCustomerOnTrial:M,onPlanSelected:u,paywallLocale:O,locale:I,shouldHidePlan:f,selectDefaultTierIndex:y,hideCompatibleAddons:b});return x?D:i.createElement(ui,{componentTheme:F},D)},exports.Promotions=Pi,exports.StiggContext=Hr,exports.StiggProvider=function(e){var t=e.apiKey,a=e.baseUri,o=e.baseEdgeUri,l=e.enableEdge,c=e.customerId,u=e.customerToken,s=e.resourceId,d=e.theme,p=e.locale,m=e.cacheTtlMs,g=e.useEntitlementPolling,h=e.entitlementPollingInterval,f=e.entitlementsFallback,y=e.stiggClient,v=e.children,b=e.offline,x=e.clientName,E=void 0===x?"@stigg/react-sdk":x,k=e.clientVersion,P=void 0===k?"6.3.0":k,C=r.useRef(t),S={apiKey:t,customerId:c,customerToken:u,resourceId:s,baseUri:a,baseEdgeUri:o,enableEdge:l,entitlementsFallback:f,cacheTtlMs:m,useEntitlementPolling:g,entitlementPollingInterval:h,clientName:E,clientVersion:P,offline:b},T=r.useState((function(){return{stigg:null!=y?y:n.initialize(de({},S,{lazyLoad:!0})),locale:p||"en-US",isInitialized:!1,theme:d,refreshData:(e=se(Fr.mark((function e(){return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A((function(e){return de({},e,{customerPortalUpdatedAt:new Date})})),e.next=3,M.stigg.refresh();case 3:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})};var e})),M=T[0],A=T[1];return r.useEffect((function(){var e=!0,r=function(t){e&&A(t)},i=function(){return r((function(e){return de({},e,{updatedAt:new Date})}))},a=function(e){return r((function(t){return t.stigg&&t.stigg.removeListener("entitlementsUpdated",i),e.addListener("entitlementsUpdated",i),de({},t,{stigg:e,isInitialized:!0,updatedAt:new Date})}))};return function(){var e=se(Fr.mark((function e(){var i;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=M.stigg,t!==C.current&&(Or.log("Updating stigg client",{apiKey:t}),C.current=t,i=n.initialize(de({},S)),r((function(e){return de({},e,{isInitialized:!1,updatedAt:new Date})}))),e.next=4,i.waitForInitialization();case 4:a(i);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()(),function(){e=!1,M.stigg.removeListener("entitlementsUpdated",i),M.stigg.clearCustomer()}}),[t]),r.useEffect((function(){var e=M.stigg;c?e.setCustomerId(c,u,s):e.clearCustomer()}),[c,u,s]),r.useEffect((function(){A((function(e){return de({},e,{theme:d})}))}),[d]),i.createElement(Hr.Provider,{value:M},i.createElement(w.SkeletonTheme,{baseColor:"#F5F6F9",highlightColor:"#e5e6ea"},v))},exports.SubscriptionsOverview=Ma,exports.useActiveSubscriptions=function(e){var t=Vr({optional:!0}),n=null==t?void 0:t.stigg,i=Uc({func:r.useCallback((function(){return n?n.getActiveSubscriptions(e):Promise.resolve([])}),[e,n])}),a=i.data,o=i.error,l=i.isLoaded;return r.useMemo((function(){return{activeSubscriptions:a,isLoaded:l,error:o}}),[a,o,l])},exports.useBooleanEntitlement=Bc,exports.useCustomerPortal=function(e){var t=Vr({optional:!0}),n=null==t?void 0:t.stigg,i=Uc({func:r.useCallback((function(){return n?n.getCustomerPortal(e):Promise.resolve(null)}),[e,n])}),a=i.data,o=i.error,l=i.isLoaded;return r.useMemo((function(){return{customerPortal:a,isLoaded:l,error:o}}),[a,o,l])},exports.useMeteredEntitlement=Nc,exports.useNumericEntitlement=Lc,exports.usePaywall=function(e){var t=Vr({optional:!0}),n=null==t?void 0:t.stigg,i=Uc({func:r.useCallback((function(){return n?n.getPaywall(e):Promise.resolve(null)}),[e,n])}),a=i.data,o=i.error,l=i.isLoaded;return r.useMemo((function(){return{paywall:a,isLoaded:l,error:o}}),[a,o,l])},exports.useStiggContext=Vr,exports.useWaitForCheckoutCompleted=function(e){var t,n=void 0===e?{}:e,i=n.onProvisionStart,a=n.onProvisionSucceeded,o=n.onProvisionFailed,l=Vr().stigg,c=r.useState(exports.ProvisionStatus.IN_PROGRESS),u=c[0],s=c[1],d=r.useState(!1),p=d[0],m=d[1],g=r.useMemo((function(){var e=new URLSearchParams(window.location.search);return t?e.get(t):e}),[t="checkoutCompleted",window.location.search]);return r.useEffect((function(){!function(){var e=se(Fr.mark((function e(){var t;return Fr.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g&&"false"!==g.toLowerCase()&&!p){e.next=2;break}return e.abrupt("return");case 2:return m(!0),i&&i(),e.prev=4,e.next=7,l.waitForCheckoutCompleted();case 7:t=e.sent,s(exports.ProvisionStatus.SUCCEEDED),a&&a(t),e.next=17;break;case 12:e.prev=12,e.t0=e.catch(4),console.error("Failed to wait for checkout to complete",e.t0),s(exports.ProvisionStatus.FAILED),o&&o(e.t0);case 17:return e.prev=17,m(!1),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[4,12,17,20]])})));return function(){return e.apply(this,arguments)}}()()}),[l,g]),{isAwaitingCheckout:p,provisionStatus:u}};
2
2
  //# sourceMappingURL=react-sdk.cjs.production.min.js.map