@whop/checkout 0.0.30 → 0.0.31

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.
@@ -0,0 +1 @@
1
+ function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,l;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;l=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw l}}return n}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,a){return t(e)||r(e,a)||i(e,a)||n()}function o(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function i(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}function l(e){return o(e.data)=="object"&&e.data!==null&&"event"in e.data&&(e.data.event==="resize"||e.data.event==="center"||e.data.event==="complete")}function u(e,t){function r(r){r.source===e.contentWindow&&l(r)&&t(r.data)}return window.addEventListener("message",r),function(){window.removeEventListener("message",r)}}function s(e,t,r,n,o,i,l,u){var s=new URL("/embedded/checkout/".concat(e,"/"),n!==null&&n!==void 0?n:"https://whop.com/");if(s.searchParams.set("h",window.location.origin),t&&s.searchParams.set("theme",t),r&&s.searchParams.set("session",r),o&&s.searchParams.set("hide_price","true"),i&&s.searchParams.set("skip_redirect","true"),l){var c=true,f=false,d=undefined,y=true,m=false,v=undefined;try{for(var h=Object.entries(l).sort(function(e,t){return e[0].localeCompare(t[0])})[Symbol.iterator](),p;!(y=(p=h.next()).done);y=true){var w=a(p.value,2),b=w[0],g=w[1];if(b.startsWith("utm_"))if(Array.isArray(g))try{for(var S=g[Symbol.iterator](),x;!(c=(x=S.next()).done);c=true){var A=x.value;s.searchParams.append(b,A)}}catch(e){f=true;d=e}finally{try{if(!c&&S.return!=null){S.return()}}finally{if(f){throw d}}}else s.searchParams.set(b,g)}}catch(e){m=true;v=e}finally{try{if(!y&&h.return!=null){h.return()}}finally{if(m){throw v}}}}if(u){var P=true,j=false,k=undefined,O=true,E=false,I=undefined;try{for(var L=Object.entries(u)[Symbol.iterator](),_;!(O=(_=L.next()).done);O=true){var C=a(_.value,2),R=C[0],U=C[1];if(U)try{for(var W=Object.entries(U)[Symbol.iterator](),q;!(P=(q=W.next()).done);P=true){var z=a(q.value,2),M=z[0],T=z[1];s.searchParams.set("style.".concat(R,".").concat(M),T.toString())}}catch(e){j=true;k=e}finally{try{if(!P&&W.return!=null){W.return()}}finally{if(j){throw k}}}}}catch(e){E=true;I=e}finally{try{if(!O&&L.return!=null){L.return()}}finally{if(E){throw I}}}}return s.toString()}var c=["allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"],f="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";export{l as a,u as b,s as c,c as d,f as e};
@@ -1 +1 @@
1
- "use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(t){if(Array.isArray(t))return e(t)}function n(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function a(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function o(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,l;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;l=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw l}}return n}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,r){return t(e)||o(e,r)||d(e,r)||i()}function c(e){return r(e)||a(e)||d(e)||l()}function s(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function d(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}function f(e){return s(e.data)=="object"&&e.data!==null&&"event"in e.data&&(e.data.event==="resize"||e.data.event==="center"||e.data.event==="complete")}function h(e,t){function r(r){r.source===e.contentWindow&&f(r)&&t(r.data)}return window.addEventListener("message",r),function(){window.removeEventListener("message",r)}}function w(e,t,r,n,a,o,i){var l=new URL("/embedded/checkout/".concat(e,"/"),n!==null&&n!==void 0?n:"https://whop.com/");if(l.searchParams.set("h",window.location.origin),t&&l.searchParams.set("theme",t),r&&l.searchParams.set("session",r),a&&l.searchParams.set("hide_price","true"),o&&l.searchParams.set("skip_redirect","true"),i){var c=true,s=false,d=undefined,f=true,h=false,w=undefined;try{for(var y=Object.entries(i).sort(function(e,t){return e[0].localeCompare(t[0])})[Symbol.iterator](),v;!(f=(v=y.next()).done);f=true){var m=u(v.value,2),p=m[0],b=m[1];if(p.startsWith("utm_"))if(Array.isArray(b))try{for(var k=b[Symbol.iterator](),S;!(c=(S=k.next()).done);c=true){var g=S.value;l.searchParams.append(p,g)}}catch(e){s=true;d=e}finally{try{if(!c&&k.return!=null){k.return()}}finally{if(s){throw d}}}else l.searchParams.set(p,b)}}catch(e){h=true;w=e}finally{try{if(!f&&y.return!=null){y.return()}}finally{if(h){throw w}}}}return l.toString()}var y=["allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"],v="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";function m(e){var t;(t=window.wco)===null||t===void 0?void 0:t.frames.set(e,h(e,function(t){switch(t.event){case"resize":{e.style.height="".concat(t.height,"px");break}case"center":{e.scrollIntoView({block:"center",inline:"center"});break}case"complete":{var r=e.dataset.whopCheckoutOnComplete;if(r){var n=window[r];n===null||n===void 0?void 0:n(t.plan_id,t.receipt_id)}break}}}))}function p(){var e=new URLSearchParams(window.location.search);return Array.from(e.keys()).reduce(function(t,r){if(!r.startsWith("utm_"))return t;var n=e.getAll(r);switch(n.length){case 0:return t;case 1:{t[r]=n[0];break}default:t[r]=n}return t},{})}function b(e){var t;if(e.dataset.whopCheckoutMounted)return;var r=e.dataset.whopCheckoutPlanId;if(!r)return;var n=w(r,e.dataset.whopCheckoutTheme,e.dataset.whopCheckoutSession,e.dataset.whopCheckoutOrigin,e.dataset.whopCheckoutHidePrice==="true",e.dataset.whopCheckoutSkipRedirect==="true"||!!e.dataset.whopCheckoutOnComplete,e.dataset.whopCheckoutSkipUtm==="true"?void 0:p()),a=document.createElement("iframe");a.src=n,a.style.width="100%",a.style.height="480px",a.style.border="none",a.style.overflow="hidden",(t=a.sandbox).add.apply(t,c(y)),a.allow=v,e.dataset.whopCheckoutMounted="true",e.appendChild(a),m(a)}if((typeof window==="undefined"?"undefined":s(window))<"u"&&window.wco&&!window.wco.listening){var k=new MutationObserver(function(e){var t=true,r=false,a=undefined;try{for(var o=e[Symbol.iterator](),i;!(t=(i=o.next()).done);t=true){var l=i.value;var c,s;var d=true,f=false,h=undefined;try{for(var w=l.addedNodes[Symbol.iterator](),y;!(d=(y=w.next()).done);d=true){var v=y.value;n(v,HTMLElement)&&v.dataset.whopCheckoutPlanId&&b(v)}}catch(e){f=true;h=e}finally{try{if(!d&&w.return!=null){w.return()}}finally{if(f){throw h}}}var m=Array.from(l.removedNodes);var p;var k=true,S=false,g=undefined;try{for(var C=((p=(c=window.wco)===null||c===void 0?void 0:c.frames)!==null&&p!==void 0?p:[])[Symbol.iterator](),A;!(k=(A=C.next()).done);k=true){var x=u(A.value,2),P=x[0],I=x[1];m.includes(P)&&(I(),(s=window.wco)===null||s===void 0?void 0:s.frames.delete(P))}}catch(e){S=true;g=e}finally{try{if(!k&&C.return!=null){C.return()}}finally{if(S){throw g}}}}}catch(e){r=true;a=e}finally{try{if(!t&&o.return!=null){o.return()}}finally{if(r){throw a}}}});var S=true,g=false,C=undefined;try{for(var A=document.querySelectorAll("[data-whop-checkout-plan-id]")[Symbol.iterator](),x;!(S=(x=A.next()).done);S=true){var P=x.value;n(P,HTMLElement)&&b(P)}}catch(e){g=true;C=e}finally{try{if(!S&&A.return!=null){A.return()}}finally{if(g){throw C}}}k.observe(document.body,{childList:!0,subtree:!0}),window.wco.listening=!0}
1
+ "use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(t){if(Array.isArray(t))return e(t)}function n(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function a(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function o(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,l;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;l=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw l}}return n}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,r){return t(e)||o(e,r)||d(e,r)||i()}function c(e){return t(e)||a(e)||d(e)||i()}function s(e){return r(e)||a(e)||d(e)||l()}function f(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function d(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}function y(e){return f(e.data)=="object"&&e.data!==null&&"event"in e.data&&(e.data.event==="resize"||e.data.event==="center"||e.data.event==="complete")}function h(e,t){function r(r){r.source===e.contentWindow&&y(r)&&t(r.data)}return window.addEventListener("message",r),function(){window.removeEventListener("message",r)}}function v(e,t,r,n,a,o,i,l){var c=new URL("/embedded/checkout/".concat(e,"/"),n!==null&&n!==void 0?n:"https://whop.com/");if(c.searchParams.set("h",window.location.origin),t&&c.searchParams.set("theme",t),r&&c.searchParams.set("session",r),a&&c.searchParams.set("hide_price","true"),o&&c.searchParams.set("skip_redirect","true"),i){var s=true,f=false,d=undefined,y=true,h=false,v=undefined;try{for(var w=Object.entries(i).sort(function(e,t){return e[0].localeCompare(t[0])})[Symbol.iterator](),m;!(y=(m=w.next()).done);y=true){var p=u(m.value,2),b=p[0],S=p[1];if(b.startsWith("utm_"))if(Array.isArray(S))try{for(var k=S[Symbol.iterator](),g;!(s=(g=k.next()).done);s=true){var C=g.value;c.searchParams.append(b,C)}}catch(e){f=true;d=e}finally{try{if(!s&&k.return!=null){k.return()}}finally{if(f){throw d}}}else c.searchParams.set(b,S)}}catch(e){h=true;v=e}finally{try{if(!y&&w.return!=null){w.return()}}finally{if(h){throw v}}}}if(l){var x=true,A=false,P=undefined,I=true,j=false,O=undefined;try{for(var E=Object.entries(l)[Symbol.iterator](),L;!(I=(L=E.next()).done);I=true){var M=u(L.value,2),_=M[0],T=M[1];if(T)try{for(var U=Object.entries(T)[Symbol.iterator](),R;!(x=(R=U.next()).done);x=true){var W=u(R.value,2),H=W[0],q=W[1];c.searchParams.set("style.".concat(_,".").concat(H),q.toString())}}catch(e){A=true;P=e}finally{try{if(!x&&U.return!=null){U.return()}}finally{if(A){throw P}}}}}catch(e){j=true;O=e}finally{try{if(!I&&E.return!=null){E.return()}}finally{if(j){throw O}}}}return c.toString()}var w=["allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"],m="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";function p(e){var t;(t=window.wco)===null||t===void 0?void 0:t.frames.set(e,h(e,function(t){switch(t.event){case"resize":{e.style.height="".concat(t.height,"px");break}case"center":{e.scrollIntoView({block:"center",inline:"center"});break}case"complete":{var r=e.dataset.whopCheckoutOnComplete;if(r){var n=window[r];n===null||n===void 0?void 0:n(t.plan_id,t.receipt_id)}break}}}))}function b(){var e=new URLSearchParams(window.location.search);return Array.from(e.keys()).reduce(function(t,r){if(!r.startsWith("utm_"))return t;var n=e.getAll(r);switch(n.length){case 0:return t;case 1:{t[r]=n[0];break}default:t[r]=n}return t},{})}var S="data-whop-checkout-style-";function k(e){var t={};var r=true,n=false,a=undefined;try{for(var o=e.attributes[Symbol.iterator](),i;!(r=(i=o.next()).done);r=true){var l=i.value;if(l.name.startsWith(S)){var u=l.name.slice(S.length),s=l.value,f=c(u.split("-")),d=f[0],y=f.slice(1);if(d&&y.length>0){var h=y.reduce(function(e,t,r){if(r===0)return t;var n=c(e),a=n[0],o=n.slice(1);return"".concat(e).concat(a.toUpperCase()).concat(o.join(""))},"");var v;(v=t[d])!==null&&v!==void 0?v:t[d]={},t[d][h]=s}}}}catch(e){n=true;a=e}finally{try{if(!r&&o.return!=null){o.return()}}finally{if(n){throw a}}}return t}function g(e){var t;if(e.dataset.whopCheckoutMounted)return;var r=e.dataset.whopCheckoutPlanId;if(!r)return;var n=v(r,e.dataset.whopCheckoutTheme,e.dataset.whopCheckoutSession,e.dataset.whopCheckoutOrigin,e.dataset.whopCheckoutHidePrice==="true",e.dataset.whopCheckoutSkipRedirect==="true"||!!e.dataset.whopCheckoutOnComplete,e.dataset.whopCheckoutSkipUtm==="true"?void 0:b(),k(e)),a=document.createElement("iframe");a.src=n,a.style.width="100%",a.style.height="480px",a.style.border="none",a.style.overflow="hidden",(t=a.sandbox).add.apply(t,s(w)),a.allow=m,e.dataset.whopCheckoutMounted="true",e.appendChild(a),p(a)}if((typeof window==="undefined"?"undefined":f(window))<"u"&&window.wco&&!window.wco.listening){var C=new MutationObserver(function(e){var t=true,r=false,a=undefined;try{for(var o=e[Symbol.iterator](),i;!(t=(i=o.next()).done);t=true){var l=i.value;var c,s;var f=true,d=false,y=undefined;try{for(var h=l.addedNodes[Symbol.iterator](),v;!(f=(v=h.next()).done);f=true){var w=v.value;n(w,HTMLElement)&&w.dataset.whopCheckoutPlanId&&g(w)}}catch(e){d=true;y=e}finally{try{if(!f&&h.return!=null){h.return()}}finally{if(d){throw y}}}var m=Array.from(l.removedNodes);var p;var b=true,S=false,k=undefined;try{for(var C=((p=(c=window.wco)===null||c===void 0?void 0:c.frames)!==null&&p!==void 0?p:[])[Symbol.iterator](),x;!(b=(x=C.next()).done);b=true){var A=u(x.value,2),P=A[0],I=A[1];m.includes(P)&&(I(),(s=window.wco)===null||s===void 0?void 0:s.frames.delete(P))}}catch(e){S=true;k=e}finally{try{if(!b&&C.return!=null){C.return()}}finally{if(S){throw k}}}}}catch(e){r=true;a=e}finally{try{if(!t&&o.return!=null){o.return()}}finally{if(r){throw a}}}});var x=true,A=false,P=undefined;try{for(var I=document.querySelectorAll("[data-whop-checkout-plan-id]")[Symbol.iterator](),j;!(x=(j=I.next()).done);x=true){var O=j.value;n(O,HTMLElement)&&g(O)}}catch(e){A=true;P=e}finally{try{if(!x&&I.return!=null){I.return()}}finally{if(A){throw P}}}C.observe(document.body,{childList:!0,subtree:!0}),window.wco.listening=!0}
@@ -1 +1 @@
1
- "use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(t){if(Array.isArray(t))return e(t)}function n(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function a(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function o(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,l;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;l=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw l}}return n}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,r){return t(e)||o(e,r)||d(e,r)||i()}function c(e){return r(e)||a(e)||d(e)||l()}function s(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function d(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(function(){var e=function e(e){return s(e.data)=="object"&&e.data!==null&&"event"in e.data&&(e.data.event==="resize"||e.data.event==="center"||e.data.event==="complete")};var t=function t(t,r){function n(n){n.source===t.contentWindow&&e(n)&&r(n.data)}return window.addEventListener("message",n),function(){window.removeEventListener("message",n)}};var r=function e(e,t,r,n,a,o,i){var l=new URL("/embedded/checkout/".concat(e,"/"),n!==null&&n!==void 0?n:"https://whop.com/");if(l.searchParams.set("h",window.location.origin),t&&l.searchParams.set("theme",t),r&&l.searchParams.set("session",r),a&&l.searchParams.set("hide_price","true"),o&&l.searchParams.set("skip_redirect","true"),i){var c=true,s=false,d=undefined,f=true,h=false,w=undefined;try{for(var y=Object.entries(i).sort(function(e,t){return e[0].localeCompare(t[0])})[Symbol.iterator](),v;!(f=(v=y.next()).done);f=true){var m=u(v.value,2),p=m[0],b=m[1];if(p.startsWith("utm_"))if(Array.isArray(b))try{for(var k=b[Symbol.iterator](),S;!(c=(S=k.next()).done);c=true){var g=S.value;l.searchParams.append(p,g)}}catch(e){s=true;d=e}finally{try{if(!c&&k.return!=null){k.return()}}finally{if(s){throw d}}}else l.searchParams.set(p,b)}}catch(e){h=true;w=e}finally{try{if(!f&&y.return!=null){y.return()}}finally{if(h){throw w}}}}return l.toString()};var a=function e(e){var r;(r=window.wco)===null||r===void 0?void 0:r.frames.set(e,t(e,function(t){switch(t.event){case"resize":{e.style.height="".concat(t.height,"px");break}case"center":{e.scrollIntoView({block:"center",inline:"center"});break}case"complete":{var r=e.dataset.whopCheckoutOnComplete;if(r){var n=window[r];n===null||n===void 0?void 0:n(t.plan_id,t.receipt_id)}break}}}))};var o=function e(){var e=new URLSearchParams(window.location.search);return Array.from(e.keys()).reduce(function(t,r){if(!r.startsWith("utm_"))return t;var n=e.getAll(r);switch(n.length){case 0:return t;case 1:{t[r]=n[0];break}default:t[r]=n}return t},{})};var i=function e(e){var t;if(e.dataset.whopCheckoutMounted)return;var n=e.dataset.whopCheckoutPlanId;if(!n)return;var i=r(n,e.dataset.whopCheckoutTheme,e.dataset.whopCheckoutSession,e.dataset.whopCheckoutOrigin,e.dataset.whopCheckoutHidePrice==="true",e.dataset.whopCheckoutSkipRedirect==="true"||!!e.dataset.whopCheckoutOnComplete,e.dataset.whopCheckoutSkipUtm==="true"?void 0:o()),u=document.createElement("iframe");u.src=i,u.style.width="100%",u.style.height="480px",u.style.border="none",u.style.overflow="hidden",(t=u.sandbox).add.apply(t,c(l)),u.allow=d,e.dataset.whopCheckoutMounted="true",e.appendChild(u),a(u)};var l=["allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"],d="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";if((typeof window==="undefined"?"undefined":s(window))<"u"&&window.wco&&!window.wco.listening){var f=new MutationObserver(function(e){var t=true,r=false,a=undefined;try{for(var o=e[Symbol.iterator](),l;!(t=(l=o.next()).done);t=true){var c=l.value;var s,d;var f=true,h=false,w=undefined;try{for(var y=c.addedNodes[Symbol.iterator](),v;!(f=(v=y.next()).done);f=true){var m=v.value;n(m,HTMLElement)&&m.dataset.whopCheckoutPlanId&&i(m)}}catch(e){h=true;w=e}finally{try{if(!f&&y.return!=null){y.return()}}finally{if(h){throw w}}}var p=Array.from(c.removedNodes);var b;var k=true,S=false,g=undefined;try{for(var C=((b=(s=window.wco)===null||s===void 0?void 0:s.frames)!==null&&b!==void 0?b:[])[Symbol.iterator](),A;!(k=(A=C.next()).done);k=true){var x=u(A.value,2),P=x[0],I=x[1];p.includes(P)&&(I(),(d=window.wco)===null||d===void 0?void 0:d.frames.delete(P))}}catch(e){S=true;g=e}finally{try{if(!k&&C.return!=null){C.return()}}finally{if(S){throw g}}}}}catch(e){r=true;a=e}finally{try{if(!t&&o.return!=null){o.return()}}finally{if(r){throw a}}}});var h=true,w=false,y=undefined;try{for(var v=document.querySelectorAll("[data-whop-checkout-plan-id]")[Symbol.iterator](),m;!(h=(m=v.next()).done);h=true){var p=m.value;n(p,HTMLElement)&&i(p)}}catch(e){w=true;y=e}finally{try{if(!h&&v.return!=null){v.return()}}finally{if(w){throw y}}}f.observe(document.body,{childList:!0,subtree:!0}),window.wco.listening=!0}})();
1
+ "use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(t){if(Array.isArray(t))return e(t)}function n(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function a(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function o(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,l;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;l=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw l}}return n}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,r){return t(e)||o(e,r)||d(e,r)||i()}function c(e){return t(e)||a(e)||d(e)||i()}function s(e){return r(e)||a(e)||d(e)||l()}function f(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function d(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(function(){var e=function e(e){return f(e.data)=="object"&&e.data!==null&&"event"in e.data&&(e.data.event==="resize"||e.data.event==="center"||e.data.event==="complete")};var t=function t(t,r){function n(n){n.source===t.contentWindow&&e(n)&&r(n.data)}return window.addEventListener("message",n),function(){window.removeEventListener("message",n)}};var r=function e(e,t,r,n,a,o,i,l){var c=new URL("/embedded/checkout/".concat(e,"/"),n!==null&&n!==void 0?n:"https://whop.com/");if(c.searchParams.set("h",window.location.origin),t&&c.searchParams.set("theme",t),r&&c.searchParams.set("session",r),a&&c.searchParams.set("hide_price","true"),o&&c.searchParams.set("skip_redirect","true"),i){var s=true,f=false,d=undefined,v=true,y=false,h=undefined;try{for(var w=Object.entries(i).sort(function(e,t){return e[0].localeCompare(t[0])})[Symbol.iterator](),m;!(v=(m=w.next()).done);v=true){var p=u(m.value,2),b=p[0],S=p[1];if(b.startsWith("utm_"))if(Array.isArray(S))try{for(var k=S[Symbol.iterator](),g;!(s=(g=k.next()).done);s=true){var C=g.value;c.searchParams.append(b,C)}}catch(e){f=true;d=e}finally{try{if(!s&&k.return!=null){k.return()}}finally{if(f){throw d}}}else c.searchParams.set(b,S)}}catch(e){y=true;h=e}finally{try{if(!v&&w.return!=null){w.return()}}finally{if(y){throw h}}}}if(l){var x=true,A=false,P=undefined,I=true,j=false,O=undefined;try{for(var E=Object.entries(l)[Symbol.iterator](),L;!(I=(L=E.next()).done);I=true){var M=u(L.value,2),_=M[0],T=M[1];if(T)try{for(var U=Object.entries(T)[Symbol.iterator](),R;!(x=(R=U.next()).done);x=true){var W=u(R.value,2),H=W[0],q=W[1];c.searchParams.set("style.".concat(_,".").concat(H),q.toString())}}catch(e){A=true;P=e}finally{try{if(!x&&U.return!=null){U.return()}}finally{if(A){throw P}}}}}catch(e){j=true;O=e}finally{try{if(!I&&E.return!=null){E.return()}}finally{if(j){throw O}}}}return c.toString()};var a=function e(e){var r;(r=window.wco)===null||r===void 0?void 0:r.frames.set(e,t(e,function(t){switch(t.event){case"resize":{e.style.height="".concat(t.height,"px");break}case"center":{e.scrollIntoView({block:"center",inline:"center"});break}case"complete":{var r=e.dataset.whopCheckoutOnComplete;if(r){var n=window[r];n===null||n===void 0?void 0:n(t.plan_id,t.receipt_id)}break}}}))};var o=function e(){var e=new URLSearchParams(window.location.search);return Array.from(e.keys()).reduce(function(t,r){if(!r.startsWith("utm_"))return t;var n=e.getAll(r);switch(n.length){case 0:return t;case 1:{t[r]=n[0];break}default:t[r]=n}return t},{})};var i=function e(e){var t={};var r=true,n=false,a=undefined;try{for(var o=e.attributes[Symbol.iterator](),i;!(r=(i=o.next()).done);r=true){var l=i.value;if(l.name.startsWith(y)){var u=l.name.slice(y.length),s=l.value,f=c(u.split("-")),d=f[0],v=f.slice(1);if(d&&v.length>0){var h=v.reduce(function(e,t,r){if(r===0)return t;var n=c(e),a=n[0],o=n.slice(1);return"".concat(e).concat(a.toUpperCase()).concat(o.join(""))},"");var w;(w=t[d])!==null&&w!==void 0?w:t[d]={},t[d][h]=s}}}}catch(e){n=true;a=e}finally{try{if(!r&&o.return!=null){o.return()}}finally{if(n){throw a}}}return t};var l=function e(e){var t;if(e.dataset.whopCheckoutMounted)return;var n=e.dataset.whopCheckoutPlanId;if(!n)return;var l=r(n,e.dataset.whopCheckoutTheme,e.dataset.whopCheckoutSession,e.dataset.whopCheckoutOrigin,e.dataset.whopCheckoutHidePrice==="true",e.dataset.whopCheckoutSkipRedirect==="true"||!!e.dataset.whopCheckoutOnComplete,e.dataset.whopCheckoutSkipUtm==="true"?void 0:o(),i(e)),u=document.createElement("iframe");u.src=l,u.style.width="100%",u.style.height="480px",u.style.border="none",u.style.overflow="hidden",(t=u.sandbox).add.apply(t,s(d)),u.allow=v,e.dataset.whopCheckoutMounted="true",e.appendChild(u),a(u)};var d=["allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"],v="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";var y="data-whop-checkout-style-";if((typeof window==="undefined"?"undefined":f(window))<"u"&&window.wco&&!window.wco.listening){var h=new MutationObserver(function(e){var t=true,r=false,a=undefined;try{for(var o=e[Symbol.iterator](),i;!(t=(i=o.next()).done);t=true){var c=i.value;var s,f;var d=true,v=false,y=undefined;try{for(var h=c.addedNodes[Symbol.iterator](),w;!(d=(w=h.next()).done);d=true){var m=w.value;n(m,HTMLElement)&&m.dataset.whopCheckoutPlanId&&l(m)}}catch(e){v=true;y=e}finally{try{if(!d&&h.return!=null){h.return()}}finally{if(v){throw y}}}var p=Array.from(c.removedNodes);var b;var S=true,k=false,g=undefined;try{for(var C=((b=(s=window.wco)===null||s===void 0?void 0:s.frames)!==null&&b!==void 0?b:[])[Symbol.iterator](),x;!(S=(x=C.next()).done);S=true){var A=u(x.value,2),P=A[0],I=A[1];p.includes(P)&&(I(),(f=window.wco)===null||f===void 0?void 0:f.frames.delete(P))}}catch(e){k=true;g=e}finally{try{if(!S&&C.return!=null){C.return()}}finally{if(k){throw g}}}}}catch(e){r=true;a=e}finally{try{if(!t&&o.return!=null){o.return()}}finally{if(r){throw a}}}});var w=true,m=false,p=undefined;try{for(var b=document.querySelectorAll("[data-whop-checkout-plan-id]")[Symbol.iterator](),S;!(w=(S=b.next()).done);w=true){var k=S.value;n(k,HTMLElement)&&l(k)}}catch(e){m=true;p=e}finally{try{if(!w&&b.return!=null){b.return()}}finally{if(m){throw p}}}h.observe(document.body,{childList:!0,subtree:!0}),window.wco.listening=!0}})();
@@ -1 +1 @@
1
- function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(t){if(Array.isArray(t))return e(t)}function n(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function o(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function a(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var o=true;var a=false;var i,u;try{for(r=r.call(e);!(o=(i=r.next()).done);o=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){a=true;u=e}finally{try{if(!o&&r["return"]!=null)r["return"]()}finally{if(a)throw u}}return n}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e,r){return t(e)||a(e,r)||f(e,r)||i()}function d(e){return r(e)||o(e)||f(e)||u()}function c(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function f(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}import{b as s,c as y,d as h,e as w}from"./chunk-ZL23VMML.mjs";function v(e){var t;(t=window.wco)===null||t===void 0?void 0:t.frames.set(e,s(e,function(t){switch(t.event){case"resize":{e.style.height="".concat(t.height,"px");break}case"center":{e.scrollIntoView({block:"center",inline:"center"});break}case"complete":{var r=e.dataset.whopCheckoutOnComplete;if(r){var n=window[r];n===null||n===void 0?void 0:n(t.plan_id,t.receipt_id)}break}}}))}function m(){var e=new URLSearchParams(window.location.search);return Array.from(e.keys()).reduce(function(t,r){if(!r.startsWith("utm_"))return t;var n=e.getAll(r);switch(n.length){case 0:return t;case 1:{t[r]=n[0];break}default:t[r]=n}return t},{})}function p(e){var t;if(e.dataset.whopCheckoutMounted)return;var r=e.dataset.whopCheckoutPlanId;if(!r)return;var n=y(r,e.dataset.whopCheckoutTheme,e.dataset.whopCheckoutSession,e.dataset.whopCheckoutOrigin,e.dataset.whopCheckoutHidePrice==="true",e.dataset.whopCheckoutSkipRedirect==="true"||!!e.dataset.whopCheckoutOnComplete,e.dataset.whopCheckoutSkipUtm==="true"?void 0:m()),o=document.createElement("iframe");o.src=n,o.style.width="100%",o.style.height="480px",o.style.border="none",o.style.overflow="hidden",(t=o.sandbox).add.apply(t,d(h)),o.allow=w,e.dataset.whopCheckoutMounted="true",e.appendChild(o),v(o)}if((typeof window==="undefined"?"undefined":c(window))<"u"&&window.wco&&!window.wco.listening){var b=new MutationObserver(function(e){var t=true,r=false,o=undefined;try{for(var a=e[Symbol.iterator](),i;!(t=(i=a.next()).done);t=true){var u=i.value;var d,c;var f=true,s=false,y=undefined;try{for(var h=u.addedNodes[Symbol.iterator](),w;!(f=(w=h.next()).done);f=true){var v=w.value;n(v,HTMLElement)&&v.dataset.whopCheckoutPlanId&&p(v)}}catch(e){s=true;y=e}finally{try{if(!f&&h.return!=null){h.return()}}finally{if(s){throw y}}}var m=Array.from(u.removedNodes);var b;var k=true,S=false,C=undefined;try{for(var g=((b=(d=window.wco)===null||d===void 0?void 0:d.frames)!==null&&b!==void 0?b:[])[Symbol.iterator](),A;!(k=(A=g.next()).done);k=true){var I=l(A.value,2),x=I[0],M=I[1];m.includes(x)&&(M(),(c=window.wco)===null||c===void 0?void 0:c.frames.delete(x))}}catch(e){S=true;C=e}finally{try{if(!k&&g.return!=null){g.return()}}finally{if(S){throw C}}}}}catch(e){r=true;o=e}finally{try{if(!t&&a.return!=null){a.return()}}finally{if(r){throw o}}}});var k=true,S=false,C=undefined;try{for(var g=document.querySelectorAll("[data-whop-checkout-plan-id]")[Symbol.iterator](),A;!(k=(A=g.next()).done);k=true){var I=A.value;n(I,HTMLElement)&&p(I)}}catch(e){S=true;C=e}finally{try{if(!k&&g.return!=null){g.return()}}finally{if(S){throw C}}}b.observe(document.body,{childList:!0,subtree:!0}),window.wco.listening=!0}
1
+ function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(t){if(Array.isArray(t))return e(t)}function n(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function o(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function a(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var o=true;var a=false;var i,u;try{for(r=r.call(e);!(o=(i=r.next()).done);o=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){a=true;u=e}finally{try{if(!o&&r["return"]!=null)r["return"]()}finally{if(a)throw u}}return n}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e,r){return t(e)||a(e,r)||s(e,r)||i()}function c(e){return t(e)||o(e)||s(e)||i()}function f(e){return r(e)||o(e)||s(e)||u()}function d(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function s(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}import{b as h,c as y,d as v,e as w}from"./chunk-76N4LNNK.mjs";function m(e){var t;(t=window.wco)===null||t===void 0?void 0:t.frames.set(e,h(e,function(t){switch(t.event){case"resize":{e.style.height="".concat(t.height,"px");break}case"center":{e.scrollIntoView({block:"center",inline:"center"});break}case"complete":{var r=e.dataset.whopCheckoutOnComplete;if(r){var n=window[r];n===null||n===void 0?void 0:n(t.plan_id,t.receipt_id)}break}}}))}function p(){var e=new URLSearchParams(window.location.search);return Array.from(e.keys()).reduce(function(t,r){if(!r.startsWith("utm_"))return t;var n=e.getAll(r);switch(n.length){case 0:return t;case 1:{t[r]=n[0];break}default:t[r]=n}return t},{})}var b="data-whop-checkout-style-";function k(e){var t={};var r=true,n=false,o=undefined;try{for(var a=e.attributes[Symbol.iterator](),i;!(r=(i=a.next()).done);r=true){var u=i.value;if(u.name.startsWith(b)){var l=u.name.slice(b.length),f=u.value,d=c(l.split("-")),s=d[0],h=d.slice(1);if(s&&h.length>0){var y=h.reduce(function(e,t,r){if(r===0)return t;var n=c(e),o=n[0],a=n.slice(1);return"".concat(e).concat(o.toUpperCase()).concat(a.join(""))},"");var v;(v=t[s])!==null&&v!==void 0?v:t[s]={},t[s][y]=f}}}}catch(e){n=true;o=e}finally{try{if(!r&&a.return!=null){a.return()}}finally{if(n){throw o}}}return t}function S(e){var t;if(e.dataset.whopCheckoutMounted)return;var r=e.dataset.whopCheckoutPlanId;if(!r)return;var n=y(r,e.dataset.whopCheckoutTheme,e.dataset.whopCheckoutSession,e.dataset.whopCheckoutOrigin,e.dataset.whopCheckoutHidePrice==="true",e.dataset.whopCheckoutSkipRedirect==="true"||!!e.dataset.whopCheckoutOnComplete,e.dataset.whopCheckoutSkipUtm==="true"?void 0:p(),k(e)),o=document.createElement("iframe");o.src=n,o.style.width="100%",o.style.height="480px",o.style.border="none",o.style.overflow="hidden",(t=o.sandbox).add.apply(t,f(v)),o.allow=w,e.dataset.whopCheckoutMounted="true",e.appendChild(o),m(o)}if((typeof window==="undefined"?"undefined":d(window))<"u"&&window.wco&&!window.wco.listening){var C=new MutationObserver(function(e){var t=true,r=false,o=undefined;try{for(var a=e[Symbol.iterator](),i;!(t=(i=a.next()).done);t=true){var u=i.value;var c,f;var d=true,s=false,h=undefined;try{for(var y=u.addedNodes[Symbol.iterator](),v;!(d=(v=y.next()).done);d=true){var w=v.value;n(w,HTMLElement)&&w.dataset.whopCheckoutPlanId&&S(w)}}catch(e){s=true;h=e}finally{try{if(!d&&y.return!=null){y.return()}}finally{if(s){throw h}}}var m=Array.from(u.removedNodes);var p;var b=true,k=false,C=undefined;try{for(var g=((p=(c=window.wco)===null||c===void 0?void 0:c.frames)!==null&&p!==void 0?p:[])[Symbol.iterator](),A;!(b=(A=g.next()).done);b=true){var I=l(A.value,2),x=I[0],j=I[1];m.includes(x)&&(j(),(f=window.wco)===null||f===void 0?void 0:f.frames.delete(x))}}catch(e){k=true;C=e}finally{try{if(!b&&g.return!=null){g.return()}}finally{if(k){throw C}}}}}catch(e){r=true;o=e}finally{try{if(!t&&a.return!=null){a.return()}}finally{if(r){throw o}}}});var g=true,A=false,I=undefined;try{for(var x=document.querySelectorAll("[data-whop-checkout-plan-id]")[Symbol.iterator](),j;!(g=(j=x.next()).done);g=true){var M=j.value;n(M,HTMLElement)&&S(M)}}catch(e){A=true;I=e}finally{try{if(!g&&x.return!=null){x.return()}}finally{if(A){throw I}}}C.observe(document.body,{childList:!0,subtree:!0}),window.wco.listening=!0}
@@ -1 +1 @@
1
- "use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var o=true;var a=false;var u,i;try{for(r=r.call(e);!(o=(u=r.next()).done);o=true){n.push(u.value);if(t&&n.length===t)break}}catch(e){a=true;i=e}finally{try{if(!o&&r["return"]!=null)r["return"]()}finally{if(a)throw i}}return n}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,o){return t(e)||r(e,o)||u(e,o)||n()}function a(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function u(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}var i=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var f=function(e,t){for(var r in t)i(e,r,{get:t[r],enumerable:!0})},d=function(e,t,r,n){var o=true,u=false,f=undefined;if(t&&(typeof t==="undefined"?"undefined":a(t))=="object"||typeof t=="function")try{var d=function(){var o=y.value;!s.call(e,o)&&o!==r&&i(e,o,{get:function(){return t[o]},enumerable:!(n=l(t,o))||n.enumerable})};for(var m=c(t)[Symbol.iterator](),y;!(o=(y=m.next()).done);o=true)d()}catch(e){u=true;f=e}finally{try{if(!o&&m.return!=null){m.return()}}finally{if(u){throw f}}}return e};var m=function(e){return d(i({},"__esModule",{value:!0}),e)};var y={};f(y,{EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING:function(){return w},EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST:function(){return E},getEmbeddedCheckoutIframeUrl:function(){return v},isWhopCheckoutMessage:function(){return p},onWhopCheckoutMessage:function(){return h}});module.exports=m(y);function p(e){return a(e.data)=="object"&&e.data!==null&&"event"in e.data&&(e.data.event==="resize"||e.data.event==="center"||e.data.event==="complete")}function h(e,t){function r(r){r.source===e.contentWindow&&p(r)&&t(r.data)}return window.addEventListener("message",r),function(){window.removeEventListener("message",r)}}function v(e,t,r,n,a,u,i){var l=new URL("/embedded/checkout/".concat(e,"/"),n!==null&&n!==void 0?n:"https://whop.com/");if(l.searchParams.set("h",window.location.origin),t&&l.searchParams.set("theme",t),r&&l.searchParams.set("session",r),a&&l.searchParams.set("hide_price","true"),u&&l.searchParams.set("skip_redirect","true"),i){var c=true,s=false,f=undefined,d=true,m=false,y=undefined;try{for(var p=Object.entries(i).sort(function(e,t){return e[0].localeCompare(t[0])})[Symbol.iterator](),h;!(d=(h=p.next()).done);d=true){var v=o(h.value,2),E=v[0],w=v[1];if(E.startsWith("utm_"))if(Array.isArray(w))try{for(var b=w[Symbol.iterator](),_;!(c=(_=b.next()).done);c=true){var g=_.value;l.searchParams.append(E,g)}}catch(e){s=true;f=e}finally{try{if(!c&&b.return!=null){b.return()}}finally{if(s){throw f}}}else l.searchParams.set(E,w)}}catch(e){m=true;y=e}finally{try{if(!d&&p.return!=null){p.return()}}finally{if(m){throw y}}}}return l.toString()}var E=["allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"],w="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";0&&(module.exports={EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING:EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING,EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST:EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST,getEmbeddedCheckoutIframeUrl:getEmbeddedCheckoutIframeUrl,isWhopCheckoutMessage:isWhopCheckoutMessage,onWhopCheckoutMessage:onWhopCheckoutMessage});
1
+ "use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,u;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;u=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw u}}return n}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,a){return t(e)||r(e,a)||i(e,a)||n()}function o(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function i(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}var u=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var f=function(e,t){for(var r in t)u(e,r,{get:t[r],enumerable:!0})},d=function(e,t,r,n){var a=true,i=false,f=undefined;if(t&&(typeof t==="undefined"?"undefined":o(t))=="object"||typeof t=="function")try{var d=function(){var a=m.value;!s.call(e,a)&&a!==r&&u(e,a,{get:function(){return t[a]},enumerable:!(n=l(t,a))||n.enumerable})};for(var y=c(t)[Symbol.iterator](),m;!(a=(m=y.next()).done);a=true)d()}catch(e){i=true;f=e}finally{try{if(!a&&y.return!=null){y.return()}}finally{if(i){throw f}}}return e};var y=function(e){return d(u({},"__esModule",{value:!0}),e)};var m={};f(m,{EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING:function(){return E},EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST:function(){return w},getEmbeddedCheckoutIframeUrl:function(){return p},isWhopCheckoutMessage:function(){return h},onWhopCheckoutMessage:function(){return v}});module.exports=y(m);function h(e){return o(e.data)=="object"&&e.data!==null&&"event"in e.data&&(e.data.event==="resize"||e.data.event==="center"||e.data.event==="complete")}function v(e,t){function r(r){r.source===e.contentWindow&&h(r)&&t(r.data)}return window.addEventListener("message",r),function(){window.removeEventListener("message",r)}}function p(e,t,r,n,o,i,u,l){var c=new URL("/embedded/checkout/".concat(e,"/"),n!==null&&n!==void 0?n:"https://whop.com/");if(c.searchParams.set("h",window.location.origin),t&&c.searchParams.set("theme",t),r&&c.searchParams.set("session",r),o&&c.searchParams.set("hide_price","true"),i&&c.searchParams.set("skip_redirect","true"),u){var s=true,f=false,d=undefined,y=true,m=false,h=undefined;try{for(var v=Object.entries(u).sort(function(e,t){return e[0].localeCompare(t[0])})[Symbol.iterator](),p;!(y=(p=v.next()).done);y=true){var w=a(p.value,2),E=w[0],b=w[1];if(E.startsWith("utm_"))if(Array.isArray(b))try{for(var _=b[Symbol.iterator](),g;!(s=(g=_.next()).done);s=true){var O=g.value;c.searchParams.append(E,O)}}catch(e){f=true;d=e}finally{try{if(!s&&_.return!=null){_.return()}}finally{if(f){throw d}}}else c.searchParams.set(E,b)}}catch(e){m=true;h=e}finally{try{if(!y&&v.return!=null){v.return()}}finally{if(m){throw h}}}}if(l){var C=true,S=false,D=undefined,A=true,M=false,I=undefined;try{for(var k=Object.entries(l)[Symbol.iterator](),T;!(A=(T=k.next()).done);A=true){var j=a(T.value,2),L=j[0],P=j[1];if(P)try{for(var R=Object.entries(P)[Symbol.iterator](),U;!(C=(U=R.next()).done);C=true){var W=a(U.value,2),x=W[0],B=W[1];c.searchParams.set("style.".concat(L,".").concat(x),B.toString())}}catch(e){S=true;D=e}finally{try{if(!C&&R.return!=null){R.return()}}finally{if(S){throw D}}}}}catch(e){M=true;I=e}finally{try{if(!A&&k.return!=null){k.return()}}finally{if(M){throw I}}}}return c.toString()}var w=["allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"],E="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";0&&(module.exports={EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING:EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING,EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST:EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST,getEmbeddedCheckoutIframeUrl:getEmbeddedCheckoutIframeUrl,isWhopCheckoutMessage:isWhopCheckoutMessage,onWhopCheckoutMessage:onWhopCheckoutMessage});
@@ -10,8 +10,15 @@ type WhopCheckoutMessage = {
10
10
  };
11
11
  declare function isWhopCheckoutMessage(event: MessageEvent<unknown>): event is MessageEvent<WhopCheckoutMessage>;
12
12
  declare function onWhopCheckoutMessage(iframe: HTMLIFrameElement, callback: (message: WhopCheckoutMessage) => void): () => void;
13
- declare function getEmbeddedCheckoutIframeUrl(planId: string, theme?: "light" | "dark" | "system", sessionId?: string, origin?: string, hidePrice?: boolean, skipRedirect?: boolean, utm?: Record<string, string | string[]>): string;
13
+ interface WhopEmbeddedCheckoutStyleOptions {
14
+ container?: {
15
+ paddingTop?: number | string;
16
+ paddingBottom?: number | string;
17
+ paddingY?: number | string;
18
+ };
19
+ }
20
+ declare function getEmbeddedCheckoutIframeUrl(planId: string, theme?: "light" | "dark" | "system", sessionId?: string, origin?: string, hidePrice?: boolean, skipRedirect?: boolean, utm?: Record<string, string | string[]>, styles?: WhopEmbeddedCheckoutStyleOptions): string;
14
21
  declare const EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST: string[];
15
22
  declare const EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING = "document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";
16
23
 
17
- export { EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING, EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST, type WhopCheckoutMessage, getEmbeddedCheckoutIframeUrl, isWhopCheckoutMessage, onWhopCheckoutMessage };
24
+ export { EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING, EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST, type WhopCheckoutMessage, type WhopEmbeddedCheckoutStyleOptions, getEmbeddedCheckoutIframeUrl, isWhopCheckoutMessage, onWhopCheckoutMessage };
@@ -10,8 +10,15 @@ type WhopCheckoutMessage = {
10
10
  };
11
11
  declare function isWhopCheckoutMessage(event: MessageEvent<unknown>): event is MessageEvent<WhopCheckoutMessage>;
12
12
  declare function onWhopCheckoutMessage(iframe: HTMLIFrameElement, callback: (message: WhopCheckoutMessage) => void): () => void;
13
- declare function getEmbeddedCheckoutIframeUrl(planId: string, theme?: "light" | "dark" | "system", sessionId?: string, origin?: string, hidePrice?: boolean, skipRedirect?: boolean, utm?: Record<string, string | string[]>): string;
13
+ interface WhopEmbeddedCheckoutStyleOptions {
14
+ container?: {
15
+ paddingTop?: number | string;
16
+ paddingBottom?: number | string;
17
+ paddingY?: number | string;
18
+ };
19
+ }
20
+ declare function getEmbeddedCheckoutIframeUrl(planId: string, theme?: "light" | "dark" | "system", sessionId?: string, origin?: string, hidePrice?: boolean, skipRedirect?: boolean, utm?: Record<string, string | string[]>, styles?: WhopEmbeddedCheckoutStyleOptions): string;
14
21
  declare const EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST: string[];
15
22
  declare const EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING = "document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";
16
23
 
17
- export { EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING, EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST, type WhopCheckoutMessage, getEmbeddedCheckoutIframeUrl, isWhopCheckoutMessage, onWhopCheckoutMessage };
24
+ export { EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING, EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST, type WhopCheckoutMessage, type WhopEmbeddedCheckoutStyleOptions, getEmbeddedCheckoutIframeUrl, isWhopCheckoutMessage, onWhopCheckoutMessage };
@@ -1 +1 @@
1
- "use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,l;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;l=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw l}}return n}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,a){return t(e)||r(e,a)||i(e,a)||n()}function o(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function i(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(function(){var e=function e(e){return o(e.data)=="object"&&e.data!==null&&"event"in e.data&&(e.data.event==="resize"||e.data.event==="center"||e.data.event==="complete")};var t=function t(t,r){function n(n){n.source===t.contentWindow&&e(n)&&r(n.data)}return window.addEventListener("message",n),function(){window.removeEventListener("message",n)}};var r=function e(e,t,r,n,o,i,l){var u=new URL("/embedded/checkout/".concat(e,"/"),n!==null&&n!==void 0?n:"https://whop.com/");if(u.searchParams.set("h",window.location.origin),t&&u.searchParams.set("theme",t),r&&u.searchParams.set("session",r),o&&u.searchParams.set("hide_price","true"),i&&u.searchParams.set("skip_redirect","true"),l){var s=true,c=false,f=undefined,d=true,y=false,m=undefined;try{for(var v=Object.entries(l).sort(function(e,t){return e[0].localeCompare(t[0])})[Symbol.iterator](),p;!(d=(p=v.next()).done);d=true){var w=a(p.value,2),h=w[0],b=w[1];if(h.startsWith("utm_"))if(Array.isArray(b))try{for(var g=b[Symbol.iterator](),S;!(s=(S=g.next()).done);s=true){var A=S.value;u.searchParams.append(h,A)}}catch(e){c=true;f=e}finally{try{if(!s&&g.return!=null){g.return()}}finally{if(c){throw f}}}else u.searchParams.set(h,b)}}catch(e){y=true;m=e}finally{try{if(!d&&v.return!=null){v.return()}}finally{if(y){throw m}}}}return u.toString()};var n=["allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"],i="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;"})();
1
+ "use strict";function t(t,e){if(e==null||e>t.length)e=t.length;for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function e(t){if(Array.isArray(t))return t}function r(t,e){var r=t==null?null:typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,l;try{for(r=r.call(t);!(a=(i=r.next()).done);a=true){n.push(i.value);if(e&&n.length===e)break}}catch(t){o=true;l=t}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw l}}return n}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(t,a){return e(t)||r(t,a)||i(t,a)||n()}function o(t){"@swc/helpers - typeof";return t&&typeof Symbol!=="undefined"&&t.constructor===Symbol?"symbol":typeof t}function i(e,r){if(!e)return;if(typeof e==="string")return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor)n=e.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t(e,r)}(function(){var t=function t(t){return o(t.data)=="object"&&t.data!==null&&"event"in t.data&&(t.data.event==="resize"||t.data.event==="center"||t.data.event==="complete")};var e=function e(e,r){function n(n){n.source===e.contentWindow&&t(n)&&r(n.data)}return window.addEventListener("message",n),function(){window.removeEventListener("message",n)}};var r=function t(t,e,r,n,o,i,l,u){var s=new URL("/embedded/checkout/".concat(t,"/"),n!==null&&n!==void 0?n:"https://whop.com/");if(s.searchParams.set("h",window.location.origin),e&&s.searchParams.set("theme",e),r&&s.searchParams.set("session",r),o&&s.searchParams.set("hide_price","true"),i&&s.searchParams.set("skip_redirect","true"),l){var c=true,f=false,y=undefined,d=true,m=false,v=undefined;try{for(var h=Object.entries(l).sort(function(t,e){return t[0].localeCompare(e[0])})[Symbol.iterator](),p;!(d=(p=h.next()).done);d=true){var w=a(p.value,2),b=w[0],g=w[1];if(b.startsWith("utm_"))if(Array.isArray(g))try{for(var S=g[Symbol.iterator](),A;!(c=(A=S.next()).done);c=true){var P=A.value;s.searchParams.append(b,P)}}catch(t){f=true;y=t}finally{try{if(!c&&S.return!=null){S.return()}}finally{if(f){throw y}}}else s.searchParams.set(b,g)}}catch(t){m=true;v=t}finally{try{if(!d&&h.return!=null){h.return()}}finally{if(m){throw v}}}}if(u){var j=true,x=false,k=undefined,O=true,E=false,I=undefined;try{for(var L=Object.entries(u)[Symbol.iterator](),_;!(O=(_=L.next()).done);O=true){var C=a(_.value,2),R=C[0],U=C[1];if(U)try{for(var W=Object.entries(U)[Symbol.iterator](),q;!(j=(q=W.next()).done);j=true){var z=a(q.value,2),M=z[0],T=z[1];s.searchParams.set("style.".concat(R,".").concat(M),T.toString())}}catch(t){x=true;k=t}finally{try{if(!j&&W.return!=null){W.return()}}finally{if(x){throw k}}}}}catch(t){E=true;I=t}finally{try{if(!O&&L.return!=null){L.return()}}finally{if(E){throw I}}}}return s.toString()};var n=["allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"],i="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;"})();
@@ -1 +1 @@
1
- import{a as e,b as s,c as E,d as a,e as o}from"./chunk-ZL23VMML.mjs";export{o as EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING,a as EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST,E as getEmbeddedCheckoutIframeUrl,e as isWhopCheckoutMessage,s as onWhopCheckoutMessage};
1
+ import{a as e,b as s,c as E,d as a,e as o}from"./chunk-76N4LNNK.mjs";export{o as EMBEDDED_CHECKOUT_IFRAME_ALLOW_STRING,a as EMBEDDED_CHECKOUT_IFRAME_SANDBOX_LIST,E as getEmbeddedCheckoutIframeUrl,e as isWhopCheckoutMessage,s as onWhopCheckoutMessage};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@whop/checkout",
3
3
  "description": "Embed Whop checkout on any website",
4
- "version": "0.0.30",
4
+ "version": "0.0.31",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/whopio/whop-sdk-ts",
@@ -1 +0,0 @@
1
- function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var a=true;var o=false;var i,l;try{for(r=r.call(e);!(a=(i=r.next()).done);a=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){o=true;l=e}finally{try{if(!a&&r["return"]!=null)r["return"]()}finally{if(o)throw l}}return n}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,a){return t(e)||r(e,a)||i(e,a)||n()}function o(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function i(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}function l(e){return o(e.data)=="object"&&e.data!==null&&"event"in e.data&&(e.data.event==="resize"||e.data.event==="center"||e.data.event==="complete")}function u(e,t){function r(r){r.source===e.contentWindow&&l(r)&&t(r.data)}return window.addEventListener("message",r),function(){window.removeEventListener("message",r)}}function s(e,t,r,n,o,i,l){var u=new URL("/embedded/checkout/".concat(e,"/"),n!==null&&n!==void 0?n:"https://whop.com/");if(u.searchParams.set("h",window.location.origin),t&&u.searchParams.set("theme",t),r&&u.searchParams.set("session",r),o&&u.searchParams.set("hide_price","true"),i&&u.searchParams.set("skip_redirect","true"),l){var s=true,c=false,f=undefined,d=true,y=false,m=undefined;try{for(var p=Object.entries(l).sort(function(e,t){return e[0].localeCompare(t[0])})[Symbol.iterator](),w;!(d=(w=p.next()).done);d=true){var v=a(w.value,2),h=v[0],b=v[1];if(h.startsWith("utm_"))if(Array.isArray(b))try{for(var g=b[Symbol.iterator](),S;!(s=(S=g.next()).done);s=true){var A=S.value;u.searchParams.append(h,A)}}catch(e){c=true;f=e}finally{try{if(!s&&g.return!=null){g.return()}}finally{if(c){throw f}}}else u.searchParams.set(h,b)}}catch(e){y=true;m=e}finally{try{if(!d&&p.return!=null){p.return()}}finally{if(y){throw m}}}}return u.toString()}var c=["allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"],f="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;";export{l as a,u as b,s as c,c as d,f as e};