PageSourceSearch

https://www.royalcaribbean.com/etc.clientlibs/rcg/core/clientlibs/…?_=2026.917.1105745.0009109961

js royalcaribbean.com collected 2026-10-01 08:48:34 UTC 47,570 bytes, 1 lines download raw bytes

1!function(){"use strict";var t="/bin/services/core/g11n/v1",e="rcg.g11n.v1.",n="locale:",r="/",o="data-brand",i="ready",a="[rcg:g11n]",c=Object.freeze({country:"USA",language:"en",currency:"USD"}),u=(new Set(["","1"]),new Set(["0"]),["","www"]),l=(new Set(["royalcaribbean.com","celebritycruises.com"].flatMap(function(t){return u.map(function(e){return e?"".concat(e,".").concat(t):t})})),null);function s(){return null!=l?l:l=!0}var d=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},f=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];s()&&console.debug.apply(console,d([a],t,!1))},h=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];s()&&console.info.apply(console,d([a],t,!1))},g=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];console.warn.apply(console,d([a],t,!1))},v=function(t){return(null!=t?t:"").trim().toUpperCase()},p=function(t){return(null!=t?t:"").trim().toLowerCase()},y=function(){return y=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},y.apply(this,arguments)},w={country:["country","wuc"],language:["language","lang","wul"],currency:["currency","currencyCode"]},m={RCI:{code:"RCI",wireCode:"R",domains:["royalcaribbean.com"],contentRoot:"/content/royal",cookies:{country:"country",language:"language",currency:"currency",languageExplicit:"languageExplicit",currencyExplicit:"currencyExplicit"},cookieDomain:".royalcaribbean.com",paramAliases:w,countryCookieFormat:"iso3",marketUrlFormat:"iso3",defaults:y(y({},c),{market:"USA"}),legacyCookies:{language:"wul",country:"wuc"}},CEL:{code:"CEL",wireCode:"C",domains:["celebritycruises.com"],contentRoot:"/content/celebrity",cookies:{country:"wuc",language:"lang",currency:"currencyCode",languageExplicit:"languageExplicit",currencyExplicit:"currencyExplicit"},cookieDomain:".celebritycruises.com",paramAliases:w,countryCookieFormat:"iso3",marketUrlFormat:"iso2",defaults:y(y({},c),{market:"US"}),legacyCookies:{language:"wul",office:"office"},geoCountryCookie:"country"}},b=Object.keys(m),k="RCI";function C(t){var e=[t.cookies.country,t.cookies.language,t.cookies.currency,t.cookies.languageExplicit,t.cookies.currencyExplicit];return t.geoCountryCookie&&e.push(t.geoCountryCookie),e}s()&&(function(){for(var t,e=new Set,n=0,r=b;n<r.length;n++)for(var o=r[n],i=m[o],a=null!==(t=i.cookieDomain)&&void 0!==t?t:"",c=0,u=C(i);c<u.length;c++){var l=u[c],s="".concat(l,"@").concat(a);e.has(s)&&g('registry: cookie name collision for "'.concat(l,'" — two brands write the same cookie on the same domain')),e.add(s)}}(),function(){for(var t=b.map(function(t){return m[t].contentRoot}),e=0,n=t;e<n.length;e++)for(var r=n[e],o=0,i=t;o<i.length;o++){var a=i[o];a!==r&&a.startsWith("".concat(r,"/"))&&g('registry: content-root "'.concat(a,'" is a sub-path of "').concat(r,'" — detection may pick the wrong brand'))}}());var x=null,S=null;function E(t,e){var n,r,i,a;return void 0===t&&(t=document),void 0===e&&(e=location),null!==(a=null!==(i=null!==(r=null!==(n=function(t){var e,n,r=null!==(e=t.documentElement.getAttribute(o))&&void 0!==e?e:null===(n=t.querySelector("[".concat(o,"]")))||void 0===n?void 0:n.getAttribute(o),i=P(r);i&&f("brand via data-brand:",i);return i}(t))&&void 0!==n?n:M(e))&&void 0!==r?r:function(t){var e=t.pathname||"";if(!e)return null;var n=function(){if(S)return S;var t=b.map(function(t){return{code:t,value:m[t].contentRoot,kind:"root"}});return S=F(t)}().find(function(t){var n=t.value;return e===n||e.startsWith("".concat(n,"/"))});if(n)return f("brand via path:",n.code,e),n.code;return null}(e))&&void 0!==i?i:function(){var t,e;if("undefined"==typeof window)return null;var n=P(null===(e=null===(t=window.rcg)||void 0===t?void 0:t.config)||void 0===e?void 0:e.defaultBrand);n&&f("brand via window.rcg.config.defaultBrand:",n);return n}())&&void 0!==a?a:(f("brand default:",k),k)}function O(t,e){return void 0===e&&(e=location),M(e)===t}function M(t){var e=(t.hostname||"").toLowerCase();if(!e)return null;var n=function(){if(x)return x;for(var t=[],e=0,n=b;e<n.length;e++)for(var r=n[e],o=0,i=m[r].domains;o<i.length;o++){var a=i[o];t.push({code:r,value:a,kind:"host"})}return x=F(t)}().find(function(t){var n=t.value;return e===n||e.endsWith(".".concat(n))});return n?(f("brand via host:",n.code,e),n.code):null}function P(t){var e=v(t);return e&&Object.prototype.hasOwnProperty.call(m,e)?e:null}function F(t){return t.sort(function(t,e){return e.value.length-t.value.length||t.value.localeCompare(e.value)})}var A=function(){return A=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},A.apply(this,arguments)},L="banner",W=e+"geo";function D(t){var e=null!==t.suggested&&t.suggested!==t.current&&"off"!==t.mode;return{hasConflict:e,current:t.current,suggested:t.suggested,previousCountry:t.previous,suggestedUrl:t.suggestedUrl,mode:t.mode,dismissed:t.dismissed,messageVariant:e?t.variant:"none"}}function j(t,e){var n;if(!t||!e)return L;var r=t.countries[e];if(null==r?void 0:r.geoBannerMode)return r.geoBannerMode;var o=r?t.markets[r.market]:void 0;return null!==(n=null==o?void 0:o.geoBannerMode)&&void 0!==n?n:L}function _(){V({dismissedAt:Date.now()})}
1function R(t){t&&V({lastCountry:v(t)})}function G(){try{if("undefined"==typeof localStorage)return{v:1};var t=localStorage.getItem(W);if(!t)return{v:1};var e=JSON.parse(t);return e&&1===e.v?e:{v:1}}catch(t){return g("geo state read failed",t),{v:1}}}function V(t){try{if("undefined"==typeof localStorage)return;var e=A(A(A({},G()),t),{v:1});localStorage.setItem(W,JSON.stringify(e))}catch(t){g("geo state write failed",t)}}var I={hasData:!1,defaultCountry:null,defaultMarket:null,resolveCode:function(){return null},resolveMarket:function(){return null},defaultCountryForMarket:function(){return null},get:function(){return null},toIso2:function(){return null}},U=new WeakMap;function z(t){if(!t)return I;var e=U.get(t);if(e)return e;var n=function(t){if(!t.countries)return I;var e=new Map;if(t.markets)for(var n=0,r=Object.keys(t.markets);n<r.length;n++){var o=r[n];e.set(v(o),v(t.markets[o].defaultCountry))}for(var i=function(t){var n;return t&&null!==(n=e.get(v(t.market)))&&void 0!==n?n:null},a=new Map,c=new Map,u=new Set,l=0,s=Object.keys(t.countries);l<s.length;l++){o=s[l];var d=v(o),f=t.countries[o];a.set(d,f);var h=v(f.iso2);if(h){var p=c.get(h);if(p){u.add(h);var y=i(a.get(p))===p;i(f)===d&&!y&&c.set(h,d)}else c.set(h,d)}}if(0===a.size)return I;u.size>0&&g("edge-config: alpha-2 claimed by multiple countries; kept each market-default owner",Array.from(u));var w=v(t.defaultMarket)||null,m=w&&e.get(w)||null;m||g("edge-config has no resolvable default country for market",t.defaultMarket);return Object.freeze({hasData:!0,defaultCountry:m,defaultMarket:w,resolveCode:function(t){var e,n=v(t);return n?a.has(n)?n:null!==(e=c.get(n))&&void 0!==e?e:null:null},resolveMarket:function(t){var n=v(t);return n&&e.has(n)?n:null},defaultCountryForMarket:function(t){var n;return null!==(n=e.get(v(t)))&&void 0!==n?n:null},get:function(t){var e;return null!==(e=a.get(v(t)))&&void 0!==e?e:null},toIso2:function(t){var e;return v(null===(e=a.get(v(t)))||void 0===e?void 0:e.iso2)||null}})}(t);return U.set(t,n),n}var T=function(){return T=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},T.apply(this,arguments)},N=/^[a-zA-Z0-9!#$%&'*+\-.^_`|~]+$/,J=new Map;function H(t){if("undefined"==typeof document)return null;var e=document.cookie.match(function(t){var e=J.get(t);e||(e=new RegExp("(?:^|;\\s*)".concat(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"=([^;]*)")),J.set(t,e));return e}(t));return e?function(t){try{return decodeURIComponent(t)}catch(e){return g("cookie decode failed",e),t}}(e[1]):null}function $(t,e,n){var r,o;if(void 0===n&&(n={}),"undefined"!=typeof document)if(N.test(t)){var i="".concat(t,"=").concat(encodeURIComponent(e));i+="; Path=".concat(null!==(r=n.path)&&void 0!==r?r:"/"),n.domain&&(i+="; Domain=".concat(n.domain)),null!=n.maxAge&&(i+="; Max-Age=".concat(n.maxAge)),n.secure&&(i+="; Secure"),i+="; SameSite=".concat(null!==(o=n.sameSite)&&void 0!==o?o:"Lax"),document.cookie=i}else g("setCookie: rejecting invalid cookie name",t)}function B(t,e){void 0===e&&(e={}),$(t,"",T(T({},e),{maxAge:0}))}var q=/^[a-z]{2}(-[a-z]{2})?$/i,K=/^[a-z]{3}$/i,Y=/^[a-z]{2}$/i;var Z=/^[a-z]{3}$/i;function Q(t,e,n){var r,o;void 0===n&&(n={search:"undefined"!=typeof location?location.search:"",pathname:"undefined"!=typeof location?location.pathname:"",getCookie:H});var i=m[t],a=z(e),c=new URLSearchParams(n.search||""),u=function(t,e,n){var r=t||"";(r===e||r.startsWith("".concat(e,"/")))&&(r=r.slice(e.length));var o=r.split("/").filter(Boolean);if(0===o.length)return{isRoot:!0};var i=("iso3"===n?K:Y).test(o[0])?o[0]:void 0;return i?{market:i,language:o[1]&&q.test(o[1])?o[1]:void 0}:{}}(n.pathname,i.contentRoot,i.marketUrlFormat),l=a.resolveMarket(u.market),s=tt(c,i.paramAliases.country),d=null!=l?l:u.isRoot?a.defaultMarket:null,h=function(t,e){var n,r;if(!e.lookup.hasData||!e.pathMarket||e.lookup.resolveCode(e.paramCountry))return t;var o=v(null===(n=e.lookup.get(t))||void 0===n?void 0:n.market);if(!o||o===e.pathMarket)return t;return null!==(r=e.lookup.defaultCountryForMarket(e.pathMarket))&&void 0!==r?r:t}(function(t,e,n){var r;if(e.hasData){for(var o=0,i=t;o<i.length;
1o++){var a=i[o],c=e.resolveCode(a);if(c)return c}return null!==(r=e.defaultCountry)&&void 0!==r?r:v(n)}var u=et(t);u&&!Z.test(u)&&f("resolver: degraded mode dropping non-alpha-3 candidate",u);return v(u&&Z.test(u)?u:n)}([s,n.getCookie(i.cookies.country),l?a.defaultCountryForMarket(l):null],a,i.defaults.country),{pathMarket:d,paramCountry:s,lookup:a}),g=a.get(h),y=p(et([tt(c,i.paramAliases.language),u.language,n.getCookie(i.cookies.language)])||(null==g?void 0:g.defaultLanguage)||i.defaults.language);(null===(r=null==g?void 0:g.languages)||void 0===r?void 0:r.length)&&!g.languages.some(function(t){return p(t.code)===y})&&(f("language not valid for country, using default",y,h),y=p(g.defaultLanguage||i.defaults.language));var w=v(et([tt(c,i.paramAliases.currency),n.getCookie(i.cookies.currency)])||(null==g?void 0:g.defaultCurrency)||i.defaults.currency);(null===(o=null==g?void 0:g.allowedCurrencies)||void 0===o?void 0:o.length)&&!g.allowedCurrencies.some(function(t){return v(t)===w})&&(f("currency not allowed for country, using default",w,h),w=v(g.defaultCurrency||i.defaults.currency));var b=l||v(null==g?void 0:g.market)||a.defaultMarket||(!a.hasData&&u.market?v(u.market):void 0)||(u.isRoot?v(i.defaults.market):void 0),k={brand:t,country:h,language:y,currency:w,market:b};return f("resolved context:",k,a.hasData?"(edge-config)":"(degraded: brand defaults)"),k}function X(t){var e;return[t.brand,t.country,t.language,t.currency,null!==(e=t.market)&&void 0!==e?e:""].join("|")}function tt(t,e){for(var n=0,r=e;n<r.length;n++){var o=r[n],i=t.get(o);if(i&&i.trim())return i.trim()}return""}function et(t){for(var e=0,n=t;e<n.length;e++){var r=n[e];if(r&&r.trim())return r.trim()}return""}function nt(t,e){var n=m[t],o="undefined"!=typeof window?window.location.hostname:"",i=function(t,e){if(!t)return t;var n=t.replace(/^\./,""),r=e.toLowerCase().replace(/^www\./,"");if(r===n||!r.endsWith(".".concat(n)))return t;return".".concat(r)}(n.cookieDomain,o),a={path:"/",maxAge:31536e3,secure:"undefined"!=typeof window&&"https:"===window.location.protocol,sameSite:"Lax",domain:i};n.cookieDomain&&i!==n.cookieDomain&&function(t,e){var n={path:r,domain:e};B(t.cookies.country,n),B(t.cookies.language,n),B(t.cookies.currency,n),B(t.cookies.languageExplicit,n),B(t.cookies.currencyExplicit,n);var o=t.legacyCookies;(null==o?void 0:o.language)&&B(o.language,n);(null==o?void 0:o.country)&&B(o.country,n);(null==o?void 0:o.office)&&B(o.office,n);t.geoCountryCookie&&B(t.geoCountryCookie,n)}(n,n.cookieDomain),$(n.cookies.country,rt(t,e.ctx.country,e.catalog),a),$(n.cookies.language,e.ctx.language,a),$(n.cookies.currency,e.ctx.currency,a),ot(n.cookies.languageExplicit,e.languageWasExplicit,a),ot(n.cookies.currencyExplicit,e.currencyWasExplicit,a),function(t,e,n){var r=m[t].legacyCookies;if(!r)return;r.language&&$(r.language,e.ctx.language,n);r.country&&$(r.country,rt(t,e.ctx.country,e.catalog),n);r.office&&e.office&&$(r.office,v(e.office),n)}(t,e,a),function(t,e,n){if(!t.geoCountryCookie||!e)return;$(t.geoCountryCookie,v(e),n)}(n,e.geoCountry,a)}function rt(t,e,n){if("iso3"===m[t].countryCookieFormat)return e;var r=z(n).toIso2(e);return r||(f("country cookie: no alpha-2 mapping yet (no catalog), writing alpha-3 provisionally",e),e)}function ot(t,e,n){e?$(t,"1",n):B(t,n)}var it=e+"edgescape";function at(){try{if("undefined"==typeof localStorage)return;localStorage.removeItem(it)}catch(t){g("edgescape cache invalidate failed",t)}}var ct,ut=(ct=function(t,e){return ct=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},ct(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ct(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),lt=function(t){function e(e,n,r){var o=this.constructor,i=t.call(this,n)||this;return i.name="G11nError",i.code=e,i.cause=r,Object.setPrototypeOf(i,o.prototype),i}return ut(e,t),e}(Error),st=function(t){function e(e){var n=this.constructor,r=t.call(this,"UNKNOWN_COUNTRY",'g11n: unknown country "'.concat(e,'"'))||this;return r.name="UnknownCountryError",r.input=e,Object.setPrototypeOf(r,n.prototype),r}return ut(e,t),e}(lt),dt=function(t){function e(e){var n=this.constructor,r=t.call(this,"CATALOG_LOAD_FAILED","g11n: failed to load edge-config catalog",e)||this;return r.name="CatalogLoadError",Object.setPrototypeOf(r,n.prototype),r}return ut(e,t),e}(lt),ft=function(t){function e(e){var n=this.constructor,r=t.call(this,"LOCALE_LOAD_FAILED","g11n: failed to load /locale",e)||this;return r.name="LocaleLoadError",Object.setPrototypeOf(r,n.prototype),r}return ut(e,t),e}(lt),ht=function(t){function e(e){var n=this.constructor,r=t.call(this,"EDGESCAPE_LOAD_FAILED","g11n: failed to load /edgescape",e)||this;return r.name="EdgeScapeLoadError",Object.setPrototypeOf(r,n.prototype),r}return ut(e,t),e}
1(lt),gt=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,c)}u((r=r.apply(t,e||[])).next())})},vt=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}};function pt(t,e,n,r,o){return gt(this,void 0,void 0,function(){var i,a,c,u,l,s;return vt(this,function(d){switch(d.label){case 0:if(i=v(t),!(a=r.countries[i]))throw g("setCountry: unknown country",t),new st(t);return a.defaultCurrency||g("setCountry: edge-config has no defaultCurrency for",i),c=p(e.language||a.defaultLanguage||n.language),u=v(a.defaultCurrency||n.currency),i===n.country&&c===n.language?(f("setCountry: no-op (same country + language)",i,c),[2,null]):!1===e.navigate?[3,2]:[4,o(i,c)];case 1:return s=d.sent(),[3,3];case 2:s=null,d.label=3;case 3:return l=s,[2,{patch:{country:i,language:c,currency:u,market:a.market},url:l}]}})})}var yt=function(){return yt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},yt.apply(this,arguments)},wt=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,c)}u((r=r.apply(t,e||[])).next())})},mt=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}},bt=function(e,n,r){void 0===n&&(n={}),void 0===r&&(r={});for(var o=new URLSearchParams,i=0,a=Object.entries(n);i<a.length;i++){var c=a[i],u=c[0],l=c[1];l&&o.set(u,l)}O(e)||o.set("brand",m[e].wireCode);var s=o.toString();return xt("".concat(t,"/locale").concat(s?"?".concat(s):""),function(t){return new ft(t)},void 0,r)},kt=function(e,n){void 0===n&&(n={});var r=O(e)?"":"?brand=".concat(m[e].wireCode);return xt("".concat(t,"/edge-config").concat(r),function(t){return new dt(t)},void 0,n)},Ct=function(t){return void 0===t&&(t={}),xt("/bin/services/core/edgescape",function(t){return new ht(t)},{cache:"no-store"},t)};function xt(t,e,n,r){var o;return wt(this,void 0,void 0,function(){var i,a,c,u,l,s,d,f;return mt(this,function(h){switch(h.label){case 0:i=function(t,e){var n=new AbortController,r=setTimeout(function(){return n.abort(new Error("g11n: request timeout after ".concat(e,"ms")))},e),o=null;t&&(t.aborted?n.abort(t.reason):(o=function(){return n.abort(t.reason)},t.addEventListener("abort",o,{once:!0})));return{signal:n.signal,cancel:function(){clearTimeout(r),t&&o&&t.removeEventListener("abort",o)}}}(null==r?void 0:r.signal,null!==(o=null==r?void 0:r.timeoutMs)&&void 0!==o?o:8e3),a=i.signal,c=i.cancel,h.label=1;case 1:h.trys.push([1,,7,8]),u=void 0,h.label=2;case 2:return h.trys.push([2,4,,5]),[4,fetch(t,yt({credentials:"same-origin",headers:(f={},f["x-app-name"]="g11n-web",f),signal:a},n))];case 3:return u=h.sent(),[3,5];case 4:throw l=h.sent(),g("request failed",t,l),e(l);case 5:if(!u.ok)throw g("non-OK response",t,u.status),e(new Error("g11n: ".concat(t," -> HTTP ").concat(u.status)));if(!(s=(u.headers.get("content-type")||"").toLowerCase()).includes("json"))throw g("expected JSON content-type",t,s||"(absent)"),e(new Error("g11n: ".concat(t," -> expected JSON, got Content-Type: ").concat(s||"(absent)")));return[4,u.text()];case 6:d=h.sent();try{return[2,JSON.parse(d)]}catch(n){throw g("non-JSON response",t,d.slice(0,120)),e(n)}case 7:return c(),[7];case 8:return[2]}})})}var St="rcg-g11n";function Et(){return"undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():Date.now()}function Ot(t,e){if(h("timing: ".concat(t," took ").concat(e.toFixed(1)," ms")),"undefined"!=typeof performance&&"function"==typeof performance.mark&&"function"==typeof performance.measure)try{var n="".concat(St,":").concat(t,":end");performance.mark(n),performance.measure("".concat(St,":").concat(t),{start:performance.now()-e,duration:e})}catch(t){}}function Mt(t){return Pt(t,new WeakSet)}function Pt(t,e){if(null===t||"object"!=typeof t||Object.isFrozen(t)||t instanceof Date||t instanceof Map||t instanceof Set)return t;var n=t;if(e.has(n))return t;
1e.add(n),Object.freeze(t);for(var r=0,o=Object.getOwnPropertyNames(t);r<o.length;r++){Pt(t[o[r]],e)}return t}var Ft=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,c)}u((r=r.apply(t,e||[])).next())})},At=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}},Lt=function(){function t(){this.inFlight=null,this.abort=null}return t.prototype.isRunning=function(){return null!==this.inFlight},t.prototype.run=function(t,e){var n=this;return this.inFlight||(this.inFlight=Ft(n,void 0,void 0,function(){return At(this,function(n){switch(n.label){case 0:return n.trys.push([0,,2,3]),[4,this.runCycle(t,e)];case 1:return n.sent(),[3,3];case 2:return this.inFlight=null,this.abort=null,[7];case 3:return[2]}})})),this.inFlight},t.prototype.cancel=function(){this.abort&&(this.abort.abort(new Error("hydration cancelled")),this.abort=null),this.inFlight=null},t.prototype.runCycle=function(t,r){var o;return Ft(this,void 0,void 0,function(){var i,a,c,u,l,s,d;return At(this,function(h){switch(h.label){case 0:return i=new AbortController,this.abort=i,a=Et(),c=X(t.ctx),u=function(t,n){try{var r=sessionStorage.getItem(e+t);if(!r)return null;var o=JSON.parse(r);if(!o||"object"!=typeof o||!("v"in o)||!("data"in o))return g("cache entry has unexpected shape, dropping",t),null;var i=o;return null!=n&&i.v!==n?(f("cache stale, dropping",t),null):i.data}catch(e){return g("cache read failed",t,e),null}}(n+c,null!==(o=t.catalogVersion)&&void 0!==o?o:void 0),l=u?Promise.resolve({view:u,resolved:!0}):function(t,r,o,i,a,c){var u,l;return Ft(this,void 0,void 0,function(){var s,d,f;return At(this,function(h){switch(h.label){case 0:return s={language:r.language,market:r.market},a&&(s.country=r.country),c&&(s.currency=r.currency),[4,bt(t,s,{signal:i})];case 1:if(!(d=h.sent()).locale)throw new ft(new Error("g11n: /locale returned 200 with empty locale"));return(f=!1!==(null===(u=d._meta)||void 0===u?void 0:u.resolved))?function(t,n,r){try{var o={v:null!=r?r:null,data:n};sessionStorage.setItem(e+t,JSON.stringify(o))}catch(e){g("cache write failed",t,e)}}(n+o,d.locale,null===(l=d._meta)||void 0===l?void 0:l.snapshotVersion):g("locale response reports resolved=false — operating on degraded view, not caching"),[2,{view:d.locale,resolved:f}]}})})}(t.brand,t.ctx,c,i.signal,t.countryExplicit,t.currencyExplicit),s=l.then(function(t){i.signal.aborted||r.onLocaleSettled({view:Mt(t.view),resolved:t.resolved},null,Et()-a)},function(t){if(!i.signal.aborted){var e=t instanceof lt?t:new ft(t);r.onLocaleSettled(null,e,Et()-a)}}),d=function(){try{if("undefined"==typeof localStorage)return null;var t=localStorage.getItem(it);if(!t)return null;var e=JSON.parse(t);if(!e||"object"!=typeof e||!("fetchedAt"in e)||!("data"in e))return g("edgescape cache entry has unexpected shape, dropping"),null;var n=e;return Date.now()-n.fetchedAt>36e5?(f("edgescape cache expired, will refetch"),null):n.data}catch(t){return g("edgescape cache read failed",t),null}}(),(d?Promise.resolve(d):Ct({signal:i.signal}).then(function(t){return function(t){try{if("undefined"==typeof localStorage)return;var e={fetchedAt:Date.now(),data:t};localStorage.setItem(it,JSON.stringify(e))}catch(t){g("edgescape cache write failed",t)}}(t),t})).then(function(t){i.signal.aborted||r.onGeoSettled(Mt(t),null,Et()-a)},function(t){if(!i.signal.aborted){var e=t instanceof lt?t:new ht(t);r.onGeoSettled(null,e,Et()-a)}}).catch(function(){}),[4,s];case 1:return h.sent(),[2]}})})},t}();function Wt(t){!function(t){try{sessionStorage.removeItem(e+t)}catch(e){g("cache invalidate failed",t,e)}}(n+t)}function Dt(t){return e+"edge-config:"+t}
1var jt=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,c)}u((r=r.apply(t,e||[])).next())})},_t=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}},Rt=function(){function t(t){this.brand=t,this.catalog=null,this.version=null,this.inFlight=null,this.abort=null,this.lastFetchMs=null,this.catalog=function(t){try{var e=localStorage.getItem(Dt(t));if(!e)return null;var n=JSON.parse(e);if(!n||"object"!=typeof n||!("fetchedAt"in n)||!("data"in n))return g("edge-config cache entry has unexpected shape, dropping",t),null;var r=n;return Date.now()-r.fetchedAt>288e5?(f("edge-config expired (TTL), will refetch",t),null):r.data}catch(e){return g("edge-config cache read failed",t,e),null}}(t)}return t.prototype.current=function(){return this.catalog},t.prototype.currentVersion=function(){return this.version},t.prototype.lastFetchDurationMs=function(){return this.lastFetchMs},t.prototype.get=function(){return jt(this,void 0,void 0,function(){return _t(this,function(t){return this.catalog?[2,this.catalog]:(this.inFlight||(this.inFlight=this.runFetch()),[2,this.inFlight])})})},t.prototype.invalidate=function(){this.abort&&(this.abort.abort(new Error("catalog invalidated")),this.abort=null),function(t){try{localStorage.removeItem(Dt(t))}catch(e){g("edge-config cache invalidate failed",t,e)}}(this.brand),this.catalog=null,this.version=null,this.inFlight=null,this.lastFetchMs=null},t.prototype.runFetch=function(){var t,e;return jt(this,void 0,void 0,function(){var n,r,o,i;return _t(this,function(a){switch(a.label){case 0:n=new AbortController,this.abort=n,r=Et(),a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,kt(this.brand,{signal:n.signal})];case 2:if(o=a.sent(),n.signal.aborted)throw new Error("catalog fetch aborted");return this.catalog=Mt(o.edgeConfig),this.version=null!==(e=null===(t=o._meta)||void 0===t?void 0:t.snapshotVersion)&&void 0!==e?e:null,function(t,e,n){try{var r={version:n,fetchedAt:Date.now(),data:e};localStorage.setItem(Dt(t),JSON.stringify(r))}catch(e){g("edge-config cache write failed",t,e)}}(this.brand,this.catalog,this.version),this.lastFetchMs=Et()-r,Ot("catalog",this.lastFetchMs),[2,this.catalog];case 3:throw i=a.sent(),g("edge-config failed",i),i;case 4:return this.inFlight=null,this.abort=null,[7];case 5:return[2]}})})},t}();var Gt=function(){return Gt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Gt.apply(this,arguments)},Vt=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,c)}u((r=r.apply(t,e||[])).next())})},It=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;
1i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}},Ut=function(){function t(){var t;this.version="1.0.0",this.brandCode=k,this.localeView=null,this.edge=null,this.languageWasExplicit=!1,this.currencyWasExplicit=!1,this.countryWasExplicit=!1,this.prevCountry=null,this.lastHydrationError=null,this.initMs=null,this.readyMs=null,this.geoMs=null,this.geoSettledWaiters=[],this.emitter=(t=new Map,{on:function(e,n){var r=t.get(e);return r||(r=new Set,t.set(e,r)),r.add(n),function(){var r;null===(r=t.get(e))||void 0===r||r.delete(n)}},emit:function(e,n){var r=t.get(e);if(r&&0!==r.size)for(var o=0,i=Array.from(r);o<i.length;o++){var a=i[o];try{a(n)}catch(t){}}}}),this.catalogService=new Rt(k),this.hydrator=new Lt,this.hydrationPromise=null,this.switchPending=null,this.initialized=!1,this.disposed=!1;var e=m[k].defaults;this.ctx=Mt({brand:k,country:e.country,language:e.language,currency:e.currency})}return t.getInstance=function(){return t.instance||(t.instance=new t),t.instance},t.resetInstanceForTests=function(){t.instance=null},t.prototype.init=function(){if(this.initialized||this.disposed)return this;var t=Et();this.brandCode=E(),this.catalogService=new Rt(this.brandCode);var e=m[this.brandCode].cookies;return this.languageWasExplicit=zt(H(e.languageExplicit)),this.currencyWasExplicit=zt(H(e.currencyExplicit)),this.countryWasExplicit=function(t){for(var e=m[t],n="undefined"!=typeof location?location.search:"",r=new URLSearchParams(n),o=0,i=e.paramAliases.country;o<i.length;o++){var a=i[o],c=r.get(a);if(c&&c.trim())return!0}return zt(H(e.cookies.country))}(this.brandCode),this.prevCountry=v(G().lastCountry)||null,this.ctx=Mt(Q(this.brandCode,this.catalogService.current())),this.writeCookies(this.ctx),R(this.ctx.country),this.initialized=!0,this.initMs=Et()-t,f("init: brand",this.brandCode,"ctx",this.ctx),Ot("init",this.initMs),this},t.prototype.ready=function(){return this.disposed?(g("ready() called after dispose() — no events will fire; returning resolved"),Promise.resolve()):(this.initialized||this.init(),this.hydrationPromise||(this.hydrationPromise=this.runHydration()),this.hydrationPromise)},t.prototype.refresh=function(){return this.disposed?(g("refresh() called after dispose() — no events will fire; returning resolved"),Promise.resolve()):(this.hydrator.cancel(),Wt(X(this.ctx)),at(),this.localeView=null,this.edge=null,this.hydrationPromise=null,this.lastHydrationError=null,this.readyMs=null,this.geoMs=null,this.ready())},t.prototype.recoverFromError=function(){return Vt(this,void 0,void 0,function(){return It(this,function(t){switch(t.label){case 0:return this.disposed?[2]:(g("recovering from error — clearing caches and refetching"),this.switchPending?[4,this.switchPending.catch(function(){})]:[3,2]);case 1:t.sent(),t.label=2;case 2:return this.hydrator.cancel(),this.catalogService.invalidate(),Wt(X(this.ctx)),at(),this.localeView=null,this.edge=null,this.hydrationPromise=null,this.lastHydrationError=null,this.readyMs=null,this.geoMs=null,[4,this.catalogService.get()];case 3:return t.sent(),this.ctx=Mt(Q(this.brandCode,this.catalogService.current())),this.writeCookies(this.ctx),[4,this.ready()];case 4:return t.sent(),[2]}})})},t.prototype.dispose=function(){this.disposed=!0,this.hydrator.cancel(),this.hydrationPromise=null,this.switchPending=null,this.flushGeoWaiters()},t.prototype.hydrationError=function(){return this.lastHydrationError},t.prototype.timings=function(){return t={initMs:this.initMs,readyMs:this.readyMs,geoMs:this.geoMs,catalogMs:this.catalogService.lastFetchDurationMs()},{initMs:null!==(e=t.initMs)&&void 0!==e?e:null,readyMs:null!==(n=t.readyMs)&&void 0!==n?n:null,geoMs:null!==(r=t.geoMs)&&void 0!==r?r:null,catalogMs:null!==(o=t.catalogMs)&&void 0!==o?o:null};var t,e,n,r,o},t.prototype.brand=function(){return this.brandCode},t.prototype.countryCode=function(){return this.ctx.country},t.prototype.languageCode=function(){return this.ctx.language},t.prototype.currencyCode=function(){return this.ctx.currency},t.prototype.marketCode=function(){return this.ctx.market},t.prototype.context=function(){return this.ctx},t.prototype.isLanguageExplicit=function(){return this.languageWasExplicit},t.prototype.isCurrencyExplicit=function(){return this.currencyWasExplicit},t.prototype.previousCountry=function(){return this.prevCountry},t.prototype.locale=function(){return this.localeView},t.prototype.country=function(){var t,e;return null!==(e=null===(t=this.localeView)||void 0===t?void 0:t.country)&&void 0!==e?e:null},t.prototype.market=function(){var t,e;return null!==(e=null===(t=this.localeView)||void 0===t?void 0:t.market)&&void 0!==e?e:null},t.prototype.withMarketPath=function(t){var e,n,r=t.startsWith("/")?t:"/".concat(t),o=null===(n=null===(e=this.localeView)||void 0===e?void 0:e.market)||void 0===n?void 0:n.marketPath;if(!o||"/"===o)return r;var i=o.endsWith("/")?o.slice(0,-1):o,a=i.startsWith("/")?i:"/".concat(i);return"".concat(a).concat(r)},t.prototype.currency=function(){var t,e,n;return null!==(n=null===(e=null===(t=this.localeView)||void 0===t?void 0:t.country)||void 0===e?void 0:e.defaultCurrency)&&void 0!==n?n:null},t.prototype.geo=function(){return this.edge},t.prototype.geoCountryCode=function(){if(!this.edge)return null;var t=z(this.catalogService.current()),e=v(this.edge.countryCode3),n=v(this.edge.countryCode);if(t.hasData){var r;
1if(3===e.length)if(r=t.resolveCode(e))return r;if(n)if(r=t.resolveCode(n))return r;return null}return 3===e.length?e:null},t.prototype.flushGeoWaiters=function(){if(0!==this.geoSettledWaiters.length){var t=this.geoSettledWaiters;this.geoSettledWaiters=[];for(var e=0,n=t;e<n.length;e++){(0,n[e])()}}},t.prototype.whenGeoReady=function(){var t=this;return this.disposed||null!==this.geoMs?Promise.resolve():(this.hydrationPromise||this.ready(),new Promise(function(e){var n=setTimeout(e,9e3);t.geoSettledWaiters.push(function(){clearTimeout(n),e()})}))},t.prototype.geoConflict=function(){var t;return Vt(this,void 0,void 0,function(){var e,n,r,o,i,a,c,u,l,s,d;return It(this,function(f){switch(f.label){case 0:return[4,this.whenGeoReady()];case 1:return f.sent(),e=this.ctx.country,n=this.prevCountry,(r=this.geoCountryCode())||!(null===(t=this.edge)||void 0===t?void 0:t.countryCode)||this.catalogService.current()?[3,3]:[4,this.catalogService.get().catch(function(){return null})];case 2:f.sent(),r=this.geoCountryCode(),f.label=3;case 3:return function(t){void 0===t&&(t="undefined"!=typeof location?location.search:"");try{return"false"===new URLSearchParams(t||"").get("conflict_banner")}catch(t){return!1}}
1()&&_(),h=G().dismissedAt,o=null!=h&&Date.now()-h<864e5,i=null,a="none",n&&n!==e?(i=n,a="cookie"):r&&r!==e?(i=r,a="geo"):(c=this.detectMarketDefaultSuggestion(e))&&(i=c,a="market-default"),i?[4,this.catalogService.get().catch(function(){return null})]:(u=j(this.catalogService.current(),null),[2,D({current:e,suggested:null,previous:n,mode:u,suggestedUrl:null,dismissed:o,variant:"none"})]);case 4:return f.sent(),l=j(this.catalogService.current(),i),[4,this.urlFor(i).catch(function(){return null})];case 5:return s=f.sent(),(d="redirect"!==l||s?l:"banner")!==l&&g("geoConflict: mode=redirect but suggestedUrl could not be resolved — downgrading to banner",i),[2,D({current:e,suggested:i,previous:n,mode:d,suggestedUrl:s,dismissed:o,variant:a})]}var h})})},t.prototype.detectMarketDefaultSuggestion=function(t){var e,n=null===(e=this.localeView)||void 0===e?void 0:e.market;if(!n||!n.countries||!n.countries.length)return null;if(n.countries.some(function(e){return v(e.code)===t}))return null;var r=v(n.defaultCountry||"");return r&&r!==t?r:null},t.prototype.dismissGeoConflict=function(){_(),R(this.ctx.country)},t.prototype.resolveGeoConflict=function(){return Vt(this,void 0,void 0,function(){var t;return It(this,function(e){switch(e.label){case 0:return[4,this.geoConflict()];case 1:return(t=e.sent())&&t.suggested&&t.suggested!==this.ctx.country?[4,this.setCountry(t.suggested)]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2]}})})},t.prototype.applyConflictRedirect=function(t){return!(!t||"redirect"!==t.mode||!t.suggestedUrl)&&("undefined"!=typeof location&&location.assign(t.suggestedUrl),!0)},t.prototype.catalogData=function(){return this.catalogService.get()},t.prototype.markets=function(){return Vt(this,void 0,void 0,function(){return It(this,function(t){switch(t.label){case 0:return[4,this.catalogService.get()];case 1:return[2,t.sent().markets]}})})},t.prototype.countries=function(){return Vt(this,void 0,void 0,function(){return It(this,function(t){switch(t.label){case 0:return[4,this.catalogService.get()];case 1:return[2,t.sent().countries]}})})},t.prototype.currenciesFor=function(t){var e,n;return Vt(this,void 0,void 0,function(){return It(this,function(r){switch(r.label){case 0:return[4,this.catalogService.get()];case 1:return[2,null!==(n=null===(e=r.sent().countries[v(t)])||void 0===e?void 0:e.allowedCurrencies)&&void 0!==n?n:[]]}})})},t.prototype.languagesFor=function(t){var e,n;return Vt(this,void 0,void 0,function(){return It(this,function(r){switch(r.label){case 0:return[4,this.catalogService.get()];case 1:return[2,null!==(n=null===(e=r.sent().countries[v(t)])||void 0===e?void 0:e.languages)&&void 0!==n?n:[]]}})})},t.prototype.urlFor=function(t,e,n){var r,o,i;return void 0===n&&(n={}),Vt(this,void 0,void 0,function(){var a,c,u;return It(this,function(l){switch(l.label){case 0:return[4,this.catalogService.get()];case 1:return(a=l.sent().countries[v(t)])?(c=p(e||a.defaultLanguage),(u=null===(r=a.languages.find(function(t){return p(t.code)===c}))||void 0===r?void 0:r.path)?[2,u]:[2,n.strict?null:null!==(i=null===(o=a.languages[0])||void 0===o?void 0:o.path)&&void 0!==i?i:null]):[2,null]}})})},t.prototype.setCountry=function(t,e){var n;return void 0===e&&(e={}),Vt(this,void 0,void 0,function(){var r,o,i=this;return It(this,function(a){return this.disposed?[2]:(r=null!==(n=this.switchPending)&&void 0!==n?n:Promise.resolve(),o=Vt(i,void 0,void 0,function(){return It(this,function(n){switch(n.label){case 0:return[4,r.catch(function(){})];case 1:return n.sent(),[2,this.runSetCountry(t,e)]}})}),this.switchPending=o,o.catch(function(){}).then(function(){i.switchPending===o&&(i.switchPending=null)}),[2,o])})})},t.prototype.setLanguage=function(t){this.update({language:p(t)},{explicitLanguage:!0})},t.prototype.setCurrency=function(t){this.update({currency:v(t)},{explicitCurrency:!0})},t.prototype.on=function(t,e){return this.emitter.on(t,e)},t.prototype.runHydration=function(){return Vt(this,void 0,void 0,function(){var t=this;return It(this,function(e){switch(e.label){case 0:return this.disposed?[2]:[4,this.hydrator.run({brand:this.brandCode,ctx:this.ctx,
1catalogVersion:this.catalogService.currentVersion(),countryExplicit:this.countryWasExplicit,currencyExplicit:this.currencyWasExplicit},{onLocaleSettled:function(e,n,r){t.readyMs=r,Ot("ready",r),e?(t.localeView=e.view,t.reconcileFromLocale(),t.writeCookies(t.ctx),t.lastHydrationError=null,t.emitter.emit(i,{ctx:t.ctx,locale:t.localeView,error:null,resolved:e.resolved,durationMs:r})):n&&(t.lastHydrationError=n,g("locale hydrate failed",n),t.emitter.emit(i,{ctx:t.ctx,locale:null,error:n,resolved:!0,durationMs:r}))},onGeoSettled:function(e,n,r){t.geoMs=r,Ot("geo",r),e?(t.edge=e,t.writeGeoCookie().catch(function(){}),t.emitter.emit("geo",{geo:e,error:null,durationMs:r})):n&&(g("edgescape failed",n),t.emitter.emit("geo",{geo:null,error:n,durationMs:r})),t.flushGeoWaiters()}})];case 1:return e.sent(),[2]}})})},t.prototype.reconcileFromLocale=function(){if(this.localeView){var t=function(t,e,n,r){var o,i,a,c,u,l=t.country,s={},d=v(null==l?void 0:l.isoAlpha3Code);if(!d&&(null==l?void 0:l.code)){g("reconcile: /locale country missing isoAlpha3Code — falling back to country.code",l.code);var f=n.resolveCode(l.code);f?d=f:(g("reconcile: fallback country.code did not validate against catalog, ignoring",l.code),d="")}d&&3!==d.length?g("reconcile: /locale country is not alpha-3, ignoring",d):d&&d!==e.country&&(s.country=d);var h=v(null===(o=t.market)||void 0===o?void 0:o.code);h&&h!==e.market&&(s.market=h);var y=p(null===(i=t.language)||void 0===i?void 0:i.code)||function(t){if(!t)return"";var e=/^([a-z]{2})/i.exec(t);return e?e[1].toLowerCase():""}(t.code)||p(null===(a=null==l?void 0:l.defaultLanguage)||void 0===a?void 0:a.code);!r&&y&&y!==e.language&&(s.language=y);var w=v(null===(c=t.currency)||void 0===c?void 0:c.code)||v(null===(u=null==l?void 0:l.defaultCurrency)||void 0===u?void 0:u.code);return w&&w!==e.currency&&(s.currency=w),s}(this.localeView,this.ctx,z(this.catalogService.current()),this.languageWasExplicit);Object.keys(t).length>0&&this.update(t,{})}},t.prototype.runSetCountry=function(t,e){return Vt(this,void 0,void 0,function(){var n,r,o=this;return It(this,function(i){switch(i.label){case 0:return this.disposed?[2]:(this.hydrator.cancel(),this.hydrationPromise=null,[4,this.catalogService.get()]);case 1:return n=i.sent(),this.disposed?[2]:[4,pt(t,e,this.ctx,n,function(t,e){return o.urlFor(t,e)})];case 2:return r=i.sent(),this.disposed||!r?[2]:(this.hydrator.cancel(),this.hydrationPromise=null,Wt(X(this.ctx)),this.localeView=null,this.update(r.patch,{explicitLanguage:!0,explicitCurrency:!0}),_(),r.url&&window.location.assign(r.url),[2])}})})},t.prototype.update=function(t,e){for(var n=this.ctx,r=Mt(Gt(Gt({},this.ctx),t)),o=[],i=0,a=["country","language","currency","market"];i<a.length;i++){var c=a[i];r[c]!==n[c]&&o.push(c)}0!==o.length&&(this.ctx=r,null!=t.language&&(this.languageWasExplicit=!!e.explicitLanguage),null!=t.currency&&(this.currencyWasExplicit=!!e.explicitCurrency),-1!==o.indexOf("country")&&R(r.country),this.writeCookies(this.ctx),this.emitter.emit("change",{ctx:this.ctx,previous:n,changed:o}))},t.prototype.writeCookies=function(t){var e,n,r,o;nt(this.brandCode,{ctx:t,catalog:this.catalogService.current(),languageWasExplicit:this.languageWasExplicit,currencyWasExplicit:this.currencyWasExplicit,office:null===(r=null===(n=null===(e=this.localeView)||void 0===e?void 0:e.esl)||void 0===n?void 0:n.office)||void 0===r?void 0:r.code,geoCountry:this.catalogService.current()&&null!==(o=this.geoCountryCode())&&void 0!==o?o:void 0})},t.prototype.writeGeoCookie=function(){return Vt(this,void 0,void 0,function(){return It(this,function(t){switch(t.label){case 0:return m[this.brandCode].geoCountryCookie&&this.edge?this.catalogService.current()?[3,2]:[4,this.catalogService.get().catch(function(){return null})]:[2];case 1:t.sent(),t.label=2;case 2:return this.disposed||!this.catalogService.current()||this.writeCookies(this.ctx),[2]}})})},t.instance=null,t}();function zt(t){return null!=t&&""!==t}new Proxy({},{get:function(t,e,n){return Reflect.get(Tt(),e,n)},set:function(t,e,n,r){return Reflect.set(Tt(),e,n,r)},has:function(t,e){return Reflect.has(Tt(),e)},getPrototypeOf:function(){return Ut.prototype}});function Tt(){var t;return"undefined"!=typeof window&&(null===(t=window.rcg)||void 0===t?void 0:t.g11n)?window.rcg.g11n:Ut.getInstance()}var Nt=!1;function Jt(){var t;return"undefined"!=typeof window&&(null===(t=window.rcg)||void 0===t?void 0:t.g11n)?window.rcg.g11n:(Nt||(Nt=!0,g("getG11n(): window.rcg.g11n is not attached — head clientlib did not run, or this code is executing before it. Falling back to a local uninitialized singleton; getters will return brand defaults until init() is called.")),Ut.getInstance())}var Ht={data:function(){return{g11n:{brand:null,country:null,language:null,currency:null,market:void 0,countryView:null,marketView:null,currencyView:null,locale:null,geo:null,geoCountry:null}}},created:function(){var t=this,e=Jt();this._g11nOffChange=e.on("change",function(){return t._syncG11n()}),this._g11nOffReady=e.on("ready",function(){return t._syncG11n()}),this._g11nOffGeo=e.on("geo",function(){return t._syncG11n()}),this._syncG11n()},beforeDestroy:function(){this._g11nOffChange&&this._g11nOffChange(),this._g11nOffReady&&this._g11nOffReady(),this._g11nOffGeo&&this._g11nOffGeo()},methods:{_syncG11n:function(){var t=Jt();this.g11n.brand=t.brand(),this.g11n.country=t.countryCode(),this.g11n.language=t.languageCode(),this.g11n.currency=t.currencyCode(),this.g11n.market=t.marketCode(),this.g11n.countryView=t.country(),this.g11n.marketView=t.market(),this.g11n.currencyView=t.currency(),this.g11n.locale=t.locale(),this.g11n.geo=t.geo(),this.g11n.geoCountry=t.geoCountryCode()}}};if("undefined"!=typeof document){if(h("core clientlib loaded"),window.rcg=window.rcg||{},window.rcg.g11n)f("core: window.rcg.g11n already present — reusing existing instance (no re-init)");else{var $t=Ut.getInstance();$t.init(),window.rcg.g11n=$t}window.rcg.g11n.vueMixin=Ht}}();

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.