efficient-storefront-blocks 0.98.0 → 0.99.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/dist/chunks/EditorPreviewCheckout-EBG3NMJI.js +4 -0
- package/dist/chunks/{SiteEditorProvider-LW5QSBKM.js → SiteEditorProvider-YAIB64UV.js} +1 -1
- package/dist/chunks/chunk-5VSNQZU6.js +1 -0
- package/dist/chunks/chunk-DOJJTEJV.js +1 -0
- package/dist/chunks/{chunk-4QN263UJ.js → chunk-KRMWJLBM.js} +2 -2
- package/dist/chunks/{fitment-data-BRGBDG7Y.js → fitment-data-PXY35OVC.js} +1 -1
- package/dist/contract.js +1 -1
- package/dist/editor/components/GalleryShowcaseSource.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/SearchBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/BookingBox/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/DealerFinder/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/service/DealerFinder/fields.js +1 -0
- package/dist/editor/lib/document/blocks/service/SiteHeader/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/SubmitBox/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/index.d.ts +1 -1
- package/dist/editor/lib/document/blocks/service/index.js +1 -1
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/editor/lib/document/popup-look-fields.d.ts +1 -0
- package/dist/editor/lib/document/popup-look-fields.js +1 -1
- package/dist/editor/lib/document/text-kind-style-rows.d.ts +5 -0
- package/dist/editor/lib/document/text-kind-style-rows.js +1 -0
- package/dist/editor/lib/storefront-editor-words.d.ts +4 -2
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/index.js +31 -31
- package/dist/links.js +1 -1
- package/dist/render/app/globals.css +136 -12
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/CatalogFilterBarSection.js +1 -1
- package/dist/render/components/ChatWidget.js +1 -1
- package/dist/render/components/CouponField.d.ts +2 -1
- package/dist/render/components/CouponField.js +1 -1
- package/dist/render/components/CurrencyContext.d.ts +3 -0
- package/dist/render/components/CurrencyContext.js +1 -1
- package/dist/render/components/DealerFinderSection.d.ts +18 -0
- package/dist/render/components/DealerFinderSection.js +1 -0
- package/dist/render/components/FooterMenu.d.ts +5 -3
- package/dist/render/components/FooterMenu.js +1 -1
- package/dist/render/components/FormBlock.d.ts +4 -1
- package/dist/render/components/FormBlock.js +1 -1
- package/dist/render/components/Header.js +1 -1
- package/dist/render/components/HeaderToolBlocks.d.ts +4 -2
- package/dist/render/components/HeaderToolBlocks.js +1 -1
- package/dist/render/components/HeaderTools.d.ts +7 -2
- package/dist/render/components/HeaderTools.js +1 -1
- package/dist/render/components/PhoneSheet.d.ts +16 -0
- package/dist/render/components/PhoneSheet.js +1 -0
- package/dist/render/components/PreOrderPanel.js +1 -1
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/ProductRef.js +1 -1
- package/dist/render/components/SectionGroupBody.d.ts +2 -1
- package/dist/render/components/SectionGroupBody.js +1 -1
- package/dist/render/components/Subscribe.d.ts +1 -0
- package/dist/render/components/Subscribe.js +1 -1
- package/dist/render/components/card-pieces/CardPrice.js +1 -1
- package/dist/render/components/card-pieces/useTaxNote.d.ts +1 -0
- package/dist/render/components/card-pieces/useTaxNote.js +1 -0
- package/dist/render/components/catalog/CatalogFilterBar.d.ts +5 -1
- package/dist/render/components/catalog/CatalogFilterBar.js +1 -1
- package/dist/render/components/catalog/CatalogFilterContext.d.ts +2 -0
- package/dist/render/components/catalog/CatalogFilterContext.js +1 -1
- package/dist/render/components/catalog/FilterPill.js +1 -1
- package/dist/render/components/catalog/PriceRange.d.ts +6 -1
- package/dist/render/components/catalog/PriceRange.js +1 -1
- package/dist/render/components/catalog/ShopperFilters.js +1 -1
- package/dist/render/components/checkout/checkout-parts.js +1 -1
- package/dist/render/components/checkout/checkout-state.d.ts +2 -0
- package/dist/render/components/checkout/checkout-state.js +3 -3
- package/dist/render/components/fitment/PickerField.js +1 -1
- package/dist/render/components/formSubmission.d.ts +4 -2
- package/dist/render/components/formSubmission.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicSpecTable.d.ts +0 -3
- package/dist/render/components/pdp-dynamic/DynamicSpecTable.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicWheelDiagram.js +1 -1
- package/dist/render/components/submit/SubmitRegions.js +1 -1
- package/dist/render/components/wheels-plp/AlloyWheelsListing.js +1 -1
- package/dist/render/components/wheels-plp/PlpActiveChips.d.ts +2 -1
- package/dist/render/components/wheels-plp/PlpActiveChips.js +1 -1
- package/dist/render/components/wheels-plp/PlpSidebar.d.ts +15 -7
- package/dist/render/components/wheels-plp/PlpSidebar.js +1 -1
- package/dist/render/components/wheels-plp/useVehicleCatalog.d.ts +6 -1
- package/dist/render/components/wheels-plp/useVehicleCatalog.js +1 -1
- package/dist/render/lib/api/index.d.ts +4 -1
- package/dist/render/lib/api/index.js +1 -1
- package/dist/render/lib/api/types.d.ts +1 -0
- package/dist/render/lib/booking/text-kinds.js +1 -1
- package/dist/render/lib/catalog/tax-note.d.ts +4 -0
- package/dist/render/lib/catalog/tax-note.js +1 -0
- package/dist/render/lib/content/article-page-seed.js +1 -1
- package/dist/render/lib/content/menu-row.d.ts +16 -0
- package/dist/render/lib/content/menu-row.js +1 -1
- package/dist/render/lib/content/text-kind-vars.d.ts +4 -0
- package/dist/render/lib/content/text-kind-vars.js +1 -0
- package/dist/render/lib/document/blocks/commerce/SearchBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/service/DealerFinder/meta.d.ts +2 -0
- package/dist/render/lib/document/blocks/service/DealerFinder/meta.js +1 -0
- package/dist/render/lib/document/blocks/service/DealerFinder/render.d.ts +4 -0
- package/dist/render/lib/document/blocks/service/DealerFinder/render.js +1 -0
- package/dist/render/lib/document/blocks/service/SiteHeader/render.js +1 -1
- package/dist/render/lib/document/blocks/service/metas.d.ts +1 -0
- package/dist/render/lib/document/blocks/service/metas.js +1 -1
- package/dist/render/lib/document/blocks/service/renders.d.ts +1 -0
- package/dist/render/lib/document/blocks/service/renders.js +1 -1
- package/dist/render/lib/document/blocks/text-part-shapes.json +10 -0
- package/dist/render/lib/document/footer-page-blocks.js +1 -1
- package/dist/render/lib/document/lazy-draws.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-service.js +1 -1
- package/dist/render/lib/popup/text-kind-style.js +1 -1
- package/dist/render/lib/sections/dealer-finder.d.ts +41 -0
- package/dist/render/lib/sections/dealer-finder.js +1 -0
- package/dist/render/lib/submit/text-kinds.js +1 -1
- package/dist/render/lib/wheels/catalog-filters-to-listing.d.ts +1 -1
- package/dist/render/lib/wheels/catalog-filters-to-listing.js +1 -1
- package/dist/render/lib/wheels/plp-filters.d.ts +5 -0
- package/dist/render/lib/wheels/plp-filters.js +1 -1
- package/dist/render/lib/wheels/wheel-sheet.d.ts +3 -0
- package/dist/render/lib/wheels/wheel-sheet.js +1 -0
- package/dist/words.d.ts +4 -2
- package/dist/words.js +1 -1
- package/package.json +2 -2
- package/dist/chunks/EditorPreviewCheckout-2FW4VEOK.js +0 -4
- package/dist/chunks/chunk-PWSMCGXO.js +0 -1
- package/dist/chunks/chunk-SEIKSSUW.js +0 -1
- /package/dist/chunks/{chunk-XEZ7BYVZ.js → chunk-B2IYTOE3.js} +0 -0
- /package/dist/chunks/{chunk-4QN263UJ.js.LEGAL.txt → chunk-KRMWJLBM.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-GOHV3G3C.js → chunk-QP2F42DV.js} +0 -0
|
@@ -202,6 +202,7 @@ export type Brand = {
|
|
|
202
202
|
design_count: number;
|
|
203
203
|
};
|
|
204
204
|
import type { components, operations } from "./types.js";
|
|
205
|
+
import { type DealerList } from "../sections/dealer-finder.js";
|
|
205
206
|
export declare function resolveMediaUrls<T>(value: T): T;
|
|
206
207
|
export type Process = components["schemas"]["Process"];
|
|
207
208
|
export type FinishFamily = components["schemas"]["FinishFamily"];
|
|
@@ -338,7 +339,7 @@ export declare const products: {
|
|
|
338
339
|
maxRows?: number;
|
|
339
340
|
}) => Promise<WheelSummary[]>;
|
|
340
341
|
listWheelsBySlug: (slugs: readonly string[], opts?: ListReadOpts) => Promise<WheelSummary[]>;
|
|
341
|
-
listCatalog: (kinds: readonly ProductKind[], vehicle?: TyreFitVehicleQuery | null, opts?: {
|
|
342
|
+
listCatalog: (kinds: readonly ProductKind[], vehicle?: TyreFitVehicleQuery | null, opts?: ListReadOpts & {
|
|
342
343
|
maxRows?: number;
|
|
343
344
|
}) => Promise<ProductSummary[]>;
|
|
344
345
|
getWheel: (slug: string) => Promise<Wheel>;
|
|
@@ -847,3 +848,5 @@ export declare const storefrontAdmin: {
|
|
|
847
848
|
}>;
|
|
848
849
|
listMedia: (token: string, kind?: "image" | "video") => Promise<MediaAsset[]>;
|
|
849
850
|
};
|
|
851
|
+
export declare function dealersPath(near: string): string;
|
|
852
|
+
export declare function fetchDealers(near: string): Promise<DealerList>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PREVIEW_TOKEN_HEADER as st,SITE_HOST_HEADER as nt,SITE_SLUG_HEADER as ot}from"../site-headers.js";import{PRODUCT_API_BASE as it,PRODUCT_BACKEND_URL as D}from"./origins.js";import{backendHopHeaders as ct,clientIpFromForwardedFor as dt,FORWARDED_FOR_HEADER as ut,hopCachingOf as lt}from"../forwarded-for.js";import pt from"efficient-web-builder/format/lib/document/media-manifest.json";import{auth as P}from"../auth.js";import{efficientClientOpen as yt}from"efficient-easel/screen/lib/session";import{listableWheelSummaries as E}from"../wheels/listable-wheels.js";import{dropRenderlessFinishes as x}from"../wheels/renderable-finishes.js";const ht=process.env.NEXT_PUBLIC_API_URL??"http://localhost:8000";class m extends Error{status;data;constructor(e,s,o){super(s),this.status=e,this.data=o}}const N="Unable to reach the server. This could be a problem with your internet connection, or the server may be undergoing maintenance or an upgrade. Please try again shortly.",ft=new Set([502,503,504]),I=0,gt="This editor runs on its host's own backend, which does not serve this request.",wt=5e3,mt=15e3,St=()=>typeof window>"u"?wt:mt;function H(t){const e=(t.method??"GET").toUpperCase();if(!(t.body!=null||e!=="GET"&&e!=="HEAD")&&!(t.audience!=null&&t.audience!=="shop")&&typeof AbortSignal?.timeout=="function")return AbortSignal.timeout(St())}const F=t=>t instanceof Error&&t.name==="TimeoutError",M=(t,e)=>ft.has(t)?N:e,Pt=["admin","venue"];let B="admin";function ie(t){B=Pt.includes(t)?t:"admin"}function Ot(){return B}const bt=/^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{1,8})*$/;let q=null;function ce(t){q=t&&bt.test(t)?t:null}function At(){return q}function Tt(t){if(typeof window>"u"||!t.startsWith("/api/v1/"))return t;const e=K();return!e||/[?&]site=/.test(t)?t:C(t,`site=${encodeURIComponent(e)}`)}async function i(t,e={}){const{token:s,baseUrl:o,headers:l,audience:p,...g}=e;if(typeof window<"u"&&!yt())throw new m(I,gt,null);if(typeof window>"u"&&o===void 0)throw new Error(`apiFetch(${JSON.stringify(t)}) ran on the server without an explicit baseUrl. The API_URL default it would inherit is browser-only (the prod image bakes NEXT_PUBLIC_API_URL="" for same-origin use, which a Node fetch cannot resolve). Pass a base explicitly: \`await backendOpts()\` (or baseUrl: PRODUCT_FETCH_BASE) for product reads, or the server-only PRODUCT_BACKEND_URL env for other backend surfaces.`);const r=typeof FormData<"u"&&g.body instanceof FormData;let a;try{a=await fetch(`${o??ht}${Tt(t)}`,{...g,headers:{...r?{}:{"Content-Type":"application/json"},...s?{Authorization:`Bearer ${s}`}:{},...p===null?{}:{"X-Portal-Audience":p??"shop"},...l},signal:g.signal??H({...g,audience:p})})}catch(y){throw y instanceof TypeError||F(y)?new m(I,N,null):y}let n;try{n=await a.text()}catch(y){throw F(y)?new m(I,N,null):y}let c=null;if(n)try{c=JSON.parse(n)}catch{throw new m(a.status,a.ok?"Expected JSON but received a non-JSON response":M(a.status,a.statusText),n)}if(!a.ok){const y=(c&&typeof c=="object"&&"detail"in c&&typeof c.detail=="string"?c.detail:null)??M(a.status,a.statusText);throw new m(a.status,y,c)}return c}let b=null;async function G(){return b||(b=Rt().finally(()=>{b=null}),b)}async function Rt(){const t=P.takeLegacyRefresh(),e=await Et.refresh(t??void 0);return P.setTokens(e.access),e.access}async function W(){return P.getAccess()??G()}async function h(t,e={}){let s;try{s=await W()}catch{throw P.clear(),new m(401,"Not signed in",null)}try{return await i(t,{...e,token:s})}catch(o){if(!(o instanceof m)||o.status!==401)throw o;try{const l=await G();return await i(t,{...e,token:l})}catch{throw P.clear(),o}}}async function j(t,e={}){if(P.getAccess())try{return{data:await h(t,e),asShopper:!0}}catch(s){if(!(s instanceof m)||s.status!==401)throw s}return{data:await i(t,e),asShopper:!1}}async function z(){const t=await h("/api/auth/me/");if(t.portal!=="shop")throw P.clear(),new m(403,"This session is not valid for this shop.",null);return t}const Et={login:(t,e)=>i("/api/auth/login/",{method:"POST",body:JSON.stringify({email:t,password:e,portal:"shop"}),credentials:"include"}),refresh:t=>i("/api/auth/refresh/",{method:"POST",body:JSON.stringify(t?{refresh:t,portal:"shop"}:{portal:"shop"}),credentials:"include"}),logout:async()=>{P.clear();try{await i("/api/auth/logout/",{method:"POST",body:JSON.stringify({portal:"shop"}),credentials:"include"})}catch{}},restoreSession:async()=>{const t=await W();return await z(),t},me:z,updateMe:t=>h("/api/auth/me/",{method:"PATCH",body:JSON.stringify(t)}),changePassword:(t,e)=>h("/api/auth/me/",{method:"PATCH",body:JSON.stringify({password:e,old_password:t})}),changeEmail:(t,e)=>h("/api/shop-portal/change-email/",{method:"POST",body:JSON.stringify({new_email:t,current_password:e})}),myProfile:()=>h("/api/shop-portal/profile/"),updateMyProfile:t=>h("/api/shop-portal/profile/",{method:"PATCH",body:JSON.stringify(t)}),myAddresses:()=>h("/api/shop-portal/delivery-locations/"),createAddress:t=>h("/api/shop-portal/delivery-locations/",{method:"POST",body:JSON.stringify(t)}),updateAddress:(t,e)=>h(`/api/shop-portal/delivery-locations/${t}/`,{method:"PATCH",body:JSON.stringify(e)}),deleteAddress:t=>h(`/api/shop-portal/delivery-locations/${t}/`,{method:"DELETE"}),passwordResetRequest:t=>i("/api/auth/password-reset/",{method:"POST",body:JSON.stringify({email:t})}),passwordResetConfirm:(t,e,s)=>i("/api/auth/password-reset/confirm/",{method:"POST",body:JSON.stringify({uid:t,token:e,new_password:s})}),brands:()=>h("/api/products/brands/"),myOrders:()=>h("/api/shop-portal/orders/").then(t=>t.results),myOrder:t=>h(`/api/shop-portal/orders/${t}/`),cancelOrder:t=>h(`/api/shop-portal/orders/${t}/cancel/`,{method:"POST"}),myReturns:t=>h(`/api/shop-portal/returns/${t?`?order=${encodeURIComponent(t)}`:""}`).then(e=>e.results),createReturn:t=>h("/api/shop-portal/returns/",{method:"POST",body:JSON.stringify(t)}),withdrawReturn:t=>h(`/api/shop-portal/returns/${t}/cancel/`,{method:"POST"}),uploadReturnPhoto:(t,e)=>{const s=new FormData;return s.append("claim_item",t),s.append("file",e),s.append("media_type",e.type.startsWith("video/")?"video":"image"),h("/api/shop-portal/return-media/",{method:"POST",body:s})}};import{media as Ct,absolutizeApiUrl as v}from"efficient-web-builder/render/lib/media";import{analyzeLogoSvg as $t,isSvgUrl as _t}from"efficient-web-builder/format/lib/logo/reverse-svg";import{getEditorSiteId as Ut}from"efficient-web-builder/render/lib/editor-site";import{shopRouteBase as Nt,webRuntimeSiteSlug as K}from"efficient-web-builder/format/lib/web-runtime";function w(t){if(typeof t=="string")return t.startsWith("/media/")?Ct(t):t;if(Array.isArray(t))return t.map(w);if(t&&typeof t=="object"){const e={};for(const[s,o]of Object.entries(t))e[s]=s==="captions"&&o&&typeof o=="object"&&!Array.isArray(o)?Object.fromEntries(Object.entries(o).map(([l,p])=>[w(l),p])):w(o);return e}return t}import{PRODUCT_API_BASE as Pe}from"./origins.js";const V=typeof window>"u"&&D!=="",It=V?D:it,vt=Nt,O=()=>({baseUrl:vt(),audience:null});function d(t,e){const s=e?`?process=${encodeURIComponent(e)}`:"";return`/api/v1${t}${s}`}const X=100,Z=50;function k(t,e,s){const o=new URLSearchParams;for(const[l,p]of Object.entries(e))p!=null&&p!==""&&o.set(l,String(p));return o.set("pageSize",String(X)),s&&o.set("cursor",s),`/api/v1${t}?${o.toString()}`}function kt(t,e){return k("/wheels",{process:t},e)}const Y=X;function Jt(t,e){return k("/wheels",{slug:t.join(",")},e)}function Lt(t,e,s){return k("/products",{kind:t.join(","),make:e?.make,model:e?.model,year:e?.year,modification:e?.modification},s)}function Dt(t){if(!t)return null;try{return new URL(t,"http://cursor.invalid").searchParams.get("cursor")}catch{return null}}async function J(t,e,s=()=>!1,o=()=>!1){const l=[];let p=null;try{for(let g=0;g<Z;g++){const r=await i(await e(p),await u());if(l.push(...r.results),p=Dt(r.next),!p)break;if(o(l))return l}p&&console.warn(`[${t}] stopped at ${Z} pages (${l.length} rows); catalog may be truncated`)}catch(g){if(s(g))throw g;console.warn(`[${t}] product API unavailable, returning []`,g)}return l}const Q=t=>t instanceof m&&t.status===400;function tt(t){return t.flatMap(e=>e.kind==="alloy-wheel"?E([e]):[e])}async function et(){return(await xt()).host}async function xt(){try{const{headers:t}=await import("next/headers"),e=await t(),s=p=>p?.split(",")[0]?.split(":")[0]?.trim().toLowerCase()||null,o=s(e.get(nt)??e.get("x-forwarded-host")??e.get("host")),l=s(e.get("host"));return{host:o,matchesRequestHost:o!==null&&o===l}}catch{return{host:null,matchesRequestHost:!1}}}async function Ht(){try{const{headers:t}=await import("next/headers");return dt((await t()).get(ut))}catch{return null}}async function Ft(){try{const{headers:t}=await import("next/headers");return(await t()).get(ot)||null}catch{return null}}async function Mt(){const t=await Ft();if(t)return`site=${encodeURIComponent(t)}`;const e=await et();return e?`host=${encodeURIComponent(e)}`:""}async function f(t){if(typeof window<"u"){const e=K();return e?C(t,`site=${encodeURIComponent(e)}`):t}return C(t,await Mt())}function C(t,e){return e?`${t}${t.includes("?")?"&":"?"}${e}`:t}const Bt="preview";async function qt(){if(typeof window<"u")return null;try{const{headers:t}=await import("next/headers");return(await t()).get(st)}catch{return null}}async function Gt(){try{const{headers:t}=await import("next/headers");return(await t()).get("user-agent")}catch{return null}}async function L(t,e){const s=await qt();if(s===null)return[await f(t),await u(e)];const o=C(await f(t),`${Bt}=${encodeURIComponent(s)}`),{next:l,cache:p,...g}=e??{},r=await u({...g,cache:"no-store"}),a=await Gt();return a&&(r.headers={...r.headers,"user-agent":a}),[o,r]}async function Wt(t){if(!V)return;const[e,s]=await Promise.all([et(),Ht()]),o=ct(e,s,t);return Object.keys(o).length>0?o:void 0}async function u(t){const e=await Wt(lt(t)),s={baseUrl:It,...t};return e&&(s.headers={...e,...t?.headers}),s}const A=typeof window>"u";function T(t,e){const s=new URLSearchParams;for(const[l,p]of Object.entries(e))p!==void 0&&p!==""&&s.set(l,String(p));const o=s.toString();return`/api/v1/fitment${t}${o?`?${o}`:""}`}const ye={listMakes:async t=>{if(A){const{fitmentData:s}=await import("./fitment-data.js");return s.makes(t)}return(await i(T("/makes",{region:t}),O())).results},listModels:async(t,e)=>{if(A){const{fitmentData:o}=await import("./fitment-data.js");return o.models(t,e)}return(await i(T("/models",{make:t,region:e}),O())).results},listYears:async(t,e,s)=>{if(A){const{fitmentData:l}=await import("./fitment-data.js");return l.years(t,e,s)}return(await i(T("/years",{make:t,model:e,region:s}),O())).results},listModifications:async(t,e,s,o)=>{if(A){const{fitmentData:p}=await import("./fitment-data.js");return p.modifications(t,e,s,o)}return(await i(T("/modifications",{make:t,model:e,year:s,region:o}),O())).results},getStockFitment:async(t,e,s,o,l)=>{if(A){const{fitmentData:p}=await import("./fitment-data.js");return p.stockFitment(t,e,s,o,l)}return i(T("/stock-fitment",{make:t,model:e,year:s,modification:o,region:l}),O())}},he={listWheels:async(t,e={})=>{const s=await J("products.listWheels",async o=>await f(kt(t,o)),e.throwOnFailure?()=>!0:void 0,e.maxRows===void 0?void 0:o=>E([...o]).length>=e.maxRows);return E(w(s))},listWheelsBySlug:async(t,e={})=>{const s=[...new Set(t.map(r=>r.trim()).filter(Boolean))];if(s.length===0)return[];const o=[];for(let r=0;r<s.length;r+=Y)o.push(s.slice(r,r+Y));const l=await Promise.all(o.map(r=>J("products.listWheelsBySlug",async a=>await f(Jt(r,a)),e.throwOnFailure?()=>!0:Q))),p=new Set(s),g=l.flat().filter(r=>p.has(r.slug));return E(w(g))},listCatalog:async(t,e,s={})=>{if(t.length===0)throw new Error("products.listCatalog() needs at least one kind. An empty list would omit `kind`, which the contract reads as `alloy-wheel` — so the call would silently return the wheel catalog instead of nothing.");const o=await J("products.listCatalog",async l=>await f(Lt(t,e,l)),Q,s.maxRows===void 0?void 0:l=>tt([...l]).length>=s.maxRows);return tt(w(o))},getWheel:async t=>x(w(await i(await f(d(`/wheels/${t}`)),await u()))),getTyre:async t=>w(await i(await f(d(`/tyres/${t}`)),await u())),listBundles:async(t={})=>{try{return await i(await f(d("/bundles")),await u())}catch(e){if(t.throwOnFailure)throw e;return[]}},getBundle:async t=>i(await f(d(`/bundles/${t}`)),await u()),listGalleryBuilds:async(t={})=>{const{process:e=null,wheelSlug:s=null}=t;if(typeof window>"u"){const{listGalleryBuilds:o}=await import("./gallery-builds-data.js");return w(o(e,s))}try{const o=new URLSearchParams;e&&o.set("process",e),s&&o.set("wheelSlug",s);const l=o.toString(),p=await i(`/api/v1/gallery-builds${l?`?${l}`:""}`,O());return w(p.results)}catch(o){return console.warn("[products.listGalleryBuilds] product API unavailable, returning []",o),[]}},getSite:async()=>i(await f(d("/site")),await u()),getSiteBySlug:async t=>i(`${d("/site")}?${new URLSearchParams({site:t})}`,typeof window>"u"?await u():void 0),listPages:async()=>w(await i(await f(d("/pages")),await u())),listPopups:async()=>i(await f(d("/popups")),await u()),listProductTemplates:async()=>{try{return await i(await f(d("/product-templates")),await u())}catch(t){return console.warn("[products.listProductTemplates] unavailable, returning []",t),[]}},listDynamicPages:async t=>{const e=t?`?recordType=${encodeURIComponent(t)}`:"";try{return await i(await f(`${d("/dynamic-pages")}${e}`),await u())}catch(s){if(s instanceof m&&s.status===404)return[];throw s}},getRecord:async(t,e)=>{try{return await i(await f(d(`/records/${encodeURIComponent(t)}/${encodeURIComponent(e)}`)),await u())}catch(s){if(s instanceof m&&s.status===404)return null;throw s}},listRecordKeys:async t=>{try{const e=await i(await f(d(`/records/${encodeURIComponent(t)}`)),await u({cache:"no-store"}));return Array.isArray(e?.keys)?e.keys.filter(s=>typeof s=="string"&&s!==""):[]}catch(e){if(e instanceof m&&e.status===404)return[];throw e}},listProductTypeChoices:async()=>{try{return await i(await f(d("/product-type-choices")),await u())}catch(t){return console.warn("[products.listProductTypeChoices] unavailable, returning []",t),[]}},listFieldUsage:async()=>{try{return await i(await f(d("/field-usage")),await u())}catch(t){return console.warn("[products.listFieldUsage] unavailable, returning []",t),[]}},getPage:async(t,e={})=>{const s=e.record?`?record=${encodeURIComponent(e.record)}`:"",[o,l]=await L(d(`/pages/${t}`)+s,e.revalidate!==void 0?{next:{revalidate:e.revalidate}}:void 0);return w(await i(o,l))},listBlogPosts:async(t={},{throwOnFailure:e=!1}={})=>{const s=t.category?`?category=${encodeURIComponent(t.category)}`:"";try{return(await i(d("/blog-posts")+s,await u())).map(l=>({...l,coverImage:v(l.coverImage)??""}))}catch(o){if(e)throw o;return console.warn("[products.listBlogPosts] blog API unavailable, returning []",o),[]}},getBlogPost:async t=>{const e=await i(d(`/blog-posts/${t}`),await u());return{...e,coverImage:v(e.coverImage)??""}},createOrder:async t=>i(d("/orders"),await u({method:"POST",body:JSON.stringify(t)})),createOrderAuthed:async t=>h(d("/orders"),await u({method:"POST",body:JSON.stringify(t)})),lookupOrder:async t=>i(d("/orders/lookup"),await u({method:"POST",body:JSON.stringify(t)})),createPaymentIntent:async t=>i(d("/payments/intent"),await u({method:"POST",body:JSON.stringify(t)})),releaseCheckout:async t=>i(d("/checkouts/release"),await u({method:"POST",body:JSON.stringify(t)})),createPaypalOrder:async t=>i(d("/payments/paypal/order"),await u({method:"POST",body:JSON.stringify(t)})),capturePaypalOrder:async t=>i(d("/payments/paypal/capture"),await u({method:"POST",body:JSON.stringify(t)})),createAfterpayCheckout:async t=>i(d("/payments/afterpay/checkout"),await u({method:"POST",body:JSON.stringify(t)})),captureAfterpayPayment:async t=>i(d("/payments/afterpay/capture"),await u({method:"POST",body:JSON.stringify(t)})),chargeSquare:async t=>i(d("/payments/square/charge"),await u({method:"POST",body:JSON.stringify(t)})),createGocardlessBillingRequest:async t=>i(d("/payments/gocardless/billing-request"),await u({method:"POST",body:JSON.stringify(t)})),completeGocardlessPayment:async t=>i(d("/payments/gocardless/complete"),await u({method:"POST",body:JSON.stringify(t)})),createZipCheckout:async t=>i(d("/payments/zip/checkout"),await u({method:"POST",body:JSON.stringify(t)})),captureZipPayment:async t=>i(d("/payments/zip/capture"),await u({method:"POST",body:JSON.stringify(t)})),createKlarnaCheckout:async t=>i(d("/payments/klarna/checkout"),await u({method:"POST",body:JSON.stringify(t)})),captureKlarnaPayment:async t=>i(d("/payments/klarna/capture"),await u({method:"POST",body:JSON.stringify(t)})),createStockAlert:async t=>i(d("/stock-alerts"),await u({method:"POST",body:JSON.stringify(t)})),createPreOrderIntent:async t=>i(d("/pre-order-intents"),await u({method:"POST",body:JSON.stringify(t)})),createNewsletterSubscription:async t=>i(d("/newsletter-subscriptions"),await u({method:"POST",body:JSON.stringify(t)})),unsubscribeNewsletter:async t=>i(d("/newsletter-unsubscribe"),await u({method:"POST",body:JSON.stringify(t)})),captureCart:async t=>i(d("/carts"),await u({method:"POST",body:JSON.stringify(t)})),restoreCart:async t=>i(d("/carts/restore"),await u({method:"POST",body:JSON.stringify(t)})),unsubscribeCartReminders:async t=>i(d("/carts/unsubscribe"),await u({method:"POST",body:JSON.stringify(t)})),listReviews:async(t={})=>{const e=new URLSearchParams;t.limit&&e.set("limit",String(t.limit)),t.designCode&&e.set("designCode",t.designCode);const s=d("/reviews"),o=e.toString();try{return await i(await f(o?`${s}?${o}`:s),await u())}catch(l){return console.warn("[products.listReviews] product API unavailable, returning []",l),[]}},submitReview:async t=>i(d("/reviews"),await u({method:"POST",body:JSON.stringify(t)})),getForm:async t=>i(d(`/forms/${encodeURIComponent(t)}`),await u()),submitForm:async(t,e)=>i(d(`/forms/${encodeURIComponent(t)}/submissions`),await u({method:"POST",body:JSON.stringify(e)})),listShippingMethods:async()=>{try{return await i(d("/shipping-methods"),await u())}catch(t){return console.warn("[products.listShippingMethods] product API unavailable, returning []",t),[]}},listCountrySubdivisions:async t=>{try{return await i(d(`/countries/${encodeURIComponent(t)}/subdivisions`),await u())}catch(e){return console.warn("[products.listCountrySubdivisions] unavailable, returning []",e),[]}},quoteCart:async t=>{const e=d("/cart/quote"),s=await u({method:"POST",body:JSON.stringify(t)});return t.couponCode?(await j(e,s)).data:i(e,s)},validateCoupon:async t=>{const{data:e,asShopper:s}=await j(d("/coupons/validate"),await u({method:"POST",body:JSON.stringify(t)}));return{...e,askedAsShopper:s}},getHeaderSettings:async()=>{const t=H({method:"GET"}),e=await i(...await L(d("/header-settings"),{signal:t})),s=v(e.logoUrl);let o=null,l=null;if(s&&_t(s)){const p=await $t(s,t);p&&(o=p.reversed,l=p.inkIsDark)}return{...e,logoUrl:s,logoReversed:o,logoInkIsDark:l}},getThemeSettings:async()=>i(...await L(d("/theme-settings"))),getChatSettings:async()=>i(await f(d("/chat-settings")),await u())},fe={listServices:async()=>{try{return await i(d("/bookings/services"),await u())}catch(t){return console.warn("[bookings.listServices] API unavailable, returning []",t),{results:[],currency:"USD"}}},getAvailability:async(t,e)=>i(d(`/bookings/availability?service=${encodeURIComponent(t)}&date=${e}`),await u()),create:async t=>i(d("/bookings"),await u({method:"POST",body:JSON.stringify(t)})),get:async t=>i(d(`/bookings/manage/${encodeURIComponent(t)}`),await u()),cancel:async t=>i(d(`/bookings/manage/${encodeURIComponent(t)}/cancel`),await u({method:"POST"})),createPaymentIntent:async t=>i(d("/bookings/payments/intent"),await u({method:"POST",body:JSON.stringify({manageToken:t})}))};class jt extends Error{slug;count;constructor(e,s){super(`Slug "${e}" exists on ${s} websites; a site is required to pick one.`),this.slug=e,this.count=s,this.name="AmbiguousPageSlugError"}}const $=(t,e,s)=>{const o=new URLSearchParams({...e?{site:e}:{},...s?{draft:"1"}:{}}).toString();return`/api/storefront/${t}/${o?`?${o}`:""}`},_=t=>`/api/storefront/sites/${encodeURIComponent(t)}/`,zt=t=>`${_(t)}currencies/`,Kt="/api/storefront/media/ingest/";class Vt extends Error{constructor(){super("This editor is not connected to a website, so an upload has nowhere to go. Open the page from the website the file should belong to, then try again."),this.name="MediaUploadDestinationError"}}function Xt(){const t=Ut();if(!t)throw new Vt;return`${Kt}?${new URLSearchParams({site:t})}`}const Zt="X-Puck-Media-Manifest",rt=pt.contentHash,U={"X-Media-Manifest":rt,[Zt]:rt},ge=at({});function at(t){return(e,s={})=>{const o=At(),l=t.headers||o?{...o?{"Accept-Language":o}:{},...t.headers,...s.headers}:void 0;return i(e,{...s,...t.baseUrl!==void 0?{baseUrl:t.baseUrl}:{},...l?{headers:l}:{},audience:t.audience??Ot()})}}function Yt(t={}){const e=at(t),s=t.siteDrafts===!0,o=r=>$("header-settings",r,s),l=r=>$("theme-settings",r,s),p=r=>$("chat-settings",r,s),g=r=>$("social-settings",r,s);return{findPageBySlug:async(r,a,n)=>{const c=new URLSearchParams({slug:r});n&&c.set("site",n);const y=await e(`/api/storefront/pages/?${c.toString()}`,{token:a}),S=Array.isArray(y)?y:y.results??[];if(!n&&S.length>1)throw new jt(r,S.length);return S[0]??null},getPageById:(r,a)=>e(`/api/storefront/pages/${r}/`,{token:a}),saveLayout:(r,a,n,c,y)=>e(`/api/storefront/pages/${r}/`,{method:"PATCH",body:JSON.stringify({layout:a,expected_updated_at:c,...y?{client_id:y}:{}}),token:n}),duplicatePage:(r,a,n)=>e(`/api/storefront/pages/${r}/duplicate/`,{method:"POST",body:JSON.stringify({title:a.title,slug:a.slug}),token:n}),geocode:(r,a,n)=>e(`/api/storefront/geocode/?${new URLSearchParams(n?{q:r,country:n}:{q:r})}`,{token:a}),listBlockSources:r=>e("/api/storefront/block-sources/",{token:r}),listRecordTypes:r=>e("/api/storefront/record-types/",{token:r}),createPagePreviewLink:(r,a)=>e(`/api/storefront/pages/${r}/preview-link/`,{method:"POST",token:a}),claimPageEditLock:(r,a,n,c=!1)=>e(`/api/storefront/pages/${r}/edit-lock/`,{method:"POST",body:JSON.stringify({client_id:n,takeover:c}),token:a}),releasePageEditLock:(r,a)=>e(`/api/storefront/pages/${r}/edit-lock/`,{method:"DELETE",token:a}),createTemplate:(r,a,n)=>e("/api/storefront/page-templates/",{method:"POST",body:JSON.stringify({name:r,layout:a}),headers:U,token:n}),getTemplate:(r,a)=>e(`/api/storefront/page-templates/${r}/`,{token:a}),saveTemplateLayout:(r,a,n)=>e(`/api/storefront/page-templates/${r}/`,{method:"PATCH",body:JSON.stringify({layout:a}),headers:U,token:n}),listTemplatePages:async(r,a)=>{const n=await e(`/api/storefront/template-pages/?template=${encodeURIComponent(r)}`,{token:a});return Array.isArray(n)?n:n.results??[]},findTemplatePageBySlug:async(r,a,n)=>{const c=await e(`/api/storefront/template-pages/?template=${encodeURIComponent(r)}&slug=${encodeURIComponent(a)}`,{token:n});return(Array.isArray(c)?c:c.results??[])[0]??null},createTemplatePage:(r,a,n)=>e("/api/storefront/template-pages/",{method:"POST",body:JSON.stringify({template:r,...a}),headers:U,token:n}),saveTemplatePageLayout:(r,a,n)=>e(`/api/storefront/template-pages/${r}/`,{method:"PATCH",body:JSON.stringify({layout:a}),headers:U,token:n}),deleteTemplatePage:(r,a,n)=>e(`/api/storefront/template-pages/${r}/`,{method:"DELETE",token:a,...n?.keepalive?{keepalive:!0}:{}}),listPages:async(r,a)=>{const n=new URLSearchParams({no_page:"true"});a&&n.set("site",a);const c=await e(`/api/storefront/pages/?${n.toString()}`,{token:r});return Array.isArray(c)?c:c.results??[]},createPage:(r,a,n,c)=>e("/api/storefront/pages/",{method:"POST",body:JSON.stringify({title:r,slug:a,layout:n}),token:c}),deletePage:(r,a)=>e(`/api/storefront/pages/${r}/`,{method:"DELETE",token:a}),getHeaderSettings:(r,a)=>e(o(a),{token:r}),listMenus:async(r,a)=>{const n=new URLSearchParams({no_page:"true"});a&&n.set("site",a);const c=await e(`/api/storefront/menus/?${n}`,{token:r});return Array.isArray(c)?c:c.results??[]},listBlogPosts:async(r,a={})=>{const n=new URLSearchParams({no_page:"true"});a.visibleOnly&&n.set("is_visible","true"),a.siteId&&n.set("site",a.siteId);const c=await e(`/api/storefront/blog-posts/?${n.toString()}`,{token:r});return Array.isArray(c)?c:c.results??[]},listFieldUsage:async(r,a)=>{const n=await e(`/api/storefront/field-usage/?site=${encodeURIComponent(a)}`,{token:r});return Array.isArray(n?.entries)?n.entries:[]},listCategories:async(r,a={})=>{const n=new URLSearchParams({no_page:"true"});a.visibleOnly&&n.set("is_visible","true"),a.siteId&&n.set("site",a.siteId);const c=await e(`/api/storefront/categories/?${n.toString()}`,{token:r});return[...Array.isArray(c)?c:c.results??[]].sort((S,R)=>S.sort_order-R.sort_order||S.name.localeCompare(R.name))},listForms:async(r,a={})=>{const n=new URLSearchParams({no_page:"true"});a.siteId&&n.set("site",a.siteId);const c=await e(`/api/storefront/forms/?${n.toString()}`,{token:r});return[...Array.isArray(c)?c:c.results??[]].sort((S,R)=>S.title.localeCompare(R.title))},listWheelSummaries:async(r,a={})=>{const n=new URLSearchParams;a.siteId&&n.set("site",a.siteId);const c=n.toString(),y=await e(`/api/storefront/wheel-curations/summaries/${c?`?${c}`:""}`,{token:r});return w(y)},listProducts:async(r,a={})=>{const n=new URLSearchParams;a.kinds?.length&&n.set("kind",a.kinds.join(",")),a.siteId&&n.set("site",a.siteId);const c=n.toString(),y=await e(`/api/storefront/products/${c?`?${c}`:""}`,{token:r});return w(y)},getWheelDetail:async(r,a,n={})=>{const c=new URLSearchParams({slug:a});return n.siteId&&c.set("site",n.siteId),x(w(await e(`/api/storefront/wheel-curations/detail/?${c.toString()}`,{token:r})))},updateHeaderSettings:(r,a,n)=>e(o(n),{method:"PATCH",body:JSON.stringify(r),token:a}),getSite:(r,a)=>e(_(r),{token:a}),listSites:async r=>{const a=await e("/api/storefront/sites/?no_page=true",{token:r});return Array.isArray(a)?a:a.results??[]},listSiteCurrencies:async(r,a)=>{const n=await e(zt(r),{token:a});return Array.isArray(n)?n:[]},publishSite:(r,a)=>e(`${_(r)}publish/`,{method:"POST",token:a}),getSiteLiveState:(r,a)=>e(`${_(r)}live-state/`,{token:a}),getThemeSettings:(r,a)=>e(l(a),{token:r}),updateThemeSettings:(r,a,n)=>e(l(n),{method:"PATCH",body:JSON.stringify(r),token:a}),getMyPreferences:async r=>(await e("/api/auth/me/",{token:r})).preferences??{},updateMyPreferences:(r,a)=>e("/api/auth/me/",{method:"PATCH",body:JSON.stringify({preferences:r}),token:a}),getChatSettings:(r,a)=>e(p(a),{token:r}),updateChatSettings:(r,a,n)=>e(p(n),{method:"PATCH",body:JSON.stringify(r),token:a}),getSocialSettings:(r,a)=>e(g(a),{token:r}),updateSocialSettings:(r,a,n)=>e(g(n),{method:"PATCH",body:JSON.stringify(r),token:a}),uploadHeaderLogo:(r,a,n)=>{const c=new FormData;return c.append("logo",r),e(o(n),{method:"PATCH",body:c,token:a})},clearHeaderLogo:(r,a)=>e(o(a),{method:"PATCH",body:JSON.stringify({logo:null}),token:r}),setHeaderLogoFromAsset:(r,a,n)=>e(o(n),{method:"PATCH",body:JSON.stringify({logo_asset_id:r}),token:a}),uploadMedia:async(r,a)=>{const n=new FormData;return n.append("file",r),e(Xt(),{method:"POST",body:n,token:a})},listMedia:async(r,a)=>{const n=new URLSearchParams({no_page:"true"});a&&n.set("kind",a);const c=await e(`/api/storefront/media-assets/?${n.toString()}`,{token:r});return Array.isArray(c)?c:c.results??[]}}}const we=Yt({siteDrafts:!0});export{ht as API_URL,jt as AmbiguousPageSlugError,m as ApiError,mt as BROWSER_READ_TIMEOUT_MS,gt as EFFICIENT_CLIENT_CLOSED_MESSAGE,Vt as MediaUploadDestinationError,Bt as PREVIEW_PARAM,Pe as PRODUCT_API_BASE,wt as SERVER_READ_TIMEOUT_MS,N as SERVER_UNREACHABLE_MESSAGE,I as STATUS_NETWORK_ERROR,ge as adminFetch,Et as api,i as apiFetch,C as appendSiteQuery,fe as bookings,Yt as createStorefrontAdmin,H as defaultRequestDeadline,Xt as editorMediaUploadPath,Ot as editorPortalAudience,At as editorRequestLanguage,ye as fitment,he as products,St as readDeadlineMs,Ht as resolveClientIp,w as resolveMediaUrls,qt as resolvePreviewToken,et as resolveSiteHost,xt as resolveSiteHostSource,Ft as resolveSiteSlug,ce as setEditorLanguage,ie as setEditorPortalAudience,we as storefrontAdmin};
|
|
1
|
+
import{PREVIEW_TOKEN_HEADER as ot,SITE_HOST_HEADER as it,SITE_SLUG_HEADER as ct}from"../site-headers.js";import{PRODUCT_API_BASE as dt,PRODUCT_BACKEND_URL as D}from"./origins.js";import{backendHopHeaders as ut,clientIpFromForwardedFor as lt,FORWARDED_FOR_HEADER as pt,hopCachingOf as yt}from"../forwarded-for.js";import ht from"efficient-web-builder/format/lib/document/media-manifest.json";import{auth as P}from"../auth.js";import{efficientClientOpen as ft}from"efficient-easel/screen/lib/session";import{listableWheelSummaries as E}from"../wheels/listable-wheels.js";import{dropRenderlessFinishes as x}from"../wheels/renderable-finishes.js";const gt=process.env.NEXT_PUBLIC_API_URL??"http://localhost:8000";class w extends Error{status;data;constructor(e,s,n){super(s),this.status=e,this.data=n}}const I="Unable to reach the server. This could be a problem with your internet connection, or the server may be undergoing maintenance or an upgrade. Please try again shortly.",mt=new Set([502,503,504]),N=0,wt="This editor runs on its host's own backend, which does not serve this request.",St=5e3,Pt=15e3,Ot=()=>typeof window>"u"?St:Pt;function H(t){const e=(t.method??"GET").toUpperCase();if(!(t.body!=null||e!=="GET"&&e!=="HEAD")&&!(t.audience!=null&&t.audience!=="shop")&&typeof AbortSignal?.timeout=="function")return AbortSignal.timeout(Ot())}const F=t=>t instanceof Error&&t.name==="TimeoutError",M=(t,e)=>mt.has(t)?I:e,bt=["admin","venue"];let B="admin";function ye(t){B=bt.includes(t)?t:"admin"}function At(){return B}const Tt=/^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{1,8})*$/;let q=null;function he(t){q=t&&Tt.test(t)?t:null}function Rt(){return q}function Et(t){if(typeof window>"u"||!t.startsWith("/api/v1/"))return t;const e=V();return!e||/[?&]site=/.test(t)?t:$(t,`site=${encodeURIComponent(e)}`)}async function i(t,e={}){const{token:s,baseUrl:n,headers:l,audience:p,...h}=e;if(typeof window<"u"&&!ft())throw new w(N,wt,null);if(typeof window>"u"&&n===void 0)throw new Error(`apiFetch(${JSON.stringify(t)}) ran on the server without an explicit baseUrl. The API_URL default it would inherit is browser-only (the prod image bakes NEXT_PUBLIC_API_URL="" for same-origin use, which a Node fetch cannot resolve). Pass a base explicitly: \`await backendOpts()\` (or baseUrl: PRODUCT_FETCH_BASE) for product reads, or the server-only PRODUCT_BACKEND_URL env for other backend surfaces.`);const r=typeof FormData<"u"&&h.body instanceof FormData;let a;try{a=await fetch(`${n??gt}${Et(t)}`,{...h,headers:{...r?{}:{"Content-Type":"application/json"},...s?{Authorization:`Bearer ${s}`}:{},...p===null?{}:{"X-Portal-Audience":p??"shop"},...l},signal:h.signal??H({...h,audience:p})})}catch(y){throw y instanceof TypeError||F(y)?new w(N,I,null):y}let o;try{o=await a.text()}catch(y){throw F(y)?new w(N,I,null):y}let c=null;if(o)try{c=JSON.parse(o)}catch{throw new w(a.status,a.ok?"Expected JSON but received a non-JSON response":M(a.status,a.statusText),o)}if(!a.ok){const y=(c&&typeof c=="object"&&"detail"in c&&typeof c.detail=="string"?c.detail:null)??M(a.status,a.statusText);throw new w(a.status,y,c)}return c}let b=null;async function G(){return b||(b=$t().finally(()=>{b=null}),b)}async function $t(){const t=P.takeLegacyRefresh(),e=await Ut.refresh(t??void 0);return P.setTokens(e.access),e.access}async function W(){return P.getAccess()??G()}async function g(t,e={}){let s;try{s=await W()}catch{throw P.clear(),new w(401,"Not signed in",null)}try{return await i(t,{...e,token:s})}catch(n){if(!(n instanceof w)||n.status!==401)throw n;try{const l=await G();return await i(t,{...e,token:l})}catch{throw P.clear(),n}}}const Ct=100,j=20;function _t(t){if(!t)return null;try{return new URL(t,"http://page.invalid").searchParams.get("page")}catch{return null}}async function z(t,e){const[s,n=""]=t.split("?"),l=[];let p="1";for(let h=0;h<j&&p;h++){const r=new URLSearchParams(n);r.set("page_size",String(Ct)),p!=="1"&&r.set("page",p);const a=await g(`${s}?${r.toString()}`);l.push(...a.results),p=_t(a.next)}return p&&console.warn(`[${e}] stopped at ${j} pages (${l.length} rows); list may be truncated`),l}async function K(t,e={}){if(P.getAccess())try{return{data:await g(t,e),asShopper:!0}}catch(s){if(!(s instanceof w)||s.status!==401)throw s}return{data:await i(t,e),asShopper:!1}}async function X(){const t=await g("/api/auth/me/");if(t.portal!=="shop")throw P.clear(),new w(403,"This session is not valid for this shop.",null);return t}const Ut={login:(t,e)=>i("/api/auth/login/",{method:"POST",body:JSON.stringify({email:t,password:e,portal:"shop"}),credentials:"include"}),refresh:t=>i("/api/auth/refresh/",{method:"POST",body:JSON.stringify(t?{refresh:t,portal:"shop"}:{portal:"shop"}),credentials:"include"}),logout:async()=>{P.clear();try{await i("/api/auth/logout/",{method:"POST",body:JSON.stringify({portal:"shop"}),credentials:"include"})}catch{}},restoreSession:async()=>{const t=await W();return await X(),t},me:X,updateMe:t=>g("/api/auth/me/",{method:"PATCH",body:JSON.stringify(t)}),changePassword:(t,e)=>g("/api/auth/me/",{method:"PATCH",body:JSON.stringify({password:e,old_password:t})}),changeEmail:(t,e)=>g("/api/shop-portal/change-email/",{method:"POST",body:JSON.stringify({new_email:t,current_password:e})}),myProfile:()=>g("/api/shop-portal/profile/"),updateMyProfile:t=>g("/api/shop-portal/profile/",{method:"PATCH",body:JSON.stringify(t)}),myAddresses:()=>g("/api/shop-portal/delivery-locations/"),createAddress:t=>g("/api/shop-portal/delivery-locations/",{method:"POST",body:JSON.stringify(t)}),updateAddress:(t,e)=>g(`/api/shop-portal/delivery-locations/${t}/`,{method:"PATCH",body:JSON.stringify(e)}),deleteAddress:t=>g(`/api/shop-portal/delivery-locations/${t}/`,{method:"DELETE"}),passwordResetRequest:t=>i("/api/auth/password-reset/",{method:"POST",body:JSON.stringify({email:t})}),passwordResetConfirm:(t,e,s)=>i("/api/auth/password-reset/confirm/",{method:"POST",body:JSON.stringify({uid:t,token:e,new_password:s})}),brands:()=>g("/api/products/brands/"),myOrders:()=>z("/api/shop-portal/orders/","api.myOrders"),myOrder:t=>g(`/api/shop-portal/orders/${t}/`),cancelOrder:t=>g(`/api/shop-portal/orders/${t}/cancel/`,{method:"POST"}),myReturns:t=>z(`/api/shop-portal/returns/${t?`?order=${encodeURIComponent(t)}`:""}`,"api.myReturns"),createReturn:t=>g("/api/shop-portal/returns/",{method:"POST",body:JSON.stringify(t)}),withdrawReturn:t=>g(`/api/shop-portal/returns/${t}/cancel/`,{method:"POST"}),uploadReturnPhoto:(t,e)=>{const s=new FormData;return s.append("claim_item",t),s.append("file",e),s.append("media_type",e.type.startsWith("video/")?"video":"image"),g("/api/shop-portal/return-media/",{method:"POST",body:s})}};import{media as It,absolutizeApiUrl as v}from"efficient-web-builder/render/lib/media";import{analyzeLogoSvg as Nt,isSvgUrl as vt}from"efficient-web-builder/format/lib/logo/reverse-svg";import{getEditorSiteId as kt}from"efficient-web-builder/render/lib/editor-site";import{shopRouteBase as Lt,webRuntimeSiteSlug as V}from"efficient-web-builder/format/lib/web-runtime";import{readDealerList as Jt}from"../sections/dealer-finder.js";function m(t){if(typeof t=="string")return t.startsWith("/media/")?It(t):t;if(Array.isArray(t))return t.map(m);if(t&&typeof t=="object"){const e={};for(const[s,n]of Object.entries(t))e[s]=s==="captions"&&n&&typeof n=="object"&&!Array.isArray(n)?Object.fromEntries(Object.entries(n).map(([l,p])=>[m(l),p])):m(n);return e}return t}import{PRODUCT_API_BASE as Ce}from"./origins.js";const Z=typeof window>"u"&&D!=="",Dt=Z?D:dt,xt=Lt,O=()=>({baseUrl:xt(),audience:null});function d(t,e){const s=e?`?process=${encodeURIComponent(e)}`:"";return`/api/v1${t}${s}`}const Y=100,Q=50;function k(t,e,s){const n=new URLSearchParams;for(const[l,p]of Object.entries(e))p!=null&&p!==""&&n.set(l,String(p));return n.set("pageSize",String(Y)),s&&n.set("cursor",s),`/api/v1${t}?${n.toString()}`}function Ht(t,e){return k("/wheels",{process:t},e)}const tt=Y;function Ft(t,e){return k("/wheels",{slug:t.join(",")},e)}function Mt(t,e,s){return k("/products",{kind:t.join(","),make:e?.make,model:e?.model,year:e?.year,modification:e?.modification},s)}function Bt(t){if(!t)return null;try{return new URL(t,"http://cursor.invalid").searchParams.get("cursor")}catch{return null}}async function L(t,e,s=()=>!1,n=()=>!1){const l=[];let p=null;try{for(let h=0;h<Q;h++){const r=await i(await e(p),await u());if(l.push(...r.results),p=Bt(r.next),!p)break;if(n(l))return l}p&&console.warn(`[${t}] stopped at ${Q} pages (${l.length} rows); catalog may be truncated`)}catch(h){if(s(h))throw h;console.warn(`[${t}] product API unavailable, returning []`,h)}return l}const et=t=>t instanceof w&&t.status===400;function rt(t){return t.flatMap(e=>e.kind==="alloy-wheel"?E([e]):[e])}async function at(){return(await qt()).host}async function qt(){try{const{headers:t}=await import("next/headers"),e=await t(),s=p=>p?.split(",")[0]?.split(":")[0]?.trim().toLowerCase()||null,n=s(e.get(it)??e.get("x-forwarded-host")??e.get("host")),l=s(e.get("host"));return{host:n,matchesRequestHost:n!==null&&n===l}}catch{return{host:null,matchesRequestHost:!1}}}async function Gt(){try{const{headers:t}=await import("next/headers");return lt((await t()).get(pt))}catch{return null}}async function Wt(){try{const{headers:t}=await import("next/headers");return(await t()).get(ct)||null}catch{return null}}async function jt(){const t=await Wt();if(t)return`site=${encodeURIComponent(t)}`;const e=await at();return e?`host=${encodeURIComponent(e)}`:""}async function f(t){if(typeof window<"u"){const e=V();return e?$(t,`site=${encodeURIComponent(e)}`):t}return $(t,await jt())}function $(t,e){return e?`${t}${t.includes("?")?"&":"?"}${e}`:t}const zt="preview";async function Kt(){if(typeof window<"u")return null;try{const{headers:t}=await import("next/headers");return(await t()).get(ot)}catch{return null}}async function Xt(){try{const{headers:t}=await import("next/headers");return(await t()).get("user-agent")}catch{return null}}async function J(t,e){const s=await Kt();if(s===null)return[await f(t),await u(e)];const n=$(await f(t),`${zt}=${encodeURIComponent(s)}`),{next:l,cache:p,...h}=e??{},r=await u({...h,cache:"no-store"}),a=await Xt();return a&&(r.headers={...r.headers,"user-agent":a}),[n,r]}async function Vt(t){if(!Z)return;const[e,s]=await Promise.all([at(),Gt()]),n=ut(e,s,t);return Object.keys(n).length>0?n:void 0}async function u(t){const e=await Vt(yt(t)),s={baseUrl:Dt,...t};return e&&(s.headers={...e,...t?.headers}),s}const A=typeof window>"u";function T(t,e){const s=new URLSearchParams;for(const[l,p]of Object.entries(e))p!==void 0&&p!==""&&s.set(l,String(p));const n=s.toString();return`/api/v1/fitment${t}${n?`?${n}`:""}`}const Pe={listMakes:async t=>{if(A){const{fitmentData:s}=await import("./fitment-data.js");return s.makes(t)}return(await i(T("/makes",{region:t}),O())).results},listModels:async(t,e)=>{if(A){const{fitmentData:n}=await import("./fitment-data.js");return n.models(t,e)}return(await i(T("/models",{make:t,region:e}),O())).results},listYears:async(t,e,s)=>{if(A){const{fitmentData:l}=await import("./fitment-data.js");return l.years(t,e,s)}return(await i(T("/years",{make:t,model:e,region:s}),O())).results},listModifications:async(t,e,s,n)=>{if(A){const{fitmentData:p}=await import("./fitment-data.js");return p.modifications(t,e,s,n)}return(await i(T("/modifications",{make:t,model:e,year:s,region:n}),O())).results},getStockFitment:async(t,e,s,n,l)=>{if(A){const{fitmentData:p}=await import("./fitment-data.js");return p.stockFitment(t,e,s,n,l)}return i(T("/stock-fitment",{make:t,model:e,year:s,modification:n,region:l}),O())}},Oe={listWheels:async(t,e={})=>{const s=await L("products.listWheels",async n=>await f(Ht(t,n)),e.throwOnFailure?()=>!0:void 0,e.maxRows===void 0?void 0:n=>E([...n]).length>=e.maxRows);return E(m(s))},listWheelsBySlug:async(t,e={})=>{const s=[...new Set(t.map(r=>r.trim()).filter(Boolean))];if(s.length===0)return[];const n=[];for(let r=0;r<s.length;r+=tt)n.push(s.slice(r,r+tt));const l=await Promise.all(n.map(r=>L("products.listWheelsBySlug",async a=>await f(Ft(r,a)),e.throwOnFailure?()=>!0:et))),p=new Set(s),h=l.flat().filter(r=>p.has(r.slug));return E(m(h))},listCatalog:async(t,e,s={})=>{if(t.length===0)throw new Error("products.listCatalog() needs at least one kind. An empty list would omit `kind`, which the contract reads as `alloy-wheel` — so the call would silently return the wheel catalog instead of nothing.");const n=await L("products.listCatalog",async l=>await f(Mt(t,e,l)),s.throwOnFailure?()=>!0:et,s.maxRows===void 0?void 0:l=>rt([...l]).length>=s.maxRows);return rt(m(n))},getWheel:async t=>x(m(await i(await f(d(`/wheels/${t}`)),await u()))),getTyre:async t=>m(await i(await f(d(`/tyres/${t}`)),await u())),listBundles:async(t={})=>{try{return await i(await f(d("/bundles")),await u())}catch(e){if(t.throwOnFailure)throw e;return[]}},getBundle:async t=>i(await f(d(`/bundles/${t}`)),await u()),listGalleryBuilds:async(t={})=>{const{process:e=null,wheelSlug:s=null}=t;if(typeof window>"u"){const{listGalleryBuilds:n}=await import("./gallery-builds-data.js");return m(n(e,s))}try{const n=new URLSearchParams;e&&n.set("process",e),s&&n.set("wheelSlug",s);const l=n.toString(),p=await i(`/api/v1/gallery-builds${l?`?${l}`:""}`,O());return m(p.results)}catch(n){return console.warn("[products.listGalleryBuilds] product API unavailable, returning []",n),[]}},getSite:async()=>i(await f(d("/site")),await u()),getSiteBySlug:async t=>i(`${d("/site")}?${new URLSearchParams({site:t})}`,typeof window>"u"?await u():void 0),listPages:async()=>m(await i(await f(d("/pages")),await u())),listPopups:async()=>i(await f(d("/popups")),await u()),listProductTemplates:async()=>{try{return await i(await f(d("/product-templates")),await u())}catch(t){return console.warn("[products.listProductTemplates] unavailable, returning []",t),[]}},listDynamicPages:async t=>{const e=t?`?recordType=${encodeURIComponent(t)}`:"";try{return await i(await f(`${d("/dynamic-pages")}${e}`),await u())}catch(s){if(s instanceof w&&s.status===404)return[];throw s}},getRecord:async(t,e)=>{try{return await i(await f(d(`/records/${encodeURIComponent(t)}/${encodeURIComponent(e)}`)),await u())}catch(s){if(s instanceof w&&s.status===404)return null;throw s}},listRecordKeys:async t=>{try{const e=await i(await f(d(`/records/${encodeURIComponent(t)}`)),await u({cache:"no-store"}));return Array.isArray(e?.keys)?e.keys.filter(s=>typeof s=="string"&&s!==""):[]}catch(e){if(e instanceof w&&e.status===404)return[];throw e}},listProductTypeChoices:async()=>{try{return await i(await f(d("/product-type-choices")),await u())}catch(t){return console.warn("[products.listProductTypeChoices] unavailable, returning []",t),[]}},listFieldUsage:async()=>{try{return await i(await f(d("/field-usage")),await u())}catch(t){return console.warn("[products.listFieldUsage] unavailable, returning []",t),[]}},getPage:async(t,e={})=>{const s=e.record?`?record=${encodeURIComponent(e.record)}`:"",[n,l]=await J(d(`/pages/${t}`)+s,e.revalidate!==void 0?{next:{revalidate:e.revalidate}}:void 0);return m(await i(n,l))},listBlogPosts:async(t={},{throwOnFailure:e=!1}={})=>{const s=t.category?`?category=${encodeURIComponent(t.category)}`:"";try{return(await i(d("/blog-posts")+s,await u())).map(l=>({...l,coverImage:v(l.coverImage)??""}))}catch(n){if(e)throw n;return console.warn("[products.listBlogPosts] blog API unavailable, returning []",n),[]}},getBlogPost:async t=>{const e=await i(d(`/blog-posts/${t}`),await u());return{...e,coverImage:v(e.coverImage)??""}},createOrder:async t=>i(d("/orders"),await u({method:"POST",body:JSON.stringify(t)})),createOrderAuthed:async t=>g(d("/orders"),await u({method:"POST",body:JSON.stringify(t)})),lookupOrder:async t=>i(d("/orders/lookup"),await u({method:"POST",body:JSON.stringify(t)})),createPaymentIntent:async t=>i(d("/payments/intent"),await u({method:"POST",body:JSON.stringify(t)})),releaseCheckout:async t=>i(d("/checkouts/release"),await u({method:"POST",body:JSON.stringify(t)})),createPaypalOrder:async t=>i(d("/payments/paypal/order"),await u({method:"POST",body:JSON.stringify(t)})),capturePaypalOrder:async t=>i(d("/payments/paypal/capture"),await u({method:"POST",body:JSON.stringify(t)})),createAfterpayCheckout:async t=>i(d("/payments/afterpay/checkout"),await u({method:"POST",body:JSON.stringify(t)})),captureAfterpayPayment:async t=>i(d("/payments/afterpay/capture"),await u({method:"POST",body:JSON.stringify(t)})),chargeSquare:async t=>i(d("/payments/square/charge"),await u({method:"POST",body:JSON.stringify(t)})),createGocardlessBillingRequest:async t=>i(d("/payments/gocardless/billing-request"),await u({method:"POST",body:JSON.stringify(t)})),completeGocardlessPayment:async t=>i(d("/payments/gocardless/complete"),await u({method:"POST",body:JSON.stringify(t)})),createZipCheckout:async t=>i(d("/payments/zip/checkout"),await u({method:"POST",body:JSON.stringify(t)})),captureZipPayment:async t=>i(d("/payments/zip/capture"),await u({method:"POST",body:JSON.stringify(t)})),createKlarnaCheckout:async t=>i(d("/payments/klarna/checkout"),await u({method:"POST",body:JSON.stringify(t)})),captureKlarnaPayment:async t=>i(d("/payments/klarna/capture"),await u({method:"POST",body:JSON.stringify(t)})),createStockAlert:async t=>i(d("/stock-alerts"),await u({method:"POST",body:JSON.stringify(t)})),createPreOrderIntent:async t=>i(d("/pre-order-intents"),await u({method:"POST",body:JSON.stringify(t)})),createNewsletterSubscription:async t=>i(d("/newsletter-subscriptions"),await u({method:"POST",body:JSON.stringify(t)})),unsubscribeNewsletter:async t=>i(d("/newsletter-unsubscribe"),await u({method:"POST",body:JSON.stringify(t)})),captureCart:async t=>i(d("/carts"),await u({method:"POST",body:JSON.stringify(t)})),restoreCart:async t=>i(d("/carts/restore"),await u({method:"POST",body:JSON.stringify(t)})),unsubscribeCartReminders:async t=>i(d("/carts/unsubscribe"),await u({method:"POST",body:JSON.stringify(t)})),listReviews:async(t={})=>{const e=new URLSearchParams;t.limit&&e.set("limit",String(t.limit)),t.designCode&&e.set("designCode",t.designCode);const s=d("/reviews"),n=e.toString();try{return await i(await f(n?`${s}?${n}`:s),await u())}catch(l){return console.warn("[products.listReviews] product API unavailable, returning []",l),[]}},submitReview:async t=>i(d("/reviews"),await u({method:"POST",body:JSON.stringify(t)})),getForm:async t=>i(d(`/forms/${encodeURIComponent(t)}`),await u()),submitForm:async(t,e)=>i(d(`/forms/${encodeURIComponent(t)}/submissions`),await u({method:"POST",body:JSON.stringify(e)})),listShippingMethods:async()=>{try{return await i(d("/shipping-methods"),await u())}catch(t){return console.warn("[products.listShippingMethods] product API unavailable, returning []",t),[]}},listCountrySubdivisions:async t=>{try{return await i(d(`/countries/${encodeURIComponent(t)}/subdivisions`),await u())}catch(e){return console.warn("[products.listCountrySubdivisions] unavailable, returning []",e),[]}},quoteCart:async t=>{const e=d("/cart/quote"),s=await u({method:"POST",body:JSON.stringify(t)});return t.couponCode?(await K(e,s)).data:i(e,s)},validateCoupon:async t=>{const{data:e,asShopper:s}=await K(d("/coupons/validate"),await u({method:"POST",body:JSON.stringify(t)}));return{...e,askedAsShopper:s}},getHeaderSettings:async()=>{const t=H({method:"GET"}),e=await i(...await J(d("/header-settings"),{signal:t})),s=v(e.logoUrl);let n=null,l=null;if(s&&vt(s)){const p=await Nt(s,t);p&&(n=p.reversed,l=p.inkIsDark)}return{...e,logoUrl:s,logoReversed:n,logoInkIsDark:l}},getThemeSettings:async()=>i(...await J(d("/theme-settings"))),getChatSettings:async()=>i(await f(d("/chat-settings")),await u())},be={listServices:async()=>{try{return await i(d("/bookings/services"),await u())}catch(t){return console.warn("[bookings.listServices] API unavailable, returning []",t),{results:[],currency:"USD"}}},getAvailability:async(t,e)=>i(d(`/bookings/availability?service=${encodeURIComponent(t)}&date=${e}`),await u()),create:async t=>i(d("/bookings"),await u({method:"POST",body:JSON.stringify(t)})),get:async t=>i(d(`/bookings/manage/${encodeURIComponent(t)}`),await u()),cancel:async t=>i(d(`/bookings/manage/${encodeURIComponent(t)}/cancel`),await u({method:"POST"})),createPaymentIntent:async t=>i(d("/bookings/payments/intent"),await u({method:"POST",body:JSON.stringify({manageToken:t})}))};class Zt extends Error{slug;count;constructor(e,s){super(`Slug "${e}" exists on ${s} websites; a site is required to pick one.`),this.slug=e,this.count=s,this.name="AmbiguousPageSlugError"}}const C=(t,e,s)=>{const n=new URLSearchParams({...e?{site:e}:{},...s?{draft:"1"}:{}}).toString();return`/api/storefront/${t}/${n?`?${n}`:""}`},_=t=>`/api/storefront/sites/${encodeURIComponent(t)}/`,Yt=t=>`${_(t)}currencies/`,Qt="/api/storefront/media/ingest/";class te extends Error{constructor(){super("This editor is not connected to a website, so an upload has nowhere to go. Open the page from the website the file should belong to, then try again."),this.name="MediaUploadDestinationError"}}function ee(){const t=kt();if(!t)throw new te;return`${Qt}?${new URLSearchParams({site:t})}`}const re="X-Puck-Media-Manifest",st=ht.contentHash,U={"X-Media-Manifest":st,[re]:st},Ae=nt({});function nt(t){return(e,s={})=>{const n=Rt(),l=t.headers||n?{...n?{"Accept-Language":n}:{},...t.headers,...s.headers}:void 0;return i(e,{...s,...t.baseUrl!==void 0?{baseUrl:t.baseUrl}:{},...l?{headers:l}:{},audience:t.audience??At()})}}function ae(t={}){const e=nt(t),s=t.siteDrafts===!0,n=r=>C("header-settings",r,s),l=r=>C("theme-settings",r,s),p=r=>C("chat-settings",r,s),h=r=>C("social-settings",r,s);return{findPageBySlug:async(r,a,o)=>{const c=new URLSearchParams({slug:r});o&&c.set("site",o);const y=await e(`/api/storefront/pages/?${c.toString()}`,{token:a}),S=Array.isArray(y)?y:y.results??[];if(!o&&S.length>1)throw new Zt(r,S.length);return S[0]??null},getPageById:(r,a)=>e(`/api/storefront/pages/${r}/`,{token:a}),saveLayout:(r,a,o,c,y)=>e(`/api/storefront/pages/${r}/`,{method:"PATCH",body:JSON.stringify({layout:a,expected_updated_at:c,...y?{client_id:y}:{}}),token:o}),duplicatePage:(r,a,o)=>e(`/api/storefront/pages/${r}/duplicate/`,{method:"POST",body:JSON.stringify({title:a.title,slug:a.slug}),token:o}),geocode:(r,a,o)=>e(`/api/storefront/geocode/?${new URLSearchParams(o?{q:r,country:o}:{q:r})}`,{token:a}),listBlockSources:r=>e("/api/storefront/block-sources/",{token:r}),listRecordTypes:r=>e("/api/storefront/record-types/",{token:r}),createPagePreviewLink:(r,a)=>e(`/api/storefront/pages/${r}/preview-link/`,{method:"POST",token:a}),claimPageEditLock:(r,a,o,c=!1)=>e(`/api/storefront/pages/${r}/edit-lock/`,{method:"POST",body:JSON.stringify({client_id:o,takeover:c}),token:a}),releasePageEditLock:(r,a)=>e(`/api/storefront/pages/${r}/edit-lock/`,{method:"DELETE",token:a}),createTemplate:(r,a,o)=>e("/api/storefront/page-templates/",{method:"POST",body:JSON.stringify({name:r,layout:a}),headers:U,token:o}),getTemplate:(r,a)=>e(`/api/storefront/page-templates/${r}/`,{token:a}),saveTemplateLayout:(r,a,o)=>e(`/api/storefront/page-templates/${r}/`,{method:"PATCH",body:JSON.stringify({layout:a}),headers:U,token:o}),listTemplatePages:async(r,a)=>{const o=await e(`/api/storefront/template-pages/?template=${encodeURIComponent(r)}`,{token:a});return Array.isArray(o)?o:o.results??[]},findTemplatePageBySlug:async(r,a,o)=>{const c=await e(`/api/storefront/template-pages/?template=${encodeURIComponent(r)}&slug=${encodeURIComponent(a)}`,{token:o});return(Array.isArray(c)?c:c.results??[])[0]??null},createTemplatePage:(r,a,o)=>e("/api/storefront/template-pages/",{method:"POST",body:JSON.stringify({template:r,...a}),headers:U,token:o}),saveTemplatePageLayout:(r,a,o)=>e(`/api/storefront/template-pages/${r}/`,{method:"PATCH",body:JSON.stringify({layout:a}),headers:U,token:o}),deleteTemplatePage:(r,a,o)=>e(`/api/storefront/template-pages/${r}/`,{method:"DELETE",token:a,...o?.keepalive?{keepalive:!0}:{}}),listPages:async(r,a)=>{const o=new URLSearchParams({no_page:"true"});a&&o.set("site",a);const c=await e(`/api/storefront/pages/?${o.toString()}`,{token:r});return Array.isArray(c)?c:c.results??[]},createPage:(r,a,o,c)=>e("/api/storefront/pages/",{method:"POST",body:JSON.stringify({title:r,slug:a,layout:o}),token:c}),deletePage:(r,a)=>e(`/api/storefront/pages/${r}/`,{method:"DELETE",token:a}),getHeaderSettings:(r,a)=>e(n(a),{token:r}),listMenus:async(r,a)=>{const o=new URLSearchParams({no_page:"true"});a&&o.set("site",a);const c=await e(`/api/storefront/menus/?${o}`,{token:r});return Array.isArray(c)?c:c.results??[]},listBlogPosts:async(r,a={})=>{const o=new URLSearchParams({no_page:"true"});a.visibleOnly&&o.set("is_visible","true"),a.siteId&&o.set("site",a.siteId);const c=await e(`/api/storefront/blog-posts/?${o.toString()}`,{token:r});return Array.isArray(c)?c:c.results??[]},listFieldUsage:async(r,a)=>{const o=await e(`/api/storefront/field-usage/?site=${encodeURIComponent(a)}`,{token:r});return Array.isArray(o?.entries)?o.entries:[]},listCategories:async(r,a={})=>{const o=new URLSearchParams({no_page:"true"});a.visibleOnly&&o.set("is_visible","true"),a.siteId&&o.set("site",a.siteId);const c=await e(`/api/storefront/categories/?${o.toString()}`,{token:r});return[...Array.isArray(c)?c:c.results??[]].sort((S,R)=>S.sort_order-R.sort_order||S.name.localeCompare(R.name))},listForms:async(r,a={})=>{const o=new URLSearchParams({no_page:"true"});a.siteId&&o.set("site",a.siteId);const c=await e(`/api/storefront/forms/?${o.toString()}`,{token:r});return[...Array.isArray(c)?c:c.results??[]].sort((S,R)=>S.title.localeCompare(R.title))},listWheelSummaries:async(r,a={})=>{const o=new URLSearchParams;a.siteId&&o.set("site",a.siteId);const c=o.toString(),y=await e(`/api/storefront/wheel-curations/summaries/${c?`?${c}`:""}`,{token:r});return m(y)},listProducts:async(r,a={})=>{const o=new URLSearchParams;a.kinds?.length&&o.set("kind",a.kinds.join(",")),a.siteId&&o.set("site",a.siteId);const c=o.toString(),y=await e(`/api/storefront/products/${c?`?${c}`:""}`,{token:r});return m(y)},getWheelDetail:async(r,a,o={})=>{const c=new URLSearchParams({slug:a});return o.siteId&&c.set("site",o.siteId),x(m(await e(`/api/storefront/wheel-curations/detail/?${c.toString()}`,{token:r})))},updateHeaderSettings:(r,a,o)=>e(n(o),{method:"PATCH",body:JSON.stringify(r),token:a}),getSite:(r,a)=>e(_(r),{token:a}),listSites:async r=>{const a=await e("/api/storefront/sites/?no_page=true",{token:r});return Array.isArray(a)?a:a.results??[]},listSiteCurrencies:async(r,a)=>{const o=await e(Yt(r),{token:a});return Array.isArray(o)?o:[]},publishSite:(r,a)=>e(`${_(r)}publish/`,{method:"POST",token:a}),getSiteLiveState:(r,a)=>e(`${_(r)}live-state/`,{token:a}),getThemeSettings:(r,a)=>e(l(a),{token:r}),updateThemeSettings:(r,a,o)=>e(l(o),{method:"PATCH",body:JSON.stringify(r),token:a}),getMyPreferences:async r=>(await e("/api/auth/me/",{token:r})).preferences??{},updateMyPreferences:(r,a)=>e("/api/auth/me/",{method:"PATCH",body:JSON.stringify({preferences:r}),token:a}),getChatSettings:(r,a)=>e(p(a),{token:r}),updateChatSettings:(r,a,o)=>e(p(o),{method:"PATCH",body:JSON.stringify(r),token:a}),getSocialSettings:(r,a)=>e(h(a),{token:r}),updateSocialSettings:(r,a,o)=>e(h(o),{method:"PATCH",body:JSON.stringify(r),token:a}),uploadHeaderLogo:(r,a,o)=>{const c=new FormData;return c.append("logo",r),e(n(o),{method:"PATCH",body:c,token:a})},clearHeaderLogo:(r,a)=>e(n(a),{method:"PATCH",body:JSON.stringify({logo:null}),token:r}),setHeaderLogoFromAsset:(r,a,o)=>e(n(o),{method:"PATCH",body:JSON.stringify({logo_asset_id:r}),token:a}),uploadMedia:async(r,a)=>{const o=new FormData;return o.append("file",r),e(ee(),{method:"POST",body:o,token:a})},listMedia:async(r,a)=>{const o=new URLSearchParams({no_page:"true"});a&&o.set("kind",a);const c=await e(`/api/storefront/media-assets/?${o.toString()}`,{token:r});return Array.isArray(c)?c:c.results??[]}}}const Te=ae({siteDrafts:!0});function se(t){const e=t.trim();return e?`/api/v1/dealers?${new URLSearchParams({near:e}).toString()}`:"/api/v1/dealers"}async function Re(t){return Jt(await i(se(t)))}export{gt as API_URL,Zt as AmbiguousPageSlugError,w as ApiError,Pt as BROWSER_READ_TIMEOUT_MS,wt as EFFICIENT_CLIENT_CLOSED_MESSAGE,te as MediaUploadDestinationError,zt as PREVIEW_PARAM,Ce as PRODUCT_API_BASE,St as SERVER_READ_TIMEOUT_MS,I as SERVER_UNREACHABLE_MESSAGE,N as STATUS_NETWORK_ERROR,Ae as adminFetch,Ut as api,i as apiFetch,$ as appendSiteQuery,be as bookings,ae as createStorefrontAdmin,se as dealersPath,H as defaultRequestDeadline,ee as editorMediaUploadPath,At as editorPortalAudience,Rt as editorRequestLanguage,Re as fetchDealers,Pe as fitment,Oe as products,Ot as readDeadlineMs,Gt as resolveClientIp,m as resolveMediaUrls,Kt as resolvePreviewToken,at as resolveSiteHost,qt as resolveSiteHostSource,Wt as resolveSiteSlug,he as setEditorLanguage,ye as setEditorPortalAudience,Te as storefrontAdmin};
|
|
@@ -1586,6 +1586,7 @@ export interface components {
|
|
|
1586
1586
|
sectionContentWidth: "full" | "content" | null;
|
|
1587
1587
|
photographyGrayscale?: boolean;
|
|
1588
1588
|
englishVariant?: "international" | "us";
|
|
1589
|
+
shareButtonOnPosts?: boolean | null;
|
|
1589
1590
|
catalogFilterLabels?: {
|
|
1590
1591
|
vehicle?: string;
|
|
1591
1592
|
process?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FONT_ROLES as
|
|
1
|
+
import{FONT_ROLES as s}from"efficient-web-builder/format/lib/fonts";import{textKindVars as i}from"../content/text-kind-vars.js";const r=["step","name","value","note"],N={step:"Step",name:"Name",value:"Value",note:"Note"},p={step:"styleStep",name:"styleName",value:"styleValue",note:"styleNote"},a={step:{font:"--bk-step-font",size:"--bk-step-size"},name:{font:"--bk-name-font",size:"--bk-name-size"},value:{font:"--bk-value-font",size:"--bk-value-size"},note:{font:"--bk-note-font",size:"--bk-note-size"}};function f(e){return typeof e=="string"&&s.includes(e)?e:null}function c(e){const t={};for(const o of r){const n=f(e[p[o]]);n&&Object.assign(t,i(n,a[o]))}return t}export{p as BOOKING_KIND_PROP,a as BOOKING_KIND_VARS,r as BOOKING_TEXT_KINDS,N as BOOKING_TEXT_KIND_LABELS,f as bookingKindRole,c as bookingKindStyle};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SiteCountry } from "../content/site.js";
|
|
2
|
+
export type TaxNoteCountry = Pick<SiteCountry, "chargeTax" | "taxDisplay" | "taxName" | "taxRate">;
|
|
3
|
+
export declare const TAX_AT_CHECKOUT = "calculated at checkout";
|
|
4
|
+
export declare function taxNote(country: TaxNoteCountry | null | undefined): string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a="calculated at checkout";function l(e){if(!e||!e.chargeTax)return null;const t=(e.taxName??"").trim();return t?e.taxDisplay==="inclusive"?`incl. ${t}`:e.taxDisplay==="exclusive"?e.taxRate==null?`+ ${t}, ${a}`:`+ ${t}`:null:null}export{a as TAX_AT_CHECKOUT,l as taxNote};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CARD_ROW_FIELD_PROP as s}from"efficient-web-builder/format/lib/content/card-template";import{RECORD_TITLE_FIELD as m}from"efficient-web-builder/format/lib/content/record-row";import{TEMPLATE_RECORD_TYPE_PROP as _}from"efficient-web-builder/format/lib/content/record-types";import{BOX_TYPE as n,CONTAINER_BLOCKS_SLOT as r}from"efficient-web-builder/format/lib/document/container-blocks";import{BOX as
|
|
1
|
+
import{CARD_ROW_FIELD_PROP as s}from"efficient-web-builder/format/lib/content/card-template";import{RECORD_TITLE_FIELD as m}from"efficient-web-builder/format/lib/content/record-row";import{TEMPLATE_RECORD_TYPE_PROP as _}from"efficient-web-builder/format/lib/content/record-types";import{BOX_TYPE as n,CONTAINER_BLOCKS_SLOT as r}from"efficient-web-builder/format/lib/document/container-blocks";import{BOX as E,DIM as c,TEXT as O,boxPadding as p,labelLook as g,seedNodes as d}from"efficient-web-builder/format/lib/document/seed-parts";import{BLOG_POST_RECORD_TYPE as P}from"./article-body.js";import{ARTICLE_BODY_BLOCK as l,ARTICLE_HEADING_LOOK as T,ARTICLE_MEASURE as y,ARTICLE_PARAGRAPH_LOOK as R,articleBodySeed as B}from"./article-body-seed.js";const a={...E,direction:"column",align:"center"},i=(o,e,t)=>({type:"Text",props:{...e,text:"",[s]:o,align:"center",maxWidth:y,_partStyles:{text:{...t,align:"center"}}}}),L=[{type:n,props:{...a,name:"Title",gap:16,...p(64,32,40,20),sectionPaddingBottom:16,sectionPaddingBottomPhone:16},slots:{[r]:[i("category",{...c,tag:"p"},{textStyle:"body-1",...g(13)}),i(m,{...O,tag:"h1"},T),i("excerpt",{...c,tag:"p"},R)]}},{type:n,props:{...a,align:"stretch",name:"Cover",...p(0,0,0,0)},slots:{[r]:[{type:"ImageBlock",props:{[s]:"cover",aspect:"16/9",contained:!0,widthMode:"page",...p(0,32,0,20)}}]}},{type:n,props:{...a,name:"Body",...p(0,32,0,20),sectionPaddingBottom:64,sectionPaddingBottomPhone:40},slots:{[r]:[{type:l,props:{}}]}},{type:n,props:{...a,align:"stretch",name:"Breadcrumb",...p(0,0,0,0)},slots:{[r]:[{type:"Breadcrumb",props:{items:[{label:"Home",href:"/"},{label:"Journal",href:"/journal"}],meta:"",[s]:m}}]}}];function x(){const o=d(L,(e,t)=>`article-${e}-${t.replace(/\./g,"-")}`).map(A);return{root:{props:{[_]:P}},content:o,zones:{}}}function A(o){const e=o.props[r];return Array.isArray(e)?{...o,props:{...o.props,[r]:e.map(t=>t.type===l?{...t,props:{...t.props,template:B(String(t.props.id))}}:t)}}:o}export{x as articlePageDocument};
|
|
@@ -4,3 +4,19 @@ export interface MenuLinkRange {
|
|
|
4
4
|
}
|
|
5
5
|
export declare function resolveMenuLinkRange(v: unknown): MenuLinkRange | null;
|
|
6
6
|
export declare const menuLinkInRange: (r: MenuLinkRange, n: number) => boolean;
|
|
7
|
+
export declare const MENU_STYLE_PLAIN = "plain";
|
|
8
|
+
export declare const MENU_STYLE_TABS = "tabs";
|
|
9
|
+
export declare const MENU_STYLE_BUTTON = "button";
|
|
10
|
+
export interface MenuShow {
|
|
11
|
+
list: string;
|
|
12
|
+
button: string;
|
|
13
|
+
drawsButton: boolean;
|
|
14
|
+
listHead: string;
|
|
15
|
+
listTail: string;
|
|
16
|
+
buttonHead: string;
|
|
17
|
+
buttonTail: string;
|
|
18
|
+
strip: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function menuShowClasses(style: unknown, stylePhone: unknown): MenuShow;
|
|
21
|
+
export declare const MENU_PANEL_WIDTH_DEFAULT = 420;
|
|
22
|
+
export declare const MENU_PANEL_TINT_OPACITY_DEFAULT = 60;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const l=e=>typeof e=="number"&&Number.isInteger(e)&&e>=1?e:void 0;function s(e){if(!e||typeof e!="object")return null;const t=l(e.from)??1,n=l(e.to);return n!==void 0&&n<t||t===1&&n===void 0?null:n===void 0?{from:t}:{from:t,to:n}}const a=(e,t)=>t>=e.from&&(e.to===void 0||t<=e.to),b="plain",u="tabs",r="button",f=e=>e===void 0||e===""||e===null,i=(e,t,n,o="")=>({list:e,button:t,drawsButton:n,listHead:e,listTail:"",buttonHead:t,buttonTail:"",strip:o});function c(e,t){const n=f(t)||t===r;if(e===u){const d="hidden view-tablet:block";return f(t)||t===u?i("","",!1):t===r?i("hidden","flex view-tablet:hidden",!0,d):i("flex view-tablet:hidden","",!1,d)}const o=e===r;return!o&&!n?i("flex","",!1):o?n?i("hidden","flex",!0):i("flex view-tablet:hidden","hidden view-tablet:flex",!0):{...i("hidden view-tablet:flex","flex view-tablet:hidden",!0),listHead:"hidden",listTail:" view-tablet:flex",buttonHead:"flex",buttonTail:" view-tablet:hidden"}}const x=420,T=60;export{T as MENU_PANEL_TINT_OPACITY_DEFAULT,x as MENU_PANEL_WIDTH_DEFAULT,r as MENU_STYLE_BUTTON,b as MENU_STYLE_PLAIN,u as MENU_STYLE_TABS,a as menuLinkInRange,c as menuShowClasses,s as resolveMenuLinkRange};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{fontRoleOf as f}from"efficient-web-builder/format/lib/fonts";import{partStyleDeclarations as r}from"efficient-web-builder/render/lib/document/part-styles";const l={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:900};function s(i,n){const e=f(i);if(!e)return{};const t=r({role:e},l),o={};return t.fontFamily&&(o[n.font]=t.fontFamily),t.fontSize&&(o[n.size]=t.fontSize),o}export{s as textKindVars};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{SearchTool as i}from"../../../../../components/HeaderToolBlocks.js";import{SearchBlockMeta as s}from"./meta.js";const a={...s,render:({style:e,stylePhone:o,editor:r})=>t(i,{style:e,stylePhone:o,editing:r?.isEditing})};export{a as SearchBlockRender};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DEALER_WORDS as e}from"../../../../sections/dealer-finder.js";const l={label:"Find a dealer",defaultProps:{title:e.title}};export{l as DealerFinderMeta};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DealerList } from "../../../../sections/dealer-finder.js";
|
|
2
|
+
import type { BlockRender } from "efficient-web-builder/format/lib/document/blocks/block-types";
|
|
3
|
+
export declare const dealerFinderSample: () => DealerList;
|
|
4
|
+
export declare const DealerFinderRender: BlockRender;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import a from"../../../../../components/DealerFinderSection.js";import{readHidable as d}from"efficient-easel/screen/lib/document/hidable";import{DealerFinderMeta as s}from"./meta.js";const i=()=>({near:"found",dealers:[{id:"sample-1",name:"Harbour Wheels",address:"12 Quay St",city:"Sydney",state:"NSW",postcode:"2000",country:"AU",phone:"02 9000 0000",website:"https://example.com",lat:-33.86,lng:151.21,distanceKm:1.2},{id:"sample-2",name:"Western Tyres",address:"4 Great Western Hwy",city:"Parramatta",state:"NSW",postcode:"2150",country:"AU",phone:"02 9600 0000",website:"",lat:-33.81,lng:151,distanceKm:21.4}]}),o=e=>{const{text:t,hidden:n}=d(e);return n||!t?void 0:t},y={...s,render:e=>r(a,{title:o(e.title),contained:e.contained!==!1,sample:e.editor?.isEditing?i():void 0})};export{y as DealerFinderRender,i as dealerFinderSample};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import h from"../../../../../components/BoxHeaderBar.js";import
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import h from"../../../../../components/BoxHeaderBar.js";import f from"../../../../../components/SectionGroupBody.js";import{headerBarFromProps as l}from"../../../published-header-bar.js";import{SiteHeaderMeta as g}from"./meta.js";const S={...g,render:({sections:a,navTextCase:n,toolTextStyle:d,menuRow:p,sticky:m,topTextColor:s,heightPx:x,sectionAccent:c,editor:t,...r})=>{const o=i(f,{place:"header",sections:a,widths:r,navTextCase:n,menuRow:p,toolTextStyle:d,editing:t?.isEditing});if(!t?.isEditing)return o;const e=l({sticky:m,topTextColor:s,heightPx:x,sectionAccent:c,...r});return i(h,{sticky:e.sticky,topTextColor:e.topTextColor,heightPx:e.heightPx,theme:e.theme,bandCapped:e.bandCapped,children:o})}};export{S as SiteHeaderRender};
|
|
@@ -3,6 +3,7 @@ export declare const SERVICE_METAS: {
|
|
|
3
3
|
AppointmentBooking: Omit<BlockRender, "render">;
|
|
4
4
|
BookingBox: Omit<BlockRender, "render">;
|
|
5
5
|
ContactRouting: Omit<BlockRender, "render">;
|
|
6
|
+
DealerFinder: Omit<BlockRender, "render">;
|
|
6
7
|
Events: Omit<BlockRender, "render">;
|
|
7
8
|
Footer: Omit<BlockRender, "render">;
|
|
8
9
|
FooterDivider: Omit<BlockRender, "render">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SITE_FOOTER_TYPE as o,SITE_HEADER_TYPE as t}from"efficient-web-builder/format/lib/document/section-groups";import{AppointmentBookingMeta as r}from"./AppointmentBooking/meta.js";import{BookingBoxMeta as e}from"./BookingBox/meta.js";import{ContactRoutingMeta as i}from"./ContactRouting/meta.js";import{
|
|
1
|
+
import{SITE_FOOTER_TYPE as o,SITE_HEADER_TYPE as t}from"efficient-web-builder/format/lib/document/section-groups";import{AppointmentBookingMeta as r}from"./AppointmentBooking/meta.js";import{BookingBoxMeta as e}from"./BookingBox/meta.js";import{ContactRoutingMeta as i}from"./ContactRouting/meta.js";import{DealerFinderMeta as m}from"./DealerFinder/meta.js";import{EventsMeta as a}from"./Events/meta.js";import{FooterDividerMeta as p}from"./FooterDivider/meta.js";import{FooterEmailSignupMeta as n}from"./FooterEmailSignup/meta.js";import{FooterGroupMeta as M}from"./FooterGroup/meta.js";import{FooterLogoMeta as f}from"./FooterLogo/meta.js";import{FooterMenuMeta as F}from"./FooterMenu/meta.js";import{ArticleBodyMeta as g}from"./ArticleBody/meta.js";import{FooterMeta as s}from"./Footer/meta.js";import{FooterSocialMeta as l}from"./FooterSocial/meta.js";import{FooterPaymentMeta as u}from"./FooterPayment/meta.js";import{FooterTextMeta as B}from"./FooterText/meta.js";import{FormMeta as c}from"./Form/meta.js";import{LegalLineBlockMeta as S}from"./LegalLineBlock/meta.js";import{MenuLinkBlockMeta as b}from"./MenuLinkBlock/meta.js";import{OpeningHoursMeta as E}from"./OpeningHours/meta.js";import{RateTableMeta as d}from"./RateTable/meta.js";import{MessagingCardsMeta as R}from"./MessagingCards/meta.js";import{FooterMessagingMeta as k}from"./FooterMessaging/meta.js";import{ContactCardsMeta as T}from"./ContactCards/meta.js";import{RatingBlockMeta as C}from"./RatingBlock/meta.js";import{ReviewFormMeta as v}from"./ReviewForm/meta.js";import{ReviewsMeta as L}from"./Reviews/meta.js";import{SiteFooterMeta as x}from"./SiteFooter/meta.js";import{SiteHeaderMeta as A}from"./SiteHeader/meta.js";import{SubmitBoxMeta as D}from"./SubmitBox/meta.js";import{SubmitBuildMeta as _}from"./SubmitBuild/meta.js";import{SubscribeBlogsMeta as w}from"./SubscribeBlogs/meta.js";import{SubscribeMeta as y}from"./Subscribe/meta.js";const so={AppointmentBooking:r,BookingBox:e,ContactRouting:i,DealerFinder:m,Events:a,Footer:s,FooterDivider:p,FooterEmailSignup:n,FooterGroup:M,FooterLogo:f,FooterMenu:F,ArticleBody:g,FooterSocial:l,FooterPayment:u,FooterText:B,Form:c,LegalLineBlock:S,MenuLinkBlock:b,OpeningHours:E,RateTable:d,MessagingCards:R,FooterMessaging:k,ContactCards:T,RatingBlock:C,ReviewForm:v,Reviews:L,[o]:x,[t]:A,SubmitBox:D,SubmitBuild:_,Subscribe:y,SubscribeBlogs:w};export{so as SERVICE_METAS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SITE_FOOTER_TYPE as o,SITE_HEADER_TYPE as r}from"efficient-web-builder/format/lib/document/section-groups";import{AppointmentBookingRender as e}from"./AppointmentBooking/render.js";import{ArticleBodyRender as t}from"./ArticleBody/render.js";import{BookingBoxRender as i}from"./BookingBox/render.js";import{ContactRoutingRender as m}from"./ContactRouting/render.js";import{
|
|
1
|
+
import{SITE_FOOTER_TYPE as o,SITE_HEADER_TYPE as r}from"efficient-web-builder/format/lib/document/section-groups";import{AppointmentBookingRender as e}from"./AppointmentBooking/render.js";import{ArticleBodyRender as t}from"./ArticleBody/render.js";import{BookingBoxRender as i}from"./BookingBox/render.js";import{ContactRoutingRender as m}from"./ContactRouting/render.js";import{DealerFinderRender as n}from"./DealerFinder/render.js";import{EventsRender as R}from"./Events/render.js";import{FooterRender as d}from"./Footer/render.js";import{FooterDividerRender as p}from"./FooterDivider/render.js";import{FooterEmailSignupRender as f}from"./FooterEmailSignup/render.js";import{FooterGroupRender as a}from"./FooterGroup/render.js";import{FooterLogoRender as F}from"./FooterLogo/render.js";import{FooterMenuRender as g}from"./FooterMenu/render.js";import{FooterSocialRender as s}from"./FooterSocial/render.js";import{FooterPaymentRender as l}from"./FooterPayment/render.js";import{FooterTextRender as u}from"./FooterText/render.js";import{FormRender as B}from"./Form/render.js";import{LegalLineBlockRender as c}from"./LegalLineBlock/render.js";import{MenuLinkBlockRender as S}from"./MenuLinkBlock/render.js";import{OpeningHoursRender as E}from"./OpeningHours/render.js";import{RateTableRender as b}from"./RateTable/render.js";import{MessagingCardsRender as k}from"./MessagingCards/render.js";import{FooterMessagingRender as C}from"./FooterMessaging/render.js";import{ContactCardsRender as T}from"./ContactCards/render.js";import{RatingBlockRender as v}from"./RatingBlock/render.js";import{ReviewFormRender as L}from"./ReviewForm/render.js";import{ReviewsRender as M}from"./Reviews/render.js";import{SiteFooterRender as x}from"./SiteFooter/render.js";import{SiteHeaderRender as D}from"./SiteHeader/render.js";import{SubmitBoxRender as A}from"./SubmitBox/render.js";import{SubmitBuildRender as _}from"./SubmitBuild/render.js";import{SubscribeRender as w}from"./Subscribe/render.js";import{SubscribeBlogsRender as y}from"./SubscribeBlogs/render.js";const so={AppointmentBooking:e,BookingBox:i,ContactRouting:m,DealerFinder:n,Events:R,Footer:d,FooterDivider:p,FooterEmailSignup:f,FooterGroup:a,FooterLogo:F,FooterMenu:g,ArticleBody:t,FooterSocial:s,FooterPayment:l,FooterText:u,Form:B,LegalLineBlock:c,MenuLinkBlock:S,OpeningHours:E,RateTable:b,MessagingCards:k,FooterMessaging:C,ContactCards:T,RatingBlock:v,ReviewForm:L,Reviews:M,[o]:x,[r]:D,SubmitBox:A,SubmitBuild:_,Subscribe:w,SubscribeBlogs:y};export{so as SERVICE_RENDERS};
|
|
@@ -1145,6 +1145,16 @@
|
|
|
1145
1145
|
}
|
|
1146
1146
|
}
|
|
1147
1147
|
},
|
|
1148
|
+
"DealerFinder": {
|
|
1149
|
+
"title": {
|
|
1150
|
+
"type": "custom",
|
|
1151
|
+
"__text": {
|
|
1152
|
+
"control": "textarea",
|
|
1153
|
+
"label": "Heading",
|
|
1154
|
+
"placeholder": "Find a dealer"
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
},
|
|
1148
1158
|
"Events": {
|
|
1149
1159
|
"num": {
|
|
1150
1160
|
"type": "custom",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as B}from"react/jsx-runtime";import{declaredBlockSource as F,sourcedRows as E}from"efficient-web-builder/format/lib/content/block-sources";import y from"../../components/FooterMenu.js";const M={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",PaymentLogosBlock:"FooterPayment"},w="column";function O({id:o,template:e,menu:r,dataSource:n,dataRows:i,heading:l,accordionMobile:u,showDividers:c,direction:a,linkAlign:d,linkRange:m,menuStyle:s,currentPage:g,menuStylePhone:P,menuPanelWidth:f,menuPanelTintColor:k,menuPanelTintOpacity:p,editor:t}){return B(y,{owner:{id:String(o??""),type:"MenuBlock",template:e},menu:r,served:F({dataSource:n})?E({dataSource:n,dataRows:i},!!t?.isEditing).rows:void 0,heading:l||void 0,accordionMobile:u,showDividers:c,layout:a==="row"?"row":"column",linkAlign:d,linkRange:m,menuStyle:s,currentPage:g,menuStylePhone:P,menuPanelWidth:f,menuPanelTintColor:k,menuPanelTintOpacity:p,editing:t?.isEditing})}function R(o){for(const[r,n]of Object.entries(M))o[r]={...o[n]};const e=o.MenuBlock;e.defaultProps={...e.defaultProps,direction:w},e.render=O}export{M as PAGE_BLOCKS_FROM_FOOTER,w as PAGE_MENU_DIRECTION_DEFAULT,R as addPageBlocksFromFooter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import t from"next/dynamic";import{SITE_FOOTER_TYPE as d,SITE_HEADER_TYPE as m}from"efficient-web-builder/format/lib/document/section-groups";function r(e){return function(o){return e.render(o)}}const p={Banner:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Banner/render").then(e=>r(e.BannerRender))),Breadcrumb:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Breadcrumb/render").then(e=>r(e.BreadcrumbRender))),ButtonBlock:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/ButtonBlock/render").then(e=>r(e.ButtonBlockRender))),CardList:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/CardList/render").then(e=>r(e.CardListRender))),Cards:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Cards/render").then(e=>r(e.CardsRender))),CategoryBar:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/CategoryBar/render").then(e=>r(e.CategoryBarRender))),Chart:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Chart/render").then(e=>r(e.ChartRender))),Contents:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Contents/render").then(e=>r(e.ContentsRender))),ContactLocations:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/ContactLocations/render").then(e=>r(e.ContactLocationsRender))),LocationMap:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/LocationMap/render").then(e=>r(e.LocationMapRender))),CustomHTML:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/CustomHTML/render").then(e=>r(e.CustomHTMLRender))),Divider:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Divider/render").then(e=>r(e.DividerRender))),DocBody:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/DocBody/render").then(e=>r(e.DocBodyRender))),DocMasthead:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/DocMasthead/render").then(e=>r(e.DocMastheadRender))),DocMetaCards:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/DocMetaCards/render").then(e=>r(e.DocMetaCardsRender))),DocTabs:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/DocTabs/render").then(e=>r(e.DocTabsRender))),Eyebrow:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Eyebrow/render").then(e=>r(e.EyebrowRender))),FAQ:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/FAQ/render").then(e=>r(e.FAQRender))),FeaturedCover:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/FeaturedCover/render").then(e=>r(e.FeaturedCoverRender))),Flex:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Flex/render").then(e=>r(e.FlexRender))),Footprint:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Footprint/render").then(e=>r(e.FootprintRender))),Grid:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Grid/render").then(e=>r(e.GridRender))),Heading:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Heading/render").then(e=>r(e.HeadingRender))),Hero:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Hero/render").then(e=>r(e.HeroRender))),HeroGroup:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/HeroGroup/render").then(e=>r(e.HeroGroupRender))),HeroSingle:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/HeroSingle/render").then(e=>r(e.HeroSingleRender))),HeroSlide:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/HeroSlide/render").then(e=>r(e.HeroSlideRender))),ImageBlock:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/ImageBlock/render").then(e=>r(e.ImageBlockRender))),Integrations:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Integrations/render").then(e=>r(e.IntegrationsRender))),IntroBleed:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/IntroBleed/render").then(e=>r(e.IntroBleedRender))),Countdown:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Countdown/render").then(e=>r(e.CountdownRender))),KeyFeatures:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/KeyFeatures/render").then(e=>r(e.KeyFeaturesRender))),ListSearch:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/ListSearch/render").then(e=>r(e.ListSearchRender))),LogoBlock:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/LogoBlock/render").then(e=>r(e.LogoBlockRender))),Logos:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Logos/render").then(e=>r(e.LogosRender))),LongRead:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/LongRead/render").then(e=>r(e.LongReadRender))),Manifesto:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Manifesto/render").then(e=>r(e.ManifestoRender))),Masthead:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Masthead/render").then(e=>r(e.MastheadRender))),Mockup:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Mockup/render").then(e=>r(e.MockupRender))),OrderSummary:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/OrderSummary/render").then(e=>r(e.OrderSummaryRender))),ParagraphsA:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/ParagraphsA/render").then(e=>r(e.ParagraphsARender))),PaymentBadges:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/PaymentBadges/render").then(e=>r(e.PaymentBadgesRender))),PostCard:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/PostCard/render").then(e=>r(e.PostCardRender))),ProcessSteps:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/ProcessSteps/render").then(e=>r(e.ProcessStepsRender))),Prose:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Prose/render").then(e=>r(e.ProseRender))),SectionHeader:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/SectionHeader/render").then(e=>r(e.SectionHeaderRender))),Series:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Series/render").then(e=>r(e.SeriesRender))),Spacer:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Spacer/render").then(e=>r(e.SpacerRender))),SpecStrip:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/SpecStrip/render").then(e=>r(e.SpecStripRender))),Split:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Split/render").then(e=>r(e.SplitRender))),Stats:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Stats/render").then(e=>r(e.StatsRender))),StatsParagraph:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/StatsParagraph/render").then(e=>r(e.StatsParagraphRender))),Testimonials:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Testimonials/render").then(e=>r(e.TestimonialsRender))),Text:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Text/render").then(e=>r(e.TextRender))),Ticker:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Ticker/render").then(e=>r(e.TickerRender))),Timeline:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Timeline/render").then(e=>r(e.TimelineRender))),TimelineTrack:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/TimelineTrack/render").then(e=>r(e.TimelineTrackRender))),TitleWithButtons:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/TitleWithButtons/render").then(e=>r(e.TitleWithButtonsRender))),AccountBlock:t(()=>import("./blocks/commerce/AccountBlock/render.js").then(e=>r(e.AccountBlockRender))),AlloyWheelsListing:t(()=>import("./blocks/commerce/AlloyWheelsListing/render.js").then(e=>r(e.AlloyWheelsListingRender))),BundleOffer:t(()=>import("./blocks/commerce/BundleOffer/render.js").then(e=>r(e.BundleOfferRender))),CartBlock:t(()=>import("./blocks/commerce/CartBlock/render.js").then(e=>r(e.CartBlockRender))),CatalogFilterBar:t(()=>import("./blocks/commerce/CatalogFilterBar/render.js").then(e=>r(e.CatalogFilterBarRender))),CheckoutCTA:t(()=>import("./blocks/commerce/CheckoutCTA/render.js").then(e=>r(e.CheckoutCTARender))),CollectionCard:t(()=>import("./blocks/commerce/CollectionCard/render.js").then(e=>r(e.CollectionCardRender))),Collections:t(()=>import("./blocks/commerce/Collections/render.js").then(e=>r(e.CollectionsRender))),CompatibleTyres:t(()=>import("./blocks/commerce/CompatibleTyres/render.js").then(e=>r(e.CompatibleTyresRender))),CountrySwitchBlock:t(()=>import("./blocks/commerce/CountrySwitchBlock/render.js").then(e=>r(e.CountrySwitchBlockRender))),DeliveryOptions:t(()=>import("./blocks/commerce/DeliveryOptions/render.js").then(e=>r(e.DeliveryOptionsRender))),DetailRows:t(()=>import("./blocks/commerce/DetailRows/render.js").then(e=>r(e.DetailRowsRender))),EuTyreLabel:t(()=>import("./blocks/commerce/EuTyreLabel/render.js").then(e=>r(e.EuTyreLabelRender))),EuTyreLabelBlock:t(()=>import("./blocks/commerce/EuTyreLabelBlock/render.js").then(e=>r(e.EuTyreLabelBlockRender))),WheelDiagram:t(()=>import("./blocks/commerce/WheelDiagram/render.js").then(e=>r(e.WheelDiagramRender))),FitmentFinder:t(()=>import("./blocks/commerce/FitmentFinder/render.js").then(e=>r(e.FitmentFinderRender))),FitmentTable:t(()=>import("./blocks/commerce/FitmentTable/render.js").then(e=>r(e.FitmentTableRender))),Gallery:t(()=>import("./blocks/commerce/Gallery/render.js").then(e=>r(e.GalleryRender))),GalleryB:t(()=>import("./blocks/commerce/GalleryB/render.js").then(e=>r(e.GalleryBRender))),GalleryItem:t(()=>import("./blocks/commerce/GalleryItem/render.js").then(e=>r(e.GalleryItemRender))),Header:t(()=>import("./blocks/commerce/Header/render.js").then(e=>r(e.HeaderRender))),ProductGrid:t(()=>import("./blocks/commerce/ProductGrid/render.js").then(e=>r(e.ProductGridRender))),ProductGallery:t(()=>import("./blocks/commerce/ProductGallery/render.js").then(e=>r(e.ProductGalleryRender))),ProductHero:t(()=>import("./blocks/commerce/ProductHero/render.js").then(e=>r(e.ProductHeroRender))),ProductRef:t(()=>import("./blocks/commerce/ProductRef/render.js").then(e=>r(e.ProductRefRender))),RelatedProducts:t(()=>import("./blocks/commerce/RelatedProducts/render.js").then(e=>r(e.RelatedProductsRender))),SearchBlock:t(()=>import("./blocks/commerce/SearchBlock/render.js").then(e=>r(e.SearchBlockRender))),SpecTable:t(()=>import("./blocks/commerce/SpecTable/render.js").then(e=>r(e.SpecTableRender))),ThemeSwitchBlock:t(()=>import("./blocks/commerce/ThemeSwitchBlock/render.js").then(e=>r(e.ThemeSwitchBlockRender))),TyreFitment:t(()=>import("./blocks/commerce/TyreFitment/render.js").then(e=>r(e.TyreFitmentRender))),TyreSizes:t(()=>import("./blocks/commerce/TyreSizes/render.js").then(e=>r(e.TyreSizesRender))),ProductPrice:t(()=>import("./blocks/commerce/ProductPrice/render.js").then(e=>r(e.ProductPriceRender))),ProductBuyButton:t(()=>import("./blocks/commerce/ProductBuyButton/render.js").then(e=>r(e.ProductBuyButtonRender))),ProductColour:t(()=>import("./blocks/commerce/ProductColour/render.js").then(e=>r(e.ProductColourRender))),ProductSize:t(()=>import("./blocks/commerce/ProductSize/render.js").then(e=>r(e.ProductSizeRender))),FilterBlock:t(()=>import("./blocks/commerce/FilterBlock/render.js").then(e=>r(e.FilterBlockRender))),FilterChipsBlock:t(()=>import("./blocks/commerce/FilterChipsBlock/render.js").then(e=>r(e.FilterChipsBlockRender))),FitmentPicker:t(()=>import("./blocks/commerce/FitmentPicker/render.js").then(e=>r(e.FitmentPickerRender))),StockFitment:t(()=>import("./blocks/commerce/StockFitment/render.js").then(e=>r(e.StockFitmentRender))),ProductPicture:t(()=>import("./blocks/commerce/ProductPicture/render.js").then(e=>r(e.ProductPictureRender))),ProductSpecs:t(()=>import("./blocks/commerce/ProductSpecs/render.js").then(e=>r(e.ProductSpecsRender))),ProductBuy:t(()=>import("./blocks/commerce/ProductBuy/render.js").then(e=>r(e.ProductBuyRender))),ProductEyebrow:t(()=>import("./blocks/commerce/ProductEyebrow/render.js").then(e=>r(e.ProductEyebrowRender))),ProductName:t(()=>import("./blocks/commerce/ProductName/render.js").then(e=>r(e.ProductNameRender))),AppointmentBooking:t(()=>import("./blocks/service/AppointmentBooking/render.js").then(e=>r(e.AppointmentBookingRender))),BookingBox:t(()=>import("./blocks/service/BookingBox/render.js").then(e=>r(e.BookingBoxRender))),ContactRouting:t(()=>import("./blocks/service/ContactRouting/render.js").then(e=>r(e.ContactRoutingRender))),Events:t(()=>import("./blocks/service/Events/render.js").then(e=>r(e.EventsRender))),Footer:t(()=>import("./blocks/service/Footer/render.js").then(e=>r(e.FooterRender))),FooterDivider:t(()=>import("./blocks/service/FooterDivider/render.js").then(e=>r(e.FooterDividerRender))),FooterEmailSignup:t(()=>import("./blocks/service/FooterEmailSignup/render.js").then(e=>r(e.FooterEmailSignupRender))),FooterGroup:t(()=>import("./blocks/service/FooterGroup/render.js").then(e=>r(e.FooterGroupRender))),FooterLogo:t(()=>import("./blocks/service/FooterLogo/render.js").then(e=>r(e.FooterLogoRender))),FooterMenu:t(()=>import("./blocks/service/FooterMenu/render.js").then(e=>r(e.FooterMenuRender))),ArticleBody:t(()=>import("./blocks/service/ArticleBody/render.js").then(e=>r(e.ArticleBodyRender))),FooterSocial:t(()=>import("./blocks/service/FooterSocial/render.js").then(e=>r(e.FooterSocialRender))),FooterPayment:t(()=>import("./blocks/service/FooterPayment/render.js").then(e=>r(e.FooterPaymentRender))),FooterText:t(()=>import("./blocks/service/FooterText/render.js").then(e=>r(e.FooterTextRender))),Form:t(()=>import("./blocks/service/Form/render.js").then(e=>r(e.FormRender))),LegalLineBlock:t(()=>import("./blocks/service/LegalLineBlock/render.js").then(e=>r(e.LegalLineBlockRender))),MenuLinkBlock:t(()=>import("./blocks/service/MenuLinkBlock/render.js").then(e=>r(e.MenuLinkBlockRender))),OpeningHours:t(()=>import("./blocks/service/OpeningHours/render.js").then(e=>r(e.OpeningHoursRender))),RateTable:t(()=>import("./blocks/service/RateTable/render.js").then(e=>r(e.RateTableRender))),MessagingCards:t(()=>import("./blocks/service/MessagingCards/render.js").then(e=>r(e.MessagingCardsRender))),FooterMessaging:t(()=>import("./blocks/service/FooterMessaging/render.js").then(e=>r(e.FooterMessagingRender))),ContactCards:t(()=>import("./blocks/service/ContactCards/render.js").then(e=>r(e.ContactCardsRender))),RatingBlock:t(()=>import("./blocks/service/RatingBlock/render.js").then(e=>r(e.RatingBlockRender))),ReviewForm:t(()=>import("./blocks/service/ReviewForm/render.js").then(e=>r(e.ReviewFormRender))),Reviews:t(()=>import("./blocks/service/Reviews/render.js").then(e=>r(e.ReviewsRender))),[d]:t(()=>import("./blocks/service/SiteFooter/render.js").then(e=>r(e.SiteFooterRender))),[m]:t(()=>import("./blocks/service/SiteHeader/render.js").then(e=>r(e.SiteHeaderRender))),SubmitBox:t(()=>import("./blocks/service/SubmitBox/render.js").then(e=>r(e.SubmitBoxRender))),SubmitBuild:t(()=>import("./blocks/service/SubmitBuild/render.js").then(e=>r(e.SubmitBuildRender))),Subscribe:t(()=>import("./blocks/service/Subscribe/render.js").then(e=>r(e.SubscribeRender))),SubscribeBlogs:t(()=>import("./blocks/service/SubscribeBlogs/render.js").then(e=>r(e.SubscribeBlogsRender)))},c=Object.fromEntries(Object.entries(p).map(([e,n])=>[e,o=>i(n,{...o})]));export{c as LAZY_DRAWS};
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import t from"next/dynamic";import{SITE_FOOTER_TYPE as d,SITE_HEADER_TYPE as m}from"efficient-web-builder/format/lib/document/section-groups";function r(e){return function(o){return e.render(o)}}const p={Banner:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Banner/render").then(e=>r(e.BannerRender))),Breadcrumb:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Breadcrumb/render").then(e=>r(e.BreadcrumbRender))),ButtonBlock:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/ButtonBlock/render").then(e=>r(e.ButtonBlockRender))),CardList:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/CardList/render").then(e=>r(e.CardListRender))),Cards:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Cards/render").then(e=>r(e.CardsRender))),CategoryBar:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/CategoryBar/render").then(e=>r(e.CategoryBarRender))),Chart:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Chart/render").then(e=>r(e.ChartRender))),Contents:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Contents/render").then(e=>r(e.ContentsRender))),ContactLocations:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/ContactLocations/render").then(e=>r(e.ContactLocationsRender))),LocationMap:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/LocationMap/render").then(e=>r(e.LocationMapRender))),CustomHTML:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/CustomHTML/render").then(e=>r(e.CustomHTMLRender))),Divider:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Divider/render").then(e=>r(e.DividerRender))),DocBody:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/DocBody/render").then(e=>r(e.DocBodyRender))),DocMasthead:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/DocMasthead/render").then(e=>r(e.DocMastheadRender))),DocMetaCards:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/DocMetaCards/render").then(e=>r(e.DocMetaCardsRender))),DocTabs:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/DocTabs/render").then(e=>r(e.DocTabsRender))),Eyebrow:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Eyebrow/render").then(e=>r(e.EyebrowRender))),FAQ:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/FAQ/render").then(e=>r(e.FAQRender))),FeaturedCover:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/FeaturedCover/render").then(e=>r(e.FeaturedCoverRender))),Flex:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Flex/render").then(e=>r(e.FlexRender))),Footprint:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Footprint/render").then(e=>r(e.FootprintRender))),Grid:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Grid/render").then(e=>r(e.GridRender))),Heading:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Heading/render").then(e=>r(e.HeadingRender))),Hero:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Hero/render").then(e=>r(e.HeroRender))),HeroGroup:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/HeroGroup/render").then(e=>r(e.HeroGroupRender))),HeroSingle:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/HeroSingle/render").then(e=>r(e.HeroSingleRender))),HeroSlide:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/HeroSlide/render").then(e=>r(e.HeroSlideRender))),ImageBlock:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/ImageBlock/render").then(e=>r(e.ImageBlockRender))),Integrations:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Integrations/render").then(e=>r(e.IntegrationsRender))),IntroBleed:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/IntroBleed/render").then(e=>r(e.IntroBleedRender))),Countdown:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Countdown/render").then(e=>r(e.CountdownRender))),KeyFeatures:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/KeyFeatures/render").then(e=>r(e.KeyFeaturesRender))),ListSearch:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/ListSearch/render").then(e=>r(e.ListSearchRender))),LogoBlock:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/LogoBlock/render").then(e=>r(e.LogoBlockRender))),Logos:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Logos/render").then(e=>r(e.LogosRender))),LongRead:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/LongRead/render").then(e=>r(e.LongReadRender))),Manifesto:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Manifesto/render").then(e=>r(e.ManifestoRender))),Masthead:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Masthead/render").then(e=>r(e.MastheadRender))),Mockup:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Mockup/render").then(e=>r(e.MockupRender))),OrderSummary:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/OrderSummary/render").then(e=>r(e.OrderSummaryRender))),ParagraphsA:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/ParagraphsA/render").then(e=>r(e.ParagraphsARender))),PaymentBadges:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/PaymentBadges/render").then(e=>r(e.PaymentBadgesRender))),PostCard:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/PostCard/render").then(e=>r(e.PostCardRender))),ProcessSteps:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/ProcessSteps/render").then(e=>r(e.ProcessStepsRender))),Prose:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Prose/render").then(e=>r(e.ProseRender))),SectionHeader:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/SectionHeader/render").then(e=>r(e.SectionHeaderRender))),Series:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Series/render").then(e=>r(e.SeriesRender))),Spacer:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Spacer/render").then(e=>r(e.SpacerRender))),SpecStrip:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/SpecStrip/render").then(e=>r(e.SpecStripRender))),Split:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Split/render").then(e=>r(e.SplitRender))),Stats:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Stats/render").then(e=>r(e.StatsRender))),StatsParagraph:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/StatsParagraph/render").then(e=>r(e.StatsParagraphRender))),Testimonials:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Testimonials/render").then(e=>r(e.TestimonialsRender))),Text:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Text/render").then(e=>r(e.TextRender))),Ticker:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Ticker/render").then(e=>r(e.TickerRender))),Timeline:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/Timeline/render").then(e=>r(e.TimelineRender))),TimelineTrack:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/TimelineTrack/render").then(e=>r(e.TimelineTrackRender))),TitleWithButtons:t(()=>import("efficient-web-builder/render/lib/document/blocks/general/TitleWithButtons/render").then(e=>r(e.TitleWithButtonsRender))),AccountBlock:t(()=>import("./blocks/commerce/AccountBlock/render.js").then(e=>r(e.AccountBlockRender))),AlloyWheelsListing:t(()=>import("./blocks/commerce/AlloyWheelsListing/render.js").then(e=>r(e.AlloyWheelsListingRender))),BundleOffer:t(()=>import("./blocks/commerce/BundleOffer/render.js").then(e=>r(e.BundleOfferRender))),CartBlock:t(()=>import("./blocks/commerce/CartBlock/render.js").then(e=>r(e.CartBlockRender))),CatalogFilterBar:t(()=>import("./blocks/commerce/CatalogFilterBar/render.js").then(e=>r(e.CatalogFilterBarRender))),CheckoutCTA:t(()=>import("./blocks/commerce/CheckoutCTA/render.js").then(e=>r(e.CheckoutCTARender))),CollectionCard:t(()=>import("./blocks/commerce/CollectionCard/render.js").then(e=>r(e.CollectionCardRender))),Collections:t(()=>import("./blocks/commerce/Collections/render.js").then(e=>r(e.CollectionsRender))),CompatibleTyres:t(()=>import("./blocks/commerce/CompatibleTyres/render.js").then(e=>r(e.CompatibleTyresRender))),CountrySwitchBlock:t(()=>import("./blocks/commerce/CountrySwitchBlock/render.js").then(e=>r(e.CountrySwitchBlockRender))),DeliveryOptions:t(()=>import("./blocks/commerce/DeliveryOptions/render.js").then(e=>r(e.DeliveryOptionsRender))),DetailRows:t(()=>import("./blocks/commerce/DetailRows/render.js").then(e=>r(e.DetailRowsRender))),EuTyreLabel:t(()=>import("./blocks/commerce/EuTyreLabel/render.js").then(e=>r(e.EuTyreLabelRender))),EuTyreLabelBlock:t(()=>import("./blocks/commerce/EuTyreLabelBlock/render.js").then(e=>r(e.EuTyreLabelBlockRender))),WheelDiagram:t(()=>import("./blocks/commerce/WheelDiagram/render.js").then(e=>r(e.WheelDiagramRender))),FitmentFinder:t(()=>import("./blocks/commerce/FitmentFinder/render.js").then(e=>r(e.FitmentFinderRender))),FitmentTable:t(()=>import("./blocks/commerce/FitmentTable/render.js").then(e=>r(e.FitmentTableRender))),Gallery:t(()=>import("./blocks/commerce/Gallery/render.js").then(e=>r(e.GalleryRender))),GalleryB:t(()=>import("./blocks/commerce/GalleryB/render.js").then(e=>r(e.GalleryBRender))),GalleryItem:t(()=>import("./blocks/commerce/GalleryItem/render.js").then(e=>r(e.GalleryItemRender))),Header:t(()=>import("./blocks/commerce/Header/render.js").then(e=>r(e.HeaderRender))),ProductGrid:t(()=>import("./blocks/commerce/ProductGrid/render.js").then(e=>r(e.ProductGridRender))),ProductGallery:t(()=>import("./blocks/commerce/ProductGallery/render.js").then(e=>r(e.ProductGalleryRender))),ProductHero:t(()=>import("./blocks/commerce/ProductHero/render.js").then(e=>r(e.ProductHeroRender))),ProductRef:t(()=>import("./blocks/commerce/ProductRef/render.js").then(e=>r(e.ProductRefRender))),RelatedProducts:t(()=>import("./blocks/commerce/RelatedProducts/render.js").then(e=>r(e.RelatedProductsRender))),SearchBlock:t(()=>import("./blocks/commerce/SearchBlock/render.js").then(e=>r(e.SearchBlockRender))),SpecTable:t(()=>import("./blocks/commerce/SpecTable/render.js").then(e=>r(e.SpecTableRender))),ThemeSwitchBlock:t(()=>import("./blocks/commerce/ThemeSwitchBlock/render.js").then(e=>r(e.ThemeSwitchBlockRender))),TyreFitment:t(()=>import("./blocks/commerce/TyreFitment/render.js").then(e=>r(e.TyreFitmentRender))),TyreSizes:t(()=>import("./blocks/commerce/TyreSizes/render.js").then(e=>r(e.TyreSizesRender))),ProductPrice:t(()=>import("./blocks/commerce/ProductPrice/render.js").then(e=>r(e.ProductPriceRender))),ProductBuyButton:t(()=>import("./blocks/commerce/ProductBuyButton/render.js").then(e=>r(e.ProductBuyButtonRender))),ProductColour:t(()=>import("./blocks/commerce/ProductColour/render.js").then(e=>r(e.ProductColourRender))),ProductSize:t(()=>import("./blocks/commerce/ProductSize/render.js").then(e=>r(e.ProductSizeRender))),FilterBlock:t(()=>import("./blocks/commerce/FilterBlock/render.js").then(e=>r(e.FilterBlockRender))),FilterChipsBlock:t(()=>import("./blocks/commerce/FilterChipsBlock/render.js").then(e=>r(e.FilterChipsBlockRender))),FitmentPicker:t(()=>import("./blocks/commerce/FitmentPicker/render.js").then(e=>r(e.FitmentPickerRender))),StockFitment:t(()=>import("./blocks/commerce/StockFitment/render.js").then(e=>r(e.StockFitmentRender))),ProductPicture:t(()=>import("./blocks/commerce/ProductPicture/render.js").then(e=>r(e.ProductPictureRender))),ProductSpecs:t(()=>import("./blocks/commerce/ProductSpecs/render.js").then(e=>r(e.ProductSpecsRender))),ProductBuy:t(()=>import("./blocks/commerce/ProductBuy/render.js").then(e=>r(e.ProductBuyRender))),ProductEyebrow:t(()=>import("./blocks/commerce/ProductEyebrow/render.js").then(e=>r(e.ProductEyebrowRender))),ProductName:t(()=>import("./blocks/commerce/ProductName/render.js").then(e=>r(e.ProductNameRender))),AppointmentBooking:t(()=>import("./blocks/service/AppointmentBooking/render.js").then(e=>r(e.AppointmentBookingRender))),BookingBox:t(()=>import("./blocks/service/BookingBox/render.js").then(e=>r(e.BookingBoxRender))),ContactRouting:t(()=>import("./blocks/service/ContactRouting/render.js").then(e=>r(e.ContactRoutingRender))),DealerFinder:t(()=>import("./blocks/service/DealerFinder/render.js").then(e=>r(e.DealerFinderRender))),Events:t(()=>import("./blocks/service/Events/render.js").then(e=>r(e.EventsRender))),Footer:t(()=>import("./blocks/service/Footer/render.js").then(e=>r(e.FooterRender))),FooterDivider:t(()=>import("./blocks/service/FooterDivider/render.js").then(e=>r(e.FooterDividerRender))),FooterEmailSignup:t(()=>import("./blocks/service/FooterEmailSignup/render.js").then(e=>r(e.FooterEmailSignupRender))),FooterGroup:t(()=>import("./blocks/service/FooterGroup/render.js").then(e=>r(e.FooterGroupRender))),FooterLogo:t(()=>import("./blocks/service/FooterLogo/render.js").then(e=>r(e.FooterLogoRender))),FooterMenu:t(()=>import("./blocks/service/FooterMenu/render.js").then(e=>r(e.FooterMenuRender))),ArticleBody:t(()=>import("./blocks/service/ArticleBody/render.js").then(e=>r(e.ArticleBodyRender))),FooterSocial:t(()=>import("./blocks/service/FooterSocial/render.js").then(e=>r(e.FooterSocialRender))),FooterPayment:t(()=>import("./blocks/service/FooterPayment/render.js").then(e=>r(e.FooterPaymentRender))),FooterText:t(()=>import("./blocks/service/FooterText/render.js").then(e=>r(e.FooterTextRender))),Form:t(()=>import("./blocks/service/Form/render.js").then(e=>r(e.FormRender))),LegalLineBlock:t(()=>import("./blocks/service/LegalLineBlock/render.js").then(e=>r(e.LegalLineBlockRender))),MenuLinkBlock:t(()=>import("./blocks/service/MenuLinkBlock/render.js").then(e=>r(e.MenuLinkBlockRender))),OpeningHours:t(()=>import("./blocks/service/OpeningHours/render.js").then(e=>r(e.OpeningHoursRender))),RateTable:t(()=>import("./blocks/service/RateTable/render.js").then(e=>r(e.RateTableRender))),MessagingCards:t(()=>import("./blocks/service/MessagingCards/render.js").then(e=>r(e.MessagingCardsRender))),FooterMessaging:t(()=>import("./blocks/service/FooterMessaging/render.js").then(e=>r(e.FooterMessagingRender))),ContactCards:t(()=>import("./blocks/service/ContactCards/render.js").then(e=>r(e.ContactCardsRender))),RatingBlock:t(()=>import("./blocks/service/RatingBlock/render.js").then(e=>r(e.RatingBlockRender))),ReviewForm:t(()=>import("./blocks/service/ReviewForm/render.js").then(e=>r(e.ReviewFormRender))),Reviews:t(()=>import("./blocks/service/Reviews/render.js").then(e=>r(e.ReviewsRender))),[d]:t(()=>import("./blocks/service/SiteFooter/render.js").then(e=>r(e.SiteFooterRender))),[m]:t(()=>import("./blocks/service/SiteHeader/render.js").then(e=>r(e.SiteHeaderRender))),SubmitBox:t(()=>import("./blocks/service/SubmitBox/render.js").then(e=>r(e.SubmitBoxRender))),SubmitBuild:t(()=>import("./blocks/service/SubmitBuild/render.js").then(e=>r(e.SubmitBuildRender))),Subscribe:t(()=>import("./blocks/service/Subscribe/render.js").then(e=>r(e.SubscribeRender))),SubscribeBlogs:t(()=>import("./blocks/service/SubscribeBlogs/render.js").then(e=>r(e.SubscribeBlogsRender)))},c=Object.fromEntries(Object.entries(p).map(([e,n])=>[e,o=>i(n,{...o})]));export{c as LAZY_DRAWS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SECTION_BOX_SLOT as O,SECTION_BOX_TYPE as f,headParts as _,registerSectionToBox as v}from"efficient-web-builder/render/lib/sections/section-to-box";import{BUTTON as C,DIM as i,DROP_COMMON as a,DROP_SIDE_PADDING as s,FOLLOW_THE_BOX as H,INNER_BOX as c,SAME_KEYS as E,SECTION_BOX as h,SH_LINK as W,TEXT as
|
|
1
|
+
import{SECTION_BOX_SLOT as O,SECTION_BOX_TYPE as f,headParts as _,registerSectionToBox as v}from"efficient-web-builder/render/lib/sections/section-to-box";import{BUTTON as C,DIM as i,DROP_COMMON as a,DROP_SIDE_PADDING as s,FOLLOW_THE_BOX as H,INNER_BOX as c,SAME_KEYS as E,SECTION_BOX as h,SH_LINK as W,TEXT as o,bandPage as I,smallText as m,surfaceAccent as y,wrapperPad as b,wrapperPadKeys as R}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{boxPadding as D,labelLook as F,labelStyle as K,token as n}from"efficient-web-builder/format/lib/document/seed-parts";import{CARD_ROW_FIELD_PROP as L}from"efficient-web-builder/format/lib/content/card-template";import{phoneKey as w}from"efficient-easel/draw";import{REVIEWS_BAND_OWN as M}from"./section-to-box-rows-reviews.js";import{rowFieldTextSeed as p}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";const l=e=>[...E.filter(t=>t!=="sectionAccent"),["sectionAccent","sectionAccent",(t,r,d)=>y(t,d)],...R(e)],x=(e,t,r)=>(d,N)=>({...h,sectionAccent:y(d.sectionAccent??0,N),direction:"column",gap:t,gapPhone:r,sectionBorder:{top:1},...b(d,e)}),P=(e,t,r)=>({kind:"text",key:e,role:"heading",props:o,style:{textStyle:"heading-2",...n("headingMedium",44,32),weight:500,case:"upper",lineHeight:t,letterSpacing:r}}),k=(e,t,r={})=>({kind:"group",name:"Heading",props:{...c,gap:e,gapPhone:e,...r},parts:t}),u=(e={})=>({kind:"core",keep:"rest",props:H,...e}),g=M,[X]=_("ReviewForm"),G=()=>({name:"Review Form",boxProps:x(g,48,32),box:l(g),parts:[k(16,[{...X,props:o},P("title",1,-.02)]),u()],pressKeepsEmpty:["eyebrow","title"],drop:{...a,...s,headPlacement:"the head is the Text blocks above the form, which is always own-box here"}}),[V]=_("Reviews"),T=e=>({...K(12),letterSpacing:e}),j={type:f,props:{...c,name:"Card",gap:16,...D(40,40,32,32),sectionAccent:0},slots:{[O]:[{type:"RatingBlock",props:{[L]:"rating"}},p("title",o,{textStyle:"heading-1",...n("body",19),weight:500,case:"upper",lineHeight:1.2,letterSpacing:-.01}),p("quote",i,{textStyle:"body-1",...n("body",15),lineHeight:1.65}),{type:f,props:{...c,name:"Byline",direction:"row",justify:"between",align:"start",share:"content",phoneRow:2,[w("share")]:"content",gap:16,sectionPaddingTop:20,sectionPaddingTopPhone:20,sectionBorder:{top:1}},slots:{[O]:[p("name",o,T(.22)),p("dateLabel",{...i,align:"right"},{...T(.18),align:"right"}),p("role",{...i,align:"right"},{...T(.18),align:"right"})]}}]}},Y=()=>({name:"Reviews",boxProps:x(g,48,32),box:l(g),parts:[k(16,[{...V,props:o},P("title",1,-.02)]),u({slots:{template:[j]}})],pressKeepsEmpty:["eyebrow","title"],drop:{...a,...s,eyebrowLook:"the eyebrow Text wears the plain eyebrow's start look (Reviews' default); a stored `filled` look needs a filled Text look",headPlacement:"the head is the Text blocks above the reviews, which are always own-box here"}}),S={top:88,bottom:88,topTablet:88,bottomTablet:88,topPhone:64,bottomPhone:64},q=()=>({name:"Booking Form",boxProps:x(S,40,40),box:l(S),parts:[k(16,[m("eyebrow",{...n("label",12),weight:600,letterSpacing:.24,color:"accent"}),P("heading",.98,-.025),{kind:"text",key:"intro",props:{...i,maxWidth:660},style:{textStyle:"heading-1",...n("body",17),weight:400,case:"none",lineHeight:1.65,color:"muted"}}],{maxWidth:760}),u()],pressKeepsEmpty:["eyebrow","heading","intro"],drop:{...a,...s}}),B={top:88,bottom:88,topPhone:64,bottomPhone:64},U=()=>({name:"Ready-to-Order Banner",boxProps:e=>({...h,direction:"column",align:"center",gap:20,gapPhone:20,...b(e,B)}),box:[...E,...R(B)],parts:[{...m("eyebrow"),props:{...o,align:"center"}},{kind:"text",key:"title",role:"heading",props:{...o,align:"center",maxWidth:720},style:{textStyle:"heading-1",...n("headingMedium",44,30),weight:500,case:"none",lineHeight:1.05,letterSpacing:-.03,align:"center"}},{kind:"text",key:"body",props:{...o,align:"center",maxWidth:560},style:{textStyle:"body-1",...n("body",16),lineHeight:1.6,align:"center"}},{kind:"group",name:"Buttons",props:{...c,direction:"row",align:"center",justify:"center",share:"content",phoneRow:2,[w("share")]:"content",gap:24,gapPhone:24,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>({...C,align:"center",href:typeof e.ctaHref=="string"&&e.ctaHref?e.ctaHref:"/checkout"})},{kind:"button",key:"secondaryText",href:"secondaryHref",variant:"ghost",props:{...W,align:"center",icon:"none"},style:{...F(13),color:"muted"}}]}],pressKeepsEmpty:["eyebrow","title","body"],drop:{...a,...s}}),A={top:60,bottom:0,topPhone:60,bottomPhone:0},z=()=>({name:"Contact Form",boxProps:(e,t)=>({...h,sectionAccent:y(e.sectionAccent??0,t),direction:"column",gap:0,gapPhone:0,...b(e,A)}),box:l(A),parts:[{kind:"group",name:"Header",props:{...c,direction:"row",align:"center",share:"content",phoneRow:2,[w("share")]:"content",gap:24,gapPhone:24,sectionPaddingBottom:24,sectionPaddingBottomPhone:24,sectionBorder:{bottom:1}},parts:[m("routingNumber"),{kind:"text",key:"routingTagline",props:i,style:{textStyle:"heading-1",...n("body",14),weight:400,case:"upper",letterSpacing:.04,color:"muted"}}]},{kind:"core",keep:"rest",derive:{reads:["sectionAccent"],props:(e,t)=>({sectionAccent:I(e.sectionAccent??0,t)})}}],drop:{...a,...s}});v({ContactRouting:z(),ReviewForm:G(),AppointmentBooking:q(),Reviews:Y(),CheckoutCTA:U()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{textKindVars as i}from"../content/text-kind-vars.js";import{POPUP_KIND_VARS as e,POPUP_TEXT_KINDS as c}from"efficient-web-builder/format/lib/popup/text-kinds";function s(r){const o={};for(const t of c){const n=r[t];n&&Object.assign(o,i(n,e[t]))}return o}export{s as popupKindStyle};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type DealerNear = "found" | "not_found" | "try_again";
|
|
2
|
+
export interface Dealer {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
address: string;
|
|
6
|
+
city: string;
|
|
7
|
+
state: string;
|
|
8
|
+
postcode: string;
|
|
9
|
+
country: string;
|
|
10
|
+
phone: string;
|
|
11
|
+
website: string;
|
|
12
|
+
lat: number | null;
|
|
13
|
+
lng: number | null;
|
|
14
|
+
distanceKm: number | null;
|
|
15
|
+
}
|
|
16
|
+
export interface DealerList {
|
|
17
|
+
near: DealerNear | null;
|
|
18
|
+
dealers: Dealer[];
|
|
19
|
+
}
|
|
20
|
+
export declare const DEALER_WORDS: {
|
|
21
|
+
readonly title: "Find a dealer";
|
|
22
|
+
readonly placeholder: "Postcode or suburb";
|
|
23
|
+
readonly search: "Search";
|
|
24
|
+
readonly searching: "Searching…";
|
|
25
|
+
readonly none: "No dealers to show yet.";
|
|
26
|
+
readonly notFound: "We couldn't find that place. Check the postcode or suburb and search again.";
|
|
27
|
+
readonly tryAgain: "We couldn't look up that place just now. Please try again.";
|
|
28
|
+
readonly website: "Website";
|
|
29
|
+
readonly map: "Dealers on the map";
|
|
30
|
+
};
|
|
31
|
+
export declare function readDealerList(value: unknown): DealerList;
|
|
32
|
+
export declare function dealerFinderNotice(near: DealerNear | null): string | null;
|
|
33
|
+
export declare function distanceLabel(km: number | null): string | null;
|
|
34
|
+
export declare function dealerTownLine(dealer: Dealer): string;
|
|
35
|
+
export interface DealerPin {
|
|
36
|
+
id: string;
|
|
37
|
+
index: number;
|
|
38
|
+
left: number;
|
|
39
|
+
top: number;
|
|
40
|
+
}
|
|
41
|
+
export declare function dealerPins(dealers: readonly Dealer[]): DealerPin[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const d={title:"Find a dealer",placeholder:"Postcode or suburb",search:"Search",searching:"Searching…",none:"No dealers to show yet.",notFound:"We couldn't find that place. Check the postcode or suburb and search again.",tryAgain:"We couldn't look up that place just now. Please try again.",website:"Website",map:"Dealers on the map"},o=t=>typeof t=="string"?t:"",l=t=>typeof t=="number"&&Number.isFinite(t)?t:null,m=["found","not_found","try_again"];function y(t){if(!t||typeof t!="object")return null;const n=t;return typeof n.name!="string"||!n.name?null:{id:o(n.id)||n.name,name:n.name,address:o(n.address),city:o(n.city),state:o(n.state),postcode:o(n.postcode),country:o(n.country),phone:o(n.phone),website:o(n.website),lat:l(n.lat),lng:l(n.lng),distanceKm:l(n.distanceKm)}}function g(t){if(!t||typeof t!="object")return{near:null,dealers:[]};const n=t,a=typeof n.near=="string"&&m.includes(n.near)?n.near:null,s=Array.isArray(n.dealers)?n.dealers:[];return{near:a,dealers:s.map(y).filter(i=>i!==null)}}function b(t){return t==="not_found"?d.notFound:t==="try_again"?d.tryAgain:null}function x(t){return t===null?null:t<10?`${t.toFixed(1)} km`:`${Math.round(t)} km`}function w(t){return[t.city,t.state,t.postcode].filter(Boolean).join(" ")}function A(t){const n=t.map((e,r)=>({dealer:e,index:r})).filter(({dealer:e})=>e.lat!==null&&e.lng!==null);if(!n.length)return[];const a=n.map(({dealer:e})=>e.lat),s=n.map(({dealer:e})=>e.lng),[i,p]=[Math.min(...a),Math.max(...a)],[f,h]=[Math.min(...s),Math.max(...s)],c=(e,r,u)=>u===r?50:8+(e-r)/(u-r)*84;return n.map(({dealer:e,index:r})=>({id:e.id,index:r,left:c(e.lng,f,h),top:100-c(e.lat,i,p)}))}export{d as DEALER_WORDS,b as dealerFinderNotice,A as dealerPins,w as dealerTownLine,x as distanceLabel,g as readDealerList};
|