1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[98,4293,4855,6674,9895],{8934:e=>{"use strict";e.exports=JSON.parse('{"x":[{"planId":"weekly","name":"Weekly","creditsPerCycle":130,"interval":"week","currency":"usd","unitAmount":999,"lookupKey":"sub_weekly"},{"planId":"starter","name":"Starter","creditsPerCycle":700,"interval":"month","currency":"usd","unitAmount":4999,"lookupKey":"sub_starter_monthly"},{"planId":"starter","name":"Starter","creditsPerCycle":700,"interval":"year","currency":"usd","unitAmount":49990,"lookupKey":"sub_starter_yearly"},{"planId":"pro","name":"Pro","creditsPerCycle":3000,"interval":"month","currency":"usd","unitAmount":19999,"lookupKey":"sub_pro_monthly"},{"planId":"pro","name":"Pro","creditsPerCycle":3000,"interval":"year","currency":"usd","unitAmount":199990,"lookupKey":"sub_pro_yearly"}],"Z":[{"packageId":"starter","coins":100,"currency":"usd","unitAmount":999,"lookupKey":"coins_starter"},{"packageId":"single","coins":150,"currency":"usd","unitAmount":1499,"lookupKey":"coins_single"},{"packageId":"popular","coins":450,"currency":"usd","unitAmount":3999,"lookupKey":"coins_popular"},{"packageId":"pro","coins":850,"currency":"usd","unitAmount":6999,"lookupKey":"coins_pro"},{"packageId":"enterprise","coins":1900,"currency":"usd","unitAmount":14999,"lookupKey":"coins_enterprise"}]}')},13421:(e,t,n)=>{"use strict";n.d(t,{D_:()=>d,KS:()=>u,LU:()=>i,RI:()=>o,Sl:()=>c,Sp:()=>a,bj:()=>l,hb:()=>s});var r=n(8934);let o=r.Z,a=r.x;function i(e){if(e)return o.find(t=>t.packageId===e)}function l(e){if(e)return a.find(t=>t.lookupKey===e)}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=[...o].sort((e,t)=>e.coins-t.coins),r=n.filter(t=>t.coins>=e);return r.length>=t?r.slice(0,t):n.slice(-t)}function c(e){return"year"===e.interval?12*e.creditsPerCycle:e.creditsPerCycle}function s(e){var t;let n=a.filter(e=>"year"!==e.interval).sort((e,t)=>e.unitAmount-t.unitAmount);return null!==(t=n.find(t=>t.creditsPerCycle>=e))&&void 0!==t?t:n[n.length-1]}function d(e){let t="year"===e.interval?e.unitAmount/12:e.unitAmount,n=[...o].sort((e,t)=>e.unitAmount-t.unitAmount).filter(e=>e.unitAmount<=t).pop();if(!n)return null;let r=Math.round((1-t/e.creditsPerCycle/(n.unitAmount/n.coins))*100),a=Math.floor((e.creditsPerCycle/n.coins-1)*100);return r<=0?null:{pack:n,savePct:r,morePct:a}}},24855:(e,t,n)=>{"use strict";n.r(t),n.d(t,{IS_IPHONE:()=>c,applePayLikely:()=>s,getStripe:()=>i,knownWallet:()=>h,nativeApplePayButton:()=>d,preloadStripe:()=>l,updateWallet:()=>v,walletKit:()=>m});var r=n(34064);let o="pk_live_51RxmBADGGZYiPXdoqTnawGBYQcVRP1mwIXjGOtaxbXaExuFGGF23WZvBzNq7Tx0BDb39SXjBif3j93AfIEBMcjSD00tfQlM5yp",a=null;function i(){return a||(a=(o?Promise.resolve(o):fetch("/api/billing/intent").then(e=>e.ok?e.json():Promise.reject(Error("no key"))).then(e=>e.publishableKey)).then(e=>e?(0,r.loadStripe)(e):null).then(e=>(e||(a=null),e)).catch(()=>(a=null,null))),a}function l(){m("plan"),m("pack")}let u="undefined"!=typeof navigator?navigator.userAgent:"",c=/iPhone|iPod/.test(u);function s(){try{var e;let t=window.ApplePaySession;return(null==t?void 0:null===(e=t.canMakePayments)||void 0===e?void 0:e.call(t))===!0}catch(e){return!1}}function d(){try{return"undefined"!=typeof CSS&&CSS.supports("-webkit-appearance","-apple-pay-button")}catch(e){return!1}}let p="mv:wallet",y=null,f={};function h(){if(y)return{kind:y,final:!0};let e=function(){try{let e=window.localStorage.getItem(p);if(!e)return null;let t=JSON.parse(e);if(!t.t||Date.now()-t.t>2592e5)return null;return"apple"===t.k||"google"===t.k||"none"===t.k?t.k:null}catch(e){return null}}();return e?{kind:e,final:!1}:null}function m(e){let t=f[e];if(t)return t;let n=i().then(async t=>{if(!t)return f[e]=void 0,null;let n=t.paymentRequest({country:"SG",currency:"usd",total:{label:"MakeViral",amount:999},requestPayerEmail:!0,disableWallets:["link","browserCard"],..."plan"===e?{applePay:{recurringPaymentRequest:{paymentDescription:"MakeViral plan",managementURL:"".concat(window.location.origin,"/profile"),regularBilling:{label:"MakeViral plan",amount:999,recurringPaymentIntervalUnit:"day",recurringPaymentIntervalCount:7}}}}:{}}),r={stripe:t,pr:n,kind:"none",final:!1,handlers:null,lastUpdate:""};n.on("paymentmethod",e=>{r.handlers?r.handlers.onPaymentMethod(e,t):e.complete("fail")}),n.on("cancel",()=>{var e;return null===(e=r.handlers)||void 0===e?void 0:e.onCancel()});try{let e=await n.canMakePayment();if(r.kind=(null==e?void 0:e.applePay)?"apple":(null==e?void 0:e.googlePay)?"google":"none",r.final=!0,y!==r.kind){y=r.kind;var o=r.kind;try{window.localStorage.setItem(p,JSON.stringify({k:o,t:Date.now()}))}catch(e){}}}catch(t){r.kind="none",f[e]=void 0}return r});return f[e]=n,n}function v(e,t){let n=JSON.stringify(t);n!==e.lastUpdate&&(e.pr.update(t),e.lastUpdate=n)}}
1,30098:(e,t,n)=>{"use strict";async function r(){let{auth:e}=await Promise.all([n.e(9135),n.e(3965),n.e(4093),n.e(8521),n.e(6674)]).then(n.bind(n,34293));return await e.authStateReady(),e}async function o(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=(await r()).currentUser;if(!t)return null;try{return await t.getIdToken(e)}catch(e){return null}}async function a(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=await r(),i=await o(),l=new Headers(n.headers||{});return i&&l.set("Authorization","Bearer ".concat(i)),(null===(t=a.currentUser)||void 0===t?void 0:t.uid)&&l.set("x-user-id",a.currentUser.uid),!n.body||n.body instanceof FormData||l.has("Content-Type")||l.set("Content-Type","application/json"),fetch(e,{...n,headers:l})}async function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=await a(e,t),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.error||"Request failed (".concat(n.status,")"));return r}n.d(t,{authFetch:()=>a,l:()=>i})},34064:(e,t,n)=>{e.exports=n(59272)},34293:(e,t,n)=>{"use strict";n.d(t,{auth:()=>u,db:()=>c});var r=n(45404),o=n(35317),a=n(77505),i=n(97899),l=n(95442);let u=function(){try{return(0,r.Nu)(i.app,{persistence:[r.Gt,r.F0]})}catch(e){return(0,r.xI)(i.app)}}(),c=(0,o.aU)(i.app);(0,a.c7)(i.app),(async()=>{try{await (0,o.Os)(c),console.log("â
Firestore network enabled")}catch(e){console.error("â Failed to enable Firestore network:",e)}})(),(0,r.hg)(u,e=>{e&&(0,l.I)()})},59272:(e,t)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r,o="clover",a="https://js.stripe.com",i="".concat(a,"/").concat(o,"/stripe.js"),l=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,u=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,c="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",s=function(){for(var e=document.querySelectorAll('script[src^="'.concat(a,'"]')),t=0;t<e.length;t++){var n,r=e[t];if(n=r.src,l.test(n)||u.test(n))return r}return null},d=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(i).concat(t);var r=document.head||document.body;if(!r)throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return r.appendChild(n),n},p=function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"8.2.0",startTime:t})},y=null,f=null,h=null,m=function(e,t,n){if(null===e)return null;var r,a=t[0].match(/^pk_test/),i=3===(r=e.version)?"v3":r;a&&i!==o&&console.warn("Stripe.js@".concat(i," was loaded on the page, but @stripe/stripe-js@").concat("8.2.0"," expected Stripe.js@").concat(o,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var l=e.apply(void 0,t);return p(l,n),l},v=function(e){var t="invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ".concat(JSON.stringify(e),"\n");if(null===e||"object"!==n(e))throw Error(t);if(1===Object.keys(e).length&&"boolean"==typeof e.advancedFraudSignals)return e;throw Error(t)},w=!1,g=function(){for(var e,t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];w=!0;var a=Date.now();return(e=r,null!==y?y:(y=new Promise(function(t,n){if("undefined"==typeof window||"undefined"==typeof document){t(null);return}if(window.Stripe&&e&&console.warn(c),window.Stripe){t(window.Stripe);return}try{var r,o=s();o&&e?console.warn(c):o?o&&null!==h&&null!==f&&(o.removeEventListener("load",h),o.removeEventListener("error",f),null===(r=o.parentNode)||void 0===r||r.removeChild(o),o=d(e)):o=d(e),h=function(){window.Stripe?t(window.Stripe):n(Error("Stripe.js not available"))},f=function(e){n(Error("Failed to load Stripe.js",{cause:e}))},o.addEventListener("load",h),o.addEventListener("error",f)}catch(e){n(e);return}})).catch(function(e){return y=null,Promise.reject(e)})).then(function(e){return m(e,n,a)})};g.setLoadParameters=function(e){if(!(w&&r&&Object.keys(v(e)).reduce(function(t,n){var o;return t&&e[n]===(null===(o=r)||void 0===o?void 0:o[n])},!0))){if(w)throw Error("You cannot change load parameters after calling loadStripe");r=v(e)}},t.loadStripe=g}
1,66474:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(19946).A)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},68043:(e,t,n)=>{"use strict";n.d(t,{R5:()=>d,SK:()=>c,Sq:()=>s,fw:()=>i,mA:()=>l});var r=n(30098);async function o(e,t){let n=await (0,r.authFetch)(e,{method:"POST",body:JSON.stringify(t)}),o=await n.json().catch(()=>({}));if(!n.ok)throw Error(o.error||"Could not open the payment. Try again.");return o}function a(e){var t;return{uiMode:null!==(t=e.uiMode)&&void 0!==t?t:"hosted",...e.returnPath?{returnPath:e.returnPath}:{},...e.offer?{offer:e.offer}:{},...e.email?{email:e.email}:{}}}let i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o("/api/stripe/create-checkout-session",{packageId:e,...a(t)})},l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o("/api/stripe/create-subscription-session",{lookupKey:e,...a(t)})};async function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=await (0,r.authFetch)("/api/stripe/subscription/switch".concat(t),e),o=await n.json().catch(()=>({}));if(!n.ok)throw Error(o.error||"Could not change the plan. Try again.");return o}let c=(e,t)=>u({method:"POST",body:JSON.stringify({subscriptionId:e,lookupKey:t})}).then(e=>e.preview),s=(e,t,n)=>u({method:"POST",body:JSON.stringify({subscriptionId:e,lookupKey:t,confirm:!0,...n?{prorationDate:n}:{}})}),d=e=>u({method:"GET"},"?subscriptionId=".concat(encodeURIComponent(e))).then(e=>e.scheduled)},86762:(e,t,n)=>{"use strict";n.d(t,{p:()=>o});var r=n(95155);function o(e){let{cents:t,credits:n,className:o}=e,{main:a,tail:i}=function(e,t){let n=e/100/Math.max(t,1),r=n.toFixed(3);return n>=.1||r.endsWith("0")?{main:"$".concat(n.toFixed(2)),tail:""}:{main:"$".concat(r.slice(0,-1)),tail:r.slice(-1)}}(t,n);return(0,r.jsxs)("span",{className:o,"aria-label":"".concat(a).concat(i," per credit"),children:[a,i&&(0,r.jsx)("span",{className:"ml-[0.04em] align-top text-[0.55em] leading-none opacity-80",children:i})]})}},97899:(e,t,n)=>{"use strict";n.r(t),n.d(t,{app:()=>a,firebaseConfig:()=>o.C});var r=n(23915),o=n(61012);let a=(0,r.Dk)().length?(0,r.Sx)():(0,r.Wp)(o.C)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.