PageSourceSearch

https://www.hellomagazine.com/_next/static/chunks/9644.a56e7021695e30c8.js

js hellomagazine.com collected 2026-10-01 08:49:13 UTC 13,880 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9644],{1734:()=>{},14495:(e,l,a)=>{"use strict";a.d(l,{chargebeeConfigure:()=>n});var t=a(1734),r=a.n(t),o=a(23727);let n=()=>{let e=new URL(o.env.CHARGEBEE_APP_URL);return new(r())({site:o.env.CHARGEBEE_SITE,apiKey:o.env.CHARGEBEE_KEYS_FULL_ACCESS,port:e.port?Number(e.port):void 0,protocol:e.protocol.replace(":",""),hostSuffix:e.hostname.replace("{site}",""),apiPath:"/api/v2"})}},55006:(e,l,a)=>{"use strict";a.d(l,{u:()=>H});var t=a(43169),r=a.n(t);class o extends Error{}let n=["http:","https:"],c=[["0.0.0.0",8],["10.0.0.0",8],["100.64.0.0",10],["127.0.0.0",8],["169.254.0.0",16],["172.16.0.0",12],["192.0.0.0",24],["192.168.0.0",16],["198.18.0.0",15],["224.0.0.0",4],["240.0.0.0",4]],i=e=>e.replace(/\.$/,""),u=e=>r().IPv4.isValidFourPartDecimal(e),s=e=>e.split(".").reduce((e,l)=>(e<<8)+Number(l)>>>0,0),d=(e,l,a)=>{let t=0===a?0:-1<<32-a>>>0;return(s(e)&t)==(s(l)&t)},A=function(e){let l,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{allowedHosts:t,allowedProtocols:s=n}=a;try{l="string"==typeof e?new URL(e):e}catch(l){throw new o("Invalid URL: ".concat(String(e)))}if(!s.includes(l.protocol))throw new o('Disallowed protocol "'.concat(l.protocol,'" for URL: ').concat(l));if((e=>{let l=i(e.toLowerCase().replace(/^\[|\]$/g,""));return!!("localhost"===l||l.endsWith(".localhost"))||(u(l)?c.some(e=>{let[a,t]=e;return d(l,a,t)}):!!r().IPv6.isValid(l)&&(e=>{if("::1"===e||"::"===e||/^fe[89ab]/i.test(e)||/^f[cd]/i.test(e))return!0;let l=e.match(/^::(?:ffff:)?([0-9a-f]+:[0-9a-f]+|\d+\.\d+\.\d+\.\d+)$/i);if(l){let e=l[1],a=e.includes(".")?e:(e=>{let l=e.split(":");if(2!==l.length)return null;let a=[];for(let e of l){let l=Number.parseInt(e,16);if(Number.isNaN(l)||l<0||l>65535)return null;a.push(l>>8&255,255&l)}return a.join(".")})(e);if(a&&u(a))return c.some(e=>{let[l,t]=e;return d(a,l,t)})}return!1})(l))})(l.hostname))throw new o("Destination host is a private/reserved address: ".concat(l.hostname));if(void 0!==t&&!((e,l)=>{let a=i(e.toLowerCase());return l.some(e=>{let l=i(e.toLowerCase());return a===l||a.endsWith(".".concat(l))})})(l.hostname,t))throw new o("Destination host not allowed: ".concat(l.hostname));return l};a(23727);let v=(e,l)=>{let a="ev.hellomagazine.com";if(!a)throw Error("NEXT_PUBLIC_EVOLOK_ENDPOINT is required to call the Evolok API");let t=new URL("https://".concat(a));if(t.pathname=e.map(e=>encodeURIComponent(String(e))).join("/"),l)for(let[e,a]of Object.entries(l))void 0!==a&&t.searchParams.append(e,a);return A(t,{allowedHosts:[a]})},E={getUserProfile:async(e,l)=>{let a=v(["ic","api","userProfile",e],{serviceName:"registration_hello"}),t=await fetch(a,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:"Evolok evolok.api.service=".concat("hello_service_integration"," evolok.api.sessionId=").concat(l)},redirect:"error"});return t.ok?t.json():(console.log("Session ev_ss not valid"),null)}},C={getUserProfile:(e,l)=>E.getUserProfile(e,l)};var I=a(44544),_=a(14495);let U={findByCustomerId:async e=>{let l=(0,_.chargebeeConfigure)();try{return(await l.subscription.list({customer_id:{is:e}})).list.map(e=>e.subscription)}catch(e){return console.debug(e),[]}}},b={findByCustomerId:async e=>U.findByCustomerId(e)},p={hasActiveSubscription:async e=>{var l;let a=["active","non_renewing"];for(let t of null!=(l=await b.findByCustomerId(e))?l:[])if(a.includes(t.status))return!0;return!1}},h={findBy:async e=>{let l=(0,_.chargebeeConfigure)();try{return(await l.coupon.retrieve(e)).coupon}catch(e){return console.debug(e),null}}},S={findBy:async e=>h.findBy(e)},m={findBy:async e=>{let l=(0,_.chargebeeConfigure)();try{return(await l.itemPrice.retrieve(e)).item_price}catch(e){return console.debug(e),null}}},f={findBy:async e=>m.findBy(e)},R={findBy:async e=>{let l=(0,_.chargebeeConfigure)();try{return(await l.item.retrieve(e)).item}catch(e){return console.debug(e),null}}},g={isProductDisabled:async e=>{let l=await R.findBy(e);return!l||!1===l.enabled_for_checkout||"active"!==l.status}};var L=a(23727),O=a(36001).hp;let N=e=>e?e.replace(/[^a-zA-Z0-9]/g,e=>"\\u"+e.charCodeAt(0).toString(16).padStart(4,"0")):"",P=async()=>
1{if(L.env.CHARGEBEE_CUSTOM_CHECKOUT_APP_URL){let{default:e}=await a.e(9269).then(a.t.bind(a,79269,23)),l=new URL(L.env.CHARGEBEE_CUSTOM_CHECKOUT_APP_URL);return new e({site:L.env.CHARGEBEE_CUSTOM_CHECKOUT_SITE,apiKey:L.env.CHARGEBEE_KEYS_FULL_ACCESS,port:l.port?Number(l.port):void 0,protocol:l.protocol.replace(":",""),hostSuffix:l.hostname.replace("{site}","")})}let{chargebeeConfigure:e}=await Promise.resolve().then(a.bind(a,14495));return e()},y=async e=>{let l=new URL(L.env.CHARGEBEE_CUSTOM_CHECKOUT_APP_URL),a=L.env.CHARGEBEE_CUSTOM_CHECKOUT_SITE,t=L.env.CHARGEBEE_KEYS_FULL_ACCESS,r=l.protocol.replace(":",""),o=l.hostname.replace("{site}",a),n=l.port?":".concat(l.port):"",c="".concat(r,"://").concat(o).concat(n,"/api/checkout"),i=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8",Authorization:"Basic ".concat(O.from("".concat(t,":")).toString("base64")),"User-Agent":"Chargebee-Node-Client"},body:JSON.stringify(e),signal:AbortSignal.timeout(3e4)});if(!i.ok){let e=await i.json().catch(()=>({})),l=Error(e.message||"Custom checkout request failed");throw l.http_status_code=i.status,l.api_error_code=e.api_error_code,l}return i.json()},w=async(e,l)=>{var a,t;return l?(null==l||null==(a=l.userProfile)?void 0:a.guid)===e||(console.log("userProfileEvolokData?.userProfile?.guid: ".concat(null==l||null==(t=l.userProfile)?void 0:t.guid," UserId ").concat(e)),!1):(console.log("IsDataValid chargeBeeHostedPageRepository false userProfileEvolokData"),!1)},B=async e=>{let l=(0,I.getCookie)("ev_ss");return l?await C.getUserProfile(e,l.toString()):null},T={get:async e=>{var l,a,t,r,o,n,c,i;let u=await P();try{let c,i=await f.findBy(null!=(l=e.priceId)?l:"");if(i&&await g.isProductDisabled(i.item_id)){let l=(a=new URL(null!=(t=e.redirectUrl)?t:""),void 0===a)?void 0:a.searchParams.get("redirect_url");return{url:"".concat(L.env.EVOLOK_SUBSCRIBE_URL,"/error/error-plan/?redirectUrl=").concat(null!=l?l:""),id:"",created_at:0,updated_at:0,embed:!1}}if(e.couponIds&&e.couponIds.filter(Boolean).length>0){let l=e.couponIds.filter(Boolean).map(async e=>{if(e)return await S.findBy(e)});if((await Promise.all(l)).some(e=>e&&"True"===e.cf_invalid_active_subscription)&&await p.hasActiveSubscription(null!=(r=e.customerId||e.userId)?r:"")){console.debug("User has active subscription, not creating hosted page.");let l=(o=new URL(null!=(n=e.redirectUrl)?n:""),void 0===o)?void 0:o.searchParams.get("redirect_url");return{url:"".concat(L.env.EVOLOK_SUBSCRIBE_URL,"/error/error-coupon/?priceId=").concat(e.priceId,"&redirectUrl=").concat(l),id:"",created_at:0,updated_at:0,embed:!1}}}let s=(e=>{var l,a,t;let r=(null!=(l=e.couponIds)?l:[]).filter(Boolean),o={subscription_items:[{item_price_id:e.priceId}],customer:{id:e.customerId||e.userId,first_name:L.env.CHARGEBEE_CUSTOM_CHECKOUT_APP_URL?N(null!=(a=e.firstName)?a:""):e.firstName,last_name:L.env.CHARGEBEE_CUSTOM_CHECKOUT_APP_URL?N(null!=(t=e.lastName)?t:""):e.lastName,email:e.email,phone:e.phone,company:e.company,locale:e.locale,cf_primary_user_ID:e.cf_primary_user_ID,country:e.country},coupon_ids:r.length>0?r:[],redirect_url:e.redirectUrl,cancel_url:"https://www.hellomagazine.com/",discounts:[],locale:e.locale,country:e.country};return L.env.CHARGEBEE_CUSTOM_CHECKOUT_APP_URL&&!e.customerId&&delete o.customer.id,o})(e);if(!(c=!L.env.CHARGEBEE_CUSTOM_CHECKOUT_APP_URL?await u.hostedPage.checkoutNewForItems(s):await y(s)).hosted_page)return c.url=c.checkout_url,c;return c.hosted_page}catch(l){if(400===l.http_status_code&&"invalid_request"===l.api_error_code&&l.message.includes("Cannot apply the coupon")||"resource_limit_exhausted"===l.api_error_code&&l.message.includes("No more redemptions are allowed")||"resource_limit_exhausted"===l.api_error_code&&l.message.includes("has already expired")){console.debug(l);let a=(c=new URL(null!=(i=e.redirectUrl)?i:""),c.searchParams.get("redirect_url"));return{url:"".concat(L.env.EVOLOK_SUBSCRIBE_URL,"/error/error-coupon/?priceId=").concat(e.priceId,"&redirectUrl=").concat(a),id:"",created_at:0,updated_at:0,embed:!1}}console.debug(l);return}},getCheckoutUrl:async(e,l,a,t,r,o)=>{var n,c,i,u,s;let d=window,A="https://www.hellomagazine.com/".replace(/\/$/,""),v="".concat(L.env.NEXT_PUBLIC_CHECKOUT_SUCCESS_HOST||"https://".concat("myaccount.hellomagazine.com")||o).concat("/myaccount/").concat("checkout-success","/?redirect_url=").concat(t),E=await B(e.internalSessionId),C=null!=(c=null==(n=(e=>{if(null==e?void 0:e.userProfile){var l;let a={};
1return null==(l=e.userProfile)||l.attributes.forEach(e=>{a[e.name]=e.value}),a}return null})(E))?void 0:n.email)?c:"",I=await w(e.internalSessionId,E);if(e.isLogged&&I){let t={userId:e.internalSessionId,customerId:e.ecCustomerId,firstName:L.env.CHARGEBEE_CUSTOM_CHECKOUT_APP_URL?N(e.first_name):e.first_name,lastName:L.env.CHARGEBEE_CUSTOM_CHECKOUT_APP_URL?N(e.last_name):e.last_name,email:C,locale:"es",priceId:l,couponIds:a?[a]:[],redirectUrl:v,country:null!=r?r:void 0},n="".concat((null==d||null==(i=d.location)?void 0:i.origin)||A||"https://".concat(o),"/api/generateCheckoutUrl/"),c=await fetch(n,{method:"POST",body:JSON.stringify({...t})});if(!c.ok)throw Error("Failed to get payment intent");let u=await c.json();if(!u.url)return;return u.url}{let e=encodeURIComponent("&redirectUrl=".concat(v,"&couponId=").concat(a,"&country=").concat(r));a||(e=encodeURIComponent("&redirectUrl=".concat(v,"&country=").concat(r)));let n=(null==d||null==(u=d.location)?void 0:u.origin)||A||"https://".concat(o),c="".concat(n,"/api/generateCheckoutUrl/?priceId=").concat(l).concat(e),i="ecommerce-button";"https://".concat("myaccount.hellomagazine.com","/connect/evolok?registration_url=").concat(null==d||null==(s=d.location)?void 0:s.href,"&regSource=").concat(i,"&theme=default&action=authorization&redirect_url=").concat(c);return"https://".concat("myaccount.hellomagazine.com").concat("/myaccount/","login?registration_url=").concat(t,"&regSource=").concat(i,"&action=authorization&redirect_url=").concat(c)}}},H={get:T.get,getCheckoutUrl:async(e,l,a,t,r,o)=>T.getCheckoutUrl(e,l,a,t,r,o)}},81889:(e,l,a)=>{"use strict";a.d(l,{Ar:()=>u,SL:()=>o,Xr:()=>t,rh:()=>s,u4:()=>n});let t=[{label:"ALEMANIA",value:"DE"},{label:"ANGOLA",value:"AO"},{label:"ARABIA SAUDITA",value:"SA"},{label:"ARGENTINA",value:"AR"},{label:"ARUBA",value:"AW"},{label:"AUSTRALIA",value:"AU"},{label:"AUSTRIA",value:"AT"},{label:"BARBADOS",value:"BB"},{label:"B\xc9LGICA",value:"BE"},{label:"BOLIVIA",value:"BO"},{label:"BRASIL",value:"BR"},{label:"BULGARIA",value:"BG"},{label:"CANAD\xc1",value:"CA"},{label:"CEUTA",value:"CE"},{label:"CHILE",value:"CL"},{label:"CHINA",value:"CN"},{label:"CHIPRE",value:"CY"},{label:"COLOMBIA",value:"CO"},{label:"CONGO",value:"CG"},{label:"COSTA RICA",value:"CR"},{label:"CROACIA",value:"HR"},{label:"DINAMARCA",value:"DK"},{label:"REP\xdaBLICA DOMINICANA",value:"DO"},{label:"ECUADOR",value:"EC"},{label:"EL SALVADOR",value:"SV"},{label:"EMIRATOS \xc1RABES UNIDOS",value:"AE"},{label:"ESLOVAQUIA",value:"SK"},{label:"ESLOVENIA",value:"SI"},{label:"ESPA\xd1A (PEN\xcdNSULA Y BALEARES)",value:"ES"},{label:"ESPA\xd1A (ISLAS CANARIAS)",value:"IC"},{label:"ESTADOS UNIDOS",value:"US"},{label:"ESTONIA",value:"EE"},{label:"FILIPINAS",value:"PH"},{label:"FINLANDIA",value:"FI"},{label:"FRANCIA",value:"FR"},{label:"GRECIA",value:"GR"},{label:"GUATEMALA",value:"GT"},{label:"HONDURAS",value:"HN"},{label:"HONG KONG",value:"HK"},{label:"HUNGR\xcdA",value:"HU"},{label:"IRLANDA",value:"IE"},{label:"ISLANDIA",value:"IS"},{label:"ISLAS DEL CANAL (JERSEY)",value:"JE"},{label:"ISRAEL",value:"IL"},{label:"ITALIA",value:"IT"},{label:"JAP\xd3N",value:"JP"},{label:"LETONIA",value:"LV"},{label:"LIECHTENSTEIN",value:"LI"},{label:"LUXEMBURGO",value:"LU"},{label:"MACAO",value:"MO"},{label:"MALTA",value:"MT"},{label:"MARRUECOS",value:"MA"},{label:"MARTINICA",value:"MQ"},{label:"MELILLA",value:"ML"},{label:"M\xc9XICO",value:"MX"},{label:"MOZAMBIQUE",value:"MZ"},{label:"NICARAGUA",value:"NI"},{label:"NORUEGA",value:"NO"},{label:"NUEVA ZELANDA",value:"NZ"},{label:"PA\xcdSES BAJOS",value:"NL"},{label:"PAKIST\xc1N",value:"PK"},{label:"PARAGUAY",value:"PY"},{label:"PER\xda",value:"PE"},{label:"POLONIA",value:"PL"},{label:"PORTUGAL",value:"PT"},{label:"PRINCIPADO DE ANDORRA",value:"AD"},{label:"PRINCIPADO DE M\xd3NACO",value:"MC"},{label:"PUERTO RICO",value:"PR"},{label:"REINO HACHEMITA DE JORDANIA",value:"JO"},{label:"REINO UNIDO",value:"GB"},{label:"REP\xdaBLICA CHECA",value:"CZ"},{label:"REP\xdaBLICA DE PANAM\xc1",value:"PA"},{label:"RUMANIA",value:"RO"},{label:"SERBIA",value:"RS"}
1,{label:"SINGAPUR",value:"SG"},{label:"SUD\xc1FRICA",value:"ZA"},{label:"SUECIA",value:"SE"},{label:"SUIZA",value:"CH"},{label:"TAILANDIA",value:"TH"},{label:"TAIW\xc1N",value:"TW"},{label:"TURQU\xcdA",value:"TR"},{label:"URUGUAY",value:"UY"}],r="selectedCountry",o=()=>localStorage.getItem(r),n=e=>{localStorage.setItem(r,e)},c=(e,l)=>l&&0!==l.length?t.some(a=>a.value===e&&l.includes(a.value)):t.some(l=>l.value===e),i=async()=>{let e=await fetch("/api/country"),l=await e.json(),a=l.country||"Unknown";return"ES"===a&&"CN"===l.region?a="IC":"ES"===a&&"ML"===l.region?a="ML":"ES"===a&&"CE"===l.region&&(a="CE"),a},u=e=>e&&0!==e.length?t.filter(l=>e.includes(l.value)):t,s=async e=>{let l=o();if(l&&c(l,e))return{country:l,showUnavailableMessage:!1};if(l&&!c(l,e))if(c("ES",e))return n("ES"),{country:"ES",showUnavailableMessage:!0};else return n("US"),{country:"US",showUnavailableMessage:!0};let a=await i();if(!c(a,e))if(c("ES",e))return n("ES"),{country:"ES",showUnavailableMessage:!0};else return n("US"),{country:"US",showUnavailableMessage:!0};return n(a),{country:a,showUnavailableMessage:!1}}}}]);

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.