PageSourceSearch

https://crystalpeptides.eu/assets/navigation-DgUuL3wt.js

js crystalpeptides.eu collected 2026-10-08 23:41:46 UTC 4,541 bytes, 2 lines download raw bytes

1import{ALL_LOCALE_CODES as f,isKnownStorefrontHost as h,getCurrentHost as d,resolveStorefrontHost as L,getHostConfig as y,getPreviewEntriesForBrand as m,getBrandPreviewState as a,KNOWN_STOREFRONT_HOSTS as v}from"./index-CEjWjbSv.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"5c9e060ce7629d3cf526c05930539bdc5e245aab"},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=(function(o){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s])}return o})({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:crystal-peptides-frontend":!0});var r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="dcc56281-b4dd-4223-a220-5a64316de332",e._sentryDebugIdIdentifier="sentry-dbid-dcc56281-b4dd-4223-a220-5a64316de332")}catch{}})();const S=["/admin","/affiliate","/auth","/reset-password"],P=["en","bg"];function p(e){return typeof e=="string"&&P.includes(e)}function _(e){return S.some(r=>e===r||e.startsWith(`${r}/`))}function E(e){const r=e.split("/")[1];return p(r)}function T(e){const r=e.split("/")[1];return f.includes(r)}function A(e){return e.replace(/^\/(en|bg)(?=\/|$)/,"")||"/"}function g(e){const r=e.split("/"),o=r[1];if(!f.includes(o))return e;const t=r.slice(2).join("/");return t?`/${t}`:"/"}function b(e=d()){if(!h(e))return{host:e,localeMode:"host",supportedLocales:f,defaultLocale:"en"};const r=L(e);return{host:r,...y(r)}}function B(e,r,o=d()){if(!h(o))return r;const t=b(o);return t.localeMode==="host"?t.defaultLocale:p(e)?e:t.supportedLocales.includes(r)?r:t.defaultLocale}function x(e,r,o=d()){if(!e.startsWith("/")||_(e))return e;const t=b(o);if(t.localeMode==="host")return A(e);if(E(e))return e;const n=t.supportedLocales.includes(r)?r:t.defaultLocale;return e==="/"?`/${n}`:`/${n}${e}`}function w(){return typeof window>"u"?{search:""}:window.location}function c(e,r,o){const t=a();if(!t)return e;const n=new URLSearchParams(e);return n.delete("host"),n.delete("_cart"),n.set("brandHost",o??t.brandHost),n.set("preview","1"),`?${n.toString()}`}function M(e){const r=e.toLowerCase().replace(/^www\./,"");return v.includes(r)}
1function u(e,r=w()){if(!a()||!r.href)return e;try{const o=new URL(r.href),t=new URL(e,o);return!/^https?:$/.test(t.protocol)||t.origin!==o.origin&&!M(t.hostname)?e:(t.protocol=o.protocol,t.host=o.host,t.pathname=g(t.pathname),t.search=c(t.search,r),t.toString())}catch{return e}}function H(e,r=w()){if(!a())return e;if(typeof e=="string"){if(/^(?:[a-z][a-z\d+.-]*:|\/\/)/i.test(e))return u(e,r);const o=e.indexOf("#"),t=o<0?e:e.slice(0,o),n=o<0?"":e.slice(o),s=t.indexOf("?"),i=s<0?t:t.slice(0,s),l=s<0?"":t.slice(s);return{pathname:i||void 0,search:c(l),hash:n}}return{...e,search:c(e.search??"")}}function O(e,r){const o=a();if(!o)return null;const t=m(o.brand).find(s=>s.locale===e);if(!t)return null;const n=new URL(r.toString());return n.pathname=g(n.pathname),n.search=c(n.search,{search:r.search},t.host),n.toString()}function $(e){return a()?e.replace(/(\bhref\s*=\s*)(["'])(.*?)\2/gi,(r,o,t,n)=>{const s=n.replace(/&amp;/gi,"&"),i=u(s);if(i===s)return r;const l=i.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;");return`${o}${t}${l}${t}`}):e}function C(e){const r=n=>{if(n.hasAttribute("download")||n.hasAttribute("data-brand-preview-exit"))return;const s=n.getAttribute("href");if(s===null)return;const i=u(s);i!==s&&n.setAttribute("href",i)},o=n=>{n instanceof Element&&(n instanceof HTMLAnchorElement&&r(n),n.querySelectorAll("a[href]").forEach(r))};o(e);const t=new MutationObserver(n=>{for(const s of n)s.type==="attributes"?o(s.target):s.addedNodes.forEach(o)});return t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["href"]}),()=>t.disconnect()}const D=Object.freeze(Object.defineProperty({__proto__:null,buildBrandPreviewLocaleUrl:O,installBrandPreviewAnchorNavigation:C,previewStorefrontLinksInHtml:$,withBrandPreviewHref:u,withBrandPreviewTo:H},Symbol.toStringTag,{value:"Module"}));export{O as buildBrandPreviewLocaleUrl,b as getLocaleRoutingConfig,T as hasAnyLocalePrefix,E as hasPathLocalePrefix,p as isPathLocale,x as localizePublicPath,D as navigation,$ as previewStorefrontLinksInHtml,B as resolveNavigationLocale,_ as shouldBypassLocale,g as stripAnyLocalePrefix,A as stripPathLocalePrefix,H as withBrandPreviewTo};
2//# sourceMappingURL=navigation-DgUuL3wt.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.