PageSourceSearch

https://www.ayvensbank.nl/_next/static/chunks/3akgctt1_nvde.js

js ayvensbank.nl collected 2026-10-08 01:55:27 UTC 91,969 bytes, 120 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,130668,(e,t,i)=>{var r="u">typeof globalThis&&globalThis||"u">typeof self&&self||e.g,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();(function(t){var i=void 0!==n&&n||"u">typeof self&&self||e.g||{},r={searchParams:"URLSearchParams"in i,iterable:"Symbol"in i&&"iterator"in Symbol,blob:"FileReader"in i&&"Blob"in i&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in i,arrayBuffer:"ArrayBuffer"in i};if(r.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function o(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r.iterable&&(t[Symbol.iterator]=function(){return t}),t}function c(e){this.map={},e instanceof c?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function h(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}}function p(e){return new Promise(function(t,i){e.onload=function(){t(e.result)},e.onerror=function(){i(e.error)}})}function d(e){var t=new FileReader,i=p(t);return t.readAsArrayBuffer(e),i}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){if(this.bodyUsed=this.bodyUsed,this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(r.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(r.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var t;r.arrayBuffer&&r.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||a(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e)}else this._noBody=!0,this._bodyText="";!this.headers.get("content-type")&&("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=h(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(r.blob)return this.blob().then(d);throw Error("could not read as ArrayBuffer")},this.text=function(){var e,t,i,r,n,s=h(this);if(s)return s;if(this._bodyBlob)return e=this._bodyBlob,i=p(t=new FileReader),n=(r=/charset=([A-Za-z0-9_-]+)/.exec(e.type))?r[1]:"utf-8",t.readAsText(e,n),i;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),i=Array(t.length),r=0;r<t.length;r++)i[r]=String.fromCharCode(t[r]);return i.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},r.formData&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(e,t){e=o(e),t=l(t);var i=this.map[e];this.map[e]=i?i+", "+t:t},c.prototype.delete=function(e){delete this.map[o(e)]},c.prototype.get=function(e){return e=o(e),this.has(e)?this.map[e]:null},c.prototype.has=function(e){return this.map.hasOwnProperty(o(e))},c.prototype.set=function(e,t){this.map[o(e)]=l(t)},c.prototype.forEach=function(e,t){for(var i in this.map)this.map.hasOwnProperty(i)&&e.call(t,this.map[i],i,this)},c.prototype.keys=function(){var e=[];return this.forEach(function(t,i){e.push(i)}),u(e)},c.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),u(e)},c.prototype.entries=function(){var e=[];return this.forEach(function(t,i){e.push([i,t])}),u(e)},r.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var g=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function m(e,t){if(!(this instanceof m))throw TypeError('Please use the "new" operator, this DOM object c
1onstructor cannot be called as a function.');var r,n,s=(t=t||{}).body;if(e instanceof m){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new c(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,s||null==e._bodyInit||(s=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new c(t.headers)),this.method=(n=(r=t.method||this.method||"GET").toUpperCase(),g.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in i)return new AbortController().signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&s)throw TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(s),("GET"===this.method||"HEAD"===this.method)&&("no-store"===t.cache||"no-cache"===t.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function v(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var i=e.split("="),r=i.shift().replace(/\+/g," "),n=i.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(n))}}),t}function E(e,t){if(!(this instanceof E))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},y.call(m.prototype),y.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var b=[301,302,303,307,308];E.redirect=function(e,t){if(-1===b.indexOf(t))throw RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},t.DOMException=i.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var i=Error(e);this.stack=i.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function T(e,n){return new Promise(function(s,a){var u=new m(e,n);if(u.signal&&u.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var h=new XMLHttpRequest;function p(){h.abort()}if(h.onload=function(){var e,t,i={statusText:h.statusText,headers:(e=h.getAllResponseHeaders()||"",t=new c,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var i=e.split(":"),r=i.shift().trim();if(r){var n=i.join(":").trim();try{t.append(r,n)}catch(e){console.warn("Response "+e.message)}}}),t)};0===u.url.indexOf("file://")&&(h.status<200||h.status>599)?i.status=200:i.status=h.status,i.url="responseURL"in h?h.responseURL:i.headers.get("X-Request-URL");var r="response"in h?h.response:h.responseText;setTimeout(function(){s(new E(r,i))},0)},h.onerror=function(){setTimeout(function(){a(TypeError("Network request failed"))},0)},h.ontimeout=function(){setTimeout(function(){a(TypeError("Network request timed out"))},0)},h.onabort=function(){setTimeout(function(){a(new t.DOMException("Aborted","AbortError"))},0)},h.open(u.method,function(e){try{return""===e&&i.location.href?i.location.href:e}catch(t){return e}}(u.url),!0),"include"===u.credentials?h.withCredentials=!0:"omit"===u.credentials&&(h.withCredentials=!1),"responseType"in h&&(r.blob?h.responseType="blob":r.arrayBuffer&&(h.responseType="arraybuffer")),n&&"object"==typeof n.headers&&!(n.headers instanceof c||i.Headers&&n.headers instanceof i.Headers)){var d=[];
1Object.getOwnPropertyNames(n.headers).forEach(function(e){d.push(o(e)),h.setRequestHeader(e,l(n.headers[e]))}),u.headers.forEach(function(e,t){-1===d.indexOf(t)&&h.setRequestHeader(t,e)})}else u.headers.forEach(function(e,t){h.setRequestHeader(t,e)});u.signal&&(u.signal.addEventListener("abort",p),h.onreadystatechange=function(){4===h.readyState&&u.signal.removeEventListener("abort",p)}),h.send(void 0===u._bodyInit?null:u._bodyInit)})}T.polyfill=!0,i.fetch||(i.fetch=T,i.Headers=c,i.Request=m,i.Response=E),t.Headers=c,t.Request=m,t.Response=E,t.fetch=T,Object.defineProperty(t,"__esModule",{value:!0})})({}),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var s=r.fetch?r:n;(i=s.fetch).default=s.fetch,i.fetch=s.fetch,i.Headers=s.Headers,i.Request=s.Request,i.Response=s.Response,t.exports=i},202495,(e,t,i)=>{"use strict";function r(){var e=Object.create(null),t=0,i=0,r=0,n=!1;function s(t){r--,delete e[t]}this.put=function(t,i,a,o){if(n&&console.log("caching: %s = %j (@%s)",t,i,a),void 0!==a&&("number"!=typeof a||isNaN(a)||a<=0))throw Error("Cache timeout must be a positive number");if(void 0!==o&&"function"!=typeof o)throw Error("Cache timeout callback must be a function");var l=e[t];l?clearTimeout(l.timeout):r++;var u={value:i,expire:a+Date.now()};return isNaN(u.expire)||(u.timeout=setTimeout((function(){s(t),o&&o(t,i)}).bind(this),a)),e[t]=u,i},this.del=function(t){var i=!0,r=e[t];return r?(clearTimeout(r.timeout),!isNaN(r.expire)&&r.expire<Date.now()&&(i=!1)):i=!1,i&&s(t),i},this.clear=function(){for(var s in e)clearTimeout(e[s].timeout);r=0,e=Object.create(null),n&&(t=0,i=0)},this.get=function(s){var a=e[s];if(void 0!==a)if(isNaN(a.expire)||a.expire>=Date.now())return n&&t++,a.value;else n&&i++,r--,delete e[s];else n&&i++;return null},this.size=function(){return r},this.memsize=function(){var t,i=0;for(t in e)i++;return i},this.debug=function(e){n=e},this.hits=function(){return t},this.misses=function(){return i},this.keys=function(){return Object.keys(e)},this.exportJson=function(){var t={};for(var i in e){var r=e[i];t[i]={value:r.value,expire:r.expire||"NaN"}}return JSON.stringify(t)},this.importJson=function(t,i){var r=JSON.parse(t),s=Date.now(),a=i&&i.skipDuplicates;for(var o in r)if(r.hasOwnProperty(o)){if(a&&e[o]){n&&console.log("Skipping duplicate imported key '%s'",o);continue}var l=r[o],u=l.expire-s;if(u<=0){this.del(o);continue}u=u>0?u:void 0,this.put(o,l.value,u)}return this.size()}}t.exports=new r,t.exports.Cache=r},231094,e=>{"use strict";var t,i,r,n,s,a,o,l,u,c,h=e.i(932163),p=e.i(775867),d=e.i(223942),f=e.i(406935),y=e.i(202495);let g=Object.freeze({cacheTimeout:60,cacheEnabled:!0});class m{constructor(e){var t;this.options=e,this.cache=new y.Cache,this.options.cacheTimeout=(null!=(t=this.options.cacheTimeout)?t:g.cacheTimeout)*1e3,void 0===this.options.cacheEnabled&&(this.options.cacheEnabled=g.cacheEnabled)}getCacheValue(e){return this.options.cacheEnabled?this.cache.get(e):null}setCacheValue(e,t){return this.options.cacheEnabled?this.cache.put(e,t,this.options.cacheTimeout):t}}var v=e.i(395634);let{ERROR_MESSAGES:E}=d.constants,b=`
2  query DictionarySiteQuery(
3    $siteName: String!
4    $language: String!
5    $pageSize: Int = 500
6    $after: String
7  ) {
8    site {
9      siteInfo(site: $siteName) {
10        dictionary(language: $language, first: $pageSize, after: $after) {
11          pageInfo {
12            endCursor
13            hasNext
14          }
15          results {
16            key
17            value
18          }
19        }
20      }
21    }
22  }
23`;class T{constructor(e){this.options=e,this.cache=this.getCacheClient(),this.graphQLClient=this.getGraphQLClient()}async fetchDictionaryData(e,t,i){var r,n;let s=t+e,a=this.getCacheValue(s);if(a)return v.default.dictionary("using cached dictionary data for %s %s",e,t),a;let o={};v.default.dictionary("fetching dictionary data for %s %s",e,t);let l=[],u=!0,c="";if(!t)throw RangeError(E.MV_002);if(!e)throw RangeError(E.MV_009);for(;u;){let s=await this.graphQLClient.request(b,{siteName:t,language:e,pageSize:this.options.pageSize,after:c},i);(null==(n=null==(r=null==s?void 0:s.site)?void 0:r.siteInfo)?void 0:n.dictionary)?(l=l.concat(s.site.siteInfo.dictionary.results),c=s.site.siteInfo.dictionary.pageInfo.endCursor,u=s.site.siteInfo.dictionary.pageInfo.hasNext):u=!1}
23return l.forEach(e=>o[e.key]=e.value),this.setCacheValue(s,o),o}setCacheValue(e,t){return this.cache.setCacheValue(e,t)}getCacheValue(e){return this.cache.getCacheValue(e)}getCacheClient(){return new m(this.options)}getGraphQLClient(){var e,t;if(!this.options.clientFactory)throw Error("clientFactory needs to be provided when initializing GraphQL client.");return this.options.clientFactory({debugger:v.default.dictionary,retries:null==(e=this.options.retries)?void 0:e.count,retryStrategy:null==(t=this.options.retries)?void 0:t.retryStrategy})}}var O=d,N=e.i(138742),I=e.i(330006);let S=/-library--([^\s]+)/,x=(e,t)=>{var i,r,n,s;let a;if("params"in e&&e.params){let t=(0,I.getRenderingParamString)(e.params.CSSStyles),n=(0,I.getRenderingParamString)(e.params.Styles),s=(0,I.getRenderingParamString)(e.params.LibraryId);a=(null==(i=null==t?void 0:t.match(S))?void 0:i[1])||(null==(r=null==n?void 0:n.match(S))?void 0:r[1])||s||void 0}if(!a&&"fields"in e&&e.fields){let t=(0,I.getRenderingParamString)((0,I.getFieldValue)(e.fields,"CSSStyles","")),i=(0,I.getRenderingParamString)((0,I.getFieldValue)(e.fields,"Styles","")),r=(0,I.getRenderingParamString)((0,I.getFieldValue)(e.fields,"LibraryId",""));a=(null==(n=null==t?void 0:t.match(S))?void 0:n[1])||(null==(s=null==i?void 0:i.match(S))?void 0:s[1])||r||void 0}a&&t.add(a);let o=e.placeholders||{};Object.keys(o).forEach(e=>{var i;i=o[e],i.map(e=>x(e,t))})};var A=d;let D=/class=".*(\bck-content\b).*"/g,C=(e,t)=>{e&&"object"==typeof e&&!t.loadStyles&&("value"in e&&"string"==typeof e.value?t.loadStyles=D.test(e.value):"fields"in e?Object.values(e.fields).forEach(e=>{C(e,t)}):Array.isArray(e)&&e.forEach(e=>{C(e,t)}))},_=(e,t)=>{if(t.loadStyles)return;"fields"in e&&e.fields&&Object.values(e.fields).forEach(e=>{C(e,t)});let i=e.placeholders||{};
23Object.keys(i).forEach(e=>{var r;r=i[e],t.loadStyles||r.forEach(e=>{_(e,t)})})};class w{constructor(e){this.serviceConfig=e,this.graphQLClient=this.getGraphQLClient()}getGraphQLClient(){var e,t;if(!this.serviceConfig.clientFactory)throw Error("clientFactory needs to be provided when initializing GraphQL client.");return this.serviceConfig.clientFactory({debugger:this.serviceConfig.debugger||p.debug.http,retries:null==(e=this.serviceConfig.retries)?void 0:e.count,retryStrategy:null==(t=this.serviceConfig.retries)?void 0:t.retryStrategy})}}class R extends w{constructor(e){super(e),this.serviceConfig=e}async fetchLayoutData(e,t,i){var r,n;let s=t.site,a=this.getLayoutQuery(e,s,null==t?void 0:t.locale);v.default.layout("fetching layout data for %s %s %s",e,null==t?void 0:t.locale,s);let o=await this.graphQLClient.request(a,{},i);return(null==(n=null==(r=null==o?void 0:o.layout)?void 0:r.item)?void 0:n.rendered)||{sitecore:{context:{pageEditing:!1,language:null==t?void 0:t.locale},route:null}}}getLayoutQuery(e,t,i){let r=i?`, language:"${i}"`:"",n=this.serviceConfig.formatLayoutQuery?this.serviceConfig.formatLayoutQuery(t,e,i):`layout(site:"${t}", routePath:"${e}"${r})`;return`query ContentSdkLayoutQuery {
24      ${n}{
25        item {
26          rendered
27        }
28      }
29    }`}}var P=e.i(247569),L=e.i(12236);let k=new URL(d.constants.SITECORE_EXPERIENCE_EDGE_URL_DEFAULT).hostname;function F(e){try{return new URL(e.startsWith("http")?e:`https://${e}`).hostname.toLowerCase()!==k}catch(e){return!1}}let j=RegExp(`https?://${(0,L.escapeRegExp)(k)}`,"gi");function M(e,t){let i=(0,N.normalizeUrl)(t);return F(i)?function e(t,i){if(null==t)return t;if("string"==typeof t)return B(t,i);if(Array.isArray(t))return t.map(t=>e(t,i));if("object"==typeof t){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let r={};for(let n of Object.keys(t))r[n]=e(t[n],i);return r}return t}(e,i):e}function B(e,t){return j.lastIndex=0,e.replace(j,t)}let U=e=>Object.assign(Object.assign({},e),{componentName:"Hidden Rendering",experiences:{}}),{ERROR_MESSAGES:$}=d.constants,V=`
30  query ErrorPagesQuery($siteName: String!, $language: String!) {
31    site {
32      siteInfo(site: $siteName) {
33        errorHandling(language: $language) {
34          notFoundPage {
35            rendered
36          }
37          notFoundPagePath
38          serverErrorPage {
39            rendered
40          }
41          serverErrorPagePath
42        }
43      }
44    }
45  }
46`;class q{constructor(e){this.options=e,this.graphQLClient=this.getGraphQLClient()}get query(){return V}async fetchErrorPages(e,t,i){let r=t||this.options.language;if(!e)throw Error($.MV_002);return this.graphQLClient.request(this.query,{siteName:e,language:r},i).then(e=>{var t,i;if(!e.site.siteInfo)return null;let r=e.site.siteInfo.errorHandling,n=(null==(t=r.notFoundPage)?void 0:t.rendered)?{rendered:r.notFoundPage.rendered}:null,s=(null==(i=r.serverErrorPage)?void 0:i.rendered)?{rendered:r.serverErrorPage.rendered}:null;return Object.assign(Object.assign({},r),{notFoundPage:n,serverErrorPage:s})}).catch(e=>Promise.reject(e))}getGraphQLClient(){var e,t;if(!this.options.clientFactory)throw Error("clientFactory needs to be provided when initializing GraphQL client.");return this.options.clientFactory({debugger:v.default.errorpages,retries:null==(e=this.options.retries)?void 0:e.count,retryStrategy:null==(t=this.options.retries)?void 0:t.retryStrategy})}}var G=e.i(296120);let Q="_site_";function z(e){let t=e.match(`${Q}.*?(?:\\/|$)`);return null===t?e:e.replace(t[0],"")}let{ERROR_MESSAGES:K}=d.constants;class Y{constructor(e){this.options=e,this._graphQLClient=this.getGraphQLClient()}get graphQLClient(){return this._graphQLClient}get query(){let e;return e=this.options.includePersonalizedRoutes,`
47query ${e?"PersonalizeSitemapQuery":"DefaultSitemapQuery"}(
48  $siteName: String!
49  $language: String!
50  $includedPaths: [String]
51  $excludedPaths: [String]
52  $pageSize: Int = 100
53  $after: String
54) {
55  site {
56    siteInfo(site: $siteName) {
57      routes(
58        language: $language
59        includedPaths: $includedPaths
60        excludedPaths: $excludedPaths
61        first: $pageSize
62        after: $after
63      ){
64        total
65        pageInfo {
66          endCursor
67          hasNext
68        }
69        results {
70          path: routePath
71          ${e?`
72              route {
73                personalization {
74                  variantIds
75                }
76              }`:""}
77        }
78      }
79    }
80  }
81}
82`}async fetchSiteRoutes(e,t,i){let r=(e,t)=>({params:{path:e},locale:t}),n=[];if(!t.length)throw RangeError(K.MV_009);if(!e||!e.length)throw RangeError("The list of sites cannot be empty");for(let s=0;s<e.length;s++)for(let a of t){let t=await this.fetchLanguageSitePaths(a,e[s],i),o=await this.transformLanguageSitePaths(t,r,a);n.push(...o)}return[].concat(...n)}async transformLanguageSitePaths(e,t,i){let r=e=>decodeURI(e).replace(/^\/|\/$/g,"").split("/"),n=[];
82return e.forEach(e=>{var s,a,o;if(!e)return;n.push(t(r(e.path),i));let l=null==(o=null==(a=null==(s=e.route)?void 0:s.personalization)?void 0:a.variantIds)?void 0:o.filter(e=>!e.includes("_"));(null==l?void 0:l.length)&&n.push(...l.map(n=>t(r((0,G.getPersonalizedRewrite)(e.path,[n])),i)))}),n}getGraphQLClient(){if(!this.options.clientFactory)throw Error("clientFactory needs to be provided when initializing GraphQL client.");return this.options.clientFactory({debugger:v.default.sitemap})}async fetchLanguageSitePaths(e,t,i){var r,n,s,a;let o={siteName:t,language:e,pageSize:this.options.pageSize,includedPaths:this.options.includedPaths,excludedPaths:this.options.excludedPaths},l=[],u=!0,c="";for(v.default.sitemap("fetching sitemap data for %s %s",e,t);u;){let e=await this.graphQLClient.request(this.query,Object.assign(Object.assign({},o),{after:c}),i);if(null==(r=null==e?void 0:e.site)?void 0:r.siteInfo)l=l.concat(null==(n=e.site.siteInfo.routes)?void 0:n.results),u=null==(s=e.site.siteInfo.routes)?void 0:s.pageInfo.hasNext,c=null==(a=e.site.siteInfo.routes)?void 0:a.pageInfo.endCursor;else throw RangeError(K.IV_007(t))}return l.forEach(e=>{var i;let r;e&&(i=e.path,r=i.startsWith("/")?i:"/"+i,e.path=`/${Q}${({siteName:t}).siteName}${r}`)}),l}}let{ERROR_MESSAGES:H}=d.constants,J="sitemap",X=`
83  query SitemapQuery($siteName: String!) {
84    site {
85      siteInfo(site: $siteName) {
86        sitemap
87      }
88    }
89  }
90`;class W{constructor(e){this.options=e,this.graphQLClient=this.getGraphQLClient()}get query(){return X}async fetchSitemaps(e){let t=this.options.siteName;if(!t)throw Error(H.MV_002);let i=this.graphQLClient.request(this.query,{siteName:t},e);try{return i.then(e=>e.site.siteInfo.sitemap)}catch(e){return Promise.reject(e)}}async getSitemap(e){let t;if(void 0!==e){if(""===e)t=`${J}.xml`;else{let i=e.startsWith("-")?e.slice(1):e;t=`${J}-${i}.xml`}return(await this.fetchSitemaps()).find(e=>e.includes(t))}}getGraphQLClient(){if(!this.options.clientFactory)throw Error("clientFactory needs to be provided when initializing GraphQL client.");return this.options.clientFactory({debugger:v.default.sitemap})}}let Z=JSON,ee=/\r\n|[\n\r]/g;function et(e,t){let i=0,r=1;for(let n of e.body.matchAll(ee)){if("number"==typeof n.index||function(e){if(!e)throw Error("Unexpected invariant triggered.")}(!1),n.index>=t)break;i=n.index+n[0].length,r+=1}return{line:r,column:t+1-i}}function ei(e,t){let i=e.locationOffset.column-1,r="".padStart(i)+e.body,n=t.line-1,s=e.locationOffset.line-1,a=t.line+s,o=1===t.line?i:0,l=t.column+o,u=`${e.name}:${a}:${l}
91`,c=r.split(/\r\n|[\n\r]/g),h=c[n];if(h.length>120){let e=Math.floor(l/80),t=[];for(let e=0;e<h.length;e+=80)t.push(h.slice(e,e+80));return u+er([[`${a} |`,t[0]],...t.slice(1,e+1).map(e=>["|",e]),["|","^".padStart(l%80)],["|",t[e+1]]])}return u+er([[`${a-1} |`,c[n-1]],[`${a} |`,h],["|","^".padStart(l)],[`${a+1} |`,c[n+1]]])}function er(e){let t=e.filter(([e,t])=>void 0!==t),i=Math.max(...t.map(([e])=>e.length));return t.map(([e,t])=>e.padStart(i)+(t?" "+t:"")).join("\n")}class en extends Error{constructor(e,...t){var i,r,n;const{nodes:s,source:a,positions:o,path:l,originalError:u,extensions:c}=function(e){let t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=l?l:void 0,this.originalError=null!=u?u:void 0,this.nodes=es(Array.isArray(s)?s:s?[s]:void 0);const h=es(null==(i=this.nodes)?void 0:i.map(e=>e.loc).filter(e=>null!=e));this.source=null!=a?a:null==h||null==(r=h[0])?void 0:r.source,this.positions=null!=o?o:null==h?void 0:h.map(e=>e.start),this.locations=o&&a?o.map(e=>et(a,e)):null==h?void 0:h.map(e=>et(e.source,e.start));const p=!function(e){return"object"==typeof e&&null!==e}(null==u?void 0:u.extensions)||null==u?void 0:u.extensions;this.extensions=null!=(n=null!=c?c:p)?n:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=u&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,en):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let i of this.nodes){var t;i.loc&&(e+="\n\n"+ei((t=i.loc).source,et(t.source,t.start)))}else if(this.source&&this.locations)for(let t of this.locations)e+="\n\n"+ei(this.source,t);return e}toJSON(){let e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function es(e){return void 0===e||0===e.length?void 0:e}function ea(e,t,i){return new en(`Syntax Error: ${i}`,{source:e,positions:[t]})}class eo{constructor(e,t,i){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}
91class el{constructor(e,t,i,r,n,s){this.kind=e,this.start=t,this.end=i,this.line=r,this.column=n,this.value=s,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}let eu={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:["name","directives"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},ec=new Set(Object.keys(eu));function eh(e){let t=null==e?void 0:e.kind;return"string"==typeof t&&ec.has(t)}function ep(e){return 9===e||32===e}function ed(e){return e>=48&&e<=57}function ef(e){return e>=97&&e<=122||e>=65&&e<=90}function ey(e){return ef(e)||95===e}(t=a||(a={})).QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription",(i=o||(o={})).QUERY="QUERY",i.MUTATION="MUTATION",i.SUBSCRIPTION="SUBSCRIPTION",i.FIELD="FIELD",i.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",i.FRAGMENT_SPREAD="FRAGMENT_SPREAD",i.INLINE_FRAGMENT="INLINE_FRAGMENT",i.VARIABLE_DEFINITION="VARIABLE_DEFINITION",i.SCHEMA="SCHEMA",i.SCALAR="SCALAR",i.OBJECT="OBJECT",i.FIELD_DEFINITION="FIELD_DEFINITION",i.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",i.INTERFACE="INTERFACE",i.UNION="UNION",i.ENUM="ENUM",i.ENUM_VALUE="ENUM_VALUE",i.INPUT_OBJECT="INPUT_OBJECT",i.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION",i.DIRECTIVE_DEFINITION="DIRECTIVE_DEFINITION",(r=l||(l={})).NAME="Name",r.DOCUMENT="Document",r.OPERATION_DEFINITION="OperationDefinition",r.VARIABLE_DEFINITION="VariableDefinition",r.SELECTION_SET="SelectionSet",r.FIELD="Field",r.ARGUMENT="Argument",r.FRAGMENT_SPREAD="FragmentSpread",r.INLINE_FRAGMENT="InlineFragment",r.FRAGMENT_DEFINITION="FragmentDefinition",r.VARIABLE="Variable",r.INT="IntValue",r.FLOAT="FloatValue",r.STRING="StringValue",r.BOOLEAN="BooleanValue",r.NULL="NullValue",r.ENUM="EnumValue",r.LIST="ListValue",r.OBJECT="ObjectValue",r.OBJECT_FIELD="ObjectField",r.DIRECTIVE="Directive",r.NAMED_TYPE="NamedType",r.LIST_TYPE="ListType",r.NON_NULL_TYPE="NonNullType",r.SCHEMA_DEFINITION="SchemaDefinition",r.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",r.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",r.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",r.FIELD_DEFINITION="FieldDefinition",r.INPUT_VALUE_DEFINITION="InputValueDefinition",r.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",r.UNION_TYPE_DEFINITION="UnionTypeDefinition",r.ENUM_TYPE_DEFINITION="EnumTypeDefinition",r.ENUM_VALUE_DEFINITION="EnumValueDefinition",r.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",r.DIRECTIVE_DEFINITION="DirectiveDefinition",r.SCHEMA_EXTENSION="SchemaExtension",r.DIRECTIVE_EXTENSION="DirectiveExtension",r.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",r.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",r.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",r.UNION_TYPE_EXTENSION="UnionTypeExtension",r.ENUM_TYPE_EXTENSION="EnumTypeExtension",r.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",r.TYPE_COORDINATE="TypeCoordinate",r.MEMBER_COORDINATE="MemberCoordinate",r.ARGUMENT_COORDINATE="ArgumentCoordinate",r.DIRECTIVE_COORDINATE="DirectiveCoordinate",r.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate",(n=u||(u={})).SOF="<SOF>",n.EOF="<EOF>",n.BANG="!",n.DOLLAR="$",n.AMP="&",n.PAREN_L="(",n.PAREN_R=")",n.DOT=".",n.SPREAD="...",n.COLON=":",n.EQUALS="=",n.AT="@",n.BRACKET_L="[",n.BRACKET_R="]",n.BRACE_L="{",n.PIPE="|",n.BRACE_R="}
91",n.NAME="Name",n.INT="Int",n.FLOAT="Float",n.STRING="String",n.BLOCK_STRING="BlockString",n.COMMENT="Comment";class eg{constructor(e){const t=new el(u.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==u.EOF)do if(e.next)e=e.next;else{let t=function(e,t){let i=e.source.body,r=i.length,n=t;for(;n<r;){let t=i.charCodeAt(n);switch(t){case 65279:case 9:case 32:case 44:++n;continue;case 10:++n,++e.line,e.lineStart=n;continue;case 13:10===i.charCodeAt(n+1)?n+=2:++n,++e.line,e.lineStart=n;continue;case 35:return function(e,t){let i=e.source.body,r=i.length,n=t+1;for(;n<r;){let e=i.charCodeAt(n);if(10===e||13===e)break;if(em(e))++n;else if(ev(i,n))n+=2;else break}return eO(e,u.COMMENT,t,n,i.slice(t+1,n))}(e,n);case 33:return eO(e,u.BANG,n,n+1);case 36:return eO(e,u.DOLLAR,n,n+1);case 38:return eO(e,u.AMP,n,n+1);case 40:return eO(e,u.PAREN_L,n,n+1);case 41:return eO(e,u.PAREN_R,n,n+1);case 46:if(46===i.charCodeAt(n+1)&&46===i.charCodeAt(n+2))return eO(e,u.SPREAD,n,n+3);break;case 58:return eO(e,u.COLON,n,n+1);case 61:return eO(e,u.EQUALS,n,n+1);case 64:return eO(e,u.AT,n,n+1);case 91:return eO(e,u.BRACKET_L,n,n+1);case 93:return eO(e,u.BRACKET_R,n,n+1);case 123:return eO(e,u.BRACE_L,n,n+1);case 124:return eO(e,u.PIPE,n,n+1);case 125:return eO(e,u.BRACE_R,n,n+1);case 34:if(34===i.charCodeAt(n+1)&&34===i.charCodeAt(n+2))return function(e,t){let i=e.source.body,r=i.length,n=e.lineStart,s=t+3,a=s,o="",l=[];for(;s<r;){let r=i.charCodeAt(s);if(34===r&&34===i.charCodeAt(s+1)&&34===i.charCodeAt(s+2)){o+=i.slice(a,s),l.push(o);let r=eO(e,u.BLOCK_STRING,t,s+3,(function(e){var t,i;let r=Number.MAX_SAFE_INTEGER,n=null,s=-1;for(let t=0;t<e.length;++t){let a=e[t],o=function(e){let t=0;for(;t<e.length&&ep(e.charCodeAt(t));)++t;return t}(a);o!==a.length&&(n=null!=(i=n)?i:t,s=t,0!==t&&o<r&&(r=o))}return e.map((e,t)=>0===t?e:e.slice(r)).slice(null!=(t=n)?t:0,s+1)})(l).join("\n"));return e.line+=l.length-1,e.lineStart=n,r}if(92===r&&34===i.charCodeAt(s+1)&&34===i.charCodeAt(s+2)&&34===i.charCodeAt(s+3)){o+=i.slice(a,s),a=s+1,s+=4;continue}if(10===r||13===r){o+=i.slice(a,s),l.push(o),13===r&&10===i.charCodeAt(s+1)?s+=2:++s,o="",a=s,n=s;continue}if(em(r))++s;else if(ev(i,s))s+=2;else throw ea(e.source,s,`Invalid character within String: ${eT(e,s)}.`)}throw ea(e.source,s,"Unterminated string.")}(e,n);return function(e,t){let i=e.source.body,r=i.length,n=t+1,s=n,a="";for(;n<r;){let r=i.charCodeAt(n);if(34===r)return a+=i.slice(s,n),eO(e,u.STRING,t,n+1,a);if(92===r){a+=i.slice(s,n);let t=117===i.charCodeAt(n+1)?123===i.charCodeAt(n+2)?function(e,t){let i=e.source.body,r=0,n=3;for(;n<12;){let e=i.charCodeAt(t+n++);if(125===e){if(n<5||!em(r))break;return{value:String.fromCodePoint(r),size:n}}if((r=r<<4|eS(e))<0)break}throw ea(e.source,t,`Invalid Unicode escape sequence: "${i.slice(t,t+n)}".`)}(e,n):function(e,t){let i=e.source.body,r=eI(i,t+2);if(em(r))return{value:String.fromCodePoint(r),size:6};if(eE(r)&&92===i.charCodeAt(t+6)&&117===i.charCodeAt(t+7)){let e=eI(i,t+8);if(eb(e))return{value:String.fromCodePoint(r,e),size:12}}throw ea(e.source,t,`Invalid Unicode escape sequence: "${i.slice(t,t+6)}".`)}(e,n):function(e,t){let i=e.source.body;switch(i.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"	",size:2}}throw ea(e.source,t,`Invalid character escape sequence: "${i.slice(t,t+2)}".`)}(e,n);a+=t.value,n+=t.size,s=n;continue}if(10===r||13===r)break;if(em(r))++n;else if(ev(i,n))n+=2;else throw ea(e.source,n,`Invalid character within String: ${eT(e,n)}.`)}throw ea(e.source,n,"Unterminated string.")}(e,n)}if(ed(t)||45===t)return function(e,t,i){let r=e.source.body,n=t,s=i,a=!1;if(45===s&&(s=r.charCodeAt(++n)),48===s){if(ed(s=r.charCodeAt(++n)))throw ea(e.source,n,`Invalid number, unexpected digit after 0: ${eT(e,n)}.`)}else n=eN(e,n,s),s=r.charCodeAt(n);if(46===s&&(a=!0,s=r.charCodeAt(++n),n=eN(e,n,s),s=r.charCodeAt(n)),(69===s||101===s)&&(a=!0,(43===(s=r.charCodeAt(++n))||45===s)&&(s=r.charCodeAt(++n)),n=eN(e,n,s),s=r.charCodeAt(n)),46===s||ey(s))throw ea(e.source,n,`Invalid number, expected digit but got: ${eT(e,n)}.`);return eO(e,a?u.FLOAT:u.INT,t,n,r.slice(t,n))}(e,n,t);if(ey(t))return function(e,t){let i=e.source.body,r=i.length,n=t+1;for(;n<r;){var s;if(ef(s=i.charCodeAt(n))||ed(s)||95===s)++n;else break}return eO(e,u.NAME,t,n,i.slice(t,n))}(e,n);throw ea(e.source,n,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":em(t)||ev(i,n)?`Unexpected character: ${eT(e,n)}.`:`Invalid character: ${eT(e,n)}.`)}return eO(e,u.EOF,r,r)}(this,e.end);e.next=t,t.prev=e,e=t}while(e.kind===u.COMMENT)return e}}function em(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function ev(e,t){return eE(e.charCodeAt(t))&&eb(e.charCodeAt(t+1))}function eE(e){return e>=55296&&e<=56319}function eb(e){return e>=56320&&e<=57343}function eT(e,t){let i=e.source.body.codePointAt(t);if(void 0===i)return u.EOF;if(i>=32&&i<=126){let e=String.fromCodePoint(i);return'"'===e?"'\"'":`"${e}"`}return"U+"+i.toString(16).toUpperCase().padStart(4,"0")}function eO(e,t,i,r,n){let s=e.line,a=1+i-e.lineStart;return new el(t,i,r,s,a,n)}function eN(e,t,i){if(!ed(i))throw ea(e.source,t,`Invalid number, expected digit but got: ${eT(e,t)}.`);let r=e.source.body,n=t+1;for(;ed(r.charCodeAt(n));)++n;return n}function eI(e,t){return eS(e.charCodeAt(t))<<12|eS(e.charCodeAt(t+1))<<8|eS(e.charCodeAt(t+2))<<4|eS(e.charCodeAt(t+3))}function eS(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function ex(e,t){if(!e)throw Error(t)}function eA(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){let i;if(null===e)return"null";if(t.includes(e))return"[Circular]";let r=[...t,e];if("function"==typeof e.toJSON){let t=e.toJSON();if(t!==e)return"string"==typeof t?t:eA(t,r)}else if(Array.isArray(e)){var n,s,a=e,o=r;if(0===a.length)return"[]";if(o.length>2)return"[Array]";let t=Math.min(10,a.length),i=a.length-t,l=[];for(let e=0;e<t;++e)l.push(eA(a[e],o));return 1===i?l.push("... 1 more item"):i>1&&l.push(`... ${i} more items`),"["+l.join(", ")+"]"}return n=e,s=r,0===(i=Object.entries(n)).length?"{}":s.length>2?"["+function(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){let t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(n)+"]":"{ "+i.map(([e,t])=>e+": "+eA(t,s)).join(", ")+" }"}(e,t);default:return String(e)}}let eD=globalThis.process&&1?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;
91if("object"==typeof e&&null!==e){var i;let r=t.prototype[Symbol.toStringTag];if(r===(Symbol.toStringTag in e?e[Symbol.toStringTag]:null==(i=e.constructor)?void 0:i.name)){let t=eA(e,[]);throw Error(`Cannot use ${r} "${t}" from another module or realm.
92
93Ensure that there is only one instance of "graphql" in the node_modules
94directory. If different versions of "graphql" are the dependencies of other
95relied on modules, use "resolutions" to ensure only one version is installed.
96
97https://yarnpkg.com/en/docs/selective-version-resolutions
98
99Duplicate "graphql" modules cannot be used at the same time since different
100versions may have different capabilities and behavior. The data from one
101version used in the function from another could produce confusing and
102spurious results.`)}}return!1};class eC{constructor(e,t="GraphQL request",i={line:1,column:1}){"string"==typeof e||ex(!1,`Body must be a string. Received: ${function(e){return eA(e,[])}(e)}.`),this.body=e,this.name=t,this.locationOffset=i,this.locationOffset.line>0||ex(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ex(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}class e_{constructor(e,t={}){const{lexer:i,...r}=t;if(i)this._lexer=i;else{const t=!function(e){return eD(e,eC)}(e)?new eC(e):e;this._lexer=new eg(t)}this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let e=this.expectToken(u.NAME);return this.node(e,{kind:l.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:l.DOCUMENT,definitions:this.many(u.SOF,this.parseDefinition,u.EOF)})}parseDefinition(){if(this.peek(u.BRACE_L))return this.parseOperationDefinition();let e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(e&&t.kind===u.BRACE_L)throw ea(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(t.kind===u.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(e)throw ea(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if("extend"===t.value)return this.parseTypeSystemExtension()}throw this.unexpected(t)}parseOperationDefinition(){let e,t=this._lexer.token;if(this.peek(u.BRACE_L))return this.node(t,{kind:l.OPERATION_DEFINITION,operation:a.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let i=this.parseDescription(),r=this.parseOperationType();return this.peek(u.NAME)&&(e=this.parseName()),this.node(t,{kind:l.OPERATION_DEFINITION,operation:r,description:i,name:e,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(u.NAME);switch(e.value){case"query":return a.QUERY;case"mutation":return a.MUTATION;case"subscription":return a.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(u.PAREN_L,this.parseVariableDefinition,u.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:l.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(u.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(u.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let e=this._lexer.token;return this.expectToken(u.DOLLAR),this.node(e,{kind:l.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:l.SELECTION_SET,selections:this.many(u.BRACE_L,this.parseSelection,u.BRACE_R)})}parseSelection(){return this.peek(u.SPREAD)?this.parseFragment():this.parseField()}parseField(){let e,t,i=this._lexer.token,r=this.parseName();return this.expectOptionalToken(u.COLON)?(e=r,t=this.parseName()):t=r,this.node(i,{kind:l.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(u.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){let t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(u.PAREN_L,t,u.PAREN_R)}parseArgument(e=!1){let t=this._lexer.token,i=this.parseName();return this.expectToken(u.COLON),this.node(t,{kind:l.ARGUMENT,name:i,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let e=this._lexer.token;this.expectToken(u.SPREAD);let t=this.expectOptionalKeyword("on");return!t&&this.peek(u.NAME)?this.node(e,{kind:l.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:l.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token,t=this.parseDescription();return(this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables)?this.node(e,{kind:l.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:l.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){let t=this._lexer.token;switch(t.kind){case u.BRACKET_L:return this.parseList(e);case u.BRACE_L:return this.parseObject(e);case u.INT:return this.advanceLexer(),this.node(t,{kind:l.INT,value:t.value});case u.FLOAT:return this.advanceLexer(),this.node(t,{kind:l.FLOAT,value:t.value});case u.STRING:case u.BLOCK_STRING:return this.parseStringLiteral();case u.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:l.BOOLEAN,value:!0});case"false":return this.node(t,{kind:l.BOOLEAN,value:!1});case"null":return this.node(t,{kind:l.NULL});default:return this.node(t,{kind:l.ENUM,value:t.value})}case u.DOLLAR:if(e){if(this.expectToken(u.DOLLAR),this._lexer.token.kind===u.NAME){let e=this._lexer.token.value;throw ea(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:l.STRING,value:e.value,block:e.kind===u.BLOCK_STRING})}parseList(e){let t=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:l.LIST,values:this.any(u.BRACKET_L,t,u.BRACKET_R)})}parseObject(e){let t=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:l.OBJECT,fields:this.any(u.BRACE_L,t,u.BRACE_R)})}parseObjectField(e){let t=this._lexer.token,i=this.parseName();return this.expectToken(u.COLON),this.node(t,{kind:l.OBJECT_FIELD,name:i,value:this.parseValueLiteral(e)})}parseDirectives(e){let t=[];for(;this.peek(u.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let t=this._lexer.token;return this.expectToken(u.AT),this.node(t,{kind:l.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let e,t=this._lexer.token;if(this.expectOptionalToken(u.BRACKET_L)){let i=this.parseTypeReference();this.expectToken(u.BRACKET_R),e=this.node(t,{kind:l.LIST_TYPE,type:i})}else e=this.parseNamedType();return this.expectOptionalToken(u.BANG)?this.node(t,{kind:l.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this._lexer.token,{kind:l.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(u.STRING)||this.peek(u.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");let i=this.parseConstDirectives(),r=this.many(u.BRACE_L,this.parseOperationTypeDefinition,u.BRACE_R);return this.node(e,{kind:l.SCHEMA_DEFINITION,description:t,directives:i,operationTypes:r})}parseOperationTypeDefinition(){let e=this._lexer.token,t=this.parseOperationType();this.expectToken(u.COLON);let i=this.parseNamedType();return this.node(e,{kind:l.OPERATION_TYPE_DEFINITION,operation:t,type:i})}parseScalarTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");let i=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:l.SCALAR_TYPE_DEFINITION,description:t,name:i,directives:r})}parseObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");let i=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:l.OBJECT_TYPE_DEFINITION,description:t,name:i,interfaces:r,directives:n,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(u.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(u.BRACE_L,this.parseFieldDefinition,u.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,t=this.parseDescription(),i=this.parseName(),r=this.parseArgumentDefs();this.expectToken(u.COLON);let n=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(e,{kind:l.FIELD_DEFINITION,description:t,name:i,arguments:r,type:n,directives:s})}parseArgumentDefs(){return this.optionalMany(u.PAREN_L,this.parseInputValueDef,u.PAREN_R)}parseInputValueDef(){let e,t=this._lexer.token,i=this.parseDescription(),r=this.parseName();this.expectToken(u.COLON);let n=this.parseTypeReference();this.expectOptionalToken(u.EQUALS)&&(e=this.parseConstValueLiteral());let s=this.parseConstDirectives();return this.node(t,{kind:l.INPUT_VALUE_DEFINITION,description:i,name:r,type:n,defaultValue:e,directives:s})}parseInterfaceTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");let i=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:l.INTERFACE_TYPE_DEFINITION,description:t,name:i,interfaces:r,directives:n,fields:s})}parseUnionTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");let i=this.parseName(),r=this.parseConstDirectives(),n=this.parseUnionMemberTypes();return this.node(e,{kind:l.UNION_TYPE_DEFINITION,description:t,name:i,directives:r,types:n})}parseUnionMemberTypes(){return this.expectOptionalToken(u.EQUALS)?this.delimitedMany(u.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");let i=this.parseName(),r=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();return this.node(e,{kind:l.ENUM_TYPE_DEFINITION,description:t,name:i,directives:r,values:n})}parseEnumValuesDefinition(){return this.optionalMany(u.BRACE_L,this.parseEnumValueDefinition,u.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,t=this.parseDescription(),i=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:l.ENUM_VALUE_DEFINITION,description:t,name:i,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw ea(this._lexer.source,this._lexer.token.start,`${ew(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");let i=this.parseName(),r=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();return this.node(e,{kind:l.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:i,directives:r,fields:n})}parseInputFieldsDefinition(){return this.optionalMany(u.BRACE_L,this.parseInputValueDef,u.BRACE_R)}parseTypeSystemExtension(){let e=this._lexer.lookahead();if(e.kind===u.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":if(this._options.experimentalDirectivesOnDirectiveDefinitions)return this.parseDirectiveDefinitionExtension()}throw this.unexpected(e)}parseSchemaExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let t=this.parseConstDirectives(),i=this.optionalMany(u.BRACE_L,this.parseOperationTypeDefinition,u.BRACE_R);if(0===t.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:l.SCHEMA_EXTENSION,directives:t,operationTypes:i})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let t=this.parseName(),i=this.parseConstDirectives();if(0===i.length)throw this.unexpected();return this.node(e,{kind:l.SCALAR_TYPE_EXTENSION,name:t,directives:i})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let t=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),n=this.parseFieldsDefinition();if(0===i.length&&0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:l.OBJECT_TYPE_EXTENSION,name:t,interfaces:i,directives:r,fields:n})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let t=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),n=this.parseFieldsDefinition();if(0===i.length&&0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:l.INTERFACE_TYPE_EXTENSION,name:t,interfaces:i,directives:r,fields:n})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let t=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===i.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:l.UNION_TYPE_EXTENSION,name:t,directives:i,types:r})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let t=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===i.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:l.ENUM_TYPE_EXTENSION,name:t,directives:i,values:r})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let t=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===i.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:l.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:i,fields:r})}parseDirectiveDefinitionExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(u.AT);let t=this.parseName(),i=this.parseConstDirectives();if(0===i.length)throw this.unexpected();return this.node(e,{kind:l.DIRECTIVE_EXTENSION,name:t,directives:i})}parseDirectiveDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(u.AT);let i=this.parseName(),r=this.parseArgumentDefs(),n=this._options.experimentalDirectivesOnDirectiveDefinitions?this.parseConstDirectives():[],s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return t
102his.node(e,{kind:l.DIRECTIVE_DEFINITION,description:t,name:i,arguments:r,directives:n,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(u.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(o,t.value))return t;throw this.unexpected(e)}parseSchemaCoordinate(){let e,t,i=this._lexer.token,r=this.expectOptionalToken(u.AT),n=this.parseName();return(!r&&this.expectOptionalToken(u.DOT)&&(e=this.parseName()),(r||e)&&this.expectOptionalToken(u.PAREN_L)&&(t=this.parseName(),this.expectToken(u.COLON),this.expectToken(u.PAREN_R)),r)?t?this.node(i,{kind:l.DIRECTIVE_ARGUMENT_COORDINATE,name:n,argumentName:t}):this.node(i,{kind:l.DIRECTIVE_COORDINATE,name:n}):e?t?this.node(i,{kind:l.ARGUMENT_COORDINATE,name:n,fieldName:e,argumentName:t}):this.node(i,{kind:l.MEMBER_COORDINATE,name:n,memberName:e}):this.node(i,{kind:l.TYPE_COORDINATE,name:n})}node(e,t){return!0!==this._options.noLocation&&(t.loc=new eo(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){let t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw ea(this._lexer.source,t.start,`Expected ${eR(e)}, found ${ew(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){let t=this._lexer.token;if(t.kind===u.NAME&&t.value===e)this.advanceLexer();else throw ea(this._lexer.source,t.start,`Expected "${e}", found ${ew(t)}.`)}expectOptionalKeyword(e){let t=this._lexer.token;return t.kind===u.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){let t=null!=e?e:this._lexer.token;return ea(this._lexer.source,t.start,`Unexpected ${ew(t)}.`)}any(e,t,i){this.expectToken(e);let r=[];for(;!this.expectOptionalToken(i);)r.push(t.call(this));return r}optionalMany(e,t,i){if(this.expectOptionalToken(e)){let e=[];do e.push(t.call(this));while(!this.expectOptionalToken(i))return e}return[]}many(e,t,i){this.expectToken(e);let r=[];do r.push(t.call(this));while(!this.expectOptionalToken(i))return r}delimitedMany(e,t){this.expectOptionalToken(e);let i=[];do i.push(t.call(this));while(this.expectOptionalToken(e))return i}advanceLexer(){let{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==u.EOF&&(++this._tokenCounter,void 0!==e&&this._tokenCounter>e))throw ea(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function ew(e){let t=e.value;return eR(e.kind)+(null!=t?` "${t}"`:"")}function eR(e){return e===u.BANG||e===u.DOLLAR||e===u.AMP||e===u.PAREN_L||e===u.PAREN_R||e===u.DOT||e===u.SPREAD||e===u.COLON||e===u.EQUALS||e===u.AT||e===u.BRACKET_L||e===u.BRACKET_R||e===u.BRACE_L||e===u.PIPE||e===u.BRACE_R?`"${e}"`:e}let eP=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function eL(e){return ek[e.charCodeAt(0)]}let ek=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],eF=Object.freeze({}),ej={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>eM(e.definitions,"\n\n")},OperationDefinition:{leave(e){let t=eV(e.variableDefinitions)?eU("(\n",eM(e.variableDefinitions,"\n"),"\n)"):eU("(",eM(e.variableDefinitions,", "),")"),i=eU("",e.description,"\n")+eM([e.operation,eM([e.name,t]),eM(e.directives," ")]," ");return("query"===i?"":i+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:i,directives:r,description:n})=>eU("",n,"\n")+e+": "+t+eU(" = ",i)+eU(" ",eM(r," "))},SelectionSet:{leave:({selections:e})=>eB(e)},Field:{leave({alias:e,name:t,arguments:i,directives:r,selectionSet:n}){let s=eU("",e,": ")+t,a=s+eU("(",eM(i,", "),")");return a.length>80&&(a=s+eU("(\n",e$(eM(i,"\n")),"\n)")),eM([a,eM(r," "),n]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+eU(" ",eM(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:i})=>eM(["...",eU("on ",e),eM(t," "),i]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:i,directives:r,selectionSet:n,description:s})=>eU("",s,"\n")+`fragment ${e}${eU("(",eM(i,", "),")")} `+`on ${t} ${eU("",eM(r," ")," ")}`+n},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e}
102,StringValue:{leave:({value:e,block:t})=>{let i,r,n,s,a,o,l,u,c,h,p;return t?(n=1===(r=(i=e.replace(/"""/g,'\\"""')).split(/\r\n|[\n\r]/g)).length,s=r.length>1&&r.slice(1).every(e=>0===e.length||ep(e.charCodeAt(0))),a=i.endsWith('\\"""'),o=e.endsWith('"')&&!a,l=e.endsWith("\\"),u=o||l,c=!n||e.length>70||u||s||a,h="",p=n&&ep(e.charCodeAt(0)),(c&&!p||s)&&(h+="\n"),h+=i,(c||u)&&(h+="\n"),'"""'+h+'"""'):`"${e.replace(eP,eL)}"`}},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+eM(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+eM(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+eU("(",eM(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:i})=>eU("",e,"\n")+eM(["schema",eM(t," "),eB(i)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:i})=>eU("",e,"\n")+eM(["scalar",t,eM(i," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:i,directives:r,fields:n})=>eU("",e,"\n")+eM(["type",t,eU("implements ",eM(i," & ")),eM(r," "),eB(n)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:i,type:r,directives:n})=>eU("",e,"\n")+t+(eV(i)?eU("(\n",e$(eM(i,"\n")),"\n)"):eU("(",eM(i,", "),")"))+": "+r+eU(" ",eM(n," "))},InputValueDefinition:{leave:({description:e,name:t,type:i,defaultValue:r,directives:n})=>eU("",e,"\n")+eM([t+": "+i,eU("= ",r),eM(n," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:i,directives:r,fields:n})=>eU("",e,"\n")+eM(["interface",t,eU("implements ",eM(i," & ")),eM(r," "),eB(n)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:i,types:r})=>eU("",e,"\n")+eM(["union",t,eM(i," "),eU("= ",eM(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:i,values:r})=>eU("",e,"\n")+eM(["enum",t,eM(i," "),eB(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:i})=>eU("",e,"\n")+eM([t,eM(i," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:i,fields:r})=>eU("",e,"\n")+eM(["input",t,eM(i," "),eB(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:i,directives:r,repeatable:n,locations:s})=>eU("",e,"\n")+"directive @"+t+(eV(i)?eU("(\n",e$(eM(i,"\n")),"\n)"):eU("(",eM(i,", "),")"))+eU(" ",eM(r," "))+(n?" repeatable":"")+" on "+eM(s," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>eM(["extend schema",eM(e," "),eB(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>eM(["extend scalar",e,eM(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:i,fields:r})=>eM(["extend type",e,eU("implements ",eM(t," & ")),eM(i," "),eB(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:i,fields:r})=>eM(["extend interface",e,eU("implements ",eM(t," & ")),eM(i," "),eB(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:i})=>eM(["extend union",e,eM(t," "),eU("= ",eM(i," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:i})=>eM(["extend enum",e,eM(t," "),eB(i)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:i})=>eM(["extend input",e,eM(t," "),eB(i)]," ")},DirectiveExtension:{leave:({name:e,directives:t})=>eM(["extend directive @"+e,eM(t," ")]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>eM([e,eU(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:i})=>eM([e,eU(".",t),eU("(",i,":)")])},DirectiveCoordinate:{leave:({name:e})=>eM(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>eM(["@",e,eU("(",t,":)")])}};function eM(e,t=""){var i;return null!=(i=null==e?void 0:e.filter(e=>e).join(t))?i:""}function eB(e){return eU("{\n",e$(eM(e,"\n")),"\n}")}function eU(e,t,i=""){return null!=t&&""!==t?e+t+i:""}function e$(e){return eU("  ",e.replace(/\n/g,"\n  "))}function eV(e){var t;return null!=(t=null==e?void 0:e.some(e=>e.includes("\n")))&&t}let eq=e=>{let t,i=e.definitions.filter(e=>"OperationDefinition"===e.kind);return 1===i.length&&(t=i[0]?.name?.value),t},eG=e=>{if("string"==typeof e){let t;try{let i,r,n=(r=(i=new e_(e,void 0)).parseDocument(),Object.defineProperty(r,"tokenCount",{enumerable:!1,value:i.tokenCount}),r);t=eq(n)}catch(e){}return{query:e,operationName:t}}let t=eq(e);return{query:function(e,t,i=eu){let r,n,s,a=new Map;for(let e of Object.values(l))a.set(e,function(e,t){let i=e[t];return"object"==typeof i?i:"function"==typeof i?{enter:i,leave:void 0}:{enter:e.enter,leave:e.leave}}(t,e));let o=Array.isArray(e),u=[e],c=-1,h=[],p=e,d=[],f=[];do{var y,g,m;let e,l=++c===u.length,v=l&&0!==h.length;if(l){if(n=0===f.length?void 0:d[d.length-1],p=s,s=f.pop(),v)if(o){p=p.slice();let e=0;for(let[t,i]of h){let r=t-e;null===i?(p.splice(r,1),e++):p[r]=i}}else for(let[e,t]of(p={...p},h))p[e]=t;c=r.index,u=r.keys,h=r.edits,o=r.inArray,r=r.prev}else if(s){if(null==(p=s[n=o?c:u[c]]))continue;d.push(n)}if(!Array.isArray(p)){eh(p)||ex(!1,`Invalid AST Node: ${eA(p,[])}.`);let i=l?null==(y=a.get(p.kind))?void 0:y.leave:null==(g=a.get(p.kind))?void 0:g.enter;if((e=null==i?void 0:i.call(t,p,n,s,d,f))===eF)break;if(!1===e){if(!l){d.pop();continue}}else if(void 0!==e&&(h.push([n,e]),!l))if(eh(e))p=e;else{d.pop();continue}}void 0===e&&v&&h.push([n,p]),l?d.pop():(r={inArray:o,index:c,keys:u,edits:h,prev:r},u=(o=Array.isArray(p))?p:null!=(m=i[p.kind])?m:[],c=-1,h=[],s&&f.push(s),s=p)}while(void 0!==r)return 0!==h.length?h[h.length-1][1]:e}(e,ej),operationName:t}};
102class eQ extends Error{constructor(e,t){super(`${eQ.extractMessage(e)}: ${JSON.stringify({response:e,request:t})}`),Object.setPrototypeOf(this,eQ.prototype),this.response=e,this.request=t,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,eQ)}static extractMessage(e){return e.errors?.[0]?.message??`GraphQL Error (Code: ${e.status})`}}var ez=e.i(130668);let eK=e=>{let t={};if(e)if("u">typeof Headers&&e instanceof Headers||ez&&ez.Headers&&e instanceof ez.Headers){let i;i={},e.forEach((e,t)=>{i[t]=e}),t=i}else Array.isArray(e)?e.forEach(([e,i])=>{e&&void 0!==i&&(t[e]=i)}):t=e;return t},eY=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim();class eH{constructor(e,t={}){this.url=e,this.requestConfig=t,this.rawRequest=async(...e)=>{let[t,i,r]=e,n=t.query?t:{query:t,variables:i,requestHeaders:r,signal:void 0},{headers:s,fetch:a=ez.default,method:o="POST",requestMiddleware:l,responseMiddleware:u,...c}=this.requestConfig,{url:h}=this;void 0!==n.signal&&(c.signal=n.signal);let{operationName:p}=eG(n.query);return eJ({url:h,query:n.query,variables:n.variables,headers:{...eK(eZ(s)),...eK(n.requestHeaders)},operationName:p,fetch:a,method:o,fetchOptions:c,middleware:l}).then(e=>(u&&u(e),e)).catch(e=>{throw u&&u(e),e})}}async request(e,...t){let[i,r]=t,n=e.document?e:{document:e,variables:i,requestHeaders:r,signal:void 0},{headers:s,fetch:a=ez.default,method:o="POST",requestMiddleware:l,responseMiddleware:u,...c}=this.requestConfig,{url:h}=this;void 0!==n.signal&&(c.signal=n.signal);let{query:p,operationName:d}=eG(n.document);return eJ({url:h,query:p,variables:n.variables,headers:{...eK(eZ(s)),...eK(n.requestHeaders)},operationName:d,fetch:a,method:o,fetchOptions:c,middleware:l}).then(e=>(u&&u(e),e.data)).catch(e=>{throw u&&u(e),e})}batchRequests(e,t){let i=e.documents?e:{documents:e,requestHeaders:t,signal:void 0},{headers:r,...n}=this.requestConfig;void 0!==i.signal&&(n.signal=i.signal);let s=i.documents.map(({document:e})=>eG(e).query),a=i.documents.map(({variables:e})=>e);return eJ({url:this.url,query:s,variables:a,headers:{...eK(eZ(r)),...eK(i.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??ez.default,method:this.requestConfig.method||"POST",fetchOptions:n,middleware:this.requestConfig.requestMiddleware}).then(e=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(e),e.data)).catch(e=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(e),e})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,t){let{headers:i}=this.requestConfig;return i?i[e]=t:this.requestConfig.headers={[e]:t},this}setEndpoint(e){return this.url=e,this}}let eJ=async e=>{let t,{query:i,variables:r,fetchOptions:n}=e,s=(t=(e.method??"post").toUpperCase(),async e=>{let i,{url:r,query:n,variables:s,operationName:a,fetch:o,fetchOptions:l,middleware:u}=e,c={...e.headers},h="";"POST"===t?"string"==typeof(i=eX(n,s,a,l.jsonSerializer))&&(c["Content-Type"]="application/json"):h=(e=>{if(!Array.isArray(e.query)){let t=[`query=${encodeURIComponent(eY(e.query))}`];return e.variables&&t.push(`variables=${encodeURIComponent(e.jsonSerializer.stringify(e.variables))}`),e.operationName&&t.push(`operationName=${encodeURIComponent(e.operationName)}`),t.join("&")}if(void 0!==e.variables&&!Array.isArray(e.variables))throw Error("Cannot create query with given variable type, array expected");let t=e.query.reduce((t,i,r)=>(t.push({query:eY(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[r]):void 0}),t),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(t))}`})({query:n,variables:s,operationName:a,jsonSerializer:l.jsonSerializer??Z});let p={method:t,headers:c,body:i,...l},d=r,f=p;if(u){let{url:e,...t}=await Promise.resolve(u({...p,url:r,operationName:a,variables:s}));d=e,f=t}return h&&(d=`${d}?${h}`),await o(d,f)}),a=Array.isArray(e.query),o=await s(e),l=await eW(o,n.jsonSerializer??Z),u=Array.isArray(l)?!l.some(({data:e})=>!e):!!l.data,c=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||"all"===n.errorPolicy||"ignore"===n.errorPolicy;if(o.ok&&c&&u){let{errors:e,...t}=(Array.isArray(l),l),i="ignore"===n.errorPolicy?t:l;return{...a?{data:i}:i,headers:o.headers,status:o.status}}throw new eQ({..."string"==typeof l?{error:l}:l,status:o.status,headers:o.headers},{query:i,variables:r})},eX=(e,t,i,r)=>{let n=r??Z;if(!Array.isArray(e))return n.stringify({query:e,variables:t,operationName:i});if(void 0!==t&&!Array.isArray(t))throw Error("Cannot create request body with given variable type, array expected");let s=e.reduce((e,i,r)=>(e.push({query:i,variables:t?t[r]:void 0}),e),[]);return n.stringify(s)},eW=async(e,t)=>{let i;
102return(e.headers.forEach((e,t)=>{"content-type"===t.toLowerCase()&&(i=e)}),i&&(i.toLowerCase().startsWith("application/json")||i.toLowerCase().startsWith("application/graphql+json")||i.toLowerCase().startsWith("application/graphql-response+json")))?t.parse(await e.text()):e.text()},eZ=e=>"function"==typeof e?e():e;var e0=e.i(967658),e1=e.i(907746),e2=e.i(786589),e3=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)0>t.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(i[r[n]]=e[r[n]]);return i};class e9{constructor(e,t={}){var i;this.endpoint=e,this.headers={},t.apiKey&&(this.headers.sc_apikey=t.apiKey),t.headers&&(this.headers=Object.assign(Object.assign({},this.headers),t.headers)),t.contextId&&(this.headers["x-sitecore-contextid"]=t.contextId);let r=!1;try{r=!!new URL(e).hostname}catch(e){}if(!e||!r)throw Error(`Invalid GraphQL endpoint '${e}'. Verify that appropriate environment variable is set`);this.timeout=t.timeout,this.retries=null!=(i=t.retries)?i:3,this.retryStrategy=t.retryStrategy||new e2.DefaultRetryStrategy({statusCodes:[429,502,503,504,520,521,522,523,524]}),this.client=new eH(e,{headers:this.headers,fetch:t.fetch}),this.debug=t.debugger||e0.default.http}static createClientFactory(e){var{endpoint:t}=e,i=e3(e,["endpoint"]);return (e={})=>new e9(t,Object.assign(Object.assign({},i),e))}async request(e,t,i){let r=1,n=async()=>{let s=(null==i?void 0:i.retries)||this.retries,a=(null==i?void 0:i.retryStrategy)||this.retryStrategy,o=(null==i?void 0:i.debugger)||this.debug;o("request: %o",{url:this.endpoint,headers:Object.assign(Object.assign({},this.headers),null==i?void 0:i.headers),query:e,variables:t,timeout:this.timeout});let l=Object.assign(Object.assign({},this.headers),null==i?void 0:i.headers),u=performance.now(),c=[this.client.request(e,t,l)];return this.timeout&&(this.abortTimeout=new e1.default(this.timeout),c.push(this.abortTimeout.start)),Promise.race(c).then(e=>{var t;return null==(t=this.abortTimeout)||t.clear(),this.debug("response in %dms: %o",performance.now()-u,e),Promise.resolve(e)},async e=>{var t,i;null==(t=this.abortTimeout)||t.clear(),o("response error: %o",e.response||e.message||e);let l=(null==(i=e.response)?void 0:i.status)||e.code;if(!a.shouldRetry(e,r,s))return Promise.reject(e);{let t=a.getDelay(e,r);return o("Error: %s. Retrying in %dms (attempt %d).",l,t,r),r++,new Promise(e=>setTimeout(e,t)).then(n)}})};return n()}}var e4=d;let e5=(e=e4.constants.SITECORE_EDGE_PLATFORM_URL_DEFAULT)=>`${((e=e4.constants.SITECORE_EDGE_PLATFORM_URL_DEFAULT)=>(0,N.normalizeUrl)(e))(e)}/v1/content/api/graphql/v1`,{ERROR_MESSAGES:e6}=d.constants,e8=`
103  query RobotsQuery($siteName: String!) {
104    site {
105      siteInfo(site: $siteName) {
106        robots
107      }
108    }
109  }
110`;class e7{constructor(e){this.options=e,this.graphQLClient=this.getGraphQLClient()}get query(){return e8}async fetchRobots(e){let t=this.options.siteName;if(!t)throw Error(e6.MV_002);let i=this.graphQLClient.request(this.query,{siteName:t},e);try{return i.then(e=>{var t,i;return null==(i=null==(t=null==e?void 0:e.site)?void 0:t.siteInfo)?void 0:i.robots})}catch(e){return Promise.reject(e)}}getGraphQLClient(){if(!this.options.clientFactory)throw Error("clientFactory needs to be provided when initializing GraphQL client.");return this.options.clientFactory({debugger:v.default.robots})}}var te=e.i(249610),tt=e.i(911231),ti=e.i(275327);let{ERROR_MESSAGES:tr}=d.constants;(s=c||(c={})).NotFound="404",s.InternalServerError="500";class tn{constructor(e){var t,i,r,n,s,a,o,l,u,c;this.initOptions=e,this.clientFactory=this.getClientFactory(),this.graphQLClient=this.clientFactory({debugger:p.debug.http});const h=this.getBaseServiceOptions();this.layoutService=null!=(i=null==(t=e.custom)?void 0:t.layoutService)?i:this.getLayoutService(h),this.dictionaryService=null!=(n=null==(r=e.custom)?void 0:r.dictionaryService)?n:this.getDictionaryService(h),this.editingService=null!=(a=null==(s=e.custom)?void 0:s.editingService)?a:this.getEditingService(),this.errorPagesService=null!=(l=null==(o=e.custom)?void 0:o.errorPagesService)?l:this.getErrorPagesService(),this.sitePathService=null!=(c=null==(u=e.custom)?void 0:u.sitePathService)?c:this.getSitePathService(),this.componentService=this.getComponentService()}parsePath(e){return"string"==typeof e?e.startsWith("/")?e:`/${e}`:`/${e.filter(e=>"/"!==e).map(e=>e.replace(/^\/+/,"").replace(/\/+$/,"")).join("/")}`}getData(e,t,i){return this.graphQLClient.request(e,t,i)}async getPage(e,t,i){var r,n,s,a;let o=this.parsePath(e),l=null!=(r=null==t?void 0:t.locale)?r:this.initOptions.defaultLanguage,u=null!=(n=null==t?void 0:t.site)?n:this.initOptions.defaultSite,c=await this.layoutService.fetchLayoutData(o,{locale:l,site:u},i);return c.sitecore.route?((null==(s=null==t?void 0:t.personalize)?void 0:s.variantId)&&function(e,t,i){var r;e.sitecore.context.variantId=t;let n=(null==(r=e.sitecore.route)?void 0:r.placeholders)||{};if(0===Object.keys(n).length)return;let s=e.sitecore.context.pageEditing;
110Object.keys(n).forEach(e=>{n[e]=function e(t,i,r){return t.map(t=>{if(void 0!==t.experiences){var n=t,s=i,a=r;let o=Object.keys(n.experiences).find(e=>s.includes(e)),l=o&&n.experiences[o];if(l||n.componentName)if(l&&null===l.componentName&&null===l.dataSource)if(!a)return null;else n=U(n);else l&&(n=l);else{if(!a)return null;n=U(n)}return n.experiences&&(n.experiences={}),n.placeholders&&Object.keys(null==n?void 0:n.placeholders).forEach(t=>{n.placeholders&&(n.placeholders[t]=e(n.placeholders[t],s,a))}),n}if(t.placeholders){let n=t.placeholders;Object.keys(n).forEach(t=>{n[t]=e(n[t],i,r)})}return t}).filter(Boolean)}(n[e],[t,...i||[]],s)})}(c,t.personalize.variantId,t.personalize.componentVariantIds),{layout:c=this.applyContentRewrite(c),siteName:(null==(a=c.sitecore.context.site)?void 0:a.name)||u,locale:l,mode:this.getPageMode(P.LayoutServicePageState.Normal)}):null}getHeadLinks(e,t={}){let{enableStyles:i=!0,enableThemes:r=!0}=t,{contextId:n,clientContextId:s}=this.initOptions.api.edge,a=[],o=n||s,l=(0,f.resolveEdgeUrlForStaticFiles)();if(i){let t=((e,t,i=A.constants.SITECORE_EDGE_PLATFORM_URL_DEFAULT)=>{if(!e.sitecore.route)return null;let r={loadStyles:!1};return(_(e.sitecore.route,r),r.loadStyles)?{href:((e,t=A.constants.SITECORE_EDGE_PLATFORM_URL_DEFAULT)=>`${(0,N.normalizeUrl)(t)}/v1/files/pages/styles/content-styles.css?sitecoreContextId=${e}`)(t,i),rel:"stylesheet"}:null})(e,o,l);t&&a.push(t)}return r&&a.push(...function(e,t,i=O.constants.SITECORE_EDGE_PLATFORM_URL_DEFAULT){let r=new Set;return e.sitecore.route?(x(e.sitecore.route,r),[...r].map(e=>({href:((e,t,i=O.constants.SITECORE_EDGE_PLATFORM_URL_DEFAULT)=>`${(0,N.normalizeUrl)(i)}/v1/files/components/styles/${e}.css?sitecoreContextId=${t}`)(e,t,i),rel:"stylesheet"}))):[]}(e,o,l)),a}async getDictionary(e,t){let i=(null==e?void 0:e.locale)||this.initOptions.defaultLanguage,r=(null==e?void 0:e.site)||this.initOptions.defaultSite;return await this.dictionaryService.fetchDictionaryData(i,r,t)}async getErrorPages(e,t){let i=(null==e?void 0:e.locale)||this.initOptions.defaultLanguage,r=(null==e?void 0:e.site)||this.initOptions.defaultSite;return await this.errorPagesService.fetchErrorPages(r,i,t)}async getPreview(e,t){var i;if(!e)return console.error("Preview data missing"),null;let{site:r,itemId:n,language:s,version:a,layoutKind:o,mode:l,variantId:u,previewTime:c}=e,h=await this.editingService.fetchEditingData({itemId:n,language:s,version:a,layoutKind:o,mode:l,site:r,variantId:u,previewTime:c},t);if(!h)throw Error(`Unable to fetch editing data for preview ${JSON.stringify(e)}. ${tr.CONTACT_SUPPORT}`);if(!h.layoutData.sitecore.route)return null;let p=h.layoutData;return{locale:s,layout:p=this.applyContentRewrite(p),siteName:(null==(i=p.sitecore.context.site)?void 0:i.name)||r,mode:this.getPageMode(l)}}async getDesignLibraryData(e,t){var i;let{itemId:r,componentUid:n,site:s,language:a,renderingId:o,dataSourceId:l,version:u,mode:c,generation:h}=e,p=await this.componentService.fetchComponentData(Object.assign({siteName:s,itemId:r,language:a,componentUid:n,renderingId:o,dataSourceId:l,version:u,mode:c},h?{generation:h}:{}),t);if(!p)throw Error(`Unable to fetch editing data for preview ${JSON.stringify(e)}. ${tr.CONTACT_SUPPORT}`);let d=this.applyContentRewrite(p);return{locale:e.language,layout:d,siteName:(null==(i=d.sitecore.context.site)?void 0:i.name)||s,mode:this.getPageMode(c,h)}}async getErrorPage(e,t,i){var r,n;let s=(null==t?void 0:t.locale)||this.initOptions.defaultLanguage,a=(null==t?void 0:t.site)||this.initOptions.defaultSite,o=await this.getErrorPages({site:a,locale:s},i),l=null;switch(e){case c.NotFound:l=(null==(r=null==o?void 0:o.notFoundPage)?void 0:r.rendered)||null;break;case c.InternalServerError:l=(null==(n=null==o?void 0:o.serverErrorPage)?void 0:n.rendered)||null;break;default:return null}return l?{layout:l=this.applyContentRewrite(l),locale:s,mode:this.getPageMode(P.LayoutServicePageState.Normal),siteName:a}:null}async getPagePaths(e,t,i){return this.sitePathService.fetchSiteRoutes(e,t||[],i)}async getSiteMap(e,t){let{reqHost:i,reqProtocol:r,id:n,siteName:s}=e,a=this.getGraphqlSitemapXMLService(s||this.initOptions.defaultSite),o=await a.getSitemap(n);if(o)try{let e=(0,f.resolveExperienceEdgeUrl)(),t=M(o,e),i=new h.NativeDataFetcher,r=await i.fetch(t);if(!r.data)throw Error("REDIRECT_404");return M(r.data,e)}catch(e){throw Error("REDIRECT_404")}let l=await a.fetchSitemaps(t);
110if(!l.length)throw Error("REDIRECT_404");return`<?xml version="1.0" encoding="UTF-8"?>
111      <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
112      ${l.map(e=>{let t=e.split("/"),n=t[t.length-1],s=`${r}://${i}/${n}`.replace(/&/g,"&amp;");return`<sitemap><loc>${s}</loc></sitemap>`}).join("")}
113      </sitemapindex>`}async getRobots(e,t){let i=this.getRobotsService(e||this.initOptions.defaultSite);return await i.fetchRobots(t)||null}getGraphqlSitemapXMLService(e){return new W({clientFactory:this.clientFactory,siteName:e})}getRobotsService(e){return new e7({clientFactory:this.clientFactory,siteName:e})}getBaseServiceOptions(){return{defaultSite:this.initOptions.defaultSite,clientFactory:this.clientFactory,retries:this.initOptions.retries}}applyContentRewrite(e){let t,i=this.initOptions.rewriteMediaUrls;if(!i)return e;let r=(0,f.resolveExperienceEdgeUrl)();return function e(t,i){if(null==t)return t;if("string"==typeof t)return i(t);if(Array.isArray(t))return t.map(t=>e(t,i));if("object"==typeof t&&Object.getPrototypeOf(t)===Object.prototype){let r={};for(let n of Object.keys(t))r[n]=e(t[n],i);return r}return t}(e,!0===i?F(t=(0,N.normalizeUrl)(r))?e=>B(e,t):e=>e:i)}getPageMode(e,t){let i={name:e,isNormal:!1,isPreview:!1,isEditing:!1,isDesignLibrary:!1,designLibrary:{isVariantGeneration:!1}};switch(e){case P.LayoutServicePageState.Normal:i.isNormal=!0;break;case P.LayoutServicePageState.Preview:i.isPreview=!0;break;case P.LayoutServicePageState.Edit:i.isEditing=!0;break;case te.DesignLibraryMode.Normal:i.isDesignLibrary=!0;break;case te.DesignLibraryMode.Metadata:i.isDesignLibrary=!0,i.isEditing=!0}return i.isDesignLibrary&&t===te.DesignLibraryVariantGeneration.Variant&&(i.designLibrary.isVariantGeneration=!0,i.isEditing=!0),i}getClientFactory(){return(e=>{let t,{api:i}=e,{edge:r,local:n}=null!=i?i:{},s="u">typeof window;if(null==r?void 0:r.contextId)t={endpoint:e5(r.edgeUrl),contextId:r.contextId};else if(s&&(null==r?void 0:r.clientContextId))t={endpoint:e5(r.edgeUrl),contextId:r.clientContextId};else if((null==n?void 0:n.apiKey)&&(null==n?void 0:n.apiHost))t={endpoint:`${n.apiHost}${n.path}`,apiKey:n.apiKey};else if(s)console.warn("GraphQL client initialised in the browser without Edge or local API configuration; client-side requests may fail."),t={endpoint:"/api/graphql"};else throw Error(`GraphQL client misconfigured.
114      Configure one of the following in sitecore.config or your .env file:
115      Edge mode: set both sitecore.edge.contextId (server-side) and sitecore.edge.clientContextId (browser).
116      Local API mode: set api.local.apiHost and api.local.apiKey.
117      Supplying only api.edge.clientContextId will cause the application to fail at runtime.`);return e9.createClientFactory(Object.assign(Object.assign({},t),e))})({api:this.initOptions.api,retries:this.initOptions.retries.count,retryStrategy:this.initOptions.retries.retryStrategy})}getLayoutService(e){return new R(Object.assign(Object.assign({},e),{formatLayoutQuery:this.initOptions.layout.formatLayoutQuery}))}getDictionaryService(e){return new T(Object.assign(Object.assign({},e),{cacheEnabled:this.initOptions.dictionary.caching.enabled,cacheTimeout:this.initOptions.dictionary.caching.timeout}))}getEditingService(){return new tt.EditingService({clientFactory:this.clientFactory})}getErrorPagesService(){return new q(Object.assign(Object.assign({},this.initOptions),{language:this.initOptions.defaultLanguage,clientFactory:this.clientFactory}))}getComponentService(){return new ti.ComponentLayoutService(this.initOptions.api.edge)}getSitePathService(){return new Y({clientFactory:this.clientFactory})}}let ts=(e=0)=>t=>`\u001B[${t+e}m`,ta=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,to=(e=0)=>(t,i,r)=>`\u001B[${38+e};2;${t};${i};${r}m`,tl={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(tl.modifier),[...Object.keys(tl.color),...Object.keys(tl.bgColor)];let tu=function(){let e=new Map;for(let[t,i]of Object.entries(tl)){for(let[t,r]of Object.entries(i))tl[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},i[t]=tl[t],e.set(r[0],r[1]);Object.defineProperty(tl,t,{value:i,enumerable:!1})}return Object.defineProperty(tl,"codes",{value:e,enumerable:!1}),tl.color.close="\x1b[39m",tl.bgColor.close="\x1b[49m",tl.color.ansi=ts(),tl.color.ansi256=ta(),tl.color.ansi16m=to(),tl.bgColor.ansi=ts(10),tl.bgColor.ansi256=ta(10),tl.bgColor.ansi16m=to(10),Object.defineProperties(tl,{rgbToAnsi256:{value:(e,t,i)=>e===t&&t===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(i/255*5),enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[i]=t;3===i.length&&(i=[...i].map(e=>e+e).join(""));let r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,255&r]},enumerable:!1},hexToAnsi256:{value:e=>tl.rgbToAnsi256(...tl.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){let t,i,r;if(e<8)return 30+e;if(e<16)return 90+(e-8);if(e>=232)i=t=((e-232)*10+8)/255,r=t;else{let n=(e-=16)%36;t=Math.floor(e/36)/5,i=Math.floor(n/6)/5,r=n%6/5}let n=2*Math.max(t,i,r);if(0===n)return 30;let s=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(t));return 2===n&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,t,i)=>tl.ansi256ToAnsi(tl.rgbToAnsi256(e,t,i)),enumerable:!1},hexToAnsi:{value:e=>tl.ansi256ToAnsi(tl.hexToAnsi256(e)),enumerable:!1}}),tl}(),tc=(()=>
117{if(!("navigator"in globalThis))return 0;if(globalThis.navigator.userAgentData){let e=navigator.userAgentData.brands.find(({brand:e})=>"Chromium"===e);if(e&&e.version>93)return 3}return+!!/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)})(),th=0!==tc&&{level:tc,hasBasic:!0,has256:tc>=2,has16m:tc>=3},{stdout:tp,stderr:td}={stdout:th,stderr:th},tf=Symbol("GENERATOR"),ty=Symbol("STYLER"),tg=Symbol("IS_EMPTY"),tm=["ansi","ansi","ansi256","ansi16m"],tv=Object.create(null);function tE(e){let t;return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let i=tp?tp.level:0;e.level=void 0===t.level?i:t.level})(t=(...e)=>e.join(" "),e),Object.setPrototypeOf(t,tE.prototype),t}for(let[e,t]of(Object.setPrototypeOf(tE.prototype,Function.prototype),Object.entries(tu)))tv[e]={get(){let i=tN(this,tO(t.open,t.close,this[ty]),this[tg]);return Object.defineProperty(this,e,{value:i}),i}};tv.visible={get(){let e=tN(this,this[ty],!0);return Object.defineProperty(this,"visible",{value:e}),e}};let tb=(e,t,i,...r)=>"rgb"===e?"ansi16m"===t?tu[i].ansi16m(...r):"ansi256"===t?tu[i].ansi256(tu.rgbToAnsi256(...r)):tu[i].ansi(tu.rgbToAnsi(...r)):"hex"===e?tb("rgb",t,i,...tu.hexToRgb(...r)):tu[i][e](...r);for(let e of["rgb","hex","ansi256"])tv[e]={get(){let{level:t}=this;return function(...i){return tN(this,tO(tb(e,tm[t],"color",...i),tu.color.close,this[ty]),this[tg])}}},tv["bg"+e[0].toUpperCase()+e.slice(1)]={get(){let{level:t}=this;return function(...i){return tN(this,tO(tb(e,tm[t],"bgColor",...i),tu.bgColor.close,this[ty]),this[tg])}}};let tT=Object.defineProperties(()=>{},{...tv,level:{enumerable:!0,get(){return this[tf].level},set(e){this[tf].level=e}}}),tO=(e,t,i)=>{let r,n;return void 0===i?(r=e,n=t):(r=i.openAll+e,n=t+i.closeAll),{open:e,close:t,openAll:r,closeAll:n,parent:i}},tN=(e,t,i)=>{let r=(...e)=>tI(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,tT),r[tf]=e,r[ty]=t,r[tg]=i,r},tI=(e,t)=>{if(e.level<=0||!t)return e[tg]?"":t;let i=e[ty];if(void 0===i)return t;let{openAll:r,closeAll:n}=i;if(t.includes("\x1b"))for(;void 0!==i;)t=function(e,t,i){let r=e.indexOf(t);if(-1===r)return e;let n=t.length,s=0,a="";do a+=e.slice(s,r)+t+i,s=r+n,r=e.indexOf(t,s);while(-1!==r)return a+e.slice(s)}(t,i.close,i.open),i=i.parent;let s=t.indexOf("\n");return -1!==s&&(t=function(e,t,i,r){let n=0,s="";do{let a="\r"===e[r-1];s+=e.slice(n,a?r-1:r)+t+(a?"\r\n":"\n")+i,n=r+1,r=e.indexOf("\n",n)}while(-1!==r)return s+e.slice(n)}(t,n,r,s)),r+t+n};Object.defineProperties(tE.prototype,tv);let tS=tE();tE({level:td?td.level:0});class tx{async fetchComponentProps(e){var t;let{layoutData:i,context:r,components:n}=e,s=await this.collectRequests({placeholders:null==(t=i.sitecore.route)?void 0:t.placeholders,components:n,layoutData:i,context:r});return await this.execRequests(s)}async collectRequests(e){let{placeholders:t={},components:i,layoutData:r,context:n}=e;e.requests||(e.requests=[]);let s=this.flatRenderings(t).map(async t=>{var s;let a=null==(s=await this.getModule(i,t.componentName))?void 0:s.getComponentServerProps;a&&e.requests&&e.requests.push({fetch:a,rendering:t,layoutData:r,context:n}),t.placeholders&&await this.collectRequests(Object.assign(Object.assign({},e),{placeholders:t.placeholders}))});return await Promise.all(s),e.requests}async execRequests(e){let t={},i=e.map(e=>{let{uid:i}=e.rendering;return i?e.fetch(e.rendering,e.layoutData,e.context).then(e=>{t[i]=e}).catch(r=>{let n=`Error during preload data for component ${e.rendering.componentName} (${i}): ${r.message||r}`;console.error(tS.red(n)),t[i]={error:r.message||n,componentName:e.rendering.componentName}}):void console.log(`Component ${e.rendering.componentName} doesn't have uid, can't store data for this component`)});return await Promise.all(i),t}flatRenderings(e){let t=[];return Object.values(e).forEach(e=>{t.push(...e)}),t}async getModule(e,t){var i;let r=e.get(t);return r?r.dynamicModule?await (null==(i=null==r?void 0:r.dynamicModule)?void 0:i.call(r)):r:null}}var tA=e.i(172346);let tD=new class extends tn{constructor(e){super(e),this.initOptions=e,this.componentPropsService=this.getComponentPropsService()}getSiteNameFromPath(e){var t;let i,r;return(t=super.parsePath(e),i={siteName:this.initOptions.defaultSite},(r=(t.endsWith("/")?t:t+"/").match(`${Q}(.*?)\\/`))&&""!==r[1]&&(i.siteName=r[1]),i).siteName}parsePath(e){let t=super.parsePath(e);return z((0,G.normalizePersonalizedRewrite)(t))}async getPage(e,t,i){let r=this.parsePath(e),n=t.personalize||(0,G.getPersonalizedRewriteData)(super.parsePath(e)),s=t.site||this.get
117SiteNameFromPath(e);return await super.getPage(r,{locale:t.locale,site:s,personalize:n},i)}async getDesignLibraryData(e,t){return super.getDesignLibraryData(e,t)}async getPreview(e,t){return super.getPreview(e,t)}async getAppRouterStaticParams(e,t,i){let r=await super.getPagePaths(e,t,i),n=[];return r.map(e=>{var t;let i=z(e.params.path.join("/")).split("/");n.push({locale:null!=(t=e.locale)?t:this.initOptions.defaultLanguage,site:this.getSiteNameFromPath(e.params.path),path:i})}),n}async getPagePaths(e,t,i){var r;let n=await super.getPagePaths(e,t,i);return(null==(r=this.initOptions.multisite)?void 0:r.enabled)||n.map(e=>{e.params.path=z(e.params.path.join("/")).split("/")}),n}async getComponentData(e,t,i){let r={};if(!e.sitecore.route)return r;let n=Object.keys(r=await this.componentPropsService.fetchComponentProps({layoutData:e,context:t,components:i})).map(e=>{let t=r[e];return t.error?`
118Unable to get component props for ${t.componentName} (${e}): ${t.error}`:""}).join("");if(n.length)throw Error(n);return r}getPreviewData(e){var t;let i=null!=(t=e.get("x-sitecore-editing-params"))?t:"";if(!i)return{};try{return JSON.parse(i)}catch(e){return{}}}getComponentPropsService(){return new tx}}({...tA.default});e.s(["default",0,tD],231094)}]);
119
120//# sourceMappingURL=0evh9khb6fe8f.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.