PageSourceSearch

https://tryhugo.ai/static/js/3836.98810db7.chunk.js

js tryhugo.ai collected 2026-10-05 16:09:23 UTC 3,155 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkreact_saas_template=self.webpackChunkreact_saas_template||[]).push([[3836],{983:(e,r,n)=>{n.d(r,{A:()=>l});var i=n(65043),t=n(40854),o=n.n(t);const l=()=>{var e,r,n,t,l,u;const[c,a]=(0,i.useState)(null),[d,s]=(0,i.useState)(!0),[p,g]=(0,i.useState)(null);(0,i.useEffect)((()=>{(async()=>{try{s(!0);const e=await o().get("/api/users/regional-pricing");if(!e.data.success)throw new Error("Failed to fetch pricing");a(e.data),console.log("\ud83c\udf0d Regional pricing loaded:",e.data)}catch(e){console.error("\u274c Error fetching regional pricing:",e),g(e.message),a({success:!0,country:"DEFAULT",pricing:{monthly:{priceId:"price_uk_monthly",amount:30,currency:"GBP",symbol:"\xa3"},yearly:{priceId:"price_uk_yearly",amount:150,currency:"GBP",symbol:"\xa3"},tier:"premium"}})}finally{s(!1)}})()}),[]);return{pricing:c,loading:d,error:p,calculateSavings:()=>{if(null===c||void 0===c||!c.pricing)return 0;const{monthly:e,yearly:r}=c.pricing,n=12*e.amount,i=n-r.amount;return Math.round(i/n*100)},getTierDisplayName:()=>{var e;if(null===c||void 0===c||null===(e=c.pricing)||void 0===e||!e.tier)return"Standard";switch(c.pricing.tier){case"premium":return"Premium";case"developing":return"Developing Countries";default:return"Standard"}},getTierDescription:()=>{var e;if(null===c||void 0===c||null===(e=c.pricing)||void 0===e||!e.tier)return"Standard pricing for your region";switch(c.pricing.tier){case"premium":return"Premium pricing for developed markets";case"developing":return"Discounted pricing for developing countries";default:return"Standard pricing for your region"}},isPremium:"premium"===(null===c||void 0===c||null===(e=c.pricing)||void 0===e?void 0:e.tier),isDeveloping:"developing"===(null===c||void 0===c||null===(r=c.pricing)||void 0===r?void 0:r.tier),country:null===c||void 0===c?void 0:c.country,currency:(null===c||void 0===c||null===(n=c.pricing)||void 0===n||null===(t=n.monthly)||void 0===t?void 0:t.currency)||"GBP",symbol:(null===c||void 0===c||null===(l=c.pricing)||void 0===l||null===(u=l.monthly)||void 0===u?void 0:u.symbol)||"\xa3"}}},92686:(e,r,n)=>{n.d(r,{T2:()=>a,_i:()=>c,l2:()=>s,vX:()=>d});var i=n(40854),t=n.n(i);const o="hugo.user.profile.v1",l=3e5;let u=null;function c(){const e=function(){if("undefined"===typeof window)return null;try{const e=window.localStorage.getItem(o);return e?JSON.parse(e):null}catch(e){return null}}();return e?e&&e.profile&&"number"===typeof e.t?Date.now()-e.t>l?null:e.profile:e:null}function a(e){if("undefined"!==typeof window&&e)try{window.localStorage.setItem(o,JSON.stringify({profile:e,t:Date.now()}))}catch(r){}}function d(){if("undefined"!==typeof window)try{window.localStorage.removeItem(o)}catch(e){}}async function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{force:r=!1}=e;if(!r){const e=c();if(e)return e}return u||(u=t().get("/api/users/profile/details").then((e=>{var r;const n=null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.userDetails;return n&&a(n),n})).catch((e=>(console.error("fetchUserProfile failed:",e),null))).finally((()=>{u=null})),u)}}}]);
2//# sourceMappingURL=3836.98810db7.chunk.js.map

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.