@revenuecat/purchases-js 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -73
- package/dist/Purchases.es.d.ts +155 -41
- package/dist/Purchases.es.js +2395 -1546
- package/dist/Purchases.umd.js +14 -14
- package/dist/style.css +1 -1
- package/package.json +4 -1
package/dist/Purchases.umd.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
(function(G,Y){typeof exports=="object"&&typeof module<"u"?Y(exports):typeof define=="function"&&define.amd?define(["exports"],Y):(G=typeof globalThis<"u"?globalThis:G||self,Y(G.Purchases={}))})(this,function(G){"use strict";var Xr=Object.defineProperty;var Zr=(G,Y,x)=>Y in G?Xr(G,Y,{enumerable:!0,configurable:!0,writable:!0,value:x}):G[Y]=x;var q=(G,Y,x)=>(Zr(G,typeof Y!="symbol"?Y+"":Y,x),x);const Y=t=>({amount:t.amount,currency:t.currency}),x=t=>({id:t.identifier,identifier:t.identifier,displayName:t.title,currentPrice:t.current_price?Y(t.current_price):null,normalPeriodDuration:t.normal_period_duration}),lt=(t,e)=>{const r=e[t.platform_product_identifier];return r===void 0?null:{id:t.identifier,identifier:t.identifier,rcBillingProduct:x(r)}},Ne=(t,e)=>{const r=t.packages.map(n=>lt(n,e)).filter(n=>n!=null);return r.length==0?null:{id:t.identifier,identifier:t.identifier,displayName:t.description,packages:r}};function T(){}function ot(t,e){for(const r in e)t[r]=e[r];return t}function ke(t){return t()}function Oe(){return Object.create(null)}function ne(t){t.forEach(ke)}function ue(t){return typeof t=="function"}function y(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let ae;function Ae(t,e){return t===e?!0:(ae||(ae=document.createElement("a")),ae.href=e,t===ae.href)}function st(t){return Object.keys(t).length===0}function H(t,e,r,n){if(t){const i=Ue(t,e,r,n);return t[0](i)}}function Ue(t,e,r,n){return t[1]&&n?ot(r.ctx.slice(),t[1](n(e))):r.ctx}function K(t,e,r,n){if(t[2]&&n){const i=t[2](n(r));if(e.dirty===void 0)return i;if(typeof i=="object"){const l=[],o=Math.max(e.dirty.length,i.length);for(let s=0;s<o;s+=1)l[s]=e.dirty[s]|i[s];return l}return e.dirty|i}return e.dirty}function j(t,e,r,n,i,l){if(i){const o=Ue(e,r,n,l);t.p(o,i)}}function J(t){if(t.ctx.length>32){const e=[],r=t.ctx.length/32;for(let n=0;n<r;n++)e[n]=-1;return e}return-1}function re(t){return t??""}function M(t,e){t.appendChild(e)}function P(t,e,r){const n=ct(t);if(!n.getElementById(e)){const i=C("style");i.id=e,i.textContent=r,ft(n,i)}}function ct(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function ft(t,e){return M(t.head||t,e),e.sheet}function h(t,e,r){t.insertBefore(e,r||null)}function g(t){t.parentNode&&t.parentNode.removeChild(t)}function C(t){return document.createElement(t)}function L(t){return document.createTextNode(t)}function U(){return L(" ")}function W(){return L("")}function me(t,e,r,n){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)}function ve(t){return function(e){return e.preventDefault(),t.call(this,e)}}function I(t,e,r){r==null?t.removeAttribute(e):t.getAttribute(e)!==r&&t.setAttribute(e,r)}const ut=["width","height"];function at(t,e){const r=Object.getOwnPropertyDescriptors(t.__proto__);for(const n in e)e[n]==null?t.removeAttribute(n):n==="style"?t.style.cssText=e[n]:n==="__value"?t.value=t[n]=e[n]:r[n]&&r[n].set&&ut.indexOf(n)===-1?t[n]=e[n]:I(t,n,e[n])}function At(t,e){Object.keys(e).forEach(r=>{mt(t,r,e[r])})}function mt(t,e,r){const n=e.toLowerCase();n in t?t[n]=typeof t[n]=="boolean"&&r===""?!0:r:e in t?t[e]=typeof t[e]=="boolean"&&r===""?!0:r:I(t,e,r)}function dt(t){return/-/.test(t)?At:at}function Et(t){return Array.from(t.childNodes)}function ie(t,e){e=""+e,t.data!==e&&(t.data=e)}function Pe(t,e){t.value=e??""}function gt(t,e,{bubbles:r=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:e,bubbles:r,cancelable:n})}let le;function oe(t){le=t}function de(){if(!le)throw new Error("Function called outside component initialization");return le}function we(t){de().$$.on_mount.push(t)}function ht(){const t=de();return(e,r,{cancelable:n=!1}={})=>{const i=t.$$.callbacks[e];if(i){const l=gt(e,r,{cancelable:n});return i.slice().forEach(o=>{o.call(t,l)}),!l.defaultPrevented}return!0}}function _t(t,e){return de().$$.context.set(t,e),e}function pt(t){return de().$$.context.get(t)}function It(t,e){const r=t.$$.callbacks[e.type];r&&r.slice().forEach(n=>n.call(this,e))}const z=[],Ee=[];let X=[];const be=[],wt=Promise.resolve();let Be=!1;function bt(){Be||(Be=!0,wt.then(Le))}function Qe(t){X.push(t)}function Bt(t){be.push(t)}const Ce=new Set;let Z=0;function Le(){if(Z!==0)return;const t=le;do{try{for(;Z<z.length;){const e=z[Z];Z++,oe(e),Qt(e.$$)}}catch(e){throw z.length=0,Z=0,e}for(oe(null),z.length=0,Z=0;Ee.length;)Ee.pop()();for(let e=0;e<X.length;e+=1){const r=X[e];Ce.has(r)||(Ce.add(r),r())}X.length=0}while(z.length);for(;be.length;)be.pop()();Be=!1,Ce.clear(),oe(t)}function Qt(t){if(t.fragment!==null){t.update(),ne(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Qe)}}function Ct(t){const e=[],r=[];X.forEach(n=>t.indexOf(n)===-1?e.push(n):r.push(n)),r.forEach(n=>n()),X=e}const ge=new Set;let V;function F(){V={r:0,c:[],p:V}}function S(){V.r||ne(V.c),V=V.p}function u(t,e){t&&t.i&&(ge.delete(t),t.i(e))}function A(t,e,r,n){if(t&&t.o){if(ge.has(t))return;ge.add(t),V.c.push(()=>{ge.delete(t),n&&(r&&t.d(1),n())}),t.o(e)}else n&&n()}function Dt(t,e,r){const n=t.$$.props[e];n!==void 0&&(t.$$.bound[n]=r,r(t.$$.ctx[n]))}function B(t){t&&t.c()}function w(t,e,r){const{fragment:n,after_update:i}=t.$$;n&&n.m(e,r),Qe(()=>{const l=t.$$.on_mount.map(ke).filter(ue);t.$$.on_destroy?t.$$.on_destroy.push(...l):ne(l),t.$$.on_mount=[]}),i.forEach(Qe)}function b(t,e){const r=t.$$;r.fragment!==null&&(Ct(r.after_update),ne(r.on_destroy),r.fragment&&r.fragment.d(e),r.on_destroy=r.fragment=null,r.ctx=[])}function Rt(t,e){t.$$.dirty[0]===-1&&(z.push(t),bt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function N(t,e,r,n,i,l,o=null,s=[-1]){const c=le;oe(t);const f=t.$$={fragment:null,ctx:[],props:l,update:T,not_equal:i,bound:Oe(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:Oe(),dirty:s,skip_bound:!1,root:e.target||c.$$.root};o&&o(f.root);let a=!1;if(f.ctx=r?r(t,e.props||{},(m,p,...E)=>{const D=E.length?E[0]:p;return f.ctx&&i(f.ctx[m],f.ctx[m]=D)&&(!f.skip_bound&&f.bound[m]&&f.bound[m](D),a&&Rt(t,m)),p}):[],f.update(),a=!0,ne(f.before_update),f.fragment=n?n(f.ctx):!1,e.target){if(e.hydrate){const m=Et(e.target);f.fragment&&f.fragment.l(m),m.forEach(g)}else f.fragment&&f.fragment.c();e.intro&&u(t.$$.fragment),w(t,e.target,e.anchor),Le()}oe(c)}class k{constructor(){q(this,"$$");q(this,"$$set")}$destroy(){b(this,1),this.$destroy=T}$on(e,r){if(!ue(r))return T;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(r),()=>{const i=n.indexOf(r);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!st(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Tt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Tt);function Mt(t){P(t,"svelte-8uc6s0","aside.svelte-8uc6s0{color:yellowgreen;font-weight:bold;text-transform:uppercase;padding:0.5rem 0;width:100%;font-size:0.75rem;border-radius:0.5rem}")}function yt(t){let e;return{c(){e=C("aside"),e.innerHTML="<span>Sandbox Mode</span>",I(e,"class","svelte-8uc6s0")},m(r,n){h(r,e,n)},p:T,i:T,o:T,d(r){r&&g(e)}}}class Nt extends k{constructor(e){super(),N(this,e,null,yt,y,{},Mt)}}function kt(t){P(t,"svelte-ujomz3",".rcb-modal-section.svelte-ujomz3{padding:0.5rem 0rem;display:flex}.rcb-modal-section.svelte-ujomz3:last-of-type{padding:0}")}function De(t){let e,r;const n=t[2].default,i=H(n,t,t[1],null);return{c(){e=C(t[0]),i&&i.c(),dt(t[0])(e,{class:re("rcb-modal-section")+" svelte-ujomz3"})},m(l,o){h(l,e,o),i&&i.m(e,null),r=!0},p(l,o){i&&i.p&&(!r||o&2)&&j(i,n,l,l[1],r?K(n,l[1],o,null):J(l[1]),null)},i(l){r||(u(i,l),r=!0)},o(l){A(i,l),r=!1},d(l){l&&g(e),i&&i.d(l)}}}function Ot(t){let e=t[0],r,n,i=t[0]&&De(t);return{c(){i&&i.c(),r=W()},m(l,o){i&&i.m(l,o),h(l,r,o),n=!0},p(l,[o]){l[0]?e?y(e,l[0])?(i.d(1),i=De(l),e=l[0],i.c(),i.m(r.parentNode,r)):i.p(l,o):(i=De(l),e=l[0],i.c(),i.m(r.parentNode,r)):e&&(i.d(1),i=null,e=l[0])},i(l){n||(u(i,l),n=!0)},o(l){A(i,l),n=!1},d(l){l&&g(r),i&&i.d(l)}}}function Ut(t,e,r){let{$$slots:n={},$$scope:i}=e,{as:l="section"}=e;return t.$$set=o=>{"as"in o&&r(0,l=o.as),"$$scope"in o&&r(1,i=o.$$scope)},[l,i,n]}class ee extends k{constructor(e){super(),N(this,e,Ut,Ot,y,{as:0},kt)}}const vt={Y:"year",M:"month",W:"week",D:"day",H:"hour"},Fe=(t,e)=>{const r=t/100;return new Intl.NumberFormat("en-US",{style:"currency",currency:e}).format(r)},Se=t=>{const e=t.slice(-1);return e==="D"?"daily":`${vt[e]}ly`};function Pt(t){P(t,"svelte-1oa6nu8",".rcb-pricing-info.svelte-1oa6nu8{display:flex;flex-direction:column;height:10rem;justify-content:flex-end}.rcb-product-price.svelte-1oa6nu8{font-size:1.5rem}.rcb-product-duration.svelte-1oa6nu8{opacity:0.6}")}function Lt(t){let e,r,n=t[0].displayName+"",i,l,o,s=t[0].currentPrice.currency+"",c,f=" ",a,m=Fe(t[0].currentPrice.amount,t[0].currentPrice.currency)+"",p,E,D,_,d=Se(t[0].normalPeriodDuration)+"",Q;return{c(){e=C("div"),r=C("span"),i=L(n),l=U(),o=C("span"),c=L(s),a=L(f),p=L(m),E=U(),D=C("span"),_=L("Billed "),Q=L(d),I(o,"class","rcb-product-price svelte-1oa6nu8"),I(D,"class","rcb-product-duration svelte-1oa6nu8"),I(e,"class","rcb-pricing-info svelte-1oa6nu8")},m(O,R){h(O,e,R),M(e,r),M(r,i),M(e,l),M(e,o),M(o,c),M(o,a),M(o,p),M(e,E),M(e,D),M(D,_),M(D,Q)},p(O,R){R&1&&n!==(n=O[0].displayName+"")&&ie(i,n),R&1&&s!==(s=O[0].currentPrice.currency+"")&&ie(c,s),R&1&&m!==(m=Fe(O[0].currentPrice.amount,O[0].currentPrice.currency)+"")&&ie(p,m),R&1&&d!==(d=Se(O[0].normalPeriodDuration)+"")&&ie(Q,d)},d(O){O&&g(e)}}}function Ft(t){let e,r;return e=new ee({props:{$$slots:{default:[Lt]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,[i]){const l={};i&9&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function St(t,e,r){let{productDetails:n}=e,{onClose:i}=e,{onContinue:l}=e;return t.$$set=o=>{"productDetails"in o&&r(0,n=o.productDetails),"onClose"in o&&r(1,i=o.onClose),"onContinue"in o&&r(2,l=o.onContinue)},[n,i,l]}class Ye extends k{constructor(e){super(),N(this,e,St,Ft,y,{productDetails:0,onClose:1,onContinue:2},Pt)}}const Yt="data:image/gif;base64,R0lGODlhMgAyAPcBAAAAAAD/AAMDAwcHBxERERUVFSoqKi0tLTAwMDg4OD09PURERElJSUtLS1BQUFJSUlVVVVdXV1paWl9fX2NjY2ZmZmlpaWxsbG1tbXNzc3t7e39/f4GBgYKCgoSEhIaGhoeHh4iIiIuLi5KSkpSUlJaWlp2dnaGhoaOjo6SkpKWlpaenp6ioqKqqqqurq6ysrLCwsLGxsbS0tLa2tri4uLm5ub29vb6+vsDAwMHBwcLCwsXFxcjIyMnJyc3Nzc7OztPT09TU1NXV1dfX19nZ2dra2tvb29zc3N7e3uDg4OHh4eLi4uPj4+fn5+np6ezs7O7u7vDw8PHx8fLy8vPz8/X19fb29vj4+Pn5+fz8/P39/f7+/v///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFBAABACwAAAAAMgAyAIcAAAAA/wADAwMHBwcREREVFRUqKiotLS0wMDA4ODg9PT1ERERJSUlLS0tQUFBSUlJVVVVXV1daWlpfX19jY2NmZmZpaWlsbGxtbW1zc3N7e3t/f3+BgYGCgoKEhISGhoaHh4eIiIiLi4uSkpKUlJSWlpadnZ2hoaGjo6OkpKSlpaWnp6eoqKiqqqqrq6usrKywsLCxsbG0tLS2tra4uLi5ubm9vb2+vr7AwMDBwcHCwsLFxcXIyMjJycnNzc3Ozs7T09PU1NTV1dXX19fZ2dna2trb29vc3Nze3t7g4ODh4eHi4uLj4+Pn5+fp6ens7Ozu7u7w8PDx8fHy8vLz8/P19fX29vb4+Pj5+fn8/Pz9/f3+/v7///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8I/wCzcBFIcKDBgggPKkzIcCEXLlq4bIEokeLEiBcrYrTIcaNHjRobinQ4sqRCkBlTdtR44MBKlR9TmjQJQMBMkgZfdpwSMSYAACgpRtHpcSYSFUIa1mz448UQnAWDfmzSooUVmD9XVnnBwglMlDdvvMjhcOlCHit23CSqcUrVJiizpnTC4sXQmB1vZvmxwgYWhWYLznjRA+rJryqvxGhxxGNLjkVcwMCCN6ZeLkNevDCcRYYKJJfZptyCQwdiijl0CDxdlLPryw2lymY9WzTs17ijVq69mzbM28Bd8x7u23bu46F7i16uXEvw5ziJM5duGbl1k9OLN5cKvfvh7OC3b0jxTv6h+PDUy3unzl67RPXXc56fnz4+/PbofcOHnr9/5f3x4UeffvYVqJuACP5m4IIJ+gfWgusN6KCCAN7WoITVVXjchBxqERAAIfkEBQQAAQAsDQADACAAEAAACKcAAwgcSDDAAwcFEypcSNDAAYYQA2DZstCAAYZOKCqM8uNJxYcKa3DYsVBKECBYFFpU+MTDhiIMkQxBohJkwRYaUkDEEiQIlYQrCyLZ0MFJRCdAkgC1OZBEBxgRJRIBAqXgwYI8NoCwEjWAkyFDoorQ4KOrQCRLoqbQuZCKR7NdqzD5MaQKXIhZmAwBIqTJ3YVYogQZ8oMJ178Kk/A1YhfxQiRHjBYMCAAh+QQFBQABACwNAAMAIAAQAAAInQADCBxIMECGDAUTKlxI8EEEhhADcGEI4QFDJQy5ZJmo0OFCFBFkLNzCRQvHghEgKHQi4cEPhhuzdHyYUMQDDxC5kNSSsGLCIA4x5oxZ0GNBDBFKRAxgkmTBgwVpRJhAZWkAohErPKhh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sKDBGjQMKlyo4sXCgUIetmDxMAAJABsWrnD4UAaAAUkUumhRMcACAQ4UNiwpRAAAGwYnlgyAAQACgxtnPiEAoERBhDMDjBBAoCINHw8ZNHjI5EGEDUyCFtSyIoJVE1KkEnwCIsIDCjK0EgSSAQIED2IHYqkxQUTat3Djyp1b0UbDjXdhBqUxcWTfhHQDCx5MuCIXLVy2vOWShTEXsVsOJz6stbHlx1ojI1b8tvHbgAAAIfkEBQQAAQAsAwADABcAFwAACJQAAwgcSLCgwRIkDCpcqIHDwoFHHm7Y8DCACgMJFWroUBGHgQNMFE6sGGDCAQsaHVY8csAAD4MjSX4w8MDgRpIBoCQwsKIgQpwBUBxIULEHkYcUUC580tDEE6AGbXSYKKMKVIJSUnDQIGIHl6sQS0w8AZagjxAsyqpdy7at24pJfgwBMkQukCRQjQQBIgTIXiFGoAYEACH5BAUFAAEALAMAAwAXABcAAAiVAAMIHEiwoMEMGQwqXPggwsKBTLQshPDgYYAaD1owdPjQB4QIThRGgGAxwIYIIBQ2LMlkJBCDFEsGOPEgA5aCK0tKmQChRkGEMgPIiDDhoRYjTR56CPGwiooXN6oENQikhYsWP65MJXglx4sVMoZsJdikRosWOMYSRPJih9q3cOPKnWuRSxa7eO9O3cJFCxe+frdMDQgAIfkEBQUAAQAsBQADACAAEAAACKYAAwgcSLAgwQcODCpcyNDAAYYQAzhpaIDhFYY+NOBY6HAhkyETFRLZ0CGKQgMVDV4RAoQKQxMdUpx8aJAJECYQnWzYcMQgSoNVgAy5CHGGhhI+aRIkMgRnxCohNvQoiLDgEyFDskQUuINDiK1Hfpgc+ETKQi0nVGxNkkSrwCw/hiBxu7XuFidAhARpgqWu3yxIhgApEtLvVipIgARBYthvlKaNFQYEADs=";function Gt(t){let e,r;return{c(){e=C("img"),Ae(e.src,r=Yt)||I(e,"src",r),I(e,"alt","spinner")},m(n,i){h(n,e,i)},p:T,i:T,o:T,d(n){n&&g(e)}}}class Ht extends k{constructor(e){super(),N(this,e,null,Gt,y,{})}}function Kt(t){P(t,"svelte-4wmtg7",".rcb-modal-loader.svelte-4wmtg7{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center}")}function jt(t){let e,r,n;return r=new Ht({}),{c(){e=C("div"),B(r.$$.fragment),I(e,"class","rcb-modal-loader svelte-4wmtg7")},m(i,l){h(i,e,l),w(r,e,null),n=!0},p:T,i(i){n||(u(r.$$.fragment,i),n=!0)},o(i){A(r.$$.fragment,i),n=!1},d(i){i&&g(e),b(r)}}}class Re extends k{constructor(e){super(),N(this,e,null,jt,y,{},Kt)}}function Jt(t){let e;return{c(){e=C("div"),e.innerHTML="<p>error</p>"},m(r,n){h(r,e,n)},p:T,i:T,o:T,d(r){r&&g(e)}}}class $t extends k{constructor(e){super(),N(this,e,null,Jt,y,{})}}function xt(t){P(t,"svelte-igat39","button.svelte-igat39{border:none;border-radius:3.5rem;font-size:1rem;cursor:pointer;height:3.5rem;color:black;background-color:#dfdfdf}button.intent-primary.svelte-igat39{background-color:#000;color:white;font-size:1rem}")}function Vt(t){let e,r,n,i,l;const o=t[3].default,s=H(o,t,t[2],null);return{c(){e=C("button"),s&&s.c(),I(e,"class",r=re(`intent-${t[0]}`)+" svelte-igat39"),e.disabled=t[1]},m(c,f){h(c,e,f),s&&s.m(e,null),n=!0,i||(l=me(e,"click",t[4]),i=!0)},p(c,[f]){s&&s.p&&(!n||f&4)&&j(s,o,c,c[2],n?K(o,c[2],f,null):J(c[2]),null),(!n||f&1&&r!==(r=re(`intent-${c[0]}`)+" svelte-igat39"))&&I(e,"class",r),(!n||f&2)&&(e.disabled=c[1])},i(c){n||(u(s,c),n=!0)},o(c){A(s,c),n=!1},d(c){c&&g(e),s&&s.d(c),i=!1,l()}}}function qt(t,e,r){let{$$slots:n={},$$scope:i}=e,{intent:l="primary"}=e,{disabled:o=!1}=e;function s(c){It.call(this,t,c)}return t.$$set=c=>{"intent"in c&&r(0,l=c.intent),"disabled"in c&&r(1,o=c.disabled),"$$scope"in c&&r(2,i=c.$$scope)},[l,o,i,n,s]}class he extends k{constructor(e){super(),N(this,e,qt,Vt,y,{intent:0,disabled:1},xt)}}function Wt(t){P(t,"svelte-1f9z0o8","footer.svelte-1f9z0o8{display:flex;flex-direction:column}")}function zt(t){let e,r;const n=t[1].default,i=H(n,t,t[0],null);return{c(){e=C("footer"),i&&i.c(),I(e,"class","rcb-modal-footer svelte-1f9z0o8")},m(l,o){h(l,e,o),i&&i.m(e,null),r=!0},p(l,[o]){i&&i.p&&(!r||o&1)&&j(i,n,l,l[0],r?K(n,l[0],o,null):J(l[0]),null)},i(l){r||(u(i,l),r=!0)},o(l){A(i,l),r=!1},d(l){l&&g(e),i&&i.d(l)}}}function Xt(t,e,r){let{$$slots:n={},$$scope:i}=e;return t.$$set=l=>{"$$scope"in l&&r(0,i=l.$$scope)},[i,n]}class Te extends k{constructor(e){super(),N(this,e,Xt,zt,y,{},Wt)}}const Zt="data:image/svg+xml,%3csvg%20width='124'%20height='124'%20viewBox='0%200%20124%20124'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='62'%20cy='62'%20r='62'%20fill='%23576CDB'/%3e%3crect%20x='44.1116'%20y='56'%20width='27.5'%20height='11'%20transform='rotate(45%2044.1116%2056)'%20fill='white'/%3e%3crect%20x='79.1133'%20y='44.334'%20width='11'%20height='44'%20transform='rotate(45%2079.1133%2044.334)'%20fill='white'/%3e%3c/svg%3e";function en(t){P(t,"svelte-7khg4b","img.svelte-7khg4b{width:7.75rem;height:7.75rem;margin:0 auto}")}function tn(t){let e,r;return{c(){e=C("img"),Ae(e.src,r=Zt)||I(e,"src",r),I(e,"alt","icon"),I(e,"class","rcb-ui-asset-icon svelte-7khg4b")},m(n,i){h(n,e,i)},p:T,i:T,o:T,d(n){n&&g(e)}}}class nn extends k{constructor(e){super(),N(this,e,null,tn,y,{},en)}}function rn(t){P(t,"svelte-18njhoa",'.column.svelte-18njhoa{display:flex;flex-direction:column;justify-content:flex-start;gap:var(--gap, "0.5rem")}')}function ln(t){let e,r,n;const i=t[2].default,l=H(i,t,t[1],null);return{c(){e=C("div"),l&&l.c(),I(e,"class","column svelte-18njhoa"),I(e,"style",r=`--gap:${t[0]};`)},m(o,s){h(o,e,s),l&&l.m(e,null),n=!0},p(o,[s]){l&&l.p&&(!n||s&2)&&j(l,i,o,o[1],n?K(i,o[1],s,null):J(o[1]),null),(!n||s&1&&r!==(r=`--gap:${o[0]};`))&&I(e,"style",r)},i(o){n||(u(l,o),n=!0)},o(o){A(l,o),n=!1},d(o){o&&g(e),l&&l.d(o)}}}function on(t,e,r){let{$$slots:n={},$$scope:i}=e,{gutter:l="0.5rem"}=e;return t.$$set=o=>{"gutter"in o&&r(0,l=o.gutter),"$$scope"in o&&r(1,i=o.$$scope)},[l,i,n]}class _e extends k{constructor(e){super(),N(this,e,on,ln,y,{gutter:0},rn)}}function sn(t){P(t,"svelte-1lcsna9",".rcb-modal-success.svelte-1lcsna9{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center}.title.svelte-1lcsna9{font-size:24px}.subtitle.svelte-1lcsna9{font-size:16px}")}function cn(t){let e,r,n;return{c(){e=C("span"),e.textContent="Purchase Successful",r=U(),n=C("span"),n.textContent="Your plan is now active.",I(e,"class","title svelte-1lcsna9"),I(n,"class","subtitle svelte-1lcsna9")},m(i,l){h(i,e,l),h(i,r,l),h(i,n,l)},p:T,d(i){i&&(g(e),g(r),g(n))}}}function fn(t){let e,r,n,i;return e=new nn({}),n=new _e({props:{gutter:"1rem",$$slots:{default:[cn]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),r=U(),B(n.$$.fragment)},m(l,o){w(e,l,o),h(l,r,o),w(n,l,o),i=!0},p(l,o){const s={};o&2&&(s.$$scope={dirty:o,ctx:l}),n.$set(s)},i(l){i||(u(e.$$.fragment,l),u(n.$$.fragment,l),i=!0)},o(l){A(e.$$.fragment,l),A(n.$$.fragment,l),i=!1},d(l){l&&g(r),b(e,l),b(n,l)}}}function un(t){let e,r,n;return r=new _e({props:{gutter:"1rem",$$slots:{default:[fn]},$$scope:{ctx:t}}}),{c(){e=C("div"),B(r.$$.fragment),I(e,"class","rcb-modal-success svelte-1lcsna9")},m(i,l){h(i,e,l),w(r,e,null),n=!0},p(i,l){const o={};l&2&&(o.$$scope={dirty:l,ctx:i}),r.$set(o)},i(i){n||(u(r.$$.fragment,i),n=!0)},o(i){A(r.$$.fragment,i),n=!1},d(i){i&&g(e),b(r)}}}function an(t){let e;return{c(){e=L("Go back to app")},m(r,n){h(r,e,n)},d(r){r&&g(e)}}}function An(t){let e,r;return e=new he({props:{intent:"secondary",$$slots:{default:[an]},$$scope:{ctx:t}}}),e.$on("click",function(){ue(t[0])&&t[0].apply(this,arguments)}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){t=n;const l={};i&2&&(l.$$scope={dirty:i,ctx:t}),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function mn(t){let e,r,n,i;return e=new ee({props:{$$slots:{default:[un]},$$scope:{ctx:t}}}),n=new Te({props:{$$slots:{default:[An]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),r=U(),B(n.$$.fragment)},m(l,o){w(e,l,o),h(l,r,o),w(n,l,o),i=!0},p(l,o){const s={};o&2&&(s.$$scope={dirty:o,ctx:l}),e.$set(s);const c={};o&3&&(c.$$scope={dirty:o,ctx:l}),n.$set(c)},i(l){i||(u(e.$$.fragment,l),u(n.$$.fragment,l),i=!0)},o(l){A(e.$$.fragment,l),A(n.$$.fragment,l),i=!1},d(l){l&&g(r),b(e,l),b(n,l)}}}function dn(t){let e,r;return e=new _e({props:{gutter:"2rem",$$slots:{default:[mn]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,[i]){const l={};i&3&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function En(t,e,r){let{onContinue:n}=e;return t.$$set=i=>{"onContinue"in i&&r(0,n=i.onContinue)},[n]}class gn extends k{constructor(e){super(),N(this,e,En,dn,y,{onContinue:0},sn)}}function hn(t,e,r,n,i={}){const l=r.create(e,i);return l.mount(t),l.on("change",o=>n("change",o)),l.on("ready",o=>n("ready",o)),l.on("focus",o=>n("focus",o)),l.on("blur",o=>n("blur",o)),l.on("escape",o=>n("escape",o)),l.on("click",o=>n("click",o)),l.on("loaderror",o=>n("loaderror",o)),l.on("loaderstart",o=>n("loaderstart",o)),l.on("networkschange",o=>n("networkschange",o)),l}const _n=typeof window>"u";function pn(t){if(!_n)return t.registerAppInfo({name:"svelte-stripe-js",url:"https://svelte-stripe-js.vercel.app"})}function In(t){let e;return{c(){e=C("div")},m(r,n){h(r,e,n),t[6](e)},p:T,i:T,o:T,d(r){r&&g(e),t[6](null)}}}function wn(t,e,r){let n,i;const l=ht(),{elements:o}=pt("stripe");let{options:s=void 0}=e;we(()=>(n=hn(i,"payment",o,l,s),()=>n.destroy()));function c(){n.blur()}function f(){n.clear()}function a(){n.destroy()}function m(){n.focus()}function p(E){Ee[E?"unshift":"push"](()=>{i=E,r(0,i)})}return t.$$set=E=>{"options"in E&&r(1,s=E.options)},[i,s,c,f,a,m,p]}class bn extends k{constructor(e){super(),N(this,e,wn,In,y,{options:1,blur:2,clear:3,destroy:4,focus:5})}get blur(){return this.$$.ctx[2]}get clear(){return this.$$.ctx[3]}get destroy(){return this.$$.ctx[4]}get focus(){return this.$$.ctx[5]}}function Ge(t){let e;const r=t[15].default,n=H(r,t,t[14],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,l){n&&n.p&&(!e||l&16384)&&j(n,r,i,i[14],e?K(r,i[14],l,null):J(i[14]),null)},i(i){e||(u(n,i),e=!0)},o(i){A(n,i),e=!1},d(i){n&&n.d(i)}}}function Bn(t){let e,r,n=t[1]&&t[0]&&Ge(t);return{c(){n&&n.c(),e=W()},m(i,l){n&&n.m(i,l),h(i,e,l),r=!0},p(i,[l]){i[1]&&i[0]?n?(n.p(i,l),l&3&&u(n,1)):(n=Ge(i),n.c(),u(n,1),n.m(e.parentNode,e)):n&&(F(),A(n,1,1,()=>{n=null}),S())},i(i){r||(u(n),r=!0)},o(i){A(n),r=!1},d(i){i&&g(e),n&&n.d(i)}}}function Qn(t,e,r){let n,{$$slots:i={},$$scope:l}=e,{stripe:o}=e,{mode:s=void 0}=e,{theme:c="stripe"}=e,{variables:f={}}=e,{rules:a={}}=e,{labels:m="above"}=e,{loader:p="auto"}=e,{fonts:E=[]}=e,{locale:D="auto"}=e,{currency:_=void 0}=e,{amount:d=void 0}=e,{clientSecret:Q=void 0}=e,{elements:O=null}=e;return t.$$set=R=>{"stripe"in R&&r(1,o=R.stripe),"mode"in R&&r(2,s=R.mode),"theme"in R&&r(3,c=R.theme),"variables"in R&&r(4,f=R.variables),"rules"in R&&r(5,a=R.rules),"labels"in R&&r(6,m=R.labels),"loader"in R&&r(7,p=R.loader),"fonts"in R&&r(8,E=R.fonts),"locale"in R&&r(9,D=R.locale),"currency"in R&&r(10,_=R.currency),"amount"in R&&r(11,d=R.amount),"clientSecret"in R&&r(12,Q=R.clientSecret),"elements"in R&&r(0,O=R.elements),"$$scope"in R&&r(14,l=R.$$scope)},t.$$.update=()=>{t.$$.dirty&120&&r(13,n={theme:c,variables:f,rules:a,labels:m}),t.$$.dirty&16263&&o&&!O&&(r(0,O=o.elements({mode:s,currency:_,amount:d,appearance:n,clientSecret:Q,fonts:E,loader:p,locale:D})),pn(o),_t("stripe",{stripe:o,elements:O})),t.$$.dirty&8705&&O&&O.update({appearance:n,locale:D})},[O,o,s,c,f,a,m,p,E,D,_,d,Q,n,l,i]}class Cn extends k{constructor(e){super(),N(this,e,Qn,Bn,y,{stripe:1,mode:2,theme:3,variables:4,rules:5,labels:6,loader:7,fonts:8,locale:9,currency:10,amount:11,clientSecret:12,elements:0})}}var He="https://js.stripe.com/v3",Dn=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Ke="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Rn=function(){for(var e=document.querySelectorAll('script[src^="'.concat(He,'"]')),r=0;r<e.length;r++){var n=e[r];if(Dn.test(n.src))return n}return null},je=function(e){var r=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(He).concat(r);var i=document.head||document.body;if(!i)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return i.appendChild(n),n},Tn=function(e,r){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"2.3.0",startTime:r})},se=null,pe=null,Ie=null,Mn=function(e){return function(){e(new Error("Failed to load Stripe.js"))}},yn=function(e,r){return function(){window.Stripe?e(window.Stripe):r(new Error("Stripe.js not available"))}},Nn=function(e){return se!==null?se:(se=new Promise(function(r,n){if(typeof window>"u"||typeof document>"u"){r(null);return}if(window.Stripe&&e&&console.warn(Ke),window.Stripe){r(window.Stripe);return}try{var i=Rn();if(i&&e)console.warn(Ke);else if(!i)i=je(e);else if(i&&Ie!==null&&pe!==null){var l;i.removeEventListener("load",Ie),i.removeEventListener("error",pe),(l=i.parentNode)===null||l===void 0||l.removeChild(i),i=je(e)}Ie=yn(r,n),pe=Mn(n),i.addEventListener("load",Ie),i.addEventListener("error",pe)}catch(o){n(o);return}}),se.catch(function(r){return se=null,Promise.reject(r)}))},kn=function(e,r,n){if(e===null)return null;var i=e.apply(void 0,r);return Tn(i,n),i},ce,Je=!1,$e=function(){return ce||(ce=Nn(null).catch(function(e){return ce=null,Promise.reject(e)}),ce)};Promise.resolve().then(function(){return $e()}).catch(function(t){Je||console.warn(t)});var On=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];Je=!0;var i=Date.now();return $e().then(function(l){return kn(l,r,i)})};const Un=t=>{var e;return{nextAction:t.next_action,data:{clientSecret:((e=t.data)==null?void 0:e.client_secret)??void 0}}};function vn(t){P(t,"svelte-1fwwzeb",".rcb-stripe-elements-container.svelte-1fwwzeb{width:100%;margin-bottom:1rem}")}function Pn(t){let e,r;return e=new Re({}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p:T,i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Ln(t){let e,r,n,i,l,o;function s(f){t[10](f)}let c={stripe:t[2],clientSecret:t[4],loader:"always",$$slots:{default:[Jn]},$$scope:{ctx:t}};return t[1]!==void 0&&(c.elements=t[1]),r=new Cn({props:c}),Ee.push(()=>Dt(r,"elements",s)),{c(){e=C("form"),B(r.$$.fragment)},m(f,a){h(f,e,a),w(r,e,null),i=!0,l||(o=me(e,"submit",ve(t[5])),l=!0)},p(f,a){const m={};a&4&&(m.stripe=f[2]),a&4105&&(m.$$scope={dirty:a,ctx:f}),!n&&a&2&&(n=!0,m.elements=f[1],Bt(()=>n=!1)),r.$set(m)},i(f){i||(u(r.$$.fragment,f),i=!0)},o(f){A(r.$$.fragment,f),i=!1},d(f){f&&g(e),b(r),l=!1,o()}}}function Fn(t){let e,r,n;return r=new bn({}),{c(){e=C("div"),B(r.$$.fragment),I(e,"class","rcb-stripe-elements-container svelte-1fwwzeb")},m(i,l){h(i,e,l),w(r,e,null),n=!0},p:T,i(i){n||(u(r.$$.fragment,i),n=!0)},o(i){A(r.$$.fragment,i),n=!1},d(i){i&&g(e),b(r)}}}function Sn(t){let e;return{c(){e=L("Pay")},m(r,n){h(r,e,n)},d(r){r&&g(e)}}}function Yn(t){let e;return{c(){e=L("Processing...")},m(r,n){h(r,e,n)},d(r){r&&g(e)}}}function Gn(t){let e;function r(l,o){return l[3]?Yn:Sn}let n=r(t),i=n(t);return{c(){i.c(),e=W()},m(l,o){i.m(l,o),h(l,e,o)},p(l,o){n!==(n=r(l))&&(i.d(1),i=n(l),i&&(i.c(),i.m(e.parentNode,e)))},d(l){l&&g(e),i.d(l)}}}function Hn(t){let e;return{c(){e=L("Close")},m(r,n){h(r,e,n)},d(r){r&&g(e)}}}function Kn(t){let e,r,n,i;return e=new he({props:{disabled:t[3],$$slots:{default:[Gn]},$$scope:{ctx:t}}}),n=new he({props:{disabled:t[3],intent:"secondary",$$slots:{default:[Hn]},$$scope:{ctx:t}}}),n.$on("click",function(){ue(t[0])&&t[0].apply(this,arguments)}),{c(){B(e.$$.fragment),r=U(),B(n.$$.fragment)},m(l,o){w(e,l,o),h(l,r,o),w(n,l,o),i=!0},p(l,o){t=l;const s={};o&8&&(s.disabled=t[3]),o&4104&&(s.$$scope={dirty:o,ctx:t}),e.$set(s);const c={};o&8&&(c.disabled=t[3]),o&4096&&(c.$$scope={dirty:o,ctx:t}),n.$set(c)},i(l){i||(u(e.$$.fragment,l),u(n.$$.fragment,l),i=!0)},o(l){A(e.$$.fragment,l),A(n.$$.fragment,l),i=!1},d(l){l&&g(r),b(e,l),b(n,l)}}}function jn(t){let e,r;return e=new _e({props:{$$slots:{default:[Kn]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){const l={};i&4105&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Jn(t){let e,r,n,i;return e=new ee({props:{$$slots:{default:[Fn]},$$scope:{ctx:t}}}),n=new Te({props:{$$slots:{default:[jn]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment),r=U(),B(n.$$.fragment)},m(l,o){w(e,l,o),h(l,r,o),w(n,l,o),i=!0},p(l,o){const s={};o&4096&&(s.$$scope={dirty:o,ctx:l}),e.$set(s);const c={};o&4105&&(c.$$scope={dirty:o,ctx:l}),n.$set(c)},i(l){i||(u(e.$$.fragment,l),u(n.$$.fragment,l),i=!0)},o(l){A(e.$$.fragment,l),A(n.$$.fragment,l),i=!1},d(l){l&&g(r),b(e,l),b(n,l)}}}function $n(t){let e,r,n,i;const l=[Ln,Pn],o=[];function s(c,f){return c[2]&&c[4]?0:1}return r=s(t),n=o[r]=l[r](t),{c(){e=C("div"),n.c()},m(c,f){h(c,e,f),o[r].m(e,null),i=!0},p(c,[f]){let a=r;r=s(c),r===a?o[r].p(c,f):(F(),A(o[a],1,1,()=>{o[a]=null}),S(),n=o[r],n?n.p(c,f):(n=o[r]=l[r](c),n.c()),u(n,1),n.m(e,null))},i(c){i||(u(n),i=!0)},o(c){A(n),i=!1},d(c){c&&g(e),o[r].d()}}}function xn(t,e,r){let{onClose:n}=e,{onContinue:i}=e,{onError:l}=e,{purchases:o}=e,{paymentInfoCollectionMetadata:s}=e;const c=s.data.clientSecret;let f=null,a,m=!1,p;we(async()=>{var O;const _=(O=o==null?void 0:o._PAYMENT_PROVIDER_SETTINGS)==null?void 0:O.stripe;if(!_)throw new Error("Stripe settings not found");const d=_.publishableKey,Q=_.accountId;if(!d||!Q)throw new Error("Stripe publishable key or account ID not found");r(2,f=await On(d,{stripeAccount:Q}))});const E=async()=>{if(m||!f||!p)return;r(3,m=!0);const _=await f.confirmSetup({elements:p,redirect:"if_required"});_.error?(r(3,m=!1),l(_.error)):i()};function D(_){a=_,r(1,a)}return t.$$set=_=>{"onClose"in _&&r(0,n=_.onClose),"onContinue"in _&&r(6,i=_.onContinue),"onError"in _&&r(7,l=_.onError),"purchases"in _&&r(8,o=_.purchases),"paymentInfoCollectionMetadata"in _&&r(9,s=_.paymentInfoCollectionMetadata)},t.$$.update=()=>{t.$$.dirty&2&&a&&a._elements.length>0&&(p=a)},[n,a,f,m,c,E,i,l,o,s,D]}class Vn extends k{constructor(e){super(),N(this,e,xn,$n,y,{onClose:0,onContinue:6,onError:7,purchases:8,paymentInfoCollectionMetadata:9},vn)}}function qn(t){P(t,"svelte-1xardyz",".form-container.svelte-1xardyz{display:flex;flex-direction:column;width:100%}.form-label.svelte-1xardyz{margin-top:0.5rem;margin-bottom:0.5rem;display:block}.form-input.svelte-1xardyz{margin-bottom:1rem}.title.svelte-1xardyz{font-size:1.5rem;margin:0;margin-bottom:0.5rem}input.svelte-1xardyz{width:94%;padding:0.5rem;border:1px solid #ccc;border-radius:0.25rem}")}function Wn(t){let e;return{c(){e=C("span"),e.textContent="User authentication",I(e,"class","title svelte-1xardyz")},m(r,n){h(r,e,n)},p:T,d(r){r&&g(e)}}}function zn(t){let e,r,n,i,l,o,s;return{c(){e=C("div"),r=C("div"),r.innerHTML='<label for="email">E-mail</label>',n=U(),i=C("div"),l=C("input"),I(r,"class","form-label svelte-1xardyz"),I(l,"name","email"),I(l,"placeholder","john@appleseed.com"),I(l,"class","svelte-1xardyz"),I(i,"class","form-input svelte-1xardyz"),I(e,"class","form-container svelte-1xardyz")},m(c,f){h(c,e,f),M(e,r),M(e,n),M(e,i),M(i,l),Pe(l,t[0]),o||(s=me(l,"input",t[6]),o=!0)},p(c,f){f&1&&l.value!==c[0]&&Pe(l,c[0])},d(c){c&&g(e),o=!1,s()}}}function Xn(t){let e;return{c(){e=L("Continue")},m(r,n){h(r,e,n)},d(r){r&&g(e)}}}function Zn(t){let e,r;return e=new he({props:{$$slots:{default:[Xn]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){const l={};i&128&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function er(t){let e,r,n,i,l,o,s,c,f,a;return n=new ee({props:{$$slots:{default:[Wn]},$$scope:{ctx:t}}}),l=new ee({props:{$$slots:{default:[zn]},$$scope:{ctx:t}}}),s=new Te({props:{$$slots:{default:[Zn]},$$scope:{ctx:t}}}),{c(){e=C("div"),r=C("form"),B(n.$$.fragment),i=U(),B(l.$$.fragment),o=U(),B(s.$$.fragment)},m(m,p){h(m,e,p),M(e,r),w(n,r,null),M(r,i),w(l,r,null),M(r,o),w(s,r,null),c=!0,f||(a=me(r,"submit",ve(t[1])),f=!0)},p(m,[p]){const E={};p&128&&(E.$$scope={dirty:p,ctx:m}),n.$set(E);const D={};p&129&&(D.$$scope={dirty:p,ctx:m}),l.$set(D);const _={};p&128&&(_.$$scope={dirty:p,ctx:m}),s.$set(_)},i(m){c||(u(n.$$.fragment,m),u(l.$$.fragment,m),u(s.$$.fragment,m),c=!0)},o(m){A(n.$$.fragment,m),A(l.$$.fragment,m),A(s.$$.fragment,m),c=!1},d(m){m&&g(e),b(n),b(l),b(s),f=!1,a()}}}function tr(t,e,r){let n,{onClose:i}=e,{onContinue:l}=e,{onError:o}=e,{purchases:s}=e;const c=async()=>{l({email:n})};function f(){n=this.value,r(0,n)}return t.$$set=a=>{"onClose"in a&&r(2,i=a.onClose),"onContinue"in a&&r(3,l=a.onContinue),"onError"in a&&r(4,o=a.onError),"purchases"in a&&r(5,s=a.purchases)},r(0,n=""),[n,c,i,l,o,s,f]}class nr extends k{constructor(e){super(),N(this,e,tr,er,y,{onClose:2,onContinue:3,onError:4,purchases:5},qn)}}const rr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAIAAAC1nk4lAAAAAXNSR0IArs4c6QAAAIRlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAADygAwAEAAAAAQAAADwAAAAAeOWEXwAAAAlwSFlzAAALEwAACxMBAJqcGAAAABxpRE9UAAAAAgAAAAAAAAAeAAAAKAAAAB4AAAAeAAAMHoAQFJEAAAvqSURBVGgFrJcJVBRHGse/GtB4JMFsgkfUGCWisPEAxQCiURHkEsREzWEeHpv78sVNjLcElRif0Zg8o0lU3CgKcgzDMYh4ZI0RIypH8I4RORwZmIsZnJme7tqvumd6BszLvuyGV6+pqf7qq1/966uvqo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kSoGdr3VcFygT9J8lLfJA9MH/3fZROVdb7Skot7BwIMECLYtdK06H9vwMdvPcFUwRTKquTKyweUKa3RQEU4nJox+AJURhuZ3+GSbjB8yQUOmRihYnhehVMyq4/BS1xh2oAw6T/JKE29uu1X1XBuTDluUws4PAW2/tg8s6GtMoyK15lpAd2LW7c3k9McGzbSR5lo/C0CjTiPwplJawiKcQh8LBZAnWWwgPKg2GG08HPEZeOPciDml2m/wPd1bAYpTHszwAAAABJRU5ErkJggg==";function ir(t){P(t,"svelte-f7u0k9",".rcb-app-icon.svelte-f7u0k9{width:2.5rem;height:2.5rem;border-radius:0.75rem;box-shadow:0px 1px 10px 0px rgba(0, 0, 0, 0.1);margin-right:1rem}")}function lr(t){let e,r;return{c(){e=C("img"),Ae(e.src,r=rr)||I(e,"src",r),I(e,"alt","app icon"),I(e,"class","rcb-app-icon svelte-f7u0k9")},m(n,i){h(n,e,i)},p:T,i:T,o:T,d(n){n&&g(e)}}}class or extends k{constructor(e){super(),N(this,e,null,lr,y,{},ir)}}const sr="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.5'%20clip-path='url(%23clip0_344_3390)'%3e%3cpath%20d='M7%2018C5.9%2018%205.01%2018.9%205.01%2020C5.01%2021.1%205.9%2022%207%2022C8.1%2022%209%2021.1%209%2020C9%2018.9%208.1%2018%207%2018ZM1%202V4H3L6.6%2011.59L5.25%2014.04C5.09%2014.32%205%2014.65%205%2015C5%2016.1%205.9%2017%207%2017H19V15H7.42C7.28%2015%207.17%2014.89%207.17%2014.75L7.2%2014.63L8.1%2013H15.55C16.3%2013%2016.96%2012.59%2017.3%2011.97L20.88%205.48C20.96%205.34%2021%205.17%2021%205C21%204.45%2020.55%204%2020%204H5.21L4.27%202H1ZM17%2018C15.9%2018%2015.01%2018.9%2015.01%2020C15.01%2021.1%2015.9%2022%2017%2022C18.1%2022%2019%2021.1%2019%2020C19%2018.9%2018.1%2018%2017%2018Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_344_3390'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";function cr(t){let e,r;return{c(){e=C("img"),Ae(e.src,r=sr)||I(e,"src",r),I(e,"alt","icon"),I(e,"class","rcb-ui-asset-icon")},m(n,i){h(n,e,i)},p:T,i:T,o:T,d(n){n&&g(e)}}}class fr extends k{constructor(e){super(),N(this,e,null,cr,y,{})}}function ur(t){P(t,"svelte-fcqjlc",".app-title.svelte-fcqjlc{font-weight:500;margin:0.5rem 0;font-size:1rem}.rcb-header-layout.svelte-fcqjlc{display:flex;justify-content:space-between;align-items:center;width:100%}.rcb-header-layout__business-info.svelte-fcqjlc{display:flex;align-items:center}")}function ar(t){let e,r,n,i,l,o,s,c,f;return n=new or({}),c=new fr({}),{c(){e=C("div"),r=C("div"),B(n.$$.fragment),i=U(),l=C("span"),o=L(t[0]),s=U(),B(c.$$.fragment),I(l,"class","app-title svelte-fcqjlc"),I(r,"class","rcb-header-layout__business-info svelte-fcqjlc"),I(e,"class","rcb-header-layout svelte-fcqjlc")},m(a,m){h(a,e,m),M(e,r),w(n,r,null),M(r,i),M(r,l),M(l,o),M(e,s),w(c,e,null),f=!0},p(a,m){(!f||m&1)&&ie(o,a[0])},i(a){f||(u(n.$$.fragment,a),u(c.$$.fragment,a),f=!0)},o(a){A(n.$$.fragment,a),A(c.$$.fragment,a),f=!1},d(a){a&&g(e),b(n),b(c)}}}function Ar(t){let e,r;return e=new ee({props:{as:"header",$$slots:{default:[ar]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,[i]){const l={};i&3&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function mr(t,e,r){let{title:n=""}=e;return t.$$set=i=>{"title"in i&&r(0,n=i.title)},[n]}class dr extends k{constructor(e){super(),N(this,e,mr,Ar,y,{title:0},ur)}}function Er(t){P(t,"svelte-17dhulw",".rcb-modal-backdrop.svelte-17dhulw{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:rgba(40, 40, 40, 0.75);display:flex;flex-direction:column;justify-content:space-around}")}function gr(t){let e,r;const n=t[1].default,i=H(n,t,t[0],null);return{c(){e=C("div"),i&&i.c(),I(e,"class","rcb-modal-backdrop svelte-17dhulw")},m(l,o){h(l,e,o),i&&i.m(e,null),r=!0},p(l,[o]){i&&i.p&&(!r||o&1)&&j(i,n,l,l[0],r?K(n,l[0],o,null):J(l[0]),null)},i(l){r||(u(i,l),r=!0)},o(l){A(i,l),r=!1},d(l){l&&g(e),i&&i.d(l)}}}function hr(t,e,r){let{$$slots:n={},$$scope:i}=e;return t.$$set=l=>{"$$scope"in l&&r(0,i=l.$$scope)},[i,n]}class _r extends k{constructor(e){super(),N(this,e,hr,gr,y,{},Er)}}function pr(t){P(t,"svelte-m6kocx",".rcb-modal-main.svelte-m6kocx{box-sizing:border-box;border-radius:0.5rem;background-color:#fff;color:black;max-width:40rem;min-width:30rem;overflow-y:auto;padding:2.5rem}.rcb-modal-dark.svelte-m6kocx{background-color:#000;color:#fff;max-width:30rem;min-width:20rem}@media screen and (max-width: 60rem){.rcb-modal-main.svelte-m6kocx,.rcb-modal-dark.svelte-m6kocx{max-width:40rem;min-width:90vw}}")}function Ir(t){let e,r,n;const i=t[2].default,l=H(i,t,t[1],null);return{c(){e=C("main"),l&&l.c(),I(e,"class",r=re(`rcb-modal-main ${t[0]?"rcb-modal-dark":""}`)+" svelte-m6kocx")},m(o,s){h(o,e,s),l&&l.m(e,null),n=!0},p(o,[s]){l&&l.p&&(!n||s&2)&&j(l,i,o,o[1],n?K(i,o[1],s,null):J(o[1]),null),(!n||s&1&&r!==(r=re(`rcb-modal-main ${o[0]?"rcb-modal-dark":""}`)+" svelte-m6kocx"))&&I(e,"class",r)},i(o){n||(u(l,o),n=!0)},o(o){A(l,o),n=!1},d(o){o&&g(e),l&&l.d(o)}}}function wr(t,e,r){let{$$slots:n={},$$scope:i}=e,{dark:l=!1}=e;return t.$$set=o=>{"dark"in o&&r(0,l=o.dark),"$$scope"in o&&r(1,i=o.$$scope)},[l,i,n]}class br extends k{constructor(e){super(),N(this,e,wr,Ir,y,{dark:0},pr)}}function Br(t){let e;const r=t[1].default,n=H(r,t,t[2],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,l){n&&n.p&&(!e||l&4)&&j(n,r,i,i[2],e?K(r,i[2],l,null):J(i[2]),null)},i(i){e||(u(n,i),e=!0)},o(i){A(n,i),e=!1},d(i){n&&n.d(i)}}}function Qr(t){let e,r;return e=new _r({props:{$$slots:{default:[Cr]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){const l={};i&4&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Cr(t){let e;const r=t[1].default,n=H(r,t,t[2],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,l){n&&n.p&&(!e||l&4)&&j(n,r,i,i[2],e?K(r,i[2],l,null):J(i[2]),null)},i(i){e||(u(n,i),e=!0)},o(i){A(n,i),e=!1},d(i){n&&n.d(i)}}}function Dr(t){let e,r,n,i;const l=[Qr,Br],o=[];function s(c,f){return c[0]?0:1}return e=s(t),r=o[e]=l[e](t),{c(){r.c(),n=W()},m(c,f){o[e].m(c,f),h(c,n,f),i=!0},p(c,[f]){let a=e;e=s(c),e===a?o[e].p(c,f):(F(),A(o[a],1,1,()=>{o[a]=null}),S(),r=o[e],r?r.p(c,f):(r=o[e]=l[e](c),r.c()),u(r,1),r.m(n.parentNode,n))},i(c){i||(u(r),i=!0)},o(c){A(r),i=!1},d(c){c&&g(n),o[e].d(c)}}}function Rr(t,e,r){let{$$slots:n={},$$scope:i}=e,{condition:l=!1}=e;return t.$$set=o=>{"condition"in o&&r(0,l=o.condition),"$$scope"in o&&r(2,i=o.$$scope)},[l,n,i]}class Tr extends k{constructor(e){super(),N(this,e,Rr,Dr,y,{condition:0})}}function xe(t){let e,r;return e=new dr({props:{title:t[0]}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){const l={};i&1&&(l.title=n[0]),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Mr(t){let e,r,n=t[0]&&xe(t);const i=t[2].default,l=H(i,t,t[3],null);return{c(){n&&n.c(),e=U(),l&&l.c()},m(o,s){n&&n.m(o,s),h(o,e,s),l&&l.m(o,s),r=!0},p(o,s){o[0]?n?(n.p(o,s),s&1&&u(n,1)):(n=xe(o),n.c(),u(n,1),n.m(e.parentNode,e)):n&&(F(),A(n,1,1,()=>{n=null}),S()),l&&l.p&&(!r||s&8)&&j(l,i,o,o[3],r?K(i,o[3],s,null):J(o[3]),null)},i(o){r||(u(n),u(l,o),r=!0)},o(o){A(n),A(l,o),r=!1},d(o){o&&g(e),n&&n.d(o),l&&l.d(o)}}}function yr(t){let e,r;return e=new br({props:{dark:t[1],$$slots:{default:[Mr]},$$scope:{ctx:t}}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,[i]){const l={};i&2&&(l.dark=n[1]),i&9&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Nr(t,e,r){let{$$slots:n={},$$scope:i}=e,{title:l=""}=e,{dark:o=!1}=e;return t.$$set=s=>{"title"in s&&r(0,l=s.title),"dark"in s&&r(1,o=s.dark),"$$scope"in s&&r(3,i=s.$$scope)},[l,o,n,i]}class Ve extends k{constructor(e){super(),N(this,e,Nr,yr,y,{title:0,dark:1})}}var $;(function(t){t[t.CONTINUE=100]="CONTINUE",t[t.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",t[t.PROCESSING=102]="PROCESSING",t[t.EARLY_HINTS=103]="EARLY_HINTS",t[t.OK=200]="OK",t[t.CREATED=201]="CREATED",t[t.ACCEPTED=202]="ACCEPTED",t[t.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",t[t.NO_CONTENT=204]="NO_CONTENT",t[t.RESET_CONTENT=205]="RESET_CONTENT",t[t.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",t[t.MULTI_STATUS=207]="MULTI_STATUS",t[t.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",t[t.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",t[t.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",t[t.SEE_OTHER=303]="SEE_OTHER",t[t.NOT_MODIFIED=304]="NOT_MODIFIED",t[t.USE_PROXY=305]="USE_PROXY",t[t.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",t[t.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",t[t.BAD_REQUEST=400]="BAD_REQUEST",t[t.UNAUTHORIZED=401]="UNAUTHORIZED",t[t.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",t[t.FORBIDDEN=403]="FORBIDDEN",t[t.NOT_FOUND=404]="NOT_FOUND",t[t.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",t[t.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",t[t.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",t[t.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",t[t.CONFLICT=409]="CONFLICT",t[t.GONE=410]="GONE",t[t.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",t[t.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",t[t.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",t[t.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",t[t.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",t[t.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",t[t.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",t[t.IM_A_TEAPOT=418]="IM_A_TEAPOT",t[t.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",t[t.METHOD_FAILURE=420]="METHOD_FAILURE",t[t.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",t[t.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",t[t.LOCKED=423]="LOCKED",t[t.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",t[t.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",t[t.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",t[t.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",t[t.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",t[t.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",t[t.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",t[t.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",t[t.BAD_GATEWAY=502]="BAD_GATEWAY",t[t.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",t[t.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",t[t.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",t[t.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",t[t.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})($||($={}));class te extends Error{constructor(e,r){super(r),this.statusCode=e}}class kr extends te{constructor(){super($.INTERNAL_SERVER_ERROR,"An unknown error occurred.")}}class Or extends te{}class Ur extends te{}class vr extends te{}class Pr extends te{}const fe="https://api.revenuecat.com",Me="rcbilling/v1";async function Lr(t,e,r,n){const i=await fetch(`${fe}/${Me}/subscribe`,{method:"POST",headers:{Authorization:`Bearer ${t._API_KEY}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({app_user_id:e,product_id:r,email:n})});if(i.status===$.BAD_REQUEST)throw new Or(i.status);if(i.status===$.TOO_MANY_REQUESTS)throw new Pr(i.status);if(i.status===$.CONFLICT)throw new Ur(i.status);if(i.status===$.INTERNAL_SERVER_ERROR)throw new vr(i.status);if(i.status===$.OK||i.status===$.CREATED){const l=await i.json();return Un(l)}throw new kr}function Fr(t){P(t,"svelte-1xwsiii",`.rcb-ui-container.svelte-1xwsiii{color-scheme:none;font-family:"PP Object Sans",
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
sans-serif}.rcb-ui-layout.svelte-1xwsiii{display:flex;justify-content:center;align-items:flex-start}.rcb-ui-aside.svelte-1xwsiii{margin-right:1rem}@media screen and (max-width: 60rem){.rcb-ui-layout.svelte-1xwsiii{flex-direction:column;align-items:center;justify-content:flex-end;height:100%}.rcb-ui-aside.svelte-1xwsiii{margin-right:0;margin-bottom:1rem}}`)}function qe(t){let e,r,n,i=t[1].isSandbox(),l;r=new Ve({props:{dark:!0,title:"OpenScratches, Inc.",$$slots:{default:[Sr]},$$scope:{ctx:t}}});let o=i&&ze();return{c(){e=C("div"),B(r.$$.fragment),n=U(),o&&o.c(),I(e,"class","rcb-ui-aside svelte-1xwsiii")},m(s,c){h(s,e,c),w(r,e,null),M(e,n),o&&o.m(e,null),l=!0},p(s,c){const f={};c&65540&&(f.$$scope={dirty:c,ctx:s}),r.$set(f),c&2&&(i=s[1].isSandbox()),i?o?c&2&&u(o,1):(o=ze(),o.c(),u(o,1),o.m(e,null)):o&&(F(),A(o,1,1,()=>{o=null}),S())},i(s){l||(u(r.$$.fragment,s),u(o),l=!0)},o(s){A(r.$$.fragment,s),A(o),l=!1},d(s){s&&g(e),b(r),o&&o.d()}}}function We(t){let e,r;return e=new Ye({props:{productDetails:t[2],onContinue:t[7],onClose:t[6]}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){const l={};i&4&&(l.productDetails=n[2]),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Sr(t){let e,r,n=t[2]&&We(t);return{c(){n&&n.c(),e=W()},m(i,l){n&&n.m(i,l),h(i,e,l),r=!0},p(i,l){i[2]?n?(n.p(i,l),l&4&&u(n,1)):(n=We(i),n.c(),u(n,1),n.m(e.parentNode,e)):n&&(F(),A(n,1,1,()=>{n=null}),S())},i(i){r||(u(n),r=!0)},o(i){A(n),r=!1},d(i){i&&g(e),n&&n.d(i)}}}function ze(t){let e,r;return e=new Nt({}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Xe(t){let e,r;return e=new Ye({props:{productDetails:t[2],onContinue:t[7],onClose:t[6]}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){const l={};i&4&&(l.productDetails=n[2]),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Ze(t){let e,r;return e=new Re({}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function et(t){let e,r;return e=new nr({props:{purchases:t[1],onContinue:t[7],onClose:t[6],onError:t[8]}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){const l={};i&2&&(l.purchases=n[1]),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function tt(t){let e,r;return e=new Vn({props:{purchases:t[1],paymentInfoCollectionMetadata:t[3],onContinue:t[7],onClose:t[6],onError:t[8]}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p(n,i){const l={};i&2&&(l.purchases=n[1]),i&8&&(l.paymentInfoCollectionMetadata=n[3]),e.$set(l)},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function nt(t){let e,r;return e=new Re({}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function rt(t){let e,r;return e=new $t({}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function it(t){let e,r;return e=new gn({props:{onContinue:t[7]}}),{c(){B(e.$$.fragment)},m(n,i){w(e,n,i),r=!0},p:T,i(n){r||(u(e.$$.fragment,n),r=!0)},o(n){A(e.$$.fragment,n),r=!1},d(n){b(e,n)}}}function Yr(t){let e,r,n,i,l,o,s,c,f=t[4]==="present-offer"&&t[2]&&Xe(t),a=t[4]==="present-offer"&&!t[2]&&Ze(),m=t[4]==="needs-auth-info"&&et(t),p=t[4]==="needs-payment-info"&&t[3]&&tt(t),E=t[4]==="loading"&&nt(),D=t[4]==="error"&&rt(),_=t[4]==="success"&&it(t);return{c(){f&&f.c(),e=U(),a&&a.c(),r=U(),m&&m.c(),n=U(),p&&p.c(),i=U(),E&&E.c(),l=U(),D&&D.c(),o=U(),_&&_.c(),s=W()},m(d,Q){f&&f.m(d,Q),h(d,e,Q),a&&a.m(d,Q),h(d,r,Q),m&&m.m(d,Q),h(d,n,Q),p&&p.m(d,Q),h(d,i,Q),E&&E.m(d,Q),h(d,l,Q),D&&D.m(d,Q),h(d,o,Q),_&&_.m(d,Q),h(d,s,Q),c=!0},p(d,Q){d[4]==="present-offer"&&d[2]?f?(f.p(d,Q),Q&20&&u(f,1)):(f=Xe(d),f.c(),u(f,1),f.m(e.parentNode,e)):f&&(F(),A(f,1,1,()=>{f=null}),S()),d[4]==="present-offer"&&!d[2]?a?Q&20&&u(a,1):(a=Ze(),a.c(),u(a,1),a.m(r.parentNode,r)):a&&(F(),A(a,1,1,()=>{a=null}),S()),d[4]==="needs-auth-info"?m?(m.p(d,Q),Q&16&&u(m,1)):(m=et(d),m.c(),u(m,1),m.m(n.parentNode,n)):m&&(F(),A(m,1,1,()=>{m=null}),S()),d[4]==="needs-payment-info"&&d[3]?p?(p.p(d,Q),Q&24&&u(p,1)):(p=tt(d),p.c(),u(p,1),p.m(i.parentNode,i)):p&&(F(),A(p,1,1,()=>{p=null}),S()),d[4]==="loading"?E?Q&16&&u(E,1):(E=nt(),E.c(),u(E,1),E.m(l.parentNode,l)):E&&(F(),A(E,1,1,()=>{E=null}),S()),d[4]==="error"?D?Q&16&&u(D,1):(D=rt(),D.c(),u(D,1),D.m(o.parentNode,o)):D&&(F(),A(D,1,1,()=>{D=null}),S()),d[4]==="success"?_?(_.p(d,Q),Q&16&&u(_,1)):(_=it(d),_.c(),u(_,1),_.m(s.parentNode,s)):_&&(F(),A(_,1,1,()=>{_=null}),S())},i(d){c||(u(f),u(a),u(m),u(p),u(E),u(D),u(_),c=!0)},o(d){A(f),A(a),A(m),A(p),A(E),A(D),A(_),c=!1},d(d){d&&(g(e),g(r),g(n),g(i),g(l),g(o),g(s)),f&&f.d(d),a&&a.d(d),m&&m.d(d),p&&p.d(d),E&&E.d(d),D&&D.d(d),_&&_.d(d)}}}function Gr(t){let e,r=t[5].includes(t[4]),n,i,l,o=r&&qe(t);return i=new Ve({props:{$$slots:{default:[Yr]},$$scope:{ctx:t}}}),{c(){e=C("div"),o&&o.c(),n=U(),B(i.$$.fragment),I(e,"class","rcb-ui-layout svelte-1xwsiii")},m(s,c){h(s,e,c),o&&o.m(e,null),M(e,n),w(i,e,null),l=!0},p(s,c){c&16&&(r=s[5].includes(s[4])),r?o?(o.p(s,c),c&16&&u(o,1)):(o=qe(s),o.c(),u(o,1),o.m(e,n)):o&&(F(),A(o,1,1,()=>{o=null}),S());const f={};c&65566&&(f.$$scope={dirty:c,ctx:s}),i.$set(f)},i(s){l||(u(o),u(i.$$.fragment,s),l=!0)},o(s){A(o),A(i.$$.fragment,s),l=!1},d(s){s&&g(e),o&&o.d(),b(i)}}}function Hr(t){let e,r,n;return r=new Tr({props:{condition:t[0],$$slots:{default:[Gr]},$$scope:{ctx:t}}}),{c(){e=C("div"),B(r.$$.fragment),I(e,"class","rcb-ui-container svelte-1xwsiii")},m(i,l){h(i,e,l),w(r,e,null),n=!0},p(i,[l]){const o={};l&1&&(o.condition=i[0]),l&65566&&(o.$$scope={dirty:l,ctx:i}),r.$set(o)},i(i){n||(u(r.$$.fragment,i),n=!0)},o(i){A(r.$$.fragment,i),n=!1},d(i){i&&g(e),b(r)}}}function Kr(t,e,r){var R;let{asModal:n=!0}=e,{customerEmail:i}=e,{appUserId:l}=e,{rcPackage:o}=e,{onFinished:s}=e,{onClose:c}=e,{purchases:f}=e,a=null,m=null;const p=((R=o.rcBillingProduct)==null?void 0:R.id)??null;let E="present-offer";const D=["present-offer","needs-auth-info","needs-payment-info","loading"];we(async()=>{if(r(2,a=o.rcBillingProduct),E==="present-offer"){i?d():r(4,E="needs-auth-info");return}});const _=()=>{c()},d=()=>{if(p===null){r(4,E="error");return}else r(4,E="loading");Lr(f,l,p,i).then(v=>{if(v.nextAction==="collect_payment_info"){r(4,E="needs-payment-info"),r(3,m=v);return}r(4,E="success")}).catch(()=>{r(4,E="error")})},Q=v=>{if(E==="needs-auth-info"){v&&r(9,i=v.email),d();return}if(E==="needs-payment-info"){r(4,E="success");return}if(E==="success"||E==="error"){s();return}r(4,E="success")},O=()=>{r(4,E="error")};return t.$$set=v=>{"asModal"in v&&r(0,n=v.asModal),"customerEmail"in v&&r(9,i=v.customerEmail),"appUserId"in v&&r(10,l=v.appUserId),"rcPackage"in v&&r(11,o=v.rcPackage),"onFinished"in v&&r(12,s=v.onFinished),"onClose"in v&&r(13,c=v.onClose),"purchases"in v&&r(1,f=v.purchases)},[n,f,a,m,E,D,_,Q,O,i,l,o,s,c]}class jr extends k{constructor(e){super(),N(this,e,Kr,Hr,y,{asModal:0,customerEmail:9,appUserId:10,rcPackage:11,onFinished:12,onClose:13,purchases:1},Fr)}}function Jr(t){return new Date(t.expires_date)>new Date}function $r(t,e){return{identifier:t,isActive:Jr(e),originalPurchaseDate:new Date(e.purchase_date),expirationDate:new Date(e.expires_date),productIdentifier:e.product_identifier}}function xr(t){const e={},r={};for(const n in t){const i=$r(n,t[n]);e[n]=i,i.isActive&&(r[n]=i)}return{all:e,active:r}}function Vr(t){return t==null?null:new Date(t)}function qr(t){return{entitlements:xr(t.subscriber.entitlements),managementURL:t.subscriber.management_url,requestDate:new Date(t.request_date),firstSeenDate:new Date(t.subscriber.first_seen),originalPurchaseDate:Vr(t.subscriber.original_purchase_date)}}function Wr(t,e,r,n=10){return new Promise((l,o)=>{const s=(c=1)=>t.isEntitledTo(e,r).then(f=>{if(c>n)return l(!1);if(f)return l(!0);setTimeout(()=>s(c+1),1e3)}).catch(o);s()})}const ye="0.0.8";class zr{constructor(e,r){q(this,"_API_KEY",null);q(this,"_APP_USER_ID",null);q(this,"_PAYMENT_PROVIDER_SETTINGS",null);q(this,"toOfferings",(e,r)=>{const n=e.offerings.find(s=>s.identifier===e.current_offering_id)??null,i={};r.product_details.forEach(s=>{i[s.identifier]=s});const l=n==null?null:Ne(n,i),o={};return e.offerings.forEach(s=>{const c=Ne(s,i);c!=null&&(o[s.identifier]=c)}),Object.keys(o).length==0&&console.debug("Empty offerings. Please make sure you've configured offerings correctly in the RevenueCat dashboard and that the products are properly configured."),{all:o,current:l}});var n,i;this._API_KEY=e,this._PAYMENT_PROVIDER_SETTINGS=r,(!this._PAYMENT_PROVIDER_SETTINGS.stripe||!((n=this._PAYMENT_PROVIDER_SETTINGS.stripe)!=null&&n.accountId)||!((i=this._PAYMENT_PROVIDER_SETTINGS.stripe)!=null&&i.publishableKey))&&console.error("Project was build without the stripe payment provider settings set")}async getOfferings(e){const n=await(await fetch(`${fe}/v1/subscribers/${e}/offerings`,{headers:{Authorization:`Bearer ${this._API_KEY}`,"Content-Type":"application/json",Accept:"application/json","X-Platform":"web","X-Version":ye}})).json(),i=n.offerings.flatMap(s=>s.packages).map(s=>s.platform_product_identifier),o=await(await fetch(`${fe}/${Me}/subscribers/${e}/products?id=${i.join("&id=")}`,{headers:{Authorization:`Bearer ${this._API_KEY}`,"Content-Type":"application/json",Accept:"application/json","X-Platform":"web","X-Version":ye}})).json();return this.logMissingProductIds(i,o.product_details),this.toOfferings(n,o)}async isEntitledTo(e,r){const n=await fetch(`${fe}/${Me}/entitlements/${e}`,{headers:{Authorization:`Bearer ${this._API_KEY}`,"Content-Type":"application/json",Accept:"application/json"}});return n.status===404?!1:(await n.json()).entitlements.map(s=>s.lookup_key).includes(r)}purchasePackage(e,r,n,{customerEmail:i,htmlTarget:l}={}){let o=l??document.getElementById("rcb-ui-root");if(o===null){const f=document.createElement("div");f.className="rcb-ui-root",document.body.appendChild(f),o=f}if(o===null)throw new Error("Could not generate a mount point for the billing widget");const s=o,c=!l;return new Promise(f=>{new jr({target:s,props:{appUserId:e,rcPackage:r,customerEmail:i,onFinished:async()=>{const a=await Wr(this,e,n);f(a),s.innerHTML=""},onClose:()=>{f(!1),s.innerHTML=""},purchases:this,asModal:c}})})}async getCustomerInfo(e){const r=await fetch(`${fe}/v1/subscribers/${e}`,{headers:{Authorization:`Bearer ${this._API_KEY}`,"Content-Type":"application/json",Accept:"application/json","X-Platform":"web","X-Version":ye}}),n=r.status;if(n>=400)throw new te(n,await r.text());const i=await r.json();return qr(i)}logMissingProductIds(e,r){const n={};r.forEach(l=>n[l.identifier]=l);const i=[];e.forEach(l=>{n[l]===void 0&&i.push(l)}),i.length>0&&console.log("Could not find product data for product ids: ",i,". Please check that your product configuration is correct.")}isSandbox(){return this._API_KEY?this._API_KEY.startsWith("rcb_sb_"):!1}}G.Purchases=zr,Object.defineProperty(G,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(Y,K){typeof exports=="object"&&typeof module<"u"?K(exports):typeof define=="function"&&define.amd?define(["exports"],K):(Y=typeof globalThis<"u"?globalThis:Y||self,K(Y.Purchases={}))})(this,function(Y){"use strict";var ji=Object.defineProperty;var xi=(Y,K,z)=>K in Y?ji(Y,K,{enumerable:!0,configurable:!0,writable:!0,value:z}):Y[K]=z;var T=(Y,K,z)=>(xi(Y,typeof K!="symbol"?K+"":K,z),z);function K(t){return t!=null}const z=(t,e)=>({id:t.identifier,identifier:t.identifier,displayName:t.title,currentPrice:t.current_price,normalPeriodDuration:t.normal_period_duration,presentedOfferingIdentifier:e}),Bt=(t,e,r)=>{const n=r[e.platform_product_identifier];return n===void 0?null:{id:e.identifier,identifier:e.identifier,rcBillingProduct:z(n,t),packageType:yt(e.identifier)}},Ge=(t,e)=>{const r=t.packages.map(i=>Bt(t.identifier,i,e)).filter(K),n={};for(const i of r)i!=null&&(n[i.identifier]=i);return r.length==0?null:{id:t.identifier,identifier:t.identifier,displayName:t.description,metadata:t.metadata,packages:n,lifetimePackage:n.$rc_lifetime??null,annualPackage:n.$rc_annual??null,sixMonthPackage:n.$rc_six_month??null,threeMonthPackage:n.$rc_three_month??null,twoMonthPackage:n.$rc_two_month??null,monthlyPackage:n.$rc_monthly??null,weeklyPackage:n.$rc_weekly??null}};function yt(t){switch(t){case"$rc_lifetime":return"$rc_lifetime";case"$rc_annual":return"$rc_annual";case"$rc_six_month":return"$rc_six_month";case"$rc_three_month":return"$rc_three_month";case"$rc_two_month":return"$rc_two_month";case"$rc_monthly":return"$rc_monthly";case"$rc_weekly":return"$rc_weekly";default:return t.startsWith("$rc_")?"unknown":"custom"}}function Q(){}function Dt(t,e){for(const r in e)t[r]=e[r];return t}function Ye(t){return t()}function He(){return Object.create(null)}function ce(t){t.forEach(Ye)}function ae(t){return typeof t=="function"}function R(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Ee;function V(t,e){return t===e?!0:(Ee||(Ee=document.createElement("a")),Ee.href=e,t===Ee.href)}function Ke(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function Qt(t,e){const r=Ke(t.srcset),n=Ke(e||"");return n.length===r.length&&n.every(([i,l],s)=>l===r[s][1]&&(V(r[s][0],i)||V(i,r[s][0])))}function Pt(t){return Object.keys(t).length===0}function J(t,e,r,n){if(t){const i=Je(t,e,r,n);return t[0](i)}}function Je(t,e,r,n){return t[1]&&n?Dt(r.ctx.slice(),t[1](n(e))):r.ctx}function j(t,e,r,n){if(t[2]&&n){const i=t[2](n(r));if(e.dirty===void 0)return i;if(typeof i=="object"){const l=[],s=Math.max(e.dirty.length,i.length);for(let o=0;o<s;o+=1)l[o]=e.dirty[o]|i[o];return l}return e.dirty|i}return e.dirty}function x(t,e,r,n,i,l){if(i){const s=Je(e,r,n,l);t.p(s,i)}}function q(t){if(t.ctx.length>32){const e=[],r=t.ctx.length/32;for(let n=0;n<r;n++)e[n]=-1;return e}return-1}function ue(t){return t??""}function M(t,e){t.appendChild(e)}function L(t,e,r){const n=Mt(t);if(!n.getElementById(e)){const i=B("style");i.id=e,i.textContent=r,Tt(n,i)}}function Mt(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Tt(t,e){return M(t.head||t,e),e.sheet}function _(t,e,r){t.insertBefore(e,r||null)}function g(t){t.parentNode&&t.parentNode.removeChild(t)}function B(t){return document.createElement(t)}function S(t){return document.createTextNode(t)}function N(){return S(" ")}function X(){return S("")}function Ie(t,e,r,n){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)}function je(t){return function(e){return e.preventDefault(),t.call(this,e)}}function h(t,e,r){r==null?t.removeAttribute(e):t.getAttribute(e)!==r&&t.setAttribute(e,r)}const vt=["width","height"];function Nt(t,e){const r=Object.getOwnPropertyDescriptors(t.__proto__);for(const n in e)e[n]==null?t.removeAttribute(n):n==="style"?t.style.cssText=e[n]:n==="__value"?t.value=t[n]=e[n]:r[n]&&r[n].set&&vt.indexOf(n)===-1?t[n]=e[n]:h(t,n,e[n])}function Rt(t,e){Object.keys(e).forEach(r=>{Ut(t,r,e[r])})}function Ut(t,e,r){const n=e.toLowerCase();n in t?t[n]=typeof t[n]=="boolean"&&r===""?!0:r:e in t?t[e]=typeof t[e]=="boolean"&&r===""?!0:r:h(t,e,r)}function Ct(t){return/-/.test(t)?Rt:Nt}function Ot(t){return Array.from(t.childNodes)}function ne(t,e){e=""+e,t.data!==e&&(t.data=e)}function xe(t,e){t.value=e??""}function St(t,e,{bubbles:r=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:e,bubbles:r,cancelable:n})}let fe;function de(t){fe=t}function we(){if(!fe)throw new Error("Function called outside component initialization");return fe}function be(t){we().$$.on_mount.push(t)}function Lt(){const t=we();return(e,r,{cancelable:n=!1}={})=>{const i=t.$$.callbacks[e];if(i){const l=St(e,r,{cancelable:n});return i.slice().forEach(s=>{s.call(t,l)}),!l.defaultPrevented}return!0}}function Ft(t,e){return we().$$.context.set(t,e),e}function Gt(t){return we().$$.context.get(t)}function Yt(t,e){const r=t.$$.callbacks[e.type];r&&r.slice().forEach(n=>n.call(this,e))}const re=[],$e=[];let ie=[];const Ue=[],Ht=Promise.resolve();let Ce=!1;function Kt(){Ce||(Ce=!0,Ht.then(qe))}function Oe(t){ie.push(t)}function Jt(t){Ue.push(t)}const Se=new Set;let le=0;function qe(){if(le!==0)return;const t=fe;do{try{for(;le<re.length;){const e=re[le];le++,de(e),jt(e.$$)}}catch(e){throw re.length=0,le=0,e}for(de(null),re.length=0,le=0;$e.length;)$e.pop()();for(let e=0;e<ie.length;e+=1){const r=ie[e];Se.has(r)||(Se.add(r),r())}ie.length=0}while(re.length);for(;Ue.length;)Ue.pop()();Ce=!1,Se.clear(),de(t)}function jt(t){if(t.fragment!==null){t.update(),ce(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Oe)}}function xt(t){const e=[],r=[];ie.forEach(n=>t.indexOf(n)===-1?e.push(n):r.push(n)),r.forEach(n=>n()),ie=e}const ke=new Set;let Z;function F(){Z={r:0,c:[],p:Z}}function G(){Z.r||ce(Z.c),Z=Z.p}function a(t,e){t&&t.i&&(ke.delete(t),t.i(e))}function f(t,e,r,n){if(t&&t.o){if(ke.has(t))return;ke.add(t),Z.c.push(()=>{ke.delete(t),n&&(r&&t.d(1),n())}),t.o(e)}else n&&n()}function qt(t,e,r){const n=t.$$.props[e];n!==void 0&&(t.$$.bound[n]=r,r(t.$$.ctx[n]))}function $(t){t&&t.c()}function I(t,e,r){const{fragment:n,after_update:i}=t.$$;n&&n.m(e,r),Oe(()=>{const l=t.$$.on_mount.map(Ye).filter(ae);t.$$.on_destroy?t.$$.on_destroy.push(...l):ce(l),t.$$.on_mount=[]}),i.forEach(Oe)}function w(t,e){const r=t.$$;r.fragment!==null&&(xt(r.after_update),ce(r.on_destroy),r.fragment&&r.fragment.d(e),r.on_destroy=r.fragment=null,r.ctx=[])}function Vt(t,e){t.$$.dirty[0]===-1&&(re.push(t),Kt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function U(t,e,r,n,i,l,s=null,o=[-1]){const c=fe;de(t);const u=t.$$={fragment:null,ctx:[],props:l,update:Q,not_equal:i,bound:He(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:He(),dirty:o,skip_bound:!1,root:e.target||c.$$.root};s&&s(u.root);let p=!1;if(u.ctx=r?r(t,e.props||{},(m,E,...k)=>{const y=k.length?k[0]:E;return u.ctx&&i(u.ctx[m],u.ctx[m]=y)&&(!u.skip_bound&&u.bound[m]&&u.bound[m](y),p&&Vt(t,m)),E}):[],u.update(),p=!0,ce(u.before_update),u.fragment=n?n(u.ctx):!1,e.target){if(e.hydrate){const m=Ot(e.target);u.fragment&&u.fragment.l(m),m.forEach(g)}else u.fragment&&u.fragment.c();e.intro&&a(t.$$.fragment),I(t,e.target,e.anchor),qe()}de(c)}class C{constructor(){T(this,"$$");T(this,"$$set")}$destroy(){w(this,1),this.$destroy=Q}$on(e,r){if(!ae(r))return Q;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(r),()=>{const i=n.indexOf(r);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!Pt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Wt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Wt);function zt(t){L(t,"svelte-8uc6s0","aside.svelte-8uc6s0{color:yellowgreen;font-weight:bold;text-transform:uppercase;padding:0.5rem 0;width:100%;font-size:0.75rem;border-radius:0.5rem}")}function Xt(t){let e;return{c(){e=B("aside"),e.innerHTML="<span>Sandbox Mode</span>",h(e,"class","svelte-8uc6s0")},m(r,n){_(r,e,n)},p:Q,i:Q,o:Q,d(r){r&&g(e)}}}class Zt extends C{constructor(e){super(),U(this,e,null,Xt,R,{},zt)}}function en(t){L(t,"svelte-ujomz3",".rcb-modal-section.svelte-ujomz3{padding:0.5rem 0rem;display:flex}.rcb-modal-section.svelte-ujomz3:last-of-type{padding:0}")}function Le(t){let e,r;const n=t[2].default,i=J(n,t,t[1],null);return{c(){e=B(t[0]),i&&i.c(),Ct(t[0])(e,{class:ue("rcb-modal-section")+" svelte-ujomz3"})},m(l,s){_(l,e,s),i&&i.m(e,null),r=!0},p(l,s){i&&i.p&&(!r||s&2)&&x(i,n,l,l[1],r?j(n,l[1],s,null):q(l[1]),null)},i(l){r||(a(i,l),r=!0)},o(l){f(i,l),r=!1},d(l){l&&g(e),i&&i.d(l)}}}function tn(t){let e=t[0],r,n,i=t[0]&&Le(t);return{c(){i&&i.c(),r=X()},m(l,s){i&&i.m(l,s),_(l,r,s),n=!0},p(l,[s]){l[0]?e?R(e,l[0])?(i.d(1),i=Le(l),e=l[0],i.c(),i.m(r.parentNode,r)):i.p(l,s):(i=Le(l),e=l[0],i.c(),i.m(r.parentNode,r)):e&&(i.d(1),i=null,e=l[0])},i(l){n||(a(i,l),n=!0)},o(l){f(i,l),n=!1},d(l){l&&g(r),i&&i.d(l)}}}function nn(t,e,r){let{$$slots:n={},$$scope:i}=e,{as:l="section"}=e;return t.$$set=s=>{"as"in s&&r(0,l=s.as),"$$scope"in s&&r(1,i=s.$$scope)},[l,i,n]}class ee extends C{constructor(e){super(),U(this,e,nn,tn,R,{as:0},en)}}const rn={Y:"year",M:"month",W:"week",D:"day",H:"hour"},Ve=(t,e)=>{const r=t/100;return new Intl.NumberFormat("en-US",{style:"currency",currency:e}).format(r)},We=t=>{const e=t.slice(-1);return e==="D"?"daily":`${rn[e]}ly`};function ln(t){L(t,"svelte-1oa6nu8",".rcb-pricing-info.svelte-1oa6nu8{display:flex;flex-direction:column;height:10rem;justify-content:flex-end}.rcb-product-price.svelte-1oa6nu8{font-size:1.5rem}.rcb-product-duration.svelte-1oa6nu8{opacity:0.6}")}function sn(t){let e,r,n=t[0].displayName+"",i,l,s,o=t[0].currentPrice.currency+"",c,u=" ",p,m=Ve(t[0].currentPrice.amount,t[0].currentPrice.currency)+"",E,k,y,b,D=We(t[0].normalPeriodDuration)+"",v;return{c(){e=B("div"),r=B("span"),i=S(n),l=N(),s=B("span"),c=S(o),p=S(u),E=S(m),k=N(),y=B("span"),b=S("Billed "),v=S(D),h(s,"class","rcb-product-price svelte-1oa6nu8"),h(y,"class","rcb-product-duration svelte-1oa6nu8"),h(e,"class","rcb-pricing-info svelte-1oa6nu8")},m(d,A){_(d,e,A),M(e,r),M(r,i),M(e,l),M(e,s),M(s,c),M(s,p),M(s,E),M(e,k),M(e,y),M(y,b),M(y,v)},p(d,A){A&1&&n!==(n=d[0].displayName+"")&&ne(i,n),A&1&&o!==(o=d[0].currentPrice.currency+"")&&ne(c,o),A&1&&m!==(m=Ve(d[0].currentPrice.amount,d[0].currentPrice.currency)+"")&&ne(E,m),A&1&&D!==(D=We(d[0].normalPeriodDuration)+"")&&ne(v,D)},d(d){d&&g(e)}}}function on(t){let e,r;return e=new ee({props:{$$slots:{default:[sn]},$$scope:{ctx:t}}}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p(n,[i]){const l={};i&3&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function cn(t,e,r){let{productDetails:n}=e;return t.$$set=i=>{"productDetails"in i&&r(0,n=i.productDetails)},[n]}class ze extends C{constructor(e){super(),U(this,e,cn,on,R,{productDetails:0},ln)}}const an="data:image/gif;base64,R0lGODlhMgAyAPcBAAAAAAD/AAMDAwcHBxERERUVFSoqKi0tLTAwMDg4OD09PURERElJSUtLS1BQUFJSUlVVVVdXV1paWl9fX2NjY2ZmZmlpaWxsbG1tbXNzc3t7e39/f4GBgYKCgoSEhIaGhoeHh4iIiIuLi5KSkpSUlJaWlp2dnaGhoaOjo6SkpKWlpaenp6ioqKqqqqurq6ysrLCwsLGxsbS0tLa2tri4uLm5ub29vb6+vsDAwMHBwcLCwsXFxcjIyMnJyc3Nzc7OztPT09TU1NXV1dfX19nZ2dra2tvb29zc3N7e3uDg4OHh4eLi4uPj4+fn5+np6ezs7O7u7vDw8PHx8fLy8vPz8/X19fb29vj4+Pn5+fz8/P39/f7+/v///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFBAABACwAAAAAMgAyAIcAAAAA/wADAwMHBwcREREVFRUqKiotLS0wMDA4ODg9PT1ERERJSUlLS0tQUFBSUlJVVVVXV1daWlpfX19jY2NmZmZpaWlsbGxtbW1zc3N7e3t/f3+BgYGCgoKEhISGhoaHh4eIiIiLi4uSkpKUlJSWlpadnZ2hoaGjo6OkpKSlpaWnp6eoqKiqqqqrq6usrKywsLCxsbG0tLS2tra4uLi5ubm9vb2+vr7AwMDBwcHCwsLFxcXIyMjJycnNzc3Ozs7T09PU1NTV1dXX19fZ2dna2trb29vc3Nze3t7g4ODh4eHi4uLj4+Pn5+fp6ens7Ozu7u7w8PDx8fHy8vLz8/P19fX29vb4+Pj5+fn8/Pz9/f3+/v7///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8I/wCzcBFIcKDBgggPKkzIcCEXLlq4bIEokeLEiBcrYrTIcaNHjRobinQ4sqRCkBlTdtR44MBKlR9TmjQJQMBMkgZfdpwSMSYAACgpRtHpcSYSFUIa1mz448UQnAWDfmzSooUVmD9XVnnBwglMlDdvvMjhcOlCHit23CSqcUrVJiizpnTC4sXQmB1vZvmxwgYWhWYLznjRA+rJryqvxGhxxGNLjkVcwMCCN6ZeLkNevDCcRYYKJJfZptyCQwdiijl0CDxdlLPryw2lymY9WzTs17ijVq69mzbM28Bd8x7u23bu46F7i16uXEvw5ziJM5duGbl1k9OLN5cKvfvh7OC3b0jxTv6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GOPEgA5aCK0tKmQChRkGEMgPIiDDhoRYjTR56CPGwiooXN6oENQikhYsWP65MJXglx4sVMoZsJdikRosWOMYSRPJih9q3cOPKnWuRSxa7eO9O3cJFCxe+frdMDQgAIfkEBQUAAQAsBQADACAAEAAACKYAAwgcSLAgwQcODCpcyNDAAYYQAzhpaIDhFYY+NOBY6HAhkyETFRLZ0CGKQgMVDV4RAoQKQxMdUpx8aJAJECYQnWzYcMQgSoNVgAy5CHGGhhI+aRIkMgRnxCohNvQoiLDgEyFDskQUuINDiK1Hfpgc+ETKQi0nVGxNkkSrwCw/hiBxu7XuFidAhARpgqWu3yxIhgApEtLvVipIgARBYthvlKaNFQYEADs=";function un(t){let e,r;return{c(){e=B("img"),V(e.src,r=an)||h(e,"src",r),h(e,"alt","spinner")},m(n,i){_(n,e,i)},p:Q,i:Q,o:Q,d(n){n&&g(e)}}}class fn extends C{constructor(e){super(),U(this,e,null,un,R,{})}}function dn(t){L(t,"svelte-4wmtg7",".rcb-modal-loader.svelte-4wmtg7{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center}")}function mn(t){let e,r,n;return r=new fn({}),{c(){e=B("div"),$(r.$$.fragment),h(e,"class","rcb-modal-loader svelte-4wmtg7")},m(i,l){_(i,e,l),I(r,e,null),n=!0},p:Q,i(i){n||(a(r.$$.fragment,i),n=!0)},o(i){f(r.$$.fragment,i),n=!1},d(i){i&&g(e),w(r)}}}class Be extends C{constructor(e){super(),U(this,e,null,mn,R,{},dn)}}var me=(t=>(t.Started="started",t.InProgress="in_progress",t.Succeeded="succeeded",t.Failed="failed",t))(me||{}),ye=(t=>(t[t.SetupIntentCreationFailed=1]="SetupIntentCreationFailed",t[t.PaymentMethodCreationFailed=2]="PaymentMethodCreationFailed",t[t.PaymentChargeFailed=3]="PaymentChargeFailed",t))(ye||{}),O=(t=>(t[t.ErrorSettingUpPurchase=0]="ErrorSettingUpPurchase",t[t.ErrorChargingPayment=1]="ErrorChargingPayment",t[t.UnknownError=2]="UnknownError",t[t.NetworkError=3]="NetworkError",t[t.StripeError=4]="StripeError",t[t.MissingEmailError=5]="MissingEmailError",t))(O||{});class H extends Error{constructor(e,r,n){super(r),this.errorCode=e,this.underlyingErrorMessage=n}}class An{constructor(e,r=10){T(this,"operationSessionId",null);T(this,"backend");T(this,"maxNumberAttempts");T(this,"waitMSBetweenAttempts",1e3);this.backend=e,this.maxNumberAttempts=r}async startPurchase(e,r,n){const i=await this.backend.postSubscribe(e,r,n);return this.operationSessionId=i.operation_session_id,i}async pollCurrentPurchaseForCompletion(){const e=this.operationSessionId;if(!e)throw new H(0,"No purchase in progress");return new Promise((r,n)=>{const i=(l=1)=>{if(l>this.maxNumberAttempts){this.clearPurchaseInProgress(),n(new H(2,"Max attempts reached trying to get successful purchase status"));return}this.backend.getCheckoutStatus(e).then(s=>{switch(s.operation.status){case me.Started:case me.InProgress:setTimeout(()=>i(l+1),this.waitMSBetweenAttempts);break;case me.Succeeded:this.clearPurchaseInProgress(),r();return;case me.Failed:this.clearPurchaseInProgress(),this.handlePaymentError(s.operation.error,n)}}).catch(s=>{n(new H(3,s.message))})};i()})}clearPurchaseInProgress(){this.operationSessionId=null}handlePaymentError(e,r){if(e==null){r(new H(2,"Got an error status but error field is empty."));return}switch(e.code){case ye.SetupIntentCreationFailed:r(new H(0,"Setup intent creation failed"));return;case ye.PaymentMethodCreationFailed:r(new H(0,"Payment method creation failed"));return;case ye.PaymentChargeFailed:r(new H(1,"Payment charge failed"));return}}}function gn(t){L(t,"svelte-igat39","button.svelte-igat39{border:none;border-radius:3.5rem;font-size:1rem;cursor:pointer;height:3.5rem;color:black;background-color:#dfdfdf}button.intent-primary.svelte-igat39{background-color:#000;color:white;font-size:1rem}")}function _n(t){let e,r,n,i,l;const s=t[3].default,o=J(s,t,t[2],null);return{c(){e=B("button"),o&&o.c(),h(e,"class",r=ue(`intent-${t[0]}`)+" svelte-igat39"),e.disabled=t[1]},m(c,u){_(c,e,u),o&&o.m(e,null),n=!0,i||(l=Ie(e,"click",t[4]),i=!0)},p(c,[u]){o&&o.p&&(!n||u&4)&&x(o,s,c,c[2],n?j(s,c[2],u,null):q(c[2]),null),(!n||u&1&&r!==(r=ue(`intent-${c[0]}`)+" svelte-igat39"))&&h(e,"class",r),(!n||u&2)&&(e.disabled=c[1])},i(c){n||(a(o,c),n=!0)},o(c){f(o,c),n=!1},d(c){c&&g(e),o&&o.d(c),i=!1,l()}}}function pn(t,e,r){let{$$slots:n={},$$scope:i}=e,{intent:l="primary"}=e,{disabled:s=!1}=e;function o(c){Yt.call(this,t,c)}return t.$$set=c=>{"intent"in c&&r(0,l=c.intent),"disabled"in c&&r(1,s=c.disabled),"$$scope"in c&&r(2,i=c.$$scope)},[l,s,i,n,o]}class Ae extends C{constructor(e){super(),U(this,e,pn,_n,R,{intent:0,disabled:1},gn)}}function hn(t){L(t,"svelte-1f9z0o8","footer.svelte-1f9z0o8{display:flex;flex-direction:column}")}function En(t){let e,r;const n=t[1].default,i=J(n,t,t[0],null);return{c(){e=B("footer"),i&&i.c(),h(e,"class","rcb-modal-footer svelte-1f9z0o8")},m(l,s){_(l,e,s),i&&i.m(e,null),r=!0},p(l,[s]){i&&i.p&&(!r||s&1)&&x(i,n,l,l[0],r?j(n,l[0],s,null):q(l[0]),null)},i(l){r||(a(i,l),r=!0)},o(l){f(i,l),r=!1},d(l){l&&g(e),i&&i.d(l)}}}function In(t,e,r){let{$$slots:n={},$$scope:i}=e;return t.$$set=l=>{"$$scope"in l&&r(0,i=l.$$scope)},[i,n]}class De extends C{constructor(e){super(),U(this,e,In,En,R,{},hn)}}const wn="data:image/svg+xml,%3csvg%20width='124'%20height='124'%20viewBox='0%200%20124%20124'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='62'%20cy='62'%20r='62'%20fill='%23767676'/%3e%3cpath%20d='M87.6668%2041.504L82.4968%2036.334L62.0002%2056.8307L41.5035%2036.334L36.3335%2041.504L56.8302%2062.0006L36.3335%2082.4973L41.5035%2087.6673L62.0002%2067.1706L82.4968%2087.6673L87.6668%2082.4973L67.1702%2062.0006L87.6668%2041.504Z'%20fill='white'/%3e%3c/svg%3e";function bn(t){L(t,"svelte-7khg4b","img.svelte-7khg4b{width:7.75rem;height:7.75rem;margin:0 auto}")}function $n(t){let e,r;return{c(){e=B("img"),V(e.src,r=wn)||h(e,"src",r),h(e,"alt","icon"),h(e,"class","rcb-ui-asset-icon svelte-7khg4b")},m(n,i){_(n,e,i)},p:Q,i:Q,o:Q,d(n){n&&g(e)}}}class kn extends C{constructor(e){super(),U(this,e,null,$n,R,{},bn)}}function Bn(t){L(t,"svelte-18njhoa",'.column.svelte-18njhoa{display:flex;flex-direction:column;justify-content:flex-start;gap:var(--gap, "0.5rem")}')}function yn(t){let e,r,n;const i=t[2].default,l=J(i,t,t[1],null);return{c(){e=B("div"),l&&l.c(),h(e,"class","column svelte-18njhoa"),h(e,"style",r=`--gap:${t[0]};`)},m(s,o){_(s,e,o),l&&l.m(e,null),n=!0},p(s,[o]){l&&l.p&&(!n||o&2)&&x(l,i,s,s[1],n?j(i,s[1],o,null):q(s[1]),null),(!n||o&1&&r!==(r=`--gap:${s[0]};`))&&h(e,"style",r)},i(s){n||(a(l,s),n=!0)},o(s){f(l,s),n=!1},d(s){s&&g(e),l&&l.d(s)}}}function Dn(t,e,r){let{$$slots:n={},$$scope:i}=e,{gutter:l="0.5rem"}=e;return t.$$set=s=>{"gutter"in s&&r(0,l=s.gutter),"$$scope"in s&&r(1,i=s.$$scope)},[l,i,n]}class te extends C{constructor(e){super(),U(this,e,Dn,yn,R,{gutter:0},Bn)}}function Qn(t){L(t,"svelte-ahi052",".rcb-modal-error.svelte-ahi052{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center}.title.svelte-ahi052{font-size:24px}.subtitle.svelte-ahi052{font-size:16px}")}function Xe(t){let e,r,n,i,l;return{c(){e=S("If this error persists, please contact "),r=B("a"),n=S(t[0]),l=S("."),h(r,"href",i="mailto:"+t[0])},m(s,o){_(s,e,o),_(s,r,o),M(r,n),_(s,l,o)},p(s,o){o&1&&ne(n,s[0]),o&1&&i!==(i="mailto:"+s[0])&&h(r,"href",i)},d(s){s&&(g(e),g(r),g(l))}}}function Pn(t){let e,r,n,i=t[2]()+"",l,s,o=t[0]&&Xe(t);return{c(){e=B("span"),e.textContent="Something went wrong.",r=N(),n=B("span"),l=S(i),s=N(),o&&o.c(),h(e,"class","title svelte-ahi052"),h(n,"class","subtitle svelte-ahi052")},m(c,u){_(c,e,u),_(c,r,u),_(c,n,u),M(n,l),M(n,s),o&&o.m(n,null)},p(c,u){c[0]?o?o.p(c,u):(o=Xe(c),o.c(),o.m(n,null)):o&&(o.d(1),o=null)},d(c){c&&(g(e),g(r),g(n)),o&&o.d()}}}function Mn(t){let e,r,n,i;return e=new kn({}),n=new te({props:{gutter:"1rem",$$slots:{default:[Pn]},$$scope:{ctx:t}}}),{c(){$(e.$$.fragment),r=N(),$(n.$$.fragment)},m(l,s){I(e,l,s),_(l,r,s),I(n,l,s),i=!0},p(l,s){const o={};s&17&&(o.$$scope={dirty:s,ctx:l}),n.$set(o)},i(l){i||(a(e.$$.fragment,l),a(n.$$.fragment,l),i=!0)},o(l){f(e.$$.fragment,l),f(n.$$.fragment,l),i=!1},d(l){l&&g(r),w(e,l),w(n,l)}}}function Tn(t){let e,r,n;return r=new te({props:{gutter:"1rem",$$slots:{default:[Mn]},$$scope:{ctx:t}}}),{c(){e=B("div"),$(r.$$.fragment),h(e,"class","rcb-modal-error svelte-ahi052")},m(i,l){_(i,e,l),I(r,e,null),n=!0},p(i,l){const s={};l&17&&(s.$$scope={dirty:l,ctx:i}),r.$set(s)},i(i){n||(a(r.$$.fragment,i),n=!0)},o(i){f(r.$$.fragment,i),n=!1},d(i){i&&g(e),w(r)}}}function vn(t){let e;return{c(){e=S("Go back to app")},m(r,n){_(r,e,n)},d(r){r&&g(e)}}}function Nn(t){let e,r;return e=new Ae({props:{$$slots:{default:[vn]},$$scope:{ctx:t}}}),e.$on("click",function(){ae(t[1])&&t[1].apply(this,arguments)}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p(n,i){t=n;const l={};i&16&&(l.$$scope={dirty:i,ctx:t}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function Rn(t){let e,r,n,i;return e=new ee({props:{$$slots:{default:[Tn]},$$scope:{ctx:t}}}),n=new De({props:{$$slots:{default:[Nn]},$$scope:{ctx:t}}}),{c(){$(e.$$.fragment),r=N(),$(n.$$.fragment)},m(l,s){I(e,l,s),_(l,r,s),I(n,l,s),i=!0},p(l,s){const o={};s&17&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const c={};s&18&&(c.$$scope={dirty:s,ctx:l}),n.$set(c)},i(l){i||(a(e.$$.fragment,l),a(n.$$.fragment,l),i=!0)},o(l){f(e.$$.fragment,l),f(n.$$.fragment,l),i=!1},d(l){l&&g(r),w(e,l),w(n,l)}}}function Un(t){let e,r;return e=new te({props:{gutter:"2rem",$$slots:{default:[Rn]},$$scope:{ctx:t}}}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p(n,[i]){const l={};i&19&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function Cn(t,e,r){let{lastError:n}=e,{supportEmail:i=null}=e,{onContinue:l}=e;be(()=>{console.debug(`Displayed error: ${O[n.errorCode]}. Message: ${n.message??"None"}. Underlying error: ${n.underlyingErrorMessage??"None"}`)});function s(){switch(n.errorCode){case O.UnknownError:return"An unknown error occurred.";case O.ErrorSettingUpPurchase:return"Purchase not started due to an error.";case O.ErrorChargingPayment:return"Payment failed.";case O.NetworkError:return"Network error. Please check your internet connection.";case O.StripeError:return n.message;case O.MissingEmailError:return"Email is required to complete the purchase."}return n.message}return t.$$set=o=>{"lastError"in o&&r(3,n=o.lastError),"supportEmail"in o&&r(0,i=o.supportEmail),"onContinue"in o&&r(1,l=o.onContinue)},[i,l,s,n]}class On extends C{constructor(e){super(),U(this,e,Cn,Un,R,{lastError:3,supportEmail:0,onContinue:1},Qn)}}const Sn="data:image/svg+xml,%3csvg%20width='124'%20height='124'%20viewBox='0%200%20124%20124'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='62'%20cy='62'%20r='62'%20fill='%23576CDB'/%3e%3crect%20x='44.1116'%20y='56'%20width='27.5'%20height='11'%20transform='rotate(45%2044.1116%2056)'%20fill='white'/%3e%3crect%20x='79.1133'%20y='44.334'%20width='11'%20height='44'%20transform='rotate(45%2079.1133%2044.334)'%20fill='white'/%3e%3c/svg%3e";function Ln(t){L(t,"svelte-7khg4b","img.svelte-7khg4b{width:7.75rem;height:7.75rem;margin:0 auto}")}function Fn(t){let e,r;return{c(){e=B("img"),V(e.src,r=Sn)||h(e,"src",r),h(e,"alt","icon"),h(e,"class","rcb-ui-asset-icon svelte-7khg4b")},m(n,i){_(n,e,i)},p:Q,i:Q,o:Q,d(n){n&&g(e)}}}class Gn extends C{constructor(e){super(),U(this,e,null,Fn,R,{},Ln)}}function Yn(t){L(t,"svelte-1lcsna9",".rcb-modal-success.svelte-1lcsna9{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center}.title.svelte-1lcsna9{font-size:24px}.subtitle.svelte-1lcsna9{font-size:16px}")}function Hn(t){let e,r,n;return{c(){e=B("span"),e.textContent="Purchase Successful",r=N(),n=B("span"),n.textContent="Your plan is now active.",h(e,"class","title svelte-1lcsna9"),h(n,"class","subtitle svelte-1lcsna9")},m(i,l){_(i,e,l),_(i,r,l),_(i,n,l)},p:Q,d(i){i&&(g(e),g(r),g(n))}}}function Kn(t){let e,r,n,i;return e=new Gn({}),n=new te({props:{gutter:"1rem",$$slots:{default:[Hn]},$$scope:{ctx:t}}}),{c(){$(e.$$.fragment),r=N(),$(n.$$.fragment)},m(l,s){I(e,l,s),_(l,r,s),I(n,l,s),i=!0},p(l,s){const o={};s&2&&(o.$$scope={dirty:s,ctx:l}),n.$set(o)},i(l){i||(a(e.$$.fragment,l),a(n.$$.fragment,l),i=!0)},o(l){f(e.$$.fragment,l),f(n.$$.fragment,l),i=!1},d(l){l&&g(r),w(e,l),w(n,l)}}}function Jn(t){let e,r,n;return r=new te({props:{gutter:"1rem",$$slots:{default:[Kn]},$$scope:{ctx:t}}}),{c(){e=B("div"),$(r.$$.fragment),h(e,"class","rcb-modal-success svelte-1lcsna9")},m(i,l){_(i,e,l),I(r,e,null),n=!0},p(i,l){const s={};l&2&&(s.$$scope={dirty:l,ctx:i}),r.$set(s)},i(i){n||(a(r.$$.fragment,i),n=!0)},o(i){f(r.$$.fragment,i),n=!1},d(i){i&&g(e),w(r)}}}function jn(t){let e;return{c(){e=S("Go back to app")},m(r,n){_(r,e,n)},d(r){r&&g(e)}}}function xn(t){let e,r;return e=new Ae({props:{intent:"secondary",$$slots:{default:[jn]},$$scope:{ctx:t}}}),e.$on("click",function(){ae(t[0])&&t[0].apply(this,arguments)}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p(n,i){t=n;const l={};i&2&&(l.$$scope={dirty:i,ctx:t}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function qn(t){let e,r,n,i;return e=new ee({props:{$$slots:{default:[Jn]},$$scope:{ctx:t}}}),n=new De({props:{$$slots:{default:[xn]},$$scope:{ctx:t}}}),{c(){$(e.$$.fragment),r=N(),$(n.$$.fragment)},m(l,s){I(e,l,s),_(l,r,s),I(n,l,s),i=!0},p(l,s){const o={};s&2&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const c={};s&3&&(c.$$scope={dirty:s,ctx:l}),n.$set(c)},i(l){i||(a(e.$$.fragment,l),a(n.$$.fragment,l),i=!0)},o(l){f(e.$$.fragment,l),f(n.$$.fragment,l),i=!1},d(l){l&&g(r),w(e,l),w(n,l)}}}function Vn(t){let e,r;return e=new te({props:{gutter:"2rem",$$slots:{default:[qn]},$$scope:{ctx:t}}}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p(n,[i]){const l={};i&3&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function Wn(t,e,r){let{onContinue:n}=e;return t.$$set=i=>{"onContinue"in i&&r(0,n=i.onContinue)},[n]}class zn extends C{constructor(e){super(),U(this,e,Wn,Vn,R,{onContinue:0},Yn)}}function Xn(t,e,r,n,i={}){const l=r.create(e,i);return l.mount(t),l.on("change",s=>n("change",s)),l.on("ready",s=>n("ready",s)),l.on("focus",s=>n("focus",s)),l.on("blur",s=>n("blur",s)),l.on("escape",s=>n("escape",s)),l.on("click",s=>n("click",s)),l.on("loaderror",s=>n("loaderror",s)),l.on("loaderstart",s=>n("loaderstart",s)),l.on("networkschange",s=>n("networkschange",s)),l}const Zn=typeof window>"u";function er(t){if(!Zn)return t.registerAppInfo({name:"svelte-stripe-js",url:"https://svelte-stripe-js.vercel.app"})}function tr(t){let e;return{c(){e=B("div")},m(r,n){_(r,e,n),t[6](e)},p:Q,i:Q,o:Q,d(r){r&&g(e),t[6](null)}}}function nr(t,e,r){let n,i;const l=Lt(),{elements:s}=Gt("stripe");let{options:o=void 0}=e;be(()=>(n=Xn(i,"payment",s,l,o),()=>n.destroy()));function c(){n.blur()}function u(){n.clear()}function p(){n.destroy()}function m(){n.focus()}function E(k){$e[k?"unshift":"push"](()=>{i=k,r(0,i)})}return t.$$set=k=>{"options"in k&&r(1,o=k.options)},[i,o,c,u,p,m,E]}class rr extends C{constructor(e){super(),U(this,e,nr,tr,R,{options:1,blur:2,clear:3,destroy:4,focus:5})}get blur(){return this.$$.ctx[2]}get clear(){return this.$$.ctx[3]}get destroy(){return this.$$.ctx[4]}get focus(){return this.$$.ctx[5]}}function Ze(t){let e;const r=t[15].default,n=J(r,t,t[14],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,l){n&&n.p&&(!e||l&16384)&&x(n,r,i,i[14],e?j(r,i[14],l,null):q(i[14]),null)},i(i){e||(a(n,i),e=!0)},o(i){f(n,i),e=!1},d(i){n&&n.d(i)}}}function ir(t){let e,r,n=t[1]&&t[0]&&Ze(t);return{c(){n&&n.c(),e=X()},m(i,l){n&&n.m(i,l),_(i,e,l),r=!0},p(i,[l]){i[1]&&i[0]?n?(n.p(i,l),l&3&&a(n,1)):(n=Ze(i),n.c(),a(n,1),n.m(e.parentNode,e)):n&&(F(),f(n,1,1,()=>{n=null}),G())},i(i){r||(a(n),r=!0)},o(i){f(n),r=!1},d(i){i&&g(e),n&&n.d(i)}}}function lr(t,e,r){let n,{$$slots:i={},$$scope:l}=e,{stripe:s}=e,{mode:o=void 0}=e,{theme:c="stripe"}=e,{variables:u={}}=e,{rules:p={}}=e,{labels:m="above"}=e,{loader:E="auto"}=e,{fonts:k=[]}=e,{locale:y="auto"}=e,{currency:b=void 0}=e,{amount:D=void 0}=e,{clientSecret:v=void 0}=e,{elements:d=null}=e;return t.$$set=A=>{"stripe"in A&&r(1,s=A.stripe),"mode"in A&&r(2,o=A.mode),"theme"in A&&r(3,c=A.theme),"variables"in A&&r(4,u=A.variables),"rules"in A&&r(5,p=A.rules),"labels"in A&&r(6,m=A.labels),"loader"in A&&r(7,E=A.loader),"fonts"in A&&r(8,k=A.fonts),"locale"in A&&r(9,y=A.locale),"currency"in A&&r(10,b=A.currency),"amount"in A&&r(11,D=A.amount),"clientSecret"in A&&r(12,v=A.clientSecret),"elements"in A&&r(0,d=A.elements),"$$scope"in A&&r(14,l=A.$$scope)},t.$$.update=()=>{t.$$.dirty&120&&r(13,n={theme:c,variables:u,rules:p,labels:m}),t.$$.dirty&16263&&s&&!d&&(r(0,d=s.elements({mode:o,currency:b,amount:D,appearance:n,clientSecret:v,fonts:k,loader:E,locale:y})),er(s),Ft("stripe",{stripe:s,elements:d})),t.$$.dirty&8705&&d&&d.update({appearance:n,locale:y})},[d,s,o,c,u,p,m,E,k,y,b,D,v,n,l,i]}class sr extends C{constructor(e){super(),U(this,e,lr,ir,R,{stripe:1,mode:2,theme:3,variables:4,rules:5,labels:6,loader:7,fonts:8,locale:9,currency:10,amount:11,clientSecret:12,elements:0})}}var et="https://js.stripe.com/v3",or=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,tt="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",cr=function(){for(var e=document.querySelectorAll('script[src^="'.concat(et,'"]')),r=0;r<e.length;r++){var n=e[r];if(or.test(n.src))return n}return null},nt=function(e){var r=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(et).concat(r);var i=document.head||document.body;if(!i)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return i.appendChild(n),n},ar=function(e,r){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"2.3.0",startTime:r})},ge=null,Qe=null,Pe=null,ur=function(e){return function(){e(new Error("Failed to load Stripe.js"))}},fr=function(e,r){return function(){window.Stripe?e(window.Stripe):r(new Error("Stripe.js not available"))}},dr=function(e){return ge!==null?ge:(ge=new Promise(function(r,n){if(typeof window>"u"||typeof document>"u"){r(null);return}if(window.Stripe&&e&&console.warn(tt),window.Stripe){r(window.Stripe);return}try{var i=cr();if(i&&e)console.warn(tt);else if(!i)i=nt(e);else if(i&&Pe!==null&&Qe!==null){var l;i.removeEventListener("load",Pe),i.removeEventListener("error",Qe),(l=i.parentNode)===null||l===void 0||l.removeChild(i),i=nt(e)}Pe=fr(r,n),Qe=ur(n),i.addEventListener("load",Pe),i.addEventListener("error",Qe)}catch(s){n(s);return}}),ge.catch(function(r){return ge=null,Promise.reject(r)}))},mr=function(e,r,n){if(e===null)return null;var i=e.apply(void 0,r);return ar(i,n),i},_e,rt=!1,it=function(){return _e||(_e=dr(null).catch(function(e){return _e=null,Promise.reject(e)}),_e)};Promise.resolve().then(function(){return it()}).catch(function(t){rt||console.warn(t)});var Ar=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];rt=!0;var i=Date.now();return it().then(function(l){return mr(l,r,i)})};function gr(t){L(t,"svelte-1fwwzeb",".rcb-stripe-elements-container.svelte-1fwwzeb{width:100%;margin-bottom:1rem}")}function _r(t){let e,r;return e=new Be({}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p:Q,i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function pr(t){let e,r,n,i,l,s;function o(u){t[10](u)}let c={stripe:t[2],clientSecret:t[4],loader:"always",$$slots:{default:[Br]},$$scope:{ctx:t}};return t[1]!==void 0&&(c.elements=t[1]),r=new sr({props:c}),$e.push(()=>qt(r,"elements",o)),{c(){e=B("form"),$(r.$$.fragment)},m(u,p){_(u,e,p),I(r,e,null),i=!0,l||(s=Ie(e,"submit",je(t[5])),l=!0)},p(u,p){const m={};p&4&&(m.stripe=u[2]),p&4105&&(m.$$scope={dirty:p,ctx:u}),!n&&p&2&&(n=!0,m.elements=u[1],Jt(()=>n=!1)),r.$set(m)},i(u){i||(a(r.$$.fragment,u),i=!0)},o(u){f(r.$$.fragment,u),i=!1},d(u){u&&g(e),w(r),l=!1,s()}}}function hr(t){let e,r,n;return r=new rr({}),{c(){e=B("div"),$(r.$$.fragment),h(e,"class","rcb-stripe-elements-container svelte-1fwwzeb")},m(i,l){_(i,e,l),I(r,e,null),n=!0},p:Q,i(i){n||(a(r.$$.fragment,i),n=!0)},o(i){f(r.$$.fragment,i),n=!1},d(i){i&&g(e),w(r)}}}function Er(t){let e;return{c(){e=S("Pay")},m(r,n){_(r,e,n)},d(r){r&&g(e)}}}function Ir(t){let e;return{c(){e=S("Processing...")},m(r,n){_(r,e,n)},d(r){r&&g(e)}}}function wr(t){let e;function r(l,s){return l[3]?Ir:Er}let n=r(t),i=n(t);return{c(){i.c(),e=X()},m(l,s){i.m(l,s),_(l,e,s)},p(l,s){n!==(n=r(l))&&(i.d(1),i=n(l),i&&(i.c(),i.m(e.parentNode,e)))},d(l){l&&g(e),i.d(l)}}}function br(t){let e;return{c(){e=S("Close")},m(r,n){_(r,e,n)},d(r){r&&g(e)}}}function $r(t){let e,r,n,i;return e=new Ae({props:{disabled:t[3],$$slots:{default:[wr]},$$scope:{ctx:t}}}),n=new Ae({props:{disabled:t[3],intent:"secondary",$$slots:{default:[br]},$$scope:{ctx:t}}}),n.$on("click",function(){ae(t[0])&&t[0].apply(this,arguments)}),{c(){$(e.$$.fragment),r=N(),$(n.$$.fragment)},m(l,s){I(e,l,s),_(l,r,s),I(n,l,s),i=!0},p(l,s){t=l;const o={};s&8&&(o.disabled=t[3]),s&4104&&(o.$$scope={dirty:s,ctx:t}),e.$set(o);const c={};s&8&&(c.disabled=t[3]),s&4096&&(c.$$scope={dirty:s,ctx:t}),n.$set(c)},i(l){i||(a(e.$$.fragment,l),a(n.$$.fragment,l),i=!0)},o(l){f(e.$$.fragment,l),f(n.$$.fragment,l),i=!1},d(l){l&&g(r),w(e,l),w(n,l)}}}function kr(t){let e,r;return e=new te({props:{$$slots:{default:[$r]},$$scope:{ctx:t}}}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p(n,i){const l={};i&4105&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function Br(t){let e,r,n,i;return e=new ee({props:{$$slots:{default:[hr]},$$scope:{ctx:t}}}),n=new De({props:{$$slots:{default:[kr]},$$scope:{ctx:t}}}),{c(){$(e.$$.fragment),r=N(),$(n.$$.fragment)},m(l,s){I(e,l,s),_(l,r,s),I(n,l,s),i=!0},p(l,s){const o={};s&4096&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const c={};s&4105&&(c.$$scope={dirty:s,ctx:l}),n.$set(c)},i(l){i||(a(e.$$.fragment,l),a(n.$$.fragment,l),i=!0)},o(l){f(e.$$.fragment,l),f(n.$$.fragment,l),i=!1},d(l){l&&g(r),w(e,l),w(n,l)}}}function yr(t){let e,r,n,i;const l=[pr,_r],s=[];function o(c,u){return c[2]&&c[4]?0:1}return r=o(t),n=s[r]=l[r](t),{c(){e=B("div"),n.c()},m(c,u){_(c,e,u),s[r].m(e,null),i=!0},p(c,[u]){let p=r;r=o(c),r===p?s[r].p(c,u):(F(),f(s[p],1,1,()=>{s[p]=null}),G(),n=s[r],n?n.p(c,u):(n=s[r]=l[r](c),n.c()),a(n,1),n.m(e,null))},i(c){i||(a(n),i=!0)},o(c){f(n),i=!1},d(c){c&&g(e),s[r].d()}}}function Dr(t,e,r){let{onClose:n}=e,{onContinue:i}=e,{onError:l}=e,{purchases:s}=e,{paymentInfoCollectionMetadata:o}=e;const c=o.data.client_secret;let u=null,p,m=!1,E;be(async()=>{const b=o.data.publishable_api_key,D=o.data.stripe_account_id;if(!b||!D)throw new Error("Stripe publishable key or account ID not found");r(2,u=await Ar(b,{stripeAccount:D}))});const k=async()=>{if(m||!u||!E)return;r(3,m=!0);const b=await u.confirmSetup({elements:E,redirect:"if_required"});b.error?(r(3,m=!1),l(new H(O.StripeError,b.error.message))):i()};function y(b){p=b,r(1,p)}return t.$$set=b=>{"onClose"in b&&r(0,n=b.onClose),"onContinue"in b&&r(6,i=b.onContinue),"onError"in b&&r(7,l=b.onError),"purchases"in b&&r(8,s=b.purchases),"paymentInfoCollectionMetadata"in b&&r(9,o=b.paymentInfoCollectionMetadata)},t.$$.update=()=>{t.$$.dirty&2&&p&&p._elements.length>0&&(E=p)},[n,p,u,m,c,k,i,l,s,o,y]}class Qr extends C{constructor(e){super(),U(this,e,Dr,yr,R,{onClose:0,onContinue:6,onError:7,purchases:8,paymentInfoCollectionMetadata:9},gr)}}function Pr(t){L(t,"svelte-1xardyz",".form-container.svelte-1xardyz{display:flex;flex-direction:column;width:100%}.form-label.svelte-1xardyz{margin-top:0.5rem;margin-bottom:0.5rem;display:block}.form-input.svelte-1xardyz{margin-bottom:1rem}.title.svelte-1xardyz{font-size:1.5rem;margin:0;margin-bottom:0.5rem}input.svelte-1xardyz{width:94%;padding:0.5rem;border:1px solid #ccc;border-radius:0.25rem}")}function Mr(t){let e;return{c(){e=B("span"),e.textContent="User authentication",h(e,"class","title svelte-1xardyz")},m(r,n){_(r,e,n)},p:Q,d(r){r&&g(e)}}}function Tr(t){let e,r,n,i,l,s,o;return{c(){e=B("div"),r=B("div"),r.innerHTML='<label for="email">E-mail</label>',n=N(),i=B("div"),l=B("input"),h(r,"class","form-label svelte-1xardyz"),h(l,"name","email"),h(l,"placeholder","john@appleseed.com"),h(l,"class","svelte-1xardyz"),h(i,"class","form-input svelte-1xardyz"),h(e,"class","form-container svelte-1xardyz")},m(c,u){_(c,e,u),M(e,r),M(e,n),M(e,i),M(i,l),xe(l,t[0]),s||(o=Ie(l,"input",t[3]),s=!0)},p(c,u){u&1&&l.value!==c[0]&&xe(l,c[0])},d(c){c&&g(e),s=!1,o()}}}function vr(t){let e;return{c(){e=S("Continue")},m(r,n){_(r,e,n)},d(r){r&&g(e)}}}function Nr(t){let e,r;return e=new Ae({props:{$$slots:{default:[vr]},$$scope:{ctx:t}}}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p(n,i){const l={};i&16&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function Rr(t){let e,r,n,i,l,s,o,c,u,p;return n=new ee({props:{$$slots:{default:[Mr]},$$scope:{ctx:t}}}),l=new ee({props:{$$slots:{default:[Tr]},$$scope:{ctx:t}}}),o=new De({props:{$$slots:{default:[Nr]},$$scope:{ctx:t}}}),{c(){e=B("div"),r=B("form"),$(n.$$.fragment),i=N(),$(l.$$.fragment),s=N(),$(o.$$.fragment)},m(m,E){_(m,e,E),M(e,r),I(n,r,null),M(r,i),I(l,r,null),M(r,s),I(o,r,null),c=!0,u||(p=Ie(r,"submit",je(t[1])),u=!0)},p(m,[E]){const k={};E&16&&(k.$$scope={dirty:E,ctx:m}),n.$set(k);const y={};E&17&&(y.$$scope={dirty:E,ctx:m}),l.$set(y);const b={};E&16&&(b.$$scope={dirty:E,ctx:m}),o.$set(b)},i(m){c||(a(n.$$.fragment,m),a(l.$$.fragment,m),a(o.$$.fragment,m),c=!0)},o(m){f(n.$$.fragment,m),f(l.$$.fragment,m),f(o.$$.fragment,m),c=!1},d(m){m&&g(e),w(n),w(l),w(o),u=!1,p()}}}function Ur(t,e,r){let n,{onContinue:i}=e;const l=async()=>{i({email:n})};function s(){n=this.value,r(0,n)}return t.$$set=o=>{"onContinue"in o&&r(2,i=o.onContinue)},r(0,n=""),[n,l,i,s]}class Cr extends C{constructor(e){super(),U(this,e,Ur,Rr,R,{onContinue:2},Pr)}}function Or(t){L(t,"svelte-10u48yl",".rcb-app-icon.svelte-10u48yl{width:2.5rem;height:2.5rem;border-radius:0.75rem;box-shadow:0px 1px 10px 0px rgba(0, 0, 0, 0.1);margin-right:1rem}.rcb-app-icon-picture-container.svelte-10u48yl{height:2.5rem}.rcb-app-icon.loading.svelte-10u48yl{background-color:gray}")}function Sr(t){let e;return{c(){e=B("div"),h(e,"class","rcb-app-icon loading svelte-10u48yl")},m(r,n){_(r,e,n)},p:Q,d(r){r&&g(e)}}}function Lr(t){let e,r,n,i,l,s;return{c(){e=B("picture"),r=B("source"),i=N(),l=B("img"),h(r,"type","image/webp"),Qt(r,n=t[1])||h(r,"srcset",n),h(l,"class","rcb-app-icon svelte-10u48yl"),V(l.src,s=t[0])||h(l,"src",s),h(l,"alt","App icon"),h(e,"class","rcb-app-icon-picture-container svelte-10u48yl")},m(o,c){_(o,e,c),M(e,r),M(e,i),M(e,l)},p(o,c){c&2&&n!==(n=o[1])&&h(r,"srcset",n),c&1&&!V(l.src,s=o[0])&&h(l,"src",s)},d(o){o&&g(e)}}}function Fr(t){let e;function r(l,s){return l[0]!==null?Lr:Sr}let n=r(t),i=n(t);return{c(){i.c(),e=X()},m(l,s){i.m(l,s),_(l,e,s)},p(l,[s]){n===(n=r(l))&&i?i.p(l,s):(i.d(1),i=n(l),i&&(i.c(),i.m(e.parentNode,e)))},i:Q,o:Q,d(l){l&&g(e),i.d(l)}}}function Gr(t,e,r){let{src:n=null}=e,{srcWebp:i=null}=e;return t.$$set=l=>{"src"in l&&r(0,n=l.src),"srcWebp"in l&&r(1,i=l.srcWebp)},[n,i]}class lt extends C{constructor(e){super(),U(this,e,Gr,Fr,R,{src:0,srcWebp:1},Or)}}const Yr="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.5'%20clip-path='url(%23clip0_344_3390)'%3e%3cpath%20d='M7%2018C5.9%2018%205.01%2018.9%205.01%2020C5.01%2021.1%205.9%2022%207%2022C8.1%2022%209%2021.1%209%2020C9%2018.9%208.1%2018%207%2018ZM1%202V4H3L6.6%2011.59L5.25%2014.04C5.09%2014.32%205%2014.65%205%2015C5%2016.1%205.9%2017%207%2017H19V15H7.42C7.28%2015%207.17%2014.89%207.17%2014.75L7.2%2014.63L8.1%2013H15.55C16.3%2013%2016.96%2012.59%2017.3%2011.97L20.88%205.48C20.96%205.34%2021%205.17%2021%205C21%204.45%2020.55%204%2020%204H5.21L4.27%202H1ZM17%2018C15.9%2018%2015.01%2018.9%2015.01%2020C15.01%2021.1%2015.9%2022%2017%2022C18.1%2022%2019%2021.1%2019%2020C19%2018.9%2018.1%2018%2017%2018Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_344_3390'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";function Hr(t){let e,r;return{c(){e=B("img"),V(e.src,r=Yr)||h(e,"src",r),h(e,"alt","icon"),h(e,"class","rcb-ui-asset-icon")},m(n,i){_(n,e,i)},p:Q,i:Q,o:Q,d(n){n&&g(e)}}}class Kr extends C{constructor(e){super(),U(this,e,null,Hr,R,{})}}const Me=t=>`https://da08ctfrofx1b.cloudfront.net/${t}`;function Jr(t){L(t,"svelte-fcqjlc",".app-title.svelte-fcqjlc{font-weight:500;margin:0.5rem 0;font-size:1rem}.rcb-header-layout.svelte-fcqjlc{display:flex;justify-content:space-between;align-items:center;width:100%}.rcb-header-layout__business-info.svelte-fcqjlc{display:flex;align-items:center}")}function jr(t){let e,r;return e=new lt({}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p:Q,i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function xr(t){let e,r,n=t[0].seller_company_name+"",i,l,s=t[0].app_icon_webp!==null&&t[0].app_icon!==null&&st(t);return{c(){s&&s.c(),e=N(),r=B("span"),i=S(n),h(r,"class","app-title svelte-fcqjlc")},m(o,c){s&&s.m(o,c),_(o,e,c),_(o,r,c),M(r,i),l=!0},p(o,c){o[0].app_icon_webp!==null&&o[0].app_icon!==null?s?(s.p(o,c),c&1&&a(s,1)):(s=st(o),s.c(),a(s,1),s.m(e.parentNode,e)):s&&(F(),f(s,1,1,()=>{s=null}),G()),(!l||c&1)&&n!==(n=o[0].seller_company_name+"")&&ne(i,n)},i(o){l||(a(s),l=!0)},o(o){f(s),l=!1},d(o){o&&(g(e),g(r)),s&&s.d(o)}}}function st(t){let e,r;return e=new lt({props:{src:Me(t[0].app_icon),srcWebp:Me(t[0].app_icon_webp)}}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p(n,i){const l={};i&1&&(l.src=Me(n[0].app_icon)),i&1&&(l.srcWebp=Me(n[0].app_icon_webp)),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function qr(t){let e,r,n,i,l,s,o;const c=[xr,jr],u=[];function p(m,E){return m[0]!==null?0:1}return n=p(t),i=u[n]=c[n](t),s=new Kr({}),{c(){e=B("div"),r=B("div"),i.c(),l=N(),$(s.$$.fragment),h(r,"class","rcb-header-layout__business-info svelte-fcqjlc"),h(e,"class","rcb-header-layout svelte-fcqjlc")},m(m,E){_(m,e,E),M(e,r),u[n].m(r,null),M(e,l),I(s,e,null),o=!0},p(m,E){let k=n;n=p(m),n===k?u[n].p(m,E):(F(),f(u[k],1,1,()=>{u[k]=null}),G(),i=u[n],i?i.p(m,E):(i=u[n]=c[n](m),i.c()),a(i,1),i.m(r,null))},i(m){o||(a(i),a(s.$$.fragment,m),o=!0)},o(m){f(i),f(s.$$.fragment,m),o=!1},d(m){m&&g(e),u[n].d(),w(s)}}}function Vr(t){let e,r;return e=new ee({props:{as:"header",$$slots:{default:[qr]},$$scope:{ctx:t}}}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p(n,[i]){const l={};i&3&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function Wr(t,e,r){let{brandingInfo:n=null}=e;return t.$$set=i=>{"brandingInfo"in i&&r(0,n=i.brandingInfo)},[n]}class zr extends C{constructor(e){super(),U(this,e,Wr,Vr,R,{brandingInfo:0},Jr)}}function Xr(t){L(t,"svelte-17dhulw",".rcb-modal-backdrop.svelte-17dhulw{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:rgba(40, 40, 40, 0.75);display:flex;flex-direction:column;justify-content:space-around}")}function Zr(t){let e,r;const n=t[1].default,i=J(n,t,t[0],null);return{c(){e=B("div"),i&&i.c(),h(e,"class","rcb-modal-backdrop svelte-17dhulw")},m(l,s){_(l,e,s),i&&i.m(e,null),r=!0},p(l,[s]){i&&i.p&&(!r||s&1)&&x(i,n,l,l[0],r?j(n,l[0],s,null):q(l[0]),null)},i(l){r||(a(i,l),r=!0)},o(l){f(i,l),r=!1},d(l){l&&g(e),i&&i.d(l)}}}function ei(t,e,r){let{$$slots:n={},$$scope:i}=e;return t.$$set=l=>{"$$scope"in l&&r(0,i=l.$$scope)},[i,n]}class ti extends C{constructor(e){super(),U(this,e,ei,Zr,R,{},Xr)}}function ni(t){L(t,"svelte-m6kocx",".rcb-modal-main.svelte-m6kocx{box-sizing:border-box;border-radius:0.5rem;background-color:#fff;color:black;max-width:40rem;min-width:30rem;overflow-y:auto;padding:2.5rem}.rcb-modal-dark.svelte-m6kocx{background-color:#000;color:#fff;max-width:30rem;min-width:20rem}@media screen and (max-width: 60rem){.rcb-modal-main.svelte-m6kocx,.rcb-modal-dark.svelte-m6kocx{max-width:40rem;min-width:90vw}}")}function ri(t){let e,r,n;const i=t[2].default,l=J(i,t,t[1],null);return{c(){e=B("main"),l&&l.c(),h(e,"class",r=ue(`rcb-modal-main ${t[0]?"rcb-modal-dark":""}`)+" svelte-m6kocx")},m(s,o){_(s,e,o),l&&l.m(e,null),n=!0},p(s,[o]){l&&l.p&&(!n||o&2)&&x(l,i,s,s[1],n?j(i,s[1],o,null):q(s[1]),null),(!n||o&1&&r!==(r=ue(`rcb-modal-main ${s[0]?"rcb-modal-dark":""}`)+" svelte-m6kocx"))&&h(e,"class",r)},i(s){n||(a(l,s),n=!0)},o(s){f(l,s),n=!1},d(s){s&&g(e),l&&l.d(s)}}}function ii(t,e,r){let{$$slots:n={},$$scope:i}=e,{dark:l=!1}=e;return t.$$set=s=>{"dark"in s&&r(0,l=s.dark),"$$scope"in s&&r(1,i=s.$$scope)},[l,i,n]}class li extends C{constructor(e){super(),U(this,e,ii,ri,R,{dark:0},ni)}}function si(t){let e;const r=t[1].default,n=J(r,t,t[2],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,l){n&&n.p&&(!e||l&4)&&x(n,r,i,i[2],e?j(r,i[2],l,null):q(i[2]),null)},i(i){e||(a(n,i),e=!0)},o(i){f(n,i),e=!1},d(i){n&&n.d(i)}}}function oi(t){let e,r;return e=new ti({props:{$$slots:{default:[ci]},$$scope:{ctx:t}}}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p(n,i){const l={};i&4&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function ci(t){let e;const r=t[1].default,n=J(r,t,t[2],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,l){n&&n.p&&(!e||l&4)&&x(n,r,i,i[2],e?j(r,i[2],l,null):q(i[2]),null)},i(i){e||(a(n,i),e=!0)},o(i){f(n,i),e=!1},d(i){n&&n.d(i)}}}function ai(t){let e,r,n,i;const l=[oi,si],s=[];function o(c,u){return c[0]?0:1}return e=o(t),r=s[e]=l[e](t),{c(){r.c(),n=X()},m(c,u){s[e].m(c,u),_(c,n,u),i=!0},p(c,[u]){let p=e;e=o(c),e===p?s[e].p(c,u):(F(),f(s[p],1,1,()=>{s[p]=null}),G(),r=s[e],r?r.p(c,u):(r=s[e]=l[e](c),r.c()),a(r,1),r.m(n.parentNode,n))},i(c){i||(a(r),i=!0)},o(c){f(r),i=!1},d(c){c&&g(n),s[e].d(c)}}}function ui(t,e,r){let{$$slots:n={},$$scope:i}=e,{condition:l=!1}=e;return t.$$set=s=>{"condition"in s&&r(0,l=s.condition),"$$scope"in s&&r(2,i=s.$$scope)},[l,n,i]}class fi extends C{constructor(e){super(),U(this,e,ui,ai,R,{condition:0})}}function ot(t){let e,r;return e=new zr({props:{brandingInfo:t[2]}}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p(n,i){const l={};i&4&&(l.brandingInfo=n[2]),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function di(t){let e,r,n=t[1]&&ot(t);const i=t[3].default,l=J(i,t,t[4],null);return{c(){n&&n.c(),e=N(),l&&l.c()},m(s,o){n&&n.m(s,o),_(s,e,o),l&&l.m(s,o),r=!0},p(s,o){s[1]?n?(n.p(s,o),o&2&&a(n,1)):(n=ot(s),n.c(),a(n,1),n.m(e.parentNode,e)):n&&(F(),f(n,1,1,()=>{n=null}),G()),l&&l.p&&(!r||o&16)&&x(l,i,s,s[4],r?j(i,s[4],o,null):q(s[4]),null)},i(s){r||(a(n),a(l,s),r=!0)},o(s){f(n),f(l,s),r=!1},d(s){s&&g(e),n&&n.d(s),l&&l.d(s)}}}function mi(t){let e,r;return e=new li({props:{dark:t[0],$$slots:{default:[di]},$$scope:{ctx:t}}}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p(n,[i]){const l={};i&1&&(l.dark=n[0]),i&22&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function Ai(t,e,r){let{$$slots:n={},$$scope:i}=e,{dark:l=!1}=e,{showHeader:s=!1}=e,{brandingInfo:o=null}=e;return t.$$set=c=>{"dark"in c&&r(0,l=c.dark),"showHeader"in c&&r(1,s=c.showHeader),"brandingInfo"in c&&r(2,o=c.brandingInfo),"$$scope"in c&&r(4,i=c.$$scope)},[l,s,o,n,i]}class ct extends C{constructor(e){super(),U(this,e,Ai,mi,R,{dark:0,showHeader:1,brandingInfo:2})}}var pe=(t=>(t[t.UnknownError=0]="UnknownError",t[t.UserCancelledError=1]="UserCancelledError",t[t.StoreProblemError=2]="StoreProblemError",t[t.PurchaseNotAllowedError=3]="PurchaseNotAllowedError",t[t.PurchaseInvalidError=4]="PurchaseInvalidError",t[t.ProductNotAvailableForPurchaseError=5]="ProductNotAvailableForPurchaseError",t[t.ProductAlreadyPurchasedError=6]="ProductAlreadyPurchasedError",t[t.ReceiptAlreadyInUseError=7]="ReceiptAlreadyInUseError",t[t.InvalidReceiptError=8]="InvalidReceiptError",t[t.MissingReceiptFileError=9]="MissingReceiptFileError",t[t.NetworkError=10]="NetworkError",t[t.InvalidCredentialsError=11]="InvalidCredentialsError",t[t.UnexpectedBackendResponseError=12]="UnexpectedBackendResponseError",t[t.InvalidAppUserIdError=14]="InvalidAppUserIdError",t[t.OperationAlreadyInProgressError=15]="OperationAlreadyInProgressError",t[t.UnknownBackendError=16]="UnknownBackendError",t[t.InvalidAppleSubscriptionKeyError=17]="InvalidAppleSubscriptionKeyError",t[t.IneligibleError=18]="IneligibleError",t[t.InsufficientPermissionsError=19]="InsufficientPermissionsError",t[t.PaymentPendingError=20]="PaymentPendingError",t[t.InvalidSubscriberAttributesError=21]="InvalidSubscriberAttributesError",t[t.LogOutWithAnonymousUserError=22]="LogOutWithAnonymousUserError",t[t.ConfigurationError=23]="ConfigurationError",t[t.UnsupportedError=24]="UnsupportedError",t[t.EmptySubscriberAttributesError=25]="EmptySubscriberAttributesError",t[t.CustomerInfoError=28]="CustomerInfoError",t[t.SignatureVerificationError=36]="SignatureVerificationError",t))(pe||{});class Te{static getPublicMessage(e){switch(e){case 0:return"Unknown error.";case 1:return"Purchase was cancelled.";case 2:return"There was a problem with the store.";case 3:return"The device or user is not allowed to make the purchase.";case 4:return"One or more of the arguments provided are invalid.";case 5:return"The product is not available for purchase.";case 6:return"This product is already active for the user.";case 7:return"There is already another active subscriber using the same receipt.";case 8:return"The receipt is not valid.";case 9:return"The receipt is missing.";case 10:return"Error performing request.";case 11:return"There was a credentials issue. Check the underlying error for more details.";case 12:return"Received unexpected response from the backend.";case 14:return"The app user id is not valid.";case 15:return"The operation is already in progress.";case 16:return"There was an unknown backend error.";case 17:return"Apple Subscription Key is invalid or not present. In order to provide subscription offers, you must first generate a subscription key. Please see https://docs.revenuecat.com/docs/ios-subscription-offers for more info.";case 18:return"The User is ineligible for that action.";case 19:return"App does not have sufficient permissions to make purchases.";case 20:return"The payment is pending.";case 21:return"One or more of the attributes sent could not be saved.";case 22:return"Called logOut but the current user is anonymous.";case 23:return"There is an issue with your configuration. Check the underlying error for more details.";case 24:return"There was a problem with the operation. Looks like we doesn't support that yet. Check the underlying error for more details.";case 25:return"A request for subscriber attributes returned none.";case 28:return"There was a problem related to the customer info.";case 36:return"Request failed signature verification. Please see https://rev.cat/trusted-entitlements for more info."}}static getErrorCodeForBackendErrorCode(e){switch(e){case 7101:return 2;case 7102:return 7;case 7103:return 8;case 7107:case 7224:case 7225:return 11;case 7105:case 7106:return 4;case 7220:return 14;case 7229:return 2;case 7230:case 7e3:return 23;case 7231:return 2;case 7232:return 18;case 7263:case 7264:return 21;case 7104:case 7234:case 7226:case 7110:return 12;case 7662:return 24}}static convertCodeToBackendErrorCode(e){return e in at?e:null}static convertPurchaseFlowErrorCodeToErrorCode(e){switch(e){case O.ErrorSettingUpPurchase:return 2;case O.ErrorChargingPayment:return 20;case O.NetworkError:return 10;case O.MissingEmailError:return 4;case O.StripeError:return 2;case O.UnknownError:return 0}}}var at=(t=>(t[t.BackendInvalidPlatform=7e3]="BackendInvalidPlatform",t[t.BackendStoreProblem=7101]="BackendStoreProblem",t[t.BackendCannotTransferPurchase=7102]="BackendCannotTransferPurchase",t[t.BackendInvalidReceiptToken=7103]="BackendInvalidReceiptToken",t[t.BackendInvalidAppStoreSharedSecret=7104]="BackendInvalidAppStoreSharedSecret",t[t.BackendInvalidPaymentModeOrIntroPriceNotProvided=7105]="BackendInvalidPaymentModeOrIntroPriceNotProvided",t[t.BackendProductIdForGoogleReceiptNotProvided=7106]="BackendProductIdForGoogleReceiptNotProvided",t[t.BackendInvalidPlayStoreCredentials=7107]="BackendInvalidPlayStoreCredentials",t[t.BackendInternalServerError=7110]="BackendInternalServerError",t[t.BackendEmptyAppUserId=7220]="BackendEmptyAppUserId",t[t.BackendInvalidAuthToken=7224]="BackendInvalidAuthToken",t[t.BackendInvalidAPIKey=7225]="BackendInvalidAPIKey",t[t.BackendBadRequest=7226]="BackendBadRequest",t[t.BackendPlayStoreQuotaExceeded=7229]="BackendPlayStoreQuotaExceeded",t[t.BackendPlayStoreInvalidPackageName=7230]="BackendPlayStoreInvalidPackageName",t[t.BackendPlayStoreGenericError=7231]="BackendPlayStoreGenericError",t[t.BackendUserIneligibleForPromoOffer=7232]="BackendUserIneligibleForPromoOffer",t[t.BackendInvalidAppleSubscriptionKey=7234]="BackendInvalidAppleSubscriptionKey",t[t.BackendInvalidSubscriberAttributes=7263]="BackendInvalidSubscriberAttributes",t[t.BackendInvalidSubscriberAttributesBody=7264]="BackendInvalidSubscriberAttributesBody",t[t.BackendProductIDsMalformed=7662]="BackendProductIDsMalformed",t))(at||{});class W extends Error{constructor(r,n,i){super(n);T(this,"toString",()=>`PurchasesError(code: ${pe[this.errorCode]}, message: ${this.message})`);this.errorCode=r,this.underlyingErrorMessage=i}static getForBackendError(r,n){const i=Te.getErrorCodeForBackendErrorCode(r);return new W(i,Te.getPublicMessage(i),n)}static getForPurchasesFlowError(r){return new W(Te.convertPurchaseFlowErrorCodeToErrorCode(r.errorCode),r.message,r.underlyingErrorMessage)}}const gi="0.0.10",se="https://api.revenuecat.com";var ve;(function(t){t[t.CONTINUE=100]="CONTINUE",t[t.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",t[t.PROCESSING=102]="PROCESSING",t[t.EARLY_HINTS=103]="EARLY_HINTS",t[t.OK=200]="OK",t[t.CREATED=201]="CREATED",t[t.ACCEPTED=202]="ACCEPTED",t[t.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",t[t.NO_CONTENT=204]="NO_CONTENT",t[t.RESET_CONTENT=205]="RESET_CONTENT",t[t.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",t[t.MULTI_STATUS=207]="MULTI_STATUS",t[t.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",t[t.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",t[t.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",t[t.SEE_OTHER=303]="SEE_OTHER",t[t.NOT_MODIFIED=304]="NOT_MODIFIED",t[t.USE_PROXY=305]="USE_PROXY",t[t.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",t[t.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",t[t.BAD_REQUEST=400]="BAD_REQUEST",t[t.UNAUTHORIZED=401]="UNAUTHORIZED",t[t.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",t[t.FORBIDDEN=403]="FORBIDDEN",t[t.NOT_FOUND=404]="NOT_FOUND",t[t.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",t[t.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",t[t.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",t[t.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",t[t.CONFLICT=409]="CONFLICT",t[t.GONE=410]="GONE",t[t.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",t[t.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",t[t.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",t[t.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",t[t.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",t[t.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",t[t.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",t[t.IM_A_TEAPOT=418]="IM_A_TEAPOT",t[t.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",t[t.METHOD_FAILURE=420]="METHOD_FAILURE",t[t.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",t[t.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",t[t.LOCKED=423]="LOCKED",t[t.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",t[t.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",t[t.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",t[t.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",t[t.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",t[t.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",t[t.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",t[t.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",t[t.BAD_GATEWAY=502]="BAD_GATEWAY",t[t.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",t[t.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",t[t.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",t[t.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",t[t.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})(ve||(ve={}));function ut(t){return t?t.startsWith("rcb_sb_"):!1}async function oe(t,e,r,n){const i=await fetch(t.url(),{method:t.method,headers:hi(e,n),body:pi(r)});return await _i(i,t),await i.json()}async function _i(t,e){const r=t.status;if(r>=ve.INTERNAL_SERVER_ERROR)Fe(e,r,await t.text());else if(r>=ve.BAD_REQUEST){const n=await t.json(),i=n?JSON.stringify(n):null,l=n==null?void 0:n.code,s=n==null?void 0:n.message;if(l!=null){const o=Te.convertCodeToBackendErrorCode(l);if(o==null)Fe(e,r,i);else throw W.getForBackendError(o,s)}else Fe(e,r,i)}}function Fe(t,e,r){throw new W(pe.UnknownBackendError,`Unknown backend error. Request: ${t.name}. Status code: ${e}. Body: ${r}.`)}function pi(t){return t==null?null:JSON.stringify(t)}function hi(t,e){let r={Authorization:`Bearer ${t}`,"Content-Type":"application/json",Accept:"application/json","X-Platform":"web","X-Version":gi,"X-Is-Sandbox":`${ut(t)}`};return e!=null&&(r={...r,...e}),r}const ft="/v1/subscribers",Ne="/rcbilling/v1";class Ei{constructor(e){T(this,"appUserId");T(this,"method","GET");T(this,"name","getOfferings");this.appUserId=e}url(){return`${se}${ft}/${this.appUserId}/offerings`}}class Ii{constructor(){T(this,"method","POST");T(this,"name","subscribe")}url(){return`${se}${Ne}/subscribe`}}class wi{constructor(e,r){T(this,"method","GET");T(this,"name","getProducts");T(this,"appUserId");T(this,"productIds");this.appUserId=e,this.productIds=r}url(){return`${se}${Ne}/subscribers/${this.appUserId}/products?id=${this.productIds.join("&id=")}`}}class bi{constructor(e){T(this,"method","GET");T(this,"name","getCustomerInfo");T(this,"appUserId");this.appUserId=e}url(){return`${se}${ft}/${this.appUserId}`}}class $i{constructor(){T(this,"method","GET");T(this,"name","getBrandingInfo")}url(){return`${se}${Ne}/branding`}}class ki{constructor(e){T(this,"method","GET");T(this,"name","getCheckoutStatus");T(this,"operationSessionId");this.operationSessionId=e}url(){return`${se}${Ne}/checkout/${this.operationSessionId}`}}class Bi{constructor(e){T(this,"API_KEY");this.API_KEY=e}async getOfferings(e){return await oe(new Ei(e),this.API_KEY)}async getCustomerInfo(e){return await oe(new bi(e),this.API_KEY)}async getProducts(e,r){return await oe(new wi(e,r),this.API_KEY)}async getBrandingInfo(){return await oe(new $i,this.API_KEY)}async postSubscribe(e,r,n){return await oe(new Ii,this.API_KEY,{app_user_id:e,product_id:r,email:n})}async getCheckoutStatus(e){return await oe(new ki(e),this.API_KEY)}}function yi(t){L(t,"svelte-ofxzf4",`.rcb-ui-container.svelte-ofxzf4{color-scheme:none;font-family:"PP Object Sans",
|
|
2
|
+
-apple-system,
|
|
3
|
+
BlinkMacSystemFont,
|
|
4
|
+
avenir next,
|
|
5
|
+
avenir,
|
|
6
|
+
segoe ui,
|
|
7
|
+
helvetica neue,
|
|
8
|
+
helvetica,
|
|
9
|
+
Cantarell,
|
|
10
|
+
Ubuntu,
|
|
11
|
+
roboto,
|
|
12
|
+
noto,
|
|
13
|
+
arial,
|
|
14
|
+
sans-serif}.rcb-ui-layout.svelte-ofxzf4{display:flex;justify-content:center;align-items:flex-start}.rcb-ui-aside.svelte-ofxzf4{margin-right:1rem}@media screen and (max-width: 60rem){.rcb-ui-layout.svelte-ofxzf4{flex-direction:column;align-items:center;justify-content:flex-end;height:100%}.rcb-ui-aside.svelte-ofxzf4{margin-right:0;margin-bottom:1rem}}`)}function dt(t){let e,r,n,i=t[1].isSandbox(),l;r=new ct({props:{dark:!0,showHeader:!0,brandingInfo:t[3],$$slots:{default:[Di]},$$scope:{ctx:t}}});let s=i&&At();return{c(){e=B("div"),$(r.$$.fragment),n=N(),s&&s.c(),h(e,"class","rcb-ui-aside svelte-ofxzf4")},m(o,c){_(o,e,c),I(r,e,null),M(e,n),s&&s.m(e,null),l=!0},p(o,c){const u={};c&8&&(u.brandingInfo=o[3]),c&4194308&&(u.$$scope={dirty:c,ctx:o}),r.$set(u),c&2&&(i=o[1].isSandbox()),i?s?c&2&&a(s,1):(s=At(),s.c(),a(s,1),s.m(e,null)):s&&(F(),f(s,1,1,()=>{s=null}),G())},i(o){l||(a(r.$$.fragment,o),a(s),l=!0)},o(o){f(r.$$.fragment,o),f(s),l=!1},d(o){o&&g(e),w(r),s&&s.d()}}}function mt(t){let e,r;return e=new ze({props:{productDetails:t[2]}}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p(n,i){const l={};i&4&&(l.productDetails=n[2]),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function Di(t){let e,r,n=t[2]&&mt(t);return{c(){n&&n.c(),e=X()},m(i,l){n&&n.m(i,l),_(i,e,l),r=!0},p(i,l){i[2]?n?(n.p(i,l),l&4&&a(n,1)):(n=mt(i),n.c(),a(n,1),n.m(e.parentNode,e)):n&&(F(),f(n,1,1,()=>{n=null}),G())},i(i){r||(a(n),r=!0)},o(i){f(n),r=!1},d(i){i&&g(e),n&&n.d(i)}}}function At(t){let e,r;return e=new Zt({}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function gt(t){let e,r;return e=new ze({props:{productDetails:t[2]}}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p(n,i){const l={};i&4&&(l.productDetails=n[2]),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function _t(t){let e,r;return e=new Be({}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function pt(t){let e,r;return e=new Be({}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function ht(t){let e,r;return e=new Cr({props:{onContinue:t[9]}}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p:Q,i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function Et(t){let e,r;return e=new Qr({props:{purchases:t[1],paymentInfoCollectionMetadata:t[4],onContinue:t[9],onClose:t[8],onError:t[10]}}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p(n,i){const l={};i&2&&(l.purchases=n[1]),i&16&&(l.paymentInfoCollectionMetadata=n[4]),e.$set(l)},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function It(t){let e,r;return e=new Be({}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function wt(t){var n;let e,r;return e=new On({props:{lastError:t[5]??new H(O.UnknownError,"Unknown error without state set."),supportEmail:(n=t[3])==null?void 0:n.seller_company_support_email,onContinue:t[11]}}),{c(){$(e.$$.fragment)},m(i,l){I(e,i,l),r=!0},p(i,l){var o;const s={};l&32&&(s.lastError=i[5]??new H(O.UnknownError,"Unknown error without state set.")),l&8&&(s.supportEmail=(o=i[3])==null?void 0:o.seller_company_support_email),e.$set(s)},i(i){r||(a(e.$$.fragment,i),r=!0)},o(i){f(e.$$.fragment,i),r=!1},d(i){w(e,i)}}}function bt(t){let e,r;return e=new zn({props:{onContinue:t[9]}}),{c(){$(e.$$.fragment)},m(n,i){I(e,n,i),r=!0},p:Q,i(n){r||(a(e.$$.fragment,n),r=!0)},o(n){f(e.$$.fragment,n),r=!1},d(n){w(e,n)}}}function Qi(t){let e,r,n,i,l,s,o,c,u,p=t[6]==="present-offer"&&t[2]&>(t),m=t[6]==="present-offer"&&!t[2]&&_t(),E=t[6]==="polling-purchase-status"&&pt(),k=t[6]==="needs-auth-info"&&ht(t),y=t[6]==="needs-payment-info"&&t[4]&&Et(t),b=t[6]==="loading"&&It(),D=t[6]==="error"&&wt(t),v=t[6]==="success"&&bt(t);return{c(){p&&p.c(),e=N(),m&&m.c(),r=N(),E&&E.c(),n=N(),k&&k.c(),i=N(),y&&y.c(),l=N(),b&&b.c(),s=N(),D&&D.c(),o=N(),v&&v.c(),c=X()},m(d,A){p&&p.m(d,A),_(d,e,A),m&&m.m(d,A),_(d,r,A),E&&E.m(d,A),_(d,n,A),k&&k.m(d,A),_(d,i,A),y&&y.m(d,A),_(d,l,A),b&&b.m(d,A),_(d,s,A),D&&D.m(d,A),_(d,o,A),v&&v.m(d,A),_(d,c,A),u=!0},p(d,A){d[6]==="present-offer"&&d[2]?p?(p.p(d,A),A&68&&a(p,1)):(p=gt(d),p.c(),a(p,1),p.m(e.parentNode,e)):p&&(F(),f(p,1,1,()=>{p=null}),G()),d[6]==="present-offer"&&!d[2]?m?A&68&&a(m,1):(m=_t(),m.c(),a(m,1),m.m(r.parentNode,r)):m&&(F(),f(m,1,1,()=>{m=null}),G()),d[6]==="polling-purchase-status"?E?A&64&&a(E,1):(E=pt(),E.c(),a(E,1),E.m(n.parentNode,n)):E&&(F(),f(E,1,1,()=>{E=null}),G()),d[6]==="needs-auth-info"?k?(k.p(d,A),A&64&&a(k,1)):(k=ht(d),k.c(),a(k,1),k.m(i.parentNode,i)):k&&(F(),f(k,1,1,()=>{k=null}),G()),d[6]==="needs-payment-info"&&d[4]?y?(y.p(d,A),A&80&&a(y,1)):(y=Et(d),y.c(),a(y,1),y.m(l.parentNode,l)):y&&(F(),f(y,1,1,()=>{y=null}),G()),d[6]==="loading"?b?A&64&&a(b,1):(b=It(),b.c(),a(b,1),b.m(s.parentNode,s)):b&&(F(),f(b,1,1,()=>{b=null}),G()),d[6]==="error"?D?(D.p(d,A),A&64&&a(D,1)):(D=wt(d),D.c(),a(D,1),D.m(o.parentNode,o)):D&&(F(),f(D,1,1,()=>{D=null}),G()),d[6]==="success"?v?(v.p(d,A),A&64&&a(v,1)):(v=bt(d),v.c(),a(v,1),v.m(c.parentNode,c)):v&&(F(),f(v,1,1,()=>{v=null}),G())},i(d){u||(a(p),a(m),a(E),a(k),a(y),a(b),a(D),a(v),u=!0)},o(d){f(p),f(m),f(E),f(k),f(y),f(b),f(D),f(v),u=!1},d(d){d&&(g(e),g(r),g(n),g(i),g(l),g(s),g(o),g(c)),p&&p.d(d),m&&m.d(d),E&&E.d(d),k&&k.d(d),y&&y.d(d),b&&b.d(d),D&&D.d(d),v&&v.d(d)}}}function Pi(t){let e,r=t[7].includes(t[6]),n,i,l,s=r&&dt(t);return i=new ct({props:{$$slots:{default:[Qi]},$$scope:{ctx:t}}}),{c(){e=B("div"),s&&s.c(),n=N(),$(i.$$.fragment),h(e,"class","rcb-ui-layout svelte-ofxzf4")},m(o,c){_(o,e,c),s&&s.m(e,null),M(e,n),I(i,e,null),l=!0},p(o,c){c&64&&(r=o[7].includes(o[6])),r?s?(s.p(o,c),c&64&&a(s,1)):(s=dt(o),s.c(),a(s,1),s.m(e,n)):s&&(F(),f(s,1,1,()=>{s=null}),G());const u={};c&4194430&&(u.$$scope={dirty:c,ctx:o}),i.$set(u)},i(o){l||(a(s),a(i.$$.fragment,o),l=!0)},o(o){f(s),f(i.$$.fragment,o),l=!1},d(o){o&&g(e),s&&s.d(),w(i)}}}function Mi(t){let e,r,n;return r=new fi({props:{condition:t[0],$$slots:{default:[Pi]},$$scope:{ctx:t}}}),{c(){e=B("div"),$(r.$$.fragment),h(e,"class","rcb-ui-container svelte-ofxzf4")},m(i,l){_(i,e,l),I(r,e,null),n=!0},p(i,[l]){const s={};l&1&&(s.condition=i[0]),l&4194430&&(s.$$scope={dirty:l,ctx:i}),r.$set(s)},i(i){n||(a(r.$$.fragment,i),n=!0)},o(i){f(r.$$.fragment,i),n=!1},d(i){i&&g(e),w(r)}}}function Ti(t,e,r){var kt;let{asModal:n=!0}=e,{customerEmail:i}=e,{appUserId:l}=e,{rcPackage:s}=e,{onFinished:o}=e,{onError:c}=e,{onClose:u}=e,{purchases:p}=e,{backend:m}=e,{purchaseOperationHelper:E}=e,k=null,y=null,b=null,D=null;const v=((kt=s.rcBillingProduct)==null?void 0:kt.id)??null;let d="present-offer";const A=["present-offer","needs-auth-info","needs-payment-info","loading"];be(async()=>{if(r(2,k=s.rcBillingProduct),r(3,y=await m.getBrandingInfo()),d==="present-offer"){i?$t():r(6,d="needs-auth-info");return}});const Yi=()=>{u()},$t=()=>{if(v===null){he(new H(O.ErrorSettingUpPurchase,"Product ID was not set before purchase."));return}else r(6,d="loading");if(!i){he(new H(O.MissingEmailError));return}E.startPurchase(l,v,i).then(P=>{if(P.next_action==="collect_payment_info"){r(6,d="needs-payment-info"),r(4,b=P);return}if(P.next_action==="completed"){r(6,d="success");return}}).catch(P=>{he(new H(O.ErrorSettingUpPurchase,P.message,P.underlyingErrorMessage))})},Hi=P=>{if(d==="needs-auth-info"){P&&r(12,i=P.email),$t();return}if(d==="needs-payment-info"){r(6,d="polling-purchase-status"),E.pollCurrentPurchaseForCompletion().then(()=>{r(6,d="success")}).catch(Ji=>{he(Ji)});return}if(d==="success"||d==="error"){o();return}r(6,d="success")},he=P=>{r(5,D=P),r(6,d="error")},Ki=()=>{c(D??new H(O.UnknownError,"Unknown error without state set."))};return t.$$set=P=>{"asModal"in P&&r(0,n=P.asModal),"customerEmail"in P&&r(12,i=P.customerEmail),"appUserId"in P&&r(13,l=P.appUserId),"rcPackage"in P&&r(14,s=P.rcPackage),"onFinished"in P&&r(15,o=P.onFinished),"onError"in P&&r(16,c=P.onError),"onClose"in P&&r(17,u=P.onClose),"purchases"in P&&r(1,p=P.purchases),"backend"in P&&r(18,m=P.backend),"purchaseOperationHelper"in P&&r(19,E=P.purchaseOperationHelper)},[n,p,k,y,b,D,d,A,Yi,Hi,he,Ki,i,l,s,o,c,u,m,E]}class vi extends C{constructor(e){super(),U(this,e,Ti,Mi,R,{asModal:0,customerEmail:12,appUserId:13,rcPackage:14,onFinished:15,onError:16,onClose:17,purchases:1,backend:18,purchaseOperationHelper:19},yi)}}function Ni(t){return t.expires_date==null?!0:new Date(t.expires_date)>new Date}function Ri(t,e,r){return{identifier:t,isActive:Ni(e),willRenew:Oi(e,r),store:(r==null?void 0:r.store)??"unknown",originalPurchaseDate:new Date(e.purchase_date),expirationDate:Re(e.expires_date),productIdentifier:e.product_identifier,unsubscribeDetectedAt:Re(r==null?void 0:r.unsubscribe_detected_at),billingIssueDetectedAt:Re(r==null?void 0:r.billing_issues_detected_at),isSandbox:(r==null?void 0:r.is_sandbox)??!1,periodType:(r==null?void 0:r.period_type)??"normal"}}function Ui(t,e){const r={},n={};for(const i in t){const l=e[i]??null,s=Ri(i,t[i],l);r[i]=s,s.isActive&&(n[i]=s)}return{all:r,active:n}}function Re(t){return t==null?null:new Date(t)}function Ci(t){const e=Li(t),r=t.subscriber;return{entitlements:Ui(r.entitlements,r.subscriptions),allExpirationDatesByProduct:e,allPurchaseDatesByProduct:Si(t),activeSubscriptions:Fi(e),managementURL:r.management_url,requestDate:new Date(t.request_date),firstSeenDate:new Date(r.first_seen),originalPurchaseDate:Re(r.original_purchase_date),originalAppUserId:t.subscriber.original_app_user_id}}function Oi(t,e){if(e==null)return!1;const r=e.store=="promotional",n=t.expires_date==null,i=e.unsubscribe_detected_at!=null,l=e.billing_issues_detected_at!=null;return!(r||n||i||l)}function Si(t){const e={};for(const r in t.subscriber.subscriptions){const n=t.subscriber.subscriptions[r];e[r]=new Date(n.purchase_date)}return e}function Li(t){const e={};for(const r in t.subscriber.subscriptions){const n=t.subscriber.subscriptions[r];n.expires_date==null?e[r]=null:e[r]=new Date(n.expires_date)}return e}function Fi(t){const e=new Set,r=new Date;for(const n in t){const i=t[n];(i==null||i>r)&&e.add(n)}return e}class Gi{constructor(e){T(this,"_API_KEY");T(this,"backend");T(this,"purchaseOperationHelper");T(this,"toOfferings",(e,r)=>{const n=e.offerings.find(o=>o.identifier===e.current_offering_id)??null,i={};r.product_details.forEach(o=>{i[o.identifier]=o});const l=n==null?null:Ge(n,i),s={};return e.offerings.forEach(o=>{const c=Ge(o,i);c!=null&&(s[o.identifier]=c)}),Object.keys(s).length==0&&console.debug("Empty offerings. Please make sure you've configured offerings correctly in the RevenueCat dashboard and that the products are properly configured."),{all:s,current:l}});this._API_KEY=e,this.backend=new Bi(this._API_KEY),this.purchaseOperationHelper=new An(this.backend)}async getOfferings(e){const r=await this.backend.getOfferings(e),n=r.offerings.flatMap(l=>l.packages).map(l=>l.platform_product_identifier),i=await this.backend.getProducts(e,n);return this.logMissingProductIds(n,i.product_details),this.toOfferings(r,i)}async isEntitledTo(e,r){const n=await this.getCustomerInfo(e);return r in n.entitlements.active}purchasePackage(e,r,{customerEmail:n,htmlTarget:i}={}){let l=i??document.getElementById("rcb-ui-root");if(l===null){const c=document.createElement("div");c.className="rcb-ui-root",document.body.appendChild(c),l=c}if(l===null)throw new Error("Could not generate a mount point for the billing widget");const s=l,o=!i;return new Promise((c,u)=>{new vi({target:s,props:{appUserId:e,rcPackage:r,customerEmail:n,onFinished:async()=>{s.innerHTML="",c({customerInfo:await this.getCustomerInfo(e)})},onClose:()=>{s.innerHTML="",u(new W(pe.UserCancelledError))},onError:p=>{s.innerHTML="",u(W.getForPurchasesFlowError(p))},purchases:this,backend:this.backend,purchaseOperationHelper:this.purchaseOperationHelper,asModal:o}})})}async getCustomerInfo(e){const r=await this.backend.getCustomerInfo(e);return Ci(r)}logMissingProductIds(e,r){const n={};r.forEach(l=>n[l.identifier]=l);const i=[];e.forEach(l=>{n[l]===void 0&&i.push(l)}),i.length>0&&console.debug("Could not find product data for product ids: ",i,". Please check that your product configuration is correct.")}isSandbox(){return ut(this._API_KEY)}}Y.ErrorCode=pe,Y.Purchases=Gi,Y.PurchasesError=W,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
aside.svelte-8uc6s0{color:#9acd32;font-weight:700;text-transform:uppercase;padding:.5rem 0;width:100%;font-size:.75rem;border-radius:.5rem}.rcb-modal-section.svelte-ujomz3{padding:.5rem 0rem;display:flex}.rcb-modal-section.svelte-ujomz3:last-of-type{padding:0}.rcb-pricing-info.svelte-1oa6nu8{display:flex;flex-direction:column;height:10rem;justify-content:flex-end}.rcb-product-price.svelte-1oa6nu8{font-size:1.5rem}.rcb-product-duration.svelte-1oa6nu8{opacity:.6}.rcb-modal-loader.svelte-4wmtg7{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center}button.svelte-igat39{border:none;border-radius:3.5rem;font-size:1rem;cursor:pointer;height:3.5rem;color:#000;background-color:#dfdfdf}button.intent-primary.svelte-igat39{background-color:#000;color:#fff;font-size:1rem}footer.svelte-1f9z0o8{display:flex;flex-direction:column}
|
|
1
|
+
aside.svelte-8uc6s0{color:#9acd32;font-weight:700;text-transform:uppercase;padding:.5rem 0;width:100%;font-size:.75rem;border-radius:.5rem}.rcb-modal-section.svelte-ujomz3{padding:.5rem 0rem;display:flex}.rcb-modal-section.svelte-ujomz3:last-of-type{padding:0}.rcb-pricing-info.svelte-1oa6nu8{display:flex;flex-direction:column;height:10rem;justify-content:flex-end}.rcb-product-price.svelte-1oa6nu8{font-size:1.5rem}.rcb-product-duration.svelte-1oa6nu8{opacity:.6}.rcb-modal-loader.svelte-4wmtg7{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center}button.svelte-igat39{border:none;border-radius:3.5rem;font-size:1rem;cursor:pointer;height:3.5rem;color:#000;background-color:#dfdfdf}button.intent-primary.svelte-igat39{background-color:#000;color:#fff;font-size:1rem}footer.svelte-1f9z0o8{display:flex;flex-direction:column}.column.svelte-18njhoa{display:flex;flex-direction:column;justify-content:flex-start;gap:var(--gap, "0.5rem")}.rcb-modal-error.svelte-ahi052{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center}.title.svelte-ahi052{font-size:24px}.subtitle.svelte-ahi052{font-size:16px}img.svelte-7khg4b{width:7.75rem;height:7.75rem;margin:0 auto}.rcb-modal-success.svelte-1lcsna9{width:100%;min-height:10rem;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center}.title.svelte-1lcsna9{font-size:24px}.subtitle.svelte-1lcsna9{font-size:16px}.rcb-stripe-elements-container.svelte-1fwwzeb{width:100%;margin-bottom:1rem}.form-container.svelte-1xardyz{display:flex;flex-direction:column;width:100%}.form-label.svelte-1xardyz{margin-top:.5rem;margin-bottom:.5rem;display:block}.form-input.svelte-1xardyz{margin-bottom:1rem}.title.svelte-1xardyz{font-size:1.5rem;margin:0;margin-bottom:.5rem}input.svelte-1xardyz{width:94%;padding:.5rem;border:1px solid #ccc;border-radius:.25rem}.rcb-app-icon.svelte-10u48yl{width:2.5rem;height:2.5rem;border-radius:.75rem;box-shadow:0 1px 10px #0000001a;margin-right:1rem}.rcb-app-icon-picture-container.svelte-10u48yl{height:2.5rem}.rcb-app-icon.loading.svelte-10u48yl{background-color:gray}.app-title.svelte-fcqjlc{font-weight:500;margin:.5rem 0;font-size:1rem}.rcb-header-layout.svelte-fcqjlc{display:flex;justify-content:space-between;align-items:center;width:100%}.rcb-header-layout__business-info.svelte-fcqjlc{display:flex;align-items:center}.rcb-modal-backdrop.svelte-17dhulw{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#282828bf;display:flex;flex-direction:column;justify-content:space-around}.rcb-modal-main.svelte-m6kocx{box-sizing:border-box;border-radius:.5rem;background-color:#fff;color:#000;max-width:40rem;min-width:30rem;overflow-y:auto;padding:2.5rem}.rcb-modal-dark.svelte-m6kocx{background-color:#000;color:#fff;max-width:30rem;min-width:20rem}@media screen and (max-width: 60rem){.rcb-modal-main.svelte-m6kocx,.rcb-modal-dark.svelte-m6kocx{max-width:40rem;min-width:90vw}}.rcb-ui-container.svelte-ofxzf4{color-scheme:none;font-family:PP Object Sans,-apple-system,BlinkMacSystemFont,avenir next,avenir,segoe ui,helvetica neue,helvetica,Cantarell,Ubuntu,roboto,noto,arial,sans-serif}.rcb-ui-layout.svelte-ofxzf4{display:flex;justify-content:center;align-items:flex-start}.rcb-ui-aside.svelte-ofxzf4{margin-right:1rem}@media screen and (max-width: 60rem){.rcb-ui-layout.svelte-ofxzf4{flex-direction:column;align-items:center;justify-content:flex-end;height:100%}.rcb-ui-aside.svelte-ofxzf4{margin-right:0;margin-bottom:1rem}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revenuecat/purchases-js",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.12",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -28,8 +28,10 @@
|
|
|
28
28
|
"lint": "eslint . --ext .ts",
|
|
29
29
|
"format": "eslint . --ext .ts --fix",
|
|
30
30
|
"test": "vitest",
|
|
31
|
+
"test:typeCheck": "tsc --project tsconfig.test.json",
|
|
31
32
|
"prettier": "prettier --write .",
|
|
32
33
|
"prettier:ci": "prettier --check .",
|
|
34
|
+
"svelte-check": "svelte-check",
|
|
33
35
|
"storybook": "storybook dev -p 6006",
|
|
34
36
|
"build-storybook": "storybook build"
|
|
35
37
|
},
|
|
@@ -59,6 +61,7 @@
|
|
|
59
61
|
"react-dom": "^18.2.0",
|
|
60
62
|
"storybook": "^7.5.3",
|
|
61
63
|
"svelte": "^4.2.7",
|
|
64
|
+
"svelte-check": "^3.6.3",
|
|
62
65
|
"svelte-stripe": "^1.1.2",
|
|
63
66
|
"typescript": "^5.2.2",
|
|
64
67
|
"vite": "^5.0.0",
|