{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/nNkZ0atqWJhzXlbrjPYw/uWYQG0lvEZrQBxjVslzp/SupaDash.js"],
  "sourcesContent": ["// SupaDash.tsx\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{supabaseAnon,apiRoutes,routes,language,supaTables}from\"https://framerusercontent.com/modules/uOamkKL1FTkvGlp3ClJ2/mpxQ9P1AcgNT51kmpaPL/SupaClient.js\";import{redirectTo,getErrorMessage,isValidEmail,getDatabaseErrorMessage,getFormattedPriceString}from\"https://framerusercontent.com/modules/4sgNDqSMiULP3NadRqSb/9Tk6JUxQDc9VzO0vP8fm/Util.js\";const useStore=createStore({userId:\"\",userType:\"\",userTypeLabel:\"\",userBetaMode:false,userExpiry:0,urlWindowsDownload:\"\",urlMacDownload:\"\",urlWindowsEnDownload:\"\",urlMacEnDownload:\"\",email:\"Lade Account ...\",email_new:\"\",email_input:\"\",email_errorMsg:\"\",prefs_first_name:\"\",prefs_last_name:\"\",prefs_errorMsg:\"\",input_first_name:\"\",input_last_name:\"\",noInvoices:false,// invoices, readonly\ninvoices:[],invAvailable:0,// invoice navigation\ninvCurrent:0,// input fields for invoice updates\ninv_first_name:\"\",inv_last_name:\"\",inv_company_name:\"\",inv_line1:\"\",inv_line2:\"\",inv_zip:\"\",inv_city:\"\",inv_state:\"\",inv_country:\"\",inv_errorMsg:\"\",inv_finalized:false,inv_finalized_date:\"\",// stripe checkout\nstripeErrorMsg:\"\",stripeUrlNew:\"\",stripeUrlUpgrade:\"\",stripeUrlEducation:\"\",stripeUrlGiftNew:\"\",stripeUrlGiftUpgrade:\"\",stripeUrlGiftEducation:\"\"});// ****************************************************************************************************************************************************************\n// ******************   Order Test   *****************************************************\n// ****************************************************************************************************************************************************************\nconst checkouts={new:`${apiRoutes.stripeInitCheckout}/${language}/new`,upgrade:`${apiRoutes.stripeInitCheckout}/${language}/upgrade`,education:`${apiRoutes.stripeInitCheckout}/${language}/education`};const checkouts_gifts={new:`${apiRoutes.stripeInitCheckout}/${language}/new_gift`,upgrade:`${apiRoutes.stripeInitCheckout}/${language}/upgrade_gift`,education:`${apiRoutes.stripeInitCheckout}/${language}/education_gift`};async function fetchStripeCheckout(path){try{// Send a request to the Cloudflare worker\nconst response=await fetch(path,{method:\"GET\",headers:{\"Content-Type\":\"application/json\"}});if(response.ok){console.log(\"Stripe checkout fetched.\");const data=await response.text();return{data,error:null};}else{const errorText=await response.text();const error=`Status ${response.status}: ${errorText}`;return{data:null,error};}}catch(error){return{data:null,error:\"Error fetching dash: \"+error?.message};}}export function withStripeFetchNew(Component){return props=>{const[store,setStore]=useStore();const[status,setStatus]=useState(\"Default\");const[loading,setLoading]=useState(false);useEffect(()=>{if(loading){setStatus(\"Loading\");console.log(\"Loading Checkout...\");}else{setStatus(\"Default\");}},[loading]);useEffect(()=>{if(store.stripeErrorMsg){setStatus(\"Error\");console.log(\"Status: Error\");}},[store.stripeErrorMsg]);const gotoCheckout=async()=>{let url=store.stripeUrlNew;// If the URL isn't already in the store, fetch it\nif(!url){setLoading(true);const{data,error}=await fetchStripeCheckout(checkouts.new);url=data?JSON.parse(data).url:null;setLoading(false);if(url){// Optionally update the store for future use\nsetStore({stripeUrlNew:url});}else{// Handle the error (e.g., show a message to the user)\nsetStore({stripeErrorMsg:error||\"Error fetching stripe checkout.\"});return;// Exit the function to prevent redirection\n}}// Redirect to the URL\nredirectTo(url);};return /*#__PURE__*/_jsx(Component,{...props,variant:status,onClick:gotoCheckout});};}export function withStripeFetchUpgrade(Component){return props=>{const[store,setStore]=useStore();const[status,setStatus]=useState(\"Default\");const[loading,setLoading]=useState(false);useEffect(()=>{if(loading){setStatus(\"Loading\");console.log(\"Loading Checkout...\");}else{setStatus(\"Default\");}},[loading]);useEffect(()=>{if(store.stripeErrorMsg){setStatus(\"Error\");console.log(\"Status: Error\");}},[store.stripeErrorMsg]);const gotoCheckout=async()=>{let url=store.stripeUrlUpgrade;// If the URL isn't already in the store, fetch it\nif(!url){setLoading(true);const{data,error}=await fetchStripeCheckout(checkouts.upgrade);url=data?JSON.parse(data).url:null;setLoading(false);if(url){// Optionally update the store for future use\nsetStore({stripeUrlUpgrade:url});}else{// Handle the error (e.g., show a message to the user)\nsetStore({stripeErrorMsg:error||\"Error fetching stripe checkout.\"});return;// Exit the function to prevent redirection\n}}// Redirect to the URL\nredirectTo(url);};return /*#__PURE__*/_jsx(Component,{...props,variant:status,onClick:gotoCheckout});};}export function withStripeFetchEducation(Component){return props=>{const[store,setStore]=useStore();const[status,setStatus]=useState(\"Default\");const[loading,setLoading]=useState(false);useEffect(()=>{if(loading){setStatus(\"Loading\");console.log(\"Loading Checkout...\");}else{setStatus(\"Default\");}},[loading]);useEffect(()=>{if(store.stripeErrorMsg){setStatus(\"Error\");console.log(\"Status: Error\");}},[store.stripeErrorMsg]);const gotoCheckout=async()=>{let url=store.stripeUrlEducation;// If the URL isn't already in the store, fetch it\nif(!url){setLoading(true);const{data,error}=await fetchStripeCheckout(checkouts.education);url=data?JSON.parse(data).url:null;setLoading(false);if(url){// Optionally update the store for future use\nsetStore({stripeUrlEducation:url});}else{// Handle the error (e.g., show a message to the user)\nsetStore({stripeErrorMsg:error||\"Error fetching stripe checkout.\"});return;// Exit the function to prevent redirection\n}}// Redirect to the URL\nredirectTo(url);};return /*#__PURE__*/_jsx(Component,{...props,variant:status,onClick:gotoCheckout});};}export function withStripeFetchGiftNew(Component){return props=>{const[store,setStore]=useStore();const[status,setStatus]=useState(\"Default\");const[loading,setLoading]=useState(false);useEffect(()=>{if(loading){setStatus(\"Loading\");console.log(\"Loading Checkout...\");}else{setStatus(\"Default\");}},[loading]);useEffect(()=>{if(store.stripeErrorMsg){setStatus(\"Error\");console.log(\"Status: Error\");}},[store.stripeErrorMsg]);const gotoCheckout=async()=>{let url=store.stripeUrlGiftNew;// If the URL isn't already in the store, fetch it\nif(!url){setLoading(true);const{data,error}=await fetchStripeCheckout(checkouts_gifts.new);url=data?JSON.parse(data).url:null;setLoading(false);if(url){// Optionally update the store for future use\nsetStore({stripeUrlGiftNew:url});}else{// Handle the error (e.g., show a message to the user)\nsetStore({stripeErrorMsg:error||\"Error fetching stripe checkout.\"});return;// Exit the function to prevent redirection\n}}// Redirect to the URL\nredirectTo(url);};return /*#__PURE__*/_jsx(Component,{...props,variant:status,onClick:gotoCheckout});};}export function withStripeFetchGiftUpgrade(Component){return props=>{const[store,setStore]=useStore();const[status,setStatus]=useState(\"Default\");const[loading,setLoading]=useState(false);useEffect(()=>{if(loading){setStatus(\"Loading\");console.log(\"Loading Checkout...\");}else{setStatus(\"Default\");}},[loading]);useEffect(()=>{if(store.stripeErrorMsg){setStatus(\"Error\");console.log(\"Status: Error\");}},[store.stripeErrorMsg]);const gotoCheckout=async()=>{let url=store.stripeUrlGiftUpgrade;// If the URL isn't already in the store, fetch it\nif(!url){setLoading(true);const{data,error}=await fetchStripeCheckout(checkouts_gifts.upgrade);url=data?JSON.parse(data).url:null;setLoading(false);if(url){// Optionally update the store for future use\nsetStore({stripeUrlGiftUpgrade:url});}else{// Handle the error (e.g., show a message to the user)\nsetStore({stripeErrorMsg:error||\"Error fetching stripe checkout.\"});return;// Exit the function to prevent redirection\n}}// Redirect to the URL\nredirectTo(url);};return /*#__PURE__*/_jsx(Component,{...props,variant:status,onClick:gotoCheckout});};}export function withStripeFetchGiftEducation(Component){return props=>{const[store,setStore]=useStore();const[status,setStatus]=useState(\"Default\");const[loading,setLoading]=useState(false);useEffect(()=>{if(loading){setStatus(\"Loading\");console.log(\"Loading Checkout...\");}else{setStatus(\"Default\");}},[loading]);useEffect(()=>{if(store.stripeErrorMsg){setStatus(\"Error\");console.log(\"Status: Error\");}},[store.stripeErrorMsg]);const gotoCheckout=async()=>{let url=store.stripeUrlGiftEducation;// If the URL isn't already in the store, fetch it\nif(!url){setLoading(true);const{data,error}=await fetchStripeCheckout(checkouts_gifts.education);url=data?JSON.parse(data).url:null;setLoading(false);if(url){// Optionally update the store for future use\nsetStore({stripeUrlGiftEducation:url});}else{// Handle the error (e.g., show a message to the user)\nsetStore({stripeErrorMsg:error||\"Error fetching stripe checkout.\"});return;// Exit the function to prevent redirection\n}}// Redirect to the URL\nredirectTo(url);};return /*#__PURE__*/_jsx(Component,{...props,variant:status,onClick:gotoCheckout});};}// ****************************************************************************************************************************************************************\n// ******************   API/AUTH DATA * DISPLAY EMAIL | DISPLAY USER TYPE | SET MAC DL URL | SET WIN DL URL   *****************************************************\n// ****************************************************************************************************************************************************************\n/** Email Display for user account, top in the dashboard logo area. Used in the Dash Sidenav (Fixed) Component. Also used to display email in change email (myEmail) component. */export function withEmail(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,text:store.email});};}/** Display for user account type, bottom in the dashboard area. Used in the Dash Sidenav (Fixed) Component. */export function withUserType(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,text:`${store.userTypeLabel} ${store.userBetaMode?\"(Beta Mode)\":\"\"}`});};}/** Get and set the download url for the dl button in the dash sidebar. */export function withUrlMac(Component){return props=>{const[store,setStore]=useStore();const[status,setStatus]=useState(\"Disabled\");useEffect(()=>{if(store.urlMacDownload){setStatus(\"Default\");}else{setStatus(\"Disabled\");}},[store.urlMacDownload]);return /*#__PURE__*/_jsx(Component,{...props,variant:status,submitLink:store.urlMacDownload});};}/** Get and set the download url for the dl button in the dash sidebar. */export function withUrlMacEn(Component){return props=>{const[store,setStore]=useStore();const[status,setStatus]=useState(\"Disabled\");useEffect(()=>{if(store.urlMacEnDownload){setStatus(\"Default\");}else{setStatus(\"Disabled\");}},[store.urlMacEnDownload]);return /*#__PURE__*/_jsx(Component,{...props,variant:status,submitLink:store.urlMacEnDownload});};}/** Get and set the download url for the dl button in the dash sidebar. */export function withUrlWindows(Component){return props=>{const[store,setStore]=useStore();const[status,setStatus]=useState(\"Disabled\");useEffect(()=>{if(store.urlWindowsDownload){setStatus(\"Default\");}else{setStatus(\"Disabled\");}},[store.urlWindowsDownload]);return /*#__PURE__*/_jsx(Component,{...props,variant:status,submitLink:store.urlWindowsDownload});};}/** Get and set the download url for the dl button in the dash sidebar. */export function withUrlWindowsEn(Component){return props=>{const[store,setStore]=useStore();const[status,setStatus]=useState(\"Disabled\");useEffect(()=>{if(store.urlWindowsEnDownload){setStatus(\"Default\");}else{setStatus(\"Disabled\");}},[store.urlWindowsEnDownload]);return /*#__PURE__*/_jsx(Component,{...props,variant:status,submitLink:store.urlWindowsEnDownload});};}// ****************************************************************************************************************************************************************\n// ******************   EMAIL CHANGE * LISTENER | INPUT | ERROR | SUBMIT (auth.updateUser)  ***************************************************************\n// ****************************************************************************************************************************************************************\n/** email text display is reused from the api data display area \nexport function withEmail(Component: any): ComponentType { *//**\n * Listener + Notification for email change session.\n * If the session has user.new_email field, the user has requested an email change. And we should show a notification.\n * User probably clicked the link in the NEW email first to get back here.\n */export function withEmailChangeSessionCheck(Component){return props=>{const[store,setStore]=useStore();const[state,setState]=useState(\"HiddenNotification\");const getSession=async()=>{console.log(\"Checking session...\");// gets the session from local storage - could be invalid! very fast. if you need reliable -> getUser() does check with the server and is more reliable.\nconst{data,error}=await supabaseAnon.auth.getSession();if(error){console.log(\"There was an error retrieving the user: \"+error.message);await returnToLogin();}else if(!data.session){console.log(\"Error: No user.\");await returnToLogin();}else if(data.session.user.new_email&&data.session.user.new_email!==store.email){console.log(\"Pending email change: \"+data.session.user.new_email+\" -> \"+store.email);setState(\"ActiveNotification\");}else{console.log(\"No email change pending.\");setState(\"HiddenNotification\");}};useEffect(()=>{getSession();},[]);return /*#__PURE__*/_jsx(Component,{...props,variant:state});};}/** Email input (for changing email). */export function withEmailInput(Component){return props=>{const[store,setStore]=useStore();const handleChange=event=>{const inputValue=event.target.value;setStore({email_input:inputValue});};return /*#__PURE__*/_jsx(Component,{...props,type:\"email\",value:store.email_input,onChange:handleChange});};}/** Error notice (under input field). */export function withEmailErrorMsg(Component){return props=>{const[store,setStore]=useStore();const[state,setState]=useState(\"HiddenNotification\");useEffect(()=>{if(store.email_errorMsg){setState(\"ActiveNotification\");}else{setState(\"HiddenNotification\");}},[store.email_errorMsg]);return /*#__PURE__*/_jsx(Component,{...props,message:store.email_errorMsg,variant:state});};}/**\n * Submit function for changing email. Sends user intent to change email to Supabase and starts process. (Confirm old email, confirm new email, show notification)\n * @setStore on error: errorMsg\n * @redirects on success: to confirmEmailOld\n *\n */export function withEmailChangeSubmit(Component){return props=>{const[store,setStore]=useStore();const[status,setStatus]=useState(\"Default\");const[initial,setInitial]=useState(true);const[loading,setLoading]=useState(false);useEffect(()=>{// Reset error message if you start typing again\nsetStore({email_errorMsg:\"\"});if(store.email_input){setStatus(\"Default\");setInitial(false);}else if(initial){// skip\n}else{setStatus(\"Disabled\");}},[store.email_input]);useEffect(()=>{if(loading){setStatus(\"Loading\");console.log(\"Status: Loading\");}},[loading]);useEffect(()=>{if(store.email_errorMsg){setStatus(\"Error\");console.log(\"Status: Error\");}},[store.email_errorMsg]);const handleEmailChange=async()=>{if(!store.email_input){setStore({email_errorMsg:getErrorMessage(\"field_email_empty\",language)});console.log(\"Please fill in the email.\");return;}if(!isValidEmail(store.email_input)){setStore({email_errorMsg:getErrorMessage(\"email_validation_failed\",language)});console.log(\"Invalid email.\");return;}setLoading(true);const{data,error}=await supabaseAnon.auth.updateUser({email:store.email_input});setLoading(false);if(error){const errorCode=error.code?error.code:\"unexpected_failure\";console.log(`Error: ${error.message} with code: ${errorCode}`);setStore({email_errorMsg:getErrorMessage(errorCode,language)});}else if(!data.user.email||!data.user.new_email){console.error(\"Could not read email data.\");const errorCode=\"unexpected_failure\";setStore({email_errorMsg:getErrorMessage(errorCode,language)});}else{console.log(\"Email change started: Please check your email to confirm your account.\");setStatus(\"Success\");// set store with emailOld and emailNew. that should trigger the \"go to your email\" notification.\nredirectTo(routes.confirmEmailOld);}};return /*#__PURE__*/_jsx(Component,{...props,variant:status,onClick:status!==\"Success\"&&status!==\"Error\"?handleEmailChange:undefined});};}// ****************************************************************************************************************************************************************\n// ******************   NAME CHANGE * DISPLAY | INPUT | ERROR | SUBMIT (user_name_prefs)   ************************************************************************************************************\n// ****************************************************************************************************************************************************************\nexport function withNameText(Component){return props=>{const[store]=useStore();// If a name field is set, display the name. If both are missing, invite to set the name.\nconst fullname=store.prefs_first_name||store.prefs_last_name?`${store.prefs_first_name||\"\"} ${store.prefs_last_name||\"\"}`.trim():\"Hallo! Wie hei\\xdft du?\";return /*#__PURE__*/_jsx(Component,{...props,text:fullname});};}/** First name input field (for changing first name for the account) */export function withFirstnameInput(Component){return props=>{const[store,setStore]=useStore();const[val,setVal]=useState(\"\");const[init,setInit]=useState(false);// did we init? -> set the value only once\nuseEffect(()=>{if(!init&&store.userId){setVal(store.prefs_first_name);setStore({input_first_name:store.prefs_first_name});setInit(true);}},[store.prefs_first_name]);const handleChange=event=>{const inputValue=event.target.value;setStore({input_first_name:inputValue});};return /*#__PURE__*/_jsx(Component,{...props,type:\"text\",defaultValue:val,onChange:handleChange});};}/** Last name input field (for changing last name for the account) */export function withLastnameInput(Component){return props=>{const[store,setStore]=useStore();const[val,setVal]=useState(\"\");const[init,setInit]=useState(false);// did we init? -> set the value only once\nuseEffect(()=>{if(!init&&store.userId){setVal(store.prefs_last_name);setStore({input_last_name:store.prefs_last_name});setInit(true);}},[store.prefs_last_name]);const handleChange=event=>{const inputValue=event.target.value;setStore({input_last_name:inputValue});};return /*#__PURE__*/_jsx(Component,{...props,type:\"text\",defaultValue:val,onChange:handleChange});};}/** Error notice (under name input field). */export function withNameErrorMsg(Component){return props=>{const[store,setStore]=useStore();const[state,setState]=useState(\"HiddenNotification\");useEffect(()=>{if(store.prefs_errorMsg){setState(\"ActiveNotification\");}else{setState(\"HiddenNotification\");}},[store.prefs_errorMsg]);return /*#__PURE__*/_jsx(Component,{...props,message:store.prefs_errorMsg,variant:state});};}/**\n * UPDATE function for a name change in user name prefs.\n * @setStore on error: errorMsg\n * @store reads: prefs_first_name, prefs_last_name\n * @updates supaTables.userNamePrefs\n *\n */export function withNameChangeSubmit(Component){return props=>{const[store,setStore]=useStore();const[status,setStatus]=useState(\"Default\");const[loading,setLoading]=useState(false);useEffect(()=>{// Reset error message if you start typing again\nsetStore({prefs_errorMsg:\"\"});setStatus(\"Default\");},[store.input_first_name,store.input_last_name]);useEffect(()=>{if(loading){setStatus(\"Loading\");console.log(\"Status: Loading\");}},[loading]);useEffect(()=>{if(store.prefs_errorMsg){setStatus(\"Error\");console.log(\"Status: Error\");}},[store.prefs_errorMsg]);const handleNameChange=async()=>{if(!store.input_first_name||!store.input_last_name){setStore({prefs_errorMsg:getDatabaseErrorMessage(\"name_prefs_missing\",language)});console.log(\"Please enter your name.\");return;}const namePrefs={first_name:store.input_first_name,last_name:store.input_last_name};setLoading(true);// Update the user's invoice preferences\nconst{data,error}=await supabaseAnon.from(supaTables.userNamePrefs).update(namePrefs).eq(\"id\",store.userId);setLoading(false);if(error){const errorCode=error.code?error.code:\"unexpected_failure\";console.log(`Error: ${error.message} with code: ${errorCode}`);setStore({prefs_errorMsg:getDatabaseErrorMessage(errorCode,language)});}else{console.log(\"Name data updated.\");setStore({prefs_first_name:namePrefs.first_name,prefs_last_name:namePrefs.last_name});setStatus(\"Success\");}};return /*#__PURE__*/_jsx(Component,{...props,variant:status,onClick:status!==\"Success\"&&status!==\"Error\"?handleNameChange:undefined});};}// ****************************************************************************************************************************************************************\n// ******************   INVOICE TEXTS (read-only from invoices)   *************************************************************************************************\n// ****************************************************************************************************************************************************************\n// *************  Invoice nav  -> pagination for invoices    -> invCurrent (current invoice, 0 or 1-n), invAvailable (total invoices, 0 or 1-n)  *************\n// *************  Invoice meta -> read-only:                 -> invoice_number, issue_date, total, currency  *************\n// *************  Invoice data -> can be toggled to inputs:  -> first name, last name, company, address, zip, city, region, country  *************\n/**\n * Helper function to decide if an invoice is finalized. It is finalized if 1) it has been updated before, or 2) if its issue date is less than 90d in the past.\n * @param created_at - the creation date of the invoice (timestamptz)\n * @param updated_at - the last update date of the invoice (timestamptz)\n * @param issue_date - the issue date of the invoice (in seconds)\n * @returns {finalized: boolean, finalizedDate: string} - finalized: true if the invoice is finalized, finalizedDate: the date as a toLocaleDateString(locale) when the invoice was finalized\n */function isFinalized(created_at,updated_at,issue_date,locale){if(updated_at!==created_at){return{finalized:true,finalizedDate:new Date(updated_at).toLocaleDateString(locale)};}else{const finalizeThreshold=90*24*60*60*1e3// 90 days in milliseconds\n;const finalizeDate=new Date(issue_date*1e3+finalizeThreshold);return{finalized:finalizeDate<new Date,finalizedDate:finalizeDate.toLocaleDateString(locale)};}}// *************  Invoice nav  ************************************************************************************************************************************\n/** Show navigation if useful */export function withInvoiceNavigation(Component){return props=>{const[store,setStore]=useStore();const[init,setInit]=useState(false);// init the store with the first invoice\nuseEffect(()=>{if(!init&&store.userId&&store.invCurrent>0){const{finalized,finalizedDate}=isFinalized(store.invoices[store.invCurrent-1].created_at,store.invoices[store.invCurrent-1].updated_at,store.invoices[store.invCurrent-1].issue_date,language);setStore({inv_finalized:finalized,inv_finalized_date:finalizedDate,inv_first_name:store.invoices[store.invCurrent-1].first_name||\"\",inv_last_name:store.invoices[store.invCurrent-1].last_name||\"\",inv_company_name:store.invoices[store.invCurrent-1].company_name||\"\",inv_line1:store.invoices[store.invCurrent-1].line1||\"\",inv_line2:store.invoices[store.invCurrent-1].line2||\"\",inv_zip:store.invoices[store.invCurrent-1].zip||\"\",inv_city:store.invoices[store.invCurrent-1].city||\"\",inv_state:store.invoices[store.invCurrent-1].state||\"\",inv_country:store.invoices[store.invCurrent-1].country||\"\"});setInit(true);}},[store.invCurrent]);return /*#__PURE__*/_jsx(Component,{...props,variant:store.invCurrent>0&&store.invAvailable>1?\"Active\":\"Inactive\"});};}export function withInvCountDecrement(Component){return props=>{const[store,setStore]=useStore();const[state,setState]=useState(\"Disabled\");useEffect(()=>{if(store.invCurrent>1){setState(\"Default\");}else{setState(\"Disabled\");}},[store.invCurrent,store.invAvailable]);const handleCountDecrement=()=>{const prev=store.invCurrent-1;const{finalized,finalizedDate}=isFinalized(store.invoices[prev-1].created_at,store.invoices[prev-1].updated_at,store.invoices[prev-1].issue_date,language);setStore({invCurrent:prev,inv_finalized:finalized,inv_finalized_date:finalizedDate,inv_first_name:store.invoices[prev-1].first_name||\"\",inv_last_name:store.invoices[prev-1].last_name||\"\",inv_company_name:store.invoices[prev-1].company_name||\"\",inv_line1:store.invoices[prev-1].line1||\"\",inv_line2:store.invoices[prev-1].line2||\"\",inv_zip:store.invoices[prev-1].zip||\"\",inv_city:store.invoices[prev-1].city||\"\",inv_state:store.invoices[prev-1].state||\"\",inv_country:store.invoices[prev-1].country||\"\"});};return /*#__PURE__*/_jsx(Component,{...props,variant:state,onClick:state===\"Default\"?handleCountDecrement:undefined});};}/** Show next invoice */export function withInvCountIncrement(Component){return props=>{const[store,setStore]=useStore();const[state,setState]=useState(\"Disabled\");useEffect(()=>{if(store.invCurrent>0&&store.invCurrent<store.invAvailable){setState(\"Default\");}else{setState(\"Disabled\");}},[store.invCurrent,store.invAvailable]);const handleCountIncrement=()=>{const next=store.invCurrent+1;const{finalized,finalizedDate}=isFinalized(store.invoices[next-1].created_at,store.invoices[next-1].updated_at,store.invoices[next-1].issue_date,language);setStore({invCurrent:next,inv_finalized:finalized,inv_finalized_date:finalizedDate,inv_first_name:store.invoices[next-1].first_name||\"\",inv_last_name:store.invoices[next-1].last_name||\"\",inv_company_name:store.invoices[next-1].company_name||\"\",inv_line1:store.invoices[next-1].line1||\"\",inv_line2:store.invoices[next-1].line2||\"\",inv_zip:store.invoices[next-1].zip||\"\",inv_city:store.invoices[next-1].city||\"\",inv_state:store.invoices[next-1].state||\"\",inv_country:store.invoices[next-1].country||\"\"});};return /*#__PURE__*/_jsx(Component,{...props,variant:state,onClick:state===\"Default\"?handleCountIncrement:undefined});};}// *************  Invoice meta  ************************************************************************************************************************************\n// no invoices? show a notice that there are no invoices\nexport function withInvoices(Component){return props=>{const[store]=useStore();return /*#__PURE__*/_jsx(Component,{...props,...store.noInvoices&&(store.userType===\"customer\"||store.userType===\"beta\"?{variant:\"Gifted\"}:{variant:\"NoInvoice\"})});};}/** Display the invoice number from the current invoice. If no invoice is selected, display an empty string. */export function withInvNumber(Component){return props=>{const[store]=useStore();const ready=store.invCurrent>0&&store.invCurrent<=store.invAvailable;const text=ready?store.invoices[store.invCurrent-1]?.invoice_number||\"\":\"...\";return /*#__PURE__*/_jsx(Component,{...props,text:text});};}/** Display the invoice date as locale string from issueDate */export function withInvDate(Component){return props=>{const[store]=useStore();const ready=store.invCurrent>0&&store.invCurrent<=store.invAvailable;const text=ready?new Date(store.invoices[store.invCurrent-1]?.issue_date*1e3).toLocaleDateString(language):\"\";return /*#__PURE__*/_jsx(Component,{...props,text:text});};}/** Display the invoice date as locale string from issueDate */export function withInvoiceFinalizedDate(Component){return props=>{const[store]=useStore();const ready=store.invCurrent>0&&store.invCurrent<=store.invAvailable;return /*#__PURE__*/_jsx(Component,{...props,variant:ready?store.inv_finalized?\"FinalizedInPast\":\"FinalizationUpcoming\":\"Hidden\",finalizedDate:store.inv_finalized_date});};}/** Which invoice is selected? */export function withInvCountCurrent(Component){return props=>{const[store]=useStore();return /*#__PURE__*/_jsx(Component,{...props,text:`${store.invCurrent}`});};}/** How many invoices are available? */export function withInvCountAvailable(Component){return props=>{const[store]=useStore();return /*#__PURE__*/_jsx(Component,{...props,text:`${store.invAvailable}`});};}/** Display the invoice date as locale string from issueDate */export function withInvTotal(Component){return props=>{const[store]=useStore();const ready=store.invCurrent>0&&store.invCurrent<=store.invAvailable;const total=ready?getFormattedPriceString(store.invoices[store.invCurrent-1]?.total)||\"\":\"\";const currency=ready?store.invoices[store.invCurrent-1]?.currency||\"\":\"\";const text=ready&&total&&currency?`${total}\\u00A0${currency===\"eur\"?\"\u20AC\":currency}`:\"\";return /*#__PURE__*/_jsx(Component,{...props,text:text});};}// *************  Invoice data  ************************************************************************************************************************************\n/** Display the company name from the current invoice. If no invoice is selected, display an empty string. */export function withInvCompanyText(Component){return props=>{const[store]=useStore();const ready=store.invCurrent>0&&store.invCurrent<=store.invAvailable;const text=ready?store.invoices[store.invCurrent-1]?.company_name||\"\":\"\";return /*#__PURE__*/_jsx(Component,{...props,text:text});};}/** Display the first + last name from the current invoice. If no invoice is selected, display an empty string. */export function withInvNameText(Component){return props=>{const[store]=useStore();const ready=store.invCurrent>0&&store.invCurrent<=store.invAvailable;const text=ready?`${store.invoices[store.invCurrent-1]?.first_name||\"\"} ${store.invoices[store.invCurrent-1]?.last_name||\"\"}`.trim():\"...\";return /*#__PURE__*/_jsx(Component,{...props,text:text});};}/** Display line 1, line2 from the current invoice. If no invoice is selected, display an empty string. */export function withInvLines12Text(Component){return props=>{const[store]=useStore();const ready=store.invCurrent>0&&store.invCurrent<=store.invAvailable;const row=store.invoices[store.invCurrent-1]?.line1&&store.invoices[store.invCurrent-1]?.line2?`${store.invoices[store.invCurrent-1]?.line1}, ${store.invoices[store.invCurrent-1]?.line2}`:`${store.invoices[store.invCurrent-1]?.line1||\"\"} ${store.invoices[store.invCurrent-1]?.line2||\"\"}`.trim();const text=ready?row:\"\";return /*#__PURE__*/_jsx(Component,{...props,text:text});};}/** Display zip, city, state from the current invoice. If no invoice is selected, display an empty string. */export function withInvZipCityStateText(Component){return props=>{const[store]=useStore();const ready=store.invCurrent>0&&store.invCurrent<=store.invAvailable;const zipcity=`${store.invoices[store.invCurrent-1]?.zip||\"\"} ${store.invoices[store.invCurrent-1]?.city||\"\"}`.trim();const state=zipcity?store.invoices[store.invCurrent-1]?.state?` (${store.invoices[store.invCurrent-1]?.state})`:\"\":store.invoices[store.invCurrent-1]?.state?`${store.invoices[store.invCurrent-1]?.state}`:\"\";const text=ready?zipcity+state:\"\";return /*#__PURE__*/_jsx(Component,{...props,text:text});};}/** Display the country from the current invoice. If no invoice is selected, display an empty string. */export function withInvCountryText(Component){return props=>{const[store]=useStore();const ready=store.invCurrent>0&&store.invCurrent<=store.invAvailable;const text=ready?store.invoices[store.invCurrent-1]?.country||\"\":\"\";return /*#__PURE__*/_jsx(Component,{...props,text:text});};}// ****************************************************************************************************************************************************************\n// ******************   INVOICE INPUTS (for user_invoice_updates)   ***********************************************************************************************\n// ****************************************************************************************************************************************************************\nexport function withInvInputCompany(Component){return props=>{const[store,setStore]=useStore();const ready=store.userId&&store.invCurrent>0&&store.invAvailable>0;const handleChange=event=>{const inputValue=event.target.value;setStore({inv_company_name:inputValue});console.log(\"Company name: \"+inputValue);};return /*#__PURE__*/_jsx(Component,{...props,type:\"text\",defaultValue:ready?store.invoices[store.invCurrent-1].company_name||\"\":\"...\",onChange:handleChange});};}export function withInvInputFirstname(Component){return props=>{const[store,setStore]=useStore();const ready=store.userId&&store.invCurrent>0&&store.invAvailable>0;const handleChange=event=>{const inputValue=event.target.value;setStore({inv_first_name:inputValue});console.log(\"First name: \"+inputValue);};return /*#__PURE__*/_jsx(Component,{...props,type:\"text\",defaultValue:ready?store.invoices[store.invCurrent-1].first_name||\"\":\"...\",onChange:handleChange});};}export function withInvInputLastname(Component){return props=>{const[store,setStore]=useStore();const ready=store.userId&&store.invCurrent>0&&store.invAvailable>0;const handleChange=event=>{const inputValue=event.target.value;setStore({inv_last_name:inputValue});console.log(\"Last name: \"+inputValue);};return /*#__PURE__*/_jsx(Component,{...props,type:\"text\",defaultValue:ready?store.invoices[store.invCurrent-1].last_name||\"\":\"...\",onChange:handleChange});};}export function withInvInputLine1(Component){return props=>{const[store,setStore]=useStore();const ready=store.userId&&store.invCurrent>0&&store.invAvailable>0;const handleChange=event=>{const inputValue=event.target.value;setStore({inv_line1:inputValue});console.log(\"Line1: \"+inputValue);};return /*#__PURE__*/_jsx(Component,{...props,type:\"text\",defaultValue:ready?store.invoices[store.invCurrent-1].line1||\"\":\"...\",onChange:handleChange});};}export function withInvInputLine2(Component){return props=>{const[store,setStore]=useStore();const ready=store.userId&&store.invCurrent>0&&store.invAvailable>0;const handleChange=event=>{const inputValue=event.target.value;setStore({inv_line2:inputValue});console.log(\"Line2: \"+inputValue);};return /*#__PURE__*/_jsx(Component,{...props,type:\"text\",defaultValue:ready?store.invoices[store.invCurrent-1].line2||\"\":\"...\",onChange:handleChange});};}export function withInvInputZip(Component){return props=>{const[store,setStore]=useStore();const ready=store.userId&&store.invCurrent>0&&store.invAvailable>0;const handleChange=event=>{const inputValue=event.target.value;setStore({inv_zip:inputValue});console.log(\"Zip: \"+inputValue);};return /*#__PURE__*/_jsx(Component,{...props,type:\"text\",defaultValue:ready?store.invoices[store.invCurrent-1].zip||\"\":\"...\",onChange:handleChange});};}export function withInvInputCity(Component){return props=>{const[store,setStore]=useStore();const ready=store.userId&&store.invCurrent>0&&store.invAvailable>0;const handleChange=event=>{const inputValue=event.target.value;setStore({inv_city:inputValue});console.log(\"City: \"+inputValue);};return /*#__PURE__*/_jsx(Component,{...props,type:\"text\",defaultValue:ready?store.invoices[store.invCurrent-1].city||\"\":\"...\",onChange:handleChange});};}export function withInvInputState(Component){return props=>{const[store,setStore]=useStore();const ready=store.userId&&store.invCurrent>0&&store.invAvailable>0;const handleChange=event=>{const inputValue=event.target.value;setStore({inv_state:inputValue});console.log(\"State: \"+inputValue);};return /*#__PURE__*/_jsx(Component,{...props,type:\"text\",defaultValue:ready?store.invoices[store.invCurrent-1].state||\"\":\"...\",onChange:handleChange});};}// ****************************************************************************************************************************************************************\n// ******************   SUPABASE UPDATES AND INSERTS (submit functions)   *****************************************************************************************\n// ****************************************************************************************************************************************************************\n/** Error notice (under name input field). */export function withInvErrorMsg(Component){return props=>{const[store,setStore]=useStore();const[state,setState]=useState(\"HiddenNotification\");useEffect(()=>{if(store.inv_errorMsg){setState(\"ActiveNotification\");}else{setState(\"HiddenNotification\");}},[store.inv_errorMsg]);return /*#__PURE__*/_jsx(Component,{...props,message:store.inv_errorMsg,variant:state});};}/**\n * INSERT function for an invoice update intent. Inserts a row into Supabase that auto-updates the invoice if the request is valid.\n * @setStore on error: errorMsg\n * @store reads: inv_ values\n * @updates supaTables.userInvoiceUpdates\n *\n */export function withInvChangeSubmit(Component){return props=>{const[store,setStore]=useStore();const[status,setStatus]=useState(\"Default\");const[loading,setLoading]=useState(false);useEffect(()=>{// Reset error message if you start typing again\nsetStore({inv_errorMsg:\"\"});setStatus(\"Default\");},[store.inv_company_name,store.inv_first_name,store.inv_last_name,store.inv_line1,store.inv_line2,store.inv_zip,store.inv_city,store.inv_state,store.inv_country]);useEffect(()=>{if(loading){setStatus(\"Loading\");console.log(\"Status: Loading\");}},[loading]);useEffect(()=>{if(store.inv_errorMsg){setStatus(\"Error\");console.log(\"Status: Error\");}},[store.inv_errorMsg]);// console.log(\"Status Pre: \" + store.invoices[store.invCurrent-1].sequential_id, store.invoices[store.invCurrent-1])\nconst handleInvChange=async()=>{if(!store.invoices[store.invCurrent-1]?.sequential_id){setStore({inv_errorMsg:getDatabaseErrorMessage(\"conflict\",language)});console.log(\"Error loading invoice id.\");return;}if(!store.inv_first_name&&!store.inv_last_name&&!store.inv_company_name){setStore({inv_errorMsg:getDatabaseErrorMessage(\"name_missing\",language)});console.log(\"Please enter a name.\");return;}if(!store.inv_line1||!store.inv_zip||!store.inv_city||!store.inv_country){setStore({inv_errorMsg:getDatabaseErrorMessage(\"address_missing\",language)});console.log(\"Please enter a valid address.\");return;}const invoicePrefs={sequential_id:store.invoices[store.invCurrent-1].sequential_id,user_id:store.userId,company_name:store.inv_company_name,first_name:store.inv_first_name,last_name:store.inv_last_name,line1:store.inv_line1,line2:store.inv_line2,zip:store.inv_zip,city:store.inv_city,state:store.inv_state,country:store.inv_country};function isUpdateNoChange(invoiceCurrent,invInputs){try{const invUpdateKeys=Object.keys(invInputs);for(const key of invUpdateKeys){if((invoiceCurrent[key]||\"\")!==(invInputs[key]||\"\")){return false;}}return true;}catch(error){console.error(\"Error in isUpdateNoChange:\",error);throw error;}}if(isUpdateNoChange(store.invoices[store.invCurrent-1],invoicePrefs)){setStore({inv_errorMsg:getDatabaseErrorMessage(\"no_update\",language)});console.log(\"Your invoice data is already up to date.\");return;}setLoading(true);// Update the user's invoice preferences\nconst{data,error}=await supabaseAnon.from(supaTables.userInvoiceUpdates).insert(invoicePrefs).eq(\"sequential_id\",invoicePrefs.sequential_id);setLoading(false);if(error){const errorCode=error.code?error.code:\"unexpected_failure\";console.log(`Error: ${error.message} with code: ${errorCode}`);setStore({inv_errorMsg:getDatabaseErrorMessage(errorCode,language)});}else{console.log(\"Invoice data updated.\");const updatedInvoices=[...store.invoices];updatedInvoices[store.invCurrent-1]={...updatedInvoices[store.invCurrent-1],...invoicePrefs,updated_at:new Date().toISOString()};setStore({invoices:updatedInvoices,inv_finalized:true,inv_finalized_date:new Date().toLocaleDateString(language)});// console.log(\"Status Post: \" + store.invoices[store.invCurrent-1].sequential_id, store.invoices[store.invCurrent-1])\nsetStatus(\"Success\");}};return /*#__PURE__*/_jsx(Component,{...props,variant:store.userId&&store.invCurrent>0&&!store.inv_finalized?status:\"Hidden\",onClick:status!==\"Success\"&&status!==\"Error\"&&status!==\"Hidden\"?handleInvChange:undefined});};}/**\n * OnClick action: Fetches a PDF invoice of the currently viewed.\n * @trigger onClick\n */export function withPdfDownload(Component){return props=>{const[store,setStore]=useStore();async function fetch1(){await fetchInvoicePDF(store.invoices[store.invCurrent-1].sequential_id,store.invoices[store.invCurrent-1].invoice_number);}return /*#__PURE__*/_jsx(Component,{...props,onClick:store.invoices[store.invCurrent-1]?.sequential_id&&store.invoices[store.invCurrent-1]?.invoice_number?fetch1:undefined});};}/**\n * Fetches the user data from CF API.\n * Requires that you have called auth.getUser() before and have a valid session.\n * @returns stringified JSON reply or error or null\n */async function fetchInvoicePDF(sequential_id,invoice_number){try{const bearerToken=await getFreshAccessToken();// Send a request to the Cloudflare worker\nconst response=await fetch(apiRoutes.getPDFInvoice,{method:\"GET\",headers:{Authorization:`Bearer ${bearerToken}`,\"Invoice-Id\":`${sequential_id}`,\"Content-Type\":\"application/json\"}});// Check if the response is OK (status code 200-299)\nif(!response.ok){throw new Error(`Failed to fetch PDF: ${response.status} ${response.statusText}`);}else{// Convert the response to a blob\nconst blob=await response.blob();// Create a temporary URL for the blob\nconst url=window.URL.createObjectURL(blob);// Create a hidden anchor element\nconst a=document.createElement(\"a\");a.href=url;// Set the desired file name\na.download=`${invoice_number}.pdf`;// Append the anchor to the document body\ndocument.body.appendChild(a);// Programmatically click the anchor to trigger the download\na.click();// Clean up by removing the anchor and revoking the object URL\na.remove();window.URL.revokeObjectURL(url);}}catch(error){console.error(\"Error downloading the PDF:\",error);}}// ****************************************************************************************************************************************************************\n// *************   SUPABASE USER SESSION and STORE INIT:   auth.getUser(), user data fetches  *********************************************************************\n// ****************************************************************************************************************************************************************\n// Validate the session and get the user's email\n/**\n * Calls getUser() to validate with supabase and get the user's email and id.\n * @setStore email, userId\n * @fetches from API: UserDashReply         ->(userType, userTypeLabel, userExpiry, userBetaMode, urlMacDownload, urlWindowsDownload)\n * @fetches from Supabase: UserNamePrefs    ->(prefs_first_name, prefs_last_name)\n * @fetches from Supabase: StripeInvoice[]  ->(invoices, invAvailable, invCurrent)\n */export function withSupabaseAuth(Component){return props=>{const[store,setStore]=useStore();const getUser=async()=>{// getUser() does check with the server and is more reliable.\nconst{data,error}=await supabaseAnon.auth.getUser();if(error){console.log(\"There was an error retrieving the user: \"+error.message);await returnToLogin();}else if(!data.user?.email){console.log(\"Error: No user.\");await returnToLogin();}else{console.log(\"User active: \"+data.user.email);setStore({email:data.user.email,userId:data.user.id});// get account info too\nconst{data:framerUser,error:framerUserError}=await fetchUserData()// right now could switch to session without refresh when we just getuser before\n;if(framerUserError){console.log(\"Error: \"+framerUserError);await returnToLogin();}else if(!framerUser){console.log(\"Error: No framer user.\");await returnToLogin();}else{const user=JSON.parse(framerUser);// setStore({ userType: user.type, userTypeLabel: user.label, userExpiry: user.expires, userBetaMode: user.isBetaEmail,\n//            urlMacDownload: user.mac, urlWindowsDownload: user.win,\n//            invoicePrefs: user.invoicePrefs, invoices: user.invoices, creditNotes: user.creditNotes })\n//            console.log(\"User data loaded.\", JSON.stringify(user))\nsetStore({userType:user.type,userTypeLabel:user.label,userExpiry:user.expires,userBetaMode:user.isBetaEmail,urlMacDownload:user.mac,urlWindowsDownload:user.win,urlMacEnDownload:user.macEnglish,urlWindowsEnDownload:user.winEnglish});}// *** Get the user's name\nconsole.log(\"Getting name: \"+data.user.id);const namePrefs=await loadUserNamePrefs(data.user.id);if(namePrefs){console.log(\"Name loaded.\",namePrefs);setStore({prefs_first_name:namePrefs.first_name||\"\",prefs_last_name:namePrefs.last_name||\"\"});}else{console.log(\"No invoice prefs found.\");}// *** Get the user's invoices\nconsole.log(\"Getting invoices: \"+data.user.id);const invoices=await loadUserInvoices(data.user.id);if(invoices&&invoices.length>0){console.log(\"Invoices loaded.\",invoices);setStore({invoices:invoices,invAvailable:invoices.length,invCurrent:1});}else{setStore({noInvoices:true});console.log(\"No invoice found.\");}}};useEffect(()=>{getUser();},[]);return /*#__PURE__*/_jsx(Component,{...props});};}/**\n * Fetches the user's name preferences from Supabase. Returns null on error.\n * Requires that you have called auth.getUser() before and have a valid session.\n * @param userId user id from auth.getUser()\n * @returns UserNamePrefs or null\n */async function loadUserNamePrefs(userId){try{const{data,error}=await supabaseAnon.from(supaTables.userNamePrefs).select(\"*\").eq(\"id\",userId).single();if(error){console.error(\"Error fetching user prefs:\",error.message);return null;}else if(!data||!data.id){console.error(\"Error fetching user prefs: No data.\");return null;}else{return data;}}catch(error){console.error(\"Error fetching user prefs:\",error.message);return null;}}/**\n * Fetches the user's invoices from Supabase. Returns null on error.\n * Requires that you have called auth.getUser() before and have a valid session.\n * @param userId user id from auth.getUser()\n * @returns StripeInvoice[] or null\n */async function loadUserInvoices(userId){try{// Fetch the user's invoice preferences\nconst{data,error}=await supabaseAnon.from(supaTables.userInvoices).select(\"*\").eq(\"user_id\",userId).order(\"sequential_id\",{ascending:true});if(error){console.error(\"Error fetching invoices:\",error.message);return null;}else if(!data||data.length===0){console.log(\"No invoices found.\");return null;}else{return data;}}catch(error){console.error(\"Error fetching invoices:\",error.message);return null;}}/**\n * Fetches the user data from CF API.\n * Requires that you have called auth.getUser() before and have a valid session.\n * @returns stringified JSON reply or error or null\n */async function fetchUserData(){try{const bearerToken=await getFreshAccessToken();// Send a request to the Cloudflare worker\nconst response=await fetch(apiRoutes.getUserDash,{method:\"GET\",headers:{Authorization:`Bearer ${bearerToken}`,\"Content-Type\":\"application/json\"}});if(response.ok){const data=await response.text();return{data,error:null};}else{const errorText=await response.text();const error=`Status ${response.status}: ${errorText}`;return{data:null,error};}}catch(error){return{data:null,error:\"Error fetching dash: \"+error?.message};}}// ****************************************************************************************************************************************************************\n// ******************   SUPABASE SESSION REFRESH:   auth.refreshSession()   ***************************************************************************************\n// ****************************************************************************************************************************************************************\n/**\n * Refreshes the user session and returns the session access token.\n * @returns string session.access_token\n */async function getFreshAccessToken(){try{// get refreshed access token\nconst refreshed=await supabaseAnon.auth.refreshSession();if(refreshed.error){throw refreshed.error;}else if(!refreshed.data.session){throw new Error(\"No available session.\");}else{const accessToken=refreshed.data.session.access_token;return accessToken;}}catch(error){console.error(\"Error refreshing session: \"+error?.message);return null;}}// ****************************************************************************************************************************************************************\n// ******************   SUPABASE CACHED SESSION:   returnToLogin(), redirectTo(routes.dashboard)   ****************************************************************\n// ****************************************************************************************************************************************************************\n/**\n * Calls auth.getSession(), which is a cached session. This call is very fast and can be used to see if the frontend claims to be logged-in.\n * Re-validate with the server for all critical actions.\n * @redirects to login if no cached session exists\n * @redirects to dash if cached session exists\n */export function withSupabaseCachedAuth(Component){return props=>{const getSession=async()=>{const{data,error}=await supabaseAnon.auth.getSession();if(error){console.log(\"Error getting session: \"+error.message);await returnToLogin();}else if(!data.session?.user?.email){console.log(\"Session error: No email for user.\");await returnToLogin();}else{console.log(\"Going to dash: \"+data.session?.user?.email);redirectTo(routes.dashboard);}};useEffect(()=>{getSession();},[]);return /*#__PURE__*/_jsx(Component,{...props});};}// ****************************************************************************************************************************************************************\n// ******************   SUPABASE LOGOUT ACTIONS:   auth.signOut({ scope: 'local' }), redirectTo(routes.login)   ***************************************************\n// ****************************************************************************************************************************************************************\n/**\n * Helper: Signs out the user with auth.signOut and redirects to the login page.\n * @session auth.signOut (scope: local)\n * @redirects to login\n */async function returnToLogin(){console.log(\"Signing out...\");// sign user out of supabase here\nconst{error}=await supabaseAnon.auth.signOut({scope:\"local\"});if(error){console.error(\"Error signing out:\",error);}// redirect to login page. hard redirect.\nredirectTo(routes.login);}/**\n * OnClick action: Signs out the user with auth.signOut and redirects to the login page.\n * @trigger onClick\n * @session auth.signOut (scope: local)\n * @redirects to login\n */export function withLogout(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:returnToLogin});};}/**\n * Load action: Signs out the user with auth.signOut. Visitor stays on the page. Use to reset the session on account change steps.\n * @trigger Component mount / useEffect() (automatic on load)\n * @session auth.signOut (scope: local)\n */export function withSessionReset(Component){return props=>{const logout=async()=>{console.log(\"Signing out...\");// sign user out of supabase here\nconst{error}=await supabaseAnon.auth.signOut({scope:\"local\"});if(error){console.error(\"Error signing out:\",error);}};useEffect(()=>{logout();},[]);return /*#__PURE__*/_jsx(Component,{...props});};}// ***************************************************************************************\n// SupaDash.tsx\n// ***************************************************************************************\n\nexport const __FramerMetadata__ = {\"exports\":{\"withInvChangeSubmit\":{\"type\":\"reactHoc\",\"name\":\"withInvChangeSubmit\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvZipCityStateText\":{\"type\":\"reactHoc\",\"name\":\"withInvZipCityStateText\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNameChangeSubmit\":{\"type\":\"reactHoc\",\"name\":\"withNameChangeSubmit\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withUrlMacEn\":{\"type\":\"reactHoc\",\"name\":\"withUrlMacEn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStripeFetchUpgrade\":{\"type\":\"reactHoc\",\"name\":\"withStripeFetchUpgrade\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvoiceFinalizedDate\":{\"type\":\"reactHoc\",\"name\":\"withInvoiceFinalizedDate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvInputLine2\":{\"type\":\"reactHoc\",\"name\":\"withInvInputLine2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPdfDownload\":{\"type\":\"reactHoc\",\"name\":\"withPdfDownload\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvInputState\":{\"type\":\"reactHoc\",\"name\":\"withInvInputState\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withUrlMac\":{\"type\":\"reactHoc\",\"name\":\"withUrlMac\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvCountIncrement\":{\"type\":\"reactHoc\",\"name\":\"withInvCountIncrement\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEmailChangeSessionCheck\":{\"type\":\"reactHoc\",\"name\":\"withEmailChangeSessionCheck\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvoices\":{\"type\":\"reactHoc\",\"name\":\"withInvoices\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSupabaseCachedAuth\":{\"type\":\"reactHoc\",\"name\":\"withSupabaseCachedAuth\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSupabaseAuth\":{\"type\":\"reactHoc\",\"name\":\"withSupabaseAuth\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStripeFetchEducation\":{\"type\":\"reactHoc\",\"name\":\"withStripeFetchEducation\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStripeFetchGiftUpgrade\":{\"type\":\"reactHoc\",\"name\":\"withStripeFetchGiftUpgrade\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNameText\":{\"type\":\"reactHoc\",\"name\":\"withNameText\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvInputCompany\":{\"type\":\"reactHoc\",\"name\":\"withInvInputCompany\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvDate\":{\"type\":\"reactHoc\",\"name\":\"withInvDate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSessionReset\":{\"type\":\"reactHoc\",\"name\":\"withSessionReset\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvCountryText\":{\"type\":\"reactHoc\",\"name\":\"withInvCountryText\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEmail\":{\"type\":\"reactHoc\",\"name\":\"withEmail\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFirstnameInput\":{\"type\":\"reactHoc\",\"name\":\"withFirstnameInput\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvCompanyText\":{\"type\":\"reactHoc\",\"name\":\"withInvCompanyText\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvCountCurrent\":{\"type\":\"reactHoc\",\"name\":\"withInvCountCurrent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvCountAvailable\":{\"type\":\"reactHoc\",\"name\":\"withInvCountAvailable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStripeFetchGiftEducation\":{\"type\":\"reactHoc\",\"name\":\"withStripeFetchGiftEducation\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvInputLastname\":{\"type\":\"reactHoc\",\"name\":\"withInvInputLastname\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvErrorMsg\":{\"type\":\"reactHoc\",\"name\":\"withInvErrorMsg\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvInputZip\":{\"type\":\"reactHoc\",\"name\":\"withInvInputZip\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withUserType\":{\"type\":\"reactHoc\",\"name\":\"withUserType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEmailErrorMsg\":{\"type\":\"reactHoc\",\"name\":\"withEmailErrorMsg\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEmailInput\":{\"type\":\"reactHoc\",\"name\":\"withEmailInput\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvLines12Text\":{\"type\":\"reactHoc\",\"name\":\"withInvLines12Text\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvTotal\":{\"type\":\"reactHoc\",\"name\":\"withInvTotal\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withUrlWindowsEn\":{\"type\":\"reactHoc\",\"name\":\"withUrlWindowsEn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEmailChangeSubmit\":{\"type\":\"reactHoc\",\"name\":\"withEmailChangeSubmit\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvNameText\":{\"type\":\"reactHoc\",\"name\":\"withInvNameText\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLogout\":{\"type\":\"reactHoc\",\"name\":\"withLogout\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvCountDecrement\":{\"type\":\"reactHoc\",\"name\":\"withInvCountDecrement\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withUrlWindows\":{\"type\":\"reactHoc\",\"name\":\"withUrlWindows\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvInputLine1\":{\"type\":\"reactHoc\",\"name\":\"withInvInputLine1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvNumber\":{\"type\":\"reactHoc\",\"name\":\"withInvNumber\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStripeFetchNew\":{\"type\":\"reactHoc\",\"name\":\"withStripeFetchNew\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvInputFirstname\":{\"type\":\"reactHoc\",\"name\":\"withInvInputFirstname\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLastnameInput\":{\"type\":\"reactHoc\",\"name\":\"withLastnameInput\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNameErrorMsg\":{\"type\":\"reactHoc\",\"name\":\"withNameErrorMsg\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvInputCity\":{\"type\":\"reactHoc\",\"name\":\"withInvInputCity\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withStripeFetchGiftNew\":{\"type\":\"reactHoc\",\"name\":\"withStripeFetchGiftNew\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInvoiceNavigation\":{\"type\":\"reactHoc\",\"name\":\"withInvoiceNavigation\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],
  "mappings": "mRACgf,IAAMA,EAASC,EAAY,CAAC,OAAO,GAAG,SAAS,GAAG,cAAc,GAAG,aAAa,GAAM,WAAW,EAAE,mBAAmB,GAAG,eAAe,GAAG,qBAAqB,GAAG,iBAAiB,GAAG,MAAM,mBAAmB,UAAU,GAAG,YAAY,GAAG,eAAe,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,eAAe,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,WAAW,GACz1B,SAAS,CAAC,EAAE,aAAa,EACzB,WAAW,EACX,eAAe,GAAG,cAAc,GAAG,iBAAiB,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,GAAG,aAAa,GAAG,cAAc,GAAM,mBAAmB,GAC3L,eAAe,GAAG,aAAa,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,qBAAqB,GAAG,uBAAuB,EAAE,CAAC,EAG5IC,EAAU,CAAC,IAAI,GAAGC,EAAU,sBAAsBC,QAAe,QAAQ,GAAGD,EAAU,sBAAsBC,YAAmB,UAAU,GAAGD,EAAU,sBAAsBC,aAAoB,EAAQC,EAAgB,CAAC,IAAI,GAAGF,EAAU,sBAAsBC,aAAoB,QAAQ,GAAGD,EAAU,sBAAsBC,iBAAwB,UAAU,GAAGD,EAAU,sBAAsBC,kBAAyB,EAAE,eAAeE,EAAoBC,EAAK,CAAC,GAAG,CACjd,IAAMC,EAAS,MAAM,MAAMD,EAAK,CAAC,OAAO,MAAM,QAAQ,CAAC,eAAe,kBAAkB,CAAC,CAAC,EAAE,GAAGC,EAAS,GAAI,eAAQ,IAAI,0BAA0B,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c,GAAYF,EAAK,SAAS,MAAM,OAAoF,QAAQ,IAAI,kBAAkBA,EAAK,SAAS,MAAM,KAAK,EAAEkB,EAAWC,EAAO,SAAS,IAAjK,QAAQ,IAAI,mCAAmC,EAAE,MAAMjB,EAAc,EAA+F,EAAE,OAAAS,EAAU,IAAI,CAACM,EAAW,CAAE,EAAE,CAAC,CAAC,EAAsB/B,EAAKP,EAAU,CAAC,GAAGC,CAAK,CAAC,CAAE,CAAE,CAOtgB,eAAesB,GAAe,CAAC,QAAQ,IAAI,gBAAgB,EAC9D,GAAK,CAAC,MAAAL,CAAK,EAAE,MAAMI,EAAa,KAAK,QAAQ,CAAC,MAAM,OAAO,CAAC,EAAKJ,GAAO,QAAQ,MAAM,qBAAqBA,CAAK,EAChHqB,EAAWC,EAAO,KAAK,CAAE,CAKf,SAASC,GAAWzC,EAAU,CAAC,OAAOC,GAA4BM,EAAKP,EAAU,CAAC,GAAGC,EAAM,QAAQsB,CAAa,CAAC,CAAI,CAIrH,SAASmB,GAAiB1C,EAAU,CAAC,OAAOC,GAAO,CAAC,IAAM0C,EAAO,SAAS,CAAC,QAAQ,IAAI,gBAAgB,EACjH,GAAK,CAAC,MAAAzB,CAAK,EAAE,MAAMI,EAAa,KAAK,QAAQ,CAAC,MAAM,OAAO,CAAC,EAAKJ,GAAO,QAAQ,MAAM,qBAAqBA,CAAK,CAAG,EAAE,OAAAc,EAAU,IAAI,CAACW,EAAO,CAAE,EAAE,CAAC,CAAC,EAAsBpC,EAAKP,EAAU,CAAC,GAAGC,CAAK,CAAC,CAAE,CAAE",
  "names": ["useStore", "createStore", "checkouts", "apiRoutes", "language", "checkouts_gifts", "fetchStripeCheckout", "path", "response", "errorText", "error", "withStripeFetchNew", "Component", "props", "store", "setStore", "status", "setStatus", "ye", "loading", "setLoading", "ue", "p", "url", "data", "redirectTo", "withStripeFetchUpgrade", "withStripeFetchEducation", "withStripeFetchGiftNew", "withStripeFetchGiftUpgrade", "withStripeFetchGiftEducation", "withEmail", "withUserType", "withUrlMac", "withUrlWindows", "Component", "props", "store", "setStore", "useStore", "status", "setStatus", "ye", "ue", "p", "withEmailChangeSessionCheck", "Component", "props", "store", "setStore", "useStore", "state", "setState", "ye", "getSession", "data", "error", "supabaseAnon", "returnToLogin", "ue", "p", "withEmailInput", "handleChange", "event", "inputValue", "withEmailErrorMsg", "withEmailChangeSubmit", "status", "setStatus", "initial", "setInitial", "loading", "setLoading", "getErrorMessage", "language", "isValidEmail", "errorCode", "redirectTo", "routes", "withNameText", "fullname", "withFirstnameInput", "val", "setVal", "init", "setInit", "withLastnameInput", "withNameErrorMsg", "withNameChangeSubmit", "getDatabaseErrorMessage", "namePrefs", "supaTables", "isFinalized", "created_at", "updated_at", "issue_date", "locale", "finalizeDate", "withInvoiceNavigation", "finalized", "finalizedDate", "withInvCountDecrement", "prev", "withInvCountIncrement", "next", "withInvoices", "withInvNumber", "text", "withInvDate", "withInvCountCurrent", "Component", "props", "store", "useStore", "p", "withInvCountAvailable", "withInvTotal", "ready", "total", "getFormattedPriceString", "currency", "text", "withInvCompanyText", "withInvNameText", "withInvLines12Text", "row", "withInvZipCityStateText", "zipcity", "state", "withInvCountryText", "withPdfDownload", "Component", "props", "store", "setStore", "useStore", "fetch1", "fetchInvoicePDF", "p", "sequential_id", "invoice_number", "bearerToken", "getFreshAccessToken", "response", "apiRoutes", "blob", "url", "window", "a", "error", "withSupabaseAuth", "getUser", "data", "supabaseAnon", "returnToLogin", "framerUser", "framerUserError", "fetchUserData", "user", "namePrefs", "loadUserNamePrefs", "invoices", "loadUserInvoices", "ue", "userId", "supaTables", "errorText", "refreshed", "withSupabaseCachedAuth", "getSession", "redirectTo", "routes", "withLogout", "withSessionReset", "logout"]
}
