1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2483],{12483:(e,t,a)=>{let i;a.d(t,{U:()=>Y});let s=e=>Array.isArray(e)?e:[e],r=(e={},t)=>({...e,filters:[...e.filters||[],...s(t)]}),n="7.20.1",o=e=>`https://prismic.dev/msg/client/v${n}/${e}`,l=e=>Array.isArray(e)?`[${e.map(l).join(", ")}]`:"string"==typeof e?`"${e}"`:e instanceof Date?`${e.getTime()}`:`${e}`,h=e=>(t,...a)=>{let i=a.map(l).join(", "),s=t&&a.length?", ":"";return`[${e}(${t}${s}${i})]`},d=e=>{let t=h(e);return e=>t(e)},u={at:h("at"),not:h("not"),any:h("any"),in:h("in"),fulltext:h("fulltext"),has:d("has"),missing:d("missing"),similar:(e=>{let t=h(e);return(...e)=>t("",...e)})("similar"),geopointNear:h("geopoint.near"),numberLessThan:h("number.lt"),numberGreaterThan:h("number.gt"),numberInRange:h("number.inRange"),dateAfter:h("date.after"),dateBefore:h("date.before"),dateBetween:h("date.between"),dateDayOfMonth:h("date.day-of-month"),dateDayOfMonthAfter:h("date.day-of-month-after"),dateDayOfMonthBefore:h("date.day-of-month-before"),dateDayOfWeek:h("date.day-of-week"),dateDayOfWeekAfter:h("date.day-of-week-after"),dateDayOfWeekBefore:h("date.day-of-week-before"),dateMonth:h("date.month"),dateMonthAfter:h("date.month-after"),dateMonthBefore:h("date.month-before"),dateYear:h("date.year"),dateHour:h("date.hour"),dateHourAfter:h("date.hour-after"),dateHourBefore:h("date.hour-before")},c=e=>u.at("document.tags",s(e));var f,g,y,p,w=Object.defineProperty,m=(e,t,a)=>((e,t,a)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a)(e,"symbol"!=typeof t?t+"":t,a);class v extends Error{constructor(e="An invalid API response was returned",t,a){super(e),m(this,"url"),m(this,"response"),this.url=t,this.response=a}}let R=(e,t)=>{let a=e.find(e=>t(e));if(!a)throw new v("Ref could not be found.",void 0,void 0);return a},b=e=>R(e,e=>e.isMasterRef),k=(e,t)=>R(e,e=>e.id===t),P=(e,t)=>R(e,e=>e.label===t),S=e=>e.replace(/%3B/g,";"),A={},T={};async function I(e,t,a){var i,s;let r,n=e.toString();if(null==t?void 0:t.body)r=(A[i=e.hostname]||(A[i]=(({interval:e}={})=>{let t=[],a=!1,i=0,s=()=>{var e;!a&&t.length>0&&(null==(e=t.shift())||e(),a=!0)},r=async(t,r,n)=>{let o,l=Date.now()-i;e&&l<e&&await (o=e-l,new Promise(e=>setTimeout(e,o)));let h=(async()=>t(...n))();r(h);try{await h}catch{}i=Date.now(),a=!1,s()};return(e,...i)=>new Promise(n=>{new Promise(e=>{t.push(e)}).then(r.bind(void 0,e,n,i)),(async()=>{await Promise.resolve(),a||s()})()})})({interval:1500})))(()=>a(n,t));else{let e=null==(s=T[n])?void 0:s.get(null==t?void 0:t.signal);e?r=e:(r=a(n,t).finally(()=>{var e,a;null==(e=T[n])||e.delete(null==t?void 0:t.signal),(null==(a=T[n])?void 0:a.size)===0&&delete T[n]}),(T[n]||(T[n]=new Map)).set(null==t?void 0:t.signal,r))}let o=await r;if(429===o.status){let i=Number(o.headers.get("retry-after")),s=Number.isNaN(i)?1500:1e3*i;return await new Promise(e=>setTimeout(e,s)),I(e,t,a)}return o.clone()}let D=e=>u.any("document.tags",s(e)),$=0,q=e=>u.at("document.type",e);class B extends v{}class L extends v{}class F extends v{}class E extends B{}class M extends B{}class x extends B{}class _ extends L{}let O={Any:"Any",Document:"Document",Media:"Media",Web:"Web"},j={accessToken:"access_token"},U=e=>"string"==typeof e?e:"desc"===e.direction?`${e.field} desc`:e.field,C=e=>{try{return new URL(e),!0}catch{return!1}};var N=Object.defineProperty,W=e=>{throw TypeError(e)},z=(e,t,a)=>((e,t,a)=>t in e?N(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a)(e,"symbol"!=typeof t?t+"":t,a),G=(e,t,a)=>t.has(e)||W("Cannot "+a),Q=(e,t,a)=>(G(e,t,"read from private field"),a?a.call(e):t.get(e)),H=(e,t,a)=>t.has(e)?W("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a),Z=(e,t,a)=>(G(e,t,"access private method"),a);!function(e){e.Master="Master",e.ReleaseID="ReleaseID",e.ReleaseLabel="ReleaseLabel",e.Manual="Manual"}(p||(p={}));class J{constructor(e,t={}){if(H(this,g),z(this,"fetchFn"),z(this,"fetchOptions"),H(this,f),z(this,"documentAPIEndpoint"),z(this,"accessToken"),z(this,"routes"),z(this,"brokenRoute"),z(this,"defaultParams"),z(this,"refState",{mode:p.Master,autoPreviewsEnabled:!0}
1),z(this,"cachedRepository"),z(this,"cachedRepositoryExpiration",0),this.fetchOptions=t.fetchOptions,"function"==typeof t.fetch)this.fetchFn=t.fetch;else if("function"==typeof globalThis.fetch)this.fetchFn=globalThis.fetch;else throw new v("A valid fetch implementation was not provided. In environments where fetch is not available (including Node.js), a fetch implementation must be provided via a polyfill or the `fetch` option.",void 0,void 0);if(this.fetchFn===globalThis.fetch&&(this.fetchFn=this.fetchFn.bind(globalThis)),t.documentAPIEndpoint||C(e),C(e)){this.documentAPIEndpoint=e;try{this.repositoryName=(e=>{try{let t=new URL(e).hostname;if(t.endsWith("prismic.io")||t.endsWith("wroom.io")||t.endsWith("wroom.test"))return t.split(".")[0]}catch{}throw new v(`An invalid Prismic Document API endpoint was provided: ${e}`,void 0,void 0)})(e)}catch(t){console.warn(`[@prismicio/client] A repository name could not be inferred from the provided endpoint (\`${e}\`). Some methods will be disabled. Create the client using a repository name to prevent this warning. For more details, see ${o("prefer-repository-name")}`)}}else this.documentAPIEndpoint=t.documentAPIEndpoint||(e=>{if(/^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(e))return`https://${e}.cdn.prismic.io/api/v2`;throw new v(`An invalid Prismic repository name was given: ${e}`,void 0,void 0)})(e),this.repositoryName=e;this.accessToken=t.accessToken,this.routes=t.routes,this.brokenRoute=t.brokenRoute,this.defaultParams=t.defaultParams,t.ref&&this.queryContentFromRef(t.ref),this.graphQLFetch=this.graphQLFetch.bind(this)}set repositoryName(e){let t;G(this,t=f,"write to private field"),t.set(this,e)}get repositoryName(){if(!Q(this,f))throw new v(`A repository name is required for this method but one could not be inferred from the provided API endpoint (\`${this.documentAPIEndpoint}\`). To fix this error, provide a repository name when creating the client. For more details, see ${o("prefer-repository-name")}`,void 0,void 0);return Q(this,f)}set endpoint(e){this.documentAPIEndpoint=e}get endpoint(){return this.documentAPIEndpoint}enableAutoPreviews(){this.refState.autoPreviewsEnabled=!0}enableAutoPreviewsFromReq(e){this.refState.httpRequest=e,this.refState.autoPreviewsEnabled=!0}disableAutoPreviews(){this.refState.autoPreviewsEnabled=!1}async get(e){let{data:t}=await this._get(e);return t}async getFirst(e){var t;let a={...e};e&&e.page||(null==e?void 0:e.pageSize)||(a.pageSize=(null==(t=this.defaultParams)?void 0:t.pageSize)??1);let{data:i,url:s}=await this._get(a),r=i.results[0];if(r)return r;throw new L("No documents were returned",s,void 0)}async dangerouslyGetAll(e={}){var t;let a,{limit:i=1/0,...s}=e,r={...s,pageSize:Math.min(i,s.pageSize||(null==(t=this.defaultParams)?void 0:t.pageSize)||100)},n=[];for(;(!a||a.next_page)&&n.length<i;){let e=a?a.page+1:void 0;a=await this.get({...r,page:e}),n.push(...a.results),a.next_page&&await new Promise(e=>setTimeout(e,500))}return n.slice(0,i)}async getByID(e,t){return await this.getFirst(r(t,u.at("document.id",e)))}async getByIDs(e,t){return await this.get(r(t,u.in("document.id",e)))}async getAllByIDs(e,t){return await this.dangerouslyGetAll(r(t,u.in("document.id",e)))}async getByUID(e,t,a){return await this.getFirst(r(a,[q(e),u.at(`my.${e}.uid`,t)]))}async getByUIDs(e,t,a){return await this.get(r(a,[q(e),u.in(`my.${e}.uid`,t)]))}async getAllByUIDs(e,t,a){return await this.dangerouslyGetAll(r(a,[q(e),u.in(`my.${e}.uid`,t)]))}async getSingle(e,t){return await this.getFirst(r(t,q(e)))}async getByType(e,t){return await this.get(r(t,q(e)))}async getAllByType(e,t){return await this.dangerouslyGetAll(r(t,q(e)))}async getByTag(e,t){return await this.get(r(t,D(e)))}async getAllByTag(e,t){return await this.dangerouslyGetAll(r(t,D(e)))}async getByEveryTag(e,t){return await this.get(r(t,c(e)))}async getAllByEveryTag(e,t){return await this.dangerouslyGetAll(r(t,c(e)))}async getBySomeTags(e,t){return await this.get(r(t,D(e)))}async getAllBySomeTags(e,t){return await this.dangerouslyGetAll(r(t,D(e)))}async getRepository(e){let t=new URL(this.documentAPIEndpoint);this.accessToken&&t.searchParams.set("access_token",this.accessToken);let a=await Z(this,g,y).call(this,t,e);switch(a.status){case 200:return await a.json();case 401:{let e=await a.json();throw new B(e.error,t.toString(),e)}case 404:throw new _(`Prismic repository not found. Check that "${this.documentAPIEndpoint}" is pointing to the correct repository.`,t.toString(),void 0);default:throw new v(void 0,t.toString(),await a.text())}}async getRefs(e){return(await this.getRepository(e)).refs}
1async getRefByID(e,t){return k(await this.getRefs(t),e)}async getRefByLabel(e,t){return P(await this.getRefs(t),e)}async getMasterRef(e){return b(await this.getRefs(e))}async getReleases(e){return(await this.getRefs(e)).filter(e=>!e.isMasterRef)}async getReleaseByID(e,t){return k(await this.getReleases(t),e)}async getReleaseByLabel(e,t){return P(await this.getReleases(t),e)}async getTags(e){let t=(await this.getCachedRepository(e)).forms.tags;if(t){let a=new URL(t.action);this.accessToken&&a.searchParams.set("access_token",this.accessToken);let i=await Z(this,g,y).call(this,a,e);if(i.ok)return await i.json()}return(await this.getRepository(e)).tags}async buildQueryURL({signal:e,fetchOptions:t,...a}={}){let i=a.ref||await this.getResolvedRefString({signal:e,fetchOptions:t}),r=a.integrationFieldsRef||(await this.getCachedRepository({signal:e,fetchOptions:t})).integrationFieldsRef||void 0;return((e,t)=>{let{filters:a,predicates:i,...r}=t,o=new URL("documents/search",`${e}/`);if(a)for(let e of s(a))o.searchParams.append("q",`[${e}]`);if(i)for(let e of s(i))o.searchParams.append("q",`[${e}]`);for(let e in r){let t=j[e]||e,a=r[e];if("orderings"===t){let e=r[t];if(null!=e){let t=s(e).map(e=>U(e)).join(",");a=`[${t}]`}}else"routes"===t&&"object"==typeof r[t]&&(a=JSON.stringify(s(r[t])));null!=a&&o.searchParams.set(t,s(a).join(","))}return o.searchParams.set("x-c",`js-${n}`),o.toString()})(this.documentAPIEndpoint,{...this.defaultParams,...a,ref:i,integrationFieldsRef:r,routes:a.routes||this.routes,brokenRoute:a.brokenRoute||this.brokenRoute,accessToken:a.accessToken||this.accessToken})}async resolvePreviewURL(e){var t,a;let i=e.documentID,s=e.previewToken;if(void 0!==globalThis.location){let e=new URLSearchParams(globalThis.location.search);i=i||e.get("documentId"),s=s||e.get("token")}else if(this.refState.httpRequest){if("query"in this.refState.httpRequest)i=i||(null==(t=this.refState.httpRequest.query)?void 0:t.documentId),s=s||(null==(a=this.refState.httpRequest.query)?void 0:a.token);else if("url"in this.refState.httpRequest&&this.refState.httpRequest.url){let e=new URL(this.refState.httpRequest.url,"missing-host://").searchParams;i=i||e.get("documentId"),s=s||e.get("token")}}if(null!=i&&null!=s){let t=((e,...t)=>{var a,i;let s;if(!e)return null;let r="link_type"in e?e:(a=e,{link_type:O.Document,id:a.id,uid:a.uid||void 0,type:a.type,tags:a.tags,lang:a.lang,url:null==a.url?void 0:a.url,slug:null==(i=a.slugs)?void 0:i[0],...a.data&&Object.keys(a.data).length>0?{data:a.data}:{}}),[n]=t;switch(s="function"==typeof n||null==n?{linkResolver:n}:{...n},r.link_type){case O.Media:case O.Web:return"url"in r?r.url:null;case O.Document:if("id"in r&&s.linkResolver){let e=s.linkResolver(r);if(null!=e)return e}if("url"in r&&r.url)return r.url;return null;case O.Any:default:return null}})(await this.getByID(i,{ref:s,lang:"*",signal:e.signal,fetchOptions:e.fetchOptions}),{linkResolver:e.linkResolver});if("string"==typeof t)return t}return e.defaultURL}queryLatestContent(){this.refState.mode=p.Master}queryContentFromReleaseByID(e){this.refState={...this.refState,mode:p.ReleaseID,releaseID:e}}queryContentFromReleaseByLabel(e){this.refState={...this.refState,mode:p.ReleaseLabel,releaseLabel:e}}queryContentFromRef(e){this.refState={...this.refState,mode:p.Manual,ref:e}}async graphQLFetch(e,t){let a=await this.getCachedRepository(),i=await this.getResolvedRefString(),s={"Prismic-ref":i,Authorization:this.accessToken?`Token ${this.accessToken}`:"",...t?t.headers:{}};a.integrationFieldsRef&&(s["Prismic-integration-field-ref"]=a.integrationFieldsRef);let r={};for(let e in s)s[e]&&(r[e.toLowerCase()]=s[e]);let n=new URL(e);n.searchParams.set("ref",i);let o=n.searchParams.get("query");return o&&n.searchParams.set("query",o.replace(/(\n| )*( |{|})(\n| )*/gm,(e,t,a)=>a)),await this.fetchFn(n.toString(),{...t,headers:r})}async getCachedRepository(e){return(!this.cachedRepository||Date.now()>=this.cachedRepositoryExpiration)&&(this.cachedRepository=await this.getRepository(e),this.cachedRepositoryExpiration=Date.now()+5e3),this.cachedRepository}async getResolvedRefString(e){var t,a;if(this.refState.autoPreviewsEnabled){let e,i;if((null==(t=this.refState.httpRequest)?void 0:t.headers)?"get"in this.refState.httpRequest.headers&&"function"==typeof this.refState.httpRequest.headers.get?i=this.refState.httpRequest.headers.get("cookie"):"cookie"in this.refState.httpRequest.headers&&(i=this.refState.httpRequest.headers.cookie):(null==(a=globalThis.document)?void 0:a.cookie)&&(i=globalThis.document.cookie),i&&(e=(e=>{let t;for(let a of e.split("; ")){let e=a.split("=");if("io.prismic.preview"===S(e[0]).replace(/%3D/g,"=")){t=S(e.slice(1).join("="));break}}return t})(i)),e)return e}let i=await this.getCachedRepository(e),s=this.refState.mode;if(s===p.ReleaseID)return k(i.refs,this.refState.releaseID).ref;if(s===p.ReleaseLabel)return P(i.refs,this.refState.releaseLabel).ref;if(s===p.Manual){let e,t=await ("function"==typeof(e=this.refState.ref)?e:()=>e)();if("string"==typeof t)return t}return b(i.refs).ref}async _get(e,t=0){var a,s;let r=await this.buildQueryURL(e);try{let t=await Z(this,g,y).call(this,new URL(r),e);switch(t.status){case 200:try{return{data:await t.clone().json(),url:r}}catch{throw new v(void 0,r,await t.text())}case 400:{let e=await t.json();throw new F(e.message,r,e)}case 401:{let e=await t.json();throw new B(e.message,r,e)}case 404:{let e=await t.json();switch(e.type){case"api_notfound_error":throw new x(e.message,r,e);case"api_security_error":if(/preview token.*expired/i.test(e.message))throw new E(e.message,r,e);default:throw new L(e.message,r,e)}}case 410:{let e=await t.json();throw new M(e.message,r,e)}default:throw new v(void 0,r,await t.text())}}catch(h){if(!(h instanceof x||h instanceof M)||t>=2)throw h;(null==e?void 0:e.ref)||(this.cachedRepository=void 0);let n=null==(s=null==(a=h.message.match(/Master ref is: (?<ref>.*)$/))?void 0:a.groups)?void 0:s.ref;if(!n)throw h;let o=new URL(r).searchParams.get("ref"),l=h instanceof x?"invali
1d":"expired";return((e,t={})=>{let{level:a="log"}=t;if(e===i&&Date.now()-$<5e3){$=Date.now();return}$=Date.now(),i=e,console[a](e)})(`[@prismicio/client] The ref (${o}) was ${l}. Now retrying with the latest master ref (${n}). If you were previewing content, the response will not include draft content.`,{level:"warn"}),await this._get({...e,ref:n},t+1)}}_buildRequestInit(e){var t,a,i,s;return{...this.fetchOptions,...null==e?void 0:e.fetchOptions,headers:{...null==(t=this.fetchOptions)?void 0:t.headers,...null==(a=null==e?void 0:e.fetchOptions)?void 0:a.headers},signal:(null==(i=null==e?void 0:e.fetchOptions)?void 0:i.signal)||(null==e?void 0:e.signal)||(null==(s=this.fetchOptions)?void 0:s.signal)}}}f=new WeakMap,g=new WeakSet,y=async function(e,t){return await I(e,this._buildRequestInit(t),this.fetchFn)};let Y=(e,t)=>new J(e,t)}}]);
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.