"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[13],{10:(t,n,r)=>{r.d(n,{a:()=>o,b:()=>h,c:()=>i});var s=r(1),e=r(4),u=r(5);const a=/^\/account(\/|$)/;function o(t,n,r){var s;if(!t)return t;if(r&&(t.startsWith("https://")||t.startsWith("http://"))){try{const s=new URL(t);if(s.hostname===r){const t=o(s.pathname+s.search+s.hash,n);return`${s.protocol}//${s.hostname}${t}`}}catch(t){}return t}return!t.startsWith("/")||function(t){return!(t&&!t.startsWith("http://")&&!t.startsWith("https://")&&!t.startsWith("//")&&!t.startsWith("/en-"))}(t)||function(t){return a.test(t)}(null!==(s=t.split("?")[0])&&void 0!==s?s:t)?t:function(t){return t&&"US"!==t?`/en-${t.toLowerCase()}`:""}(n)+t}function h(t,n,r="",s=""){const{strippedPathname:e}=(0,u.h)(t),a=n.toUpperCase();return o(e,"US"===a?null:a)+r+s}function i(){const{urlCountry:t,hostname:n}=(0,e.d)((t=>{var n;return{urlCountry:t.urlCountry,hostname:null!==(n=t.config.hostname)&&void 0!==n?n:""}}));return(0,s.useCallback)((r=>o(r,t,n)),[t,n])}}}]);