efficient-storefront-blocks 0.125.17 → 0.125.19
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 +9 -0
- package/dist/chunks/{CustomHtmlCodeWindow-GU7XJD4P.js → CustomHtmlCodeWindow-LITJEQFG.js} +1 -1
- package/dist/chunks/{EditorPreviewCheckout-YNOXGBF3.js → EditorPreviewCheckout-WP23XRYO.js} +1 -1
- package/dist/chunks/SiteEditorProvider-FT3P5QZM.js +1 -0
- package/dist/chunks/{chunk-RCG52BYQ.js → chunk-EEHSAQWF.js} +2 -2
- package/dist/chunks/{chunk-SVVQDQP3.js → chunk-ESKHLPB5.js} +1 -1
- package/dist/chunks/{chunk-AKQZ7SOP.js → chunk-PVRWP47B.js} +1 -1
- package/dist/chunks/{chunk-NJMMRTE4.js → chunk-TMSNT2CP.js} +1 -1
- package/dist/chunks/{chunk-LHRUHC3R.js → chunk-TT3AZYTK.js} +1 -1
- package/dist/chunks/{chunk-QZV32ZUO.js → chunk-VUMZSQZ5.js} +1 -1
- package/dist/chunks/{chunk-4R75CGDP.js → chunk-YOF4KT5H.js} +1 -1
- package/dist/chunks/{chunk-4HZIV5UO.js → chunk-ZHEHF42C.js} +1 -1
- package/dist/chunks/{fitment-data-4BSUUSAX.js → fitment-data-FJ3MIJXK.js} +1 -1
- package/dist/chunks/{section-css-style-6XARTNKW.js → section-css-style-JQZMV74P.js} +1 -1
- package/dist/index.js +31 -25
- package/dist/render/app/globals.css +16 -0
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/GridCardTemplate.d.ts +4 -0
- package/dist/render/components/GridCardTemplate.js +1 -1
- package/dist/render/components/card-pieces/CardProductPicture.js +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/value-index.json +1 -1
- package/package.json +3 -3
- package/dist/chunks/SiteEditorProvider-2DLGUDDP.js +0 -1
- /package/dist/chunks/{chunk-E4ZWGCLS.js → chunk-DFYWYSOT.js} +0 -0
- /package/dist/chunks/{chunk-RCG52BYQ.js.LEGAL.txt → chunk-EEHSAQWF.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-UIWK6VX2.js → chunk-G5LEO2F2.js} +0 -0
- /package/dist/chunks/{chunk-DET7LVPH.js → chunk-LY7GZJ6M.js} +0 -0
- /package/dist/chunks/{chunk-LHRUHC3R.js.LEGAL.txt → chunk-TT3AZYTK.js.LEGAL.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.125.19 — 2026-11-24 — efficient-easel 38 and web-builder 74.12, undo keys only
|
|
4
|
+
|
|
5
|
+
- ⚠️ **Peers:** `efficient-easel` is now `^38.0.0` (was `^37.4.0`) and `efficient-web-builder` `^74.12.0` (was `^74.11.0`). A host that bumps to this version also needs efficient-easel 38.0.0 and efficient-shell 15.8.0.
|
|
6
|
+
- Undo and redo are keys only (harness UI-56 rule 6): the website editor has no Undo or Redo button or menu row; ⌘Z / Ctrl+Z, ⇧⌘Z / Ctrl+Shift+Z and Ctrl+Y act in the window in front. No block changes how it draws.
|
|
7
|
+
|
|
8
|
+
## 0.125.18 — 2026-11-24 — A product card shows its next rendering on hover, or zooms
|
|
9
|
+
|
|
10
|
+
Show next image at Kind "Renderings" now shows the card's own next rendering (its finish's run from the second picture). A card with no next picture zooms its wheel a little on hover instead (1.04, about 300 ms). Every other Hover draws as before.
|
|
11
|
+
|
|
3
12
|
## 0.125.17 — 2026-11-24 — A Product Grid can center a short row
|
|
4
13
|
|
|
5
14
|
The Product Grid's "Short row" gains "Center the row": fewer cards than columns keep a full row's card width and sit in the middle of the row.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{b as ee,d as te,e as se}from"./chunk-
|
|
1
|
+
"use client";import{b as ee,d as te,e as se}from"./chunk-TT3AZYTK.js";import{Be as re,Ch as ie,Pk as ce,Qb as oe,Sk as de,Yk as me,ee as ne,g as i,ge as I,ie as ae,sl as ue,tl as fe,ul as he,yl as pe}from"./chunk-YOF4KT5H.js";import{d as Z}from"./chunk-ESKHLPB5.js";import{Kf as J,Sg as B,bg as Y,la as X,li as le,xb as K}from"./chunk-PVRWP47B.js";import"./chunk-G5LEO2F2.js";import"./chunk-LY7GZJ6M.js";import"./chunk-Y6SLVHK3.js";import{jsx as n,jsxs as w,Fragment as Ue}from"react/jsx-runtime";import{Suspense as We,useContext as Ve,useEffect as Te,useMemo as _,useRef as Ne,useState as S}from"react";import{AccordionHeading as H,Banner as qe,Button as D,Card as Qe,Dialog as Xe,DropdownMenu as Ke,Segmented as Je,Text as b,buttonClasses as Ye,colorFill as Ze,colorSwatchClasses as et,fitFrameStyle as tt,fitScale as st}from"efficient-shell/ui";import{CodeEditor as ot}from"efficient-shell/code";import{ChevronDownIcon as nt}from"efficient-shell/icons/efficient";import{AlignSeparateIcon as at}from"efficient-easel/icons";import{ScreenDocumentContext as rt}from"efficient-easel/screen/components/ScreenDocumentContext";var ye=".my-part";function ve(e,t,o,s){let a=De(e,t);if(a)return Pe(e,t,o,s,a);let r=je(e,t);return r?Be(e,t,o,s,r):A(e,t,we(s))}function De(e,t){let o=/<style\b[^>]*>/gi;for(let s=o.exec(e);s;s=o.exec(e)){let a=s.index+s[0].length,r=e.toLowerCase().indexOf("</style",a),c=r<0?e.length:r;if(t>=a&&t<=c)return{start:a,end:c,close:r};o.lastIndex=c}return null}function Le(e){return e.replace(/\/\*[\s\S]*?(\*\/|$)/g,t=>" ".repeat(t.length))}function Pe(e,t,o,s,a){let r=Le(e.slice(a.start,a.end)),c=t-a.start,m=r[c-1]===" "&&e.slice(a.start,a.end)[c-1]!==" ",d=0,u="";for(let v=0;v<c;v++){let k=r[v];k==="{"?(d++,u=k):k==="}"?(d=Math.max(0,d-1),u=k):(k===";"||k===":")&&(u=k)}let f=r.slice(r.lastIndexOf(":",c-1)+1,c).trim();if(s.kind==="value"&&d>0&&u===":"&&!m&&(f===""||o>t))return{from:t,to:o,insert:s.value,selectFrom:t,selectTo:t+s.value.length};if(s.kind!=="value"){let v=a.close<0?e.length:e.indexOf(">",a.close)+1;return A(e,v-1,s.kind==="class"?we(s):s.code)}let h=-1;if(d>0)h=ge(r,c,d);else{let v=r.slice(c).search(/[{}]/);v>=0&&r[c+v]==="{"&&(h=ge(r,c+v+1,1))}let p=h<0?t:a.start+h,g=h<0?-1:Fe(r,h),x=g<0?ye:Re(r,g)||ye,$=be(e,g<0?p:a.start+g);return A(e,p,`${$}${x} { ${s.property}: ${s.value}; }`,!0)}function ge(e,t,o){for(let s=t;s<e.length;s++)if(e[s]==="{")o++;else if(e[s]==="}"&&--o===0)return s;return-1}function Fe(e,t){let o=0;for(let s=t;s>=0;s--)if(e[s]==="}")o++;else if(e[s]==="{"&&--o===0)return s;return-1}function Re(e,t){let o=Math.max(e.lastIndexOf("}",t-1),e.lastIndexOf(";",t-1),e.lastIndexOf("{",t-1))+1;return e.slice(o,t).replace(/\s+/g," ").trim()}function je(e,t){let o=e.lastIndexOf("<",t-1);if(o<0||e.lastIndexOf(">",t-1)>o||/[/!?]/.test(e[o+1]??""))return null;let s=e.indexOf(">",t);return s<0?null:{lt:o,gt:s}}function Be(e,t,o,s,a){if(s.kind==="block")return A(e,a.gt,s.code);let r=s.kind==="value"?"style":"class",c=e.slice(a.lt,a.gt),m=new RegExp(`\\s${r}\\s*=\\s*(["'])([\\s\\S]*?)\\1`,"i").exec(c);if(m){let f=a.lt+m.index+m[0].length-1-m[2].length,h=f+m[2].length;if(t>=f&&t<=h){let $=e.slice(f,t);if(s.kind==="value"&&(/:\s*$/.test($)||o>t&&/:[^;]*$/.test($)))return M(t,o,s.value);if(s.kind==="class"&&!(/\S$/.test($)&&/^\S/.test(e.slice(t,h)))){let v=`${/\S$/.test($)?" ":""}${s.className}${/^\S/.test(e.slice(t,h))?" ":""}`;return M(t,t,v)}}let p=m[2].trimEnd(),g=s.kind==="value"?`${p&&!p.endsWith(";")?";":""}${p?" ":""}${s.property}: ${s.value}`:`${p?" ":""}${s.className}`,x=f+p.length;return M(x,x,g)}let d=e[a.gt-1]==="/"?a.gt-1:a.gt,u=s.kind==="value"?` style="${s.property}: ${s.value}"`:` class="${s.className}"`;return M(d,d,u)}function we(e){return e.kind==="block"?e.code:e.kind==="class"?`<p class="${e.className}">Text</p>`:`<div style="${e.property}: ${e.value}">Text</div>`}function M(e,t,o){return{from:e,to:t,insert:o,selectFrom:e,selectTo:e+o.length}}function be(e,t){let o=e.lastIndexOf(`
|
|
2
2
|
`,t-1)+1;return/^[ \t]*/.exec(e.slice(o))[0]}function A(e,t,o,s=!1){let a=e.lastIndexOf(`
|
|
3
3
|
`,t-1)+1,r=e.indexOf(`
|
|
4
4
|
`,t);r<0&&(r=e.length);let c=be(e,t),m=s?o:o.split(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{Aa as Fr,Ba as _r,Ca as Mr,Da as Kr,Ea as Dr,Fa as ye,Ha as mt,Ia as jr,Ja as Ur,Ka as _t,La as Wr,Na as yn,Oa as ne,Ra as $r,Sa as Yr,Xa as Br,Ya as de,Za as Hr,_a as zr,b as Tr,c as fn,d as qr,db as Gr,e as Tt,eb as ft,hb as gn,jb as ie,ka as qt,la as Ft}from"./chunk-
|
|
1
|
+
"use client";import{Aa as Fr,Ba as _r,Ca as Mr,Da as Kr,Ea as Dr,Fa as ye,Ha as mt,Ia as jr,Ja as Ur,Ka as _t,La as Wr,Na as yn,Oa as ne,Ra as $r,Sa as Yr,Xa as Br,Ya as de,Za as Hr,_a as zr,b as Tr,c as fn,d as qr,db as Gr,e as Tt,eb as ft,hb as gn,jb as ie,ka as qt,la as Ft}from"./chunk-VUMZSQZ5.js";import{S as ue,Y as Ze,da as $,o as Lr,p as Ir}from"./chunk-TMSNT2CP.js";import{fa as Rr,ha as Ue}from"./chunk-ZHEHF42C.js";import{i as Ar,j as pt,k as Ie}from"./chunk-DFYWYSOT.js";import{li as Or}from"./chunk-PVRWP47B.js";import"./chunk-G5LEO2F2.js";import"./chunk-LY7GZJ6M.js";import{a as mn,b as hi}from"./chunk-Y6SLVHK3.js";var Zr=mn((Gs,Xr)=>{"use strict";var ki="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Xr.exports=ki});var no=mn((Vs,to)=>{"use strict";var xi=Zr();function Qr(){}function eo(){}eo.resetWarningCache=Qr;to.exports=function(){function e(r,a,s,d,y,f){if(f!==xi){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:eo,resetWarningCache:Qr};return n.PropTypes=n,n}});var oo=mn((Zs,ro)=>{"use strict";ro.exports=no()();var Js,Xs});import{useEffect as Aa,useMemo as Ea,useRef as tt,useState as Ye}from"react";import{formatTime as bi}from"efficient-shell/format";function Vr(e,t){let n=Ir(t);return!n||Number.isNaN(new Date(e).getTime())?"":bi(e,{locale:Lr(),timeZone:n})}import{rootIsDark as vi}from"efficient-shell/format";function Jr(){if(typeof document>"u")return;let e=getComputedStyle(document.documentElement),t=(r,a)=>e.getPropertyValue(r).trim()||a,n=vi({whenUnset:!0});return{theme:n?"night":"stripe",variables:{colorPrimary:t("--accent",n?"#c9a461":"#8a6a2a"),colorBackground:t("--site-surface",n?"#131313":"#ffffff"),colorText:t("--fg",n?"#f5f1e8":"#0a0a0a"),borderRadius:"0px"}}}import{userZone as Rs,parseOption as Os}from"efficient-shell/format";var M=hi(oo(),1);import I from"react";function ao(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ci(e){if(Array.isArray(e))return e}function uo(e,t,n){return(t=Ri(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pi(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,d,y=[],f=!0,p=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(f=(r=s.call(n)).done)&&(y.push(r.value),y.length!==t);f=!0);}catch(k){p=!0,a=k}finally{try{if(!f&&n.return!=null&&(d=n.return(),Object(d)!==d))return}finally{if(p)throw a}}return y}}function Ni(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function io(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function so(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?io(Object(n),!0).forEach(function(r){uo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):io(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Si(e,t){if(e==null)return{};var n,r,a=wi(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function wi(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function po(e,t){return Ci(e)||Pi(e,t)||Oi(e,t)||Ni()}function Ei(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ri(e){var t=Ei(e,"string");return typeof t=="symbol"?t:t+""}function hn(e){"@babel/helpers - typeof";return hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hn(e)}function Oi(e,t){if(e){if(typeof e=="string")return ao(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ao(e,t):void 0}}var X=function(t,n,r){var a=!!r,s=I.useRef(r);I.useEffect(function(){s.current=r},[r]),I.useEffect(function(){if(!a||!t)return function(){};var d=function(){if(s.current)return s.current.apply(s,arguments)};return t.on(n,d),function(){t.off(n,d)}},[a,n,t,s])},bn=function(t){var n=I.useRef(t);return I.useEffect(function(){n.current=t},[t]),n.current},Qe=function(t){return t!==null&&hn(t)==="object"},Ai=function(t){return Qe(t)&&typeof t.then=="function"},Li=function(t){return Qe(t)&&typeof t.elements=="function"&&typeof t.createToken=="function"&&typeof t.createPaymentMethod=="function"&&typeof t.confirmCardPayment=="function"},co="[object Object]",Ii=function e(t,n){if(t===n)return!0;if(!Qe(t)||!Qe(n))return t===n;var r=Array.isArray(t),a=Array.isArray(n);if(r!==a)return!1;var s=Object.prototype.toString.call(t)===co,d=Object.prototype.toString.call(n)===co;if(s!==d)return!1;if(!s&&!r)return t===n;var y=Object.keys(t),f=Object.keys(n);if(y.length!==f.length)return!1;for(var p={},k=0;k<y.length;k+=1)p[y[k]]=!0;for(var h=0;h<f.length;h+=1)p[f[h]]=!0;var b=Object.keys(p);if(b.length!==y.length)return!1;var v=t,R=n,C=function(V){return e(v[V],R[V])};return b.every(C)},mo=function(t,n,r){return Qe(t)?Object.keys(t).reduce(function(a,s){var d=!Qe(n)||!Ii(t[s],n[s]);return r.includes(s)?(d&&console.warn("Unsupported prop change: options.".concat(s," is not a mutable property.")),a):d?so(so({},a||{}),{},uo({},s,t[s])):a},null):null},fo="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",lo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fo;if(t===null||Li(t))return t;throw new Error(n)},Ti=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fo;if(Ai(t))return{tag:"async",stripePromise:Promise.resolve(t).then(function(a){return lo(a,n)})};var r=lo(t,n);return r===null?{tag:"empty"}:{tag:"sync",stripe:r}},qi=function(t){!t||!t._registerWrapper||!t.registerAppInfo||(t._registerWrapper({name:"react-stripe-js",version:"6.12.0"}),t.registerAppInfo({name:"react-stripe-js",version:"6.12.0",url:"https://stripe.com/docs/stripe-js/react"}))},Mt=I.createContext(null);Mt.displayName="ElementsContext";var yo=function(t,n){if(!t)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(n," in an <Elements> provider."));return t},kn=function(t){var n=t.stripe,r=t.options,a=t.children,s=I.useMemo(function(){return Ti(n)},[n]),d=I.useState(function(){return{stripe:s.tag==="sync"?s.stripe:null,elements:s.tag==="sync"?s.stripe.elements(r):null}}),y=po(d,2),f=y[0],p=y[1];I.useEffect(function(){var b=!0,v=function(C){p(function(O){return O.stripe?O:{stripe:C,elements:C.elements(r)}})};return s.tag==="async"&&!f.stripe?s.stripePromise.then(function(R){R&&b&&v(R)}):s.tag==="sync"&&!f.stripe&&v(s.stripe),function(){b=!1}},[s,f,r]);var k=bn(n);I.useEffect(function(){k!==null&&k!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[k,n]);var h=bn(r);return I.useEffect(function(){if(f.elements){var b=mo(r,h,["clientSecret","fonts"]);b&&f.elements.update(b)}},[r,h,f.elements]),I.useEffect(function(){qi(f.stripe)},[f.stripe]),I.createElement(Mt.Provider,{value:f},a)};kn.propTypes={stripe:M.default.any,options:M.default.object};var go=function(t){var n=I.useContext(Mt);return yo(n,t)},ho=function(){var t=go("calls useElements()"),n=t.elements;return n},Fi=function(t){var n=t.children,r=go("mounts <ElementsConsumer>");return n(r)};Fi.propTypes={children:M.default.func.isRequired};var _i=I.createContext(null);_i.displayName="CheckoutContext";var bo=I.createContext(null);bo.displayName="CheckoutSdkContext";var vn=function(t){var n=I.useContext(bo),r=I.useContext(Mt);if(n){if(r)throw new Error("You cannot wrap the part of your app that ".concat(t," in both a checkout provider and <Elements> provider."));return n}else return yo(r,t)},Mi=["mode"],Ki=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},K=function(t,n,r){var a="".concat(Ki(t),"Element"),s=function(p){var k=p.id,h=p.className,b=p.options,v=b===void 0?{}:b,R=p.onBlur,C=p.onFocus,O=p.onReady,V=p.onChange,E=p.onEscape,P=p.onClick,Y=p.onLoadError,Z=p.onLoaderStart,pe=p.onNetworksChange,j=p.onConfirm,se=p.onCancel,Se=p.onShippingAddressChange,qe=p.onShippingRateChange,ee=p.onSavedPaymentMethodRemove,he=p.onSavedPaymentMethodUpdate,re=p.onAvailablePaymentMethodsChange,te=vn("mounts <".concat(a,">")),z="elements"in te?te.elements:null,g="checkoutSdk"in te?te.checkoutSdk:null,we=I.useState(null),Fe=po(we,2),U=Fe[0],nt=Fe[1],Q=I.useRef(null),be=I.useRef(null);X(U,"blur",R),X(U,"focus",C),X(U,"escape",E),X(U,"click",P),X(U,"loaderror",Y),X(U,"loaderstart",Z),X(U,"networkschange",pe),X(U,"confirm",j),X(U,"cancel",se),X(U,"shippingaddresschange",Se),X(U,"shippingratechange",qe),X(U,"savedpaymentmethodremove",ee),X(U,"savedpaymentmethodupdate",he),X(U,"availablepaymentmethodschange",re),X(U,"change",V);var Ee;O&&(t==="expressCheckout"?Ee=O:Ee=function(){O(U)}),X(U,"ready",Ee),I.useLayoutEffect(function(){if(Q.current===null&&be.current!==null&&(z||g)){var L=null;if(g){var oe=g,me=g;switch(t){case"paymentForm":L=me.createForm(v);break;case"payment":L=oe.createPaymentElement(v);break;case"address":if("mode"in v){var Oe=v.mode,ve=Si(v,Mi);if(Oe==="shipping")L=oe.createShippingAddressElement(ve);else if(Oe==="billing")L=oe.createBillingAddressElement(ve);else throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.")}else throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");break;case"expressCheckout":L=oe.createExpressCheckoutElement(v);break;case"currencySelector":L=g.createCurrencySelectorElement();break;case"taxId":L=oe.createTaxIdElement(v);break;case"contactDetails":L=oe.createContactDetailsElement();break;case"linkSignup":if("createLinkSignupElement"in g)L=g.createLinkSignupElement(v);else throw new Error("<LinkSignupElement> requires <CheckoutElementsProvider> and is not supported inside <CheckoutFormProvider>.");break;case"terms":L=oe.createTermsElement(v);break;default:throw new Error("<".concat(a,"> is not supported inside a checkout provider. Use an <Elements> provider instead."))}}else z&&(L=z.create(t,v));Q.current=L,nt(L),L&&L.mount(be.current)}},[z,g,v]);var Re=bn(v);return I.useEffect(function(){if(Q.current){var L=mo(v,Re,["paymentRequest"]);L&&"update"in Q.current&&Q.current.update(L)}},[v,Re]),I.useLayoutEffect(function(){return function(){if(Q.current&&typeof Q.current.destroy=="function")try{Q.current.destroy(),Q.current=null}catch{}}},[]),I.createElement("div",{id:k,className:h,ref:be})},d=function(p){vn("mounts <".concat(a,">"));var k=p.id,h=p.className;return I.createElement("div",{id:k,className:h})},y=n?d:s;return y.propTypes={id:M.default.string,className:M.default.string,onChange:M.default.func,onBlur:M.default.func,onFocus:M.default.func,onReady:M.default.func,onEscape:M.default.func,onClick:M.default.func,onLoadError:M.default.func,onLoaderStart:M.default.func,onNetworksChange:M.default.func,onConfirm:M.default.func,onCancel:M.default.func,onShippingAddressChange:M.default.func,onShippingRateChange:M.default.func,onSavedPaymentMethodRemove:M.default.func,onSavedPaymentMethodUpdate:M.default.func,onAvailablePaymentMethodsChange:M.default.func,options:M.default.object},y.displayName=a,y.__elementType=t,y},D=typeof window>"u",Di=I.createContext(null);Di.displayName="EmbeddedCheckoutProviderContext";var vo=function(){var t=vn("calls useStripe()"),n=t.stripe;return n},ec=K("auBankAccount",D),tc=K("card",D),nc=K("cardNumber",D),rc=K("cardExpiry",D),oc=K("cardCvc",D),ac=K("currencySelector",D),ic=K("iban",D),ko=K("payment",D),sc=K("expressCheckout",D),cc=K("paymentRequestButton",D),lc=K("linkAuthentication",D),uc=K("linkSignup",D),dc=K("contactDetails",D),pc=K("address",D),mc=K("shippingAddress",D),fc=K("paymentMethodMessaging",D),yc=K("taxId",D),gc=K("issuingCardNumberDisplay",D),hc=K("issuingCardCvcDisplay",D),bc=K("issuingCardExpiryDisplay",D),vc=K("issuingCardPinDisplay",D),kc=K("issuingCardCopyButton",D),xc=K("terms",D);function jt(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?jt=function(t){return typeof t}:jt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jt(e)}var Po="dahlia",ji=function(t){return t===3?"v3":t},No="https://js.stripe.com",Ui="".concat(No,"/").concat(Po,"/stripe.js"),Wi=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,$i=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,xo="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Yi=function(t){return Wi.test(t)||$i.test(t)},Bi=function(){for(var t=document.querySelectorAll('script[src^="'.concat(No,'"]')),n=0;n<t.length;n++){var r=t[n];if(Yi(r.src))return r}return null},Co=function(t){var n=t&&!t.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(Ui).concat(n);var a=document.head||document.body;if(!a)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return a.appendChild(r),r},Hi=function(t,n){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"9.17.0",startTime:n})},yt=null,Kt=null,Dt=null,zi=function(t){return function(n){t(new Error("Failed to load Stripe.js",{cause:n}))}},Gi=function(t,n){return function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))}},Vi=function(t){return yt!==null?yt:(yt=new Promise(function(n,r){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe&&t&&console.warn(xo),window.Stripe){n(window.Stripe);return}try{var a=Bi();if(a&&t)console.warn(xo);else if(!a)a=Co(t);else if(a&&Dt!==null&&Kt!==null){var s;a.removeEventListener("load",Dt),a.removeEventListener("error",Kt),(s=a.parentNode)===null||s===void 0||s.removeChild(a),a=Co(t)}Dt=Gi(n,r),Kt=zi(r),a.addEventListener("load",Dt),a.addEventListener("error",Kt)}catch(d){r(d);return}}),yt.catch(function(n){return yt=null,Promise.reject(n)}))},Ji=function(t,n,r){if(t===null)return null;var a=n[0];if(typeof a!="string")throw new Error("Expected publishable key to be of type string, got type ".concat(jt(a)," instead."));var s=a.match(/^pk_test/),d=ji(t.version),y=Po;s&&d!==y&&console.warn("Stripe.js@".concat(d," was loaded on the page, but @stripe/stripe-js@").concat("9.17.0"," expected Stripe.js@").concat(y,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var f=t.apply(void 0,n);return Hi(f,r),f},gt,So=!1,wo=function(){return gt||(gt=Vi(null).catch(function(t){return gt=null,Promise.reject(t)}),gt)};Promise.resolve().then(function(){return wo()}).catch(function(e){So||console.warn(e)});var Ut=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];So=!0;var a=Date.now();return wo().then(function(s){return Ji(s,n,a)})};var Wt=2;function Eo(e){return e==="card"}var Xi="checkout_unavailable",Zi="checkout_waiting",Ro="committed",Te="We could not check your payment. Please try again.",$t="Your last change was not saved. This is your order as placed.",Oo="Your bank is still waiting for you to approve this payment, so your order stays as it was. Finish the approval, or try again in a few minutes.",Ao=1e4;async function Lo(e,t=Ao){let n,r=new Promise(s=>{n=setTimeout(()=>s(void 0),t)}),a=(async()=>{try{return(await(await Ut(e.publishableKey))?.retrievePaymentIntent(e.clientSecret))?.paymentIntent?.status}catch{return}})();try{return await Promise.race([a,r])}finally{clearTimeout(n)}}var Io=new Set(["none","requires_payment_method","canceled"]);async function xn(e,t=Ao){let n,r=new Promise(a=>{n=setTimeout(()=>a(void 0),t)});try{return await Promise.race([$.releaseCheckout({idempotencyKey:e}).then(a=>a.status,()=>{}),r])}finally{clearTimeout(n)}}function To(e,t){return e instanceof ue&&typeof e.data=="object"&&e.data!==null&&e.data.code===t}function Yt(e){return To(e,Xi)}function Cn(e){return To(e,Zi)}function Pn(e){return e instanceof ue&&e.status>=400&&e.status<500&&e.status!==408}function qo(e){return JSON.stringify([e.email,e.firstName,e.lastName,e.phone,e.address,e.city,e.subdivision,e.postcode,e.country,e.lines,e.shippingMethodId,e.couponCode,e.currency,e.shopperId,e.company])}function Bt(e){return e.orderNumber||e.checkoutNumber}function Qi(e){return e.orderNumber?{kind:"placed",order:e}:{kind:e.status==="released"?"refunded":e.status==="expired"?"expired":"pending",checkoutNumber:e.checkoutNumber}}async function Fo({checkoutNumber:e,resend:t,page:n}){n.setConfirming(!0);let r;try{r=Qi(await t())}catch{r={kind:"pending",checkoutNumber:e}}r.kind==="placed"?(n.markPaid(),n.track(r.order),n.land(r.order)):n.unplaced({...r,checkoutNumber:r.checkoutNumber||e}),n.setConfirming(!1)}import{createContext as gs,useContext as hs,useEffect as H,useMemo as sa,useRef as B,useState as S}from"react";var es="sf:gclid",ts="sf:fbclid",ns=2160*60*60*1e3;function Ko(){return typeof window<"u"}function _o(e){let t=pt.getItem(e);if(!t)return"";try{let{v:n,t:r}=JSON.parse(t);return!n||typeof r!="number"||Date.now()-r>ns?"":n}catch{return""}}function Mo(e){if(!Ko())return"";let t=e.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1"),n=document.cookie.match(new RegExp(`(?:^|; )${t}=([^;]*)`));return n?decodeURIComponent(n[1]):""}function Do(){if(!Ko())return{};let e=_o(es),t=_o(ts),n=Mo("_fbp"),r=Mo("_fbc");!r&&t&&(r=`fb.1.${Date.now()}.${t}`);let a={};return e&&(a.gclid=e),t&&(a.fbclid=t),n&&(a.fbp=n),r&&(a.fbc=r),a}var jo="sf:meta-purchases",rs=20;function Wo(){return typeof window>"u"||window.parent!==window}function os(...e){try{if(Wo()||typeof window.fbq!="function")return;window.fbq(...e)}catch{}}var Uo=new Set;function as(e){if(Uo.has(e))return!1;Uo.add(e);try{let t=JSON.parse(pt.getItem(jo)??"[]");if(t.includes(e))return!1;pt.setItem(jo,JSON.stringify([...t,e].slice(-rs)))}catch{}return!0}function is(e){return[...new Set(e.filter(mt).flatMap(t=>t.components.map(n=>n.partNumber)))]}function $o(e){let t=e.confirmation;Wo()||!as(t.orderNumber)||os("track","Purchase",{value:Number(t.grandTotal),currency:t.currency,content_type:"product",content_ids:is(e.lines)},{eventID:t.orderNumber})}var Nn="checkout-afterpay-context",Sn="checkout-gocardless-context",wn="checkout-zip-context",En="checkout-klarna-context";function ss(e){return e?.lostChange===!0}function cs({evidence:e,parked:t}){return e?{action:"capture",evidence:e,parked:t}:t?{action:"settle",parked:t}:{action:"ignore"}}function ls(e,t){let n=e.getItem(t);if(e.removeItem(t),!n)return null;try{return JSON.parse(n)}catch{return null}}function us(e){let t=e.words?.declined??`${e.name} declined the payment \u2014 our team will follow up on payment.`;return{settled:e.words?.settled??`The ${e.name} payment was not completed \u2014 our team will follow up on payment.`,declined:t,collecting:e.words?.collecting??t,unconfirmed:e.words?.unconfirmed??`We could not confirm the ${e.name} payment \u2014 our team will follow up on payment.`}}var Yo={name:"Afterpay",legParam:"afterpay",legValues:["confirm","cancel"],storageKey:Nn,evidenceFrom(e,t){return t==="cancel"||(e.get("status")??"").toUpperCase()==="CANCELLED"?null:e.get("orderToken")},requestFrom:e=>({token:e})},Bo={name:"Zip",legParam:"zip",legValues:["return"],storageKey:wn,evidenceFrom(e){let t=(e.get("result")??"").toLowerCase();return t==="cancelled"||t==="declined"?null:e.get("checkoutId")},requestFrom:e=>({checkoutId:e})},Ho={name:"GoCardless",legParam:"gocardless",legValues:["confirm","cancel"],storageKey:Sn,evidenceFrom:(e,t)=>t==="confirm"?t:null,requestFrom:(e,t)=>({idempotencyKey:t?.idempotencyKey??""}),keyedByParked:!0,words:{settled:"The direct debit was not set up \u2014 our team will follow up on payment.",declined:"The direct debit was declined \u2014 our team will follow up on payment.",collecting:"Your direct debit is set up \u2014 the payment is collecting and will clear in a few days.",unconfirmed:"We could not confirm the direct debit \u2014 our team will follow up on payment."}},zo={name:"Klarna",legParam:"klarna",legValues:["confirm","cancel"],storageKey:En,evidenceFrom:(e,t)=>t==="confirm"?e.get("authorization_token"):null,requestFrom:(e,t)=>({idempotencyKey:t?.idempotencyKey??"",authorizationToken:e}),keyedByParked:!0,words:{collecting:"Your Klarna payment is being reviewed \u2014 we'll confirm the outcome shortly."}};async function ht(e,t){let n=new URLSearchParams(t.search),r=n.get(e.legParam);if(!r||!e.legValues.includes(r))return;let a=ls(t.storage,e.storageKey),s=e.evidenceFrom(n,r);t.scrubQuery();let d=cs({evidence:s,parked:a});if(d.action==="ignore"||e.keyedByParked&&!d.parked)return;let y=us(e);if(t.page.clearCart(),ss(d.parked)&&t.page.lostChange(),d.action==="settle"){t.page.note(y.settled,!0),t.page.land(d.parked.confirmation);return}t.page.setConfirming(!0);try{let f=await t.capture(e.requestFrom(d.evidence,d.parked));f.status==="paid"?t.page.markPaid():f.status==="collecting"?t.page.note(y.collecting,!e.words?.collecting):t.page.note(y.declined,!0),t.page.land(d.parked?.confirmation??f)}catch{d.parked?(t.page.note(y.unconfirmed,!0),t.page.land(d.parked.confirmation)):t.page.fail(`We could not confirm your ${e.name} payment. Please contact us before trying again \u2014 your payment may already have been taken.`)}finally{t.page.setConfirming(!1)}}function Go(e,t,n){let r=(t??"").trim();if(!r)return"";if(n.length===0)return r;let a=r.toUpperCase(),s=`${e.toUpperCase()}-${a}`,d=n.find(y=>y.code&&y.code.toUpperCase()===a)??n.find(y=>y.code&&y.code.toUpperCase()===s)??n.find(y=>y.name.toUpperCase()===a);return d?d.code||d.name:""}var On="checkout-memory-context",Xo="Prices have changed since this checkout started. The total shows today's prices.",Zo="We couldn't check today's prices for your basket. Try again in a moment \u2014 you can place the order once the total is confirmed.",Qo=3,ds=3600*1e3;function ps(e){return{id:e.id,slug:e.slug,name:{lead:e.name?.lead,accent:e.name?.accent},process:e.process,positionNo:e.positionNo,config:(e.config??[]).map(t=>({label:t.label,gold:t.gold})),finishName:e.finishName,size:e.size,qty:e.qty,href:e.href,kind:e.kind,sku:e.sku,components:e.components.map(t=>({partNumber:t.partNumber,wheels:t.wheels,prices:{...t.prices},hand:t.hand}))}}var Ht=e=>e.map(ps);function ea(e,t){let n=r=>JSON.stringify(r.map(a=>[a.id,a.qty]).sort(([a],[s])=>a<s?-1:a>s?1:0));return n(e)===n(t)}function ta(e){let t=e.customer;return{customer:{email:t.email,name:t.name,phone:t.phone,companyName:t.companyName,address:t.address,city:t.city,state:t.state,zipCode:t.zipCode,country:t.country},items:e.items.flatMap(n=>Tt([{partNumber:n.partNumber,wheels:n.quantity,prices:{}}],1)),currency:e.currency,idempotencyKey:e.idempotencyKey,shippingMethodId:e.shippingMethodId,couponCode:e.couponCode}}function An(e){return{...ta(e),payFirst:!!e.checkoutFlow}}function na(e){return ta(e)}var ms={lastPress:null,keptCardKey:null,placedShape:null,placedRequest:null,unpaidOrder:null};function Ln(e){let t=n=>typeof n=="string"?n:"";return{email:t(e.email),firstName:t(e.firstName),lastName:t(e.lastName),company:t(e.company),address1:t(e.address1),address2:t(e.address2),city:t(e.city),postcode:t(e.postcode),phone:t(e.phone),country:t(e.country),subdivision:t(e.subdivision),selectedAddressId:t(e.selectedAddressId),shippingMethodId:typeof e.shippingMethodId=="string"?e.shippingMethodId:null,couponCode:typeof e.couponCode=="string"?e.couponCode:null}}function In(e){return{orderNumber:e.orderNumber,checkoutNumber:e.checkoutNumber,expiresAt:e.expiresAt,status:e.status,total:e.total,currency:e.currency,freightCharge:e.freightCharge,discountAmount:e.discountAmount,grandTotal:e.grandTotal,shippingMethod:e.shippingMethod,couponCode:e.couponCode}}function Tn(e){return e.lastPress!==null||e.unpaidOrder!==null||e.keptCardKey!==null}function fs(e){let t=e.parkedAt+ds,n=e.press.unpaidOrder,r=n&&!n.orderNumber?n.expiresAt:null,a=r?Date.parse(r):NaN;return Number.isNaN(a)?t:Math.min(t,a)}function ra(e){try{let t={...e,lines:Ht(e.lines),press:aa(e.press)};Ie.setItem(On,JSON.stringify({v:Qo,...t}))}catch{}}var We=e=>!!e&&typeof e=="object"&&!Array.isArray(e),oa=e=>We(e)&&typeof e.idempotencyKey=="string"&&Array.isArray(e.items)&&e.items.every(t=>We(t)&&typeof t.partNumber=="string"&&typeof t.quantity=="number")&&We(e.customer)&&typeof e.payFirst=="boolean",Rn=e=>We(e)&&typeof e.id=="string"&&typeof e.qty=="number"&&Array.isArray(e.components);function ys(e){return We(e)&&typeof e.key=="string"&&oa(e.request)&&Array.isArray(e.lines)&&e.lines.every(Rn)&&Array.isArray(e.plainLines)&&e.plainLines.every(Rn)?{key:e.key,request:e.request,lines:Ht(e.lines),goods:typeof e.goods=="string"?e.goods:"",plainPressed:e.plainPressed===!0,plainLines:Ht(e.plainLines),plainGoods:typeof e.plainGoods=="string"?e.plainGoods:""}:null}var Vo=e=>typeof e=="string"?e:null,Jo={lastPress:ys,keptCardKey:Vo,placedShape:Vo,placedRequest:e=>oa(e)?e:null,unpaidOrder:e=>We(e)?In(e):null};function aa(e){let t=We(e)?e:{},n={...ms};for(let r of Object.keys(Jo))n[r]=Jo[r](t[r]);return n}function ia(){let e;try{e=Ie.getItem(On)}catch{return null}if(!e)return null;try{let t=JSON.parse(e);if(t.v!==Qo||typeof t.key!="string"||!t.key||!Array.isArray(t.lines)||!t.lines.every(Rn)||typeof t.parkedAt!="number")return null;let n={key:t.key,authed:t.authed===!0,parkedAt:t.parkedAt,press:aa(t.press),lines:Ht(t.lines),form:t.form&&typeof t.form=="object"?Ln(t.form):null};return Date.now()>=fs(n)?(qn(),null):Tn(n.press)?n:null}catch{return null}}function qn(){try{Ie.removeItem(On)}catch{}}import{jsx as Ce}from"react/jsx-runtime";function ca(e){let t=e.indexOf(`
|
|
3
3
|
`);return t===-1?[e,""]:[e.slice(0,t),e.slice(t+1)]}function la(e,{canParkContext:t}={canParkContext:!0}){let n=e.paymentMethods,r=[];return n.includes("card")&&r.push({key:"card",title:"Card",body:null,price:Ce("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"VISA \xB7 MC \xB7 AMEX"})}),n.includes("paypal")&&e.paypalClientId&&r.push({key:"paypal",title:"PayPal",body:null,price:Ce("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAYPAL \xB7 CARDS"})}),n.includes("afterpay")&&r.push({key:"afterpay",title:"Afterpay",body:null,price:Ce("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"4 \xD7 INTEREST-FREE"})}),n.includes("square")&&e.squareApplicationId&&e.squareLocationId&&r.push({key:"square",title:"Card (Square)",body:null,price:Ce("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"VISA \xB7 MC \xB7 AMEX"})}),n.includes("gocardless")&&t&&r.push({key:"gocardless",title:"Bank Direct Debit",body:null,price:Ce("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAY BY BANK"})}),n.includes("zip")&&r.push({key:"zip",title:"Zip",body:null,price:Ce("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAY IN 4"})}),n.includes("klarna")&&t&&r.push({key:"klarna",title:"Klarna",body:null,price:Ce("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAY LATER"})}),n.includes("bank")&&r.push({key:"bank",title:"Bank transfer",body:null,price:Ce("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Invoiced"})}),r}var fa="This shop does not take payment online yet. Please contact the shop to order.",et=class extends Error{};function ua(e,t){if(!e.orderNumber&&Yt(t))return t.message;let n=t instanceof ue?` (${t.message})`:"";return e.orderNumber?`Your order ${e.orderNumber} is saved, but the payment did not start${n}. Try the payment again \u2014 your order will not be placed twice.`:`Your items are held under ${e.checkoutNumber}, but the payment did not start${n}. Try the payment again \u2014 you will not be charged twice.`}var bs=3e3,vs=.005,da=new Set(["paypal","square","afterpay","gocardless","zip","klarna"]);function pa(){let e=Gr();return{...e==="denied"?{}:Do(),...e?{adConsent:e}:{}}}var ge=e=>JSON.parse(e),ks={lastPress:null,keptCardKey:null,placedShape:null,placedRequest:null,unpaidOrder:null},xs={lastPress:e=>e&&{key:e.key,request:An(e.request),lines:e.lines,goods:ge(e.shape)[0],plainPressed:!!e.plainMethod,plainLines:e.plainLines,plainGoods:ge(e.plainShape)[0]},keptCardKey:e=>e,placedShape:e=>e===null?null:ge(e)[0],placedRequest:e=>e&&An(e.body),unpaidOrder:e=>e&&In(e)};function ma(e,t){let n={};for(let r of Object.keys(e))n[r]=e[r](t[r]);return n}var ya="Shipping cannot be calculated right now. Please try again.";function ga(e){return`Your order is saved, so its contact, address, delivery and discount can't change here. To change any of them, contact the shop and quote ${e}.`}function Cs({site:e,logo:t,preview:n=!1}){let{items:r,totals:a,coupon:s,refuseCoupon:d,deliveryOptions:y,shippingMethodId:f,setShippingMethodId:p,setQuoteDestination:k,courier:h,requote:b,identify:v,clearCapturedCart:R,replaceItems:C,removeCoupon:O,applyCoupon:V}=_t(),E=y.find(o=>o.id===f)?.pickupLocation??null,{country:P,countries:Y,activeCountry:Z,formatMoney:pe}=ye(),[j,se]=S(()=>la(e)[0]?.key??null),[Se,qe]=S(!0);H(()=>{qe(Ar(Ie))},[]);let[ee,he]=S(!1),[re,te]=S(""),[z,g]=S(""),[we,Fe]=S(""),[U,nt]=S(""),[Q,be]=S(""),[Ee,Re]=S(""),[L,oe]=S(""),[me,Oe]=S(""),[ve,rt]=S(""),[W,ot]=S(()=>P||Y[0]?.code||""),[ke,vt]=S(""),[at,Dn]=S([]),[Xt,Zt]=S(null),[kt,Be]=S(null),jn=sa(()=>Y.find(o=>o.code===W)??Z,[Y,W,Z]),La=jn?.postalLabel||"Postal Code",Ia=at[0]?.divisionType||"State / Province";H(()=>{if(!W){Dn([]),Zt(W);return}Zt(null);let o=!1;return $.listCountrySubdivisions(W).then(c=>{o||(Dn(c),Zt(W),vt(""))}),()=>{o=!0}},[W]);let Un=Q.trim()!==""&&L.trim()!==""&&me.trim()!==""&&Xt===W&&(at.length===0||ke!=="")?me.trim():"";H(()=>{k(W?{country:W,subdivision:ke,postcode:Un}:null)},[W,ke,Un,k]),H(()=>()=>k(null),[k]);let Ta=h?.status==="unavailable",qa=b,[it,Wn]=S(null),[Fa,$n]=S([]),[Qt,xt]=S("new"),[Yn,Bn]=S(!1),[en,_a]=S("Home"),[Ma,Hn]=S(null),[Ka,tn]=S(null),[_e,Ct]=S(()=>ft()),zn=B(null),[nn,He]=S(null),[Da,ce]=S(null),[Gn,Pt]=S(null),[Vn,ja]=S(!1),[Jn,Ua]=S(!1),[Ae,ze]=S(null),[Wa,Nt]=S(!1),[J,le]=S(null),Xn=!!J?.orderNumber,$a=Xn||ee,[Ya,Ba]=S(null),[Ha,za]=S(!1),[Ga,Va]=S(!1),[Ja,Xa]=S(!1),[Za,Qa]=S(!1),[Zn,ei]=S(!1),[ti,rn]=S(!1),[st,Qn]=S(null),A=B({...ks});A.current.unpaidOrder=J;let on=B(!1),Me=B(r),er=!!(nn||st&&st.kind!=="processing"||Zn||Vn||Jn||Gn&&Ae?.orderNumber);H(()=>{er&&(C([]),O())},[er,C,O]);let tr=B(!1);H(()=>{n||tr.current||!r.some(mt)||(tr.current=!0,Fr({lines:r,currency:a.currency,value:a.subtotal-a.discount,coupon:s?.valid?s.code:void 0}))},[r,a,s,n]),H(()=>{v(re,z.trim()||void 0)},[re,z,v]);let nr=B(null),[St,ni]=S(null);H(()=>{let o=nr.current;if(!St||!o)return;let c=()=>o.style.setProperty("--sf-checkout-header-h",`${St.offsetHeight}px`);c();let m=new ResizeObserver(c);return m.observe(St),()=>m.disconnect()},[St]),H(()=>{let o=m=>({setConfirming:m,land:He,markPaid:()=>Nt(!0),note:(w,u)=>Ba({text:w,warning:u}),fail:ce,clearCart:R,lostChange:()=>tn($t)}),c={search:window.location.search,storage:Ie,scrubQuery:()=>window.history.replaceState(null,"",window.location.pathname)};ht(Yo,{...c,capture:$.captureAfterpayPayment,page:o(za)}),ht(Bo,{...c,capture:$.captureZipPayment,page:o(Xa)}),ht(Ho,{...c,capture:$.completeGocardlessPayment,page:o(Va)}),ht(zo,{...c,capture:$.captureKlarnaPayment,page:o(Qa)})},[]);function rr(o){let[c,m]=ca(o.address);be(c),Re(m),oe(o.city),Oe(o.zip_code),o.country&&ot(o.country),o.phone&&rt(o.phone),Be({country:o.country||null,state:o.state??""})}H(()=>{if(kt){if((kt.country||W)!==W){Be(null);return}Xt===W&&(vt(Go(W,kt.state,at)),Be(null))}},[kt,W,Xt,at]),H(()=>{let o=!1;return(async()=>{try{let[c,m,w]=await Promise.all([Ze.me(),Ze.myProfile().catch(()=>null),Ze.myAddresses().catch(()=>[])]);if(o)return;Wn(c);let u=w.filter(_=>_.is_active);$n(u),te(c.email);let T=(m?.contact_name??"").split(/\s+/);g(c.first_name||T[0]||""),Fe(c.last_name||T.slice(1).join(" "));let F=c.phone||m?.phone;F&&rt(F);let q=u.find(_=>_.id===c.default_delivery_location)??u[0];if(q)xt(q.id),rr(q);else if(m){let[_,Xe]=ca(m.address??"");be(_),Re(Xe),oe(m.city??""),Oe(m.zip_code??""),m.country&&ot(m.country),Be({country:m.country||null,state:m.state??""})}It.current&&ur(It.current,!1)}catch{}})(),()=>{o=!0}},[]);function ri(){Ze.logout(),ct.current=!0,It.current=null,Lt.current=null,lt(),Wn(null),$n([]),xt("new"),Bn(!1),te(""),g(""),Fe(""),nt(""),be(""),Re(""),oe(""),Oe(""),rt(""),ot(P||Y[0]?.code||""),vt(""),Be(null)}let Ge=sa(()=>la(e,{canParkContext:Se}),[e,Se]);H(()=>{Ge.some(o=>o.key===j)||se(Ge[0]?.key??null)},[Ge,j]);let oi=Ge.length===0,wt=Ee.trim()?`${Q}
|
|
4
4
|
${Ee.trim()}`:Q,ai=qo({email:re,firstName:z,lastName:we,company:U.trim(),phone:ve,address:wt,city:L,subdivision:ke,postcode:me,country:W,lines:r.map(o=>[o.id,o.qty]),shippingMethodId:f,couponCode:fn(s),currency:a.currency,shopperId:it?.id??null}),ae=JSON.stringify([ai,j]),an=B(null),Et=B(!1),Le=B(!1),Ve=B(null),Rt=B(!1),fe=B(ae);fe.current=ae;let or=B(ee);or.current=ee;let Ot=B(null);H(()=>{let o=()=>{let c=Ot.current;c&&(Ot.current=null,le(c),he(!1))};return window.addEventListener("pageshow",o),()=>window.removeEventListener("pageshow",o)},[]);function At(o,c,m,w){let u={idempotencyKey:c,confirmation:m};gr()&&(u.lostChange=!0),Ie.setItem(o,JSON.stringify(u)),window.location.assign(w),Ot.current=m}async function ar(o){he(!0);try{await o()}finally{Ot.current||he(!1)}}let ir=B(!1),sr=!!(nn||st&&st.kind!=="processing");H(()=>{sr&&(ir.current=!0,lt())},[sr]);let Lt=B(null),ct=B(!1),sn=B(null);function lt(){sn.current=null,qn()}let It=B(null),[Je,ii]=S(!1);function cn(o){if(ir.current||n||ct.current)return;let c={key:o,authed:on.current,parkedAt:sn.current??=Date.now(),press:ma(xs,A.current),lines:r.length>0?r:Me.current,form:Ln({email:re,firstName:z,lastName:we,company:U,address1:Q,address2:Ee,city:L,postcode:me,phone:ve,country:W,subdivision:ke,selectedAddressId:Qt,shippingMethodId:f,couponCode:s?.valid?s.code:null})};Tn(c.press)?ra(c):lt()}let cr=B(j);cr.current=j;function ln(o){return{...na(o),...pa(),...o.payFirst?{checkoutFlow:Wt}:{}}}function si(o,c){let m=o.request.payFirst?"":null,w=o.plainPressed?null:"",u=()=>cr.current??"";return{key:o.key,send:()=>c(ln(o.request)),request:ln(o.request),lines:o.lines,shape:JSON.stringify([o.goods,null]),get method(){return m??u()},set method(T){m=T},get plainMethod(){return w??u()},set plainMethod(T){w=T},plainLines:o.plainLines,plainShape:JSON.stringify([o.plainGoods,null])}}let[ci,li]=S(!1),lr=ci?!a.quoted||a.serverSubtotal===null?"waiting":Math.abs(a.serverSubtotal-a.subtotal)<vs?"same":"changed":null,un=!J&&lr==="waiting",ui=un?{...a,repricing:!0}:a,dn=un&&a.quoteFailed;H(()=>{if(!dn)return;let o=setInterval(b,bs);return()=>clearInterval(o)},[dn,b]);let di=b;function ur(o,c=!0){te(o.email),g(o.firstName),Fe(o.lastName),nt(o.company),be(o.address1),Re(o.address2),oe(o.city),Oe(o.postcode),rt(o.phone),o.country&&ot(o.country),Be({country:o.country||null,state:o.subdivision}),xt(o.selectedAddressId),o.shippingMethodId&&p(o.shippingMethodId),c&&(Lt.current=o.couponCode)}H(()=>{let o=n?null:ia(),c=!!(o&&r.length>0);if(o&&c&&!ea(o.lines,r)&&(lt(),o=null),o){let m=o.authed?$.createOrderAuthed:$.createOrder;Ct(o.key),sn.current=o.parkedAt,on.current=o.authed;let w={lastPress:u=>u&&si(u,m),keptCardKey:u=>u,placedShape:u=>u===null?null:JSON.stringify([u,null]),placedRequest:u=>{if(!u)return null;let T=ln(u);return{body:T,send:()=>m(T)}},unpaidOrder:u=>u};A.current=ma(w,o.press),o.press.unpaidOrder&&le(o.press.unpaidOrder),o.lines.length>0&&!c&&(C(o.lines),Me.current=o.lines,li(!0)),o.form&&(It.current=o.form,ur(o.form))}ii(!0)},[]),H(()=>{!Je||r.length>0||A.current.unpaidOrder||ee||(ct.current=!0,lt())},[Je,r.length]),H(()=>{let o=Lt.current;!Je||!o||r.length===0||(Lt.current=null,V(o,re||void 0))},[Je,r.length]),H(()=>{!Je||ee||cn(_e)},[Je,ee,_e,J]);let Ke=B(null);H(()=>{or.current||(ae!==Ke.current&&(Ke.current=null),!(!Le.current||!J||J.orderNumber)&&(ae===A.current.placedShape||ae===Ke.current||ar(()=>dr(J))))},[ae,J]);async function dr(o){if(Rt.current)return null;Rt.current=!0;try{let c=Ve.current?await Lo(Ve.current):"none";if(c==="succeeded"||c==="processing")return Le.current=!1,le(null),xe("card"),c==="succeeded"?await De(void 0,o):xr(o),null;if(c===void 0||!Io.has(c))return Ke.current=fe.current,le(o),ce(c==="requires_action"?Oo:Te),null;let m=await xn(_e);if(m==="committed")return Le.current=!1,le(null),xe("card"),await De(void 0,o),null;if(m!=="released")return Ke.current=fe.current,le(o),ce(Te),null;Le.current=!1,Ve.current=null,Ke.current=null,ce(null),le(null);let w=ft();return Ct(w),w}finally{Rt.current=!1}}async function pi(){n||ee||Rt.current||await ar(mi)}async function mi(){if(J){if((Le.current?ae!==A.current.placedShape:ut())&&!J.orderNumber){let w=await dr(J);w&&fe.current===ae&&await pr(w);return}ce(null),Et.current=!1,await pn();let c=ge(fe.current)[1],m=J.orderNumber?c:"card";if(m&&da.has(m)&&ut()&&ge(fe.current)[0]!==an.current){mr(J);return}xe(m),m!==j&&se(m),await Cr(J,m,!J.orderNumber);return}await pr(_e)}async function pr(o){if(r.length===0||a.repricing||un||!j||!Ge.some(F=>F.key===j))return;let c=r.filter(mt).flatMap(F=>Tt(F.components,F.qty));if(c.length===0){ce("Pick a size on each wheel's product page before checking out.");return}ce(null);let m,w=o,u=j,T=!1;try{let F=it?$.createOrderAuthed:$.createOrder,q={customer:{email:re,name:`${z} ${we}`.trim(),phone:ve.trim()||void 0,companyName:U.trim()||void 0,address:wt,city:L,state:ke||void 0,zipCode:me,country:W},items:c,currency:a.currency,idempotencyKey:o,shippingMethodId:f??void 0,couponCode:fn(s),...pa(),...Eo(j)?{checkoutFlow:Wt}:{}};A.current.placedRequest={body:q,send:()=>F(q)},on.current=!!it,ct.current=!1,tn(null),an.current=null,Et.current=!1,Ve.current=null,Le.current=!1,Ke.current=null,A.current.placedShape=ae,Me.current=r;let _=A.current.lastPress,Xe=_?.key===q.idempotencyKey&&(_.shape!==ae&&(!!q.checkoutFlow||!!_.method||!!_.plainMethod)||!!q.checkoutFlow&&!!_.plainMethod);Xe&&(A.current.keptCardKey=q.idempotencyKey);let Sr=br(q,F),wr=Xe||!q.checkoutFlow&&A.current.keptCardKey===q.idempotencyKey,Er=!Sr&&!wr&&!q.checkoutFlow&&!!_&&!_.method;Er&&(_.plainMethod=j,_.plainLines=r,_.plainShape=ae,cn(q.idempotencyKey));let je=await(wr?yr(q,F):F(q).then(dt=>({answer:dt,request:q})).catch(dt=>(Sr?fr(dt,q.idempotencyKey):Er&&Pn(dt)&&(_.plainMethod=""),fi(dt,q,F))));if(!je)return;m=je.answer,w=je.request.idempotencyKey,u=je.method??u,xe(u),T=ut()||u!==ge(fe.current)[1],je.method&&je.method!==j&&se(je.method),m.orderNumber&&(vr(m),R()),await pn()}catch(F){let q=qr(F);q?(d(q),ce(`${q} Your order has not been placed. Place it again to continue without the code.`)):F instanceof et?ce(Te):ce(F instanceof ue?F.message:"Could not place the order. Please try again.");return}if(u&&da.has(u)&&(T||ut())){mr(m);return}await Cr(m,u,!1,w)}function mr(o){an.current=ge(fe.current)[0],ce(`${ua(o,null)} ${$t}`),le(o)}function fr(o,c){Pn(o)&&!Cn(o)&&A.current.lastPress?.key===c&&(A.current.lastPress=null)}async function fi(o,c,m){if(Yt(o))return hr(c,m);if(!Cn(o))throw o;return A.current.keptCardKey=c.idempotencyKey,yr(c,m,!0)}async function yr(o,c,m=!1){let w=await xn(o.idempotencyKey);if(w==="released")return hr(o,c);if(w!=="committed")throw new et;let u=A.current.lastPress?.key===o.idempotencyKey?A.current.lastPress:null;if(Me.current=u?.lines??r,u?.method&&!m){A.current.keptCardKey=null,A.current.placedRequest={body:u.request,send:u.send};let Xe=await u.send().catch(()=>{throw new et});return A.current.placedShape=u.shape,{answer:Xe,request:o,method:u.method}}let T={...o,checkoutFlow:Wt},F=u&&!u.method?{body:u.request,send:u.send}:{body:T,send:()=>c(T)};A.current.placedRequest=F;let q=F.send,_=await q().catch(()=>null);if(!_&&u?.plainMethod)throw new et;return _?.orderNumber&&_.status!==Ro?(A.current.keptCardKey=null,u?.plainMethod&&(Me.current=u.plainLines),u&&(A.current.placedShape=u.plainMethod?u.plainShape:u.shape),{answer:_,request:o,method:u?.plainMethod||void 0}):(u&&(A.current.placedShape=u.shape),xe("card"),await kr("",_?async()=>_:()=>Promise.reject(new Error("The order request did not answer."))),await pn(),null)}function ut(){let o=A.current.placedShape;return o!==null&&ge(o)[0]!==ge(fe.current)[0]}function xe(o){o!==ge(fe.current)[1]&&(Et.current=!0),tn(gr()?$t:null)}function gr(){return Et.current||ut()}async function hr(o,c){let m={...o,idempotencyKey:ft()};A.current.keptCardKey=null,Ct(m.idempotencyKey),A.current.placedRequest={body:m,send:()=>c(m)},br(m,c);try{return{answer:await c(m),request:m}}catch(w){throw fr(w,m.idempotencyKey),w}}function br(o,c){return A.current.lastPress?.key===o.idempotencyKey?!1:(A.current.lastPress={key:o.idempotencyKey,send:()=>c(o),request:o,lines:r,shape:ae,method:o.checkoutFlow?"":j??"",plainMethod:"",plainLines:r,plainShape:ae},ct.current=!1,cn(o.idempotencyKey),!0)}function vr(o){_r({confirmation:o,lines:Me.current,adsSendTo:e.googleAdsId&&e.googleAdsConversionLabel?`${e.googleAdsId}/${e.googleAdsConversionLabel}`:null}),$o({confirmation:o,lines:Me.current})}async function De(o,c=Ae){if(!c)return;let m=o?async()=>o:A.current.placedRequest?.send;if(c.orderNumber||!m){Nt(!0),He(c);return}await kr(c.checkoutNumber,m)}async function kr(o,c){R(),await Fo({checkoutNumber:o,resend:c,page:{setConfirming:ei,land:He,markPaid:()=>Nt(!0),track:vr,unplaced:Qn}})}function xr(o=Ae){if(o){if(o.orderNumber){He(o);return}R(),Qn({kind:"processing",checkoutNumber:o.checkoutNumber})}}async function pn(){let o=JSON.stringify([en.trim(),z,we,ve.trim(),wt,L,ke,me,W]);if(!(!it||!Yn||Qt!=="new"||zn.current===o))try{await Ze.createAddress({label:en.trim()||"Home",contact_name:`${z} ${we}`.trim(),phone:ve.trim(),address:wt,city:L,zip_code:me,state:ke,country:W}),zn.current=o,Hn("Address saved to your account.")}catch{Hn("We couldn't save the address to your account \u2014 you can add it under Account \u2192 Addresses.")}}async function Cr(o,c=j,m=!1,w=_e){le(null);try{if(c==="card"&&e.paymentMethods.includes("card")){let u=await $.createPaymentIntent({idempotencyKey:w});Ve.current=u;let T=o;if(m){let F=await A.current.placedRequest?.send().catch(()=>null);if(F?.orderNumber){xe("card"),await De(F,o);return}T=Pr(o,F)??{...o,expiresAt:null}}xe("card"),ze(T),rn(!1),Pt(u)}else if(c==="paypal"&&e.paymentMethods.includes("paypal"))ze(o),ja(!0);else if(c==="afterpay"&&e.paymentMethods.includes("afterpay")){let u=window.location.origin,T=await $.createAfterpayCheckout({idempotencyKey:w,confirmUrl:`${u}/checkout?afterpay=confirm`,cancelUrl:`${u}/checkout?afterpay=cancel`});At(Nn,w,o,T.redirectCheckoutUrl);return}else if(c==="square"&&e.paymentMethods.includes("square"))ze(o),Ua(!0);else if(c==="gocardless"&&e.paymentMethods.includes("gocardless")){let u=window.location.origin,T=await $.createGocardlessBillingRequest({idempotencyKey:w,confirmUrl:`${u}/checkout?gocardless=confirm`,cancelUrl:`${u}/checkout?gocardless=cancel`});At(Sn,w,o,T.authorisationUrl);return}else if(c==="zip"&&e.paymentMethods.includes("zip")){let u=window.location.origin,T=await $.createZipCheckout({idempotencyKey:w,redirectUrl:`${u}/checkout?zip=return`});At(wn,w,o,T.redirectUrl);return}else if(c==="klarna"&&e.paymentMethods.includes("klarna")){let u=window.location.origin,T=await $.createKlarnaCheckout({idempotencyKey:w,confirmUrl:`${u}/checkout?klarna=confirm`,cancelUrl:`${u}/checkout?klarna=cancel`});At(En,w,o,T.redirectUrl);return}else xe(c),He(o)}catch(u){if((m||c==="card")&&u instanceof ue&&u.status===409){xe(c),await De(void 0,o);return}Nr(o,u)}}function Pr(o,c){return c&&!c.orderNumber&&c.status==="open"&&c.checkoutNumber===o.checkoutNumber?c:null}function Nr(o,c){ce(ua(o,c)),!o.orderNumber&&Yt(c)?(Le.current=!1,Ct(ft())):le(o)}async function yi(o){if(!Ae)return;let c=Ae;try{let m=await $.createPaymentIntent({idempotencyKey:_e}),w=await A.current.placedRequest?.send().catch(()=>null);if(w?.orderNumber){await De(w);return}let u=Pr(c,w);ze(u??{...c,expiresAt:null}),rn(o&&u!==null),Ve.current=m,Pt(m)}catch(m){if(m instanceof ue&&m.status===409){await De();return}Pt(null),ze(null),Nr(c,m)}}function gi(){Ae&&(Le.current=!0,le(Ae),Pt(null),ze(null),rn(!1))}return{site:e,logo:t,items:r,totals:ui,coupon:s,deliveryOptions:y,courierUnavailable:Ta,retryCourier:qa,shippingMethodId:f,setShippingMethodId:p,pickupLocation:E,servedCountries:Y,formatMoney:pe,payChoice:j,setPayChoice:se,placing:ee,email:re,setEmail:te,firstName:z,setFirstName:g,lastName:we,setLastName:Fe,company:U,setCompany:nt,address1:Q,setAddress1:be,address2:Ee,setAddress2:Re,city:L,setCity:oe,postcode:me,setPostcode:Oe,phone:ve,setPhone:rt,country:W,setCountry:ot,subdivision:ke,setSubdivision:vt,subdivisions:at,destination:jn,postcodeLabel:La,subdivisionLabel:Ia,me:it,savedAddresses:Fa,selectedAddressId:Qt,setSelectedAddressId:xt,saveAddress:Yn,setSaveAddress:Bn,saveLabel:en,setSaveLabel:_a,addressSaveNote:Ma,lostChangeNote:Ka,idemKey:_e,confirmation:nn,setConfirmation:He,orderError:Da,payment:Gn,paypalStep:Vn,squareStep:Jn,pendingConf:Ae,paid:Wa,setPaid:Nt,unpaidOrder:J,orderLocked:Xn,formLocked:$a,restoredPrices:lr,quoteFailed:dn,retryQuote:di,payNote:Ya,afterpayConfirming:Ha,gocardlessConfirming:Ga,zipConfirming:Ja,klarnaConfirming:Za,cardConfirming:Zn,checkoutResult:st,confirmCardPayment:De,cardStillProcessing:xr,renewCardPayment:yi,holdRenewed:ti,leaveCardPayment:gi,checkoutRootRef:nr,setCheckoutHeaderEl:ni,fillFromAddress:rr,checkoutSignOut:ri,payOptions:Ge,noPaymentMethod:oi,placeOrder:pi}}var ha=gs(null);function ba({children:e,...t}){let n=Cs(t);return Ce(ha.Provider,{value:n,children:e})}function Pe(){let e=hs(ha);if(!e)throw new Error("useCheckout must be used inside CheckoutStateProvider");return e}import{useId as Fn}from"react";import{Fragment as Ne,jsx as i,jsxs as N}from"react/jsx-runtime";function xa(){let{email:e,setEmail:t,firstName:n,setFirstName:r,lastName:a,setLastName:s,company:d,setCompany:y,me:f,checkoutSignOut:p,orderLocked:k,unpaidOrder:h}=Pe(),b=Fn();return N(Vt,{num:"N\xB0 01",title:"Contact",children:[k&&h&&i(Ns,{orderNumber:h.orderNumber}),i(ie,{label:"Email",htmlFor:b,hint:f?N(Ne,{children:["Signed in \xB7"," ",i("button",{type:"button",onClick:p,className:"underline transition-colors enabled:hover:text-accent",children:"Not you? Sign out"})]}):void 0,children:i("input",{id:b,type:"email",value:e,onChange:v=>t(v.target.value),placeholder:"you@example.com",readOnly:f!==null,className:ne})}),N(wa,{children:[i(ie,{label:"First name",children:i("input",{type:"text",value:n,onChange:v=>r(v.target.value),className:ne})}),i(ie,{label:"Last name",children:i("input",{type:"text",value:a,onChange:v=>s(v.target.value),className:ne})})]}),i(ie,{label:"Company (optional)",children:i("input",{type:"text",value:d,onChange:v=>y(v.target.value),autoComplete:"organization",className:ne})})]})}function Ca(){let{pickupLocation:e,servedCountries:t,address1:n,setAddress1:r,address2:a,setAddress2:s,city:d,setCity:y,postcode:f,setPostcode:p,phone:k,setPhone:h,country:b,setCountry:v,subdivision:R,setSubdivision:C,subdivisions:O,destination:V,postcodeLabel:E,subdivisionLabel:P,me:Y,savedAddresses:Z,selectedAddressId:pe,setSelectedAddressId:j,saveAddress:se,setSaveAddress:Se,saveLabel:qe,setSaveLabel:ee,fillFromAddress:he,orderLocked:re}=Pe(),te=Fn(),z=Fn();return N(Vt,{num:"N\xB0 02",title:e?"Collection":"Shipping address",children:[e?N("div",{className:"grid gap-2 text-[14px] leading-[1.6]",children:[i("span",{className:"font-medium",children:e.name}),[e.address,e.city,e.state,e.zipCode,e.country].filter(Boolean).length>0&&i("span",{className:"opacity-80",children:[e.address,e.city,e.state,e.zipCode,e.country].filter(Boolean).join(", ")}),e.openingHours&&i("span",{className:"opacity-80",children:e.openingHours}),e.readyIn&&i("span",{className:"opacity-80",children:e.readyIn}),e.instructions&&i("span",{className:"opacity-80",children:e.instructions}),i("span",{className:"mt-1 font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"No delivery address needed"})]}):N(Ne,{children:[Y!==null&&Z.length>0&&N("div",{className:"grid gap-3",children:[Z.map(g=>i(zt,{active:pe===g.id,onClick:()=>{j(g.id),he(g)},title:g.label,body:g.formatted_address,price:null},g.id)),i(zt,{active:pe==="new",onClick:()=>j("new"),title:"New address",body:null,price:null})]}),i(ie,{label:"Address line 1",children:i("input",{type:"text",value:n,onChange:g=>r(g.target.value),className:ne})}),i(ie,{label:"Address line 2",children:i("input",{type:"text",value:a,onChange:g=>s(g.target.value),placeholder:"Apartment, unit, garage bay\u2026",className:ne})}),N(wa,{cols:"three",children:[i(ie,{label:"City",children:i("input",{type:"text",value:d,onChange:g=>y(g.target.value),className:ne})}),i(ie,{label:E,children:i("input",{type:"text",value:f,onChange:g=>p(g.target.value),className:ne})}),i(ie,{label:"Country",separate:!0,htmlFor:te,children:i(gn,{id:te,value:b,onChange:g=>v(g.target.value),className:ne+" pr-10",style:va,children:t.map(g=>i("option",{value:g.code,children:g.name},g.code))})})]}),i(ie,{label:P,separate:!0,htmlFor:z,children:O.length>0?N(gn,{id:z,value:R,onChange:g=>C(g.target.value),className:ne+" pr-10",style:va,children:[i("option",{value:"",children:"Select\u2026"}),O.map(g=>i("option",{value:g.code||g.name,children:g.name},g.code||g.name))]}):i("input",{id:z,type:"text",value:R,onChange:g=>C(g.target.value),className:ne})})]}),i(ie,{label:"Phone",children:i("input",{type:"tel",value:k,onChange:g=>h(g.target.value),className:ne})}),!e&&Y!==null&&pe==="new"&&!re&&N(Ne,{children:[i(Ss,{checked:se,onChange:Se,label:"Save this address to my account"}),se&&i(ie,{label:"Address label",children:i("input",{type:"text",value:qe,onChange:g=>ee(g.target.value),placeholder:"Home",className:ne})})]})]})}function Pa(){let{totals:e,coupon:t,deliveryOptions:n,shippingMethodId:r,setShippingMethodId:a,pickupLocation:s,formatMoney:d,city:y,destination:f,courierUnavailable:p,retryCourier:k}=Pe();return i(Vt,{num:"N\xB0 03",title:"Shipping",children:N("div",{className:"grid gap-3",children:[n.map(h=>{let b=h.pickupLocation,v=b?[b.address,b.city,b.state,b.zipCode].filter(Boolean).join(", "):null;return i(zt,{active:r===h.id,onClick:()=>a(h.id),title:b?`${h.name} \u2014 ${b.name}`:h.name,body:b?[v,b.openingHours,b.readyIn,b.instructions,h.description].filter(Boolean).join(" \xB7 "):h.description||null,price:e.freeShipping||h.amount===0?qt:d(h.amount,e.currency),tag:h.tag||void 0},h.id)}),p?N("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:[ya," ",i("button",{type:"button",onClick:k,className:"underline transition-colors enabled:hover:text-accent",children:"Try again"})]}):n.length===0&&i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Shipping is arranged after your order is reviewed."})]})})}function Na(){let{payChoice:e,setPayChoice:t,payment:n,payOptions:r,noPaymentMethod:a}=Pe();return N(Vt,{num:"N\xB0 04",title:"Payment",children:[a&&i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:fa}),i("div",{className:"grid gap-3",children:r.map(s=>i(zt,{active:e===s.key,onClick:()=>t(s.key),title:s.title,body:s.body,price:s.price,tag:s.tag},s.key))}),e==="card"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll enter card details on the secure payment step after placing the order."}):e==="paypal"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll approve the payment with PayPal on the payment step after placing the order."}):e==="afterpay"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Afterpay to approve four interest-free payments, then brought straight back."}):e==="square"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll enter card details on the secure payment step after placing the order."}):e==="gocardless"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll set up a bank direct debit with GoCardless, then be brought straight back. Direct debits clear in a few days."}):e==="zip"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Zip to approve four instalments, then brought straight back."}):e==="klarna"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Klarna to choose how to pay, then brought straight back."}):e==="bank"?i("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Our team emails you the invoice and bank details after review."}):null]})}function Sa(){let{site:e,items:t,totals:n,coupon:r,formatMoney:a,payChoice:s,placing:d,email:y,orderError:f,payment:p,noPaymentMethod:k,unpaidOrder:h,formLocked:b,restoredPrices:v,quoteFailed:R,retryQuote:C,placeOrder:O}=Pe(),V=v==="waiting",E=v==="changed";return N("aside",{className:"sticky top-[var(--sf-checkout-header-h,88px)] border border-line max-view-desktop:static",style:{background:"linear-gradient(180deg, color-mix(in oklab, var(--site-surface) 70%, var(--bg)) 0%, var(--bg) 100%)"},children:[N("header",{className:"flex items-center justify-between border-b border-accent bg-accent px-6 py-4 font-mono text-[13px] font-bold uppercase tracking-[0.28em] text-bg",children:[i("span",{children:"Your order"}),i(bt,{href:"/wheels",className:"text-bg/80 transition-colors hover:text-bg",children:"Edit \u2197"})]}),i("div",{className:"flex flex-col px-6 py-2",children:t.length===0?N("div",{className:"py-8 text-center font-serif text-[16px] italic leading-[1.5] text-fg-dim",children:["Your cart is empty. ",i(bt,{href:"/wheels",className:"text-accent underline-offset-4 hover:underline",children:"Browse the catalog \u2192"})]}):t.map(P=>i(ws,{slug:P.slug,name:P.name,qty:P.qty,config:P.config,configSummary:Es(P.config),price:E||V?null:jr(P,n.currency)??0,currency:n.currency},P.id))}),i(Gt,{locked:b,className:"border-t border-line px-6 pt-5",children:i(Br,{customerEmail:y,disabled:b})}),N("div",{className:"flex flex-col gap-2 border-t border-line mt-5 px-6 pt-5",children:[i($e,{label:"Subtotal",value:V?Ft:a(E?n.serverSubtotal??0:n.subtotal,n.currency)}),n.discount>0&&r?.valid&&i($e,{label:`Coupon \xB7 ${r.code}`,value:N("span",{className:"font-semibold text-green",children:["\u2212 ",a(n.discount,n.currency)]})}),r?.deferred&&i($e,{label:`Coupon \xB7 ${r.code}`,value:Tr}),r?.valid&&r.effects?.gift&&i($e,{label:`Free gift \xB7 ${r.effects.gift.partNumber}${r.effects.gift.quantity>1?` \xD7${r.effects.gift.quantity}`:""}`,value:i("span",{className:"font-semibold text-green",children:qt})}),i($e,{label:"Shipping",value:n.shippingStatus==="free"?i("span",{className:"font-semibold text-green",children:qt}):Kr(n.shippingStatus)??a(n.shipping,n.currency)}),n.tax&&(n.tax.charged?i($e,{label:n.tax.inclusive?`${n.tax.name} included \xB7 ${n.tax.rate}%`:n.tax.name,value:a(n.tax.amount,n.currency)}):n.tax.name?i($e,{label:n.tax.name,value:Mr}):null)]}),N("div",{className:"mt-4 flex items-end justify-between border-y-2 border-accent px-6 py-4",style:{background:"color-mix(in oklab, var(--accent) 10%, var(--bg))"},children:[i("span",{className:"font-display text-[20px] font-bold uppercase tracking-[0.04em] text-fg",children:"Total"}),i("span",{className:"text-right font-display text-[34px] font-bold leading-none tracking-[-0.025em] text-fg",children:n.repricing?Ft:a(n.grand,n.currency)})]}),N("div",{className:"flex flex-col gap-3 px-6 pt-5 pb-6",children:[E&&i(de,{tone:"quiet",children:Xo}),R&&N(de,{role:"alert",children:[Zo," ",i("button",{type:"button",onClick:C,className:"underline transition-colors enabled:hover:text-accent",children:"Try again"})]}),f&&i(de,{role:"alert",children:f}),n.hasUnpricedLine&&N(de,{role:"status",children:["One or more items have no price in ",n.currency,". Remove them, or switch region, to continue."]}),i("button",{type:"button",onClick:O,disabled:d||!h&&(k||t.length===0||n.hasUnpricedLine||n.repricing),className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all max-[640px]:whitespace-nowrap max-[640px]:tracking-[0.04em]",d||!h&&(t.length===0||k||n.hasUnpricedLine||n.repricing)?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:d?N(Ne,{children:["Building order\u2026 ",i("span",{children:"\xB7"})]}):k?N(Ne,{children:["No online payment ",i("span",{children:"\xB7"})]}):h?N(Ne,{children:[N("span",{children:["Try payment again",N(ka,{children:[" \xB7 ",Bt(h)]})]}),i("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]}):R?N(Ne,{children:["Total not confirmed ",i("span",{children:"\xB7"})]}):n.repricing?N(Ne,{children:[Ft," ",i("span",{children:"\xB7"})]}):N(Ne,{children:[N("span",{children:[s==="bank"?"Place order":"Continue to payment",N(ka,{children:[" \xB7 ",a(n.grand,n.currency)]})]}),i("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})})]})]})}var Ps=" [&:disabled_:disabled]:cursor-not-allowed! [&:disabled_:disabled]:opacity-70! [&_input[readonly]]:cursor-not-allowed [&_input[readonly]]:opacity-70";function Gt({locked:e,className:t="",children:n}){return i("fieldset",{disabled:e,className:"m-0 min-w-0 border-0 p-0 "+t+Ps,children:n})}function bt({href:e,className:t="",children:n,...r}){let{placing:a}=Pe();return a?i("span",{"aria-disabled":"true","aria-label":r["aria-label"],className:t+" pointer-events-none",children:n}):i(Ue,{href:e,"aria-label":r["aria-label"],className:t,children:n})}function Ns({orderNumber:e}){return i(de,{tone:"quiet",role:"status",children:N("span",{className:"flex items-start gap-2",children:[N("svg",{"aria-hidden":!0,viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"mt-[3px] shrink-0",children:[i("rect",{x:"3",y:"7",width:"10",height:"7",rx:"1"}),i("path",{d:"M5 7V5a3 3 0 0 1 6 0v2"})]}),i("span",{children:ga(e)})]})})}var va={backgroundImage:"linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%)",backgroundPosition:"calc(100% - 18px) 50%, calc(100% - 12px) 50%",backgroundSize:"6px 6px",backgroundRepeat:"no-repeat"};function Vt({num:e,title:t,children:n}){return N("section",{className:"mb-6 border border-line bg-bg",children:[N("header",{className:"flex items-center gap-4 border-b border-line bg-surface px-6 py-4",children:[i("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:e}),i("h2",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:t})]}),i("div",{className:"flex flex-col gap-4 px-6 py-6",children:n})]})}function wa({cols:e="two",children:t}){return i("div",{className:["grid gap-3 max-[640px]:grid-cols-1",e==="two"?"grid-cols-2":"grid-cols-[1.2fr_1fr_1fr]"].join(" "),children:t})}function zt({active:e,onClick:t,title:n,body:r,price:a,tag:s}){return N("button",{type:"button",onClick:t,"aria-pressed":e,className:["relative grid grid-cols-[auto_1fr_auto] items-center gap-5 border bg-bg px-6 py-5 text-left transition-colors",e?"border-accent outline outline-1 outline-accent -outline-offset-1":"border-line enabled:hover:border-[color-mix(in_oklab,var(--accent)_50%,var(--site-line))]"].join(" "),style:e?{background:"color-mix(in oklab, var(--accent) 14%, var(--bg))"}:void 0,children:[e&&i("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-[3px] bg-accent"}),i("span",{className:["flex h-[18px] w-[18px] items-center justify-center rounded-full border-2",e?"border-accent":"border-fg-dim"].join(" "),children:e&&i("span",{className:"block h-2.5 w-2.5 rounded-full bg-accent"})}),N("span",{className:"flex min-w-0 flex-col gap-1",children:[N("span",{className:"flex flex-wrap items-baseline gap-3 font-display text-[18px] font-medium tracking-[-0.01em] text-fg",children:[n,s&&i("span",{className:"border px-2 py-0.5 font-mono text-[11px] font-normal uppercase tracking-[0.24em] text-accent",style:{background:"color-mix(in oklab, var(--accent) 14%, transparent)",borderColor:"color-mix(in oklab, var(--accent) 45%, var(--site-line))"},children:s})]}),r&&i("span",{className:"font-mono text-[12px] uppercase tracking-[0.22em] text-fg-dim",children:r})]}),i("span",{className:"whitespace-nowrap font-display text-[18px] font-medium tracking-[-0.01em] text-fg",children:a})]})}function Ss({checked:e,onChange:t,label:n,sub:r}){return N("div",{className:"flex items-start gap-3 border-t border-line py-4 first:border-t-0 first:pt-0",children:[i("button",{type:"button",onClick:()=>t(!e),"aria-pressed":e,"aria-label":n,className:["mt-px flex h-5 w-5 flex-shrink-0 items-center justify-center border transition-colors",e?"border-accent":"border-line"].join(" "),style:e?{background:"color-mix(in oklab, var(--accent) 18%, transparent)"}:void 0,children:e&&i("span",{className:"text-[13px] text-accent",children:"\u2713"})}),N("span",{className:"flex-1 font-display text-[16px] leading-[1.5] text-fg",children:[n,r&&i("small",{className:"mt-1 block font-mono text-[12px] uppercase tracking-[0.18em] text-fg-dim",children:r})]})]})}function ws({slug:e,name:t,qty:n,config:r,configSummary:a,price:s,currency:d}){let{catalog:y}=_t(),{formatMoney:f}=ye(),p=y.find(C=>C.slug===e),k=p?.spokes??5,h=p?.mesh??!1,b=r.find(C=>C.gold)?.label,v=p?.finishes.find(C=>C.name===b&&C.src)??p?.finishes.find(C=>C.src),R=p?.finishes[0]?.color??Yr;return N("div",{className:"grid grid-cols-[60px_1fr_auto] items-center gap-4 border-b border-line py-4 last:border-b-0",children:[N("div",{className:"relative aspect-square",children:[i("div",{className:"flex h-full w-full items-center justify-center overflow-hidden border border-line bg-surface",children:v?.src?i(Rr,{src:v.src,alt:`${t.lead}${t.accent} \u2014 ${v.name}`,width:120,height:120,sizes:"60px",className:"block h-full w-full object-contain p-2"}):i("div",{className:"block w-[78%]",style:{color:R},children:i($r,{spokes:k,mesh:h,className:"block w-full"})})}),i("span",{className:"absolute -right-1.5 -top-1.5 z-[2] flex h-[18px] w-[18px] items-center justify-center rounded-full bg-accent font-mono text-[11px] font-bold text-bg",children:n})]}),N("div",{className:"flex min-w-0 flex-col gap-0.5",children:[N("span",{className:"font-display text-[17px] font-bold uppercase leading-none tracking-[-0.005em] text-fg",children:[t.lead,i("em",{className:"font-serif font-normal italic text-accent tracking-[-0.005em] normal-case",children:t.accent})]}),i("span",{className:"font-mono text-[12px] uppercase leading-[1.5] tracking-[0.18em] text-fg-dim",children:a})]}),i("span",{className:"text-right font-display text-[17px] font-bold tracking-[-0.005em] text-fg",children:s===null?null:f(s,d)})]})}function ka({children:e}){return i("span",{className:"max-[640px]:sr-only",children:e})}function $e({label:e,value:t}){return N("div",{className:"flex items-center justify-between font-mono text-[13px] font-medium uppercase tracking-[0.18em] text-fg",children:[i("span",{children:e}),i("strong",{className:"font-display text-[16px] font-medium tracking-[-0.005em] normal-case text-fg",children:t})]})}function Es(e){return e.map(t=>t.label).join(" \xB7 ")}import{Fragment as G,jsx as l,jsxs as x}from"react/jsx-runtime";function Kn(e){return l(ba,{...e,children:l(Is,{})})}function As({order:e,paid:t}){let{formatMoney:n}=ye();if(!e.grandTotal||!e.currency)return null;let r=d=>n(Number(d),e.currency),a=Number(e.freightCharge??0),s=Number(e.discountAmount??0);return x("dl",{className:"grid w-full max-w-sm grid-cols-[1fr_auto] gap-x-6 gap-y-1 border-y border-line py-3 text-left text-sm",children:[(e.shippingMethod||a>0)&&x(G,{children:[x("dt",{className:"text-fg-dim",children:["Delivery",e.shippingMethod?` \xB7 ${e.shippingMethod}`:""]}),l("dd",{className:"text-right font-mono",children:r(e.freightCharge??"0")})]}),s>0&&x(G,{children:[x("dt",{className:"text-fg-dim",children:["Discount",e.couponCode?` \xB7 ${e.couponCode}`:""]}),x("dd",{className:"text-right font-mono",children:["\u2212",r(e.discountAmount??"0")]})]}),l("dt",{className:"text-fg",children:t?"Total paid":"Order total"}),l("dd",{className:"text-right font-mono text-fg",children:r(e.grandTotal)})]})}function Ls({result:e,lostChangeNote:t=null}){let n=l("span",{className:"font-mono text-fg",children:e.checkoutNumber});return x("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[l("h1",{className:"font-display text-3xl",children:e.kind==="refunded"||e.kind==="expired"?"Order not placed":e.kind==="processing"?"Payment processing":"Payment received"}),l("p",{className:"text-fg-dim",children:e.kind==="refunded"?x(G,{children:["An item sold out or an offer ended while you paid for checkout ",n,". Your payment goes back to your card."]}):e.kind==="expired"?x(G,{children:["The hold on checkout ",n," ran out before your payment arrived. Your payment goes back to your card."]}):e.kind==="processing"?x(G,{children:["Your payment for checkout ",n," is being processed. When it goes through, we will email your order confirmation."]}):x(G,{children:["Thank you \u2014 your payment",e.checkoutNumber?x(G,{children:[" for checkout ",n]}):null," has gone through. We will email you the order number shortly."]})}),t&&e.kind!=="refunded"&&e.kind!=="expired"&&l("p",{className:"text-sm text-fg-dim",children:t}),l(Ue,{href:"/wheels",className:"mt-2 border-2 border-line px-6 py-3 font-mono text-[12px] uppercase tracking-[0.24em] hover:border-accent",children:"Continue browsing"})]})}function Is(){let{site:e,logo:t,items:n,placing:r,formLocked:a,email:s,me:d,addressSaveNote:y,lostChangeNote:f,idemKey:p,confirmation:k,setConfirmation:h,payment:b,paypalStep:v,squareStep:R,pendingConf:C,paid:O,setPaid:V,payNote:E,afterpayConfirming:P,gocardlessConfirming:Y,zipConfirming:Z,klarnaConfirming:pe,cardConfirming:j,checkoutResult:se,confirmCardPayment:Se,cardStillProcessing:qe,renewCardPayment:ee,holdRenewed:he,leaveCardPayment:re,checkoutRootRef:te,setCheckoutHeaderEl:z}=Pe();return k?x("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[l("h1",{className:"font-display text-3xl",children:O?"Payment received":"Order received"}),x("p",{className:"text-fg-dim",children:[O?x(G,{children:["Thank you \u2014 your payment for order"," ",l("span",{className:"font-mono text-fg",children:k.orderNumber})," has gone through."," "]}):x(G,{children:["Thank you \u2014 your order ",l("span",{className:"font-mono text-fg",children:k.orderNumber})," is being reviewed by our team."," "]}),d?x(G,{children:["Track it under"," ",l(Ue,{href:"/account/orders",className:"text-accent underline",children:"your orders"}),"."]}):l(G,{children:"We\u2019ve emailed you a link to set a password and track it."})]}),l(As,{order:k,paid:O}),f&&l("p",{className:"text-sm text-fg-dim",children:f}),E&&(E.warning?l("div",{className:"w-full max-w-sm text-left",children:l(de,{tone:"bad",role:"alert",children:E.text})}):l("p",{className:"text-sm text-fg-dim",children:E.text})),y&&l("p",{className:"text-sm text-fg-dim",children:y}),!d&&x("p",{className:"text-sm text-fg-dim",children:["You can also"," ",l(Ue,{href:`/track?order=${encodeURIComponent(k.orderNumber)}`,className:"text-accent underline",children:"track this order"})," ","anytime with just your order number and email \u2014 no password needed."]}),l(Ue,{href:"/wheels",className:"mt-2 border-2 border-line px-6 py-3 font-mono text-[12px] uppercase tracking-[0.24em] hover:border-accent",children:"Continue browsing"})]}):se?l(Ls,{result:se,lostChangeNote:f}):j?x("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[l("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),l("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Placing your order \u2014 one moment."})]}):P?x("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[l("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),l("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Afterpay \u2014 one moment."})]}):Y?x("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[l("h1",{className:"font-display text-3xl",children:"Setting up your direct debit\u2026"}),l("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Confirming with GoCardless \u2014 one moment."})]}):Z?x("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[l("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),l("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Zip \u2014 one moment."})]}):pe?x("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[l("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),l("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Klarna \u2014 one moment."})]}):b&&C?l(Ts,{payment:b,checkout:C,holdRenewed:he,onPaid:Se,onProcessing:qe,onRenew:ee,onBack:re}):v&&C?l(Ms,{confirmation:C,clientId:e.paypalClientId??"",idemKey:p,onPaid:()=>{V(!0),h(C)},onSkip:()=>h(C)}):R&&C?l(js,{confirmation:C,applicationId:e.squareApplicationId??"",locationId:e.squareLocationId??"",environment:e.squareEnvironment??"production",idemKey:p,onPaid:()=>{V(!0),h(C)},onSkip:()=>h(C)}):x("div",{ref:te,className:"bg-bg text-fg",children:[x("header",{ref:z,className:"sticky top-0 z-30 grid grid-cols-[1fr_auto_1fr] items-center gap-8 max-[640px]:grid-cols-[auto_minmax(0,1fr)_auto] max-[640px]:gap-3 border-b border-line px-[var(--sf-site-gutter,40px)] py-6 backdrop-blur-md max-[640px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[640px]:py-4",style:{background:"color-mix(in oklab, var(--bg) 92%, transparent)"},children:[x(bt,{href:"/",className:"inline-flex items-center gap-3 font-mono text-[14px] uppercase tracking-[0.26em] text-fg-dim transition-colors hover:text-accent",children:["\u2190",l("span",{className:"max-[640px]:hidden",children:"Back to shop"})]}),l("div",{className:"flex min-w-0 justify-center max-[640px]:[container-type:inline-size]",children:l(bt,{href:"/","aria-label":`${e.name} home`,className:"inline-flex max-w-full items-center justify-center max-[640px]:overflow-x-clip",children:[!0,!1].map(g=>l(zr,{hideClass:g?"min-[641px]:hidden":"max-[640px]:hidden",variant:"header",scrolled:!0,src:t?.url??null,reverse:t?.reverse??!1,reversedSrc:t?.reversed??null,inkIsDark:t?.inkIsDark??null,size:t?.size??"medium",sizePx:t?.sizePx??null,sizeUnit:t?.sizeUnit??null,siteName:e.name,fitWordmarkToContainer:g,fitFloorPx:g?Hr:void 0},g?"phone":"wide"))})}),e.cardPayments?x("span",{className:"flex items-center justify-end gap-3 font-mono text-[12px] uppercase tracking-[0.26em] text-fg-dim",children:[l("span",{className:"text-green",children:"\u25CF"}),l("span",{className:"max-[640px]:hidden",children:"Encrypted \xB7"})," Stripe"]}):l("span",{})]}),x("section",{className:"mx-auto flex max-w-[var(--sf-site-width,1600px)] flex-wrap items-center justify-between gap-x-8 gap-y-3 border-b border-line bg-surface px-[var(--sf-site-gutter,40px)] py-4 font-mono text-[13px] font-medium uppercase tracking-[0.24em] text-fg max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]",children:[l("span",{className:"inline-flex items-center bg-accent px-3 py-1 font-bold text-bg",children:"Checkout"}),l("nav",{"aria-label":"Checkout steps",className:"flex flex-wrap items-center gap-5",children:[{n:"01",label:"Cart",state:"done"},{n:"02",label:"Ship & pay",state:"active"},{n:"03",label:"Confirmed",state:"pending"}].map(g=>x("span",{className:["relative flex items-center gap-2 transition-colors",g.state==="pending"?"text-fg-dim":"text-fg",g.state==="active"?"font-bold after:absolute after:inset-x-0 after:-bottom-1 after:h-[2px] after:bg-accent":""].join(" "),children:[l("span",{className:g.state==="done"?"text-accent font-bold":"",children:g.n}),l("span",{children:g.label})]},g.n))})]}),x("main",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[1fr_420px] items-start gap-16 px-[var(--sf-site-gutter,40px)] pt-10 pb-[100px] max-view-desktop:grid-cols-1 max-view-desktop:gap-10 max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-desktop:pt-8 max-view-desktop:pb-20",children:[x("div",{children:[x(Gt,{locked:a,children:[l(xa,{}),l(Ca,{}),l(Pa,{})]}),l(Gt,{locked:r,children:l(Na,{})})]}),l(Sa,{})]}),l("footer",{className:"flex flex-wrap items-center justify-between gap-4 border-t border-line px-[var(--sf-site-gutter,40px)] py-6 font-mono text-[12px] uppercase tracking-[0.22em] text-fg-dim max-[640px]:px-[min(20px,var(--sf-site-gutter,40px))]",children:l("span",{children:Wr({legalName:e.legalName,foundedYear:e.foundedYear,siteName:e.name})})})]})}function Ts({payment:e,checkout:t,holdRenewed:n,onPaid:r,onProcessing:a,onRenew:s,onBack:d}){let{formatMoney:y}=ye(),f=l("span",{className:"text-fg",children:y(Number(e.amount),e.currency)}),p=Ea(()=>Ut(e.publishableKey),[e.publishableKey]),k=Ea(()=>Jr(),[]),h=Vr(t.expiresAt??"",Rs()??"");return l("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:x("div",{className:"w-full max-w-xl border border-line bg-bg",children:[x("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[l("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:Bt(t)}),l("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"Payment"})]}),x("div",{className:"flex flex-col gap-4 px-6 py-6",children:[l("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:t.orderNumber?x(G,{children:["Your order is placed. Pay ",f," by card to confirm it now."]}):n?x(G,{children:["Your hold ran out, so your items are held again",h?` until ${h}`:"",". Enter your card again, then pay ",f,"."]}):x(G,{children:["Your items are held",h?` until ${h}`:"",". Pay ",f," by card to place your order."]})}),l(kn,{stripe:p,options:{clientSecret:e.clientSecret,appearance:k},children:l(Fs,{payment:e,checkout:t,onPaid:r,onProcessing:a,onRenew:s,onBack:d})},e.clientSecret)]})]})})}var qs=5;function Fs({payment:e,checkout:t,onPaid:n,onProcessing:r,onRenew:a,onBack:s}){let{formatMoney:d}=ye(),y=vo(),f=ho(),[p,k]=Ye(!1),[h,b]=Ye(null),v=tt(!1);async function R(){try{return(await y.retrievePaymentIntent(e.clientSecret)).paymentIntent?.status}catch{return}}async function C(E){let P=E;for(let Y=0;P==="processing"&&Y<qs;Y+=1)await new Promise(Z=>setTimeout(Z,1e3)),P=await R()??P;if(P==="succeeded"){n();return}if(P==="processing"){r();return}b("Payment did not complete. Please try again."),k(!1)}async function O(){if(!y||!f||p)return;k(!0),b(null),v.current=!0;let E=await y.confirmPayment({elements:f,redirect:"if_required"}).catch(()=>null);if(!E){let P=await R();if(P==="succeeded"||P==="processing"){await C(P);return}b(P===void 0?Te:"Payment failed. Please try again."),k(!1);return}if(E.error){if(!t.orderNumber&&E.error.code==="payment_intent_unexpected_state"){let P=await R();if(P==="succeeded"||P==="processing"){await C(P);return}if(P===void 0){b(Te),k(!1);return}await a(P==="canceled"),k(!1);return}b(E.error.message??"Payment failed. Please try again."),k(!1);return}await C(E.paymentIntent?.status)}async function V(){if(p)return;if(!v.current){s();return}k(!0),b(null);let E=await R();if(E==="succeeded"||E==="processing"){await C(E);return}if(k(!1),E===void 0){b(Te);return}s()}return x("div",{className:"flex flex-col gap-4",children:[l(ko,{}),h&&l(de,{role:"alert",children:h}),l("button",{type:"button",onClick:O,disabled:!y||!f||p,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",!y||!f||p?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:p?x(G,{children:["Processing\u2026 ",l("span",{children:"\xB7"})]}):x(G,{children:["Pay ",d(Number(e.amount),e.currency),l("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})}),!t.orderNumber&&!p&&x("button",{type:"button",onClick:V,className:"inline-flex items-center gap-3 self-start font-mono text-[12px] uppercase tracking-[0.26em] text-fg-dim transition-colors hover:text-accent",children:["\u2190",l("span",{children:"Back to checkout"})]})]})}var Ra="paypal-sdk-js",_n=null;function _s(e,t){let n=`${e}|${t}`;if(_n?.key===n)return _n.promise;let r=new Promise((a,s)=>{document.getElementById(Ra)?.remove();let d=document.createElement("script");d.id=Ra;let y=new URLSearchParams({"client-id":e,currency:t,intent:"capture"});d.src=`https://www.paypal.com/sdk/js?${y}`,d.onload=()=>{let f=window.paypal;f?a(f):s(new Error("PayPal SDK loaded without its namespace"))},d.onerror=()=>s(new Error("PayPal SDK failed to load")),document.head.appendChild(d)});return _n={key:n,promise:r},r}function Ms({confirmation:e,clientId:t,idemKey:n,onPaid:r,onSkip:a}){let{formatMoney:s}=ye(),d=tt(null),[y,f]=Ye(!1),[p,k]=Ye(null),h=tt(r);return h.current=r,Aa(()=>{let b=!1,v=null;return _s(t,e.currency).then(R=>{if(!(b||!d.current))return v=R.Buttons({style:{layout:"vertical",color:"gold",shape:"rect",label:"paypal"},createOrder:async()=>(await $.createPaypalOrder({idempotencyKey:n})).paypalOrderId,onApprove:async C=>{try{if((await $.capturePaypalOrder({idempotencyKey:n,paypalOrderId:C.orderID})).status==="paid"){h.current();return}k("PayPal did not complete the payment. Please try again.")}catch(O){k(O instanceof ue?O.message:"PayPal payment failed. Please try again.")}},onError:()=>{k("PayPal could not process the payment. Please try again.")}}),v.render(d.current).then(()=>{b||f(!0)})}).catch(()=>{b||k("PayPal could not be loaded. You can pay later \u2014 your order stands either way.")}),()=>{b=!0,v?.close?.()}},[t,e.currency,n]),l("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:x("div",{className:"w-full max-w-xl border border-line bg-bg",children:[x("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[l("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:e.orderNumber}),l("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"PayPal"})]}),x("div",{className:"flex flex-col gap-4 px-6 py-6",children:[x("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",l("span",{className:"text-fg",children:s(Number(e.grandTotal),e.currency)})," ","with PayPal to confirm it now."]}),!y&&!p&&l("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading PayPal\u2026"}),l("div",{ref:d}),p&&l(de,{role:"alert",children:p}),l("button",{type:"button",onClick:a,className:"self-center font-mono text-[11px] uppercase tracking-[0.24em] text-fg-dim underline-offset-4 transition-colors hover:text-accent hover:underline",children:"Pay later \u2014 our team will be in touch"})]})]})})}var Oa="square-web-sdk",Mn=null,Ks=["sandbox","production"];function Ds(e){let t=Os(Ks,"production",e);if(Mn?.key===t)return Mn.promise;let n=new Promise((r,a)=>{document.getElementById(Oa)?.remove();let s=document.createElement("script");s.id=Oa,s.src=t==="sandbox"?"https://sandbox.web.squarecdn.com/v1/square.js":"https://web.squarecdn.com/v1/square.js",s.onload=()=>{let d=window.Square;d?r(d):a(new Error("Square SDK loaded without its namespace"))},s.onerror=()=>a(new Error("Square SDK failed to load")),document.head.appendChild(s)});return Mn={key:t,promise:n},n}function js({confirmation:e,applicationId:t,locationId:n,environment:r,idemKey:a,onPaid:s,onSkip:d}){let{formatMoney:y}=ye(),f=tt(null),p=tt(null),k=tt(null),[h,b]=Ye(!1),[v,R]=Ye(!1),[C,O]=Ye(null);Aa(()=>{let E=!1,P=null;return Ds(r).then(async Y=>{if(E||!f.current)return;let Z=Y.payments(t,n);k.current=Z,P=await Z.card(),await P.attach(f.current),p.current=P,E||b(!0)}).catch(()=>{E||O("Square could not be loaded. You can pay later \u2014 your order stands either way.")}),()=>{E=!0,P?.destroy?.()}},[t,n,r]);async function V(){let E=p.current;if(!(!E||v)){R(!0),O(null);try{let P=await E.tokenize();if(P.status!=="OK"||!P.token){O(P.errors?.[0]?.message??"Please check the card details and try again."),R(!1);return}let Y;try{Y=(await k.current?.verifyBuyer?.(P.token,{amount:String(e.grandTotal),currencyCode:e.currency,intent:"CHARGE"}))?.token}catch{}if((await $.chargeSquare({idempotencyKey:a,sourceId:P.token,...Y?{verificationToken:Y}:{}})).status==="paid"){s();return}O("Square did not complete the payment. Please try again.")}catch(P){O(P instanceof ue?P.message:"Square payment failed. Please try again.")}R(!1)}}return l("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:x("div",{className:"w-full max-w-xl border border-line bg-bg",children:[x("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[l("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:e.orderNumber}),l("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"Card"})]}),x("div",{className:"flex flex-col gap-4 px-6 py-6",children:[x("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",l("span",{className:"text-fg",children:y(Number(e.grandTotal),e.currency)})," ","by card to confirm it now."]}),!h&&!C&&l("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading card form\u2026"}),l("div",{ref:f}),C&&l(de,{role:"alert",children:C}),l("button",{type:"button",onClick:V,disabled:!h||v,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",!h||v?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:v?x(G,{children:["Processing\u2026 ",l("span",{children:"\xB7"})]}):x(G,{children:["Pay ",y(Number(e.grandTotal),e.currency),l("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})}),l("button",{type:"button",onClick:d,disabled:v,className:"self-center font-mono text-[11px] uppercase tracking-[0.24em] text-fg-dim underline-offset-4 transition-colors hover:text-accent hover:underline",children:"Pay later \u2014 our team will be in touch"})]})]})})}import{jsx as Jt}from"react/jsx-runtime";function Us(){let{settings:e,websiteName:t}=Or(),n=t?{...yn,name:t}:yn,r=e?{url:e.logoUrl,reversed:e.logoReversed??null,inkIsDark:e.logoInkIsDark??null,reverse:e.reverseLogo,size:e.logoSize,sizePx:e.logoSizePx,sizeUnit:e.logoSizeUnit??null}:null;return Jt("div",{style:{position:"fixed",inset:0,zIndex:2147482e3,overflowY:"auto",background:"var(--bg)",color:"var(--fg)"},children:Jt(Dr,{children:Jt(Ur,{preview:!0,children:Jt(Kn,{site:n,logo:r,preview:!0})})})})}export{Us as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Sh as r}from"./chunk-EEHSAQWF.js";import"./chunk-ZHEHF42C.js";import"./chunk-DFYWYSOT.js";import"./chunk-YOF4KT5H.js";import"./chunk-ESKHLPB5.js";import"./chunk-PVRWP47B.js";import"./chunk-G5LEO2F2.js";import"./chunk-LY7GZJ6M.js";import"./chunk-Y6SLVHK3.js";import{jsx as o}from"react/jsx-runtime";import e from"efficient-easel/screen/components/ScreenStoreProvider";function a(t){return o(e,{...t,parts:r})}export{a as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as nf,D as Ok,E as Ek,F as ef,G as _k,H as Nk,I as kr,J as Mk,K as Hk,L as Wk,M as ot,N as of,O as Co,P as de,R as tf,S as vr,T as rf,X as $k,Y as af,Z as Pr,_ as zk,a as Go,b as Ys,ba as Qv,c as Ud,d as gn,e as Xs,f as nk,fa as fP,g as yn,h as jd,ha as cP,ia as Df,ja as MT,ka as HT,r as tl,t as Tk}from"./chunk-4HZIV5UO.js";import{a as hP,d as yf,e as tt,f as Sf,g as bf,h as vf,l as Ux}from"./chunk-E4ZWGCLS.js";import{$ as hn,$a as pk,$c as wv,$e as yP,$j as _n,A as wC,Aa as YC,Ab as $t,Ac as sv,Ad as Hv,Ah as cT,Aj as bT,Ak as Hx,Al as Mf,B as CC,Ba as XC,Bb as bn,Bc as lv,Bd as Wv,Be as Ct,Bh as pT,Bj as Rx,C as Jo,Ca as ZC,Cb as ol,Cc as Ut,Cd as $v,Cf as _P,Cg as VP,D as kC,Da as JC,Dc as Ue,Dd as zv,De as je,Df as Tx,Dg as YP,Dj as On,E as vC,Ea as QC,Ec as Tr,Ed as bx,Ee as kt,Ef as AP,Eg as XP,Ej as wT,F as PC,Fa as ek,Fb as mx,Fc as Ix,Fd as Uv,Fe as Oe,Ff as FP,Fg as ZP,G as TC,Ga as br,Gb as na,Gc as iv,Gd as wx,Ge as mP,Gf as BP,Gg as JP,Gk as Lf,H as OC,Ha as ok,Hb as Qd,Hc as dv,Hd as jv,Hf as LP,Hg as _x,Hj as Dx,Hk as Rf,I as EC,Ib as kk,Ic as fv,Id as Gv,Ig as QP,Ij as fl,Ik as Wx,J as _C,Ja as tk,Jb as vk,Jc as uf,Jd as Kv,Jf as RP,Jg as Ax,Jk as LT,Ka as Gd,Kb as Pk,Kc as al,Kd as jt,Ke as Cx,Kg as ar,Kk as ua,L as AC,La as Zs,Lb as sf,Lc as cv,Ld as qv,Lg as Fx,Lj as En,Lk as RT,M as FC,Ma as Kd,Mb as Gk,Mc as pv,Md as da,Mg as Tf,Mk as DT,N as BC,Na as sk,Nb as lf,Nc as uv,Nd as Vv,Ne as il,Ng as eT,Nj as CT,Nk as NT,O as Nd,Ob as hx,Oc as mf,Od as vn,Og as oT,P as LC,Pb as df,Pc as mv,Pg as tT,Pk as WT,Q as RC,Qc as xv,Qd as tr,Qf as DP,Qg as rT,Qk as $x,Ra as lk,Rc as gx,Rd as Yv,Re as xP,Rf as NP,Rg as aT,Sa as ik,Sc as hv,Sd as ll,Se as kx,Sf as MP,Sk as $T,Ta as Js,Tc as kn,Td as Xv,Te as IP,Tf as Ox,Tk as zT,Ub as wn,Ud as fa,Uf as HP,Ug as nT,Uk as UT,V as ax,Va as Sn,Vc as Iv,Vd as Zv,Vf as WP,Vg as sT,Vj as kT,Vk as jT,Wa as dk,Wc as gv,Wf as Ex,Wj as Nx,Wk as GT,X as Ks,Xa as qd,Xb as Kk,Xc as yv,Xd as xf,Xj as vT,Xk as KT,Y as Md,Ya as fk,Yb as qk,Yc as Sv,Yd as Er,Yi as pa,Yj as PT,Z as Eo,Za as Qs,Zb as Vk,Zc as bv,Zd as Jv,_ as nx,_a as ck,_b as rl,_c as sa,_e as gP,_f as rr,_i as nr,_j as Bf,a as Oo,aa as DC,ab as cx,ad as yx,af as wf,ag as Pn,ai as uT,ak as An,b as un,ba as NC,bb as uk,bd as Cv,bf as SP,bh as Of,bi as mT,bk as cl,ca as MC,cb as Vd,cd as kv,cf as vx,cg as $P,ck as Fn,d as aC,da as HC,db as mk,dd as vv,df as bP,dg as zP,dk as TT,e as ex,ea as WC,eb as px,ed as Pv,ef as wP,eg as Pf,f as nC,fa as sx,fd as Tv,fe as eP,ff as CP,fg as _r,fj as Af,g as c,gb as xk,gd as Or,gf as kP,gg as UP,h as Wt,ha as $C,hb as hk,hd as nl,hf as Cf,hh as lT,hj as IT,i as xn,ia as Hd,id as la,ie as oP,ig as Tn,j as js,jb as Yd,jc as Cn,jd as Ov,je as tP,jf as vP,jh as iT,k as Ro,kb as Ik,kc as zt,ke as rP,kk as OT,l as Gs,lb as gk,lc as Yk,ld as ia,li as xT,lk as ET,mb as yk,mc as Xk,md as sl,mf as Px,mi as hT,ml as zx,n as uC,nb as Sk,nc as Zk,nd as Ev,o as mC,ob as Xd,oc as Jk,od as _v,p as xC,pb as bk,pc as Qk,pe as Do,q as hC,qc as ff,qd as Av,qe as Je,r as IC,rc as cf,rd as Fv,rf as PP,rg as Ar,s as gC,sb as wk,sc as ev,sd as Bv,se as hf,sf as TP,sg as jP,sk as Mx,t as yC,tb as wr,te as aP,tf as kf,tg as GP,th as Bx,tj as gT,u as Dd,ub as Zd,uc as ov,ud as Lv,ue as nP,uf as OP,ug as KP,uh as Ef,uk as _T,ul as qT,v as Sr,va as GC,vb as Jd,vc as tv,vd as Rv,ve as sP,vf as EP,vh as ca,vk as AT,vl as VT,wa as KC,wb as Ck,wc as rv,wd as Dv,we as lP,wh as _f,wj as yT,wk as FT,wl as Nf,x as rx,xa as qC,xb as po,xc as pf,xd as Nv,xe as If,xj as Ff,xl as YT,y as SC,ya as VC,yb as ux,yc as av,yd as Sx,ye as iP,yg as qP,yh as dT,yj as Lx,yk as BT,z as bC,za as dx,zb as el,zc as nv,zd as Mv,ze as dP,zh as fT,zj as ST,zl as Bn}from"./chunk-4R75CGDP.js";import{a as cC,b as Rd,c as pC,g as Uk,h as xx,i as jk}from"./chunk-SVVQDQP3.js";import{$ as xb,$a as Db,$c as wo,$d as hw,$e as Xm,$g as tx,A as ro,Ae as qm,Af as Jm,B as on,Bb as Hs,Bd as Gm,Be as Sw,Ca as Ie,Cb as Zb,D as Ds,Dd as cw,De as Vm,E as ld,Ed as Sd,F as Dt,Fg as Xw,G as tn,Ga as Xo,Gb as Id,Gd as Zo,Gg as Zw,H as ze,Ha as St,Hc as rw,Hd as Lo,He as Cd,Hf as Lw,Hg as Jw,I as qe,Ia as Pm,Id as Ze,Ie as kd,Ig as Qw,J as rn,Ja as Tm,Jc as Wm,Jd as Mt,Je as bw,Jh as fx,K as id,Kd as er,Ke as vd,Kf as or,Kh as In,L as ib,La as Om,Lb as Jb,Ld as wt,Le as Pd,Lg as eC,Lh as rk,M as db,Ma as Em,Md as dn,Me as ww,Mh as Qo,Nd as pw,Ne as Cw,Nh as et,O as fb,Od as fn,Oe as Td,Og as oC,Oh as zd,P as dd,Pd as uw,Pe as Od,Pg as tC,Ph as ak,Q as cb,Qa as _m,Qb as gd,Qc as aw,Qe as aa,Qf as Rw,Qh as Vs,R as ea,Ra as Ob,Re as kw,Rg as rC,S as pb,Sa as Eb,T as ub,Ta as Ge,Tb as Qb,Td as ra,Tg as sC,Th as Ak,U as Ns,Ua as _b,Ub as ew,Ud as mw,Ug as lC,V as km,Va as md,Vd as xw,Ve as vw,W as we,Wa as Ab,Wb as ow,Wd as cn,Wf as Dw,Wg as yr,X as K,Xa as Fb,Xc as U,Xd as $s,Xf as Nw,Xh as Fk,Y as mb,Ya as Bb,Yb as Nm,Yc as re,Yd as zs,Ye as Ht,Yf as Mw,Yg as iC,Za as Lb,Zc as $m,Zd as Km,Ze as Us,Zf as Hw,Zg as ox,_ as fd,_a as Rb,_c as L,_e as Ym,_g as dC,a as en,ab as Nb,ad as Jt,ae as Iw,af as Pw,ah as Ld,b as fo,ba as hb,bb as Mb,bd as nw,be as gw,bf as Tw,bg as Ww,c as to,ca as cd,cb as xd,cd as W,cf as Ed,cg as $w,ch as fC,ci as Bk,d as Xt,da as Ib,db as hd,dd as yd,de as yw,df as Ow,di as Cr,ea as gb,eb as Hb,ed as Bo,eg as zw,f as jo,fa as vm,fb as Wb,fc as Mm,fd as sw,fe as bd,fg as Uw,fi as Lk,g as Rs,ga as yb,gd as bt,gf as Ew,gg as Fd,gi as Rk,h as eb,ha as Sb,hb as $b,hd as Nt,he as wd,hf as _d,hg as jw,hi as Dk,i as ob,ia as bb,ib as zb,id as zm,if as _w,ig as Bd,j as tb,jb as Am,jd as Ir,jf as Zm,jg as Qm,k as rb,kb as Ub,kd as Qt,kf as Aw,la as wb,lb as jb,ld as lw,lf as Fw,li as ko,ma as Cb,mb as Fm,mf as Ad,mg as Gw,na as kb,nb as nn,nd as Fe,nf as pn,ng as Kw,o as ab,ob as oa,od as ta,of as mn,pa as vb,pb as Bm,pd as Ws,pf as gr,pi as dl,qb as Lm,qd as sn,qg as qw,qh as lx,ra as Pb,rb as Rm,rd as iw,rg as Vw,rh as Wd,s as nb,sa as pd,sb as Gb,sd as Um,sh as zC,ta as Tb,tb as Kb,td as ln,tf as Bw,th as ix,u as De,ua as ud,ub as qb,uc as Hm,ud as jm,ug as Yw,uh as UC,v as sb,vb as Dm,w as sd,wb as Vb,wc as tw,wh as $d,x as lb,xb as Zt,xh as jC,ya as Ms,yb as Yb,yd as dw,yh as qs,z as Pe,za as an,zb as Xb,zd as fw}from"./chunk-AKQZ7SOP.js";import{a as z,b as co}from"./chunk-UIWK6VX2.js";import{c as pP,d as uP,e as gf}from"./chunk-DET7LVPH.js";import{jsx as jx,Fragment as Y4,jsxs as X4}from"react/jsx-runtime";import{createContext as Z4,useContext as J4}from"react";var Q4={mirrorHostStyles:!0,css:null,fontHrefs:[]},XT=Z4(Q4);function dne({value:e,children:o}){return jx(XT.Provider,{value:e,children:o})}function pl(){return J4(XT)}function ZT(){let{css:e,fontHrefs:o}=pl();return X4(Y4,{children:[o.map(t=>jx("link",{rel:"stylesheet",href:t},t)),e?jx("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as e6}from"react/jsx-runtime";import{createContext as o6,useContext as t6}from"react";var JT=o6(void 0);function une({metadata:e,children:o}){return e6(JT.Provider,{value:e,children:o})}var QT=()=>t6(JT);import{jsx as lo,Fragment as R4,jsxs as ed}from"react/jsx-runtime";import{useCallback as Es,useEffect as Yt,useRef as Rae,useState as A4}from"react";import{SettingsSwitch as Dae}from"efficient-easel/panel";import{PagesIcon as Nae,StylesIcon as Mae}from"efficient-easel/rail";import{PaletteIcon as Hae}from"efficient-shell/icons/efficient";import{Subtree as Wae,TreeRow as D4}from"efficient-easel/tree";import{useEasel as N4}from"efficient-easel/easel";import{toItemSelector as $ae}from"efficient-easel/node-ops";import{useEaselStrings as M4}from"efficient-easel/strings";import{createContext as r6,useContext as a6}from"react";var Gx=r6(!1),hne=()=>a6(Gx);import{useMemo as n6,useRef as s6}from"react";import{useEaselApi as l6}from"efficient-easel/easel";import{useSectionOps as i6}from"efficient-easel/screen/lib/document/use-section-ops";function Hf(){let e=l6(),o=i6(),t=s6(o);return t.current=o,n6(()=>({getItemById:r=>e.getState().getItemById(r),getSelectorForId:r=>e.getState().getSelectorForId(r),get components(){return e.getState().config.components},replace:(r,a,n)=>t.current.replaceComponent(r,a,n)}),[e])}import{encodePartId as E6}from"efficient-easel/draw";import{insertAt as _6,moveTo as A6,removeAt as F6}from"efficient-easel/fields";import{useSyncExternalStore as w6}from"react";import{isNodeList as e0}from"efficient-easel/data";var o0="Flex";function Ln(e,o){return Ht(e)?typeof e?.[jo]=="string"?Kx(o?.[jo]):"":Kx(e?.[jo])}var Kx=e=>typeof e=="string"?e.trim():"",d6=e=>e.type===ro&&Array.isArray(e.props?.[Vm])&&e.props[Vm].some(o=>Kx(o?.[jo])!==""),f6=new Intl.NumberFormat("en-US");function c6(e){return/^\d+$/.test(e)?f6.format(Number(e)):e}function Pne(e,o){let t=o?o.find(r=>r.key===e)?.value:nb(Rs).find(r=>r.key===e)?.value;return t===void 0?null:c6(t)}var p6={[jo]:"any"};function qx(e,o=!1){let t=e.props;if(!t)return{node:e,names:!1};let r=e.type==="Text"&&(Ln(t)!==""||o&&Ln(t,p6)!==""),a=o||d6(e),n=qe(e,l=>ze(l,i=>{let d=qx(i,a);return d.names&&(r=!0),d.node})).props;if(e.type!==o0)return{node:n===t?e:{...e,props:n},names:r};let s=De(n);if(r&&!s&&(n={...n,[to]:Rs}),!r&&s===Rs){let{[to]:l,...i}=n;n=i}return{node:n===t?e:{...e,props:n},names:!1}}function t0(e,o,t){for(let r of e){if(r?.props?.id===o)return t;for(let a of tn(r??{})){let n=t0(a,o,r.type===o0?r:t);if(n!==void 0)return n}}}function Tne(e,o){if(!e0(e))return!0;let t=t0(e,o,null);if(t===void 0)return!0;if(t===null)return!1;let r=De(t.props);return!r||r===Rs}function r0(e){let o=e?.content;if(!e0(o))return e;let t=o.map(r=>qx(r));return t.every((r,a)=>r.node===o[a])?e:{...e,content:t.map(r=>r.node)}}function a0(e){return qx(e).node}import{decodePartId as C6}from"efficient-easel/draw";function Rn(e,o){let t=tv(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?AT(t,o.index):null:rv(e)?.[o.rowKey]??null}function Wf(e,o,t){let r=e.node.props,{key:a,row:n}=zt(e.propKey),s=n?nv(r,a,n,e.kind,o):ov(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}import{readHidable as l0}from"efficient-easel/draw";import{parseOption as u6}from"efficient-shell/format";var Vx=e=>String(e+1).padStart(2,"0"),m6=[{label:"01 \xB7",value:"two-digit"},{label:"1.",value:"plain"}],Yx="two-digit",n0=e=>u6(m6,Yx,e),$f=(e,o)=>e==="plain"?`${o+1}.`:Vx(o);var Jx="Contents",Xx="Flex",s0="Text",x6="numberForm",h6="_contentsEntries",I6="_kickerNumber",i0="data-sf-kicker-number",g6=e=>l0(e).text.trim(),d0=e=>fa(e?.anchor),Zx=e=>String(e.props?.id??""),y6=e=>!l0(e.props?.text).hidden&&!Ln(e.props)&&!Ht(e.props),ul=e=>tn(e);function f0(e){for(let o of ul(e))for(let t of o){if(tr(t.props??{}))continue;if(t.type===s0&&y6(t))return t;if(t.type===s0)continue;let r=f0(t);if(r)return r}}function c0(e){return ul(e).some(o=>o.some(t=>t&&!tr(t.props??{})&&(t.type===Jx||c0(t))))}var p0=e=>e.type===Xx&&Pn(Xx,e.props?.direction)==="row";function u0(e){return ul(e).some(o=>o.some(t=>t&&!tr(t.props??{})&&(t.type===Jx||!p0(t)&&u0(t))))}function S6(e){let o=[],t=(r,a)=>{for(let n of r){if(!n||tr(n.props??{}))continue;if(n.type===Jx){a.open={contents:n,sections:a.waiting??[]},a.waiting=null,o.push(a.open);continue}if(p0(n)&&u0(n)){let l={inRow:!0,open:null,waiting:[]};for(let i of ul(n))t(i,l);a.inRow||(a.open=null);continue}let s=a.open?.sections??a.waiting;if(n.type===Xx&&d0(n.props)&&s&&!c0(n)){s.push({box:n,kicker:f0(n)});continue}for(let l of ul(n))t(l,a)}};return t(e,{inRow:!1,open:null,waiting:null}),o}function b6(e){return e.map(o=>({label:o.kicker?an(g6(o.kicker.props?.text)):"",anchor:d0(o.box.props)}))}function Qx(e){let o=e?.length?S6(e):[];if(!o.length)return null;let t=new Map,r=new Map;for(let a of o){let n=Zx(a.contents);n&&t.set(n,b6(a.sections));let s=n0(a.contents.props?.[x6]);a.sections.forEach((l,i)=>{let d=l.kicker?Zx(l.kicker):"";d&&r.set(d,$f(s,i))})}return{entries:t,numbers:r}}var Kne=e=>e.endsWith(".")?`${e} `:`${e} \xB7 `;function m0(e){let o=e;if(!o?.content?.length)return e;let t=Qx(o.content);if(!t)return e;let{entries:r,numbers:a}=t,n=s=>{let l=qe(s,h=>ze(h,n)),i=l.props??{},d=l!==s,f=Zx(s),x=f?r.get(f):void 0;x&&(i={...i,[h6]:x},d=!0);let u=f?a.get(f):void 0;return u&&(i={...i,[I6]:u},d=!0),d?{...s,props:i}:s};return{...o,content:o.content.map(n)}}var k6=`[${i0}]`,v6=["bold","italic","underline","strike","link","sup","sub"],P6=["bullet","number"];function th(e,o){return e?[...v6,...o?P6:[]]:[]}function x0(e,o){let t=C6(e);if(!t?.propKey)return null;let{nodeId:r,propKey:a}=t,n=o.getItemById(r),s=o.getSelectorForId(r);if(!n||!s)return null;let{key:l,row:i}=zt(a),d=o.components[n.type]?.fields?.[l],f=i?Rn(d,i):d,x=ff(f);if(!x)return null;let u=n.props??{};if(uT(u)!==null||!i&&Ed(n.type,u,l)||n.type==="Text"&&l==="text"&&Ln(u)||i&&!(Array.isArray(u[l])&&i.index<u[l].length))return null;let h=i?pf(u[l],i):u[l];return{node:n,selector:s,propKey:a,kind:x,stored:h,offPage:Af(f),panelOnly:Qk(f)}}function zf(e,o){let t=x0(e,o);if(!t)return null;let{text:r,hidden:a}=pa(t.stored);if(!xv({offPage:t.offPage,hidden:!!a,panelOnly:t.panelOnly}))return null;let n=cf(t.kind);return{partId:e,value:r,rules:pd,multiline:n,skip:k6,offered:th(t.kind!=="plainText",n),write:s=>{let l=x0(e,o);l&&Wf({node:l.node,propKey:l.propKey,kind:l.kind,zone:l.selector.zone,index:l.selector.index},s,o.replace)}}}function rh(e,o,t){return e?.isConnected&&e.getAttribute(Ue)===t?e:o?.querySelector(`[${Ue}="${Uf(t)}"]`)??null}function Uf(e){return e.replace(/["\\]/g,"\\$&")}function h0(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var eh=null,oh=new Set;function T6(){return eh}function ah(e){if(e!==eh){eh=e;for(let o of oh)o()}}function O6(e){return oh.add(e),()=>{oh.delete(e)}}function I0(){return w6(O6,T6,()=>null)}function g0(e,o){if(e.outer)return null;let t=o.getItemById(e.ownerId);if(!t)return null;let r=ww(t.type);return!r||De(t.props)?null:{node:t,rows:r}}function B6(e,o){let t=g0(e,o),r=o.getItemById(e.nodeId);if(!t||!r)return null;let a=Ow(r.type,r.props,e.key);if(!a)return null;let n=t.node.props[t.rows];return!Array.isArray(n)||e.index<0||e.index>=n.length?null:E6(e.ownerId,Cn(t.rows,{index:e.index,rowKey:a}))}function jf(e,o){let t=B6(e,o);return t?zf(t,o):null}function y0(e,o){return jf(e,o)?.value}function S0(e,o){let t=jf(e,o);return t?(t.write(e.text),!0):!1}function b0(e,o){let t=g0(e,o),r=t&&o.getSelectorForId(e.ownerId);if(!t||!r)return!1;let a=t.node.props,n=a[t.rows],s=e.index;if(!Array.isArray(n)||s<0||s>=n.length)return!1;let l;switch(e.action){case"addAfter":{let i=o.components[t.node.type]?.fields?.[t.rows];l=_6(n,s+1,{...i?.defaultItemProps??{}});break}case"moveEarlier":case"moveLater":{let i=e.action==="moveEarlier"?s-1:s+1;if(i<0||i>=n.length)return!1;l=A6(n,s,i);break}case"delete":l=F6(n,s);break;default:return!1}return o.replace(r.zone,r.index,{...t.node,props:{...a,[t.rows]:l}}),!0}import{jsx as ve,Fragment as YZ,jsxs as Hu}from"react/jsx-runtime";import{Fragment as XZ,useEffect as eH,useMemo as oH,useRef as ZZ,useState as za}from"react";import{useScreenDocument as sH}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as Ny}from"efficient-easel/draw/client";import JZ from"efficient-easel/screen/components/SidePanelHead";import{InspectorIconButton as QZ}from"efficient-easel/chrome";import{Input as eJ,LoadingSpinner as oJ,PopupMenu as tJ,PopupMenuItem as tH,toast as rH}from"efficient-shell/ui";import{LayersTree as rJ,TreeGroupLabel as aJ,TreeRow as aH,TreeRowAction as Wu}from"efficient-easel/tree";import{AddIcon as nJ,DuplicateIcon as sJ,PageIcon as lJ,SettingsIcon as iJ}from"efficient-easel/icons";import{PagesIcon as dJ}from"efficient-easel/rail";import{useEaselHost as fJ}from"efficient-easel/screen/lib/host";import{useEaselSession as My}from"efficient-easel/screen/lib/session-context";import{useCallback as Gf,useEffect as L6,useSyncExternalStore as R6}from"react";import{useScreenDocument as v0}from"efficient-easel/screen/components/ScreenDocumentContext";var w0=new WeakMap;function ml(e){let o=w0.get(e);return o||(o={rows:null,loading:null,listeners:new Set},w0.set(e,o)),o}function nh(e,o){e.rows=o;for(let t of e.listeners)t()}var Kf=new Set;function qf(e,o){o?Kf.add(e):Kf.delete(e)}function C0(e){let o=ml(e),t=e.listPages().then(r=>nh(o,Kf.size?r.filter(a=>!Kf.has(a.id)):r),()=>nh(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var k0=()=>null,D6=()=>()=>{};function xl(){let{adapter:e,ready:o}=v0(),t=Gf(l=>{let{listeners:i}=ml(e);return i.add(l),()=>i.delete(l)},[e]),r=Gf(()=>ml(e).rows,[e]),a=R6(o?t:D6,o?r:k0,k0);L6(()=>{if(!o)return;let l=ml(e);l.rows===null&&!l.loading&&C0(e)},[e,o]);let n=Gf(()=>o?C0(e):Promise.resolve(),[e,o]),s=Gf(l=>nh(ml(e),l),[e]);return{rows:a,reload:n,setRows:s,getRows:r}}function N6(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function P0(){let{currentSlug:e}=v0(),{rows:o}=xl();return N6(o,e)}import{canDuplicatePage as cJ,DuplicatePageDialog as pJ}from"efficient-easel/page-copy";import{jsx as To,jsxs as KM}from"react/jsx-runtime";import{useEffect as FZ,useId as BZ,useMemo as LZ,useRef as RZ,useState as Ly}from"react";import{useScreenDocument as DZ}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as NZ}from"efficient-easel/screen/lib/session-context";import{uniqueSlug as qM}from"efficient-easel/page-copy";import{AddIcon as MZ}from"efficient-easel/icons";import{Button as HZ,Dialog as WZ,EmptyState as $Z,LoadingSpinner as zZ,Paragraph as UZ,SidebarLayout as jZ,SidebarNavItem as Ry,Title as GZ,toast as VM}from"efficient-shell/ui";import{jsx as Tt,jsxs as cR}from"react/jsx-runtime";import{useEffect as D7,useState as Og}from"react";import{CanvasFrame as N7}from"efficient-easel/easel";import{Button as M7,Card as H7,FitFrame as W7,Text as $7}from"efficient-shell/ui";import{jsx as A0,Fragment as Y6,jsxs as X6}from"react/jsx-runtime";import{useEffect as F0,useLayoutEffect as Z6}from"react";var Vf="data-theme",T0="light";function M6(e){return e.getAttribute(Vf)===T0?"light":"dark"}function H6(e,o){return M6(e)===o?!1:(o==="light"?e.setAttribute(Vf,T0):e.removeAttribute(Vf),!0)}function W6(e){return Ux(e).getItem(Jm)}function bse(e,o){Ux(e).setItem(Jm,o)}function $6(e,o,t=new Date().getHours()){return Lw({mode:o.mode,override:W6(e),switchShown:o.switchShown,hour:t})}function O0(e,o){let t=e.documentElement;if(!t)return()=>{};let r=()=>H6(t,$6(e,o));r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[Vf]}),()=>n.disconnect()}var z6="style";function U6(e,o){let t=Bd(o),r=!1;for(let a of jw){let n=t[a]??"";e.style.getPropertyValue(a)!==n&&(n?e.style.setProperty(a,n):e.style.removeProperty(a),r=!0)}return r}function E0(e,o){let t=e.body;if(!t)return()=>{};let r=()=>U6(t,o);r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[z6]}),()=>n.disconnect()}import{VIEW_DESKTOP_MIN as j6,VIEW_TABLET_MIN as G6}from"efficient-easel/screen/lib/content/view-tiers";var sr={fit:"data-fit",fitTablet:"data-fit-tablet",fitPhone:"data-fit-phone",min:"data-fit-min",minTablet:"data-fit-min-tablet",minPhone:"data-fit-min-phone",edge:"data-fit-edge"},Ko=sr,K6=e=>e.flatMap(o=>[`[${o}] p`,`[${o}] li`]).join(","),q6=String.raw`(function (doc) {
|
|
1
|
+
import{$ as nf,D as Ok,E as Ek,F as ef,G as _k,H as Nk,I as kr,J as Mk,K as Hk,L as Wk,M as ot,N as of,O as Co,P as de,R as tf,S as vr,T as rf,X as $k,Y as af,Z as Pr,_ as zk,a as Go,b as Ys,ba as Qv,c as Ud,d as gn,e as Xs,f as nk,fa as fP,g as yn,h as jd,ha as cP,ia as Df,ja as MT,ka as HT,r as tl,t as Tk}from"./chunk-ZHEHF42C.js";import{a as hP,d as yf,e as tt,f as Sf,g as bf,h as vf,l as Ux}from"./chunk-DFYWYSOT.js";import{$ as hn,$a as pk,$c as wv,$e as yP,$j as _n,A as wC,Aa as YC,Ab as $t,Ac as sv,Ad as Hv,Ah as cT,Aj as bT,Ak as Hx,Al as Mf,B as CC,Ba as XC,Bb as bn,Bc as lv,Bd as Wv,Be as Ct,Bh as pT,Bj as Rx,C as Jo,Ca as ZC,Cb as ol,Cc as Ut,Cd as $v,Cf as _P,Cg as VP,D as kC,Da as JC,Dc as Ue,Dd as zv,De as je,Df as Tx,Dg as YP,Dj as On,E as vC,Ea as QC,Ec as Tr,Ed as bx,Ee as kt,Ef as AP,Eg as XP,Ej as wT,F as PC,Fa as ek,Fb as mx,Fc as Ix,Fd as Uv,Fe as Oe,Ff as FP,Fg as ZP,G as TC,Ga as br,Gb as na,Gc as iv,Gd as wx,Ge as mP,Gf as BP,Gg as JP,Gk as Lf,H as OC,Ha as ok,Hb as Qd,Hc as dv,Hd as jv,Hf as LP,Hg as _x,Hj as Dx,Hk as Rf,I as EC,Ib as kk,Ic as fv,Id as Gv,Ig as QP,Ij as fl,Ik as Wx,J as _C,Ja as tk,Jb as vk,Jc as uf,Jd as Kv,Jf as RP,Jg as Ax,Jk as LT,Ka as Gd,Kb as Pk,Kc as al,Kd as jt,Ke as Cx,Kg as ar,Kk as ua,L as AC,La as Zs,Lb as sf,Lc as cv,Ld as qv,Lg as Fx,Lj as En,Lk as RT,M as FC,Ma as Kd,Mb as Gk,Mc as pv,Md as da,Mg as Tf,Mk as DT,N as BC,Na as sk,Nb as lf,Nc as uv,Nd as Vv,Ne as il,Ng as eT,Nj as CT,Nk as NT,O as Nd,Ob as hx,Oc as mf,Od as vn,Og as oT,P as LC,Pb as df,Pc as mv,Pg as tT,Pk as WT,Q as RC,Qc as xv,Qd as tr,Qf as DP,Qg as rT,Qk as $x,Ra as lk,Rc as gx,Rd as Yv,Re as xP,Rf as NP,Rg as aT,Sa as ik,Sc as hv,Sd as ll,Se as kx,Sf as MP,Sk as $T,Ta as Js,Tc as kn,Td as Xv,Te as IP,Tf as Ox,Tk as zT,Ub as wn,Ud as fa,Uf as HP,Ug as nT,Uk as UT,V as ax,Va as Sn,Vc as Iv,Vd as Zv,Vf as WP,Vg as sT,Vj as kT,Vk as jT,Wa as dk,Wc as gv,Wf as Ex,Wj as Nx,Wk as GT,X as Ks,Xa as qd,Xb as Kk,Xc as yv,Xd as xf,Xj as vT,Xk as KT,Y as Md,Ya as fk,Yb as qk,Yc as Sv,Yd as Er,Yi as pa,Yj as PT,Z as Eo,Za as Qs,Zb as Vk,Zc as bv,Zd as Jv,_ as nx,_a as ck,_b as rl,_c as sa,_e as gP,_f as rr,_i as nr,_j as Bf,a as Oo,aa as DC,ab as cx,ad as yx,af as wf,ag as Pn,ai as uT,ak as An,b as un,ba as NC,bb as uk,bd as Cv,bf as SP,bh as Of,bi as mT,bk as cl,ca as MC,cb as Vd,cd as kv,cf as vx,cg as $P,ck as Fn,d as aC,da as HC,db as mk,dd as vv,df as bP,dg as zP,dk as TT,e as ex,ea as WC,eb as px,ed as Pv,ef as wP,eg as Pf,f as nC,fa as sx,fd as Tv,fe as eP,ff as CP,fg as _r,fj as Af,g as c,gb as xk,gd as Or,gf as kP,gg as UP,h as Wt,ha as $C,hb as hk,hd as nl,hf as Cf,hh as lT,hj as IT,i as xn,ia as Hd,id as la,ie as oP,ig as Tn,j as js,jb as Yd,jc as Cn,jd as Ov,je as tP,jf as vP,jh as iT,k as Ro,kb as Ik,kc as zt,ke as rP,kk as OT,l as Gs,lb as gk,lc as Yk,ld as ia,li as xT,lk as ET,mb as yk,mc as Xk,md as sl,mf as Px,mi as hT,ml as zx,n as uC,nb as Sk,nc as Zk,nd as Ev,o as mC,ob as Xd,oc as Jk,od as _v,p as xC,pb as bk,pc as Qk,pe as Do,q as hC,qc as ff,qd as Av,qe as Je,r as IC,rc as cf,rd as Fv,rf as PP,rg as Ar,s as gC,sb as wk,sc as ev,sd as Bv,se as hf,sf as TP,sg as jP,sk as Mx,t as yC,tb as wr,te as aP,tf as kf,tg as GP,th as Bx,tj as gT,u as Dd,ub as Zd,uc as ov,ud as Lv,ue as nP,uf as OP,ug as KP,uh as Ef,uk as _T,ul as qT,v as Sr,va as GC,vb as Jd,vc as tv,vd as Rv,ve as sP,vf as EP,vh as ca,vk as AT,vl as VT,wa as KC,wb as Ck,wc as rv,wd as Dv,we as lP,wh as _f,wj as yT,wk as FT,wl as Nf,x as rx,xa as qC,xb as po,xc as pf,xd as Nv,xe as If,xj as Ff,xl as YT,y as SC,ya as VC,yb as ux,yc as av,yd as Sx,ye as iP,yg as qP,yh as dT,yj as Lx,yk as BT,z as bC,za as dx,zb as el,zc as nv,zd as Mv,ze as dP,zh as fT,zj as ST,zl as Bn}from"./chunk-YOF4KT5H.js";import{a as cC,b as Rd,c as pC,g as Uk,h as xx,i as jk}from"./chunk-ESKHLPB5.js";import{$ as xb,$a as Db,$c as wo,$d as hw,$e as Xm,$g as tx,A as ro,Ae as qm,Af as Jm,B as on,Bb as Hs,Bd as Gm,Be as Sw,Ca as Ie,Cb as Zb,D as Ds,Dd as cw,De as Vm,E as ld,Ed as Sd,F as Dt,Fg as Xw,G as tn,Ga as Xo,Gb as Id,Gd as Zo,Gg as Zw,H as ze,Ha as St,Hc as rw,Hd as Lo,He as Cd,Hf as Lw,Hg as Jw,I as qe,Ia as Pm,Id as Ze,Ie as kd,Ig as Qw,J as rn,Ja as Tm,Jc as Wm,Jd as Mt,Je as bw,Jh as fx,K as id,Kd as er,Ke as vd,Kf as or,Kh as In,L as ib,La as Om,Lb as Jb,Ld as wt,Le as Pd,Lg as eC,Lh as rk,M as db,Ma as Em,Md as dn,Me as ww,Mh as Qo,Nd as pw,Ne as Cw,Nh as et,O as fb,Od as fn,Oe as Td,Og as oC,Oh as zd,P as dd,Pd as uw,Pe as Od,Pg as tC,Ph as ak,Q as cb,Qa as _m,Qb as gd,Qc as aw,Qe as aa,Qf as Rw,Qh as Vs,R as ea,Ra as Ob,Re as kw,Rg as rC,S as pb,Sa as Eb,T as ub,Ta as Ge,Tb as Qb,Td as ra,Tg as sC,Th as Ak,U as Ns,Ua as _b,Ub as ew,Ud as mw,Ug as lC,V as km,Va as md,Vd as xw,Ve as vw,W as we,Wa as Ab,Wb as ow,Wd as cn,Wf as Dw,Wg as yr,X as K,Xa as Fb,Xc as U,Xd as $s,Xf as Nw,Xh as Fk,Y as mb,Ya as Bb,Yb as Nm,Yc as re,Yd as zs,Ye as Ht,Yf as Mw,Yg as iC,Za as Lb,Zc as $m,Zd as Km,Ze as Us,Zf as Hw,Zg as ox,_ as fd,_a as Rb,_c as L,_e as Ym,_g as dC,a as en,ab as Nb,ad as Jt,ae as Iw,af as Pw,ah as Ld,b as fo,ba as hb,bb as Mb,bd as nw,be as gw,bf as Tw,bg as Ww,c as to,ca as cd,cb as xd,cd as W,cf as Ed,cg as $w,ch as fC,ci as Bk,d as Xt,da as Ib,db as hd,dd as yd,de as yw,df as Ow,di as Cr,ea as gb,eb as Hb,ed as Bo,eg as zw,f as jo,fa as vm,fb as Wb,fc as Mm,fd as sw,fe as bd,fg as Uw,fi as Lk,g as Rs,ga as yb,gd as bt,gf as Ew,gg as Fd,gi as Rk,h as eb,ha as Sb,hb as $b,hd as Nt,he as wd,hf as _d,hg as jw,hi as Dk,i as ob,ia as bb,ib as zb,id as zm,if as _w,ig as Bd,j as tb,jb as Am,jd as Ir,jf as Zm,jg as Qm,k as rb,kb as Ub,kd as Qt,kf as Aw,la as wb,lb as jb,ld as lw,lf as Fw,li as ko,ma as Cb,mb as Fm,mf as Ad,mg as Gw,na as kb,nb as nn,nd as Fe,nf as pn,ng as Kw,o as ab,ob as oa,od as ta,of as mn,pa as vb,pb as Bm,pd as Ws,pf as gr,pi as dl,qb as Lm,qd as sn,qg as qw,qh as lx,ra as Pb,rb as Rm,rd as iw,rg as Vw,rh as Wd,s as nb,sa as pd,sb as Gb,sd as Um,sh as zC,ta as Tb,tb as Kb,td as ln,tf as Bw,th as ix,u as De,ua as ud,ub as qb,uc as Hm,ud as jm,ug as Yw,uh as UC,v as sb,vb as Dm,w as sd,wb as Vb,wc as tw,wh as $d,x as lb,xb as Zt,xh as jC,ya as Ms,yb as Yb,yd as dw,yh as qs,z as Pe,za as an,zb as Xb,zd as fw}from"./chunk-PVRWP47B.js";import{a as z,b as co}from"./chunk-G5LEO2F2.js";import{c as pP,d as uP,e as gf}from"./chunk-LY7GZJ6M.js";import{jsx as jx,Fragment as Y4,jsxs as X4}from"react/jsx-runtime";import{createContext as Z4,useContext as J4}from"react";var Q4={mirrorHostStyles:!0,css:null,fontHrefs:[]},XT=Z4(Q4);function dne({value:e,children:o}){return jx(XT.Provider,{value:e,children:o})}function pl(){return J4(XT)}function ZT(){let{css:e,fontHrefs:o}=pl();return X4(Y4,{children:[o.map(t=>jx("link",{rel:"stylesheet",href:t},t)),e?jx("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as e6}from"react/jsx-runtime";import{createContext as o6,useContext as t6}from"react";var JT=o6(void 0);function une({metadata:e,children:o}){return e6(JT.Provider,{value:e,children:o})}var QT=()=>t6(JT);import{jsx as lo,Fragment as R4,jsxs as ed}from"react/jsx-runtime";import{useCallback as Es,useEffect as Yt,useRef as Rae,useState as A4}from"react";import{SettingsSwitch as Dae}from"efficient-easel/panel";import{PagesIcon as Nae,StylesIcon as Mae}from"efficient-easel/rail";import{PaletteIcon as Hae}from"efficient-shell/icons/efficient";import{Subtree as Wae,TreeRow as D4}from"efficient-easel/tree";import{useEasel as N4}from"efficient-easel/easel";import{toItemSelector as $ae}from"efficient-easel/node-ops";import{useEaselStrings as M4}from"efficient-easel/strings";import{createContext as r6,useContext as a6}from"react";var Gx=r6(!1),hne=()=>a6(Gx);import{useMemo as n6,useRef as s6}from"react";import{useEaselApi as l6}from"efficient-easel/easel";import{useSectionOps as i6}from"efficient-easel/screen/lib/document/use-section-ops";function Hf(){let e=l6(),o=i6(),t=s6(o);return t.current=o,n6(()=>({getItemById:r=>e.getState().getItemById(r),getSelectorForId:r=>e.getState().getSelectorForId(r),get components(){return e.getState().config.components},replace:(r,a,n)=>t.current.replaceComponent(r,a,n)}),[e])}import{encodePartId as E6}from"efficient-easel/draw";import{insertAt as _6,moveTo as A6,removeAt as F6}from"efficient-easel/fields";import{useSyncExternalStore as w6}from"react";import{isNodeList as e0}from"efficient-easel/data";var o0="Flex";function Ln(e,o){return Ht(e)?typeof e?.[jo]=="string"?Kx(o?.[jo]):"":Kx(e?.[jo])}var Kx=e=>typeof e=="string"?e.trim():"",d6=e=>e.type===ro&&Array.isArray(e.props?.[Vm])&&e.props[Vm].some(o=>Kx(o?.[jo])!==""),f6=new Intl.NumberFormat("en-US");function c6(e){return/^\d+$/.test(e)?f6.format(Number(e)):e}function Pne(e,o){let t=o?o.find(r=>r.key===e)?.value:nb(Rs).find(r=>r.key===e)?.value;return t===void 0?null:c6(t)}var p6={[jo]:"any"};function qx(e,o=!1){let t=e.props;if(!t)return{node:e,names:!1};let r=e.type==="Text"&&(Ln(t)!==""||o&&Ln(t,p6)!==""),a=o||d6(e),n=qe(e,l=>ze(l,i=>{let d=qx(i,a);return d.names&&(r=!0),d.node})).props;if(e.type!==o0)return{node:n===t?e:{...e,props:n},names:r};let s=De(n);if(r&&!s&&(n={...n,[to]:Rs}),!r&&s===Rs){let{[to]:l,...i}=n;n=i}return{node:n===t?e:{...e,props:n},names:!1}}function t0(e,o,t){for(let r of e){if(r?.props?.id===o)return t;for(let a of tn(r??{})){let n=t0(a,o,r.type===o0?r:t);if(n!==void 0)return n}}}function Tne(e,o){if(!e0(e))return!0;let t=t0(e,o,null);if(t===void 0)return!0;if(t===null)return!1;let r=De(t.props);return!r||r===Rs}function r0(e){let o=e?.content;if(!e0(o))return e;let t=o.map(r=>qx(r));return t.every((r,a)=>r.node===o[a])?e:{...e,content:t.map(r=>r.node)}}function a0(e){return qx(e).node}import{decodePartId as C6}from"efficient-easel/draw";function Rn(e,o){let t=tv(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?AT(t,o.index):null:rv(e)?.[o.rowKey]??null}function Wf(e,o,t){let r=e.node.props,{key:a,row:n}=zt(e.propKey),s=n?nv(r,a,n,e.kind,o):ov(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}import{readHidable as l0}from"efficient-easel/draw";import{parseOption as u6}from"efficient-shell/format";var Vx=e=>String(e+1).padStart(2,"0"),m6=[{label:"01 \xB7",value:"two-digit"},{label:"1.",value:"plain"}],Yx="two-digit",n0=e=>u6(m6,Yx,e),$f=(e,o)=>e==="plain"?`${o+1}.`:Vx(o);var Jx="Contents",Xx="Flex",s0="Text",x6="numberForm",h6="_contentsEntries",I6="_kickerNumber",i0="data-sf-kicker-number",g6=e=>l0(e).text.trim(),d0=e=>fa(e?.anchor),Zx=e=>String(e.props?.id??""),y6=e=>!l0(e.props?.text).hidden&&!Ln(e.props)&&!Ht(e.props),ul=e=>tn(e);function f0(e){for(let o of ul(e))for(let t of o){if(tr(t.props??{}))continue;if(t.type===s0&&y6(t))return t;if(t.type===s0)continue;let r=f0(t);if(r)return r}}function c0(e){return ul(e).some(o=>o.some(t=>t&&!tr(t.props??{})&&(t.type===Jx||c0(t))))}var p0=e=>e.type===Xx&&Pn(Xx,e.props?.direction)==="row";function u0(e){return ul(e).some(o=>o.some(t=>t&&!tr(t.props??{})&&(t.type===Jx||!p0(t)&&u0(t))))}function S6(e){let o=[],t=(r,a)=>{for(let n of r){if(!n||tr(n.props??{}))continue;if(n.type===Jx){a.open={contents:n,sections:a.waiting??[]},a.waiting=null,o.push(a.open);continue}if(p0(n)&&u0(n)){let l={inRow:!0,open:null,waiting:[]};for(let i of ul(n))t(i,l);a.inRow||(a.open=null);continue}let s=a.open?.sections??a.waiting;if(n.type===Xx&&d0(n.props)&&s&&!c0(n)){s.push({box:n,kicker:f0(n)});continue}for(let l of ul(n))t(l,a)}};return t(e,{inRow:!1,open:null,waiting:null}),o}function b6(e){return e.map(o=>({label:o.kicker?an(g6(o.kicker.props?.text)):"",anchor:d0(o.box.props)}))}function Qx(e){let o=e?.length?S6(e):[];if(!o.length)return null;let t=new Map,r=new Map;for(let a of o){let n=Zx(a.contents);n&&t.set(n,b6(a.sections));let s=n0(a.contents.props?.[x6]);a.sections.forEach((l,i)=>{let d=l.kicker?Zx(l.kicker):"";d&&r.set(d,$f(s,i))})}return{entries:t,numbers:r}}var Kne=e=>e.endsWith(".")?`${e} `:`${e} \xB7 `;function m0(e){let o=e;if(!o?.content?.length)return e;let t=Qx(o.content);if(!t)return e;let{entries:r,numbers:a}=t,n=s=>{let l=qe(s,h=>ze(h,n)),i=l.props??{},d=l!==s,f=Zx(s),x=f?r.get(f):void 0;x&&(i={...i,[h6]:x},d=!0);let u=f?a.get(f):void 0;return u&&(i={...i,[I6]:u},d=!0),d?{...s,props:i}:s};return{...o,content:o.content.map(n)}}var k6=`[${i0}]`,v6=["bold","italic","underline","strike","link","sup","sub"],P6=["bullet","number"];function th(e,o){return e?[...v6,...o?P6:[]]:[]}function x0(e,o){let t=C6(e);if(!t?.propKey)return null;let{nodeId:r,propKey:a}=t,n=o.getItemById(r),s=o.getSelectorForId(r);if(!n||!s)return null;let{key:l,row:i}=zt(a),d=o.components[n.type]?.fields?.[l],f=i?Rn(d,i):d,x=ff(f);if(!x)return null;let u=n.props??{};if(uT(u)!==null||!i&&Ed(n.type,u,l)||n.type==="Text"&&l==="text"&&Ln(u)||i&&!(Array.isArray(u[l])&&i.index<u[l].length))return null;let h=i?pf(u[l],i):u[l];return{node:n,selector:s,propKey:a,kind:x,stored:h,offPage:Af(f),panelOnly:Qk(f)}}function zf(e,o){let t=x0(e,o);if(!t)return null;let{text:r,hidden:a}=pa(t.stored);if(!xv({offPage:t.offPage,hidden:!!a,panelOnly:t.panelOnly}))return null;let n=cf(t.kind);return{partId:e,value:r,rules:pd,multiline:n,skip:k6,offered:th(t.kind!=="plainText",n),write:s=>{let l=x0(e,o);l&&Wf({node:l.node,propKey:l.propKey,kind:l.kind,zone:l.selector.zone,index:l.selector.index},s,o.replace)}}}function rh(e,o,t){return e?.isConnected&&e.getAttribute(Ue)===t?e:o?.querySelector(`[${Ue}="${Uf(t)}"]`)??null}function Uf(e){return e.replace(/["\\]/g,"\\$&")}function h0(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var eh=null,oh=new Set;function T6(){return eh}function ah(e){if(e!==eh){eh=e;for(let o of oh)o()}}function O6(e){return oh.add(e),()=>{oh.delete(e)}}function I0(){return w6(O6,T6,()=>null)}function g0(e,o){if(e.outer)return null;let t=o.getItemById(e.ownerId);if(!t)return null;let r=ww(t.type);return!r||De(t.props)?null:{node:t,rows:r}}function B6(e,o){let t=g0(e,o),r=o.getItemById(e.nodeId);if(!t||!r)return null;let a=Ow(r.type,r.props,e.key);if(!a)return null;let n=t.node.props[t.rows];return!Array.isArray(n)||e.index<0||e.index>=n.length?null:E6(e.ownerId,Cn(t.rows,{index:e.index,rowKey:a}))}function jf(e,o){let t=B6(e,o);return t?zf(t,o):null}function y0(e,o){return jf(e,o)?.value}function S0(e,o){let t=jf(e,o);return t?(t.write(e.text),!0):!1}function b0(e,o){let t=g0(e,o),r=t&&o.getSelectorForId(e.ownerId);if(!t||!r)return!1;let a=t.node.props,n=a[t.rows],s=e.index;if(!Array.isArray(n)||s<0||s>=n.length)return!1;let l;switch(e.action){case"addAfter":{let i=o.components[t.node.type]?.fields?.[t.rows];l=_6(n,s+1,{...i?.defaultItemProps??{}});break}case"moveEarlier":case"moveLater":{let i=e.action==="moveEarlier"?s-1:s+1;if(i<0||i>=n.length)return!1;l=A6(n,s,i);break}case"delete":l=F6(n,s);break;default:return!1}return o.replace(r.zone,r.index,{...t.node,props:{...a,[t.rows]:l}}),!0}import{jsx as ve,Fragment as YZ,jsxs as Hu}from"react/jsx-runtime";import{Fragment as XZ,useEffect as eH,useMemo as oH,useRef as ZZ,useState as za}from"react";import{useScreenDocument as sH}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as Ny}from"efficient-easel/draw/client";import JZ from"efficient-easel/screen/components/SidePanelHead";import{InspectorIconButton as QZ}from"efficient-easel/chrome";import{Input as eJ,LoadingSpinner as oJ,PopupMenu as tJ,PopupMenuItem as tH,toast as rH}from"efficient-shell/ui";import{LayersTree as rJ,TreeGroupLabel as aJ,TreeRow as aH,TreeRowAction as Wu}from"efficient-easel/tree";import{AddIcon as nJ,DuplicateIcon as sJ,PageIcon as lJ,SettingsIcon as iJ}from"efficient-easel/icons";import{PagesIcon as dJ}from"efficient-easel/rail";import{useEaselHost as fJ}from"efficient-easel/screen/lib/host";import{useEaselSession as My}from"efficient-easel/screen/lib/session-context";import{useCallback as Gf,useEffect as L6,useSyncExternalStore as R6}from"react";import{useScreenDocument as v0}from"efficient-easel/screen/components/ScreenDocumentContext";var w0=new WeakMap;function ml(e){let o=w0.get(e);return o||(o={rows:null,loading:null,listeners:new Set},w0.set(e,o)),o}function nh(e,o){e.rows=o;for(let t of e.listeners)t()}var Kf=new Set;function qf(e,o){o?Kf.add(e):Kf.delete(e)}function C0(e){let o=ml(e),t=e.listPages().then(r=>nh(o,Kf.size?r.filter(a=>!Kf.has(a.id)):r),()=>nh(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var k0=()=>null,D6=()=>()=>{};function xl(){let{adapter:e,ready:o}=v0(),t=Gf(l=>{let{listeners:i}=ml(e);return i.add(l),()=>i.delete(l)},[e]),r=Gf(()=>ml(e).rows,[e]),a=R6(o?t:D6,o?r:k0,k0);L6(()=>{if(!o)return;let l=ml(e);l.rows===null&&!l.loading&&C0(e)},[e,o]);let n=Gf(()=>o?C0(e):Promise.resolve(),[e,o]),s=Gf(l=>nh(ml(e),l),[e]);return{rows:a,reload:n,setRows:s,getRows:r}}function N6(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function P0(){let{currentSlug:e}=v0(),{rows:o}=xl();return N6(o,e)}import{canDuplicatePage as cJ,DuplicatePageDialog as pJ}from"efficient-easel/page-copy";import{jsx as To,jsxs as KM}from"react/jsx-runtime";import{useEffect as FZ,useId as BZ,useMemo as LZ,useRef as RZ,useState as Ly}from"react";import{useScreenDocument as DZ}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as NZ}from"efficient-easel/screen/lib/session-context";import{uniqueSlug as qM}from"efficient-easel/page-copy";import{AddIcon as MZ}from"efficient-easel/icons";import{Button as HZ,Dialog as WZ,EmptyState as $Z,LoadingSpinner as zZ,Paragraph as UZ,SidebarLayout as jZ,SidebarNavItem as Ry,Title as GZ,toast as VM}from"efficient-shell/ui";import{jsx as Tt,jsxs as cR}from"react/jsx-runtime";import{useEffect as D7,useState as Og}from"react";import{CanvasFrame as N7}from"efficient-easel/easel";import{Button as M7,Card as H7,FitFrame as W7,Text as $7}from"efficient-shell/ui";import{jsx as A0,Fragment as Y6,jsxs as X6}from"react/jsx-runtime";import{useEffect as F0,useLayoutEffect as Z6}from"react";var Vf="data-theme",T0="light";function M6(e){return e.getAttribute(Vf)===T0?"light":"dark"}function H6(e,o){return M6(e)===o?!1:(o==="light"?e.setAttribute(Vf,T0):e.removeAttribute(Vf),!0)}function W6(e){return Ux(e).getItem(Jm)}function bse(e,o){Ux(e).setItem(Jm,o)}function $6(e,o,t=new Date().getHours()){return Lw({mode:o.mode,override:W6(e),switchShown:o.switchShown,hour:t})}function O0(e,o){let t=e.documentElement;if(!t)return()=>{};let r=()=>H6(t,$6(e,o));r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[Vf]}),()=>n.disconnect()}var z6="style";function U6(e,o){let t=Bd(o),r=!1;for(let a of jw){let n=t[a]??"";e.style.getPropertyValue(a)!==n&&(n?e.style.setProperty(a,n):e.style.removeProperty(a),r=!0)}return r}function E0(e,o){let t=e.body;if(!t)return()=>{};let r=()=>U6(t,o);r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[z6]}),()=>n.disconnect()}import{VIEW_DESKTOP_MIN as j6,VIEW_TABLET_MIN as G6}from"efficient-easel/screen/lib/content/view-tiers";var sr={fit:"data-fit",fitTablet:"data-fit-tablet",fitPhone:"data-fit-phone",min:"data-fit-min",minTablet:"data-fit-min-tablet",minPhone:"data-fit-min-phone",edge:"data-fit-edge"},Ko=sr,K6=e=>e.flatMap(o=>[`[${o}] p`,`[${o}] li`]).join(","),q6=String.raw`(function (doc) {
|
|
2
2
|
if (doc.__sfFitWords) return;
|
|
3
3
|
var win = doc.defaultView;
|
|
4
4
|
var SELECTOR = "h1,h2,h3,h4,h5,h6,[class*='font-heading'],[class*='font-display']";
|
|
@@ -301,7 +301,7 @@ import{$ as nf,D as Ok,E as Ek,F as ef,G as _k,H as Nk,I as kr,J as Mk,K as Hk,L
|
|
|
301
301
|
doc.__sfFitWords.floorOf = floorOf;
|
|
302
302
|
})(document);`,V6="storefront-fit-words";function _0(e){let o=e.createElement("script");return o.id=V6,o.textContent=q6,(e.head??e.documentElement).appendChild(o),()=>{e.__sfFitWords?.(),o.remove()}}var J6=`
|
|
303
303
|
[${Ue}][${Ue}] { cursor: text; }
|
|
304
|
-
`;function Yf({children:e,document:o}){let{theme:t,themeMode:r,themeSwitchShown:a}=ko(),n=or(t);return F0(()=>{if(o)return O0(o,{mode:r,switchShown:a})},[o,r,a]),F0(()=>{if(o)return E0(o,n)},[o,n]),Z6(()=>{if(o)return _0(o)},[o]),X6(Y6,{children:[A0(ZT,{}),A0("style",{children:J6}),e]})}import{jsx as dL}from"react/jsx-runtime";import{memo as yK}from"react";import{Render as SK}from"efficient-easel/render";import{jsx as Dn}from"react/jsx-runtime";import{createContext as Q6,useContext as eW,useMemo as oW}from"react";var sh=Q6(null);function tW({children:e}){return Dn(sh.Provider,{value:"first",children:e})}function Zf({children:e}){return Dn(sh.Provider,{value:"below",children:e})}function hl(){return eW(sh)}function lh(){return hl()==="below"?{loading:"lazy"}:{}}function Jf(e){let o=lh();return Dn("img",{...e,...o})}var B0="laterSlideIds",rW=new Set(["Breadcrumb","CategoryBar","Divider","Spacer","Ticker"]);function L0(e){return wf(e?.filter(o=>!o?.type||!rW.has(o.type)))}function Xf(e,o=[]){if(Array.isArray(e))for(let t of e)Xf(t,o);else if(e&&typeof e=="object"){let{slides:t}=e;if(Array.isArray(t))for(let r of t.slice(1))typeof r?.props?.id=="string"&&o.push(r.props.id);for(let r of Object.values(e))Xf(r,o)}return o}function R0(e,o){let t=o?.type,r=o?.props?.id;return oW(()=>{let a=t?e.components[t]:void 0;if(!t||!a)return e;let n=a.render,s=l=>l.id===r?Dn(tW,{children:Dn(n,{...l})}):Dn(n,{...l});return{...e,components:{...e.components,[t]:{...a,render:s}}}},[e,t,r])}function D0(e){return e.props?qe(e,o=>{let t=ze(o,D0),r=e.type===jC&&t.every(a=>a.type===Wd)?zC(t):t;return r.length!==o.length||r.some((a,n)=>a!==o[n])?r:o}):e}function N0(e){return id(e,o=>ze(o,D0))}var aW="Flex",M0="ListSearch",H0=["FAQ"],nW="listKey";function W0(e,o){let t={search:e.type===M0,list:H0.includes(String(e.type))};return qe(e,r=>{for(let a of r){let n=W0(a,o);t.search||=n.search,t.list||=n.list}return r}),e.type===aW&&t.search&&t.list&&String(e.props?.id??"")?(o.add(e),{search:!1,list:!1}):t}function $0(e,o,t){let r=o.has(e)?String(e.props?.id):t,a=qe(e,n=>ze(n,s=>$0(s,o,r)));return r&&(e.type===M0||H0.includes(String(e.type)))?{...a,props:{...a.props,[nW]:r}}:a}function z0(e){return rn(e,o=>{let t=new Set;for(let r of o)W0(r,t);return t.size?ze(o,r=>$0(r,t,"")):o})}import{isNode as u$,isNodeList as HE}from"efficient-easel/data";import{jsx as _e,Fragment as o$,jsxs as fr}from"react/jsx-runtime";import{jsx as xh}from"react/jsx-runtime";import{Fragment as cW,jsx as pW}from"react/jsx-runtime";import{jsx as ih}from"react/jsx-runtime";import{createContext as iW,Fragment as dW,useContext as fW}from"react";import{jsx as U0,jsxs as sW}from"react/jsx-runtime";import{lazy as lW}from"react";var j0=lW(()=>import("./section-css-style-6XARTNKW.js"));function G0({css:e,id:o,attr:t}){return U0(j0,{css:e,id:o,attr:t})}var K0={name:"sectionCustomCss",applies:(e,o,t)=>o.isSection(e)&&!!t&&typeof t.render=="function",panel(e,o,t){e.fields={...e.fields,...t.customCssFields()}},draw(e){e.defaultProps={...e.defaultProps,[Rd]:""};let o=e.render;e.render=t=>{let r=pC(t),a=typeof t.id=="string"?t.id:"";return!r||!a?o(t):sW(Pr,{className:"sf-section-css",attrs:{[cC]:a},children:[U0(j0,{css:r,id:a}),o(t)]})}}};var q0=iW(null);function V0({rootProps:e,children:o}){let t=e&&typeof e=="object"?e:null,r=vk(t),a=ih(dW,{children:o},"page");return ih(q0.Provider,{value:t,children:r?[ih(G0,{css:r,id:kk,attr:Qd},"css"),a]:a})}function Y0(){return fW(q0)}function vt(){return Dd(Y0())===yC}function Qf({className:e,children:o}){let t=vt();return pW(cW,{children:o(Jo(e,t))})}import{SITE_SIDE as uW}from"efficient-easel/screen/lib/content/length-units";var X0="sideSpace",Il=uW,dh="none",nle=[{value:"box",label:"Box"},{value:Il,label:"Site"},{value:dh,label:"None"}],sle="box",lle="Box: on small screens the Box keeps its own side space, up to 24 px. Site: it uses the site's Side space, as the site's own sections do. None: from 800 px up the Box runs to the screen's edges; on small screens it keeps the site's Side space, up to 20 px.";function Z0(e){return e===Il||e===dh?e:"box"}function ile(e){return e===Il||e===dh?e:void 0}import{parseOption as ph}from"efficient-shell/format";var ec="standard",oO=[{label:"Standard",value:"standard"},{label:"Editorial",value:"editorial"},{label:"Simple",value:"simple"},{label:"Statement",value:"statement"},{label:"Natural",value:"natural"},{label:"Essay",value:"essay"}],ch=["numStyle","logoSrc","logoAlt","linkText","linkHref","_gLogo"],fh=[...ch,"description"],J0={standard:["eyebrowLook"],editorial:[...ch,"eyebrowLook"],simple:fh,statement:fh,natural:ch,essay:fh},Q0=["gap-5","gap-3"],eO=["text-[length:var(--size-body,16px)]","text-[15px]"];function ple(e){return ph(Q0,Q0[0],e)}function ule(e){return ph(eO,eO[0],e)}function tO(e){return ph(oO,ec,e)}function mle(e){let o=oO.map(r=>r.value),t=[...new Set(Object.values(J0).flat())];return Zo(e,t.map(r=>[[r],Sd("headStyle",o,ec,o.filter(a=>!J0[a].includes(r)))]))}import{readHidable as mW,VIEW_TIERS as xW,viewKeyAt as hW}from"efficient-easel/draw";var ma={direction:"row",share:"content",align:"center"},xa={top:14,bottom:14,topPhone:12,bottomPhone:12},oc={wrap:"nowrap",loop:"scroll",sectionAccent:dC,gap:60,gapPhone:32,separator:"dot",sectionBorder:{top:1,bottom:1}},rO={gap:120,gapPhone:64},tc={...Bo,sizeToken:{step:"label",px:14,pxPhone:12},letterSpacing:.25,lineHeight:1.5},aO={textStyle:"heading-3",letterSpacing:.005,case:"upper",lineHeight:1},gl={top:24,bottom:24,topPhone:16,bottomPhone:16},ha={top:16,bottom:16,topPhone:12,bottomPhone:12},yl={justify:"between",wrap:"wrap",gap:32,separator:"none"},Sl={...Bo,letterSpacing:.1,lineHeight:1.5};var rc={top:24,bottom:24,topPhone:24,bottomPhone:24},ac={top:72,bottom:72,topPhone:72,bottomPhone:72},Nn={top:100,bottom:100,topPhone:60,bottomPhone:60},nc={top:120,bottom:120,topPhone:70,bottomPhone:70},IW={top:24,bottom:24,topPhone:24,bottomPhone:24},gW=40,sc={top:120,bottom:120,topTablet:80,bottomTablet:80,topPhone:80,bottomPhone:80},yW={top:24,bottom:24,topPhone:24,bottomPhone:24},lc={top:24,bottom:24,topPhone:24,bottomPhone:24},SW={top:84,bottom:84,topPhone:84,bottomPhone:84},ic={top:48,bottom:48,topPhone:48,bottomPhone:48},dc={top:80,bottom:80,topPhone:60,bottomPhone:60},fc={top:100,bottom:60,topPhone:60,bottomPhone:40},cc={top:60,bottom:60,topPhone:40,bottomPhone:40},pc={top:80,bottom:80,topTablet:60,bottomTablet:60,topPhone:60,bottomPhone:60},uc={top:76,bottom:76,topPhone:76,bottomPhone:76},mc={top:76,bottom:76,topPhone:76,bottomPhone:76},wl={top:80,bottom:40,topPhone:60,bottomPhone:32},Cl={top:76,bottom:76,topPhone:76,bottomPhone:76},xc={top:72,bottom:72,topPhone:72,bottomPhone:72},hc={top:40,bottom:64,topPhone:24,bottomPhone:36},Ic={top:120,bottom:120,topPhone:80,bottomPhone:80,topTablet:80,bottomTablet:80},gc={top:48,bottom:48,topPhone:48,bottomPhone:48},kl=e=>{let o=Ie(e.bandPadding)??gW;return{top:o,bottom:o,topPhone:o,bottomPhone:o}},nO=(e,o,t)=>({desktop:e,tablet:o,mobile:t}),uh=e=>fn(e.headPlacement)==="own-box",Be=(e,o)=>({top:nO(e.top,o?.top??e.topTablet??e.top,e.topPhone),bottom:nO(e.bottom,o?.bottom??e.bottomTablet??e.bottom,e.bottomPhone)}),sO=e=>({top:e.topPhone,bottom:e.bottomPhone}),bl=e=>o=>uh(o)?{top:0,bottom:e.bottom}:e,bW=(e,o)=>{let t=mW(e[o]);return t.hidden?!1:!!t.text||e.editor?.isEditing===!0},yc={Banner:{frame:()=>Be(rc)},Cards:{frame:bl(Be(ac))},Chart:{frame:()=>Be(Cl)},ContactLocations:{frame:()=>Be(Nn,sO(Nn))},Countdown:{frame:()=>Be(ic)},DocBody:{frame:()=>Be(dc)},DocMasthead:{frame:()=>Be(fc)},DocMetaCards:{frame:()=>Be(cc)},FAQ:{frame:e=>{let o=uh(e)||!["num","title","linkText"].some(r=>bW(e,r)),t=Be(nc);return o?{top:0,bottom:t.bottom}:t},edge:!0},FeaturedCover:{frame:()=>Be(pc)},Grid:{frame:()=>Be(IW)},Integrations:{frame:()=>Be(uc)},KeyFeatures:{frame:()=>Be(mc)},Logos:{frame:e=>uh(e)?0:Be(kl(e))},LongRead:{frame:bl(Be(sc))},Masthead:{frame:()=>Be(wl,sO(wl))},Mockup:{frame:()=>Be(Cl)},OrderSummary:{frame:()=>Be(yW)},PaymentBadges:{frame:()=>Be(lc)},Prose:{frame:bl(Be(xc))},SectionHeader:{frame:e=>{let o=Be(hc);return tO(e.headStyle)==="standard"?o:{top:o.top,bottom:0}},edge:!0},Series:{frame:bl(Be(Ic))},Stats:{frame:()=>Be(gc)},Testimonials:{frame:bl(Be(SW))},Ticker:{frame:()=>Be(xa),edge:!0}};function Ple(e,o,t){let r=z(yc,e)??t;return r?na({values:el(o,po,!0),frame:r.frame(o),drawsFrame:!0,edge:r.edge},!0).root:null}var lO=(e,o)=>typeof e=="object"&&"top"in e?e[o]:e;function wW(e,o){let t={...e};for(let r of xW)delete t[hW(o,r)];return t}function Tle(e,o,t,r){let a=z(yc,e)??t;if(!a)return{first:null,last:null};let n=a.frame(o),s=el(o,po,!0),l=(i,d)=>na({values:wW(s,i),frame:d,drawsFrame:!0,edge:a.edge},!0).root;return{first:l("bottom",{top:lO(n,"top"),bottom:r.firstBottom}),last:l("top",{top:r.lastTop,bottom:lO(n,"bottom")})}}var CW=/^(?:[^\s]*:)?p[ytb]-/;function iO(e,o,t){if(!o)return t?{className:e,style:t}:{className:e};let r=e.split(/\s+/).filter(n=>n&&!CW.test(n)),a={...t,...o.style};return{className:[...r,o.className].filter(Boolean).join(" "),...Object.keys(a).length?{style:a}:{},...o.attrs}}import{isNodeList as kW}from"efficient-easel/data";var mh=new Set(["FAQ"]);function qo(e,o){if(!mh.has(e))return!1;let t=o.template;return typeof t=="function"?(t.blockCount??0)>0:kW(t)}var cO={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120}},pO=new Set(Object.keys(cO));function hh(e,o){return o?.innerPadding??z(cO,e)}var Mn=e=>hh(e)??{};var Sc=new Set(["Flex","Text","Heading","ImageBlock","ButtonBlock"]),vW=new Set(["Divider"]),PW=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),dO=new Set(["ProductGrid"]);function Ih(e,o,t=!1,r){let a=e.render;e.render=n=>{if(o?.(n))return a(n);let s={...el(n,po,t),sideSpace:Z0(n.sideSpace)},l=r?na({values:s,frame:r(n)},!0).outer:bk(s),i=a(n);if(!l)return i;let d=u=>xh(Qf,{className:u?`${l.className} ${u}`:l.className,children:h=>xh(de,{className:h,style:l.style,children:i})}),f=Cr(n,{atSectionLine:!0}),x=Cr(n);return f===x?d(f):xh(tf,{line:"by-box",draw:u=>d(u?x:f)})}}var uO={name:"sectionPadding",applies:(e,o,t)=>o.isSection(e)&&!PW.has(e)&&!!t&&typeof t.render=="function",panel(e,o,t){let r=hh(o,e);if(r){e.fields={...e.fields,...t.sidesPaddingFields({keys:wr,unitKey:Zd,fallback:r,tablet:!0,siteSide:!0})};return}if(dO.has(o))return;let a=[wr.top,wr.bottom].filter(s=>e.fields!=null&&s in e.fields);if(a.length)throw new Error(`section-padding: ${o} declares its own ${a.join(" / ")} row; declare \`innerPadding: { top, bottom }\` in its meta and the one Padding row draws on its band`);let n=fO(o,e);if(n){xO(e,o,t,n);return}e.fields={...e.fields,...t.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,o){if(!hh(o,e)){if(dO.has(o)){Ih(e);return}Sc.has(o)||vW.has(o)||Ih(e,o==="Flex"?t=>Kk(t.bgImage):mh.has(o)?t=>qo(o,t):void 0,!0,fO(o,e))}}},TW=["Heading","Text","ImageBlock","ButtonBlock"],OW=["LogoBlock"],mO={Text:e=>Or(e,"text").textStyle?.startsWith("heading-")?ol.heading:ol.text,Heading:()=>ol.heading,ButtonBlock:()=>ol.text,Breadcrumb:()=>mx(gl),SpecStrip:()=>mx(ha),...Object.fromEntries(Object.entries(yc).map(([e,o])=>[e,o.frame]))};function fO(e,o){return z(mO,e)??o?.ownPad?.frame}var EW={ButtonBlock:"Outer padding"};function _W(e,o){let t=e[$t],r=Array.isArray(t)?t.filter(i=>typeof i=="string"):[],a=bn().filter(i=>o?.[i]);if(!a.length)return e;let n=[...r.filter(i=>!a.includes(i)),...a.filter(i=>typeof e[i]=="number")];if(n.length===r.length&&n.every((i,d)=>i===r[d]))return e;let{[$t]:s,...l}=e;return n.length?{...l,[$t]:n}:l}function AW(e,o,t){if(o<=0)return null;let r=Array.isArray(e[$t])?e[$t]:[];return(t?bn().filter(a=>a.startsWith(po[t])):bn()).some(a=>typeof e[a]=="number"&&!r.includes(a))?c("plus {n} px (older setting)",{n:o}):null}function xO(e,o,t,r){e.fields={...e.fields,...t.ownPaddingFields?.(r,AW,z(EW,o))??t.sidesPaddingFields({tablet:!0,siteSide:!0})};let a=e.resolveData;e.resolveData=(n,s)=>{let l=n.props??{},i=s?.trigger==="replace"?_W(l,s.changed):l,d=i===l?n:{...n,props:i};return a?a(d,s):d}}var hO={name:"blockPadding",applies:(e,o,t)=>(TW.includes(e)||OW.includes(e))&&!!t&&typeof t.render=="function",panel(e,o,t){let r=z(mO,o);if(!r){e.fields={...e.fields,...t.sidesPaddingFields({tablet:!0,siteSide:!0})};return}xO(e,o,t,r)},draw(e,o){Sc.has(o)||Ih(e,void 0,!0)}};import{createContext as gh,useContext as bc}from"react";var IO=gh(null);function qle(){return bc(IO)===!0}function Vle(){return bc(IO)!==null}var FW=gh(!1);function Yle(){return bc(FW)}function Xle(e,o,t){let r=e.boxes;if(!r)return t;let a=r.indexOf(o);return a>=0?a:(r.push(o),r.length-1)}var wc=gh(null);function Zle(){return bc(wc)}import{jsx as Ia}from"react/jsx-runtime";import{Component as WW,createContext as $W,lazy as uie,Suspense as mie,useContext as zW,useSyncExternalStore as UW}from"react";function BW(e,o){let t=e.trim();if(!Cc(t))return!1;if(!o)return!0;let r;try{r=new URL(t,"https://x.invalid").host}catch{return!1}let a=n=>n.toLowerCase().replace(/^www\./,"");return a(r)!==a(o)}function eie(e){return e.startsWith("/")||Cc(e)}function Cc(e){return/^(?:https?:)?\/\//i.test(e.trim())}var vl=Object.freeze({target:"_blank",rel:"noopener noreferrer"});function gO(e,o){return BW(e,o)?{...vl}:{}}function oie(e){return typeof e=="string"?e.trim():""}var tie="data-sf-box-link",yO="absolute inset-0 -z-[1] outline-none focus-visible:z-[2] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent",yh="relative isolate pointer-events-none [&_a]:pointer-events-auto [&_button]:pointer-events-auto [&_input]:pointer-events-auto [&_select]:pointer-events-auto [&_textarea]:pointer-events-auto [&_label]:pointer-events-auto [&_summary]:pointer-events-auto [&_iframe]:pointer-events-auto [&_video]:pointer-events-auto [&_audio]:pointer-events-auto [&_[role=button]]:pointer-events-auto [&_[tabindex]:not([tabindex='-1'])]:pointer-events-auto",LW="data-sf-box-jump";function RW(e){return`sf-box-jump-${e}`}function rie(e,o){return e===!0?fa(o):""}function DW({box:e,lit:o,first:t}){let r=s=>s.join(`,
|
|
304
|
+
`;function Yf({children:e,document:o}){let{theme:t,themeMode:r,themeSwitchShown:a}=ko(),n=or(t);return F0(()=>{if(o)return O0(o,{mode:r,switchShown:a})},[o,r,a]),F0(()=>{if(o)return E0(o,n)},[o,n]),Z6(()=>{if(o)return _0(o)},[o]),X6(Y6,{children:[A0(ZT,{}),A0("style",{children:J6}),e]})}import{jsx as dL}from"react/jsx-runtime";import{memo as yK}from"react";import{Render as SK}from"efficient-easel/render";import{jsx as Dn}from"react/jsx-runtime";import{createContext as Q6,useContext as eW,useMemo as oW}from"react";var sh=Q6(null);function tW({children:e}){return Dn(sh.Provider,{value:"first",children:e})}function Zf({children:e}){return Dn(sh.Provider,{value:"below",children:e})}function hl(){return eW(sh)}function lh(){return hl()==="below"?{loading:"lazy"}:{}}function Jf(e){let o=lh();return Dn("img",{...e,...o})}var B0="laterSlideIds",rW=new Set(["Breadcrumb","CategoryBar","Divider","Spacer","Ticker"]);function L0(e){return wf(e?.filter(o=>!o?.type||!rW.has(o.type)))}function Xf(e,o=[]){if(Array.isArray(e))for(let t of e)Xf(t,o);else if(e&&typeof e=="object"){let{slides:t}=e;if(Array.isArray(t))for(let r of t.slice(1))typeof r?.props?.id=="string"&&o.push(r.props.id);for(let r of Object.values(e))Xf(r,o)}return o}function R0(e,o){let t=o?.type,r=o?.props?.id;return oW(()=>{let a=t?e.components[t]:void 0;if(!t||!a)return e;let n=a.render,s=l=>l.id===r?Dn(tW,{children:Dn(n,{...l})}):Dn(n,{...l});return{...e,components:{...e.components,[t]:{...a,render:s}}}},[e,t,r])}function D0(e){return e.props?qe(e,o=>{let t=ze(o,D0),r=e.type===jC&&t.every(a=>a.type===Wd)?zC(t):t;return r.length!==o.length||r.some((a,n)=>a!==o[n])?r:o}):e}function N0(e){return id(e,o=>ze(o,D0))}var aW="Flex",M0="ListSearch",H0=["FAQ"],nW="listKey";function W0(e,o){let t={search:e.type===M0,list:H0.includes(String(e.type))};return qe(e,r=>{for(let a of r){let n=W0(a,o);t.search||=n.search,t.list||=n.list}return r}),e.type===aW&&t.search&&t.list&&String(e.props?.id??"")?(o.add(e),{search:!1,list:!1}):t}function $0(e,o,t){let r=o.has(e)?String(e.props?.id):t,a=qe(e,n=>ze(n,s=>$0(s,o,r)));return r&&(e.type===M0||H0.includes(String(e.type)))?{...a,props:{...a.props,[nW]:r}}:a}function z0(e){return rn(e,o=>{let t=new Set;for(let r of o)W0(r,t);return t.size?ze(o,r=>$0(r,t,"")):o})}import{isNode as u$,isNodeList as HE}from"efficient-easel/data";import{jsx as _e,Fragment as o$,jsxs as fr}from"react/jsx-runtime";import{jsx as xh}from"react/jsx-runtime";import{Fragment as cW,jsx as pW}from"react/jsx-runtime";import{jsx as ih}from"react/jsx-runtime";import{createContext as iW,Fragment as dW,useContext as fW}from"react";import{jsx as U0,jsxs as sW}from"react/jsx-runtime";import{lazy as lW}from"react";var j0=lW(()=>import("./section-css-style-JQZMV74P.js"));function G0({css:e,id:o,attr:t}){return U0(j0,{css:e,id:o,attr:t})}var K0={name:"sectionCustomCss",applies:(e,o,t)=>o.isSection(e)&&!!t&&typeof t.render=="function",panel(e,o,t){e.fields={...e.fields,...t.customCssFields()}},draw(e){e.defaultProps={...e.defaultProps,[Rd]:""};let o=e.render;e.render=t=>{let r=pC(t),a=typeof t.id=="string"?t.id:"";return!r||!a?o(t):sW(Pr,{className:"sf-section-css",attrs:{[cC]:a},children:[U0(j0,{css:r,id:a}),o(t)]})}}};var q0=iW(null);function V0({rootProps:e,children:o}){let t=e&&typeof e=="object"?e:null,r=vk(t),a=ih(dW,{children:o},"page");return ih(q0.Provider,{value:t,children:r?[ih(G0,{css:r,id:kk,attr:Qd},"css"),a]:a})}function Y0(){return fW(q0)}function vt(){return Dd(Y0())===yC}function Qf({className:e,children:o}){let t=vt();return pW(cW,{children:o(Jo(e,t))})}import{SITE_SIDE as uW}from"efficient-easel/screen/lib/content/length-units";var X0="sideSpace",Il=uW,dh="none",nle=[{value:"box",label:"Box"},{value:Il,label:"Site"},{value:dh,label:"None"}],sle="box",lle="Box: on small screens the Box keeps its own side space, up to 24 px. Site: it uses the site's Side space, as the site's own sections do. None: from 800 px up the Box runs to the screen's edges; on small screens it keeps the site's Side space, up to 20 px.";function Z0(e){return e===Il||e===dh?e:"box"}function ile(e){return e===Il||e===dh?e:void 0}import{parseOption as ph}from"efficient-shell/format";var ec="standard",oO=[{label:"Standard",value:"standard"},{label:"Editorial",value:"editorial"},{label:"Simple",value:"simple"},{label:"Statement",value:"statement"},{label:"Natural",value:"natural"},{label:"Essay",value:"essay"}],ch=["numStyle","logoSrc","logoAlt","linkText","linkHref","_gLogo"],fh=[...ch,"description"],J0={standard:["eyebrowLook"],editorial:[...ch,"eyebrowLook"],simple:fh,statement:fh,natural:ch,essay:fh},Q0=["gap-5","gap-3"],eO=["text-[length:var(--size-body,16px)]","text-[15px]"];function ple(e){return ph(Q0,Q0[0],e)}function ule(e){return ph(eO,eO[0],e)}function tO(e){return ph(oO,ec,e)}function mle(e){let o=oO.map(r=>r.value),t=[...new Set(Object.values(J0).flat())];return Zo(e,t.map(r=>[[r],Sd("headStyle",o,ec,o.filter(a=>!J0[a].includes(r)))]))}import{readHidable as mW,VIEW_TIERS as xW,viewKeyAt as hW}from"efficient-easel/draw";var ma={direction:"row",share:"content",align:"center"},xa={top:14,bottom:14,topPhone:12,bottomPhone:12},oc={wrap:"nowrap",loop:"scroll",sectionAccent:dC,gap:60,gapPhone:32,separator:"dot",sectionBorder:{top:1,bottom:1}},rO={gap:120,gapPhone:64},tc={...Bo,sizeToken:{step:"label",px:14,pxPhone:12},letterSpacing:.25,lineHeight:1.5},aO={textStyle:"heading-3",letterSpacing:.005,case:"upper",lineHeight:1},gl={top:24,bottom:24,topPhone:16,bottomPhone:16},ha={top:16,bottom:16,topPhone:12,bottomPhone:12},yl={justify:"between",wrap:"wrap",gap:32,separator:"none"},Sl={...Bo,letterSpacing:.1,lineHeight:1.5};var rc={top:24,bottom:24,topPhone:24,bottomPhone:24},ac={top:72,bottom:72,topPhone:72,bottomPhone:72},Nn={top:100,bottom:100,topPhone:60,bottomPhone:60},nc={top:120,bottom:120,topPhone:70,bottomPhone:70},IW={top:24,bottom:24,topPhone:24,bottomPhone:24},gW=40,sc={top:120,bottom:120,topTablet:80,bottomTablet:80,topPhone:80,bottomPhone:80},yW={top:24,bottom:24,topPhone:24,bottomPhone:24},lc={top:24,bottom:24,topPhone:24,bottomPhone:24},SW={top:84,bottom:84,topPhone:84,bottomPhone:84},ic={top:48,bottom:48,topPhone:48,bottomPhone:48},dc={top:80,bottom:80,topPhone:60,bottomPhone:60},fc={top:100,bottom:60,topPhone:60,bottomPhone:40},cc={top:60,bottom:60,topPhone:40,bottomPhone:40},pc={top:80,bottom:80,topTablet:60,bottomTablet:60,topPhone:60,bottomPhone:60},uc={top:76,bottom:76,topPhone:76,bottomPhone:76},mc={top:76,bottom:76,topPhone:76,bottomPhone:76},wl={top:80,bottom:40,topPhone:60,bottomPhone:32},Cl={top:76,bottom:76,topPhone:76,bottomPhone:76},xc={top:72,bottom:72,topPhone:72,bottomPhone:72},hc={top:40,bottom:64,topPhone:24,bottomPhone:36},Ic={top:120,bottom:120,topPhone:80,bottomPhone:80,topTablet:80,bottomTablet:80},gc={top:48,bottom:48,topPhone:48,bottomPhone:48},kl=e=>{let o=Ie(e.bandPadding)??gW;return{top:o,bottom:o,topPhone:o,bottomPhone:o}},nO=(e,o,t)=>({desktop:e,tablet:o,mobile:t}),uh=e=>fn(e.headPlacement)==="own-box",Be=(e,o)=>({top:nO(e.top,o?.top??e.topTablet??e.top,e.topPhone),bottom:nO(e.bottom,o?.bottom??e.bottomTablet??e.bottom,e.bottomPhone)}),sO=e=>({top:e.topPhone,bottom:e.bottomPhone}),bl=e=>o=>uh(o)?{top:0,bottom:e.bottom}:e,bW=(e,o)=>{let t=mW(e[o]);return t.hidden?!1:!!t.text||e.editor?.isEditing===!0},yc={Banner:{frame:()=>Be(rc)},Cards:{frame:bl(Be(ac))},Chart:{frame:()=>Be(Cl)},ContactLocations:{frame:()=>Be(Nn,sO(Nn))},Countdown:{frame:()=>Be(ic)},DocBody:{frame:()=>Be(dc)},DocMasthead:{frame:()=>Be(fc)},DocMetaCards:{frame:()=>Be(cc)},FAQ:{frame:e=>{let o=uh(e)||!["num","title","linkText"].some(r=>bW(e,r)),t=Be(nc);return o?{top:0,bottom:t.bottom}:t},edge:!0},FeaturedCover:{frame:()=>Be(pc)},Grid:{frame:()=>Be(IW)},Integrations:{frame:()=>Be(uc)},KeyFeatures:{frame:()=>Be(mc)},Logos:{frame:e=>uh(e)?0:Be(kl(e))},LongRead:{frame:bl(Be(sc))},Masthead:{frame:()=>Be(wl,sO(wl))},Mockup:{frame:()=>Be(Cl)},OrderSummary:{frame:()=>Be(yW)},PaymentBadges:{frame:()=>Be(lc)},Prose:{frame:bl(Be(xc))},SectionHeader:{frame:e=>{let o=Be(hc);return tO(e.headStyle)==="standard"?o:{top:o.top,bottom:0}},edge:!0},Series:{frame:bl(Be(Ic))},Stats:{frame:()=>Be(gc)},Testimonials:{frame:bl(Be(SW))},Ticker:{frame:()=>Be(xa),edge:!0}};function Ple(e,o,t){let r=z(yc,e)??t;return r?na({values:el(o,po,!0),frame:r.frame(o),drawsFrame:!0,edge:r.edge},!0).root:null}var lO=(e,o)=>typeof e=="object"&&"top"in e?e[o]:e;function wW(e,o){let t={...e};for(let r of xW)delete t[hW(o,r)];return t}function Tle(e,o,t,r){let a=z(yc,e)??t;if(!a)return{first:null,last:null};let n=a.frame(o),s=el(o,po,!0),l=(i,d)=>na({values:wW(s,i),frame:d,drawsFrame:!0,edge:a.edge},!0).root;return{first:l("bottom",{top:lO(n,"top"),bottom:r.firstBottom}),last:l("top",{top:r.lastTop,bottom:lO(n,"bottom")})}}var CW=/^(?:[^\s]*:)?p[ytb]-/;function iO(e,o,t){if(!o)return t?{className:e,style:t}:{className:e};let r=e.split(/\s+/).filter(n=>n&&!CW.test(n)),a={...t,...o.style};return{className:[...r,o.className].filter(Boolean).join(" "),...Object.keys(a).length?{style:a}:{},...o.attrs}}import{isNodeList as kW}from"efficient-easel/data";var mh=new Set(["FAQ"]);function qo(e,o){if(!mh.has(e))return!1;let t=o.template;return typeof t=="function"?(t.blockCount??0)>0:kW(t)}var cO={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120}},pO=new Set(Object.keys(cO));function hh(e,o){return o?.innerPadding??z(cO,e)}var Mn=e=>hh(e)??{};var Sc=new Set(["Flex","Text","Heading","ImageBlock","ButtonBlock"]),vW=new Set(["Divider"]),PW=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),dO=new Set(["ProductGrid"]);function Ih(e,o,t=!1,r){let a=e.render;e.render=n=>{if(o?.(n))return a(n);let s={...el(n,po,t),sideSpace:Z0(n.sideSpace)},l=r?na({values:s,frame:r(n)},!0).outer:bk(s),i=a(n);if(!l)return i;let d=u=>xh(Qf,{className:u?`${l.className} ${u}`:l.className,children:h=>xh(de,{className:h,style:l.style,children:i})}),f=Cr(n,{atSectionLine:!0}),x=Cr(n);return f===x?d(f):xh(tf,{line:"by-box",draw:u=>d(u?x:f)})}}var uO={name:"sectionPadding",applies:(e,o,t)=>o.isSection(e)&&!PW.has(e)&&!!t&&typeof t.render=="function",panel(e,o,t){let r=hh(o,e);if(r){e.fields={...e.fields,...t.sidesPaddingFields({keys:wr,unitKey:Zd,fallback:r,tablet:!0,siteSide:!0})};return}if(dO.has(o))return;let a=[wr.top,wr.bottom].filter(s=>e.fields!=null&&s in e.fields);if(a.length)throw new Error(`section-padding: ${o} declares its own ${a.join(" / ")} row; declare \`innerPadding: { top, bottom }\` in its meta and the one Padding row draws on its band`);let n=fO(o,e);if(n){xO(e,o,t,n);return}e.fields={...e.fields,...t.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,o){if(!hh(o,e)){if(dO.has(o)){Ih(e);return}Sc.has(o)||vW.has(o)||Ih(e,o==="Flex"?t=>Kk(t.bgImage):mh.has(o)?t=>qo(o,t):void 0,!0,fO(o,e))}}},TW=["Heading","Text","ImageBlock","ButtonBlock"],OW=["LogoBlock"],mO={Text:e=>Or(e,"text").textStyle?.startsWith("heading-")?ol.heading:ol.text,Heading:()=>ol.heading,ButtonBlock:()=>ol.text,Breadcrumb:()=>mx(gl),SpecStrip:()=>mx(ha),...Object.fromEntries(Object.entries(yc).map(([e,o])=>[e,o.frame]))};function fO(e,o){return z(mO,e)??o?.ownPad?.frame}var EW={ButtonBlock:"Outer padding"};function _W(e,o){let t=e[$t],r=Array.isArray(t)?t.filter(i=>typeof i=="string"):[],a=bn().filter(i=>o?.[i]);if(!a.length)return e;let n=[...r.filter(i=>!a.includes(i)),...a.filter(i=>typeof e[i]=="number")];if(n.length===r.length&&n.every((i,d)=>i===r[d]))return e;let{[$t]:s,...l}=e;return n.length?{...l,[$t]:n}:l}function AW(e,o,t){if(o<=0)return null;let r=Array.isArray(e[$t])?e[$t]:[];return(t?bn().filter(a=>a.startsWith(po[t])):bn()).some(a=>typeof e[a]=="number"&&!r.includes(a))?c("plus {n} px (older setting)",{n:o}):null}function xO(e,o,t,r){e.fields={...e.fields,...t.ownPaddingFields?.(r,AW,z(EW,o))??t.sidesPaddingFields({tablet:!0,siteSide:!0})};let a=e.resolveData;e.resolveData=(n,s)=>{let l=n.props??{},i=s?.trigger==="replace"?_W(l,s.changed):l,d=i===l?n:{...n,props:i};return a?a(d,s):d}}var hO={name:"blockPadding",applies:(e,o,t)=>(TW.includes(e)||OW.includes(e))&&!!t&&typeof t.render=="function",panel(e,o,t){let r=z(mO,o);if(!r){e.fields={...e.fields,...t.sidesPaddingFields({tablet:!0,siteSide:!0})};return}xO(e,o,t,r)},draw(e,o){Sc.has(o)||Ih(e,void 0,!0)}};import{createContext as gh,useContext as bc}from"react";var IO=gh(null);function qle(){return bc(IO)===!0}function Vle(){return bc(IO)!==null}var FW=gh(!1);function Yle(){return bc(FW)}function Xle(e,o,t){let r=e.boxes;if(!r)return t;let a=r.indexOf(o);return a>=0?a:(r.push(o),r.length-1)}var wc=gh(null);function Zle(){return bc(wc)}import{jsx as Ia}from"react/jsx-runtime";import{Component as WW,createContext as $W,lazy as uie,Suspense as mie,useContext as zW,useSyncExternalStore as UW}from"react";function BW(e,o){let t=e.trim();if(!Cc(t))return!1;if(!o)return!0;let r;try{r=new URL(t,"https://x.invalid").host}catch{return!1}let a=n=>n.toLowerCase().replace(/^www\./,"");return a(r)!==a(o)}function eie(e){return e.startsWith("/")||Cc(e)}function Cc(e){return/^(?:https?:)?\/\//i.test(e.trim())}var vl=Object.freeze({target:"_blank",rel:"noopener noreferrer"});function gO(e,o){return BW(e,o)?{...vl}:{}}function oie(e){return typeof e=="string"?e.trim():""}var tie="data-sf-box-link",yO="absolute inset-0 -z-[1] outline-none focus-visible:z-[2] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent",yh="relative isolate pointer-events-none [&_a]:pointer-events-auto [&_button]:pointer-events-auto [&_input]:pointer-events-auto [&_select]:pointer-events-auto [&_textarea]:pointer-events-auto [&_label]:pointer-events-auto [&_summary]:pointer-events-auto [&_iframe]:pointer-events-auto [&_video]:pointer-events-auto [&_audio]:pointer-events-auto [&_[role=button]]:pointer-events-auto [&_[tabindex]:not([tabindex='-1'])]:pointer-events-auto",LW="data-sf-box-jump";function RW(e){return`sf-box-jump-${e}`}function rie(e,o){return e===!0?fa(o):""}function DW({box:e,lit:o,first:t}){let r=s=>s.join(`,
|
|
305
305
|
`),a=t(e),n=o.flatMap(t);return`
|
|
306
306
|
${e} {
|
|
307
307
|
outline: 2px solid transparent;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
1
|
+
import{a as l}from"./chunk-G5LEO2F2.js";var x="data-sf-section-css",g="customCss";function m(t,e=g){let n=t?.[e];return typeof n=="string"&&n.trim()!==""?n:""}function u(t){switch(t.id){case"heading-1":return"font-display";case"heading-2":return"font-heading2";case"heading-3":return"font-heading3";case"body-1":return"font-body";case"body-5":return"font-mono";default:return`font-${t.id}`}}var o="var(--sf-heading-weight, 500)",p={"heading-1":{step:"headingLarge",fallbackPx:76,weight:o},"heading-2":{step:"headingMedium",fallbackPx:44,weight:`var(--sf-heading-2-weight, ${o})`},"heading-3":{step:"headingSmall",fallbackPx:30,weight:`var(--sf-heading-3-weight, ${o})`},"body-1":{step:"body",fallbackPx:16},"body-5":{step:"label",fallbackPx:12}};function C(t,e){let n=new Set;for(let a of e.matchAll(/\bclass="([^"]*)"/g))for(let s of a[1].split(/\s+/))s&&n.add(s);let i=[];for(let[a,{step:s,fallbackPx:d,weight:r}]of Object.entries(p)){let c=u({id:a});if(!n.has(c))continue;let f=`var(--size-${s}, ${d}px)`,h=r?[`font-size: min(${f}, var(--sf-heading-max, 9999px))`,`font-weight: ${r}`]:[`font-size: ${f}`];i.push(`:where(${t} .${c}) { ${h.join("; ")} }`)}return i.join(`
|
|
2
2
|
`)}function $(t){return t.replace(/<(?=\/)/g,"\\3c ")}var b={"\\":"\\\\",'"':'\\"',"\n":"\\a ","\r":"\\d ","\f":"\\c "};function E(t){return t.replace(/[\\"\n\r\f]/g,e=>l(b,e)??e)}function P(t){let e=2166136261;for(let n=0;n<t.length;n+=1)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return(e>>>0).toString(36)}export{x as a,g as b,m as c,u as d,p as e,C as f,$ as g,E as h,P as i};
|